@stll/folio-core 0.15.0 → 0.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai-edits/apply.d.ts +2 -2
- package/dist/ai-edits/blockRange.d.ts +3 -17
- package/dist/ai-edits/clean-text.d.ts +0 -1
- package/dist/ai-edits/headless.d.ts +23 -19
- package/dist/ai-edits/read.d.ts +8 -5
- package/dist/ai-edits/scoped-reading.d.ts +0 -1
- package/dist/ai-edits/snapshot.d.ts +1 -7
- package/dist/ai-edits/table-cell-mutations.d.ts +4 -31
- package/dist/ai-edits/table-row-column-mutations.d.ts +9 -39
- package/dist/ai-edits/table-targets.d.ts +0 -1
- package/dist/ai-edits/types.d.ts +32 -17
- package/dist/ai-suggestions/apply.d.ts +0 -1
- package/dist/ai-suggestions/conflict.d.ts +0 -1
- package/dist/ai-suggestions/text-positions.d.ts +2 -2
- package/dist/ai-suggestions/types.d.ts +27 -13
- package/dist/content-controls/errors.d.ts +0 -1
- package/dist/content-controls/findContentControls.d.ts +6 -4
- package/dist/content-controls/mutateContentControls.d.ts +0 -1
- package/dist/controller/activeEditorStory.d.ts +1 -6
- package/dist/controller/collaborationModules.d.ts +0 -1
- package/dist/controller/contentControlWidgetController.d.ts +0 -1
- package/dist/controller/folioEditor.d.ts +2 -2
- package/dist/controller/folioEditorEvents.d.ts +5 -3
- package/dist/controller/fontReadiness.d.ts +0 -1
- package/dist/controller/headerFooterEditorManager.d.ts +1 -5
- package/dist/controller/hiddenEditorApi.d.ts +35 -18
- package/dist/controller/hiddenEditorManager.d.ts +5 -3
- package/dist/controller/latestRequestGate.d.ts +3 -1
- package/dist/controller/layoutPipeline.d.ts +1 -1
- package/dist/controller/layoutScheduler.d.ts +8 -5
- package/dist/controller/layoutSession.d.ts +0 -1
- package/dist/controller/noteEditorManager.d.ts +0 -1
- package/dist/document-operations.d.ts +5 -12
- package/dist/document-stories.d.ts +0 -1
- package/dist/docx/blockContentParser.d.ts +0 -1
- package/dist/docx/blockContentParser.js +1 -0
- package/dist/docx/bookmarkParser.d.ts +5 -3
- package/dist/docx/bookmarkPlacement.d.ts +0 -1
- package/dist/docx/commentParser.d.ts +0 -1
- package/dist/docx/commentRangeIntegrity.d.ts +0 -1
- package/dist/docx/commentReferenceNormalization.d.ts +1 -9
- package/dist/docx/commentReplyMarkers.d.ts +0 -1
- package/dist/docx/compatibility.d.ts +0 -1
- package/dist/docx/conformance.d.ts +0 -1
- package/dist/docx/corePropertiesParser.d.ts +0 -1
- package/dist/docx/documentParser.d.ts +0 -1
- package/dist/docx/documentParser.js +3 -1
- package/dist/docx/drawingUtils.d.ts +23 -2
- package/dist/docx/drawingUtils.js +23 -1
- package/dist/docx/encryption/agileDecryption.d.ts +0 -1
- package/dist/docx/encryption/cryptoBytes.js +4 -1
- package/dist/docx/encryption/openEncryptedDocx.d.ts +5 -2
- package/dist/docx/ensureParaIds.d.ts +7 -3
- package/dist/docx/fieldParser.d.ts +23 -11
- package/dist/docx/fontTableParser.d.ts +0 -1
- package/dist/docx/footnoteParser.d.ts +26 -13
- package/dist/docx/footnoteParser.js +4 -2
- package/dist/docx/groupDrawingParser.d.ts +0 -1
- package/dist/docx/headerFooterParser.d.ts +9 -5
- package/dist/docx/headerFooterRefParser.d.ts +0 -1
- package/dist/docx/headerFooterReferenceNormalization.d.ts +1 -6
- package/dist/docx/headerFooterVerbatim.d.ts +2 -2
- package/dist/docx/hyperlinkParser.d.ts +0 -1
- package/dist/docx/hyperlinkParser.js +1 -9
- package/dist/docx/imageParser.d.ts +0 -1
- package/dist/docx/imageParser.js +15 -7
- package/dist/docx/mathToMathml.d.ts +0 -1
- package/dist/docx/metadataPrivacy.d.ts +1 -3
- package/dist/docx/modelValidation.d.ts +0 -1
- package/dist/docx/newImage.d.ts +11 -0
- package/dist/docx/newImage.js +11 -0
- package/dist/docx/normalizeBaseDirection.d.ts +0 -1
- package/dist/docx/notePropertiesParser.d.ts +0 -1
- package/dist/docx/numberingParser.d.ts +10 -6
- package/dist/docx/numberingParser.js +4 -2
- package/dist/docx/numberingReferenceNormalization.d.ts +1 -9
- package/dist/docx/paragraphParser.d.ts +0 -1
- package/dist/docx/paragraphParser.js +27 -14
- package/dist/docx/paragraphTextBoxEnrichment.d.ts +0 -1
- package/dist/docx/paragraphTextBoxEnrichment.js +2 -1
- package/dist/docx/paragraphTraversal.d.ts +1 -8
- package/dist/docx/parser.d.ts +15 -8
- package/dist/docx/parser.js +12 -1
- package/dist/docx/parserEnums.d.ts +2 -2
- package/dist/docx/parserEnums.js +3 -2
- package/dist/docx/relsParser.d.ts +1 -0
- package/dist/docx/renderedPageBreakNormalization.d.ts +12 -0
- package/dist/docx/renderedPageBreakNormalization.js +59 -0
- package/dist/docx/replyToComment.d.ts +2 -2
- package/dist/docx/rezip.d.ts +6 -7
- package/dist/docx/rezip.js +136 -102
- package/dist/docx/runConsolidator.d.ts +0 -1
- package/dist/docx/runParser.d.ts +0 -1
- package/dist/docx/runParser.js +9 -12
- package/dist/docx/sdtProperties.d.ts +0 -1
- package/dist/docx/sdtPropertiesPatch.d.ts +0 -1
- package/dist/docx/sectionParser.d.ts +0 -1
- package/dist/docx/selectiveSave.d.ts +5 -3
- package/dist/docx/selectiveSave.js +2 -2
- package/dist/docx/selectiveSaveFlags.d.ts +4 -2
- package/dist/docx/selectiveXmlPatch.js +20 -8
- package/dist/docx/serializer/blockSdtSerializer.d.ts +0 -1
- package/dist/docx/serializer/blockSdtSerializer.js +2 -1
- package/dist/docx/serializer/borderSerializer.d.ts +0 -1
- package/dist/docx/serializer/commentSerializer.d.ts +0 -1
- package/dist/docx/serializer/commentSerializer.js +11 -37
- package/dist/docx/serializer/documentSerializer.d.ts +0 -1
- package/dist/docx/serializer/documentSerializer.js +1 -1
- package/dist/docx/serializer/fontTableSerializer.d.ts +0 -1
- package/dist/docx/serializer/headerFooterSerializer.d.ts +0 -1
- package/dist/docx/serializer/headerFooterSerializer.js +1 -1
- package/dist/docx/serializer/noteSerializer.d.ts +0 -1
- package/dist/docx/serializer/noteSerializer.js +1 -1
- package/dist/docx/serializer/numberingSerializer.d.ts +0 -1
- package/dist/docx/serializer/paragraphSerializer.d.ts +0 -1
- package/dist/docx/serializer/paragraphSerializer.js +10 -23
- package/dist/docx/serializer/runSerializer.d.ts +0 -1
- package/dist/docx/serializer/runSerializer.js +37 -22
- package/dist/docx/serializer/sectionPropertiesSerializer.d.ts +0 -1
- package/dist/docx/serializer/sectionPropertiesSerializer.js +5 -4
- package/dist/docx/serializer/settingsSerializer.d.ts +0 -1
- package/dist/docx/serializer/stylesSerializer.d.ts +0 -1
- package/dist/docx/serializer/tableSerializer.d.ts +0 -1
- package/dist/docx/serializer/tableSerializer.js +2 -0
- package/dist/docx/serializer/themeSerializer.d.ts +0 -1
- package/dist/docx/serializer/xmlUtils.js +10 -1
- package/dist/docx/server/applyDocxXmlPatchProposal.d.ts +3 -10
- package/dist/docx/server/docxToMarkdown.d.ts +0 -1
- package/dist/docx/server/evaluateDocxXmlPatchProposal.d.ts +3 -9
- package/dist/docx/server/inspectDocxPackage.d.ts +3 -8
- package/dist/docx/server/validateDocxConformance.d.ts +0 -1
- package/dist/docx/settingsParser.d.ts +2 -2
- package/dist/docx/shapeParser.d.ts +0 -1
- package/dist/docx/shapeParser.js +11 -10
- package/dist/docx/streamingXmlParser.d.ts +16 -0
- package/dist/docx/streamingXmlParser.js +248 -0
- package/dist/docx/styleParser.d.ts +0 -1
- package/dist/docx/styleParser.js +6 -4
- package/dist/docx/tableParser.d.ts +1 -2
- package/dist/docx/tableParser.js +3 -6
- package/dist/docx/textBoxParser.d.ts +1 -2
- package/dist/docx/textBoxParser.js +4 -1
- package/dist/docx/textWhitespace.d.ts +4 -0
- package/dist/docx/textWhitespace.js +4 -0
- package/dist/docx/themeParser.d.ts +0 -1
- package/dist/docx/trackedMoveRangeNormalization.d.ts +1 -8
- package/dist/docx/unzip.d.ts +6 -3
- package/dist/docx/unzip.js +96 -40
- package/dist/docx/vmlImageParser.d.ts +0 -1
- package/dist/docx/vmlImageParser.js +3 -1
- package/dist/docx/watermarkParser.d.ts +0 -1
- package/dist/docx/xmlParser.d.ts +21 -8
- package/dist/docx/xmlParser.js +126 -43
- package/dist/fields/bookmarkPages.d.ts +0 -1
- package/dist/fields/bookmarkText.d.ts +0 -1
- package/dist/fields/evaluateField.d.ts +5 -3
- package/dist/fields/fieldContext.d.ts +11 -5
- package/dist/fields/resolveFieldValues.d.ts +4 -3
- package/dist/fields/sectionPageCounts.d.ts +0 -1
- package/dist/fields/seqValues.d.ts +0 -1
- package/dist/fonts/embeddedFontTable.d.ts +5 -2
- package/dist/fonts/embeddedFonts.d.ts +15 -7
- package/dist/index.d.ts +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 +2 -2
- package/dist/prosemirror/attrs/index.js +5 -0
- package/dist/prosemirror/autospacingBase.d.ts +0 -1
- package/dist/prosemirror/cellDragSelection.d.ts +6 -4
- package/dist/prosemirror/commands/comments.d.ts +6 -4
- package/dist/prosemirror/commands/contentControls.d.ts +5 -3
- package/dist/prosemirror/commands/contentControlsBlockFill.d.ts +1 -1
- package/dist/prosemirror/commands/formatPainter.d.ts +0 -1
- package/dist/prosemirror/commands/formatting.d.ts +1 -1
- package/dist/prosemirror/commands/hyperlink.d.ts +4 -9
- package/dist/prosemirror/commands/image.d.ts +0 -1
- package/dist/prosemirror/commands/pageBreak.d.ts +0 -1
- package/dist/prosemirror/commands/paragraph.d.ts +0 -1
- package/dist/prosemirror/commands/pastePlainText.d.ts +0 -1
- package/dist/prosemirror/commands/propertyChangeScope.d.ts +0 -1
- package/dist/prosemirror/commands/sectionBreak.d.ts +0 -1
- package/dist/prosemirror/commands/table.d.ts +0 -1
- package/dist/prosemirror/commands/tableCellMergeResolution.d.ts +0 -1
- package/dist/prosemirror/commentIdAllocator.d.ts +2 -2
- package/dist/prosemirror/commentOps.d.ts +0 -1
- package/dist/prosemirror/conversion/effectiveTableCellFormatting.d.ts +1 -10
- package/dist/prosemirror/conversion/fromProseDoc.d.ts +0 -1
- package/dist/prosemirror/conversion/fromProseDoc.js +7 -4
- package/dist/prosemirror/conversion/runShadingMark.d.ts +0 -1
- package/dist/prosemirror/conversion/sdtAttrs.d.ts +0 -1
- package/dist/prosemirror/conversion/toProseDoc.d.ts +3 -2
- package/dist/prosemirror/conversion/toProseDoc.js +16 -2
- package/dist/prosemirror/extensions/ExtensionManager.d.ts +0 -1
- package/dist/prosemirror/extensions/StarterKit.d.ts +7 -4
- package/dist/prosemirror/extensions/core/DocExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/core/HistoryExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/core/ParagraphExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/core/TextExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/create.d.ts +0 -1
- package/dist/prosemirror/extensions/features/AutoBidiDetectionExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/features/BaseKeymapExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/features/BidiShortcutExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/features/ContentControlWidgetsExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/features/DropCursorExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/features/EmptyParagraphFormatExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/features/GapCursorExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/features/ImageDragExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/features/ImagePasteExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/features/ListExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/features/ParaIdAllocatorExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/features/ParagraphChangeTrackerExtension.d.ts +7 -4
- package/dist/prosemirror/extensions/features/PasteCleanupExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/features/PasteStyleInlinerExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/features/SelectionTrackerExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/features/bidiShortcutController.d.ts +3 -1
- package/dist/prosemirror/extensions/marks/AllCapsExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/marks/BoldExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/marks/CharacterSpacingExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/marks/CharacterStyleExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/marks/CommentExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/marks/FontFamilyExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/marks/FontFamilyExtension.js +1 -0
- package/dist/prosemirror/extensions/marks/FontSizeExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/marks/FootnoteRefExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/marks/HiddenTextExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/marks/HighlightExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/marks/HyperlinkExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/marks/ItalicExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/marks/LanguageExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/marks/RtlExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/marks/RunFormattingOverrideExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/marks/RunShadingExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/marks/SmallCapsExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/marks/StrikeExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/marks/SubscriptExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/marks/SuperscriptExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/marks/TextColorExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/marks/TextEffectExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/marks/TextEffectsExtensions.d.ts +0 -1
- package/dist/prosemirror/extensions/marks/TrackedChangeExtensions.d.ts +0 -1
- package/dist/prosemirror/extensions/marks/UnderlineExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/marks/markUtils.d.ts +0 -1
- package/dist/prosemirror/extensions/marks/markUtils.js +4 -1
- package/dist/prosemirror/extensions/nodes/BlockSdtExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/nodes/FieldExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/nodes/HardBreakExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/nodes/HorizontalRuleExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/nodes/ImageExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/nodes/ImageExtension.js +2 -0
- package/dist/prosemirror/extensions/nodes/MathExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/nodes/PageBreakExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/nodes/RenderedPageBreakExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/nodes/SdtExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/nodes/ShapeExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/nodes/ShapeExtension.js +2 -0
- package/dist/prosemirror/extensions/nodes/TabExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/nodes/TableExtension.d.ts +4 -3
- package/dist/prosemirror/extensions/nodes/TextBoxAnchorExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/nodes/TextBoxExtension.d.ts +53 -27
- package/dist/prosemirror/extensions/types.d.ts +0 -1
- package/dist/prosemirror/findReplaceSelection.d.ts +5 -3
- package/dist/prosemirror/imageCommit.d.ts +0 -1
- package/dist/prosemirror/index.d.ts +4 -0
- package/dist/prosemirror/insertOperations.d.ts +0 -1
- package/dist/prosemirror/paraText.d.ts +0 -1
- package/dist/prosemirror/plugins/aiCitationDecorations.d.ts +2 -2
- package/dist/prosemirror/plugins/aiSuggestionDecorations.d.ts +0 -1
- package/dist/prosemirror/plugins/anonymizationDecorations.d.ts +9 -7
- package/dist/prosemirror/plugins/autocompleteSuggestion.d.ts +2 -2
- package/dist/prosemirror/plugins/contentControlWidgets.d.ts +4 -7
- package/dist/prosemirror/plugins/createDocScanPlugin.d.ts +3 -8
- package/dist/prosemirror/plugins/documentStyles.d.ts +0 -1
- package/dist/prosemirror/plugins/pmTextScan.d.ts +2 -2
- package/dist/prosemirror/plugins/revisionIds.d.ts +0 -1
- package/dist/prosemirror/plugins/selectionTracker.d.ts +23 -12
- package/dist/prosemirror/plugins/suggestionMode.d.ts +0 -1
- package/dist/prosemirror/plugins/templateDirectives.d.ts +10 -8
- package/dist/prosemirror/plugins/templatePreviewValues.d.ts +10 -5
- package/dist/prosemirror/plugins/templateSlashMenu.d.ts +2 -2
- package/dist/prosemirror/queries.d.ts +0 -1
- package/dist/prosemirror/schema/index.d.ts +0 -1
- package/dist/prosemirror/schema/marks.d.ts +8 -5
- package/dist/prosemirror/schema/nodes.d.ts +340 -163
- package/dist/prosemirror/selectionState.d.ts +13 -7
- package/dist/prosemirror/styles/resolvedStyleAttrs.d.ts +0 -1
- package/dist/prosemirror/styles/styleResolver.d.ts +3 -2
- package/dist/prosemirror/tableCellMergeRevision.d.ts +0 -1
- package/dist/prosemirror/tableResize.d.ts +0 -1
- package/dist/prosemirror/textBoxAnchorAttrs.d.ts +0 -1
- package/dist/prosemirror/utils/extractTrackedChanges.d.ts +8 -5
- package/dist/prosemirror/utils/findParagraphByParaId.d.ts +0 -1
- package/dist/prosemirror/utils/tabCalculator.d.ts +18 -7
- package/dist/prosemirror/utils/visualLineNavigation.d.ts +0 -1
- package/dist/prosemirror/validation.d.ts +0 -1
- package/dist/redline.d.ts +16 -8
- package/dist/render-dom/BodySelectionOverlay.d.ts +1 -9
- package/dist/render-dom/HeaderFooterSelectionOverlay.d.ts +0 -1
- package/dist/render-dom/RemoteSelectionOverlay.d.ts +1 -8
- package/dist/render-dom/resolveSidebarItemPositions.d.ts +1 -9
- package/dist/style-engine/styleEngine.d.ts +21 -11
- package/dist/style-sets/extract.d.ts +4 -3
- package/dist/style-sets/stellaStyle.d.ts +0 -1
- package/dist/style-sets/types.d.ts +0 -1
- package/dist/symbols.d.ts +6 -2
- package/dist/types/block-id.d.ts +3 -6
- package/dist/types/document.d.ts +0 -3
- package/dist/types/documentEnumValues.d.ts +2 -1
- package/dist/types/documentEnumValues.js +6 -1
- package/dist/utils/clipboard.d.ts +17 -8
- package/dist/utils/colorResolver.d.ts +9 -5
- package/dist/utils/createDocument.d.ts +19 -10
- package/dist/utils/documentLoaderBehavior.d.ts +1 -5
- package/dist/utils/docxInput.js +1 -0
- package/dist/utils/findReplace.d.ts +0 -1
- package/dist/utils/fontFamilyMerge.d.ts +0 -1
- package/dist/utils/fontResolver.d.ts +10 -4
- package/dist/utils/formatToStyle.d.ts +0 -1
- package/dist/utils/headerFooter.d.ts +8 -16
- package/dist/utils/headingCollector.d.ts +7 -4
- package/dist/utils/mergeDocumentContent.d.ts +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
package/dist/ai-edits/apply.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { FolioAIEditApplyMode, FolioAIEditApplyResult, FolioAIEditOperation, FolioAIEditSnapshot } from "./types.js";
|
|
2
2
|
import { EditorState, Transaction } from "prosemirror-state";
|
|
3
|
-
|
|
4
3
|
//#region src/ai-edits/apply.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* The only editor surface the apply logic touches: a current `state`
|
|
@@ -20,7 +19,8 @@ type ApplyFolioAIEditOperationsOptions = {
|
|
|
20
19
|
snapshot: FolioAIEditSnapshot;
|
|
21
20
|
operations: FolioAIEditOperation[];
|
|
22
21
|
mode?: FolioAIEditApplyMode;
|
|
23
|
-
author?: string;
|
|
22
|
+
author?: string;
|
|
23
|
+
/** Optional author initials (w:initials) stamped alongside the author. */
|
|
24
24
|
initials?: string;
|
|
25
25
|
createCommentId?: (text: string) => number;
|
|
26
26
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { FolioAIEditSnapshot, FolioAITextRangeHandle } from "./types.js";
|
|
2
2
|
import { Node } from "prosemirror-model";
|
|
3
|
-
|
|
4
3
|
//#region src/ai-edits/blockRange.d.ts
|
|
5
4
|
type DocPositionRange = {
|
|
6
5
|
from: number;
|
|
@@ -11,22 +10,14 @@ type ResolveFolioAIBlockRangeOptions = {
|
|
|
11
10
|
doc: Node;
|
|
12
11
|
snapshot?: FolioAIEditSnapshot | null | undefined;
|
|
13
12
|
};
|
|
14
|
-
declare const resolveFolioAIBlockRange: ({
|
|
15
|
-
blockId,
|
|
16
|
-
doc,
|
|
17
|
-
snapshot
|
|
18
|
-
}: ResolveFolioAIBlockRangeOptions) => DocPositionRange | null;
|
|
13
|
+
declare const resolveFolioAIBlockRange: ({ blockId, doc, snapshot }: ResolveFolioAIBlockRangeOptions) => DocPositionRange | null;
|
|
19
14
|
type ResolveFolioAITextRangeOptions = {
|
|
20
15
|
range: FolioAITextRangeHandle;
|
|
21
16
|
doc: Node;
|
|
22
17
|
snapshot?: FolioAIEditSnapshot | null | undefined;
|
|
23
18
|
};
|
|
24
19
|
/** Resolve and validate a stable text-range handle against the live document. */
|
|
25
|
-
declare const resolveFolioAITextRange: ({
|
|
26
|
-
range,
|
|
27
|
-
doc,
|
|
28
|
-
snapshot
|
|
29
|
-
}: ResolveFolioAITextRangeOptions) => DocPositionRange | null;
|
|
20
|
+
declare const resolveFolioAITextRange: ({ range, doc, snapshot }: ResolveFolioAITextRangeOptions) => DocPositionRange | null;
|
|
30
21
|
type ResolvePassageRangeOptions = {
|
|
31
22
|
blockId: string;
|
|
32
23
|
text: string;
|
|
@@ -48,12 +39,7 @@ type ResolvePassageRangeOptions = {
|
|
|
48
39
|
* match wins. Returns null when the block does not resolve, is not a textblock,
|
|
49
40
|
* the needle is empty, or the text does not occur in the block.
|
|
50
41
|
*/
|
|
51
|
-
declare const resolvePassageRange: ({
|
|
52
|
-
blockId,
|
|
53
|
-
text,
|
|
54
|
-
doc,
|
|
55
|
-
snapshot
|
|
56
|
-
}: ResolvePassageRangeOptions) => DocPositionRange | null;
|
|
42
|
+
declare const resolvePassageRange: ({ blockId, text, doc, snapshot }: ResolvePassageRangeOptions) => DocPositionRange | null;
|
|
57
43
|
/**
|
|
58
44
|
* Clamp a `{from, to}` pair so both endpoints fit inside a document of
|
|
59
45
|
* `docSize` (in PM content positions). Block-boundary snapshots and stale
|
|
@@ -2,16 +2,18 @@ import { FolioAIBlock, FolioAIEditApplyMode, FolioAIEditApplyResult, FolioAIEdit
|
|
|
2
2
|
import { document_d_exports } from "../types/document.js";
|
|
3
3
|
import { FolioDocumentOperationBatch, FolioDocumentOperationResult, FolioDocumentOperationUndoHandle, FolioDocumentOperationUndoResult } from "../document-operations.js";
|
|
4
4
|
import { FolioReviewChange, FolioReviewChangeKind } from "./read.js";
|
|
5
|
-
|
|
6
5
|
//#region src/ai-edits/headless.d.ts
|
|
7
6
|
/** Options for {@link FolioDocxReviewer.fromBuffer}. */
|
|
8
7
|
type FolioDocxReviewerOptions = {
|
|
9
|
-
/** Default author for tracked changes and comments. (default: `"AI"`) */
|
|
8
|
+
/** Default author for tracked changes and comments. (default: `"AI"`) */
|
|
9
|
+
author?: string;
|
|
10
|
+
/** Password for Agile-encrypted .docx files (Office 2010+). */
|
|
10
11
|
password?: string | undefined;
|
|
11
12
|
};
|
|
12
13
|
/** Options for {@link FolioDocxReviewer.applyOperations}. */
|
|
13
14
|
type FolioApplyOperationsOptions = {
|
|
14
|
-
/** `"tracked-changes"` (default) produces ins/del redlines; `"direct"` edits in place. */
|
|
15
|
+
/** `"tracked-changes"` (default) produces ins/del redlines; `"direct"` edits in place. */
|
|
16
|
+
mode?: FolioAIEditApplyMode;
|
|
15
17
|
/**
|
|
16
18
|
* The snapshot the `operations`' block ids were built against. Omit to
|
|
17
19
|
* snapshot the reviewer's current state — correct for the common flow of
|
|
@@ -98,7 +100,9 @@ type FolioReviewCommentReply = {
|
|
|
98
100
|
};
|
|
99
101
|
/** Input for {@link FolioDocxReviewer.replyTo}. */
|
|
100
102
|
type FolioReviewReplyInput = {
|
|
101
|
-
/** Reply body text. */
|
|
103
|
+
/** Reply body text. */
|
|
104
|
+
text: string;
|
|
105
|
+
/** Reply author; defaults to the reviewer's author. */
|
|
102
106
|
author?: string;
|
|
103
107
|
initials?: string;
|
|
104
108
|
};
|
|
@@ -106,11 +110,15 @@ type FolioReviewReplyInput = {
|
|
|
106
110
|
type FolioReviewComment = {
|
|
107
111
|
id: number;
|
|
108
112
|
author: string;
|
|
109
|
-
date: string | null;
|
|
110
|
-
|
|
111
|
-
|
|
113
|
+
date: string | null;
|
|
114
|
+
/** The comment body text, its paragraphs joined by newlines. */
|
|
115
|
+
text: string;
|
|
116
|
+
/** The document text the comment is anchored to, or `""` when unanchored. */
|
|
117
|
+
anchoredText: string;
|
|
118
|
+
/** Stable id of the anchored body block, or `null` when the anchor is absent. */
|
|
112
119
|
blockId: string | null;
|
|
113
|
-
replies: FolioReviewCommentReply[];
|
|
120
|
+
replies: FolioReviewCommentReply[];
|
|
121
|
+
/** Whether the comment is marked resolved / done. */
|
|
114
122
|
done: boolean;
|
|
115
123
|
};
|
|
116
124
|
/** Filter for {@link FolioDocxReviewer.getComments}. */
|
|
@@ -166,10 +174,7 @@ declare class FolioDocxReviewer {
|
|
|
166
174
|
/** Read one story through an immutable reviewed-view projection. */
|
|
167
175
|
readReviewedStory(options?: FolioReadReviewedStoryOptions): FolioReviewedStory | null;
|
|
168
176
|
/** Resolve one editable story to its original or final state. */
|
|
169
|
-
resolveReviewedStory({
|
|
170
|
-
story,
|
|
171
|
-
view
|
|
172
|
-
}: FolioResolveReviewedStoryOptions): boolean;
|
|
177
|
+
resolveReviewedStory({ story, view }: FolioResolveReviewedStoryOptions): boolean;
|
|
173
178
|
/**
|
|
174
179
|
* Apply operations against the current state. Reuses the live-editor applier
|
|
175
180
|
* verbatim via a headless `{ state, dispatch }` seam; the resulting state
|
|
@@ -184,11 +189,7 @@ declare class FolioDocxReviewer {
|
|
|
184
189
|
*/
|
|
185
190
|
applyDocumentOperations(batch: FolioDocumentOperationBatch, options?: FolioApplyDocumentOperationsOptions): FolioDocumentOperationResult;
|
|
186
191
|
/** Apply a versioned operation batch to one editable document story. */
|
|
187
|
-
applyDocumentOperationsToStory({
|
|
188
|
-
story,
|
|
189
|
-
batch,
|
|
190
|
-
snapshot
|
|
191
|
-
}: FolioApplyDocumentOperationsToStoryOptions): FolioDocumentOperationResult;
|
|
192
|
+
applyDocumentOperationsToStory({ story, batch, snapshot }: FolioApplyDocumentOperationsToStoryOptions): FolioDocumentOperationResult;
|
|
192
193
|
private applyDocumentOperationsInternal;
|
|
193
194
|
/** Undo the latest unchanged document-operation batch and its created comments. */
|
|
194
195
|
undoDocumentOperations(undoHandle: FolioDocumentOperationUndoHandle): FolioDocumentOperationUndoResult;
|
|
@@ -328,7 +329,9 @@ declare class FolioDocxReviewer {
|
|
|
328
329
|
}
|
|
329
330
|
/** Options for {@link applyFolioAIEditsToBuffer}. */
|
|
330
331
|
type ApplyFolioAIEditsToBufferOptions = {
|
|
331
|
-
/** Default author for tracked changes and comments. (default: `"AI"`) */
|
|
332
|
+
/** Default author for tracked changes and comments. (default: `"AI"`) */
|
|
333
|
+
author?: string;
|
|
334
|
+
/** `"tracked-changes"` (default) produces ins/del redlines; `"direct"` edits in place. */
|
|
332
335
|
mode?: FolioAIEditApplyMode;
|
|
333
336
|
/**
|
|
334
337
|
* The snapshot the `operations`' block ids were built against. Omit to
|
|
@@ -340,7 +343,8 @@ type ApplyFolioAIEditsToBufferOptions = {
|
|
|
340
343
|
};
|
|
341
344
|
/** Result of {@link applyFolioAIEditsToBuffer}. */
|
|
342
345
|
type ApplyFolioAIEditsToBufferResult = FolioAIEditApplyResult & {
|
|
343
|
-
/** The reviewed `.docx` as a new buffer. */
|
|
346
|
+
/** The reviewed `.docx` as a new buffer. */
|
|
347
|
+
buffer: ArrayBuffer;
|
|
344
348
|
};
|
|
345
349
|
/**
|
|
346
350
|
* One-shot headless review: parse `buffer`, apply `operations`, and return the
|
package/dist/ai-edits/read.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Node } from "prosemirror-model";
|
|
2
|
-
|
|
3
2
|
//#region src/ai-edits/read.d.ts
|
|
4
3
|
type FolioReviewChangeKind = "insertion" | "deletion" | "formatting" | "rowInserted" | "rowDeleted" | "cellInserted" | "cellDeleted" | "cellMerged";
|
|
5
4
|
/** A tracked change discovered in the document body. */
|
|
@@ -11,8 +10,10 @@ type FolioReviewChange = {
|
|
|
11
10
|
*/
|
|
12
11
|
id: number;
|
|
13
12
|
type: FolioReviewChangeKind;
|
|
14
|
-
author: string;
|
|
15
|
-
|
|
13
|
+
author: string;
|
|
14
|
+
/** ISO date the change was authored, or `null` when the source omitted it. */
|
|
15
|
+
date: string | null;
|
|
16
|
+
/** Affected text, including row or cell content for structural revisions. */
|
|
16
17
|
text: string;
|
|
17
18
|
/**
|
|
18
19
|
* Stable id of the containing body block (Word `w14:paraId` or `seq-NNNN`).
|
|
@@ -23,8 +24,10 @@ type FolioReviewChange = {
|
|
|
23
24
|
};
|
|
24
25
|
/** A comment anchor (the ranged text a comment marks) discovered in the body. */
|
|
25
26
|
type FolioCommentAnchor = {
|
|
26
|
-
commentId: number;
|
|
27
|
-
|
|
27
|
+
commentId: number;
|
|
28
|
+
/** Stable id of the anchored body block, or `null` when the anchor is absent. */
|
|
29
|
+
blockId: string | null;
|
|
30
|
+
/** The document text the comment is anchored to. */
|
|
28
31
|
quote: string;
|
|
29
32
|
};
|
|
30
33
|
/**
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { FolioAIEditSnapshot, FolioDocumentOutline, FolioDocumentSectionHandle, FolioDocumentSectionReadResult } from "./types.js";
|
|
2
|
-
|
|
3
2
|
//#region src/ai-edits/scoped-reading.d.ts
|
|
4
3
|
/** Build a flat, ordered outline with stable handles and explicit parents. */
|
|
5
4
|
declare const getFolioDocumentOutline: (snapshot: FolioAIEditSnapshot) => FolioDocumentOutline;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { FolioAIEditSnapshot, FolioAITextRangeHandle } from "./types.js";
|
|
2
2
|
import { Node } from "prosemirror-model";
|
|
3
|
-
|
|
4
3
|
//#region src/ai-edits/snapshot.d.ts
|
|
5
4
|
declare const normalizeFolioAIBlockText: (text: string) => string;
|
|
6
5
|
declare const hashFolioAIBlockText: (text: string) => string;
|
|
@@ -10,12 +9,7 @@ type CreateFolioAITextRangeHandleOptions = {
|
|
|
10
9
|
startOffset: number;
|
|
11
10
|
endOffset: number;
|
|
12
11
|
};
|
|
13
|
-
declare const createFolioAITextRangeHandle: ({
|
|
14
|
-
blockId,
|
|
15
|
-
text,
|
|
16
|
-
startOffset,
|
|
17
|
-
endOffset
|
|
18
|
-
}: CreateFolioAITextRangeHandleOptions) => FolioAITextRangeHandle | null;
|
|
12
|
+
declare const createFolioAITextRangeHandle: ({ blockId, text, startOffset, endOffset }: CreateFolioAITextRangeHandleOptions) => FolioAITextRangeHandle | null;
|
|
19
13
|
declare const createFolioAIEditSnapshot: (doc: Node) => FolioAIEditSnapshot;
|
|
20
14
|
//#endregion
|
|
21
15
|
export { createFolioAIEditSnapshot, createFolioAITextRangeHandle, hashFolioAIBlockText, normalizeFolioAIBlockText };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { TableRectangle } from "./table-mutation-plan.js";
|
|
2
2
|
import { Transaction } from "prosemirror-state";
|
|
3
3
|
import { Node } from "prosemirror-model";
|
|
4
|
-
|
|
5
4
|
//#region src/ai-edits/table-cell-mutations.d.ts
|
|
6
5
|
type TableCellRectangleMutationOptions = {
|
|
7
6
|
tr: Transaction;
|
|
@@ -14,35 +13,9 @@ type TrackedTableCellRectangleMutationOptions = TableCellRectangleMutationOption
|
|
|
14
13
|
author: string;
|
|
15
14
|
date: string;
|
|
16
15
|
};
|
|
17
|
-
declare const mergeTableRectangle: ({
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
rectangle
|
|
22
|
-
}: TableCellRectangleMutationOptions) => Transaction | null;
|
|
23
|
-
declare const mergeTrackedVerticalTableCells: ({
|
|
24
|
-
tr,
|
|
25
|
-
tablePosition,
|
|
26
|
-
table,
|
|
27
|
-
rectangle,
|
|
28
|
-
revisionId,
|
|
29
|
-
author,
|
|
30
|
-
date
|
|
31
|
-
}: TrackedTableCellRectangleMutationOptions) => Transaction | null;
|
|
32
|
-
declare const splitTableRectangle: ({
|
|
33
|
-
tr,
|
|
34
|
-
tablePosition,
|
|
35
|
-
table,
|
|
36
|
-
rectangle
|
|
37
|
-
}: TableCellRectangleMutationOptions) => Transaction | null;
|
|
38
|
-
declare const splitTrackedVerticalTableCell: ({
|
|
39
|
-
tr,
|
|
40
|
-
tablePosition,
|
|
41
|
-
table,
|
|
42
|
-
rectangle,
|
|
43
|
-
revisionId,
|
|
44
|
-
author,
|
|
45
|
-
date
|
|
46
|
-
}: TrackedTableCellRectangleMutationOptions) => Transaction | null;
|
|
16
|
+
declare const mergeTableRectangle: ({ tr, tablePosition, table, rectangle }: TableCellRectangleMutationOptions) => Transaction | null;
|
|
17
|
+
declare const mergeTrackedVerticalTableCells: ({ tr, tablePosition, table, rectangle, revisionId, author, date }: TrackedTableCellRectangleMutationOptions) => Transaction | null;
|
|
18
|
+
declare const splitTableRectangle: ({ tr, tablePosition, table, rectangle }: TableCellRectangleMutationOptions) => Transaction | null;
|
|
19
|
+
declare const splitTrackedVerticalTableCell: ({ tr, tablePosition, table, rectangle, revisionId, author, date }: TrackedTableCellRectangleMutationOptions) => Transaction | null;
|
|
47
20
|
//#endregion
|
|
48
21
|
export { mergeTableRectangle, mergeTrackedVerticalTableCells, splitTableRectangle, splitTrackedVerticalTableCell };
|
|
@@ -2,7 +2,6 @@ import { TrackedChangeProvenance } from "../prosemirror/schema/marks.js";
|
|
|
2
2
|
import { TableRowTarget } from "./table-targets.js";
|
|
3
3
|
import { Transaction } from "prosemirror-state";
|
|
4
4
|
import { Node } from "prosemirror-model";
|
|
5
|
-
|
|
6
5
|
//#region src/ai-edits/table-row-column-mutations.d.ts
|
|
7
6
|
type TableRowInsertion = {
|
|
8
7
|
tableStart: number;
|
|
@@ -20,7 +19,8 @@ type TableColumnDeletion = TableColumnInsertion;
|
|
|
20
19
|
type TableStructureRevision = {
|
|
21
20
|
revisionId: number;
|
|
22
21
|
author: string;
|
|
23
|
-
date: string;
|
|
22
|
+
date: string;
|
|
23
|
+
/** Optional author initials (w:initials), carried for round-trip. */
|
|
24
24
|
initials?: string;
|
|
25
25
|
/**
|
|
26
26
|
* `"suggested"` marks the produced `trIns`/`trDel`/`cellMarker` as an AI
|
|
@@ -36,73 +36,43 @@ type TableRowColumnMutationResult = {
|
|
|
36
36
|
} | {
|
|
37
37
|
type: "unsupported";
|
|
38
38
|
};
|
|
39
|
-
declare const getTableColumnCoordinateKey: ({
|
|
40
|
-
tablePosition,
|
|
41
|
-
columnIndex
|
|
42
|
-
}: TableColumnInsertion) => string;
|
|
39
|
+
declare const getTableColumnCoordinateKey: ({ tablePosition, columnIndex }: TableColumnInsertion) => string;
|
|
43
40
|
type FindTableColumnInsertionOptions = {
|
|
44
41
|
doc: Node;
|
|
45
42
|
blockFrom: number;
|
|
46
43
|
position: "after" | "before";
|
|
47
44
|
};
|
|
48
|
-
declare const findTableColumnInsertion: ({
|
|
49
|
-
doc,
|
|
50
|
-
blockFrom,
|
|
51
|
-
position
|
|
52
|
-
}: FindTableColumnInsertionOptions) => (TableColumnInsertion & {
|
|
45
|
+
declare const findTableColumnInsertion: ({ doc, blockFrom, position }: FindTableColumnInsertionOptions) => (TableColumnInsertion & {
|
|
53
46
|
boundaryPosition: number;
|
|
54
47
|
}) | null;
|
|
55
48
|
type FindTableRowInsertionOptions = FindTableColumnInsertionOptions;
|
|
56
|
-
declare const findTableRowInsertion: ({
|
|
57
|
-
doc,
|
|
58
|
-
blockFrom,
|
|
59
|
-
position
|
|
60
|
-
}: FindTableRowInsertionOptions) => TableRowInsertion | null;
|
|
49
|
+
declare const findTableRowInsertion: ({ doc, blockFrom, position }: FindTableRowInsertionOptions) => TableRowInsertion | null;
|
|
61
50
|
type ApplyTableRowInsertionOptions = {
|
|
62
51
|
tr: Transaction;
|
|
63
52
|
insertion: TableRowInsertion;
|
|
64
53
|
cellTexts: readonly string[] | undefined;
|
|
65
54
|
revision: TableStructureRevision | null;
|
|
66
55
|
};
|
|
67
|
-
declare const applyTableRowInsertion: ({
|
|
68
|
-
tr,
|
|
69
|
-
insertion,
|
|
70
|
-
cellTexts,
|
|
71
|
-
revision
|
|
72
|
-
}: ApplyTableRowInsertionOptions) => TableRowColumnMutationResult;
|
|
56
|
+
declare const applyTableRowInsertion: ({ tr, insertion, cellTexts, revision }: ApplyTableRowInsertionOptions) => TableRowColumnMutationResult;
|
|
73
57
|
type ApplyTableColumnInsertionOptions = {
|
|
74
58
|
tr: Transaction;
|
|
75
59
|
insertion: TableColumnInsertion;
|
|
76
60
|
cellTexts: readonly string[] | undefined;
|
|
77
61
|
revision: TableStructureRevision | null;
|
|
78
62
|
};
|
|
79
|
-
declare const applyTableColumnInsertion: ({
|
|
80
|
-
tr,
|
|
81
|
-
insertion,
|
|
82
|
-
cellTexts,
|
|
83
|
-
revision
|
|
84
|
-
}: ApplyTableColumnInsertionOptions) => TableRowColumnMutationResult;
|
|
63
|
+
declare const applyTableColumnInsertion: ({ tr, insertion, cellTexts, revision }: ApplyTableColumnInsertionOptions) => TableRowColumnMutationResult;
|
|
85
64
|
type ApplyTableColumnDeletionOptions = {
|
|
86
65
|
tr: Transaction;
|
|
87
66
|
deletion: TableColumnDeletion;
|
|
88
67
|
insertedColumnCount: number;
|
|
89
68
|
revision: TableStructureRevision | null;
|
|
90
69
|
};
|
|
91
|
-
declare const applyTableColumnDeletion: ({
|
|
92
|
-
tr,
|
|
93
|
-
deletion,
|
|
94
|
-
insertedColumnCount,
|
|
95
|
-
revision
|
|
96
|
-
}: ApplyTableColumnDeletionOptions) => TableRowColumnMutationResult;
|
|
70
|
+
declare const applyTableColumnDeletion: ({ tr, deletion, insertedColumnCount, revision }: ApplyTableColumnDeletionOptions) => TableRowColumnMutationResult;
|
|
97
71
|
type ApplyTableRowDeletionOptions = {
|
|
98
72
|
tr: Transaction;
|
|
99
73
|
deletion: TableRowDeletion;
|
|
100
74
|
revision: TableStructureRevision | null;
|
|
101
75
|
};
|
|
102
|
-
declare const applyTableRowDeletion: ({
|
|
103
|
-
tr,
|
|
104
|
-
deletion,
|
|
105
|
-
revision
|
|
106
|
-
}: ApplyTableRowDeletionOptions) => TableRowColumnMutationResult;
|
|
76
|
+
declare const applyTableRowDeletion: ({ tr, deletion, revision }: ApplyTableRowDeletionOptions) => TableRowColumnMutationResult;
|
|
107
77
|
//#endregion
|
|
108
78
|
export { TableColumnDeletion, TableColumnInsertion, TableRowDeletion, TableRowInsertion, TableStructureRevision, applyTableColumnDeletion, applyTableColumnInsertion, applyTableRowDeletion, applyTableRowInsertion, findTableColumnInsertion, findTableRowInsertion, getTableColumnCoordinateKey };
|
package/dist/ai-edits/types.d.ts
CHANGED
|
@@ -13,7 +13,8 @@ type FolioAIBlockPreviewRun = {
|
|
|
13
13
|
type FolioAIBlock = {
|
|
14
14
|
id: string;
|
|
15
15
|
kind: FolioAIBlockKind;
|
|
16
|
-
text: string;
|
|
16
|
+
text: string;
|
|
17
|
+
/** One-based heading depth when the block has outline semantics. */
|
|
17
18
|
headingLevel?: number;
|
|
18
19
|
displayLabel?: string;
|
|
19
20
|
styleId?: string;
|
|
@@ -21,7 +22,8 @@ type FolioAIBlock = {
|
|
|
21
22
|
};
|
|
22
23
|
type FolioAIEditSnapshot = {
|
|
23
24
|
blocks: FolioAIBlock[];
|
|
24
|
-
anchors: Record<string, FolioAIBlockAnchor>;
|
|
25
|
+
anchors: Record<string, FolioAIBlockAnchor>;
|
|
26
|
+
/** Hidden empty paragraph used to anchor insertions when `blocks` is empty. */
|
|
25
27
|
emptyDocumentAnchorId?: string;
|
|
26
28
|
};
|
|
27
29
|
type FolioAIBlockAnchor = {
|
|
@@ -73,13 +75,15 @@ type FolioDocumentSectionHandle = {
|
|
|
73
75
|
type: "headingSection";
|
|
74
76
|
story: "main";
|
|
75
77
|
headingBlockId: string;
|
|
76
|
-
headingTextHash: string;
|
|
78
|
+
headingTextHash: string;
|
|
79
|
+
/** One-based depth used to detect structural section-boundary changes. */
|
|
77
80
|
headingLevel: number;
|
|
78
81
|
};
|
|
79
82
|
type FolioDocumentOutlineEntry = {
|
|
80
83
|
handle: FolioDocumentSectionHandle;
|
|
81
84
|
headingBlockId: string;
|
|
82
|
-
text: string;
|
|
85
|
+
text: string;
|
|
86
|
+
/** One-based heading depth. */
|
|
83
87
|
level: number;
|
|
84
88
|
parentHandle?: FolioDocumentSectionHandle;
|
|
85
89
|
};
|
|
@@ -88,7 +92,8 @@ type FolioDocumentOutline = {
|
|
|
88
92
|
};
|
|
89
93
|
type FolioDocumentSection = {
|
|
90
94
|
handle: FolioDocumentSectionHandle;
|
|
91
|
-
heading: FolioDocumentOutlineEntry;
|
|
95
|
+
heading: FolioDocumentOutlineEntry;
|
|
96
|
+
/** Heading block followed by every block in its logical section. */
|
|
92
97
|
blocks: FolioAIBlock[];
|
|
93
98
|
};
|
|
94
99
|
type FolioDocumentSectionReadResult = {
|
|
@@ -205,37 +210,47 @@ type FolioAIEditOperation = FolioAIEditReviewMeta & {
|
|
|
205
210
|
comment?: FolioAIComment;
|
|
206
211
|
} | {
|
|
207
212
|
id: string;
|
|
208
|
-
type: "insertTableRow";
|
|
213
|
+
type: "insertTableRow";
|
|
214
|
+
/** Stable paragraph anchor inside the row that receives the new sibling. */
|
|
209
215
|
blockId: string;
|
|
210
|
-
position?: "after" | "before";
|
|
216
|
+
position?: "after" | "before";
|
|
217
|
+
/** Initial text for each physical cell in source order; omitted cells stay empty. */
|
|
211
218
|
cellTexts?: string[];
|
|
212
219
|
} | {
|
|
213
220
|
id: string;
|
|
214
|
-
type: "deleteTableRow";
|
|
221
|
+
type: "deleteTableRow";
|
|
222
|
+
/** Stable paragraph anchor inside the row to delete. */
|
|
215
223
|
blockId: string;
|
|
216
224
|
} | {
|
|
217
225
|
id: string;
|
|
218
|
-
type: "insertTableColumn";
|
|
226
|
+
type: "insertTableColumn";
|
|
227
|
+
/** Stable paragraph anchor inside the cell that receives the new sibling column. */
|
|
219
228
|
blockId: string;
|
|
220
|
-
position?: "after" | "before";
|
|
229
|
+
position?: "after" | "before";
|
|
230
|
+
/** Initial text for newly created physical cells in row order. */
|
|
221
231
|
cellTexts?: string[];
|
|
222
232
|
} | {
|
|
223
233
|
id: string;
|
|
224
|
-
type: "deleteTableColumn";
|
|
234
|
+
type: "deleteTableColumn";
|
|
235
|
+
/** Stable paragraph anchor inside the column to delete. */
|
|
225
236
|
blockId: string;
|
|
226
237
|
} | ({
|
|
227
238
|
id: string;
|
|
228
|
-
type: "mergeTableCells";
|
|
239
|
+
type: "mergeTableCells";
|
|
240
|
+
/** Stable paragraph anchor inside the first cell. */
|
|
229
241
|
blockId: string;
|
|
230
242
|
} & ({
|
|
231
|
-
/** Stable paragraph anchor inside the opposite corner cell. */
|
|
243
|
+
/** Stable paragraph anchor inside the opposite corner cell. */
|
|
244
|
+
endBlockId: string;
|
|
232
245
|
rowCount?: never;
|
|
233
246
|
} | {
|
|
234
|
-
/** Number of grid rows to merge downward from the anchored cell. */
|
|
247
|
+
/** Number of grid rows to merge downward from the anchored cell. */
|
|
248
|
+
rowCount: number;
|
|
235
249
|
endBlockId?: never;
|
|
236
250
|
})) | {
|
|
237
251
|
id: string;
|
|
238
|
-
type: "splitTableCell";
|
|
252
|
+
type: "splitTableCell";
|
|
253
|
+
/** Stable paragraph anchor inside the cell to split. */
|
|
239
254
|
blockId: string;
|
|
240
255
|
});
|
|
241
256
|
/**
|
|
@@ -253,13 +268,13 @@ type FolioAIEditOperation = FolioAIEditReviewMeta & {
|
|
|
253
268
|
* `unsupportedMode`.
|
|
254
269
|
*/
|
|
255
270
|
type FolioAIEditApplyMode = "direct" | "tracked-changes" | "suggested";
|
|
256
|
-
type FolioAIEditSkipReason = "missingBlock" | "changedBlock" | "ambiguousFind" | "missingFind" | "unsupportedBlock" | "unsupportedMode" | "atomicBatchRejected" | "preconditionFailed" | "staleRange" | "emptyOperation"
|
|
271
|
+
type FolioAIEditSkipReason = "missingBlock" | "changedBlock" | "ambiguousFind" | "missingFind" | "unsupportedBlock" | "unsupportedMode" | "atomicBatchRejected" | "preconditionFailed" | "staleRange" | "emptyOperation" |
|
|
257
272
|
/**
|
|
258
273
|
* The operation would not change the document — find equals
|
|
259
274
|
* replace, or replaceBlock's `text` matches the live block.
|
|
260
275
|
* Filtered out so the reviewer doesn't see "X → X" cards.
|
|
261
276
|
*/
|
|
262
|
-
|
|
277
|
+
"noopOperation";
|
|
263
278
|
type FolioAIEditAppliedOperation = {
|
|
264
279
|
id: string;
|
|
265
280
|
commentId?: number;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Node } from "prosemirror-model";
|
|
2
|
-
|
|
3
2
|
//#region src/ai-suggestions/text-positions.d.ts
|
|
4
3
|
type PositionalText = {
|
|
5
|
-
/** Concatenated text content, with `\n` between block nodes. */
|
|
4
|
+
/** Concatenated text content, with `\n` between block nodes. */
|
|
5
|
+
text: string;
|
|
6
6
|
/**
|
|
7
7
|
* For each character at index `i` in `text`, returns the PM position
|
|
8
8
|
* of that character (i.e., the position just before it). Block
|
|
@@ -29,7 +29,8 @@ type AISuggestion = {
|
|
|
29
29
|
suggestedText: string;
|
|
30
30
|
contextBefore: string;
|
|
31
31
|
contextAfter: string;
|
|
32
|
-
rationale: string;
|
|
32
|
+
rationale: string;
|
|
33
|
+
/** 0..1 model confidence. Optional — not displayed prominently. */
|
|
33
34
|
confidence?: number;
|
|
34
35
|
status: AISuggestionStatus;
|
|
35
36
|
/**
|
|
@@ -40,7 +41,8 @@ type AISuggestion = {
|
|
|
40
41
|
* its own registry; unknown values simply render no badge.
|
|
41
42
|
*/
|
|
42
43
|
display?: {
|
|
43
|
-
valueKind?: string;
|
|
44
|
+
valueKind?: string;
|
|
45
|
+
/** `personAi`: a person writes a stub and AI adapts it in place. */
|
|
44
46
|
filledBy?: "person" | "ai" | "personAi";
|
|
45
47
|
};
|
|
46
48
|
};
|
|
@@ -65,8 +67,10 @@ type AIGenerateInput = {
|
|
|
65
67
|
* - "ask": no edit suggestions; pure answer.
|
|
66
68
|
* - "edit": text + suggestions allowed, accept UI rendered.
|
|
67
69
|
*/
|
|
68
|
-
mode: AIChatMode;
|
|
69
|
-
|
|
70
|
+
mode: AIChatMode;
|
|
71
|
+
/** Selected text, if any. Empty string when no selection. */
|
|
72
|
+
selectionText: string;
|
|
73
|
+
/** PM range of the selection, or null when there is no selection. */
|
|
70
74
|
selectionRange: {
|
|
71
75
|
from: number;
|
|
72
76
|
to: number;
|
|
@@ -79,7 +83,8 @@ type AIGenerateInput = {
|
|
|
79
83
|
cursorPosition: {
|
|
80
84
|
from: number;
|
|
81
85
|
to: number;
|
|
82
|
-
} | null;
|
|
86
|
+
} | null;
|
|
87
|
+
/** Plain-text snapshot of the document body. */
|
|
83
88
|
documentText: string;
|
|
84
89
|
/**
|
|
85
90
|
* Subset of `documentText` currently visible in the viewport. Lets
|
|
@@ -108,9 +113,12 @@ type AIGenerateInput = {
|
|
|
108
113
|
* conversation mode the prompt is naturally meant for.
|
|
109
114
|
*/
|
|
110
115
|
type AISuggestionPreset = {
|
|
111
|
-
id: string;
|
|
112
|
-
|
|
113
|
-
|
|
116
|
+
id: string;
|
|
117
|
+
/** Short label shown in the dropdown (e.g., "Catch typos"). */
|
|
118
|
+
label: string;
|
|
119
|
+
/** Optional one-line description shown beneath the label. */
|
|
120
|
+
description?: string;
|
|
121
|
+
/** Prompt text sent to the generator when the preset is picked. */
|
|
114
122
|
prompt: string;
|
|
115
123
|
/**
|
|
116
124
|
* Mode the preset is naturally meant for. Picking it switches the
|
|
@@ -132,7 +140,8 @@ type AISuggestionPreset = {
|
|
|
132
140
|
* for what is universally a PDF bbox shape.
|
|
133
141
|
*/
|
|
134
142
|
type AICitationSource = {
|
|
135
|
-
kind: "folio-range";
|
|
143
|
+
kind: "folio-range";
|
|
144
|
+
/** ProseMirror positions in the live document. */
|
|
136
145
|
from: number;
|
|
137
146
|
to: number;
|
|
138
147
|
} | {
|
|
@@ -144,9 +153,13 @@ type AICitationSource = {
|
|
|
144
153
|
yMax: number;
|
|
145
154
|
};
|
|
146
155
|
type AICitation = {
|
|
147
|
-
/** Stable id within the message (e.g., used as `[1]` reference). */
|
|
148
|
-
|
|
149
|
-
|
|
156
|
+
/** Stable id within the message (e.g., used as `[1]` reference). */
|
|
157
|
+
id: string;
|
|
158
|
+
/** Short label rendered in the inline chip ("1", "§3.2", etc.). */
|
|
159
|
+
label: string;
|
|
160
|
+
/** Verbatim quoted text from the source — surfaces on hover/expand. */
|
|
161
|
+
quote: string;
|
|
162
|
+
/** Where the cited text lives in the source document. */
|
|
150
163
|
source: AICitationSource;
|
|
151
164
|
};
|
|
152
165
|
/**
|
|
@@ -177,7 +190,8 @@ type AISuggestionsConfig = {
|
|
|
177
190
|
* Default apply mode. The user can toggle in the panel.
|
|
178
191
|
* Defaults to "direct".
|
|
179
192
|
*/
|
|
180
|
-
defaultApplyMode?: AISuggestionApplyMode;
|
|
193
|
+
defaultApplyMode?: AISuggestionApplyMode;
|
|
194
|
+
/** Author label used when applying as tracked changes. */
|
|
181
195
|
applyAuthor?: string;
|
|
182
196
|
/**
|
|
183
197
|
* Called when the user accepts a suggestion while the editor is
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { document_d_exports } from "../types/document.js";
|
|
2
|
-
|
|
3
2
|
//#region src/content-controls/findContentControls.d.ts
|
|
4
3
|
type ContentControlFilter = {
|
|
5
4
|
tag?: string;
|
|
6
|
-
alias?: string;
|
|
5
|
+
alias?: string;
|
|
6
|
+
/** OOXML numeric `w:id`. */
|
|
7
7
|
id?: number;
|
|
8
8
|
sdtType?: document_d_exports.SdtProperties["sdtType"];
|
|
9
9
|
/**
|
|
@@ -34,8 +34,10 @@ type ContentControlLocation = {
|
|
|
34
34
|
noteId: number;
|
|
35
35
|
};
|
|
36
36
|
type ContentControlMatch = {
|
|
37
|
-
control: document_d_exports.BlockSdt;
|
|
38
|
-
|
|
37
|
+
control: document_d_exports.BlockSdt;
|
|
38
|
+
/** Outer→inner stack of enclosing controls (empty when at the body root). */
|
|
39
|
+
ancestry: document_d_exports.BlockSdt[];
|
|
40
|
+
/** Indices to walk back into the doc, outer→inner. */
|
|
39
41
|
path: number[];
|
|
40
42
|
/**
|
|
41
43
|
* Where in the document this match was found. Defaults to the main
|