@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,10 +1,11 @@
|
|
|
1
|
+
import { removeCommentMarkers } from "../../docx/commentAnchorIndex.js";
|
|
1
2
|
import { joinCommentRangesAcrossParagraphs } from "../../docx/commentRangeJoin.js";
|
|
2
3
|
import { completeCommentReferences } from "../../docx/commentReferenceCompletion.js";
|
|
3
4
|
import { buildSections } from "../../docx/documentParser.js";
|
|
4
5
|
import { normalizeFoldedListNumbers } from "../../docx/foldedListNumberFields.js";
|
|
5
6
|
import { getDocumentSourceStyles } from "../../docx/headerFooterVerbatim.js";
|
|
6
7
|
import { EDITED_PREVIEW_FINGERPRINT, imageRawXmlFingerprint } from "../../docx/imageRawXml.js";
|
|
7
|
-
import { isInlineSdtContent, isSimpleFieldContent } from "../../docx/inlineWrapperContent.js";
|
|
8
|
+
import { isHyperlinkContent, isInlineSdtContent, isSimpleFieldContent } from "../../docx/inlineWrapperContent.js";
|
|
8
9
|
import { paragraphNumberingReferenceId, sameStatedParagraphNumbering as sameStatedParagraphNumbering$1 } from "../../docx/numberingReference.js";
|
|
9
10
|
import { PROSE_PARAGRAPH_SOURCE_CONTRACT_ATTR, ParagraphPropertySourceValidationError, assignParagraphIndentationProjection, copyDocumentParagraphPropertySourceContract, copyDocumentParagraphPropertySources, copyParagraphPropertyCapture, copyParagraphPropertySource, decodeTableCellParagraphSourcePayload, getDocumentParagraphPropertySourceContract, getParagraphPropertySource, getParagraphPropertySourceCandidate, getParagraphPropertySourceToken, getParagraphPropertySourceTransferId, getProseDocumentParagraphPropertySourceContract, getProseParagraphPropertySourceToken, inspectParagraphSourceIdentity, isParagraphPropertySourceToken, linkParagraphPropertySourceCandidate, paragraphFormattingWithAuthoredIndentation, paragraphPropertySourceTokenMatchesContract, recreateProseNodeWithParagraphPropertySource, restoreTableCellsWithParagraphPropertySources, visitDocumentStoryParagraphs, visitTableCellParagraphPropertySourceBindings } from "../../docx/paragraphPropertySource.js";
|
|
10
11
|
import { BLOCK_TREE_DESCENT, visitBlockTreeRecords, visitDocxParagraphs } from "../../docx/paragraphTraversal.js";
|
|
@@ -20,18 +21,22 @@ import { canonicalJson } from "../../utils/canonicalJson.js";
|
|
|
20
21
|
import { getFindParagraphText } from "../../utils/findReplace.js";
|
|
21
22
|
import { mergeTextFormatting } from "../../utils/textFormattingMerge.js";
|
|
22
23
|
import { emuToPixels, emuToStrokePixels, pixelsToEmu } from "../../utils/units.js";
|
|
23
|
-
import { unchangedAlternateContentXml } from "../alternateContentAttrs.js";
|
|
24
|
+
import { editedAlternateContent, unchangedAlternateContentXml } from "../alternateContentAttrs.js";
|
|
24
25
|
import { expectBlockCustomXmlAttrs, expectBlockSdtAttrs, expectCharacterStyleMarkAttrs, expectCommentMarkAttrs, expectFieldAttrs, expectFootnoteRefMarkAttrs, expectHardBreakAttrs, expectHyperlinkMarkAttrs, expectImageAttrs, expectInlineWrapperMarkAttrs, expectMathAttrs, expectPageBreakRunAttrs, expectParagraphAttrs, expectPreservedBlockAttrs, expectPreservedXmlAttrs, expectRunIdentityMarkAttrs, expectRunPropertyChangeMarkAttrs, expectSdtAttrs, expectShapeAttrs, expectSymbolAttrs, expectTabAttrs, expectTableAttrs, expectTableCellAttrs, expectTableRowAttrs, expectTextBoxAttrs, expectTrackedChangeMarkAttrs } from "../attrs/index.js";
|
|
25
26
|
import { readAuthoredTransform } from "../authoredTransformAttrs.js";
|
|
26
27
|
import { autospacingMatchesBase, hasAutospacingBaseSide } from "../autospacingBase.js";
|
|
27
28
|
import { bookmarkMarkerFromAttrs, expectBookmarkBoundaryAttrs } from "../bookmarkBoundaryAttrs.js";
|
|
28
29
|
import { paragraphRejectAttrPatch, paragraphRejectOriginalFormatting, removeParagraphPropertyChanges } from "../commands/propertyChangeScope.js";
|
|
30
|
+
import { trackedCommentBoundaryOwner } from "../commentBoundaryOwnership.js";
|
|
31
|
+
import { expectCommentRangeBoundaryAttrs } from "../commentRangeBoundaryAttrs.js";
|
|
29
32
|
import { expectCommentReferenceAttrs } from "../commentReferenceAttrs.js";
|
|
30
33
|
import { enclosingRevisionIds } from "../contentControlRevisions.js";
|
|
31
34
|
import { INLINE_WRAPPER_MARK_NAME } from "../extensions/marks/InlineWrapperExtension.js";
|
|
32
35
|
import { textFormattingToMarks } from "../extensions/marks/markUtils.js";
|
|
36
|
+
import "../extensions/nodes/CommentRangeBoundaryExtension.js";
|
|
33
37
|
import "../extensions/nodes/MoveRangeBoundaryExtension.js";
|
|
34
38
|
import "../extensions/nodes/RangeAnchorExtension.js";
|
|
39
|
+
import { fieldCommentCoverage } from "../fieldRepresentation.js";
|
|
35
40
|
import { inlineWrapperMember, inlineWrapperStackKey } from "../inlineWrapperStack.js";
|
|
36
41
|
import { completeNumberingForDoc } from "../listInstanceReferences.js";
|
|
37
42
|
import { LIST_RENDERING_ATTR_KEYS, hasListRendering, listRenderingFromAttrs as listRenderingFromAttrs$1 } from "../listRenderingAttrs.js";
|
|
@@ -52,13 +57,14 @@ import { PRESERVED_XML_LEVELS } from "../schema/nodes.js";
|
|
|
52
57
|
import { parseShapeGeometryAdjustments } from "../shapeGeometryAdjustments.js";
|
|
53
58
|
import { expectTextBoxAnchorAttrs } from "../textBoxAnchorAttrs.js";
|
|
54
59
|
import { textBoxHostParagraph } from "../textBoxHostParagraph.js";
|
|
55
|
-
import { enclosingInsertionAncestors, inlineWrapperStackOf } from "../trackedRevisionPath.js";
|
|
60
|
+
import { enclosingInsertionAncestors, inlineWrapperStackOf, trackedRevisionLayerOf } from "../trackedRevisionPath.js";
|
|
56
61
|
import { assertValidProseMirrorDocument } from "../validation.js";
|
|
57
62
|
import { hasSinkChildren } from "./preservedSinkCarriers.js";
|
|
58
63
|
import { decodeSdtListItems, sdtPropertiesFromAttrs, sdtPropertiesMatchAttrs } from "./sdtAttrs.js";
|
|
59
64
|
import { TaggedError, panic } from "better-result";
|
|
60
|
-
import { DRAWING_RAW_XML_MODES, relationshipIdOf } from "@stll/docx-core/model";
|
|
65
|
+
import { DRAWING_RAW_XML_MODES, finalizeParagraphFormatting, relationshipIdOf, setDocumentBodyComments } from "@stll/docx-core/model";
|
|
61
66
|
import { Fragment } from "prosemirror-model";
|
|
67
|
+
import { survivingComments } from "@stll/docx-core/ops";
|
|
62
68
|
//#region src/prosemirror/conversion/fromProseDoc.ts
|
|
63
69
|
/**
|
|
64
70
|
* ProseMirror to Document Conversion
|
|
@@ -396,11 +402,14 @@ function fromProseDoc(pmDoc, baseDocument, { stylesheetSource, reuse = "none" })
|
|
|
396
402
|
const linkedSources = restoreLinkedParagraphPropertySources(blocks);
|
|
397
403
|
if (tokenSources) restoreParagraphPropertySourcesByToken(blocks, tokenSources);
|
|
398
404
|
else if (baseDocument) restoreParagraphPropertySources(blocks, baseDocument.package.document.content, linkedSources.targets, linkedSources.sources);
|
|
405
|
+
visitDocxParagraphs({ documentBody: { content: blocks } }, (paragraph) => {
|
|
406
|
+
if (finalizeParagraphFormatting(paragraph.formatting) === void 0) delete paragraph.formatting;
|
|
407
|
+
});
|
|
399
408
|
const documentBody = { content: blocks };
|
|
400
409
|
if (baseDocument?.package.document.background) documentBody.background = baseDocument.package.document.background;
|
|
401
410
|
if (baseDocument?.package.document.finalSectionProperties) documentBody.finalSectionProperties = baseDocument.package.document.finalSectionProperties;
|
|
402
411
|
if (baseDocument?.package.document.sections) documentBody.sections = buildSections(blocks, documentBody.finalSectionProperties);
|
|
403
|
-
if (baseDocument?.package.document.comments) documentBody
|
|
412
|
+
if (baseDocument?.package.document.comments) setDocumentBodyComments(documentBody, baseDocument.package.document.comments);
|
|
404
413
|
const numbering = completeNumberingForDoc(baseDocument?.package.numbering, pmDoc);
|
|
405
414
|
if (baseDocument) {
|
|
406
415
|
const updatedDocument = {
|
|
@@ -412,6 +421,17 @@ function fromProseDoc(pmDoc, baseDocument, { stylesheetSource, reuse = "none" })
|
|
|
412
421
|
...numbering ? { numbering } : {}
|
|
413
422
|
}
|
|
414
423
|
};
|
|
424
|
+
const projectedCommentIds = /* @__PURE__ */ new Set();
|
|
425
|
+
pmDoc.descendants((node) => {
|
|
426
|
+
for (const commentId of getCommentMarkIds(node.marks)) projectedCommentIds.add(commentId);
|
|
427
|
+
});
|
|
428
|
+
const comments = survivingComments(updatedDocument, projectedCommentIds);
|
|
429
|
+
const keptIds = new Set(comments.map(({ id }) => id));
|
|
430
|
+
const retiredIds = new Set((updatedDocument.package.document.comments ?? []).filter(({ id }) => !keptIds.has(id)).map(({ id }) => id));
|
|
431
|
+
if (retiredIds.size > 0) {
|
|
432
|
+
updatedDocument.package.document.content = removeCommentMarkers(updatedDocument.package.document.content, retiredIds);
|
|
433
|
+
setDocumentBodyComments(updatedDocument.package.document, comments);
|
|
434
|
+
}
|
|
415
435
|
copyDocumentParagraphPropertySourceContract(updatedDocument, baseDocument);
|
|
416
436
|
return updatedDocument;
|
|
417
437
|
}
|
|
@@ -453,11 +473,12 @@ function stripSuggestedInlineMarks(marks, readFormattingContext) {
|
|
|
453
473
|
},
|
|
454
474
|
...previousFormatting !== void 0 ? { directFormatting: previousFormatting } : {}
|
|
455
475
|
});
|
|
456
|
-
const
|
|
476
|
+
const styleFormatting = preservedCharacterStyleAttrs ? resolveEffectiveRunStyleFormatting({
|
|
457
477
|
marks,
|
|
458
478
|
paragraphFormatting,
|
|
459
479
|
styleResolver
|
|
460
|
-
}) : paragraphFormatting
|
|
480
|
+
}) : paragraphFormatting;
|
|
481
|
+
const effectivePreviousFormatting = mergeTextFormatting(styleFormatting, previousFormatting);
|
|
461
482
|
next = next.filter((mark) => !RUN_FORMATTING_MARK_NAMES.has(mark.type.name));
|
|
462
483
|
for (const restored of textFormattingToMarks(effectivePreviousFormatting, suggestedRunPropertyChange.type.schema, {
|
|
463
484
|
overrideFormatting: previousFormatting,
|
|
@@ -705,6 +726,9 @@ function extractBlocks(inputDoc, refResolution = "resolve", styleResolver = null
|
|
|
705
726
|
} else if (node.type.name === "blockBookmarkBoundary") {
|
|
706
727
|
blocks.push(blockBookmarkMarker(node));
|
|
707
728
|
previousStandaloneTextBox = null;
|
|
729
|
+
} else if (node.type.name === "blockMoveRangeBoundary") {
|
|
730
|
+
blocks.push({ ...expectMoveRangeBoundaryAttrs(node) });
|
|
731
|
+
previousStandaloneTextBox = null;
|
|
708
732
|
}
|
|
709
733
|
});
|
|
710
734
|
if (pendingPageBreaks > 0 && !appendPendingPageBreaksToPreviousParagraph()) flushPendingPageBreaks();
|
|
@@ -955,15 +979,14 @@ function replaceTextBoxAnchorInBlocks(blocks, marker, textBoxRun) {
|
|
|
955
979
|
* The inline list a text-box anchor run can be spliced out of, or nothing when
|
|
956
980
|
* the item holds no such list.
|
|
957
981
|
*
|
|
958
|
-
*
|
|
959
|
-
*
|
|
960
|
-
* would have to pick a side. The marker stays where it is and
|
|
961
|
-
* `removeUnresolvedTextBoxAnchors` leaves it, as before.
|
|
982
|
+
* Only a complex field's displayed result is projected into the editor, so
|
|
983
|
+
* its anchors belong to `fieldResult`; its instruction runs stay untouched.
|
|
962
984
|
*/
|
|
963
985
|
const textBoxAnchorHost = (item) => {
|
|
964
986
|
switch (item.type) {
|
|
965
987
|
case "hyperlink": return item.children;
|
|
966
988
|
case "simpleField": return item.content;
|
|
989
|
+
case "complexField": return item.fieldResult;
|
|
967
990
|
case "inlineSdt":
|
|
968
991
|
case "insertion":
|
|
969
992
|
case "deletion":
|
|
@@ -971,7 +994,6 @@ const textBoxAnchorHost = (item) => {
|
|
|
971
994
|
case "moveTo":
|
|
972
995
|
case "inlineWrapper": return item.content;
|
|
973
996
|
case "run":
|
|
974
|
-
case "complexField":
|
|
975
997
|
case "bookmarkStart":
|
|
976
998
|
case "bookmarkEnd":
|
|
977
999
|
case "commentRangeStart":
|
|
@@ -987,16 +1009,22 @@ const textBoxAnchorHost = (item) => {
|
|
|
987
1009
|
}
|
|
988
1010
|
};
|
|
989
1011
|
function editTextBoxAnchorInContent(content, marker, replacement) {
|
|
1012
|
+
const anchorSlot = marker.content.at(0);
|
|
1013
|
+
if (!anchorSlot) return false;
|
|
990
1014
|
for (const [index, item] of content.entries()) {
|
|
991
|
-
if (item ===
|
|
992
|
-
content.
|
|
993
|
-
|
|
1015
|
+
if (item.type === "run") {
|
|
1016
|
+
const slotIndex = item.content.indexOf(anchorSlot);
|
|
1017
|
+
if (slotIndex >= 0) {
|
|
1018
|
+
item.content.splice(slotIndex, 1, ...replacement?.content ?? []);
|
|
1019
|
+
if (item.content.length === 0) content.splice(index, 1);
|
|
1020
|
+
return true;
|
|
1021
|
+
}
|
|
994
1022
|
}
|
|
995
1023
|
const nestedContent = textBoxAnchorHost(item);
|
|
996
1024
|
if (!nestedContent) continue;
|
|
997
1025
|
const hadContent = nestedContent.length > 0;
|
|
998
1026
|
if (editTextBoxAnchorInContent(nestedContent, marker, replacement)) {
|
|
999
|
-
if (!replacement && hadContent && nestedContent.length === 0) content.splice(index, 1);
|
|
1027
|
+
if (!replacement && hadContent && nestedContent.length === 0 && item.type !== "simpleField" && item.type !== "complexField") content.splice(index, 1);
|
|
1000
1028
|
return true;
|
|
1001
1029
|
}
|
|
1002
1030
|
}
|
|
@@ -1126,6 +1154,9 @@ function convertPMParagraph(node, documentCounts, textBoxAnchorMarkers, styleRes
|
|
|
1126
1154
|
if (attrs._propertyChanges && attrs._propertyChanges.length > 0) paragraph.propertyChanges = attrs._propertyChanges.map(propertyChangeFromAttrs);
|
|
1127
1155
|
if (attrs.pPrMark) paragraph.pPrMark = attrs.pPrMark;
|
|
1128
1156
|
if (attrs._preservedAttributes && attrs._preservedAttributes.length > 0) paragraph.preservedAttributes = attrs._preservedAttributes;
|
|
1157
|
+
const finalizedFormatting = finalizeParagraphFormatting(paragraph.formatting);
|
|
1158
|
+
if (finalizedFormatting === void 0) delete paragraph.formatting;
|
|
1159
|
+
else paragraph.formatting = finalizedFormatting;
|
|
1129
1160
|
linkParagraphPropertySourceCandidate(paragraph, node);
|
|
1130
1161
|
return paragraph;
|
|
1131
1162
|
}
|
|
@@ -1203,7 +1234,7 @@ function assignParagraphIndentation(result, attrs, orig) {
|
|
|
1203
1234
|
else result[key] = value;
|
|
1204
1235
|
}
|
|
1205
1236
|
const hanging = result.indentFirstLine !== void 0 && attrs.hangingIndent === true;
|
|
1206
|
-
if (!changed && hanging === (orig.hangingIndent === true)) return;
|
|
1237
|
+
if (!changed && hanging === (orig.hangingIndent === true) && !(result.indentFirstLine !== void 0 && orig.hangingIndent === false)) return;
|
|
1207
1238
|
if (hanging) result.hangingIndent = true;
|
|
1208
1239
|
else Reflect.deleteProperty(result, "hangingIndent");
|
|
1209
1240
|
}
|
|
@@ -1237,16 +1268,24 @@ function paragraphAttrsToFormatting(attrs) {
|
|
|
1237
1268
|
if (typeof spaceAfter === "number") result.spaceAfter = spaceAfter;
|
|
1238
1269
|
else delete result.spaceAfter;
|
|
1239
1270
|
}
|
|
1240
|
-
if (orig.spaceBefore !== void 0 || attrs.spacingExplicit?.before)
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1271
|
+
if (orig.spaceBefore !== void 0 || attrs.spacingExplicit?.before) {
|
|
1272
|
+
if (typeof spaceBefore === "number") result.spaceBefore = spaceBefore;
|
|
1273
|
+
else Reflect.deleteProperty(result, "spaceBefore");
|
|
1274
|
+
}
|
|
1275
|
+
if (orig.spaceAfter !== void 0 || attrs.spacingExplicit?.after) {
|
|
1276
|
+
if (typeof spaceAfter === "number") result.spaceAfter = spaceAfter;
|
|
1277
|
+
else Reflect.deleteProperty(result, "spaceAfter");
|
|
1278
|
+
}
|
|
1244
1279
|
const originalHasDirectLineSpacing = orig.lineSpacing !== void 0;
|
|
1245
|
-
if (hasDirectLineSpacing || originalHasDirectLineSpacing)
|
|
1246
|
-
|
|
1280
|
+
if (hasDirectLineSpacing || originalHasDirectLineSpacing) {
|
|
1281
|
+
if (typeof attrs.lineSpacing === "number") result.lineSpacing = attrs.lineSpacing;
|
|
1282
|
+
else Reflect.deleteProperty(result, "lineSpacing");
|
|
1283
|
+
}
|
|
1247
1284
|
const originalHasDirectLineSpacingRule = orig.lineSpacingRule !== void 0;
|
|
1248
|
-
if (hasDirectLineSpacingRule || originalHasDirectLineSpacingRule)
|
|
1249
|
-
|
|
1285
|
+
if (hasDirectLineSpacingRule || originalHasDirectLineSpacingRule) {
|
|
1286
|
+
if (attrs.lineSpacingRule) result.lineSpacingRule = attrs.lineSpacingRule;
|
|
1287
|
+
else Reflect.deleteProperty(result, "lineSpacingRule");
|
|
1288
|
+
}
|
|
1250
1289
|
if (directAlignment === void 0) Reflect.deleteProperty(result, "alignment");
|
|
1251
1290
|
else result.alignment = directAlignment;
|
|
1252
1291
|
const statedNumbering = attrs.numPr;
|
|
@@ -1257,9 +1296,14 @@ function paragraphAttrsToFormatting(attrs) {
|
|
|
1257
1296
|
if (statedNumbering !== void 0) result.numPr = statedNumbering;
|
|
1258
1297
|
else delete result.numPr;
|
|
1259
1298
|
delete result.numPrFromStyle;
|
|
1299
|
+
} else if (!sameStatedParagraphNumbering$1(attrs.numPrFromStyle ?? void 0, orig.numPrFromStyle)) {
|
|
1300
|
+
if (attrs.numPrFromStyle == null) delete result.numPrFromStyle;
|
|
1301
|
+
else result.numPrFromStyle = attrs.numPrFromStyle;
|
|
1302
|
+
}
|
|
1303
|
+
if (attrs.styleId !== (orig.styleId ?? void 0)) {
|
|
1304
|
+
if (attrs.styleId) result.styleId = attrs.styleId;
|
|
1305
|
+
else delete result.styleId;
|
|
1260
1306
|
}
|
|
1261
|
-
if (attrs.styleId !== (orig.styleId ?? void 0)) if (attrs.styleId) result.styleId = attrs.styleId;
|
|
1262
|
-
else delete result.styleId;
|
|
1263
1307
|
assignParagraphIndentation(result, attrs, orig);
|
|
1264
1308
|
assignBooleanToggle(result, attrs, orig, "pageBreakBefore");
|
|
1265
1309
|
assignBooleanToggle(result, attrs, orig, "widowControl");
|
|
@@ -1268,14 +1312,20 @@ function paragraphAttrsToFormatting(attrs) {
|
|
|
1268
1312
|
assignBooleanToggle(result, attrs, orig, "runInWithNext");
|
|
1269
1313
|
assignBooleanToggle(result, attrs, orig, "snapToGrid");
|
|
1270
1314
|
assignBooleanToggle(result, attrs, orig, "kinsoku");
|
|
1315
|
+
assignBooleanToggle(result, attrs, orig, "autoSpaceDE");
|
|
1316
|
+
assignBooleanToggle(result, attrs, orig, "autoSpaceDN");
|
|
1271
1317
|
assignBooleanToggle(result, attrs, orig, "overflowPunctuation");
|
|
1272
1318
|
assignBooleanToggle(result, attrs, orig, "suppressAutoHyphens");
|
|
1273
|
-
if (attrs.spacingExplicit !== orig.spacingExplicit)
|
|
1274
|
-
|
|
1319
|
+
if (attrs.spacingExplicit !== orig.spacingExplicit) {
|
|
1320
|
+
if (attrs.spacingExplicit) result.spacingExplicit = attrs.spacingExplicit;
|
|
1321
|
+
else delete result.spacingExplicit;
|
|
1322
|
+
}
|
|
1275
1323
|
const bidi = authoredParagraphValue("bidi", directionToAuthoredBidi(attrs.direction), orig, attrs._resolvedFormatting);
|
|
1276
|
-
if (bidi !== (orig.bidi ?? void 0))
|
|
1277
|
-
|
|
1278
|
-
|
|
1324
|
+
if (bidi !== (orig.bidi ?? void 0)) {
|
|
1325
|
+
if (bidi === void 0) delete result.bidi;
|
|
1326
|
+
else result.bidi = bidi;
|
|
1327
|
+
}
|
|
1328
|
+
return finalizeParagraphFormatting(result);
|
|
1279
1329
|
}
|
|
1280
1330
|
const resolved = attrs._resolvedFormatting;
|
|
1281
1331
|
const authored = (field, value) => authoredParagraphValue(field, value ?? void 0, void 0, resolved);
|
|
@@ -1300,9 +1350,11 @@ function paragraphAttrsToFormatting(attrs) {
|
|
|
1300
1350
|
const keepLines = authored("keepLines", attrs.keepLines);
|
|
1301
1351
|
const runInWithNext = authored("runInWithNext", attrs.runInWithNext);
|
|
1302
1352
|
const kinsoku = authored("kinsoku", attrs.kinsoku);
|
|
1353
|
+
const autoSpaceDE = authored("autoSpaceDE", attrs.autoSpaceDE);
|
|
1354
|
+
const autoSpaceDN = authored("autoSpaceDN", attrs.autoSpaceDN);
|
|
1303
1355
|
const overflowPunctuation = authored("overflowPunctuation", attrs.overflowPunctuation);
|
|
1304
1356
|
const suppressAutoHyphens = authored("suppressAutoHyphens", attrs.suppressAutoHyphens);
|
|
1305
|
-
if (!(directAlignment !== void 0 || shouldSerializeSpaceBefore || shouldSerializeSpaceAfter || beforeAutospacingEdited || afterAutospacingEdited || hasDirectLineSpacing || hasDirectLineSpacingRule || snapToGrid != null || indentLeft !== void 0 || indentRight || indentFirstLine !== void 0 || attrs.numPr || attrs.styleId || borders || shading || tabs || outlineLevel !== void 0 || contextualSpacing || attrs.spacingExplicit || bidi != null || pageBreakBefore != null || widowControl != null || keepNext != null || keepLines != null || runInWithNext != null || kinsoku != null || overflowPunctuation != null || suppressAutoHyphens != null)) return;
|
|
1357
|
+
if (!(directAlignment !== void 0 || shouldSerializeSpaceBefore || shouldSerializeSpaceAfter || beforeAutospacingEdited || afterAutospacingEdited || hasDirectLineSpacing || hasDirectLineSpacingRule || snapToGrid != null || indentLeft !== void 0 || indentRight || indentFirstLine !== void 0 || attrs.numPr || attrs.styleId || borders || shading || tabs || outlineLevel !== void 0 || contextualSpacing || attrs.spacingExplicit || bidi != null || pageBreakBefore != null || widowControl != null || keepNext != null || keepLines != null || runInWithNext != null || kinsoku != null || autoSpaceDE != null || autoSpaceDN != null || overflowPunctuation != null || suppressAutoHyphens != null)) return;
|
|
1306
1358
|
const f = {};
|
|
1307
1359
|
if (directAlignment !== void 0) f.alignment = directAlignment;
|
|
1308
1360
|
if (shouldSerializeSpaceBefore) f.spaceBefore = spaceBefore;
|
|
@@ -1331,9 +1383,11 @@ function paragraphAttrsToFormatting(attrs) {
|
|
|
1331
1383
|
if (keepLines != null) f.keepLines = keepLines;
|
|
1332
1384
|
if (runInWithNext != null) f.runInWithNext = runInWithNext;
|
|
1333
1385
|
if (kinsoku != null) f.kinsoku = kinsoku;
|
|
1386
|
+
if (autoSpaceDE != null) f.autoSpaceDE = autoSpaceDE;
|
|
1387
|
+
if (autoSpaceDN != null) f.autoSpaceDN = autoSpaceDN;
|
|
1334
1388
|
if (overflowPunctuation != null) f.overflowPunctuation = overflowPunctuation;
|
|
1335
1389
|
if (suppressAutoHyphens != null) f.suppressAutoHyphens = suppressAutoHyphens;
|
|
1336
|
-
return f;
|
|
1390
|
+
return finalizeParagraphFormatting(f);
|
|
1337
1391
|
}
|
|
1338
1392
|
function createTrackedRunWrapper({ type, info, child, resolutionJoins }) {
|
|
1339
1393
|
const content = child ? [child] : [];
|
|
@@ -1528,7 +1582,7 @@ const nestInlineWrapperGroups = (items, groups, hyperlinkIndices, revisionOuterW
|
|
|
1528
1582
|
}
|
|
1529
1583
|
return coalesced;
|
|
1530
1584
|
};
|
|
1531
|
-
function extractParagraphContent(originalParagraph, _documentCounts, emptyHyperlinks, textBoxAnchorMarkers, skipLeadingRenderedPageBreak = false, inheritedFormattingOverride) {
|
|
1585
|
+
function extractParagraphContent(originalParagraph, _documentCounts, emptyHyperlinks, textBoxAnchorMarkers, skipLeadingRenderedPageBreak = false, inheritedFormattingOverride, structuredCommentRangeScope) {
|
|
1532
1586
|
const paragraph = coalesceNoteReferenceOccurrences(originalParagraph);
|
|
1533
1587
|
const content = [];
|
|
1534
1588
|
const paragraphStyleContext = inheritedFormattingOverride === void 0 && paragraph.type.name === "paragraph" ? savedParagraphRunStyleContext(paragraph) : void 0;
|
|
@@ -1559,7 +1613,8 @@ function extractParagraphContent(originalParagraph, _documentCounts, emptyHyperl
|
|
|
1559
1613
|
const sourceHyperlinkIndices = /* @__PURE__ */ new WeakMap();
|
|
1560
1614
|
const revisionOuterWrapperCounts = /* @__PURE__ */ new WeakMap();
|
|
1561
1615
|
const revisionAncestorsByWrapper = /* @__PURE__ */ new WeakMap();
|
|
1562
|
-
const openedComments =
|
|
1616
|
+
const openedComments = new Set(structuredCommentRangeScope?.openedBefore ?? []);
|
|
1617
|
+
let precedingTrackedCommentRangeBoundaries;
|
|
1563
1618
|
const createIndexedHyperlink = (mark) => {
|
|
1564
1619
|
const hyperlink = createHyperlink(mark);
|
|
1565
1620
|
const index = expectHyperlinkMarkAttrs(mark)._docxHyperlinkIndex;
|
|
@@ -1567,9 +1622,20 @@ function extractParagraphContent(originalParagraph, _documentCounts, emptyHyperl
|
|
|
1567
1622
|
return hyperlink;
|
|
1568
1623
|
};
|
|
1569
1624
|
const commentLastOffset = /* @__PURE__ */ new Map();
|
|
1625
|
+
let hasInlineSdt = false;
|
|
1570
1626
|
paragraph.forEach((node, offset) => {
|
|
1627
|
+
hasInlineSdt ||= node.type.name === "sdt";
|
|
1571
1628
|
for (const commentId of getCommentMarkIds(node.marks)) commentLastOffset.set(commentId, offset);
|
|
1572
1629
|
});
|
|
1630
|
+
let structuredCommentLastOffset = structuredCommentRangeScope?.lastOffsetByCommentId ?? /* @__PURE__ */ new Map();
|
|
1631
|
+
if (!structuredCommentRangeScope && hasInlineSdt) {
|
|
1632
|
+
const lastOffsetByCommentId = /* @__PURE__ */ new Map();
|
|
1633
|
+
paragraph.descendants((node, offset) => {
|
|
1634
|
+
for (const commentId of getCommentMarkIds(node.marks)) lastOffsetByCommentId.set(commentId, offset);
|
|
1635
|
+
return true;
|
|
1636
|
+
});
|
|
1637
|
+
structuredCommentLastOffset = lastOffsetByCommentId;
|
|
1638
|
+
}
|
|
1573
1639
|
const flushCurrentInline = () => {
|
|
1574
1640
|
if (currentRun) {
|
|
1575
1641
|
content.push(currentRun);
|
|
@@ -1605,8 +1671,80 @@ function extractParagraphContent(originalParagraph, _documentCounts, emptyHyperl
|
|
|
1605
1671
|
currentMarksKey = marksKey;
|
|
1606
1672
|
rememberSourceRunOwner(run, node, sourceRunOwners);
|
|
1607
1673
|
};
|
|
1674
|
+
const trackedBoundary = (node) => {
|
|
1675
|
+
const boundaryInsertionMark = node.marks.find((mark) => mark.type.name === "insertion");
|
|
1676
|
+
const boundaryDeletionMark = node.marks.find((mark) => mark.type.name === "deletion");
|
|
1677
|
+
const boundaryChangeMark = boundaryDeletionMark ?? boundaryInsertionMark;
|
|
1678
|
+
if (!boundaryChangeMark) return void 0;
|
|
1679
|
+
const changeAttrs = expectTrackedChangeMarkAttrs(boundaryChangeMark);
|
|
1680
|
+
const info = {
|
|
1681
|
+
id: changeAttrs.revisionId,
|
|
1682
|
+
author: changeAttrs.author || "Unknown",
|
|
1683
|
+
...changeAttrs.date ? { date: changeAttrs.date } : {},
|
|
1684
|
+
...changeAttrs.utcDate ? { utcDate: {
|
|
1685
|
+
attribute: DATE_UTC_ATTRIBUTE,
|
|
1686
|
+
value: changeAttrs.utcDate
|
|
1687
|
+
} } : {},
|
|
1688
|
+
...changeAttrs.initials ? { initials: changeAttrs.initials } : {}
|
|
1689
|
+
};
|
|
1690
|
+
let type;
|
|
1691
|
+
if (boundaryDeletionMark) type = changeAttrs.moveKind === "moveFrom" ? "moveFrom" : "deletion";
|
|
1692
|
+
else type = changeAttrs.moveKind === "moveTo" ? "moveTo" : "insertion";
|
|
1693
|
+
const revisionAncestors = enclosingInsertionAncestors({
|
|
1694
|
+
insertionMark: boundaryDeletionMark ? boundaryInsertionMark : void 0,
|
|
1695
|
+
ancestors: changeAttrs._docxRevisionAncestors ?? [],
|
|
1696
|
+
node
|
|
1697
|
+
});
|
|
1698
|
+
const outerWrapperCount = changeAttrs._docxOuterWrapperCount ?? inlineWrapperStackOf(node).length;
|
|
1699
|
+
return {
|
|
1700
|
+
changeAttrs,
|
|
1701
|
+
info,
|
|
1702
|
+
key: `${type}:${JSON.stringify(info)}:${outerWrapperCount}:${JSON.stringify(revisionAncestors)}:${JSON.stringify(changeAttrs._docxResolutionJoins ?? void 0)}`,
|
|
1703
|
+
outerWrapperCount,
|
|
1704
|
+
revisionAncestors,
|
|
1705
|
+
type
|
|
1706
|
+
};
|
|
1707
|
+
};
|
|
1708
|
+
const establishTrackedBoundaryOwner = (node, sourceHost = "revision") => {
|
|
1709
|
+
const boundary = trackedBoundary(node);
|
|
1710
|
+
if (!boundary) return;
|
|
1711
|
+
flushCurrentInline();
|
|
1712
|
+
const { changeAttrs, info, key, outerWrapperCount, revisionAncestors, type } = boundary;
|
|
1713
|
+
const linkMark = sourceHost === "indexed-hyperlink" ? node.marks.find((mark) => mark.type.name === "hyperlink") : void 0;
|
|
1714
|
+
if (linkMark && currentTrackedChange?.type === "hyperlink" && currentTrackedChange.key === key && currentTrackedChange.hyperlinkKey === getLinkKey(linkMark)) return;
|
|
1715
|
+
if (!linkMark && currentTrackedChange?.type === "direct" && currentTrackedChange.key === key) return;
|
|
1716
|
+
const hyperlink = linkMark ? createIndexedHyperlink(linkMark) : void 0;
|
|
1717
|
+
const wrapper = createTrackedRunWrapper({
|
|
1718
|
+
type,
|
|
1719
|
+
info,
|
|
1720
|
+
...hyperlink ? { child: hyperlink } : {},
|
|
1721
|
+
resolutionJoins: changeAttrs._docxResolutionJoins ?? void 0
|
|
1722
|
+
});
|
|
1723
|
+
revisionOuterWrapperCounts.set(wrapper, outerWrapperCount);
|
|
1724
|
+
revisionAncestorsByWrapper.set(wrapper, revisionAncestors);
|
|
1725
|
+
content.push(wrapper);
|
|
1726
|
+
if (hyperlink && linkMark) {
|
|
1727
|
+
currentTrackedChange = {
|
|
1728
|
+
type: "hyperlink",
|
|
1729
|
+
key,
|
|
1730
|
+
wrapper,
|
|
1731
|
+
hyperlink,
|
|
1732
|
+
hyperlinkKey: getLinkKey(linkMark)
|
|
1733
|
+
};
|
|
1734
|
+
return;
|
|
1735
|
+
}
|
|
1736
|
+
currentTrackedChange = {
|
|
1737
|
+
type: "direct",
|
|
1738
|
+
key,
|
|
1739
|
+
wrapper
|
|
1740
|
+
};
|
|
1741
|
+
};
|
|
1608
1742
|
const syncCommentRanges = (node, offset) => {
|
|
1609
|
-
const nodeCommentIds = getCommentMarkIds(node.marks);
|
|
1743
|
+
const nodeCommentIds = (node.type.name === "structuredField" && fieldCommentCoverage(expectFieldAttrs(node).fieldKind) === "children" || node.type.name === "sdt") && node.childCount > 0 ? getCommentMarkIds(node.child(0).marks) : getCommentMarkIds(node.marks);
|
|
1744
|
+
const nodeTrackedBoundary = trackedBoundary(node);
|
|
1745
|
+
const sourceCommentRangeBoundaries = precedingTrackedCommentRangeBoundaries;
|
|
1746
|
+
const nodeCommentRangeBoundaries = nodeTrackedBoundary?.changeAttrs._docxCommentRangeBoundaries;
|
|
1747
|
+
precedingTrackedCommentRangeBoundaries = nodeCommentRangeBoundaries;
|
|
1610
1748
|
const toClose = [];
|
|
1611
1749
|
for (const commentId of openedComments) {
|
|
1612
1750
|
const lastOffset = commentLastOffset.get(commentId) ?? offset;
|
|
@@ -1616,21 +1754,60 @@ function extractParagraphContent(originalParagraph, _documentCounts, emptyHyperl
|
|
|
1616
1754
|
for (const commentId of nodeCommentIds) if (!openedComments.has(commentId)) toOpen.push(commentId);
|
|
1617
1755
|
if (toClose.length === 0 && toOpen.length === 0) return;
|
|
1618
1756
|
flushCurrentInline();
|
|
1619
|
-
currentTrackedChange = void 0;
|
|
1620
1757
|
for (const commentId of byCommentId(toClose)) {
|
|
1621
|
-
|
|
1758
|
+
const fallbackOwner = nodeTrackedBoundary && currentTrackedChange?.type === "direct" && currentTrackedChange.key === nodeTrackedBoundary.key ? "revision" : "parent";
|
|
1759
|
+
const sourceOwnsBoundary = trackedCommentBoundaryOwner({
|
|
1760
|
+
boundaries: sourceCommentRangeBoundaries,
|
|
1761
|
+
type: "end",
|
|
1762
|
+
commentId,
|
|
1763
|
+
fallback: fallbackOwner
|
|
1764
|
+
}) === "revision";
|
|
1765
|
+
const closingBoundaryOwner = currentTrackedChange?.type === "direct" && sourceOwnsBoundary ? currentTrackedChange.wrapper.content : content;
|
|
1766
|
+
closingBoundaryOwner.push({
|
|
1622
1767
|
type: "commentRangeEnd",
|
|
1623
1768
|
id: commentId
|
|
1624
1769
|
});
|
|
1625
1770
|
openedComments.delete(commentId);
|
|
1771
|
+
if (closingBoundaryOwner === content) currentTrackedChange = void 0;
|
|
1626
1772
|
}
|
|
1773
|
+
if (currentTrackedChange?.type === "hyperlink") currentTrackedChange = void 0;
|
|
1627
1774
|
for (const commentId of byCommentId(toOpen)) {
|
|
1628
|
-
|
|
1775
|
+
const owner = trackedCommentBoundaryOwner({
|
|
1776
|
+
boundaries: nodeCommentRangeBoundaries,
|
|
1777
|
+
type: "start",
|
|
1778
|
+
commentId,
|
|
1779
|
+
fallback: nodeTrackedBoundary ? "revision" : "parent"
|
|
1780
|
+
});
|
|
1781
|
+
if (owner === "revision") establishTrackedBoundaryOwner(node);
|
|
1782
|
+
const openingBoundaryOwner = owner === "revision" && currentTrackedChange ? currentTrackedChange.wrapper.content : content;
|
|
1783
|
+
openingBoundaryOwner.push({
|
|
1629
1784
|
type: "commentRangeStart",
|
|
1630
1785
|
id: commentId
|
|
1631
1786
|
});
|
|
1632
1787
|
openedComments.add(commentId);
|
|
1788
|
+
if (openingBoundaryOwner === content) currentTrackedChange = void 0;
|
|
1789
|
+
}
|
|
1790
|
+
};
|
|
1791
|
+
const commentsAfterStructuredNode = (node, offset) => {
|
|
1792
|
+
const candidates = new Set(openedComments);
|
|
1793
|
+
for (const commentId of getCommentMarkIds(node.marks)) candidates.add(commentId);
|
|
1794
|
+
node.descendants((descendant) => {
|
|
1795
|
+
for (const commentId of getCommentMarkIds(descendant.marks)) candidates.add(commentId);
|
|
1796
|
+
return true;
|
|
1797
|
+
});
|
|
1798
|
+
const after = /* @__PURE__ */ new Set();
|
|
1799
|
+
for (const commentId of candidates) {
|
|
1800
|
+
const lastOffset = structuredCommentLastOffset.get(commentId);
|
|
1801
|
+
const paragraphOffsetBase = structuredCommentRangeScope?.paragraphOffsetBase ?? 0;
|
|
1802
|
+
if (lastOffset !== void 0 && lastOffset >= paragraphOffsetBase + offset + node.nodeSize) after.add(commentId);
|
|
1633
1803
|
}
|
|
1804
|
+
return after;
|
|
1805
|
+
};
|
|
1806
|
+
const syncStructuredCommentExit = (node, offset) => {
|
|
1807
|
+
if (node.type.name !== "structuredField" && node.type.name !== "sdt" || node.childCount === 0) return;
|
|
1808
|
+
const finalCommentIds = node.type.name === "sdt" ? commentsAfterStructuredNode(node, offset) : getCommentMarkIds((fieldCommentCoverage(expectFieldAttrs(node).fieldKind) === "field" ? node : node.child(node.childCount - 1)).marks);
|
|
1809
|
+
openedComments.clear();
|
|
1810
|
+
for (const commentId of finalCommentIds) openedComments.add(commentId);
|
|
1634
1811
|
};
|
|
1635
1812
|
const flushEmptyHyperlinksThroughOffset = (offset) => {
|
|
1636
1813
|
while (nextEmptyHyperlink < sortedEmptyHyperlinks.length) {
|
|
@@ -1677,78 +1854,157 @@ function extractParagraphContent(originalParagraph, _documentCounts, emptyHyperl
|
|
|
1677
1854
|
}
|
|
1678
1855
|
leadingRenderedPageBreakPending = false;
|
|
1679
1856
|
enterWrapperGroup(node);
|
|
1680
|
-
syncCommentRanges(node, offset);
|
|
1857
|
+
if (node.type.name !== "commentRangeBoundary" && (node.type.name !== "sdt" || node.childCount === 0)) syncCommentRanges(node, offset);
|
|
1858
|
+
const linkMark = node.marks.find((mark) => mark.type.name === "hyperlink");
|
|
1859
|
+
if (node.type.name === "commentRangeBoundary") {
|
|
1860
|
+
const { marker } = expectCommentRangeBoundaryAttrs(node);
|
|
1861
|
+
precedingTrackedCommentRangeBoundaries = trackedBoundary(node)?.changeAttrs._docxCommentRangeBoundaries;
|
|
1862
|
+
if (node.marks.some((mark) => mark.type.name === "insertion" || mark.type.name === "deletion")) {
|
|
1863
|
+
flushCurrentInline();
|
|
1864
|
+
establishTrackedBoundaryOwner(node, "indexed-hyperlink");
|
|
1865
|
+
if (currentTrackedChange?.type === "hyperlink") currentTrackedChange.hyperlink.children.push(marker);
|
|
1866
|
+
else if (currentTrackedChange) currentTrackedChange.wrapper.content.push(marker);
|
|
1867
|
+
else content.push(marker);
|
|
1868
|
+
} else if (linkMark) {
|
|
1869
|
+
currentTrackedChange = void 0;
|
|
1870
|
+
const linkKey = getLinkKey(linkMark);
|
|
1871
|
+
if (!currentHyperlink || currentHyperlinkKey !== linkKey) {
|
|
1872
|
+
flushCurrentInline();
|
|
1873
|
+
currentHyperlink = createIndexedHyperlink(linkMark);
|
|
1874
|
+
currentHyperlinkKey = linkKey;
|
|
1875
|
+
}
|
|
1876
|
+
currentHyperlink.children.push(marker);
|
|
1877
|
+
} else {
|
|
1878
|
+
flushCurrentInline();
|
|
1879
|
+
currentTrackedChange = void 0;
|
|
1880
|
+
content.push(marker);
|
|
1881
|
+
}
|
|
1882
|
+
if (marker.type === "commentRangeStart") openedComments.add(marker.id);
|
|
1883
|
+
else openedComments.delete(marker.id);
|
|
1884
|
+
return;
|
|
1885
|
+
}
|
|
1681
1886
|
if (node.type.name === "commentReference") {
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
content.push({
|
|
1887
|
+
establishTrackedBoundaryOwner(node, "indexed-hyperlink");
|
|
1888
|
+
const reference = {
|
|
1685
1889
|
type: "commentReference",
|
|
1686
1890
|
id: expectCommentReferenceAttrs(node).commentId
|
|
1687
|
-
}
|
|
1891
|
+
};
|
|
1892
|
+
const tracked = node.marks.some((mark) => mark.type.name === "insertion" || mark.type.name === "deletion");
|
|
1893
|
+
if (tracked && currentTrackedChange) {
|
|
1894
|
+
flushCurrentInline();
|
|
1895
|
+
if (currentTrackedChange.type === "hyperlink") currentTrackedChange.hyperlink.children.push(reference);
|
|
1896
|
+
else currentTrackedChange.wrapper.content.push(reference);
|
|
1897
|
+
} else if (linkMark && !tracked) {
|
|
1898
|
+
currentTrackedChange = void 0;
|
|
1899
|
+
const linkKey = getLinkKey(linkMark);
|
|
1900
|
+
if (!currentHyperlink || currentHyperlinkKey !== linkKey) {
|
|
1901
|
+
flushCurrentInline();
|
|
1902
|
+
currentHyperlink = createIndexedHyperlink(linkMark);
|
|
1903
|
+
currentHyperlinkKey = linkKey;
|
|
1904
|
+
}
|
|
1905
|
+
currentHyperlink.children.push(reference);
|
|
1906
|
+
} else {
|
|
1907
|
+
flushCurrentInline();
|
|
1908
|
+
currentTrackedChange = void 0;
|
|
1909
|
+
content.push(reference);
|
|
1910
|
+
}
|
|
1911
|
+
return;
|
|
1912
|
+
}
|
|
1913
|
+
if (node.type.name === "moveRangeBoundary") {
|
|
1914
|
+
const marker = { ...expectMoveRangeBoundaryAttrs(node) };
|
|
1915
|
+
const tracked = node.marks.some((mark) => mark.type.name === "insertion" || mark.type.name === "deletion");
|
|
1916
|
+
if (linkMark && !isHyperlinkContent(marker)) panic("A linked move boundary is not admitted by its hyperlink.");
|
|
1917
|
+
if (tracked) {
|
|
1918
|
+
establishTrackedBoundaryOwner(node, "indexed-hyperlink");
|
|
1919
|
+
if (currentTrackedChange?.type === "hyperlink") currentTrackedChange.hyperlink.children.push(marker);
|
|
1920
|
+
else if (currentTrackedChange) currentTrackedChange.wrapper.content.push(marker);
|
|
1921
|
+
else content.push(marker);
|
|
1922
|
+
} else if (linkMark) {
|
|
1923
|
+
currentTrackedChange = void 0;
|
|
1924
|
+
const linkKey = getLinkKey(linkMark);
|
|
1925
|
+
if (!currentHyperlink || currentHyperlinkKey !== linkKey) {
|
|
1926
|
+
flushCurrentInline();
|
|
1927
|
+
currentHyperlink = createIndexedHyperlink(linkMark);
|
|
1928
|
+
currentHyperlinkKey = linkKey;
|
|
1929
|
+
}
|
|
1930
|
+
currentHyperlink.children.push(marker);
|
|
1931
|
+
} else {
|
|
1932
|
+
flushCurrentInline();
|
|
1933
|
+
currentTrackedChange = void 0;
|
|
1934
|
+
content.push(marker);
|
|
1935
|
+
}
|
|
1688
1936
|
return;
|
|
1689
1937
|
}
|
|
1690
1938
|
if (node.type.name === "rangeAnchor") {
|
|
1691
|
-
flushCurrentInline();
|
|
1692
|
-
currentTrackedChange = void 0;
|
|
1693
1939
|
const { start, end } = expectRangeAnchorAttrs(node);
|
|
1694
|
-
|
|
1940
|
+
if (linkMark && (!isHyperlinkContent(start) || !isHyperlinkContent(end))) panic("A linked range anchor must contain boundaries its hyperlink admits.");
|
|
1941
|
+
if (node.marks.some((mark) => mark.type.name === "insertion" || mark.type.name === "deletion")) {
|
|
1942
|
+
establishTrackedBoundaryOwner(node, "indexed-hyperlink");
|
|
1943
|
+
if (currentTrackedChange?.type === "hyperlink") currentTrackedChange.hyperlink.children.push({ ...start }, { ...end });
|
|
1944
|
+
else if (currentTrackedChange) currentTrackedChange.wrapper.content.push({ ...start }, { ...end });
|
|
1945
|
+
else content.push({ ...start }, { ...end });
|
|
1946
|
+
} else if (linkMark) {
|
|
1947
|
+
currentTrackedChange = void 0;
|
|
1948
|
+
const linkKey = getLinkKey(linkMark);
|
|
1949
|
+
if (!currentHyperlink || currentHyperlinkKey !== linkKey) {
|
|
1950
|
+
flushCurrentInline();
|
|
1951
|
+
currentHyperlink = createIndexedHyperlink(linkMark);
|
|
1952
|
+
currentHyperlinkKey = linkKey;
|
|
1953
|
+
}
|
|
1954
|
+
currentHyperlink.children.push({ ...start }, { ...end });
|
|
1955
|
+
} else {
|
|
1956
|
+
flushCurrentInline();
|
|
1957
|
+
currentTrackedChange = void 0;
|
|
1958
|
+
content.push({ ...start }, { ...end });
|
|
1959
|
+
}
|
|
1695
1960
|
return;
|
|
1696
1961
|
}
|
|
1697
|
-
const linkMark = node.marks.find((m) => m.type.name === "hyperlink");
|
|
1698
1962
|
const noteRefMark = node.marks.find((m) => m.type.name === "footnoteRef");
|
|
1699
1963
|
const insertionMark = node.marks.find((m) => m.type.name === "insertion");
|
|
1700
1964
|
const deletionMark = node.marks.find((m) => m.type.name === "deletion");
|
|
1701
1965
|
if (!insertionMark && !deletionMark) currentTrackedChange = void 0;
|
|
1966
|
+
let anchorRun;
|
|
1702
1967
|
if (node.type.name === "textBoxAnchor") {
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1968
|
+
if (!textBoxAnchorMarkers) {
|
|
1969
|
+
flushCurrentInline();
|
|
1970
|
+
currentTrackedChange = void 0;
|
|
1971
|
+
return;
|
|
1972
|
+
}
|
|
1706
1973
|
const { anchorId } = expectTextBoxAnchorAttrs(node);
|
|
1974
|
+
if (textBoxAnchorMarkers.has(anchorId)) {
|
|
1975
|
+
flushCurrentInline();
|
|
1976
|
+
currentTrackedChange = void 0;
|
|
1977
|
+
return;
|
|
1978
|
+
}
|
|
1707
1979
|
const marker = {
|
|
1708
1980
|
type: "run",
|
|
1709
|
-
content: [
|
|
1981
|
+
content: [{
|
|
1982
|
+
type: "preservedXml",
|
|
1983
|
+
xml: "",
|
|
1984
|
+
text: ""
|
|
1985
|
+
}]
|
|
1710
1986
|
};
|
|
1711
|
-
|
|
1987
|
+
const formatting = getAtomRunFormattingFromMarks(node.marks, formattingContext);
|
|
1988
|
+
if (formatting) marker.formatting = formatting;
|
|
1989
|
+
restoreRunRecord(marker, node.marks);
|
|
1712
1990
|
textBoxAnchorMarkers.set(anchorId, marker);
|
|
1713
|
-
|
|
1714
|
-
if (anchoredContent.type === "hyperlink") anchoredContent.children.push(marker);
|
|
1715
|
-
const changeMark = insertionMark ?? deletionMark;
|
|
1716
|
-
if (!changeMark) {
|
|
1717
|
-
content.push(anchoredContent);
|
|
1718
|
-
return;
|
|
1719
|
-
}
|
|
1720
|
-
const changeAttrs = expectTrackedChangeMarkAttrs(changeMark);
|
|
1721
|
-
const info = {
|
|
1722
|
-
id: changeAttrs.revisionId,
|
|
1723
|
-
author: changeAttrs.author || "Unknown",
|
|
1724
|
-
...changeAttrs.date ? { date: changeAttrs.date } : {},
|
|
1725
|
-
...changeAttrs.utcDate ? { utcDate: {
|
|
1726
|
-
attribute: DATE_UTC_ATTRIBUTE,
|
|
1727
|
-
value: changeAttrs.utcDate
|
|
1728
|
-
} } : {},
|
|
1729
|
-
...changeAttrs.initials ? { initials: changeAttrs.initials } : {}
|
|
1730
|
-
};
|
|
1731
|
-
let type;
|
|
1732
|
-
if (insertionMark) type = changeAttrs.moveKind === "moveTo" ? "moveTo" : "insertion";
|
|
1733
|
-
else type = changeAttrs.moveKind === "moveFrom" ? "moveFrom" : "deletion";
|
|
1734
|
-
const wrapper = createTrackedRunWrapper({
|
|
1735
|
-
type,
|
|
1736
|
-
info,
|
|
1737
|
-
child: anchoredContent,
|
|
1738
|
-
resolutionJoins: changeAttrs._docxResolutionJoins ?? void 0
|
|
1739
|
-
});
|
|
1740
|
-
revisionOuterWrapperCounts.set(wrapper, changeAttrs._docxOuterWrapperCount ?? inlineWrapperStackOf(node).length);
|
|
1741
|
-
revisionAncestorsByWrapper.set(wrapper, changeAttrs._docxRevisionAncestors ?? []);
|
|
1742
|
-
content.push(wrapper);
|
|
1743
|
-
return;
|
|
1991
|
+
anchorRun = marker;
|
|
1744
1992
|
}
|
|
1745
1993
|
if (insertionMark || deletionMark) {
|
|
1746
1994
|
flushCurrentInline();
|
|
1747
|
-
const
|
|
1995
|
+
const deletionLayer = deletionMark ? trackedRevisionLayerOf(deletionMark, node) : void 0;
|
|
1996
|
+
const insertionAttrs = insertionMark ? expectTrackedChangeMarkAttrs(insertionMark) : void 0;
|
|
1997
|
+
const changeMark = deletionLayer !== void 0 && insertionAttrs?._docxRevisionAncestors?.some(({ revisionId, type }) => revisionId === deletionLayer.revisionId && type === deletionLayer.type) === true && insertionMark ? insertionMark : deletionMark ?? insertionMark;
|
|
1748
1998
|
if (!changeMark) return;
|
|
1749
1999
|
const changeAttrs = expectTrackedChangeMarkAttrs(changeMark);
|
|
2000
|
+
const runFormattingContext = changeMark === deletionMark && changeAttrs._historicalFormatting ? {
|
|
2001
|
+
...formattingContext,
|
|
2002
|
+
inheritedFormatting: formattingContext.baseParagraphFormatting ?? formattingContext.inheritedFormatting,
|
|
2003
|
+
paragraphMarkFormatting: void 0,
|
|
2004
|
+
paragraphMarkPrecedesStyle: false
|
|
2005
|
+
} : formattingContext;
|
|
1750
2006
|
const revisionAncestors = enclosingInsertionAncestors({
|
|
1751
|
-
insertionMark: deletionMark ? insertionMark : void 0,
|
|
2007
|
+
insertionMark: changeMark === deletionMark ? insertionMark : void 0,
|
|
1752
2008
|
ancestors: changeAttrs._docxRevisionAncestors ?? [],
|
|
1753
2009
|
node
|
|
1754
2010
|
});
|
|
@@ -1803,8 +2059,8 @@ function extractParagraphContent(originalParagraph, _documentCounts, emptyHyperl
|
|
|
1803
2059
|
currentTrackedChange.hyperlink.children.push(createPreservedInline(node));
|
|
1804
2060
|
return;
|
|
1805
2061
|
}
|
|
1806
|
-
const run = createTrackedChangeRun({
|
|
1807
|
-
...
|
|
2062
|
+
const run = anchorRun ?? createTrackedChangeRun({
|
|
2063
|
+
...runFormattingContext,
|
|
1808
2064
|
marks: otherMarks,
|
|
1809
2065
|
node
|
|
1810
2066
|
});
|
|
@@ -1830,10 +2086,6 @@ function extractParagraphContent(originalParagraph, _documentCounts, emptyHyperl
|
|
|
1830
2086
|
currentTrackedChange.wrapper.content.push(bookmarkMarkerFromAttrs(expectBookmarkBoundaryAttrs(node)));
|
|
1831
2087
|
return;
|
|
1832
2088
|
}
|
|
1833
|
-
if (node.type.name === "moveRangeBoundary") {
|
|
1834
|
-
currentTrackedChange.wrapper.content.push({ ...expectMoveRangeBoundaryAttrs(node) });
|
|
1835
|
-
return;
|
|
1836
|
-
}
|
|
1837
2089
|
if (node.type.name === "field" || node.type.name === "structuredField") {
|
|
1838
2090
|
currentTrackedChange.wrapper.content.push(createFieldFromNode(node, {
|
|
1839
2091
|
...formattingContext,
|
|
@@ -1850,29 +2102,23 @@ function extractParagraphContent(originalParagraph, _documentCounts, emptyHyperl
|
|
|
1850
2102
|
currentTrackedChange.wrapper.content.push(createPreservedInline(node));
|
|
1851
2103
|
return;
|
|
1852
2104
|
}
|
|
1853
|
-
const run = createTrackedChangeRun({
|
|
1854
|
-
...
|
|
2105
|
+
const run = anchorRun ?? createTrackedChangeRun({
|
|
2106
|
+
...runFormattingContext,
|
|
1855
2107
|
marks: otherMarks,
|
|
1856
2108
|
node
|
|
1857
2109
|
});
|
|
1858
2110
|
if (run) appendRunToTrackedWrapper(currentTrackedChange.wrapper, run, node, sourceRunOwners);
|
|
1859
2111
|
return;
|
|
1860
2112
|
}
|
|
1861
|
-
const ownedRun = linkMark
|
|
2113
|
+
const ownedRun = linkMark ? null : anchorRun ?? (runIdentityId(node) === void 0 ? null : createTrackedChangeRun({
|
|
1862
2114
|
...formattingContext,
|
|
1863
2115
|
marks: node.marks,
|
|
1864
2116
|
node
|
|
1865
|
-
});
|
|
2117
|
+
}));
|
|
1866
2118
|
if (ownedRun) {
|
|
1867
2119
|
appendDirectRun(node, ownedRun, node.isText);
|
|
1868
2120
|
return;
|
|
1869
2121
|
}
|
|
1870
|
-
if (node.type.name === "moveRangeBoundary") {
|
|
1871
|
-
flushCurrentInline();
|
|
1872
|
-
currentTrackedChange = void 0;
|
|
1873
|
-
content.push({ ...expectMoveRangeBoundaryAttrs(node) });
|
|
1874
|
-
return;
|
|
1875
|
-
}
|
|
1876
2122
|
if (noteRefMark && !linkMark) {
|
|
1877
2123
|
flushCurrentInline();
|
|
1878
2124
|
content.push(createNoteReferenceRun(noteRefMark, node.marks, formattingContext));
|
|
@@ -1885,7 +2131,8 @@ function extractParagraphContent(originalParagraph, _documentCounts, emptyHyperl
|
|
|
1885
2131
|
currentHyperlink = createIndexedHyperlink(linkMark);
|
|
1886
2132
|
currentHyperlinkKey = linkKey;
|
|
1887
2133
|
}
|
|
1888
|
-
|
|
2134
|
+
if (anchorRun) appendRunToHyperlink(currentHyperlink, anchorRun, node, sourceRunOwners);
|
|
2135
|
+
else addNodeToHyperlink({
|
|
1889
2136
|
...formattingContext,
|
|
1890
2137
|
hyperlink: currentHyperlink,
|
|
1891
2138
|
node,
|
|
@@ -1944,9 +2191,19 @@ function extractParagraphContent(originalParagraph, _documentCounts, emptyHyperl
|
|
|
1944
2191
|
marks: node.marks,
|
|
1945
2192
|
textBoxAnchorMarkers
|
|
1946
2193
|
}));
|
|
2194
|
+
syncStructuredCommentExit(node, offset);
|
|
1947
2195
|
} else if (node.type.name === "sdt") {
|
|
1948
2196
|
flushCurrentInline();
|
|
1949
|
-
content.push(createInlineSdtFromNode(
|
|
2197
|
+
content.push(createInlineSdtFromNode({
|
|
2198
|
+
node,
|
|
2199
|
+
paragraphOffsetBase: (structuredCommentRangeScope?.paragraphOffsetBase ?? 0) + offset + 1,
|
|
2200
|
+
lastOffsetByCommentId: structuredCommentLastOffset,
|
|
2201
|
+
...textBoxAnchorMarkers === void 0 ? {} : { textBoxAnchorMarkers },
|
|
2202
|
+
formattingContext,
|
|
2203
|
+
openedBefore: openedComments,
|
|
2204
|
+
openedAfter: commentsAfterStructuredNode(node, offset)
|
|
2205
|
+
}));
|
|
2206
|
+
syncStructuredCommentExit(node, offset);
|
|
1950
2207
|
} else if (node.type.name === "math") {
|
|
1951
2208
|
flushCurrentInline();
|
|
1952
2209
|
content.push(createMathFromNode(node));
|
|
@@ -1976,10 +2233,18 @@ function extractParagraphContent(originalParagraph, _documentCounts, emptyHyperl
|
|
|
1976
2233
|
});
|
|
1977
2234
|
flushEmptyHyperlinksThroughOffset(Number.POSITIVE_INFINITY);
|
|
1978
2235
|
flushCurrentInline();
|
|
1979
|
-
for (const commentId of byCommentId(openedComments))
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
2236
|
+
for (const commentId of byCommentId(openedComments)) {
|
|
2237
|
+
if (structuredCommentRangeScope?.openedAfter.has(commentId)) continue;
|
|
2238
|
+
(currentTrackedChange?.type === "direct" && trackedCommentBoundaryOwner({
|
|
2239
|
+
boundaries: precedingTrackedCommentRangeBoundaries,
|
|
2240
|
+
type: "end",
|
|
2241
|
+
commentId,
|
|
2242
|
+
fallback: "parent"
|
|
2243
|
+
}) === "revision" ? currentTrackedChange.wrapper.content : content).push({
|
|
2244
|
+
type: "commentRangeEnd",
|
|
2245
|
+
id: commentId
|
|
2246
|
+
});
|
|
2247
|
+
}
|
|
1983
2248
|
return nestInlineWrapperGroups(content, wrapperGroups, sourceHyperlinkIndices, revisionOuterWrapperCounts, revisionAncestorsByWrapper);
|
|
1984
2249
|
}
|
|
1985
2250
|
function createTrackedChangeRun({ baseParagraphFormatting, inheritedFormatting, marks, node, paragraphMarkFormatting, paragraphMarkPrecedesStyle, styleResolver }) {
|
|
@@ -2080,16 +2345,7 @@ function buildDocumentTrackedChangeCounts(pmDoc) {
|
|
|
2080
2345
|
* Create a unique key for a link mark
|
|
2081
2346
|
*/
|
|
2082
2347
|
function getLinkKey(mark) {
|
|
2083
|
-
|
|
2084
|
-
return [
|
|
2085
|
-
attrs.href,
|
|
2086
|
-
attrs.rId ?? "",
|
|
2087
|
-
attrs.tooltip ?? "",
|
|
2088
|
-
attrs.target ?? "",
|
|
2089
|
-
attrs.history === void 0 ? "" : String(attrs.history),
|
|
2090
|
-
attrs.docLocation ?? "",
|
|
2091
|
-
attrs._docxHyperlinkIndex ?? ""
|
|
2092
|
-
].join("\0");
|
|
2348
|
+
return JSON.stringify(expectHyperlinkMarkAttrs(mark));
|
|
2093
2349
|
}
|
|
2094
2350
|
/**
|
|
2095
2351
|
* Create a unique key for a set of marks (excluding hyperlink)
|
|
@@ -2120,6 +2376,7 @@ function createHyperlink(linkMark) {
|
|
|
2120
2376
|
const hyperlink = {
|
|
2121
2377
|
type: "hyperlink",
|
|
2122
2378
|
href,
|
|
2379
|
+
...attrs.anchor === void 0 ? {} : { anchor: attrs.anchor },
|
|
2123
2380
|
...metadata,
|
|
2124
2381
|
children: []
|
|
2125
2382
|
};
|
|
@@ -2546,7 +2803,7 @@ function createFieldFromNode(node, { baseParagraphFormatting, inheritedFormattin
|
|
|
2546
2803
|
}],
|
|
2547
2804
|
...formatting && Object.keys(formatting).length > 0 ? { formatting } : {}
|
|
2548
2805
|
};
|
|
2549
|
-
if (marks
|
|
2806
|
+
if (marks) restoreRunRecord(displayRun, marks);
|
|
2550
2807
|
const fieldContent = extractedContent.length > 0 ? synchronizeFieldDisplayText(extractedContent, displayText, displayRun) : [];
|
|
2551
2808
|
const fallbackFieldContent = displayText ? [displayRun] : reconcileEmptyFieldResultRuns(attrs._docxEmptyResultRuns, displayRun);
|
|
2552
2809
|
if (attrs.fieldKind === "complex") {
|
|
@@ -2690,12 +2947,15 @@ const hoistUniformRevision = (sdt, enclosingIds) => {
|
|
|
2690
2947
|
}]
|
|
2691
2948
|
};
|
|
2692
2949
|
};
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2950
|
+
function createInlineSdtFromNode({ node, paragraphOffsetBase, lastOffsetByCommentId, textBoxAnchorMarkers, formattingContext, openedBefore, openedAfter }) {
|
|
2951
|
+
const attrs = expectSdtAttrs(node);
|
|
2952
|
+
const properties = sdtPropertiesFromAttrs(attrs);
|
|
2953
|
+
const content = extractParagraphContent(node, void 0, void 0, textBoxAnchorMarkers, false, formattingContext, node.childCount === 0 ? void 0 : {
|
|
2954
|
+
openedBefore,
|
|
2955
|
+
openedAfter,
|
|
2956
|
+
paragraphOffsetBase,
|
|
2957
|
+
lastOffsetByCommentId
|
|
2958
|
+
}).filter(isInlineSdtContent);
|
|
2699
2959
|
return hoistUniformRevision({
|
|
2700
2960
|
type: "inlineSdt",
|
|
2701
2961
|
properties,
|
|
@@ -2832,13 +3092,23 @@ const drawingFromImageAttrs = (image, attrs) => {
|
|
|
2832
3092
|
};
|
|
2833
3093
|
const shapeContentFromNode = ({ node, shape, captured }) => {
|
|
2834
3094
|
const xml = unchangedAlternateContentXml(node, captured);
|
|
2835
|
-
|
|
3095
|
+
if (xml !== void 0) return {
|
|
3096
|
+
type: "shape",
|
|
3097
|
+
shape,
|
|
3098
|
+
alternateContent: refingerprintShapeAlternateContent(shape, xml)
|
|
3099
|
+
};
|
|
3100
|
+
const editedCapture = editedAlternateContent(node, captured);
|
|
3101
|
+
return editedCapture?.shapeFingerprint === void 0 || editedCapture.structureFingerprint === void 0 ? {
|
|
2836
3102
|
type: "shape",
|
|
2837
3103
|
shape
|
|
2838
3104
|
} : {
|
|
2839
3105
|
type: "shape",
|
|
2840
3106
|
shape,
|
|
2841
|
-
alternateContent:
|
|
3107
|
+
alternateContent: {
|
|
3108
|
+
verbatimXml: editedCapture.xml,
|
|
3109
|
+
verbatimFingerprint: editedCapture.shapeFingerprint,
|
|
3110
|
+
verbatimStructureFingerprint: editedCapture.structureFingerprint
|
|
3111
|
+
}
|
|
2842
3112
|
};
|
|
2843
3113
|
};
|
|
2844
3114
|
/**
|
|
@@ -2960,16 +3230,18 @@ function convertPMTable(node, documentCounts, styleResolver = null) {
|
|
|
2960
3230
|
const formatting = tableAttrsToFormatting(attrs) || void 0;
|
|
2961
3231
|
if (!formatting?.borders && !attrs._originalFormatting) {
|
|
2962
3232
|
const inferredBorders = inferTableBorders(rows);
|
|
2963
|
-
if (inferredBorders)
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
3233
|
+
if (inferredBorders) {
|
|
3234
|
+
if (formatting) formatting.borders = inferredBorders;
|
|
3235
|
+
else {
|
|
3236
|
+
const minTable = {
|
|
3237
|
+
type: "table",
|
|
3238
|
+
formatting: { borders: inferredBorders },
|
|
3239
|
+
rows
|
|
3240
|
+
};
|
|
3241
|
+
if (attrs.columnWidths) minTable.columnWidths = attrs.columnWidths;
|
|
3242
|
+
restoreCarriedTableAttrs(minTable, attrs);
|
|
3243
|
+
return minTable;
|
|
3244
|
+
}
|
|
2973
3245
|
}
|
|
2974
3246
|
}
|
|
2975
3247
|
const table = {
|
|
@@ -3044,25 +3316,37 @@ function tableAttrsToFormatting(attrs) {
|
|
|
3044
3316
|
if (attrs._originalFormatting) {
|
|
3045
3317
|
const orig = attrs._originalFormatting;
|
|
3046
3318
|
const result = { ...orig };
|
|
3047
|
-
if (attrs.styleId !== (orig.styleId ?? void 0))
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
if (attrs.
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
if (attrs.
|
|
3056
|
-
|
|
3319
|
+
if (attrs.styleId !== (orig.styleId ?? void 0)) {
|
|
3320
|
+
if (attrs.styleId) result.styleId = attrs.styleId;
|
|
3321
|
+
else delete result.styleId;
|
|
3322
|
+
}
|
|
3323
|
+
if (attrs.justification !== (orig.justification ?? void 0)) {
|
|
3324
|
+
if (attrs.justification) result.justification = attrs.justification;
|
|
3325
|
+
else delete result.justification;
|
|
3326
|
+
}
|
|
3327
|
+
if (attrs.floating !== (orig.floating ?? void 0)) {
|
|
3328
|
+
if (attrs.floating) result.floating = attrs.floating;
|
|
3329
|
+
else delete result.floating;
|
|
3330
|
+
}
|
|
3331
|
+
if (attrs.look !== (orig.look ?? void 0)) {
|
|
3332
|
+
if (attrs.look) result.look = attrs.look;
|
|
3333
|
+
else delete result.look;
|
|
3334
|
+
}
|
|
3335
|
+
if (attrs.borders !== (orig.borders ?? void 0)) {
|
|
3336
|
+
if (attrs.borders) result.borders = attrs.borders;
|
|
3337
|
+
else delete result.borders;
|
|
3338
|
+
}
|
|
3057
3339
|
const tableWidth = attrs.width;
|
|
3058
3340
|
const tableWidthType = attrs.widthType;
|
|
3059
3341
|
const origWidthVal = orig.width?.value;
|
|
3060
3342
|
const origWidthType = orig.width?.type;
|
|
3061
|
-
if (tableWidth !== origWidthVal || tableWidthType !== origWidthType)
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3343
|
+
if (tableWidth !== origWidthVal || tableWidthType !== origWidthType) {
|
|
3344
|
+
if (tableWidth !== void 0 || tableWidthType !== void 0) result.width = {
|
|
3345
|
+
value: tableWidth ?? 0,
|
|
3346
|
+
type: tableWidthType ?? "dxa"
|
|
3347
|
+
};
|
|
3348
|
+
else delete result.width;
|
|
3349
|
+
}
|
|
3066
3350
|
if (attrs.cellMargins && !sameResolvedValue(attrs.cellMargins, attrs._resolvedCellMargins)) result.cellMargins = buildCellMarginsFromAttrs(attrs.cellMargins);
|
|
3067
3351
|
return result;
|
|
3068
3352
|
}
|
|
@@ -3207,17 +3491,25 @@ function tableRowAttrsToFormatting(attrs) {
|
|
|
3207
3491
|
if (attrs._originalFormatting) {
|
|
3208
3492
|
const orig = attrs._originalFormatting;
|
|
3209
3493
|
const result = { ...orig };
|
|
3210
|
-
if (attrs.height !== (orig.height?.value ?? void 0))
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
if (attrs.
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3494
|
+
if (attrs.height !== (orig.height?.value ?? void 0)) {
|
|
3495
|
+
if (attrs.height) result.height = {
|
|
3496
|
+
value: attrs.height,
|
|
3497
|
+
type: "dxa"
|
|
3498
|
+
};
|
|
3499
|
+
else delete result.height;
|
|
3500
|
+
}
|
|
3501
|
+
if (attrs.heightRule !== (orig.heightRule ?? void 0)) {
|
|
3502
|
+
if (attrs.heightRule) result.heightRule = attrs.heightRule;
|
|
3503
|
+
else delete result.heightRule;
|
|
3504
|
+
}
|
|
3505
|
+
if (attrs.isHeader !== (orig.header ?? void 0)) {
|
|
3506
|
+
if (attrs.isHeader) result.header = attrs.isHeader;
|
|
3507
|
+
else delete result.header;
|
|
3508
|
+
}
|
|
3509
|
+
if (attrs.hidden !== orig.hidden) {
|
|
3510
|
+
if (attrs.hidden === void 0) delete result.hidden;
|
|
3511
|
+
else result.hidden = attrs.hidden;
|
|
3512
|
+
}
|
|
3221
3513
|
return result;
|
|
3222
3514
|
}
|
|
3223
3515
|
if (!(attrs.height || attrs.isHeader || attrs.hidden !== void 0)) return;
|
|
@@ -3267,6 +3559,9 @@ function convertPMTableCell(node, documentCounts, styleResolver = null) {
|
|
|
3267
3559
|
} else if (contentNode.type.name === "blockBookmarkBoundary") {
|
|
3268
3560
|
content.push(blockBookmarkMarker(contentNode));
|
|
3269
3561
|
previousStandaloneTextBox = null;
|
|
3562
|
+
} else if (contentNode.type.name === "blockMoveRangeBoundary") {
|
|
3563
|
+
content.push({ ...expectMoveRangeBoundaryAttrs(contentNode) });
|
|
3564
|
+
previousStandaloneTextBox = null;
|
|
3270
3565
|
}
|
|
3271
3566
|
});
|
|
3272
3567
|
removeUnresolvedTextBoxAnchors(content, textBoxAnchorMarkers);
|
|
@@ -3318,13 +3613,17 @@ function tableCellAttrsToFormatting(attrs) {
|
|
|
3318
3613
|
const authoredWidth = attrs._authoredWidth;
|
|
3319
3614
|
if (authoredWidth) result.width = authoredWidth;
|
|
3320
3615
|
else delete result.width;
|
|
3321
|
-
if (attrs.verticalAlign !== (orig.verticalAlign ?? void 0))
|
|
3322
|
-
|
|
3616
|
+
if (attrs.verticalAlign !== (orig.verticalAlign ?? void 0)) {
|
|
3617
|
+
if (attrs.verticalAlign) result.verticalAlign = attrs.verticalAlign;
|
|
3618
|
+
else delete result.verticalAlign;
|
|
3619
|
+
}
|
|
3323
3620
|
if (backgroundChanged) result.shading = cellShadingFromAttrs(attrs);
|
|
3324
3621
|
if (attrs.borders && !sameResolvedValue(attrs.borders, attrs._resolvedBorders)) result.borders = attrs.borders;
|
|
3325
3622
|
if (attrs.margins && !sameResolvedValue(attrs.margins, attrs._resolvedMargins)) result.margins = buildCellMarginsFromAttrs(attrs.margins);
|
|
3326
|
-
if (attrs.textDirection !== (orig.textDirection ?? void 0))
|
|
3327
|
-
|
|
3623
|
+
if (attrs.textDirection !== (orig.textDirection ?? void 0)) {
|
|
3624
|
+
if (attrs.textDirection) result.textDirection = attrs.textDirection;
|
|
3625
|
+
else delete result.textDirection;
|
|
3626
|
+
}
|
|
3328
3627
|
return Object.keys(result).length > 0 ? result : void 0;
|
|
3329
3628
|
}
|
|
3330
3629
|
const authoredWidth = attrs._authoredWidth;
|
|
@@ -3372,6 +3671,11 @@ function convertPMTextBox(node, styleResolver = null) {
|
|
|
3372
3671
|
else if (child.type.name === "table") childBlocks.push(convertPMTable(child, void 0, styleResolver));
|
|
3373
3672
|
});
|
|
3374
3673
|
const textBodyContent = projectTextBoxBodyContent(attrs._docxTextBodyContentState, childBlocks);
|
|
3674
|
+
const margins = {};
|
|
3675
|
+
if (typeof attrs.marginTop === "number") margins.top = emuFromPixels(attrs.marginTop, "marginTop", authoredEmu, emuToPixels);
|
|
3676
|
+
if (typeof attrs.marginBottom === "number") margins.bottom = emuFromPixels(attrs.marginBottom, "marginBottom", authoredEmu, emuToPixels);
|
|
3677
|
+
if (typeof attrs.marginLeft === "number") margins.left = emuFromPixels(attrs.marginLeft, "marginLeft", authoredEmu, emuToPixels);
|
|
3678
|
+
if (typeof attrs.marginRight === "number") margins.right = emuFromPixels(attrs.marginRight, "marginRight", authoredEmu, emuToPixels);
|
|
3375
3679
|
const shape = {
|
|
3376
3680
|
type: "shape",
|
|
3377
3681
|
shapeType: "textBox",
|
|
@@ -3385,14 +3689,7 @@ function convertPMTextBox(node, styleResolver = null) {
|
|
|
3385
3689
|
...attrs.autoFit !== void 0 ? { autoFit: attrs.autoFit } : {},
|
|
3386
3690
|
...attrs.textWrap !== void 0 ? { textWrap: attrs.textWrap } : {},
|
|
3387
3691
|
...verticalAlign !== void 0 ? { anchor: verticalAlign } : {},
|
|
3388
|
-
margins
|
|
3389
|
-
const m = {};
|
|
3390
|
-
if (typeof attrs.marginTop === "number") m.top = emuFromPixels(attrs.marginTop, "marginTop", authoredEmu, emuToPixels);
|
|
3391
|
-
if (typeof attrs.marginBottom === "number") m.bottom = emuFromPixels(attrs.marginBottom, "marginBottom", authoredEmu, emuToPixels);
|
|
3392
|
-
if (typeof attrs.marginLeft === "number") m.left = emuFromPixels(attrs.marginLeft, "marginLeft", authoredEmu, emuToPixels);
|
|
3393
|
-
if (typeof attrs.marginRight === "number") m.right = emuFromPixels(attrs.marginRight, "marginRight", authoredEmu, emuToPixels);
|
|
3394
|
-
return m;
|
|
3395
|
-
})()
|
|
3692
|
+
...Object.keys(margins).length > 0 ? { margins } : {}
|
|
3396
3693
|
}
|
|
3397
3694
|
};
|
|
3398
3695
|
if (attrs.textBoxId) shape.id = attrs.textBoxId;
|