@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,7 @@
|
|
|
1
1
|
import { CharacterSpacingAttrs, CharacterStyleAttrs, CommentAttrs, EmphasisMarkAttrs, FontFamilyAttrs, FontSizeAttrs, FootnoteRefAttrs, HighlightAttrs, HyperlinkAttrs, LanguageAttrs, RunFormattingOverrideAttrs, RunPropertyChangeMarkAttrs, RunShadingAttrs, StrikeAttrs, TextColorAttrs, TextEffectAttrs, TrackedChangeMarkAttrs, UnderlineAttrs } from "../schema/marks.js";
|
|
2
|
-
import { BlockSdtAttrs, FieldAttrs, HardBreakAttrs, ImageAttrs, MathAttrs, ParagraphAttrs, SdtAttrs, ShapeAttrs, TableAttrs, TableCellAttrs, TableRowAttrs, TextBoxAttrs } from "../schema/nodes.js";
|
|
2
|
+
import { BlockSdtAttrs, FieldAttrs, HardBreakAttrs, ImageAttrs, MathAttrs, ParagraphAttrs, SdtAttrs, ShapeAttrs, TabAttrs, TableAttrs, TableCellAttrs, TableRowAttrs, TextBoxAttrs } from "../schema/nodes.js";
|
|
3
|
+
import "../schema/index.js";
|
|
3
4
|
import { Mark, Node } from "prosemirror-model";
|
|
4
|
-
|
|
5
5
|
//#region src/prosemirror/attrs/index.d.ts
|
|
6
6
|
type ProseMirrorAttrIssue = {
|
|
7
7
|
path: string;
|
|
@@ -18,6 +18,8 @@ declare const readParagraphAttrs: (node: Node) => ReadProseMirrorAttrsResult<Par
|
|
|
18
18
|
declare const expectParagraphAttrs: (node: Node) => ParagraphAttrs;
|
|
19
19
|
declare const readHardBreakAttrs: (node: Node) => ReadProseMirrorAttrsResult<HardBreakAttrs>;
|
|
20
20
|
declare const expectHardBreakAttrs: (node: Node) => HardBreakAttrs;
|
|
21
|
+
declare const readTabAttrs: (node: Node) => ReadProseMirrorAttrsResult<TabAttrs>;
|
|
22
|
+
declare const expectTabAttrs: (node: Node) => TabAttrs;
|
|
21
23
|
declare const readTableAttrs: (node: Node) => ReadProseMirrorAttrsResult<TableAttrs>;
|
|
22
24
|
declare const expectTableAttrs: (node: Node) => TableAttrs;
|
|
23
25
|
declare const readTableRowAttrs: (node: Node) => ReadProseMirrorAttrsResult<TableRowAttrs>;
|
|
@@ -74,11 +76,11 @@ declare const readRunFormattingOverrideMarkAttrs: (mark: Mark) => ReadProseMirro
|
|
|
74
76
|
declare const expectRunFormattingOverrideMarkAttrs: (mark: Mark) => RunFormattingOverrideAttrs;
|
|
75
77
|
declare const readHyperlinkMarkAttrs: (mark: Mark) => ReadProseMirrorAttrsResult<HyperlinkAttrs>;
|
|
76
78
|
declare const expectHyperlinkMarkAttrs: (mark: Mark) => HyperlinkAttrs;
|
|
77
|
-
type NodeAttrPatch<T extends object> = { [K in keyof T]?: T[K] | undefined };
|
|
79
|
+
type NodeAttrPatch<T extends object> = { [K in keyof T]?: T[K] | undefined; };
|
|
78
80
|
declare const mergeImageAttrs: (node: Node, patch: NodeAttrPatch<ImageAttrs>) => ImageAttrs;
|
|
79
81
|
declare const mergeParagraphAttrs: (node: Node, patch: NodeAttrPatch<ParagraphAttrs>) => ParagraphAttrs;
|
|
80
82
|
declare const mergeTableAttrs: (node: Node, patch: NodeAttrPatch<TableAttrs>) => TableAttrs;
|
|
81
83
|
declare const mergeTableRowAttrs: (node: Node, patch: NodeAttrPatch<TableRowAttrs>) => TableRowAttrs;
|
|
82
84
|
declare const mergeTableCellAttrs: (node: Node, patch: NodeAttrPatch<TableCellAttrs>) => TableCellAttrs;
|
|
83
85
|
//#endregion
|
|
84
|
-
export { ProseMirrorAttrIssue, ReadProseMirrorAttrsResult, expectBlockSdtAttrs, expectCharacterSpacingMarkAttrs, expectCharacterStyleMarkAttrs, expectCommentMarkAttrs, expectEmphasisMarkAttrs, expectFieldAttrs, expectFontFamilyMarkAttrs, expectFontSizeMarkAttrs, expectFootnoteRefMarkAttrs, expectHardBreakAttrs, expectHighlightMarkAttrs, expectHyperlinkMarkAttrs, expectImageAttrs, expectLanguageMarkAttrs, expectMathAttrs, expectParagraphAttrs, expectRunFormattingOverrideMarkAttrs, expectRunPropertyChangeMarkAttrs, expectRunShadingMarkAttrs, expectSdtAttrs, expectShapeAttrs, expectStrikeMarkAttrs, expectTableAttrs, expectTableCellAttrs, expectTableRowAttrs, expectTextBoxAttrs, expectTextColorMarkAttrs, expectTextEffectMarkAttrs, expectTrackedChangeMarkAttrs, expectUnderlineMarkAttrs, mergeImageAttrs, mergeParagraphAttrs, mergeTableAttrs, mergeTableCellAttrs, mergeTableRowAttrs, readBlockSdtAttrs, readCharacterSpacingMarkAttrs, readCharacterStyleMarkAttrs, readCommentMarkAttrs, readEmphasisMarkAttrs, readFieldAttrs, readFontFamilyMarkAttrs, readFontSizeMarkAttrs, readFootnoteRefMarkAttrs, readHardBreakAttrs, readHighlightMarkAttrs, readHyperlinkMarkAttrs, readImageAttrs, readLanguageMarkAttrs, readMathAttrs, readParagraphAttrs, readRunFormattingOverrideMarkAttrs, readRunPropertyChangeMarkAttrs, readRunShadingMarkAttrs, readSdtAttrs, readShapeAttrs, readStrikeMarkAttrs, readTableAttrs, readTableCellAttrs, readTableRowAttrs, readTextBoxAttrs, readTextColorMarkAttrs, readTextEffectMarkAttrs, readTrackedChangeMarkAttrs, readUnderlineMarkAttrs };
|
|
86
|
+
export { ProseMirrorAttrIssue, ReadProseMirrorAttrsResult, expectBlockSdtAttrs, expectCharacterSpacingMarkAttrs, expectCharacterStyleMarkAttrs, expectCommentMarkAttrs, expectEmphasisMarkAttrs, expectFieldAttrs, expectFontFamilyMarkAttrs, expectFontSizeMarkAttrs, expectFootnoteRefMarkAttrs, expectHardBreakAttrs, expectHighlightMarkAttrs, expectHyperlinkMarkAttrs, expectImageAttrs, expectLanguageMarkAttrs, expectMathAttrs, expectParagraphAttrs, expectRunFormattingOverrideMarkAttrs, expectRunPropertyChangeMarkAttrs, expectRunShadingMarkAttrs, expectSdtAttrs, expectShapeAttrs, expectStrikeMarkAttrs, expectTabAttrs, expectTableAttrs, expectTableCellAttrs, expectTableRowAttrs, expectTextBoxAttrs, expectTextColorMarkAttrs, expectTextEffectMarkAttrs, expectTrackedChangeMarkAttrs, expectUnderlineMarkAttrs, mergeImageAttrs, mergeParagraphAttrs, mergeTableAttrs, mergeTableCellAttrs, mergeTableRowAttrs, readBlockSdtAttrs, readCharacterSpacingMarkAttrs, readCharacterStyleMarkAttrs, readCommentMarkAttrs, readEmphasisMarkAttrs, readFieldAttrs, readFontFamilyMarkAttrs, readFontSizeMarkAttrs, readFootnoteRefMarkAttrs, readHardBreakAttrs, readHighlightMarkAttrs, readHyperlinkMarkAttrs, readImageAttrs, readLanguageMarkAttrs, readMathAttrs, readParagraphAttrs, readRunFormattingOverrideMarkAttrs, readRunPropertyChangeMarkAttrs, readRunShadingMarkAttrs, readSdtAttrs, readShapeAttrs, readStrikeMarkAttrs, readTabAttrs, readTableAttrs, readTableCellAttrs, readTableRowAttrs, readTextBoxAttrs, readTextColorMarkAttrs, readTextEffectMarkAttrs, readTrackedChangeMarkAttrs, readUnderlineMarkAttrs };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FIELD_TYPE_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, LINE_SPACING_RULE_VALUES, OUTLINE_STYLE_ATTR_VALUES, PARAGRAPH_ALIGNMENT_VALUES, SDT_LOCK_VALUES, SDT_TYPE_VALUES, SHADING_PATTERN_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 { FIELD_TYPE_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, LINE_SPACING_RULE_VALUES, OUTLINE_STYLE_ATTR_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, 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 { isParagraphDirection } from "../paragraphDirection.js";
|
|
3
3
|
import { TRACKED_CHANGE_PROVENANCE_VALUES } from "../schema/marks.js";
|
|
4
4
|
import { panic } from "better-result";
|
|
@@ -119,6 +119,7 @@ const SECTION_VERTICAL_ALIGNMENTS = [
|
|
|
119
119
|
];
|
|
120
120
|
const paragraphAttrsCache = /* @__PURE__ */ new WeakMap();
|
|
121
121
|
const hardBreakAttrsCache = /* @__PURE__ */ new WeakMap();
|
|
122
|
+
const tabAttrsCache = /* @__PURE__ */ new WeakMap();
|
|
122
123
|
const tableAttrsCache = /* @__PURE__ */ new WeakMap();
|
|
123
124
|
const tableRowAttrsCache = /* @__PURE__ */ new WeakMap();
|
|
124
125
|
const tableCellAttrsCache = /* @__PURE__ */ new WeakMap();
|
|
@@ -233,6 +234,20 @@ const readHardBreakAttrs = (node) => {
|
|
|
233
234
|
return attrsResult(attrs, issues);
|
|
234
235
|
};
|
|
235
236
|
const expectHardBreakAttrs = (node) => expectCachedNodeAttrs(node, hardBreakAttrsCache, readHardBreakAttrs, "hard break attrs");
|
|
237
|
+
const readTabAttrs = (node) => {
|
|
238
|
+
const attrs = attrsRecord(node.attrs);
|
|
239
|
+
const issues = [];
|
|
240
|
+
expectNodeType(node, "tab", issues);
|
|
241
|
+
optionalRecord(attrs, "positional", "tab.attrs.positional", issues);
|
|
242
|
+
const positional = attrs["positional"];
|
|
243
|
+
if (isRecord(positional)) {
|
|
244
|
+
optionalOneOf(positional, "relativeTo", "tab.attrs.positional.relativeTo", issues, POSITIONAL_TAB_RELATIVE_TO_VALUES);
|
|
245
|
+
optionalOneOf(positional, "alignment", "tab.attrs.positional.alignment", issues, POSITIONAL_TAB_ALIGNMENT_VALUES);
|
|
246
|
+
optionalOneOf(positional, "leader", "tab.attrs.positional.leader", issues, POSITIONAL_TAB_LEADER_VALUES);
|
|
247
|
+
}
|
|
248
|
+
return attrsResult(attrs, issues);
|
|
249
|
+
};
|
|
250
|
+
const expectTabAttrs = (node) => expectCachedNodeAttrs(node, tabAttrsCache, readTabAttrs, "tab attrs");
|
|
236
251
|
const readTableAttrs = (node) => {
|
|
237
252
|
const attrs = attrsRecord(node.attrs);
|
|
238
253
|
const issues = [];
|
|
@@ -311,6 +326,7 @@ const readImageAttrs = (node) => {
|
|
|
311
326
|
const issues = [];
|
|
312
327
|
expectNodeType(node, "image", issues);
|
|
313
328
|
requiredString(attrs, "src", "image.attrs.src", issues);
|
|
329
|
+
optionalString(attrs, "docPrName", "image.attrs.docPrName", issues);
|
|
314
330
|
optionalString(attrs, "alt", "image.attrs.alt", issues);
|
|
315
331
|
optionalString(attrs, "title", "image.attrs.title", issues);
|
|
316
332
|
optionalString(attrs, "rId", "image.attrs.rId", issues);
|
|
@@ -331,6 +347,7 @@ const readImageAttrs = (node) => {
|
|
|
331
347
|
optionalString(attrs, "borderStyle", "image.attrs.borderStyle", issues);
|
|
332
348
|
optionalOneOf(attrs, "wrapText", "image.attrs.wrapText", issues, IMAGE_WRAP_TEXT_VALUES);
|
|
333
349
|
optionalString(attrs, "hlinkHref", "image.attrs.hlinkHref", issues);
|
|
350
|
+
optionalString(attrs, "hlinkRId", "image.attrs.hlinkRId", issues);
|
|
334
351
|
optionalString(attrs, "_docxRawXml", "image.attrs._docxRawXml", issues);
|
|
335
352
|
optionalBoolean(attrs, "_docxObjectPreview", "image.attrs._docxObjectPreview", issues);
|
|
336
353
|
return attrsResult(attrs, issues);
|
|
@@ -401,12 +418,14 @@ const readShapeAttrs = (node) => {
|
|
|
401
418
|
optionalNumber(attrs, "width", "shape.attrs.width", issues);
|
|
402
419
|
optionalNumber(attrs, "height", "shape.attrs.height", issues);
|
|
403
420
|
optionalString(attrs, "fillColor", "shape.attrs.fillColor", issues);
|
|
421
|
+
optionalColorValue(attrs, "fillColorValue", "shape.attrs.fillColorValue", issues);
|
|
404
422
|
optionalOneOf(attrs, "fillType", "shape.attrs.fillType", issues, SHAPE_FILL_TYPES);
|
|
405
423
|
optionalOneOf(attrs, "gradientType", "shape.attrs.gradientType", issues, SHAPE_GRADIENT_TYPES);
|
|
406
424
|
optionalNumber(attrs, "gradientAngle", "shape.attrs.gradientAngle", issues);
|
|
407
425
|
optionalGradientStops(attrs, "gradientStops", "shape.attrs.gradientStops", issues);
|
|
408
426
|
optionalNumber(attrs, "outlineWidth", "shape.attrs.outlineWidth", issues);
|
|
409
427
|
optionalString(attrs, "outlineColor", "shape.attrs.outlineColor", issues);
|
|
428
|
+
optionalColorValue(attrs, "outlineColorValue", "shape.attrs.outlineColorValue", issues);
|
|
410
429
|
optionalOneOf(attrs, "outlineStyle", "shape.attrs.outlineStyle", issues, OUTLINE_STYLE_ATTR_VALUES);
|
|
411
430
|
optionalOneOf(attrs, "outlineCap", "shape.attrs.outlineCap", issues, SHAPE_OUTLINE_CAPS);
|
|
412
431
|
optionalShapeLineEnd(attrs, "outlineHeadEnd", "shape.attrs.outlineHeadEnd", issues);
|
|
@@ -532,6 +551,7 @@ const readFontFamilyMarkAttrs = (mark) => {
|
|
|
532
551
|
optionalString(attrs, "hAnsi", "fontFamily.attrs.hAnsi", issues);
|
|
533
552
|
optionalString(attrs, "eastAsia", "fontFamily.attrs.eastAsia", issues);
|
|
534
553
|
optionalString(attrs, "cs", "fontFamily.attrs.cs", issues);
|
|
554
|
+
optionalString(attrs, "hint", "fontFamily.attrs.hint", issues);
|
|
535
555
|
optionalString(attrs, "asciiTheme", "fontFamily.attrs.asciiTheme", issues);
|
|
536
556
|
optionalString(attrs, "hAnsiTheme", "fontFamily.attrs.hAnsiTheme", issues);
|
|
537
557
|
optionalString(attrs, "eastAsiaTheme", "fontFamily.attrs.eastAsiaTheme", issues);
|
|
@@ -1406,4 +1426,4 @@ const optionalEmptyHyperlinkArray = (value, issues) => {
|
|
|
1406
1426
|
}
|
|
1407
1427
|
};
|
|
1408
1428
|
//#endregion
|
|
1409
|
-
export { expectBlockSdtAttrs, expectCharacterSpacingMarkAttrs, expectCharacterStyleMarkAttrs, expectCommentMarkAttrs, expectEmphasisMarkAttrs, expectFieldAttrs, expectFontFamilyMarkAttrs, expectFontSizeMarkAttrs, expectFootnoteRefMarkAttrs, expectHardBreakAttrs, expectHighlightMarkAttrs, expectHyperlinkMarkAttrs, expectImageAttrs, expectLanguageMarkAttrs, expectMathAttrs, expectParagraphAttrs, expectRunFormattingOverrideMarkAttrs, expectRunPropertyChangeMarkAttrs, expectRunShadingMarkAttrs, expectSdtAttrs, expectShapeAttrs, expectStrikeMarkAttrs, expectTableAttrs, expectTableCellAttrs, expectTableRowAttrs, expectTextBoxAttrs, expectTextColorMarkAttrs, expectTextEffectMarkAttrs, expectTrackedChangeMarkAttrs, expectUnderlineMarkAttrs, mergeImageAttrs, mergeParagraphAttrs, mergeTableAttrs, mergeTableCellAttrs, mergeTableRowAttrs, readBlockSdtAttrs, readCharacterSpacingMarkAttrs, readCharacterStyleMarkAttrs, readCommentMarkAttrs, readEmphasisMarkAttrs, readFieldAttrs, readFontFamilyMarkAttrs, readFontSizeMarkAttrs, readFootnoteRefMarkAttrs, readHardBreakAttrs, readHighlightMarkAttrs, readHyperlinkMarkAttrs, readImageAttrs, readLanguageMarkAttrs, readMathAttrs, readParagraphAttrs, readRunFormattingOverrideMarkAttrs, readRunPropertyChangeMarkAttrs, readRunShadingMarkAttrs, readSdtAttrs, readShapeAttrs, readStrikeMarkAttrs, readTableAttrs, readTableCellAttrs, readTableRowAttrs, readTextBoxAttrs, readTextColorMarkAttrs, readTextEffectMarkAttrs, readTrackedChangeMarkAttrs, readUnderlineMarkAttrs };
|
|
1429
|
+
export { expectBlockSdtAttrs, expectCharacterSpacingMarkAttrs, expectCharacterStyleMarkAttrs, expectCommentMarkAttrs, expectEmphasisMarkAttrs, expectFieldAttrs, expectFontFamilyMarkAttrs, expectFontSizeMarkAttrs, expectFootnoteRefMarkAttrs, expectHardBreakAttrs, expectHighlightMarkAttrs, expectHyperlinkMarkAttrs, expectImageAttrs, expectLanguageMarkAttrs, expectMathAttrs, expectParagraphAttrs, expectRunFormattingOverrideMarkAttrs, expectRunPropertyChangeMarkAttrs, expectRunShadingMarkAttrs, expectSdtAttrs, expectShapeAttrs, expectStrikeMarkAttrs, expectTabAttrs, expectTableAttrs, expectTableCellAttrs, expectTableRowAttrs, expectTextBoxAttrs, expectTextColorMarkAttrs, expectTextEffectMarkAttrs, expectTrackedChangeMarkAttrs, expectUnderlineMarkAttrs, mergeImageAttrs, mergeParagraphAttrs, mergeTableAttrs, mergeTableCellAttrs, mergeTableRowAttrs, readBlockSdtAttrs, readCharacterSpacingMarkAttrs, readCharacterStyleMarkAttrs, readCommentMarkAttrs, readEmphasisMarkAttrs, readFieldAttrs, readFontFamilyMarkAttrs, readFontSizeMarkAttrs, readFootnoteRefMarkAttrs, readHardBreakAttrs, readHighlightMarkAttrs, readHyperlinkMarkAttrs, readImageAttrs, readLanguageMarkAttrs, readMathAttrs, readParagraphAttrs, readRunFormattingOverrideMarkAttrs, readRunPropertyChangeMarkAttrs, readRunShadingMarkAttrs, readSdtAttrs, readShapeAttrs, readStrikeMarkAttrs, readTabAttrs, readTableAttrs, readTableCellAttrs, readTableRowAttrs, readTextBoxAttrs, readTextColorMarkAttrs, readTextEffectMarkAttrs, readTrackedChangeMarkAttrs, readUnderlineMarkAttrs };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { EditorView } from "prosemirror-view";
|
|
2
|
-
|
|
3
2
|
//#region src/prosemirror/cellDragSelection.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* @deprecated No longer used. The tracker ignores pointer overflow so same-cell
|
|
@@ -20,13 +19,16 @@ declare function applyCellSelection(view: EditorView, anchorCellPos: number, hea
|
|
|
20
19
|
* handler; drive it from mousedown/mousemove/mouseup.
|
|
21
20
|
*/
|
|
22
21
|
type CellDragTracker = {
|
|
23
|
-
/** mousedown: record the cell under the press (or null when outside a table). */
|
|
22
|
+
/** mousedown: record the cell under the press (or null when outside a table). */
|
|
23
|
+
begin(cellPos: number | null): void;
|
|
24
24
|
/**
|
|
25
25
|
* mousemove: returns true when it applied a `CellSelection` and the caller
|
|
26
26
|
* should NOT also run its text-drag selection for this move.
|
|
27
27
|
*/
|
|
28
|
-
update(view: EditorView, pmPos: number, clientX: number): boolean;
|
|
29
|
-
|
|
28
|
+
update(view: EditorView, pmPos: number, clientX: number): boolean;
|
|
29
|
+
/** mouseup / gesture end: clear the transient drag flags. */
|
|
30
|
+
end(): void;
|
|
31
|
+
/** True while a cell drag is actively producing CellSelections. */
|
|
30
32
|
readonly isCellDragging: boolean;
|
|
31
33
|
};
|
|
32
34
|
declare function createCellDragTracker(): CellDragTracker;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Command, EditorState } from "prosemirror-state";
|
|
2
|
-
|
|
3
2
|
//#region src/prosemirror/commands/comments.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* Add a comment mark to the current selection.
|
|
@@ -76,12 +75,15 @@ type SuggestionKind = "insertion" | "deletion" | "formatting" | "insertBlock" |
|
|
|
76
75
|
*/
|
|
77
76
|
type SuggestionAppliedAs = "tracked" | "direct" | "mixed";
|
|
78
77
|
type FolioSuggestion = {
|
|
79
|
-
suggestionId: string;
|
|
78
|
+
suggestionId: string;
|
|
79
|
+
/** Contiguous document ranges the suggestion covers, in document order. */
|
|
80
80
|
ranges: readonly {
|
|
81
81
|
from: number;
|
|
82
82
|
to: number;
|
|
83
|
-
}[];
|
|
84
|
-
|
|
83
|
+
}[];
|
|
84
|
+
/** Which kinds of change the suggestion contains (deduped, in a stable order). */
|
|
85
|
+
kinds: readonly SuggestionKind[];
|
|
86
|
+
/** How accepting this suggestion applies it (see {@link SuggestionAppliedAs}). */
|
|
85
87
|
appliedAs: SuggestionAppliedAs;
|
|
86
88
|
};
|
|
87
89
|
/**
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import { document_d_exports } from "../../types/document.js";
|
|
2
2
|
import { ContentControlFilter } from "../../content-controls/findContentControls.js";
|
|
3
3
|
import { SetContentControlContentInput, SetContentControlValueInput } from "../../content-controls/mutateContentControls.js";
|
|
4
|
+
import "../../content-controls/index.js";
|
|
4
5
|
import { EditorState, Transaction } from "prosemirror-state";
|
|
5
6
|
import { Node } from "prosemirror-model";
|
|
6
|
-
|
|
7
7
|
//#region src/prosemirror/commands/contentControls.d.ts
|
|
8
8
|
type ForceOption = {
|
|
9
9
|
force?: boolean;
|
|
10
10
|
};
|
|
11
11
|
type BlockSdtPMMatch = {
|
|
12
|
-
node: Node;
|
|
13
|
-
|
|
12
|
+
node: Node;
|
|
13
|
+
/** Absolute PM position of the blockSdt's open tag. */
|
|
14
|
+
pos: number;
|
|
15
|
+
/** Outer→inner index path through doc children. */
|
|
14
16
|
path: number[];
|
|
15
17
|
};
|
|
16
18
|
/** All blockSdt nodes in `doc` matching `filter`. Outer→inner traversal. */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { document_d_exports } from "../../types/document.js";
|
|
2
2
|
import { ContentControlFilter } from "../../content-controls/findContentControls.js";
|
|
3
|
+
import "../../content-controls/index.js";
|
|
3
4
|
import { EditorState, Transaction } from "prosemirror-state";
|
|
4
|
-
|
|
5
5
|
//#region src/prosemirror/commands/contentControlsBlockFill.d.ts
|
|
6
6
|
/**
|
|
7
7
|
* Replace the children of the content control matching `filter` with the
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { document_d_exports } from "../../types/document.js";
|
|
2
2
|
import { TextColorAttrs } from "../schema/marks.js";
|
|
3
|
+
import "../schema/index.js";
|
|
3
4
|
import { clearFormatting, createRemoveMarkCommand, createSetMarkCommand, getMarkAttr, isMarkActive } from "../extensions/marks/markUtils.js";
|
|
4
5
|
import { getHyperlinkAttrs, getSelectedText, isHyperlinkActive } from "../extensions/marks/HyperlinkExtension.js";
|
|
5
6
|
import { Command } from "prosemirror-state";
|
|
6
7
|
import { Mark } from "prosemirror-model";
|
|
7
|
-
|
|
8
8
|
//#region src/prosemirror/commands/formatting.d.ts
|
|
9
9
|
/**
|
|
10
10
|
* textFormattingToMarks — wraps markUtils version to use singleton schema
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { EditorView } from "prosemirror-view";
|
|
2
|
-
|
|
3
2
|
//#region src/prosemirror/commands/hyperlink.d.ts
|
|
4
3
|
type EditHyperlinkInput = {
|
|
5
4
|
displayText: string;
|
|
@@ -13,19 +12,15 @@ type EditHyperlinkInput = {
|
|
|
13
12
|
* to act on at the cursor; false only when a hyperlink mark is present but no
|
|
14
13
|
* contiguous range contains the cursor (the original's silent bail).
|
|
15
14
|
*/
|
|
16
|
-
declare const editHyperlinkAtCursor: (view: EditorView, {
|
|
17
|
-
displayText,
|
|
18
|
-
href
|
|
19
|
-
}: EditHyperlinkInput) => boolean;
|
|
15
|
+
declare const editHyperlinkAtCursor: (view: EditorView, { displayText, href }: EditHyperlinkInput) => boolean;
|
|
20
16
|
type RemoveHyperlinkInput = {
|
|
21
|
-
/** href from the popup, used as a fallback when the cursor reports no mark. */
|
|
17
|
+
/** href from the popup, used as a fallback when the cursor reports no mark. */
|
|
18
|
+
popupHref: string | undefined;
|
|
22
19
|
};
|
|
23
20
|
/**
|
|
24
21
|
* Remove the hyperlink mark from the contiguous run at the cursor. Returns
|
|
25
22
|
* whether a link was actually removed (so the adapter can toast + refocus).
|
|
26
23
|
*/
|
|
27
|
-
declare const removeHyperlinkAtCursor: (view: EditorView, {
|
|
28
|
-
popupHref
|
|
29
|
-
}: RemoveHyperlinkInput) => boolean;
|
|
24
|
+
declare const removeHyperlinkAtCursor: (view: EditorView, { popupHref }: RemoveHyperlinkInput) => boolean;
|
|
30
25
|
//#endregion
|
|
31
26
|
export { EditHyperlinkInput, RemoveHyperlinkInput, editHyperlinkAtCursor, removeHyperlinkAtCursor };
|
|
@@ -2,7 +2,6 @@ import { document_d_exports } from "../../types/document.js";
|
|
|
2
2
|
import { ResolvedStyleAttrs, getParagraphAlignment, getParagraphBidi, getParagraphTabs, getStyleId } from "../extensions/core/ParagraphExtension.js";
|
|
3
3
|
import { getListInfo, isInList } from "../extensions/features/ListExtension.js";
|
|
4
4
|
import { Command } from "prosemirror-state";
|
|
5
|
-
|
|
6
5
|
//#region src/prosemirror/commands/paragraph.d.ts
|
|
7
6
|
declare function setAlignment(alignment: document_d_exports.ParagraphAlignment): Command;
|
|
8
7
|
declare const alignLeft: Command;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { BorderPreset, TableBorderPreset, TableContextInfo, getTableContext, isInTable as isInTableCell } from "../extensions/nodes/TableExtension.js";
|
|
2
2
|
import { EditorState, Transaction } from "prosemirror-state";
|
|
3
|
-
|
|
4
3
|
//#region src/prosemirror/commands/table.d.ts
|
|
5
4
|
declare function insertTable(rows: number, cols: number): (state: EditorState, dispatch?: (tr: Transaction) => void) => boolean;
|
|
6
5
|
declare function addRowAbove(state: EditorState, dispatch?: (tr: Transaction) => void): boolean;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Transaction } from "prosemirror-state";
|
|
2
2
|
import { Node } from "prosemirror-model";
|
|
3
|
-
|
|
4
3
|
//#region src/prosemirror/commands/tableCellMergeResolution.d.ts
|
|
5
4
|
declare const hasMatchingCollapsedTableCellMerge: (node: Node, revisionSet: Set<number> | null) => boolean;
|
|
6
5
|
declare const resolveVisibleTableCellMerge: (tr: Transaction, cellPos: number, mode: "accept" | "reject") => boolean;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Comment } from "../types/content.js";
|
|
2
2
|
import { EditorView } from "prosemirror-view";
|
|
3
|
-
|
|
4
3
|
//#region src/prosemirror/commentIdAllocator.d.ts
|
|
5
4
|
/** Sentinel ID for a comment that hasn't been persisted yet (anchored to selection). */
|
|
6
5
|
declare const PENDING_COMMENT_ID = -1;
|
|
7
6
|
type CommentIdAllocator = {
|
|
8
|
-
/** Allocate the next ID and advance the counter. */
|
|
7
|
+
/** Allocate the next ID and advance the counter. */
|
|
8
|
+
next(): number;
|
|
9
9
|
/**
|
|
10
10
|
* On document load, bump the counter above the highest ID found in the
|
|
11
11
|
* loaded comments and tracked-change marks so subsequent allocations don't
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Comment } from "../types/content.js";
|
|
2
2
|
import { CommentIdAllocator } from "./commentIdAllocator.js";
|
|
3
3
|
import { EditorView } from "prosemirror-view";
|
|
4
|
-
|
|
5
4
|
//#region src/prosemirror/commentOps.d.ts
|
|
6
5
|
/** Build a Comment object with a freshly-allocated ID. */
|
|
7
6
|
declare function createComment(allocator: CommentIdAllocator, text: string, authorName: string, parentId?: number): Comment;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { document_d_exports } from "../../types/document.js";
|
|
2
|
-
|
|
3
2
|
//#region src/prosemirror/conversion/effectiveTableCellFormatting.d.ts
|
|
4
3
|
type TableCellMarginsAttrs = {
|
|
5
4
|
top?: number;
|
|
@@ -49,14 +48,6 @@ type ResolveEffectiveTableCellFormattingOptions = {
|
|
|
49
48
|
* OOXML formatting. Source discriminators keep inherited values distinct from
|
|
50
49
|
* direct values that the editor may later override.
|
|
51
50
|
*/
|
|
52
|
-
declare const resolveEffectiveTableCellFormatting: ({
|
|
53
|
-
directFormatting,
|
|
54
|
-
styleFormatting,
|
|
55
|
-
tableBorders,
|
|
56
|
-
position,
|
|
57
|
-
gridWidthPercent,
|
|
58
|
-
defaultMargins,
|
|
59
|
-
theme
|
|
60
|
-
}: ResolveEffectiveTableCellFormattingOptions) => EffectiveTableCellFormatting;
|
|
51
|
+
declare const resolveEffectiveTableCellFormatting: ({ directFormatting, styleFormatting, tableBorders, position, gridWidthPercent, defaultMargins, theme }: ResolveEffectiveTableCellFormattingOptions) => EffectiveTableCellFormatting;
|
|
61
52
|
//#endregion
|
|
62
53
|
export { TableCellMarginsAttrs, TableCellPosition, resolveEffectiveTableCellFormatting };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { OUTLINE_STYLE_CSS_ALIASES } from "../../types/documentEnumValues.js";
|
|
2
2
|
import { directionToBidi } from "../paragraphDirection.js";
|
|
3
|
-
import { expectBlockSdtAttrs, expectCharacterSpacingMarkAttrs, expectCharacterStyleMarkAttrs, expectCommentMarkAttrs, expectEmphasisMarkAttrs, expectFieldAttrs, expectFontFamilyMarkAttrs, expectFontSizeMarkAttrs, expectFootnoteRefMarkAttrs, expectHardBreakAttrs, expectHighlightMarkAttrs, expectHyperlinkMarkAttrs, expectImageAttrs, expectLanguageMarkAttrs, expectMathAttrs, expectParagraphAttrs, expectRunFormattingOverrideMarkAttrs, expectRunPropertyChangeMarkAttrs, expectRunShadingMarkAttrs, expectSdtAttrs, expectShapeAttrs, expectStrikeMarkAttrs, expectTableAttrs, expectTableCellAttrs, expectTableRowAttrs, expectTextBoxAttrs, expectTextColorMarkAttrs, expectTextEffectMarkAttrs, expectTrackedChangeMarkAttrs, expectUnderlineMarkAttrs } from "../attrs/index.js";
|
|
3
|
+
import { expectBlockSdtAttrs, expectCharacterSpacingMarkAttrs, expectCharacterStyleMarkAttrs, expectCommentMarkAttrs, expectEmphasisMarkAttrs, expectFieldAttrs, expectFontFamilyMarkAttrs, expectFontSizeMarkAttrs, expectFootnoteRefMarkAttrs, expectHardBreakAttrs, expectHighlightMarkAttrs, expectHyperlinkMarkAttrs, expectImageAttrs, expectLanguageMarkAttrs, expectMathAttrs, expectParagraphAttrs, expectRunFormattingOverrideMarkAttrs, expectRunPropertyChangeMarkAttrs, expectRunShadingMarkAttrs, expectSdtAttrs, expectShapeAttrs, expectStrikeMarkAttrs, expectTabAttrs, expectTableAttrs, expectTableCellAttrs, expectTableRowAttrs, expectTextBoxAttrs, expectTextColorMarkAttrs, expectTextEffectMarkAttrs, expectTrackedChangeMarkAttrs, expectUnderlineMarkAttrs } from "../attrs/index.js";
|
|
4
4
|
import { ShapeOutlineStyleSchema, narrowEnum } from "../../docx/parserEnums.js";
|
|
5
5
|
import { numPrEqual } from "../../docx/numberingParser.js";
|
|
6
6
|
import { pixelsToEmu } from "../../utils/units.js";
|
|
@@ -806,7 +806,7 @@ function extractParagraphContent(paragraph, _documentCounts, emptyHyperlinks, te
|
|
|
806
806
|
content.push(createShapeRun(node));
|
|
807
807
|
} else if (node.type.name === "tab") {
|
|
808
808
|
flushCurrentInline();
|
|
809
|
-
content.push(createTabRun());
|
|
809
|
+
content.push(createTabRun(node));
|
|
810
810
|
} else if (node.type.name === "renderedPageBreak") {
|
|
811
811
|
flushCurrentInline();
|
|
812
812
|
content.push(createRenderedPageBreakRun());
|
|
@@ -870,7 +870,7 @@ function createTrackedChangeRun(node, marks) {
|
|
|
870
870
|
if (node.type.name === "hardBreak") return createBreakRun(readHardBreakType(node));
|
|
871
871
|
if (node.type.name === "image") return createImageRun(node);
|
|
872
872
|
if (node.type.name === "shape") return createShapeRun(node);
|
|
873
|
-
if (node.type.name === "tab") return createTabRun();
|
|
873
|
+
if (node.type.name === "tab") return createTabRun(node);
|
|
874
874
|
if (node.type.name === "renderedPageBreak") return createRenderedPageBreakRun();
|
|
875
875
|
return null;
|
|
876
876
|
}
|
|
@@ -979,7 +979,7 @@ function addNodeToHyperlink(hyperlink, node) {
|
|
|
979
979
|
return;
|
|
980
980
|
}
|
|
981
981
|
if (node.type.name === "tab") {
|
|
982
|
-
hyperlink.children.push(createTabRun(nonLinkMarks));
|
|
982
|
+
hyperlink.children.push(createTabRun(node, nonLinkMarks));
|
|
983
983
|
return;
|
|
984
984
|
}
|
|
985
985
|
if (node.type.name === "renderedPageBreak") {
|
|
@@ -1076,10 +1076,14 @@ function readHardBreakType(node) {
|
|
|
1076
1076
|
/**
|
|
1077
1077
|
* Create a Run containing a tab
|
|
1078
1078
|
*/
|
|
1079
|
-
function createTabRun(marks) {
|
|
1079
|
+
function createTabRun(node, marks) {
|
|
1080
|
+
const { positional } = expectTabAttrs(node);
|
|
1080
1081
|
const run = {
|
|
1081
1082
|
type: "run",
|
|
1082
|
-
content: [{
|
|
1083
|
+
content: [{
|
|
1084
|
+
type: "tab",
|
|
1085
|
+
...positional ? { positional } : {}
|
|
1086
|
+
}]
|
|
1083
1087
|
};
|
|
1084
1088
|
const formatting = getRunFormattingFromMarks(marks);
|
|
1085
1089
|
if (formatting) run.formatting = formatting;
|
|
@@ -1177,8 +1181,9 @@ function createImageRun(node) {
|
|
|
1177
1181
|
},
|
|
1178
1182
|
wrap
|
|
1179
1183
|
};
|
|
1180
|
-
if (attrs.
|
|
1181
|
-
if (attrs.
|
|
1184
|
+
if (attrs.docPrName != null) image.docPrName = attrs.docPrName;
|
|
1185
|
+
if (attrs.alt != null) image.alt = attrs.alt;
|
|
1186
|
+
if (attrs.title != null) image.title = attrs.title;
|
|
1182
1187
|
const imageTransform = parseTransformAttr(attrs.transform);
|
|
1183
1188
|
if (imageTransform) image.transform = imageTransform;
|
|
1184
1189
|
if (attrs.opacity != null) image.opacity = attrs.opacity;
|
|
@@ -1203,6 +1208,7 @@ function createImageRun(node) {
|
|
|
1203
1208
|
image.outline = outline;
|
|
1204
1209
|
}
|
|
1205
1210
|
if (attrs.hlinkHref) image.hlinkHref = attrs.hlinkHref;
|
|
1211
|
+
if (attrs.hlinkRId) image.hlinkRId = attrs.hlinkRId;
|
|
1206
1212
|
const cropTop = attrs.cropTop != null && attrs.cropTop > 0 ? attrs.cropTop : void 0;
|
|
1207
1213
|
const cropRight = attrs.cropRight != null && attrs.cropRight > 0 ? attrs.cropRight : void 0;
|
|
1208
1214
|
const cropBottom = attrs.cropBottom != null && attrs.cropBottom > 0 ? attrs.cropBottom : void 0;
|
|
@@ -1272,7 +1278,7 @@ function createShapeRun(node) {
|
|
|
1272
1278
|
}
|
|
1273
1279
|
else if (attrs.fillColor) shape.fill = {
|
|
1274
1280
|
type: attrs.fillType ?? "solid",
|
|
1275
|
-
color: { rgb: attrs.fillColor.replace("#", "") }
|
|
1281
|
+
color: attrs.fillColorValue ?? { rgb: attrs.fillColor.replace("#", "") }
|
|
1276
1282
|
};
|
|
1277
1283
|
else if (attrs.fillType === "none") shape.fill = { type: "none" };
|
|
1278
1284
|
if (attrs.outlineStyle !== "none" && (attrs.outlineWidth !== void 0 && attrs.outlineWidth > 0 || attrs.outlineColor || attrs.outlineStyle || attrs.outlineCap || attrs.outlineHeadEnd || attrs.outlineTailEnd)) {
|
|
@@ -1282,7 +1288,7 @@ function createShapeRun(node) {
|
|
|
1282
1288
|
if (attrs.outlineCap) shapeOutline.cap = attrs.outlineCap;
|
|
1283
1289
|
if (attrs.outlineHeadEnd) shapeOutline.headEnd = attrs.outlineHeadEnd;
|
|
1284
1290
|
if (attrs.outlineTailEnd) shapeOutline.tailEnd = attrs.outlineTailEnd;
|
|
1285
|
-
if (attrs.outlineColor) shapeOutline.color = { rgb: attrs.outlineColor.replace("#", "") };
|
|
1291
|
+
if (attrs.outlineColor) shapeOutline.color = attrs.outlineColorValue ?? { rgb: attrs.outlineColor.replace("#", "") };
|
|
1286
1292
|
shape.outline = shapeOutline;
|
|
1287
1293
|
}
|
|
1288
1294
|
return {
|
|
@@ -1347,6 +1353,7 @@ function marksToTextFormatting(marks) {
|
|
|
1347
1353
|
if (attrs.ascii) ff.ascii = attrs.ascii;
|
|
1348
1354
|
if (attrs.hAnsi) ff.hAnsi = attrs.hAnsi;
|
|
1349
1355
|
if (attrs.eastAsia) ff.eastAsia = attrs.eastAsia;
|
|
1356
|
+
if (attrs.hint) ff.hint = attrs.hint;
|
|
1350
1357
|
const csVal = attrs.cs || attrs.ascii;
|
|
1351
1358
|
if (csVal) ff.cs = csVal;
|
|
1352
1359
|
if (attrs.asciiTheme) ff.asciiTheme = attrs.asciiTheme;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { document_d_exports } from "../../types/document.js";
|
|
2
2
|
import { SdtAttrs } from "../schema/nodes.js";
|
|
3
|
-
|
|
4
3
|
//#region src/prosemirror/conversion/sdtAttrs.d.ts
|
|
5
4
|
declare const sdtAttrsFromProperties: (properties: document_d_exports.SdtProperties) => SdtAttrs;
|
|
6
5
|
declare const sdtPropertiesFromAttrs: (attrs: SdtAttrs) => document_d_exports.SdtProperties;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { document_d_exports } from "../../types/document.js";
|
|
2
2
|
import { schema } from "../schema/index.js";
|
|
3
3
|
import { Node } from "prosemirror-model";
|
|
4
|
-
|
|
5
4
|
//#region src/prosemirror/conversion/toProseDoc.d.ts
|
|
6
5
|
/**
|
|
7
6
|
* Options for document conversion
|
|
8
7
|
*/
|
|
9
8
|
type ToProseDocOptions = {
|
|
10
|
-
/** Style definitions for resolving paragraph styles */
|
|
9
|
+
/** Style definitions for resolving paragraph styles */
|
|
10
|
+
styles?: document_d_exports.StyleDefinitions;
|
|
11
|
+
/** Theme used when converting themed table/cell values in nested content. */
|
|
11
12
|
theme?: document_d_exports.Theme | null;
|
|
12
13
|
};
|
|
13
14
|
/**
|
|
@@ -7,6 +7,7 @@ import { sdtAttrsFromProperties } from "./sdtAttrs.js";
|
|
|
7
7
|
import { mergeTextFormatting } from "../../utils/textFormattingMerge.js";
|
|
8
8
|
import { mergeParagraphFormatting, mergeParagraphTabStops } from "../../utils/paragraphFormattingMerge.js";
|
|
9
9
|
import { createStyleEngine } from "../../style-engine/styleEngine.js";
|
|
10
|
+
import { resolveColorValueToHex } from "../../docx/drawingUtils.js";
|
|
10
11
|
import { buildRunFormattingOverrideAttrs } from "../extensions/marks/RunFormattingOverrideExtension.js";
|
|
11
12
|
import { schema } from "../schema/index.js";
|
|
12
13
|
import { resolveEffectiveTableCellFormatting } from "./effectiveTableCellFormatting.js";
|
|
@@ -1047,7 +1048,7 @@ function convertRunContent(content, marks, formatting, textBoxAnchors) {
|
|
|
1047
1048
|
if (content.breakType === "column") return [withHyperlinkBoundaryMarks(schema.node("hardBreak", { breakType: "column" }), marks)];
|
|
1048
1049
|
return [];
|
|
1049
1050
|
case "renderedPageBreak": return [schema.node("renderedPageBreak").mark(marks)];
|
|
1050
|
-
case "tab": return [schema.node("tab").mark(marks)];
|
|
1051
|
+
case "tab": return [schema.node("tab", content.positional ? { positional: content.positional } : void 0).mark(marks)];
|
|
1051
1052
|
case "drawing": return [withHyperlinkBoundaryMarks(convertImage(content.image, content.rawXml), marks)];
|
|
1052
1053
|
case "shape": {
|
|
1053
1054
|
const shp = content.shape;
|
|
@@ -1157,6 +1158,7 @@ function convertImage(image, rawXml) {
|
|
|
1157
1158
|
}
|
|
1158
1159
|
return schema.node("image", {
|
|
1159
1160
|
src: image.src || "",
|
|
1161
|
+
docPrName: image.docPrName,
|
|
1160
1162
|
alt: image.alt,
|
|
1161
1163
|
title: image.title,
|
|
1162
1164
|
width: widthPx,
|
|
@@ -1182,6 +1184,7 @@ function convertImage(image, rawXml) {
|
|
|
1182
1184
|
borderStyle,
|
|
1183
1185
|
wrapText,
|
|
1184
1186
|
hlinkHref: image.hlinkHref,
|
|
1187
|
+
hlinkRId: image.hlinkRId,
|
|
1185
1188
|
_docxRawXml: rawXml,
|
|
1186
1189
|
_docxObjectPreview: rawXml !== void 0 && /<(?:[A-Za-z_][\w.-]*:)?object(?:\s|>)/u.test(rawXml)
|
|
1187
1190
|
});
|
|
@@ -1233,6 +1236,7 @@ function textFormattingToMarks(formatting) {
|
|
|
1233
1236
|
hAnsi: formatting.fontFamily.hAnsi,
|
|
1234
1237
|
eastAsia: formatting.fontFamily.eastAsia,
|
|
1235
1238
|
cs: formatting.fontFamily.cs,
|
|
1239
|
+
hint: formatting.fontFamily.hint,
|
|
1236
1240
|
asciiTheme: formatting.fontFamily.asciiTheme,
|
|
1237
1241
|
hAnsiTheme: formatting.fontFamily.hAnsiTheme,
|
|
1238
1242
|
eastAsiaTheme: formatting.fontFamily.eastAsiaTheme,
|
|
@@ -1272,13 +1276,17 @@ function convertShape(shape) {
|
|
|
1272
1276
|
const heightPx = shapeSize?.height ? emuToPixels(shapeSize.height) : 80;
|
|
1273
1277
|
const shapeAttrs = shape;
|
|
1274
1278
|
let fillColor;
|
|
1279
|
+
let fillColorValue;
|
|
1275
1280
|
let fillType = "solid";
|
|
1276
1281
|
let gradientType;
|
|
1277
1282
|
let gradientAngle;
|
|
1278
1283
|
let gradientStops;
|
|
1279
1284
|
if (shape.fill) {
|
|
1280
1285
|
fillType = shape.fill.type;
|
|
1281
|
-
if (shape.fill.color
|
|
1286
|
+
if (shape.fill.color) {
|
|
1287
|
+
fillColorValue = shape.fill.color;
|
|
1288
|
+
fillColor = resolveColorValueToHex(shape.fill.color);
|
|
1289
|
+
}
|
|
1282
1290
|
if (shape.fill.type === "gradient" && shape.fill.gradient) {
|
|
1283
1291
|
const g = shape.fill.gradient;
|
|
1284
1292
|
gradientType = g.type;
|
|
@@ -1291,13 +1299,17 @@ function convertShape(shape) {
|
|
|
1291
1299
|
}
|
|
1292
1300
|
let outlineWidth;
|
|
1293
1301
|
let outlineColor;
|
|
1302
|
+
let outlineColorValue;
|
|
1294
1303
|
let outlineStyle = "none";
|
|
1295
1304
|
let outlineCap;
|
|
1296
1305
|
let outlineHeadEnd;
|
|
1297
1306
|
let outlineTailEnd;
|
|
1298
1307
|
if (shape.outline) {
|
|
1299
1308
|
if (shape.outline.width) outlineWidth = Math.round(shape.outline.width / 914400 * 96 * 100) / 100;
|
|
1300
|
-
if (shape.outline.color
|
|
1309
|
+
if (shape.outline.color) {
|
|
1310
|
+
outlineColorValue = shape.outline.color;
|
|
1311
|
+
outlineColor = resolveColorValueToHex(shape.outline.color);
|
|
1312
|
+
}
|
|
1301
1313
|
outlineStyle = shape.outline.style || "solid";
|
|
1302
1314
|
outlineCap = shape.outline.cap;
|
|
1303
1315
|
outlineHeadEnd = shape.outline.headEnd;
|
|
@@ -1335,12 +1347,14 @@ function convertShape(shape) {
|
|
|
1335
1347
|
width: widthPx,
|
|
1336
1348
|
height: heightPx,
|
|
1337
1349
|
fillColor,
|
|
1350
|
+
fillColorValue,
|
|
1338
1351
|
fillType,
|
|
1339
1352
|
gradientType,
|
|
1340
1353
|
gradientAngle,
|
|
1341
1354
|
gradientStops,
|
|
1342
1355
|
outlineWidth,
|
|
1343
1356
|
outlineColor,
|
|
1357
|
+
outlineColorValue,
|
|
1344
1358
|
outlineStyle,
|
|
1345
1359
|
outlineCap,
|
|
1346
1360
|
outlineHeadEnd,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { AnyExtension, CommandMap } from "./types.js";
|
|
2
2
|
import { Command, Plugin } from "prosemirror-state";
|
|
3
3
|
import { Schema } from "prosemirror-model";
|
|
4
|
-
|
|
5
4
|
//#region src/prosemirror/extensions/ExtensionManager.d.ts
|
|
6
5
|
declare class ExtensionManager {
|
|
7
6
|
private readonly extensions;
|