@stll/folio-core 0.69.0 → 0.70.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/_virtual/_rolldown/runtime.js +4 -4
- package/dist/ai-edits/apply.d.ts +39 -16
- package/dist/ai-edits/apply.js +1014 -723
- package/dist/ai-edits/block-identity.d.ts +6 -0
- package/dist/ai-edits/block-identity.js +11 -1
- package/dist/ai-edits/blockRange.d.ts +9 -0
- package/dist/ai-edits/clean-text.d.ts +2 -0
- package/dist/ai-edits/clean-text.js +2 -1
- package/dist/ai-edits/comment-lifecycle.d.ts +24 -0
- package/dist/ai-edits/comment-lifecycle.js +17 -8
- package/dist/ai-edits/directJoin.d.ts +30 -0
- package/dist/ai-edits/directJoin.js +30 -0
- package/dist/ai-edits/existingRevisions.d.ts +9 -0
- package/dist/ai-edits/existingRevisions.js +30 -0
- package/dist/ai-edits/finalSectionReview.d.ts +11 -0
- package/dist/ai-edits/finalSectionReview.js +26 -0
- package/dist/ai-edits/headless.d.ts +275 -14
- package/dist/ai-edits/headless.js +1595 -193
- package/dist/ai-edits/index.d.ts +11 -10
- package/dist/ai-edits/index.js +2 -2
- package/dist/ai-edits/markdownInsertion.d.ts +25 -0
- package/dist/ai-edits/markdownInsertion.js +67 -0
- package/dist/ai-edits/minimal-replacement.d.ts +120 -1
- package/dist/ai-edits/minimal-replacement.js +81 -1
- package/dist/ai-edits/newListNumbering.d.ts +20 -9
- package/dist/ai-edits/newListNumbering.js +25 -10
- package/dist/ai-edits/note-references.d.ts +19 -1
- package/dist/ai-edits/note-references.js +3 -1
- package/dist/ai-edits/pending-suggestions.d.ts +44 -2
- package/dist/ai-edits/pending-suggestions.js +481 -20
- package/dist/ai-edits/pendingJoin.d.ts +170 -0
- package/dist/ai-edits/pendingJoin.js +272 -0
- package/dist/ai-edits/read.d.ts +57 -4
- package/dist/ai-edits/read.js +317 -40
- package/dist/ai-edits/removed-blocks.d.ts +1 -1
- package/dist/ai-edits/result-validation.d.ts +36 -1
- package/dist/ai-edits/result-validation.js +1 -1
- package/dist/ai-edits/retired-comment-receipts.d.ts +20 -0
- package/dist/ai-edits/retired-comment-receipts.js +165 -0
- package/dist/ai-edits/revisionStretches.d.ts +17 -0
- package/dist/ai-edits/snapshot.d.ts +12 -3
- package/dist/ai-edits/snapshot.js +9 -7
- package/dist/ai-edits/snapshotBatchFacts.d.ts +52 -0
- package/dist/ai-edits/snapshotBatchFacts.js +184 -0
- package/dist/ai-edits/table-geometry.d.ts +45 -11
- package/dist/ai-edits/table-geometry.js +141 -26
- package/dist/ai-edits/table-mutation-plan.d.ts +12 -0
- package/dist/ai-edits/table-mutation-plan.js +1 -1
- package/dist/ai-edits/table-row-column-mutations.d.ts +26 -3
- package/dist/ai-edits/table-row-column-mutations.js +90 -11
- package/dist/ai-edits/table-template.d.ts +21 -0
- package/dist/ai-edits/tableInsertionModes.d.ts +10 -0
- package/dist/ai-edits/tableInsertionModes.js +8 -0
- package/dist/ai-edits/tracked-batch-fidelity.d.ts +23 -0
- package/dist/ai-edits/tracked-batch-fidelity.js +357 -0
- package/dist/ai-edits/types.d.ts +81 -15
- package/dist/ai-edits/undefinedReferences.d.ts +49 -0
- package/dist/ai-edits/undefinedReferences.js +234 -0
- package/dist/ai-suggestions/apply.d.ts +12 -0
- package/dist/ai-suggestions/conflict.d.ts +9 -0
- package/dist/ai-suggestions/text-positions.d.ts +13 -0
- package/dist/canonical/batchCommentReferences.d.ts +20 -0
- package/dist/canonical/batchCommentReferences.js +93 -0
- package/dist/canonical/canonicalBatchReview.d.ts +25 -0
- package/dist/canonical/canonicalBatchReview.js +132 -0
- package/dist/{controller → canonical}/canonicalComments.d.ts +7 -4
- package/dist/{controller → canonical}/canonicalComments.js +36 -9
- package/dist/canonical/canonicalCompilerRefusal.d.ts +13 -0
- package/dist/canonical/canonicalCompilerRefusal.js +75 -0
- package/dist/canonical/canonicalIdLease.d.ts +40 -0
- package/dist/canonical/canonicalIdLease.js +96 -0
- package/dist/{controller → canonical}/canonicalInlineProjection.d.ts +1 -1
- package/dist/{controller → canonical}/canonicalInlineProjection.js +40 -20
- package/dist/canonical/canonicalInsertedCommentRange.d.ts +15 -0
- package/dist/canonical/canonicalInsertedCommentRange.js +43 -0
- package/dist/canonical/canonicalInsertionReplayIds.d.ts +40 -0
- package/dist/canonical/canonicalInsertionReplayIds.js +73 -0
- package/dist/canonical/canonicalJoinedReceipts.d.ts +11 -0
- package/dist/canonical/canonicalJoinedReceipts.js +22 -0
- package/dist/{controller → canonical}/canonicalListRendering.js +1 -1
- package/dist/{controller → canonical}/canonicalLockGuard.d.ts +12 -1
- package/dist/{controller → canonical}/canonicalLockGuard.js +96 -21
- package/dist/{controller → canonical}/canonicalOperations.js +1 -1
- package/dist/{controller → canonical}/canonicalProjectionBlocks.d.ts +11 -1
- package/dist/{controller → canonical}/canonicalProjectionBlocks.js +8 -4
- package/dist/{controller → canonical}/canonicalPublicOperations.d.ts +24 -9
- package/dist/canonical/canonicalPublicOperations.js +4791 -0
- package/dist/canonical/canonicalRemoteHistory.d.ts +48 -0
- package/dist/canonical/canonicalRemoteHistory.js +176 -0
- package/dist/canonical/canonicalRevisionLocks.d.ts +18 -0
- package/dist/canonical/canonicalRevisionLocks.js +30 -0
- package/dist/canonical/canonicalRevisionReceipts.d.ts +15 -0
- package/dist/canonical/canonicalRevisionReceipts.js +25 -0
- package/dist/canonical/canonicalRoomBase.d.ts +23 -0
- package/dist/canonical/canonicalRoomBase.js +38 -0
- package/dist/canonical/canonicalSeedContent.d.ts +36 -0
- package/dist/{controller → canonical}/canonicalSeedContent.js +53 -5
- package/dist/{controller → canonical}/canonicalSelection.js +1 -1
- package/dist/{controller → canonical}/canonicalSession.d.ts +239 -12
- package/dist/{controller → canonical}/canonicalSession.js +1069 -173
- package/dist/canonical/canonicalSourceNormalization.d.ts +42 -0
- package/dist/{controller → canonical}/canonicalSourceNormalization.js +41 -23
- package/dist/{controller → canonical}/canonicalTocSelection.js +1 -1
- package/dist/canonical/canonicalTrackedBatchFidelity.d.ts +9 -0
- package/dist/canonical/canonicalTrackedBatchFidelity.js +125 -0
- package/dist/canonical/canonicalWholeTextFidelity.d.ts +21 -0
- package/dist/canonical/canonicalWholeTextFidelity.js +88 -0
- package/dist/canonical/commentAnchorParagraph.d.ts +10 -0
- package/dist/canonical/commentAnchorParagraph.js +11 -0
- package/dist/canonical/controlEdges.d.ts +12 -0
- package/dist/canonical/controlEdges.js +17 -0
- package/dist/canonical/paragraphPatchAsRead.d.ts +19 -0
- package/dist/canonical/paragraphPatchAsRead.js +32 -0
- package/dist/canonical/propertySourcePreservation.d.ts +38 -0
- package/dist/canonical/propertySourcePreservation.js +129 -0
- package/dist/canonical/replacementRunSources.d.ts +29 -0
- package/dist/canonical/replacementRunSources.js +78 -0
- package/dist/compare/compare.d.ts +8 -6
- package/dist/compare/compare.js +37 -8
- package/dist/compare/content-alignment.d.ts +10 -1
- package/dist/compare/content-alignment.js +188 -27
- package/dist/compare/content.d.ts +9 -1
- package/dist/compare/content.js +2 -2
- package/dist/compare/formatting.d.ts +1 -0
- package/dist/compare/import-style-closure.d.ts +1 -1
- package/dist/compare/inline-atom-alignment.d.ts +83 -0
- package/dist/compare/inline-atom-alignment.js +173 -0
- package/dist/compare/inline-atoms-model.d.ts +65 -0
- package/dist/compare/inline-atoms-model.js +1131 -0
- package/dist/compare/inline-atoms.d.ts +4 -4
- package/dist/compare/inline-atoms.js +28 -139
- package/dist/compare/inline-provenance-model.d.ts +37 -0
- package/dist/compare/inline-provenance-model.js +138 -0
- package/dist/compare/inline-provenance.d.ts +52 -4
- package/dist/compare/inline-provenance.js +40 -7
- package/dist/compare/plan.d.ts +38 -4
- package/dist/compare/plan.js +22 -8
- package/dist/compare/scenario.d.ts +22 -1
- package/dist/compare/section-boundary-properties.d.ts +38 -5
- package/dist/compare/section-boundary-properties.js +164 -48
- package/dist/compare/style-resources.d.ts +3 -2
- package/dist/compare/style-resources.js +5 -4
- package/dist/compare/types.d.ts +5 -2
- package/dist/compare/verification.d.ts +24 -3
- package/dist/compare/verification.js +25 -18
- package/dist/compat/eigenpal.d.ts +32 -31
- package/dist/compat/eigenpal.js +3 -5
- package/dist/content-controls/findContentControls.d.ts +9 -0
- package/dist/content-controls/index.d.ts +8 -0
- package/dist/content-controls/mutateContentControls.d.ts +9 -0
- package/dist/controller/activeEditorStory.d.ts +1 -0
- package/dist/controller/anonymizationHighlights.d.ts +56 -0
- package/dist/controller/anonymizationHighlights.js +148 -0
- package/dist/controller/autocompleteSuggestion.d.ts +85 -0
- package/dist/controller/autocompleteSuggestion.js +213 -0
- package/dist/controller/canonicalClipboard.d.ts +2 -2
- package/dist/controller/canonicalClipboard.js +34 -14
- package/dist/controller/canonicalClipboardResources.js +9 -4
- package/dist/controller/canonicalCollaboration.d.ts +147 -0
- package/dist/controller/canonicalCollaboration.js +360 -0
- package/dist/controller/canonicalComposition.d.ts +7 -1
- package/dist/controller/canonicalComposition.js +14 -8
- package/dist/controller/canonicalContentControlValue.d.ts +17 -0
- package/dist/controller/canonicalContentControlValue.js +72 -0
- package/dist/controller/canonicalIndexedDbJournal.d.ts +6 -0
- package/dist/controller/canonicalIndexedDbJournal.js +80 -0
- package/dist/controller/canonicalInput.d.ts +13 -2
- package/dist/controller/canonicalInput.js +96 -11
- package/dist/controller/canonicalPresence.d.ts +63 -0
- package/dist/controller/canonicalPresence.js +125 -0
- package/dist/controller/canonicalReview.d.ts +1 -1
- package/dist/controller/canonicalReview.js +1 -1
- package/dist/controller/canonicalRoomAuthority.d.ts +66 -0
- package/dist/controller/canonicalRoomAuthority.js +119 -0
- package/dist/controller/canonicalRoomEditor.d.ts +87 -0
- package/dist/controller/canonicalRoomEditor.js +98 -0
- package/dist/controller/canonicalRoomTransport.d.ts +79 -0
- package/dist/controller/canonicalRoomTransport.js +104 -0
- package/dist/controller/canonicalRoomWire.d.ts +80 -0
- package/dist/controller/canonicalRoomWire.js +155 -0
- package/dist/controller/canonicalStoryEditor.d.ts +12 -0
- package/dist/controller/canonicalStoryEditor.js +39 -7
- package/dist/controller/canonicalStructure.d.ts +15 -5
- package/dist/controller/canonicalStructure.js +95 -34
- package/dist/controller/canonicalTabRoom.d.ts +91 -0
- package/dist/controller/canonicalTabRoom.js +553 -0
- package/dist/controller/canonicalYjsRoom.d.ts +102 -0
- package/dist/controller/canonicalYjsRoom.js +454 -0
- package/dist/controller/contentControlWidgetController.d.ts +16 -0
- package/dist/controller/contentControlWidgetController.js +7 -1
- package/dist/controller/documentChangeNotification.d.ts +5 -0
- package/dist/controller/documentChangeNotification.js +7 -0
- package/dist/controller/folioEditor.d.ts +12 -4
- package/dist/controller/folioEditor.js +18 -1
- package/dist/controller/folioEditorEvents.d.ts +1 -1
- package/dist/controller/fontReadiness.d.ts +14 -1
- package/dist/controller/fontReadiness.js +4 -4
- package/dist/controller/headerFooterEditorManager.d.ts +13 -7
- package/dist/controller/headerFooterEditorManager.js +24 -25
- package/dist/controller/hiddenEditorApi.d.ts +87 -13
- package/dist/controller/hiddenEditorApi.js +41 -3
- package/dist/controller/hiddenEditorManager.d.ts +62 -17
- package/dist/controller/hiddenEditorManager.js +378 -78
- package/dist/controller/hyphenationReadiness.d.ts +10 -0
- package/dist/controller/layoutPipeline.d.ts +14 -12
- package/dist/controller/layoutPipeline.js +64 -53
- package/dist/controller/layoutSession.d.ts +7 -6
- package/dist/controller/legacyTextAddress.d.ts +9 -0
- package/dist/controller/legacyTextAddress.js +52 -0
- package/dist/controller/noteEditorManager.d.ts +14 -7
- package/dist/controller/noteEditorManager.js +33 -32
- package/dist/controller/textPositionLookup.d.ts +24 -0
- package/dist/controller/textPositionLookup.js +78 -0
- package/dist/display-list/build/buildContext.d.ts +11 -0
- package/dist/display-list/build/buildDisplayList.d.ts +14 -1
- package/dist/display-list/build/colors.d.ts +8 -0
- package/dist/display-list/build/floatingImages.d.ts +10 -0
- package/dist/display-list/build/fontTable.d.ts +8 -0
- package/dist/display-list/build/furniture.d.ts +14 -2
- package/dist/display-list/build/glyphs.d.ts +7 -0
- package/dist/display-list/build/headerFooterPrimitives.d.ts +13 -0
- package/dist/display-list/build/imagePrimitives.d.ts +10 -0
- package/dist/display-list/build/pageBorderPrimitives.d.ts +16 -2
- package/dist/display-list/build/pageFurniture.d.ts +13 -0
- package/dist/display-list/build/paragraphPrimitives.d.ts +18 -0
- package/dist/display-list/build/paragraphPrimitives.js +17 -5
- package/dist/display-list/build/previewPrimitives.d.ts +14 -0
- package/dist/display-list/build/regions.d.ts +14 -0
- package/dist/display-list/build/storyPrimitives.d.ts +16 -0
- package/dist/display-list/build/strokes.d.ts +21 -3
- package/dist/display-list/build/strokes.js +2 -3
- package/dist/display-list/build/tablePrimitives.d.ts +15 -1
- package/dist/display-list/build/tablePrimitives.js +92 -55
- package/dist/display-list/build/textBoxPrimitives.d.ts +6 -0
- package/dist/display-list/build/unsupported.d.ts +10 -0
- package/dist/display-list/build/watermarkPrimitives.d.ts +15 -1
- package/dist/display-list/dom/renderDisplayListToDom.d.ts +33 -0
- package/dist/display-list/dom/renderDisplayListToDom.js +12 -4
- package/dist/display-list/editor/displayListPagePainter.d.ts +29 -1
- package/dist/display-list/editor/pageRenderer.d.ts +7 -0
- package/dist/display-list/html/renderDisplayListToHtml.d.ts +10 -0
- package/dist/display-list/primitives.d.ts +12 -1
- package/dist/display-list/selectDisplayPages.d.ts +8 -0
- package/dist/display-list/types.d.ts +11 -0
- package/dist/document-operations.d.ts +35 -5
- package/dist/document-operations.js +178 -40
- package/dist/docx/attributeRemainder.d.ts +35 -1
- package/dist/docx/automaticNoteMarkImport.d.ts +12 -0
- package/dist/docx/automaticNoteMarkImport.js +41 -0
- package/dist/docx/blockContentParser.d.ts +14 -5
- package/dist/docx/blockContentParser.js +19 -0
- package/dist/docx/blockPlainText.d.ts +14 -0
- package/dist/docx/blockPlainText.js +55 -4
- package/dist/docx/bookmarkParser.d.ts +17 -0
- package/dist/docx/bookmarkRangeJoin.d.ts +14 -0
- package/dist/docx/borderParser.d.ts +11 -0
- package/dist/docx/builtInStyles.d.ts +44 -1
- package/dist/docx/canonicalSave.d.ts +14 -4
- package/dist/docx/canonicalSave.js +128 -30
- package/dist/docx/canonicalSessionInput.d.ts +59 -4
- package/dist/docx/canonicalSessionInput.js +147 -6
- package/dist/docx/canonicalStoryRepack.d.ts +1 -0
- package/dist/docx/canonicalStoryRepack.js +2 -2
- package/dist/docx/chartPreview.js +10 -9
- package/dist/docx/commentAnchorIndex.d.ts +33 -7
- package/dist/docx/commentAnchorIndex.js +162 -36
- package/dist/docx/commentIdNormalization.d.ts +14 -0
- package/dist/docx/commentParagraphIds.d.ts +17 -0
- package/dist/docx/commentParagraphIds.js +79 -0
- package/dist/docx/commentParser.d.ts +20 -1
- package/dist/docx/commentParser.js +5 -0
- package/dist/docx/commentRangeIntegrity.js +27 -11
- package/dist/docx/commentRangeJoin.d.ts +21 -1
- package/dist/docx/commentRangeJoin.js +5 -1
- package/dist/docx/commentReferenceCompletion.d.ts +29 -2
- package/dist/docx/commentReferenceCompletion.js +4 -3
- package/dist/docx/commentReferenceNormalization.d.ts +17 -0
- package/dist/docx/commentReferenceNormalization.js +484 -49
- package/dist/docx/commentReplyMarkers.d.ts +22 -0
- package/dist/docx/compatibility.d.ts +10 -0
- package/dist/docx/containerChildren.d.ts +26 -1
- package/dist/docx/containerChildren.js +29 -3
- package/dist/docx/contentTypeRegistry.d.ts +16 -0
- package/dist/docx/contentTypeRegistry.js +48 -20
- package/dist/docx/danglingRelationshipReferences.d.ts +13 -0
- package/dist/docx/defaultParagraphStyle.d.ts +14 -1
- package/dist/docx/documentClone.d.ts +3 -2
- package/dist/docx/documentClone.js +1 -1
- package/dist/docx/documentParser.d.ts +28 -3
- package/dist/docx/documentParser.js +71 -4
- package/dist/docx/drawingAnchor.d.ts +17 -0
- package/dist/docx/drawingGroupChildren.d.ts +12 -0
- package/dist/docx/drawingIdNormalization.d.ts +8 -0
- package/dist/docx/drawingIdNormalization.js +46 -1
- package/dist/docx/drawingUtils.d.ts +6 -0
- package/dist/docx/drawingUtils.js +2 -2
- package/dist/docx/encryption/agileDecryption.d.ts +7 -0
- package/dist/docx/ensureParaIds.d.ts +73 -0
- package/dist/docx/ensureParaIds.js +299 -59
- package/dist/docx/ensureUniqueControlIds.js +10 -3
- package/dist/docx/ensureUniqueRevisionIds.d.ts +28 -0
- package/dist/docx/ensureUniqueRevisionIds.js +140 -0
- package/dist/docx/fieldParser.d.ts +27 -2
- package/dist/docx/fieldState.d.ts +15 -0
- package/dist/docx/fieldWrapperCaptures.d.ts +18 -0
- package/dist/docx/fieldWrapperCaptures.js +117 -0
- package/dist/docx/foldedListNumberFields.d.ts +14 -0
- package/dist/docx/fontTableParser.d.ts +11 -0
- package/dist/docx/footnoteParser.d.ts +24 -3
- package/dist/docx/footnoteParser.js +29 -6
- package/dist/docx/graphicFrameLocks.d.ts +9 -1
- package/dist/docx/groupDrawingParser.d.ts +2 -2
- package/dist/docx/headerFooterParser.d.ts +37 -5
- package/dist/docx/headerFooterParser.js +18 -4
- package/dist/docx/headerFooterRefParser.d.ts +7 -0
- package/dist/docx/hostCommentThreads.d.ts +10 -1
- package/dist/docx/hyperlinkParser.d.ts +20 -3
- package/dist/docx/hyperlinkParser.js +19 -24
- package/dist/docx/imageParser.d.ts +27 -0
- package/dist/docx/index.d.ts +3 -3
- package/dist/docx/inlineContentRemovals.d.ts +8 -0
- package/dist/docx/inlineWrapperContent.d.ts +33 -1
- package/dist/docx/inlineWrapperContent.js +145 -1
- package/dist/docx/inlineWrapperParser.d.ts +14 -0
- package/dist/docx/listMarkerComputation.d.ts +37 -6
- package/dist/docx/listMarkerComputation.js +77 -28
- package/dist/docx/listModelNormalization.d.ts +24 -8
- package/dist/docx/listModelNormalization.js +426 -142
- package/dist/docx/listNumberingInstances.d.ts +38 -8
- package/dist/docx/listNumberingInstances.js +89 -42
- package/dist/docx/mainDocumentPart.d.ts +22 -1
- package/dist/docx/mainDocumentPart.js +51 -12
- package/dist/docx/markupRangeMarker.d.ts +16 -0
- package/dist/docx/markupRangeMarker.js +11 -2
- package/dist/docx/mathToMathml.d.ts +28 -0
- package/dist/docx/mergePropertyChangeLinks.d.ts +11 -0
- package/dist/docx/mergePropertyChangeLinks.js +30 -0
- package/dist/docx/nonVisualDrawingProps.d.ts +6 -0
- package/dist/docx/normalizeBaseDirection.d.ts +17 -0
- package/dist/docx/normalizedSourceParts.d.ts +21 -0
- package/dist/docx/normalizedSourceParts.js +81 -0
- package/dist/docx/notePropertiesParser.d.ts +7 -0
- package/dist/docx/noteReferenceMark.d.ts +9 -0
- package/dist/docx/noteReferenceStyles.d.ts +13 -0
- package/dist/docx/numberingParser.d.ts +12 -0
- package/dist/docx/numberingReference.d.ts +10 -0
- package/dist/docx/numberingReferenceNormalization.d.ts +15 -0
- package/dist/docx/packageRelationshipsRoot.d.ts +24 -0
- package/dist/docx/packageRelationshipsRoot.js +28 -0
- package/dist/docx/packageUnnamedParagraphIds.d.ts +18 -0
- package/dist/docx/packageUnnamedParagraphIds.js +78 -0
- package/dist/docx/paraIdAttribute.d.ts +15 -0
- package/dist/docx/paragraphParser.d.ts +15 -3
- package/dist/docx/paragraphParser.js +126 -140
- package/dist/docx/paragraphProperties.d.ts +15 -1
- package/dist/docx/paragraphProperties.js +3 -5
- package/dist/docx/paragraphPropertySource.d.ts +55 -21
- package/dist/docx/paragraphPropertySource.js +183 -40
- package/dist/docx/paragraphTextBoxEnrichment.d.ts +3 -2
- package/dist/docx/paragraphTraversal.d.ts +39 -4
- package/dist/docx/paragraphTraversal.js +158 -42
- package/dist/docx/parseContext.d.ts +15 -0
- package/dist/docx/parseWarningMessage.d.ts +9 -0
- package/dist/docx/parseWarningMessage.js +7 -0
- package/dist/docx/parser.d.ts +1 -1
- package/dist/docx/parser.js +103 -29
- package/dist/docx/parserEnums.d.ts +21 -0
- package/dist/docx/partRelationships.d.ts +15 -0
- package/dist/docx/partRelationships.js +58 -0
- package/dist/docx/preservedRunContent.d.ts +2 -1
- package/dist/docx/preservedRunContent.js +40 -1
- package/dist/docx/previewBudget.d.ts +31 -0
- package/dist/docx/relsParser.d.ts +23 -0
- package/dist/docx/removeHeaderFooterParts.d.ts +1 -1
- package/dist/docx/replyToComment.d.ts +22 -1
- package/dist/docx/replyToComment.js +25 -21
- package/dist/docx/reviewResolutionProvenance.d.ts +32 -5
- package/dist/docx/reviewResolutionProvenance.js +229 -38
- package/dist/docx/rezip.d.ts +58 -11
- package/dist/docx/rezip.js +367 -101
- package/dist/docx/runConsolidator.d.ts +13 -0
- package/dist/docx/runParser.d.ts +4 -3
- package/dist/docx/runParser.js +27 -6
- package/dist/docx/runPayload.d.ts +29 -0
- package/dist/docx/saveDiagnostics.d.ts +3 -5
- package/dist/docx/sdtProperties.d.ts +17 -0
- package/dist/docx/sdtPropertiesPatch.d.ts +14 -0
- package/dist/docx/sectionParser.d.ts +21 -0
- package/dist/docx/sectionParser.js +1 -6
- package/dist/docx/selectiveSave.js +271 -80
- package/dist/docx/selectiveXmlPatch.d.ts +36 -1
- package/dist/docx/selectiveXmlPatch.js +342 -78
- package/dist/docx/serializer/blockSdtSerializer.d.ts +10 -0
- package/dist/docx/serializer/borderSerializer.d.ts +8 -0
- package/dist/docx/serializer/commentSerializer.d.ts +12 -1
- package/dist/docx/serializer/commentSerializer.js +1 -1
- package/dist/docx/serializer/documentSerializer.d.ts +21 -3
- package/dist/docx/serializer/documentSerializer.js +44 -6
- package/dist/docx/serializer/groupTextBoxWriteBack.d.ts +14 -0
- package/dist/docx/serializer/headerFooterSerializer.d.ts +11 -0
- package/dist/docx/serializer/markupRangeAttributes.d.ts +8 -0
- package/dist/docx/serializer/markupRangeAttributes.js +3 -1
- package/dist/docx/serializer/noteSerializer.d.ts +21 -0
- package/dist/docx/serializer/numberingSerializer.d.ts +14 -0
- package/dist/docx/serializer/paragraphSerializer.d.ts +11 -0
- package/dist/docx/serializer/paragraphSerializer.js +21 -9
- package/dist/docx/serializer/partNamespaces.d.ts +2 -0
- package/dist/docx/serializer/partNamespaces.js +3 -1
- package/dist/docx/serializer/runSerializer.js +12 -3
- package/dist/docx/serializer/sdtPropertiesSerializer.d.ts +15 -0
- package/dist/docx/serializer/stylesSerializer.d.ts +26 -1
- package/dist/docx/serializer/stylesSerializer.js +111 -23
- package/dist/docx/serializer/tableSerializer.js +9 -7
- package/dist/docx/serializer/themeSerializer.d.ts +2 -1
- package/dist/docx/server/applyDocxXmlPatchProposal.js +1 -1
- package/dist/docx/server/build.d.ts +2 -2
- package/dist/docx/server/changeListFormat.d.ts +20 -0
- package/dist/docx/server/changeListFormat.js +102 -0
- package/dist/docx/server/createBilingualDocument.d.ts +21 -0
- package/dist/docx/server/materializeYjsDocx.js +2 -2
- package/dist/docx/server/migrateYjsAttrSchema.js +5 -5
- package/dist/docx/sessionListPruning.d.ts +11 -0
- package/dist/docx/settingsParser.d.ts +10 -0
- package/dist/docx/shadingParser.d.ts +10 -0
- package/dist/docx/shapeAlternateContent.js +9 -2
- package/dist/docx/shapeParser.d.ts +27 -0
- package/dist/docx/splitRevisionPieces.d.ts +1 -1
- package/dist/docx/storyBlockReplay.d.ts +37 -3
- package/dist/docx/storyBlockReplay.js +277 -68
- package/dist/docx/strictNames.d.ts +12 -1
- package/dist/docx/strictValueEncodings.gen.d.ts +9 -0
- package/dist/docx/structuralXmlPatch.d.ts +19 -3
- package/dist/docx/structuralXmlPatch.js +136 -53
- package/dist/docx/styleParser.d.ts +20 -3
- package/dist/docx/styleParser.js +3 -2
- package/dist/docx/tableLook.d.ts +15 -1
- package/dist/docx/tableParser.d.ts +17 -6
- package/dist/docx/tableParser.js +10 -5
- package/dist/docx/textBoxContentParser.d.ts +3 -2
- package/dist/docx/textBoxParser.d.ts +30 -3
- package/dist/docx/themeColorAttribute.d.ts +11 -0
- package/dist/docx/themeParser.d.ts +17 -5
- package/dist/docx/trackedMoveRangeNormalization.d.ts +9 -0
- package/dist/docx/trackedMoveRangeNormalization.js +40 -16
- package/dist/docx/transitionalSpelling.d.ts +9 -0
- package/dist/docx/unnamedParagraphIds.d.ts +33 -0
- package/dist/docx/unnamedParagraphIds.js +43 -0
- package/dist/docx/unreferencedHeaderFooters.d.ts +27 -0
- package/dist/docx/unreferencedHeaderFooters.js +130 -0
- package/dist/docx/unzip.d.ts +25 -0
- package/dist/docx/verbatimCapture.d.ts +18 -0
- package/dist/docx/verbatimCapture.js +76 -9
- package/dist/docx/vmlImageParser.d.ts +32 -1
- package/dist/docx/watermarkParser.d.ts +21 -0
- package/dist/docx/wrapPolygon.d.ts +11 -0
- package/dist/docx/wrapTypes.d.ts +6 -0
- package/dist/docx/xmlParser.d.ts +22 -18
- package/dist/docx/xmlParser.js +1 -18
- package/dist/docx/xmlRootInsertion.d.ts +8 -0
- package/dist/docx/xmlRootInsertion.js +28 -0
- package/dist/docx/xmlSafety.d.ts +1 -0
- package/dist/docx/xmlSafety.js +7 -11
- package/dist/export-pdf.d.ts +24 -1
- package/dist/fields/resolveFieldValues.js +2 -1
- package/dist/fonts/fontsourceFaces.d.ts +2 -2
- package/dist/fonts/headlessMeasure.d.ts +16 -0
- package/dist/generated/text_shaper.js +71 -59
- package/dist/generated/text_shaper_bg.wasm +0 -0
- package/dist/headless-layout.d.ts +36 -5
- package/dist/headless-layout.js +19 -4
- package/dist/i18n/messages/ar.gen.js +1 -0
- package/dist/i18n/messages/catalogs.gen.d.ts +17 -0
- package/dist/i18n/messages/catalogs.gen.js +17 -0
- package/dist/i18n/messages/cs.gen.js +1 -0
- package/dist/i18n/messages/de.gen.js +1 -0
- package/dist/i18n/messages/en.gen.js +1 -0
- package/dist/i18n/messages/es.gen.js +1 -0
- package/dist/i18n/messages/et.gen.js +1 -0
- package/dist/i18n/messages/fr.gen.js +1 -0
- package/dist/i18n/messages/he.gen.js +1 -0
- package/dist/i18n/messages/hi.gen.js +1 -0
- package/dist/i18n/messages/hu.gen.js +1 -0
- package/dist/i18n/messages/lt.gen.js +1 -0
- package/dist/i18n/messages/lv.gen.js +1 -0
- package/dist/i18n/messages/messages.gen.d.ts +1 -0
- package/dist/i18n/messages/pl.gen.js +1 -0
- package/dist/i18n/messages/pt-BR.gen.js +1 -0
- package/dist/i18n/messages/sk.gen.js +1 -0
- package/dist/i18n/messages/tr.gen.js +1 -0
- package/dist/i18n/messages/zh-CN.gen.js +1 -0
- package/dist/index.d.ts +33 -31
- package/dist/index.js +3 -4
- package/dist/internal/canonicalOperationStaging.d.ts +2 -0
- package/dist/internal/canonicalOperationStaging.js +4 -0
- package/dist/internal/canonicalTyping.d.ts +9 -0
- package/dist/internal/canonicalTyping.js +7 -0
- package/dist/internal/compare/inline-presentation.d.ts +8 -0
- package/dist/internal/indexedPositionMap.js +2 -1
- package/dist/internal/revisionResolutionInline.js +13 -13
- package/dist/internal/revisionResolutionStep.js +1 -0
- package/dist/internal/revisionResolutionTracking.js +2 -1
- package/dist/internal/wholeStoryRevisionResolution.d.ts +1 -1
- package/dist/internal/wholeStoryRevisionResolution.js +57 -66
- package/dist/layout-bridge/cellSelectionHighlight.d.ts +8 -0
- package/dist/layout-bridge/convert/altChunkPlaceholder.d.ts +7 -0
- package/dist/layout-bridge/convert/editingFont.d.ts +26 -0
- package/dist/layout-bridge/convert/editingFont.js +42 -0
- package/dist/layout-bridge/convert/endnoteLayout.d.ts +19 -1
- package/dist/layout-bridge/convert/flowBlockPostprocessing.d.ts +5 -0
- package/dist/layout-bridge/convert/flowBorders.d.ts +10 -4
- package/dist/layout-bridge/convert/flowBorders.js +13 -1
- package/dist/layout-bridge/convert/flowConversionShared.d.ts +27 -12
- package/dist/layout-bridge/convert/flowConversionShared.js +36 -11
- package/dist/layout-bridge/convert/footnoteLayout.d.ts +12 -4
- package/dist/layout-bridge/convert/footnoteLayout.js +3 -1
- package/dist/layout-bridge/convert/headerFooterLayout.d.ts +25 -5
- package/dist/layout-bridge/convert/imageConversion.d.ts +5 -1
- package/dist/layout-bridge/convert/listMarkers.d.ts +12 -7
- package/dist/layout-bridge/convert/markupViewFlow.d.ts +21 -0
- package/dist/layout-bridge/convert/markupViewFlow.js +4 -1
- package/dist/layout-bridge/convert/noteReferences.d.ts +4 -0
- package/dist/layout-bridge/convert/pageBreakSplitting.d.ts +4 -0
- package/dist/layout-bridge/convert/paragraphAttrs.d.ts +13 -8
- package/dist/layout-bridge/convert/paragraphAttrs.js +1 -1
- package/dist/layout-bridge/convert/paragraphBlockCache.d.ts +10 -0
- package/dist/layout-bridge/convert/paragraphBlockCache.js +3 -10
- package/dist/layout-bridge/convert/paragraphConversion.d.ts +8 -4
- package/dist/layout-bridge/convert/paragraphFrames.d.ts +2 -4
- package/dist/layout-bridge/convert/paragraphFrames.js +4 -4
- package/dist/layout-bridge/convert/paragraphMarkFormatting.d.ts +13 -4
- package/dist/layout-bridge/convert/paragraphRuns.d.ts +5 -0
- package/dist/layout-bridge/convert/paragraphRuns.js +18 -4
- package/dist/layout-bridge/convert/runFormattingMerge.d.ts +10 -4
- package/dist/layout-bridge/convert/runMarkFormatting.d.ts +8 -3
- package/dist/layout-bridge/convert/runMarkFormatting.js +3 -5
- package/dist/layout-bridge/convert/sectionBoundaries.d.ts +4 -0
- package/dist/layout-bridge/convert/tableConversion.d.ts +15 -5
- package/dist/layout-bridge/convert/tableConversion.js +40 -19
- package/dist/layout-bridge/convert/templatePreviewFlow.d.ts +38 -1
- package/dist/layout-bridge/convert/textBoxFill.d.ts +7 -2
- package/dist/layout-bridge/convert/textFormattingConversion.d.ts +18 -12
- package/dist/layout-bridge/convert/toFlowBlocks.d.ts +8 -2
- package/dist/layout-bridge/convert/toFlowBlocks.js +67 -14
- package/dist/layout-bridge/convert/topLevelConversion.d.ts +26 -4
- package/dist/layout-bridge/convert/wrapEditorViewAsSurface.d.ts +10 -0
- package/dist/layout-bridge/dom/clickToPositionDom.js +4 -4
- package/dist/layout-bridge/dom/noteStoryDom.d.ts +1 -0
- package/dist/layout-bridge/engine/blockIndex.d.ts +3 -0
- package/dist/layout-bridge/engine/clickToPosition.d.ts +9 -0
- package/dist/layout-bridge/engine/hitTest.d.ts +6 -0
- package/dist/layout-bridge/engine/hitTest.js +3 -3
- package/dist/layout-bridge/engine/measuring/index.d.ts +20 -8
- package/dist/layout-bridge/engine/selectionRects.d.ts +9 -0
- package/dist/layout-bridge/headerFooterLayout.d.ts +12 -0
- package/dist/layout-bridge/headerFooterLayout.js +3 -3
- package/dist/layout-bridge/sectionColumns.d.ts +10 -1
- package/dist/layout-engine/footnoteContinuation.d.ts +8 -0
- package/dist/layout-engine/imageLayout.d.ts +4 -1
- package/dist/layout-engine/index.d.ts +10 -5
- package/dist/layout-engine/index.js +9 -3
- package/dist/layout-engine/keep-together.d.ts +6 -0
- package/dist/layout-engine/layoutFlowShared.d.ts +4 -0
- package/dist/layout-engine/layoutInstrumentation.d.ts +40 -1
- package/dist/layout-engine/layoutInstrumentation.js +26 -4
- package/dist/layout-engine/lineFlow.d.ts +1 -0
- package/dist/layout-engine/lineFlow.js +4 -1
- package/dist/layout-engine/measure/advanceComposition.d.ts +14 -1
- package/dist/layout-engine/measure/automaticTextSpacing.d.ts +1 -1
- package/dist/layout-engine/measure/cache.d.ts +6 -0
- package/dist/layout-engine/measure/cache.js +3 -0
- package/dist/layout-engine/measure/crossRunWords.d.ts +1 -1
- package/dist/layout-engine/measure/floatingLineClearance.d.ts +4 -0
- package/dist/layout-engine/measure/floatingTablePosition.d.ts +32 -1
- package/dist/layout-engine/measure/floatingTablePosition.js +49 -1
- package/dist/layout-engine/measure/font-metrics.worker.d.ts +16 -0
- package/dist/layout-engine/measure/hyphenationDictionaries.d.ts +18 -0
- package/dist/layout-engine/measure/hyphenationPreload.d.ts +4 -0
- package/dist/layout-engine/measure/index.d.ts +18 -8
- package/dist/layout-engine/measure/index.js +2 -1
- package/dist/layout-engine/measure/inlineObjectMetrics.d.ts +4 -0
- package/dist/layout-engine/measure/justification.d.ts +5 -1
- package/dist/layout-engine/measure/lineFitting.d.ts +6 -1
- package/dist/layout-engine/measure/lineTypography.d.ts +6 -1
- package/dist/layout-engine/measure/listMarkerWidth.d.ts +16 -1
- package/dist/layout-engine/measure/measureBlocks.d.ts +4 -1
- package/dist/layout-engine/measure/measureBlocks.js +127 -102
- package/dist/layout-engine/measure/measureContainer.d.ts +17 -0
- package/dist/layout-engine/measure/measureHelpers.d.ts +10 -1
- package/dist/layout-engine/measure/measureParagraph.d.ts +7 -1
- package/dist/layout-engine/measure/measureParagraph.js +51 -21
- package/dist/layout-engine/measure/measureProvider.d.ts +10 -0
- package/dist/layout-engine/measure/measureTypes.d.ts +8 -0
- package/dist/layout-engine/measure/measureWorker.d.ts +30 -0
- package/dist/layout-engine/measure/measureWorkerProtocol.d.ts +14 -0
- package/dist/layout-engine/measure/measuresHoldNoPositions.d.ts +40 -0
- package/dist/layout-engine/measure/measuresHoldNoPositions.js +14 -0
- package/dist/layout-engine/measure/paragraphKeyMemo.d.ts +12 -0
- package/dist/layout-engine/measure/paragraphMeasureShared.d.ts +21 -2
- package/dist/layout-engine/measure/paragraphMeasureShared.js +20 -1
- package/dist/layout-engine/measure/paragraphTabs.d.ts +4 -0
- package/dist/layout-engine/measure/raisedTableWrap.d.ts +16 -0
- package/dist/layout-engine/measure/raisedTableWrap.js +105 -0
- package/dist/layout-engine/measure/tableBorderBands.d.ts +35 -0
- package/dist/layout-engine/measure/tableBorderBands.js +251 -0
- package/dist/layout-engine/measure/tableCellFloating.js +1 -1
- package/dist/layout-engine/measure/tableCellFlow.d.ts +4 -4
- package/dist/layout-engine/measure/tableCellFlow.js +7 -10
- package/dist/layout-engine/measure/tableCellGrid.d.ts +4 -1
- package/dist/layout-engine/measure/tableCellGrid.js +30 -3
- package/dist/layout-engine/measure/tableFragmentBorderGeometry.js +2 -1
- package/dist/layout-engine/measure/tableMeasureMemo.d.ts +23 -0
- package/dist/layout-engine/measure/tableMeasureMemo.js +40 -0
- package/dist/layout-engine/measure/tableNoWrapWidths.d.ts +12 -0
- package/dist/layout-engine/measure/tableNoWrapWidths.js +73 -0
- package/dist/layout-engine/measure/tableVisibleBand.d.ts +6 -0
- package/dist/layout-engine/measure/textMeasurementPolicy.d.ts +7 -1
- package/dist/layout-engine/noteAreaFlow.d.ts +10 -1
- package/dist/layout-engine/paginator.d.ts +6 -0
- package/dist/layout-engine/paginator.js +6 -5
- package/dist/layout-engine/paragraphLayout.d.ts +5 -1
- package/dist/layout-engine/paragraphSpacing.d.ts +17 -2
- package/dist/layout-engine/paragraphSpacing.js +103 -15
- package/dist/layout-engine/pmPageIndex.d.ts +14 -1
- package/dist/layout-engine/pmPageIndex.js +10 -1
- package/dist/layout-engine/section-breaks.d.ts +6 -0
- package/dist/layout-engine/sectionLayout.d.ts +6 -1
- package/dist/layout-engine/sectionVerticalAlignment.js +2 -1
- package/dist/layout-engine/tableHeaderCompatibility.d.ts +3 -0
- package/dist/layout-engine/tableHeaderCompatibility.js +5 -0
- package/dist/layout-engine/tableLayout.d.ts +17 -6
- package/dist/layout-engine/tableLayout.js +36 -25
- package/dist/layout-engine/tableRowBreak.d.ts +16 -0
- package/dist/layout-engine/tableRowBreak.js +2 -1
- package/dist/layout-engine/textBoxFlow.d.ts +9 -0
- package/dist/layout-engine/textBoxLayout.d.ts +5 -1
- package/dist/layout-engine/types.d.ts +35 -2
- package/dist/layout-engine/types.js +77 -27
- package/dist/layout-painter/borderStroke.d.ts +1 -1
- package/dist/layout-painter/characterFillBand.d.ts +14 -0
- package/dist/layout-painter/characterFillBand.js +79 -0
- package/dist/layout-painter/imageLayout.d.ts +11 -2
- package/dist/layout-painter/index.d.ts +12 -6
- package/dist/layout-painter/pageShellStyles.d.ts +9 -0
- package/dist/layout-painter/previewSvg.d.ts +7 -0
- package/dist/layout-painter/reconcileRenderedContent.js +3 -1
- package/dist/layout-painter/registry/modules/image.d.ts +7 -0
- package/dist/layout-painter/registry/modules/paragraph.d.ts +8 -0
- package/dist/layout-painter/registry/modules/table.d.ts +6 -0
- package/dist/layout-painter/registry/modules/textBox.d.ts +3 -0
- package/dist/layout-painter/registry/modules.d.ts +10 -0
- package/dist/layout-painter/registry/registry.d.ts +8 -0
- package/dist/layout-painter/registry/types.d.ts +11 -0
- package/dist/layout-painter/renderFragment.d.ts +6 -0
- package/dist/layout-painter/renderImage.d.ts +8 -0
- package/dist/layout-painter/renderPage.d.ts +10 -3
- package/dist/layout-painter/renderPage.js +23 -4
- package/dist/layout-painter/renderParagraph.d.ts +6 -0
- package/dist/layout-painter/renderParagraph.js +33 -16
- package/dist/layout-painter/renderTable.d.ts +10 -1
- package/dist/layout-painter/renderTable.js +112 -24
- package/dist/layout-painter/renderTextBox.d.ts +9 -0
- package/dist/layout-painter/renderUtils.d.ts +5 -1
- package/dist/layout-painter/renderWatermark.d.ts +11 -1
- package/dist/layout-painter/sdtBoundary.d.ts +10 -0
- package/dist/managers/ClipboardManager.d.ts +13 -0
- package/dist/managers/ContextMenuManager.d.ts +16 -4
- package/dist/managers/ContextMenuManager.js +3 -3
- package/dist/managers/DocumentLoaderManager.d.ts +19 -5
- package/dist/managers/DocumentLoaderManager.js +48 -13
- package/dist/managers/EditorModeManager.d.ts +11 -0
- package/dist/managers/ErrorManager.d.ts +11 -0
- package/dist/managers/FindReplaceManager.d.ts +14 -27
- package/dist/managers/FindReplaceManager.js +0 -49
- package/dist/managers/HistoryManager.d.ts +18 -0
- package/dist/managers/TableSelectionManager.d.ts +18 -4
- package/dist/managers/TableSelectionManager.js +22 -5
- package/dist/managers/editorShortcuts.d.ts +14 -2
- package/dist/managers/editorShortcuts.js +5 -3
- package/dist/managers/types.d.ts +15 -1
- package/dist/markdown/annotations.d.ts +9 -0
- package/dist/markdown/countParagraphList.d.ts +8 -0
- package/dist/markdown/escape.d.ts +6 -4
- package/dist/markdown/escape.js +17 -8
- package/dist/markdown/images.d.ts +11 -0
- package/dist/markdown/index.d.ts +24 -1
- package/dist/markdown/index.js +18 -1
- package/dist/markdown/internals.d.ts +7 -0
- package/dist/markdown/renderBlock.d.ts +5 -0
- package/dist/markdown/renderBlock.js +2 -7
- package/dist/markdown/renderParagraph.d.ts +22 -2
- package/dist/markdown/renderParagraph.js +11 -9
- package/dist/markdown/renderRuns.d.ts +10 -0
- package/dist/markdown/renderRuns.js +36 -3
- package/dist/markdown/renderTable.d.ts +7 -0
- package/dist/markdown/renderTable.js +2 -2
- package/dist/markdown/trailers.d.ts +7 -0
- package/dist/markdown/types.d.ts +9 -2
- package/dist/model.d.ts +25 -3
- package/dist/paged-layout/pageText.d.ts +1 -1
- package/dist/paged-layout/paragraphFlash.d.ts +3 -0
- package/dist/paged-layout/rangeProjection.d.ts +20 -1
- package/dist/paged-layout/rangeProjection.js +22 -4
- package/dist/paged-layout/scrollToPmPosition.d.ts +15 -0
- package/dist/paged-layout/sectionBlockWidths.d.ts +2 -2
- package/dist/paged-layout/sectionGeometry.d.ts +4 -3
- package/dist/paged-layout/selectionViewportRect.d.ts +13 -0
- package/dist/panel-layout.d.ts +18 -1
- package/dist/panel-layout.js +36 -2
- package/dist/pdf/contentStream.d.ts +12 -0
- package/dist/pdf/fonts.d.ts +19 -0
- package/dist/pdf/paint.d.ts +9 -1
- package/dist/pdf/paint.js +51 -0
- package/dist/prosemirror/acceptedBlockNeighbours.d.ts +50 -0
- package/dist/prosemirror/acceptedBlockNeighbours.js +63 -0
- package/dist/prosemirror/alternateContentAttrs.d.ts +1 -1
- package/dist/prosemirror/anchoredTextBoxes.d.ts +20 -0
- package/dist/prosemirror/attrs/index.d.ts +2 -2
- package/dist/prosemirror/attrs/index.js +1 -1
- package/dist/prosemirror/authoredTransformAttrs.d.ts +14 -0
- package/dist/prosemirror/bookmarkBoundaryAttrs.d.ts +2 -2
- package/dist/prosemirror/canonicalCommands.d.ts +26 -1
- package/dist/prosemirror/canonicalCommands.js +12 -1
- package/dist/prosemirror/canonicalSelectionRange.d.ts +1 -1
- package/dist/prosemirror/canonicalTableCommands.d.ts +14 -0
- package/dist/prosemirror/canonicalTableCommands.js +18 -6
- package/dist/prosemirror/cellDragSelection.d.ts +9 -0
- package/dist/prosemirror/commands/comments.d.ts +22 -0
- package/dist/prosemirror/commands/comments.js +374 -154
- package/dist/prosemirror/commands/contentControls.d.ts +20 -3
- package/dist/prosemirror/commands/contentControls.js +18 -1
- package/dist/prosemirror/commands/contentControlsBlockFill.d.ts +11 -1
- package/dist/prosemirror/commands/formatPainter.d.ts +10 -0
- package/dist/prosemirror/commands/formatPainter.js +0 -1
- package/dist/prosemirror/commands/formatting.d.ts +9 -2
- package/dist/prosemirror/commands/hyperlink.d.ts +12 -0
- package/dist/prosemirror/commands/image.d.ts +12 -0
- package/dist/prosemirror/commands/index.d.ts +10 -5
- package/dist/prosemirror/commands/pageBreak.d.ts +3 -0
- package/dist/prosemirror/commands/paragraph.d.ts +8 -1
- package/dist/prosemirror/commands/pastePlainText.d.ts +8 -0
- package/dist/prosemirror/commands/pastePlainText.js +1 -1
- package/dist/prosemirror/commands/propertyChangeScope.d.ts +28 -15
- package/dist/prosemirror/commands/propertyChangeScope.js +5 -12
- package/dist/prosemirror/commands/replaceRangeText.d.ts +22 -0
- package/dist/prosemirror/commands/replaceRangeText.js +44 -0
- package/dist/prosemirror/commands/resolveAllTableChanges.js +3 -2
- package/dist/prosemirror/commands/resolveParagraphProperties.js +4 -8
- package/dist/prosemirror/commands/rulerParagraph.d.ts +25 -0
- package/dist/prosemirror/commands/rulerParagraph.js +18 -0
- package/dist/prosemirror/commands/sectionBreak.d.ts +5 -0
- package/dist/prosemirror/commands/table.d.ts +7 -0
- package/dist/prosemirror/commands/tableCellMergeResolution.d.ts +1 -1
- package/dist/prosemirror/commentIdAllocator.d.ts +12 -6
- package/dist/prosemirror/commentIdAllocator.js +38 -29
- package/dist/prosemirror/commentOps.d.ts +7 -0
- package/dist/prosemirror/commentRangeBoundaryAttrs.d.ts +1 -1
- package/dist/prosemirror/commentRangeInlineAtoms.d.ts +4 -3
- package/dist/prosemirror/commentRangeInlineAtoms.js +1 -1
- package/dist/prosemirror/commentRecords.d.ts +17 -0
- package/dist/prosemirror/commentRecords.js +132 -5
- package/dist/prosemirror/commentReferenceAttrs.d.ts +1 -1
- package/dist/prosemirror/commentReferenceIntegrity.js +93 -14
- package/dist/prosemirror/containerFinalParagraph.d.ts +2 -0
- package/dist/prosemirror/containerFinalParagraph.js +3 -1
- package/dist/prosemirror/contentControlRevisions.d.ts +14 -0
- package/dist/prosemirror/conversion/effectiveTableCellFormatting.d.ts +5 -4
- package/dist/prosemirror/conversion/fromProseDoc.d.ts +1 -1
- package/dist/prosemirror/conversion/fromProseDoc.js +72 -58
- package/dist/prosemirror/conversion/index.d.ts +6 -1
- package/dist/prosemirror/conversion/preservedSinkCarriers.d.ts +21 -0
- package/dist/prosemirror/conversion/runShadingMark.d.ts +13 -1
- package/dist/prosemirror/conversion/storyConversionOptions.d.ts +16 -0
- package/dist/prosemirror/conversion/storyConversionOptions.js +13 -0
- package/dist/prosemirror/conversion/toProseDoc.d.ts +35 -10
- package/dist/prosemirror/conversion/toProseDoc.js +197 -136
- package/dist/prosemirror/copyOriginResolution.js +23 -10
- package/dist/prosemirror/documentSchema.d.ts +12 -0
- package/dist/prosemirror/emptyRangeAnchor.d.ts +39 -8
- package/dist/prosemirror/emptyRangeAnchor.js +63 -10
- package/dist/prosemirror/extensions/ExtensionManager.d.ts +7 -0
- package/dist/prosemirror/extensions/ExtensionManager.js +2 -0
- package/dist/prosemirror/extensions/StarterKit.d.ts +11 -2
- package/dist/prosemirror/extensions/core/DocExtension.d.ts +3 -0
- package/dist/prosemirror/extensions/core/HistoryExtension.d.ts +3 -0
- package/dist/prosemirror/extensions/core/HistoryExtension.js +3 -2
- package/dist/prosemirror/extensions/core/ParagraphExtension.d.ts +13 -4
- package/dist/prosemirror/extensions/core/ParagraphExtension.js +5 -3
- package/dist/prosemirror/extensions/core/TextExtension.d.ts +3 -0
- package/dist/prosemirror/extensions/create.d.ts +6 -0
- package/dist/prosemirror/extensions/features/BaseKeymapExtension.d.ts +5 -0
- package/dist/prosemirror/extensions/features/BaseKeymapExtension.js +3 -3
- package/dist/prosemirror/extensions/features/BidiShortcutExtension.d.ts +10 -0
- package/dist/prosemirror/extensions/features/ContentControlWidgetsExtension.d.ts +10 -0
- package/dist/prosemirror/extensions/features/DropCursorExtension.d.ts +6 -0
- package/dist/prosemirror/extensions/features/EmptyParagraphFormatExtension.d.ts +20 -0
- package/dist/prosemirror/extensions/features/EmptyParagraphFormatExtension.js +20 -23
- package/dist/prosemirror/extensions/features/GapCursorExtension.d.ts +13 -0
- package/dist/prosemirror/extensions/features/ImageDragExtension.d.ts +9 -0
- package/dist/prosemirror/extensions/features/ImagePasteExtension.d.ts +6 -0
- package/dist/prosemirror/extensions/features/JoinedRunStyleExtension.d.ts +14 -0
- package/dist/prosemirror/extensions/features/ParaIdAllocatorExtension.js +38 -21
- package/dist/prosemirror/extensions/features/ParagraphChangeTrackerExtension.d.ts +8 -3
- package/dist/prosemirror/extensions/features/ParagraphChangeTrackerExtension.js +5 -14
- package/dist/prosemirror/extensions/features/PasteCleanupExtension.d.ts +17 -0
- package/dist/prosemirror/extensions/features/PasteCleanupExtension.js +7 -3
- package/dist/prosemirror/extensions/features/PasteStyleInlinerExtension.d.ts +14 -0
- package/dist/prosemirror/extensions/features/SelectionTrackerExtension.d.ts +4 -1
- package/dist/prosemirror/extensions/features/pasteCleanup.d.ts +32 -3
- package/dist/prosemirror/extensions/features/pasteCleanup.js +23 -3
- package/dist/prosemirror/extensions/features/pastedCellSections.d.ts +22 -0
- package/dist/prosemirror/extensions/features/pastedCellSections.js +78 -0
- package/dist/prosemirror/extensions/features/pastedHeadingStyles.d.ts +22 -0
- package/dist/prosemirror/extensions/features/pastedHtmlLists.d.ts +1 -0
- package/dist/prosemirror/extensions/markRegistry.d.ts +14 -1
- package/dist/prosemirror/extensions/marks/AllCapsExtension.d.ts +3 -0
- package/dist/prosemirror/extensions/marks/BoldExtension.d.ts +3 -0
- package/dist/prosemirror/extensions/marks/CharacterSpacingExtension.d.ts +8 -0
- package/dist/prosemirror/extensions/marks/CharacterStyleExtension.d.ts +14 -0
- package/dist/prosemirror/extensions/marks/CommentExtension.d.ts +6 -0
- package/dist/prosemirror/extensions/marks/FontFamilyExtension.d.ts +3 -0
- package/dist/prosemirror/extensions/marks/FontFamilyExtension.js +4 -6
- package/dist/prosemirror/extensions/marks/FontSizeExtension.d.ts +3 -0
- package/dist/prosemirror/extensions/marks/FootnoteRefExtension.d.ts +5 -0
- package/dist/prosemirror/extensions/marks/HiddenTextExtension.d.ts +17 -0
- package/dist/prosemirror/extensions/marks/HighlightExtension.d.ts +3 -0
- package/dist/prosemirror/extensions/marks/HyperlinkExtension.d.ts +3 -0
- package/dist/prosemirror/extensions/marks/HyphenElementExtension.d.ts +19 -0
- package/dist/prosemirror/extensions/marks/InlineWrapperExtension.d.ts +12 -0
- package/dist/prosemirror/extensions/marks/ItalicExtension.d.ts +3 -0
- package/dist/prosemirror/extensions/marks/RunFormattingOverrideExtension.d.ts +11 -2
- package/dist/prosemirror/extensions/marks/RunFormattingOverrideExtension.js +2 -1
- package/dist/prosemirror/extensions/marks/RunIdentityExtension.d.ts +21 -0
- package/dist/prosemirror/extensions/marks/SmallCapsExtension.d.ts +3 -0
- package/dist/prosemirror/extensions/marks/StrikeExtension.d.ts +3 -0
- package/dist/prosemirror/extensions/marks/SubscriptExtension.d.ts +3 -0
- package/dist/prosemirror/extensions/marks/SuperscriptExtension.d.ts +3 -0
- package/dist/prosemirror/extensions/marks/TextColorExtension.d.ts +3 -0
- package/dist/prosemirror/extensions/marks/TextEffectsExtensions.d.ts +6 -0
- package/dist/prosemirror/extensions/marks/TrackedChangeExtensions.d.ts +7 -0
- package/dist/prosemirror/extensions/marks/UnderlineExtension.d.ts +3 -0
- package/dist/prosemirror/extensions/marks/markUtils.d.ts +10 -3
- package/dist/prosemirror/extensions/nodes/BlockBookmarkBoundaryExtension.d.ts +22 -0
- package/dist/prosemirror/extensions/nodes/BlockCommentRangeBoundaryExtension.d.ts +11 -0
- package/dist/prosemirror/extensions/nodes/BlockMoveRangeBoundaryExtension.d.ts +14 -0
- package/dist/prosemirror/extensions/nodes/BlockSdtExtension.d.ts +17 -0
- package/dist/prosemirror/extensions/nodes/BookmarkBoundaryExtension.d.ts +1 -0
- package/dist/prosemirror/extensions/nodes/BookmarkBoundaryExtension.js +38 -4
- package/dist/prosemirror/extensions/nodes/CommentReferenceExtension.d.ts +2 -1
- package/dist/prosemirror/extensions/nodes/FieldExtension.d.ts +8 -0
- package/dist/prosemirror/extensions/nodes/HardBreakExtension.d.ts +3 -0
- package/dist/prosemirror/extensions/nodes/HorizontalRuleExtension.d.ts +3 -0
- package/dist/prosemirror/extensions/nodes/ImageExtension.d.ts +3 -0
- package/dist/prosemirror/extensions/nodes/MathExtension.d.ts +7 -0
- package/dist/prosemirror/extensions/nodes/MoveRangeBoundaryExtension.d.ts +1 -0
- package/dist/prosemirror/extensions/nodes/PageBreakExtension.d.ts +3 -0
- package/dist/prosemirror/extensions/nodes/PageBreakRunExtension.d.ts +1 -0
- package/dist/prosemirror/extensions/nodes/PreservedBlockExtension.d.ts +25 -0
- package/dist/prosemirror/extensions/nodes/PreservedXmlExtension.d.ts +9 -0
- package/dist/prosemirror/extensions/nodes/RangeAnchorExtension.d.ts +1 -0
- package/dist/prosemirror/extensions/nodes/RangeAnchorExtension.js +7 -19
- package/dist/prosemirror/extensions/nodes/RenderedPageBreakExtension.d.ts +1 -0
- package/dist/prosemirror/extensions/nodes/SdtExtension.d.ts +6 -0
- package/dist/prosemirror/extensions/nodes/ShapeExtension.d.ts +6 -0
- package/dist/prosemirror/extensions/nodes/TabExtension.d.ts +3 -0
- package/dist/prosemirror/extensions/nodes/TableExtension.d.ts +8 -1
- package/dist/prosemirror/extensions/nodes/TableExtension.js +6 -6
- package/dist/prosemirror/extensions/nodes/TextBoxAnchorExtension.d.ts +7 -0
- package/dist/prosemirror/extensions/nodes/TextBoxExtension.d.ts +7 -0
- package/dist/prosemirror/extensions/nodes/bookmarkBoundaryDom.d.ts +9 -0
- package/dist/prosemirror/extensions/types.d.ts +10 -1
- package/dist/prosemirror/findReplaceSelection.d.ts +1 -1
- package/dist/prosemirror/hyperlinkRemoval.d.ts +13 -1
- package/dist/prosemirror/imageCommit.d.ts +10 -0
- package/dist/prosemirror/index.d.ts +30 -20
- package/dist/prosemirror/indexedNodeLookup.d.ts +11 -0
- package/dist/prosemirror/inlineWrapperStack.d.ts +12 -0
- package/dist/prosemirror/insertOperations.d.ts +10 -1
- package/dist/prosemirror/insertOperations.js +2 -2
- package/dist/prosemirror/insertionGaps.d.ts +21 -0
- package/dist/prosemirror/insertionGaps.js +86 -0
- package/dist/prosemirror/keptRangeBoundaries.d.ts +16 -12
- package/dist/prosemirror/keptRangeBoundaries.js +28 -34
- package/dist/prosemirror/listAutoformatMarkers.d.ts +11 -0
- package/dist/prosemirror/listInstanceReferences.d.ts +5 -0
- package/dist/prosemirror/listLabels.d.ts +16 -3
- package/dist/prosemirror/listLabels.js +0 -6
- package/dist/prosemirror/listMarker.d.ts +2 -2
- package/dist/prosemirror/listNumbering.d.ts +1 -1
- package/dist/prosemirror/listRendering.d.ts +2 -2
- package/dist/prosemirror/listRenderingAttrs.d.ts +10 -1
- package/dist/prosemirror/lockedControls.d.ts +6 -0
- package/dist/prosemirror/markupViewNotes.d.ts +11 -1
- package/dist/prosemirror/markupViewProjection.d.ts +21 -4
- package/dist/prosemirror/moveRangeBoundaryAttrs.d.ts +1 -1
- package/dist/prosemirror/nativeSelection.d.ts +21 -3
- package/dist/prosemirror/nativeSelection.js +69 -19
- package/dist/prosemirror/noteReferenceOccurrences.d.ts +1 -1
- package/dist/prosemirror/noteReferenceReview.d.ts +17 -3
- package/dist/prosemirror/noteReferenceReview.js +26 -5
- package/dist/prosemirror/pageBreakRunProjection.d.ts +2 -1
- package/dist/prosemirror/paraText.d.ts +14 -0
- package/dist/prosemirror/paragraphFormattingProvenance.d.ts +13 -1
- package/dist/prosemirror/paragraphIndentation.d.ts +6 -3
- package/dist/prosemirror/paragraphIndentation.js +2 -3
- package/dist/prosemirror/paragraphList.d.ts +1 -1
- package/dist/prosemirror/paragraphMarkJoin.d.ts +29 -1
- package/dist/prosemirror/paragraphMarkJoin.js +25 -6
- package/dist/prosemirror/paragraphPropertyCarry.d.ts +15 -1
- package/dist/prosemirror/paragraphPropertyCarry.js +5 -3
- package/dist/prosemirror/paragraphSpacing.d.ts +1 -1
- package/dist/prosemirror/pastePlacement.d.ts +17 -0
- package/dist/prosemirror/pastePlacement.js +22 -0
- package/dist/prosemirror/pastedCommentCopies.d.ts +87 -0
- package/dist/prosemirror/pastedCommentCopies.js +379 -0
- package/dist/prosemirror/plugins/aiCitationDecorations.d.ts +12 -0
- package/dist/prosemirror/plugins/aiSuggestionDecorations.d.ts +14 -0
- package/dist/prosemirror/plugins/contentControlWidgets.d.ts +15 -9
- package/dist/prosemirror/plugins/contentControlWidgets.js +22 -28
- package/dist/prosemirror/plugins/createDocScanPlugin.d.ts +17 -0
- package/dist/prosemirror/plugins/documentNumbering.d.ts +2 -1
- package/dist/prosemirror/plugins/documentStyleState.d.ts +3 -4
- package/dist/prosemirror/plugins/documentStyles.d.ts +20 -3
- package/dist/prosemirror/plugins/index.d.ts +7 -1
- package/dist/prosemirror/plugins/paragraphStyleResolution.d.ts +18 -1
- package/dist/prosemirror/plugins/paragraphStyleResolution.js +12 -2
- package/dist/prosemirror/plugins/pmTextScan.d.ts +18 -0
- package/dist/prosemirror/plugins/pmTextScan.js +42 -33
- package/dist/prosemirror/plugins/revisionIds.d.ts +14 -1
- package/dist/prosemirror/plugins/revisionIds.js +5 -1
- package/dist/prosemirror/plugins/selectionTracker.d.ts +12 -2
- package/dist/prosemirror/plugins/suggestionMode.d.ts +14 -11
- package/dist/prosemirror/plugins/suggestionMode.js +212 -34
- package/dist/prosemirror/plugins/templateDirectives.d.ts +17 -0
- package/dist/prosemirror/plugins/templatePreviewValues.d.ts +23 -0
- package/dist/prosemirror/plugins/templateSlashMenu.d.ts +19 -0
- package/dist/prosemirror/plugins/transactionInvariants.d.ts +19 -0
- package/dist/prosemirror/positionSweep.d.ts +21 -0
- package/dist/prosemirror/queries.d.ts +9 -0
- package/dist/prosemirror/queries.js +2 -2
- package/dist/prosemirror/rangeAnchorAttrs.d.ts +2 -2
- package/dist/prosemirror/rangeAnchorAttrs.js +55 -33
- package/dist/prosemirror/rebaseParagraphRuns.js +1 -1
- package/dist/prosemirror/rejoinRunCarriers.d.ts +17 -0
- package/dist/prosemirror/replaceFindMatches.d.ts +20 -0
- package/dist/prosemirror/replaceFindMatches.js +33 -0
- package/dist/prosemirror/replacedAnnotations.d.ts +143 -0
- package/dist/prosemirror/replacedAnnotations.js +223 -26
- package/dist/prosemirror/revisionCarriers.js +9 -0
- package/dist/prosemirror/runFormattingFromMarks.d.ts +3 -3
- package/dist/prosemirror/runFormattingFromMarks.js +10 -51
- package/dist/prosemirror/runFormattingProvenance.d.ts +2 -1
- package/dist/prosemirror/runFormattingProvenance.js +2 -1
- package/dist/prosemirror/runFormattingReconciliation.js +3 -12
- package/dist/prosemirror/runIdentity.d.ts +14 -0
- package/dist/prosemirror/runIdentityAcrossRevisions.d.ts +7 -0
- package/dist/prosemirror/runPropertyChangeResolution.d.ts +5 -13
- package/dist/prosemirror/runPropertyChangeResolution.js +13 -30
- package/dist/prosemirror/runStyleFormatting.d.ts +42 -113
- package/dist/prosemirror/runStyleFormatting.js +17 -74
- package/dist/prosemirror/schema/index.d.ts +8 -1
- package/dist/prosemirror/schema/marks.d.ts +16 -2
- package/dist/prosemirror/schema/nodes.d.ts +15 -14
- package/dist/prosemirror/sectionCarrier.d.ts +21 -0
- package/dist/prosemirror/sectionMarkEdits.d.ts +18 -0
- package/dist/prosemirror/selectionState.d.ts +10 -4
- package/dist/prosemirror/storyListNumbering.d.ts +10 -0
- package/dist/prosemirror/styles/index.d.ts +3 -0
- package/dist/prosemirror/styles/paragraphStyleCascade.d.ts +20 -18
- package/dist/prosemirror/styles/paragraphStyleCascade.js +10 -19
- package/dist/prosemirror/styles/resolvedStyleAttrs.d.ts +4 -3
- package/dist/prosemirror/styles/styleResolver.d.ts +40 -15
- package/dist/prosemirror/styles/styleResolver.js +6 -6
- package/dist/prosemirror/styles/styleToggleCascade.d.ts +18 -11
- package/dist/prosemirror/styles/styleToggleCascade.js +2 -11
- package/dist/prosemirror/styles/tableStyleRegions.d.ts +20 -7
- package/dist/prosemirror/styles/tableStyleRegions.js +14 -13
- package/dist/prosemirror/tableCellPaste.d.ts +21 -0
- package/dist/prosemirror/tableCellPaste.js +32 -2
- package/dist/prosemirror/tableGridMutation.d.ts +9 -0
- package/dist/prosemirror/tableGridMutation.js +34 -2
- package/dist/prosemirror/tablePositionedBookmarks.d.ts +6 -0
- package/dist/prosemirror/tableResize.d.ts +10 -0
- package/dist/prosemirror/tableRunIn.d.ts +26 -1
- package/dist/prosemirror/tableRunIn.js +39 -11
- package/dist/prosemirror/textBoxAnchorAttrs.d.ts +1 -1
- package/dist/prosemirror/textBoxHostCollapse.d.ts +11 -0
- package/dist/prosemirror/utils/findParagraphByParaId.d.ts +5 -0
- package/dist/prosemirror/utils/tabCalculator.d.ts +6 -0
- package/dist/prosemirror/utils/visualLineNavigation.js +1 -1
- package/dist/prosemirror/validation.js +6 -11
- package/dist/prosemirror/yjsDocumentMetadata.d.ts +9 -3
- package/dist/prosemirror/yjsDocumentMetadata.js +49 -10
- package/dist/prosemirror/zeroWidthAnchors.d.ts +18 -0
- package/dist/redline.d.ts +4 -1
- package/dist/redline.js +21 -13
- package/dist/render-dom/BodySelectionOverlay.d.ts +5 -0
- package/dist/render-dom/RemoteSelectionOverlay.js +3 -3
- package/dist/server.d.ts +30 -18
- package/dist/server.js +4 -3
- package/dist/shaping/placeRun.d.ts +8 -0
- package/dist/shaping/shaper.d.ts +19 -0
- package/dist/style-engine/index.d.ts +5 -0
- package/dist/style-engine/styleEngine.d.ts +32 -13
- package/dist/style-sets/extract.d.ts +1 -1
- package/dist/style-sets/styleSetNormalization.d.ts +20 -1
- package/dist/text-shaping.d.ts +9 -1
- package/dist/types/anonymization.d.ts +17 -0
- package/dist/types/anonymization.js +0 -0
- package/dist/types/autocomplete.d.ts +46 -0
- package/dist/types/autocomplete.js +0 -0
- package/dist/types/canonicalCapabilities.d.ts +40 -42
- package/dist/types/canonicalCapabilities.js +43 -44
- package/dist/types/canonicalSave.d.ts +36 -0
- package/dist/types/documentModel.d.ts +37 -0
- package/dist/types/documentModel.js +24 -0
- package/dist/types/docxSerialization.d.ts +10 -0
- package/dist/types/index.d.ts +5 -0
- package/dist/types/remote-selection.d.ts +2 -1
- package/dist/types/selectiveSaveDecline.d.ts +44 -0
- package/dist/types/selectiveSaveDecline.js +0 -0
- package/dist/types/tableWidthKind.d.ts +2 -0
- package/dist/types/tableWidthKind.js +9 -0
- package/dist/utils/base64.d.ts +20 -0
- package/dist/utils/borderCss.d.ts +18 -1
- package/dist/utils/colorResolver.d.ts +12 -11
- package/dist/utils/createDocument.d.ts +8 -1
- package/dist/utils/createDocument.js +20 -2
- package/dist/utils/diagonalHatch.d.ts +2 -0
- package/dist/utils/diagonalHatch.js +16 -0
- package/dist/utils/extremes.d.ts +4 -0
- package/dist/utils/extremes.js +14 -0
- package/dist/utils/findMatchView.d.ts +2 -2
- package/dist/utils/findReplace.d.ts +2 -2
- package/dist/utils/findReplace.js +3 -2
- package/dist/utils/fontFamilyMerge.d.ts +2 -1
- package/dist/utils/fontResolver.d.ts +11 -2
- package/dist/utils/formatToStyle.d.ts +22 -8
- package/dist/utils/headerFooter.d.ts +16 -2
- package/dist/utils/headerFooter.js +2 -6
- package/dist/utils/imageResize.js +1 -1
- package/dist/utils/listItems.d.ts +7 -0
- package/dist/utils/listItems.js +9 -0
- package/dist/utils/mergeDocumentContent.d.ts +7 -0
- package/dist/utils/outlineHeadings.d.ts +1 -1
- package/dist/utils/paragraphFormattingMerge.d.ts +11 -3
- package/dist/utils/paragraphFormattingMerge.js +0 -8
- package/dist/utils/paragraphInlineLayout.js +2 -1
- package/dist/utils/repeatingStrokeGradient.d.ts +8 -0
- package/dist/utils/repeatingStrokeGradient.js +13 -0
- package/dist/utils/rotationBoundingBox.d.ts +8 -0
- package/dist/utils/rulerControl.d.ts +71 -0
- package/dist/utils/rulerControl.js +94 -0
- package/dist/utils/tableOperations.d.ts +20 -4
- package/dist/utils/tableOperations.js +1 -0
- package/dist/utils/textDirectionFlow.d.ts +10 -0
- package/dist/utils/textFormattingMerge.d.ts +18 -2
- package/dist/utils/textFormattingMerge.js +0 -20
- package/dist/utils/units.d.ts +2 -0
- package/dist/utils/units.js +3 -1
- package/dist/version-comparison.d.ts +63 -1
- package/dist/version-comparison.js +2 -1
- package/dist/watermark/index.d.ts +11 -0
- package/dist/watermark/index.js +0 -5
- package/package.json +7 -7
- package/dist/controller/canonicalPublicOperations.js +0 -1276
- package/dist/controller/canonicalSeedContent.d.ts +0 -12
- package/dist/controller/canonicalSourceNormalization.d.ts +0 -21
- package/dist/docx/canonicalResourceSave.d.ts +0 -15
- package/dist/docx/canonicalResourceSave.js +0 -27
- package/dist/internal/acceptedBlockProjection.d.ts +0 -9
- package/dist/internal/acceptedBlockProjection.js +0 -50
- package/dist/prosemirror/plugins/anonymizationDecorations.d.ts +0 -60
- package/dist/prosemirror/plugins/anonymizationDecorations.js +0 -111
- package/dist/prosemirror/plugins/autocompleteSuggestion.d.ts +0 -127
- package/dist/prosemirror/plugins/autocompleteSuggestion.js +0 -282
- package/dist/utils/replaceText.d.ts +0 -25
- package/dist/utils/replaceText.js +0 -242
- /package/dist/{controller → canonical}/canonicalListRendering.d.ts +0 -0
- /package/dist/{controller → canonical}/canonicalOperations.d.ts +0 -0
- /package/dist/{controller → canonical}/canonicalSelection.d.ts +0 -0
- /package/dist/{controller → canonical}/canonicalTocSelection.d.ts +0 -0
|
@@ -1,6 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ProseMirror Schema for DOCX Editor
|
|
3
|
+
*
|
|
4
|
+
* Singleton ExtensionManager that builds the schema and initializes runtime.
|
|
5
|
+
* Legacy code imports `schema` and commands from here; new code should use
|
|
6
|
+
* ExtensionManager directly.
|
|
7
|
+
*/
|
|
8
|
+
import { ExtensionManager } from "../extensions/ExtensionManager.js";
|
|
1
9
|
import { CharacterSpacingAttrs, CharacterStyleAttrs, CommentAttrs, EmphasisMarkAttrs, FontFamilyAttrs, FontSizeAttrs, FootnoteRefAttrs, HighlightAttrs, HyperlinkAttrs, InlineWrapperAttrs, InlineWrapperKind, InlineWrapperLayer, LanguageAttrs, RunFormattingOverrideAttrs, RunIdentityMarkAttrs, RunPropertyChangeMarkAttrs, RunShadingAttrs, StrikeAttrs, TextColorAttrs, TextEffectAttrs, TrackedChangeMarkAttrs, TrackedRevisionAncestor, UnderlineAttrs } from "./marks.js";
|
|
2
10
|
import { BlockCustomXmlAttrs, BlockSdtAttrs, BookmarkBoundaryAttrs, FieldAttrs, HardBreakAttrs, ImageAttrs, ImagePositionAttrs, MathAttrs, PageBreakRunAttrs, ParagraphAttrs, ParagraphPropertyChangeAttrs, PreservedBlockAttrs, PreservedXmlAttrs, PreservedXmlLevel, SdtAttrs, ShapeAttrs, SymbolAttrs, TabAttrs, TableAttrs, TableCellAttrs, TableRowAttrs, TextBoxAttrs } from "./nodes.js";
|
|
3
|
-
import { ExtensionManager } from "../extensions/ExtensionManager.js";
|
|
4
11
|
import { Schema } from "prosemirror-model";
|
|
5
12
|
export declare const singletonManager: ExtensionManager;
|
|
6
13
|
export declare const schema: Schema;
|
|
@@ -1,5 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* ProseMirror Mark Type Interfaces
|
|
3
|
+
*
|
|
4
|
+
* Type definitions for mark attributes used by conversion modules,
|
|
5
|
+
* extensions, and other consumers. MarkSpec definitions have moved
|
|
6
|
+
* to the extension system (extensions/marks/).
|
|
7
|
+
*/
|
|
2
8
|
import { ShadingProperties } from "../../types/colors.js";
|
|
9
|
+
import { document_d_exports } from "../../types/document.js";
|
|
10
|
+
import { DeepReadonly } from "../../types/documentModel.js";
|
|
3
11
|
import { TrackedCommentBoundary } from "../commentBoundaryOwnership.js";
|
|
4
12
|
/**
|
|
5
13
|
* Text color mark attributes
|
|
@@ -121,6 +129,8 @@ export type TrackedRevisionAncestor = {
|
|
|
121
129
|
initials?: string;
|
|
122
130
|
outerWrapperCount: number;
|
|
123
131
|
resolutionJoins?: document_d_exports.Insertion["resolutionJoins"];
|
|
132
|
+
/** The pending suggestion this outer revision belongs to; absent for a user's. */
|
|
133
|
+
suggestionId?: string;
|
|
124
134
|
};
|
|
125
135
|
export type TrackedChangeMarkAttrs = {
|
|
126
136
|
revisionId: number;
|
|
@@ -253,7 +263,11 @@ export declare const RUN_FORMATTING_PROPERTY_SPECS: {
|
|
|
253
263
|
readonly cs: "boolean";
|
|
254
264
|
readonly styleId: "style";
|
|
255
265
|
};
|
|
256
|
-
|
|
266
|
+
/**
|
|
267
|
+
* The run's own stated values, as the run's formatting holds them: shared
|
|
268
|
+
* with the document and the editor state, so read-only.
|
|
269
|
+
*/
|
|
270
|
+
export type AuthoredRunFormattingValues = DeepReadonly<Partial<Pick<document_d_exports.TextFormatting, RunFormattingValueProperty>>>;
|
|
257
271
|
export type RunFormattingOverrideAttrs = {
|
|
258
272
|
allCaps?: boolean;
|
|
259
273
|
bold?: boolean;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { document_d_exports } from "../../types/document.js";
|
|
2
|
-
import { InlineWrapperLayer, TrackedChangeProvenance } from "./marks.js";
|
|
3
|
-
import "../../types/index.js";
|
|
4
2
|
import { OutlineStyleAttr } from "../../types/documentEnumValues.js";
|
|
3
|
+
import { DeepReadonly } from "../../types/documentModel.js";
|
|
5
4
|
import { SpacingExplicit } from "../../types/formatting.js";
|
|
5
|
+
import "../../types/index.js";
|
|
6
6
|
import { ParagraphNumberingAttr } from "../numberingAttr.js";
|
|
7
7
|
import { ParagraphDirection } from "../paragraphDirection.js";
|
|
8
|
+
import { InlineWrapperLayer, TrackedChangeProvenance } from "./marks.js";
|
|
8
9
|
export type HardBreakAttrs = {
|
|
9
10
|
sourceElement: "cr";
|
|
10
11
|
breakType?: never;
|
|
@@ -115,7 +116,7 @@ export type ParagraphAttrs = {
|
|
|
115
116
|
*/
|
|
116
117
|
lineSpacingExplicit?: boolean | "value" | "rule" | "both";
|
|
117
118
|
snapToGrid?: boolean;
|
|
118
|
-
spacingExplicit?: SpacingExplicit
|
|
119
|
+
spacingExplicit?: DeepReadonly<SpacingExplicit>;
|
|
119
120
|
/** Layout provenance: document defaults survive on empty paragraphs. */
|
|
120
121
|
spacingFromDocDefaults?: SpacingExplicit;
|
|
121
122
|
/** Layout provenance: resolved paragraph/table-style spacing survives on empty paragraphs. */
|
|
@@ -196,16 +197,16 @@ export type ParagraphAttrs = {
|
|
|
196
197
|
styleId?: string;
|
|
197
198
|
/** Imported built-in TOC entry level, resolved from the canonical style name. */
|
|
198
199
|
_tableOfContentsLevel?: number;
|
|
199
|
-
borders?: {
|
|
200
|
+
borders?: DeepReadonly<{
|
|
200
201
|
top?: document_d_exports.BorderSpec;
|
|
201
202
|
bottom?: document_d_exports.BorderSpec;
|
|
202
203
|
left?: document_d_exports.BorderSpec;
|
|
203
204
|
right?: document_d_exports.BorderSpec;
|
|
204
205
|
between?: document_d_exports.BorderSpec;
|
|
205
206
|
bar?: document_d_exports.BorderSpec;
|
|
206
|
-
}
|
|
207
|
-
shading?: document_d_exports.ShadingProperties
|
|
208
|
-
tabs?: document_d_exports.TabStop[];
|
|
207
|
+
}>;
|
|
208
|
+
shading?: DeepReadonly<document_d_exports.ShadingProperties>;
|
|
209
|
+
tabs?: readonly DeepReadonly<document_d_exports.TabStop>[];
|
|
209
210
|
pageBreakBefore?: boolean;
|
|
210
211
|
/** Word's cached rendered-page-break marker; preserved for round-trip only. */
|
|
211
212
|
renderedPageBreakBefore?: boolean;
|
|
@@ -218,9 +219,9 @@ export type ParagraphAttrs = {
|
|
|
218
219
|
widowControl?: boolean;
|
|
219
220
|
/** Contextual spacing — suppress space between same-style paragraphs */
|
|
220
221
|
contextualSpacing?: boolean;
|
|
221
|
-
defaultTextFormatting?: document_d_exports.TextFormatting
|
|
222
|
+
defaultTextFormatting?: DeepReadonly<document_d_exports.TextFormatting>;
|
|
222
223
|
/** Internal table-style run overlay, used to resolve body-run provenance. */
|
|
223
|
-
_tableRunFormatting?: document_d_exports.TextFormatting
|
|
224
|
+
_tableRunFormatting?: DeepReadonly<document_d_exports.TextFormatting>;
|
|
224
225
|
/**
|
|
225
226
|
* Base text direction as a discriminated union (undecided when absent).
|
|
226
227
|
* Maps to the OOXML `w:bidi` tri-state via `directionToBidi` (layout) or
|
|
@@ -274,9 +275,9 @@ export type ParagraphAttrs = {
|
|
|
274
275
|
* the style it came from, and a later edit to that style stops reaching the
|
|
275
276
|
* paragraph. `TableCellAttrs._resolvedBorders` is the same device.
|
|
276
277
|
*/
|
|
277
|
-
_resolvedFormatting?: document_d_exports.ParagraphFormatting
|
|
278
|
+
_resolvedFormatting?: DeepReadonly<document_d_exports.ParagraphFormatting>;
|
|
278
279
|
/** Style-only inheritance baseline, before numbering-level indentation. PM-only. */
|
|
279
|
-
_styleResolvedFormatting?: document_d_exports.ParagraphFormatting
|
|
280
|
+
_styleResolvedFormatting?: DeepReadonly<document_d_exports.ParagraphFormatting>;
|
|
280
281
|
/** Import-effective spacing baseline for HTML auto-spacing detection.
|
|
281
282
|
* PM-only; never serialized back into DOCX formatting. */
|
|
282
283
|
_autospacingBase?: {
|
|
@@ -1012,7 +1013,7 @@ export type TableAttrs = {
|
|
|
1012
1013
|
*/
|
|
1013
1014
|
_resolvedCellMargins?: TableAttrs["cellMargins"];
|
|
1014
1015
|
/** Effective table indent after style resolution. PM-only; never serialized. */
|
|
1015
|
-
_resolvedIndent?: NonNullable<document_d_exports.TableFormatting["indent"]
|
|
1016
|
+
_resolvedIndent?: DeepReadonly<NonNullable<document_d_exports.TableFormatting["indent"]>>;
|
|
1016
1017
|
/** Style-derived table justification fallback. PM-only; never serialized. */
|
|
1017
1018
|
_resolvedJustification?: NonNullable<document_d_exports.TableFormatting["justification"]>;
|
|
1018
1019
|
/** Effective table direction after style resolution. PM-only; never serialized. */
|
|
@@ -1213,7 +1214,7 @@ export type TableCellAttrs = {
|
|
|
1213
1214
|
/** Effective end-of-cell marker suppression (`w:hideMark`). */
|
|
1214
1215
|
hideMark?: boolean;
|
|
1215
1216
|
/** Cell borders — full BorderSpec per side (style, color, size) */
|
|
1216
|
-
borders?: document_d_exports.TableCellBorders
|
|
1217
|
+
borders?: DeepReadonly<document_d_exports.TableCellBorders>;
|
|
1217
1218
|
/**
|
|
1218
1219
|
* Effective borders after the table and table-style cascade. PM-only; never
|
|
1219
1220
|
* serialized. The companion to `borders` that `_resolvedBackgroundColor` is
|
|
@@ -1221,7 +1222,7 @@ export type TableCellAttrs = {
|
|
|
1221
1222
|
* its own, so a save can tell a border a style supplied from one the cell
|
|
1222
1223
|
* states.
|
|
1223
1224
|
*/
|
|
1224
|
-
_resolvedBorders?: document_d_exports.TableCellBorders
|
|
1225
|
+
_resolvedBorders?: DeepReadonly<document_d_exports.TableCellBorders>;
|
|
1225
1226
|
/** Cell margins/padding in twips per side */
|
|
1226
1227
|
margins?: {
|
|
1227
1228
|
top?: number;
|
|
@@ -1,3 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One carrier for a section break.
|
|
3
|
+
*
|
|
4
|
+
* ECMA-376 Part 1 §17.6.18 defines a `w:sectPr` inside a `w:pPr` as the
|
|
5
|
+
* properties of the section that *ends* at that paragraph's mark, and §17.6.17
|
|
6
|
+
* defines the body's trailing `w:sectPr` as the properties of the last section.
|
|
7
|
+
* There is exactly one record per section, so a paragraph either holds that
|
|
8
|
+
* record or it does not: `_sectionProperties` is the whole state.
|
|
9
|
+
*
|
|
10
|
+
* The break type (`w:type`, §17.6.22) is a field of that record, not a second
|
|
11
|
+
* carrier beside it. It is derived here for every reader, so a reader cannot
|
|
12
|
+
* see a type the record does not state, and a writer cannot state a type no
|
|
13
|
+
* record carries.
|
|
14
|
+
*
|
|
15
|
+
* The record's reference identity is load-bearing: the from-leg tells a copy
|
|
16
|
+
* (two halves of a split paragraph over one object) from two authored breaks
|
|
17
|
+
* (two objects, however equal their contents) by it. Every writer below
|
|
18
|
+
* therefore mints once and shares, and never clones.
|
|
19
|
+
*
|
|
20
|
+
* @packageDocumentation
|
|
21
|
+
*/
|
|
1
22
|
import { document_d_exports } from "../types/document.js";
|
|
2
23
|
import { Node } from "prosemirror-model";
|
|
3
24
|
/**
|
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What an edit did to the paragraph marks that end sections.
|
|
3
|
+
*
|
|
4
|
+
* A section ends at the mark of the paragraph holding its record (ECMA-376
|
|
5
|
+
* Part 1 §17.6.18). Deleting that mark deletes the break: Backspace or Delete
|
|
6
|
+
* across it, a selection or a cut spanning it, a paste over it, a join. The
|
|
7
|
+
* section's content then runs on into the next section, whose properties it
|
|
8
|
+
* takes, which is what deleting the paragraph as a block does too.
|
|
9
|
+
*
|
|
10
|
+
* ProseMirror does not see marks: a replacement that joins two paragraphs
|
|
11
|
+
* keeps the FIRST paragraph's node and attrs, so a joined paragraph would go on
|
|
12
|
+
* holding the break whose mark was deleted, and would drop the one whose mark
|
|
13
|
+
* survived. This reads each replacement of an edit for the marks it deleted,
|
|
14
|
+
* and says which record every joined paragraph must hold: the record of the
|
|
15
|
+
* paragraph whose mark now ends it.
|
|
16
|
+
*
|
|
17
|
+
* @packageDocumentation
|
|
18
|
+
*/
|
|
1
19
|
import { document_d_exports } from "../types/document.js";
|
|
2
20
|
import { Node } from "prosemirror-model";
|
|
3
21
|
import { Transaction } from "prosemirror-state";
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Selection State Utilities
|
|
3
|
+
*
|
|
4
|
+
* Extracts selection state from ProseMirror for toolbar integration.
|
|
5
|
+
*/
|
|
1
6
|
import { document_d_exports } from "../types/document.js";
|
|
7
|
+
import { DeepReadonly } from "../types/documentModel.js";
|
|
2
8
|
import { ListState } from "./listState.js";
|
|
3
9
|
import { EditorState } from "prosemirror-state";
|
|
4
10
|
/**
|
|
@@ -11,10 +17,10 @@ export type SelectionSnapshot = {
|
|
|
11
17
|
hasSelection: boolean;
|
|
12
18
|
/** Whether selection spans multiple paragraphs */
|
|
13
19
|
isMultiParagraph: boolean;
|
|
14
|
-
/** Current text formatting at selection/cursor */
|
|
15
|
-
textFormatting: document_d_exports.TextFormatting
|
|
16
|
-
/** Current paragraph formatting */
|
|
17
|
-
paragraphFormatting: document_d_exports.ParagraphFormatting
|
|
20
|
+
/** Current text formatting at selection/cursor, read from the editor state. */
|
|
21
|
+
textFormatting: DeepReadonly<document_d_exports.TextFormatting>;
|
|
22
|
+
/** Current paragraph formatting, read from the editor state. */
|
|
23
|
+
paragraphFormatting: DeepReadonly<document_d_exports.ParagraphFormatting>;
|
|
18
24
|
/** Current paragraph style ID (e.g., 'Heading1', 'Normal') */
|
|
19
25
|
styleId: string | null;
|
|
20
26
|
/** Start paragraph index */
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Numbering for one story (a header, footer or note) edited in its own editor.
|
|
3
|
+
*
|
|
4
|
+
* Each story editor defines the lists it starts against the package's
|
|
5
|
+
* definitions and its own paragraphs; it cannot see the lists another story
|
|
6
|
+
* started. Two stories can therefore pick the same new `w:numId` for
|
|
7
|
+
* different lists. When a story is written back after another one already
|
|
8
|
+
* defined an id it picked, its paragraphs move to fresh ids first, so each
|
|
9
|
+
* list keeps its own definition.
|
|
10
|
+
*/
|
|
1
11
|
import { document_d_exports } from "../types/document.js";
|
|
2
12
|
import { Node } from "prosemirror-model";
|
|
3
13
|
import { EditorState } from "prosemirror-state";
|
|
@@ -1,8 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The paragraph attrs the style cascade supplies, shared by the load path and
|
|
3
|
+
* the live editor.
|
|
4
|
+
*
|
|
5
|
+
* `toProseDoc` seeds every paragraph with the value its style cascade resolves
|
|
6
|
+
* to (docDefaults, the enclosing table style, the paragraph style chain),
|
|
7
|
+
* because that is what the editor renders with. A paragraph an edit creates —
|
|
8
|
+
* a paste, a structural table command, a replacement that joins paragraphs —
|
|
9
|
+
* must read the same way live, or it paints differently until the document is
|
|
10
|
+
* reopened. Both paths project the cascade through {@link paragraphStyleCascadeAttrs}.
|
|
11
|
+
*/
|
|
12
|
+
import "../../style-engine/index.js";
|
|
13
|
+
import { StyleEngine } from "../../style-engine/styleEngine.js";
|
|
1
14
|
import { document_d_exports } from "../../types/document.js";
|
|
15
|
+
import { DeepReadonly } from "../../types/documentModel.js";
|
|
2
16
|
import { ParagraphAttrs } from "../schema/nodes.js";
|
|
3
17
|
import { TableCellParagraphSpacingOverlay } from "./styleResolver.js";
|
|
4
|
-
import { StyleEngine } from "../../style-engine/styleEngine.js";
|
|
5
|
-
import "../../style-engine/index.js";
|
|
6
18
|
import { TableStyleRegion } from "./tableStyleRegions.js";
|
|
7
19
|
/** The resolver surface the paragraph cascade reads. */
|
|
8
20
|
export type ParagraphCascadeResolver = Pick<StyleEngine, "getStyle" | "getDocDefaults" | "getDefaultParagraphStyle" | "getDefaultCharacterStyle" | "getRunStyleOwnProperties" | "resolveParagraphStyleInTable">;
|
|
@@ -12,25 +24,15 @@ export type ParagraphCascadeResolver = Pick<StyleEngine, "getStyle" | "getDocDef
|
|
|
12
24
|
* document defaults, and will layer these own properties over it.
|
|
13
25
|
*/
|
|
14
26
|
type ParagraphDefaultFormattingResolver = Pick<StyleEngine, "getStyle" | "getDocDefaults" | "getDefaultParagraphStyle" | "getDefaultCharacterStyle" | "getRunStyleOwnProperties">;
|
|
15
|
-
export declare function resolveRunFormattingWithoutDefaults(formatting: document_d_exports.TextFormatting | undefined, styleResolver: ParagraphDefaultFormattingResolver | null): document_d_exports.TextFormatting | undefined;
|
|
16
|
-
/**
|
|
17
|
-
* What a paragraph's mark lends its body runs: nothing when the paragraph has a
|
|
18
|
-
* style, and never the font or the mark-only decorations. One rule for a
|
|
19
|
-
* document read and for a paragraph whose properties a review restores.
|
|
20
|
-
*/
|
|
21
|
-
export declare const inheritableParagraphMarkFormatting: ({ runProperties, styleId, styleResolver }: {
|
|
22
|
-
runProperties: document_d_exports.TextFormatting | undefined;
|
|
23
|
-
styleId: string | undefined;
|
|
24
|
-
styleResolver: Parameters<typeof resolveRunFormattingWithoutDefaults>[1];
|
|
25
|
-
}) => document_d_exports.TextFormatting | undefined;
|
|
27
|
+
export declare function resolveRunFormattingWithoutDefaults(formatting: DeepReadonly<document_d_exports.TextFormatting> | undefined, styleResolver: ParagraphDefaultFormattingResolver | null): DeepReadonly<document_d_exports.TextFormatting> | undefined;
|
|
26
28
|
/** @internal Recompute a paragraph's inherited run defaults from authored package state. */
|
|
27
|
-
export declare function resolveParagraphDefaultTextFormatting(styleId: string | undefined, formatting: document_d_exports.Paragraph["formatting"] | undefined, styleResolver: ParagraphDefaultFormattingResolver, options?: {
|
|
29
|
+
export declare function resolveParagraphDefaultTextFormatting(styleId: string | undefined, formatting: DeepReadonly<document_d_exports.Paragraph["formatting"]> | undefined, styleResolver: ParagraphDefaultFormattingResolver, options?: {
|
|
28
30
|
includeParagraphMarkRunProperties?: boolean;
|
|
29
|
-
}): document_d_exports.TextFormatting | undefined;
|
|
31
|
+
}): DeepReadonly<document_d_exports.TextFormatting> | undefined;
|
|
30
32
|
export type ParagraphStyleCascadeInput = {
|
|
31
33
|
styleId: string | undefined;
|
|
32
34
|
/** What the paragraph states itself; each stated field wins over the cascade. */
|
|
33
|
-
formatting: document_d_exports.ParagraphFormatting | undefined;
|
|
35
|
+
formatting: DeepReadonly<document_d_exports.ParagraphFormatting> | undefined;
|
|
34
36
|
styleResolver: ParagraphCascadeResolver;
|
|
35
37
|
/**
|
|
36
38
|
* The enclosing table style's modeled paragraph fields, layered between
|
|
@@ -44,7 +46,7 @@ export type ParagraphStyleCascade = {
|
|
|
44
46
|
/** The effective attrs, with the provenance a save needs to keep inherited values out of `w:pPr`. */
|
|
45
47
|
attrs: ParagraphAttrs;
|
|
46
48
|
/** The resolved style cascade the attrs were read from. */
|
|
47
|
-
stylePpr: document_d_exports.ParagraphFormatting | undefined;
|
|
49
|
+
stylePpr: DeepReadonly<document_d_exports.ParagraphFormatting> | undefined;
|
|
48
50
|
};
|
|
49
51
|
/**
|
|
50
52
|
* Project a paragraph's style cascade onto its editor attrs: each field the
|
|
@@ -56,7 +58,7 @@ export declare function paragraphStyleCascadeAttrs({ styleId, formatting, styleR
|
|
|
56
58
|
* Pick the modeled paragraph fields out of a table style's (or conditional
|
|
57
59
|
* region's) `w:pPr` for use as the cell-paragraph cascade overlay.
|
|
58
60
|
*/
|
|
59
|
-
export declare function extractTableParagraphOverlay(pPr: document_d_exports.ParagraphFormatting | undefined): TableCellParagraphSpacingOverlay | undefined;
|
|
61
|
+
export declare function extractTableParagraphOverlay(pPr: DeepReadonly<document_d_exports.ParagraphFormatting> | undefined): TableCellParagraphSpacingOverlay | undefined;
|
|
60
62
|
/**
|
|
61
63
|
* The paragraph overlay a table style gives one cell's paragraphs: its base
|
|
62
64
|
* `w:pPr`, then each applicable region's (`regions`, lowest precedence first,
|
|
@@ -5,7 +5,7 @@ import { paragraphNumberingAttr } from "../numberingAttr.js";
|
|
|
5
5
|
import { directionFromBidi } from "../paragraphDirection.js";
|
|
6
6
|
import { styleResolvedParagraphFormatting } from "../paragraphFormattingProvenance.js";
|
|
7
7
|
import { lineSpacingProvenanceFromSpacing } from "../paragraphSpacing.js";
|
|
8
|
-
import {
|
|
8
|
+
import { stripParagraphMarkOnlyFormatting } from "../runStyleFormatting.js";
|
|
9
9
|
import { cascadeStyleTextFormatting } from "./styleToggleCascade.js";
|
|
10
10
|
// src/prosemirror/styles/paragraphStyleCascade.ts
|
|
11
11
|
/**
|
|
@@ -30,16 +30,6 @@ function resolveRunFormattingWithoutDefaults(formatting, styleResolver) {
|
|
|
30
30
|
type: "direct"
|
|
31
31
|
}]).formatting;
|
|
32
32
|
}
|
|
33
|
-
/**
|
|
34
|
-
* What a paragraph's mark lends its body runs: nothing when the paragraph has a
|
|
35
|
-
* style, and never the font or the mark-only decorations. One rule for a
|
|
36
|
-
* document read and for a paragraph whose properties a review restores.
|
|
37
|
-
*/
|
|
38
|
-
const inheritableParagraphMarkFormatting = ({ runProperties, styleId, styleResolver }) => {
|
|
39
|
-
if (!paragraphMarkLendsRuns(styleId)) return void 0;
|
|
40
|
-
const formatting = resolveRunFormattingWithoutDefaults(runProperties, styleResolver);
|
|
41
|
-
return formatting ? stripParagraphMarkFormattingForBodyRuns(formatting) : void 0;
|
|
42
|
-
};
|
|
43
33
|
/** @internal Recompute a paragraph's inherited run defaults from authored package state. */
|
|
44
34
|
function resolveParagraphDefaultTextFormatting(styleId, formatting, styleResolver, options = {}) {
|
|
45
35
|
const style = styleId ? styleResolver.getStyle(styleId) ?? styleResolver.getDefaultParagraphStyle() : styleResolver.getDefaultParagraphStyle();
|
|
@@ -140,13 +130,14 @@ function paragraphStyleCascadeAttrs({ styleId, formatting, styleResolver, tableP
|
|
|
140
130
|
*/
|
|
141
131
|
function extractTableParagraphOverlay(pPr) {
|
|
142
132
|
if (!pPr) return;
|
|
143
|
-
const overlay = {
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
133
|
+
const overlay = {
|
|
134
|
+
...pPr.spaceBefore === void 0 ? {} : { spaceBefore: pPr.spaceBefore },
|
|
135
|
+
...pPr.spaceAfter === void 0 ? {} : { spaceAfter: pPr.spaceAfter },
|
|
136
|
+
...pPr.lineSpacing === void 0 ? {} : { lineSpacing: pPr.lineSpacing },
|
|
137
|
+
...pPr.lineSpacingRule === void 0 ? {} : { lineSpacingRule: pPr.lineSpacingRule },
|
|
138
|
+
...pPr.contextualSpacing === void 0 ? {} : { contextualSpacing: pPr.contextualSpacing },
|
|
139
|
+
...pPr.frame === void 0 ? {} : { frame: pPr.frame }
|
|
140
|
+
};
|
|
150
141
|
return Object.keys(overlay).length > 0 ? overlay : void 0;
|
|
151
142
|
}
|
|
152
143
|
/**
|
|
@@ -165,4 +156,4 @@ function tableCellParagraphOverlay(styleResolver, tableStyleId, regions) {
|
|
|
165
156
|
}
|
|
166
157
|
return overlay;
|
|
167
158
|
}
|
|
168
|
-
export { extractTableParagraphOverlay,
|
|
159
|
+
export { extractTableParagraphOverlay, paragraphStyleCascadeAttrs, resolveParagraphDefaultTextFormatting, resolveRunFormattingWithoutDefaults, tableCellParagraphOverlay };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { NumberingMap } from "../../docx/numberingParser.js";
|
|
1
2
|
import { document_d_exports } from "../../types/document.js";
|
|
3
|
+
import { DeepReadonly } from "../../types/documentModel.js";
|
|
4
|
+
import { DirectParagraphIndentation } from "../paragraphIndentation.js";
|
|
2
5
|
import { ParagraphAttrs, ParagraphAttrsPatch } from "../schema/nodes.js";
|
|
3
|
-
import { NumberingMap } from "../../docx/numberingParser.js";
|
|
4
6
|
import { ResolvedParagraphStyle } from "./styleResolver.js";
|
|
5
|
-
import { DirectParagraphIndentation } from "../paragraphIndentation.js";
|
|
6
7
|
/**
|
|
7
8
|
* Shared helper for projecting a resolved paragraph style onto ProseMirror
|
|
8
9
|
* paragraph node attrs.
|
|
@@ -50,7 +51,7 @@ export declare function listAttrsFromNumbering(numPr: {
|
|
|
50
51
|
}, numbering: NumberingMap | null | undefined): ParagraphAttrsPatch;
|
|
51
52
|
type ListIndentationProvenanceOptions = {
|
|
52
53
|
direct: DirectParagraphIndentation | undefined;
|
|
53
|
-
styleFormatting: document_d_exports.ParagraphFormatting | undefined;
|
|
54
|
+
styleFormatting: DeepReadonly<document_d_exports.ParagraphFormatting> | undefined;
|
|
54
55
|
numberingSource: "style" | "paragraph";
|
|
55
56
|
numPr: {
|
|
56
57
|
numId: number;
|
|
@@ -1,14 +1,39 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Style Resolver for ProseMirror Editor
|
|
3
|
+
*
|
|
4
|
+
* Resolves OOXML style definitions to final paragraph and run properties.
|
|
5
|
+
* Handles the cascade:
|
|
6
|
+
* 1. Document defaults (docDefaults)
|
|
7
|
+
* 2. Normal style (if no explicit styleId)
|
|
8
|
+
* 3. Style chain (basedOn inheritance - already resolved by styleParser)
|
|
9
|
+
* 4. Inline properties
|
|
10
|
+
*
|
|
11
|
+
* For paragraphs inside a table cell, `resolveParagraphStyleInTable` inserts
|
|
12
|
+
* an additional layer between docDefaults and the Normal/style chain: the
|
|
13
|
+
* enclosing table style's modeled paragraph properties (`w:pPr`). See its doc
|
|
14
|
+
* comment for the full cascade order.
|
|
15
|
+
*
|
|
16
|
+
* Based on ECMA-376 style cascade rules.
|
|
17
|
+
*/
|
|
2
18
|
import { BuiltInStyleIndex } from "../../docx/builtInStyles.js";
|
|
19
|
+
import { document_d_exports } from "../../types/document.js";
|
|
20
|
+
import { DeepReadonly } from "../../types/documentModel.js";
|
|
3
21
|
/**
|
|
4
22
|
* Resolved style properties ready for rendering
|
|
5
23
|
*/
|
|
6
|
-
export type ResolvedParagraphStyle = {
|
|
24
|
+
export type ResolvedParagraphStyle = DeepReadonly<{
|
|
7
25
|
/** Paragraph formatting (alignment, spacing, indentation, etc.) */
|
|
8
26
|
paragraphFormatting?: document_d_exports.ParagraphFormatting;
|
|
9
27
|
/** Default run formatting from the style */
|
|
10
28
|
runFormatting?: document_d_exports.TextFormatting;
|
|
11
|
-
}
|
|
29
|
+
}>;
|
|
30
|
+
/**
|
|
31
|
+
* A style the resolver hands out: the document's own definition, shared with
|
|
32
|
+
* the document and every other caller, so nobody may write to it.
|
|
33
|
+
*/
|
|
34
|
+
export type ReadonlyStyle = DeepReadonly<document_d_exports.Style>;
|
|
35
|
+
/** Run formatting the resolver hands out; see {@link ReadonlyStyle}. */
|
|
36
|
+
export type ReadonlyTextFormatting = DeepReadonly<document_d_exports.TextFormatting>;
|
|
12
37
|
/**
|
|
13
38
|
* Paragraph fields sourced from the table style enclosing a cell paragraph:
|
|
14
39
|
* the table style's own `w:pPr`, then the applicable
|
|
@@ -21,7 +46,7 @@ export type ResolvedParagraphStyle = {
|
|
|
21
46
|
* ownership checks. Other fields remain out of scope until their table-style
|
|
22
47
|
* projection is modeled end to end.
|
|
23
48
|
*/
|
|
24
|
-
export type TableCellParagraphSpacingOverlay = Pick<document_d_exports.ParagraphFormatting, "spaceBefore" | "spaceAfter" | "lineSpacing" | "lineSpacingRule" | "contextualSpacing" | "frame"
|
|
49
|
+
export type TableCellParagraphSpacingOverlay = DeepReadonly<Pick<document_d_exports.ParagraphFormatting, "spaceBefore" | "spaceAfter" | "lineSpacing" | "lineSpacingRule" | "contextualSpacing" | "frame">>;
|
|
25
50
|
/**
|
|
26
51
|
* StyleResolver provides efficient access to resolved style properties
|
|
27
52
|
*/
|
|
@@ -32,11 +57,11 @@ export declare class StyleResolver {
|
|
|
32
57
|
private readonly defaultParagraphStyle;
|
|
33
58
|
private readonly defaultCharacterStyle;
|
|
34
59
|
private readonly defaultTableStyle;
|
|
35
|
-
constructor(styleDefinitions: document_d_exports.StyleDefinitions | undefined);
|
|
60
|
+
constructor(styleDefinitions: DeepReadonly<document_d_exports.StyleDefinitions> | undefined);
|
|
36
61
|
/**
|
|
37
62
|
* Get a style by ID
|
|
38
63
|
*/
|
|
39
|
-
getStyle(styleId: string):
|
|
64
|
+
getStyle(styleId: string): ReadonlyStyle | undefined;
|
|
40
65
|
/**
|
|
41
66
|
* This document's styles indexed by the built-in they are, so a consumer can
|
|
42
67
|
* ask whether a paragraph is a heading without matching an English style id.
|
|
@@ -47,7 +72,7 @@ export declare class StyleResolver {
|
|
|
47
72
|
/**
|
|
48
73
|
* Get all available paragraph styles (for toolbar dropdown)
|
|
49
74
|
*/
|
|
50
|
-
getParagraphStyles():
|
|
75
|
+
getParagraphStyles(): ReadonlyStyle[];
|
|
51
76
|
/**
|
|
52
77
|
* Resolve paragraph style properties, including docDefaults cascade
|
|
53
78
|
*
|
|
@@ -98,36 +123,36 @@ export declare class StyleResolver {
|
|
|
98
123
|
/**
|
|
99
124
|
* Get all available table styles (for style gallery)
|
|
100
125
|
*/
|
|
101
|
-
getTableStyles():
|
|
126
|
+
getTableStyles(): ReadonlyStyle[];
|
|
102
127
|
/**
|
|
103
128
|
* Resolve run (character) style properties
|
|
104
129
|
*
|
|
105
130
|
* @param styleId - The character style ID to resolve
|
|
106
131
|
* @returns Resolved text formatting
|
|
107
132
|
*/
|
|
108
|
-
resolveRunStyle(styleId: string | undefined | null):
|
|
133
|
+
resolveRunStyle(styleId: string | undefined | null): ReadonlyTextFormatting | undefined;
|
|
109
134
|
/**
|
|
110
135
|
* Get a character style's own properties WITHOUT docDefaults.
|
|
111
136
|
* Used when the caller already has docDefaults applied (e.g., from paragraph style resolution).
|
|
112
137
|
* This prevents docDefault fonts from incorrectly overriding paragraph style fonts.
|
|
113
138
|
*/
|
|
114
|
-
getRunStyleOwnProperties(styleId: string | undefined | null):
|
|
139
|
+
getRunStyleOwnProperties(styleId: string | undefined | null): ReadonlyTextFormatting | undefined;
|
|
115
140
|
/**
|
|
116
141
|
* Get document defaults
|
|
117
142
|
*/
|
|
118
|
-
getDocDefaults(): document_d_exports.DocDefaults | undefined;
|
|
143
|
+
getDocDefaults(): DeepReadonly<document_d_exports.DocDefaults> | undefined;
|
|
119
144
|
/**
|
|
120
145
|
* Get default paragraph style (usually "Normal")
|
|
121
146
|
*/
|
|
122
|
-
getDefaultParagraphStyle():
|
|
147
|
+
getDefaultParagraphStyle(): ReadonlyStyle | undefined;
|
|
123
148
|
/**
|
|
124
149
|
* Get default character style.
|
|
125
150
|
*/
|
|
126
|
-
getDefaultCharacterStyle():
|
|
151
|
+
getDefaultCharacterStyle(): ReadonlyStyle | undefined;
|
|
127
152
|
/**
|
|
128
153
|
* Get default table style.
|
|
129
154
|
*/
|
|
130
|
-
getDefaultTableStyle():
|
|
155
|
+
getDefaultTableStyle(): ReadonlyStyle | undefined;
|
|
131
156
|
/**
|
|
132
157
|
* Check if a style exists
|
|
133
158
|
*/
|
|
@@ -137,6 +162,6 @@ export declare class StyleResolver {
|
|
|
137
162
|
/**
|
|
138
163
|
* Create a style resolver from document's style definitions
|
|
139
164
|
*/
|
|
140
|
-
export declare function createStyleResolver(styleDefinitions: document_d_exports.StyleDefinitions | undefined): StyleResolver;
|
|
165
|
+
export declare function createStyleResolver(styleDefinitions: DeepReadonly<document_d_exports.StyleDefinitions> | undefined): StyleResolver;
|
|
141
166
|
/** The same ordered paragraph tiers, without unrelated run or paragraph fields. */
|
|
142
167
|
export declare const resolveStyleParagraphNumbering: (resolver: StyleResolver, styleId: string | undefined | null) => document_d_exports.ParagraphNumberingOverride | undefined;
|
|
@@ -132,14 +132,12 @@ var StyleResolver = class {
|
|
|
132
132
|
styleId,
|
|
133
133
|
tableParagraphOverlay
|
|
134
134
|
});
|
|
135
|
-
let formatting = defaults
|
|
135
|
+
let formatting = defaults;
|
|
136
136
|
for (const layer of [overlay, style]) formatting = mergeParagraphFormatting(formatting, layer) ?? formatting;
|
|
137
137
|
return formatting;
|
|
138
138
|
}
|
|
139
139
|
resolveParagraphStyleCascade(styleId, tableParagraphOverlay) {
|
|
140
|
-
const result = {};
|
|
141
140
|
const paragraphFormatting = this.resolveParagraphFormatting(styleId, tableParagraphOverlay);
|
|
142
|
-
if (paragraphFormatting) result.paragraphFormatting = paragraphFormatting;
|
|
143
141
|
const style = paragraphStyleFor(this, styleId);
|
|
144
142
|
const runFormatting = cascadeStyleTextFormatting([{
|
|
145
143
|
formatting: this.docDefaults?.rPr,
|
|
@@ -148,8 +146,10 @@ var StyleResolver = class {
|
|
|
148
146
|
formatting: style?.rPr,
|
|
149
147
|
type: "style"
|
|
150
148
|
}]).formatting;
|
|
151
|
-
|
|
152
|
-
|
|
149
|
+
return {
|
|
150
|
+
...paragraphFormatting ? { paragraphFormatting } : {},
|
|
151
|
+
...runFormatting ? { runFormatting } : {}
|
|
152
|
+
};
|
|
153
153
|
}
|
|
154
154
|
/**
|
|
155
155
|
* Resolve the style applied to the paragraph that follows one styled with
|
|
@@ -210,7 +210,7 @@ var StyleResolver = class {
|
|
|
210
210
|
if (!styleId) return;
|
|
211
211
|
const style = this.stylesById.get(styleId);
|
|
212
212
|
if (!style?.rPr) return;
|
|
213
|
-
return Object.keys(style.rPr).length > 0 ?
|
|
213
|
+
return Object.keys(style.rPr).length > 0 ? style.rPr : void 0;
|
|
214
214
|
}
|
|
215
215
|
/**
|
|
216
216
|
* Get document defaults
|
|
@@ -1,34 +1,41 @@
|
|
|
1
1
|
import { document_d_exports } from "../../types/document.js";
|
|
2
|
+
import { DeepReadonly } from "../../types/documentModel.js";
|
|
2
3
|
import { STYLE_TOGGLE_KEYS } from "../../utils/textFormattingMerge.js";
|
|
3
4
|
export type StyleToggleKey = (typeof STYLE_TOGGLE_KEYS)[number];
|
|
4
5
|
type ToggleState = {
|
|
5
6
|
value: boolean;
|
|
6
7
|
defaultsActive: boolean;
|
|
7
8
|
};
|
|
8
|
-
/**
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Internal formatting value whose toggle history survives copying and separate
|
|
11
|
+
* cascade passes. Its formatting shares nested values with the levels it read
|
|
12
|
+
* (a style resolver's results among them), so it is read-only; TypeScript lets
|
|
13
|
+
* a readonly literal match a writable parameter, so there is no writable
|
|
14
|
+
* variant to fall into.
|
|
15
|
+
*/
|
|
16
|
+
type StyleTextFormattingCascade<Formatting extends DeepReadonly<document_d_exports.TextFormatting> = DeepReadonly<document_d_exports.TextFormatting>> = {
|
|
17
|
+
formatting: Formatting | undefined;
|
|
11
18
|
toggleStates: ReadonlyMap<StyleToggleKey, ToggleState>;
|
|
12
19
|
type: "styleToggleCascade";
|
|
13
20
|
};
|
|
14
|
-
type StyleToggleLevel = {
|
|
15
|
-
formatting:
|
|
21
|
+
type StyleToggleLevel<Formatting extends DeepReadonly<document_d_exports.TextFormatting> = DeepReadonly<document_d_exports.TextFormatting>> = {
|
|
22
|
+
formatting: Formatting | undefined;
|
|
16
23
|
type: "defaults" | "style" | "direct";
|
|
17
24
|
} | {
|
|
18
|
-
cascade: StyleTextFormattingCascade
|
|
25
|
+
cascade: StyleTextFormattingCascade<Formatting>;
|
|
19
26
|
type: "carried";
|
|
20
27
|
};
|
|
21
|
-
type StyleToggleCascadeOptions = {
|
|
28
|
+
type StyleToggleCascadeOptions<Formatting extends DeepReadonly<document_d_exports.TextFormatting> = DeepReadonly<document_d_exports.TextFormatting>> = {
|
|
22
29
|
/** Existing ordinary-property merge whose toggle fields this cascade replaces. */
|
|
23
|
-
ordinaryFormatting:
|
|
30
|
+
ordinaryFormatting: Formatting | undefined;
|
|
24
31
|
};
|
|
25
32
|
type CascadeStyleFromResolvedBaseOptions = {
|
|
26
|
-
baseFormatting: document_d_exports.TextFormatting | undefined;
|
|
33
|
+
baseFormatting: DeepReadonly<document_d_exports.TextFormatting> | undefined;
|
|
27
34
|
defaultsActiveProperties: readonly StyleToggleKey[] | undefined;
|
|
28
|
-
styleFormatting: document_d_exports.TextFormatting | undefined;
|
|
35
|
+
styleFormatting: DeepReadonly<document_d_exports.TextFormatting> | undefined;
|
|
29
36
|
};
|
|
30
37
|
/** Continue a style cascade from a compact resolved paragraph snapshot. */
|
|
31
|
-
export declare const cascadeStyleFromResolvedBase: ({ baseFormatting, defaultsActiveProperties, styleFormatting }: CascadeStyleFromResolvedBaseOptions) => document_d_exports.TextFormatting | undefined;
|
|
38
|
+
export declare const cascadeStyleFromResolvedBase: ({ baseFormatting, defaultsActiveProperties, styleFormatting }: CascadeStyleFromResolvedBaseOptions) => DeepReadonly<document_d_exports.TextFormatting> | undefined;
|
|
32
39
|
/**
|
|
33
40
|
* Resolve run formatting across OOXML style hierarchy levels.
|
|
34
41
|
*
|
|
@@ -23,22 +23,13 @@ const cascadeStyleFromResolvedBase = ({ baseFormatting, defaultsActiveProperties
|
|
|
23
23
|
type: "style"
|
|
24
24
|
}]).formatting;
|
|
25
25
|
};
|
|
26
|
-
/**
|
|
27
|
-
* Resolve run formatting across OOXML style hierarchy levels.
|
|
28
|
-
*
|
|
29
|
-
* Ordinary properties retain Folio's existing low-to-high, last-defined merge. Toggle
|
|
30
|
-
* properties reverse inherited state when a style level states `true`; `false` leaves inherited
|
|
31
|
-
* style state unchanged, while direct formatting remains an absolute value. The returned value
|
|
32
|
-
* carries its toggle history explicitly, so paragraph and character style resolution may happen
|
|
33
|
-
* in separate passes without an object-identity contract.
|
|
34
|
-
*/
|
|
35
26
|
function cascadeStyleTextFormatting(levels, options) {
|
|
36
|
-
let formatting = options ? mergeTextFormatting(void 0, options.ordinaryFormatting) : void 0;
|
|
27
|
+
let formatting = options?.ordinaryFormatting ? mergeTextFormatting(void 0, options.ordinaryFormatting) : void 0;
|
|
37
28
|
const mergeOrdinaryFormatting = options === void 0;
|
|
38
29
|
const toggleStates = /* @__PURE__ */ new Map();
|
|
39
30
|
for (const level of levels) {
|
|
40
31
|
if (level.type === "carried") {
|
|
41
|
-
if (mergeOrdinaryFormatting) formatting = mergeTextFormatting(formatting, level.cascade.formatting);
|
|
32
|
+
if (mergeOrdinaryFormatting && level.cascade.formatting) formatting = mergeTextFormatting(formatting, level.cascade.formatting);
|
|
42
33
|
for (const [key, state] of level.cascade.toggleStates) toggleStates.set(key, state);
|
|
43
34
|
continue;
|
|
44
35
|
}
|