@stll/folio-core 0.68.0 → 0.70.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/_rolldown/runtime.js +4 -4
- package/dist/ai-edits/apply.d.ts +39 -16
- package/dist/ai-edits/apply.js +1014 -723
- package/dist/ai-edits/block-identity.d.ts +6 -0
- package/dist/ai-edits/block-identity.js +11 -1
- package/dist/ai-edits/blockRange.d.ts +9 -0
- package/dist/ai-edits/clean-text.d.ts +2 -0
- package/dist/ai-edits/clean-text.js +2 -1
- package/dist/ai-edits/comment-lifecycle.d.ts +24 -0
- package/dist/ai-edits/comment-lifecycle.js +17 -8
- package/dist/ai-edits/directJoin.d.ts +30 -0
- package/dist/ai-edits/directJoin.js +30 -0
- package/dist/ai-edits/existingRevisions.d.ts +9 -0
- package/dist/ai-edits/existingRevisions.js +30 -0
- package/dist/ai-edits/finalSectionReview.d.ts +11 -0
- package/dist/ai-edits/finalSectionReview.js +26 -0
- package/dist/ai-edits/headless.d.ts +275 -14
- package/dist/ai-edits/headless.js +1597 -195
- package/dist/ai-edits/index.d.ts +11 -10
- package/dist/ai-edits/index.js +2 -2
- package/dist/ai-edits/markdownInsertion.d.ts +25 -0
- package/dist/ai-edits/markdownInsertion.js +67 -0
- package/dist/ai-edits/minimal-replacement.d.ts +120 -1
- package/dist/ai-edits/minimal-replacement.js +81 -1
- package/dist/ai-edits/newListNumbering.d.ts +31 -7
- package/dist/ai-edits/newListNumbering.js +46 -8
- package/dist/ai-edits/note-references.d.ts +19 -1
- package/dist/ai-edits/note-references.js +3 -1
- package/dist/ai-edits/pending-suggestions.d.ts +44 -2
- package/dist/ai-edits/pending-suggestions.js +483 -22
- package/dist/ai-edits/pendingJoin.d.ts +170 -0
- package/dist/ai-edits/pendingJoin.js +272 -0
- package/dist/ai-edits/read.d.ts +57 -4
- package/dist/ai-edits/read.js +317 -40
- package/dist/ai-edits/removed-blocks.d.ts +1 -1
- package/dist/ai-edits/result-validation.d.ts +36 -1
- package/dist/ai-edits/result-validation.js +1 -1
- package/dist/ai-edits/retired-comment-receipts.d.ts +20 -0
- package/dist/ai-edits/retired-comment-receipts.js +165 -0
- package/dist/ai-edits/revisionStretches.d.ts +17 -0
- package/dist/ai-edits/snapshot.d.ts +12 -3
- package/dist/ai-edits/snapshot.js +9 -7
- package/dist/ai-edits/snapshotBatchFacts.d.ts +52 -0
- package/dist/ai-edits/snapshotBatchFacts.js +184 -0
- package/dist/ai-edits/table-geometry.d.ts +45 -11
- package/dist/ai-edits/table-geometry.js +141 -26
- package/dist/ai-edits/table-mutation-plan.d.ts +12 -0
- package/dist/ai-edits/table-mutation-plan.js +1 -1
- package/dist/ai-edits/table-row-column-mutations.d.ts +26 -3
- package/dist/ai-edits/table-row-column-mutations.js +90 -11
- package/dist/ai-edits/table-template.d.ts +21 -0
- package/dist/ai-edits/tableInsertionModes.d.ts +10 -0
- package/dist/ai-edits/tableInsertionModes.js +8 -0
- package/dist/ai-edits/tracked-batch-fidelity.d.ts +23 -0
- package/dist/ai-edits/tracked-batch-fidelity.js +357 -0
- package/dist/ai-edits/types.d.ts +81 -15
- package/dist/ai-edits/undefinedReferences.d.ts +49 -0
- package/dist/ai-edits/undefinedReferences.js +234 -0
- package/dist/ai-suggestions/apply.d.ts +12 -0
- package/dist/ai-suggestions/conflict.d.ts +9 -0
- package/dist/ai-suggestions/text-positions.d.ts +13 -0
- package/dist/canonical/batchCommentReferences.d.ts +20 -0
- package/dist/canonical/batchCommentReferences.js +93 -0
- package/dist/canonical/canonicalBatchReview.d.ts +25 -0
- package/dist/canonical/canonicalBatchReview.js +132 -0
- package/dist/{controller → canonical}/canonicalComments.d.ts +7 -4
- package/dist/{controller → canonical}/canonicalComments.js +36 -9
- package/dist/canonical/canonicalCompilerRefusal.d.ts +13 -0
- package/dist/canonical/canonicalCompilerRefusal.js +75 -0
- package/dist/canonical/canonicalIdLease.d.ts +40 -0
- package/dist/canonical/canonicalIdLease.js +96 -0
- package/dist/{controller → canonical}/canonicalInlineProjection.d.ts +1 -1
- package/dist/{controller → canonical}/canonicalInlineProjection.js +40 -20
- package/dist/canonical/canonicalInsertedCommentRange.d.ts +15 -0
- package/dist/canonical/canonicalInsertedCommentRange.js +43 -0
- package/dist/canonical/canonicalInsertionReplayIds.d.ts +40 -0
- package/dist/canonical/canonicalInsertionReplayIds.js +73 -0
- package/dist/canonical/canonicalJoinedReceipts.d.ts +11 -0
- package/dist/canonical/canonicalJoinedReceipts.js +22 -0
- package/dist/{controller → canonical}/canonicalListRendering.js +1 -1
- package/dist/canonical/canonicalLockGuard.d.ts +34 -0
- package/dist/canonical/canonicalLockGuard.js +208 -0
- package/dist/{controller → canonical}/canonicalOperations.js +1 -1
- package/dist/canonical/canonicalProjectionBlocks.d.ts +89 -0
- package/dist/canonical/canonicalProjectionBlocks.js +79 -0
- package/dist/{controller → canonical}/canonicalPublicOperations.d.ts +24 -9
- package/dist/canonical/canonicalPublicOperations.js +4791 -0
- package/dist/canonical/canonicalRemoteHistory.d.ts +48 -0
- package/dist/canonical/canonicalRemoteHistory.js +176 -0
- package/dist/canonical/canonicalRevisionLocks.d.ts +18 -0
- package/dist/canonical/canonicalRevisionLocks.js +30 -0
- package/dist/canonical/canonicalRevisionReceipts.d.ts +15 -0
- package/dist/canonical/canonicalRevisionReceipts.js +25 -0
- package/dist/canonical/canonicalRoomBase.d.ts +23 -0
- package/dist/canonical/canonicalRoomBase.js +38 -0
- package/dist/canonical/canonicalSeedContent.d.ts +36 -0
- package/dist/canonical/canonicalSeedContent.js +179 -0
- package/dist/{controller → canonical}/canonicalSelection.js +1 -1
- package/dist/canonical/canonicalSession.d.ts +515 -0
- package/dist/canonical/canonicalSession.js +2892 -0
- package/dist/canonical/canonicalSourceNormalization.d.ts +42 -0
- package/dist/canonical/canonicalSourceNormalization.js +166 -0
- package/dist/{controller → canonical}/canonicalTocSelection.js +1 -1
- package/dist/canonical/canonicalTrackedBatchFidelity.d.ts +9 -0
- package/dist/canonical/canonicalTrackedBatchFidelity.js +125 -0
- package/dist/canonical/canonicalWholeTextFidelity.d.ts +21 -0
- package/dist/canonical/canonicalWholeTextFidelity.js +88 -0
- package/dist/canonical/commentAnchorParagraph.d.ts +10 -0
- package/dist/canonical/commentAnchorParagraph.js +11 -0
- package/dist/canonical/controlEdges.d.ts +12 -0
- package/dist/canonical/controlEdges.js +17 -0
- package/dist/canonical/paragraphPatchAsRead.d.ts +19 -0
- package/dist/canonical/paragraphPatchAsRead.js +32 -0
- package/dist/canonical/propertySourcePreservation.d.ts +38 -0
- package/dist/canonical/propertySourcePreservation.js +129 -0
- package/dist/canonical/replacementRunSources.d.ts +29 -0
- package/dist/canonical/replacementRunSources.js +78 -0
- package/dist/compare/compare.d.ts +8 -6
- package/dist/compare/compare.js +37 -8
- package/dist/compare/content-alignment.d.ts +10 -1
- package/dist/compare/content-alignment.js +188 -27
- package/dist/compare/content.d.ts +9 -1
- package/dist/compare/content.js +2 -2
- package/dist/compare/formatting.d.ts +1 -0
- package/dist/compare/import-style-closure.d.ts +1 -1
- package/dist/compare/inline-atom-alignment.d.ts +83 -0
- package/dist/compare/inline-atom-alignment.js +173 -0
- package/dist/compare/inline-atoms-model.d.ts +65 -0
- package/dist/compare/inline-atoms-model.js +1131 -0
- package/dist/compare/inline-atoms.d.ts +4 -4
- package/dist/compare/inline-atoms.js +28 -139
- package/dist/compare/inline-provenance-model.d.ts +37 -0
- package/dist/compare/inline-provenance-model.js +138 -0
- package/dist/compare/inline-provenance.d.ts +52 -4
- package/dist/compare/inline-provenance.js +40 -7
- package/dist/compare/plan.d.ts +38 -4
- package/dist/compare/plan.js +22 -8
- package/dist/compare/scenario.d.ts +22 -1
- package/dist/compare/section-boundary-properties.d.ts +38 -5
- package/dist/compare/section-boundary-properties.js +164 -48
- package/dist/compare/style-resources.d.ts +3 -2
- package/dist/compare/style-resources.js +5 -4
- package/dist/compare/types.d.ts +5 -2
- package/dist/compare/verification.d.ts +24 -3
- package/dist/compare/verification.js +25 -18
- package/dist/compat/eigenpal.d.ts +32 -31
- package/dist/compat/eigenpal.js +3 -5
- package/dist/content-controls/findContentControls.d.ts +9 -0
- package/dist/content-controls/index.d.ts +8 -0
- package/dist/content-controls/mutateContentControls.d.ts +9 -0
- package/dist/controller/activeEditorStory.d.ts +1 -0
- package/dist/controller/anonymizationHighlights.d.ts +56 -0
- package/dist/controller/anonymizationHighlights.js +148 -0
- package/dist/controller/autocompleteSuggestion.d.ts +85 -0
- package/dist/controller/autocompleteSuggestion.js +213 -0
- package/dist/controller/canonicalClipboard.d.ts +2 -2
- package/dist/controller/canonicalClipboard.js +36 -16
- package/dist/controller/canonicalClipboardResources.js +9 -4
- package/dist/controller/canonicalCollaboration.d.ts +147 -0
- package/dist/controller/canonicalCollaboration.js +360 -0
- package/dist/controller/canonicalComposition.d.ts +7 -1
- package/dist/controller/canonicalComposition.js +48 -13
- package/dist/controller/canonicalContentControlValue.d.ts +17 -0
- package/dist/controller/canonicalContentControlValue.js +72 -0
- package/dist/controller/canonicalIndexedDbJournal.d.ts +6 -0
- package/dist/controller/canonicalIndexedDbJournal.js +80 -0
- package/dist/controller/canonicalInput.d.ts +13 -2
- package/dist/controller/canonicalInput.js +100 -17
- package/dist/controller/canonicalPresence.d.ts +63 -0
- package/dist/controller/canonicalPresence.js +125 -0
- package/dist/controller/canonicalReview.d.ts +1 -1
- package/dist/controller/canonicalReview.js +1 -1
- package/dist/controller/canonicalRoomAuthority.d.ts +66 -0
- package/dist/controller/canonicalRoomAuthority.js +119 -0
- package/dist/controller/canonicalRoomEditor.d.ts +87 -0
- package/dist/controller/canonicalRoomEditor.js +98 -0
- package/dist/controller/canonicalRoomTransport.d.ts +79 -0
- package/dist/controller/canonicalRoomTransport.js +104 -0
- package/dist/controller/canonicalRoomWire.d.ts +80 -0
- package/dist/controller/canonicalRoomWire.js +155 -0
- package/dist/controller/canonicalStoryEditor.d.ts +13 -1
- package/dist/controller/canonicalStoryEditor.js +55 -19
- package/dist/controller/canonicalStructure.d.ts +15 -5
- package/dist/controller/canonicalStructure.js +95 -34
- package/dist/controller/canonicalTabRoom.d.ts +91 -0
- package/dist/controller/canonicalTabRoom.js +553 -0
- package/dist/controller/canonicalYjsRoom.d.ts +102 -0
- package/dist/controller/canonicalYjsRoom.js +454 -0
- package/dist/controller/contentControlWidgetController.d.ts +16 -0
- package/dist/controller/contentControlWidgetController.js +7 -1
- package/dist/controller/documentChangeNotification.d.ts +5 -0
- package/dist/controller/documentChangeNotification.js +7 -0
- package/dist/controller/folioEditor.d.ts +12 -4
- package/dist/controller/folioEditor.js +21 -1
- package/dist/controller/folioEditorEvents.d.ts +1 -1
- package/dist/controller/fontReadiness.d.ts +14 -1
- package/dist/controller/fontReadiness.js +4 -4
- package/dist/controller/headerFooterEditorManager.d.ts +17 -6
- package/dist/controller/headerFooterEditorManager.js +29 -25
- package/dist/controller/hiddenEditorApi.d.ts +97 -14
- package/dist/controller/hiddenEditorApi.js +44 -3
- package/dist/controller/hiddenEditorManager.d.ts +68 -16
- package/dist/controller/hiddenEditorManager.js +440 -85
- package/dist/controller/hyphenationReadiness.d.ts +10 -0
- package/dist/controller/layoutPipeline.d.ts +14 -12
- package/dist/controller/layoutPipeline.js +66 -54
- package/dist/controller/layoutSession.d.ts +10 -6
- package/dist/controller/layoutSession.js +3 -1
- package/dist/controller/legacyTextAddress.d.ts +9 -0
- package/dist/controller/legacyTextAddress.js +52 -0
- package/dist/controller/noteEditorManager.d.ts +18 -6
- package/dist/controller/noteEditorManager.js +38 -32
- package/dist/controller/textPositionLookup.d.ts +24 -0
- package/dist/controller/textPositionLookup.js +78 -0
- package/dist/display-list/build/buildContext.d.ts +11 -0
- package/dist/display-list/build/buildDisplayList.d.ts +14 -1
- package/dist/display-list/build/colors.d.ts +8 -0
- package/dist/display-list/build/floatingImages.d.ts +10 -0
- package/dist/display-list/build/fontTable.d.ts +8 -0
- package/dist/display-list/build/furniture.d.ts +14 -2
- package/dist/display-list/build/glyphs.d.ts +7 -0
- package/dist/display-list/build/headerFooterPrimitives.d.ts +13 -0
- package/dist/display-list/build/imagePrimitives.d.ts +10 -0
- package/dist/display-list/build/pageBorderPrimitives.d.ts +16 -2
- package/dist/display-list/build/pageFurniture.d.ts +13 -0
- package/dist/display-list/build/paragraphPrimitives.d.ts +18 -0
- package/dist/display-list/build/paragraphPrimitives.js +17 -5
- package/dist/display-list/build/previewPrimitives.d.ts +14 -0
- package/dist/display-list/build/regions.d.ts +14 -0
- package/dist/display-list/build/storyPrimitives.d.ts +16 -0
- package/dist/display-list/build/strokes.d.ts +21 -3
- package/dist/display-list/build/strokes.js +2 -3
- package/dist/display-list/build/tablePrimitives.d.ts +15 -1
- package/dist/display-list/build/tablePrimitives.js +92 -55
- package/dist/display-list/build/textBoxPrimitives.d.ts +6 -0
- package/dist/display-list/build/unsupported.d.ts +10 -0
- package/dist/display-list/build/watermarkPrimitives.d.ts +15 -1
- package/dist/display-list/dom/renderDisplayListToDom.d.ts +33 -0
- package/dist/display-list/dom/renderDisplayListToDom.js +21 -11
- package/dist/display-list/editor/displayListPagePainter.d.ts +29 -1
- package/dist/display-list/editor/pageRenderer.d.ts +7 -0
- package/dist/display-list/html/renderDisplayListToHtml.d.ts +10 -0
- package/dist/display-list/primitives.d.ts +12 -1
- package/dist/display-list/selectDisplayPages.d.ts +8 -0
- package/dist/display-list/types.d.ts +11 -0
- package/dist/document-operations.d.ts +34 -4
- package/dist/document-operations.js +178 -40
- package/dist/docx/attributeRemainder.d.ts +35 -1
- package/dist/docx/automaticNoteMarkImport.d.ts +12 -0
- package/dist/docx/automaticNoteMarkImport.js +41 -0
- package/dist/docx/blockContentParser.d.ts +14 -5
- package/dist/docx/blockContentParser.js +19 -0
- package/dist/docx/blockPlainText.d.ts +14 -0
- package/dist/docx/blockPlainText.js +55 -4
- package/dist/docx/bookmarkParser.d.ts +17 -0
- package/dist/docx/bookmarkRangeJoin.d.ts +14 -0
- package/dist/docx/borderParser.d.ts +11 -0
- package/dist/docx/builtInStyles.d.ts +44 -1
- package/dist/docx/canonicalSave.d.ts +14 -4
- package/dist/docx/canonicalSave.js +133 -30
- package/dist/docx/canonicalSessionInput.d.ts +59 -4
- package/dist/docx/canonicalSessionInput.js +147 -6
- package/dist/docx/canonicalStoryRepack.d.ts +1 -0
- package/dist/docx/canonicalStoryRepack.js +2 -2
- package/dist/docx/chartPreview.js +10 -9
- package/dist/docx/commentAnchorIndex.d.ts +46 -1
- package/dist/docx/commentAnchorIndex.js +187 -7
- package/dist/docx/commentIdNormalization.d.ts +14 -0
- package/dist/docx/commentParagraphIds.d.ts +17 -0
- package/dist/docx/commentParagraphIds.js +79 -0
- package/dist/docx/commentParser.d.ts +20 -1
- package/dist/docx/commentParser.js +5 -0
- package/dist/docx/commentRangeIntegrity.js +27 -11
- package/dist/docx/commentRangeJoin.d.ts +21 -1
- package/dist/docx/commentRangeJoin.js +5 -1
- package/dist/docx/commentReferenceCompletion.d.ts +29 -2
- package/dist/docx/commentReferenceCompletion.js +4 -3
- package/dist/docx/commentReferenceNormalization.d.ts +17 -0
- package/dist/docx/commentReferenceNormalization.js +484 -49
- package/dist/docx/commentReplyMarkers.d.ts +22 -0
- package/dist/docx/compatibility.d.ts +10 -0
- package/dist/docx/containerChildren.d.ts +26 -1
- package/dist/docx/containerChildren.js +29 -3
- package/dist/docx/contentTypeRegistry.d.ts +16 -0
- package/dist/docx/contentTypeRegistry.js +49 -21
- package/dist/docx/danglingRelationshipReferences.d.ts +13 -0
- package/dist/docx/defaultParagraphStyle.d.ts +14 -1
- package/dist/docx/documentClone.d.ts +3 -2
- package/dist/docx/documentClone.js +1 -1
- package/dist/docx/documentParser.d.ts +28 -3
- package/dist/docx/documentParser.js +71 -4
- package/dist/docx/drawingAnchor.d.ts +17 -0
- package/dist/docx/drawingGroupChildren.d.ts +12 -0
- package/dist/docx/drawingIdNormalization.d.ts +8 -0
- package/dist/docx/drawingIdNormalization.js +46 -1
- package/dist/docx/drawingUtils.d.ts +6 -0
- package/dist/docx/drawingUtils.js +2 -2
- package/dist/docx/encryption/agileDecryption.d.ts +7 -0
- package/dist/docx/ensureParaIds.d.ts +73 -0
- package/dist/docx/ensureParaIds.js +299 -59
- package/dist/docx/ensureUniqueControlIds.js +10 -3
- package/dist/docx/ensureUniqueRevisionIds.d.ts +28 -0
- package/dist/docx/ensureUniqueRevisionIds.js +140 -0
- package/dist/docx/fieldParser.d.ts +27 -2
- package/dist/docx/fieldState.d.ts +15 -0
- package/dist/docx/fieldWrapperCaptures.d.ts +18 -0
- package/dist/docx/fieldWrapperCaptures.js +117 -0
- package/dist/docx/foldedListNumberFields.d.ts +14 -0
- package/dist/docx/fontTableParser.d.ts +11 -0
- package/dist/docx/footnoteParser.d.ts +24 -3
- package/dist/docx/footnoteParser.js +29 -6
- package/dist/docx/graphicFrameLocks.d.ts +9 -1
- package/dist/docx/groupDrawingParser.d.ts +2 -2
- package/dist/docx/headerFooterParser.d.ts +37 -5
- package/dist/docx/headerFooterParser.js +18 -4
- package/dist/docx/headerFooterRefParser.d.ts +7 -0
- package/dist/docx/hostCommentThreads.d.ts +21 -2
- package/dist/docx/hostCommentThreads.js +25 -2
- package/dist/docx/hyperlinkParser.d.ts +20 -3
- package/dist/docx/hyperlinkParser.js +19 -24
- package/dist/docx/imageParser.d.ts +27 -0
- package/dist/docx/index.d.ts +3 -3
- package/dist/docx/inlineContentRemovals.d.ts +8 -0
- package/dist/docx/inlineWrapperContent.d.ts +33 -1
- package/dist/docx/inlineWrapperContent.js +145 -1
- package/dist/docx/inlineWrapperParser.d.ts +14 -0
- package/dist/docx/listMarkerComputation.d.ts +37 -6
- package/dist/docx/listMarkerComputation.js +77 -28
- package/dist/docx/listModelNormalization.d.ts +24 -8
- package/dist/docx/listModelNormalization.js +426 -143
- package/dist/docx/listNumberingInstances.d.ts +39 -9
- package/dist/docx/listNumberingInstances.js +91 -44
- package/dist/docx/mainDocumentPart.d.ts +22 -1
- package/dist/docx/mainDocumentPart.js +51 -12
- package/dist/docx/markupRangeMarker.d.ts +16 -0
- package/dist/docx/markupRangeMarker.js +11 -2
- package/dist/docx/mathToMathml.d.ts +28 -0
- package/dist/docx/mergePropertyChangeLinks.d.ts +11 -0
- package/dist/docx/mergePropertyChangeLinks.js +30 -0
- package/dist/docx/nonVisualDrawingProps.d.ts +6 -0
- package/dist/docx/normalizeBaseDirection.d.ts +17 -0
- package/dist/docx/normalizedSourceParts.d.ts +21 -0
- package/dist/docx/normalizedSourceParts.js +81 -0
- package/dist/docx/notePropertiesParser.d.ts +7 -0
- package/dist/docx/noteReferenceMark.d.ts +9 -0
- package/dist/docx/noteReferenceStyles.d.ts +13 -0
- package/dist/docx/numberingIds.d.ts +6 -0
- package/dist/docx/numberingIds.js +6 -1
- package/dist/docx/numberingParser.d.ts +12 -0
- package/dist/docx/numberingReference.d.ts +10 -0
- package/dist/docx/numberingReferenceNormalization.d.ts +19 -0
- package/dist/docx/numberingReferenceNormalization.js +12 -2
- package/dist/docx/packageRelationshipsRoot.d.ts +24 -0
- package/dist/docx/packageRelationshipsRoot.js +28 -0
- package/dist/docx/packageUnnamedParagraphIds.d.ts +18 -0
- package/dist/docx/packageUnnamedParagraphIds.js +78 -0
- package/dist/docx/paraIdAttribute.d.ts +15 -0
- package/dist/docx/paragraphParser.d.ts +15 -3
- package/dist/docx/paragraphParser.js +126 -140
- package/dist/docx/paragraphProperties.d.ts +15 -1
- package/dist/docx/paragraphProperties.js +3 -5
- package/dist/docx/paragraphPropertySource.d.ts +60 -4
- package/dist/docx/paragraphPropertySource.js +239 -27
- package/dist/docx/paragraphTextBoxEnrichment.d.ts +3 -2
- package/dist/docx/paragraphTraversal.d.ts +39 -4
- package/dist/docx/paragraphTraversal.js +158 -42
- package/dist/docx/parseContext.d.ts +15 -0
- package/dist/docx/parseWarningMessage.d.ts +9 -0
- package/dist/docx/parseWarningMessage.js +7 -0
- package/dist/docx/parser.d.ts +1 -1
- package/dist/docx/parser.js +105 -29
- package/dist/docx/parserEnums.d.ts +21 -0
- package/dist/docx/partRelationships.d.ts +15 -0
- package/dist/docx/partRelationships.js +58 -0
- package/dist/docx/preservedRunContent.d.ts +2 -1
- package/dist/docx/preservedRunContent.js +40 -1
- package/dist/docx/previewBudget.d.ts +31 -0
- package/dist/docx/relsParser.d.ts +23 -0
- package/dist/docx/removeHeaderFooterParts.d.ts +1 -1
- package/dist/docx/removeHeaderFooterParts.js +1 -1
- package/dist/docx/replyToComment.d.ts +22 -1
- package/dist/docx/replyToComment.js +25 -21
- package/dist/docx/reviewResolutionProvenance.d.ts +32 -5
- package/dist/docx/reviewResolutionProvenance.js +284 -40
- package/dist/docx/rezip.d.ts +58 -11
- package/dist/docx/rezip.js +367 -101
- package/dist/docx/runConsolidator.d.ts +13 -0
- package/dist/docx/runParser.d.ts +4 -3
- package/dist/docx/runParser.js +27 -6
- package/dist/docx/runPayload.d.ts +29 -0
- package/dist/docx/saveDiagnostics.d.ts +3 -5
- package/dist/docx/sdtProperties.d.ts +17 -0
- package/dist/docx/sdtPropertiesPatch.d.ts +14 -0
- package/dist/docx/sectionParser.d.ts +21 -0
- package/dist/docx/sectionParser.js +1 -6
- package/dist/docx/selectiveSave.js +271 -80
- package/dist/docx/selectiveXmlPatch.d.ts +36 -1
- package/dist/docx/selectiveXmlPatch.js +342 -78
- package/dist/docx/serializer/blockSdtSerializer.d.ts +10 -0
- package/dist/docx/serializer/borderSerializer.d.ts +8 -0
- package/dist/docx/serializer/commentSerializer.d.ts +12 -1
- package/dist/docx/serializer/commentSerializer.js +1 -1
- package/dist/docx/serializer/documentSerializer.d.ts +21 -3
- package/dist/docx/serializer/documentSerializer.js +46 -7
- package/dist/docx/serializer/groupTextBoxWriteBack.d.ts +14 -0
- package/dist/docx/serializer/headerFooterSerializer.d.ts +11 -0
- package/dist/docx/serializer/markupRangeAttributes.d.ts +8 -0
- package/dist/docx/serializer/markupRangeAttributes.js +3 -1
- package/dist/docx/serializer/noteSerializer.d.ts +21 -0
- package/dist/docx/serializer/numberingSerializer.d.ts +14 -0
- package/dist/docx/serializer/paragraphSerializer.d.ts +11 -0
- package/dist/docx/serializer/paragraphSerializer.js +21 -9
- package/dist/docx/serializer/partNamespaces.d.ts +3 -1
- package/dist/docx/serializer/partNamespaces.js +4 -2
- package/dist/docx/serializer/runSerializer.js +12 -3
- package/dist/docx/serializer/sdtPropertiesSerializer.d.ts +15 -0
- package/dist/docx/serializer/stylesSerializer.d.ts +26 -1
- package/dist/docx/serializer/stylesSerializer.js +111 -23
- package/dist/docx/serializer/tableSerializer.js +9 -7
- package/dist/docx/serializer/themeSerializer.d.ts +2 -1
- package/dist/docx/server/applyDocxXmlPatchProposal.js +1 -1
- package/dist/docx/server/build.d.ts +1 -1
- package/dist/docx/server/changeListFormat.d.ts +20 -0
- package/dist/docx/server/changeListFormat.js +102 -0
- package/dist/docx/server/createBilingualDocument.d.ts +21 -0
- package/dist/docx/server/materializeYjsDocx.js +2 -2
- package/dist/docx/server/migrateYjsAttrSchema.js +5 -5
- package/dist/docx/sessionListPruning.d.ts +11 -0
- package/dist/docx/settingsParser.d.ts +10 -0
- package/dist/docx/shadingParser.d.ts +10 -0
- package/dist/docx/shapeAlternateContent.js +9 -2
- package/dist/docx/shapeParser.d.ts +27 -0
- package/dist/docx/splitRevisionPieces.d.ts +1 -1
- package/dist/docx/storyBlockReplay.d.ts +37 -3
- package/dist/docx/storyBlockReplay.js +291 -69
- package/dist/docx/strictNames.d.ts +12 -1
- package/dist/docx/strictValueEncodings.gen.d.ts +9 -0
- package/dist/docx/structuralXmlPatch.d.ts +19 -3
- package/dist/docx/structuralXmlPatch.js +139 -35
- package/dist/docx/styleParser.d.ts +20 -3
- package/dist/docx/styleParser.js +3 -2
- package/dist/docx/tableLook.d.ts +15 -1
- package/dist/docx/tableParser.d.ts +17 -6
- package/dist/docx/tableParser.js +10 -5
- package/dist/docx/textBoxContentParser.d.ts +3 -2
- package/dist/docx/textBoxParser.d.ts +30 -3
- package/dist/docx/themeColorAttribute.d.ts +11 -0
- package/dist/docx/themeParser.d.ts +17 -5
- package/dist/docx/trackedMoveRangeNormalization.d.ts +9 -0
- package/dist/docx/trackedMoveRangeNormalization.js +40 -16
- package/dist/docx/transitionalSpelling.d.ts +9 -0
- package/dist/docx/unnamedParagraphIds.d.ts +33 -0
- package/dist/docx/unnamedParagraphIds.js +43 -0
- package/dist/docx/unreferencedHeaderFooters.d.ts +27 -0
- package/dist/docx/unreferencedHeaderFooters.js +130 -0
- package/dist/docx/unzip.d.ts +25 -0
- package/dist/docx/verbatimCapture.d.ts +18 -0
- package/dist/docx/verbatimCapture.js +76 -9
- package/dist/docx/vmlImageParser.d.ts +32 -1
- package/dist/docx/watermarkParser.d.ts +21 -0
- package/dist/docx/wrapPolygon.d.ts +11 -0
- package/dist/docx/wrapTypes.d.ts +6 -0
- package/dist/docx/xmlParser.d.ts +23 -19
- package/dist/docx/xmlParser.js +2 -20
- package/dist/docx/xmlRootInsertion.d.ts +8 -0
- package/dist/docx/xmlRootInsertion.js +28 -0
- package/dist/docx/xmlSafety.d.ts +1 -0
- package/dist/docx/xmlSafety.js +7 -11
- package/dist/export-pdf.d.ts +24 -1
- package/dist/fields/resolveFieldValues.js +2 -1
- package/dist/fonts/fontsourceFaces.d.ts +2 -2
- package/dist/fonts/headlessMeasure.d.ts +16 -0
- package/dist/generated/text_shaper.js +71 -59
- package/dist/generated/text_shaper_bg.wasm +0 -0
- package/dist/headless-layout.d.ts +36 -5
- package/dist/headless-layout.js +19 -4
- package/dist/i18n/messages/ar.gen.js +2 -0
- package/dist/i18n/messages/catalogs.gen.d.ts +34 -0
- package/dist/i18n/messages/catalogs.gen.js +34 -0
- package/dist/i18n/messages/cs.gen.js +2 -0
- package/dist/i18n/messages/de.gen.js +2 -0
- package/dist/i18n/messages/en.gen.js +2 -0
- package/dist/i18n/messages/es.gen.js +2 -0
- package/dist/i18n/messages/et.gen.js +2 -0
- package/dist/i18n/messages/fr.gen.js +2 -0
- package/dist/i18n/messages/he.gen.js +2 -0
- package/dist/i18n/messages/hi.gen.js +2 -0
- package/dist/i18n/messages/hu.gen.js +2 -0
- package/dist/i18n/messages/lt.gen.js +2 -0
- package/dist/i18n/messages/lv.gen.js +2 -0
- package/dist/i18n/messages/messages.gen.d.ts +2 -0
- package/dist/i18n/messages/pl.gen.js +2 -0
- package/dist/i18n/messages/pt-BR.gen.js +2 -0
- package/dist/i18n/messages/sk.gen.js +2 -0
- package/dist/i18n/messages/tr.gen.js +2 -0
- package/dist/i18n/messages/zh-CN.gen.js +2 -0
- package/dist/index.d.ts +33 -31
- package/dist/index.js +3 -4
- package/dist/internal/canonicalOperationStaging.d.ts +2 -0
- package/dist/internal/canonicalOperationStaging.js +4 -0
- package/dist/internal/canonicalTyping.d.ts +9 -0
- package/dist/internal/canonicalTyping.js +7 -0
- package/dist/internal/compare/inline-presentation.d.ts +8 -0
- package/dist/internal/indexedPositionMap.js +2 -1
- package/dist/internal/pageBreakRunDescendantIndex.d.ts +7 -2
- package/dist/internal/pageBreakRunDescendantIndex.js +12 -3
- package/dist/internal/revisionResolutionInline.js +13 -13
- package/dist/internal/revisionResolutionStep.js +1 -0
- package/dist/internal/revisionResolutionTracking.js +2 -1
- package/dist/internal/subtreeHolds.d.ts +12 -0
- package/dist/internal/subtreeHolds.js +25 -0
- package/dist/internal/wholeStoryRevisionResolution.d.ts +1 -1
- package/dist/internal/wholeStoryRevisionResolution.js +57 -66
- package/dist/layout-bridge/cellSelectionHighlight.d.ts +8 -0
- package/dist/layout-bridge/cellSelectionHighlight.js +3 -3
- package/dist/layout-bridge/convert/altChunkPlaceholder.d.ts +7 -0
- package/dist/layout-bridge/convert/editingFont.d.ts +26 -0
- package/dist/layout-bridge/convert/editingFont.js +42 -0
- package/dist/layout-bridge/convert/endnoteLayout.d.ts +19 -1
- package/dist/layout-bridge/convert/flowBlockPostprocessing.d.ts +5 -0
- package/dist/layout-bridge/convert/flowBlockPostprocessing.js +20 -12
- package/dist/layout-bridge/convert/flowBorders.d.ts +10 -4
- package/dist/layout-bridge/convert/flowBorders.js +13 -1
- package/dist/layout-bridge/convert/flowConversionShared.d.ts +37 -8
- package/dist/layout-bridge/convert/flowConversionShared.js +39 -6
- package/dist/layout-bridge/convert/footnoteLayout.d.ts +12 -4
- package/dist/layout-bridge/convert/footnoteLayout.js +3 -1
- package/dist/layout-bridge/convert/headerFooterLayout.d.ts +25 -5
- package/dist/layout-bridge/convert/imageConversion.d.ts +5 -1
- package/dist/layout-bridge/convert/listMarkers.d.ts +12 -7
- package/dist/layout-bridge/convert/markupViewFlow.d.ts +21 -0
- package/dist/layout-bridge/convert/markupViewFlow.js +4 -1
- package/dist/layout-bridge/convert/noteReferences.d.ts +4 -0
- package/dist/layout-bridge/convert/pageBreakSplitting.d.ts +4 -0
- package/dist/layout-bridge/convert/paragraphAttrs.d.ts +25 -9
- package/dist/layout-bridge/convert/paragraphAttrs.js +12 -5
- package/dist/layout-bridge/convert/paragraphBlockCache.d.ts +36 -0
- package/dist/layout-bridge/convert/paragraphBlockCache.js +130 -0
- package/dist/layout-bridge/convert/paragraphConversion.d.ts +20 -6
- package/dist/layout-bridge/convert/paragraphConversion.js +37 -5
- package/dist/layout-bridge/convert/paragraphFrames.d.ts +2 -4
- package/dist/layout-bridge/convert/paragraphFrames.js +4 -4
- package/dist/layout-bridge/convert/paragraphMarkFormatting.d.ts +13 -4
- package/dist/layout-bridge/convert/paragraphRuns.d.ts +7 -2
- package/dist/layout-bridge/convert/paragraphRuns.js +18 -4
- package/dist/layout-bridge/convert/runFormattingMerge.d.ts +10 -4
- package/dist/layout-bridge/convert/runMarkFormatting.d.ts +8 -3
- package/dist/layout-bridge/convert/runMarkFormatting.js +3 -5
- package/dist/layout-bridge/convert/sectionBoundaries.d.ts +4 -0
- package/dist/layout-bridge/convert/sectionBoundaries.js +16 -0
- package/dist/layout-bridge/convert/tableConversion.d.ts +15 -5
- package/dist/layout-bridge/convert/tableConversion.js +40 -19
- package/dist/layout-bridge/convert/templatePreviewFlow.d.ts +38 -1
- package/dist/layout-bridge/convert/textBoxFill.d.ts +7 -2
- package/dist/layout-bridge/convert/textFormattingConversion.d.ts +18 -12
- package/dist/layout-bridge/convert/toFlowBlocks.d.ts +8 -2
- package/dist/layout-bridge/convert/toFlowBlocks.js +200 -18
- package/dist/layout-bridge/convert/topLevelConversion.d.ts +96 -0
- package/dist/layout-bridge/convert/topLevelConversion.js +109 -0
- package/dist/layout-bridge/convert/wrapEditorViewAsSurface.d.ts +10 -0
- package/dist/layout-bridge/dom/clickToPositionDom.js +45 -44
- package/dist/layout-bridge/dom/findBodyPmSpans.js +4 -3
- package/dist/layout-bridge/dom/findHfPmSpans.js +10 -15
- package/dist/layout-bridge/dom/imeCaretAnchor.d.ts +8 -0
- package/dist/layout-bridge/dom/imeCaretAnchor.js +71 -7
- package/dist/layout-bridge/dom/noteStoryDom.d.ts +1 -0
- package/dist/layout-bridge/dom/textStreamDom.js +3 -2
- package/dist/layout-bridge/engine/blockIndex.d.ts +3 -0
- package/dist/layout-bridge/engine/clickToPosition.d.ts +9 -0
- package/dist/layout-bridge/engine/hitTest.d.ts +6 -0
- package/dist/layout-bridge/engine/hitTest.js +3 -3
- package/dist/layout-bridge/engine/measuring/index.d.ts +20 -8
- package/dist/layout-bridge/engine/selectionRects.d.ts +9 -0
- package/dist/layout-bridge/headerFooterLayout.d.ts +12 -0
- package/dist/layout-bridge/headerFooterLayout.js +15 -14
- package/dist/layout-bridge/sectionColumns.d.ts +10 -1
- package/dist/layout-bridge/tableInsertHover.js +2 -1
- package/dist/layout-engine/footnoteContinuation.d.ts +8 -0
- package/dist/layout-engine/imageLayout.d.ts +4 -1
- package/dist/layout-engine/index.d.ts +10 -5
- package/dist/layout-engine/index.js +9 -3
- package/dist/layout-engine/keep-together.d.ts +6 -0
- package/dist/layout-engine/layoutFlowShared.d.ts +4 -0
- package/dist/layout-engine/layoutInstrumentation.d.ts +40 -1
- package/dist/layout-engine/layoutInstrumentation.js +26 -4
- package/dist/layout-engine/lineFlow.d.ts +1 -0
- package/dist/layout-engine/lineFlow.js +4 -1
- package/dist/layout-engine/measure/advanceComposition.d.ts +14 -1
- package/dist/layout-engine/measure/automaticTextSpacing.d.ts +1 -1
- package/dist/layout-engine/measure/cache.d.ts +8 -0
- package/dist/layout-engine/measure/cache.js +9 -1
- package/dist/layout-engine/measure/crossRunWords.d.ts +1 -1
- package/dist/layout-engine/measure/floatingLineClearance.d.ts +4 -0
- package/dist/layout-engine/measure/floatingTablePosition.d.ts +32 -1
- package/dist/layout-engine/measure/floatingTablePosition.js +49 -1
- package/dist/layout-engine/measure/font-metrics.worker.d.ts +16 -0
- package/dist/layout-engine/measure/hyphenationDictionaries.d.ts +18 -0
- package/dist/layout-engine/measure/hyphenationPreload.d.ts +4 -0
- package/dist/layout-engine/measure/index.d.ts +18 -8
- package/dist/layout-engine/measure/index.js +2 -1
- package/dist/layout-engine/measure/inlineObjectMetrics.d.ts +4 -0
- package/dist/layout-engine/measure/justification.d.ts +5 -1
- package/dist/layout-engine/measure/lineFitting.d.ts +6 -1
- package/dist/layout-engine/measure/lineTypography.d.ts +6 -1
- package/dist/layout-engine/measure/listMarkerWidth.d.ts +16 -1
- package/dist/layout-engine/measure/measureBlocks.d.ts +4 -1
- package/dist/layout-engine/measure/measureBlocks.js +127 -102
- package/dist/layout-engine/measure/measureContainer.d.ts +17 -0
- package/dist/layout-engine/measure/measureHelpers.d.ts +10 -1
- package/dist/layout-engine/measure/measureParagraph.d.ts +7 -1
- package/dist/layout-engine/measure/measureParagraph.js +51 -21
- package/dist/layout-engine/measure/measureProvider.d.ts +10 -0
- package/dist/layout-engine/measure/measureTypes.d.ts +8 -0
- package/dist/layout-engine/measure/measureWorker.d.ts +30 -0
- package/dist/layout-engine/measure/measureWorkerProtocol.d.ts +14 -0
- package/dist/layout-engine/measure/measuresHoldNoPositions.d.ts +40 -0
- package/dist/layout-engine/measure/measuresHoldNoPositions.js +14 -0
- package/dist/layout-engine/measure/paragraphKeyMemo.d.ts +20 -0
- package/dist/layout-engine/measure/paragraphKeyMemo.js +92 -0
- package/dist/layout-engine/measure/paragraphMeasureShared.d.ts +21 -2
- package/dist/layout-engine/measure/paragraphMeasureShared.js +20 -1
- package/dist/layout-engine/measure/paragraphTabs.d.ts +4 -0
- package/dist/layout-engine/measure/raisedTableWrap.d.ts +16 -0
- package/dist/layout-engine/measure/raisedTableWrap.js +105 -0
- package/dist/layout-engine/measure/tableBorderBands.d.ts +35 -0
- package/dist/layout-engine/measure/tableBorderBands.js +251 -0
- package/dist/layout-engine/measure/tableCellFloating.js +1 -1
- package/dist/layout-engine/measure/tableCellFlow.d.ts +4 -4
- package/dist/layout-engine/measure/tableCellFlow.js +7 -10
- package/dist/layout-engine/measure/tableCellGrid.d.ts +4 -1
- package/dist/layout-engine/measure/tableCellGrid.js +30 -3
- package/dist/layout-engine/measure/tableFragmentBorderGeometry.js +2 -1
- package/dist/layout-engine/measure/tableMeasureMemo.d.ts +23 -0
- package/dist/layout-engine/measure/tableMeasureMemo.js +40 -0
- package/dist/layout-engine/measure/tableNoWrapWidths.d.ts +12 -0
- package/dist/layout-engine/measure/tableNoWrapWidths.js +73 -0
- package/dist/layout-engine/measure/tableVisibleBand.d.ts +6 -0
- package/dist/layout-engine/measure/textMeasurementPolicy.d.ts +7 -1
- package/dist/layout-engine/noteAreaFlow.d.ts +10 -1
- package/dist/layout-engine/paginator.d.ts +6 -0
- package/dist/layout-engine/paginator.js +6 -5
- package/dist/layout-engine/paragraphLayout.d.ts +5 -1
- package/dist/layout-engine/paragraphSpacing.d.ts +17 -2
- package/dist/layout-engine/paragraphSpacing.js +103 -15
- package/dist/layout-engine/pmPageIndex.d.ts +14 -1
- package/dist/layout-engine/pmPageIndex.js +10 -1
- package/dist/layout-engine/section-breaks.d.ts +6 -0
- package/dist/layout-engine/sectionLayout.d.ts +6 -1
- package/dist/layout-engine/sectionVerticalAlignment.js +2 -1
- package/dist/layout-engine/tableHeaderCompatibility.d.ts +3 -0
- package/dist/layout-engine/tableHeaderCompatibility.js +5 -0
- package/dist/layout-engine/tableLayout.d.ts +17 -6
- package/dist/layout-engine/tableLayout.js +36 -25
- package/dist/layout-engine/tableRowBreak.d.ts +16 -0
- package/dist/layout-engine/tableRowBreak.js +2 -1
- package/dist/layout-engine/textBoxFlow.d.ts +9 -0
- package/dist/layout-engine/textBoxLayout.d.ts +5 -1
- package/dist/layout-engine/types.d.ts +41 -2
- package/dist/layout-engine/types.js +77 -27
- package/dist/layout-painter/borderStroke.d.ts +1 -1
- package/dist/layout-painter/characterFillBand.d.ts +14 -0
- package/dist/layout-painter/characterFillBand.js +79 -0
- package/dist/layout-painter/imageLayout.d.ts +11 -2
- package/dist/layout-painter/imageLayout.js +2 -1
- package/dist/layout-painter/index.d.ts +12 -6
- package/dist/layout-painter/pageShellStyles.d.ts +19 -0
- package/dist/layout-painter/pageShellStyles.js +32 -0
- package/dist/layout-painter/previewSvg.d.ts +7 -0
- package/dist/layout-painter/reconcileRenderedContent.d.ts +19 -0
- package/dist/layout-painter/reconcileRenderedContent.js +119 -0
- package/dist/layout-painter/registry/modules/image.d.ts +7 -0
- package/dist/layout-painter/registry/modules/paragraph.d.ts +8 -0
- package/dist/layout-painter/registry/modules/table.d.ts +6 -0
- package/dist/layout-painter/registry/modules/textBox.d.ts +3 -0
- package/dist/layout-painter/registry/modules.d.ts +10 -0
- package/dist/layout-painter/registry/registry.d.ts +8 -0
- package/dist/layout-painter/registry/types.d.ts +11 -0
- package/dist/layout-painter/renderFragment.d.ts +6 -0
- package/dist/layout-painter/renderFragment.js +4 -6
- package/dist/layout-painter/renderImage.d.ts +8 -0
- package/dist/layout-painter/renderImage.js +2 -2
- package/dist/layout-painter/renderPage.d.ts +10 -3
- package/dist/layout-painter/renderPage.js +31 -33
- package/dist/layout-painter/renderParagraph.d.ts +6 -0
- package/dist/layout-painter/renderParagraph.js +36 -19
- package/dist/layout-painter/renderTable.d.ts +10 -1
- package/dist/layout-painter/renderTable.js +121 -36
- package/dist/layout-painter/renderTextBox.d.ts +9 -0
- package/dist/layout-painter/renderTextBox.js +2 -2
- package/dist/layout-painter/renderUtils.d.ts +5 -1
- package/dist/layout-painter/renderWatermark.d.ts +11 -1
- package/dist/layout-painter/sdtBoundary.d.ts +10 -0
- package/dist/layout-painter/sdtBoundary.js +3 -2
- package/dist/managers/ClipboardManager.d.ts +13 -0
- package/dist/managers/ContextMenuManager.d.ts +16 -4
- package/dist/managers/ContextMenuManager.js +3 -3
- package/dist/managers/DocumentLoaderManager.d.ts +19 -5
- package/dist/managers/DocumentLoaderManager.js +48 -13
- package/dist/managers/EditorModeManager.d.ts +11 -0
- package/dist/managers/ErrorManager.d.ts +11 -0
- package/dist/managers/FindReplaceManager.d.ts +14 -27
- package/dist/managers/FindReplaceManager.js +0 -49
- package/dist/managers/HistoryManager.d.ts +18 -0
- package/dist/managers/TableSelectionManager.d.ts +18 -4
- package/dist/managers/TableSelectionManager.js +22 -5
- package/dist/managers/editorShortcuts.d.ts +14 -2
- package/dist/managers/editorShortcuts.js +5 -3
- package/dist/managers/types.d.ts +15 -1
- package/dist/markdown/annotations.d.ts +9 -0
- package/dist/markdown/countParagraphList.d.ts +8 -0
- package/dist/markdown/escape.d.ts +6 -4
- package/dist/markdown/escape.js +17 -8
- package/dist/markdown/images.d.ts +11 -0
- package/dist/markdown/index.d.ts +24 -1
- package/dist/markdown/index.js +18 -1
- package/dist/markdown/internals.d.ts +7 -0
- package/dist/markdown/renderBlock.d.ts +5 -0
- package/dist/markdown/renderBlock.js +2 -7
- package/dist/markdown/renderParagraph.d.ts +22 -2
- package/dist/markdown/renderParagraph.js +11 -9
- package/dist/markdown/renderRuns.d.ts +10 -0
- package/dist/markdown/renderRuns.js +36 -3
- package/dist/markdown/renderTable.d.ts +7 -0
- package/dist/markdown/renderTable.js +2 -2
- package/dist/markdown/trailers.d.ts +7 -0
- package/dist/markdown/types.d.ts +9 -2
- package/dist/model.d.ts +25 -3
- package/dist/paged-layout/blockGeometry.js +3 -2
- package/dist/paged-layout/editorScrollRoot.d.ts +9 -0
- package/dist/paged-layout/editorScrollRoot.js +10 -1
- package/dist/paged-layout/pageText.d.ts +1 -1
- package/dist/paged-layout/paragraphFlash.d.ts +3 -0
- package/dist/paged-layout/rangeProjection.d.ts +20 -1
- package/dist/paged-layout/rangeProjection.js +26 -7
- package/dist/paged-layout/scrollToPmPosition.d.ts +15 -0
- package/dist/paged-layout/scrollToPmPosition.js +3 -3
- package/dist/paged-layout/sectionBlockWidths.d.ts +2 -2
- package/dist/paged-layout/sectionGeometry.d.ts +4 -3
- package/dist/paged-layout/selectionViewportRect.d.ts +19 -0
- package/dist/paged-layout/selectionViewportRect.js +8 -2
- package/dist/panel-layout.d.ts +18 -1
- package/dist/panel-layout.js +36 -2
- package/dist/pdf/contentStream.d.ts +12 -0
- package/dist/pdf/fonts.d.ts +19 -0
- package/dist/pdf/paint.d.ts +9 -1
- package/dist/pdf/paint.js +51 -0
- package/dist/prosemirror/acceptedBlockNeighbours.d.ts +50 -0
- package/dist/prosemirror/acceptedBlockNeighbours.js +63 -0
- package/dist/prosemirror/alternateContentAttrs.d.ts +1 -1
- package/dist/prosemirror/anchoredTextBoxes.d.ts +20 -0
- package/dist/prosemirror/attrs/index.d.ts +2 -2
- package/dist/prosemirror/attrs/index.js +2 -1
- package/dist/prosemirror/authoredTransformAttrs.d.ts +14 -0
- package/dist/prosemirror/bookmarkBoundaryAttrs.d.ts +2 -2
- package/dist/prosemirror/canonicalCommands.d.ts +26 -1
- package/dist/prosemirror/canonicalCommands.js +12 -1
- package/dist/prosemirror/canonicalSelectionRange.d.ts +1 -1
- package/dist/prosemirror/canonicalTableCommands.d.ts +14 -0
- package/dist/prosemirror/canonicalTableCommands.js +18 -6
- package/dist/prosemirror/cellDragSelection.d.ts +9 -0
- package/dist/prosemirror/commands/comments.d.ts +27 -2
- package/dist/prosemirror/commands/comments.js +459 -159
- package/dist/prosemirror/commands/contentControls.d.ts +20 -3
- package/dist/prosemirror/commands/contentControls.js +18 -1
- package/dist/prosemirror/commands/contentControlsBlockFill.d.ts +11 -1
- package/dist/prosemirror/commands/formatPainter.d.ts +10 -0
- package/dist/prosemirror/commands/formatPainter.js +0 -1
- package/dist/prosemirror/commands/formatting.d.ts +9 -2
- package/dist/prosemirror/commands/hyperlink.d.ts +12 -0
- package/dist/prosemirror/commands/image.d.ts +12 -0
- package/dist/prosemirror/commands/index.d.ts +10 -5
- package/dist/prosemirror/commands/pageBreak.d.ts +3 -0
- package/dist/prosemirror/commands/paragraph.d.ts +8 -1
- package/dist/prosemirror/commands/pastePlainText.d.ts +8 -0
- package/dist/prosemirror/commands/pastePlainText.js +1 -1
- package/dist/prosemirror/commands/propertyChangeScope.d.ts +28 -15
- package/dist/prosemirror/commands/propertyChangeScope.js +5 -12
- package/dist/prosemirror/commands/replaceRangeText.d.ts +22 -0
- package/dist/prosemirror/commands/replaceRangeText.js +44 -0
- package/dist/prosemirror/commands/resolveAllTableChanges.js +3 -2
- package/dist/prosemirror/commands/resolveParagraphProperties.js +4 -8
- package/dist/prosemirror/commands/rulerParagraph.d.ts +25 -0
- package/dist/prosemirror/commands/rulerParagraph.js +18 -0
- package/dist/prosemirror/commands/sectionBreak.d.ts +5 -0
- package/dist/prosemirror/commands/table.d.ts +7 -0
- package/dist/prosemirror/commands/tableCellMergeResolution.d.ts +1 -1
- package/dist/prosemirror/commentIdAllocator.d.ts +12 -6
- package/dist/prosemirror/commentIdAllocator.js +38 -29
- package/dist/prosemirror/commentOps.d.ts +7 -0
- package/dist/prosemirror/commentRangeBoundaryAttrs.d.ts +1 -1
- package/dist/prosemirror/commentRangeInlineAtoms.d.ts +4 -3
- package/dist/prosemirror/commentRangeInlineAtoms.js +1 -1
- package/dist/prosemirror/commentRecords.d.ts +154 -0
- package/dist/prosemirror/commentRecords.js +527 -0
- package/dist/prosemirror/commentReferenceAttrs.d.ts +1 -1
- package/dist/prosemirror/commentReferenceIntegrity.js +93 -14
- package/dist/prosemirror/containerFinalParagraph.d.ts +2 -0
- package/dist/prosemirror/containerFinalParagraph.js +3 -1
- package/dist/prosemirror/contentControlRevisions.d.ts +14 -0
- package/dist/prosemirror/conversion/effectiveTableCellFormatting.d.ts +5 -4
- package/dist/prosemirror/conversion/fromProseDoc.d.ts +1 -1
- package/dist/prosemirror/conversion/fromProseDoc.js +81 -61
- package/dist/prosemirror/conversion/index.d.ts +7 -2
- package/dist/prosemirror/conversion/preservedSinkCarriers.d.ts +21 -0
- package/dist/prosemirror/conversion/runShadingMark.d.ts +13 -1
- package/dist/prosemirror/conversion/storyConversionOptions.d.ts +16 -0
- package/dist/prosemirror/conversion/storyConversionOptions.js +13 -0
- package/dist/prosemirror/conversion/toProseDoc.d.ts +48 -14
- package/dist/prosemirror/conversion/toProseDoc.js +294 -145
- package/dist/prosemirror/copyOriginResolution.js +23 -10
- package/dist/prosemirror/documentSchema.d.ts +12 -0
- package/dist/prosemirror/emptyRangeAnchor.d.ts +39 -8
- package/dist/prosemirror/emptyRangeAnchor.js +63 -10
- package/dist/prosemirror/extensions/ExtensionManager.d.ts +7 -0
- package/dist/prosemirror/extensions/ExtensionManager.js +2 -0
- package/dist/prosemirror/extensions/StarterKit.d.ts +11 -2
- package/dist/prosemirror/extensions/core/DocExtension.d.ts +3 -0
- package/dist/prosemirror/extensions/core/HistoryExtension.d.ts +3 -0
- package/dist/prosemirror/extensions/core/HistoryExtension.js +3 -2
- package/dist/prosemirror/extensions/core/ParagraphExtension.d.ts +13 -4
- package/dist/prosemirror/extensions/core/ParagraphExtension.js +5 -3
- package/dist/prosemirror/extensions/core/TextExtension.d.ts +3 -0
- package/dist/prosemirror/extensions/create.d.ts +6 -0
- package/dist/prosemirror/extensions/features/BaseKeymapExtension.d.ts +5 -0
- package/dist/prosemirror/extensions/features/BaseKeymapExtension.js +3 -3
- package/dist/prosemirror/extensions/features/BidiShortcutExtension.d.ts +10 -0
- package/dist/prosemirror/extensions/features/ContentControlWidgetsExtension.d.ts +10 -0
- package/dist/prosemirror/extensions/features/DropCursorExtension.d.ts +6 -0
- package/dist/prosemirror/extensions/features/EmptyParagraphFormatExtension.d.ts +20 -0
- package/dist/prosemirror/extensions/features/EmptyParagraphFormatExtension.js +20 -23
- package/dist/prosemirror/extensions/features/GapCursorExtension.d.ts +13 -0
- package/dist/prosemirror/extensions/features/ImageDragExtension.d.ts +9 -0
- package/dist/prosemirror/extensions/features/ImagePasteExtension.d.ts +6 -0
- package/dist/prosemirror/extensions/features/JoinedRunStyleExtension.d.ts +14 -0
- package/dist/prosemirror/extensions/features/ParaIdAllocatorExtension.js +38 -21
- package/dist/prosemirror/extensions/features/ParagraphChangeTrackerExtension.d.ts +30 -3
- package/dist/prosemirror/extensions/features/ParagraphChangeTrackerExtension.js +65 -45
- package/dist/prosemirror/extensions/features/PasteCleanupExtension.d.ts +17 -0
- package/dist/prosemirror/extensions/features/PasteCleanupExtension.js +7 -3
- package/dist/prosemirror/extensions/features/PasteStyleInlinerExtension.d.ts +14 -0
- package/dist/prosemirror/extensions/features/SelectionTrackerExtension.d.ts +4 -1
- package/dist/prosemirror/extensions/features/pasteCleanup.d.ts +32 -3
- package/dist/prosemirror/extensions/features/pasteCleanup.js +23 -3
- package/dist/prosemirror/extensions/features/pastedCellSections.d.ts +22 -0
- package/dist/prosemirror/extensions/features/pastedCellSections.js +78 -0
- package/dist/prosemirror/extensions/features/pastedHeadingStyles.d.ts +22 -0
- package/dist/prosemirror/extensions/features/pastedHtmlLists.d.ts +1 -0
- package/dist/prosemirror/extensions/markRegistry.d.ts +14 -1
- package/dist/prosemirror/extensions/marks/AllCapsExtension.d.ts +3 -0
- package/dist/prosemirror/extensions/marks/BoldExtension.d.ts +3 -0
- package/dist/prosemirror/extensions/marks/CharacterSpacingExtension.d.ts +8 -0
- package/dist/prosemirror/extensions/marks/CharacterStyleExtension.d.ts +14 -0
- package/dist/prosemirror/extensions/marks/CommentExtension.d.ts +6 -0
- package/dist/prosemirror/extensions/marks/CommentExtension.js +3 -1
- package/dist/prosemirror/extensions/marks/FontFamilyExtension.d.ts +3 -0
- package/dist/prosemirror/extensions/marks/FontFamilyExtension.js +4 -6
- package/dist/prosemirror/extensions/marks/FontSizeExtension.d.ts +3 -0
- package/dist/prosemirror/extensions/marks/FootnoteRefExtension.d.ts +5 -0
- package/dist/prosemirror/extensions/marks/HiddenTextExtension.d.ts +17 -0
- package/dist/prosemirror/extensions/marks/HighlightExtension.d.ts +3 -0
- package/dist/prosemirror/extensions/marks/HyperlinkExtension.d.ts +3 -0
- package/dist/prosemirror/extensions/marks/HyphenElementExtension.d.ts +19 -0
- package/dist/prosemirror/extensions/marks/InlineWrapperExtension.d.ts +12 -0
- package/dist/prosemirror/extensions/marks/ItalicExtension.d.ts +3 -0
- package/dist/prosemirror/extensions/marks/RunFormattingOverrideExtension.d.ts +11 -2
- package/dist/prosemirror/extensions/marks/RunFormattingOverrideExtension.js +2 -1
- package/dist/prosemirror/extensions/marks/RunIdentityExtension.d.ts +21 -0
- package/dist/prosemirror/extensions/marks/SmallCapsExtension.d.ts +3 -0
- package/dist/prosemirror/extensions/marks/StrikeExtension.d.ts +3 -0
- package/dist/prosemirror/extensions/marks/SubscriptExtension.d.ts +3 -0
- package/dist/prosemirror/extensions/marks/SuperscriptExtension.d.ts +3 -0
- package/dist/prosemirror/extensions/marks/TextColorExtension.d.ts +3 -0
- package/dist/prosemirror/extensions/marks/TextEffectsExtensions.d.ts +6 -0
- package/dist/prosemirror/extensions/marks/TrackedChangeExtensions.d.ts +7 -0
- package/dist/prosemirror/extensions/marks/UnderlineExtension.d.ts +3 -0
- package/dist/prosemirror/extensions/marks/markUtils.d.ts +10 -3
- package/dist/prosemirror/extensions/nodes/BlockBookmarkBoundaryExtension.d.ts +22 -0
- package/dist/prosemirror/extensions/nodes/BlockCommentRangeBoundaryExtension.d.ts +11 -0
- package/dist/prosemirror/extensions/nodes/BlockMoveRangeBoundaryExtension.d.ts +14 -0
- package/dist/prosemirror/extensions/nodes/BlockSdtExtension.d.ts +17 -0
- package/dist/prosemirror/extensions/nodes/BookmarkBoundaryExtension.d.ts +1 -0
- package/dist/prosemirror/extensions/nodes/BookmarkBoundaryExtension.js +38 -4
- package/dist/prosemirror/extensions/nodes/CommentReferenceExtension.d.ts +2 -1
- package/dist/prosemirror/extensions/nodes/CommentReferenceExtension.js +3 -1
- package/dist/prosemirror/extensions/nodes/FieldExtension.d.ts +8 -0
- package/dist/prosemirror/extensions/nodes/HardBreakExtension.d.ts +3 -0
- package/dist/prosemirror/extensions/nodes/HorizontalRuleExtension.d.ts +3 -0
- package/dist/prosemirror/extensions/nodes/ImageExtension.d.ts +3 -0
- package/dist/prosemirror/extensions/nodes/MathExtension.d.ts +7 -0
- package/dist/prosemirror/extensions/nodes/MoveRangeBoundaryExtension.d.ts +1 -0
- package/dist/prosemirror/extensions/nodes/PageBreakExtension.d.ts +3 -0
- package/dist/prosemirror/extensions/nodes/PageBreakRunExtension.d.ts +1 -0
- package/dist/prosemirror/extensions/nodes/PreservedBlockExtension.d.ts +25 -0
- package/dist/prosemirror/extensions/nodes/PreservedXmlExtension.d.ts +9 -0
- package/dist/prosemirror/extensions/nodes/RangeAnchorExtension.d.ts +1 -0
- package/dist/prosemirror/extensions/nodes/RangeAnchorExtension.js +7 -19
- package/dist/prosemirror/extensions/nodes/RenderedPageBreakExtension.d.ts +1 -0
- package/dist/prosemirror/extensions/nodes/SdtExtension.d.ts +6 -0
- package/dist/prosemirror/extensions/nodes/ShapeExtension.d.ts +6 -0
- package/dist/prosemirror/extensions/nodes/TabExtension.d.ts +3 -0
- package/dist/prosemirror/extensions/nodes/TableExtension.d.ts +8 -1
- package/dist/prosemirror/extensions/nodes/TableExtension.js +6 -6
- package/dist/prosemirror/extensions/nodes/TextBoxAnchorExtension.d.ts +7 -0
- package/dist/prosemirror/extensions/nodes/TextBoxExtension.d.ts +7 -0
- package/dist/prosemirror/extensions/nodes/bookmarkBoundaryDom.d.ts +9 -0
- package/dist/prosemirror/extensions/types.d.ts +10 -1
- package/dist/prosemirror/findReplaceSelection.d.ts +1 -1
- package/dist/prosemirror/hyperlinkRemoval.d.ts +13 -1
- package/dist/prosemirror/imageCommit.d.ts +10 -0
- package/dist/prosemirror/index.d.ts +30 -20
- package/dist/prosemirror/indexedNodeLookup.d.ts +11 -0
- package/dist/prosemirror/inlineWrapperStack.d.ts +12 -0
- package/dist/prosemirror/insertOperations.d.ts +10 -1
- package/dist/prosemirror/insertOperations.js +2 -2
- package/dist/prosemirror/insertionGaps.d.ts +21 -0
- package/dist/prosemirror/insertionGaps.js +86 -0
- package/dist/prosemirror/keptRangeBoundaries.d.ts +16 -12
- package/dist/prosemirror/keptRangeBoundaries.js +28 -34
- package/dist/prosemirror/listAutoformatMarkers.d.ts +11 -0
- package/dist/prosemirror/listInstanceReferences.d.ts +5 -0
- package/dist/prosemirror/listLabels.d.ts +16 -3
- package/dist/prosemirror/listLabels.js +0 -6
- package/dist/prosemirror/listMarker.d.ts +2 -2
- package/dist/prosemirror/listNumbering.d.ts +1 -1
- package/dist/prosemirror/listRendering.d.ts +2 -2
- package/dist/prosemirror/listRenderingAttrs.d.ts +10 -1
- package/dist/prosemirror/lockedControls.d.ts +6 -0
- package/dist/prosemirror/markupViewNotes.d.ts +11 -1
- package/dist/prosemirror/markupViewProjection.d.ts +21 -4
- package/dist/prosemirror/moveRangeBoundaryAttrs.d.ts +1 -1
- package/dist/prosemirror/nativeSelection.d.ts +51 -0
- package/dist/prosemirror/nativeSelection.js +124 -0
- package/dist/prosemirror/noteReferenceOccurrences.d.ts +1 -1
- package/dist/prosemirror/noteReferenceReview.d.ts +17 -3
- package/dist/prosemirror/noteReferenceReview.js +26 -5
- package/dist/prosemirror/numberedRefFields.d.ts +2 -0
- package/dist/prosemirror/numberedRefFields.js +16 -5
- package/dist/prosemirror/pageBreakRunProjection.d.ts +2 -1
- package/dist/prosemirror/paraText.d.ts +14 -0
- package/dist/prosemirror/paragraphFormattingProvenance.d.ts +13 -1
- package/dist/prosemirror/paragraphIndentation.d.ts +6 -3
- package/dist/prosemirror/paragraphIndentation.js +2 -3
- package/dist/prosemirror/paragraphList.d.ts +1 -1
- package/dist/prosemirror/paragraphMarkJoin.d.ts +34 -8
- package/dist/prosemirror/paragraphMarkJoin.js +176 -18
- package/dist/prosemirror/paragraphPropertyCarry.d.ts +15 -1
- package/dist/prosemirror/paragraphPropertyCarry.js +5 -3
- package/dist/prosemirror/paragraphSpacing.d.ts +1 -1
- package/dist/prosemirror/pastePlacement.d.ts +17 -0
- package/dist/prosemirror/pastePlacement.js +22 -0
- package/dist/prosemirror/pastedCommentCopies.d.ts +87 -0
- package/dist/prosemirror/pastedCommentCopies.js +379 -0
- package/dist/prosemirror/plugins/aiCitationDecorations.d.ts +12 -0
- package/dist/prosemirror/plugins/aiSuggestionDecorations.d.ts +14 -0
- package/dist/prosemirror/plugins/contentControlWidgets.d.ts +15 -9
- package/dist/prosemirror/plugins/contentControlWidgets.js +24 -30
- package/dist/prosemirror/plugins/createDocScanPlugin.d.ts +17 -0
- package/dist/prosemirror/plugins/documentNumbering.d.ts +2 -1
- package/dist/prosemirror/plugins/documentNumbering.js +33 -14
- package/dist/prosemirror/plugins/documentStyleState.d.ts +3 -4
- package/dist/prosemirror/plugins/documentStyles.d.ts +20 -3
- package/dist/prosemirror/plugins/index.d.ts +7 -1
- package/dist/prosemirror/plugins/paragraphStyleResolution.d.ts +18 -1
- package/dist/prosemirror/plugins/paragraphStyleResolution.js +12 -2
- package/dist/prosemirror/plugins/pmTextScan.d.ts +18 -0
- package/dist/prosemirror/plugins/pmTextScan.js +42 -33
- package/dist/prosemirror/plugins/revisionIds.d.ts +14 -1
- package/dist/prosemirror/plugins/revisionIds.js +5 -1
- package/dist/prosemirror/plugins/selectionTracker.d.ts +12 -2
- package/dist/prosemirror/plugins/suggestionMode.d.ts +14 -11
- package/dist/prosemirror/plugins/suggestionMode.js +225 -35
- package/dist/prosemirror/plugins/templateDirectives.d.ts +17 -0
- package/dist/prosemirror/plugins/templatePreviewValues.d.ts +23 -0
- package/dist/prosemirror/plugins/templateSlashMenu.d.ts +19 -0
- package/dist/prosemirror/plugins/transactionInvariants.d.ts +19 -0
- package/dist/prosemirror/positionSweep.d.ts +21 -0
- package/dist/prosemirror/queries.d.ts +9 -0
- package/dist/prosemirror/queries.js +2 -2
- package/dist/prosemirror/rangeAnchorAttrs.d.ts +2 -2
- package/dist/prosemirror/rangeAnchorAttrs.js +55 -33
- package/dist/prosemirror/rebaseParagraphRuns.js +1 -1
- package/dist/prosemirror/rejoinRunCarriers.d.ts +17 -0
- package/dist/prosemirror/replaceFindMatches.d.ts +20 -0
- package/dist/prosemirror/replaceFindMatches.js +33 -0
- package/dist/prosemirror/replacedAnnotations.d.ts +143 -0
- package/dist/prosemirror/replacedAnnotations.js +223 -26
- package/dist/prosemirror/revisionCarriers.js +9 -0
- package/dist/prosemirror/runFormattingFromMarks.d.ts +3 -3
- package/dist/prosemirror/runFormattingFromMarks.js +10 -51
- package/dist/prosemirror/runFormattingProvenance.d.ts +2 -1
- package/dist/prosemirror/runFormattingProvenance.js +2 -1
- package/dist/prosemirror/runFormattingReconciliation.js +3 -12
- package/dist/prosemirror/runIdentity.d.ts +14 -0
- package/dist/prosemirror/runIdentityAcrossRevisions.d.ts +30 -1
- package/dist/prosemirror/runIdentityAcrossRevisions.js +57 -8
- package/dist/prosemirror/runPropertyChangeResolution.d.ts +5 -13
- package/dist/prosemirror/runPropertyChangeResolution.js +13 -30
- package/dist/prosemirror/runStyleFormatting.d.ts +42 -113
- package/dist/prosemirror/runStyleFormatting.js +17 -74
- package/dist/prosemirror/schema/index.d.ts +8 -1
- package/dist/prosemirror/schema/marks.d.ts +21 -1
- package/dist/prosemirror/schema/nodes.d.ts +15 -14
- package/dist/prosemirror/sectionCarrier.d.ts +21 -0
- package/dist/prosemirror/sectionMarkEdits.d.ts +18 -0
- package/dist/prosemirror/selectionState.d.ts +10 -4
- package/dist/prosemirror/storyListNumbering.d.ts +10 -0
- package/dist/prosemirror/storyListNumbering.js +7 -2
- package/dist/prosemirror/styles/index.d.ts +3 -0
- package/dist/prosemirror/styles/paragraphStyleCascade.d.ts +20 -18
- package/dist/prosemirror/styles/paragraphStyleCascade.js +10 -19
- package/dist/prosemirror/styles/resolvedStyleAttrs.d.ts +4 -3
- package/dist/prosemirror/styles/styleResolver.d.ts +40 -15
- package/dist/prosemirror/styles/styleResolver.js +6 -6
- package/dist/prosemirror/styles/styleToggleCascade.d.ts +18 -11
- package/dist/prosemirror/styles/styleToggleCascade.js +2 -11
- package/dist/prosemirror/styles/tableStyleRegions.d.ts +20 -7
- package/dist/prosemirror/styles/tableStyleRegions.js +14 -13
- package/dist/prosemirror/tableCellPaste.d.ts +21 -0
- package/dist/prosemirror/tableCellPaste.js +32 -2
- package/dist/prosemirror/tableGridMutation.d.ts +9 -0
- package/dist/prosemirror/tableGridMutation.js +34 -2
- package/dist/prosemirror/tablePositionedBookmarks.d.ts +6 -0
- package/dist/prosemirror/tableResize.d.ts +20 -9
- package/dist/prosemirror/tableResize.js +60 -49
- package/dist/prosemirror/tableRunIn.d.ts +26 -1
- package/dist/prosemirror/tableRunIn.js +39 -11
- package/dist/prosemirror/textBoxAnchorAttrs.d.ts +1 -1
- package/dist/prosemirror/textBoxHostCollapse.d.ts +11 -0
- package/dist/prosemirror/textInput.d.ts +30 -1
- package/dist/prosemirror/textInput.js +144 -17
- package/dist/prosemirror/utils/findParagraphByParaId.d.ts +5 -0
- package/dist/prosemirror/utils/tabCalculator.d.ts +6 -0
- package/dist/prosemirror/utils/visualLineNavigation.js +21 -19
- package/dist/prosemirror/validation.d.ts +19 -0
- package/dist/prosemirror/validation.js +84 -16
- package/dist/prosemirror/yjsDocumentMetadata.d.ts +9 -3
- package/dist/prosemirror/yjsDocumentMetadata.js +49 -10
- package/dist/prosemirror/zeroWidthAnchors.d.ts +18 -0
- package/dist/redline.d.ts +4 -1
- package/dist/redline.js +21 -13
- package/dist/render-dom/BodySelectionOverlay.d.ts +5 -0
- package/dist/render-dom/HeaderFooterSelectionOverlay.js +5 -4
- package/dist/render-dom/RemoteSelectionOverlay.js +3 -3
- package/dist/render-dom/RenderedDomContext.js +7 -6
- package/dist/server.d.ts +30 -18
- package/dist/server.js +4 -3
- package/dist/shaping/placeRun.d.ts +8 -0
- package/dist/shaping/shaper.d.ts +19 -0
- package/dist/style-engine/index.d.ts +5 -0
- package/dist/style-engine/styleEngine.d.ts +32 -13
- package/dist/style-sets/extract.d.ts +1 -1
- package/dist/style-sets/styleSetNormalization.d.ts +20 -1
- package/dist/text-shaping.d.ts +9 -1
- package/dist/types/anonymization.d.ts +17 -0
- package/dist/types/anonymization.js +0 -0
- package/dist/types/autocomplete.d.ts +46 -0
- package/dist/types/autocomplete.js +0 -0
- package/dist/types/canonicalCapabilities.d.ts +52 -53
- package/dist/types/canonicalCapabilities.js +54 -56
- package/dist/types/canonicalSave.d.ts +36 -0
- package/dist/types/documentModel.d.ts +37 -0
- package/dist/types/documentModel.js +24 -0
- package/dist/types/docxSerialization.d.ts +10 -0
- package/dist/types/index.d.ts +5 -0
- package/dist/types/remote-selection.d.ts +2 -1
- package/dist/types/selectiveSaveDecline.d.ts +44 -0
- package/dist/types/selectiveSaveDecline.js +0 -0
- package/dist/types/tableWidthKind.d.ts +2 -0
- package/dist/types/tableWidthKind.js +9 -0
- package/dist/utils/base64.d.ts +20 -0
- package/dist/utils/borderCss.d.ts +18 -1
- package/dist/utils/colorResolver.d.ts +12 -11
- package/dist/utils/createDocument.d.ts +8 -1
- package/dist/utils/createDocument.js +20 -2
- package/dist/utils/diagonalHatch.d.ts +2 -0
- package/dist/utils/diagonalHatch.js +16 -0
- package/dist/utils/extremes.d.ts +4 -0
- package/dist/utils/extremes.js +14 -0
- package/dist/utils/findMatchView.d.ts +2 -2
- package/dist/utils/findMatchView.js +4 -3
- package/dist/utils/findReplace.d.ts +2 -2
- package/dist/utils/findReplace.js +3 -2
- package/dist/utils/fontFamilyMerge.d.ts +2 -1
- package/dist/utils/fontResolver.d.ts +11 -2
- package/dist/utils/formatToStyle.d.ts +21 -7
- package/dist/utils/headerFooter.d.ts +16 -2
- package/dist/utils/headerFooter.js +2 -6
- package/dist/utils/imageResize.js +1 -1
- package/dist/utils/listItems.d.ts +7 -0
- package/dist/utils/listItems.js +9 -0
- package/dist/utils/mergeDocumentContent.d.ts +7 -0
- package/dist/utils/mergeDocumentContent.js +2 -2
- package/dist/utils/outlineHeadings.d.ts +1 -1
- package/dist/utils/paintedPositions.d.ts +60 -0
- package/dist/utils/paintedPositions.js +101 -0
- package/dist/utils/paragraphFormattingMerge.d.ts +11 -3
- package/dist/utils/paragraphFormattingMerge.js +0 -8
- package/dist/utils/paragraphInlineLayout.js +2 -1
- package/dist/utils/repeatingStrokeGradient.d.ts +8 -0
- package/dist/utils/repeatingStrokeGradient.js +13 -0
- package/dist/utils/rotationBoundingBox.d.ts +8 -0
- package/dist/utils/rulerControl.d.ts +71 -0
- package/dist/utils/rulerControl.js +94 -0
- package/dist/utils/tableOperations.d.ts +20 -4
- package/dist/utils/tableOperations.js +1 -0
- package/dist/utils/textDirectionFlow.d.ts +10 -0
- package/dist/utils/textFormattingMerge.d.ts +18 -2
- package/dist/utils/textFormattingMerge.js +0 -20
- package/dist/utils/units.d.ts +2 -0
- package/dist/utils/units.js +3 -1
- package/dist/version-comparison.d.ts +63 -1
- package/dist/version-comparison.js +2 -1
- package/dist/watermark/index.d.ts +11 -0
- package/dist/watermark/index.js +0 -5
- package/package.json +7 -8
- package/dist/controller/canonicalLockGuard.d.ts +0 -8
- package/dist/controller/canonicalLockGuard.js +0 -88
- package/dist/controller/canonicalPublicOperations.js +0 -900
- package/dist/controller/canonicalSession.d.ts +0 -256
- package/dist/controller/canonicalSession.js +0 -1717
- package/dist/docx/canonicalResourceSave.d.ts +0 -15
- package/dist/docx/canonicalResourceSave.js +0 -27
- package/dist/internal/acceptedBlockProjection.d.ts +0 -9
- package/dist/internal/acceptedBlockProjection.js +0 -50
- package/dist/prosemirror/plugins/anonymizationDecorations.d.ts +0 -60
- package/dist/prosemirror/plugins/anonymizationDecorations.js +0 -111
- package/dist/prosemirror/plugins/autocompleteSuggestion.d.ts +0 -127
- package/dist/prosemirror/plugins/autocompleteSuggestion.js +0 -282
- package/dist/utils/replaceText.d.ts +0 -25
- package/dist/utils/replaceText.js +0 -242
- /package/dist/{controller → canonical}/canonicalListRendering.d.ts +0 -0
- /package/dist/{controller → canonical}/canonicalOperations.d.ts +0 -0
- /package/dist/{controller → canonical}/canonicalSelection.d.ts +0 -0
- /package/dist/{controller → canonical}/canonicalTocSelection.d.ts +0 -0
|
@@ -1,5 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Formatting to CSS Converter
|
|
3
|
+
*
|
|
4
|
+
* Converts OOXML formatting objects (TextFormatting, ParagraphFormatting)
|
|
5
|
+
* to CSS style properties for rendering.
|
|
6
|
+
*
|
|
7
|
+
* Handles ALL formatting properties:
|
|
8
|
+
* - Font: family, size, weight, style
|
|
9
|
+
* - Text: color, background, decoration (underline, strike, double-strike)
|
|
10
|
+
* - Effects: superscript, subscript, small-caps, all-caps
|
|
11
|
+
* - Spacing: letter-spacing
|
|
12
|
+
* - Paragraph: alignment, line-height, margins, padding, borders, background
|
|
13
|
+
*/
|
|
1
14
|
import { ColorValue } from "../types/colors.js";
|
|
2
15
|
import { document_d_exports } from "../types/document.js";
|
|
16
|
+
import { DeepReadonly } from "../types/documentModel.js";
|
|
3
17
|
import { Properties } from "csstype";
|
|
4
18
|
type CSSProperties = Properties<string | number>;
|
|
5
19
|
/**
|
|
@@ -9,7 +23,7 @@ type CSSProperties = Properties<string | number>;
|
|
|
9
23
|
* @param theme - Theme for resolving colors and fonts
|
|
10
24
|
* @returns React CSSProperties
|
|
11
25
|
*/
|
|
12
|
-
export declare function textToStyle(formatting: document_d_exports.TextFormatting | undefined | null, theme?: document_d_exports.Theme | null): CSSProperties;
|
|
26
|
+
export declare function textToStyle(formatting: document_d_exports.TextFormatting | undefined | null, theme?: DeepReadonly<document_d_exports.Theme> | null): CSSProperties;
|
|
13
27
|
/**
|
|
14
28
|
* Convert ParagraphFormatting to CSS properties
|
|
15
29
|
*
|
|
@@ -17,7 +31,7 @@ export declare function textToStyle(formatting: document_d_exports.TextFormattin
|
|
|
17
31
|
* @param theme - Theme for resolving colors
|
|
18
32
|
* @returns React CSSProperties
|
|
19
33
|
*/
|
|
20
|
-
export declare function paragraphToStyle(formatting: document_d_exports.ParagraphFormatting | undefined | null, theme?: document_d_exports.Theme | null): CSSProperties;
|
|
34
|
+
export declare function paragraphToStyle(formatting: DeepReadonly<document_d_exports.ParagraphFormatting> | undefined | null, theme?: DeepReadonly<document_d_exports.Theme> | null): CSSProperties;
|
|
21
35
|
/**
|
|
22
36
|
* Convert a BorderSpec to CSS border properties
|
|
23
37
|
*
|
|
@@ -26,7 +40,7 @@ export declare function paragraphToStyle(formatting: document_d_exports.Paragrap
|
|
|
26
40
|
* @param theme - Theme for color resolution
|
|
27
41
|
* @returns Partial CSSProperties with border styles
|
|
28
42
|
*/
|
|
29
|
-
export declare function borderToStyle(border: document_d_exports.BorderSpec | undefined | null, side?: "Top" | "Bottom" | "Left" | "Right" | "", theme?: document_d_exports.Theme | null): CSSProperties;
|
|
43
|
+
export declare function borderToStyle(border: DeepReadonly<document_d_exports.BorderSpec> | undefined | null, side?: "Top" | "Bottom" | "Left" | "Right" | "", theme?: DeepReadonly<document_d_exports.Theme> | null): CSSProperties;
|
|
30
44
|
/**
|
|
31
45
|
* Convert ShadingProperties to background color
|
|
32
46
|
*
|
|
@@ -34,7 +48,7 @@ export declare function borderToStyle(border: document_d_exports.BorderSpec | un
|
|
|
34
48
|
* @param theme - Theme for color resolution
|
|
35
49
|
* @returns CSS color string or empty string
|
|
36
50
|
*/
|
|
37
|
-
export declare function resolveShadingFill(shading: document_d_exports.ShadingProperties | undefined | null, theme?: document_d_exports.Theme | null): string;
|
|
51
|
+
export declare function resolveShadingFill(shading: DeepReadonly<document_d_exports.ShadingProperties> | undefined | null, theme?: DeepReadonly<document_d_exports.Theme> | null): string;
|
|
38
52
|
/** The CSS `text-decoration-style` keywords folio paints an underline with. */
|
|
39
53
|
export type CssTextDecorationStyle = "solid" | "double" | "dotted" | "dashed" | "wavy";
|
|
40
54
|
/**
|
|
@@ -136,7 +150,7 @@ export declare function mergeStyles(...styles: (CSSProperties | undefined | null
|
|
|
136
150
|
export declare function tableCellToStyle(formatting: {
|
|
137
151
|
verticalAlign?: "top" | "center" | "bottom";
|
|
138
152
|
textDirection?: document_d_exports.TextDirection;
|
|
139
|
-
shading?: document_d_exports.ShadingProperties
|
|
153
|
+
shading?: DeepReadonly<document_d_exports.ShadingProperties>;
|
|
140
154
|
borders?: {
|
|
141
155
|
top?: document_d_exports.BorderSpec;
|
|
142
156
|
bottom?: document_d_exports.BorderSpec;
|
|
@@ -161,7 +175,7 @@ export declare function tableCellToStyle(formatting: {
|
|
|
161
175
|
type: string;
|
|
162
176
|
};
|
|
163
177
|
};
|
|
164
|
-
} | undefined | null, theme?: document_d_exports.Theme | null): CSSProperties;
|
|
178
|
+
} | undefined | null, theme?: DeepReadonly<document_d_exports.Theme> | null): CSSProperties;
|
|
165
179
|
/**
|
|
166
180
|
* Get CSS for page/section container
|
|
167
181
|
*
|
|
@@ -178,5 +192,5 @@ export declare function sectionToStyle(sectionProps: {
|
|
|
178
192
|
background?: {
|
|
179
193
|
color?: ColorValue;
|
|
180
194
|
};
|
|
181
|
-
} | undefined | null, theme?: document_d_exports.Theme | null): CSSProperties;
|
|
195
|
+
} | undefined | null, theme?: DeepReadonly<document_d_exports.Theme> | null): CSSProperties;
|
|
182
196
|
export {};
|
|
@@ -1,4 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Header/footer document-model operations, extracted from the React
|
|
3
|
+
* `useHeaderFooterEditor` hook. Pure functions over the folio `Document`
|
|
4
|
+
* model: resolving which header/footer renders for each slot, and building the
|
|
5
|
+
* new `Document` produced by creating, saving, or removing a header/footer.
|
|
6
|
+
*
|
|
7
|
+
* ProseMirror stays in the adapter: the save path serialises the live hidden
|
|
8
|
+
* header/footer PM doc to `BlockContent[]` (`proseDocToBlocks`) and passes the
|
|
9
|
+
* blocks in here.
|
|
10
|
+
*/
|
|
1
11
|
import { document_d_exports } from "../types/document.js";
|
|
12
|
+
import { DeepReadonly } from "../types/documentModel.js";
|
|
2
13
|
export type HeaderFooterPosition = "header" | "footer";
|
|
3
14
|
/**
|
|
4
15
|
* The resolved header/footer slots for the active document, plus the
|
|
@@ -23,9 +34,12 @@ export type HeaderFooterResolution = {
|
|
|
23
34
|
export declare const resolveHeaderFooterContent: (pkg: document_d_exports.DocxPackage | undefined) => HeaderFooterResolution;
|
|
24
35
|
/**
|
|
25
36
|
* The section properties that drive the rendered chrome, with `titlePg` merged
|
|
26
|
-
* in when title-page mode was inferred from header/footer references.
|
|
37
|
+
* in when title-page mode was inferred from header/footer references. They are
|
|
38
|
+
* the document's own section properties when nothing is merged, so a read-only
|
|
39
|
+
* document gives read-only ones; a plain one still gives plain ones.
|
|
27
40
|
*/
|
|
28
|
-
export declare
|
|
41
|
+
export declare function resolveEffectiveSectionProperties(documentBody: document_d_exports.DocumentBody | undefined, hasTitlePg: boolean): document_d_exports.SectionProperties | undefined;
|
|
42
|
+
export declare function resolveEffectiveSectionProperties(documentBody: DeepReadonly<document_d_exports.DocumentBody> | undefined, hasTitlePg: boolean): DeepReadonly<document_d_exports.SectionProperties> | undefined;
|
|
29
43
|
/** Pick the relationship id for the slot a save/remove targets. */
|
|
30
44
|
export declare const pickActiveHeaderFooterRId: (resolution: HeaderFooterResolution, position: HeaderFooterPosition, isFirstPage: boolean) => string | null;
|
|
31
45
|
/**
|
|
@@ -139,18 +139,14 @@ const resolveHeaderFooterContent = (pkg) => {
|
|
|
139
139
|
activeFirstFooterRId: resolvedFirstFooterRId
|
|
140
140
|
};
|
|
141
141
|
};
|
|
142
|
-
|
|
143
|
-
* The section properties that drive the rendered chrome, with `titlePg` merged
|
|
144
|
-
* in when title-page mode was inferred from header/footer references.
|
|
145
|
-
*/
|
|
146
|
-
const resolveEffectiveSectionProperties = (documentBody, hasTitlePg) => {
|
|
142
|
+
function resolveEffectiveSectionProperties(documentBody, hasTitlePg) {
|
|
147
143
|
const base = (documentBody?.sections?.find((section) => section.content.length > 0))?.properties ?? documentBody?.finalSectionProperties;
|
|
148
144
|
if (!hasTitlePg || base?.titlePg) return base;
|
|
149
145
|
return base ? {
|
|
150
146
|
...base,
|
|
151
147
|
titlePg: true
|
|
152
148
|
} : base;
|
|
153
|
-
}
|
|
149
|
+
}
|
|
154
150
|
/** Pick the relationship id for the slot a save/remove targets. */
|
|
155
151
|
const pickActiveHeaderFooterRId = (resolution, position, isFirstPage) => {
|
|
156
152
|
if (isFirstPage) return position === "header" ? resolution.activeFirstHeaderRId : resolution.activeFirstFooterRId;
|
|
@@ -20,7 +20,7 @@ const calculateResizedImageDimensions = ({ handle, deltaX, deltaY, startWidth, s
|
|
|
20
20
|
const scaleY = startHeight > 0 ? (startHeight + deltaY * signY) / startHeight : 1;
|
|
21
21
|
const desiredScale = Math.abs(scaleX - 1) > Math.abs(scaleY - 1) ? scaleX : scaleY;
|
|
22
22
|
const minScale = Math.max(startWidth > 0 ? MIN_IMAGE_PX / startWidth : 0, startHeight > 0 ? MIN_IMAGE_PX / startHeight : 0);
|
|
23
|
-
const maxScale = Math.min(startWidth > 0 ? MAX_IMAGE_PX / startWidth :
|
|
23
|
+
const maxScale = Math.min(startWidth > 0 ? MAX_IMAGE_PX / startWidth : 1e400, startHeight > 0 ? MAX_IMAGE_PX / startHeight : 1e400);
|
|
24
24
|
const scale = Math.min(maxScale, Math.max(minScale, desiredScale));
|
|
25
25
|
return {
|
|
26
26
|
width: startWidth * scale,
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The item of `list` just before `index`; `undefined` at the list's start,
|
|
3
|
+
* where `list.at(index - 1)` would read the list's last item instead.
|
|
4
|
+
* `.oxlint-plugins/folio-at-wraparound.ts` keeps computed negative `.at()`
|
|
5
|
+
* indexes out of package source.
|
|
6
|
+
*/
|
|
7
|
+
export declare const itemBefore: <T>(list: ArrayLike<T>, index: number) => T | undefined;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// src/utils/listItems.ts
|
|
2
|
+
/**
|
|
3
|
+
* The item of `list` just before `index`; `undefined` at the list's start,
|
|
4
|
+
* where `list.at(index - 1)` would read the list's last item instead.
|
|
5
|
+
* `.oxlint-plugins/folio-at-wraparound.ts` keeps computed negative `.at()`
|
|
6
|
+
* indexes out of package source.
|
|
7
|
+
*/
|
|
8
|
+
const itemBefore = (list, index) => index > 0 ? list[index - 1] : void 0;
|
|
9
|
+
export { itemBefore };
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Merge Document Content Utility
|
|
3
|
+
*
|
|
4
|
+
* Composes two documents by appending one document's body content onto
|
|
5
|
+
* another's, renumbering any list numbering the source carries so it can
|
|
6
|
+
* never collide with numbering the target already defines.
|
|
7
|
+
*/
|
|
1
8
|
import { document_d_exports } from "../types/document.js";
|
|
2
9
|
/**
|
|
3
10
|
* Append `source`'s body content onto `target`'s. Both documents keep their
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createNumberingIdAllocator } from "../docx/numberingIds.js";
|
|
1
|
+
import { createNumberingIdAllocator, numberingNumIdsTaken } from "../docx/numberingIds.js";
|
|
2
2
|
import { paragraphNumberingReferenceId } from "../docx/numberingReference.js";
|
|
3
3
|
import { cloneParagraphWithoutPropertySource } from "../docx/paragraphPropertySource.js";
|
|
4
4
|
// src/utils/mergeDocumentContent.ts
|
|
@@ -62,7 +62,7 @@ function mergeDocumentContent(target, source) {
|
|
|
62
62
|
};
|
|
63
63
|
function remapContentNumbering(content, numbering) {
|
|
64
64
|
const existingAbstractIds = [...(targetNumbering?.abstractNums ?? []).map(({ abstractNumId }) => abstractNumId), ...numbering.abstractNums.map(({ abstractNumId }) => abstractNumId)];
|
|
65
|
-
const existingNumIds = [...(targetNumbering
|
|
65
|
+
const existingNumIds = [...numberingNumIdsTaken(targetNumbering), ...numberingNumIdsTaken(numbering)];
|
|
66
66
|
const abstractIds = createNumberingIdAllocator("abstract", existingAbstractIds);
|
|
67
67
|
const numIds = createNumberingIdAllocator("num", existingNumIds);
|
|
68
68
|
const abstractNumIdRemap = /* @__PURE__ */ new Map();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { HeadingInfo } from "./headingCollector.js";
|
|
2
1
|
import { Layout } from "../layout-engine/types.js";
|
|
2
|
+
import { HeadingInfo } from "./headingCollector.js";
|
|
3
3
|
type ResolveOutlineHeadingsOptions = {
|
|
4
4
|
/** Headings collected from the document `layout` was computed from. */
|
|
5
5
|
collected: readonly HeadingInfo[];
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The one owner of the editor positions a painted element carries.
|
|
3
|
+
*
|
|
4
|
+
* The painter marks the elements it draws with the editor document positions
|
|
5
|
+
* they show: a run, a paragraph line, a table, a table cell, an image, a text
|
|
6
|
+
* box, a content-control boundary. Hit testing, caret and selection drawing,
|
|
7
|
+
* scrolling to a position and the hosts' pointer handling read them back.
|
|
8
|
+
*
|
|
9
|
+
* How a position is stored on an element is this module's business alone:
|
|
10
|
+
* every write and every read goes through it, and the
|
|
11
|
+
* `folio-painted-positions/position-attribute-owner` lint rule forbids
|
|
12
|
+
* touching the attributes anywhere else. That keeps the storage free to
|
|
13
|
+
* change in one place, for instance to positions relative to the painted
|
|
14
|
+
* block, without auditing every reader.
|
|
15
|
+
*/
|
|
16
|
+
/** Elements that show where they start. */
|
|
17
|
+
export declare const PAINTED_START_SELECTOR = "[data-pm-start]";
|
|
18
|
+
/** Elements that show where they start and where they end. */
|
|
19
|
+
export declare const PAINTED_RANGE_SELECTOR = "[data-pm-start][data-pm-end]";
|
|
20
|
+
/** Elements that carry any painted position. */
|
|
21
|
+
export declare const PAINTED_POSITION_SELECTOR: string;
|
|
22
|
+
/** Elements that show a range starting exactly at `position`. */
|
|
23
|
+
export declare const paintedStartSelector: (position: number) => string;
|
|
24
|
+
/**
|
|
25
|
+
* The attributes a node can differ in from a fresh painting of it while still
|
|
26
|
+
* showing the same thing: an edit before it shifts them and nothing else.
|
|
27
|
+
*/
|
|
28
|
+
export declare const PAINTED_POSITION_ATTRIBUTES: ReadonlySet<string>;
|
|
29
|
+
/** An element that can carry painted positions. */
|
|
30
|
+
export type PaintedElement = Pick<HTMLElement, "dataset">;
|
|
31
|
+
/** Where the content `element` shows starts. */
|
|
32
|
+
export declare const readPaintedStart: (element: PaintedElement) => number | undefined;
|
|
33
|
+
/** Where the content `element` shows ends. */
|
|
34
|
+
export declare const readPaintedEnd: (element: PaintedElement) => number | undefined;
|
|
35
|
+
/** Where the table a table handle or overlay element belongs to starts. */
|
|
36
|
+
export declare const readPaintedTableStart: (element: PaintedElement) => number | undefined;
|
|
37
|
+
/** The raw content-control boundary key a painted box carries. */
|
|
38
|
+
export declare const readPaintedContentControlKey: (element: PaintedElement) => string | undefined;
|
|
39
|
+
/** Whether `element` shows where it starts. */
|
|
40
|
+
export declare const hasPaintedStart: (element: PaintedElement) => boolean;
|
|
41
|
+
/** Whether `element` shows where it starts and where it ends. */
|
|
42
|
+
export declare const hasPaintedRange: (element: PaintedElement) => boolean;
|
|
43
|
+
/** Mark `element` as showing content that starts at `position`. */
|
|
44
|
+
export declare const writePaintedStart: (element: PaintedElement, position: number) => void;
|
|
45
|
+
/** Mark `element` as showing content that ends at `position`. */
|
|
46
|
+
export declare const writePaintedEnd: (element: PaintedElement, position: number) => void;
|
|
47
|
+
/**
|
|
48
|
+
* Mark `element` with the range it shows. A side left `undefined` is not
|
|
49
|
+
* written, as for a fragment that knows only one of them.
|
|
50
|
+
*/
|
|
51
|
+
export declare const writePaintedRange: (element: PaintedElement, start: number | undefined, end: number | undefined) => void;
|
|
52
|
+
/** Mark a table handle or overlay element with its table's start. */
|
|
53
|
+
export declare const writePaintedTableStart: (element: PaintedElement, position: number) => void;
|
|
54
|
+
/** Mark a content-control box with the boundary it draws. */
|
|
55
|
+
export declare const writePaintedContentControlKey: (element: PaintedElement, position: number) => void;
|
|
56
|
+
/**
|
|
57
|
+
* Move every painted position under `root` (not `root` itself) by `delta`,
|
|
58
|
+
* for content an edit before it moved without changing it.
|
|
59
|
+
*/
|
|
60
|
+
export declare const shiftPaintedPositions: (root: ParentNode, delta: number) => void;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
// src/utils/paintedPositions.ts
|
|
2
|
+
/**
|
|
3
|
+
* The one owner of the editor positions a painted element carries.
|
|
4
|
+
*
|
|
5
|
+
* The painter marks the elements it draws with the editor document positions
|
|
6
|
+
* they show: a run, a paragraph line, a table, a table cell, an image, a text
|
|
7
|
+
* box, a content-control boundary. Hit testing, caret and selection drawing,
|
|
8
|
+
* scrolling to a position and the hosts' pointer handling read them back.
|
|
9
|
+
*
|
|
10
|
+
* How a position is stored on an element is this module's business alone:
|
|
11
|
+
* every write and every read goes through it, and the
|
|
12
|
+
* `folio-painted-positions/position-attribute-owner` lint rule forbids
|
|
13
|
+
* touching the attributes anywhere else. That keeps the storage free to
|
|
14
|
+
* change in one place, for instance to positions relative to the painted
|
|
15
|
+
* block, without auditing every reader.
|
|
16
|
+
*/
|
|
17
|
+
const START_ATTRIBUTE = "data-pm-start";
|
|
18
|
+
const END_ATTRIBUTE = "data-pm-end";
|
|
19
|
+
const TABLE_START_ATTRIBUTE = "data-table-pm-start";
|
|
20
|
+
const CONTENT_CONTROL_ATTRIBUTE = "data-sdt-pm-pos";
|
|
21
|
+
/** Elements that show where they start. */
|
|
22
|
+
const PAINTED_START_SELECTOR = `[${START_ATTRIBUTE}]`;
|
|
23
|
+
/** Elements that show where they start and where they end. */
|
|
24
|
+
const PAINTED_RANGE_SELECTOR = `[${START_ATTRIBUTE}][${END_ATTRIBUTE}]`;
|
|
25
|
+
/** Elements that carry any painted position. */
|
|
26
|
+
const PAINTED_POSITION_SELECTOR = [
|
|
27
|
+
START_ATTRIBUTE,
|
|
28
|
+
END_ATTRIBUTE,
|
|
29
|
+
TABLE_START_ATTRIBUTE
|
|
30
|
+
].map((attribute) => `[${attribute}]`).join(", ");
|
|
31
|
+
/** Elements that show a range starting exactly at `position`. */
|
|
32
|
+
const paintedStartSelector = (position) => `[${START_ATTRIBUTE}="${String(position)}"]`;
|
|
33
|
+
/**
|
|
34
|
+
* The attributes a node can differ in from a fresh painting of it while still
|
|
35
|
+
* showing the same thing: an edit before it shifts them and nothing else.
|
|
36
|
+
*/
|
|
37
|
+
const PAINTED_POSITION_ATTRIBUTES = /* @__PURE__ */ new Set([
|
|
38
|
+
START_ATTRIBUTE,
|
|
39
|
+
END_ATTRIBUTE,
|
|
40
|
+
TABLE_START_ATTRIBUTE,
|
|
41
|
+
CONTENT_CONTROL_ATTRIBUTE
|
|
42
|
+
]);
|
|
43
|
+
/** A painted value, or `undefined` when the element carries none. */
|
|
44
|
+
const readPosition = (element, key) => {
|
|
45
|
+
const value = element.dataset[key];
|
|
46
|
+
return value === void 0 || value === "" ? void 0 : Number(value);
|
|
47
|
+
};
|
|
48
|
+
/** Where the content `element` shows starts. */
|
|
49
|
+
const readPaintedStart = (element) => readPosition(element, "pmStart");
|
|
50
|
+
/** Where the content `element` shows ends. */
|
|
51
|
+
const readPaintedEnd = (element) => readPosition(element, "pmEnd");
|
|
52
|
+
/** Where the table a table handle or overlay element belongs to starts. */
|
|
53
|
+
const readPaintedTableStart = (element) => readPosition(element, "tablePmStart");
|
|
54
|
+
/** The raw content-control boundary key a painted box carries. */
|
|
55
|
+
const readPaintedContentControlKey = (element) => element.dataset["sdtPmPos"];
|
|
56
|
+
/** Whether `element` shows where it starts. */
|
|
57
|
+
const hasPaintedStart = (element) => readPaintedStart(element) !== void 0;
|
|
58
|
+
/** Whether `element` shows where it starts and where it ends. */
|
|
59
|
+
const hasPaintedRange = (element) => readPaintedStart(element) !== void 0 && readPaintedEnd(element) !== void 0;
|
|
60
|
+
/** Mark `element` as showing content that starts at `position`. */
|
|
61
|
+
const writePaintedStart = (element, position) => {
|
|
62
|
+
element.dataset["pmStart"] = String(position);
|
|
63
|
+
};
|
|
64
|
+
/** Mark `element` as showing content that ends at `position`. */
|
|
65
|
+
const writePaintedEnd = (element, position) => {
|
|
66
|
+
element.dataset["pmEnd"] = String(position);
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* Mark `element` with the range it shows. A side left `undefined` is not
|
|
70
|
+
* written, as for a fragment that knows only one of them.
|
|
71
|
+
*/
|
|
72
|
+
const writePaintedRange = (element, start, end) => {
|
|
73
|
+
if (start !== void 0) writePaintedStart(element, start);
|
|
74
|
+
if (end !== void 0) writePaintedEnd(element, end);
|
|
75
|
+
};
|
|
76
|
+
/** Mark a table handle or overlay element with its table's start. */
|
|
77
|
+
const writePaintedTableStart = (element, position) => {
|
|
78
|
+
element.dataset["tablePmStart"] = String(position);
|
|
79
|
+
};
|
|
80
|
+
/** Mark a content-control box with the boundary it draws. */
|
|
81
|
+
const writePaintedContentControlKey = (element, position) => {
|
|
82
|
+
element.dataset["sdtPmPos"] = String(position);
|
|
83
|
+
};
|
|
84
|
+
const shiftPosition = (element, key, delta) => {
|
|
85
|
+
const value = element.dataset[key];
|
|
86
|
+
if (value === void 0) return;
|
|
87
|
+
const position = Number(value);
|
|
88
|
+
if (Number.isFinite(position)) element.dataset[key] = String(position + delta);
|
|
89
|
+
};
|
|
90
|
+
/**
|
|
91
|
+
* Move every painted position under `root` (not `root` itself) by `delta`,
|
|
92
|
+
* for content an edit before it moved without changing it.
|
|
93
|
+
*/
|
|
94
|
+
const shiftPaintedPositions = (root, delta) => {
|
|
95
|
+
for (const element of root.querySelectorAll(PAINTED_POSITION_SELECTOR)) {
|
|
96
|
+
shiftPosition(element, "pmStart", delta);
|
|
97
|
+
shiftPosition(element, "pmEnd", delta);
|
|
98
|
+
shiftPosition(element, "tablePmStart", delta);
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
export { PAINTED_POSITION_ATTRIBUTES, PAINTED_POSITION_SELECTOR, PAINTED_RANGE_SELECTOR, PAINTED_START_SELECTOR, hasPaintedRange, hasPaintedStart, paintedStartSelector, readPaintedContentControlKey, readPaintedEnd, readPaintedStart, readPaintedTableStart, shiftPaintedPositions, writePaintedContentControlKey, writePaintedEnd, writePaintedRange, writePaintedStart, writePaintedTableStart };
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import { document_d_exports } from "../types/document.js";
|
|
2
|
+
import { DeepReadonly, OwnRecord } from "../types/documentModel.js";
|
|
3
|
+
/**
|
|
4
|
+
* A merge's own record: a merge with a source always builds a new top-level
|
|
5
|
+
* record, so its fields are the caller's to set, while its nested values (a
|
|
6
|
+
* border, a frame, the tab stops) stay shared with the inputs.
|
|
7
|
+
*/
|
|
8
|
+
export type MergedParagraphFormatting = OwnRecord<document_d_exports.ParagraphFormatting>;
|
|
2
9
|
/**
|
|
3
10
|
* Merge custom tab stops across OOXML paragraph-property layers.
|
|
4
11
|
*
|
|
@@ -8,8 +15,8 @@ import { document_d_exports } from "../types/document.js";
|
|
|
8
15
|
* clear entry also lets the tab calculator suppress an automatic stop at the
|
|
9
16
|
* same position.
|
|
10
17
|
*/
|
|
11
|
-
export declare function mergeParagraphTabStops(inherited:
|
|
12
|
-
export declare function mergeParagraphTabStops(inherited:
|
|
18
|
+
export declare function mergeParagraphTabStops<Stop extends DeepReadonly<document_d_exports.TabStop>>(inherited: readonly Stop[] | undefined, direct: readonly Stop[]): Stop[];
|
|
19
|
+
export declare function mergeParagraphTabStops<Stop extends DeepReadonly<document_d_exports.TabStop>>(inherited: readonly Stop[] | undefined, direct: readonly Stop[] | undefined): Stop[] | undefined;
|
|
13
20
|
/**
|
|
14
21
|
* Merge paragraph properties for OOXML style cascade resolution.
|
|
15
22
|
*
|
|
@@ -18,4 +25,5 @@ export declare function mergeParagraphTabStops(inherited: document_d_exports.Tab
|
|
|
18
25
|
* tabs merge by position; paragraph mark `w:rPr` uses the run-formatting
|
|
19
26
|
* merge rules.
|
|
20
27
|
*/
|
|
21
|
-
export declare function mergeParagraphFormatting(target: document_d_exports.ParagraphFormatting | undefined, source: document_d_exports.ParagraphFormatting
|
|
28
|
+
export declare function mergeParagraphFormatting(target: DeepReadonly<document_d_exports.ParagraphFormatting> | undefined, source: DeepReadonly<document_d_exports.ParagraphFormatting>): MergedParagraphFormatting;
|
|
29
|
+
export declare function mergeParagraphFormatting(target: DeepReadonly<document_d_exports.ParagraphFormatting> | undefined, source: DeepReadonly<document_d_exports.ParagraphFormatting> | undefined): DeepReadonly<document_d_exports.ParagraphFormatting> | undefined;
|
|
@@ -65,14 +65,6 @@ const withoutPreservedMarkup = (formatting) => {
|
|
|
65
65
|
const { preserved: _preserved, indentPreservedAttributes: _indentPreservedAttributes, spacingPreservedAttributes: _spacingPreservedAttributes, ...resolved } = formatting;
|
|
66
66
|
return resolved;
|
|
67
67
|
};
|
|
68
|
-
/**
|
|
69
|
-
* Merge paragraph properties for OOXML style cascade resolution.
|
|
70
|
-
*
|
|
71
|
-
* The source is the higher-priority layer. Most `w:pPr` properties replace an
|
|
72
|
-
* inherited value when present; nested child containers merge by child field;
|
|
73
|
-
* tabs merge by position; paragraph mark `w:rPr` uses the run-formatting
|
|
74
|
-
* merge rules.
|
|
75
|
-
*/
|
|
76
68
|
function mergeParagraphFormatting(target, source) {
|
|
77
69
|
if (!source) return target;
|
|
78
70
|
if (!target) {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { measuredLineBaseline } from "../layout-engine/lineFlow.js";
|
|
1
2
|
import { getListMarkerInlineWidth } from "../layout-engine/measure/listMarkerWidth.js";
|
|
2
3
|
import { isFloatingImageRun } from "../layout-engine/types.js";
|
|
3
4
|
import { isRtlParagraph } from "./paragraphBaseDirection.js";
|
|
@@ -134,7 +135,7 @@ const resolveParagraphLineGeometry = ({ fragment, line, lineTopYPx, alignment, i
|
|
|
134
135
|
break;
|
|
135
136
|
case "justify": paintStartXPx = isRtl ? rightEdge - line.width : leftEdge;
|
|
136
137
|
}
|
|
137
|
-
const baselineYPx =
|
|
138
|
+
const baselineYPx = measuredLineBaseline(line, lineTopYPx);
|
|
138
139
|
return {
|
|
139
140
|
alignment: resolvedAlignment,
|
|
140
141
|
paintStartXPx,
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { StrokeDashCycle } from "../display-list/types.js";
|
|
2
|
+
type RepeatingStrokeGradientOptions = {
|
|
3
|
+
color: string;
|
|
4
|
+
direction: string;
|
|
5
|
+
dashArrayPx: StrokeDashCycle;
|
|
6
|
+
};
|
|
7
|
+
export declare function repeatingStrokeGradient({ color, direction, dashArrayPx }: RepeatingStrokeGradientOptions): string;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// src/utils/repeatingStrokeGradient.ts
|
|
2
|
+
function repeatingStrokeGradient({ color, direction, dashArrayPx }) {
|
|
3
|
+
const stops = [];
|
|
4
|
+
let start = 0;
|
|
5
|
+
for (const [index, length] of dashArrayPx.entries()) {
|
|
6
|
+
const ink = index % 2 === 0 ? color : "transparent";
|
|
7
|
+
const end = start + length;
|
|
8
|
+
stops.push(`${ink} ${start}px ${end}px`);
|
|
9
|
+
start = end;
|
|
10
|
+
}
|
|
11
|
+
return `repeating-linear-gradient(${direction}, ${stops.join(", ")})`;
|
|
12
|
+
}
|
|
13
|
+
export { repeatingStrokeGradient };
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Rotation bounding-box math shared by the layout measurer and the layout
|
|
3
|
+
* painter. Lives in `utils/` (not `layout-painter/`) so the measurer can
|
|
4
|
+
* import it without re-introducing the painter→measurer→painter cycle that
|
|
5
|
+
* `renderUtils.ts` was originally split to avoid.
|
|
6
|
+
*
|
|
7
|
+
* eigenpal #424 (rotation bbox gap 8 follow-up).
|
|
8
|
+
*/
|
|
1
9
|
import { ImageRun } from "../layout-engine/types.js";
|
|
2
10
|
export type BoundingBox = {
|
|
3
11
|
width: number;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
type RulerBounds = {
|
|
2
|
+
min: number;
|
|
3
|
+
max: number;
|
|
4
|
+
};
|
|
5
|
+
type HorizontalRulerBoundsOptions = {
|
|
6
|
+
pageWidth: number;
|
|
7
|
+
leftMargin: number;
|
|
8
|
+
rightMargin: number;
|
|
9
|
+
leftIndent: number;
|
|
10
|
+
rightIndent: number;
|
|
11
|
+
};
|
|
12
|
+
/** Existing pointer bounds, shared with the keyboard controls. */
|
|
13
|
+
export declare function getHorizontalRulerBounds({ pageWidth, leftMargin, rightMargin, leftIndent, rightIndent }: HorizontalRulerBoundsOptions): {
|
|
14
|
+
leftMargin: {
|
|
15
|
+
min: number;
|
|
16
|
+
max: number;
|
|
17
|
+
};
|
|
18
|
+
rightMargin: {
|
|
19
|
+
min: number;
|
|
20
|
+
max: number;
|
|
21
|
+
};
|
|
22
|
+
firstLineIndent: {
|
|
23
|
+
min: number;
|
|
24
|
+
max: number;
|
|
25
|
+
};
|
|
26
|
+
leftIndent: {
|
|
27
|
+
min: number;
|
|
28
|
+
max: number;
|
|
29
|
+
};
|
|
30
|
+
rightIndent: {
|
|
31
|
+
min: number;
|
|
32
|
+
max: number;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
type VerticalRulerBoundsOptions = {
|
|
36
|
+
pageHeight: number;
|
|
37
|
+
topMargin: number;
|
|
38
|
+
bottomMargin: number;
|
|
39
|
+
};
|
|
40
|
+
export declare function getVerticalRulerBounds({ pageHeight, topMargin, bottomMargin }: VerticalRulerBoundsOptions): {
|
|
41
|
+
topMargin: {
|
|
42
|
+
min: number;
|
|
43
|
+
max: number;
|
|
44
|
+
};
|
|
45
|
+
bottomMargin: {
|
|
46
|
+
min: number;
|
|
47
|
+
max: number;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
/** Clamp pointer values without expanding the range to authored outliers. */
|
|
51
|
+
export declare function clampRulerValue(value: number, { min, max }: RulerBounds): number;
|
|
52
|
+
type RulerControlOptions = {
|
|
53
|
+
value: number;
|
|
54
|
+
min: number;
|
|
55
|
+
max: number;
|
|
56
|
+
unit: "inch" | "cm";
|
|
57
|
+
onChange?: ((value: number) => void) | undefined;
|
|
58
|
+
};
|
|
59
|
+
/** Shared value and keyboard contract for ruler margin and indent handles. */
|
|
60
|
+
export declare function createRulerControl({ value, min, max, unit, onChange }: RulerControlOptions): {
|
|
61
|
+
attributes: {
|
|
62
|
+
role: "slider" | undefined;
|
|
63
|
+
tabIndex: number | undefined;
|
|
64
|
+
"aria-valuenow": number | undefined;
|
|
65
|
+
"aria-valuemin": number | undefined;
|
|
66
|
+
"aria-valuemax": number | undefined;
|
|
67
|
+
"aria-valuetext": string | undefined;
|
|
68
|
+
};
|
|
69
|
+
onKeyDown(event: Pick<KeyboardEvent, "key" | "altKey" | "ctrlKey" | "metaKey" | "preventDefault" | "stopPropagation">): void;
|
|
70
|
+
};
|
|
71
|
+
export {};
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { TWIPS_PER_INCH } from "./units.js";
|
|
2
|
+
// src/utils/rulerControl.ts
|
|
3
|
+
const TWIPS_PER_CM = 567;
|
|
4
|
+
const MIN_CONTENT_SIZE_TWIPS = 720;
|
|
5
|
+
/** Existing pointer bounds, shared with the keyboard controls. */
|
|
6
|
+
function getHorizontalRulerBounds({ pageWidth, leftMargin, rightMargin, leftIndent, rightIndent }) {
|
|
7
|
+
const content = pageWidth - leftMargin - rightMargin;
|
|
8
|
+
return {
|
|
9
|
+
leftMargin: {
|
|
10
|
+
min: 0,
|
|
11
|
+
max: pageWidth - rightMargin - MIN_CONTENT_SIZE_TWIPS
|
|
12
|
+
},
|
|
13
|
+
rightMargin: {
|
|
14
|
+
min: 0,
|
|
15
|
+
max: pageWidth - leftMargin - MIN_CONTENT_SIZE_TWIPS
|
|
16
|
+
},
|
|
17
|
+
firstLineIndent: {
|
|
18
|
+
min: -leftIndent,
|
|
19
|
+
max: content - leftIndent - rightIndent - MIN_CONTENT_SIZE_TWIPS
|
|
20
|
+
},
|
|
21
|
+
leftIndent: {
|
|
22
|
+
min: 0,
|
|
23
|
+
max: content - rightIndent - MIN_CONTENT_SIZE_TWIPS
|
|
24
|
+
},
|
|
25
|
+
rightIndent: {
|
|
26
|
+
min: 0,
|
|
27
|
+
max: content - leftIndent - MIN_CONTENT_SIZE_TWIPS
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
function getVerticalRulerBounds({ pageHeight, topMargin, bottomMargin }) {
|
|
32
|
+
return {
|
|
33
|
+
topMargin: {
|
|
34
|
+
min: 0,
|
|
35
|
+
max: pageHeight - bottomMargin - MIN_CONTENT_SIZE_TWIPS
|
|
36
|
+
},
|
|
37
|
+
bottomMargin: {
|
|
38
|
+
min: 0,
|
|
39
|
+
max: pageHeight - topMargin - MIN_CONTENT_SIZE_TWIPS
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
/** Clamp pointer values without expanding the range to authored outliers. */
|
|
44
|
+
function clampRulerValue(value, { min, max }) {
|
|
45
|
+
return Math.round(Math.max(min, Math.min(value, max)));
|
|
46
|
+
}
|
|
47
|
+
/** Shared value and keyboard contract for ruler margin and indent handles. */
|
|
48
|
+
function createRulerControl({ value, min, max, unit, onChange }) {
|
|
49
|
+
const minimum = Math.min(min, value);
|
|
50
|
+
const maximum = Math.max(min, max, value);
|
|
51
|
+
const step = unit === "inch" ? TWIPS_PER_INCH / 8 : TWIPS_PER_CM / 10;
|
|
52
|
+
return {
|
|
53
|
+
attributes: {
|
|
54
|
+
role: onChange ? "slider" : void 0,
|
|
55
|
+
tabIndex: onChange ? 0 : void 0,
|
|
56
|
+
"aria-valuenow": onChange ? value : void 0,
|
|
57
|
+
"aria-valuemin": onChange ? minimum : void 0,
|
|
58
|
+
"aria-valuemax": onChange ? maximum : void 0,
|
|
59
|
+
"aria-valuetext": onChange ? `${(value / (unit === "inch" ? TWIPS_PER_INCH : TWIPS_PER_CM)).toFixed(2)} ${unit === "inch" ? "in" : "cm"}` : void 0
|
|
60
|
+
},
|
|
61
|
+
onKeyDown(event) {
|
|
62
|
+
if (!onChange || event.altKey || event.ctrlKey || event.metaKey) return;
|
|
63
|
+
let next;
|
|
64
|
+
switch (event.key) {
|
|
65
|
+
case "ArrowRight":
|
|
66
|
+
case "ArrowUp":
|
|
67
|
+
next = value + step;
|
|
68
|
+
break;
|
|
69
|
+
case "ArrowLeft":
|
|
70
|
+
case "ArrowDown":
|
|
71
|
+
next = value - step;
|
|
72
|
+
break;
|
|
73
|
+
case "PageUp":
|
|
74
|
+
next = value + step * 10;
|
|
75
|
+
break;
|
|
76
|
+
case "PageDown":
|
|
77
|
+
next = value - step * 10;
|
|
78
|
+
break;
|
|
79
|
+
case "Home":
|
|
80
|
+
next = minimum;
|
|
81
|
+
break;
|
|
82
|
+
case "End":
|
|
83
|
+
next = maximum;
|
|
84
|
+
break;
|
|
85
|
+
default: return;
|
|
86
|
+
}
|
|
87
|
+
event.preventDefault();
|
|
88
|
+
event.stopPropagation();
|
|
89
|
+
const clamped = Math.round(Math.max(minimum, Math.min(maximum, next)));
|
|
90
|
+
if (clamped !== value) onChange(clamped);
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
export { clampRulerValue, createRulerControl, getHorizontalRulerBounds, getVerticalRulerBounds };
|