@stll/folio-core 0.14.1 → 0.15.1
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/ai-edits/apply.d.ts +2 -2
- package/dist/ai-edits/blockRange.d.ts +3 -17
- package/dist/ai-edits/clean-text.d.ts +0 -1
- package/dist/ai-edits/headless.d.ts +23 -19
- package/dist/ai-edits/read.d.ts +8 -5
- package/dist/ai-edits/scoped-reading.d.ts +0 -1
- package/dist/ai-edits/snapshot.d.ts +1 -7
- package/dist/ai-edits/table-cell-mutations.d.ts +4 -31
- package/dist/ai-edits/table-row-column-mutations.d.ts +9 -39
- package/dist/ai-edits/table-targets.d.ts +0 -1
- package/dist/ai-edits/types.d.ts +32 -17
- package/dist/ai-suggestions/apply.d.ts +0 -1
- package/dist/ai-suggestions/conflict.d.ts +0 -1
- package/dist/ai-suggestions/text-positions.d.ts +2 -2
- package/dist/ai-suggestions/types.d.ts +27 -13
- package/dist/compat/eigenpal.d.ts +2 -1
- package/dist/compat/eigenpal.js +2 -1
- package/dist/content-controls/errors.d.ts +0 -1
- package/dist/content-controls/findContentControls.d.ts +6 -4
- package/dist/content-controls/mutateContentControls.d.ts +0 -1
- package/dist/controller/activeEditorStory.d.ts +1 -6
- package/dist/controller/collaborationModules.d.ts +0 -1
- package/dist/controller/contentControlWidgetController.d.ts +0 -1
- package/dist/controller/folioEditor.d.ts +2 -2
- package/dist/controller/folioEditorEvents.d.ts +5 -3
- package/dist/controller/fontReadiness.d.ts +0 -1
- package/dist/controller/headerFooterEditorManager.d.ts +1 -5
- package/dist/controller/hiddenEditorApi.d.ts +35 -18
- package/dist/controller/hiddenEditorManager.d.ts +5 -3
- package/dist/controller/latestRequestGate.d.ts +3 -1
- package/dist/controller/layoutPipeline.d.ts +1 -1
- package/dist/controller/layoutScheduler.d.ts +8 -5
- package/dist/controller/layoutSession.d.ts +0 -1
- package/dist/controller/noteEditorManager.d.ts +0 -1
- package/dist/document-operations.d.ts +5 -12
- package/dist/document-stories.d.ts +0 -1
- package/dist/docx/blockContentParser.d.ts +0 -1
- package/dist/docx/blockContentParser.js +1 -0
- package/dist/docx/bookmarkParser.d.ts +5 -3
- package/dist/docx/bookmarkPlacement.d.ts +0 -1
- package/dist/docx/commentParser.d.ts +0 -1
- package/dist/docx/commentRangeIntegrity.d.ts +0 -1
- package/dist/docx/commentReferenceNormalization.d.ts +1 -9
- package/dist/docx/commentReplyMarkers.d.ts +0 -1
- package/dist/docx/compatibility.d.ts +0 -1
- package/dist/docx/conformance.d.ts +0 -1
- package/dist/docx/corePropertiesParser.d.ts +0 -1
- package/dist/docx/documentParser.d.ts +0 -1
- package/dist/docx/documentParser.js +3 -1
- package/dist/docx/drawingUtils.d.ts +23 -2
- package/dist/docx/drawingUtils.js +23 -1
- package/dist/docx/encryption/agileDecryption.d.ts +0 -1
- package/dist/docx/encryption/cryptoBytes.js +4 -1
- package/dist/docx/encryption/openEncryptedDocx.d.ts +5 -2
- package/dist/docx/ensureParaIds.d.ts +7 -3
- package/dist/docx/fieldParser.d.ts +23 -11
- package/dist/docx/fontTableParser.d.ts +0 -1
- package/dist/docx/footnoteParser.d.ts +26 -13
- package/dist/docx/footnoteParser.js +4 -2
- package/dist/docx/groupDrawingParser.d.ts +0 -1
- package/dist/docx/headerFooterParser.d.ts +9 -5
- package/dist/docx/headerFooterRefParser.d.ts +0 -1
- package/dist/docx/headerFooterReferenceNormalization.d.ts +1 -6
- package/dist/docx/headerFooterVerbatim.d.ts +2 -2
- package/dist/docx/hyperlinkParser.d.ts +0 -1
- package/dist/docx/hyperlinkParser.js +1 -9
- package/dist/docx/imageParser.d.ts +0 -1
- package/dist/docx/imageParser.js +15 -7
- package/dist/docx/mathToMathml.d.ts +0 -1
- package/dist/docx/metadataPrivacy.d.ts +1 -3
- package/dist/docx/modelValidation.d.ts +0 -1
- package/dist/docx/newImage.d.ts +11 -0
- package/dist/docx/newImage.js +11 -0
- package/dist/docx/normalizeBaseDirection.d.ts +0 -1
- package/dist/docx/notePropertiesParser.d.ts +0 -1
- package/dist/docx/numberingParser.d.ts +10 -6
- package/dist/docx/numberingParser.js +4 -2
- package/dist/docx/numberingReferenceNormalization.d.ts +1 -9
- package/dist/docx/paragraphParser.d.ts +0 -1
- package/dist/docx/paragraphParser.js +27 -14
- package/dist/docx/paragraphTextBoxEnrichment.d.ts +0 -1
- package/dist/docx/paragraphTextBoxEnrichment.js +2 -1
- package/dist/docx/paragraphTraversal.d.ts +1 -8
- package/dist/docx/parser.d.ts +15 -8
- package/dist/docx/parser.js +12 -1
- package/dist/docx/parserEnums.d.ts +2 -2
- package/dist/docx/parserEnums.js +3 -2
- package/dist/docx/relsParser.d.ts +1 -0
- package/dist/docx/renderedPageBreakNormalization.d.ts +12 -0
- package/dist/docx/renderedPageBreakNormalization.js +59 -0
- package/dist/docx/replyToComment.d.ts +2 -2
- package/dist/docx/rezip.d.ts +6 -7
- package/dist/docx/rezip.js +136 -102
- package/dist/docx/runConsolidator.d.ts +0 -1
- package/dist/docx/runParser.d.ts +0 -1
- package/dist/docx/runParser.js +9 -12
- package/dist/docx/sdtProperties.d.ts +0 -1
- package/dist/docx/sdtPropertiesPatch.d.ts +0 -1
- package/dist/docx/sectionParser.d.ts +0 -1
- package/dist/docx/selectiveSave.d.ts +5 -3
- package/dist/docx/selectiveSave.js +2 -2
- package/dist/docx/selectiveSaveFlags.d.ts +4 -2
- package/dist/docx/selectiveXmlPatch.js +20 -8
- package/dist/docx/serializer/blockSdtSerializer.d.ts +0 -1
- package/dist/docx/serializer/blockSdtSerializer.js +2 -1
- package/dist/docx/serializer/borderSerializer.d.ts +0 -1
- package/dist/docx/serializer/commentSerializer.d.ts +0 -1
- package/dist/docx/serializer/commentSerializer.js +11 -37
- package/dist/docx/serializer/documentSerializer.d.ts +0 -1
- package/dist/docx/serializer/documentSerializer.js +1 -1
- package/dist/docx/serializer/fontTableSerializer.d.ts +0 -1
- package/dist/docx/serializer/headerFooterSerializer.d.ts +0 -1
- package/dist/docx/serializer/headerFooterSerializer.js +1 -1
- package/dist/docx/serializer/noteSerializer.d.ts +0 -1
- package/dist/docx/serializer/noteSerializer.js +1 -1
- package/dist/docx/serializer/numberingSerializer.d.ts +0 -1
- package/dist/docx/serializer/paragraphSerializer.d.ts +0 -1
- package/dist/docx/serializer/paragraphSerializer.js +10 -23
- package/dist/docx/serializer/runSerializer.d.ts +0 -1
- package/dist/docx/serializer/runSerializer.js +37 -22
- package/dist/docx/serializer/sectionPropertiesSerializer.d.ts +0 -1
- package/dist/docx/serializer/sectionPropertiesSerializer.js +5 -4
- package/dist/docx/serializer/settingsSerializer.d.ts +0 -1
- package/dist/docx/serializer/stylesSerializer.d.ts +0 -1
- package/dist/docx/serializer/tableSerializer.d.ts +0 -1
- package/dist/docx/serializer/tableSerializer.js +2 -0
- package/dist/docx/serializer/themeSerializer.d.ts +0 -1
- package/dist/docx/serializer/xmlUtils.js +10 -1
- package/dist/docx/server/applyDocxXmlPatchProposal.d.ts +3 -10
- package/dist/docx/server/docxToMarkdown.d.ts +0 -1
- package/dist/docx/server/evaluateDocxXmlPatchProposal.d.ts +3 -9
- package/dist/docx/server/inspectDocxPackage.d.ts +3 -8
- package/dist/docx/server/validateDocxConformance.d.ts +0 -1
- package/dist/docx/settingsParser.d.ts +2 -2
- package/dist/docx/shapeParser.d.ts +0 -1
- package/dist/docx/shapeParser.js +11 -10
- package/dist/docx/streamingXmlParser.d.ts +16 -0
- package/dist/docx/streamingXmlParser.js +248 -0
- package/dist/docx/styleParser.d.ts +0 -1
- package/dist/docx/styleParser.js +6 -4
- package/dist/docx/tableParser.d.ts +1 -2
- package/dist/docx/tableParser.js +3 -6
- package/dist/docx/textBoxParser.d.ts +1 -2
- package/dist/docx/textBoxParser.js +4 -1
- package/dist/docx/textWhitespace.d.ts +4 -0
- package/dist/docx/textWhitespace.js +4 -0
- package/dist/docx/themeParser.d.ts +0 -1
- package/dist/docx/trackedMoveRangeNormalization.d.ts +1 -8
- package/dist/docx/unzip.d.ts +6 -3
- package/dist/docx/unzip.js +96 -40
- package/dist/docx/vmlImageParser.d.ts +0 -1
- package/dist/docx/vmlImageParser.js +3 -1
- package/dist/docx/watermarkParser.d.ts +0 -1
- package/dist/docx/xmlParser.d.ts +21 -8
- package/dist/docx/xmlParser.js +126 -43
- package/dist/fields/bookmarkPages.d.ts +0 -1
- package/dist/fields/bookmarkText.d.ts +0 -1
- package/dist/fields/evaluateField.d.ts +5 -3
- package/dist/fields/fieldContext.d.ts +11 -5
- package/dist/fields/resolveFieldValues.d.ts +4 -3
- package/dist/fields/sectionPageCounts.d.ts +0 -1
- package/dist/fields/seqValues.d.ts +0 -1
- package/dist/fonts/embeddedFontTable.d.ts +5 -2
- package/dist/fonts/embeddedFonts.d.ts +15 -7
- package/dist/index.d.ts +3 -1
- package/dist/index.js +2 -1
- package/dist/layout-bridge/cellSelectionHighlight.d.ts +0 -1
- package/dist/layout-bridge/convert/footnoteLayout.d.ts +5 -3
- package/dist/layout-bridge/convert/headerFooterLayout.d.ts +2 -2
- package/dist/layout-bridge/convert/paragraphFrames.d.ts +0 -1
- package/dist/layout-bridge/convert/templatePreviewFlow.d.ts +8 -8
- package/dist/layout-bridge/convert/toFlowBlocks.d.ts +25 -13
- package/dist/layout-bridge/convert/wrapEditorViewAsSurface.d.ts +3 -2
- package/dist/layout-bridge/dom/findHfPmSpans.d.ts +2 -1
- package/dist/layout-bridge/dom/noteStoryDom.d.ts +0 -1
- package/dist/layout-bridge/engine/clickToPosition.d.ts +5 -3
- package/dist/layout-bridge/engine/hitTest.d.ts +40 -19
- package/dist/layout-bridge/engine/selectionRects.d.ts +16 -8
- package/dist/layout-bridge/engine/tableWidthUtils.d.ts +0 -1
- package/dist/layout-bridge/headerFooterLayout.d.ts +0 -1
- package/dist/layout-bridge/sectionColumns.d.ts +0 -1
- package/dist/layout-bridge/tableInsertHover.d.ts +8 -4
- package/dist/layout-engine/headerFooterRefs.d.ts +0 -1
- package/dist/layout-engine/index.d.ts +0 -1
- package/dist/layout-engine/justificationCompatibility.d.ts +0 -1
- package/dist/layout-engine/keep-together.d.ts +7 -4
- package/dist/layout-engine/layoutInstrumentation.d.ts +0 -1
- package/dist/layout-engine/lineFlow.d.ts +0 -1
- package/dist/layout-engine/measure/cache.d.ts +0 -1
- package/dist/layout-engine/measure/effectiveLineBreakPolicy.d.ts +6 -7
- package/dist/layout-engine/measure/floatingTablePosition.d.ts +0 -1
- package/dist/layout-engine/measure/floatingZones.d.ts +14 -6
- package/dist/layout-engine/measure/font-metrics.worker.d.ts +0 -1
- package/dist/layout-engine/measure/lineBreakProvider.d.ts +20 -9
- package/dist/layout-engine/measure/lineBreaks.d.ts +0 -1
- package/dist/layout-engine/measure/listMarkerWidth.d.ts +0 -1
- package/dist/layout-engine/measure/measureBlocks.d.ts +1 -0
- package/dist/layout-engine/measure/measureContainer.d.ts +0 -1
- package/dist/layout-engine/measure/measureHelpers.d.ts +0 -1
- package/dist/layout-engine/measure/measureParagraph.d.ts +3 -2
- package/dist/layout-engine/measure/measureParagraph.js +23 -3
- package/dist/layout-engine/measure/measureProvider.d.ts +0 -1
- package/dist/layout-engine/measure/measureTypes.d.ts +4 -2
- package/dist/layout-engine/measure/measureWorker.d.ts +0 -1
- package/dist/layout-engine/measure/measureWorkerProtocol.d.ts +0 -1
- package/dist/layout-engine/measure/tableCellFloating.d.ts +0 -1
- package/dist/layout-engine/measure/tableCellFlow.d.ts +0 -1
- package/dist/layout-engine/measure/tableCellGrid.d.ts +0 -1
- package/dist/layout-engine/measure/textBoxParagraphLayout.d.ts +0 -1
- package/dist/layout-engine/measure/textMeasurementPolicy.d.ts +0 -1
- package/dist/layout-engine/paginator.d.ts +66 -33
- package/dist/layout-engine/paragraphFragmentRange.d.ts +0 -1
- package/dist/layout-engine/paragraphFrame.d.ts +0 -1
- package/dist/layout-engine/paragraphSequence.d.ts +0 -1
- package/dist/layout-engine/paragraphSpacing.d.ts +1 -5
- package/dist/layout-engine/pmPageIndex.d.ts +0 -1
- package/dist/layout-engine/renderedBreakReconciliation.d.ts +2 -17
- package/dist/layout-engine/section-breaks.d.ts +34 -17
- package/dist/layout-engine/tableRowBreak.d.ts +4 -3
- package/dist/layout-engine/textBoxFlow.d.ts +0 -1
- package/dist/layout-engine/textBoxGroup.d.ts +0 -1
- package/dist/layout-engine/types.d.ts +382 -189
- package/dist/layout-painter/anchoredImagePosition.d.ts +0 -1
- package/dist/layout-painter/borderStroke.d.ts +0 -1
- package/dist/layout-painter/imageLayout.d.ts +14 -7
- package/dist/layout-painter/index.d.ts +9 -5
- package/dist/layout-painter/registry/modules/image.d.ts +0 -1
- package/dist/layout-painter/registry/modules/paragraph.d.ts +0 -1
- package/dist/layout-painter/registry/modules/table.d.ts +0 -1
- package/dist/layout-painter/registry/modules/textBox.d.ts +0 -1
- package/dist/layout-painter/registry/modules.d.ts +0 -1
- package/dist/layout-painter/registry/registry.d.ts +0 -1
- package/dist/layout-painter/registry/types.d.ts +0 -1
- package/dist/layout-painter/renderFragment.d.ts +2 -2
- package/dist/layout-painter/renderImage.d.ts +0 -1
- package/dist/layout-painter/renderPage.d.ts +71 -42
- package/dist/layout-painter/renderParagraph.d.ts +28 -14
- package/dist/layout-painter/renderParagraph.js +6 -2
- package/dist/layout-painter/renderTable.d.ts +0 -1
- package/dist/layout-painter/renderTextBox.d.ts +0 -1
- package/dist/layout-painter/renderUtils.d.ts +17 -9
- package/dist/layout-painter/renderWatermark.d.ts +2 -2
- package/dist/layout-painter/sdtBoundary.d.ts +0 -1
- package/dist/managers/AutoSaveManager.d.ts +22 -11
- package/dist/managers/ClipboardManager.d.ts +0 -1
- package/dist/managers/ContextMenuManager.d.ts +5 -8
- package/dist/managers/DocumentLoaderManager.d.ts +12 -6
- package/dist/managers/EditorModeManager.d.ts +3 -2
- package/dist/managers/ErrorManager.d.ts +0 -1
- package/dist/managers/FindReplaceManager.d.ts +0 -1
- package/dist/managers/HistoryManager.d.ts +19 -9
- package/dist/managers/TableSelectionManager.d.ts +0 -1
- package/dist/managers/editorShortcuts.d.ts +4 -6
- package/dist/markdown/annotations.d.ts +0 -1
- package/dist/markdown/fromMarkdown.d.ts +0 -1
- package/dist/markdown/fromMarkdown.js +55 -5
- package/dist/markdown/images.d.ts +0 -1
- package/dist/markdown/index.d.ts +0 -1
- package/dist/markdown/internals.d.ts +0 -1
- package/dist/markdown/renderBlock.d.ts +0 -1
- package/dist/markdown/renderParagraph.d.ts +0 -1
- package/dist/markdown/renderRuns.d.ts +0 -1
- package/dist/markdown/renderTable.d.ts +0 -1
- package/dist/markdown/trailers.d.ts +0 -1
- package/dist/markdown/types.d.ts +39 -18
- package/dist/model.d.ts +3 -5
- package/dist/model.js +2 -2
- package/dist/paged-layout/incrementalMeasure.d.ts +1 -10
- package/dist/paged-layout/pageText.d.ts +1 -1
- package/dist/paged-layout/paragraphFlash.d.ts +0 -1
- package/dist/paged-layout/paragraphFlashTypes.d.ts +5 -2
- package/dist/paged-layout/rangeProjection.d.ts +10 -5
- package/dist/paged-layout/scrollNavigation.d.ts +0 -1
- package/dist/paged-layout/scrollPageInfo.d.ts +12 -13
- package/dist/paged-layout/scrollToPmPosition.d.ts +0 -1
- package/dist/paged-layout/sectionBlockWidths.d.ts +2 -11
- package/dist/paged-layout/sectionGeometry.d.ts +0 -1
- package/dist/paged-layout/selectionViewportRect.d.ts +0 -1
- package/dist/paged-layout/transactionDirtyRange.d.ts +0 -1
- package/dist/paged-layout/zoomScrollAnchor.d.ts +2 -12
- package/dist/prosemirror/attrs/index.d.ts +2 -2
- package/dist/prosemirror/attrs/index.js +5 -0
- package/dist/prosemirror/autospacingBase.d.ts +0 -1
- package/dist/prosemirror/cellDragSelection.d.ts +6 -4
- package/dist/prosemirror/commands/comments.d.ts +6 -4
- package/dist/prosemirror/commands/contentControls.d.ts +5 -3
- package/dist/prosemirror/commands/contentControlsBlockFill.d.ts +1 -1
- package/dist/prosemirror/commands/formatPainter.d.ts +0 -1
- package/dist/prosemirror/commands/formatting.d.ts +1 -1
- package/dist/prosemirror/commands/hyperlink.d.ts +4 -9
- package/dist/prosemirror/commands/image.d.ts +0 -1
- package/dist/prosemirror/commands/pageBreak.d.ts +0 -1
- package/dist/prosemirror/commands/paragraph.d.ts +0 -1
- package/dist/prosemirror/commands/pastePlainText.d.ts +0 -1
- package/dist/prosemirror/commands/propertyChangeScope.d.ts +0 -1
- package/dist/prosemirror/commands/sectionBreak.d.ts +0 -1
- package/dist/prosemirror/commands/table.d.ts +0 -1
- package/dist/prosemirror/commands/tableCellMergeResolution.d.ts +0 -1
- package/dist/prosemirror/commentIdAllocator.d.ts +2 -2
- package/dist/prosemirror/commentOps.d.ts +0 -1
- package/dist/prosemirror/conversion/effectiveTableCellFormatting.d.ts +1 -10
- package/dist/prosemirror/conversion/fromProseDoc.d.ts +0 -1
- package/dist/prosemirror/conversion/fromProseDoc.js +7 -4
- package/dist/prosemirror/conversion/runShadingMark.d.ts +0 -1
- package/dist/prosemirror/conversion/sdtAttrs.d.ts +0 -1
- package/dist/prosemirror/conversion/toProseDoc.d.ts +3 -2
- package/dist/prosemirror/conversion/toProseDoc.js +16 -2
- package/dist/prosemirror/extensions/ExtensionManager.d.ts +0 -1
- package/dist/prosemirror/extensions/StarterKit.d.ts +7 -4
- package/dist/prosemirror/extensions/core/DocExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/core/HistoryExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/core/ParagraphExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/core/TextExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/create.d.ts +0 -1
- package/dist/prosemirror/extensions/features/AutoBidiDetectionExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/features/BaseKeymapExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/features/BidiShortcutExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/features/ContentControlWidgetsExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/features/DropCursorExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/features/EmptyParagraphFormatExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/features/GapCursorExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/features/ImageDragExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/features/ImagePasteExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/features/ListExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/features/ParaIdAllocatorExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/features/ParagraphChangeTrackerExtension.d.ts +7 -4
- package/dist/prosemirror/extensions/features/PasteCleanupExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/features/PasteStyleInlinerExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/features/SelectionTrackerExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/features/bidiShortcutController.d.ts +3 -1
- package/dist/prosemirror/extensions/marks/AllCapsExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/marks/BoldExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/marks/CharacterSpacingExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/marks/CharacterStyleExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/marks/CommentExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/marks/FontFamilyExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/marks/FontFamilyExtension.js +1 -0
- package/dist/prosemirror/extensions/marks/FontSizeExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/marks/FootnoteRefExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/marks/HiddenTextExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/marks/HighlightExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/marks/HyperlinkExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/marks/ItalicExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/marks/LanguageExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/marks/RtlExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/marks/RunFormattingOverrideExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/marks/RunShadingExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/marks/SmallCapsExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/marks/StrikeExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/marks/SubscriptExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/marks/SuperscriptExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/marks/TextColorExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/marks/TextEffectExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/marks/TextEffectsExtensions.d.ts +0 -1
- package/dist/prosemirror/extensions/marks/TrackedChangeExtensions.d.ts +0 -1
- package/dist/prosemirror/extensions/marks/UnderlineExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/marks/markUtils.d.ts +0 -1
- package/dist/prosemirror/extensions/marks/markUtils.js +4 -1
- package/dist/prosemirror/extensions/nodes/BlockSdtExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/nodes/FieldExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/nodes/HardBreakExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/nodes/HorizontalRuleExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/nodes/ImageExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/nodes/ImageExtension.js +2 -0
- package/dist/prosemirror/extensions/nodes/MathExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/nodes/PageBreakExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/nodes/RenderedPageBreakExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/nodes/SdtExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/nodes/ShapeExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/nodes/ShapeExtension.js +2 -0
- package/dist/prosemirror/extensions/nodes/TabExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/nodes/TableExtension.d.ts +4 -3
- package/dist/prosemirror/extensions/nodes/TextBoxAnchorExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/nodes/TextBoxExtension.d.ts +53 -27
- package/dist/prosemirror/extensions/types.d.ts +0 -1
- package/dist/prosemirror/findReplaceSelection.d.ts +5 -3
- package/dist/prosemirror/imageCommit.d.ts +0 -1
- package/dist/prosemirror/index.d.ts +4 -0
- package/dist/prosemirror/insertOperations.d.ts +0 -1
- package/dist/prosemirror/paraText.d.ts +0 -1
- package/dist/prosemirror/plugins/aiCitationDecorations.d.ts +2 -2
- package/dist/prosemirror/plugins/aiSuggestionDecorations.d.ts +0 -1
- package/dist/prosemirror/plugins/anonymizationDecorations.d.ts +9 -7
- package/dist/prosemirror/plugins/autocompleteSuggestion.d.ts +2 -2
- package/dist/prosemirror/plugins/contentControlWidgets.d.ts +4 -7
- package/dist/prosemirror/plugins/createDocScanPlugin.d.ts +3 -8
- package/dist/prosemirror/plugins/documentStyles.d.ts +0 -1
- package/dist/prosemirror/plugins/pmTextScan.d.ts +2 -2
- package/dist/prosemirror/plugins/revisionIds.d.ts +0 -1
- package/dist/prosemirror/plugins/selectionTracker.d.ts +23 -12
- package/dist/prosemirror/plugins/suggestionMode.d.ts +0 -1
- package/dist/prosemirror/plugins/templateDirectives.d.ts +10 -8
- package/dist/prosemirror/plugins/templatePreviewValues.d.ts +10 -5
- package/dist/prosemirror/plugins/templateSlashMenu.d.ts +2 -2
- package/dist/prosemirror/queries.d.ts +0 -1
- package/dist/prosemirror/schema/index.d.ts +0 -1
- package/dist/prosemirror/schema/marks.d.ts +8 -5
- package/dist/prosemirror/schema/nodes.d.ts +340 -163
- package/dist/prosemirror/selectionState.d.ts +13 -7
- package/dist/prosemirror/styles/resolvedStyleAttrs.d.ts +0 -1
- package/dist/prosemirror/styles/styleResolver.d.ts +3 -2
- package/dist/prosemirror/tableCellMergeRevision.d.ts +0 -1
- package/dist/prosemirror/tableResize.d.ts +0 -1
- package/dist/prosemirror/textBoxAnchorAttrs.d.ts +0 -1
- package/dist/prosemirror/utils/extractTrackedChanges.d.ts +8 -5
- package/dist/prosemirror/utils/findParagraphByParaId.d.ts +0 -1
- package/dist/prosemirror/utils/tabCalculator.d.ts +18 -7
- package/dist/prosemirror/utils/visualLineNavigation.d.ts +0 -1
- package/dist/prosemirror/validation.d.ts +0 -1
- package/dist/redline.d.ts +16 -8
- package/dist/render-dom/BodySelectionOverlay.d.ts +1 -9
- package/dist/render-dom/HeaderFooterSelectionOverlay.d.ts +0 -1
- package/dist/render-dom/RemoteSelectionOverlay.d.ts +1 -8
- package/dist/render-dom/resolveSidebarItemPositions.d.ts +1 -9
- package/dist/style-engine/styleEngine.d.ts +21 -11
- package/dist/style-sets/extract.d.ts +4 -3
- package/dist/style-sets/stellaStyle.d.ts +0 -1
- package/dist/style-sets/types.d.ts +0 -1
- package/dist/symbols.d.ts +6 -2
- package/dist/types/block-id.d.ts +3 -6
- package/dist/types/document.d.ts +0 -3
- package/dist/types/documentEnumValues.d.ts +2 -1
- package/dist/types/documentEnumValues.js +6 -1
- package/dist/utils/clipboard.d.ts +17 -8
- package/dist/utils/colorResolver.d.ts +9 -5
- package/dist/utils/createDocument.d.ts +19 -10
- package/dist/utils/documentLoaderBehavior.d.ts +1 -5
- package/dist/utils/docxInput.js +1 -0
- package/dist/utils/findReplace.d.ts +0 -1
- package/dist/utils/fontFamilyMerge.d.ts +0 -1
- package/dist/utils/fontResolver.d.ts +10 -4
- package/dist/utils/formatToStyle.d.ts +0 -1
- package/dist/utils/headerFooter.d.ts +8 -16
- package/dist/utils/headingCollector.d.ts +7 -4
- package/dist/utils/mergeDocumentContent.d.ts +28 -0
- package/dist/utils/mergeDocumentContent.js +145 -0
- package/dist/utils/paragraphFormattingMerge.d.ts +0 -1
- package/dist/utils/replaceText.d.ts +0 -1
- package/dist/utils/rotationBoundingBox.d.ts +0 -1
- package/dist/utils/tableOperations.d.ts +0 -1
- package/dist/utils/textFormattingMerge.d.ts +0 -1
- package/dist/version-comparison.d.ts +12 -6
- package/dist/watermark/index.d.ts +0 -1
- package/package.json +3 -3
|
@@ -3,7 +3,6 @@ import { FlowBlock, HeaderFooterContent, ImageRun, ImageRunPosition, Measure, Pa
|
|
|
3
3
|
import { ToFlowBlocksOptions } from "./toFlowBlocks.js";
|
|
4
4
|
import { MeasureBlocksFn } from "./footnoteLayout.js";
|
|
5
5
|
import { Node } from "prosemirror-model";
|
|
6
|
-
|
|
7
6
|
//#region src/layout-bridge/convert/headerFooterLayout.d.ts
|
|
8
7
|
type HeaderFooterMetrics = {
|
|
9
8
|
section: "header" | "footer";
|
|
@@ -34,7 +33,8 @@ declare function calculateHeaderFooterMarginPushBounds(blocks: FlowBlock[], meas
|
|
|
34
33
|
type ConvertHeaderFooterOptions = {
|
|
35
34
|
styles?: document_d_exports.StyleDefinitions | null;
|
|
36
35
|
theme?: document_d_exports.Theme | null;
|
|
37
|
-
measureBlocks: MeasureBlocksFn;
|
|
36
|
+
measureBlocks: MeasureBlocksFn;
|
|
37
|
+
/** Document-wide `w:defaultTabStop` in twips — forwarded to toFlowBlocks. */
|
|
38
38
|
defaultTabStopTwips?: number;
|
|
39
39
|
lineBreakRules?: ToFlowBlocksOptions["lineBreakRules"];
|
|
40
40
|
justificationCompatibility?: ToFlowBlocksOptions["justificationCompatibility"];
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import { TemplatePreviewValue } from "../../prosemirror/plugins/templatePreviewValues.js";
|
|
2
2
|
import { FlowBlock } from "../../layout-engine/types.js";
|
|
3
|
-
|
|
4
3
|
//#region src/layout-bridge/convert/templatePreviewFlow.d.ts
|
|
5
4
|
/** One marker→value substitution, in PM doc positions. */
|
|
6
5
|
type TemplatePreviewFlowEntry = {
|
|
7
|
-
/** Inclusive PM doc position of the marker start. */
|
|
8
|
-
|
|
6
|
+
/** Inclusive PM doc position of the marker start. */
|
|
7
|
+
from: number;
|
|
8
|
+
/** Exclusive PM doc position of the marker end. */
|
|
9
|
+
to: number;
|
|
10
|
+
/** The typed value displayed in place of the marker. */
|
|
9
11
|
value: TemplatePreviewValue;
|
|
10
12
|
};
|
|
11
13
|
type TemplatePreviewFlowOptions = {
|
|
12
|
-
entries: readonly TemplatePreviewFlowEntry[];
|
|
14
|
+
entries: readonly TemplatePreviewFlowEntry[];
|
|
15
|
+
/** `highlighted` marks substituted runs for the accent-chip CSS. */
|
|
13
16
|
mode: "highlighted" | "plain";
|
|
14
17
|
};
|
|
15
18
|
/**
|
|
@@ -17,10 +20,7 @@ type TemplatePreviewFlowOptions = {
|
|
|
17
20
|
* flow blocks (recursing into table cells and text boxes). Returns the input
|
|
18
21
|
* array unchanged when there is nothing to substitute.
|
|
19
22
|
*/
|
|
20
|
-
declare function applyTemplatePreviewToBlocks(blocks: FlowBlock[], {
|
|
21
|
-
entries,
|
|
22
|
-
mode
|
|
23
|
-
}: TemplatePreviewFlowOptions): FlowBlock[];
|
|
23
|
+
declare function applyTemplatePreviewToBlocks(blocks: FlowBlock[], { entries, mode }: TemplatePreviewFlowOptions): FlowBlock[];
|
|
24
24
|
/**
|
|
25
25
|
* PM range covering every substitution that differs between two preview
|
|
26
26
|
* states (changed, added, or removed entries), or `null` when the
|
|
@@ -1,18 +1,24 @@
|
|
|
1
1
|
import { document_d_exports } from "../../types/document.js";
|
|
2
2
|
import { BorderStyle, FlowBlock, ParagraphAttrs } from "../../layout-engine/types.js";
|
|
3
3
|
import { Node } from "prosemirror-model";
|
|
4
|
-
|
|
5
4
|
//#region src/layout-bridge/convert/toFlowBlocks.d.ts
|
|
6
5
|
/**
|
|
7
6
|
* Options for the conversion.
|
|
8
7
|
*/
|
|
9
8
|
type ToFlowBlocksOptions = {
|
|
10
|
-
/** Default font family. */
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
9
|
+
/** Default font family. */
|
|
10
|
+
defaultFont?: string;
|
|
11
|
+
/** Default font size in points. */
|
|
12
|
+
defaultSize?: number;
|
|
13
|
+
/** Theme for resolving theme colors. */
|
|
14
|
+
theme?: document_d_exports.Theme | null;
|
|
15
|
+
/** Page content height in pixels (pageHeight - marginTop - marginBottom). Images taller than this are scaled down to fit. */
|
|
16
|
+
pageContentHeight?: number;
|
|
17
|
+
/** Shared list counters for nested containers. */
|
|
18
|
+
listCounters?: Map<number, number[]>;
|
|
19
|
+
/** Latest concrete counters by abstract numbering definition. */
|
|
20
|
+
listAbstractCounters?: Map<number, number[]>;
|
|
21
|
+
/** Shared startOverride state for nested containers. */
|
|
16
22
|
listSeenNumIds?: Set<string>;
|
|
17
23
|
/**
|
|
18
24
|
* Parallel counter state for the "original" (pre-revision) document, used to
|
|
@@ -22,8 +28,10 @@ type ToFlowBlocksOptions = {
|
|
|
22
28
|
* item continues the counter of the inserted item before it (a, b → c, d, e
|
|
23
29
|
* instead of a, b and a, b, c). Normal items advance both streams.
|
|
24
30
|
*/
|
|
25
|
-
originalListCounters?: Map<number, number[]>;
|
|
26
|
-
|
|
31
|
+
originalListCounters?: Map<number, number[]>;
|
|
32
|
+
/** Latest concrete original-stream counters by abstract numbering definition. */
|
|
33
|
+
originalListAbstractCounters?: Map<number, number[]>;
|
|
34
|
+
/** Original-stream startOverride state. */
|
|
27
35
|
originalListSeenNumIds?: Set<string>;
|
|
28
36
|
/**
|
|
29
37
|
* Document-wide `w:defaultTabStop` (§17.6.13) in twips. Stamped onto
|
|
@@ -31,7 +39,8 @@ type ToFlowBlocksOptions = {
|
|
|
31
39
|
* tab-stop math) can read it without taking a `Document` reference.
|
|
32
40
|
* Defaults to the OOXML 720-twip value when absent.
|
|
33
41
|
*/
|
|
34
|
-
defaultTabStopTwips?: number;
|
|
42
|
+
defaultTabStopTwips?: number;
|
|
43
|
+
/** Document-wide custom Word line-breaking settings. */
|
|
35
44
|
lineBreakRules?: {
|
|
36
45
|
noLineBreaksBefore?: {
|
|
37
46
|
language?: string;
|
|
@@ -42,9 +51,12 @@ type ToFlowBlocksOptions = {
|
|
|
42
51
|
characters: string;
|
|
43
52
|
};
|
|
44
53
|
useLegacyEthiopicAmharicRules?: boolean;
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
|
|
54
|
+
};
|
|
55
|
+
/** Document-generation policy for justified line fitting. */
|
|
56
|
+
justificationCompatibility?: NonNullable<ParagraphAttrs["justificationCompatibility"]>;
|
|
57
|
+
/** Document-wide automatic hyphenation policy. */
|
|
58
|
+
automaticHyphenation?: NonNullable<ParagraphAttrs["automaticHyphenation"]>;
|
|
59
|
+
/** Line pitch for the final body section, whose properties live outside the PM body. */
|
|
48
60
|
finalSectionDocumentGridLinePitchTwips?: number;
|
|
49
61
|
};
|
|
50
62
|
declare function formatCounter(value: number, format: document_d_exports.NumberFormat | undefined): string;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { EditorState, Transaction } from "prosemirror-state";
|
|
2
2
|
import { EditorView } from "prosemirror-view";
|
|
3
|
-
|
|
4
3
|
//#region src/layout-bridge/convert/wrapEditorViewAsSurface.d.ts
|
|
5
4
|
type Surface = {
|
|
6
|
-
/** Identity tag — `"body"` for the body PM, `"hf"` for any HF PM. */
|
|
5
|
+
/** Identity tag — `"body"` for the body PM, `"hf"` for any HF PM. */
|
|
6
|
+
kind: "body" | "hf";
|
|
7
|
+
/** rId of the source HF part; `null` for the body surface. */
|
|
7
8
|
rId: string | null;
|
|
8
9
|
getState: () => EditorState | null;
|
|
9
10
|
getView: () => EditorView | null;
|
|
@@ -23,7 +23,8 @@ declare function findHfPmAnchor(container: ParentNode, kind: HfSlotKind, rId: st
|
|
|
23
23
|
* should hug so the renderer can pick `left` vs `right`.
|
|
24
24
|
*/
|
|
25
25
|
type HfCaretSpanHit = {
|
|
26
|
-
element: HTMLElement;
|
|
26
|
+
element: HTMLElement;
|
|
27
|
+
/** Which edge of the span's getBoundingClientRect to anchor the caret to. */
|
|
27
28
|
edge: "left" | "right";
|
|
28
29
|
};
|
|
29
30
|
declare function findHfCaretSpan(container: ParentNode, kind: HfSlotKind, rId: string, pos: number): HfCaretSpanHit | null;
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { ParagraphBlock, ParagraphMeasure } from "../../layout-engine/types.js";
|
|
2
2
|
import { FragmentHit, TableCellHit } from "./hitTest.js";
|
|
3
|
-
|
|
4
3
|
//#region src/layout-bridge/engine/clickToPosition.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* Result of click-to-position mapping.
|
|
7
6
|
*/
|
|
8
7
|
type PositionResult = {
|
|
9
|
-
/** ProseMirror document position. */
|
|
10
|
-
|
|
8
|
+
/** ProseMirror document position. */
|
|
9
|
+
pmPosition: number;
|
|
10
|
+
/** Character offset within the line (for debugging). */
|
|
11
|
+
charOffset: number;
|
|
12
|
+
/** Line index within the paragraph. */
|
|
11
13
|
lineIndex: number;
|
|
12
14
|
};
|
|
13
15
|
/**
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { FlowBlock, Fragment, Layout, Measure, Page, ParagraphBlock, ParagraphMeasure, TableBlock, TableFragment, TableMeasure } from "../../layout-engine/types.js";
|
|
2
|
-
|
|
3
2
|
//#region src/layout-bridge/engine/hitTest.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* A 2D point in page coordinate space.
|
|
@@ -12,34 +11,53 @@ type Point = {
|
|
|
12
11
|
* Result of hit-testing to find which page contains a point.
|
|
13
12
|
*/
|
|
14
13
|
type PageHit = {
|
|
15
|
-
/** Index of the page (0-based). */
|
|
16
|
-
|
|
14
|
+
/** Index of the page (0-based). */
|
|
15
|
+
pageIndex: number;
|
|
16
|
+
/** The page that was hit. */
|
|
17
|
+
page: Page;
|
|
18
|
+
/** Y position relative to the page top. */
|
|
17
19
|
pageY: number;
|
|
18
20
|
};
|
|
19
21
|
/**
|
|
20
22
|
* Result of hit-testing to find which fragment contains a point.
|
|
21
23
|
*/
|
|
22
24
|
type FragmentHit = {
|
|
23
|
-
/** The fragment that was hit. */
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
/** The fragment that was hit. */
|
|
26
|
+
fragment: Fragment;
|
|
27
|
+
/** The corresponding flow block. */
|
|
28
|
+
block: FlowBlock;
|
|
29
|
+
/** The corresponding measurement. */
|
|
30
|
+
measure: Measure;
|
|
31
|
+
/** Page index (0-based). */
|
|
32
|
+
pageIndex: number;
|
|
33
|
+
/** Y position relative to the fragment top. */
|
|
34
|
+
localY: number;
|
|
35
|
+
/** X position relative to the fragment left. */
|
|
28
36
|
localX: number;
|
|
29
37
|
};
|
|
30
38
|
/**
|
|
31
39
|
* Result of hit-testing a table to find the cell.
|
|
32
40
|
*/
|
|
33
41
|
type TableCellHit = {
|
|
34
|
-
/** The table fragment. */
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
42
|
+
/** The table fragment. */
|
|
43
|
+
fragment: TableFragment;
|
|
44
|
+
/** The table block. */
|
|
45
|
+
block: TableBlock;
|
|
46
|
+
/** The table measure. */
|
|
47
|
+
measure: TableMeasure;
|
|
48
|
+
/** Page index (0-based). */
|
|
49
|
+
pageIndex: number;
|
|
50
|
+
/** Row index (0-based). */
|
|
51
|
+
rowIndex: number;
|
|
52
|
+
/** Column index (0-based). */
|
|
53
|
+
colIndex: number;
|
|
54
|
+
/** Paragraph block within the cell (first one). */
|
|
55
|
+
cellBlock?: ParagraphBlock;
|
|
56
|
+
/** Paragraph measure within the cell. */
|
|
57
|
+
cellMeasure?: ParagraphMeasure;
|
|
58
|
+
/** X position relative to cell content area. */
|
|
59
|
+
cellLocalX: number;
|
|
60
|
+
/** Y position relative to cell content area. */
|
|
43
61
|
cellLocalY: number;
|
|
44
62
|
};
|
|
45
63
|
/**
|
|
@@ -93,8 +111,11 @@ declare function hitTestTableCell(pageHit: PageHit, blocks: FlowBlock[], measure
|
|
|
93
111
|
* Combined result of all hit testing.
|
|
94
112
|
*/
|
|
95
113
|
type HitTestResult = {
|
|
96
|
-
/** Page that was hit. */
|
|
97
|
-
|
|
114
|
+
/** Page that was hit. */
|
|
115
|
+
pageHit: PageHit | null;
|
|
116
|
+
/** Fragment that was hit (if any). */
|
|
117
|
+
fragmentHit: FragmentHit | null;
|
|
118
|
+
/** Table cell that was hit (if fragment is a table). */
|
|
98
119
|
tableCellHit: TableCellHit | null;
|
|
99
120
|
};
|
|
100
121
|
/**
|
|
@@ -1,23 +1,31 @@
|
|
|
1
1
|
import { FlowBlock, Layout, Measure } from "../../layout-engine/types.js";
|
|
2
|
-
|
|
3
2
|
//#region src/layout-bridge/engine/selectionRects.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* A rectangle representing part of a selection.
|
|
6
5
|
*/
|
|
7
6
|
type SelectionRect = {
|
|
8
|
-
/** X coordinate in container space. */
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
/** X coordinate in container space. */
|
|
8
|
+
x: number;
|
|
9
|
+
/** Y coordinate in container space. */
|
|
10
|
+
y: number;
|
|
11
|
+
/** Width of the rectangle. */
|
|
12
|
+
width: number;
|
|
13
|
+
/** Height of the rectangle (typically line height). */
|
|
14
|
+
height: number;
|
|
15
|
+
/** Page index (0-based). */
|
|
12
16
|
pageIndex: number;
|
|
13
17
|
};
|
|
14
18
|
/**
|
|
15
19
|
* Caret position for collapsed selection.
|
|
16
20
|
*/
|
|
17
21
|
type CaretPosition = {
|
|
18
|
-
/** X coordinate in container space. */
|
|
19
|
-
|
|
20
|
-
|
|
22
|
+
/** X coordinate in container space. */
|
|
23
|
+
x: number;
|
|
24
|
+
/** Y coordinate in container space. */
|
|
25
|
+
y: number;
|
|
26
|
+
/** Height of the caret (line height). */
|
|
27
|
+
height: number;
|
|
28
|
+
/** Page index (0-based). */
|
|
21
29
|
pageIndex: number;
|
|
22
30
|
};
|
|
23
31
|
/**
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { document_d_exports } from "../../types/document.js";
|
|
2
|
-
|
|
3
2
|
//#region src/layout-bridge/engine/tableWidthUtils.d.ts
|
|
4
3
|
declare function resolveTableWidthPx(width: number | undefined, widthType: document_d_exports.TableWidthType | undefined, containerWidth: number): number | undefined;
|
|
5
4
|
declare function normalizeTableColumnWidths(widths: number[], columnCount: number, targetWidth: number): number[];
|
|
@@ -17,17 +17,21 @@
|
|
|
17
17
|
declare const TABLE_INSERT_EDGE_PROXIMITY = 30;
|
|
18
18
|
declare const TABLE_INSERT_HIDE_DELAY_MS = 200;
|
|
19
19
|
type TableInsertHoverHit = {
|
|
20
|
-
type: "row" | "column";
|
|
20
|
+
type: "row" | "column";
|
|
21
|
+
/** Client-coordinate anchor for the button. Caller converts to its UI frame. */
|
|
21
22
|
clientX: number;
|
|
22
|
-
clientY: number;
|
|
23
|
+
clientY: number;
|
|
24
|
+
/** PM position of the cell the button targets. */
|
|
23
25
|
cellPmPos: number;
|
|
24
26
|
};
|
|
25
27
|
type TableInsertHoverInput = {
|
|
26
28
|
mouseX: number;
|
|
27
29
|
mouseY: number;
|
|
28
|
-
pagesContainer: HTMLElement;
|
|
30
|
+
pagesContainer: HTMLElement;
|
|
31
|
+
/** Element under the cursor at the time of the event (e.target). */
|
|
29
32
|
target: HTMLElement;
|
|
30
|
-
hfEditMode: "header" | "footer" | null;
|
|
33
|
+
hfEditMode: "header" | "footer" | null;
|
|
34
|
+
/** Override edge proximity in pixels (defaults to TABLE_INSERT_EDGE_PROXIMITY). */
|
|
31
35
|
edgeProximity?: number;
|
|
32
36
|
};
|
|
33
37
|
/**
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { document_d_exports } from "../types/document.js";
|
|
2
2
|
import { PageHeaderFooterRefs } from "./types.js";
|
|
3
|
-
|
|
4
3
|
//#region src/layout-engine/headerFooterRefs.d.ts
|
|
5
4
|
declare const resolveSectionHeaderFooterRefs: (documentModel: document_d_exports.Document | null | undefined) => PageHeaderFooterRefs[] | undefined;
|
|
6
5
|
//#endregion
|
|
@@ -4,7 +4,6 @@ import { KeepNextChain, calculateChainHeight, computeKeepNextChains, getMidChain
|
|
|
4
4
|
import { resolveSectionHeaderFooterRefs } from "./headerFooterRefs.js";
|
|
5
5
|
import { BreakDecision, SectionState, applyPendingToActive, createInitialSectionState, getEffectiveColumns, getEffectiveMargins, getEffectivePageSize, scheduleSectionBreak } from "./section-breaks.js";
|
|
6
6
|
import { assertExhaustiveFlowBlock, findPageIndexContainingPmPos } from "./pmPageIndex.js";
|
|
7
|
-
|
|
8
7
|
//#region src/layout-engine/index.d.ts
|
|
9
8
|
type SectionLayoutConfig = {
|
|
10
9
|
pageSize: {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ParagraphAttrs } from "./types.js";
|
|
2
|
-
|
|
3
2
|
//#region src/layout-engine/justificationCompatibility.d.ts
|
|
4
3
|
declare function resolveJustificationCompatibility(compatibilityMode: number | undefined): NonNullable<ParagraphAttrs["justificationCompatibility"]> | undefined;
|
|
5
4
|
//#endregion
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { FlowBlock, Measure } from "./types.js";
|
|
2
|
-
|
|
3
2
|
//#region src/layout-engine/keep-together.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* A chain of paragraphs that Word keeps with following content. This includes
|
|
@@ -7,9 +6,13 @@ import { FlowBlock, Measure } from "./types.js";
|
|
|
7
6
|
* be stranded at the bottom of a page.
|
|
8
7
|
*/
|
|
9
8
|
type KeepNextChain = {
|
|
10
|
-
/** Index of the first paragraph in the chain. */
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
/** Index of the first paragraph in the chain. */
|
|
10
|
+
startIndex: number;
|
|
11
|
+
/** Index of the last keepNext or pass-through empty member. */
|
|
12
|
+
endIndex: number;
|
|
13
|
+
/** All keepNext and pass-through empty paragraph indices in the chain. */
|
|
14
|
+
memberIndices: number[];
|
|
15
|
+
/** Index of the anchor paragraph (first non-keepNext after chain), or -1 if none. */
|
|
13
16
|
anchorIndex: number;
|
|
14
17
|
};
|
|
15
18
|
/**
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { FlowBlock } from "./types.js";
|
|
2
|
-
|
|
3
2
|
//#region src/layout-engine/layoutInstrumentation.d.ts
|
|
4
3
|
type LayoutRunReason = "font-ready" | "initial" | "layout-input" | "manual" | "transaction";
|
|
5
4
|
type LayoutPhase = "flow-blocks" | "header-footer" | "initial-fonts" | "layout-document" | "measure-blocks" | "render-pages";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { MeasuredLine } from "./types.js";
|
|
2
|
-
|
|
3
2
|
//#region src/layout-engine/lineFlow.d.ts
|
|
4
3
|
declare function measuredLineAdvance(line: MeasuredLine): number;
|
|
5
4
|
declare function measuredLineRangeHeight(lines: readonly MeasuredLine[], fromLine: number, toLine: number): number;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ParagraphAttrs, TextRun } from "../types.js";
|
|
2
2
|
import { LineBreakPolicy } from "./lineBreakProvider.js";
|
|
3
|
-
|
|
4
3
|
//#region src/layout-engine/measure/effectiveLineBreakPolicy.d.ts
|
|
5
4
|
type EffectiveAutomaticHyphenation = Readonly<{
|
|
6
5
|
type: "disabled";
|
|
@@ -10,8 +9,11 @@ type EffectiveAutomaticHyphenation = Readonly<{
|
|
|
10
9
|
hyphenationZoneTwips: number;
|
|
11
10
|
}>;
|
|
12
11
|
type EffectiveLineBreakPolicy = Readonly<{
|
|
13
|
-
/** Exact provider inputs; omitted OOXML values stay omitted for custom providers. */
|
|
14
|
-
|
|
12
|
+
/** Exact provider inputs; omitted OOXML values stay omitted for custom providers. */
|
|
13
|
+
provider: Readonly<LineBreakPolicy>;
|
|
14
|
+
/** `w:overflowPunct` defaults to enabled when omitted. */
|
|
15
|
+
hangingPunctuation: boolean;
|
|
16
|
+
/** Effective document and paragraph automatic-hyphenation state. */
|
|
15
17
|
automaticHyphenation: EffectiveAutomaticHyphenation;
|
|
16
18
|
}>;
|
|
17
19
|
type ResolveEffectiveLineBreakPolicyOptions = {
|
|
@@ -19,10 +21,7 @@ type ResolveEffectiveLineBreakPolicyOptions = {
|
|
|
19
21
|
run: TextRun;
|
|
20
22
|
};
|
|
21
23
|
/** Resolve all authored line-breaking inputs used while measuring one text run. */
|
|
22
|
-
declare const resolveEffectiveLineBreakPolicy: ({
|
|
23
|
-
attrs,
|
|
24
|
-
run
|
|
25
|
-
}: ResolveEffectiveLineBreakPolicyOptions) => EffectiveLineBreakPolicy;
|
|
24
|
+
declare const resolveEffectiveLineBreakPolicy: ({ attrs, run }: ResolveEffectiveLineBreakPolicyOptions) => EffectiveLineBreakPolicy;
|
|
26
25
|
/** Cache fragments for every paragraph attribute consumed by the resolver. */
|
|
27
26
|
declare const lineBreakPolicyCacheParts: (attrs: ParagraphAttrs) => readonly string[];
|
|
28
27
|
//#endregion
|
|
@@ -16,8 +16,11 @@ type WrapTextDirection = "bothSides" | "left" | "right" | "largest";
|
|
|
16
16
|
* `rectsToFloatingZones` to derive per-line wrap margins.
|
|
17
17
|
*/
|
|
18
18
|
type FloatingExclusionRect = {
|
|
19
|
-
/** Which side the object is on for simple one-sided wrapping. */
|
|
20
|
-
|
|
19
|
+
/** Which side the object is on for simple one-sided wrapping. */
|
|
20
|
+
side: "left" | "right";
|
|
21
|
+
/** X position relative to the content area. */
|
|
22
|
+
x: number;
|
|
23
|
+
/** Y position relative to the content area. */
|
|
21
24
|
y: number;
|
|
22
25
|
width: number;
|
|
23
26
|
height: number;
|
|
@@ -34,10 +37,15 @@ type FloatingExclusionRect = {
|
|
|
34
37
|
* correct widths.
|
|
35
38
|
*/
|
|
36
39
|
type FloatingImageZone = {
|
|
37
|
-
/** Left margin reduction (pixels from left edge). */
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
40
|
+
/** Left margin reduction (pixels from left edge). */
|
|
41
|
+
leftMargin: number;
|
|
42
|
+
/** Right margin reduction (pixels from right edge). */
|
|
43
|
+
rightMargin: number;
|
|
44
|
+
/** Top Y coordinate of the exclusion zone. */
|
|
45
|
+
topY: number;
|
|
46
|
+
/** Bottom Y coordinate of the exclusion zone. */
|
|
47
|
+
bottomY: number;
|
|
48
|
+
/** Optional split segments for centered both-sides wrapping. */
|
|
41
49
|
segments?: FloatingLineSegmentZone[];
|
|
42
50
|
/**
|
|
43
51
|
* Full-width vertical band (OOXML `topAndBottom` wrap): no text fits beside
|
|
@@ -8,18 +8,29 @@
|
|
|
8
8
|
* OOXML line-edge restrictions that are available in the flow model.
|
|
9
9
|
*/
|
|
10
10
|
type LineBreakPolicy = {
|
|
11
|
-
/** BCP-47 language tag resolved from `w:lang` for this run. */
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
/** BCP-47 language tag resolved from `w:lang` for this run. */
|
|
12
|
+
locale?: string;
|
|
13
|
+
/** Apply East Asian first/last-character restrictions (`w:kinsoku`). */
|
|
14
|
+
kinsoku?: boolean;
|
|
15
|
+
/** Document replacement list: characters that may not begin a line. */
|
|
16
|
+
noLineBreaksBefore?: ReadonlySet<string>;
|
|
17
|
+
/** Document replacement list: characters that may not end a line. */
|
|
18
|
+
noLineBreaksAfter?: ReadonlySet<string>;
|
|
19
|
+
/** Use the legacy Ethiopic/Amharic compatibility behavior. */
|
|
20
|
+
useLegacyEthiopicAmharicRules?: boolean;
|
|
21
|
+
/** Keep words made entirely of capital letters unhyphenated. */
|
|
22
|
+
doNotHyphenateCaps?: boolean;
|
|
23
|
+
/** The run renders with the DOCX all-caps transform. */
|
|
17
24
|
renderedAllCaps?: boolean;
|
|
18
25
|
};
|
|
19
26
|
type LineBreakProvider = {
|
|
20
|
-
/** Legal soft-wrap offsets, in ascending UTF-16 order. */
|
|
21
|
-
|
|
22
|
-
|
|
27
|
+
/** Legal soft-wrap offsets, in ascending UTF-16 order. */
|
|
28
|
+
findBreaks: (text: string, policy?: LineBreakPolicy) => number[];
|
|
29
|
+
/** Grapheme-safe emergency-wrap offsets, in ascending UTF-16 order. */
|
|
30
|
+
findGraphemeBreaks: (text: string, policy?: LineBreakPolicy) => number[];
|
|
31
|
+
/** Dictionary-based discretionary hyphen offsets, in ascending UTF-16 order. */
|
|
32
|
+
findHyphenationBreaks?: (text: string, policy?: LineBreakPolicy) => number[];
|
|
33
|
+
/** Whether a trailing grapheme may overhang the line edge. */
|
|
23
34
|
isHangingPunctuation?: (text: string, policy?: LineBreakPolicy) => boolean;
|
|
24
35
|
};
|
|
25
36
|
declare const MAX_HYPHENATION_WORD_LENGTH = 256;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { FlowBlock, Measure, TableBlock, TableMeasure, TextBoxBlock, TextBoxMeasure } from "../types.js";
|
|
2
2
|
import { FloatingImageZone } from "./floatingZones.js";
|
|
3
|
+
import "./measureParagraph.js";
|
|
3
4
|
//#region src/layout-engine/measure/measureBlocks.d.ts
|
|
4
5
|
declare function measureTableBlock(tableBlock: TableBlock, contentWidth: number, fieldValues?: ReadonlyMap<number, string>): TableMeasure;
|
|
5
6
|
type BandPageGeometry = {
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { ParagraphBlock, ParagraphMeasure, TextRun } from "../types.js";
|
|
2
2
|
import { FloatingImageZone } from "./floatingZones.js";
|
|
3
3
|
import { clampFloatingWrapMargins } from "./clampFloatingWrapMargins.js";
|
|
4
|
-
|
|
5
4
|
//#region src/layout-engine/measure/measureParagraph.d.ts
|
|
6
5
|
/**
|
|
7
6
|
* Options for paragraph measurement
|
|
8
7
|
*/
|
|
9
8
|
type MeasureParagraphOptions = {
|
|
10
|
-
/** Floating image exclusion zones that affect line widths */
|
|
9
|
+
/** Floating image exclusion zones that affect line widths */
|
|
10
|
+
floatingZones?: FloatingImageZone[];
|
|
11
|
+
/** Y offset of this paragraph relative to the exclusion zones (default: 0) */
|
|
11
12
|
paragraphYOffset?: number;
|
|
12
13
|
/** Field run `pmStart` -> resolved display text, so a field measures at its
|
|
13
14
|
* painted width instead of the cached fallback. */
|