@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
|
@@ -2,35 +2,61 @@ import { document_d_exports } from "../../../types/document.js";
|
|
|
2
2
|
import { OutlineStyleAttr } from "../../../types/documentEnumValues.js";
|
|
3
3
|
import { NodeExtension } from "../types.js";
|
|
4
4
|
import { ImagePositionAttrs, TextBoxAttrs as TextBoxAttrs$1 } from "../../schema/nodes.js";
|
|
5
|
-
|
|
6
5
|
//#region src/prosemirror/extensions/nodes/TextBoxExtension.d.ts
|
|
7
6
|
type TextBoxAttrs = {
|
|
8
|
-
/** Width in pixels */
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
7
|
+
/** Width in pixels */
|
|
8
|
+
width?: number;
|
|
9
|
+
/** Height in pixels */
|
|
10
|
+
height?: number;
|
|
11
|
+
/** Text fitting behavior */
|
|
12
|
+
autoFit?: document_d_exports.ShapeTextBody["autoFit"];
|
|
13
|
+
/** Unique identifier */
|
|
14
|
+
textBoxId?: string;
|
|
15
|
+
/** Fill color as CSS color */
|
|
16
|
+
fillColor?: string;
|
|
17
|
+
/** Outline width in pixels */
|
|
18
|
+
outlineWidth?: number;
|
|
19
|
+
/** Outline color as CSS color */
|
|
20
|
+
outlineColor?: string;
|
|
21
|
+
/** Outline dash style, or `"none"` for an explicit no-outline. */
|
|
22
|
+
outlineStyle?: OutlineStyleAttr;
|
|
23
|
+
/** Internal margin top in pixels */
|
|
24
|
+
marginTop?: number;
|
|
25
|
+
/** Internal margin bottom in pixels */
|
|
26
|
+
marginBottom?: number;
|
|
27
|
+
/** Internal margin left in pixels */
|
|
28
|
+
marginLeft?: number;
|
|
29
|
+
/** Internal margin right in pixels */
|
|
30
|
+
marginRight?: number;
|
|
31
|
+
/** Vertical text alignment */
|
|
32
|
+
verticalAlign?: string;
|
|
33
|
+
/** Display mode */
|
|
34
|
+
displayMode?: "inline" | "float" | "block";
|
|
35
|
+
/** CSS float direction */
|
|
36
|
+
cssFloat?: "left" | "right" | "none";
|
|
37
|
+
/** Wrap type */
|
|
38
|
+
wrapType?: document_d_exports.ImageWrap["type"];
|
|
39
|
+
/** OOXML wrapText direction for anchored text boxes (eigenpal #474). */
|
|
40
|
+
wrapText?: "bothSides" | "left" | "right" | "largest";
|
|
41
|
+
/** Wrap distance from top edge, in pixels (OOXML distT, EMU-converted). */
|
|
42
|
+
distTop?: number;
|
|
43
|
+
/** Wrap distance from bottom edge, in pixels. */
|
|
44
|
+
distBottom?: number;
|
|
45
|
+
/** Wrap distance from left edge, in pixels. */
|
|
46
|
+
distLeft?: number;
|
|
47
|
+
/** Wrap distance from right edge, in pixels. */
|
|
48
|
+
distRight?: number;
|
|
49
|
+
/** Position for floating/anchored text boxes. */
|
|
50
|
+
position?: ImagePositionAttrs;
|
|
51
|
+
/** Original DOCX placement hint for save-path reconstruction. */
|
|
52
|
+
_docxPlacement?: "standalone" | "inlineWithPrevious";
|
|
53
|
+
/** Original DOCX paragraph group for standalone text-box reconstruction. */
|
|
54
|
+
_docxGroupId?: string;
|
|
55
|
+
/** Inline anchor linking this block node to its source run position. */
|
|
56
|
+
_docxAnchorId?: string;
|
|
57
|
+
/** Original run-level revision wrapper for save-path reconstruction. */
|
|
58
|
+
_docxTrackedChange?: TextBoxAttrs$1["_docxTrackedChange"];
|
|
59
|
+
/** Original inline content-control ancestry for save-path reconstruction. */
|
|
34
60
|
_docxInlineSdts?: TextBoxAttrs$1["_docxInlineSdts"];
|
|
35
61
|
};
|
|
36
62
|
declare const TextBoxExtension: (options?: Partial<Record<string, unknown>> | undefined) => NodeExtension;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { FindOptions } from "../utils/findReplace.js";
|
|
2
2
|
import { Node } from "prosemirror-model";
|
|
3
|
-
|
|
4
3
|
//#region src/prosemirror/findReplaceSelection.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* Positional fields of a document search match that the range resolver needs.
|
|
@@ -11,8 +10,11 @@ import { Node } from "prosemirror-model";
|
|
|
11
10
|
* adapter-side type.
|
|
12
11
|
*/
|
|
13
12
|
type FindMatchPosition = {
|
|
14
|
-
/** Index of the paragraph containing the match. */
|
|
15
|
-
|
|
13
|
+
/** Index of the paragraph containing the match. */
|
|
14
|
+
paragraphIndex: number;
|
|
15
|
+
/** Character offset of the match start within the paragraph. */
|
|
16
|
+
startOffset: number;
|
|
17
|
+
/** Character offset of the match end within the paragraph. */
|
|
16
18
|
endOffset: number;
|
|
17
19
|
};
|
|
18
20
|
type FindMatchRange = {
|
|
@@ -12,14 +12,18 @@ import { addTabStop, alignCenter, alignJustify, alignLeft, alignRight, applyStyl
|
|
|
12
12
|
import { BorderPreset, TableBorderPreset, TableContextInfo, getTableContext, isInTable as isInTableCell } from "./extensions/nodes/TableExtension.js";
|
|
13
13
|
import { addColumnLeft, addColumnRight, addRowAbove, addRowBelow, applyTableStyle, autoFitContents, deleteColumn, deleteRow, deleteTable, distributeColumns, insertTable, mergeCells, removeTableBorders, selectColumn, selectRow, selectTable, setAllTableBorders, setCellBorder, setCellFillColor, setCellMargins, setCellTextDirection, setCellVerticalAlign, setInsideTableBorders, setOutsideTableBorders, setRowHeight, setTableBorderColor, setTableBorderPreset, setTableBorderWidth, setTableBorders, setTableProperties, splitCell, toggleHeaderRow, toggleNoWrap } from "./commands/table.js";
|
|
14
14
|
import { insertPageBreak } from "./commands/pageBreak.js";
|
|
15
|
+
import "./commands/index.js";
|
|
15
16
|
import { fromProseDoc, updateDocumentContent } from "./conversion/fromProseDoc.js";
|
|
16
17
|
import { ToProseDocOptions, createEmptyDoc, toProseDoc } from "./conversion/toProseDoc.js";
|
|
17
18
|
import { ProseMirrorDocumentValidationIssue, ValidateProseMirrorDocumentResult, assertValidProseMirrorDocument, formatProseMirrorDocumentIssues, validateProseMirrorDocument } from "./validation.js";
|
|
19
|
+
import "./conversion/index.js";
|
|
18
20
|
import { SelectionChangeCallback, SelectionContext, createSelectionTrackerPlugin, extractSelectionContext, getSelectionContext, selectionTrackerKey } from "./plugins/selectionTracker.js";
|
|
19
21
|
import { ensureParaIdsInState } from "./extensions/features/ParaIdAllocatorExtension.js";
|
|
20
22
|
import { ResolvedParagraphStyle, StyleResolver, createStyleResolver } from "./styles/styleResolver.js";
|
|
23
|
+
import "./styles/index.js";
|
|
21
24
|
import { SelectionState, extractSelectionState } from "./selectionState.js";
|
|
22
25
|
import { createDocumentStylesPlugin, documentStylesKey, getDocumentStyleResolver } from "./plugins/documentStyles.js";
|
|
26
|
+
import "./plugins/index.js";
|
|
23
27
|
import { insertPageBreakInView, insertTableInView, insertTableOfContentsInView } from "./insertOperations.js";
|
|
24
28
|
import { TextSelection } from "prosemirror-state";
|
|
25
29
|
export { type BorderPreset, type FontFamilyAttrs, type FontSizeAttrs, type HyperlinkAttrs, type ImageAttrs, PAINTABLE_MARK_NAMES, type ParagraphAttrs, type ProseMirrorDocumentValidationIssue, type ResolvedParagraphStyle, type SelectionChangeCallback, type SelectionContext, type SelectionState, StyleResolver, type TableBorderPreset, type TableContextInfo, type TextColorAttrs, TextSelection, type ToProseDocOptions, type UnderlineAttrs, type ValidateProseMirrorDocumentResult, addColumnLeft, addColumnRight, addRowAbove, addRowBelow, addTabStop, alignCenter, alignJustify, alignLeft, alignRight, applyFormatMarks, applyStyle, applyTableStyle, assertValidProseMirrorDocument, autoFitContents, captureFormatMarks, clearFontFamily, clearFontSize, clearFormatting, clearHighlight, clearStyle, clearTextColor, createDocumentStylesPlugin, createEmptyDoc, createSelectionTrackerPlugin, createStyleResolver, decreaseIndent, decreaseListLevel, deleteColumn, deleteRow, deleteTable, distributeColumns, documentStylesKey, ensureParaIdsInState, extractSelectionContext, extractSelectionState, formatProseMirrorDocumentIssues, fromProseDoc, generateTOC, getDocumentStyleResolver, getHyperlinkAttrs, getListInfo, getMarkAttr, getParagraphAlignment, getParagraphBidi, getSelectedText, getSelectionContext, getStyleId, getTableContext, increaseIndent, increaseListLevel, insertHyperlink, insertImageFromFile, insertPageBreak, insertPageBreakInView, insertTable, insertTableInView, insertTableOfContentsInView, isHyperlinkActive, isInList, isInTableCell as isInTable, isMarkActive, mergeCells, removeHyperlink, removeList, removeTabStop, removeTableBorders, schema, selectColumn, selectRow, selectTable, selectionTrackerKey, setAlignment, setAllTableBorders, setCellBorder, setCellFillColor, setCellMargins, setCellTextDirection, setCellVerticalAlign, setFontFamily, setFontSize, setHighlight, setHyperlink, setIndentFirstLine, setIndentLeft, setIndentRight, setInsideTableBorders, setLineSpacing, setLtr, setOutsideTableBorders, setRowHeight, setRtl, setTableBorderColor, setTableBorderPreset, setTableBorderWidth, setTableBorders, setTableProperties, setTextColor, singletonManager, splitCell, toProseDoc, toggleBidi, toggleBold, toggleBulletList, toggleHeaderRow, toggleItalic, toggleNoWrap, toggleNumberedList, toggleStrike, toggleSubscript, toggleSuperscript, toggleUnderline, updateDocumentContent, validateProseMirrorDocument };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { insertImageFromFile } from "./commands/image.js";
|
|
2
2
|
import { EditorView } from "prosemirror-view";
|
|
3
|
-
|
|
4
3
|
//#region src/prosemirror/insertOperations.d.ts
|
|
5
4
|
/** Insert a `rows × columns` table at the current selection. */
|
|
6
5
|
declare function insertTableInView(view: EditorView, rows: number, columns: number): boolean;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Plugin, PluginKey } from "prosemirror-state";
|
|
2
2
|
import { DecorationSet } from "prosemirror-view";
|
|
3
|
-
|
|
4
3
|
//#region src/prosemirror/plugins/aiCitationDecorations.d.ts
|
|
5
4
|
declare const aiCitationDecorationsKey: PluginKey<AICitationDecorationState>;
|
|
6
5
|
declare const SET_META = "set";
|
|
7
6
|
declare const ACTIVE_META = "active";
|
|
8
7
|
type AICitationRange = {
|
|
9
|
-
/** Stable id from the thread message. */
|
|
8
|
+
/** Stable id from the thread message. */
|
|
9
|
+
id: string;
|
|
10
10
|
from: number;
|
|
11
11
|
to: number;
|
|
12
12
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { AISuggestion, AISuggestionSeverity } from "../../ai-suggestions/types.js";
|
|
2
2
|
import { Plugin, PluginKey } from "prosemirror-state";
|
|
3
3
|
import { DecorationSet } from "prosemirror-view";
|
|
4
|
-
|
|
5
4
|
//#region src/prosemirror/plugins/aiSuggestionDecorations.d.ts
|
|
6
5
|
declare const aiSuggestionDecorationsKey: PluginKey<AISuggestionDecorationState>;
|
|
7
6
|
declare const SET_META = "set";
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import { EditorState, Plugin, PluginKey } from "prosemirror-state";
|
|
2
|
-
|
|
3
2
|
//#region src/prosemirror/plugins/anonymizationDecorations.d.ts
|
|
4
3
|
type AnonymizationTerm = {
|
|
5
|
-
/** Canonical surface form, displayed in tooltips. */
|
|
6
|
-
|
|
4
|
+
/** Canonical surface form, displayed in tooltips. */
|
|
5
|
+
canonical: string;
|
|
6
|
+
/** Label slug (e.g. "person", "organization"). */
|
|
7
|
+
label: string;
|
|
8
|
+
/** Optional alternate surface forms also matched verbatim. */
|
|
7
9
|
variants?: readonly string[];
|
|
8
10
|
};
|
|
9
11
|
type AnonymizationMatch = {
|
|
10
|
-
/** Inclusive PM doc position of the match start. */
|
|
12
|
+
/** Inclusive PM doc position of the match start. */
|
|
13
|
+
from: number;
|
|
14
|
+
/** Exclusive PM doc position of the match end. */
|
|
11
15
|
to: number;
|
|
12
16
|
label: string;
|
|
13
17
|
canonical: string;
|
|
@@ -37,9 +41,7 @@ type AnonymizationPluginOptions = {
|
|
|
37
41
|
*/
|
|
38
42
|
onMatchesChange?: (matches: readonly AnonymizationMatch[]) => void;
|
|
39
43
|
};
|
|
40
|
-
declare const createAnonymizationDecorationsPlugin: ({
|
|
41
|
-
onMatchesChange
|
|
42
|
-
}?: AnonymizationPluginOptions) => Plugin<AnonymizationDecorationState>;
|
|
44
|
+
declare const createAnonymizationDecorationsPlugin: ({ onMatchesChange }?: AnonymizationPluginOptions) => Plugin<AnonymizationDecorationState>;
|
|
43
45
|
declare const setAnonymizationTermsMeta: (terms: readonly AnonymizationTerm[]) => {
|
|
44
46
|
key: PluginKey<AnonymizationDecorationState>;
|
|
45
47
|
payload: {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { EditorState, Plugin, PluginKey, Transaction } from "prosemirror-state";
|
|
2
2
|
import { DecorationSet } from "prosemirror-view";
|
|
3
|
-
|
|
4
3
|
//#region src/prosemirror/plugins/autocompleteSuggestion.d.ts
|
|
5
4
|
type AutocompleteSuggestionStatus = "idle" | "streaming" | "shown";
|
|
6
5
|
type AutocompleteSuggestionState = {
|
|
@@ -101,7 +100,8 @@ type AutocompleteTriggerCheck = {
|
|
|
101
100
|
*/
|
|
102
101
|
declare const DEFAULT_AUTOCOMPLETE_DEAD_ZONE_NODES: readonly string[];
|
|
103
102
|
type AutocompleteTriggerOptions = {
|
|
104
|
-
/** Additional node type names to treat as dead zones. */
|
|
103
|
+
/** Additional node type names to treat as dead zones. */
|
|
104
|
+
extraDeadZoneNodes?: readonly string[];
|
|
105
105
|
};
|
|
106
106
|
/**
|
|
107
107
|
* Decide whether autocomplete should fire at the current cursor.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ContentControlBoundError, ContentControlLockedError, ContentControlTypeError } from "../../content-controls/errors.js";
|
|
2
|
+
import "../../content-controls/index.js";
|
|
2
3
|
import { Plugin, PluginKey } from "prosemirror-state";
|
|
3
4
|
import { EditorView } from "prosemirror-view";
|
|
4
|
-
|
|
5
5
|
//#region src/prosemirror/plugins/contentControlWidgets.d.ts
|
|
6
6
|
type ContentControlWidgetAnchor = {
|
|
7
7
|
getBoundingClientRect: () => {
|
|
@@ -11,7 +11,8 @@ type ContentControlWidgetAnchor = {
|
|
|
11
11
|
};
|
|
12
12
|
type ContentControlWidgetEvent = {
|
|
13
13
|
kind: "dropdownOpen";
|
|
14
|
-
tag: string;
|
|
14
|
+
tag: string;
|
|
15
|
+
/** PM position of the clicked SDT instance — disambiguates duplicates. */
|
|
15
16
|
pmPos: number;
|
|
16
17
|
sdtType: "dropdown" | "comboBox";
|
|
17
18
|
anchor: ContentControlWidgetAnchor;
|
|
@@ -62,11 +63,7 @@ declare const CONTENT_CONTROL_WIDGET_EVENT_NAME = "folio:content-control-widget"
|
|
|
62
63
|
* tree. Both surfaces carry the same `data-sdt-*` projection, so adapters only
|
|
63
64
|
* need to forward the click and render the resulting typed event.
|
|
64
65
|
*/
|
|
65
|
-
declare const handleContentControlWidgetClick: ({
|
|
66
|
-
event,
|
|
67
|
-
onEvent,
|
|
68
|
-
view
|
|
69
|
-
}: HandleContentControlWidgetClickOptions) => boolean;
|
|
66
|
+
declare const handleContentControlWidgetClick: ({ event, onEvent, view }: HandleContentControlWidgetClickOptions) => boolean;
|
|
70
67
|
declare function createContentControlWidgetsPlugin(onEvent?: ContentControlWidgetCallback): Plugin;
|
|
71
68
|
/**
|
|
72
69
|
* Stable resolver helpers exposed for the UI shell so a popover menu or
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { EditorState, Plugin, PluginKey } from "prosemirror-state";
|
|
2
2
|
import { Node } from "prosemirror-model";
|
|
3
|
-
|
|
4
3
|
//#region src/prosemirror/plugins/createDocScanPlugin.d.ts
|
|
5
4
|
declare const SET_META = "set";
|
|
6
5
|
type DocScanState<TConfig, TRange> = {
|
|
@@ -9,7 +8,8 @@ type DocScanState<TConfig, TRange> = {
|
|
|
9
8
|
};
|
|
10
9
|
type DocScanPluginOptions<TConfig, TRange> = {
|
|
11
10
|
key: PluginKey<DocScanState<TConfig, TRange>>;
|
|
12
|
-
initialConfig: TConfig;
|
|
11
|
+
initialConfig: TConfig;
|
|
12
|
+
/** Recompute the ranges from the current doc + config. */
|
|
13
13
|
scan: (doc: Node, config: TConfig) => TRange[];
|
|
14
14
|
/**
|
|
15
15
|
* Push-side bridge for hosts that mirror the current range list
|
|
@@ -19,12 +19,7 @@ type DocScanPluginOptions<TConfig, TRange> = {
|
|
|
19
19
|
*/
|
|
20
20
|
onRangesChange?: (ranges: readonly TRange[]) => void;
|
|
21
21
|
};
|
|
22
|
-
declare const createDocScanPlugin: <TConfig, TRange>({
|
|
23
|
-
key,
|
|
24
|
-
initialConfig,
|
|
25
|
-
scan,
|
|
26
|
-
onRangesChange
|
|
27
|
-
}: DocScanPluginOptions<TConfig, TRange>) => Plugin<DocScanState<TConfig, TRange>>;
|
|
22
|
+
declare const createDocScanPlugin: <TConfig, TRange>({ key, initialConfig, scan, onRangesChange }: DocScanPluginOptions<TConfig, TRange>) => Plugin<DocScanState<TConfig, TRange>>;
|
|
28
23
|
declare const setDocScanConfigMeta: <TConfig, TRange>(key: PluginKey<DocScanState<TConfig, TRange>>, config: TConfig) => {
|
|
29
24
|
key: PluginKey<DocScanState<TConfig, TRange>>;
|
|
30
25
|
payload: {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { document_d_exports } from "../../types/document.js";
|
|
2
2
|
import { StyleResolver } from "../styles/styleResolver.js";
|
|
3
3
|
import { EditorState, Plugin, PluginKey } from "prosemirror-state";
|
|
4
|
-
|
|
5
4
|
//#region src/prosemirror/plugins/documentStyles.d.ts
|
|
6
5
|
declare const documentStylesKey: PluginKey<StyleResolver | null>;
|
|
7
6
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Node } from "prosemirror-model";
|
|
2
|
-
|
|
3
2
|
//#region src/prosemirror/plugins/pmTextScan.d.ts
|
|
4
3
|
type TextChunk = {
|
|
5
|
-
text: string;
|
|
4
|
+
text: string;
|
|
5
|
+
/** PM doc position where this chunk's first char lives. */
|
|
6
6
|
start: number;
|
|
7
7
|
};
|
|
8
8
|
/**
|
|
@@ -1,22 +1,33 @@
|
|
|
1
1
|
import { document_d_exports } from "../../types/document.js";
|
|
2
2
|
import { EditorState, Plugin, PluginKey } from "prosemirror-state";
|
|
3
|
-
|
|
4
3
|
//#region src/prosemirror/plugins/selectionTracker.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* Selection context for toolbar state
|
|
7
6
|
*/
|
|
8
7
|
type SelectionContext = {
|
|
9
|
-
/** Whether there's a non-collapsed selection */
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
8
|
+
/** Whether there's a non-collapsed selection */
|
|
9
|
+
hasSelection: boolean;
|
|
10
|
+
/** Whether selection spans multiple paragraphs */
|
|
11
|
+
isMultiParagraph: boolean;
|
|
12
|
+
/** Current text formatting at cursor/selection */
|
|
13
|
+
textFormatting: document_d_exports.TextFormatting;
|
|
14
|
+
/** Current paragraph formatting */
|
|
15
|
+
paragraphFormatting: document_d_exports.ParagraphFormatting;
|
|
16
|
+
/** Start paragraph index */
|
|
17
|
+
startParagraphIndex: number;
|
|
18
|
+
/** End paragraph index */
|
|
19
|
+
endParagraphIndex: number;
|
|
20
|
+
/** Whether cursor is in a list */
|
|
21
|
+
inList: boolean;
|
|
22
|
+
/** List type if in list */
|
|
23
|
+
listType?: "bullet" | "numbered";
|
|
24
|
+
/** List level (0-8) */
|
|
25
|
+
listLevel?: number;
|
|
26
|
+
/** Active comment IDs at cursor position */
|
|
27
|
+
activeCommentIds: number[];
|
|
28
|
+
/** Whether cursor is inside a tracked insertion */
|
|
29
|
+
inInsertion: boolean;
|
|
30
|
+
/** Whether cursor is inside a tracked deletion */
|
|
20
31
|
inDeletion: boolean;
|
|
21
32
|
};
|
|
22
33
|
/**
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { EditorState, Plugin, PluginKey, Transaction } from "prosemirror-state";
|
|
2
2
|
import { Slice } from "prosemirror-model";
|
|
3
3
|
import { EditorView } from "prosemirror-view";
|
|
4
|
-
|
|
5
4
|
//#region src/prosemirror/plugins/suggestionMode.d.ts
|
|
6
5
|
declare const suggestionModeKey: PluginKey<SuggestionModeState>;
|
|
7
6
|
declare const SUGGESTION_META = "suggestionModeApplied";
|
|
@@ -2,14 +2,18 @@ import { DocScanState } from "./createDocScanPlugin.js";
|
|
|
2
2
|
import { EditorState, PluginKey } from "prosemirror-state";
|
|
3
3
|
import { Node } from "prosemirror-model";
|
|
4
4
|
import { DirectiveKind } from "@stll/template-conditions";
|
|
5
|
-
|
|
6
5
|
//#region src/prosemirror/plugins/templateDirectives.d.ts
|
|
7
6
|
type DirectiveRange = {
|
|
8
|
-
/** Inclusive PM doc position of the marker start. */
|
|
7
|
+
/** Inclusive PM doc position of the marker start. */
|
|
8
|
+
from: number;
|
|
9
|
+
/** Exclusive PM doc position of the marker end. */
|
|
9
10
|
to: number;
|
|
10
|
-
kind: DirectiveKind;
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
kind: DirectiveKind;
|
|
12
|
+
/** Field path, clause name, or condition/loop expression. */
|
|
13
|
+
expr: string;
|
|
14
|
+
/** Clause-slot version selector, e.g. "v3" or "latest". */
|
|
15
|
+
clauseVersion?: string;
|
|
16
|
+
/** True for block directives that occupy their own paragraph. */
|
|
13
17
|
block: boolean;
|
|
14
18
|
};
|
|
15
19
|
/**
|
|
@@ -37,9 +41,7 @@ declare const templateDirectivesKey: PluginKey<DocScanState<undefined, Directive
|
|
|
37
41
|
type TemplateDirectivesPluginOptions = {
|
|
38
42
|
onRangesChange?: (ranges: readonly DirectiveRange[]) => void;
|
|
39
43
|
};
|
|
40
|
-
declare const createTemplateDirectivesPlugin: ({
|
|
41
|
-
onRangesChange
|
|
42
|
-
}?: TemplateDirectivesPluginOptions) => import("prosemirror-state").Plugin<DocScanState<undefined, DirectiveRange>>;
|
|
44
|
+
declare const createTemplateDirectivesPlugin: ({ onRangesChange }?: TemplateDirectivesPluginOptions) => import("prosemirror-state").Plugin<DocScanState<undefined, DirectiveRange>>;
|
|
43
45
|
declare const getTemplateDirectives: (state: EditorState) => readonly DirectiveRange[];
|
|
44
46
|
//#endregion
|
|
45
47
|
export { type DirectiveKind, DirectiveRange, TemplateDirectivesPluginOptions, computeBlockDepths, createTemplateDirectivesPlugin, getTemplateDirectives, scanDirectives, templateDirectivesKey };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Plugin, PluginKey } from "prosemirror-state";
|
|
2
2
|
import { DecorationSet, EditorView } from "prosemirror-view";
|
|
3
|
-
|
|
4
3
|
//#region src/prosemirror/plugins/templatePreviewValues.d.ts
|
|
5
4
|
/** One formatted span of a rich preview value. The flags layer over the
|
|
6
5
|
* marker's host formatting: a host-bold marker keeps its bold, a span's
|
|
@@ -22,7 +21,9 @@ declare const templatePreviewValueText: (value: TemplatePreviewValue) => string;
|
|
|
22
21
|
* value with the same text. */
|
|
23
22
|
declare const templatePreviewValueFingerprint: (value: TemplatePreviewValue) => string;
|
|
24
23
|
type TemplatePreviewValues = {
|
|
25
|
-
/** Field path → value to display in place of `{{path}}` markers. */
|
|
24
|
+
/** Field path → value to display in place of `{{path}}` markers. */
|
|
25
|
+
values: Record<string, TemplatePreviewValue>;
|
|
26
|
+
/** `highlighted` marks substitutions with the preview accent. */
|
|
26
27
|
mode: "highlighted" | "plain";
|
|
27
28
|
};
|
|
28
29
|
/**
|
|
@@ -31,9 +32,13 @@ type TemplatePreviewValues = {
|
|
|
31
32
|
* PM decorations) can project the same substitutions onto its overlay.
|
|
32
33
|
*/
|
|
33
34
|
type TemplatePreviewEntry = {
|
|
34
|
-
/** Inclusive PM doc position of the marker start. */
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
/** Inclusive PM doc position of the marker start. */
|
|
36
|
+
from: number;
|
|
37
|
+
/** Exclusive PM doc position of the marker end. */
|
|
38
|
+
to: number;
|
|
39
|
+
/** Field path the marker resolves to. */
|
|
40
|
+
expr: string;
|
|
41
|
+
/** The typed value displayed in place of the marker. */
|
|
37
42
|
value: TemplatePreviewValue;
|
|
38
43
|
};
|
|
39
44
|
type TemplatePreviewState = {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { EditorState, Plugin, PluginKey, Transaction } from "prosemirror-state";
|
|
2
|
-
|
|
3
2
|
//#region src/prosemirror/plugins/templateSlashMenu.d.ts
|
|
4
3
|
type TemplateSlashMenuState = {
|
|
5
4
|
active: false;
|
|
@@ -19,7 +18,8 @@ type TemplateSlashMenuState = {
|
|
|
19
18
|
*/
|
|
20
19
|
type TemplateSlashMenuKeyAction = "up" | "down" | "forward" | "back" | "commit" | "dismiss";
|
|
21
20
|
type TemplateSlashMenuPluginOptions = {
|
|
22
|
-
/** Fires whenever the trigger state changes (open, query edit, close). */
|
|
21
|
+
/** Fires whenever the trigger state changes (open, query edit, close). */
|
|
22
|
+
onChange?: (state: TemplateSlashMenuState) => void;
|
|
23
23
|
/**
|
|
24
24
|
* Resolve a navigation/commit key while the menu is open. Returns `true` when
|
|
25
25
|
* the host consumed it (so the plugin swallows the event).
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { CharacterSpacingAttrs, CharacterStyleAttrs, CommentAttrs, EmphasisMarkAttrs, FontFamilyAttrs, FontSizeAttrs, FootnoteRefAttrs, HighlightAttrs, HyperlinkAttrs, LanguageAttrs, RunFormattingOverrideAttrs, RunPropertyChangeMarkAttrs, RunShadingAttrs, StrikeAttrs, TextColorAttrs, TextEffectAttrs, TrackedChangeMarkAttrs, UnderlineAttrs } from "./marks.js";
|
|
2
2
|
import { ExtensionManager } from "../extensions/ExtensionManager.js";
|
|
3
|
-
import { BlockSdtAttrs, FieldAttrs, HardBreakAttrs, ImageAttrs, ImagePositionAttrs, MathAttrs, ParagraphAttrs, SdtAttrs, ShapeAttrs, TableAttrs, TableCellAttrs, TableRowAttrs, TextBoxAttrs } from "./nodes.js";
|
|
4
|
-
|
|
3
|
+
import { BlockSdtAttrs, FieldAttrs, HardBreakAttrs, ImageAttrs, ImagePositionAttrs, MathAttrs, ParagraphAttrs, SdtAttrs, ShapeAttrs, TabAttrs, TableAttrs, TableCellAttrs, TableRowAttrs, TextBoxAttrs } from "./nodes.js";
|
|
5
4
|
//#region src/prosemirror/schema/index.d.ts
|
|
6
5
|
declare const singletonManager: ExtensionManager;
|
|
7
6
|
declare const schema: import("prosemirror-model").Schema<any, any>;
|
|
@@ -12,4 +11,4 @@ type DocxSchema = typeof schema;
|
|
|
12
11
|
type DocxNode = ReturnType<typeof schema.node>;
|
|
13
12
|
type DocxMark = ReturnType<typeof schema.mark>;
|
|
14
13
|
//#endregion
|
|
15
|
-
export { type BlockSdtAttrs, type CharacterSpacingAttrs, type CharacterStyleAttrs, type CommentAttrs, DocxMark, DocxNode, DocxSchema, type EmphasisMarkAttrs, type FieldAttrs, type FontFamilyAttrs, type FontSizeAttrs, type FootnoteRefAttrs, type HardBreakAttrs, type HighlightAttrs, type HyperlinkAttrs, type ImageAttrs, type ImagePositionAttrs, type LanguageAttrs, type MathAttrs, type ParagraphAttrs, type RunFormattingOverrideAttrs, type RunPropertyChangeMarkAttrs, type RunShadingAttrs, type SdtAttrs, type ShapeAttrs, type StrikeAttrs, type TableAttrs, type TableCellAttrs, type TableRowAttrs, type TextBoxAttrs, type TextColorAttrs, type TextEffectAttrs, type TrackedChangeMarkAttrs, type UnderlineAttrs, schema, singletonManager };
|
|
14
|
+
export { type BlockSdtAttrs, type CharacterSpacingAttrs, type CharacterStyleAttrs, type CommentAttrs, DocxMark, DocxNode, DocxSchema, type EmphasisMarkAttrs, type FieldAttrs, type FontFamilyAttrs, type FontSizeAttrs, type FootnoteRefAttrs, type HardBreakAttrs, type HighlightAttrs, type HyperlinkAttrs, type ImageAttrs, type ImagePositionAttrs, type LanguageAttrs, type MathAttrs, type ParagraphAttrs, type RunFormattingOverrideAttrs, type RunPropertyChangeMarkAttrs, type RunShadingAttrs, type SdtAttrs, type ShapeAttrs, type StrikeAttrs, type TabAttrs, type TableAttrs, type TableCellAttrs, type TableRowAttrs, type TextBoxAttrs, type TextColorAttrs, type TextEffectAttrs, type TrackedChangeMarkAttrs, type UnderlineAttrs, schema, singletonManager };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { document_d_exports } from "../../types/document.js";
|
|
2
2
|
import { ShadingProperties } from "../../types/colors.js";
|
|
3
|
-
|
|
4
3
|
//#region src/prosemirror/schema/marks.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* Text color mark attributes
|
|
@@ -35,6 +34,7 @@ type FontFamilyAttrs = {
|
|
|
35
34
|
hAnsi?: string;
|
|
36
35
|
eastAsia?: string;
|
|
37
36
|
cs?: string;
|
|
37
|
+
hint?: NonNullable<NonNullable<document_d_exports.TextFormatting["fontFamily"]>["hint"]>;
|
|
38
38
|
asciiTheme?: string;
|
|
39
39
|
hAnsiTheme?: string;
|
|
40
40
|
eastAsiaTheme?: string;
|
|
@@ -101,9 +101,11 @@ type TrackedChangeProvenance = (typeof TRACKED_CHANGE_PROVENANCE_VALUES)[number]
|
|
|
101
101
|
type TrackedChangeMarkAttrs = {
|
|
102
102
|
revisionId: number;
|
|
103
103
|
author: string;
|
|
104
|
-
date?: string;
|
|
104
|
+
date?: string;
|
|
105
|
+
/** Optional author initials (w:initials) carried through the round-trip. */
|
|
105
106
|
initials?: string;
|
|
106
|
-
moveKind?: "moveTo" | "moveFrom";
|
|
107
|
+
moveKind?: "moveTo" | "moveFrom";
|
|
108
|
+
/** Defaults to `"user"`; `"suggested"` for AI-proposed, non-serialized edits. */
|
|
107
109
|
provenance: TrackedChangeProvenance;
|
|
108
110
|
/**
|
|
109
111
|
* Groups every mark belonging to one logical suggestion so the host can
|
|
@@ -114,11 +116,12 @@ type TrackedChangeMarkAttrs = {
|
|
|
114
116
|
};
|
|
115
117
|
/** Run-property revisions carried through the editable model. */
|
|
116
118
|
type RunPropertyChangeMarkAttrs = {
|
|
117
|
-
changes: document_d_exports.RunPropertyChange[];
|
|
119
|
+
changes: document_d_exports.RunPropertyChange[];
|
|
120
|
+
/** See {@link TrackedChangeProvenance}. Defaults to `"user"`. */
|
|
118
121
|
provenance: TrackedChangeProvenance;
|
|
119
122
|
suggestionId?: string;
|
|
120
123
|
};
|
|
121
|
-
type RunFormattingOverrideAttrs = { [K in keyof Pick<document_d_exports.TextFormatting, "bold" | "italic" | "strike" | "doubleStrike" | "allCaps" | "smallCaps" | "hidden" | "emboss" | "imprint" | "shadow" | "outline" | "rtl">]?: false } & {
|
|
124
|
+
type RunFormattingOverrideAttrs = { [K in keyof Pick<document_d_exports.TextFormatting, "bold" | "italic" | "strike" | "doubleStrike" | "allCaps" | "smallCaps" | "hidden" | "emboss" | "imprint" | "shadow" | "outline" | "rtl">]?: false; } & {
|
|
122
125
|
underline?: "none";
|
|
123
126
|
};
|
|
124
127
|
/**
|