@stll/folio-core 0.62.0 → 0.63.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -6
- package/dist/ai-edits/apply.d.ts +40 -10
- package/dist/ai-edits/apply.js +563 -219
- package/dist/ai-edits/batch-claims.d.ts +13 -4
- package/dist/ai-edits/batch-claims.js +6 -6
- package/dist/ai-edits/block-identity.d.ts +3 -4
- package/dist/ai-edits/block-identity.js +15 -1
- package/dist/ai-edits/blockRange.d.ts +7 -7
- package/dist/ai-edits/blockRange.js +2 -1
- package/dist/ai-edits/character-boundaries.d.ts +5 -6
- package/dist/ai-edits/clean-text.d.ts +8 -8
- package/dist/ai-edits/comment-lifecycle.d.ts +15 -6
- package/dist/ai-edits/comment-lifecycle.js +74 -23
- package/dist/ai-edits/headless.d.ts +39 -37
- package/dist/ai-edits/headless.js +147 -47
- package/dist/ai-edits/index.d.ts +2 -1
- package/dist/ai-edits/index.js +2 -1
- package/dist/ai-edits/inline-emphasis.d.ts +5 -6
- package/dist/ai-edits/minimal-replacement.d.ts +12 -13
- package/dist/ai-edits/newListNumbering.d.ts +16 -3
- package/dist/ai-edits/newListNumbering.js +97 -34
- package/dist/ai-edits/note-references.d.ts +14 -14
- package/dist/ai-edits/note-story-inventory.d.ts +2 -2
- package/dist/ai-edits/pending-suggestions.d.ts +8 -8
- package/dist/ai-edits/pending-suggestions.js +5 -1
- package/dist/ai-edits/read.d.ts +10 -11
- package/dist/ai-edits/read.js +6 -0
- package/dist/ai-edits/referenceClassification.d.ts +2 -2
- package/dist/ai-edits/removed-blocks.d.ts +20 -0
- package/dist/ai-edits/removed-blocks.js +69 -0
- package/dist/ai-edits/result-validation.d.ts +4 -5
- package/dist/ai-edits/result-validation.js +4 -3
- package/dist/ai-edits/revisionStretches.d.ts +3 -3
- package/dist/ai-edits/revisionStretches.js +17 -0
- package/dist/ai-edits/scoped-reading.d.ts +3 -4
- package/dist/ai-edits/snapshot.d.ts +24 -23
- package/dist/ai-edits/snapshot.js +44 -30
- package/dist/ai-edits/table-cell-mutations.d.ts +6 -6
- package/dist/ai-edits/table-cell-mutations.js +7 -4
- package/dist/ai-edits/table-geometry.d.ts +6 -6
- package/dist/ai-edits/table-mutation-plan.d.ts +5 -5
- package/dist/ai-edits/table-mutation-plan.js +1 -4
- package/dist/ai-edits/table-row-column-mutations.d.ts +16 -16
- package/dist/ai-edits/table-targets.d.ts +8 -9
- package/dist/ai-edits/table-template.d.ts +6 -6
- package/dist/ai-edits/types.d.ts +48 -44
- package/dist/ai-edits/word-diff.d.ts +12 -13
- package/dist/ai-edits/word-diff.js +23 -21
- package/dist/ai-suggestions/apply.d.ts +3 -3
- package/dist/ai-suggestions/apply.js +0 -12
- package/dist/ai-suggestions/conflict.d.ts +4 -5
- package/dist/ai-suggestions/conflict.js +3 -1
- package/dist/ai-suggestions/text-positions.d.ts +3 -4
- package/dist/ai-suggestions/types.d.ts +13 -14
- package/dist/compare/column-alignment.d.ts +4 -5
- package/dist/compare/compare.d.ts +12 -12
- package/dist/compare/compare.js +2 -1
- package/dist/compare/content-alignment.d.ts +16 -16
- package/dist/compare/content-alignment.js +29 -25
- package/dist/compare/content-types.d.ts +23 -24
- package/dist/compare/content.d.ts +23 -23
- package/dist/compare/formatting.d.ts +2 -2
- package/dist/compare/import-style-closure.d.ts +2 -2
- package/dist/compare/inline-atom-resources.d.ts +2 -3
- package/dist/compare/inline-atoms.d.ts +6 -7
- package/dist/compare/inline-provenance.d.ts +6 -7
- package/dist/compare/inline-provenance.js +22 -20
- package/dist/compare/inserted-resource-snapshot.d.ts +3 -3
- package/dist/compare/plan.d.ts +5 -6
- package/dist/compare/plan.js +5 -6
- package/dist/compare/reproducible-package.d.ts +2 -3
- package/dist/compare/reproducible-package.js +1 -1
- package/dist/compare/scenario.d.ts +9 -9
- package/dist/compare/section-boundary-properties.d.ts +6 -6
- package/dist/compare/section-boundary-properties.js +4 -4
- package/dist/compare/style-resources.d.ts +5 -6
- package/dist/compare/types.d.ts +21 -21
- package/dist/compare/verification.d.ts +11 -11
- package/dist/content-controls/checkboxDisplay.d.ts +2 -2
- package/dist/content-controls/checkboxDisplay.js +2 -1
- package/dist/content-controls/errors.d.ts +4 -4
- package/dist/content-controls/findContentControls.d.ts +7 -8
- package/dist/content-controls/mutateContentControls.d.ts +17 -6
- package/dist/content-controls/mutateContentControls.js +3 -2
- package/dist/controller/activeEditorStory.d.ts +4 -5
- package/dist/controller/canonicalClipboard.d.ts +3 -3
- package/dist/controller/canonicalClipboard.js +3 -1
- package/dist/controller/canonicalClipboardResources.d.ts +3 -3
- package/dist/controller/canonicalClipboardResources.js +3 -2
- package/dist/controller/canonicalComments.d.ts +5 -5
- package/dist/controller/canonicalComposition.d.ts +2 -2
- package/dist/controller/canonicalComposition.js +11 -14
- package/dist/controller/canonicalInlineProjection.d.ts +8 -7
- package/dist/controller/canonicalInlineProjection.js +68 -37
- package/dist/controller/canonicalInput.d.ts +3 -3
- package/dist/controller/canonicalInput.js +1 -3
- package/dist/controller/canonicalInputTimer.d.ts +5 -6
- package/dist/controller/canonicalListRendering.d.ts +2 -3
- package/dist/controller/canonicalOperations.d.ts +6 -6
- package/dist/controller/canonicalPublicOperations.d.ts +13 -13
- package/dist/controller/canonicalPublicOperations.js +12 -14
- package/dist/controller/canonicalReview.d.ts +2 -2
- package/dist/controller/canonicalSelection.d.ts +2 -2
- package/dist/controller/canonicalSelection.js +15 -0
- package/dist/controller/canonicalSession.d.ts +22 -14
- package/dist/controller/canonicalSession.js +229 -42
- package/dist/controller/canonicalStoryEditor.d.ts +2 -2
- package/dist/controller/canonicalStructure.d.ts +3 -3
- package/dist/controller/canonicalStructure.js +144 -21
- package/dist/controller/canonicalTocSelection.d.ts +2 -2
- package/dist/controller/collaborationModules.d.ts +2 -3
- package/dist/controller/committedLayoutDiff.d.ts +4 -5
- package/dist/controller/contentControlWidgetController.d.ts +7 -8
- package/dist/controller/folioEditor.d.ts +6 -6
- package/dist/controller/folioEditorEvents.d.ts +7 -8
- package/dist/controller/fontReadiness.d.ts +12 -12
- package/dist/controller/fontReadiness.js +123 -31
- package/dist/controller/headerFooterEditorManager.d.ts +9 -10
- package/dist/controller/headerFooterEditorManager.js +3 -10
- package/dist/controller/hiddenEditorApi.d.ts +5 -5
- package/dist/controller/hiddenEditorManager.d.ts +13 -13
- package/dist/controller/hiddenEditorManager.js +2 -0
- package/dist/controller/hyphenationReadiness.d.ts +4 -5
- package/dist/controller/hyphenationReadiness.js +0 -1
- package/dist/controller/latestRequestGate.d.ts +3 -4
- package/dist/controller/layoutPipeline.d.ts +7 -8
- package/dist/controller/layoutPipeline.js +16 -5
- package/dist/controller/layoutRunOptions.d.ts +4 -5
- package/dist/controller/layoutScheduler.d.ts +8 -9
- package/dist/controller/layoutSession.d.ts +7 -7
- package/dist/controller/noteEditorManager.d.ts +7 -7
- package/dist/controller/noteEditorManager.js +0 -1
- package/dist/controller/readOnlySelection.d.ts +12 -0
- package/dist/controller/readOnlySelection.js +62 -0
- package/dist/display-list/build/buildContext.d.ts +8 -6
- package/dist/display-list/build/buildDisplayList.d.ts +6 -6
- package/dist/display-list/build/buildDisplayList.js +20 -2
- package/dist/display-list/build/colors.d.ts +6 -7
- package/dist/display-list/build/commentAnnotations.d.ts +3 -4
- package/dist/display-list/build/floatingImages.d.ts +5 -6
- package/dist/display-list/build/fontTable.d.ts +4 -5
- package/dist/display-list/build/fontTable.js +2 -1
- package/dist/display-list/build/furniture.d.ts +7 -6
- package/dist/display-list/build/furniture.js +1 -0
- package/dist/display-list/build/glyphs.d.ts +7 -7
- package/dist/display-list/build/glyphs.js +17 -26
- package/dist/display-list/build/headerFooterPrimitives.d.ts +4 -5
- package/dist/display-list/build/headerFooterPrimitives.js +5 -1
- package/dist/display-list/build/imagePrimitives.d.ts +5 -5
- package/dist/display-list/build/imagePrimitives.js +0 -10
- package/dist/display-list/build/pageBorderPrimitives.d.ts +4 -5
- package/dist/display-list/build/pageBorderPrimitives.js +8 -11
- package/dist/display-list/build/pageFurniture.d.ts +6 -7
- package/dist/display-list/build/pageFurniture.js +5 -1
- package/dist/display-list/build/paragraphPrimitives.d.ts +5 -4
- package/dist/display-list/build/paragraphPrimitives.js +138 -108
- package/dist/display-list/build/previewPrimitives.d.ts +2 -3
- package/dist/display-list/build/previewPrimitives.js +38 -9
- package/dist/display-list/build/regions.d.ts +5 -5
- package/dist/display-list/build/storyPrimitives.d.ts +4 -4
- package/dist/display-list/build/strokes.d.ts +10 -10
- package/dist/display-list/build/tablePrimitives.d.ts +5 -5
- package/dist/display-list/build/tablePrimitives.js +15 -2
- package/dist/display-list/build/textBoxPrimitives.d.ts +3 -4
- package/dist/display-list/build/textBoxPrimitives.js +4 -0
- package/dist/display-list/build/textDecorations.d.ts +10 -11
- package/dist/display-list/build/unsupported.d.ts +4 -5
- package/dist/display-list/build/watermarkPrimitives.d.ts +5 -4
- package/dist/display-list/build/watermarkPrimitives.js +5 -17
- package/dist/display-list/dom/renderDisplayListToDom.d.ts +8 -8
- package/dist/display-list/dom/renderDisplayListToDom.js +52 -10
- package/dist/display-list/editor/displayListPagePainter.d.ts +4 -5
- package/dist/display-list/editor/pageRenderer.d.ts +5 -6
- package/dist/display-list/editor/pageRenderer.js +1 -0
- package/dist/display-list/html/renderDisplayListToHtml.d.ts +5 -6
- package/dist/display-list/pageResourceOwnership.d.ts +4 -0
- package/dist/display-list/pageResourceOwnership.js +32 -0
- package/dist/display-list/primitives.d.ts +13 -13
- package/dist/display-list/primitives.js +2 -0
- package/dist/display-list/selectDisplayPages.d.ts +2 -3
- package/dist/display-list/types.d.ts +54 -33
- package/dist/document-operations.d.ts +56 -44
- package/dist/document-operations.js +37 -2
- package/dist/document-stories.d.ts +3 -4
- package/dist/docx/altChunk.d.ts +5 -6
- package/dist/docx/appVersionNormalization.d.ts +4 -4
- package/dist/docx/archiveInflation.d.ts +16 -16
- package/dist/docx/archiveInflation.js +1 -1
- package/dist/docx/attributeRemainder.d.ts +8 -8
- package/dist/docx/attributeRemainder.js +34 -0
- package/dist/docx/blockContentParser.d.ts +15 -7
- package/dist/docx/blockContentParser.js +5 -6
- package/dist/docx/blockCustomXmlShell.d.ts +2 -3
- package/dist/docx/blockPlainText.d.ts +3 -4
- package/dist/docx/blockPlainText.js +5 -1
- package/dist/docx/bookmarkIdNormalization.d.ts +2 -3
- package/dist/docx/bookmarkIds.d.ts +5 -6
- package/dist/docx/bookmarkParser.d.ts +20 -21
- package/dist/docx/bookmarkParser.js +3 -2
- package/dist/docx/borderParser.d.ts +2 -3
- package/dist/docx/builtInStyles.d.ts +11 -11
- package/dist/docx/bulletMarkers.d.ts +8 -3
- package/dist/docx/bulletMarkers.js +3 -43
- package/dist/docx/canonicalModel.d.ts +2 -0
- package/dist/docx/canonicalModel.js +1 -0
- package/dist/docx/canonicalResourceSave.d.ts +3 -3
- package/dist/docx/canonicalSave.d.ts +3 -3
- package/dist/docx/canonicalSessionInput.d.ts +3 -3
- package/dist/docx/canonicalStoryRepack.d.ts +2 -2
- package/dist/docx/chartPreview.d.ts +6 -0
- package/dist/docx/chartPreview.js +302 -0
- package/dist/docx/commentAnchorIndex.d.ts +6 -5
- package/dist/docx/commentAnchorIndex.js +236 -1
- package/dist/docx/commentIdNormalization.d.ts +4 -5
- package/dist/docx/commentParser.d.ts +4 -5
- package/dist/docx/commentParser.js +2 -1
- package/dist/docx/commentRangeIntegrity.d.ts +6 -5
- package/dist/docx/commentRangeIntegrity.js +17 -1
- package/dist/docx/commentRangeJoin.d.ts +2 -3
- package/dist/docx/commentReferenceCompletion.d.ts +2 -3
- package/dist/docx/commentReferenceNormalization.d.ts +4 -4
- package/dist/docx/commentReplyMarkers.d.ts +3 -4
- package/dist/docx/commentTextParagraph.d.ts +2 -3
- package/dist/docx/commentThreadKey.d.ts +2 -3
- package/dist/docx/compatibility.d.ts +12 -13
- package/dist/docx/conformance.d.ts +2 -3
- package/dist/docx/conformance.js +1 -1
- package/dist/docx/containerChildren.d.ts +18 -18
- package/dist/docx/containerChildren.gen.d.ts +5 -6
- package/dist/docx/contentTypeRegistry.d.ts +2 -2
- package/dist/docx/corePropertiesParser.d.ts +2 -2
- package/dist/docx/danglingRelationshipReferences.d.ts +3 -3
- package/dist/docx/defaultParagraphStyle.d.ts +6 -6
- package/dist/docx/diagramPreview.d.ts +5 -4
- package/dist/docx/diagramPreview.js +8 -3
- package/dist/docx/documentClone.js +1 -2
- package/dist/docx/documentGrid.d.ts +2 -2
- package/dist/docx/documentParser.d.ts +11 -11
- package/dist/docx/documentSectionFacts.d.ts +5 -6
- package/dist/docx/drawingAnchor.d.ts +14 -14
- package/dist/docx/drawingGroupChildren.d.ts +8 -8
- package/dist/docx/drawingIdNormalization.d.ts +3 -4
- package/dist/docx/drawingRelationships.d.ts +2 -2
- package/dist/docx/drawingUtils.d.ts +16 -17
- package/dist/docx/drawingUtils.js +4 -2
- package/dist/docx/encryption/agileDecryption.d.ts +2 -3
- package/dist/docx/encryption/compoundFile.d.ts +5 -6
- package/dist/docx/encryption/containerFormat.d.ts +4 -5
- package/dist/docx/encryption/cryptoBytes.d.ts +8 -9
- package/dist/docx/encryption/encryptionInfo.d.ts +5 -6
- package/dist/docx/encryption/errors.d.ts +5 -5
- package/dist/docx/encryption/openEncryptedDocx.d.ts +5 -6
- package/dist/docx/ensureParaIds.d.ts +6 -6
- package/dist/docx/ensureParaIds.js +1 -1
- package/dist/docx/fieldParser.d.ts +32 -33
- package/dist/docx/fieldParser.js +8 -6
- package/dist/docx/fieldState.d.ts +5 -6
- package/dist/docx/foldedListNumberFields.d.ts +15 -16
- package/dist/docx/fontTableParser.d.ts +2 -3
- package/dist/docx/footnoteParser.d.ts +11 -11
- package/dist/docx/footnoteParser.js +19 -0
- package/dist/docx/graphicFrameLocks.d.ts +5 -6
- package/dist/docx/groupDrawingParser.d.ts +4 -5
- package/dist/docx/groupDrawingParser.js +10 -5
- package/dist/docx/headerFooterParser.d.ts +14 -14
- package/dist/docx/headerFooterRefParser.d.ts +6 -7
- package/dist/docx/headerFooterReferenceNormalization.d.ts +5 -5
- package/dist/docx/headerFooterVerbatim.d.ts +14 -14
- package/dist/docx/hyperlinkParser.d.ts +20 -21
- package/dist/docx/hyperlinkParser.js +54 -11
- package/dist/docx/imageParser.d.ts +18 -18
- package/dist/docx/imageParser.js +6 -3
- package/dist/docx/imageRawXml.d.ts +9 -10
- package/dist/docx/importedIdCollisions.d.ts +3 -4
- package/dist/docx/inlineContentRemovals.d.ts +2 -3
- package/dist/docx/inlineWrapperContent.d.ts +38 -33
- package/dist/docx/inlineWrapperContent.js +29 -23
- package/dist/docx/inlineWrapperParser.d.ts +4 -5
- package/dist/docx/inlineWrapperParser.js +14 -0
- package/dist/docx/linkedSdtPreservation.d.ts +3 -3
- package/dist/docx/listMarkerComputation.d.ts +4 -5
- package/dist/docx/listModelNormalization.d.ts +2 -2
- package/dist/docx/listModelNormalization.js +15 -11
- package/dist/docx/listNumberingInstances.d.ts +8 -8
- package/dist/docx/listRendering.d.ts +5 -6
- package/dist/docx/listTemplate.d.ts +5 -5
- package/dist/docx/markupRangeMarker.d.ts +21 -4
- package/dist/docx/markupRangeMarker.js +35 -1
- package/dist/docx/mathToMathml.d.ts +8 -3
- package/dist/docx/mathToMathml.js +72 -4
- package/dist/docx/metadataPrivacy.d.ts +14 -14
- package/dist/docx/metadataPrivacy.js +3 -3
- package/dist/docx/metafileRaster.d.ts +4 -5
- package/dist/docx/metafileSvg.d.ts +2 -3
- package/dist/docx/metafileSvg.js +28 -39
- package/dist/docx/metafileSvgShared.d.ts +27 -0
- package/dist/docx/metafileSvgShared.js +28 -0
- package/dist/docx/modelValidation.d.ts +5 -6
- package/dist/docx/modelValidation.js +144 -1
- package/dist/docx/newImage.d.ts +2 -3
- package/dist/docx/nonVisualDrawingProps.d.ts +3 -3
- package/dist/docx/normalizeBaseDirection.d.ts +2 -3
- package/dist/docx/normalizeBaseDirection.js +6 -2
- package/dist/docx/noteIds.d.ts +2 -3
- package/dist/docx/notePropertiesParser.d.ts +3 -4
- package/dist/docx/noteReferenceMark.d.ts +6 -6
- package/dist/docx/noteReferenceStyles.d.ts +7 -8
- package/dist/docx/noteReferenceStyles.js +0 -13
- package/dist/docx/numberingIds.d.ts +3 -3
- package/dist/docx/numberingParser.d.ts +15 -16
- package/dist/docx/numberingParser.js +6 -30
- package/dist/docx/numberingReference.d.ts +2 -2
- package/dist/docx/numberingReferenceNormalization.d.ts +5 -5
- package/dist/docx/numberingReferenceNormalization.js +6 -9
- package/dist/docx/numericIdAllocator.d.ts +2 -2
- package/dist/docx/numericIdNormalization.d.ts +3 -3
- package/dist/docx/numericIdNormalization.js +0 -1
- package/dist/docx/ooxmlCounterFormatter.d.ts +3 -4
- package/dist/docx/opaqueCarrier.d.ts +5 -6
- package/dist/docx/packageParts.d.ts +8 -9
- package/dist/docx/paraIdAttribute.d.ts +11 -12
- package/dist/docx/paraIdRangeNormalization.d.ts +3 -4
- package/dist/docx/paragraphMarkPropertyPresence.d.ts +4 -5
- package/dist/docx/paragraphParser.d.ts +9 -9
- package/dist/docx/paragraphParser.js +45 -23
- package/dist/docx/paragraphProperties.d.ts +2 -3
- package/dist/docx/paragraphProperties.js +15 -2
- package/dist/docx/paragraphPropertySource.d.ts +56 -56
- package/dist/docx/paragraphPropertySource.js +37 -1
- package/dist/docx/paragraphTextBoxEnrichment.d.ts +2 -3
- package/dist/docx/paragraphTextBoxEnrichment.js +21 -6
- package/dist/docx/paragraphTraversal.d.ts +19 -10
- package/dist/docx/paragraphTraversal.js +110 -75
- package/dist/docx/parseContext.d.ts +5 -6
- package/dist/docx/parseWarningMessage.d.ts +3 -4
- package/dist/docx/parser.d.ts +11 -11
- package/dist/docx/parser.js +43 -15
- package/dist/docx/parserEnums.d.ts +37 -38
- package/dist/docx/preservedRunContent.d.ts +5 -6
- package/dist/docx/preservedRunContent.js +16 -0
- package/dist/docx/previewBudget.d.ts +6 -6
- package/dist/docx/previewBudget.js +1 -1
- package/dist/docx/propertyElementAttributes.d.ts +10 -11
- package/dist/docx/rasterMime.d.ts +4 -4
- package/dist/docx/relsParser.d.ts +20 -21
- package/dist/docx/removeHeaderFooterParts.d.ts +2 -2
- package/dist/docx/renderedPageBreakNormalization.d.ts +2 -2
- package/dist/docx/replyToComment.d.ts +4 -5
- package/dist/docx/replyToComment.js +2 -1
- package/dist/docx/reviewHistoryNamespace.d.ts +2 -3
- package/dist/docx/reviewResolutionProvenance.d.ts +15 -12
- package/dist/docx/reviewResolutionProvenance.js +15 -4
- package/dist/docx/revisionIdNormalization.d.ts +4 -4
- package/dist/docx/rezip.d.ts +40 -40
- package/dist/docx/rezip.js +113 -123
- package/dist/docx/runConsolidator.d.ts +7 -7
- package/dist/docx/runConsolidator.js +13 -0
- package/dist/docx/runParser.d.ts +12 -13
- package/dist/docx/runParser.js +31 -10
- package/dist/docx/runPayload.d.ts +2 -3
- package/dist/docx/runPropertyPresence.d.ts +7 -8
- package/dist/docx/saveDiagnostics.d.ts +3 -4
- package/dist/docx/sdtProperties.d.ts +6 -7
- package/dist/docx/sdtPropertiesPatch.d.ts +2 -3
- package/dist/docx/sectionParser.d.ts +15 -16
- package/dist/docx/sectionReferenceHistory.d.ts +6 -6
- package/dist/docx/selectedXmlIdentityScan.d.ts +2 -3
- package/dist/docx/selectiveSave.d.ts +3 -4
- package/dist/docx/selectiveSave.js +6 -3
- package/dist/docx/selectiveSaveFlags.d.ts +5 -6
- package/dist/docx/selectiveSaveFlags.js +1 -1
- package/dist/docx/selectiveSaveTripwire.d.ts +3 -4
- package/dist/docx/selectiveXmlPatch.d.ts +28 -28
- package/dist/docx/serializer/blockCustomXmlSerializer.d.ts +2 -3
- package/dist/docx/serializer/blockSdtSerializer.d.ts +2 -3
- package/dist/docx/serializer/blockSdtSerializer.js +2 -1
- package/dist/docx/serializer/borderSerializer.d.ts +2 -2
- package/dist/docx/serializer/borderSerializer.js +8 -0
- package/dist/docx/serializer/commentSerializer.d.ts +7 -8
- package/dist/docx/serializer/documentSerializer.d.ts +13 -14
- package/dist/docx/serializer/documentSerializer.js +17 -1
- package/dist/docx/serializer/fontTableSerializer.d.ts +2 -3
- package/dist/docx/serializer/groupTextBoxWriteBack.d.ts +2 -2
- package/dist/docx/serializer/groupTextBoxWriteBack.js +1 -4
- package/dist/docx/serializer/headerFooterSerializer.d.ts +2 -2
- package/dist/docx/serializer/headerFooterSerializer.js +5 -1
- package/dist/docx/serializer/markupRangeAttributes.d.ts +11 -6
- package/dist/docx/serializer/markupRangeAttributes.js +33 -6
- package/dist/docx/serializer/noteSerializer.d.ts +5 -6
- package/dist/docx/serializer/noteSerializer.js +26 -1
- package/dist/docx/serializer/numberingSerializer.d.ts +2 -3
- package/dist/docx/serializer/numberingSerializer.js +14 -0
- package/dist/docx/serializer/paragraphSerializer.d.ts +8 -9
- package/dist/docx/serializer/paragraphSerializer.js +27 -17
- package/dist/docx/serializer/partNamespaces.d.ts +9 -9
- package/dist/docx/serializer/runSerializer.d.ts +11 -12
- package/dist/docx/serializer/runSerializer.js +7 -2
- package/dist/docx/serializer/sdtPropertiesSerializer.d.ts +5 -6
- package/dist/docx/serializer/sectionPropertiesSerializer.d.ts +2 -3
- package/dist/docx/serializer/settingsSerializer.d.ts +2 -3
- package/dist/docx/serializer/settingsSerializer.js +9 -6
- package/dist/docx/serializer/stylesSerializer.d.ts +3 -4
- package/dist/docx/serializer/stylesSerializer.js +4 -1
- package/dist/docx/serializer/tableSerializer.d.ts +18 -18
- package/dist/docx/serializer/tableSerializer.js +22 -2
- package/dist/docx/serializer/textFormattingSerializer.d.ts +3 -3
- package/dist/docx/serializer/themeSerializer.d.ts +2 -3
- package/dist/docx/serializer/trackedChangeAttributes.d.ts +4 -4
- package/dist/docx/serializer/xmlUtils.d.ts +3 -4
- package/dist/docx/server/applyDocxXmlPatchProposal.d.ts +9 -9
- package/dist/docx/server/applyDocxXmlPatchProposal.js +1 -1
- package/dist/docx/server/boundedArchive.d.ts +11 -11
- package/dist/docx/server/boundedArchive.js +3 -3
- package/dist/docx/server/build.d.ts +14 -14
- package/dist/docx/server/build.js +9 -6
- package/dist/docx/server/createBilingualDocument.d.ts +13 -13
- package/dist/docx/server/createBilingualDocument.js +56 -21
- package/dist/docx/server/createBilingualDocx.d.ts +5 -6
- package/dist/docx/server/createBilingualDocx.js +7 -3
- package/dist/docx/server/docxToMarkdown.d.ts +2 -3
- package/dist/docx/server/docxToMarkdown.js +2 -1
- package/dist/docx/server/evaluateDocxXmlPatchProposal.d.ts +17 -17
- package/dist/docx/server/evaluateDocxXmlPatchProposal.js +2 -2
- package/dist/docx/server/extractDocxText.d.ts +10 -11
- package/dist/docx/server/extractDocxText.js +3 -2
- package/dist/docx/server/inspectDocxPackage.d.ts +14 -14
- package/dist/docx/server/inspectDocxPackage.js +3 -3
- package/dist/docx/server/materializeYjsDocx.d.ts +8 -8
- package/dist/docx/server/materializeYjsDocx.js +1 -1
- package/dist/docx/server/migrateYjsAttrSchema.d.ts +6 -6
- package/dist/docx/server/migrateYjsAttrSchema.js +3 -3
- package/dist/docx/server/validateDocxConformance.d.ts +14 -15
- package/dist/docx/settingsHeaderFooterUpdate.d.ts +2 -3
- package/dist/docx/settingsParser.d.ts +2 -2
- package/dist/docx/settingsParser.js +12 -0
- package/dist/docx/shadingParser.d.ts +2 -3
- package/dist/docx/shapeAlternateContent.d.ts +8 -7
- package/dist/docx/shapeAlternateContent.js +84 -9
- package/dist/docx/shapeParser.d.ts +4 -5
- package/dist/docx/shapeParser.js +2 -1
- package/dist/docx/storyBlockReplay.d.ts +5 -5
- package/dist/docx/storyBlockReplay.js +10 -2
- package/dist/docx/storyPlainText.d.ts +9 -10
- package/dist/docx/streamingXmlParser.d.ts +8 -8
- package/dist/docx/strictNames.d.ts +4 -5
- package/dist/docx/strictNames.gen.d.ts +6 -7
- package/dist/docx/strictValueEncodings.gen.d.ts +5 -6
- package/dist/docx/structuralXmlPatch.d.ts +2 -2
- package/dist/docx/styleParser.d.ts +11 -12
- package/dist/docx/styleParser.js +1 -3
- package/dist/docx/styleReferenceResolution.d.ts +3 -4
- package/dist/docx/tableLook.d.ts +7 -7
- package/dist/docx/tableParser.d.ts +47 -39
- package/dist/docx/tableParser.js +2 -4
- package/dist/docx/tableRowPropertyPresence.d.ts +5 -6
- package/dist/docx/textBoxParser.d.ts +25 -26
- package/dist/docx/textBoxParser.js +18 -19
- package/dist/docx/themeColorAttribute.d.ts +3 -4
- package/dist/docx/themeParser.d.ts +9 -10
- package/dist/docx/trackedChangeInfo.d.ts +5 -6
- package/dist/docx/trackedMoveRangeNormalization.d.ts +3 -3
- package/dist/docx/trackedMoveRangeNormalization.js +52 -21
- package/dist/docx/transitionalSpelling.d.ts +7 -8
- package/dist/docx/universalMeasure.d.ts +5 -6
- package/dist/docx/unzip.d.ts +15 -16
- package/dist/docx/unzip.js +2 -2
- package/dist/docx/verbatimCapture.d.ts +6 -6
- package/dist/docx/verbatimCapture.js +3 -2
- package/dist/docx/verticalMergeProjection.d.ts +4 -5
- package/dist/docx/verticalMergeProjection.js +1 -1
- package/dist/docx/vmlImageParser.d.ts +4 -5
- package/dist/docx/vmlPreview.d.ts +9 -10
- package/dist/docx/vmlPreview.js +0 -3
- package/dist/docx/watermarkParser.d.ts +4 -5
- package/dist/docx/wmfSvg.d.ts +10 -0
- package/dist/docx/wmfSvg.js +451 -0
- package/dist/docx/wordprocessingPrefixes.d.ts +12 -13
- package/dist/docx/wrapPolygon.d.ts +5 -6
- package/dist/docx/wrapTypes.js +1 -2
- package/dist/docx/xmlEncoding.d.ts +2 -3
- package/dist/docx/xmlNamespaceContext.d.ts +5 -6
- package/dist/docx/xmlParser.d.ts +49 -50
- package/dist/docx/xmlParser.js +12 -12
- package/dist/docx/xmlResourceLimits.d.ts +10 -10
- package/dist/docx/xmlResourceLimits.js +1 -1
- package/dist/docx/xmlSafety.d.ts +3 -4
- package/dist/export-pdf.d.ts +11 -11
- package/dist/export-pdf.js +2 -1
- package/dist/fields/bookmarkPages.d.ts +2 -3
- package/dist/fields/bookmarkText.d.ts +2 -2
- package/dist/fields/bookmarkText.js +3 -2
- package/dist/fields/evaluateField.d.ts +3 -3
- package/dist/fields/fieldContext.d.ts +2 -3
- package/dist/fields/resolveFieldValues.d.ts +7 -8
- package/dist/fields/sectionPageCounts.d.ts +2 -3
- package/dist/fields/seqValues.d.ts +2 -3
- package/dist/fonts/FontFaceLifecycle.d.ts +12 -0
- package/dist/fonts/FontFaceLifecycle.js +56 -0
- package/dist/fonts/documentFontFacts.d.ts +17 -0
- package/dist/fonts/documentFontFacts.js +41 -0
- package/dist/fonts/embeddedFontFingerprint.d.ts +2 -3
- package/dist/fonts/embeddedFontFingerprint.js +3 -2
- package/dist/fonts/embeddedFonts.d.ts +7 -8
- package/dist/fonts/fontAlternates.d.ts +4 -5
- package/dist/fonts/fontAlternates.js +2 -1
- package/dist/fonts/fontDeobfuscation.d.ts +3 -4
- package/dist/fonts/fontDeobfuscation.js +7 -3
- package/dist/fonts/fontsourceFaces.d.ts +7 -8
- package/dist/fonts/fontsourceFaces.js +16 -0
- package/dist/fonts/headlessMeasure.d.ts +10 -10
- package/dist/fonts/sfnt/parse.d.ts +5 -5
- package/dist/fonts/sfnt/parse.js +2 -1
- package/dist/fonts/sfnt/subset.d.ts +4 -4
- package/dist/fonts/sfnt/tables.d.ts +14 -14
- package/dist/fonts/sfnt/woff.d.ts +4 -4
- package/dist/headless-layout.d.ts +7 -7
- package/dist/headless-layout.js +7 -0
- package/dist/i18n/messages/ar.gen.d.ts +2 -2
- package/dist/i18n/messages/catalogs.gen.d.ts +2 -3
- package/dist/i18n/messages/cs.gen.d.ts +2 -2
- package/dist/i18n/messages/de.gen.d.ts +2 -2
- package/dist/i18n/messages/en.gen.d.ts +2 -2
- package/dist/i18n/messages/es.gen.d.ts +2 -2
- package/dist/i18n/messages/et.gen.d.ts +2 -2
- package/dist/i18n/messages/fr.gen.d.ts +2 -2
- package/dist/i18n/messages/he.gen.d.ts +2 -2
- package/dist/i18n/messages/hi.gen.d.ts +2 -2
- package/dist/i18n/messages/hu.gen.d.ts +2 -2
- package/dist/i18n/messages/locales.d.ts +3 -4
- package/dist/i18n/messages/lt.gen.d.ts +2 -2
- package/dist/i18n/messages/lv.gen.d.ts +2 -2
- package/dist/i18n/messages/pl.gen.d.ts +2 -2
- package/dist/i18n/messages/pt-BR.gen.d.ts +2 -2
- package/dist/i18n/messages/sk.gen.d.ts +2 -2
- package/dist/i18n/messages/tr.gen.d.ts +2 -2
- package/dist/i18n/messages/zh-CN.gen.d.ts +2 -2
- package/dist/i18n/messages.d.ts +4 -4
- package/dist/internal/acceptedBlockProjection.d.ts +2 -3
- package/dist/internal/acceptedBlockProjection.js +5 -1
- package/dist/internal/compare/inline-presentation.d.ts +4 -4
- package/dist/internal/headlessRevisionResolutionGuard.d.ts +2 -3
- package/dist/internal/indexedPositionMap.d.ts +2 -3
- package/dist/internal/noteMarkerAttrs.d.ts +3 -4
- package/dist/internal/pageBreakRunDescendantIndex.d.ts +3 -4
- package/dist/internal/pageBreakRunPartition.d.ts +4 -4
- package/dist/internal/pageBreakRunSourceDescendantIndex.d.ts +4 -5
- package/dist/internal/pageBreakRunSourceDescendantIndex.js +5 -1
- package/dist/internal/paragraphFormattingSerialization.d.ts +6 -6
- package/dist/internal/paragraphFormattingSerialization.js +3 -1
- package/dist/internal/prosemirrorAttrBoundary.d.ts +9 -10
- package/dist/internal/prosemirrorAttrBoundary.js +2 -1
- package/dist/internal/revisionResolutionEdits.d.ts +2 -2
- package/dist/internal/revisionResolutionInline.d.ts +4 -3
- package/dist/internal/revisionResolutionInline.js +69 -48
- package/dist/internal/revisionResolutionStep.d.ts +3 -3
- package/dist/internal/revisionResolutionTracking.d.ts +2 -2
- package/dist/internal/revisionResolutionTracking.js +3 -3
- package/dist/internal/sectionEndpointResolution.d.ts +5 -5
- package/dist/internal/sectionReferenceResolution.d.ts +6 -7
- package/dist/internal/wholeStoryRevisionResolution.d.ts +6 -4
- package/dist/internal/wholeStoryRevisionResolution.js +168 -52
- package/dist/layout-bridge/cellSelectionHighlight.d.ts +2 -3
- package/dist/layout-bridge/convert/endnoteLayout.d.ts +8 -8
- package/dist/layout-bridge/convert/endnoteLayout.js +2 -1
- package/dist/layout-bridge/convert/fixedTableColumnWidths.d.ts +2 -3
- package/dist/layout-bridge/convert/flowBlockPostprocessing.d.ts +5 -6
- package/dist/layout-bridge/convert/flowBorders.d.ts +3 -4
- package/dist/layout-bridge/convert/flowConversionShared.d.ts +9 -7
- package/dist/layout-bridge/convert/footnoteLayout.d.ts +14 -14
- package/dist/layout-bridge/convert/footnoteLayout.js +10 -0
- package/dist/layout-bridge/convert/headerFooterLayout.d.ts +13 -12
- package/dist/layout-bridge/convert/headerFooterLayout.js +10 -4
- package/dist/layout-bridge/convert/imageConversion.d.ts +6 -7
- package/dist/layout-bridge/convert/listMarkers.d.ts +9 -9
- package/dist/layout-bridge/convert/markupViewFlow.d.ts +3 -3
- package/dist/layout-bridge/convert/noteReferences.d.ts +2 -3
- package/dist/layout-bridge/convert/pageBreakSplitting.d.ts +4 -4
- package/dist/layout-bridge/convert/pageBreakSplitting.js +4 -0
- package/dist/layout-bridge/convert/paragraphAttrs.d.ts +2 -2
- package/dist/layout-bridge/convert/paragraphAttrs.js +18 -11
- package/dist/layout-bridge/convert/paragraphConversion.d.ts +4 -5
- package/dist/layout-bridge/convert/paragraphConversion.js +9 -2
- package/dist/layout-bridge/convert/paragraphFrames.d.ts +2 -2
- package/dist/layout-bridge/convert/paragraphFrames.js +1 -1
- package/dist/layout-bridge/convert/paragraphMarkFormatting.d.ts +3 -4
- package/dist/layout-bridge/convert/paragraphRuns.d.ts +3 -4
- package/dist/layout-bridge/convert/paragraphRuns.js +35 -14
- package/dist/layout-bridge/convert/runFormattingMerge.d.ts +5 -5
- package/dist/layout-bridge/convert/runFormattingMerge.js +1 -0
- package/dist/layout-bridge/convert/runMarkFormatting.d.ts +2 -3
- package/dist/layout-bridge/convert/runMarkFormatting.js +12 -4
- package/dist/layout-bridge/convert/sectionBoundaries.d.ts +6 -6
- package/dist/layout-bridge/convert/tableConversion.d.ts +3 -4
- package/dist/layout-bridge/convert/tableConversion.js +1 -1
- package/dist/layout-bridge/convert/templatePreviewFlow.d.ts +6 -7
- package/dist/layout-bridge/convert/textBoxFill.d.ts +3 -4
- package/dist/layout-bridge/convert/textFormattingConversion.d.ts +8 -7
- package/dist/layout-bridge/convert/textFormattingConversion.js +10 -1
- package/dist/layout-bridge/convert/toFlowBlocks.d.ts +3 -3
- package/dist/layout-bridge/convert/toFlowBlocks.js +19 -11
- package/dist/layout-bridge/convert/wrapEditorViewAsSurface.d.ts +3 -4
- package/dist/layout-bridge/dom/clickToPositionDom.d.ts +12 -13
- package/dist/layout-bridge/dom/clickToPositionDom.js +30 -4
- package/dist/layout-bridge/dom/findBodyPmSpans.d.ts +5 -6
- package/dist/layout-bridge/dom/findHfPmSpans.d.ts +10 -11
- package/dist/layout-bridge/dom/imeCaretAnchor.d.ts +3 -3
- package/dist/layout-bridge/dom/noteStoryDom.d.ts +2 -3
- package/dist/layout-bridge/dom/textStreamDom.d.ts +16 -9
- package/dist/layout-bridge/dom/textStreamDom.js +18 -3
- package/dist/layout-bridge/engine/clickToPosition.d.ts +8 -9
- package/dist/layout-bridge/engine/clickToPosition.js +77 -94
- package/dist/layout-bridge/engine/hitTest.d.ts +18 -19
- package/dist/layout-bridge/engine/hitTest.js +2 -1
- package/dist/layout-bridge/engine/linePmRange.d.ts +7 -0
- package/dist/layout-bridge/engine/linePmRange.js +34 -0
- package/dist/layout-bridge/engine/selectionRects.d.ts +7 -8
- package/dist/layout-bridge/engine/selectionRects.js +53 -77
- package/dist/layout-bridge/headerFooterLayout.d.ts +4 -5
- package/dist/layout-bridge/measuring/measureBlocksPipeline.d.ts +2 -3
- package/dist/layout-bridge/sectionColumns.d.ts +2 -3
- package/dist/layout-bridge/tableInsertHover.d.ts +6 -7
- package/dist/layout-engine/anchorLayoutInCellCompatibility.d.ts +2 -3
- package/dist/layout-engine/footnoteColumnReflow.d.ts +2 -2
- package/dist/layout-engine/headerFooterRefs.d.ts +2 -3
- package/dist/layout-engine/imageLayout.d.ts +2 -3
- package/dist/layout-engine/index.d.ts +3 -3
- package/dist/layout-engine/index.js +9 -6
- package/dist/layout-engine/justificationCompatibility.d.ts +2 -3
- package/dist/layout-engine/keep-together.d.ts +7 -8
- package/dist/layout-engine/keep-together.js +1 -1
- package/dist/layout-engine/layoutFlowShared.d.ts +3 -4
- package/dist/layout-engine/layoutInstrumentation.d.ts +18 -19
- package/dist/layout-engine/lineFlow.d.ts +4 -5
- package/dist/layout-engine/measure/advanceComposition.d.ts +8 -8
- package/dist/layout-engine/measure/advanceComposition.js +24 -5
- package/dist/layout-engine/measure/automaticTextSpacing.d.ts +36 -0
- package/dist/layout-engine/measure/automaticTextSpacing.js +178 -0
- package/dist/layout-engine/measure/cache.d.ts +22 -22
- package/dist/layout-engine/measure/cache.js +50 -14
- package/dist/layout-engine/measure/clampFloatingWrapMargins.d.ts +2 -3
- package/dist/layout-engine/measure/complexScriptFormatting.d.ts +5 -5
- package/dist/layout-engine/measure/crossRunWords.d.ts +8 -8
- package/dist/layout-engine/measure/crossRunWords.js +9 -4
- package/dist/layout-engine/measure/effectiveLineBreakPolicy.d.ts +3 -3
- package/dist/layout-engine/measure/effectiveLineBreakPolicy.js +3 -1
- package/dist/layout-engine/measure/featureFlags.d.ts +4 -5
- package/dist/layout-engine/measure/floatingLineClearance.d.ts +3 -4
- package/dist/layout-engine/measure/floatingTablePosition.d.ts +3 -3
- package/dist/layout-engine/measure/floatingZones.d.ts +11 -10
- package/dist/layout-engine/measure/font-metrics.worker.d.ts +3 -4
- package/dist/layout-engine/measure/hyperlinkInstance.d.ts +3 -4
- package/dist/layout-engine/measure/hyphenationDictionaries.d.ts +15 -15
- package/dist/layout-engine/measure/hyphenationDictionaries.js +4 -4
- package/dist/layout-engine/measure/hyphenationPreload.d.ts +2 -3
- package/dist/layout-engine/measure/inlineObjectMetrics.d.ts +3 -4
- package/dist/layout-engine/measure/justification.d.ts +7 -7
- package/dist/layout-engine/measure/lineBreakProvider.d.ts +16 -11
- package/dist/layout-engine/measure/lineBreakProvider.js +29 -4
- package/dist/layout-engine/measure/lineBreaks.d.ts +7 -8
- package/dist/layout-engine/measure/lineBreaks.js +5 -2
- package/dist/layout-engine/measure/lineFitting.d.ts +11 -11
- package/dist/layout-engine/measure/lineFitting.js +17 -6
- package/dist/layout-engine/measure/lineTypography.d.ts +7 -8
- package/dist/layout-engine/measure/lineTypography.js +1 -0
- package/dist/layout-engine/measure/listMarkerWidth.d.ts +9 -6
- package/dist/layout-engine/measure/listMarkerWidth.js +7 -3
- package/dist/layout-engine/measure/measureBlocks.d.ts +7 -7
- package/dist/layout-engine/measure/measureBlocks.js +13 -7
- package/dist/layout-engine/measure/measureContainer.d.ts +5 -6
- package/dist/layout-engine/measure/measureContainer.js +27 -6
- package/dist/layout-engine/measure/measureHelpers.d.ts +21 -18
- package/dist/layout-engine/measure/measureHelpers.js +12 -3
- package/dist/layout-engine/measure/measureParagraph.d.ts +5 -5
- package/dist/layout-engine/measure/measureParagraph.js +57 -11
- package/dist/layout-engine/measure/measureProvider.d.ts +15 -9
- package/dist/layout-engine/measure/measureProvider.js +66 -4
- package/dist/layout-engine/measure/measureTypes.d.ts +17 -14
- package/dist/layout-engine/measure/measureWorker.d.ts +8 -8
- package/dist/layout-engine/measure/measureWorkerProtocol.d.ts +6 -7
- package/dist/layout-engine/measure/paragraphMeasureShared.d.ts +19 -20
- package/dist/layout-engine/measure/paragraphTabs.d.ts +6 -7
- package/dist/layout-engine/measure/paragraphTabs.js +16 -17
- package/dist/layout-engine/measure/smallCapsCasing.d.ts +6 -7
- package/dist/layout-engine/measure/tabCalculator.d.ts +15 -16
- package/dist/layout-engine/measure/tableCellFloating.d.ts +6 -6
- package/dist/layout-engine/measure/tableCellFlow.d.ts +7 -7
- package/dist/layout-engine/measure/tableCellGrid.d.ts +14 -14
- package/dist/layout-engine/measure/tableFragmentBorderGeometry.d.ts +2 -2
- package/dist/layout-engine/measure/tableInlinePlacement.d.ts +3 -3
- package/dist/layout-engine/measure/textBoxParagraphLayout.d.ts +4 -4
- package/dist/layout-engine/measure/textMeasurementPolicy.d.ts +8 -8
- package/dist/layout-engine/noColumnBalanceCompatibility.d.ts +7 -0
- package/dist/layout-engine/noColumnBalanceCompatibility.js +5 -0
- package/dist/layout-engine/noteAreaFlow.d.ts +4 -5
- package/dist/layout-engine/paginator.d.ts +18 -11
- package/dist/layout-engine/paginator.js +51 -11
- package/dist/layout-engine/paragraphFragmentRange.d.ts +2 -3
- package/dist/layout-engine/paragraphFrame.d.ts +2 -21
- package/dist/layout-engine/paragraphFrame.js +1 -17
- package/dist/layout-engine/paragraphLayout.d.ts +2 -2
- package/dist/layout-engine/paragraphLayout.js +28 -9
- package/dist/layout-engine/paragraphSequence.d.ts +3 -4
- package/dist/layout-engine/paragraphSpacing.d.ts +10 -10
- package/dist/layout-engine/pmPageIndex.d.ts +3 -4
- package/dist/layout-engine/renderedBreakReconciliation.d.ts +7 -7
- package/dist/layout-engine/section-breaks.d.ts +15 -15
- package/dist/layout-engine/sectionLayout.d.ts +7 -7
- package/dist/layout-engine/sectionLayout.js +1 -4
- package/dist/layout-engine/sectionVerticalAlignment.d.ts +2 -3
- package/dist/layout-engine/tableIndentCompatibility.d.ts +2 -3
- package/dist/layout-engine/tableLayout.d.ts +4 -5
- package/dist/layout-engine/tableLayout.js +17 -9
- package/dist/layout-engine/tableRowBreak.d.ts +6 -6
- package/dist/layout-engine/tableRowBreak.js +10 -5
- package/dist/layout-engine/textBoxFlow.d.ts +6 -6
- package/dist/layout-engine/textBoxGroup.d.ts +3 -4
- package/dist/layout-engine/textBoxLayout.d.ts +2 -2
- package/dist/layout-engine/types.d.ts +108 -88
- package/dist/layout-painter/anchoredImagePosition.d.ts +4 -5
- package/dist/layout-painter/borderStroke.d.ts +4 -4
- package/dist/layout-painter/cursiveJoiners.d.ts +7 -7
- package/dist/layout-painter/documentColors.d.ts +6 -7
- package/dist/layout-painter/imageLayout.d.ts +13 -14
- package/dist/layout-painter/index.d.ts +8 -7
- package/dist/layout-painter/index.js +7 -2
- package/dist/layout-painter/registry/modules/image.d.ts +2 -3
- package/dist/layout-painter/registry/modules/paragraph.d.ts +2 -3
- package/dist/layout-painter/registry/modules/table.d.ts +2 -3
- package/dist/layout-painter/registry/modules/textBox.d.ts +2 -3
- package/dist/layout-painter/registry/modules.d.ts +2 -3
- package/dist/layout-painter/registry/registry.d.ts +4 -5
- package/dist/layout-painter/registry/types.d.ts +8 -9
- package/dist/layout-painter/renderFragment.d.ts +4 -5
- package/dist/layout-painter/renderImage.d.ts +12 -13
- package/dist/layout-painter/renderPage.d.ts +27 -25
- package/dist/layout-painter/renderPage.js +116 -31
- package/dist/layout-painter/renderParagraph.d.ts +19 -15
- package/dist/layout-painter/renderParagraph.js +186 -46
- package/dist/layout-painter/renderTable.d.ts +7 -8
- package/dist/layout-painter/renderTable.js +27 -15
- package/dist/layout-painter/renderTextBox.d.ts +5 -6
- package/dist/layout-painter/renderTextBox.js +9 -1
- package/dist/layout-painter/renderUtils.d.ts +11 -14
- package/dist/layout-painter/renderUtils.js +1 -19
- package/dist/layout-painter/renderWatermark.d.ts +5 -4
- package/dist/layout-painter/sdtBoundary.d.ts +4 -5
- package/dist/layout-painter/tableRowPaintGeometry.d.ts +2 -2
- package/dist/managers/AutoSaveManager.d.ts +11 -12
- package/dist/managers/AutoSaveManager.js +17 -3
- package/dist/managers/ClipboardManager.d.ts +7 -8
- package/dist/managers/ContextMenuManager.d.ts +3 -4
- package/dist/managers/DocumentLoaderManager.d.ts +5 -6
- package/dist/managers/EditorModeManager.d.ts +12 -12
- package/dist/managers/ErrorManager.d.ts +2 -3
- package/dist/managers/FindReplaceManager.d.ts +6 -6
- package/dist/managers/HistoryManager.d.ts +9 -10
- package/dist/managers/Subscribable.d.ts +2 -3
- package/dist/managers/TableSelectionManager.d.ts +9 -10
- package/dist/managers/TableSelectionManager.js +3 -13
- package/dist/managers/autoSaveCodec.d.ts +8 -9
- package/dist/managers/editorShortcuts.d.ts +14 -15
- package/dist/managers/reviewDisplayMode.d.ts +4 -5
- package/dist/managers/types.d.ts +7 -8
- package/dist/markdown/annotations.d.ts +6 -7
- package/dist/markdown/escape.d.ts +6 -7
- package/dist/markdown/fromMarkdown.d.ts +2 -3
- package/dist/markdown/images.d.ts +2 -3
- package/dist/markdown/index.d.ts +3 -3
- package/dist/markdown/index.js +28 -2
- package/dist/markdown/internals.d.ts +4 -5
- package/dist/markdown/internals.js +3 -2
- package/dist/markdown/renderBlock.d.ts +2 -3
- package/dist/markdown/renderBlock.js +5 -1
- package/dist/markdown/renderParagraph.d.ts +4 -5
- package/dist/markdown/renderParagraph.js +42 -17
- package/dist/markdown/renderRuns.d.ts +3 -3
- package/dist/markdown/renderRuns.js +15 -10
- package/dist/markdown/renderTable.d.ts +2 -3
- package/dist/markdown/renderTable.js +21 -8
- package/dist/markdown/trailers.d.ts +2 -3
- package/dist/markdown/types.d.ts +7 -8
- package/dist/model.d.ts +1 -1
- package/dist/paged-layout/LayoutSelectionGate.d.ts +2 -2
- package/dist/paged-layout/blockGeometry.d.ts +5 -6
- package/dist/paged-layout/editorScrollRoot.d.ts +5 -5
- package/dist/paged-layout/fitWidthZoom.d.ts +36 -0
- package/dist/paged-layout/fitWidthZoom.js +31 -0
- package/dist/paged-layout/hiddenEditorScroll.d.ts +2 -3
- package/dist/paged-layout/incrementalMeasure.d.ts +6 -7
- package/dist/paged-layout/pageText.d.ts +2 -2
- package/dist/paged-layout/paragraphFlash.d.ts +7 -7
- package/dist/paged-layout/paragraphFlashTypes.d.ts +3 -4
- package/dist/paged-layout/rangeProjection.d.ts +11 -12
- package/dist/paged-layout/readOnlyEditAttempt.d.ts +2 -2
- package/dist/paged-layout/scrollNavigation.d.ts +5 -6
- package/dist/paged-layout/scrollPageInfo.d.ts +5 -6
- package/dist/paged-layout/scrollToPmPosition.d.ts +4 -5
- package/dist/paged-layout/sectionBlockWidths.d.ts +3 -3
- package/dist/paged-layout/sectionBlockWidths.js +0 -3
- package/dist/paged-layout/sectionGeometry.d.ts +10 -11
- package/dist/paged-layout/selectionViewportRect.d.ts +5 -6
- package/dist/paged-layout/tableColumnResize.d.ts +2 -3
- package/dist/paged-layout/tableInsertButtonGeometry.d.ts +2 -3
- package/dist/paged-layout/transactionDirtyRange.d.ts +2 -3
- package/dist/paged-layout/zoomScrollAnchor.d.ts +5 -5
- package/dist/panel-layout.d.ts +11 -12
- package/dist/pdf/contentStream.d.ts +11 -12
- package/dist/pdf/fonts.d.ts +11 -11
- package/dist/pdf/fonts.js +0 -19
- package/dist/pdf/images.d.ts +5 -5
- package/dist/pdf/images.js +4 -1
- package/dist/pdf/objects.d.ts +23 -24
- package/dist/pdf/pageSpace.d.ts +9 -10
- package/dist/pdf/paint.d.ts +6 -6
- package/dist/pdf/paint.js +28 -1
- package/dist/pdf/writePdf.d.ts +6 -6
- package/dist/prosemirror/addTrackedDeletionMark.d.ts +2 -2
- package/dist/prosemirror/alternateContentAttrs.d.ts +5 -4
- package/dist/prosemirror/alternateContentAttrs.js +13 -3
- package/dist/prosemirror/anchoredTextBoxes.d.ts +10 -11
- package/dist/prosemirror/attrs/index.d.ts +86 -86
- package/dist/prosemirror/attrs/index.js +127 -99
- package/dist/prosemirror/authoredTransformAttrs.d.ts +3 -3
- package/dist/prosemirror/autospacingBase.d.ts +5 -5
- package/dist/prosemirror/bookmarkBoundaryAttrs.d.ts +7 -7
- package/dist/prosemirror/bookmarkBoundaryAttrs.js +31 -2
- package/dist/prosemirror/bookmarkBoundaryIntegrity.d.ts +3 -4
- package/dist/prosemirror/canonicalCommands.d.ts +30 -13
- package/dist/prosemirror/canonicalCommands.js +5 -4
- package/dist/prosemirror/canonicalSelectionRange.d.ts +14 -4
- package/dist/prosemirror/canonicalSelectionRange.js +20 -1
- package/dist/prosemirror/cellDragSelection.d.ts +6 -7
- package/dist/prosemirror/cellDragSelection.js +9 -0
- package/dist/prosemirror/clearRunColor.d.ts +2 -3
- package/dist/prosemirror/clearRunColor.js +8 -5
- package/dist/prosemirror/clipboardIntent.d.ts +3 -4
- package/dist/prosemirror/commands/clearParagraphIndent.d.ts +2 -3
- package/dist/prosemirror/commands/comments.d.ts +28 -28
- package/dist/prosemirror/commands/comments.js +220 -83
- package/dist/prosemirror/commands/contentControls.d.ts +9 -9
- package/dist/prosemirror/commands/contentControls.js +2 -1
- package/dist/prosemirror/commands/contentControlsBlockFill.d.ts +2 -3
- package/dist/prosemirror/commands/contentControlsBlockFill.js +2 -1
- package/dist/prosemirror/commands/formatPainter.d.ts +5 -5
- package/dist/prosemirror/commands/formatPainter.js +14 -11
- package/dist/prosemirror/commands/formatting.d.ts +20 -20
- package/dist/prosemirror/commands/hyperlink.d.ts +5 -6
- package/dist/prosemirror/commands/hyperlink.js +7 -6
- package/dist/prosemirror/commands/image.d.ts +14 -14
- package/dist/prosemirror/commands/pageBreak.d.ts +2 -3
- package/dist/prosemirror/commands/pageBreak.js +2 -1
- package/dist/prosemirror/commands/paragraph.d.ts +35 -35
- package/dist/prosemirror/commands/paragraphBookmarkJoin.d.ts +5 -5
- package/dist/prosemirror/commands/paragraphBookmarkJoin.js +4 -7
- package/dist/prosemirror/commands/pastePlainText.d.ts +4 -5
- package/dist/prosemirror/commands/propertyChangeScope.d.ts +13 -13
- package/dist/prosemirror/commands/propertyChangeScope.js +2 -0
- package/dist/prosemirror/commands/resolveAllTableChanges.d.ts +3 -3
- package/dist/prosemirror/commands/resolveNodePropertyChangeAttrs.d.ts +3 -3
- package/dist/prosemirror/commands/resolveParagraphProperties.d.ts +3 -3
- package/dist/prosemirror/commands/resolveParagraphProperties.js +1 -1
- package/dist/prosemirror/commands/sectionBreak.d.ts +9 -8
- package/dist/prosemirror/commands/sectionBreak.js +14 -1
- package/dist/prosemirror/commands/table.d.ts +34 -34
- package/dist/prosemirror/commands/tableCellMergeResolution.d.ts +8 -8
- package/dist/prosemirror/commands/tableCellMergeResolution.js +3 -2
- package/dist/prosemirror/commands/tableMergeFoldDecisions.d.ts +4 -4
- package/dist/prosemirror/commentBoundaryOwnership.d.ts +15 -0
- package/dist/prosemirror/commentBoundaryOwnership.js +4 -0
- package/dist/prosemirror/commentIdAllocator.d.ts +8 -8
- package/dist/prosemirror/commentIdAllocator.js +2 -0
- package/dist/prosemirror/commentOps.d.ts +6 -7
- package/dist/prosemirror/commentOps.js +3 -19
- package/dist/prosemirror/commentRangeBoundaryAttrs.d.ts +16 -0
- package/dist/prosemirror/commentRangeBoundaryAttrs.js +51 -0
- package/dist/prosemirror/commentRangeInlineAtoms.d.ts +5 -5
- package/dist/prosemirror/commentRangeInlineAtoms.js +1 -0
- package/dist/prosemirror/commentReferenceAttrs.d.ts +3 -4
- package/dist/prosemirror/commentReferenceAttrs.js +4 -1
- package/dist/prosemirror/commentReferenceIntegrity.d.ts +15 -6
- package/dist/prosemirror/commentReferenceIntegrity.js +93 -1
- package/dist/prosemirror/containerFinalParagraph.d.ts +4 -4
- package/dist/prosemirror/contentControlRevisions.d.ts +7 -7
- package/dist/prosemirror/conversion/effectiveTableCellFormatting.d.ts +4 -4
- package/dist/prosemirror/conversion/fromProseDoc.d.ts +10 -10
- package/dist/prosemirror/conversion/fromProseDoc.js +473 -176
- package/dist/prosemirror/conversion/hyphenTextCarriers.d.ts +2 -3
- package/dist/prosemirror/conversion/markInterner.d.ts +2 -3
- package/dist/prosemirror/conversion/preservedSinkCarriers.d.ts +5 -5
- package/dist/prosemirror/conversion/runShadingMark.d.ts +3 -4
- package/dist/prosemirror/conversion/sdtAttrs.d.ts +6 -7
- package/dist/prosemirror/conversion/toProseDoc.d.ts +15 -9
- package/dist/prosemirror/conversion/toProseDoc.js +318 -202
- package/dist/prosemirror/copyOriginDom.d.ts +8 -0
- package/dist/prosemirror/copyOriginDom.js +21 -0
- package/dist/prosemirror/copyOriginResolution.d.ts +15 -0
- package/dist/prosemirror/copyOriginResolution.js +202 -0
- package/dist/prosemirror/documentSchema.d.ts +2 -3
- package/dist/prosemirror/emptyFieldResultRuns.d.ts +3 -3
- package/dist/prosemirror/emptyRangeAnchor.d.ts +6 -6
- package/dist/prosemirror/executeEditorCommand.d.ts +4 -5
- package/dist/prosemirror/extensions/ExtensionManager.d.ts +2 -3
- package/dist/prosemirror/extensions/StarterKit.d.ts +3 -4
- package/dist/prosemirror/extensions/StarterKit.js +5 -1
- package/dist/prosemirror/extensions/core/DocExtension.d.ts +2 -3
- package/dist/prosemirror/extensions/core/DocExtension.js +1 -1
- package/dist/prosemirror/extensions/core/HistoryExtension.d.ts +3 -3
- package/dist/prosemirror/extensions/core/HistoryExtension.js +5 -4
- package/dist/prosemirror/extensions/core/ParagraphExtension.d.ts +8 -9
- package/dist/prosemirror/extensions/core/ParagraphExtension.js +17 -9
- package/dist/prosemirror/extensions/core/TextExtension.d.ts +2 -3
- package/dist/prosemirror/extensions/create.d.ts +4 -5
- package/dist/prosemirror/extensions/features/AutoBidiDetectionExtension.d.ts +4 -5
- package/dist/prosemirror/extensions/features/BaseKeymapExtension.d.ts +3 -4
- package/dist/prosemirror/extensions/features/BidiShortcutExtension.d.ts +2 -3
- package/dist/prosemirror/extensions/features/ContentControlWidgetsExtension.d.ts +2 -3
- package/dist/prosemirror/extensions/features/DropCursorExtension.d.ts +2 -3
- package/dist/prosemirror/extensions/features/EmptyParagraphFormatExtension.d.ts +3 -4
- package/dist/prosemirror/extensions/features/GapCursorExtension.d.ts +2 -3
- package/dist/prosemirror/extensions/features/ImageDragExtension.d.ts +2 -3
- package/dist/prosemirror/extensions/features/ImagePasteExtension.d.ts +2 -3
- package/dist/prosemirror/extensions/features/ImagePasteExtension.js +2 -1
- package/dist/prosemirror/extensions/features/JoinedRunStyleExtension.d.ts +3 -4
- package/dist/prosemirror/extensions/features/ListExtension.d.ts +6 -7
- package/dist/prosemirror/extensions/features/ParaIdAllocatorExtension.d.ts +8 -8
- package/dist/prosemirror/extensions/features/ParaIdAllocatorExtension.js +17 -7
- package/dist/prosemirror/extensions/features/ParagraphChangeTrackerExtension.d.ts +18 -18
- package/dist/prosemirror/extensions/features/ParagraphChangeTrackerExtension.js +2 -1
- package/dist/prosemirror/extensions/features/PasteCleanupExtension.d.ts +2 -2
- package/dist/prosemirror/extensions/features/PasteStyleInlinerExtension.d.ts +6 -3
- package/dist/prosemirror/extensions/features/PasteStyleInlinerExtension.js +5 -2
- package/dist/prosemirror/extensions/features/SelectionTrackerExtension.d.ts +2 -2
- package/dist/prosemirror/extensions/features/SelectionTrackerExtension.js +2 -8
- package/dist/prosemirror/extensions/features/bidiShortcutController.d.ts +5 -6
- package/dist/prosemirror/extensions/features/clipboardTrackedRevisions.d.ts +4 -0
- package/dist/prosemirror/extensions/features/clipboardTrackedRevisions.js +72 -0
- package/dist/prosemirror/extensions/features/pasteCleanup.d.ts +4 -4
- package/dist/prosemirror/extensions/features/pasteCleanup.js +3 -2
- package/dist/prosemirror/extensions/features/pastedHeadingStyles.d.ts +2 -3
- package/dist/prosemirror/extensions/features/pastedHtmlLists.d.ts +3 -4
- package/dist/prosemirror/extensions/markRegistry.d.ts +4 -5
- package/dist/prosemirror/extensions/marks/AllCapsExtension.d.ts +2 -3
- package/dist/prosemirror/extensions/marks/BoldExtension.d.ts +2 -3
- package/dist/prosemirror/extensions/marks/CharacterSpacingExtension.d.ts +2 -3
- package/dist/prosemirror/extensions/marks/CharacterStyleExtension.d.ts +2 -3
- package/dist/prosemirror/extensions/marks/CommentExtension.d.ts +2 -3
- package/dist/prosemirror/extensions/marks/FontFamilyExtension.d.ts +2 -3
- package/dist/prosemirror/extensions/marks/FontFamilyExtension.js +12 -4
- package/dist/prosemirror/extensions/marks/FontSizeExtension.d.ts +2 -3
- package/dist/prosemirror/extensions/marks/FootnoteRefExtension.d.ts +2 -3
- package/dist/prosemirror/extensions/marks/FootnoteRefExtension.js +42 -4
- package/dist/prosemirror/extensions/marks/HiddenTextExtension.d.ts +2 -3
- package/dist/prosemirror/extensions/marks/HighlightExtension.d.ts +4 -4
- package/dist/prosemirror/extensions/marks/HighlightExtension.js +6 -4
- package/dist/prosemirror/extensions/marks/HyperlinkExtension.d.ts +5 -6
- package/dist/prosemirror/extensions/marks/HyperlinkExtension.js +9 -3
- package/dist/prosemirror/extensions/marks/InlineWrapperExtension.d.ts +3 -4
- package/dist/prosemirror/extensions/marks/ItalicExtension.d.ts +2 -3
- package/dist/prosemirror/extensions/marks/LanguageExtension.d.ts +2 -3
- package/dist/prosemirror/extensions/marks/RtlExtension.d.ts +2 -3
- package/dist/prosemirror/extensions/marks/RunFormattingOverrideExtension.d.ts +5 -5
- package/dist/prosemirror/extensions/marks/RunIdentityExtension.d.ts +3 -3
- package/dist/prosemirror/extensions/marks/RunShadingExtension.d.ts +2 -3
- package/dist/prosemirror/extensions/marks/SmallCapsExtension.d.ts +2 -3
- package/dist/prosemirror/extensions/marks/StrikeExtension.d.ts +2 -3
- package/dist/prosemirror/extensions/marks/StrikeExtension.js +9 -3
- package/dist/prosemirror/extensions/marks/SubscriptExtension.d.ts +2 -3
- package/dist/prosemirror/extensions/marks/SubscriptExtension.js +3 -2
- package/dist/prosemirror/extensions/marks/SuperscriptExtension.d.ts +2 -3
- package/dist/prosemirror/extensions/marks/SuperscriptExtension.js +3 -2
- package/dist/prosemirror/extensions/marks/TextColorExtension.d.ts +2 -3
- package/dist/prosemirror/extensions/marks/TextColorExtension.js +7 -6
- package/dist/prosemirror/extensions/marks/TextEffectExtension.d.ts +2 -3
- package/dist/prosemirror/extensions/marks/TextEffectsExtensions.d.ts +6 -7
- package/dist/prosemirror/extensions/marks/TextEffectsExtensions.js +1 -4
- package/dist/prosemirror/extensions/marks/TrackedChangeExtensions.d.ts +4 -5
- package/dist/prosemirror/extensions/marks/TrackedChangeExtensions.js +18 -2
- package/dist/prosemirror/extensions/marks/UnderlineExtension.d.ts +2 -3
- package/dist/prosemirror/extensions/marks/UnderlineExtension.js +10 -3
- package/dist/prosemirror/extensions/marks/markUtils.d.ts +82 -25
- package/dist/prosemirror/extensions/marks/markUtils.js +138 -74
- package/dist/prosemirror/extensions/marks/noteReferenceDeletion.d.ts +3 -3
- package/dist/prosemirror/extensions/nodes/BlockBookmarkBoundaryExtension.d.ts +6 -3
- package/dist/prosemirror/extensions/nodes/BlockBookmarkBoundaryExtension.js +4 -4
- package/dist/prosemirror/extensions/nodes/BlockCustomXmlExtension.d.ts +2 -3
- package/dist/prosemirror/extensions/nodes/BlockMoveRangeBoundaryExtension.d.ts +24 -0
- package/dist/prosemirror/extensions/nodes/BlockMoveRangeBoundaryExtension.js +59 -0
- package/dist/prosemirror/extensions/nodes/BlockSdtExtension.d.ts +2 -3
- package/dist/prosemirror/extensions/nodes/BookmarkBoundaryExtension.d.ts +3 -3
- package/dist/prosemirror/extensions/nodes/BookmarkBoundaryExtension.js +1 -1
- package/dist/prosemirror/extensions/nodes/CommentRangeBoundaryExtension.d.ts +10 -0
- package/dist/prosemirror/extensions/nodes/CommentRangeBoundaryExtension.js +43 -0
- package/dist/prosemirror/extensions/nodes/CommentReferenceExtension.d.ts +3 -5
- package/dist/prosemirror/extensions/nodes/CommentReferenceExtension.js +5 -73
- package/dist/prosemirror/extensions/nodes/FieldExtension.d.ts +4 -4
- package/dist/prosemirror/extensions/nodes/FieldExtension.js +12 -2
- package/dist/prosemirror/extensions/nodes/HardBreakExtension.d.ts +2 -3
- package/dist/prosemirror/extensions/nodes/HorizontalRuleExtension.d.ts +2 -3
- package/dist/prosemirror/extensions/nodes/ImageExtension.d.ts +2 -3
- package/dist/prosemirror/extensions/nodes/MathExtension.d.ts +2 -3
- package/dist/prosemirror/extensions/nodes/MoveRangeBoundaryExtension.d.ts +4 -4
- package/dist/prosemirror/extensions/nodes/MoveRangeBoundaryExtension.js +8 -4
- package/dist/prosemirror/extensions/nodes/NoteMarkerExtension.d.ts +3 -4
- package/dist/prosemirror/extensions/nodes/PageBreakExtension.d.ts +2 -3
- package/dist/prosemirror/extensions/nodes/PageBreakRunExtension.d.ts +2 -3
- package/dist/prosemirror/extensions/nodes/PreservedBlockExtension.d.ts +3 -4
- package/dist/prosemirror/extensions/nodes/PreservedXmlExtension.d.ts +3 -4
- package/dist/prosemirror/extensions/nodes/RangeAnchorExtension.d.ts +4 -4
- package/dist/prosemirror/extensions/nodes/RangeAnchorExtension.js +20 -4
- package/dist/prosemirror/extensions/nodes/RenderedPageBreakExtension.d.ts +3 -4
- package/dist/prosemirror/extensions/nodes/SdtExtension.d.ts +3 -4
- package/dist/prosemirror/extensions/nodes/ShapeExtension.d.ts +11 -11
- package/dist/prosemirror/extensions/nodes/ShapeExtension.js +5 -6
- package/dist/prosemirror/extensions/nodes/SymbolExtension.d.ts +2 -3
- package/dist/prosemirror/extensions/nodes/SymbolExtension.js +3 -3
- package/dist/prosemirror/extensions/nodes/TabExtension.d.ts +2 -3
- package/dist/prosemirror/extensions/nodes/TableExtension.d.ts +10 -10
- package/dist/prosemirror/extensions/nodes/TableExtension.js +11 -13
- package/dist/prosemirror/extensions/nodes/TextBoxAnchorExtension.d.ts +3 -3
- package/dist/prosemirror/extensions/nodes/TextBoxExtension.d.ts +4 -5
- package/dist/prosemirror/extensions/nodes/bookmarkBoundaryDom.d.ts +7 -5
- package/dist/prosemirror/extensions/nodes/bookmarkBoundaryDom.js +9 -3
- package/dist/prosemirror/extensions/types.d.ts +27 -27
- package/dist/prosemirror/fieldRepresentation.d.ts +6 -5
- package/dist/prosemirror/fieldRepresentation.js +13 -3
- package/dist/prosemirror/findReplaceSelection.d.ts +9 -9
- package/dist/prosemirror/hyperlinkRemoval.d.ts +4 -4
- package/dist/prosemirror/hyperlinkRemoval.js +12 -0
- package/dist/prosemirror/imageCommit.d.ts +5 -23
- package/dist/prosemirror/imageCommit.js +1 -29
- package/dist/prosemirror/imagePictureNames.d.ts +4 -5
- package/dist/prosemirror/indexedNodeLookup.d.ts +4 -4
- package/dist/prosemirror/inlineDisplayText.d.ts +4 -5
- package/dist/prosemirror/inlineWrapperStack.d.ts +8 -9
- package/dist/prosemirror/insertOperations.d.ts +4 -4
- package/dist/prosemirror/keptRangeBoundaries.d.ts +76 -0
- package/dist/prosemirror/keptRangeBoundaries.js +381 -0
- package/dist/prosemirror/listAutoformatMarkers.d.ts +3 -4
- package/dist/prosemirror/listInstanceReferences.d.ts +3 -4
- package/dist/prosemirror/listInstanceReferences.js +1 -1
- package/dist/prosemirror/listLabels.d.ts +15 -5
- package/dist/prosemirror/listLabels.js +101 -16
- package/dist/prosemirror/listMarker.d.ts +13 -13
- package/dist/prosemirror/listMarker.js +7 -2
- package/dist/prosemirror/listNumbering.d.ts +11 -11
- package/dist/prosemirror/listNumbering.js +0 -16
- package/dist/prosemirror/listRendering.d.ts +5 -5
- package/dist/prosemirror/listRendering.js +4 -0
- package/dist/prosemirror/listRenderingAttrs.d.ts +12 -11
- package/dist/prosemirror/listRenderingAttrs.js +9 -5
- package/dist/prosemirror/listState.d.ts +9 -10
- package/dist/prosemirror/markupViewNotes.d.ts +2 -3
- package/dist/prosemirror/markupViewProjection.d.ts +9 -8
- package/dist/prosemirror/moveRangeBoundaryAttrs.d.ts +7 -6
- package/dist/prosemirror/moveRangeBoundaryAttrs.js +27 -4
- package/dist/prosemirror/noteReferenceOccurrenceId.d.ts +2 -3
- package/dist/prosemirror/noteReferenceOccurrences.d.ts +9 -9
- package/dist/prosemirror/noteReferenceReview.d.ts +13 -13
- package/dist/prosemirror/noteReferenceReview.js +4 -10
- package/dist/prosemirror/numberedRefFields.d.ts +5 -5
- package/dist/prosemirror/numberingAttr.d.ts +11 -11
- package/dist/prosemirror/outlineLevelAttr.d.ts +3 -4
- package/dist/prosemirror/pageBreakRunProjection.d.ts +5 -5
- package/dist/prosemirror/paraText.d.ts +4 -5
- package/dist/prosemirror/paragraphAlignment.d.ts +2 -3
- package/dist/prosemirror/paragraphDirection.d.ts +8 -9
- package/dist/prosemirror/paragraphFormattingProvenance.d.ts +14 -7
- package/dist/prosemirror/paragraphFormattingProvenance.js +8 -0
- package/dist/prosemirror/paragraphIndentation.d.ts +7 -7
- package/dist/prosemirror/paragraphList.d.ts +39 -0
- package/dist/prosemirror/paragraphList.js +81 -0
- package/dist/prosemirror/paragraphMarkJoin.d.ts +12 -2
- package/dist/prosemirror/paragraphMarkJoin.js +34 -3
- package/dist/prosemirror/paragraphPropertyCarry.d.ts +7 -7
- package/dist/prosemirror/paragraphSpacing.d.ts +9 -9
- package/dist/prosemirror/paragraphSpacing.js +16 -10
- package/dist/prosemirror/pluginKeyOwner.d.ts +3 -4
- package/dist/prosemirror/plugins/aiCitationDecorations.d.ts +6 -6
- package/dist/prosemirror/plugins/aiCitationDecorations.js +0 -12
- package/dist/prosemirror/plugins/aiSuggestionDecorations.d.ts +6 -6
- package/dist/prosemirror/plugins/aiSuggestionDecorations.js +0 -14
- package/dist/prosemirror/plugins/anonymizationDecorations.d.ts +9 -9
- package/dist/prosemirror/plugins/anonymizationDecorations.js +0 -18
- package/dist/prosemirror/plugins/autocompleteSuggestion.d.ts +19 -19
- package/dist/prosemirror/plugins/autocompleteSuggestion.js +3 -25
- package/dist/prosemirror/plugins/contentControlWidgets.d.ts +10 -10
- package/dist/prosemirror/plugins/contentControlWidgets.js +13 -7
- package/dist/prosemirror/plugins/createDocScanPlugin.d.ts +6 -6
- package/dist/prosemirror/plugins/documentNumbering.d.ts +11 -9
- package/dist/prosemirror/plugins/documentNumbering.js +42 -42
- package/dist/prosemirror/plugins/documentStyleState.d.ts +5 -6
- package/dist/prosemirror/plugins/documentStyles.d.ts +4 -4
- package/dist/prosemirror/plugins/documentStyles.js +2 -1
- package/dist/prosemirror/plugins/lockedControlKeyHandling.d.ts +4 -0
- package/dist/prosemirror/plugins/lockedControlKeyHandling.js +16 -0
- package/dist/prosemirror/plugins/paragraphStyleResolution.d.ts +3 -3
- package/dist/prosemirror/plugins/paragraphStyleResolution.js +23 -1
- package/dist/prosemirror/plugins/pmTextScan.d.ts +5 -6
- package/dist/prosemirror/plugins/revisionIds.d.ts +11 -11
- package/dist/prosemirror/plugins/revisionIds.js +11 -0
- package/dist/prosemirror/plugins/selectionTracker.d.ts +7 -8
- package/dist/prosemirror/plugins/suggestionMode.d.ts +16 -16
- package/dist/prosemirror/plugins/suggestionMode.js +11 -3
- package/dist/prosemirror/plugins/templateDirectives.d.ts +8 -8
- package/dist/prosemirror/plugins/templateDirectives.js +0 -17
- package/dist/prosemirror/plugins/templatePreviewValues.d.ts +12 -12
- package/dist/prosemirror/plugins/templatePreviewValues.js +0 -23
- package/dist/prosemirror/plugins/templateSlashMenu.d.ts +10 -11
- package/dist/prosemirror/plugins/templateSlashMenu.js +3 -21
- package/dist/prosemirror/plugins/transactionInvariants.d.ts +7 -8
- package/dist/prosemirror/positionSweep.d.ts +4 -5
- package/dist/prosemirror/positionSweep.js +1 -1
- package/dist/prosemirror/preservedXmlReview.d.ts +2 -3
- package/dist/prosemirror/queries.d.ts +5 -6
- package/dist/prosemirror/rangeAnchorAttrs.d.ts +4 -5
- package/dist/prosemirror/rangeAnchorAttrs.js +4 -1
- package/dist/prosemirror/rebaseParagraphRunFormatting.d.ts +3 -3
- package/dist/prosemirror/rebaseParagraphRunFormatting.js +6 -5
- package/dist/prosemirror/rebaseParagraphRuns.d.ts +4 -4
- package/dist/prosemirror/rebaseParagraphRuns.js +15 -11
- package/dist/prosemirror/rejoinRunCarriers.d.ts +3 -3
- package/dist/prosemirror/replacedAnnotations.d.ts +31 -17
- package/dist/prosemirror/replacedAnnotations.js +80 -11
- package/dist/prosemirror/revisionCarriers.d.ts +13 -13
- package/dist/prosemirror/runContentProjection.d.ts +6 -0
- package/dist/prosemirror/runContentProjection.js +24 -0
- package/dist/prosemirror/runFormattingFromMarks.d.ts +5 -6
- package/dist/prosemirror/runFormattingFromMarks.js +19 -17
- package/dist/prosemirror/runFormattingInlineCarriers.d.ts +16 -15
- package/dist/prosemirror/runFormattingInlineCarriers.js +1 -0
- package/dist/prosemirror/runFormattingMarkNames.d.ts +2 -3
- package/dist/prosemirror/runFormattingProvenance.d.ts +5 -6
- package/dist/prosemirror/runFormattingReconciliation.d.ts +4 -4
- package/dist/prosemirror/runFormattingReconciliation.js +6 -4
- package/dist/prosemirror/runIdentity.d.ts +6 -7
- package/dist/prosemirror/runIdentityAcrossRevisions.d.ts +16 -5
- package/dist/prosemirror/runIdentityAcrossRevisions.js +92 -32
- package/dist/prosemirror/runPropertyChangeResolution.d.ts +3 -3
- package/dist/prosemirror/runPropertyChangeResolution.js +11 -10
- package/dist/prosemirror/runStyleFormatting.d.ts +16 -16
- package/dist/prosemirror/runStyleFormatting.js +4 -2
- package/dist/prosemirror/schema/index.d.ts +6 -6
- package/dist/prosemirror/schema/marks.d.ts +36 -39
- package/dist/prosemirror/schema/nodes.d.ts +42 -35
- package/dist/prosemirror/sectionCarrier.d.ts +7 -8
- package/dist/prosemirror/sectionMarkEdits.d.ts +3 -4
- package/dist/prosemirror/sectionMarkEdits.js +21 -1
- package/dist/prosemirror/selectionMarks.d.ts +2 -2
- package/dist/prosemirror/selectionState.d.ts +5 -6
- package/dist/prosemirror/selectionState.js +1 -4
- package/dist/prosemirror/shapeGeometryAdjustments.d.ts +2 -3
- package/dist/prosemirror/storyListNumbering.d.ts +2 -2
- package/dist/prosemirror/storyListNumbering.js +2 -1
- package/dist/prosemirror/styles/index.js +1 -2
- package/dist/prosemirror/styles/paragraphStyleCascade.d.ts +9 -9
- package/dist/prosemirror/styles/paragraphStyleCascade.js +17 -2
- package/dist/prosemirror/styles/resolvedStyleAttrs.d.ts +8 -8
- package/dist/prosemirror/styles/styleResolver.d.ts +6 -7
- package/dist/prosemirror/styles/styleResolver.js +17 -0
- package/dist/prosemirror/styles/styleToggleCascade.d.ts +4 -4
- package/dist/prosemirror/styles/tableStyleRegions.d.ts +5 -6
- package/dist/prosemirror/tableCellMergeRevision.d.ts +3 -4
- package/dist/prosemirror/tableCellPaste.d.ts +11 -12
- package/dist/prosemirror/tableCellRevisionVisibility.d.ts +2 -3
- package/dist/prosemirror/tableGridMutation.d.ts +12 -12
- package/dist/prosemirror/tableResize.d.ts +18 -18
- package/dist/prosemirror/tableResize.js +64 -53
- package/dist/prosemirror/tableRunIn.d.ts +10 -5
- package/dist/prosemirror/tableRunIn.js +44 -9
- package/dist/prosemirror/textBoxAnchorAttrs.d.ts +3 -4
- package/dist/prosemirror/textBoxAnchorAttrs.js +4 -1
- package/dist/prosemirror/textBoxHostCollapse.d.ts +8 -0
- package/dist/prosemirror/textBoxHostCollapse.js +79 -0
- package/dist/prosemirror/textBoxHostParagraph.d.ts +2 -3
- package/dist/prosemirror/textInput.d.ts +12 -6
- package/dist/prosemirror/textInput.js +26 -2
- package/dist/prosemirror/trackedRevisionPath.d.ts +6 -6
- package/dist/prosemirror/trackedRevisionPath.js +7 -4
- package/dist/prosemirror/trackedRunInlineAtoms.d.ts +8 -8
- package/dist/prosemirror/trackedRunInlineAtoms.js +3 -2
- package/dist/prosemirror/utils/extractTrackedChanges.d.ts +4 -5
- package/dist/prosemirror/utils/findParagraphByParaId.d.ts +3 -4
- package/dist/prosemirror/utils/tabCalculator.js +1 -2
- package/dist/prosemirror/utils/visualLineNavigation.d.ts +7 -7
- package/dist/prosemirror/utils/visualLineNavigation.js +2 -14
- package/dist/prosemirror/validation.d.ts +7 -8
- package/dist/prosemirror/validation.js +25 -10
- package/dist/prosemirror/yjsDocumentMetadata.d.ts +15 -15
- package/dist/prosemirror/yjsDocumentMetadata.js +15 -12
- package/dist/prosemirror/zeroWidthAnchors.d.ts +7 -6
- package/dist/prosemirror/zeroWidthAnchors.js +53 -16
- package/dist/redline.d.ts +8 -8
- package/dist/redline.js +2 -1
- package/dist/redlineOperationLimit.d.ts +3 -3
- package/dist/render-dom/BodySelectionOverlay.d.ts +4 -5
- package/dist/render-dom/HeaderFooterSelectionOverlay.d.ts +6 -7
- package/dist/render-dom/RemoteSelectionOverlay.d.ts +5 -6
- package/dist/render-dom/RenderedDomContext.d.ts +6 -7
- package/dist/render-dom/commentAnchorAttributes.d.ts +6 -6
- package/dist/render-dom/resolveSidebarItemPositions.d.ts +5 -6
- package/dist/reviewHistoryLimits.d.ts +3 -0
- package/dist/reviewHistoryLimits.js +4 -0
- package/dist/server.d.ts +2 -1
- package/dist/server.js +2 -1
- package/dist/shaping/placeRun.d.ts +7 -8
- package/dist/shaping/shaper.d.ts +16 -16
- package/dist/style-engine/index.js +1 -2
- package/dist/style-engine/styleEngine.d.ts +5 -6
- package/dist/style-sets/extract.d.ts +8 -9
- package/dist/style-sets/stellaStyle.d.ts +4 -5
- package/dist/style-sets/styleSetNormalization.d.ts +6 -7
- package/dist/style-sets/types.d.ts +5 -6
- package/dist/symbols.d.ts +8 -9
- package/dist/types/block-id.d.ts +11 -12
- package/dist/types/canonicalCapabilities.d.ts +11 -19
- package/dist/types/canonicalCapabilities.js +5 -12
- package/dist/types/canonicalComments.d.ts +3 -4
- package/dist/types/canonicalSave.d.ts +2 -3
- package/dist/types/canonicalSections.d.ts +2 -3
- package/dist/types/documentEnumValues.d.ts +48 -49
- package/dist/types/docxSerialization.d.ts +4 -5
- package/dist/types/editor-story.d.ts +2 -3
- package/dist/types/remote-selection.d.ts +2 -3
- package/dist/types/wrap.d.ts +5 -6
- package/dist/utils/authorColors.d.ts +4 -5
- package/dist/utils/base64.d.ts +2 -2
- package/dist/utils/baseDirection.d.ts +4 -5
- package/dist/utils/borderCss.d.ts +9 -10
- package/dist/utils/boundedContentIdentity.d.ts +13 -0
- package/dist/utils/boundedContentIdentity.js +42 -0
- package/dist/utils/canonicalJson.d.ts +2 -3
- package/dist/utils/clipboard.d.ts +22 -22
- package/dist/utils/clipboard.js +9 -6
- package/dist/utils/colorResolver.d.ts +22 -23
- package/dist/utils/colorResolver.js +0 -20
- package/dist/utils/createDocument.d.ts +4 -4
- package/dist/utils/cursiveJoining.d.ts +7 -8
- package/dist/utils/documentLoaderBehavior.d.ts +3 -4
- package/dist/utils/documentPointerDown.d.ts +5 -0
- package/dist/utils/documentPointerDown.js +28 -0
- package/dist/utils/docxInput.d.ts +3 -4
- package/dist/utils/domGuards.d.ts +7 -8
- package/dist/utils/findMatchView.d.ts +4 -4
- package/dist/utils/findReplace.d.ts +16 -16
- package/dist/utils/findSearchKey.d.ts +5 -5
- package/dist/utils/findVerticalScrollParent.d.ts +3 -4
- package/dist/utils/fontFamilyMerge.d.ts +2 -2
- package/dist/utils/fontLoader.d.ts +12 -13
- package/dist/utils/fontResolver.d.ts +16 -14
- package/dist/utils/fontResolver.js +33 -5
- package/dist/utils/fontWeights.d.ts +2 -3
- package/dist/utils/formatToStyle.d.ts +14 -14
- package/dist/utils/formatToStyle.js +17 -15
- package/dist/utils/headerFooter.d.ts +11 -12
- package/dist/utils/headerFooter.js +10 -0
- package/dist/utils/headingCollector.d.ts +3 -4
- package/dist/utils/hexId.d.ts +6 -7
- package/dist/utils/hexId.js +1 -1
- package/dist/utils/horizontalScale.d.ts +5 -6
- package/dist/utils/htmlComments.d.ts +2 -3
- package/dist/utils/imageLuminance.d.ts +4 -5
- package/dist/utils/imageResize.d.ts +18 -0
- package/dist/utils/imageResize.js +37 -0
- package/dist/utils/imageValidation.d.ts +3 -4
- package/dist/utils/imageValidation.js +1 -1
- package/dist/utils/joiningTypes.gen.d.ts +5 -6
- package/dist/utils/mergeDocumentContent.d.ts +2 -3
- package/dist/utils/mergeDocumentContent.js +7 -0
- package/dist/utils/noteReferenceLabels.d.ts +7 -8
- package/dist/utils/ooxmlSymbol.d.ts +5 -3
- package/dist/utils/ooxmlSymbol.js +51 -1
- package/dist/utils/outlineDepth.d.ts +4 -5
- package/dist/utils/paragraphBaseDirection.d.ts +2 -3
- package/dist/utils/paragraphBaseDirection.js +2 -1
- package/dist/utils/paragraphFormattingMerge.d.ts +4 -5
- package/dist/utils/paragraphFormattingMerge.js +2 -0
- package/dist/utils/paragraphFrame.d.ts +20 -0
- package/dist/utils/paragraphFrame.js +13 -0
- package/dist/utils/paragraphInlineLayout.d.ts +101 -4
- package/dist/utils/paragraphInlineLayout.js +164 -1
- package/dist/utils/replaceText.d.ts +2 -2
- package/dist/utils/replaceText.js +4 -0
- package/dist/utils/rotationBoundingBox.d.ts +7 -8
- package/dist/utils/sanitizeImageSrc.d.ts +3 -4
- package/dist/utils/scriptSegments.d.ts +34 -16
- package/dist/utils/scriptSegments.js +26 -6
- package/dist/utils/sliceText.js +1 -2
- package/dist/utils/stripXmlDeclarations.d.ts +2 -3
- package/dist/utils/tableOfContentsStyle.d.ts +2 -2
- package/dist/utils/tableOperations.d.ts +16 -17
- package/dist/utils/tableOperations.js +44 -41
- package/dist/utils/tablePlacement.d.ts +3 -4
- package/dist/utils/textAdvanceGapsDom.d.ts +8 -0
- package/dist/utils/textAdvanceGapsDom.js +49 -0
- package/dist/utils/textDirectionFlow.d.ts +3 -4
- package/dist/utils/textEncoding.js +1 -2
- package/dist/utils/textFormattingMerge.d.ts +4 -5
- package/dist/utils/tiffConverter.d.ts +5 -6
- package/dist/utils/trailingText.d.ts +4 -5
- package/dist/utils/units.d.ts +19 -20
- package/dist/utils/urlSecurity.d.ts +6 -6
- package/dist/utils/urlSecurity.js +2 -1
- package/dist/utils/zoom.d.ts +4 -5
- package/dist/version-comparison.d.ts +28 -28
- package/dist/version-comparison.js +8 -7
- package/dist/watermark/index.d.ts +5 -5
- package/dist/watermark/index.js +9 -0
- package/package.json +16 -16
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { AUTHOR_COLORS, getAuthorColorIdx } from "../../../utils/authorColors.js";
|
|
2
2
|
import { expectTrackedChangeMarkAttrs, isTrackedRevisionAncestorArray } from "../../attrs/index.js";
|
|
3
|
+
import { mintRevisionId } from "../../plugins/revisionIds.js";
|
|
3
4
|
import { createMarkExtension } from "../create.js";
|
|
5
|
+
import { authorFromClipboardRevision } from "../features/clipboardTrackedRevisions.js";
|
|
4
6
|
//#region src/prosemirror/extensions/marks/TrackedChangeExtensions.ts
|
|
5
7
|
/**
|
|
6
8
|
* Tracked Change Mark Extensions — insertion and deletion marks
|
|
@@ -40,6 +42,12 @@ const revisionAncestorsFromDom = (serialized) => {
|
|
|
40
42
|
return false;
|
|
41
43
|
}
|
|
42
44
|
};
|
|
45
|
+
const clipboardRevisionAttrs = (dom) => ({
|
|
46
|
+
revisionId: mintRevisionId(),
|
|
47
|
+
author: authorFromClipboardRevision(dom.getAttribute("cite")),
|
|
48
|
+
date: dom.getAttribute("datetime"),
|
|
49
|
+
_docxRevisionAncestors: null
|
|
50
|
+
});
|
|
43
51
|
/**
|
|
44
52
|
* Insertion mark — text added in tracked changes
|
|
45
53
|
* Renders with per-author colored underline.
|
|
@@ -59,10 +67,14 @@ const InsertionExtension = createMarkExtension({
|
|
|
59
67
|
suggestionId: { default: null },
|
|
60
68
|
_docxOuterWrapperCount: { default: null },
|
|
61
69
|
_docxResolutionJoins: { default: null },
|
|
62
|
-
_docxRevisionAncestors: { default: null }
|
|
70
|
+
_docxRevisionAncestors: { default: null },
|
|
71
|
+
_docxCommentRangeBoundaries: { default: void 0 }
|
|
63
72
|
},
|
|
64
73
|
inclusive: false,
|
|
65
74
|
parseDOM: [{
|
|
75
|
+
tag: "ins",
|
|
76
|
+
getAttrs: (dom) => clipboardRevisionAttrs(dom)
|
|
77
|
+
}, {
|
|
66
78
|
tag: "span.docx-insertion",
|
|
67
79
|
getAttrs(dom) {
|
|
68
80
|
const ancestors = revisionAncestorsFromDom(dom.dataset["revisionAncestors"]);
|
|
@@ -122,10 +134,14 @@ const DeletionExtension = createMarkExtension({
|
|
|
122
134
|
_historicalFormatting: { default: null },
|
|
123
135
|
_docxOuterWrapperCount: { default: null },
|
|
124
136
|
_docxResolutionJoins: { default: null },
|
|
125
|
-
_docxRevisionAncestors: { default: null }
|
|
137
|
+
_docxRevisionAncestors: { default: null },
|
|
138
|
+
_docxCommentRangeBoundaries: { default: void 0 }
|
|
126
139
|
},
|
|
127
140
|
inclusive: false,
|
|
128
141
|
parseDOM: [{
|
|
142
|
+
tag: "del",
|
|
143
|
+
getAttrs: (dom) => clipboardRevisionAttrs(dom)
|
|
144
|
+
}, {
|
|
129
145
|
tag: "span.docx-deletion",
|
|
130
146
|
getAttrs(dom) {
|
|
131
147
|
const ancestors = revisionAncestorsFromDom(dom.dataset["revisionAncestors"]);
|
|
@@ -3,6 +3,5 @@ import { MarkExtension } from "../types.js";
|
|
|
3
3
|
/**
|
|
4
4
|
* Underline Mark Extension
|
|
5
5
|
*/
|
|
6
|
-
declare const UnderlineExtension: (options?: Partial<Record<string, unknown>> | undefined) => MarkExtension;
|
|
7
|
-
//#endregion
|
|
8
|
-
export { UnderlineExtension };
|
|
6
|
+
export declare const UnderlineExtension: (options?: Partial<Record<string, unknown>> | undefined) => MarkExtension;
|
|
7
|
+
//#endregion
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PLAIN_UNDERLINE, underlineDecorationCss, underlineStyleFromCssDecoration } from "../../../utils/formatToStyle.js";
|
|
2
2
|
import { expectUnderlineMarkAttrs } from "../../attrs/index.js";
|
|
3
3
|
import { createMarkExtension } from "../create.js";
|
|
4
|
-
import { setMark, toggleUnderlineMark } from "./markUtils.js";
|
|
4
|
+
import { canonicalSetMarkFormatting, setMark, toggleUnderlineMark, withRunFormattingLock } from "./markUtils.js";
|
|
5
5
|
import { panic } from "better-result";
|
|
6
6
|
//#region src/prosemirror/extensions/marks/UnderlineExtension.ts
|
|
7
7
|
/**
|
|
@@ -43,10 +43,17 @@ const UnderlineExtension = createMarkExtension({
|
|
|
43
43
|
return {
|
|
44
44
|
commands: {
|
|
45
45
|
toggleUnderline: () => toggleUnderlineMark(underlineType),
|
|
46
|
-
setUnderlineStyle: (style, color) => setMark(underlineType, {
|
|
46
|
+
setUnderlineStyle: (style, color) => withRunFormattingLock(setMark(underlineType, {
|
|
47
47
|
style,
|
|
48
48
|
color
|
|
49
|
-
})
|
|
49
|
+
}), (state) => canonicalSetMarkFormatting({
|
|
50
|
+
state,
|
|
51
|
+
type: underlineType,
|
|
52
|
+
attrs: {
|
|
53
|
+
style,
|
|
54
|
+
color
|
|
55
|
+
}
|
|
56
|
+
}))
|
|
50
57
|
},
|
|
51
58
|
keyboardShortcuts: { "Mod-u": toggleUnderlineMark(underlineType) }
|
|
52
59
|
};
|
|
@@ -1,32 +1,96 @@
|
|
|
1
1
|
import { document_d_exports } from "../../../types/document.js";
|
|
2
|
+
import { CanonicalCommandIntent } from "../../canonicalCommands.js";
|
|
2
3
|
import { Attrs, Mark, MarkType, Schema } from "prosemirror-model";
|
|
3
4
|
import { Command, EditorState } from "prosemirror-state";
|
|
4
5
|
//#region src/prosemirror/extensions/marks/markUtils.d.ts
|
|
5
6
|
type MarkAttrs = Record<string, unknown>;
|
|
6
|
-
declare
|
|
7
|
-
declare function
|
|
7
|
+
export declare const withRunFormattingLock: (command: Command, describe: (state: EditorState) => readonly CanonicalCommandIntent[] | undefined) => Command;
|
|
8
|
+
export declare function marksToTextFormatting(marks: readonly Mark[]): document_d_exports.TextFormatting;
|
|
9
|
+
type CanonicalSetMarkFormattingOptions = {
|
|
10
|
+
state: EditorState;
|
|
11
|
+
type: MarkType;
|
|
12
|
+
attrs: MarkAttrs;
|
|
13
|
+
};
|
|
14
|
+
export declare const canonicalSetMarkFormatting: ({ state, type, attrs }: CanonicalSetMarkFormattingOptions) => {
|
|
15
|
+
type: "formatRun";
|
|
16
|
+
from: number;
|
|
17
|
+
to: number;
|
|
18
|
+
patch: import("@stll/docx-core/ops").FormattingPatch<{
|
|
19
|
+
bold?: boolean | undefined;
|
|
20
|
+
boldCs?: boolean | undefined;
|
|
21
|
+
italic?: boolean | undefined;
|
|
22
|
+
italicCs?: boolean | undefined;
|
|
23
|
+
underline?: {
|
|
24
|
+
style: document_d_exports.UnderlineStyle;
|
|
25
|
+
color?: import("@stll/docx-core/model").ColorValue;
|
|
26
|
+
} | undefined;
|
|
27
|
+
strike?: boolean | undefined;
|
|
28
|
+
doubleStrike?: boolean | undefined;
|
|
29
|
+
vertAlign?: "baseline" | "superscript" | "subscript" | undefined;
|
|
30
|
+
smallCaps?: boolean | undefined;
|
|
31
|
+
allCaps?: boolean | undefined;
|
|
32
|
+
hidden?: boolean | undefined;
|
|
33
|
+
noProof?: boolean | undefined;
|
|
34
|
+
color?: import("@stll/docx-core/model").ColorValue | undefined;
|
|
35
|
+
highlight?: "black" | "blue" | "cyan" | "darkBlue" | "darkCyan" | "darkGray" | "darkGreen" | "darkMagenta" | "darkRed" | "darkYellow" | "green" | "lightGray" | "magenta" | "none" | "red" | "white" | "yellow" | undefined;
|
|
36
|
+
shading?: import("@stll/docx-core/model").ShadingProperties | undefined;
|
|
37
|
+
fontSize?: number | undefined;
|
|
38
|
+
fontSizeCs?: number | undefined;
|
|
39
|
+
fontFamily?: {
|
|
40
|
+
ascii?: string;
|
|
41
|
+
hAnsi?: string;
|
|
42
|
+
eastAsia?: string;
|
|
43
|
+
cs?: string;
|
|
44
|
+
hint?: "default" | "eastAsia" | "cs";
|
|
45
|
+
asciiTheme?: "majorAscii" | "majorHAnsi" | "majorEastAsia" | "majorBidi" | "minorAscii" | "minorHAnsi" | "minorEastAsia" | "minorBidi";
|
|
46
|
+
hAnsiTheme?: string;
|
|
47
|
+
eastAsiaTheme?: string;
|
|
48
|
+
csTheme?: string;
|
|
49
|
+
} | undefined;
|
|
50
|
+
language?: {
|
|
51
|
+
val?: string;
|
|
52
|
+
eastAsia?: string;
|
|
53
|
+
bidi?: string;
|
|
54
|
+
} | undefined;
|
|
55
|
+
spacing?: number | undefined;
|
|
56
|
+
position?: number | undefined;
|
|
57
|
+
scale?: number | undefined;
|
|
58
|
+
kerning?: number | undefined;
|
|
59
|
+
effect?: import("@stll/docx-core/model").TextEffect | undefined;
|
|
60
|
+
emphasisMark?: import("@stll/docx-core/model").EmphasisMark | undefined;
|
|
61
|
+
emboss?: boolean | undefined;
|
|
62
|
+
imprint?: boolean | undefined;
|
|
63
|
+
outline?: boolean | undefined;
|
|
64
|
+
shadow?: boolean | undefined;
|
|
65
|
+
rtl?: boolean | undefined;
|
|
66
|
+
cs?: boolean | undefined;
|
|
67
|
+
styleId?: string | undefined;
|
|
68
|
+
preserved?: import("@stll/docx-core/model").PreservedMarkup | undefined;
|
|
69
|
+
}>;
|
|
70
|
+
}[];
|
|
71
|
+
export declare function setMark(type: MarkType, attrs: MarkAttrs): Command;
|
|
8
72
|
type PairedToggleProperty = "bold" | "italic";
|
|
9
73
|
/** `toggleMark` for the document's own counterpart of `type`. */
|
|
10
|
-
declare const toggleDocumentMark: (type: MarkType) => Command;
|
|
74
|
+
export declare const toggleDocumentMark: (type: MarkType) => Command;
|
|
11
75
|
/** UI toggle whose direct-formatting contract explicitly targets both script families. */
|
|
12
|
-
declare const toggleMarkForAllScripts: (type: MarkType, property: PairedToggleProperty) => Command;
|
|
76
|
+
export declare const toggleMarkForAllScripts: (type: MarkType, property: PairedToggleProperty) => Command;
|
|
13
77
|
/** UI size command whose direct-formatting contract explicitly targets both script families. */
|
|
14
|
-
declare const setFontSizeForAllScripts: (markType: MarkType, size: number) => Command;
|
|
78
|
+
export declare const setFontSizeForAllScripts: (markType: MarkType, size: number) => Command;
|
|
15
79
|
/** Clears both ordinary and complex-script direct size through the UI command boundary. */
|
|
16
|
-
declare const clearFontSizeForAllScripts: (markType: MarkType) => Command;
|
|
17
|
-
declare function toggleUnderlineMark(markType: MarkType): Command;
|
|
18
|
-
declare function removeMark(type: MarkType): Command;
|
|
80
|
+
export declare const clearFontSizeForAllScripts: (markType: MarkType) => Command;
|
|
81
|
+
export declare function toggleUnderlineMark(markType: MarkType): Command;
|
|
82
|
+
export declare function removeMark(type: MarkType): Command;
|
|
19
83
|
/**
|
|
20
84
|
* Check if a mark is active in the current selection
|
|
21
85
|
*/
|
|
22
|
-
declare function isMarkActive(state: EditorState, type: MarkType, attrs?: Record<string, unknown>): boolean;
|
|
86
|
+
export declare function isMarkActive(state: EditorState, type: MarkType, attrs?: Record<string, unknown>): boolean;
|
|
23
87
|
/**
|
|
24
88
|
* Get the current value of a mark attribute
|
|
25
89
|
*/
|
|
26
|
-
declare function getMarkAttr(state: EditorState, type: MarkType, attr: string): unknown;
|
|
27
|
-
type AuthoredRunFormattingCarrier = "preserve" | "reconstruct";
|
|
90
|
+
export declare function getMarkAttr(state: EditorState, type: MarkType, attr: string): unknown;
|
|
91
|
+
export type AuthoredRunFormattingCarrier = "preserve" | "reconstruct";
|
|
28
92
|
/** Builds a mark by type name; a conversion passes one that shares equal marks. */
|
|
29
|
-
type MarkFactory = (type: string, attrs?: Attrs | null) => Mark;
|
|
93
|
+
export type MarkFactory = (type: string, attrs?: Attrs | null) => Mark;
|
|
30
94
|
/**
|
|
31
95
|
* Convert TextFormatting to ProseMirror marks
|
|
32
96
|
*/
|
|
@@ -39,23 +103,16 @@ type TextFormattingToMarksOptions = {
|
|
|
39
103
|
/** Builds each mark; defaults to `schema.mark`. */
|
|
40
104
|
createMark?: MarkFactory;
|
|
41
105
|
};
|
|
42
|
-
declare function textFormattingToMarks(formatting: document_d_exports.TextFormatting | undefined, schema: Schema, options?: TextFormattingToMarksOptions): Mark[];
|
|
43
|
-
/**
|
|
44
|
-
|
|
45
|
-
*
|
|
46
|
-
* Only the marks that carry run formatting go. A comment anchor, a hyperlink,
|
|
47
|
-
* a note reference, a tracked insertion or deletion and a run's identity are
|
|
48
|
-
* not formatting, and removing them deleted the comment's range, unlinked the
|
|
49
|
-
* text, orphaned the note and silently resolved the revision.
|
|
50
|
-
*/
|
|
51
|
-
declare const clearFormatting: Command;
|
|
106
|
+
export declare function textFormattingToMarks(formatting: document_d_exports.TextFormatting | undefined, schema: Schema, options?: TextFormattingToMarksOptions): Mark[];
|
|
107
|
+
/** Clear character formatting from the selection. */
|
|
108
|
+
export declare const clearFormatting: Command;
|
|
52
109
|
/**
|
|
53
110
|
* Create a command that sets a mark on the selection
|
|
54
111
|
*/
|
|
55
|
-
declare function createSetMarkCommand(markType: MarkType, attrs?: Record<string, unknown>): Command;
|
|
112
|
+
export declare function createSetMarkCommand(markType: MarkType, attrs?: Record<string, unknown>): Command;
|
|
56
113
|
/**
|
|
57
114
|
* Create a command that removes a mark from the selection
|
|
58
115
|
*/
|
|
59
|
-
declare function createRemoveMarkCommand(markType: MarkType): Command;
|
|
116
|
+
export declare function createRemoveMarkCommand(markType: MarkType): Command;
|
|
60
117
|
//#endregion
|
|
61
|
-
export {
|
|
118
|
+
export {};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { isContentLocked } from "../../../content-controls/mutateContentControls.js";
|
|
1
2
|
import { FONT_THEME_VALUES } from "../../../types/documentEnumValues.js";
|
|
2
3
|
import { mergeFontFamily } from "../../../utils/fontFamilyMerge.js";
|
|
3
4
|
import { normalizeHorizontalScalePercent } from "../../../utils/horizontalScale.js";
|
|
4
5
|
import { expectCharacterSpacingMarkAttrs, expectCharacterStyleMarkAttrs, expectEmphasisMarkAttrs, expectFontFamilyMarkAttrs, expectParagraphAttrs, expectRunFormattingOverrideMarkAttrs, expectRunShadingMarkAttrs, expectStrikeMarkAttrs, expectTextEffectMarkAttrs } from "../../attrs/index.js";
|
|
5
6
|
import { canonicalRunFormatting, withCanonicalCommand } from "../../canonicalCommands.js";
|
|
6
|
-
import {
|
|
7
|
+
import { canonicalSelectionRanges } from "../../canonicalSelectionRange.js";
|
|
7
8
|
import { runShadingAttrsToShading, shadingToRunShadingAttrs } from "../../conversion/runShadingMark.js";
|
|
8
9
|
import { documentMarkType } from "../../documentSchema.js";
|
|
9
10
|
import { selectRunFormattingCarrierRepresentations } from "../../runFormattingInlineCarriers.js";
|
|
@@ -20,6 +21,31 @@ import { toggleMark } from "prosemirror-commands";
|
|
|
20
21
|
* setMark, removeMark, isMarkActive, getMarkAttr, marksToTextFormatting,
|
|
21
22
|
* textFormattingToMarks, clearFormatting
|
|
22
23
|
*/
|
|
24
|
+
const isContentLockedControl = (node) => (node.type.name === "sdt" || node.type.name === "blockSdt") && isContentLocked(node.attrs["lock"]);
|
|
25
|
+
const selectionTouchesContentLockedControl = (state) => {
|
|
26
|
+
const { $from, $to } = state.selection;
|
|
27
|
+
const hasLockedAncestor = (position) => {
|
|
28
|
+
for (let depth = 1; depth <= position.depth; depth += 1) if (isContentLockedControl(position.node(depth))) return true;
|
|
29
|
+
return false;
|
|
30
|
+
};
|
|
31
|
+
if (hasLockedAncestor($from) || hasLockedAncestor($to)) return true;
|
|
32
|
+
if (state.selection.empty) return false;
|
|
33
|
+
let touchesLockedControl = false;
|
|
34
|
+
canonicalSelectionRanges(state).forEach(({ from, to }) => {
|
|
35
|
+
state.doc.nodesBetween(from, to, (node) => {
|
|
36
|
+
if (isContentLockedControl(node)) {
|
|
37
|
+
touchesLockedControl = true;
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
return true;
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
return touchesLockedControl;
|
|
44
|
+
};
|
|
45
|
+
const withRunFormattingLock = (command, describe) => {
|
|
46
|
+
const guarded = (state, dispatch, view) => selectionTouchesContentLockedControl(state) ? false : command(state, dispatch, view);
|
|
47
|
+
return withCanonicalCommand(guarded, (state) => selectionTouchesContentLockedControl(state) ? [] : describe(state));
|
|
48
|
+
};
|
|
23
49
|
const isFontTheme = (value) => value !== void 0 && FONT_THEME_VALUES.some((theme) => theme === value);
|
|
24
50
|
const fontFamilyAttrsToFormatting = ({ ascii, hAnsi, eastAsia, cs, hint, asciiTheme, hAnsiTheme, eastAsiaTheme, csTheme }) => ({
|
|
25
51
|
...ascii !== void 0 ? { ascii } : {},
|
|
@@ -135,10 +161,7 @@ function marksToTextFormatting(marks) {
|
|
|
135
161
|
case "runFormattingOverride":
|
|
136
162
|
applyRunFormattingOverrideMark(formatting, mark);
|
|
137
163
|
break;
|
|
138
|
-
case "characterStyle":
|
|
139
|
-
formatting.styleId = expectCharacterStyleMarkAttrs(mark).styleId;
|
|
140
|
-
break;
|
|
141
|
-
default: break;
|
|
164
|
+
case "characterStyle": formatting.styleId = expectCharacterStyleMarkAttrs(mark).styleId;
|
|
142
165
|
}
|
|
143
166
|
return formatting;
|
|
144
167
|
}
|
|
@@ -173,7 +196,11 @@ function compactAttrs(attrs) {
|
|
|
173
196
|
function mergeMarkAttrs(markType, currentMark, nextAttrs) {
|
|
174
197
|
const next = compactAttrs(nextAttrs);
|
|
175
198
|
switch (markType.name) {
|
|
176
|
-
case "fontFamily":
|
|
199
|
+
case "fontFamily": {
|
|
200
|
+
const current = currentMark ? fontFamilyAttrsToFormatting(expectFontFamilyMarkAttrs(currentMark)) : void 0;
|
|
201
|
+
const incoming = fontFamilyAttrsToFormatting(expectFontFamilyMarkAttrs(markType.create(next)));
|
|
202
|
+
return mergeFontFamily(current, incoming);
|
|
203
|
+
}
|
|
177
204
|
case "underline": return {
|
|
178
205
|
...compactAttrs(currentMark?.attrs),
|
|
179
206
|
...next
|
|
@@ -191,9 +218,11 @@ function createMarkWithMergedAttrs(markType, currentMark, nextAttrs) {
|
|
|
191
218
|
const canonicalSetMarkFormatting = ({ state, type, attrs }) => {
|
|
192
219
|
const markType = documentMarkType(state, type);
|
|
193
220
|
const { empty } = state.selection;
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
221
|
+
if (empty) {
|
|
222
|
+
const current = markType.isInSet(state.storedMarks ?? state.selection.$from.marks());
|
|
223
|
+
return canonicalRunFormatting(state, marksToTextFormatting([createMarkWithMergedAttrs(markType, current, attrs)]));
|
|
224
|
+
}
|
|
225
|
+
return canonicalSelectionRanges(state).flatMap(({ from, to }) => selectRunFormattingCarrierRepresentations({
|
|
197
226
|
doc: state.doc,
|
|
198
227
|
from,
|
|
199
228
|
to
|
|
@@ -202,12 +231,12 @@ const canonicalSetMarkFormatting = ({ state, type, attrs }) => {
|
|
|
202
231
|
from: representation.from,
|
|
203
232
|
to: representation.to,
|
|
204
233
|
patch: marksToTextFormatting([createMarkWithMergedAttrs(markType, markType.isInSet(representation.node.marks), attrs)])
|
|
205
|
-
}));
|
|
234
|
+
})));
|
|
206
235
|
};
|
|
207
236
|
function setMark(type, attrs) {
|
|
208
237
|
const command = (state, dispatch) => {
|
|
209
238
|
const markType = documentMarkType(state, type);
|
|
210
|
-
const {
|
|
239
|
+
const { empty } = state.selection;
|
|
211
240
|
if (empty) {
|
|
212
241
|
if (dispatch) {
|
|
213
242
|
const current = state.storedMarks ?? state.selection.$from.marks();
|
|
@@ -220,24 +249,30 @@ function setMark(type, attrs) {
|
|
|
220
249
|
}
|
|
221
250
|
if (dispatch) {
|
|
222
251
|
if (!markRequiresAttrMerge(markType)) {
|
|
223
|
-
|
|
252
|
+
let tr = state.tr;
|
|
253
|
+
canonicalSelectionRanges(state).forEach(({ from, to }) => {
|
|
254
|
+
tr = tr.addMark(from, to, markType.create(attrs));
|
|
255
|
+
});
|
|
256
|
+
dispatch(tr.scrollIntoView());
|
|
224
257
|
return true;
|
|
225
258
|
}
|
|
226
259
|
let tr = state.tr;
|
|
227
|
-
state.
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
260
|
+
canonicalSelectionRanges(state).forEach(({ from, to }) => {
|
|
261
|
+
state.doc.nodesBetween(from, to, (node, pos) => {
|
|
262
|
+
if (!node.isText) return;
|
|
263
|
+
const start = Math.max(from, pos);
|
|
264
|
+
const end = Math.min(to, pos + node.nodeSize);
|
|
265
|
+
const currentMark = markType.isInSet(node.marks);
|
|
266
|
+
const mark = createMarkWithMergedAttrs(markType, currentMark, attrs);
|
|
267
|
+
tr = tr.addMark(start, end, mark);
|
|
268
|
+
});
|
|
234
269
|
});
|
|
235
270
|
dispatch(tr.scrollIntoView());
|
|
236
271
|
}
|
|
237
272
|
return true;
|
|
238
273
|
};
|
|
239
274
|
if (!RUN_FORMATTING_MARK_NAMES.has(type.name)) return command;
|
|
240
|
-
return
|
|
275
|
+
return withRunFormattingLock(command, (state) => canonicalSetMarkFormatting({
|
|
241
276
|
state,
|
|
242
277
|
type,
|
|
243
278
|
attrs
|
|
@@ -289,18 +324,18 @@ const updateRunFormattingOverrideMarks = (marks, overrideType, update) => {
|
|
|
289
324
|
const updateRunFormattingOverride = (state, tr, update) => {
|
|
290
325
|
const overrideType = state.schema.marks["runFormattingOverride"];
|
|
291
326
|
if (!overrideType) return tr;
|
|
292
|
-
const {
|
|
327
|
+
const { empty } = state.selection;
|
|
293
328
|
if (empty) {
|
|
294
329
|
const marks = updateRunFormattingOverrideMarks(tr.storedMarks ?? state.storedMarks ?? state.selection.$from.marks(), overrideType, update);
|
|
295
330
|
saveStoredMarksToParagraph(state, tr, marks);
|
|
296
331
|
tr.setStoredMarks(marks);
|
|
297
332
|
return tr;
|
|
298
333
|
}
|
|
299
|
-
const representations = selectRunFormattingCarrierRepresentations({
|
|
334
|
+
const representations = canonicalSelectionRanges(state).flatMap(({ from, to }) => selectRunFormattingCarrierRepresentations({
|
|
300
335
|
doc: tr.doc,
|
|
301
336
|
from,
|
|
302
337
|
to
|
|
303
|
-
});
|
|
338
|
+
}));
|
|
304
339
|
for (const representation of representations) {
|
|
305
340
|
const { node, position } = representation;
|
|
306
341
|
const nextMarks = updateRunFormattingOverrideMarks(node.marks, overrideType, update);
|
|
@@ -319,9 +354,12 @@ const withRunFormattingOverride = (command, update) => (state, dispatch) => comm
|
|
|
319
354
|
} : void 0);
|
|
320
355
|
/** `toggleMark` for the document's own counterpart of `type`. */
|
|
321
356
|
const toggleDocumentMark = (type) => {
|
|
322
|
-
const command = (state, dispatch, view) =>
|
|
357
|
+
const command = (state, dispatch, view) => {
|
|
358
|
+
const markType = documentMarkType(state, type);
|
|
359
|
+
return (isMarkActive(state, markType) ? removeMark(markType) : setMark(markType, {}))(state, dispatch, view);
|
|
360
|
+
};
|
|
323
361
|
if (!RUN_FORMATTING_MARK_NAMES.has(type.name)) return command;
|
|
324
|
-
return
|
|
362
|
+
return withRunFormattingLock(command, (state) => {
|
|
325
363
|
const markType = documentMarkType(state, type);
|
|
326
364
|
const formatting = marksToTextFormatting([markType.create()]);
|
|
327
365
|
if (!isMarkActive(state, markType)) return canonicalRunFormatting(state, formatting);
|
|
@@ -330,7 +368,7 @@ const toggleDocumentMark = (type) => {
|
|
|
330
368
|
});
|
|
331
369
|
};
|
|
332
370
|
/** UI toggle whose direct-formatting contract explicitly targets both script families. */
|
|
333
|
-
const toggleMarkForAllScripts = (type, property) =>
|
|
371
|
+
const toggleMarkForAllScripts = (type, property) => withRunFormattingLock((state, dispatch) => {
|
|
334
372
|
const markType = documentMarkType(state, type);
|
|
335
373
|
const enabled = !isMarkActive(state, markType);
|
|
336
374
|
return withRunFormattingOverride(toggleMark(markType), (attrs) => updatePairedToggleAttrs(attrs, property, enabled))(state, dispatch);
|
|
@@ -345,35 +383,37 @@ const toggleMarkForAllScripts = (type, property) => withCanonicalCommand((state,
|
|
|
345
383
|
});
|
|
346
384
|
});
|
|
347
385
|
/** UI size command whose direct-formatting contract explicitly targets both script families. */
|
|
348
|
-
const setFontSizeForAllScripts = (markType, size) =>
|
|
386
|
+
const setFontSizeForAllScripts = (markType, size) => withRunFormattingLock(withRunFormattingOverride(setMark(markType, { size }), (attrs) => updateFontSizeCompanionAttrs(attrs, size)), (state) => canonicalRunFormatting(state, {
|
|
349
387
|
fontSize: size,
|
|
350
388
|
fontSizeCs: size
|
|
351
389
|
}));
|
|
352
390
|
/** Clears both ordinary and complex-script direct size through the UI command boundary. */
|
|
353
|
-
const clearFontSizeForAllScripts = (markType) =>
|
|
391
|
+
const clearFontSizeForAllScripts = (markType) => withRunFormattingLock(withRunFormattingOverride(removeMark(markType), (attrs) => updateFontSizeCompanionAttrs(attrs, void 0)), (state) => canonicalRunFormatting(state, {
|
|
354
392
|
fontSize: null,
|
|
355
393
|
fontSizeCs: null
|
|
356
394
|
}));
|
|
357
395
|
function selectionHasVisibleUnderline(state, markType) {
|
|
358
|
-
const {
|
|
396
|
+
const { empty, $from } = state.selection;
|
|
359
397
|
if (empty) {
|
|
360
398
|
const mark = markType.isInSet(state.storedMarks ?? $from.marks());
|
|
361
399
|
return mark !== void 0 && mark.attrs["style"] !== "none";
|
|
362
400
|
}
|
|
363
401
|
let hasVisibleUnderline = false;
|
|
364
|
-
state.
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
402
|
+
canonicalSelectionRanges(state).forEach(({ from, to }) => {
|
|
403
|
+
state.doc.nodesBetween(from, to, (node) => {
|
|
404
|
+
if (!node.isText) return true;
|
|
405
|
+
const mark = markType.isInSet(node.marks);
|
|
406
|
+
if (mark && mark.attrs["style"] !== "none") {
|
|
407
|
+
hasVisibleUnderline = true;
|
|
408
|
+
return false;
|
|
409
|
+
}
|
|
410
|
+
return true;
|
|
411
|
+
});
|
|
372
412
|
});
|
|
373
413
|
return hasVisibleUnderline;
|
|
374
414
|
}
|
|
375
415
|
function toggleUnderlineMark(markType) {
|
|
376
|
-
return
|
|
416
|
+
return withRunFormattingLock((state, dispatch) => setMark(markType, { style: selectionHasVisibleUnderline(state, documentMarkType(state, markType)) ? "none" : "single" })(state, dispatch), (state) => canonicalSetMarkFormatting({
|
|
377
417
|
state,
|
|
378
418
|
type: markType,
|
|
379
419
|
attrs: { style: selectionHasVisibleUnderline(state, documentMarkType(state, markType)) ? "none" : "single" }
|
|
@@ -382,18 +422,25 @@ function toggleUnderlineMark(markType) {
|
|
|
382
422
|
function removeMark(type) {
|
|
383
423
|
const command = (state, dispatch) => {
|
|
384
424
|
const markType = documentMarkType(state, type);
|
|
385
|
-
const {
|
|
425
|
+
const { empty } = state.selection;
|
|
386
426
|
if (empty) {
|
|
387
427
|
if (dispatch) dispatchStoredMarks(state, dispatch, (state.storedMarks ?? state.selection.$from.marks()).filter((m) => m.type !== markType));
|
|
388
428
|
return true;
|
|
389
429
|
}
|
|
390
|
-
if (dispatch)
|
|
430
|
+
if (dispatch) {
|
|
431
|
+
let tr = state.tr;
|
|
432
|
+
canonicalSelectionRanges(state).forEach(({ from, to }) => {
|
|
433
|
+
tr = tr.removeMark(from, to, markType);
|
|
434
|
+
});
|
|
435
|
+
dispatch(tr.scrollIntoView());
|
|
436
|
+
}
|
|
391
437
|
return true;
|
|
392
438
|
};
|
|
393
439
|
if (!RUN_FORMATTING_MARK_NAMES.has(type.name)) return command;
|
|
394
|
-
return
|
|
440
|
+
return withRunFormattingLock(command, (state) => {
|
|
395
441
|
const formatting = marksToTextFormatting([documentMarkType(state, type).create()]);
|
|
396
|
-
|
|
442
|
+
const patch = Object.fromEntries(Object.keys(formatting).map((key) => [key, null]));
|
|
443
|
+
return canonicalRunFormatting(state, patch);
|
|
397
444
|
});
|
|
398
445
|
}
|
|
399
446
|
/**
|
|
@@ -401,28 +448,30 @@ function removeMark(type) {
|
|
|
401
448
|
*/
|
|
402
449
|
function isMarkActive(state, type, attrs) {
|
|
403
450
|
const markType = documentMarkType(state, type);
|
|
404
|
-
const {
|
|
451
|
+
const { empty } = state.selection;
|
|
405
452
|
if (empty) return (state.storedMarks ?? state.selection.$from.marks()).some((mark) => {
|
|
406
453
|
if (mark.type !== markType) return false;
|
|
407
454
|
if (!attrs) return true;
|
|
408
455
|
return Object.entries(attrs).every(([key, value]) => mark.attrs[key] === value);
|
|
409
456
|
});
|
|
410
457
|
let hasMark = false;
|
|
411
|
-
state.
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
if (
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
458
|
+
canonicalSelectionRanges(state).forEach(({ from, to }) => {
|
|
459
|
+
state.doc.nodesBetween(from, to, (node) => {
|
|
460
|
+
if (node.isText && !(RUN_FORMATTING_MARK_NAMES.has(markType.name) && node.marks.some((mark) => mark.type.name === "footnoteRef"))) {
|
|
461
|
+
const mark = markType.isInSet(node.marks);
|
|
462
|
+
if (mark) {
|
|
463
|
+
if (!attrs) {
|
|
464
|
+
hasMark = true;
|
|
465
|
+
return false;
|
|
466
|
+
}
|
|
467
|
+
if (Object.entries(attrs).every(([key, value]) => mark.attrs[key] === value)) {
|
|
468
|
+
hasMark = true;
|
|
469
|
+
return false;
|
|
470
|
+
}
|
|
422
471
|
}
|
|
423
472
|
}
|
|
424
|
-
|
|
425
|
-
|
|
473
|
+
return true;
|
|
474
|
+
});
|
|
426
475
|
});
|
|
427
476
|
return hasMark;
|
|
428
477
|
}
|
|
@@ -431,22 +480,24 @@ function isMarkActive(state, type, attrs) {
|
|
|
431
480
|
*/
|
|
432
481
|
function getMarkAttr(state, type, attr) {
|
|
433
482
|
const markType = documentMarkType(state, type);
|
|
434
|
-
const { empty, $from
|
|
483
|
+
const { empty, $from } = state.selection;
|
|
435
484
|
if (empty) {
|
|
436
485
|
const marks = state.storedMarks ?? $from.marks();
|
|
437
486
|
for (const mark of marks) if (mark.type === markType) return mark.attrs[attr];
|
|
438
487
|
return null;
|
|
439
488
|
}
|
|
440
489
|
let value = null;
|
|
441
|
-
state.
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
490
|
+
canonicalSelectionRanges(state).forEach(({ from, to }) => {
|
|
491
|
+
state.doc.nodesBetween(from, to, (node) => {
|
|
492
|
+
if (node.isText && value === null) {
|
|
493
|
+
const mark = markType.isInSet(node.marks);
|
|
494
|
+
if (mark) {
|
|
495
|
+
value = mark.attrs[attr];
|
|
496
|
+
return false;
|
|
497
|
+
}
|
|
447
498
|
}
|
|
448
|
-
|
|
449
|
-
|
|
499
|
+
return value === null;
|
|
500
|
+
});
|
|
450
501
|
});
|
|
451
502
|
return value;
|
|
452
503
|
}
|
|
@@ -562,8 +613,8 @@ function textFormattingToMarks(formatting, schema, options) {
|
|
|
562
613
|
* not formatting, and removing them deleted the comment's range, unlinked the
|
|
563
614
|
* text, orphaned the note and silently resolved the revision.
|
|
564
615
|
*/
|
|
565
|
-
const
|
|
566
|
-
const {
|
|
616
|
+
const clearFormattingCommand = (state, dispatch) => {
|
|
617
|
+
const { empty } = state.selection;
|
|
567
618
|
if (empty) {
|
|
568
619
|
if (dispatch) {
|
|
569
620
|
const tr = saveStoredMarksToParagraph(state, state.tr, []);
|
|
@@ -574,17 +625,30 @@ const clearFormatting = (state, dispatch) => {
|
|
|
574
625
|
}
|
|
575
626
|
if (dispatch) {
|
|
576
627
|
let tr = state.tr;
|
|
577
|
-
state.
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
628
|
+
canonicalSelectionRanges(state).forEach(({ from, to }) => {
|
|
629
|
+
state.doc.nodesBetween(from, to, (node, pos) => {
|
|
630
|
+
if (node.isText && node.marks.length > 0) {
|
|
631
|
+
const start = Math.max(from, pos);
|
|
632
|
+
const end = Math.min(to, pos + node.nodeSize);
|
|
633
|
+
for (const mark of node.marks) if (RUN_FORMATTING_MARK_NAMES.has(mark.type.name)) tr = tr.removeMark(start, end, mark.type);
|
|
634
|
+
}
|
|
635
|
+
});
|
|
583
636
|
});
|
|
584
637
|
dispatch(tr.scrollIntoView());
|
|
585
638
|
}
|
|
586
639
|
return true;
|
|
587
640
|
};
|
|
641
|
+
/** Clear character formatting from the selection. */
|
|
642
|
+
const clearFormatting = withRunFormattingLock(clearFormattingCommand, (state) => canonicalSelectionRanges(state).flatMap(({ from, to }) => selectRunFormattingCarrierRepresentations({
|
|
643
|
+
doc: state.doc,
|
|
644
|
+
from,
|
|
645
|
+
to
|
|
646
|
+
}).map((representation) => ({
|
|
647
|
+
type: "formatRun",
|
|
648
|
+
from: representation.from,
|
|
649
|
+
to: representation.to,
|
|
650
|
+
patch: Object.fromEntries(Object.keys(marksToTextFormatting(representation.node.marks)).map((key) => [key, null]))
|
|
651
|
+
}))));
|
|
588
652
|
/**
|
|
589
653
|
* Create a command that sets a mark on the selection
|
|
590
654
|
*/
|
|
@@ -598,4 +662,4 @@ function createRemoveMarkCommand(markType) {
|
|
|
598
662
|
return removeMark(markType);
|
|
599
663
|
}
|
|
600
664
|
//#endregion
|
|
601
|
-
export { clearFontSizeForAllScripts, clearFormatting, createRemoveMarkCommand, createSetMarkCommand, getMarkAttr, isMarkActive, marksToTextFormatting, removeMark, setFontSizeForAllScripts, setMark, textFormattingToMarks, toggleDocumentMark, toggleMarkForAllScripts, toggleUnderlineMark };
|
|
665
|
+
export { canonicalSetMarkFormatting, clearFontSizeForAllScripts, clearFormatting, createRemoveMarkCommand, createSetMarkCommand, getMarkAttr, isMarkActive, marksToTextFormatting, removeMark, setFontSizeForAllScripts, setMark, textFormattingToMarks, toggleDocumentMark, toggleMarkForAllScripts, toggleUnderlineMark, withRunFormattingLock };
|
|
@@ -5,8 +5,8 @@ type DeletionRange = {
|
|
|
5
5
|
to: number;
|
|
6
6
|
};
|
|
7
7
|
/** Keep the text carrying one OOXML note reference together during deletion. */
|
|
8
|
-
declare const expandNoteReferenceDeletionRange: (doc: Node, from: number, to: number) => DeletionRange | null;
|
|
8
|
+
export declare const expandNoteReferenceDeletionRange: (doc: Node, from: number, to: number) => DeletionRange | null;
|
|
9
9
|
/** Each whole note reference [`from`, `to`) of `doc` touches, in document order. */
|
|
10
|
-
declare const noteReferenceRanges: (doc: Node, from: number, to: number) => DeletionRange[];
|
|
10
|
+
export declare const noteReferenceRanges: (doc: Node, from: number, to: number) => DeletionRange[];
|
|
11
11
|
//#endregion
|
|
12
|
-
export {
|
|
12
|
+
export {};
|
|
@@ -22,8 +22,11 @@ import { NodeExtension } from "../types.js";
|
|
|
22
22
|
* integrity pass in `BookmarkBoundaryExtension` reads both node types together;
|
|
23
23
|
* a rule enforced here would see half of each such pair and delete it.
|
|
24
24
|
*/
|
|
25
|
+
type BlockBookmarkBoundaryOptions = {
|
|
26
|
+
getInternalClipboardToken?: () => string;
|
|
27
|
+
};
|
|
25
28
|
/** The node name, for callers asking what a block container holds. */
|
|
26
|
-
declare const BLOCK_BOOKMARK_BOUNDARY_NODE_NAME = "blockBookmarkBoundary";
|
|
27
|
-
declare const BlockBookmarkBoundaryExtension: (options?: Partial<
|
|
29
|
+
export declare const BLOCK_BOOKMARK_BOUNDARY_NODE_NAME = "blockBookmarkBoundary";
|
|
30
|
+
export declare const BlockBookmarkBoundaryExtension: (options?: Partial<BlockBookmarkBoundaryOptions> | undefined) => NodeExtension;
|
|
28
31
|
//#endregion
|
|
29
|
-
export {
|
|
32
|
+
export {};
|