docx 8.5.0 → 9.0.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/build/index.cjs +283 -153
- package/build/index.d.ts +2997 -5
- package/build/index.iife.js +283 -153
- package/build/index.mjs +283 -153
- package/build/index.umd.js +283 -153
- package/package.json +4 -4
- package/build/export/formatter.d.ts +0 -4
- package/build/export/formatter.spec.d.ts +0 -1
- package/build/export/index.d.ts +0 -1
- package/build/export/packer/image-replacer.d.ts +0 -5
- package/build/export/packer/image-replacer.spec.d.ts +0 -1
- package/build/export/packer/next-compiler.d.ts +0 -11
- package/build/export/packer/next-compiler.spec.d.ts +0 -1
- package/build/export/packer/numbering-replacer.d.ts +0 -4
- package/build/export/packer/packer.d.ts +0 -18
- package/build/export/packer/packer.spec.d.ts +0 -1
- package/build/file/app-properties/app-properties-attributes.d.ts +0 -10
- package/build/file/app-properties/app-properties.d.ts +0 -4
- package/build/file/border/border.d.ts +0 -39
- package/build/file/border/border.spec.d.ts +0 -1
- package/build/file/border/index.d.ts +0 -1
- package/build/file/checkbox/checkbox-symbol.d.ts +0 -4
- package/build/file/checkbox/checkbox-util.d.ts +0 -17
- package/build/file/checkbox/checkbox-util.spec.d.ts +0 -1
- package/build/file/checkbox/checkbox.d.ts +0 -8
- package/build/file/checkbox/checkbox.spec.d.ts +0 -1
- package/build/file/checkbox/index.d.ts +0 -3
- package/build/file/content-types/content-types-attributes.d.ts +0 -8
- package/build/file/content-types/content-types.d.ts +0 -6
- package/build/file/content-types/content-types.spec.d.ts +0 -1
- package/build/file/content-types/default/default-attributes.d.ts +0 -10
- package/build/file/content-types/default/default.d.ts +0 -4
- package/build/file/content-types/override/override-attributes.d.ts +0 -10
- package/build/file/content-types/override/override.d.ts +0 -4
- package/build/file/core-properties/index.d.ts +0 -1
- package/build/file/core-properties/properties.d.ts +0 -43
- package/build/file/core-properties/properties.spec.d.ts +0 -1
- package/build/file/custom-properties/custom-properties-attributes.d.ts +0 -10
- package/build/file/custom-properties/custom-properties.d.ts +0 -9
- package/build/file/custom-properties/custom-properties.spec.d.ts +0 -1
- package/build/file/custom-properties/custom-property-attributes.d.ts +0 -12
- package/build/file/custom-properties/custom-property.d.ts +0 -11
- package/build/file/custom-properties/index.d.ts +0 -2
- package/build/file/document/body/body.d.ts +0 -10
- package/build/file/document/body/body.spec.d.ts +0 -1
- package/build/file/document/body/index.d.ts +0 -2
- package/build/file/document/body/section-properties/index.d.ts +0 -2
- package/build/file/document/body/section-properties/properties/column.d.ts +0 -10
- package/build/file/document/body/section-properties/properties/columns.d.ts +0 -13
- package/build/file/document/body/section-properties/properties/columns.spec.d.ts +0 -1
- package/build/file/document/body/section-properties/properties/doc-grid.d.ts +0 -22
- package/build/file/document/body/section-properties/properties/doc-grid.spec.d.ts +0 -1
- package/build/file/document/body/section-properties/properties/header-footer-reference.d.ts +0 -17
- package/build/file/document/body/section-properties/properties/header-footer-reference.spec.d.ts +0 -1
- package/build/file/document/body/section-properties/properties/index.d.ts +0 -12
- package/build/file/document/body/section-properties/properties/line-number.d.ts +0 -14
- package/build/file/document/body/section-properties/properties/page-borders.d.ts +0 -30
- package/build/file/document/body/section-properties/properties/page-borders.spec.d.ts +0 -1
- package/build/file/document/body/section-properties/properties/page-margin.d.ts +0 -14
- package/build/file/document/body/section-properties/properties/page-number.d.ts +0 -24
- package/build/file/document/body/section-properties/properties/page-size.d.ts +0 -14
- package/build/file/document/body/section-properties/properties/page-size.spec.d.ts +0 -1
- package/build/file/document/body/section-properties/properties/page-text-direction.d.ts +0 -8
- package/build/file/document/body/section-properties/properties/page-text-direction.spec.d.ts +0 -1
- package/build/file/document/body/section-properties/properties/section-type.d.ts +0 -18
- package/build/file/document/body/section-properties/properties/section-type.spec.d.ts +0 -1
- package/build/file/document/body/section-properties/section-properties.d.ts +0 -53
- package/build/file/document/body/section-properties/section-properties.spec.d.ts +0 -1
- package/build/file/document/document-attributes.d.ts +0 -85
- package/build/file/document/document-background/document-background.d.ts +0 -23
- package/build/file/document/document-background/document-background.spec.d.ts +0 -1
- package/build/file/document/document-background/index.d.ts +0 -1
- package/build/file/document/document.d.ts +0 -15
- package/build/file/document/document.spec.d.ts +0 -1
- package/build/file/document/index.d.ts +0 -4
- package/build/file/document-wrapper.d.ts +0 -17
- package/build/file/document-wrapper.spec.d.ts +0 -1
- package/build/file/drawing/anchor/anchor-attributes.d.ts +0 -24
- package/build/file/drawing/anchor/anchor.d.ts +0 -10
- package/build/file/drawing/anchor/anchor.spec.d.ts +0 -1
- package/build/file/drawing/anchor/index.d.ts +0 -2
- package/build/file/drawing/doc-properties/doc-properties-children.d.ts +0 -3
- package/build/file/drawing/doc-properties/doc-properties-children.spec.d.ts +0 -1
- package/build/file/drawing/doc-properties/doc-properties.d.ts +0 -11
- package/build/file/drawing/drawing.d.ts +0 -19
- package/build/file/drawing/drawing.spec.d.ts +0 -1
- package/build/file/drawing/effect-extent/effect-extent.d.ts +0 -8
- package/build/file/drawing/extent/extent-attributes.d.ts +0 -10
- package/build/file/drawing/extent/extent.d.ts +0 -5
- package/build/file/drawing/floating/align.d.ts +0 -5
- package/build/file/drawing/floating/align.spec.d.ts +0 -1
- package/build/file/drawing/floating/floating-position.d.ts +0 -49
- package/build/file/drawing/floating/horizontal-position.d.ts +0 -5
- package/build/file/drawing/floating/horizontal-position.spec.d.ts +0 -1
- package/build/file/drawing/floating/index.d.ts +0 -4
- package/build/file/drawing/floating/position-offset.d.ts +0 -4
- package/build/file/drawing/floating/position-offset.spec.d.ts +0 -1
- package/build/file/drawing/floating/simple-pos.d.ts +0 -4
- package/build/file/drawing/floating/simple-pos.spec.d.ts +0 -1
- package/build/file/drawing/floating/vertical-position.d.ts +0 -5
- package/build/file/drawing/floating/vertical-position.spec.d.ts +0 -1
- package/build/file/drawing/graphic-frame/graphic-frame-locks/graphic-frame-lock-attributes.d.ts +0 -10
- package/build/file/drawing/graphic-frame/graphic-frame-locks/graphic-frame-locks.d.ts +0 -4
- package/build/file/drawing/graphic-frame/graphic-frame-properties.d.ts +0 -4
- package/build/file/drawing/index.d.ts +0 -3
- package/build/file/drawing/inline/graphic/graphic-data/graphic-data-attribute.d.ts +0 -8
- package/build/file/drawing/inline/graphic/graphic-data/graphic-data.d.ts +0 -11
- package/build/file/drawing/inline/graphic/graphic-data/index.d.ts +0 -1
- package/build/file/drawing/inline/graphic/graphic-data/pic/blip/blip-fill.d.ts +0 -5
- package/build/file/drawing/inline/graphic/graphic-data/pic/blip/blip.d.ts +0 -5
- package/build/file/drawing/inline/graphic/graphic-data/pic/blip/source-rectangle.d.ts +0 -4
- package/build/file/drawing/inline/graphic/graphic-data/pic/blip/stretch.d.ts +0 -4
- package/build/file/drawing/inline/graphic/graphic-data/pic/index.d.ts +0 -1
- package/build/file/drawing/inline/graphic/graphic-data/pic/non-visual-pic-properties/child-non-visual-pic-properties/child-non-visual-pic-properties.d.ts +0 -4
- package/build/file/drawing/inline/graphic/graphic-data/pic/non-visual-pic-properties/child-non-visual-pic-properties/pic-locks/pic-locks-attributes.d.ts +0 -10
- package/build/file/drawing/inline/graphic/graphic-data/pic/non-visual-pic-properties/child-non-visual-pic-properties/pic-locks/pic-locks.d.ts +0 -4
- package/build/file/drawing/inline/graphic/graphic-data/pic/non-visual-pic-properties/non-visual-pic-properties.d.ts +0 -4
- package/build/file/drawing/inline/graphic/graphic-data/pic/non-visual-pic-properties/non-visual-properties/non-visual-properties-attributes.d.ts +0 -12
- package/build/file/drawing/inline/graphic/graphic-data/pic/non-visual-pic-properties/non-visual-properties/non-visual-properties.d.ts +0 -5
- package/build/file/drawing/inline/graphic/graphic-data/pic/pic-attributes.d.ts +0 -8
- package/build/file/drawing/inline/graphic/graphic-data/pic/pic.d.ts +0 -10
- package/build/file/drawing/inline/graphic/graphic-data/pic/shape-properties/form/extents/extents-attributes.d.ts +0 -10
- package/build/file/drawing/inline/graphic/graphic-data/pic/shape-properties/form/extents/extents.d.ts +0 -5
- package/build/file/drawing/inline/graphic/graphic-data/pic/shape-properties/form/form.d.ts +0 -17
- package/build/file/drawing/inline/graphic/graphic-data/pic/shape-properties/form/index.d.ts +0 -1
- package/build/file/drawing/inline/graphic/graphic-data/pic/shape-properties/form/offset/off-attributes.d.ts +0 -10
- package/build/file/drawing/inline/graphic/graphic-data/pic/shape-properties/form/offset/off.d.ts +0 -4
- package/build/file/drawing/inline/graphic/graphic-data/pic/shape-properties/form.spec.d.ts +0 -1
- package/build/file/drawing/inline/graphic/graphic-data/pic/shape-properties/outline/no-fill.d.ts +0 -2
- package/build/file/drawing/inline/graphic/graphic-data/pic/shape-properties/outline/no-fill.spec.d.ts +0 -1
- package/build/file/drawing/inline/graphic/graphic-data/pic/shape-properties/outline/outline.d.ts +0 -42
- package/build/file/drawing/inline/graphic/graphic-data/pic/shape-properties/outline/outline.spec.d.ts +0 -1
- package/build/file/drawing/inline/graphic/graphic-data/pic/shape-properties/outline/rgb-color.d.ts +0 -6
- package/build/file/drawing/inline/graphic/graphic-data/pic/shape-properties/outline/scheme-color.d.ts +0 -25
- package/build/file/drawing/inline/graphic/graphic-data/pic/shape-properties/outline/solid-fill.d.ts +0 -12
- package/build/file/drawing/inline/graphic/graphic-data/pic/shape-properties/outline/solid-fill.spec.d.ts +0 -1
- package/build/file/drawing/inline/graphic/graphic-data/pic/shape-properties/preset-geometry/adjustment-values/adjustment-values.d.ts +0 -4
- package/build/file/drawing/inline/graphic/graphic-data/pic/shape-properties/preset-geometry/preset-geometry-attributes.d.ts +0 -8
- package/build/file/drawing/inline/graphic/graphic-data/pic/shape-properties/preset-geometry/preset-geometry.d.ts +0 -4
- package/build/file/drawing/inline/graphic/graphic-data/pic/shape-properties/shape-properties-attributes.d.ts +0 -8
- package/build/file/drawing/inline/graphic/graphic-data/pic/shape-properties/shape-properties.d.ts +0 -10
- package/build/file/drawing/inline/graphic/graphic.d.ts +0 -11
- package/build/file/drawing/inline/graphic/index.d.ts +0 -1
- package/build/file/drawing/inline/index.d.ts +0 -1
- package/build/file/drawing/inline/inline.d.ts +0 -12
- package/build/file/drawing/inline/inline.spec.d.ts +0 -1
- package/build/file/drawing/text-wrap/index.d.ts +0 -5
- package/build/file/drawing/text-wrap/text-wrapping.d.ts +0 -18
- package/build/file/drawing/text-wrap/wrap-none.d.ts +0 -4
- package/build/file/drawing/text-wrap/wrap-square.d.ts +0 -6
- package/build/file/drawing/text-wrap/wrap-tight.d.ts +0 -5
- package/build/file/drawing/text-wrap/wrap-top-and-bottom.d.ts +0 -5
- package/build/file/file-child.d.ts +0 -4
- package/build/file/file.d.ts +0 -72
- package/build/file/file.spec.d.ts +0 -1
- package/build/file/fonts/create-regular-font.d.ts +0 -8
- package/build/file/fonts/font-table.d.ts +0 -10
- package/build/file/fonts/font-wrapper.d.ts +0 -16
- package/build/file/fonts/font.d.ts +0 -49
- package/build/file/fonts/font.spec.d.ts +0 -1
- package/build/file/fonts/index.d.ts +0 -1
- package/build/file/fonts/obfuscate-ttf-to-odttf.d.ts +0 -2
- package/build/file/fonts/obsfuscate-ttf-to-odtts.spec.d.ts +0 -1
- package/build/file/footer/footer-attributes.d.ts +0 -50
- package/build/file/footer/footer.d.ts +0 -9
- package/build/file/footer/footer.spec.d.ts +0 -1
- package/build/file/footer/index.d.ts +0 -1
- package/build/file/footer-wrapper.d.ts +0 -23
- package/build/file/footer-wrapper.spec.d.ts +0 -1
- package/build/file/footnotes/footnote/footnote-attributes.d.ts +0 -10
- package/build/file/footnotes/footnote/footnote.d.ts +0 -14
- package/build/file/footnotes/footnote/footnote.spec.d.ts +0 -1
- package/build/file/footnotes/footnote/index.d.ts +0 -1
- package/build/file/footnotes/footnote/run/continuation-seperator-run.d.ts +0 -4
- package/build/file/footnotes/footnote/run/continuation-seperator.d.ts +0 -4
- package/build/file/footnotes/footnote/run/footnote-ref-run.d.ts +0 -4
- package/build/file/footnotes/footnote/run/footnote-ref.d.ts +0 -4
- package/build/file/footnotes/footnote/run/index.d.ts +0 -1
- package/build/file/footnotes/footnote/run/reference-run.d.ts +0 -15
- package/build/file/footnotes/footnote/run/seperator-run.d.ts +0 -4
- package/build/file/footnotes/footnote/run/seperator.d.ts +0 -4
- package/build/file/footnotes/footnotes-attributes.d.ts +0 -40
- package/build/file/footnotes/footnotes.d.ts +0 -6
- package/build/file/footnotes/index.d.ts +0 -2
- package/build/file/footnotes-wrapper.d.ts +0 -10
- package/build/file/footnotes-wrapper.spec.d.ts +0 -1
- package/build/file/header/header-attributes.d.ts +0 -72
- package/build/file/header/header.d.ts +0 -9
- package/build/file/header/header.spec.d.ts +0 -1
- package/build/file/header/index.d.ts +0 -1
- package/build/file/header-wrapper.d.ts +0 -23
- package/build/file/header-wrapper.spec.d.ts +0 -1
- package/build/file/header.d.ts +0 -13
- package/build/file/index.d.ts +0 -21
- package/build/file/media/data.d.ts +0 -22
- package/build/file/media/index.d.ts +0 -2
- package/build/file/media/media.d.ts +0 -16
- package/build/file/media/media.spec.d.ts +0 -1
- package/build/file/numbering/abstract-numbering.d.ts +0 -6
- package/build/file/numbering/abstract-numbering.spec.d.ts +0 -1
- package/build/file/numbering/concrete-numbering.spec.d.ts +0 -1
- package/build/file/numbering/index.d.ts +0 -4
- package/build/file/numbering/level.d.ts +0 -96
- package/build/file/numbering/level.spec.d.ts +0 -1
- package/build/file/numbering/multi-level-type.d.ts +0 -4
- package/build/file/numbering/num.d.ts +0 -22
- package/build/file/numbering/numbering.d.ts +0 -21
- package/build/file/numbering/numbering.spec.d.ts +0 -1
- package/build/file/paragraph/formatting/alignment.d.ts +0 -26
- package/build/file/paragraph/formatting/alignment.spec.d.ts +0 -1
- package/build/file/paragraph/formatting/border.d.ts +0 -14
- package/build/file/paragraph/formatting/border.spec.d.ts +0 -1
- package/build/file/paragraph/formatting/break.d.ts +0 -11
- package/build/file/paragraph/formatting/break.spec.d.ts +0 -1
- package/build/file/paragraph/formatting/indent.d.ts +0 -13
- package/build/file/paragraph/formatting/indent.spec.d.ts +0 -1
- package/build/file/paragraph/formatting/index.d.ts +0 -8
- package/build/file/paragraph/formatting/spacing.d.ts +0 -18
- package/build/file/paragraph/formatting/spacing.spec.d.ts +0 -1
- package/build/file/paragraph/formatting/style.d.ts +0 -13
- package/build/file/paragraph/formatting/style.spec.d.ts +0 -1
- package/build/file/paragraph/formatting/tab-stop.d.ts +0 -44
- package/build/file/paragraph/formatting/tab-stop.spec.d.ts +0 -1
- package/build/file/paragraph/formatting/unordered-list.d.ts +0 -4
- package/build/file/paragraph/formatting/unordered-list.spec.d.ts +0 -1
- package/build/file/paragraph/formatting/word-wrap.d.ts +0 -11
- package/build/file/paragraph/formatting/word-wrap.spec.d.ts +0 -1
- package/build/file/paragraph/frame/frame-properties.d.ts +0 -55
- package/build/file/paragraph/frame/frame-properties.spec.d.ts +0 -1
- package/build/file/paragraph/frame/index.d.ts +0 -1
- package/build/file/paragraph/index.d.ts +0 -7
- package/build/file/paragraph/links/bookmark-attributes.d.ts +0 -17
- package/build/file/paragraph/links/bookmark.d.ts +0 -18
- package/build/file/paragraph/links/bookmark.spec.d.ts +0 -1
- package/build/file/paragraph/links/hyperlink-attributes.d.ts +0 -13
- package/build/file/paragraph/links/hyperlink.d.ts +0 -26
- package/build/file/paragraph/links/hyperlink.spec.d.ts +0 -1
- package/build/file/paragraph/links/index.d.ts +0 -4
- package/build/file/paragraph/links/outline-level.d.ts +0 -5
- package/build/file/paragraph/links/outline-level.spec.d.ts +0 -1
- package/build/file/paragraph/links/pageref-field-instruction.d.ts +0 -5
- package/build/file/paragraph/links/pageref-field-instruction.spec.d.ts +0 -1
- package/build/file/paragraph/links/pageref.d.ts +0 -8
- package/build/file/paragraph/links/pageref.spec.d.ts +0 -1
- package/build/file/paragraph/math/brackets/index.d.ts +0 -4
- package/build/file/paragraph/math/brackets/math-angled-brackets.d.ts +0 -7
- package/build/file/paragraph/math/brackets/math-angled-brackets.spec.d.ts +0 -1
- package/build/file/paragraph/math/brackets/math-beginning-character.d.ts +0 -4
- package/build/file/paragraph/math/brackets/math-beginning-character.spec.d.ts +0 -1
- package/build/file/paragraph/math/brackets/math-bracket-properties.d.ts +0 -7
- package/build/file/paragraph/math/brackets/math-bracket-properties.spec.d.ts +0 -1
- package/build/file/paragraph/math/brackets/math-curly-brackets.d.ts +0 -7
- package/build/file/paragraph/math/brackets/math-curly-brackets.spec.d.ts +0 -1
- package/build/file/paragraph/math/brackets/math-ending-char.d.ts +0 -4
- package/build/file/paragraph/math/brackets/math-ending-character.spec.d.ts +0 -1
- package/build/file/paragraph/math/brackets/math-round-brackets.d.ts +0 -7
- package/build/file/paragraph/math/brackets/math-round-brackets.spec.d.ts +0 -1
- package/build/file/paragraph/math/brackets/math-square-brackets.d.ts +0 -7
- package/build/file/paragraph/math/brackets/math-square-brackets.spec.d.ts +0 -1
- package/build/file/paragraph/math/fraction/index.d.ts +0 -3
- package/build/file/paragraph/math/fraction/math-denominator.d.ts +0 -5
- package/build/file/paragraph/math/fraction/math-denominator.spec.d.ts +0 -1
- package/build/file/paragraph/math/fraction/math-fraction.d.ts +0 -9
- package/build/file/paragraph/math/fraction/math-fraction.spec.d.ts +0 -1
- package/build/file/paragraph/math/fraction/math-numerator.d.ts +0 -5
- package/build/file/paragraph/math/fraction/math-numerator.spec.d.ts +0 -1
- package/build/file/paragraph/math/function/index.d.ts +0 -3
- package/build/file/paragraph/math/function/math-function-name.d.ts +0 -5
- package/build/file/paragraph/math/function/math-function-name.spec.d.ts +0 -1
- package/build/file/paragraph/math/function/math-function-properties.d.ts +0 -4
- package/build/file/paragraph/math/function/math-function-properties.spec.d.ts +0 -1
- package/build/file/paragraph/math/function/math-function.d.ts +0 -9
- package/build/file/paragraph/math/function/math-function.spec.d.ts +0 -1
- package/build/file/paragraph/math/index.d.ts +0 -9
- package/build/file/paragraph/math/math-component.d.ts +0 -9
- package/build/file/paragraph/math/math-run.d.ts +0 -4
- package/build/file/paragraph/math/math-run.spec.d.ts +0 -1
- package/build/file/paragraph/math/math-text.d.ts +0 -4
- package/build/file/paragraph/math/math-text.spec.d.ts +0 -1
- package/build/file/paragraph/math/math.d.ts +0 -8
- package/build/file/paragraph/math/math.spec.d.ts +0 -1
- package/build/file/paragraph/math/n-ary/index.d.ts +0 -8
- package/build/file/paragraph/math/n-ary/math-accent-character.d.ts +0 -4
- package/build/file/paragraph/math/n-ary/math-accent-character.spec.d.ts +0 -1
- package/build/file/paragraph/math/n-ary/math-base.d.ts +0 -5
- package/build/file/paragraph/math/n-ary/math-base.spec.d.ts +0 -1
- package/build/file/paragraph/math/n-ary/math-integral.d.ts +0 -10
- package/build/file/paragraph/math/n-ary/math-integral.spec.d.ts +0 -1
- package/build/file/paragraph/math/n-ary/math-limit-location.d.ts +0 -4
- package/build/file/paragraph/math/n-ary/math-limit-location.spec.d.ts +0 -1
- package/build/file/paragraph/math/n-ary/math-n-ary-properties.d.ts +0 -4
- package/build/file/paragraph/math/n-ary/math-n-ary-properties.spec.d.ts +0 -1
- package/build/file/paragraph/math/n-ary/math-sub-script-hide.d.ts +0 -4
- package/build/file/paragraph/math/n-ary/math-sub-script-hide.spec.d.ts +0 -1
- package/build/file/paragraph/math/n-ary/math-sub-script.d.ts +0 -5
- package/build/file/paragraph/math/n-ary/math-sub-script.spec.d.ts +0 -1
- package/build/file/paragraph/math/n-ary/math-sum.d.ts +0 -10
- package/build/file/paragraph/math/n-ary/math-sum.spec.d.ts +0 -1
- package/build/file/paragraph/math/n-ary/math-super-script-hide.d.ts +0 -4
- package/build/file/paragraph/math/n-ary/math-super-script-hide.spec.d.ts +0 -1
- package/build/file/paragraph/math/n-ary/math-super-script.d.ts +0 -5
- package/build/file/paragraph/math/n-ary/math-super-script.spec.d.ts +0 -1
- package/build/file/paragraph/math/radical/index.d.ts +0 -3
- package/build/file/paragraph/math/radical/math-degree-hide.d.ts +0 -4
- package/build/file/paragraph/math/radical/math-degree-hide.spec.d.ts +0 -1
- package/build/file/paragraph/math/radical/math-degree.d.ts +0 -5
- package/build/file/paragraph/math/radical/math-degree.spec.d.ts +0 -1
- package/build/file/paragraph/math/radical/math-radical-properties.d.ts +0 -4
- package/build/file/paragraph/math/radical/math-radical-properties.spec.d.ts +0 -1
- package/build/file/paragraph/math/radical/math-radical.d.ts +0 -9
- package/build/file/paragraph/math/radical/math-radical.spec.d.ts +0 -1
- package/build/file/paragraph/math/script/index.d.ts +0 -4
- package/build/file/paragraph/math/script/pre-sub-super-script/index.d.ts +0 -2
- package/build/file/paragraph/math/script/pre-sub-super-script/math-pre-sub-super-script-function-properties.d.ts +0 -4
- package/build/file/paragraph/math/script/pre-sub-super-script/math-pre-sub-super-script-function-properties.spec.d.ts +0 -1
- package/build/file/paragraph/math/script/pre-sub-super-script/math-pre-sub-super-script-function.d.ts +0 -10
- package/build/file/paragraph/math/script/pre-sub-super-script/math-pre-sub-super-script-function.spec.d.ts +0 -1
- package/build/file/paragraph/math/script/sub-script/index.d.ts +0 -2
- package/build/file/paragraph/math/script/sub-script/math-sub-script-function-properties.d.ts +0 -4
- package/build/file/paragraph/math/script/sub-script/math-sub-script-function-properties.spec.d.ts +0 -1
- package/build/file/paragraph/math/script/sub-script/math-sub-script-function.d.ts +0 -9
- package/build/file/paragraph/math/script/sub-script/math-sub-script-function.spec.d.ts +0 -1
- package/build/file/paragraph/math/script/sub-super-script/index.d.ts +0 -2
- package/build/file/paragraph/math/script/sub-super-script/math-sub-super-script-function-properties.d.ts +0 -4
- package/build/file/paragraph/math/script/sub-super-script/math-sub-super-script-function-properties.spec.d.ts +0 -1
- package/build/file/paragraph/math/script/sub-super-script/math-sub-super-script-function.d.ts +0 -10
- package/build/file/paragraph/math/script/sub-super-script/math-sub-super-script-function.spec.d.ts +0 -1
- package/build/file/paragraph/math/script/super-script/index.d.ts +0 -2
- package/build/file/paragraph/math/script/super-script/math-super-script-function-properties.d.ts +0 -4
- package/build/file/paragraph/math/script/super-script/math-super-script-function-properties.spec.d.ts +0 -1
- package/build/file/paragraph/math/script/super-script/math-super-script-function.d.ts +0 -9
- package/build/file/paragraph/math/script/super-script/math-super-script-function.spec.d.ts +0 -1
- package/build/file/paragraph/paragraph.d.ts +0 -22
- package/build/file/paragraph/paragraph.spec.d.ts +0 -1
- package/build/file/paragraph/properties.d.ts +0 -56
- package/build/file/paragraph/properties.spec.d.ts +0 -1
- package/build/file/paragraph/run/break.d.ts +0 -4
- package/build/file/paragraph/run/break.spec.d.ts +0 -1
- package/build/file/paragraph/run/comment-run.d.ts +0 -27
- package/build/file/paragraph/run/comment-run.spec.d.ts +0 -1
- package/build/file/paragraph/run/emphasis-mark.d.ts +0 -13
- package/build/file/paragraph/run/emphasis-mark.spec.d.ts +0 -1
- package/build/file/paragraph/run/empty-children.d.ts +0 -52
- package/build/file/paragraph/run/empty-children.spec.d.ts +0 -1
- package/build/file/paragraph/run/field.d.ts +0 -10
- package/build/file/paragraph/run/formatting.d.ts +0 -14
- package/build/file/paragraph/run/formatting.spec.d.ts +0 -1
- package/build/file/paragraph/run/image-run.d.ts +0 -21
- package/build/file/paragraph/run/image-run.spec.d.ts +0 -1
- package/build/file/paragraph/run/index.d.ts +0 -13
- package/build/file/paragraph/run/language.d.ts +0 -7
- package/build/file/paragraph/run/language.spec.d.ts +0 -1
- package/build/file/paragraph/run/page-number.d.ts +0 -13
- package/build/file/paragraph/run/page-number.spec.d.ts +0 -1
- package/build/file/paragraph/run/positional-tab.d.ts +0 -25
- package/build/file/paragraph/run/positional-tab.spec.d.ts +0 -1
- package/build/file/paragraph/run/properties.d.ts +0 -77
- package/build/file/paragraph/run/run-components/symbol.d.ts +0 -4
- package/build/file/paragraph/run/run-components/symbol.spec.d.ts +0 -1
- package/build/file/paragraph/run/run-components/text.d.ts +0 -10
- package/build/file/paragraph/run/run-components/text.spec.d.ts +0 -1
- package/build/file/paragraph/run/run-fonts.d.ts +0 -12
- package/build/file/paragraph/run/run-fonts.spec.d.ts +0 -1
- package/build/file/paragraph/run/run.d.ts +0 -23
- package/build/file/paragraph/run/run.spec.d.ts +0 -1
- package/build/file/paragraph/run/script.d.ts +0 -10
- package/build/file/paragraph/run/script.spec.d.ts +0 -1
- package/build/file/paragraph/run/sequential-identifier-instruction.d.ts +0 -4
- package/build/file/paragraph/run/sequential-identifier.d.ts +0 -4
- package/build/file/paragraph/run/sequential-identifier.spec.d.ts +0 -1
- package/build/file/paragraph/run/simple-field.d.ts +0 -7
- package/build/file/paragraph/run/simple-field.spec.d.ts +0 -1
- package/build/file/paragraph/run/symbol-run.d.ts +0 -8
- package/build/file/paragraph/run/symbol-run.spec.d.ts +0 -1
- package/build/file/paragraph/run/text-attributes.d.ts +0 -9
- package/build/file/paragraph/run/text-run.d.ts +0 -4
- package/build/file/paragraph/run/text-run.spec.d.ts +0 -1
- package/build/file/paragraph/run/underline.d.ts +0 -24
- package/build/file/paragraph/run/underline.spec.d.ts +0 -1
- package/build/file/relationships/attributes.d.ts +0 -8
- package/build/file/relationships/index.d.ts +0 -1
- package/build/file/relationships/relationship/relationship-attributes.d.ts +0 -14
- package/build/file/relationships/relationship/relationship.d.ts +0 -8
- package/build/file/relationships/relationships.d.ts +0 -7
- package/build/file/relationships/relationships.spec.d.ts +0 -1
- package/build/file/settings/compatibility-setting/compatibility-setting.d.ts +0 -15
- package/build/file/settings/compatibility-setting/compatibility-setting.spec.d.ts +0 -1
- package/build/file/settings/compatibility.d.ts +0 -72
- package/build/file/settings/compatibility.spec.d.ts +0 -1
- package/build/file/settings/index.d.ts +0 -1
- package/build/file/settings/settings.d.ts +0 -52
- package/build/file/settings/settings.spec.d.ts +0 -1
- package/build/file/shading/index.d.ts +0 -1
- package/build/file/shading/shading.d.ts +0 -48
- package/build/file/shading/shading.spec.d.ts +0 -1
- package/build/file/shared/alignment.d.ts +0 -14
- package/build/file/shared/index.d.ts +0 -3
- package/build/file/shared/number-format.d.ts +0 -64
- package/build/file/shared/space-type.d.ts +0 -4
- package/build/file/styles/defaults/document-defaults.d.ts +0 -12
- package/build/file/styles/defaults/document-defaults.spec.d.ts +0 -1
- package/build/file/styles/defaults/index.d.ts +0 -3
- package/build/file/styles/defaults/paragraph-properties.d.ts +0 -5
- package/build/file/styles/defaults/run-properties.d.ts +0 -5
- package/build/file/styles/external-styles-factory.d.ts +0 -4
- package/build/file/styles/external-styles-factory.spec.d.ts +0 -1
- package/build/file/styles/factory.d.ts +0 -22
- package/build/file/styles/index.d.ts +0 -4
- package/build/file/styles/latent-styles/exceptions.d.ts +0 -20
- package/build/file/styles/latent-styles/exceptions.spec.d.ts +0 -1
- package/build/file/styles/latent-styles/index.d.ts +0 -1
- package/build/file/styles/latent-styles/latent-styles.d.ts +0 -5
- package/build/file/styles/latent-styles/latent-styles.spec.d.ts +0 -1
- package/build/file/styles/sample/default-style.d.ts +0 -1
- package/build/file/styles/sample/default-style.spec.d.ts +0 -1
- package/build/file/styles/sample/index.d.ts +0 -1
- package/build/file/styles/style/character-style.d.ts +0 -12
- package/build/file/styles/style/character-style.spec.d.ts +0 -1
- package/build/file/styles/style/components.d.ts +0 -11
- package/build/file/styles/style/components.spec.d.ts +0 -1
- package/build/file/styles/style/default-styles.d.ts +0 -44
- package/build/file/styles/style/default-styles.spec.d.ts +0 -1
- package/build/file/styles/style/index.d.ts +0 -4
- package/build/file/styles/style/paragraph-style.d.ts +0 -14
- package/build/file/styles/style/paragraph-style.spec.d.ts +0 -1
- package/build/file/styles/style/style.d.ts +0 -20
- package/build/file/styles/style/style.spec.d.ts +0 -1
- package/build/file/styles/styles.d.ts +0 -15
- package/build/file/styles/styles.spec.d.ts +0 -1
- package/build/file/table/grid.d.ts +0 -8
- package/build/file/table/grid.spec.d.ts +0 -1
- package/build/file/table/index.d.ts +0 -5
- package/build/file/table/table-cell/index.d.ts +0 -2
- package/build/file/table/table-cell/table-cell-components.d.ts +0 -31
- package/build/file/table/table-cell/table-cell-properties.d.ts +0 -20
- package/build/file/table/table-cell/table-cell-properties.spec.d.ts +0 -1
- package/build/file/table/table-cell/table-cell.d.ts +0 -12
- package/build/file/table/table-cell/table-cell.spec.d.ts +0 -1
- package/build/file/table/table-properties/index.d.ts +0 -4
- package/build/file/table/table-properties/table-borders.d.ts +0 -45
- package/build/file/table/table-properties/table-borders.spec.d.ts +0 -1
- package/build/file/table/table-properties/table-cell-margin.d.ts +0 -16
- package/build/file/table/table-properties/table-cell-margin.spec.d.ts +0 -1
- package/build/file/table/table-properties/table-float-properties.d.ts +0 -42
- package/build/file/table/table-properties/table-float-properties.spec.d.ts +0 -1
- package/build/file/table/table-properties/table-layout.d.ts +0 -8
- package/build/file/table/table-properties/table-properties.d.ts +0 -23
- package/build/file/table/table-properties/table-properties.spec.d.ts +0 -1
- package/build/file/table/table-row/index.d.ts +0 -3
- package/build/file/table/table-row/table-row-height.d.ts +0 -19
- package/build/file/table/table-row/table-row-properties.d.ts +0 -14
- package/build/file/table/table-row/table-row-properties.spec.d.ts +0 -1
- package/build/file/table/table-row/table-row.d.ts +0 -16
- package/build/file/table/table-row/table-row.spec.d.ts +0 -1
- package/build/file/table/table-width.d.ts +0 -15
- package/build/file/table/table.d.ts +0 -23
- package/build/file/table/table.spec.d.ts +0 -1
- package/build/file/table-of-contents/field-instruction.d.ts +0 -6
- package/build/file/table-of-contents/index.d.ts +0 -2
- package/build/file/table-of-contents/sdt-content.d.ts +0 -4
- package/build/file/table-of-contents/sdt-properties.d.ts +0 -4
- package/build/file/table-of-contents/table-of-contents-properties.d.ts +0 -23
- package/build/file/table-of-contents/table-of-contents.d.ts +0 -5
- package/build/file/table-of-contents/table-of-contents.spec.d.ts +0 -1
- package/build/file/track-revision/index.d.ts +0 -2
- package/build/file/track-revision/track-revision-components/deleted-page-number.d.ts +0 -10
- package/build/file/track-revision/track-revision-components/deleted-page-number.spec.d.ts +0 -1
- package/build/file/track-revision/track-revision-components/deleted-text-run.d.ts +0 -13
- package/build/file/track-revision/track-revision-components/deleted-text-run.spec.d.ts +0 -1
- package/build/file/track-revision/track-revision-components/deleted-text.d.ts +0 -4
- package/build/file/track-revision/track-revision-components/deleted-text.spec.d.ts +0 -1
- package/build/file/track-revision/track-revision-components/inserted-text-run.d.ts +0 -9
- package/build/file/track-revision/track-revision-components/inserted-text-run.spec.d.ts +0 -1
- package/build/file/track-revision/track-revision.d.ts +0 -13
- package/build/file/vertical-align/index.d.ts +0 -1
- package/build/file/vertical-align/vertical-align.d.ts +0 -16
- package/build/file/xml-components/attribute.spec.d.ts +0 -1
- package/build/file/xml-components/attributes.d.ts +0 -46
- package/build/file/xml-components/base.d.ts +0 -13
- package/build/file/xml-components/default-attributes.d.ts +0 -25
- package/build/file/xml-components/imported-xml-component.d.ts +0 -14
- package/build/file/xml-components/imported-xml-component.spec.d.ts +0 -1
- package/build/file/xml-components/index.d.ts +0 -8
- package/build/file/xml-components/initializable-xml-component.d.ts +0 -4
- package/build/file/xml-components/simple-elements.d.ts +0 -30
- package/build/file/xml-components/simple-elements.spec.d.ts +0 -1
- package/build/file/xml-components/xml-component.d.ts +0 -12
- package/build/file/xml-components/xml-component.spec.d.ts +0 -1
- package/build/file/xml-components/xmlable-object.d.ts +0 -7
- package/build/index.spec.d.ts +0 -1
- package/build/patcher/content-types-manager.d.ts +0 -2
- package/build/patcher/content-types-manager.spec.d.ts +0 -1
- package/build/patcher/from-docx.d.ts +0 -26
- package/build/patcher/from-docx.spec.d.ts +0 -1
- package/build/patcher/index.d.ts +0 -1
- package/build/patcher/paragraph-split-inject.d.ts +0 -6
- package/build/patcher/paragraph-split-inject.spec.d.ts +0 -1
- package/build/patcher/paragraph-token-replacer.d.ts +0 -8
- package/build/patcher/paragraph-token-replacer.spec.d.ts +0 -1
- package/build/patcher/relationship-manager.d.ts +0 -4
- package/build/patcher/relationship-manager.spec.d.ts +0 -1
- package/build/patcher/replacer.d.ts +0 -5
- package/build/patcher/replacer.spec.d.ts +0 -1
- package/build/patcher/run-renderer.d.ts +0 -22
- package/build/patcher/run-renderer.spec.d.ts +0 -1
- package/build/patcher/traverser.d.ts +0 -8
- package/build/patcher/traverser.spec.d.ts +0 -1
- package/build/patcher/util.d.ts +0 -5
- package/build/patcher/util.spec.d.ts +0 -1
- package/build/tests/utility.d.ts +0 -3
- package/build/util/convenience-functions.d.ts +0 -10
- package/build/util/convenience-functions.spec.d.ts +0 -1
- package/build/util/index.d.ts +0 -2
- package/build/util/values.d.ts +0 -20
- package/build/util/values.spec.d.ts +0 -1
package/build/index.cjs
CHANGED
|
@@ -10036,6 +10036,25 @@ const TextEffect = {
|
|
|
10036
10036
|
SPARKLE: "sparkle",
|
|
10037
10037
|
NONE: "none"
|
|
10038
10038
|
};
|
|
10039
|
+
const HighlightColor = {
|
|
10040
|
+
BLACK: "black",
|
|
10041
|
+
BLUE: "blue",
|
|
10042
|
+
CYAN: "cyan",
|
|
10043
|
+
DARK_BLUE: "darkBlue",
|
|
10044
|
+
DARK_CYAN: "darkCyan",
|
|
10045
|
+
DARK_GRAY: "darkGray",
|
|
10046
|
+
DARK_GREEN: "darkGreen",
|
|
10047
|
+
DARK_MAGENTA: "darkMagenta",
|
|
10048
|
+
DARK_RED: "darkRed",
|
|
10049
|
+
DARK_YELLOW: "darkYellow",
|
|
10050
|
+
GREEN: "green",
|
|
10051
|
+
LIGHT_GRAY: "lightGray",
|
|
10052
|
+
MAGENTA: "magenta",
|
|
10053
|
+
NONE: "none",
|
|
10054
|
+
RED: "red",
|
|
10055
|
+
WHITE: "white",
|
|
10056
|
+
YELLOW: "yellow"
|
|
10057
|
+
};
|
|
10039
10058
|
class RunProperties extends IgnoreIfEmptyXmlComponent {
|
|
10040
10059
|
constructor(options2) {
|
|
10041
10060
|
var _a, _b;
|
|
@@ -10183,11 +10202,9 @@ class Text extends XmlComponent {
|
|
|
10183
10202
|
if (typeof options2 === "string") {
|
|
10184
10203
|
this.root.push(new TextAttributes({ space: SpaceType.PRESERVE }));
|
|
10185
10204
|
this.root.push(options2);
|
|
10186
|
-
return this;
|
|
10187
10205
|
} else {
|
|
10188
10206
|
this.root.push(new TextAttributes({ space: (_a = options2.space) != null ? _a : SpaceType.DEFAULT }));
|
|
10189
10207
|
this.root.push(options2.text);
|
|
10190
|
-
return this;
|
|
10191
10208
|
}
|
|
10192
10209
|
}
|
|
10193
10210
|
}
|
|
@@ -10427,26 +10444,47 @@ class GraphicDataAttributes extends XmlAttributeComponent {
|
|
|
10427
10444
|
});
|
|
10428
10445
|
}
|
|
10429
10446
|
}
|
|
10430
|
-
|
|
10431
|
-
|
|
10432
|
-
|
|
10433
|
-
|
|
10434
|
-
|
|
10435
|
-
|
|
10436
|
-
}
|
|
10437
|
-
|
|
10438
|
-
|
|
10439
|
-
|
|
10440
|
-
|
|
10441
|
-
super("a:blip");
|
|
10442
|
-
this.root.push(
|
|
10443
|
-
new BlipAttributes({
|
|
10444
|
-
embed: `rId{${mediaData.fileName}}`,
|
|
10445
|
-
cstate: "none"
|
|
10446
|
-
})
|
|
10447
|
-
);
|
|
10447
|
+
const createSvgBlip = (mediaData) => new BuilderElement({
|
|
10448
|
+
name: "asvg:svgBlip",
|
|
10449
|
+
attributes: {
|
|
10450
|
+
asvg: {
|
|
10451
|
+
key: "xmlns:asvg",
|
|
10452
|
+
value: "http://schemas.microsoft.com/office/drawing/2016/SVG/main"
|
|
10453
|
+
},
|
|
10454
|
+
embed: {
|
|
10455
|
+
key: "r:embed",
|
|
10456
|
+
value: `rId{${mediaData.fileName}}`
|
|
10457
|
+
}
|
|
10448
10458
|
}
|
|
10449
|
-
}
|
|
10459
|
+
});
|
|
10460
|
+
const createExtention = (mediaData) => new BuilderElement({
|
|
10461
|
+
name: "a:ext",
|
|
10462
|
+
attributes: {
|
|
10463
|
+
uri: {
|
|
10464
|
+
key: "uri",
|
|
10465
|
+
value: "{96DAC541-7B7A-43D3-8B79-37D633B846F1}"
|
|
10466
|
+
}
|
|
10467
|
+
},
|
|
10468
|
+
children: [createSvgBlip(mediaData)]
|
|
10469
|
+
});
|
|
10470
|
+
const createExtentionList = (mediaData) => new BuilderElement({
|
|
10471
|
+
name: "a:extLst",
|
|
10472
|
+
children: [createExtention(mediaData)]
|
|
10473
|
+
});
|
|
10474
|
+
const createBlip = (mediaData) => new BuilderElement({
|
|
10475
|
+
name: "a:blip",
|
|
10476
|
+
attributes: {
|
|
10477
|
+
embed: {
|
|
10478
|
+
key: "r:embed",
|
|
10479
|
+
value: `rId{${mediaData.type === "svg" ? mediaData.fallback.fileName : mediaData.fileName}}`
|
|
10480
|
+
},
|
|
10481
|
+
cstate: {
|
|
10482
|
+
key: "cstate",
|
|
10483
|
+
value: "none"
|
|
10484
|
+
}
|
|
10485
|
+
},
|
|
10486
|
+
children: mediaData.type === "svg" ? [createExtentionList(mediaData)] : []
|
|
10487
|
+
});
|
|
10450
10488
|
class SourceRectangle extends XmlComponent {
|
|
10451
10489
|
constructor() {
|
|
10452
10490
|
super("a:srcRect");
|
|
@@ -10466,7 +10504,7 @@ class Stretch extends XmlComponent {
|
|
|
10466
10504
|
class BlipFill extends XmlComponent {
|
|
10467
10505
|
constructor(mediaData) {
|
|
10468
10506
|
super("pic:blipFill");
|
|
10469
|
-
this.root.push(
|
|
10507
|
+
this.root.push(createBlip(mediaData));
|
|
10470
10508
|
this.root.push(new SourceRectangle());
|
|
10471
10509
|
this.root.push(new Stretch());
|
|
10472
10510
|
}
|
|
@@ -11116,28 +11154,57 @@ class Drawing extends XmlComponent {
|
|
|
11116
11154
|
}
|
|
11117
11155
|
}
|
|
11118
11156
|
}
|
|
11157
|
+
const convertDataURIToBinary = (dataURI) => {
|
|
11158
|
+
if (typeof atob === "function") {
|
|
11159
|
+
const BASE64_MARKER = ";base64,";
|
|
11160
|
+
const base64Index = dataURI.indexOf(BASE64_MARKER);
|
|
11161
|
+
const base64IndexWithOffset = base64Index === -1 ? 0 : base64Index + BASE64_MARKER.length;
|
|
11162
|
+
return new Uint8Array(
|
|
11163
|
+
atob(dataURI.substring(base64IndexWithOffset)).split("").map((c) => c.charCodeAt(0))
|
|
11164
|
+
);
|
|
11165
|
+
} else {
|
|
11166
|
+
const b = require("buffer");
|
|
11167
|
+
return new b.Buffer(dataURI, "base64");
|
|
11168
|
+
}
|
|
11169
|
+
};
|
|
11170
|
+
const standardizeData = (data) => typeof data === "string" ? convertDataURIToBinary(data) : data;
|
|
11171
|
+
const createImageData = (options2, key) => ({
|
|
11172
|
+
data: standardizeData(options2.data),
|
|
11173
|
+
fileName: key,
|
|
11174
|
+
transformation: {
|
|
11175
|
+
pixels: {
|
|
11176
|
+
x: Math.round(options2.transformation.width),
|
|
11177
|
+
y: Math.round(options2.transformation.height)
|
|
11178
|
+
},
|
|
11179
|
+
emus: {
|
|
11180
|
+
x: Math.round(options2.transformation.width * 9525),
|
|
11181
|
+
y: Math.round(options2.transformation.height * 9525)
|
|
11182
|
+
},
|
|
11183
|
+
flip: options2.transformation.flip,
|
|
11184
|
+
rotation: options2.transformation.rotation ? options2.transformation.rotation * 6e4 : void 0
|
|
11185
|
+
}
|
|
11186
|
+
});
|
|
11119
11187
|
class ImageRun extends Run {
|
|
11120
11188
|
constructor(options2) {
|
|
11121
11189
|
super({});
|
|
11122
|
-
__publicField(this, "key"
|
|
11190
|
+
__publicField(this, "key");
|
|
11191
|
+
__publicField(this, "fallbackKey", `${uniqueId()}.png`);
|
|
11123
11192
|
__publicField(this, "imageData");
|
|
11124
|
-
|
|
11125
|
-
this.imageData = {
|
|
11126
|
-
|
|
11127
|
-
|
|
11128
|
-
|
|
11129
|
-
|
|
11130
|
-
|
|
11131
|
-
|
|
11132
|
-
|
|
11133
|
-
|
|
11134
|
-
|
|
11135
|
-
|
|
11136
|
-
|
|
11137
|
-
|
|
11138
|
-
|
|
11139
|
-
}
|
|
11140
|
-
};
|
|
11193
|
+
this.key = `${uniqueId()}.${options2.type}`;
|
|
11194
|
+
this.imageData = options2.type === "svg" ? __spreadProps(__spreadValues({
|
|
11195
|
+
type: options2.type
|
|
11196
|
+
}, createImageData(options2, this.key)), {
|
|
11197
|
+
fallback: __spreadValues({
|
|
11198
|
+
type: options2.fallback.type
|
|
11199
|
+
}, createImageData(
|
|
11200
|
+
__spreadProps(__spreadValues({}, options2.fallback), {
|
|
11201
|
+
transformation: options2.transformation
|
|
11202
|
+
}),
|
|
11203
|
+
this.fallbackKey
|
|
11204
|
+
))
|
|
11205
|
+
}) : __spreadValues({
|
|
11206
|
+
type: options2.type
|
|
11207
|
+
}, createImageData(options2, this.key));
|
|
11141
11208
|
const drawing = new Drawing(this.imageData, {
|
|
11142
11209
|
floating: options2.floating,
|
|
11143
11210
|
docProperties: options2.altText,
|
|
@@ -11147,20 +11214,10 @@ class ImageRun extends Run {
|
|
|
11147
11214
|
}
|
|
11148
11215
|
prepForXml(context) {
|
|
11149
11216
|
context.file.Media.addImage(this.key, this.imageData);
|
|
11150
|
-
|
|
11151
|
-
|
|
11152
|
-
convertDataURIToBinary(dataURI) {
|
|
11153
|
-
if (typeof atob === "function") {
|
|
11154
|
-
const BASE64_MARKER = ";base64,";
|
|
11155
|
-
const base64Index = dataURI.indexOf(BASE64_MARKER);
|
|
11156
|
-
const base64IndexWithOffset = base64Index === -1 ? 0 : base64Index + BASE64_MARKER.length;
|
|
11157
|
-
return new Uint8Array(
|
|
11158
|
-
atob(dataURI.substring(base64IndexWithOffset)).split("").map((c) => c.charCodeAt(0))
|
|
11159
|
-
);
|
|
11160
|
-
} else {
|
|
11161
|
-
const b = require("buffer");
|
|
11162
|
-
return new b.Buffer(dataURI, "base64");
|
|
11217
|
+
if (this.imageData.type === "svg") {
|
|
11218
|
+
context.file.Media.addImage(this.fallbackKey, this.imageData.fallback);
|
|
11163
11219
|
}
|
|
11220
|
+
return super.prepForXml(context);
|
|
11164
11221
|
}
|
|
11165
11222
|
}
|
|
11166
11223
|
class SequentialIdentifierInstruction extends XmlComponent {
|
|
@@ -12489,6 +12546,8 @@ class ParagraphProperties extends IgnoreIfEmptyXmlComponent {
|
|
|
12489
12546
|
instance: (_a = options2.numbering.instance) != null ? _a : 0
|
|
12490
12547
|
});
|
|
12491
12548
|
this.push(new NumberProperties(`${options2.numbering.reference}-${(_b = options2.numbering.instance) != null ? _b : 0}`, options2.numbering.level));
|
|
12549
|
+
} else if (options2.numbering === false) {
|
|
12550
|
+
this.push(new NumberProperties(0, 0));
|
|
12492
12551
|
}
|
|
12493
12552
|
if (options2.border) {
|
|
12494
12553
|
this.push(new Border(options2.border));
|
|
@@ -12673,9 +12732,9 @@ class MathLimitLocationAttributes extends XmlAttributeComponent {
|
|
|
12673
12732
|
}
|
|
12674
12733
|
}
|
|
12675
12734
|
class MathLimitLocation extends XmlComponent {
|
|
12676
|
-
constructor() {
|
|
12735
|
+
constructor(value) {
|
|
12677
12736
|
super("m:limLoc");
|
|
12678
|
-
this.root.push(new MathLimitLocationAttributes({ value: "undOvr" }));
|
|
12737
|
+
this.root.push(new MathLimitLocationAttributes({ value: value || "undOvr" }));
|
|
12679
12738
|
}
|
|
12680
12739
|
}
|
|
12681
12740
|
class MathSubScriptHideAttributes extends XmlAttributeComponent {
|
|
@@ -12703,12 +12762,12 @@ class MathSuperScriptHide extends XmlComponent {
|
|
|
12703
12762
|
}
|
|
12704
12763
|
}
|
|
12705
12764
|
class MathNAryProperties extends XmlComponent {
|
|
12706
|
-
constructor(accent, hasSuperScript, hasSubScript) {
|
|
12765
|
+
constructor(accent, hasSuperScript, hasSubScript, limitLocationVal) {
|
|
12707
12766
|
super("m:naryPr");
|
|
12708
12767
|
if (!!accent) {
|
|
12709
12768
|
this.root.push(new MathAccentCharacter(accent));
|
|
12710
12769
|
}
|
|
12711
|
-
this.root.push(new MathLimitLocation());
|
|
12770
|
+
this.root.push(new MathLimitLocation(limitLocationVal));
|
|
12712
12771
|
if (!hasSuperScript) {
|
|
12713
12772
|
this.root.push(new MathSuperScriptHide());
|
|
12714
12773
|
}
|
|
@@ -12749,7 +12808,7 @@ class MathSum extends XmlComponent {
|
|
|
12749
12808
|
class MathIntegral extends XmlComponent {
|
|
12750
12809
|
constructor(options2) {
|
|
12751
12810
|
super("m:nary");
|
|
12752
|
-
this.root.push(new MathNAryProperties("", !!options2.superScript, !!options2.subScript));
|
|
12811
|
+
this.root.push(new MathNAryProperties("", !!options2.superScript, !!options2.subScript, "subSup"));
|
|
12753
12812
|
if (!!options2.subScript) {
|
|
12754
12813
|
this.root.push(new MathSubScriptElement(options2.subScript));
|
|
12755
12814
|
}
|
|
@@ -12759,6 +12818,28 @@ class MathIntegral extends XmlComponent {
|
|
|
12759
12818
|
this.root.push(new MathBase(options2.children));
|
|
12760
12819
|
}
|
|
12761
12820
|
}
|
|
12821
|
+
class MathLimit extends XmlComponent {
|
|
12822
|
+
constructor(children) {
|
|
12823
|
+
super("m:lim");
|
|
12824
|
+
for (const child of children) {
|
|
12825
|
+
this.root.push(child);
|
|
12826
|
+
}
|
|
12827
|
+
}
|
|
12828
|
+
}
|
|
12829
|
+
class MathLimitUpper extends XmlComponent {
|
|
12830
|
+
constructor(options2) {
|
|
12831
|
+
super("m:limUpp");
|
|
12832
|
+
this.root.push(new MathBase(options2.children));
|
|
12833
|
+
this.root.push(new MathLimit(options2.limit));
|
|
12834
|
+
}
|
|
12835
|
+
}
|
|
12836
|
+
class MathLimitLower extends XmlComponent {
|
|
12837
|
+
constructor(options2) {
|
|
12838
|
+
super("m:limLow");
|
|
12839
|
+
this.root.push(new MathBase(options2.children));
|
|
12840
|
+
this.root.push(new MathLimit(options2.limit));
|
|
12841
|
+
}
|
|
12842
|
+
}
|
|
12762
12843
|
class MathSuperScriptProperties extends XmlComponent {
|
|
12763
12844
|
constructor() {
|
|
12764
12845
|
super("m:sSupPr");
|
|
@@ -13573,6 +13654,7 @@ class ContentTypes extends XmlComponent {
|
|
|
13573
13654
|
this.root.push(new Default("image/jpeg", "jpg"));
|
|
13574
13655
|
this.root.push(new Default("image/bmp", "bmp"));
|
|
13575
13656
|
this.root.push(new Default("image/gif", "gif"));
|
|
13657
|
+
this.root.push(new Default("image/svg+xml", "svg"));
|
|
13576
13658
|
this.root.push(new Default("application/vnd.openxmlformats-package.relationships+xml", "rels"));
|
|
13577
13659
|
this.root.push(new Default("application/xml", "xml"));
|
|
13578
13660
|
this.root.push(new Default("application/vnd.openxmlformats-officedocument.obfuscatedFont", "odttf"));
|
|
@@ -15452,7 +15534,7 @@ class File {
|
|
|
15452
15534
|
defaultTabStop: options2.defaultTabStop
|
|
15453
15535
|
});
|
|
15454
15536
|
this.media = new Media();
|
|
15455
|
-
if (options2.externalStyles) {
|
|
15537
|
+
if (options2.externalStyles !== void 0) {
|
|
15456
15538
|
const stylesFactory = new ExternalStylesFactory();
|
|
15457
15539
|
this.styles = stylesFactory.newInstance(options2.externalStyles);
|
|
15458
15540
|
} else if (options2.styles) {
|
|
@@ -18893,8 +18975,13 @@ class Compiler {
|
|
|
18893
18975
|
zip.file(obj.path, obj.data);
|
|
18894
18976
|
}
|
|
18895
18977
|
}
|
|
18896
|
-
for (const
|
|
18897
|
-
|
|
18978
|
+
for (const data of file.Media.Array) {
|
|
18979
|
+
if (data.type !== "svg") {
|
|
18980
|
+
zip.file(`word/media/${data.fileName}`, data.data);
|
|
18981
|
+
} else {
|
|
18982
|
+
zip.file(`word/media/${data.fileName}`, data.data);
|
|
18983
|
+
zip.file(`word/media/${data.fallback.fileName}`, data.fallback.data);
|
|
18984
|
+
}
|
|
18898
18985
|
}
|
|
18899
18986
|
for (const { data: buffer2, name, fontKey } of file.FontTable.fontOptionsWithKey) {
|
|
18900
18987
|
const [nameWithoutExtension] = name.split(".");
|
|
@@ -19479,64 +19566,6 @@ const splitRunElement = (runElement, token) => {
|
|
|
19479
19566
|
});
|
|
19480
19567
|
return { left: leftRunElement, right: rightRunElement };
|
|
19481
19568
|
};
|
|
19482
|
-
const formatter = new Formatter();
|
|
19483
|
-
const SPLIT_TOKEN = "ɵ";
|
|
19484
|
-
const replacer = (json, patch, patchText, renderedParagraphs, context, keepOriginalStyles = false) => {
|
|
19485
|
-
for (const renderedParagraph of renderedParagraphs) {
|
|
19486
|
-
const textJson = patch.children.map((c) => toJson(xml$1(formatter.format(c, context)))).map((c) => c.elements[0]);
|
|
19487
|
-
switch (patch.type) {
|
|
19488
|
-
case PatchType.DOCUMENT: {
|
|
19489
|
-
const parentElement = goToParentElementFromPath(json, renderedParagraph.path);
|
|
19490
|
-
const elementIndex = getLastElementIndexFromPath(renderedParagraph.path);
|
|
19491
|
-
parentElement.elements.splice(elementIndex, 1, ...textJson);
|
|
19492
|
-
break;
|
|
19493
|
-
}
|
|
19494
|
-
case PatchType.PARAGRAPH:
|
|
19495
|
-
default: {
|
|
19496
|
-
const paragraphElement = goToElementFromPath(json, renderedParagraph.path);
|
|
19497
|
-
replaceTokenInParagraphElement({
|
|
19498
|
-
paragraphElement,
|
|
19499
|
-
renderedParagraph,
|
|
19500
|
-
originalText: patchText,
|
|
19501
|
-
replacementText: SPLIT_TOKEN
|
|
19502
|
-
});
|
|
19503
|
-
const index = findRunElementIndexWithToken(paragraphElement, SPLIT_TOKEN);
|
|
19504
|
-
const runElementToBeReplaced = paragraphElement.elements[index];
|
|
19505
|
-
const { left, right } = splitRunElement(runElementToBeReplaced, SPLIT_TOKEN);
|
|
19506
|
-
let newRunElements = textJson;
|
|
19507
|
-
let patchedRightElement = right;
|
|
19508
|
-
if (keepOriginalStyles) {
|
|
19509
|
-
const runElementNonTextualElements = runElementToBeReplaced.elements.filter(
|
|
19510
|
-
(e) => e.type === "element" && e.name !== "w:t"
|
|
19511
|
-
);
|
|
19512
|
-
newRunElements = textJson.map((e) => __spreadProps(__spreadValues({}, e), {
|
|
19513
|
-
elements: [...runElementNonTextualElements, ...e.elements]
|
|
19514
|
-
}));
|
|
19515
|
-
patchedRightElement = __spreadProps(__spreadValues({}, right), {
|
|
19516
|
-
elements: [...runElementNonTextualElements, ...right.elements]
|
|
19517
|
-
});
|
|
19518
|
-
}
|
|
19519
|
-
paragraphElement.elements.splice(index, 1, left, ...newRunElements, patchedRightElement);
|
|
19520
|
-
break;
|
|
19521
|
-
}
|
|
19522
|
-
}
|
|
19523
|
-
}
|
|
19524
|
-
return json;
|
|
19525
|
-
};
|
|
19526
|
-
const goToElementFromPath = (json, path) => {
|
|
19527
|
-
let element2 = json;
|
|
19528
|
-
for (let i = 1; i < path.length; i++) {
|
|
19529
|
-
const index = path[i];
|
|
19530
|
-
const nextElements = element2.elements;
|
|
19531
|
-
if (!nextElements) {
|
|
19532
|
-
throw new Error("Could not find element");
|
|
19533
|
-
}
|
|
19534
|
-
element2 = nextElements[index];
|
|
19535
|
-
}
|
|
19536
|
-
return element2;
|
|
19537
|
-
};
|
|
19538
|
-
const goToParentElementFromPath = (json, path) => goToElementFromPath(json, path.slice(0, path.length - 1));
|
|
19539
|
-
const getLastElementIndexFromPath = (path) => path[path.length - 1];
|
|
19540
19569
|
const renderParagraphNode = (node) => {
|
|
19541
19570
|
if (node.element.name !== "w:p") {
|
|
19542
19571
|
throw new Error(`Invalid node type: ${node.element.name}`);
|
|
@@ -19546,7 +19575,7 @@ const renderParagraphNode = (node) => {
|
|
|
19546
19575
|
text: "",
|
|
19547
19576
|
runs: [],
|
|
19548
19577
|
index: -1,
|
|
19549
|
-
|
|
19578
|
+
pathToParagraph: []
|
|
19550
19579
|
};
|
|
19551
19580
|
}
|
|
19552
19581
|
let currentRunStringLength = 0;
|
|
@@ -19554,13 +19583,13 @@ const renderParagraphNode = (node) => {
|
|
|
19554
19583
|
const renderedRunNode = renderRunNode(element2, i, currentRunStringLength);
|
|
19555
19584
|
currentRunStringLength += renderedRunNode.text.length;
|
|
19556
19585
|
return renderedRunNode;
|
|
19557
|
-
}).filter((e) => !!e)
|
|
19586
|
+
}).filter((e) => !!e);
|
|
19558
19587
|
const text = runs.reduce((acc, curr) => acc + curr.text, "");
|
|
19559
19588
|
return {
|
|
19560
19589
|
text,
|
|
19561
19590
|
runs,
|
|
19562
19591
|
index: node.index,
|
|
19563
|
-
|
|
19592
|
+
pathToParagraph: buildNodePath(node)
|
|
19564
19593
|
};
|
|
19565
19594
|
};
|
|
19566
19595
|
const renderRunNode = (node, index, currentRunStringIndex) => {
|
|
@@ -19607,7 +19636,7 @@ const elementsToWrapper = (wrapper) => {
|
|
|
19607
19636
|
parent: wrapper
|
|
19608
19637
|
}))) != null ? _b : [];
|
|
19609
19638
|
};
|
|
19610
|
-
const
|
|
19639
|
+
const traverse = (node) => {
|
|
19611
19640
|
let renderedParagraphs = [];
|
|
19612
19641
|
const queue2 = [
|
|
19613
19642
|
...elementsToWrapper({
|
|
@@ -19625,8 +19654,74 @@ const findLocationOfText = (node, text) => {
|
|
|
19625
19654
|
queue2.push(...elementsToWrapper(currentNode));
|
|
19626
19655
|
}
|
|
19627
19656
|
}
|
|
19628
|
-
return renderedParagraphs
|
|
19657
|
+
return renderedParagraphs;
|
|
19658
|
+
};
|
|
19659
|
+
const findLocationOfText = (node, text) => traverse(node).filter((p) => p.text.includes(text));
|
|
19660
|
+
const formatter = new Formatter();
|
|
19661
|
+
const SPLIT_TOKEN = "ɵ";
|
|
19662
|
+
const replacer = ({
|
|
19663
|
+
json,
|
|
19664
|
+
patch,
|
|
19665
|
+
patchText,
|
|
19666
|
+
context,
|
|
19667
|
+
keepOriginalStyles = true
|
|
19668
|
+
}) => {
|
|
19669
|
+
const renderedParagraphs = findLocationOfText(json, patchText);
|
|
19670
|
+
if (renderedParagraphs.length === 0) {
|
|
19671
|
+
throw new Error(`Could not find text ${patchText}`);
|
|
19672
|
+
}
|
|
19673
|
+
for (const renderedParagraph of renderedParagraphs) {
|
|
19674
|
+
const textJson = patch.children.map((c) => toJson(xml$1(formatter.format(c, context)))).map((c) => c.elements[0]);
|
|
19675
|
+
switch (patch.type) {
|
|
19676
|
+
case PatchType.DOCUMENT: {
|
|
19677
|
+
const parentElement = goToParentElementFromPath(json, renderedParagraph.pathToParagraph);
|
|
19678
|
+
const elementIndex = getLastElementIndexFromPath(renderedParagraph.pathToParagraph);
|
|
19679
|
+
parentElement.elements.splice(elementIndex, 1, ...textJson);
|
|
19680
|
+
break;
|
|
19681
|
+
}
|
|
19682
|
+
case PatchType.PARAGRAPH:
|
|
19683
|
+
default: {
|
|
19684
|
+
const paragraphElement = goToElementFromPath(json, renderedParagraph.pathToParagraph);
|
|
19685
|
+
replaceTokenInParagraphElement({
|
|
19686
|
+
paragraphElement,
|
|
19687
|
+
renderedParagraph,
|
|
19688
|
+
originalText: patchText,
|
|
19689
|
+
replacementText: SPLIT_TOKEN
|
|
19690
|
+
});
|
|
19691
|
+
const index = findRunElementIndexWithToken(paragraphElement, SPLIT_TOKEN);
|
|
19692
|
+
const runElementToBeReplaced = paragraphElement.elements[index];
|
|
19693
|
+
const { left, right } = splitRunElement(runElementToBeReplaced, SPLIT_TOKEN);
|
|
19694
|
+
let newRunElements = textJson;
|
|
19695
|
+
let patchedRightElement = right;
|
|
19696
|
+
if (keepOriginalStyles) {
|
|
19697
|
+
const runElementNonTextualElements = runElementToBeReplaced.elements.filter(
|
|
19698
|
+
(e) => e.type === "element" && e.name !== "w:t"
|
|
19699
|
+
);
|
|
19700
|
+
newRunElements = textJson.map((e) => __spreadProps(__spreadValues({}, e), {
|
|
19701
|
+
elements: [...runElementNonTextualElements, ...e.elements]
|
|
19702
|
+
}));
|
|
19703
|
+
patchedRightElement = __spreadProps(__spreadValues({}, right), {
|
|
19704
|
+
elements: [...runElementNonTextualElements, ...right.elements]
|
|
19705
|
+
});
|
|
19706
|
+
}
|
|
19707
|
+
paragraphElement.elements.splice(index, 1, left, ...newRunElements, patchedRightElement);
|
|
19708
|
+
break;
|
|
19709
|
+
}
|
|
19710
|
+
}
|
|
19711
|
+
}
|
|
19712
|
+
return json;
|
|
19713
|
+
};
|
|
19714
|
+
const goToElementFromPath = (json, path) => {
|
|
19715
|
+
let element2 = json;
|
|
19716
|
+
for (let i = 1; i < path.length; i++) {
|
|
19717
|
+
const index = path[i];
|
|
19718
|
+
const nextElements = element2.elements;
|
|
19719
|
+
element2 = nextElements[index];
|
|
19720
|
+
}
|
|
19721
|
+
return element2;
|
|
19629
19722
|
};
|
|
19723
|
+
const goToParentElementFromPath = (json, path) => goToElementFromPath(json, path.slice(0, path.length - 1));
|
|
19724
|
+
const getLastElementIndexFromPath = (path) => path[path.length - 1];
|
|
19630
19725
|
const getIdFromRelationshipId = (relationshipId) => {
|
|
19631
19726
|
const output = parseInt(relationshipId.substring(3), 10);
|
|
19632
19727
|
return isNaN(output) ? 0 : output;
|
|
@@ -19677,7 +19772,12 @@ const PatchType = {
|
|
|
19677
19772
|
PARAGRAPH: "paragraph"
|
|
19678
19773
|
};
|
|
19679
19774
|
const imageReplacer = new ImageReplacer();
|
|
19680
|
-
const patchDocument = (
|
|
19775
|
+
const patchDocument = (_0) => __async(exports, [_0], function* ({
|
|
19776
|
+
outputType,
|
|
19777
|
+
data,
|
|
19778
|
+
patches,
|
|
19779
|
+
keepOriginalStyles
|
|
19780
|
+
}) {
|
|
19681
19781
|
var _a, _b;
|
|
19682
19782
|
const zipContent = yield JSZip.loadAsync(data);
|
|
19683
19783
|
const contexts = /* @__PURE__ */ new Map();
|
|
@@ -19714,34 +19814,38 @@ const patchDocument = (data, options2) => __async(exports, null, function* () {
|
|
|
19714
19814
|
stack: []
|
|
19715
19815
|
};
|
|
19716
19816
|
contexts.set(key, context);
|
|
19717
|
-
for (const [patchKey, patchValue] of Object.entries(
|
|
19817
|
+
for (const [patchKey, patchValue] of Object.entries(patches)) {
|
|
19718
19818
|
const patchText = `{{${patchKey}}}`;
|
|
19719
|
-
|
|
19720
|
-
|
|
19721
|
-
|
|
19722
|
-
|
|
19723
|
-
|
|
19724
|
-
|
|
19725
|
-
|
|
19726
|
-
|
|
19727
|
-
|
|
19728
|
-
|
|
19729
|
-
|
|
19730
|
-
|
|
19819
|
+
while (true) {
|
|
19820
|
+
try {
|
|
19821
|
+
replacer({
|
|
19822
|
+
json,
|
|
19823
|
+
patch: __spreadProps(__spreadValues({}, patchValue), {
|
|
19824
|
+
children: patchValue.children.map((element2) => {
|
|
19825
|
+
if (element2 instanceof ExternalHyperlink) {
|
|
19826
|
+
const concreteHyperlink = new ConcreteHyperlink(element2.options.children, uniqueId());
|
|
19827
|
+
hyperlinkRelationshipAdditions.push({
|
|
19828
|
+
key,
|
|
19829
|
+
hyperlink: {
|
|
19830
|
+
id: concreteHyperlink.linkId,
|
|
19831
|
+
link: element2.options.link
|
|
19832
|
+
}
|
|
19833
|
+
});
|
|
19834
|
+
return concreteHyperlink;
|
|
19835
|
+
} else {
|
|
19836
|
+
return element2;
|
|
19731
19837
|
}
|
|
19732
|
-
})
|
|
19733
|
-
|
|
19734
|
-
}
|
|
19735
|
-
|
|
19736
|
-
|
|
19737
|
-
|
|
19738
|
-
|
|
19739
|
-
})
|
|
19740
|
-
|
|
19741
|
-
|
|
19742
|
-
|
|
19743
|
-
options2.keepOriginalStyles
|
|
19744
|
-
);
|
|
19838
|
+
})
|
|
19839
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
19840
|
+
}),
|
|
19841
|
+
patchText,
|
|
19842
|
+
context,
|
|
19843
|
+
keepOriginalStyles
|
|
19844
|
+
});
|
|
19845
|
+
} catch (e) {
|
|
19846
|
+
break;
|
|
19847
|
+
}
|
|
19848
|
+
}
|
|
19745
19849
|
}
|
|
19746
19850
|
const mediaDatas = imageReplacer.getMediaData(JSON.stringify(json), context.file.Media);
|
|
19747
19851
|
if (mediaDatas.length > 0) {
|
|
@@ -19793,6 +19897,7 @@ const patchDocument = (data, options2) => __async(exports, null, function* () {
|
|
|
19793
19897
|
appendContentType(contentTypesJson, "image/jpeg", "jpg");
|
|
19794
19898
|
appendContentType(contentTypesJson, "image/bmp", "bmp");
|
|
19795
19899
|
appendContentType(contentTypesJson, "image/gif", "gif");
|
|
19900
|
+
appendContentType(contentTypesJson, "image/svg+xml", "svg");
|
|
19796
19901
|
}
|
|
19797
19902
|
const zip = new JSZip();
|
|
19798
19903
|
for (const [key, value] of map) {
|
|
@@ -19802,11 +19907,11 @@ const patchDocument = (data, options2) => __async(exports, null, function* () {
|
|
|
19802
19907
|
for (const [key, value] of binaryContentMap) {
|
|
19803
19908
|
zip.file(key, value);
|
|
19804
19909
|
}
|
|
19805
|
-
for (const { stream, fileName } of file.Media.Array) {
|
|
19910
|
+
for (const { data: stream, fileName } of file.Media.Array) {
|
|
19806
19911
|
zip.file(`word/media/${fileName}`, stream);
|
|
19807
19912
|
}
|
|
19808
19913
|
return zip.generateAsync({
|
|
19809
|
-
type:
|
|
19914
|
+
type: outputType,
|
|
19810
19915
|
mimeType: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
19811
19916
|
compression: "DEFLATE"
|
|
19812
19917
|
});
|
|
@@ -19834,6 +19939,25 @@ const createRelationshipFile = () => ({
|
|
|
19834
19939
|
}
|
|
19835
19940
|
]
|
|
19836
19941
|
});
|
|
19942
|
+
const patchDetector = (_0) => __async(exports, [_0], function* ({ data }) {
|
|
19943
|
+
const zipContent = yield JSZip.loadAsync(data);
|
|
19944
|
+
const patches = /* @__PURE__ */ new Set();
|
|
19945
|
+
for (const [key, value] of Object.entries(zipContent.files)) {
|
|
19946
|
+
if (!key.endsWith(".xml") && !key.endsWith(".rels")) {
|
|
19947
|
+
continue;
|
|
19948
|
+
}
|
|
19949
|
+
if (key.startsWith("word/") && !key.endsWith(".xml.rels")) {
|
|
19950
|
+
const json = toJson(yield value.async("text"));
|
|
19951
|
+
traverse(json).forEach((p) => findPatchKeys(p.text).forEach((patch) => patches.add(patch)));
|
|
19952
|
+
}
|
|
19953
|
+
}
|
|
19954
|
+
return Array.from(patches);
|
|
19955
|
+
});
|
|
19956
|
+
const findPatchKeys = (text) => {
|
|
19957
|
+
var _a;
|
|
19958
|
+
const pattern = new RegExp("(?<=\\{\\{).+?(?=\\}\\})", "gs");
|
|
19959
|
+
return (_a = text.match(pattern)) != null ? _a : [];
|
|
19960
|
+
};
|
|
19837
19961
|
exports.AbstractNumbering = AbstractNumbering;
|
|
19838
19962
|
exports.Alignment = Alignment;
|
|
19839
19963
|
exports.AlignmentAttributes = AlignmentAttributes;
|
|
@@ -19887,6 +20011,7 @@ exports.EmptyElement = EmptyElement;
|
|
|
19887
20011
|
exports.EndnoteReference = EndnoteReference;
|
|
19888
20012
|
exports.ExternalHyperlink = ExternalHyperlink;
|
|
19889
20013
|
exports.File = File;
|
|
20014
|
+
exports.FileChild = FileChild;
|
|
19890
20015
|
exports.FootNoteReferenceRunAttributes = FootNoteReferenceRunAttributes;
|
|
19891
20016
|
exports.FootNotes = FootNotes;
|
|
19892
20017
|
exports.Footer = Footer2;
|
|
@@ -19904,6 +20029,7 @@ exports.HeaderFooterType = HeaderFooterType;
|
|
|
19904
20029
|
exports.HeaderWrapper = HeaderWrapper;
|
|
19905
20030
|
exports.HeadingLevel = HeadingLevel;
|
|
19906
20031
|
exports.HeightRule = HeightRule;
|
|
20032
|
+
exports.HighlightColor = HighlightColor;
|
|
19907
20033
|
exports.HorizontalPosition = HorizontalPosition;
|
|
19908
20034
|
exports.HorizontalPositionAlign = HorizontalPositionAlign;
|
|
19909
20035
|
exports.HorizontalPositionRelativeFrom = HorizontalPositionRelativeFrom;
|
|
@@ -19939,7 +20065,10 @@ exports.MathFunction = MathFunction;
|
|
|
19939
20065
|
exports.MathFunctionName = MathFunctionName;
|
|
19940
20066
|
exports.MathFunctionProperties = MathFunctionProperties;
|
|
19941
20067
|
exports.MathIntegral = MathIntegral;
|
|
20068
|
+
exports.MathLimit = MathLimit;
|
|
19942
20069
|
exports.MathLimitLocation = MathLimitLocation;
|
|
20070
|
+
exports.MathLimitLower = MathLimitLower;
|
|
20071
|
+
exports.MathLimitUpper = MathLimitUpper;
|
|
19943
20072
|
exports.MathNAryProperties = MathNAryProperties;
|
|
19944
20073
|
exports.MathNumerator = MathNumerator;
|
|
19945
20074
|
exports.MathPreSubSuperScript = MathPreSubSuperScript;
|
|
@@ -20094,6 +20223,7 @@ exports.hexColorValue = hexColorValue;
|
|
|
20094
20223
|
exports.hpsMeasureValue = hpsMeasureValue;
|
|
20095
20224
|
exports.longHexNumber = longHexNumber;
|
|
20096
20225
|
exports.measurementOrPercentValue = measurementOrPercentValue;
|
|
20226
|
+
exports.patchDetector = patchDetector;
|
|
20097
20227
|
exports.patchDocument = patchDocument;
|
|
20098
20228
|
exports.percentageValue = percentageValue;
|
|
20099
20229
|
exports.pointMeasureValue = pointMeasureValue;
|