@stll/folio-core 0.45.0 → 0.47.0
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.js +85 -43
- package/dist/ai-edits/headless.js +2 -2
- package/dist/ai-edits/read.d.ts +1 -0
- package/dist/ai-edits/read.js +1 -0
- package/dist/ai-edits/snapshot.js +32 -27
- package/dist/ai-edits/table-cell-mutations.js +15 -7
- package/dist/ai-edits/table-geometry.js +21 -18
- package/dist/ai-edits/table-template.js +2 -2
- package/dist/compare/compare.js +2 -5
- package/dist/compare/content-alignment.js +108 -12
- package/dist/compare/content-types.d.ts +8 -2
- package/dist/compare/content.js +2 -11
- package/dist/compare/plan.js +7 -4
- package/dist/compare/scenario.js +2 -5
- package/dist/compare/section-boundary-properties.js +1 -2
- package/dist/compare/types.d.ts +9 -1
- package/dist/compare/types.js +12 -1
- package/dist/compat/eigenpal.d.ts +2 -1
- package/dist/compat/eigenpal.js +2 -1
- package/dist/content-controls/checkboxDisplay.d.ts +17 -0
- package/dist/content-controls/checkboxDisplay.js +46 -0
- package/dist/content-controls/findContentControls.js +3 -1
- package/dist/content-controls/mutateContentControls.js +57 -43
- package/dist/controller/contentControlWidgetController.d.ts +1 -0
- package/dist/controller/contentControlWidgetController.js +3 -0
- package/dist/controller/hiddenEditorApi.js +3 -1
- package/dist/controller/hiddenEditorManager.d.ts +1 -1
- package/dist/controller/hiddenEditorManager.js +6 -3
- package/dist/controller/layoutPipeline.js +8 -3
- package/dist/display-list/build/buildDisplayList.js +20 -1
- package/dist/display-list/build/imagePrimitives.d.ts +4 -4
- package/dist/display-list/build/imagePrimitives.js +38 -18
- package/dist/display-list/build/pageBorderPrimitives.js +2 -1
- package/dist/display-list/build/paragraphPrimitives.js +113 -14
- package/dist/display-list/build/previewPrimitives.d.ts +10 -0
- package/dist/display-list/build/previewPrimitives.js +89 -0
- package/dist/display-list/build/strokes.d.ts +177 -8
- package/dist/display-list/build/strokes.js +167 -47
- package/dist/display-list/build/tablePrimitives.js +4 -2
- package/dist/display-list/build/textBoxPrimitives.js +6 -4
- package/dist/display-list/build/textDecorations.d.ts +15 -1
- package/dist/display-list/build/textDecorations.js +15 -1
- package/dist/display-list/dom/renderDisplayListToDom.js +11 -21
- package/dist/display-list/primitives.d.ts +13 -2
- package/dist/display-list/primitives.js +36 -1
- package/dist/display-list/types.d.ts +17 -0
- package/dist/document-operations.js +2 -1
- package/dist/docx/attributeRemainder.d.ts +76 -0
- package/dist/docx/attributeRemainder.js +111 -0
- package/dist/docx/blockContentParser.d.ts +3 -1
- package/dist/docx/blockContentParser.js +102 -106
- package/dist/docx/blockPlainText.d.ts +3 -4
- package/dist/docx/blockPlainText.js +3 -0
- package/dist/docx/borderParser.js +26 -11
- package/dist/docx/builtInStyles.d.ts +8 -16
- package/dist/docx/builtInStyles.js +54 -17
- package/dist/docx/commentAnchorIndex.d.ts +30 -0
- package/dist/docx/commentAnchorIndex.js +50 -0
- package/dist/docx/commentParser.d.ts +1 -1
- package/dist/docx/commentParser.js +56 -39
- package/dist/docx/commentRangeIntegrity.d.ts +16 -1
- package/dist/docx/commentRangeIntegrity.js +42 -1
- package/dist/docx/commentRangeJoin.d.ts +9 -0
- package/dist/docx/commentRangeJoin.js +33 -0
- package/dist/docx/commentReferenceCompletion.d.ts +9 -0
- package/dist/docx/commentReferenceCompletion.js +47 -0
- package/dist/docx/commentReferenceNormalization.js +3 -1
- package/dist/docx/commentReplyMarkers.js +11 -19
- package/dist/docx/compatibility.js +56 -41
- package/dist/docx/containerChildren.d.ts +208 -0
- package/dist/docx/containerChildren.gen.d.ts +43 -0
- package/dist/docx/containerChildren.gen.js +263 -0
- package/dist/docx/containerChildren.js +153 -0
- package/dist/docx/diagramPreview.d.ts +14 -2
- package/dist/docx/diagramPreview.js +81 -169
- package/dist/docx/documentParser.d.ts +1 -1
- package/dist/docx/documentParser.js +7 -4
- package/dist/docx/drawingAnchor.d.ts +87 -0
- package/dist/docx/drawingAnchor.js +201 -0
- package/dist/docx/drawingUtils.d.ts +43 -38
- package/dist/docx/drawingUtils.js +205 -118
- package/dist/docx/ensureParaIds.js +17 -7
- package/dist/docx/fieldParser.d.ts +1 -1
- package/dist/docx/fieldParser.js +4 -4
- package/dist/docx/fieldState.d.ts +26 -0
- package/dist/docx/fieldState.js +53 -0
- package/dist/docx/fontTableParser.js +102 -41
- package/dist/docx/footnoteParser.d.ts +1 -1
- package/dist/docx/footnoteParser.js +10 -6
- package/dist/docx/graphicFrameLocks.d.ts +16 -4
- package/dist/docx/graphicFrameLocks.js +19 -6
- package/dist/docx/groupDrawingParser.js +4 -3
- package/dist/docx/headerFooterParser.js +1 -1
- package/dist/docx/headerFooterReferenceNormalization.js +1 -0
- package/dist/docx/hyperlinkParser.d.ts +66 -9
- package/dist/docx/hyperlinkParser.js +153 -26
- package/dist/docx/imageParser.js +160 -115
- package/dist/docx/index.d.ts +2 -1
- package/dist/docx/index.js +2 -1
- package/dist/docx/inlineContentRemovals.d.ts +28 -0
- package/dist/docx/inlineContentRemovals.js +46 -0
- package/dist/docx/inlineWrapperContent.d.ts +166 -0
- package/dist/docx/inlineWrapperContent.js +165 -0
- package/dist/docx/inlineWrapperParser.d.ts +11 -0
- package/dist/docx/inlineWrapperParser.js +60 -0
- package/dist/docx/nonVisualDrawingProps.d.ts +5 -13
- package/dist/docx/normalizeBaseDirection.js +12 -1
- package/dist/docx/numberingParser.d.ts +25 -2
- package/dist/docx/numberingParser.js +264 -361
- package/dist/docx/numberingReference.d.ts +9 -16
- package/dist/docx/numberingReference.js +17 -16
- package/dist/docx/numberingReferenceNormalization.js +7 -7
- package/dist/docx/ooxmlCounterFormatter.d.ts +1 -1
- package/dist/docx/ooxmlCounterFormatter.js +4 -1
- package/dist/docx/paraIdAttribute.d.ts +111 -0
- package/dist/docx/paraIdAttribute.js +142 -0
- package/dist/docx/paragraphParser.d.ts +10 -25
- package/dist/docx/paragraphParser.js +421 -496
- package/dist/docx/paragraphProperties.d.ts +23 -0
- package/dist/docx/paragraphProperties.js +279 -0
- package/dist/docx/paragraphPropertySource.js +7 -1
- package/dist/docx/paragraphTextBoxEnrichment.d.ts +3 -2
- package/dist/docx/paragraphTextBoxEnrichment.js +20 -59
- package/dist/docx/paragraphTraversal.d.ts +14 -10
- package/dist/docx/paragraphTraversal.js +53 -52
- package/dist/docx/parseWarningMessage.js +5 -1
- package/dist/docx/parserEnums.d.ts +6 -8
- package/dist/docx/parserEnums.js +4 -6
- package/dist/docx/preservedRunContent.d.ts +32 -0
- package/dist/docx/preservedRunContent.js +96 -0
- package/dist/docx/previewBudget.d.ts +44 -23
- package/dist/docx/previewBudget.js +61 -30
- package/dist/docx/propertyElementAttributes.d.ts +178 -0
- package/dist/docx/propertyElementAttributes.js +114 -0
- package/dist/docx/renderedPageBreakNormalization.js +4 -6
- package/dist/docx/rezip.d.ts +28 -2
- package/dist/docx/rezip.js +152 -27
- package/dist/docx/runConsolidator.d.ts +42 -2
- package/dist/docx/runConsolidator.js +60 -6
- package/dist/docx/runParser.d.ts +55 -19
- package/dist/docx/runParser.js +394 -306
- package/dist/docx/runPayload.d.ts +5 -0
- package/dist/docx/runPayload.js +4 -0
- package/dist/docx/sdtProperties.d.ts +39 -5
- package/dist/docx/sdtProperties.js +205 -84
- package/dist/docx/sdtPropertiesPatch.d.ts +5 -9
- package/dist/docx/sdtPropertiesPatch.js +68 -112
- package/dist/docx/sectionParser.d.ts +1 -2
- package/dist/docx/sectionParser.js +241 -238
- package/dist/docx/selectiveSave.js +3 -2
- package/dist/docx/selectiveXmlPatch.d.ts +66 -3
- package/dist/docx/selectiveXmlPatch.js +276 -133
- package/dist/docx/serializer/blockSdtSerializer.js +2 -96
- package/dist/docx/serializer/borderSerializer.d.ts +5 -5
- package/dist/docx/serializer/borderSerializer.js +12 -10
- package/dist/docx/serializer/commentSerializer.js +5 -7
- package/dist/docx/serializer/documentSerializer.js +11 -11
- package/dist/docx/serializer/fontTableSerializer.js +31 -3
- package/dist/docx/serializer/headerFooterSerializer.js +10 -9
- package/dist/docx/serializer/markupRangeAttributes.d.ts +9 -1
- package/dist/docx/serializer/markupRangeAttributes.js +9 -1
- package/dist/docx/serializer/noteSerializer.js +11 -8
- package/dist/docx/serializer/numberingSerializer.d.ts +1 -6
- package/dist/docx/serializer/numberingSerializer.js +81 -79
- package/dist/docx/serializer/paragraphSerializer.d.ts +1 -9
- package/dist/docx/serializer/paragraphSerializer.js +156 -236
- package/dist/docx/serializer/runSerializer.d.ts +1 -5
- package/dist/docx/serializer/runSerializer.js +134 -75
- package/dist/docx/serializer/sdtPropertiesSerializer.d.ts +26 -0
- package/dist/docx/serializer/sdtPropertiesSerializer.js +111 -0
- package/dist/docx/serializer/sectionPropertiesSerializer.js +42 -49
- package/dist/docx/serializer/settingsSerializer.js +6 -4
- package/dist/docx/serializer/stylesSerializer.js +8 -11
- package/dist/docx/serializer/tableSerializer.js +283 -105
- package/dist/docx/serializer/textFormattingSerializer.d.ts +28 -4
- package/dist/docx/serializer/textFormattingSerializer.js +111 -101
- package/dist/docx/serializer/xmlUtils.d.ts +1 -1
- package/dist/docx/serializer/xmlUtils.js +1 -1
- package/dist/docx/server/createBilingualDocument.js +20 -16
- package/dist/docx/server/materializeYjsDocx.d.ts +1 -1
- package/dist/docx/server/materializeYjsDocx.js +9 -1
- package/dist/docx/server/migrateYjsAttrSchema.d.ts +55 -0
- package/dist/docx/server/migrateYjsAttrSchema.js +95 -0
- package/dist/docx/settingsParser.js +7 -4
- package/dist/docx/shadingParser.d.ts +2 -1
- package/dist/docx/shadingParser.js +43 -7
- package/dist/docx/shapeParser.js +13 -8
- package/dist/docx/strictNames.d.ts +11 -0
- package/dist/docx/strictNames.gen.d.ts +45 -0
- package/dist/docx/strictNames.gen.js +50 -0
- package/dist/docx/strictNames.js +43 -0
- package/dist/docx/strictValueEncodings.gen.js +133 -131
- package/dist/docx/styleParser.js +17 -349
- package/dist/docx/tableParser.d.ts +11 -2
- package/dist/docx/tableParser.js +665 -220
- package/dist/docx/textBoxParser.d.ts +28 -3
- package/dist/docx/textBoxParser.js +69 -9
- package/dist/docx/themeColorAttribute.d.ts +13 -0
- package/dist/docx/themeColorAttribute.js +24 -0
- package/dist/docx/trackedMoveRangeNormalization.js +2 -1
- package/dist/docx/unzip.js +5 -4
- package/dist/docx/vmlImageParser.d.ts +30 -5
- package/dist/docx/vmlImageParser.js +91 -32
- package/dist/docx/vmlPreview.js +2 -2
- package/dist/docx/wrapPolygon.d.ts +30 -0
- package/dist/docx/wrapPolygon.js +70 -0
- package/dist/docx/xmlEncoding.d.ts +5 -0
- package/dist/docx/xmlEncoding.js +12 -0
- package/dist/docx/xmlParser.d.ts +23 -1
- package/dist/docx/xmlParser.js +31 -2
- package/dist/fonts/embeddedFonts.js +3 -3
- package/dist/headless-layout.js +12 -1
- package/dist/i18n/messages/catalogs.gen.d.ts +68 -0
- package/dist/i18n/messages/catalogs.gen.js +102 -34
- package/dist/i18n/messages/messages.gen.d.ts +4 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/internal/headlessRevisionResolution.js +9 -0
- package/dist/internal/pageBreakRunSourceDescendantIndex.js +7 -2
- package/dist/internal/paragraphFormattingSerialization.d.ts +20 -9
- package/dist/internal/paragraphFormattingSerialization.js +118 -83
- package/dist/layout-bridge/convert/footnoteLayout.d.ts +1 -0
- package/dist/layout-bridge/convert/footnoteLayout.js +1 -0
- package/dist/layout-bridge/convert/headerFooterLayout.d.ts +1 -0
- package/dist/layout-bridge/convert/headerFooterLayout.js +2 -0
- package/dist/layout-bridge/convert/toFlowBlocks.d.ts +17 -12
- package/dist/layout-bridge/convert/toFlowBlocks.js +267 -101
- package/dist/layout-engine/index.d.ts +2 -2
- package/dist/layout-engine/index.js +53 -17
- package/dist/layout-engine/measure/measureBlocks.d.ts +3 -0
- package/dist/layout-engine/measure/measureBlocks.js +6 -10
- package/dist/layout-engine/measure/tableCellFloating.d.ts +2 -0
- package/dist/layout-engine/measure/tableCellFloating.js +2 -0
- package/dist/layout-engine/measure/tableCellGrid.js +2 -1
- package/dist/layout-engine/measure/tableFragmentBorderGeometry.js +2 -1
- package/dist/layout-engine/measure/tableInlinePlacement.js +2 -5
- package/dist/layout-engine/paragraphSequence.js +3 -2
- package/dist/layout-engine/renderedBreakReconciliation.js +2 -1
- package/dist/layout-engine/section-breaks.d.ts +49 -2
- package/dist/layout-engine/section-breaks.js +55 -4
- package/dist/layout-engine/types.d.ts +69 -17
- package/dist/layout-engine/types.js +16 -1
- package/dist/layout-painter/borderStroke.d.ts +18 -4
- package/dist/layout-painter/renderImage.d.ts +5 -1
- package/dist/layout-painter/renderImage.js +10 -3
- package/dist/layout-painter/renderPage.d.ts +2 -0
- package/dist/layout-painter/renderPage.js +10 -4
- package/dist/layout-painter/renderParagraph.d.ts +14 -1
- package/dist/layout-painter/renderParagraph.js +34 -28
- package/dist/layout-painter/renderTable.d.ts +4 -1
- package/dist/layout-painter/renderTable.js +22 -22
- package/dist/layout-painter/renderTextBox.js +5 -3
- package/dist/managers/autoSaveCodec.d.ts +9 -1
- package/dist/managers/autoSaveCodec.js +12 -4
- package/dist/markdown/renderBlock.js +3 -0
- package/dist/markdown/renderRuns.d.ts +1 -1
- package/dist/markdown/renderRuns.js +34 -6
- package/dist/markdown/renderTable.js +24 -6
- package/dist/markdown/trailers.js +4 -1
- package/dist/model.d.ts +3 -3
- package/dist/model.js +2 -2
- package/dist/paged-layout/sectionBlockWidths.d.ts +3 -0
- package/dist/paged-layout/sectionBlockWidths.js +26 -4
- package/dist/pdf/images.js +142 -6
- package/dist/prosemirror/attrs/index.d.ts +34 -5
- package/dist/prosemirror/attrs/index.js +639 -48
- package/dist/prosemirror/authoredTransformAttrs.d.ts +28 -0
- package/dist/prosemirror/authoredTransformAttrs.js +64 -0
- package/dist/prosemirror/bookmarkBoundaryAttrs.d.ts +9 -1
- package/dist/prosemirror/bookmarkBoundaryAttrs.js +22 -3
- package/dist/prosemirror/commands/comments.js +68 -53
- package/dist/prosemirror/commands/contentControls.js +33 -20
- package/dist/prosemirror/commands/image.d.ts +10 -3
- package/dist/prosemirror/commands/image.js +46 -29
- package/dist/prosemirror/commands/pageBreak.js +1 -1
- package/dist/prosemirror/commands/paragraph.d.ts +2 -1
- package/dist/prosemirror/commands/propertyChangeScope.d.ts +12 -4
- package/dist/prosemirror/commands/propertyChangeScope.js +22 -4
- package/dist/prosemirror/commands/sectionBreak.d.ts +33 -1
- package/dist/prosemirror/commands/sectionBreak.js +187 -11
- package/dist/prosemirror/commentReferenceAttrs.d.ts +8 -0
- package/dist/prosemirror/commentReferenceAttrs.js +33 -0
- package/dist/prosemirror/commentReferenceIntegrity.d.ts +47 -0
- package/dist/prosemirror/commentReferenceIntegrity.js +43 -0
- package/dist/prosemirror/conversion/fromProseDoc.d.ts +17 -12
- package/dist/prosemirror/conversion/fromProseDoc.js +553 -207
- package/dist/prosemirror/conversion/index.d.ts +2 -2
- package/dist/prosemirror/conversion/preservedSinkCarriers.d.ts +39 -0
- package/dist/prosemirror/conversion/preservedSinkCarriers.js +19 -0
- package/dist/prosemirror/conversion/runShadingMark.js +14 -1
- package/dist/prosemirror/conversion/sdtAttrs.d.ts +10 -1
- package/dist/prosemirror/conversion/sdtAttrs.js +19 -5
- package/dist/prosemirror/conversion/toProseDoc.d.ts +7 -9
- package/dist/prosemirror/conversion/toProseDoc.js +801 -411
- package/dist/prosemirror/emptyRangeAnchor.d.ts +53 -0
- package/dist/prosemirror/emptyRangeAnchor.js +158 -0
- package/dist/prosemirror/extensions/StarterKit.js +14 -58
- package/dist/prosemirror/extensions/core/DocExtension.js +1 -1
- package/dist/prosemirror/extensions/core/ParagraphExtension.js +21 -16
- package/dist/prosemirror/extensions/features/BaseKeymapExtension.js +48 -29
- package/dist/prosemirror/extensions/features/EmptyParagraphFormatExtension.js +3 -1
- package/dist/prosemirror/extensions/features/ImagePasteExtension.js +5 -3
- package/dist/prosemirror/extensions/features/ListExtension.js +43 -24
- package/dist/prosemirror/extensions/features/ParaIdAllocatorExtension.js +1 -0
- package/dist/prosemirror/extensions/features/ParagraphChangeTrackerExtension.js +4 -3
- package/dist/prosemirror/extensions/features/PasteCleanupExtension.d.ts +3 -3
- package/dist/prosemirror/extensions/features/PasteCleanupExtension.js +5 -5
- package/dist/prosemirror/extensions/features/pasteCleanup.d.ts +3 -1
- package/dist/prosemirror/extensions/features/pasteCleanup.js +56 -2
- package/dist/prosemirror/extensions/features/pastedHeadingStyles.js +5 -4
- package/dist/prosemirror/extensions/markRegistry.d.ts +65 -0
- package/dist/prosemirror/extensions/markRegistry.js +138 -0
- package/dist/prosemirror/extensions/marks/InlineWrapperExtension.d.ts +18 -0
- package/dist/prosemirror/extensions/marks/InlineWrapperExtension.js +77 -0
- package/dist/prosemirror/extensions/marks/RunIdentityExtension.d.ts +26 -0
- package/dist/prosemirror/extensions/marks/RunIdentityExtension.js +134 -0
- package/dist/prosemirror/extensions/marks/TrackedChangeExtensions.js +2 -1
- package/dist/prosemirror/extensions/marks/UnderlineExtension.js +12 -18
- package/dist/prosemirror/extensions/marks/markUtils.d.ts +2 -1
- package/dist/prosemirror/extensions/marks/markUtils.js +49 -5
- package/dist/prosemirror/extensions/nodes/BlockBookmarkBoundaryExtension.d.ts +29 -0
- package/dist/prosemirror/extensions/nodes/BlockBookmarkBoundaryExtension.js +46 -0
- package/dist/prosemirror/extensions/nodes/BlockSdtExtension.d.ts +4 -3
- package/dist/prosemirror/extensions/nodes/BlockSdtExtension.js +18 -13
- package/dist/prosemirror/extensions/nodes/BookmarkBoundaryExtension.js +28 -53
- package/dist/prosemirror/extensions/nodes/CommentReferenceExtension.d.ts +11 -0
- package/dist/prosemirror/extensions/nodes/CommentReferenceExtension.js +97 -0
- package/dist/prosemirror/extensions/nodes/FieldExtension.js +9 -7
- package/dist/prosemirror/extensions/nodes/ImageExtension.js +24 -1
- package/dist/prosemirror/extensions/nodes/MoveRangeBoundaryExtension.d.ts +11 -0
- package/dist/prosemirror/extensions/nodes/MoveRangeBoundaryExtension.js +43 -0
- package/dist/prosemirror/extensions/nodes/PreservedBlockExtension.d.ts +32 -0
- package/dist/prosemirror/extensions/nodes/PreservedBlockExtension.js +67 -0
- package/dist/prosemirror/extensions/nodes/PreservedXmlExtension.d.ts +16 -0
- package/dist/prosemirror/extensions/nodes/PreservedXmlExtension.js +60 -0
- package/dist/prosemirror/extensions/nodes/RangeAnchorExtension.d.ts +13 -0
- package/dist/prosemirror/extensions/nodes/RangeAnchorExtension.js +65 -0
- package/dist/prosemirror/extensions/nodes/SdtExtension.d.ts +3 -1
- package/dist/prosemirror/extensions/nodes/SdtExtension.js +22 -16
- package/dist/prosemirror/extensions/nodes/ShapeExtension.js +7 -0
- package/dist/prosemirror/extensions/nodes/TableExtension.js +142 -123
- package/dist/prosemirror/extensions/nodes/TextBoxExtension.js +9 -1
- package/dist/prosemirror/extensions/nodes/bookmarkBoundaryDom.d.ts +23 -0
- package/dist/prosemirror/extensions/nodes/bookmarkBoundaryDom.js +57 -0
- package/dist/prosemirror/extensions/types.d.ts +12 -3
- package/dist/prosemirror/index.d.ts +4 -2
- package/dist/prosemirror/index.js +2 -1
- package/dist/prosemirror/inlineWrapperStack.d.ts +39 -0
- package/dist/prosemirror/inlineWrapperStack.js +92 -0
- package/dist/prosemirror/listMarker.d.ts +2 -2
- package/dist/prosemirror/listMarker.js +7 -8
- package/dist/prosemirror/listRenderingAttrs.js +11 -1
- package/dist/prosemirror/listState.d.ts +62 -0
- package/dist/prosemirror/listState.js +49 -0
- package/dist/prosemirror/moveRangeBoundaryAttrs.d.ts +13 -0
- package/dist/prosemirror/moveRangeBoundaryAttrs.js +114 -0
- package/dist/prosemirror/numberedRefFields.js +4 -4
- package/dist/prosemirror/numberingAttr.d.ts +55 -0
- package/dist/prosemirror/numberingAttr.js +74 -0
- package/dist/prosemirror/outlineLevelAttr.d.ts +29 -0
- package/dist/prosemirror/outlineLevelAttr.js +42 -0
- package/dist/prosemirror/pageBreakRunProjection.d.ts +17 -7
- package/dist/prosemirror/pageBreakRunProjection.js +19 -9
- package/dist/prosemirror/paragraphFormattingProvenance.d.ts +9 -0
- package/dist/prosemirror/paragraphFormattingProvenance.js +4 -1
- package/dist/prosemirror/plugins/selectionTracker.d.ts +3 -6
- package/dist/prosemirror/plugins/selectionTracker.js +3 -10
- package/dist/prosemirror/rangeAnchorAttrs.d.ts +14 -0
- package/dist/prosemirror/rangeAnchorAttrs.js +101 -0
- package/dist/prosemirror/replacedAnnotations.d.ts +59 -0
- package/dist/prosemirror/replacedAnnotations.js +183 -0
- package/dist/prosemirror/revisionCarriers.d.ts +86 -2
- package/dist/prosemirror/revisionCarriers.js +86 -60
- package/dist/prosemirror/runFormattingInlineCarriers.d.ts +5 -1
- package/dist/prosemirror/runFormattingInlineCarriers.js +7 -1
- package/dist/prosemirror/runIdentity.d.ts +28 -0
- package/dist/prosemirror/runIdentity.js +36 -0
- package/dist/prosemirror/runStyleFormatting.js +1 -1
- package/dist/prosemirror/schema/index.d.ts +3 -3
- package/dist/prosemirror/schema/marks.d.ts +47 -4
- package/dist/prosemirror/schema/nodes.d.ts +309 -26
- package/dist/prosemirror/schema/nodes.js +16 -1
- package/dist/prosemirror/sectionCarrier.d.ts +37 -0
- package/dist/prosemirror/sectionCarrier.js +40 -0
- package/dist/prosemirror/selectionState.d.ts +3 -0
- package/dist/prosemirror/selectionState.js +4 -1
- package/dist/prosemirror/styles/resolvedStyleAttrs.d.ts +5 -4
- package/dist/prosemirror/styles/resolvedStyleAttrs.js +15 -13
- package/dist/prosemirror/tableResize.js +5 -6
- package/dist/prosemirror/trackedRunInlineAtoms.d.ts +4 -0
- package/dist/prosemirror/trackedRunInlineAtoms.js +4 -0
- package/dist/prosemirror/utils/extractTrackedChanges.d.ts +10 -11
- package/dist/prosemirror/utils/extractTrackedChanges.js +109 -92
- package/dist/prosemirror/validation.js +31 -6
- package/dist/prosemirror/yjsDocumentMetadata.d.ts +73 -0
- package/dist/prosemirror/yjsDocumentMetadata.js +592 -0
- package/dist/prosemirror/zeroWidthAnchors.js +6 -0
- package/dist/render-dom/commentAnchorAttributes.d.ts +37 -0
- package/dist/render-dom/commentAnchorAttributes.js +54 -0
- package/dist/server.d.ts +3 -1
- package/dist/server.js +3 -1
- package/dist/style-sets/extract.js +4 -4
- package/dist/style-sets/stellaStyle.js +36 -23
- package/dist/types/colors.d.ts +2 -2
- package/dist/types/content.d.ts +2 -2
- package/dist/types/documentEnumValues.d.ts +53 -26
- package/dist/types/documentEnumValues.js +72 -174
- package/dist/types/formatting.d.ts +2 -2
- package/dist/types/index.d.ts +9 -2
- package/dist/utils/borderCss.d.ts +246 -0
- package/dist/utils/borderCss.js +325 -0
- package/dist/utils/clipboard.d.ts +9 -1
- package/dist/utils/clipboard.js +27 -1
- package/dist/utils/colorResolver.d.ts +4 -3
- package/dist/utils/colorResolver.js +45 -76
- package/dist/utils/createDocument.js +24 -6
- package/dist/utils/findReplace.js +52 -10
- package/dist/utils/formatToStyle.d.ts +84 -2
- package/dist/utils/formatToStyle.js +133 -52
- package/dist/utils/headingCollector.js +3 -2
- package/dist/utils/imageLuminance.d.ts +15 -0
- package/dist/utils/imageLuminance.js +32 -0
- package/dist/utils/mergeDocumentContent.js +12 -20
- package/dist/utils/paragraphFormattingMerge.js +27 -6
- package/dist/utils/replaceText.js +1 -0
- package/dist/utils/tableOperations.d.ts +5 -3
- package/dist/utils/tableOperations.js +14 -1
- package/dist/utils/tablePlacement.d.ts +7 -0
- package/dist/utils/tablePlacement.js +14 -0
- package/dist/utils/textDirectionFlow.d.ts +15 -0
- package/dist/utils/textDirectionFlow.js +38 -0
- package/dist/utils/textFormattingMerge.js +16 -4
- package/package.json +10 -10
- package/dist/ai-edits/__fixtures__/paragraphs.d.ts +0 -17
- package/dist/ai-edits/__fixtures__/paragraphs.js +0 -33
- package/dist/compare/__fixtures__/body-sequence.d.ts +0 -119
- package/dist/compare/__fixtures__/body-sequence.js +0 -225
- package/dist/compare/__fixtures__/nested-table.d.ts +0 -16
- package/dist/compare/__fixtures__/nested-table.js +0 -50
- package/dist/compare/__fixtures__/numbered-list.d.ts +0 -34
- package/dist/compare/__fixtures__/numbered-list.js +0 -85
- package/dist/docx/blockRangeMarkers.d.ts +0 -36
- package/dist/docx/blockRangeMarkers.js +0 -59
- package/dist/docx/bookmarkPlacement.d.ts +0 -9
- package/dist/docx/bookmarkPlacement.js +0 -50
- package/dist/fonts/embeddedFontTable.d.ts +0 -45
- package/dist/fonts/embeddedFontTable.js +0 -80
- package/dist/prosemirror/extensions/marks/PageBreakRunOwnerExtension.d.ts +0 -13
- package/dist/prosemirror/extensions/marks/PageBreakRunOwnerExtension.js +0 -39
- package/dist/prosemirror/yjsParagraphSourceContract.d.ts +0 -9
- package/dist/prosemirror/yjsParagraphSourceContract.js +0 -26
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { COUNTER_FORMATS, NUMBER_FORMATS, PARAGRAPH_ALIGNMENTS, PRESET_LINE_DASH_VALS, TABLE_ALIGNMENTS, TAB_STOP_ALIGNMENTS, TEXT_DIRECTIONS } from "@stll/docx-core/model";
|
|
1
2
|
//#region src/types/documentEnumValues.ts
|
|
2
3
|
const SHAPE_TEXT_ANCHOR_VALUES = [
|
|
3
4
|
"top",
|
|
@@ -10,48 +11,6 @@ const normalizeShapeTextAnchor = (value) => {
|
|
|
10
11
|
if (value === "center") return "middle";
|
|
11
12
|
for (const anchor of SHAPE_TEXT_ANCHOR_VALUES) if (value === anchor) return anchor;
|
|
12
13
|
};
|
|
13
|
-
const THEME_COLOR_SLOT_VALUES = [
|
|
14
|
-
"dk1",
|
|
15
|
-
"lt1",
|
|
16
|
-
"dk2",
|
|
17
|
-
"lt2",
|
|
18
|
-
"accent1",
|
|
19
|
-
"accent2",
|
|
20
|
-
"accent3",
|
|
21
|
-
"accent4",
|
|
22
|
-
"accent5",
|
|
23
|
-
"accent6",
|
|
24
|
-
"hlink",
|
|
25
|
-
"folHlink",
|
|
26
|
-
"background1",
|
|
27
|
-
"text1",
|
|
28
|
-
"background2",
|
|
29
|
-
"text2"
|
|
30
|
-
];
|
|
31
|
-
const BORDER_STYLE_VALUES = [
|
|
32
|
-
"none",
|
|
33
|
-
"single",
|
|
34
|
-
"double",
|
|
35
|
-
"dotted",
|
|
36
|
-
"dashed",
|
|
37
|
-
"thick",
|
|
38
|
-
"triple",
|
|
39
|
-
"thinThickSmallGap",
|
|
40
|
-
"thickThinSmallGap",
|
|
41
|
-
"thinThickMediumGap",
|
|
42
|
-
"thickThinMediumGap",
|
|
43
|
-
"thinThickLargeGap",
|
|
44
|
-
"thickThinLargeGap",
|
|
45
|
-
"wave",
|
|
46
|
-
"doubleWave",
|
|
47
|
-
"dashSmallGap",
|
|
48
|
-
"dashDotStroked",
|
|
49
|
-
"threeDEmboss",
|
|
50
|
-
"threeDEngrave",
|
|
51
|
-
"outset",
|
|
52
|
-
"inset",
|
|
53
|
-
"nil"
|
|
54
|
-
];
|
|
55
14
|
const UNDERLINE_STYLE_VALUES = [
|
|
56
15
|
"none",
|
|
57
16
|
"single",
|
|
@@ -122,31 +81,22 @@ const FONT_HINT_VALUES = [
|
|
|
122
81
|
"eastAsia",
|
|
123
82
|
"cs"
|
|
124
83
|
];
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
"mediumKashida",
|
|
132
|
-
"highKashida",
|
|
133
|
-
"lowKashida",
|
|
134
|
-
"thaiDistribute"
|
|
135
|
-
];
|
|
84
|
+
/**
|
|
85
|
+
* `ST_Jc`, from the schema rather than spelled here: the hand-written list
|
|
86
|
+
* omitted `start`, `end` and `numTab`, and every one of them was dropped at
|
|
87
|
+
* parse time.
|
|
88
|
+
*/
|
|
89
|
+
const PARAGRAPH_ALIGNMENT_VALUES = PARAGRAPH_ALIGNMENTS;
|
|
136
90
|
const LINE_SPACING_RULE_VALUES = [
|
|
137
91
|
"auto",
|
|
138
92
|
"exact",
|
|
139
93
|
"atLeast"
|
|
140
94
|
];
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
"bar",
|
|
147
|
-
"clear",
|
|
148
|
-
"num"
|
|
149
|
-
];
|
|
95
|
+
/**
|
|
96
|
+
* `ST_TabJc`, from the schema: the hand-written list omitted `start` and
|
|
97
|
+
* `end`, and a tab stop declared with either lost its alignment on save.
|
|
98
|
+
*/
|
|
99
|
+
const TAB_STOP_ALIGNMENT_VALUES = TAB_STOP_ALIGNMENTS;
|
|
150
100
|
const TAB_LEADER_VALUES = [
|
|
151
101
|
"none",
|
|
152
102
|
"dot",
|
|
@@ -289,11 +239,11 @@ const TABLE_WIDTH_TYPE_VALUES = [
|
|
|
289
239
|
"nil",
|
|
290
240
|
"pct"
|
|
291
241
|
];
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
242
|
+
/**
|
|
243
|
+
* `ST_JcTable`, from the schema: the hand-written list omitted `start` and
|
|
244
|
+
* `end`, so a table written with either read as having no placement at all.
|
|
245
|
+
*/
|
|
246
|
+
const TABLE_JUSTIFICATION_VALUES = TABLE_ALIGNMENTS;
|
|
297
247
|
const TABLE_ROW_HEIGHT_RULE_VALUES = [
|
|
298
248
|
"auto",
|
|
299
249
|
"atLeast",
|
|
@@ -304,17 +254,12 @@ const TABLE_CELL_VERTICAL_ALIGNMENT_VALUES = [
|
|
|
304
254
|
"center",
|
|
305
255
|
"bottom"
|
|
306
256
|
];
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
"tbV",
|
|
314
|
-
"tbRl",
|
|
315
|
-
"tbRlV",
|
|
316
|
-
"btLr"
|
|
317
|
-
];
|
|
257
|
+
/**
|
|
258
|
+
* `ST_TextDirection`, from the schema: the hand-written list omitted `lrTb`,
|
|
259
|
+
* `lrTbV` and `tbLrV`, so a cell written with one read as the table's flow and
|
|
260
|
+
* saved without a `w:textDirection`.
|
|
261
|
+
*/
|
|
262
|
+
const TEXT_DIRECTION_VALUES = TEXT_DIRECTIONS;
|
|
318
263
|
const SHADING_PATTERN_VALUES = [
|
|
319
264
|
"clear",
|
|
320
265
|
"solid",
|
|
@@ -599,43 +544,20 @@ const SHAPE_TYPE_VALUES = [
|
|
|
599
544
|
"swooshArrow",
|
|
600
545
|
"textBox"
|
|
601
546
|
];
|
|
602
|
-
const SHAPE_OUTLINE_STYLE_VALUES = [
|
|
603
|
-
"solid",
|
|
604
|
-
"dot",
|
|
605
|
-
"dash",
|
|
606
|
-
"lgDash",
|
|
607
|
-
"dashDot",
|
|
608
|
-
"lgDashDot",
|
|
609
|
-
"lgDashDotDot",
|
|
610
|
-
"sysDot",
|
|
611
|
-
"sysDash",
|
|
612
|
-
"sysDashDot",
|
|
613
|
-
"sysDashDotDot"
|
|
614
|
-
];
|
|
615
547
|
/**
|
|
616
548
|
* CSS border-style names folio historically stored on `outlineStyle`. They are
|
|
617
549
|
* NOT part of OOXML `ST_PresetLineDashVal`; they exist only because the node
|
|
618
550
|
* kept CSS values. This tuple is the single source of truth for which aliases
|
|
619
|
-
* are accepted
|
|
620
|
-
*
|
|
621
|
-
*
|
|
551
|
+
* are accepted, and {@link OUTLINE_ATTR_PRESET_DASHES} is total over the
|
|
552
|
+
* vocabulary they help build, so an alias cannot be listed without a dash.
|
|
553
|
+
* eigenpal #694.
|
|
622
554
|
*/
|
|
623
555
|
const OUTLINE_STYLE_CSS_ALIAS_VALUES = ["dashed", "dotted"];
|
|
624
556
|
/**
|
|
625
|
-
* Each folio CSS alias and the OOXML dash style it serializes to. The
|
|
626
|
-
* `satisfies` keeps every alias key (from {@link OUTLINE_STYLE_CSS_ALIAS_VALUES})
|
|
627
|
-
* present and pointed at a real `ShapeOutline["style"]`, so an alias can never
|
|
628
|
-
* be listed without a mapping.
|
|
629
|
-
*/
|
|
630
|
-
const OUTLINE_STYLE_CSS_ALIASES = {
|
|
631
|
-
dashed: "dash",
|
|
632
|
-
dotted: "dot"
|
|
633
|
-
};
|
|
634
|
-
/**
|
|
635
557
|
* Allowed `outlineStyle` values for the shape / text-box ProseMirror attribute:
|
|
636
|
-
* the complete OOXML `ST_PresetLineDashVal` set ({@link
|
|
637
|
-
*
|
|
638
|
-
*
|
|
558
|
+
* the complete OOXML `ST_PresetLineDashVal` set ({@link PRESET_LINE_DASH_VALS},
|
|
559
|
+
* derived from the committed schema graph), the folio CSS aliases
|
|
560
|
+
* ({@link OUTLINE_STYLE_CSS_ALIAS_VALUES}), and the `"none"`
|
|
639
561
|
* sentinel — an explicit "no outline" the author can choose, distinct from an
|
|
640
562
|
* unset style (which falls back to the node default). The DOCX serializer
|
|
641
563
|
* suppresses the `<a:ln>` element for `"none"` and maps the aliases to OOXML, so
|
|
@@ -644,79 +566,55 @@ const OUTLINE_STYLE_CSS_ALIASES = {
|
|
|
644
566
|
* validation. eigenpal #694.
|
|
645
567
|
*/
|
|
646
568
|
const OUTLINE_STYLE_ATTR_VALUES = [
|
|
647
|
-
...
|
|
569
|
+
...PRESET_LINE_DASH_VALS,
|
|
648
570
|
...OUTLINE_STYLE_CSS_ALIAS_VALUES,
|
|
649
571
|
"none"
|
|
650
572
|
];
|
|
651
|
-
const
|
|
652
|
-
"
|
|
653
|
-
"
|
|
654
|
-
"
|
|
655
|
-
"
|
|
656
|
-
"
|
|
657
|
-
"
|
|
658
|
-
"
|
|
659
|
-
"
|
|
660
|
-
"
|
|
661
|
-
"
|
|
662
|
-
"
|
|
663
|
-
"
|
|
664
|
-
"
|
|
665
|
-
"
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
"
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
"chineseCounting",
|
|
693
|
-
"chineseLegalSimplified",
|
|
694
|
-
"chineseCountingThousand",
|
|
695
|
-
"koreanDigital",
|
|
696
|
-
"koreanCounting",
|
|
697
|
-
"koreanLegal",
|
|
698
|
-
"koreanDigital2",
|
|
699
|
-
"vietnameseCounting",
|
|
700
|
-
"russianLower",
|
|
701
|
-
"russianUpper",
|
|
702
|
-
"none",
|
|
703
|
-
"numberInDash",
|
|
704
|
-
"hebrew1",
|
|
705
|
-
"hebrew2",
|
|
706
|
-
"arabicAlpha",
|
|
707
|
-
"arabicAbjad",
|
|
708
|
-
"hindiVowels",
|
|
709
|
-
"hindiConsonants",
|
|
710
|
-
"hindiNumbers",
|
|
711
|
-
"hindiCounting",
|
|
712
|
-
"thaiLetters",
|
|
713
|
-
"thaiNumbers",
|
|
714
|
-
"thaiCounting"
|
|
715
|
-
];
|
|
573
|
+
const OUTLINE_ATTR_DASHES_BY_VALUE = new Map(Object.entries({
|
|
574
|
+
solid: "solid",
|
|
575
|
+
dot: "dot",
|
|
576
|
+
dash: "dash",
|
|
577
|
+
lgDash: "lgDash",
|
|
578
|
+
dashDot: "dashDot",
|
|
579
|
+
lgDashDot: "lgDashDot",
|
|
580
|
+
lgDashDotDot: "lgDashDotDot",
|
|
581
|
+
sysDash: "sysDash",
|
|
582
|
+
sysDot: "sysDot",
|
|
583
|
+
sysDashDot: "sysDashDot",
|
|
584
|
+
sysDashDotDot: "sysDashDotDot",
|
|
585
|
+
dashed: "dash",
|
|
586
|
+
dotted: "dot",
|
|
587
|
+
none: "none"
|
|
588
|
+
}));
|
|
589
|
+
/**
|
|
590
|
+
* The dash an `outlineStyle` attribute names, `"none"` for the sentinel, or
|
|
591
|
+
* `undefined` for a value outside the attribute's vocabulary.
|
|
592
|
+
*/
|
|
593
|
+
const presetDashForOutlineAttr = (value) => value === void 0 ? void 0 : OUTLINE_ATTR_DASHES_BY_VALUE.get(value);
|
|
594
|
+
/**
|
|
595
|
+
* The `outlineStyle` attribute a parsed dash travels on.
|
|
596
|
+
*
|
|
597
|
+
* The attribute's vocabulary is closed, so a `@val` the schema does not
|
|
598
|
+
* declare cannot ride the node; it reaches the editor as the plain line it
|
|
599
|
+
* paints. The authored token still survives a parse and save that does not
|
|
600
|
+
* rebuild the outline, because the serializer replays `ShapeOutline.rawXml`.
|
|
601
|
+
*/
|
|
602
|
+
const outlineAttrForDash = (dash) => {
|
|
603
|
+
if (dash === void 0) return;
|
|
604
|
+
return typeof dash === "string" ? dash : "solid";
|
|
605
|
+
};
|
|
606
|
+
/**
|
|
607
|
+
* `ST_NumberFormat`, from the schema: the hand-written list omitted
|
|
608
|
+
* `bahtText`, `dollarText` and `custom`, and carried three `decimalZeroN`
|
|
609
|
+
* members the format does not declare at all.
|
|
610
|
+
*/
|
|
611
|
+
const NUMBER_FORMAT_VALUES = NUMBER_FORMATS;
|
|
612
|
+
/** What a marker may count in, which is wider than what a `w:numFmt` may say. */
|
|
613
|
+
const COUNTER_FORMAT_VALUES = COUNTER_FORMATS;
|
|
716
614
|
const LEVEL_SUFFIX_VALUES = [
|
|
717
615
|
"tab",
|
|
718
616
|
"space",
|
|
719
617
|
"nothing"
|
|
720
618
|
];
|
|
721
619
|
//#endregion
|
|
722
|
-
export {
|
|
620
|
+
export { CONDITIONAL_STYLE_TYPE_VALUES, COUNTER_FORMAT_VALUES, EMPHASIS_MARK_VALUES, FIELD_TYPE_VALUES, FLOATING_TABLE_X_SPEC_VALUES, FLOATING_TABLE_Y_SPEC_VALUES, FONT_HINT_VALUES, FONT_THEME_VALUES, FRAME_WRAP_VALUES, FRAME_X_ALIGN_VALUES, FRAME_Y_ALIGN_VALUES, HIGHLIGHT_COLOR_VALUES, IMAGE_HORIZONTAL_ALIGNMENT_VALUES, IMAGE_HORIZONTAL_RELATIVE_TO_VALUES, IMAGE_VERTICAL_ALIGNMENT_VALUES, IMAGE_VERTICAL_RELATIVE_TO_VALUES, IMAGE_WRAP_TEXT_VALUES, IMAGE_WRAP_TYPE_VALUES, LEVEL_SUFFIX_VALUES, LINE_SPACING_RULE_VALUES, NUMBER_FORMAT_VALUES, OUTLINE_STYLE_ATTR_VALUES, OUTLINE_STYLE_CSS_ALIAS_VALUES, PARAGRAPH_ALIGNMENT_VALUES, POSITIONAL_TAB_ALIGNMENT_VALUES, POSITIONAL_TAB_LEADER_VALUES, POSITIONAL_TAB_RELATIVE_TO_VALUES, SDT_LOCK_VALUES, SDT_TYPE_VALUES, SHADING_PATTERN_VALUES, SHAPE_TEXT_ANCHOR_VALUES, SHAPE_TYPE_VALUES, STYLE_TYPE_VALUES, TABLE_CELL_VERTICAL_ALIGNMENT_VALUES, TABLE_JUSTIFICATION_VALUES, TABLE_ROW_HEIGHT_RULE_VALUES, TABLE_WIDTH_TYPE_VALUES, TAB_LEADER_VALUES, TAB_STOP_ALIGNMENT_VALUES, TEXT_DIRECTION_VALUES, TEXT_EFFECT_VALUES, UNDERLINE_STYLE_VALUES, normalizeShapeTextAnchor, outlineAttrForDash, presetDashForOutlineAttr };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { CellMargins, ConditionalFormatStyle, EmphasisMark, FloatingTableProperties, LineSpacingRule, ParagraphAlignment, ParagraphFormatting, SpacingExplicit, TabLeader, TabStop, TabStopAlignment, TableBorders, TableCellFormatting, TableFormatting, TableLook, TableMeasurement, TableRowFormatting, TableWidthType, TextEffect, TextFormatting, UnderlineStyle } from "@stll/docx-core/model";
|
|
2
|
-
export type { CellMargins, ConditionalFormatStyle, EmphasisMark, FloatingTableProperties, LineSpacingRule, ParagraphAlignment, ParagraphFormatting, SpacingExplicit, TabLeader, TabStop, TabStopAlignment, TableBorders, TableCellFormatting, TableFormatting, TableLook, TableMeasurement, TableRowFormatting, TableWidthType, TextEffect, TextFormatting, UnderlineStyle };
|
|
1
|
+
import { CellMargins, ConditionalFormatStyle, EmphasisMark, FloatingTableProperties, LineSpacingRule, ParagraphAlignment, ParagraphFormatting, SpacingExplicit, TabLeader, TabStop, TabStopAlignment, TableAlignment, TableBorders, TableCellFormatting, TableFormatting, TableGridChange, TableLook, TableMeasurement, TableRowFormatting, TableWidthType, TextDirection, TextEffect, TextFormatting, UnderlineStyle } from "@stll/docx-core/model";
|
|
2
|
+
export type { CellMargins, ConditionalFormatStyle, EmphasisMark, FloatingTableProperties, LineSpacingRule, ParagraphAlignment, ParagraphFormatting, SpacingExplicit, TabLeader, TabStop, TabStopAlignment, TableAlignment, TableBorders, TableCellFormatting, TableFormatting, TableGridChange, TableLook, TableMeasurement, TableRowFormatting, TableWidthType, TextDirection, TextEffect, TextFormatting, UnderlineStyle };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ type DocxConformanceClass = document_d_exports.DocxConformanceClass;
|
|
|
17
17
|
type DocxPackage = document_d_exports.DocxPackage;
|
|
18
18
|
type DrawingContent = document_d_exports.DrawingContent;
|
|
19
19
|
type DrawingRawXmlMode = document_d_exports.DrawingRawXmlMode;
|
|
20
|
+
type EmbeddedFontRef = document_d_exports.EmbeddedFontRef;
|
|
20
21
|
type EmphasisMark = document_d_exports.EmphasisMark;
|
|
21
22
|
type Endnote = document_d_exports.Endnote;
|
|
22
23
|
type EndnotePosition = document_d_exports.EndnotePosition;
|
|
@@ -25,6 +26,7 @@ type Field = document_d_exports.Field;
|
|
|
25
26
|
type FieldCharContent = document_d_exports.FieldCharContent;
|
|
26
27
|
type FieldType = document_d_exports.FieldType;
|
|
27
28
|
type FloatingTableProperties = document_d_exports.FloatingTableProperties;
|
|
29
|
+
type FontCharset = document_d_exports.FontCharset;
|
|
28
30
|
type FontInfo = document_d_exports.FontInfo;
|
|
29
31
|
type FontTable = document_d_exports.FontTable;
|
|
30
32
|
type FooterReference = document_d_exports.FooterReference;
|
|
@@ -43,6 +45,8 @@ type ImageSize = document_d_exports.ImageSize;
|
|
|
43
45
|
type ImageTransform = document_d_exports.ImageTransform;
|
|
44
46
|
type ImageWrap = document_d_exports.ImageWrap;
|
|
45
47
|
type InstrTextContent = document_d_exports.InstrTextContent;
|
|
48
|
+
type LevelLegacy = document_d_exports.LevelLegacy;
|
|
49
|
+
type LevelOverride = document_d_exports.LevelOverride;
|
|
46
50
|
type LevelSuffix = document_d_exports.LevelSuffix;
|
|
47
51
|
type LineNumberRestart = document_d_exports.LineNumberRestart;
|
|
48
52
|
type LineSpacingRule = document_d_exports.LineSpacingRule;
|
|
@@ -66,6 +70,7 @@ type RelationshipMap = document_d_exports.RelationshipMap;
|
|
|
66
70
|
type RelationshipType = document_d_exports.RelationshipType;
|
|
67
71
|
type Run = document_d_exports.Run;
|
|
68
72
|
type RunContent = document_d_exports.RunContent;
|
|
73
|
+
type SchemeColorSlot = document_d_exports.SchemeColorSlot;
|
|
69
74
|
type Section = document_d_exports.Section;
|
|
70
75
|
type SectionProperties = document_d_exports.SectionProperties;
|
|
71
76
|
type SectionStart = document_d_exports.SectionStart;
|
|
@@ -92,6 +97,7 @@ type TableBorders = document_d_exports.TableBorders;
|
|
|
92
97
|
type TableCell = document_d_exports.TableCell;
|
|
93
98
|
type TableCellFormatting = document_d_exports.TableCellFormatting;
|
|
94
99
|
type TableFormatting = document_d_exports.TableFormatting;
|
|
100
|
+
type TableGridChange = document_d_exports.TableGridChange;
|
|
95
101
|
type TableLook = document_d_exports.TableLook;
|
|
96
102
|
type TableMeasurement = document_d_exports.TableMeasurement;
|
|
97
103
|
type TableRow = document_d_exports.TableRow;
|
|
@@ -102,10 +108,11 @@ type TextContent = document_d_exports.TextContent;
|
|
|
102
108
|
type TextEffect = document_d_exports.TextEffect;
|
|
103
109
|
type TextFormatting = document_d_exports.TextFormatting;
|
|
104
110
|
type Theme = document_d_exports.Theme;
|
|
111
|
+
type ThemeColor = document_d_exports.ThemeColor;
|
|
105
112
|
type ThemeColorScheme = document_d_exports.ThemeColorScheme;
|
|
106
|
-
type
|
|
113
|
+
type ThemeColorValue = document_d_exports.ThemeColorValue;
|
|
107
114
|
type ThemeFont = document_d_exports.ThemeFont;
|
|
108
115
|
type ThemeFontScheme = document_d_exports.ThemeFontScheme;
|
|
109
116
|
type UnderlineStyle = document_d_exports.UnderlineStyle;
|
|
110
117
|
type VerticalAlign = document_d_exports.VerticalAlign;
|
|
111
|
-
export type { AbstractNumbering, BlockContent, BookmarkEnd, BookmarkStart, BorderSpec, BreakContent, CellMargins, ColorValue, Column, ComplexField, ConditionalFormatStyle, DocDefaults, Document, DocumentBody, DocxConformanceClass, DocxPackage, DrawingContent, DrawingRawXmlMode, EmphasisMark, Endnote, EndnotePosition, EndnoteProperties, Field, FieldCharContent, FieldType, FloatingTableProperties, FontInfo, FontTable, FooterReference, Footnote, FootnotePosition, FootnoteProperties, HeaderFooter, HeaderFooterType, HeaderReference, Hyperlink, Image, ImageCrop, ImagePadding, ImagePosition, ImageSize, ImageTransform, ImageWrap, InstrTextContent, LevelSuffix, LineNumberRestart, LineSpacingRule, ListLevel, ListRendering, MediaFile, NoBreakHyphenContent, NoteNumberRestart, NoteReferenceContent, NumberFormat, NumberingDefinitions, NumberingInstance, PageOrientation, Paragraph, ParagraphAlignment, ParagraphContent, ParagraphFormatting, PositionalTab, Relationship, RelationshipMap, RelationshipType, Run, RunContent, Section, SectionProperties, SectionStart, ShadingProperties, Shape, ShapeContent, ShapeFill, ShapeGeometryAdjustment, ShapeOutline, ShapeTextBody, ShapeType, SimpleField, SoftHyphenContent, Style, StyleDefinitions, StyleType, SymbolContent, TabContent, TabLeader, TabStop, TabStopAlignment, Table, TableBorders, TableCell, TableCellFormatting, TableFormatting, TableLook, TableMeasurement, TableRow, TableRowFormatting, TableWidthType, TextBox, TextContent, TextEffect, TextFormatting, Theme, ThemeColorScheme,
|
|
118
|
+
export type { AbstractNumbering, BlockContent, BookmarkEnd, BookmarkStart, BorderSpec, BreakContent, CellMargins, ColorValue, Column, ComplexField, ConditionalFormatStyle, DocDefaults, Document, DocumentBody, DocxConformanceClass, DocxPackage, DrawingContent, DrawingRawXmlMode, EmbeddedFontRef, EmphasisMark, Endnote, EndnotePosition, EndnoteProperties, Field, FieldCharContent, FieldType, FloatingTableProperties, FontCharset, FontInfo, FontTable, FooterReference, Footnote, FootnotePosition, FootnoteProperties, HeaderFooter, HeaderFooterType, HeaderReference, Hyperlink, Image, ImageCrop, ImagePadding, ImagePosition, ImageSize, ImageTransform, ImageWrap, InstrTextContent, LevelLegacy, LevelOverride, LevelSuffix, LineNumberRestart, LineSpacingRule, ListLevel, ListRendering, MediaFile, NoBreakHyphenContent, NoteNumberRestart, NoteReferenceContent, NumberFormat, NumberingDefinitions, NumberingInstance, PageOrientation, Paragraph, ParagraphAlignment, ParagraphContent, ParagraphFormatting, PositionalTab, Relationship, RelationshipMap, RelationshipType, Run, RunContent, SchemeColorSlot, Section, SectionProperties, SectionStart, ShadingProperties, Shape, ShapeContent, ShapeFill, ShapeGeometryAdjustment, ShapeOutline, ShapeTextBody, ShapeType, SimpleField, SoftHyphenContent, Style, StyleDefinitions, StyleType, SymbolContent, TabContent, TabLeader, TabStop, TabStopAlignment, Table, TableBorders, TableCell, TableCellFormatting, TableFormatting, TableGridChange, TableLook, TableMeasurement, TableRow, TableRowFormatting, TableWidthType, TextBox, TextContent, TextEffect, TextFormatting, Theme, ThemeColor, ThemeColorScheme, ThemeColorValue, ThemeFont, ThemeFontScheme, UnderlineStyle, VerticalAlign };
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
import { BorderStyleValue, PresetLineDashVal, PresetLineDashValue } from "@stll/docx-core/model";
|
|
2
|
+
//#region src/utils/borderCss.d.ts
|
|
3
|
+
/** The CSS `border-style` keywords folio paints a border with, in one tuple. */
|
|
4
|
+
declare const CSS_BORDER_STYLE_VALUES: readonly ["none", "solid", "double", "dotted", "dashed", "groove", "ridge", "inset", "outset"];
|
|
5
|
+
/** The CSS `border-style` keywords folio paints a border with. */
|
|
6
|
+
type CssBorderStyle = (typeof CSS_BORDER_STYLE_VALUES)[number];
|
|
7
|
+
/**
|
|
8
|
+
* Read the CSS keyword an editor attribute carries into the union folio paints.
|
|
9
|
+
*
|
|
10
|
+
* The attribute is a bare `string` because a host may write any CSS keyword
|
|
11
|
+
* into it. A keyword folio does not paint is not guessed at: the caller gets
|
|
12
|
+
* `undefined` and applies its own default.
|
|
13
|
+
*/
|
|
14
|
+
declare const cssBorderStyleOf: (value: string | undefined) => CssBorderStyle | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* Every `ST_Border` member's CSS rendering.
|
|
17
|
+
*
|
|
18
|
+
* The art borders (`apples` … `zigZagStitch`) and the gap-patterned line
|
|
19
|
+
* styles degrade to a plain line, which is how Word itself degrades where the
|
|
20
|
+
* specialised glyphs are unavailable; folio paints the underlying line and
|
|
21
|
+
* round-trips the member. `custom` names art supplied by a relationship, so it
|
|
22
|
+
* degrades the same way.
|
|
23
|
+
*/
|
|
24
|
+
declare const CSS_BORDER_STYLES: {
|
|
25
|
+
readonly nil: "none";
|
|
26
|
+
readonly none: "none";
|
|
27
|
+
readonly single: "solid";
|
|
28
|
+
readonly thick: "solid";
|
|
29
|
+
readonly double: "double";
|
|
30
|
+
readonly dotted: "dotted";
|
|
31
|
+
readonly dashed: "dashed";
|
|
32
|
+
readonly dotDash: "dashed";
|
|
33
|
+
readonly dotDotDash: "dotted";
|
|
34
|
+
readonly triple: "double";
|
|
35
|
+
readonly thinThickSmallGap: "double";
|
|
36
|
+
readonly thickThinSmallGap: "double";
|
|
37
|
+
readonly thinThickThinSmallGap: "double";
|
|
38
|
+
readonly thinThickMediumGap: "double";
|
|
39
|
+
readonly thickThinMediumGap: "double";
|
|
40
|
+
readonly thinThickThinMediumGap: "double";
|
|
41
|
+
readonly thinThickLargeGap: "double";
|
|
42
|
+
readonly thickThinLargeGap: "double";
|
|
43
|
+
readonly thinThickThinLargeGap: "double";
|
|
44
|
+
readonly wave: "solid";
|
|
45
|
+
readonly doubleWave: "double";
|
|
46
|
+
readonly dashSmallGap: "dashed";
|
|
47
|
+
readonly dashDotStroked: "dashed";
|
|
48
|
+
readonly threeDEmboss: "ridge";
|
|
49
|
+
readonly threeDEngrave: "groove";
|
|
50
|
+
readonly outset: "outset";
|
|
51
|
+
readonly inset: "inset";
|
|
52
|
+
readonly apples: "solid";
|
|
53
|
+
readonly archedScallops: "solid";
|
|
54
|
+
readonly babyPacifier: "solid";
|
|
55
|
+
readonly babyRattle: "solid";
|
|
56
|
+
readonly balloons3Colors: "solid";
|
|
57
|
+
readonly balloonsHotAir: "solid";
|
|
58
|
+
readonly basicBlackDashes: "solid";
|
|
59
|
+
readonly basicBlackDots: "solid";
|
|
60
|
+
readonly basicBlackSquares: "solid";
|
|
61
|
+
readonly basicThinLines: "solid";
|
|
62
|
+
readonly basicWhiteDashes: "solid";
|
|
63
|
+
readonly basicWhiteDots: "solid";
|
|
64
|
+
readonly basicWhiteSquares: "solid";
|
|
65
|
+
readonly basicWideInline: "solid";
|
|
66
|
+
readonly basicWideMidline: "solid";
|
|
67
|
+
readonly basicWideOutline: "solid";
|
|
68
|
+
readonly bats: "solid";
|
|
69
|
+
readonly birds: "solid";
|
|
70
|
+
readonly birdsFlight: "solid";
|
|
71
|
+
readonly cabins: "solid";
|
|
72
|
+
readonly cakeSlice: "solid";
|
|
73
|
+
readonly candyCorn: "solid";
|
|
74
|
+
readonly celticKnotwork: "solid";
|
|
75
|
+
readonly certificateBanner: "solid";
|
|
76
|
+
readonly chainLink: "solid";
|
|
77
|
+
readonly champagneBottle: "solid";
|
|
78
|
+
readonly checkedBarBlack: "solid";
|
|
79
|
+
readonly checkedBarColor: "solid";
|
|
80
|
+
readonly checkered: "solid";
|
|
81
|
+
readonly christmasTree: "solid";
|
|
82
|
+
readonly circlesLines: "solid";
|
|
83
|
+
readonly circlesRectangles: "solid";
|
|
84
|
+
readonly classicalWave: "solid";
|
|
85
|
+
readonly clocks: "solid";
|
|
86
|
+
readonly compass: "solid";
|
|
87
|
+
readonly confetti: "solid";
|
|
88
|
+
readonly confettiGrays: "solid";
|
|
89
|
+
readonly confettiOutline: "solid";
|
|
90
|
+
readonly confettiStreamers: "solid";
|
|
91
|
+
readonly confettiWhite: "solid";
|
|
92
|
+
readonly cornerTriangles: "solid";
|
|
93
|
+
readonly couponCutoutDashes: "solid";
|
|
94
|
+
readonly couponCutoutDots: "solid";
|
|
95
|
+
readonly crazyMaze: "solid";
|
|
96
|
+
readonly creaturesButterfly: "solid";
|
|
97
|
+
readonly creaturesFish: "solid";
|
|
98
|
+
readonly creaturesInsects: "solid";
|
|
99
|
+
readonly creaturesLadyBug: "solid";
|
|
100
|
+
readonly crossStitch: "solid";
|
|
101
|
+
readonly cup: "solid";
|
|
102
|
+
readonly decoArch: "solid";
|
|
103
|
+
readonly decoArchColor: "solid";
|
|
104
|
+
readonly decoBlocks: "solid";
|
|
105
|
+
readonly diamondsGray: "solid";
|
|
106
|
+
readonly doubleD: "solid";
|
|
107
|
+
readonly doubleDiamonds: "solid";
|
|
108
|
+
readonly earth1: "solid";
|
|
109
|
+
readonly earth2: "solid";
|
|
110
|
+
readonly earth3: "solid";
|
|
111
|
+
readonly eclipsingSquares1: "solid";
|
|
112
|
+
readonly eclipsingSquares2: "solid";
|
|
113
|
+
readonly eggsBlack: "solid";
|
|
114
|
+
readonly fans: "solid";
|
|
115
|
+
readonly film: "solid";
|
|
116
|
+
readonly firecrackers: "solid";
|
|
117
|
+
readonly flowersBlockPrint: "solid";
|
|
118
|
+
readonly flowersDaisies: "solid";
|
|
119
|
+
readonly flowersModern1: "solid";
|
|
120
|
+
readonly flowersModern2: "solid";
|
|
121
|
+
readonly flowersPansy: "solid";
|
|
122
|
+
readonly flowersRedRose: "solid";
|
|
123
|
+
readonly flowersRoses: "solid";
|
|
124
|
+
readonly flowersTeacup: "solid";
|
|
125
|
+
readonly flowersTiny: "solid";
|
|
126
|
+
readonly gems: "solid";
|
|
127
|
+
readonly gingerbreadMan: "solid";
|
|
128
|
+
readonly gradient: "solid";
|
|
129
|
+
readonly handmade1: "solid";
|
|
130
|
+
readonly handmade2: "solid";
|
|
131
|
+
readonly heartBalloon: "solid";
|
|
132
|
+
readonly heartGray: "solid";
|
|
133
|
+
readonly hearts: "solid";
|
|
134
|
+
readonly heebieJeebies: "solid";
|
|
135
|
+
readonly holly: "solid";
|
|
136
|
+
readonly houseFunky: "solid";
|
|
137
|
+
readonly hypnotic: "solid";
|
|
138
|
+
readonly iceCreamCones: "solid";
|
|
139
|
+
readonly lightBulb: "solid";
|
|
140
|
+
readonly lightning1: "solid";
|
|
141
|
+
readonly lightning2: "solid";
|
|
142
|
+
readonly mapPins: "solid";
|
|
143
|
+
readonly mapleLeaf: "solid";
|
|
144
|
+
readonly mapleMuffins: "solid";
|
|
145
|
+
readonly marquee: "solid";
|
|
146
|
+
readonly marqueeToothed: "solid";
|
|
147
|
+
readonly moons: "solid";
|
|
148
|
+
readonly mosaic: "solid";
|
|
149
|
+
readonly musicNotes: "solid";
|
|
150
|
+
readonly northwest: "solid";
|
|
151
|
+
readonly ovals: "solid";
|
|
152
|
+
readonly packages: "solid";
|
|
153
|
+
readonly palmsBlack: "solid";
|
|
154
|
+
readonly palmsColor: "solid";
|
|
155
|
+
readonly paperClips: "solid";
|
|
156
|
+
readonly papyrus: "solid";
|
|
157
|
+
readonly partyFavor: "solid";
|
|
158
|
+
readonly partyGlass: "solid";
|
|
159
|
+
readonly pencils: "solid";
|
|
160
|
+
readonly people: "solid";
|
|
161
|
+
readonly peopleWaving: "solid";
|
|
162
|
+
readonly peopleHats: "solid";
|
|
163
|
+
readonly poinsettias: "solid";
|
|
164
|
+
readonly postageStamp: "solid";
|
|
165
|
+
readonly pumpkin1: "solid";
|
|
166
|
+
readonly pushPinNote2: "solid";
|
|
167
|
+
readonly pushPinNote1: "solid";
|
|
168
|
+
readonly pyramids: "solid";
|
|
169
|
+
readonly pyramidsAbove: "solid";
|
|
170
|
+
readonly quadrants: "solid";
|
|
171
|
+
readonly rings: "solid";
|
|
172
|
+
readonly safari: "solid";
|
|
173
|
+
readonly sawtooth: "solid";
|
|
174
|
+
readonly sawtoothGray: "solid";
|
|
175
|
+
readonly scaredCat: "solid";
|
|
176
|
+
readonly seattle: "solid";
|
|
177
|
+
readonly shadowedSquares: "solid";
|
|
178
|
+
readonly sharksTeeth: "solid";
|
|
179
|
+
readonly shorebirdTracks: "solid";
|
|
180
|
+
readonly skyrocket: "solid";
|
|
181
|
+
readonly snowflakeFancy: "solid";
|
|
182
|
+
readonly snowflakes: "solid";
|
|
183
|
+
readonly sombrero: "solid";
|
|
184
|
+
readonly southwest: "solid";
|
|
185
|
+
readonly stars: "solid";
|
|
186
|
+
readonly starsTop: "solid";
|
|
187
|
+
readonly stars3d: "solid";
|
|
188
|
+
readonly starsBlack: "solid";
|
|
189
|
+
readonly starsShadowed: "solid";
|
|
190
|
+
readonly sun: "solid";
|
|
191
|
+
readonly swirligig: "solid";
|
|
192
|
+
readonly tornPaper: "solid";
|
|
193
|
+
readonly tornPaperBlack: "solid";
|
|
194
|
+
readonly trees: "solid";
|
|
195
|
+
readonly triangleParty: "solid";
|
|
196
|
+
readonly triangles: "solid";
|
|
197
|
+
readonly triangle1: "solid";
|
|
198
|
+
readonly triangle2: "solid";
|
|
199
|
+
readonly triangleCircle1: "solid";
|
|
200
|
+
readonly triangleCircle2: "solid";
|
|
201
|
+
readonly shapes1: "solid";
|
|
202
|
+
readonly shapes2: "solid";
|
|
203
|
+
readonly twistedLines1: "solid";
|
|
204
|
+
readonly twistedLines2: "solid";
|
|
205
|
+
readonly vine: "solid";
|
|
206
|
+
readonly waveline: "solid";
|
|
207
|
+
readonly weavingAngles: "solid";
|
|
208
|
+
readonly weavingBraid: "solid";
|
|
209
|
+
readonly weavingRibbon: "solid";
|
|
210
|
+
readonly weavingStrips: "solid";
|
|
211
|
+
readonly whiteFlowers: "solid";
|
|
212
|
+
readonly woodwork: "solid";
|
|
213
|
+
readonly xIllusions: "solid";
|
|
214
|
+
readonly zanyTriangles: "solid";
|
|
215
|
+
readonly zigZag: "solid";
|
|
216
|
+
readonly zigZagStitch: "solid";
|
|
217
|
+
readonly custom: "solid";
|
|
218
|
+
};
|
|
219
|
+
/**
|
|
220
|
+
* Whether a laid-out border paints a line.
|
|
221
|
+
*
|
|
222
|
+
* Only an explicit `none` does not: a border with a width but no style paints
|
|
223
|
+
* the CSS initial `solid`, which is what the measurers and the painter have
|
|
224
|
+
* always assumed. The argument is a CSS keyword, never an `ST_Border` member —
|
|
225
|
+
* `nil` cannot reach here, which is what typing `BorderStyle.style` bought.
|
|
226
|
+
*/
|
|
227
|
+
declare const paintsCssBorder: (style: CssBorderStyle | undefined) => boolean;
|
|
228
|
+
/**
|
|
229
|
+
* The CSS `border-style` for a parsed `w:val`.
|
|
230
|
+
*
|
|
231
|
+
* A token the schema does not declare paints as a plain line: the member is
|
|
232
|
+
* kept for the round trip, but nothing can be inferred about how it draws.
|
|
233
|
+
*/
|
|
234
|
+
declare const cssBorderStyle: (style: BorderStyleValue | undefined) => CssBorderStyle;
|
|
235
|
+
/**
|
|
236
|
+
* The CSS `border-style` for a parsed `a:prstDash@val`.
|
|
237
|
+
*
|
|
238
|
+
* A token the schema does not declare paints as a plain line, the way an
|
|
239
|
+
* undeclared `ST_Border` member does: the member is kept for the round trip,
|
|
240
|
+
* but nothing can be inferred about how it draws.
|
|
241
|
+
*/
|
|
242
|
+
declare const cssBorderStyleForDash: (dash: PresetLineDashValue | undefined) => CssBorderStyle;
|
|
243
|
+
/** The preset dash an authored CSS border style serializes to. */
|
|
244
|
+
declare const presetDashForCssBorderStyle: (style: string | undefined) => PresetLineDashVal;
|
|
245
|
+
//#endregion
|
|
246
|
+
export { CSS_BORDER_STYLES, CSS_BORDER_STYLE_VALUES, CssBorderStyle, cssBorderStyle, cssBorderStyleForDash, cssBorderStyleOf, paintsCssBorder, presetDashForCssBorderStyle };
|