@stll/folio-core 0.15.0 → 0.15.2
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/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/commentParser.js +30 -2
- 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/drawingIdNormalization.d.ts +5 -0
- package/dist/docx/drawingIdNormalization.js +35 -0
- package/dist/docx/drawingUtils.d.ts +24 -3
- package/dist/docx/drawingUtils.js +134 -28
- 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 +4 -3
- package/dist/docx/headerFooterVerbatim.js +6 -1
- 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 +31 -15
- package/dist/docx/paragraphTextBoxEnrichment.d.ts +0 -1
- package/dist/docx/paragraphTextBoxEnrichment.js +2 -1
- package/dist/docx/paragraphTraversal.d.ts +5 -10
- package/dist/docx/paragraphTraversal.js +20 -13
- package/dist/docx/parser.d.ts +15 -8
- package/dist/docx/parser.js +22 -1
- package/dist/docx/parserEnums.d.ts +5 -2
- package/dist/docx/parserEnums.js +6 -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/runConsolidator.js +0 -1
- package/dist/docx/runParser.d.ts +0 -1
- package/dist/docx/runParser.js +25 -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 +19 -40
- 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 +53 -32
- package/dist/docx/serializer/sectionPropertiesSerializer.d.ts +0 -1
- package/dist/docx/serializer/sectionPropertiesSerializer.js +7 -5
- 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 +16 -123
- 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 +11 -12
- package/dist/docx/textBoxParser.d.ts +1 -2
- package/dist/docx/textBoxParser.js +5 -2
- 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 +1 -0
- 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/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 +6 -4
- package/dist/prosemirror/attrs/index.js +22 -2
- 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 +17 -10
- 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 +17 -3
- 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/TabExtension.js +32 -9
- 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 +2 -3
- package/dist/prosemirror/schema/marks.d.ts +8 -5
- package/dist/prosemirror/schema/nodes.d.ts +344 -164
- 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/prosemirror/validation.js +5 -3
- 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/content.d.ts +2 -2
- package/dist/types/document.d.ts +0 -3
- package/dist/types/documentEnumValues.d.ts +5 -1
- package/dist/types/documentEnumValues.js +19 -1
- package/dist/types/index.d.ts +2 -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 +0 -1
- 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
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { document_d_exports } from "../types/document.js";
|
|
2
2
|
import { DocxInput } from "../utils/docxInput.js";
|
|
3
3
|
import { DocxCompatibility } from "../docx/compatibility.js";
|
|
4
|
-
|
|
5
4
|
//#region src/managers/DocumentLoaderManager.d.ts
|
|
6
5
|
type DocumentLoadState = {
|
|
7
6
|
status: "loading";
|
|
@@ -16,14 +15,21 @@ type DocumentLoadState = {
|
|
|
16
15
|
* here so core does not depend on the React `useHistory` return type.
|
|
17
16
|
*/
|
|
18
17
|
type DocumentLoaderHistory = {
|
|
19
|
-
/** The current document, or null before any load. */
|
|
18
|
+
/** The current document, or null before any load. */
|
|
19
|
+
readonly state: document_d_exports.Document | null;
|
|
20
|
+
/** Reset history to a freshly loaded document. */
|
|
20
21
|
reset: (document: document_d_exports.Document) => void;
|
|
21
22
|
};
|
|
22
23
|
type DocumentLoaderCallbacks = {
|
|
23
|
-
/** Editor history to reset/seed with the loaded document. */
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
/** Editor history to reset/seed with the loaded document. */
|
|
25
|
+
history: DocumentLoaderHistory;
|
|
26
|
+
/** Called when an unrecoverable parse error occurs. */
|
|
27
|
+
onError: ((error: Error) => void) | undefined;
|
|
28
|
+
/** Called after parsing to report whether editing can preserve fidelity. */
|
|
29
|
+
onCompatibilityChange: ((compatibility: DocxCompatibility) => void) | undefined;
|
|
30
|
+
/** Clears UI state coupled to the previous document at the start of a load. */
|
|
31
|
+
onReset: () => void;
|
|
32
|
+
/** Sets the document loading slice of editor state. */
|
|
27
33
|
setDocumentLoadState: (state: DocumentLoadState) => void;
|
|
28
34
|
};
|
|
29
35
|
declare class DocumentLoaderManager {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Subscribable } from "./Subscribable.js";
|
|
2
|
-
|
|
3
2
|
//#region src/managers/EditorModeManager.d.ts
|
|
4
3
|
/** Editor mode. Mirrors Google Docs editing/suggesting/viewing semantics. */
|
|
5
4
|
type EditorMode = "editing" | "suggesting" | "viewing";
|
|
@@ -8,7 +7,9 @@ declare const DISPLAY_MODES: readonly ["all-markup", "simple-markup", "no-markup
|
|
|
8
7
|
type DisplayMode = (typeof DISPLAY_MODES)[number];
|
|
9
8
|
/** EditorModeManager snapshot. */
|
|
10
9
|
type EditorModeSnapshot = {
|
|
11
|
-
/** Uncontrolled internal editing mode (the host's controlled prop wins over this). */
|
|
10
|
+
/** Uncontrolled internal editing mode (the host's controlled prop wins over this). */
|
|
11
|
+
editingMode: EditorMode;
|
|
12
|
+
/** Tracked-changes display mode (`all-markup` by default). */
|
|
12
13
|
displayMode: DisplayMode;
|
|
13
14
|
};
|
|
14
15
|
/** True when the host opts into read-only OR the mode is `"viewing"`. */
|
|
@@ -1,23 +1,33 @@
|
|
|
1
1
|
import { Subscribable } from "./Subscribable.js";
|
|
2
|
-
|
|
3
2
|
//#region src/managers/HistoryManager.d.ts
|
|
4
3
|
/** History entry containing state and metadata. */
|
|
5
4
|
type HistoryEntry<T> = {
|
|
6
|
-
/** The state at this point. */
|
|
7
|
-
|
|
5
|
+
/** The state at this point. */
|
|
6
|
+
state: T;
|
|
7
|
+
/** Timestamp when this entry was created. */
|
|
8
|
+
timestamp: number;
|
|
9
|
+
/** Optional description of what changed. */
|
|
8
10
|
description?: string;
|
|
9
11
|
};
|
|
10
12
|
/** Reactive snapshot adapters render from. */
|
|
11
13
|
type HistorySnapshot<T> = {
|
|
12
|
-
/** Current state. */
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
/** Current state. */
|
|
15
|
+
state: T;
|
|
16
|
+
/** Whether undo is available. */
|
|
17
|
+
canUndo: boolean;
|
|
18
|
+
/** Whether redo is available. */
|
|
19
|
+
canRedo: boolean;
|
|
20
|
+
/** Number of entries in the undo stack. */
|
|
21
|
+
undoCount: number;
|
|
22
|
+
/** Number of entries in the redo stack. */
|
|
16
23
|
redoCount: number;
|
|
17
24
|
};
|
|
18
25
|
type HistoryManagerOptions<T> = {
|
|
19
|
-
/** Maximum number of entries in the undo stack (default: 100). */
|
|
20
|
-
|
|
26
|
+
/** Maximum number of entries in the undo stack (default: 100). */
|
|
27
|
+
maxEntries?: number;
|
|
28
|
+
/** Time in ms within which rapid pushes are grouped (default: 500). */
|
|
29
|
+
groupingInterval?: number;
|
|
30
|
+
/** Custom comparison used to skip no-op pushes (default: JSON compare). */
|
|
21
31
|
isEqual?: (a: T, b: T) => boolean;
|
|
22
32
|
};
|
|
23
33
|
/** Default equality check using JSON stringify. */
|
|
@@ -2,7 +2,6 @@ import { document_d_exports } from "../types/document.js";
|
|
|
2
2
|
import { Subscribable } from "./Subscribable.js";
|
|
3
3
|
import { CellCoordinates } from "./types.js";
|
|
4
4
|
import { TableAction, TableContext } from "../utils/tableOperations.js";
|
|
5
|
-
|
|
6
5
|
//#region src/managers/TableSelectionManager.d.ts
|
|
7
6
|
/** Data attributes for table elements in the rendered DOM */
|
|
8
7
|
declare const TABLE_DATA_ATTRIBUTES: {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { EditorState, Transaction } from "prosemirror-state";
|
|
2
|
-
|
|
3
2
|
//#region src/managers/editorShortcuts.d.ts
|
|
4
3
|
declare function isMacPlatform(): boolean;
|
|
5
4
|
/**
|
|
@@ -19,7 +18,9 @@ type EditorKeydownIntent = {
|
|
|
19
18
|
type: "none";
|
|
20
19
|
};
|
|
21
20
|
type ClassifyEditorKeydownOptions = {
|
|
22
|
-
/** Whether the platform uses Cmd (Mac) rather than Ctrl as the primary modifier. */
|
|
21
|
+
/** Whether the platform uses Cmd (Mac) rather than Ctrl as the primary modifier. */
|
|
22
|
+
isMac: boolean;
|
|
23
|
+
/** Whether focus is in a non-editor input/textarea/contenteditable. */
|
|
23
24
|
isInputLike: boolean;
|
|
24
25
|
};
|
|
25
26
|
/**
|
|
@@ -28,10 +29,7 @@ type ClassifyEditorKeydownOptions = {
|
|
|
28
29
|
* - Cmd/Ctrl+P (no auto-repeat) → custom print
|
|
29
30
|
* - Delete/Backspace (no modifiers, focus not in an input) → delete selected table
|
|
30
31
|
*/
|
|
31
|
-
declare function classifyEditorKeydown(e: KeyboardEvent, {
|
|
32
|
-
isMac,
|
|
33
|
-
isInputLike
|
|
34
|
-
}: ClassifyEditorKeydownOptions): EditorKeydownIntent;
|
|
32
|
+
declare function classifyEditorKeydown(e: KeyboardEvent, { isMac, isInputLike }: ClassifyEditorKeydownOptions): EditorKeydownIntent;
|
|
35
33
|
/**
|
|
36
34
|
* If the selection is a ProseMirror `CellSelection` covering every cell of its
|
|
37
35
|
* table, delete the table and return `true`. Returns `false` for any other
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { document_d_exports } from "../types/document.js";
|
|
2
2
|
import { RenderContext } from "./types.js";
|
|
3
|
-
|
|
4
3
|
//#region src/markdown/annotations.d.ts
|
|
5
4
|
declare function wrapInsertion(ctx: RenderContext, info: document_d_exports.TrackedChangeInfo, inner: string): string;
|
|
6
5
|
declare function wrapDeletion(ctx: RenderContext, info: document_d_exports.TrackedChangeInfo, inner: string): string;
|
package/dist/markdown/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { document_d_exports } from "../types/document.js";
|
|
2
2
|
import { ImageMeta, ImageRef, MarkdownOptions, MarkdownResult } from "./types.js";
|
|
3
3
|
import { fromMarkdown } from "./fromMarkdown.js";
|
|
4
|
-
|
|
5
4
|
//#region src/markdown/index.d.ts
|
|
6
5
|
/**
|
|
7
6
|
* Convert a parsed `Document` to a markdown string. Synchronous; pre-parse the
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { document_d_exports } from "../types/document.js";
|
|
2
2
|
import { RenderContext } from "./types.js";
|
|
3
|
-
|
|
4
3
|
//#region src/markdown/renderBlock.d.ts
|
|
5
4
|
declare function renderBlocks(ctx: RenderContext, pkg: document_d_exports.DocxPackage | undefined, blocks: document_d_exports.BlockContent[]): string;
|
|
6
5
|
//#endregion
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { document_d_exports } from "../types/document.js";
|
|
2
2
|
import { RenderContext } from "./types.js";
|
|
3
|
-
|
|
4
3
|
//#region src/markdown/renderTable.d.ts
|
|
5
4
|
/** Render a `Table` as markdown. Picks GFM vs HTML based on cell features. */
|
|
6
5
|
declare function renderTable(ctx: RenderContext, pkg: document_d_exports.DocxPackage | undefined, table: document_d_exports.Table): string;
|
package/dist/markdown/types.d.ts
CHANGED
|
@@ -12,17 +12,26 @@
|
|
|
12
12
|
* types.
|
|
13
13
|
*/
|
|
14
14
|
type ImageMeta = {
|
|
15
|
-
/** `paraId` of the containing paragraph, when the source paragraph has one. */
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
/** `paraId` of the containing paragraph, when the source paragraph has one. */
|
|
16
|
+
paraId?: string | undefined;
|
|
17
|
+
/** 1-based ordinal in registration order. Unique per render call. */
|
|
18
|
+
index: number;
|
|
19
|
+
/** Path inside the DOCX zip (e.g. `word/media/image1.png`). */
|
|
20
|
+
originalPath: string;
|
|
21
|
+
/** MIME type (`image/png`, `image/jpeg`, …). */
|
|
22
|
+
mimeType: string;
|
|
23
|
+
/** Alt text from the drawing, when present. */
|
|
19
24
|
alt?: string | undefined;
|
|
20
25
|
};
|
|
21
26
|
/** Full registration record for an image, keyed by `virtualPath`. */
|
|
22
27
|
type ImageRef = {
|
|
23
|
-
/** Raw bytes as exposed by the DOCX parser. */
|
|
24
|
-
|
|
25
|
-
|
|
28
|
+
/** Raw bytes as exposed by the DOCX parser. */
|
|
29
|
+
data: Uint8Array;
|
|
30
|
+
/** Base64-encoded contents, without the `data:` prefix. */
|
|
31
|
+
base64: string;
|
|
32
|
+
/** `data:<mime>;base64,<base64>` URL. */
|
|
33
|
+
dataUrl: string;
|
|
34
|
+
/** The path that appears inside the markdown's `` reference. */
|
|
26
35
|
virtualPath: string;
|
|
27
36
|
} & ImageMeta;
|
|
28
37
|
/**
|
|
@@ -74,8 +83,11 @@ type MarkdownOptions = {
|
|
|
74
83
|
};
|
|
75
84
|
/** Result of a render, when the caller needs images/warnings as well as text. */
|
|
76
85
|
type MarkdownResult = {
|
|
77
|
-
/** The full rendered markdown string. */
|
|
78
|
-
|
|
86
|
+
/** The full rendered markdown string. */
|
|
87
|
+
markdown: string;
|
|
88
|
+
/** Every image referenced in `markdown`, keyed by its virtual path. */
|
|
89
|
+
images: Map<string, ImageRef>;
|
|
90
|
+
/** Non-fatal diagnostics; recurring messages are deduped. */
|
|
79
91
|
warnings: string[];
|
|
80
92
|
};
|
|
81
93
|
/** Resolved option values with defaults applied. Used internally. */
|
|
@@ -93,25 +105,34 @@ type ResolvedOptions = {
|
|
|
93
105
|
* reference lists. Exported only so the split renderer files share the shape.
|
|
94
106
|
*/
|
|
95
107
|
type RenderContext = {
|
|
96
|
-
opts: ResolvedOptions;
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
108
|
+
opts: ResolvedOptions;
|
|
109
|
+
/** Accumulated images keyed by virtual path. */
|
|
110
|
+
images: Map<string, ImageRef>;
|
|
111
|
+
/** Same images keyed by source `MediaFile.path` for dedupe on re-reference. */
|
|
112
|
+
imagesByPath: Map<string, ImageRef>;
|
|
113
|
+
/** Diagnostics accumulator. */
|
|
114
|
+
warnings: string[];
|
|
115
|
+
/** Footnote/endnote refs collected during this render, in document order. */
|
|
100
116
|
footnoteRefs: {
|
|
101
117
|
refId: number;
|
|
102
118
|
markerNumber: number;
|
|
103
119
|
kind: "footnote" | "endnote";
|
|
104
|
-
}[];
|
|
120
|
+
}[];
|
|
121
|
+
/** Comment refs collected during this render (sidecar mode only). */
|
|
105
122
|
commentRefs: {
|
|
106
123
|
commentId: number;
|
|
107
124
|
markerNumber: number;
|
|
108
|
-
}[];
|
|
125
|
+
}[];
|
|
126
|
+
/** Hyperlink refs collected during this render (reference mode only). */
|
|
109
127
|
hyperlinkRefs: {
|
|
110
128
|
href: string;
|
|
111
129
|
refNumber: number;
|
|
112
|
-
}[];
|
|
113
|
-
|
|
114
|
-
|
|
130
|
+
}[];
|
|
131
|
+
/** 1-based counter for default virtual paths. */
|
|
132
|
+
imageCounter: number;
|
|
133
|
+
/** Live list counters per numId, for resolving `%N` marker templates. */
|
|
134
|
+
listCounters: Map<number, number[]>;
|
|
135
|
+
/** `numId:level` pairs already seen, so a start override applies once. */
|
|
115
136
|
listSeenLevels: Set<string>;
|
|
116
137
|
};
|
|
117
138
|
//#endregion
|
package/dist/model.d.ts
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { document_d_exports } from "./types/document.js";
|
|
2
2
|
import { DeriveBlockIdInput, FolioBlockId, deriveBlockId, getFolioParaIdFromBlockId, getSequentialFolioBlockIdIndex, isFolioBlockId, isSequentialFolioBlockId } from "./types/block-id.js";
|
|
3
|
-
import { BORDER_STYLE_VALUES, CONDITIONAL_STYLE_TYPE_VALUES, EMPHASIS_MARK_VALUES, FIELD_TYPE_VALUES, FLOATING_TABLE_X_SPEC_VALUES, FLOATING_TABLE_Y_SPEC_VALUES, FONT_THEME_VALUES, FRAME_WRAP_VALUES, FRAME_X_ALIGN_VALUES, FRAME_Y_ALIGN_VALUES, HIGHLIGHT_COLOR_VALUES, IMAGE_HORIZONTAL_ALIGNMENT_VALUES, IMAGE_HORIZONTAL_RELATIVE_TO_VALUES, IMAGE_VERTICAL_ALIGNMENT_VALUES, IMAGE_VERTICAL_RELATIVE_TO_VALUES, IMAGE_WRAP_TEXT_VALUES, IMAGE_WRAP_TYPE_VALUES, LEVEL_SUFFIX_VALUES, LINE_SPACING_RULE_VALUES, NUMBER_FORMAT_VALUES, OUTLINE_STYLE_ATTR_VALUES, OUTLINE_STYLE_CSS_ALIASES, OUTLINE_STYLE_CSS_ALIAS_VALUES, OutlineStyleAttr, OutlineStyleCssAlias, PARAGRAPH_ALIGNMENT_VALUES, SDT_LOCK_VALUES, SDT_TYPE_VALUES, SHADING_PATTERN_VALUES, SHAPE_OUTLINE_STYLE_VALUES, SHAPE_TYPE_VALUES, STYLE_TYPE_VALUES, TABLE_CELL_TEXT_DIRECTION_VALUES, TABLE_CELL_VERTICAL_ALIGNMENT_VALUES, TABLE_JUSTIFICATION_VALUES, TABLE_ROW_HEIGHT_RULE_VALUES, TABLE_WIDTH_TYPE_VALUES, TAB_LEADER_VALUES, TAB_STOP_ALIGNMENT_VALUES, TEXT_EFFECT_VALUES, THEME_COLOR_SLOT_VALUES, UNDERLINE_STYLE_VALUES } from "./types/documentEnumValues.js";
|
|
3
|
+
import { BORDER_STYLE_VALUES, CONDITIONAL_STYLE_TYPE_VALUES, EMPHASIS_MARK_VALUES, FIELD_TYPE_VALUES, FLOATING_TABLE_X_SPEC_VALUES, FLOATING_TABLE_Y_SPEC_VALUES, FONT_HINT_VALUES, FONT_THEME_VALUES, FRAME_WRAP_VALUES, FRAME_X_ALIGN_VALUES, FRAME_Y_ALIGN_VALUES, HIGHLIGHT_COLOR_VALUES, IMAGE_HORIZONTAL_ALIGNMENT_VALUES, IMAGE_HORIZONTAL_RELATIVE_TO_VALUES, IMAGE_VERTICAL_ALIGNMENT_VALUES, IMAGE_VERTICAL_RELATIVE_TO_VALUES, IMAGE_WRAP_TEXT_VALUES, IMAGE_WRAP_TYPE_VALUES, LEVEL_SUFFIX_VALUES, LINE_SPACING_RULE_VALUES, NUMBER_FORMAT_VALUES, OUTLINE_STYLE_ATTR_VALUES, OUTLINE_STYLE_CSS_ALIASES, OUTLINE_STYLE_CSS_ALIAS_VALUES, OutlineStyleAttr, OutlineStyleCssAlias, PARAGRAPH_ALIGNMENT_VALUES, POSITIONAL_TAB_ALIGNMENT_VALUES, POSITIONAL_TAB_LEADER_VALUES, POSITIONAL_TAB_RELATIVE_TO_VALUES, SDT_LOCK_VALUES, SDT_TYPE_VALUES, SHADING_PATTERN_VALUES, SHAPE_OUTLINE_STYLE_VALUES, SHAPE_TYPE_VALUES, STYLE_TYPE_VALUES, TABLE_CELL_TEXT_DIRECTION_VALUES, TABLE_CELL_VERTICAL_ALIGNMENT_VALUES, TABLE_JUSTIFICATION_VALUES, TABLE_ROW_HEIGHT_RULE_VALUES, TABLE_WIDTH_TYPE_VALUES, TAB_LEADER_VALUES, TAB_STOP_ALIGNMENT_VALUES, TEXT_EFFECT_VALUES, THEME_COLOR_SLOT_VALUES, UNDERLINE_STYLE_VALUES } from "./types/documentEnumValues.js";
|
|
4
4
|
import { types_d_exports } from "./layout-engine/types.js";
|
|
5
5
|
import { measureTypes_d_exports } from "./layout-engine/measure/measureTypes.js";
|
|
6
6
|
export * from "@stll/docx-core/model";
|
|
7
|
-
|
|
8
|
-
//#region src/model.d.ts
|
|
9
7
|
declare namespace model_d_exports {
|
|
10
|
-
export { BORDER_STYLE_VALUES, CONDITIONAL_STYLE_TYPE_VALUES, DeriveBlockIdInput, EMPHASIS_MARK_VALUES, FIELD_TYPE_VALUES, FLOATING_TABLE_X_SPEC_VALUES, FLOATING_TABLE_Y_SPEC_VALUES, FONT_THEME_VALUES, FRAME_WRAP_VALUES, FRAME_X_ALIGN_VALUES, FRAME_Y_ALIGN_VALUES, FolioBlockId, HIGHLIGHT_COLOR_VALUES, IMAGE_HORIZONTAL_ALIGNMENT_VALUES, IMAGE_HORIZONTAL_RELATIVE_TO_VALUES, IMAGE_VERTICAL_ALIGNMENT_VALUES, IMAGE_VERTICAL_RELATIVE_TO_VALUES, IMAGE_WRAP_TEXT_VALUES, IMAGE_WRAP_TYPE_VALUES, LEVEL_SUFFIX_VALUES, LINE_SPACING_RULE_VALUES, types_d_exports as Layout, measureTypes_d_exports as Measure, NUMBER_FORMAT_VALUES, OUTLINE_STYLE_ATTR_VALUES, OUTLINE_STYLE_CSS_ALIASES, OUTLINE_STYLE_CSS_ALIAS_VALUES, OutlineStyleAttr, OutlineStyleCssAlias, PARAGRAPH_ALIGNMENT_VALUES, SDT_LOCK_VALUES, SDT_TYPE_VALUES, SHADING_PATTERN_VALUES, SHAPE_OUTLINE_STYLE_VALUES, SHAPE_TYPE_VALUES, STYLE_TYPE_VALUES, TABLE_CELL_TEXT_DIRECTION_VALUES, TABLE_CELL_VERTICAL_ALIGNMENT_VALUES, TABLE_JUSTIFICATION_VALUES, TABLE_ROW_HEIGHT_RULE_VALUES, TABLE_WIDTH_TYPE_VALUES, TAB_LEADER_VALUES, TAB_STOP_ALIGNMENT_VALUES, TEXT_EFFECT_VALUES, THEME_COLOR_SLOT_VALUES, UNDERLINE_STYLE_VALUES, deriveBlockId, getFolioParaIdFromBlockId, getSequentialFolioBlockIdIndex, isFolioBlockId, isSequentialFolioBlockId };
|
|
8
|
+
export { BORDER_STYLE_VALUES, CONDITIONAL_STYLE_TYPE_VALUES, DeriveBlockIdInput, EMPHASIS_MARK_VALUES, FIELD_TYPE_VALUES, FLOATING_TABLE_X_SPEC_VALUES, FLOATING_TABLE_Y_SPEC_VALUES, FONT_HINT_VALUES, FONT_THEME_VALUES, FRAME_WRAP_VALUES, FRAME_X_ALIGN_VALUES, FRAME_Y_ALIGN_VALUES, FolioBlockId, HIGHLIGHT_COLOR_VALUES, IMAGE_HORIZONTAL_ALIGNMENT_VALUES, IMAGE_HORIZONTAL_RELATIVE_TO_VALUES, IMAGE_VERTICAL_ALIGNMENT_VALUES, IMAGE_VERTICAL_RELATIVE_TO_VALUES, IMAGE_WRAP_TEXT_VALUES, IMAGE_WRAP_TYPE_VALUES, LEVEL_SUFFIX_VALUES, LINE_SPACING_RULE_VALUES, types_d_exports as Layout, measureTypes_d_exports as Measure, NUMBER_FORMAT_VALUES, OUTLINE_STYLE_ATTR_VALUES, OUTLINE_STYLE_CSS_ALIASES, OUTLINE_STYLE_CSS_ALIAS_VALUES, OutlineStyleAttr, OutlineStyleCssAlias, PARAGRAPH_ALIGNMENT_VALUES, POSITIONAL_TAB_ALIGNMENT_VALUES, POSITIONAL_TAB_LEADER_VALUES, POSITIONAL_TAB_RELATIVE_TO_VALUES, SDT_LOCK_VALUES, SDT_TYPE_VALUES, SHADING_PATTERN_VALUES, SHAPE_OUTLINE_STYLE_VALUES, SHAPE_TYPE_VALUES, STYLE_TYPE_VALUES, TABLE_CELL_TEXT_DIRECTION_VALUES, TABLE_CELL_VERTICAL_ALIGNMENT_VALUES, TABLE_JUSTIFICATION_VALUES, TABLE_ROW_HEIGHT_RULE_VALUES, TABLE_WIDTH_TYPE_VALUES, TAB_LEADER_VALUES, TAB_STOP_ALIGNMENT_VALUES, TEXT_EFFECT_VALUES, THEME_COLOR_SLOT_VALUES, UNDERLINE_STYLE_VALUES, deriveBlockId, getFolioParaIdFromBlockId, getSequentialFolioBlockIdIndex, isFolioBlockId, isSequentialFolioBlockId };
|
|
11
9
|
}
|
|
12
10
|
//#endregion
|
|
13
|
-
export { BORDER_STYLE_VALUES, CONDITIONAL_STYLE_TYPE_VALUES, DeriveBlockIdInput, EMPHASIS_MARK_VALUES, FIELD_TYPE_VALUES, FLOATING_TABLE_X_SPEC_VALUES, FLOATING_TABLE_Y_SPEC_VALUES, FONT_THEME_VALUES, FRAME_WRAP_VALUES, FRAME_X_ALIGN_VALUES, FRAME_Y_ALIGN_VALUES, FolioBlockId, HIGHLIGHT_COLOR_VALUES, IMAGE_HORIZONTAL_ALIGNMENT_VALUES, IMAGE_HORIZONTAL_RELATIVE_TO_VALUES, IMAGE_VERTICAL_ALIGNMENT_VALUES, IMAGE_VERTICAL_RELATIVE_TO_VALUES, IMAGE_WRAP_TEXT_VALUES, IMAGE_WRAP_TYPE_VALUES, LEVEL_SUFFIX_VALUES, LINE_SPACING_RULE_VALUES, types_d_exports as Layout, type measureTypes_d_exports as Measure, NUMBER_FORMAT_VALUES, OUTLINE_STYLE_ATTR_VALUES, OUTLINE_STYLE_CSS_ALIASES, OUTLINE_STYLE_CSS_ALIAS_VALUES, OutlineStyleAttr, OutlineStyleCssAlias, PARAGRAPH_ALIGNMENT_VALUES, SDT_LOCK_VALUES, SDT_TYPE_VALUES, SHADING_PATTERN_VALUES, SHAPE_OUTLINE_STYLE_VALUES, SHAPE_TYPE_VALUES, STYLE_TYPE_VALUES, TABLE_CELL_TEXT_DIRECTION_VALUES, TABLE_CELL_VERTICAL_ALIGNMENT_VALUES, TABLE_JUSTIFICATION_VALUES, TABLE_ROW_HEIGHT_RULE_VALUES, TABLE_WIDTH_TYPE_VALUES, TAB_LEADER_VALUES, TAB_STOP_ALIGNMENT_VALUES, TEXT_EFFECT_VALUES, THEME_COLOR_SLOT_VALUES, UNDERLINE_STYLE_VALUES, deriveBlockId, getFolioParaIdFromBlockId, getSequentialFolioBlockIdIndex, isFolioBlockId, isSequentialFolioBlockId };
|
|
11
|
+
export { BORDER_STYLE_VALUES, CONDITIONAL_STYLE_TYPE_VALUES, DeriveBlockIdInput, EMPHASIS_MARK_VALUES, FIELD_TYPE_VALUES, FLOATING_TABLE_X_SPEC_VALUES, FLOATING_TABLE_Y_SPEC_VALUES, FONT_HINT_VALUES, FONT_THEME_VALUES, FRAME_WRAP_VALUES, FRAME_X_ALIGN_VALUES, FRAME_Y_ALIGN_VALUES, FolioBlockId, HIGHLIGHT_COLOR_VALUES, IMAGE_HORIZONTAL_ALIGNMENT_VALUES, IMAGE_HORIZONTAL_RELATIVE_TO_VALUES, IMAGE_VERTICAL_ALIGNMENT_VALUES, IMAGE_VERTICAL_RELATIVE_TO_VALUES, IMAGE_WRAP_TEXT_VALUES, IMAGE_WRAP_TYPE_VALUES, LEVEL_SUFFIX_VALUES, LINE_SPACING_RULE_VALUES, types_d_exports as Layout, type measureTypes_d_exports as Measure, NUMBER_FORMAT_VALUES, OUTLINE_STYLE_ATTR_VALUES, OUTLINE_STYLE_CSS_ALIASES, OUTLINE_STYLE_CSS_ALIAS_VALUES, OutlineStyleAttr, OutlineStyleCssAlias, PARAGRAPH_ALIGNMENT_VALUES, POSITIONAL_TAB_ALIGNMENT_VALUES, POSITIONAL_TAB_LEADER_VALUES, POSITIONAL_TAB_RELATIVE_TO_VALUES, SDT_LOCK_VALUES, SDT_TYPE_VALUES, SHADING_PATTERN_VALUES, SHAPE_OUTLINE_STYLE_VALUES, SHAPE_TYPE_VALUES, STYLE_TYPE_VALUES, TABLE_CELL_TEXT_DIRECTION_VALUES, TABLE_CELL_VERTICAL_ALIGNMENT_VALUES, TABLE_JUSTIFICATION_VALUES, TABLE_ROW_HEIGHT_RULE_VALUES, TABLE_WIDTH_TYPE_VALUES, TAB_LEADER_VALUES, TAB_STOP_ALIGNMENT_VALUES, TEXT_EFFECT_VALUES, THEME_COLOR_SLOT_VALUES, UNDERLINE_STYLE_VALUES, deriveBlockId, getFolioParaIdFromBlockId, getSequentialFolioBlockIdIndex, isFolioBlockId, isSequentialFolioBlockId };
|
package/dist/model.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BORDER_STYLE_VALUES, CONDITIONAL_STYLE_TYPE_VALUES, EMPHASIS_MARK_VALUES, FIELD_TYPE_VALUES, FLOATING_TABLE_X_SPEC_VALUES, FLOATING_TABLE_Y_SPEC_VALUES, FONT_THEME_VALUES, FRAME_WRAP_VALUES, FRAME_X_ALIGN_VALUES, FRAME_Y_ALIGN_VALUES, HIGHLIGHT_COLOR_VALUES, IMAGE_HORIZONTAL_ALIGNMENT_VALUES, IMAGE_HORIZONTAL_RELATIVE_TO_VALUES, IMAGE_VERTICAL_ALIGNMENT_VALUES, IMAGE_VERTICAL_RELATIVE_TO_VALUES, IMAGE_WRAP_TEXT_VALUES, IMAGE_WRAP_TYPE_VALUES, LEVEL_SUFFIX_VALUES, LINE_SPACING_RULE_VALUES, NUMBER_FORMAT_VALUES, OUTLINE_STYLE_ATTR_VALUES, OUTLINE_STYLE_CSS_ALIASES, OUTLINE_STYLE_CSS_ALIAS_VALUES, PARAGRAPH_ALIGNMENT_VALUES, SDT_LOCK_VALUES, SDT_TYPE_VALUES, SHADING_PATTERN_VALUES, SHAPE_OUTLINE_STYLE_VALUES, SHAPE_TYPE_VALUES, STYLE_TYPE_VALUES, TABLE_CELL_TEXT_DIRECTION_VALUES, TABLE_CELL_VERTICAL_ALIGNMENT_VALUES, TABLE_JUSTIFICATION_VALUES, TABLE_ROW_HEIGHT_RULE_VALUES, TABLE_WIDTH_TYPE_VALUES, TAB_LEADER_VALUES, TAB_STOP_ALIGNMENT_VALUES, TEXT_EFFECT_VALUES, THEME_COLOR_SLOT_VALUES, UNDERLINE_STYLE_VALUES } from "./types/documentEnumValues.js";
|
|
1
|
+
import { BORDER_STYLE_VALUES, CONDITIONAL_STYLE_TYPE_VALUES, EMPHASIS_MARK_VALUES, FIELD_TYPE_VALUES, FLOATING_TABLE_X_SPEC_VALUES, FLOATING_TABLE_Y_SPEC_VALUES, FONT_HINT_VALUES, FONT_THEME_VALUES, FRAME_WRAP_VALUES, FRAME_X_ALIGN_VALUES, FRAME_Y_ALIGN_VALUES, HIGHLIGHT_COLOR_VALUES, IMAGE_HORIZONTAL_ALIGNMENT_VALUES, IMAGE_HORIZONTAL_RELATIVE_TO_VALUES, IMAGE_VERTICAL_ALIGNMENT_VALUES, IMAGE_VERTICAL_RELATIVE_TO_VALUES, IMAGE_WRAP_TEXT_VALUES, IMAGE_WRAP_TYPE_VALUES, LEVEL_SUFFIX_VALUES, LINE_SPACING_RULE_VALUES, NUMBER_FORMAT_VALUES, OUTLINE_STYLE_ATTR_VALUES, OUTLINE_STYLE_CSS_ALIASES, OUTLINE_STYLE_CSS_ALIAS_VALUES, PARAGRAPH_ALIGNMENT_VALUES, POSITIONAL_TAB_ALIGNMENT_VALUES, POSITIONAL_TAB_LEADER_VALUES, POSITIONAL_TAB_RELATIVE_TO_VALUES, SDT_LOCK_VALUES, SDT_TYPE_VALUES, SHADING_PATTERN_VALUES, SHAPE_OUTLINE_STYLE_VALUES, SHAPE_TYPE_VALUES, STYLE_TYPE_VALUES, TABLE_CELL_TEXT_DIRECTION_VALUES, TABLE_CELL_VERTICAL_ALIGNMENT_VALUES, TABLE_JUSTIFICATION_VALUES, TABLE_ROW_HEIGHT_RULE_VALUES, TABLE_WIDTH_TYPE_VALUES, TAB_LEADER_VALUES, TAB_STOP_ALIGNMENT_VALUES, TEXT_EFFECT_VALUES, THEME_COLOR_SLOT_VALUES, UNDERLINE_STYLE_VALUES } from "./types/documentEnumValues.js";
|
|
2
2
|
import { deriveBlockId, getFolioParaIdFromBlockId, getSequentialFolioBlockIdIndex, isFolioBlockId, isSequentialFolioBlockId } from "./types/block-id.js";
|
|
3
3
|
import { types_exports } from "./layout-engine/types.js";
|
|
4
|
-
export { BORDER_STYLE_VALUES, CONDITIONAL_STYLE_TYPE_VALUES, EMPHASIS_MARK_VALUES, FIELD_TYPE_VALUES, FLOATING_TABLE_X_SPEC_VALUES, FLOATING_TABLE_Y_SPEC_VALUES, FONT_THEME_VALUES, FRAME_WRAP_VALUES, FRAME_X_ALIGN_VALUES, FRAME_Y_ALIGN_VALUES, HIGHLIGHT_COLOR_VALUES, IMAGE_HORIZONTAL_ALIGNMENT_VALUES, IMAGE_HORIZONTAL_RELATIVE_TO_VALUES, IMAGE_VERTICAL_ALIGNMENT_VALUES, IMAGE_VERTICAL_RELATIVE_TO_VALUES, IMAGE_WRAP_TEXT_VALUES, IMAGE_WRAP_TYPE_VALUES, LEVEL_SUFFIX_VALUES, LINE_SPACING_RULE_VALUES, types_exports as Layout, NUMBER_FORMAT_VALUES, OUTLINE_STYLE_ATTR_VALUES, OUTLINE_STYLE_CSS_ALIASES, OUTLINE_STYLE_CSS_ALIAS_VALUES, PARAGRAPH_ALIGNMENT_VALUES, SDT_LOCK_VALUES, SDT_TYPE_VALUES, SHADING_PATTERN_VALUES, SHAPE_OUTLINE_STYLE_VALUES, SHAPE_TYPE_VALUES, STYLE_TYPE_VALUES, TABLE_CELL_TEXT_DIRECTION_VALUES, TABLE_CELL_VERTICAL_ALIGNMENT_VALUES, TABLE_JUSTIFICATION_VALUES, TABLE_ROW_HEIGHT_RULE_VALUES, TABLE_WIDTH_TYPE_VALUES, TAB_LEADER_VALUES, TAB_STOP_ALIGNMENT_VALUES, TEXT_EFFECT_VALUES, THEME_COLOR_SLOT_VALUES, UNDERLINE_STYLE_VALUES, deriveBlockId, getFolioParaIdFromBlockId, getSequentialFolioBlockIdIndex, isFolioBlockId, isSequentialFolioBlockId };
|
|
4
|
+
export { BORDER_STYLE_VALUES, CONDITIONAL_STYLE_TYPE_VALUES, EMPHASIS_MARK_VALUES, FIELD_TYPE_VALUES, FLOATING_TABLE_X_SPEC_VALUES, FLOATING_TABLE_Y_SPEC_VALUES, FONT_HINT_VALUES, FONT_THEME_VALUES, FRAME_WRAP_VALUES, FRAME_X_ALIGN_VALUES, FRAME_Y_ALIGN_VALUES, HIGHLIGHT_COLOR_VALUES, IMAGE_HORIZONTAL_ALIGNMENT_VALUES, IMAGE_HORIZONTAL_RELATIVE_TO_VALUES, IMAGE_VERTICAL_ALIGNMENT_VALUES, IMAGE_VERTICAL_RELATIVE_TO_VALUES, IMAGE_WRAP_TEXT_VALUES, IMAGE_WRAP_TYPE_VALUES, LEVEL_SUFFIX_VALUES, LINE_SPACING_RULE_VALUES, types_exports as Layout, NUMBER_FORMAT_VALUES, OUTLINE_STYLE_ATTR_VALUES, OUTLINE_STYLE_CSS_ALIASES, OUTLINE_STYLE_CSS_ALIAS_VALUES, PARAGRAPH_ALIGNMENT_VALUES, POSITIONAL_TAB_ALIGNMENT_VALUES, POSITIONAL_TAB_LEADER_VALUES, POSITIONAL_TAB_RELATIVE_TO_VALUES, SDT_LOCK_VALUES, SDT_TYPE_VALUES, SHADING_PATTERN_VALUES, SHAPE_OUTLINE_STYLE_VALUES, SHAPE_TYPE_VALUES, STYLE_TYPE_VALUES, TABLE_CELL_TEXT_DIRECTION_VALUES, TABLE_CELL_VERTICAL_ALIGNMENT_VALUES, TABLE_JUSTIFICATION_VALUES, TABLE_ROW_HEIGHT_RULE_VALUES, TABLE_WIDTH_TYPE_VALUES, TAB_LEADER_VALUES, TAB_STOP_ALIGNMENT_VALUES, TEXT_EFFECT_VALUES, THEME_COLOR_SLOT_VALUES, UNDERLINE_STYLE_VALUES, deriveBlockId, getFolioParaIdFromBlockId, getSequentialFolioBlockIdIndex, isFolioBlockId, isSequentialFolioBlockId };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { FlowBlock, Measure } from "../layout-engine/types.js";
|
|
2
|
-
|
|
3
2
|
//#region src/paged-layout/incrementalMeasure.d.ts
|
|
4
3
|
type DirtyRange = {
|
|
5
4
|
from: number;
|
|
@@ -20,14 +19,6 @@ type IncrementalMeasureResult = {
|
|
|
20
19
|
};
|
|
21
20
|
declare function mergeDirtyRanges(first: DirtyRange | null, second: DirtyRange | null): DirtyRange | null;
|
|
22
21
|
declare function findDirtyBlockIndexes(blocks: FlowBlock[], dirtyRange: DirtyRange): number[];
|
|
23
|
-
declare function tryBuildIncrementalMeasures({
|
|
24
|
-
previousBlocks,
|
|
25
|
-
previousMeasures,
|
|
26
|
-
previousBlockWidths,
|
|
27
|
-
nextBlocks,
|
|
28
|
-
nextBlockWidths,
|
|
29
|
-
dirtyRange,
|
|
30
|
-
measureBlock
|
|
31
|
-
}: IncrementalMeasureInput): IncrementalMeasureResult | null;
|
|
22
|
+
declare function tryBuildIncrementalMeasures({ previousBlocks, previousMeasures, previousBlockWidths, nextBlocks, nextBlockWidths, dirtyRange, measureBlock }: IncrementalMeasureInput): IncrementalMeasureResult | null;
|
|
32
23
|
//#endregion
|
|
33
24
|
export { DirtyRange, IncrementalMeasureInput, IncrementalMeasureResult, findDirtyBlockIndexes, mergeDirtyRanges, tryBuildIncrementalMeasures };
|
|
@@ -7,12 +7,15 @@
|
|
|
7
7
|
*/
|
|
8
8
|
/** Customization for the transient paragraph flash applied by `scrollToParaId`. */
|
|
9
9
|
type ParagraphHighlightOptions = {
|
|
10
|
-
/** CSS color used for the transient paragraph flash. Defaults to yellow. */
|
|
10
|
+
/** CSS color used for the transient paragraph flash. Defaults to yellow. */
|
|
11
|
+
color?: string;
|
|
12
|
+
/** How long the flash remains visible before it is removed. Defaults to 1200ms. */
|
|
11
13
|
durationMs?: number;
|
|
12
14
|
};
|
|
13
15
|
/** Optional reveal behavior for `scrollToParaId`. */
|
|
14
16
|
type ScrollToParaIdOptions = {
|
|
15
|
-
/** Flash rendered paragraph fragments after scrolling to the paragraph. */
|
|
17
|
+
/** Flash rendered paragraph fragments after scrolling to the paragraph. */
|
|
18
|
+
highlight?: ParagraphHighlightOptions;
|
|
16
19
|
};
|
|
17
20
|
//#endregion
|
|
18
21
|
export { ParagraphHighlightOptions, ScrollToParaIdOptions };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { FlowBlock, Layout, Measure } from "../layout-engine/types.js";
|
|
2
2
|
import { SelectionRect } from "../layout-bridge/engine/selectionRects.js";
|
|
3
|
-
|
|
4
3
|
//#region src/paged-layout/rangeProjection.d.ts
|
|
5
4
|
type ProjectableRange = {
|
|
6
5
|
from: number;
|
|
@@ -31,8 +30,11 @@ declare const measureContentLeft: (pagesContainer: HTMLElement, zoom: number) =>
|
|
|
31
30
|
* inter-page gap — exactly the region a gutter rail is allowed to paint over.
|
|
32
31
|
*/
|
|
33
32
|
type PageContentBand = {
|
|
34
|
-
/** 0-based page index (from `data-page-number` minus one). */
|
|
35
|
-
|
|
33
|
+
/** 0-based page index (from `data-page-number` minus one). */
|
|
34
|
+
pageIndex: number;
|
|
35
|
+
/** Top of the body content area, container space. */
|
|
36
|
+
top: number;
|
|
37
|
+
/** Bottom of the body content area, container space. */
|
|
36
38
|
bottom: number;
|
|
37
39
|
};
|
|
38
40
|
/**
|
|
@@ -42,8 +44,11 @@ type PageContentBand = {
|
|
|
42
44
|
* instead of running across page breaks). Measured O(pages), never per-range.
|
|
43
45
|
*/
|
|
44
46
|
type DirectiveGutterGeometry = {
|
|
45
|
-
/** Text-column left edge, container space. Rails anchor here. */
|
|
46
|
-
|
|
47
|
+
/** Text-column left edge, container space. Rails anchor here. */
|
|
48
|
+
contentLeft: number;
|
|
49
|
+
/** Usable left-margin width: `contentLeft - pageLeftEdge`. Drives the budget. */
|
|
50
|
+
marginWidth: number;
|
|
51
|
+
/** Per-page body-content vertical bands, in document order. */
|
|
47
52
|
pageBands: PageContentBand[];
|
|
48
53
|
};
|
|
49
54
|
declare const measureDirectiveGutter: (pagesContainer: HTMLElement, zoom: number) => DirectiveGutterGeometry | null;
|
|
@@ -14,11 +14,17 @@ type ScrollPageInfo = {
|
|
|
14
14
|
};
|
|
15
15
|
declare const updateScrollPageTotal: (previous: ScrollPageInfo, totalPages: number) => ScrollPageInfo;
|
|
16
16
|
type ScrollPageMetrics = {
|
|
17
|
-
/** Laid-out page heights (unscaled), top to bottom. */
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
/** Laid-out page heights (unscaled), top to bottom. */
|
|
18
|
+
pageHeights: readonly number[];
|
|
19
|
+
/** Current scroll offset of the container (scaled by zoom). */
|
|
20
|
+
scrollTop: number;
|
|
21
|
+
/** Visible height of the scroll container. */
|
|
22
|
+
clientHeight: number;
|
|
23
|
+
/** Current zoom factor. */
|
|
24
|
+
zoom: number;
|
|
25
|
+
/** Padding above the first page in the scroll container. */
|
|
26
|
+
viewportPaddingTop: number;
|
|
27
|
+
/** Gap rendered between consecutive pages. */
|
|
22
28
|
pageGap: number;
|
|
23
29
|
};
|
|
24
30
|
/**
|
|
@@ -26,14 +32,7 @@ type ScrollPageMetrics = {
|
|
|
26
32
|
* count from the laid-out page heights and the live scroll position. Returns
|
|
27
33
|
* null when there are no pages to measure.
|
|
28
34
|
*/
|
|
29
|
-
declare const computeScrollPageInfo: ({
|
|
30
|
-
pageHeights,
|
|
31
|
-
scrollTop,
|
|
32
|
-
clientHeight,
|
|
33
|
-
zoom,
|
|
34
|
-
viewportPaddingTop,
|
|
35
|
-
pageGap
|
|
36
|
-
}: ScrollPageMetrics) => {
|
|
35
|
+
declare const computeScrollPageInfo: ({ pageHeights, scrollTop, clientHeight, zoom, viewportPaddingTop, pageGap }: ScrollPageMetrics) => {
|
|
37
36
|
currentPage: number;
|
|
38
37
|
totalPages: number;
|
|
39
38
|
} | null;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { FlowBlock } from "../layout-engine/types.js";
|
|
2
2
|
import { SectionLayoutConfig } from "../layout-engine/index.js";
|
|
3
|
-
|
|
4
3
|
//#region src/paged-layout/sectionBlockWidths.d.ts
|
|
5
4
|
type ComputePerBlockMeasureInput = {
|
|
6
5
|
blocks: FlowBlock[];
|
|
@@ -24,15 +23,7 @@ type PerBlockMeasureInputs = {
|
|
|
24
23
|
* Section N's blocks use config from sectionBreak[N].
|
|
25
24
|
* The final section (after all breaks) uses body-level config.
|
|
26
25
|
*/
|
|
27
|
-
declare function computePerBlockWidths({
|
|
28
|
-
|
|
29
|
-
bodyConfig,
|
|
30
|
-
finalConfig
|
|
31
|
-
}: ComputePerBlockMeasureInput): number[];
|
|
32
|
-
declare function computePerBlockMeasureInputs({
|
|
33
|
-
blocks,
|
|
34
|
-
bodyConfig,
|
|
35
|
-
finalConfig
|
|
36
|
-
}: ComputePerBlockMeasureInput): PerBlockMeasureInputs;
|
|
26
|
+
declare function computePerBlockWidths({ blocks, bodyConfig, finalConfig }: ComputePerBlockMeasureInput): number[];
|
|
27
|
+
declare function computePerBlockMeasureInputs({ blocks, bodyConfig, finalConfig }: ComputePerBlockMeasureInput): PerBlockMeasureInputs;
|
|
37
28
|
//#endregion
|
|
38
29
|
export { computePerBlockMeasureInputs, computePerBlockWidths };
|
|
@@ -23,18 +23,8 @@ type GetViewportCenterZoomAnchorForZoomChangeParams = {
|
|
|
23
23
|
pendingAnchor: ViewportCenterZoomAnchor | null;
|
|
24
24
|
scrollTop: number;
|
|
25
25
|
};
|
|
26
|
-
declare const captureViewportCenterZoomAnchor: ({
|
|
27
|
-
|
|
28
|
-
scrollTop,
|
|
29
|
-
zoom
|
|
30
|
-
}: CaptureViewportCenterZoomAnchorParams) => ViewportCenterZoomAnchor;
|
|
31
|
-
declare const getViewportCenterZoomAnchorForZoomChange: ({
|
|
32
|
-
clientHeight,
|
|
33
|
-
currentZoom,
|
|
34
|
-
nextZoom,
|
|
35
|
-
pendingAnchor,
|
|
36
|
-
scrollTop
|
|
37
|
-
}: GetViewportCenterZoomAnchorForZoomChangeParams) => ViewportCenterZoomAnchor | null;
|
|
26
|
+
declare const captureViewportCenterZoomAnchor: ({ clientHeight, scrollTop, zoom }: CaptureViewportCenterZoomAnchorParams) => ViewportCenterZoomAnchor;
|
|
27
|
+
declare const getViewportCenterZoomAnchorForZoomChange: ({ clientHeight, currentZoom, nextZoom, pendingAnchor, scrollTop }: GetViewportCenterZoomAnchorForZoomChangeParams) => ViewportCenterZoomAnchor | null;
|
|
38
28
|
declare const getScrollTopForZoomAnchor: (anchor: ViewportCenterZoomAnchor, nextZoom: number) => number;
|
|
39
29
|
//#endregion
|
|
40
30
|
export { ViewportCenterZoomAnchor, captureViewportCenterZoomAnchor, getScrollTopForZoomAnchor, getViewportCenterZoomAnchorForZoomChange };
|