@cj-tech-master/excelts 9.5.4 → 9.5.5
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/browser/modules/archive/compression/streaming-compress.browser.js +29 -0
- package/dist/browser/modules/archive/compression/streaming-compress.js +9 -0
- package/dist/browser/modules/archive/compression/worker-pool/pool.browser.js +26 -1
- package/dist/browser/modules/archive/fs/archive-file.d.ts +8 -5
- package/dist/browser/modules/archive/fs/archive-file.js +78 -16
- package/dist/browser/modules/archive/unzip/stream.browser.js +43 -2
- package/dist/browser/modules/excel/chart/chart-ex-builder.js +7 -2
- package/dist/browser/modules/excel/chart/chart-ex-renderer.js +4 -9
- package/dist/browser/modules/excel/chart/chart-ex-types.d.ts +0 -12
- package/dist/browser/modules/excel/chart/chart.d.ts +1 -5
- package/dist/browser/modules/excel/chart/chart.js +1 -7
- package/dist/browser/modules/excel/chart/types.d.ts +0 -6
- package/dist/browser/modules/excel/stream/workbook-reader.browser.js +25 -1
- package/dist/browser/modules/excel/stream/workbook-reader.js +9 -0
- package/dist/browser/modules/excel/stream/workbook-writer.browser.d.ts +40 -0
- package/dist/browser/modules/excel/stream/workbook-writer.browser.js +228 -13
- package/dist/browser/modules/excel/utils/string-buf.d.ts +5 -26
- package/dist/browser/modules/excel/utils/string-buf.js +4 -81
- package/dist/browser/modules/excel/workbook.browser.js +135 -25
- package/dist/browser/modules/excel/xlsx/xform/chart/chart-space-xform.js +6 -20
- package/dist/browser/modules/excel/xlsx/xlsx.browser.d.ts +19 -9
- package/dist/browser/modules/excel/xlsx/xlsx.browser.js +32 -8
- package/dist/browser/modules/excel/xlsx/xlsx.d.ts +10 -2
- package/dist/browser/modules/excel/xlsx/xlsx.js +9 -1
- package/dist/browser/modules/pdf/excel-bridge.d.ts +30 -1
- package/dist/browser/modules/pdf/excel-bridge.js +32 -0
- package/dist/browser/modules/pdf/font/metrics.d.ts +3 -52
- package/dist/browser/modules/pdf/font/metrics.js +3 -237
- package/dist/browser/modules/pdf/index.d.ts +1 -1
- package/dist/browser/modules/pdf/index.js +1 -1
- package/dist/browser/modules/pdf/render-layout-to-pdf.d.ts +66 -0
- package/dist/browser/modules/pdf/render-layout-to-pdf.js +647 -0
- package/dist/browser/modules/pdf/word-bridge.d.ts +80 -12
- package/dist/browser/modules/pdf/word-bridge.js +122 -274
- package/dist/browser/modules/stream/index.base.d.ts +2 -0
- package/dist/browser/modules/stream/index.base.js +2 -1
- package/dist/browser/modules/stream/internal/sink-adapter.d.ts +65 -0
- package/dist/browser/modules/stream/internal/sink-adapter.js +198 -0
- package/dist/browser/modules/stream/pull-stream.d.ts +19 -2
- package/dist/browser/modules/stream/pull-stream.js +51 -5
- package/dist/browser/modules/stream/types.d.ts +13 -1
- package/dist/browser/modules/word/advanced/diff.d.ts +61 -0
- package/dist/browser/modules/word/advanced/diff.js +167 -0
- package/dist/browser/modules/word/advanced/drawing-shapes.d.ts +269 -0
- package/dist/browser/modules/word/advanced/drawing-shapes.js +268 -0
- package/dist/browser/modules/word/advanced/field-engine.d.ts +43 -0
- package/dist/browser/modules/word/advanced/field-engine.js +1225 -0
- package/dist/browser/modules/word/advanced/glossary.d.ts +86 -0
- package/dist/browser/modules/word/advanced/glossary.js +79 -0
- package/dist/browser/modules/word/advanced/math-convert.d.ts +30 -0
- package/dist/browser/modules/word/advanced/math-convert.js +595 -0
- package/dist/browser/modules/word/advanced/ole-objects.d.ts +115 -0
- package/dist/browser/modules/word/advanced/ole-objects.js +271 -0
- package/dist/browser/modules/word/advanced/style-map.d.ts +105 -0
- package/dist/browser/modules/word/advanced/style-map.js +322 -0
- package/dist/browser/modules/word/advanced/validation.d.ts +56 -0
- package/dist/browser/modules/word/advanced/validation.js +1065 -0
- package/dist/browser/modules/word/advanced/vba-project.d.ts +91 -0
- package/dist/browser/modules/word/advanced/vba-project.js +265 -0
- package/dist/browser/modules/word/bridge/excel-bridge.d.ts +127 -0
- package/dist/browser/modules/word/bridge/excel-bridge.js +980 -0
- package/dist/browser/modules/word/builder/document-handle.d.ts +151 -0
- package/dist/browser/modules/word/builder/document-handle.js +664 -0
- package/dist/browser/modules/word/builder/paragraph-builders.d.ts +61 -0
- package/dist/browser/modules/word/builder/paragraph-builders.js +90 -0
- package/dist/browser/modules/word/builder/run-builders.d.ts +374 -0
- package/dist/browser/modules/word/builder/run-builders.js +600 -0
- package/dist/browser/modules/word/builder/table-builders.d.ts +23 -0
- package/dist/browser/modules/word/builder/table-builders.js +45 -0
- package/dist/browser/modules/word/constants.d.ts +39 -1
- package/dist/browser/modules/word/constants.js +109 -1
- package/dist/browser/modules/word/convert/conversion-ir.d.ts +210 -0
- package/dist/browser/modules/word/convert/conversion-ir.js +31 -0
- package/dist/browser/modules/word/convert/docx-to-semantic.d.ts +39 -0
- package/dist/browser/modules/word/convert/docx-to-semantic.js +499 -0
- package/dist/browser/modules/word/convert/flat-opc.d.ts +44 -0
- package/dist/browser/modules/word/convert/flat-opc.js +385 -0
- package/dist/browser/modules/word/convert/html/html-import.d.ts +50 -0
- package/dist/browser/modules/word/convert/html/html-import.js +1907 -0
- package/dist/{types/modules/word → browser/modules/word/convert/html}/html-renderer.d.ts +14 -1
- package/dist/{esm/modules/word → browser/modules/word/convert/html}/html-renderer.js +420 -69
- package/dist/browser/modules/word/convert/html/html.d.ts +15 -0
- package/dist/browser/modules/word/convert/html/html.js +15 -0
- package/dist/browser/modules/word/convert/markdown/markdown-import.d.ts +68 -0
- package/dist/browser/modules/word/convert/markdown/markdown-import.js +1325 -0
- package/dist/browser/modules/word/convert/markdown/markdown-renderer.d.ts +25 -0
- package/dist/browser/modules/word/convert/markdown/markdown-renderer.js +634 -0
- package/dist/browser/modules/word/convert/markdown/markdown.d.ts +15 -0
- package/dist/browser/modules/word/convert/markdown/markdown.js +15 -0
- package/dist/browser/modules/word/convert/odt/odt.d.ts +41 -0
- package/dist/browser/modules/word/convert/odt/odt.js +1932 -0
- package/dist/browser/modules/word/{color-utils.d.ts → core/color-utils.d.ts} +8 -1
- package/dist/browser/modules/word/core/color-utils.js +43 -0
- package/dist/browser/modules/word/core/internal-utils.d.ts +90 -0
- package/dist/browser/modules/word/core/internal-utils.js +209 -0
- package/dist/browser/modules/word/core/mapper.d.ts +44 -0
- package/dist/browser/modules/word/core/mapper.js +427 -0
- package/dist/browser/modules/word/core/opc-paths.d.ts +33 -0
- package/dist/browser/modules/word/core/opc-paths.js +48 -0
- package/dist/browser/modules/word/core/text-utils.d.ts +38 -0
- package/dist/browser/modules/word/core/text-utils.js +202 -0
- package/dist/browser/modules/word/core/walker.d.ts +119 -0
- package/dist/browser/modules/word/core/walker.js +570 -0
- package/dist/browser/modules/word/crypto.d.ts +14 -9
- package/dist/browser/modules/word/crypto.js +13 -7
- package/dist/browser/modules/word/document-io.d.ts +59 -27
- package/dist/browser/modules/word/document-io.js +80 -197
- package/dist/browser/modules/word/errors.d.ts +44 -1
- package/dist/browser/modules/word/errors.js +54 -2
- package/dist/browser/modules/word/excel.d.ts +14 -0
- package/dist/browser/modules/word/excel.js +13 -0
- package/dist/browser/modules/word/font/font-embed.d.ts +112 -0
- package/dist/browser/modules/word/font/font-embed.js +646 -0
- package/dist/{esm/modules/word → browser/modules/word/font}/font-obfuscation.js +4 -9
- package/dist/browser/modules/word/font/hyphenation.d.ts +65 -0
- package/dist/browser/modules/word/font/hyphenation.js +4210 -0
- package/dist/browser/modules/word/font/text-shaping.d.ts +58 -0
- package/dist/browser/modules/word/font/text-shaping.js +635 -0
- package/dist/browser/modules/word/html.d.ts +7 -6
- package/dist/browser/modules/word/html.js +6 -5
- package/dist/browser/modules/word/incremental-edit.d.ts +123 -0
- package/dist/browser/modules/word/incremental-edit.js +361 -0
- package/dist/browser/modules/word/index.base.d.ts +194 -10
- package/dist/browser/modules/word/index.base.js +138 -29
- package/dist/browser/modules/word/layout/layout-constants.d.ts +17 -0
- package/dist/browser/modules/word/layout/layout-constants.js +17 -0
- package/dist/browser/modules/word/layout/layout-full.d.ts +53 -0
- package/dist/browser/modules/word/layout/layout-full.js +1696 -0
- package/dist/browser/modules/word/layout/layout-model.d.ts +344 -0
- package/dist/browser/modules/word/layout/layout-model.js +16 -0
- package/dist/browser/modules/word/layout/layout.d.ts +63 -0
- package/dist/browser/modules/word/layout/layout.js +1167 -0
- package/dist/browser/modules/word/layout/render-page.d.ts +57 -0
- package/dist/browser/modules/word/layout/render-page.js +1238 -0
- package/dist/browser/modules/word/markdown.d.ts +14 -0
- package/dist/browser/modules/word/markdown.js +13 -0
- package/dist/browser/modules/word/patcher.d.ts +62 -0
- package/dist/browser/modules/word/patcher.js +537 -0
- package/dist/browser/modules/word/query/compat.d.ts +25 -0
- package/dist/browser/modules/word/query/compat.js +58 -0
- package/dist/browser/modules/word/query/data-binding.d.ts +22 -0
- package/dist/browser/modules/word/query/data-binding.js +392 -0
- package/dist/browser/modules/word/query/form-fields.d.ts +41 -0
- package/dist/browser/modules/word/query/form-fields.js +268 -0
- package/dist/browser/modules/word/query/format-search.d.ts +99 -0
- package/dist/browser/modules/word/query/format-search.js +329 -0
- package/dist/browser/modules/word/query/mail-merge.d.ts +25 -0
- package/dist/browser/modules/word/query/mail-merge.js +111 -0
- package/dist/browser/modules/word/query/merge.d.ts +50 -0
- package/dist/browser/modules/word/query/merge.js +617 -0
- package/dist/browser/modules/word/query/replace.d.ts +47 -0
- package/dist/browser/modules/word/query/replace.js +301 -0
- package/dist/browser/modules/word/query/revisions.d.ts +67 -0
- package/dist/browser/modules/word/query/revisions.js +879 -0
- package/dist/browser/modules/word/query/search.d.ts +129 -0
- package/dist/browser/modules/word/query/search.js +346 -0
- package/dist/browser/modules/word/query/split.d.ts +44 -0
- package/dist/browser/modules/word/query/split.js +135 -0
- package/dist/browser/modules/word/query/style-resolve.d.ts +104 -0
- package/dist/browser/modules/word/query/style-resolve.js +368 -0
- package/dist/browser/modules/word/reader/chart-parser.d.ts +20 -0
- package/dist/browser/modules/word/reader/chart-parser.js +810 -0
- package/dist/browser/modules/word/reader/comments-parser.d.ts +26 -0
- package/dist/browser/modules/word/reader/comments-parser.js +92 -0
- package/dist/browser/modules/word/reader/doc-props-parsers.d.ts +15 -0
- package/dist/browser/modules/word/reader/doc-props-parsers.js +190 -0
- package/dist/browser/modules/word/reader/docx-reader.d.ts +27 -0
- package/dist/browser/modules/word/reader/docx-reader.js +2557 -0
- package/dist/browser/modules/word/reader/drawing-helpers.d.ts +27 -0
- package/dist/browser/modules/word/reader/drawing-helpers.js +84 -0
- package/dist/browser/modules/word/reader/form-field-parser.d.ts +21 -0
- package/dist/browser/modules/word/reader/form-field-parser.js +82 -0
- package/dist/browser/modules/word/reader/image-parsers.d.ts +11 -0
- package/dist/browser/modules/word/reader/image-parsers.js +291 -0
- package/dist/browser/modules/word/reader/math-parser.d.ts +12 -0
- package/dist/browser/modules/word/reader/math-parser.js +422 -0
- package/dist/browser/modules/word/reader/metadata-parsers.d.ts +17 -0
- package/dist/browser/modules/word/reader/metadata-parsers.js +87 -0
- package/dist/browser/modules/word/reader/numbering-parser.d.ts +13 -0
- package/dist/browser/modules/word/reader/numbering-parser.js +166 -0
- package/dist/browser/modules/word/reader/paragraph-section-parsers.d.ts +12 -0
- package/dist/browser/modules/word/reader/paragraph-section-parsers.js +503 -0
- package/dist/browser/modules/word/reader/parse-utils.d.ts +91 -0
- package/dist/browser/modules/word/reader/parse-utils.js +249 -0
- package/dist/browser/modules/word/reader/properties-parsers.d.ts +21 -0
- package/dist/browser/modules/word/reader/properties-parsers.js +332 -0
- package/dist/browser/modules/word/reader/reader-context.d.ts +69 -0
- package/dist/browser/modules/word/reader/reader-context.js +61 -0
- package/dist/browser/modules/word/reader/sdt-helpers.d.ts +29 -0
- package/dist/browser/modules/word/reader/sdt-helpers.js +111 -0
- package/dist/browser/modules/word/reader/settings-parser.d.ts +8 -0
- package/dist/browser/modules/word/reader/settings-parser.js +263 -0
- package/dist/browser/modules/word/reader/styles-parser.d.ts +12 -0
- package/dist/browser/modules/word/reader/styles-parser.js +147 -0
- package/dist/browser/modules/word/reader/table-properties-parsers.d.ts +12 -0
- package/dist/browser/modules/word/reader/table-properties-parsers.js +234 -0
- package/dist/browser/modules/word/reader/theme-parser.d.ts +8 -0
- package/dist/browser/modules/word/reader/theme-parser.js +167 -0
- package/dist/browser/modules/word/reader/watermark-parser.d.ts +15 -0
- package/dist/browser/modules/word/reader/watermark-parser.js +110 -0
- package/dist/browser/modules/word/security/cfb-reader.d.ts +37 -0
- package/dist/browser/modules/word/security/cfb-reader.js +410 -0
- package/dist/browser/modules/word/{digital-signatures.d.ts → security/digital-signatures.d.ts} +19 -11
- package/dist/browser/modules/word/{digital-signatures.js → security/digital-signatures.js} +34 -34
- package/dist/browser/modules/word/security/document-protection.d.ts +93 -0
- package/dist/browser/modules/word/security/document-protection.js +201 -0
- package/dist/{types/modules/word → browser/modules/word/security}/encryption.d.ts +51 -4
- package/dist/browser/modules/word/security/encryption.js +602 -0
- package/dist/browser/modules/word/security/policy.d.ts +80 -0
- package/dist/browser/modules/word/security/policy.js +102 -0
- package/dist/browser/modules/word/template/template-chart.d.ts +56 -0
- package/dist/browser/modules/word/template/template-chart.js +167 -0
- package/dist/browser/modules/word/template/template-datasource.d.ts +154 -0
- package/dist/browser/modules/word/template/template-datasource.js +541 -0
- package/dist/browser/modules/word/template/template-engine.d.ts +121 -0
- package/dist/browser/modules/word/template/template-engine.js +1435 -0
- package/dist/browser/modules/word/types.d.ts +224 -25
- package/dist/browser/modules/word/units.d.ts +26 -0
- package/dist/browser/modules/word/units.js +43 -14
- package/dist/browser/modules/word/{writers → writer}/chart-writer.js +164 -23
- package/dist/browser/modules/word/writer/checkbox-writer.d.ts +17 -0
- package/dist/browser/modules/word/writer/checkbox-writer.js +79 -0
- package/dist/{types/modules/word/writers → browser/modules/word/writer}/comment-writer.d.ts +2 -1
- package/dist/browser/modules/word/{writers → writer}/comment-writer.js +8 -6
- package/dist/browser/modules/word/writer/common-parts.d.ts +57 -0
- package/dist/browser/modules/word/writer/common-parts.js +101 -0
- package/dist/{types/modules/word → browser/modules/word/writer}/content-types.d.ts +2 -2
- package/dist/{esm/modules/word → browser/modules/word/writer}/content-types.js +14 -6
- package/dist/browser/modules/word/writer/document-writer.d.ts +24 -0
- package/dist/browser/modules/word/writer/document-writer.js +473 -0
- package/dist/browser/modules/word/writer/docx-packager.d.ts +35 -0
- package/dist/browser/modules/word/writer/docx-packager.js +1515 -0
- package/dist/{types/modules/word/writers → browser/modules/word/writer}/footnote-writer.d.ts +3 -2
- package/dist/{esm/modules/word/writers → browser/modules/word/writer}/footnote-writer.js +13 -10
- package/dist/{types/modules/word/writers → browser/modules/word/writer}/header-footer-writer.d.ts +3 -2
- package/dist/{esm/modules/word/writers → browser/modules/word/writer}/header-footer-writer.js +39 -21
- package/dist/{types/modules/word/writers → browser/modules/word/writer}/image-writer.d.ts +1 -1
- package/dist/browser/modules/word/{writers → writer}/image-writer.js +11 -7
- package/dist/browser/modules/word/writer/math-writer.d.ts +20 -0
- package/dist/{esm/modules/word/writers → browser/modules/word/writer}/math-writer.js +21 -1
- package/dist/browser/modules/word/{writers → writer}/numbering-writer.d.ts +1 -1
- package/dist/{esm/modules/word/writers → browser/modules/word/writer}/numbering-writer.js +11 -4
- package/dist/browser/modules/word/{writers → writer}/paragraph-writer.d.ts +2 -1
- package/dist/browser/modules/word/{writers → writer}/paragraph-writer.js +73 -38
- package/dist/browser/modules/word/{writers → writer}/parts-writer.d.ts +3 -3
- package/dist/{esm/modules/word/writers → browser/modules/word/writer}/parts-writer.js +91 -12
- package/dist/browser/modules/word/writer/reference-scanners.d.ts +42 -0
- package/dist/browser/modules/word/writer/reference-scanners.js +111 -0
- package/dist/browser/modules/word/writer/relationships.d.ts +52 -0
- package/dist/browser/modules/word/writer/relationships.js +117 -0
- package/dist/browser/modules/word/writer/render-context.d.ts +124 -0
- package/dist/browser/modules/word/writer/render-context.js +46 -0
- package/dist/browser/modules/word/{writers → writer}/run-writer.d.ts +10 -1
- package/dist/{esm/modules/word/writers → browser/modules/word/writer}/run-writer.js +126 -24
- package/dist/browser/modules/word/writer/sdt-writer.d.ts +25 -0
- package/dist/browser/modules/word/writer/sdt-writer.js +189 -0
- package/dist/browser/modules/word/writer/stream-buf.d.ts +37 -0
- package/dist/browser/modules/word/writer/stream-buf.js +73 -0
- package/dist/browser/modules/word/writer/streaming-writer.d.ts +344 -0
- package/dist/browser/modules/word/writer/streaming-writer.js +1382 -0
- package/dist/browser/modules/word/writer/string-buf.d.ts +8 -0
- package/dist/browser/modules/word/writer/string-buf.js +7 -0
- package/dist/browser/modules/word/{writers → writer}/styles-writer.js +32 -1
- package/dist/browser/modules/word/{writers → writer}/table-writer.d.ts +2 -1
- package/dist/browser/modules/word/{writers → writer}/table-writer.js +94 -11
- package/dist/browser/modules/xml/types.d.ts +22 -0
- package/dist/browser/utils/crypto.browser.d.ts +3 -1
- package/dist/browser/utils/crypto.browser.js +3 -1
- package/dist/browser/utils/crypto.d.ts +4 -1
- package/dist/browser/utils/crypto.js +4 -1
- package/dist/browser/utils/font-metrics.d.ts +63 -0
- package/dist/browser/utils/font-metrics.js +293 -0
- package/dist/browser/utils/string-buf.d.ts +42 -0
- package/dist/browser/utils/string-buf.js +89 -0
- package/dist/browser/utils/theme-colors.d.ts +55 -0
- package/dist/browser/utils/theme-colors.js +120 -0
- package/dist/cjs/modules/archive/compression/streaming-compress.browser.js +29 -0
- package/dist/cjs/modules/archive/compression/streaming-compress.js +9 -0
- package/dist/cjs/modules/archive/compression/worker-pool/pool.browser.js +26 -1
- package/dist/cjs/modules/archive/fs/archive-file.js +78 -16
- package/dist/cjs/modules/archive/unzip/stream.browser.js +43 -2
- package/dist/cjs/modules/excel/chart/chart-ex-builder.js +7 -2
- package/dist/cjs/modules/excel/chart/chart-ex-renderer.js +4 -9
- package/dist/cjs/modules/excel/chart/chart.js +1 -7
- package/dist/cjs/modules/excel/stream/workbook-reader.browser.js +25 -1
- package/dist/cjs/modules/excel/stream/workbook-reader.js +9 -0
- package/dist/cjs/modules/excel/stream/workbook-writer.browser.js +228 -13
- package/dist/cjs/modules/excel/utils/string-buf.js +5 -81
- package/dist/cjs/modules/excel/workbook.browser.js +135 -25
- package/dist/cjs/modules/excel/xlsx/xform/chart/chart-space-xform.js +6 -20
- package/dist/cjs/modules/excel/xlsx/xlsx.browser.js +32 -8
- package/dist/cjs/modules/excel/xlsx/xlsx.js +9 -1
- package/dist/cjs/modules/pdf/excel-bridge.js +33 -0
- package/dist/cjs/modules/pdf/font/metrics.js +11 -244
- package/dist/cjs/modules/pdf/index.js +2 -1
- package/dist/cjs/modules/pdf/render-layout-to-pdf.js +651 -0
- package/dist/cjs/modules/pdf/word-bridge.js +155 -274
- package/dist/cjs/modules/stream/index.base.js +4 -2
- package/dist/cjs/modules/stream/internal/sink-adapter.js +202 -0
- package/dist/cjs/modules/stream/pull-stream.js +51 -5
- package/dist/cjs/modules/word/advanced/diff.js +170 -0
- package/dist/cjs/modules/word/advanced/drawing-shapes.js +279 -0
- package/dist/cjs/modules/word/advanced/field-engine.js +1229 -0
- package/dist/cjs/modules/word/advanced/glossary.js +87 -0
- package/dist/cjs/modules/word/advanced/math-convert.js +599 -0
- package/dist/cjs/modules/word/advanced/ole-objects.js +277 -0
- package/dist/cjs/modules/word/advanced/style-map.js +329 -0
- package/dist/cjs/modules/word/advanced/validation.js +1068 -0
- package/dist/cjs/modules/word/advanced/vba-project.js +274 -0
- package/dist/cjs/modules/word/bridge/excel-bridge.js +1020 -0
- package/dist/cjs/modules/word/builder/document-handle.js +667 -0
- package/dist/cjs/modules/word/builder/paragraph-builders.js +109 -0
- package/dist/cjs/modules/word/builder/run-builders.js +676 -0
- package/dist/cjs/modules/word/builder/table-builders.js +53 -0
- package/dist/cjs/modules/word/constants.js +111 -2
- package/dist/cjs/modules/word/convert/conversion-ir.js +34 -0
- package/dist/cjs/modules/word/convert/docx-to-semantic.js +502 -0
- package/dist/cjs/modules/word/convert/flat-opc.js +390 -0
- package/dist/cjs/modules/word/convert/html/html-import.js +1910 -0
- package/dist/cjs/modules/word/{html-renderer.js → convert/html/html-renderer.js} +420 -69
- package/dist/cjs/modules/word/convert/html/html.js +20 -0
- package/dist/cjs/modules/word/convert/markdown/markdown-import.js +1329 -0
- package/dist/cjs/modules/word/convert/markdown/markdown-renderer.js +637 -0
- package/dist/cjs/modules/word/convert/markdown/markdown.js +21 -0
- package/dist/cjs/modules/word/convert/odt/odt.js +1936 -0
- package/dist/cjs/modules/word/core/color-utils.js +47 -0
- package/dist/cjs/modules/word/core/internal-utils.js +219 -0
- package/dist/cjs/modules/word/core/mapper.js +430 -0
- package/dist/cjs/modules/word/core/opc-paths.js +53 -0
- package/dist/cjs/modules/word/core/text-utils.js +210 -0
- package/dist/cjs/modules/word/core/walker.js +577 -0
- package/dist/cjs/modules/word/crypto.js +19 -8
- package/dist/cjs/modules/word/document-io.js +117 -197
- package/dist/cjs/modules/word/errors.js +59 -13
- package/dist/cjs/modules/word/excel.js +22 -0
- package/dist/cjs/modules/word/font/font-embed.js +652 -0
- package/dist/cjs/modules/word/{font-obfuscation.js → font/font-obfuscation.js} +4 -9
- package/dist/cjs/modules/word/font/hyphenation.js +4216 -0
- package/dist/cjs/modules/word/font/text-shaping.js +640 -0
- package/dist/cjs/modules/word/html.js +9 -7
- package/dist/cjs/modules/word/incremental-edit.js +366 -0
- package/dist/cjs/modules/word/index.base.js +370 -137
- package/dist/cjs/modules/word/layout/layout-constants.js +20 -0
- package/dist/cjs/modules/word/layout/layout-full.js +1699 -0
- package/dist/cjs/modules/word/layout/layout-model.js +17 -0
- package/dist/cjs/modules/word/layout/layout.js +1170 -0
- package/dist/cjs/modules/word/layout/render-page.js +1243 -0
- package/dist/cjs/modules/word/markdown.js +19 -0
- package/dist/cjs/modules/word/patcher.js +539 -0
- package/dist/cjs/modules/word/query/compat.js +61 -0
- package/dist/cjs/modules/word/query/data-binding.js +395 -0
- package/dist/cjs/modules/word/query/form-fields.js +272 -0
- package/dist/cjs/modules/word/query/format-search.js +334 -0
- package/dist/cjs/modules/word/query/mail-merge.js +114 -0
- package/dist/cjs/modules/word/query/merge.js +620 -0
- package/dist/cjs/modules/word/query/replace.js +304 -0
- package/dist/cjs/modules/word/query/revisions.js +885 -0
- package/dist/cjs/modules/word/query/search.js +361 -0
- package/dist/cjs/modules/word/query/split.js +138 -0
- package/dist/cjs/modules/word/query/style-resolve.js +374 -0
- package/dist/cjs/modules/word/reader/chart-parser.js +814 -0
- package/dist/cjs/modules/word/reader/comments-parser.js +96 -0
- package/dist/cjs/modules/word/reader/doc-props-parsers.js +194 -0
- package/dist/cjs/modules/word/reader/docx-reader.js +2560 -0
- package/dist/cjs/modules/word/reader/drawing-helpers.js +90 -0
- package/dist/cjs/modules/word/reader/form-field-parser.js +85 -0
- package/dist/cjs/modules/word/reader/image-parsers.js +293 -0
- package/dist/cjs/modules/word/reader/math-parser.js +424 -0
- package/dist/cjs/modules/word/reader/metadata-parsers.js +93 -0
- package/dist/cjs/modules/word/reader/numbering-parser.js +168 -0
- package/dist/cjs/modules/word/reader/paragraph-section-parsers.js +505 -0
- package/dist/cjs/modules/word/reader/parse-utils.js +271 -0
- package/dist/cjs/modules/word/reader/properties-parsers.js +338 -0
- package/dist/cjs/modules/word/reader/reader-context.js +66 -0
- package/dist/cjs/modules/word/reader/sdt-helpers.js +114 -0
- package/dist/cjs/modules/word/reader/settings-parser.js +265 -0
- package/dist/cjs/modules/word/reader/styles-parser.js +149 -0
- package/dist/cjs/modules/word/reader/table-properties-parsers.js +237 -0
- package/dist/cjs/modules/word/reader/theme-parser.js +169 -0
- package/dist/cjs/modules/word/reader/watermark-parser.js +113 -0
- package/dist/cjs/modules/word/security/cfb-reader.js +414 -0
- package/dist/cjs/modules/word/{digital-signatures.js → security/digital-signatures.js} +34 -34
- package/dist/cjs/modules/word/security/document-protection.js +208 -0
- package/dist/cjs/modules/word/security/encryption.js +612 -0
- package/dist/cjs/modules/word/security/policy.js +106 -0
- package/dist/cjs/modules/word/template/template-chart.js +170 -0
- package/dist/cjs/modules/word/template/template-datasource.js +549 -0
- package/dist/cjs/modules/word/template/template-engine.js +1430 -0
- package/dist/cjs/modules/word/units.js +44 -14
- package/dist/cjs/modules/word/{writers → writer}/chart-writer.js +163 -22
- package/dist/cjs/modules/word/writer/checkbox-writer.js +82 -0
- package/dist/cjs/modules/word/{writers → writer}/comment-writer.js +8 -6
- package/dist/cjs/modules/word/writer/common-parts.js +104 -0
- package/dist/cjs/modules/word/{content-types.js → writer/content-types.js} +14 -6
- package/dist/cjs/modules/word/writer/document-writer.js +478 -0
- package/dist/cjs/modules/word/writer/docx-packager.js +1551 -0
- package/dist/cjs/modules/word/{writers → writer}/footnote-writer.js +13 -10
- package/dist/cjs/modules/word/{writers → writer}/header-footer-writer.js +38 -20
- package/dist/cjs/modules/word/{writers → writer}/image-writer.js +11 -7
- package/dist/cjs/modules/word/{writers → writer}/math-writer.js +21 -1
- package/dist/cjs/modules/word/{writers → writer}/numbering-writer.js +11 -4
- package/dist/cjs/modules/word/{writers → writer}/paragraph-writer.js +72 -37
- package/dist/cjs/modules/word/{writers → writer}/parts-writer.js +91 -12
- package/dist/cjs/modules/word/writer/reference-scanners.js +120 -0
- package/dist/cjs/modules/word/writer/relationships.js +124 -0
- package/dist/cjs/modules/word/writer/render-context.js +51 -0
- package/dist/cjs/modules/word/{writers → writer}/run-writer.js +127 -24
- package/dist/cjs/modules/word/writer/sdt-writer.js +192 -0
- package/dist/cjs/modules/word/writer/stream-buf.js +76 -0
- package/dist/cjs/modules/word/writer/streaming-writer.js +1387 -0
- package/dist/cjs/modules/word/writer/string-buf.js +11 -0
- package/dist/cjs/modules/word/{writers → writer}/styles-writer.js +32 -1
- package/dist/cjs/modules/word/{writers → writer}/table-writer.js +94 -11
- package/dist/cjs/utils/crypto.browser.js +3 -1
- package/dist/cjs/utils/crypto.js +4 -1
- package/dist/cjs/utils/font-metrics.js +303 -0
- package/dist/cjs/utils/string-buf.js +92 -0
- package/dist/cjs/utils/theme-colors.js +126 -0
- package/dist/esm/modules/archive/compression/streaming-compress.browser.js +29 -0
- package/dist/esm/modules/archive/compression/streaming-compress.js +9 -0
- package/dist/esm/modules/archive/compression/worker-pool/pool.browser.js +26 -1
- package/dist/esm/modules/archive/fs/archive-file.js +78 -16
- package/dist/esm/modules/archive/unzip/stream.browser.js +43 -2
- package/dist/esm/modules/excel/chart/chart-ex-builder.js +7 -2
- package/dist/esm/modules/excel/chart/chart-ex-renderer.js +4 -9
- package/dist/esm/modules/excel/chart/chart.js +1 -7
- package/dist/esm/modules/excel/stream/workbook-reader.browser.js +25 -1
- package/dist/esm/modules/excel/stream/workbook-reader.js +9 -0
- package/dist/esm/modules/excel/stream/workbook-writer.browser.js +228 -13
- package/dist/esm/modules/excel/utils/string-buf.js +4 -81
- package/dist/esm/modules/excel/workbook.browser.js +135 -25
- package/dist/esm/modules/excel/xlsx/xform/chart/chart-space-xform.js +6 -20
- package/dist/esm/modules/excel/xlsx/xlsx.browser.js +32 -8
- package/dist/esm/modules/excel/xlsx/xlsx.js +9 -1
- package/dist/esm/modules/pdf/excel-bridge.js +32 -0
- package/dist/esm/modules/pdf/font/metrics.js +3 -237
- package/dist/esm/modules/pdf/index.js +1 -1
- package/dist/esm/modules/pdf/render-layout-to-pdf.js +647 -0
- package/dist/esm/modules/pdf/word-bridge.js +122 -274
- package/dist/esm/modules/stream/index.base.js +2 -1
- package/dist/esm/modules/stream/internal/sink-adapter.js +198 -0
- package/dist/esm/modules/stream/pull-stream.js +51 -5
- package/dist/esm/modules/word/advanced/diff.js +167 -0
- package/dist/esm/modules/word/advanced/drawing-shapes.js +268 -0
- package/dist/esm/modules/word/advanced/field-engine.js +1225 -0
- package/dist/esm/modules/word/advanced/glossary.js +79 -0
- package/dist/esm/modules/word/advanced/math-convert.js +595 -0
- package/dist/esm/modules/word/advanced/ole-objects.js +271 -0
- package/dist/esm/modules/word/advanced/style-map.js +322 -0
- package/dist/esm/modules/word/advanced/validation.js +1065 -0
- package/dist/esm/modules/word/advanced/vba-project.js +265 -0
- package/dist/esm/modules/word/bridge/excel-bridge.js +980 -0
- package/dist/esm/modules/word/builder/document-handle.js +664 -0
- package/dist/esm/modules/word/builder/paragraph-builders.js +90 -0
- package/dist/esm/modules/word/builder/run-builders.js +600 -0
- package/dist/esm/modules/word/builder/table-builders.js +45 -0
- package/dist/esm/modules/word/constants.js +109 -1
- package/dist/esm/modules/word/convert/conversion-ir.js +31 -0
- package/dist/esm/modules/word/convert/docx-to-semantic.js +499 -0
- package/dist/esm/modules/word/convert/flat-opc.js +385 -0
- package/dist/esm/modules/word/convert/html/html-import.js +1907 -0
- package/dist/{browser/modules/word → esm/modules/word/convert/html}/html-renderer.js +420 -69
- package/dist/esm/modules/word/convert/html/html.js +15 -0
- package/dist/esm/modules/word/convert/markdown/markdown-import.js +1325 -0
- package/dist/esm/modules/word/convert/markdown/markdown-renderer.js +634 -0
- package/dist/esm/modules/word/convert/markdown/markdown.js +15 -0
- package/dist/esm/modules/word/convert/odt/odt.js +1932 -0
- package/dist/esm/modules/word/core/color-utils.js +43 -0
- package/dist/esm/modules/word/core/internal-utils.js +209 -0
- package/dist/esm/modules/word/core/mapper.js +427 -0
- package/dist/esm/modules/word/core/opc-paths.js +48 -0
- package/dist/esm/modules/word/core/text-utils.js +202 -0
- package/dist/esm/modules/word/core/walker.js +570 -0
- package/dist/esm/modules/word/crypto.js +13 -7
- package/dist/esm/modules/word/document-io.js +80 -197
- package/dist/esm/modules/word/errors.js +54 -2
- package/dist/esm/modules/word/excel.js +13 -0
- package/dist/esm/modules/word/font/font-embed.js +646 -0
- package/dist/{browser/modules/word → esm/modules/word/font}/font-obfuscation.js +4 -9
- package/dist/esm/modules/word/font/hyphenation.js +4210 -0
- package/dist/esm/modules/word/font/text-shaping.js +635 -0
- package/dist/esm/modules/word/html.js +6 -5
- package/dist/esm/modules/word/incremental-edit.js +361 -0
- package/dist/esm/modules/word/index.base.js +138 -29
- package/dist/esm/modules/word/layout/layout-constants.js +17 -0
- package/dist/esm/modules/word/layout/layout-full.js +1696 -0
- package/dist/esm/modules/word/layout/layout-model.js +16 -0
- package/dist/esm/modules/word/layout/layout.js +1167 -0
- package/dist/esm/modules/word/layout/render-page.js +1238 -0
- package/dist/esm/modules/word/markdown.js +13 -0
- package/dist/esm/modules/word/patcher.js +537 -0
- package/dist/esm/modules/word/query/compat.js +58 -0
- package/dist/esm/modules/word/query/data-binding.js +392 -0
- package/dist/esm/modules/word/query/form-fields.js +268 -0
- package/dist/esm/modules/word/query/format-search.js +329 -0
- package/dist/esm/modules/word/query/mail-merge.js +111 -0
- package/dist/esm/modules/word/query/merge.js +617 -0
- package/dist/esm/modules/word/query/replace.js +301 -0
- package/dist/esm/modules/word/query/revisions.js +879 -0
- package/dist/esm/modules/word/query/search.js +346 -0
- package/dist/esm/modules/word/query/split.js +135 -0
- package/dist/esm/modules/word/query/style-resolve.js +368 -0
- package/dist/esm/modules/word/reader/chart-parser.js +810 -0
- package/dist/esm/modules/word/reader/comments-parser.js +92 -0
- package/dist/esm/modules/word/reader/doc-props-parsers.js +190 -0
- package/dist/esm/modules/word/reader/docx-reader.js +2557 -0
- package/dist/esm/modules/word/reader/drawing-helpers.js +84 -0
- package/dist/esm/modules/word/reader/form-field-parser.js +82 -0
- package/dist/esm/modules/word/reader/image-parsers.js +291 -0
- package/dist/esm/modules/word/reader/math-parser.js +422 -0
- package/dist/esm/modules/word/reader/metadata-parsers.js +87 -0
- package/dist/esm/modules/word/reader/numbering-parser.js +166 -0
- package/dist/esm/modules/word/reader/paragraph-section-parsers.js +503 -0
- package/dist/esm/modules/word/reader/parse-utils.js +249 -0
- package/dist/esm/modules/word/reader/properties-parsers.js +332 -0
- package/dist/esm/modules/word/reader/reader-context.js +61 -0
- package/dist/esm/modules/word/reader/sdt-helpers.js +111 -0
- package/dist/esm/modules/word/reader/settings-parser.js +263 -0
- package/dist/esm/modules/word/reader/styles-parser.js +147 -0
- package/dist/esm/modules/word/reader/table-properties-parsers.js +234 -0
- package/dist/esm/modules/word/reader/theme-parser.js +167 -0
- package/dist/esm/modules/word/reader/watermark-parser.js +110 -0
- package/dist/esm/modules/word/security/cfb-reader.js +410 -0
- package/dist/esm/modules/word/{digital-signatures.js → security/digital-signatures.js} +34 -34
- package/dist/esm/modules/word/security/document-protection.js +201 -0
- package/dist/esm/modules/word/security/encryption.js +602 -0
- package/dist/esm/modules/word/security/policy.js +102 -0
- package/dist/esm/modules/word/template/template-chart.js +167 -0
- package/dist/esm/modules/word/template/template-datasource.js +541 -0
- package/dist/esm/modules/word/template/template-engine.js +1435 -0
- package/dist/esm/modules/word/units.js +43 -14
- package/dist/esm/modules/word/{writers → writer}/chart-writer.js +164 -23
- package/dist/esm/modules/word/writer/checkbox-writer.js +79 -0
- package/dist/esm/modules/word/{writers → writer}/comment-writer.js +8 -6
- package/dist/esm/modules/word/writer/common-parts.js +101 -0
- package/dist/{browser/modules/word → esm/modules/word/writer}/content-types.js +14 -6
- package/dist/esm/modules/word/writer/document-writer.js +473 -0
- package/dist/esm/modules/word/writer/docx-packager.js +1515 -0
- package/dist/{browser/modules/word/writers → esm/modules/word/writer}/footnote-writer.js +13 -10
- package/dist/{browser/modules/word/writers → esm/modules/word/writer}/header-footer-writer.js +39 -21
- package/dist/esm/modules/word/{writers → writer}/image-writer.js +11 -7
- package/dist/{browser/modules/word/writers → esm/modules/word/writer}/math-writer.js +21 -1
- package/dist/{browser/modules/word/writers → esm/modules/word/writer}/numbering-writer.js +11 -4
- package/dist/esm/modules/word/{writers → writer}/paragraph-writer.js +73 -38
- package/dist/{browser/modules/word/writers → esm/modules/word/writer}/parts-writer.js +91 -12
- package/dist/esm/modules/word/writer/reference-scanners.js +111 -0
- package/dist/esm/modules/word/writer/relationships.js +117 -0
- package/dist/esm/modules/word/writer/render-context.js +46 -0
- package/dist/{browser/modules/word/writers → esm/modules/word/writer}/run-writer.js +126 -24
- package/dist/esm/modules/word/writer/sdt-writer.js +189 -0
- package/dist/esm/modules/word/writer/stream-buf.js +73 -0
- package/dist/esm/modules/word/writer/streaming-writer.js +1382 -0
- package/dist/esm/modules/word/writer/string-buf.js +7 -0
- package/dist/esm/modules/word/{writers → writer}/styles-writer.js +32 -1
- package/dist/esm/modules/word/{writers → writer}/table-writer.js +94 -11
- package/dist/esm/utils/crypto.browser.js +3 -1
- package/dist/esm/utils/crypto.js +4 -1
- package/dist/esm/utils/font-metrics.js +293 -0
- package/dist/esm/utils/string-buf.js +89 -0
- package/dist/esm/utils/theme-colors.js +120 -0
- package/dist/iife/excelts.iife.js +70692 -70337
- package/dist/iife/excelts.iife.js.map +1 -1
- package/dist/iife/excelts.iife.min.js +57 -57
- package/dist/types/modules/archive/fs/archive-file.d.ts +8 -5
- package/dist/types/modules/excel/chart/chart-ex-types.d.ts +0 -12
- package/dist/types/modules/excel/chart/chart.d.ts +1 -5
- package/dist/types/modules/excel/chart/types.d.ts +0 -6
- package/dist/types/modules/excel/stream/workbook-writer.browser.d.ts +40 -0
- package/dist/types/modules/excel/utils/string-buf.d.ts +5 -26
- package/dist/types/modules/excel/xlsx/xlsx.browser.d.ts +19 -9
- package/dist/types/modules/excel/xlsx/xlsx.d.ts +10 -2
- package/dist/types/modules/pdf/excel-bridge.d.ts +30 -1
- package/dist/types/modules/pdf/font/metrics.d.ts +3 -52
- package/dist/types/modules/pdf/index.d.ts +1 -1
- package/dist/types/modules/pdf/render-layout-to-pdf.d.ts +66 -0
- package/dist/types/modules/pdf/word-bridge.d.ts +80 -12
- package/dist/types/modules/stream/index.base.d.ts +2 -0
- package/dist/types/modules/stream/internal/sink-adapter.d.ts +65 -0
- package/dist/types/modules/stream/pull-stream.d.ts +19 -2
- package/dist/types/modules/stream/types.d.ts +13 -1
- package/dist/types/modules/word/advanced/diff.d.ts +61 -0
- package/dist/types/modules/word/advanced/drawing-shapes.d.ts +269 -0
- package/dist/types/modules/word/advanced/field-engine.d.ts +43 -0
- package/dist/types/modules/word/advanced/glossary.d.ts +86 -0
- package/dist/types/modules/word/advanced/math-convert.d.ts +30 -0
- package/dist/types/modules/word/advanced/ole-objects.d.ts +115 -0
- package/dist/types/modules/word/advanced/style-map.d.ts +105 -0
- package/dist/types/modules/word/advanced/validation.d.ts +56 -0
- package/dist/types/modules/word/advanced/vba-project.d.ts +91 -0
- package/dist/types/modules/word/bridge/excel-bridge.d.ts +127 -0
- package/dist/types/modules/word/builder/document-handle.d.ts +151 -0
- package/dist/types/modules/word/builder/paragraph-builders.d.ts +61 -0
- package/dist/types/modules/word/builder/run-builders.d.ts +374 -0
- package/dist/types/modules/word/builder/table-builders.d.ts +23 -0
- package/dist/types/modules/word/constants.d.ts +39 -1
- package/dist/types/modules/word/convert/conversion-ir.d.ts +210 -0
- package/dist/types/modules/word/convert/docx-to-semantic.d.ts +39 -0
- package/dist/types/modules/word/convert/flat-opc.d.ts +44 -0
- package/dist/types/modules/word/convert/html/html-import.d.ts +50 -0
- package/dist/{browser/modules/word → types/modules/word/convert/html}/html-renderer.d.ts +14 -1
- package/dist/types/modules/word/convert/html/html.d.ts +15 -0
- package/dist/types/modules/word/convert/markdown/markdown-import.d.ts +68 -0
- package/dist/types/modules/word/convert/markdown/markdown-renderer.d.ts +25 -0
- package/dist/types/modules/word/convert/markdown/markdown.d.ts +15 -0
- package/dist/types/modules/word/convert/odt/odt.d.ts +41 -0
- package/dist/types/modules/word/{color-utils.d.ts → core/color-utils.d.ts} +8 -1
- package/dist/types/modules/word/core/internal-utils.d.ts +90 -0
- package/dist/types/modules/word/core/mapper.d.ts +44 -0
- package/dist/types/modules/word/core/opc-paths.d.ts +33 -0
- package/dist/types/modules/word/core/text-utils.d.ts +38 -0
- package/dist/types/modules/word/core/walker.d.ts +119 -0
- package/dist/types/modules/word/crypto.d.ts +14 -9
- package/dist/types/modules/word/document-io.d.ts +59 -27
- package/dist/types/modules/word/errors.d.ts +44 -1
- package/dist/types/modules/word/excel.d.ts +14 -0
- package/dist/types/modules/word/font/font-embed.d.ts +112 -0
- package/dist/types/modules/word/font/hyphenation.d.ts +65 -0
- package/dist/types/modules/word/font/text-shaping.d.ts +58 -0
- package/dist/types/modules/word/html.d.ts +7 -6
- package/dist/types/modules/word/incremental-edit.d.ts +123 -0
- package/dist/types/modules/word/index.base.d.ts +194 -10
- package/dist/types/modules/word/layout/layout-constants.d.ts +17 -0
- package/dist/types/modules/word/layout/layout-full.d.ts +53 -0
- package/dist/types/modules/word/layout/layout-model.d.ts +344 -0
- package/dist/types/modules/word/layout/layout.d.ts +63 -0
- package/dist/types/modules/word/layout/render-page.d.ts +57 -0
- package/dist/types/modules/word/markdown.d.ts +14 -0
- package/dist/types/modules/word/patcher.d.ts +62 -0
- package/dist/types/modules/word/query/compat.d.ts +25 -0
- package/dist/types/modules/word/query/data-binding.d.ts +22 -0
- package/dist/types/modules/word/query/form-fields.d.ts +41 -0
- package/dist/types/modules/word/query/format-search.d.ts +99 -0
- package/dist/types/modules/word/query/mail-merge.d.ts +25 -0
- package/dist/types/modules/word/query/merge.d.ts +50 -0
- package/dist/types/modules/word/query/replace.d.ts +47 -0
- package/dist/types/modules/word/query/revisions.d.ts +67 -0
- package/dist/types/modules/word/query/search.d.ts +129 -0
- package/dist/types/modules/word/query/split.d.ts +44 -0
- package/dist/types/modules/word/query/style-resolve.d.ts +104 -0
- package/dist/types/modules/word/reader/chart-parser.d.ts +20 -0
- package/dist/types/modules/word/reader/comments-parser.d.ts +26 -0
- package/dist/types/modules/word/reader/doc-props-parsers.d.ts +15 -0
- package/dist/types/modules/word/reader/docx-reader.d.ts +27 -0
- package/dist/types/modules/word/reader/drawing-helpers.d.ts +27 -0
- package/dist/types/modules/word/reader/form-field-parser.d.ts +21 -0
- package/dist/types/modules/word/reader/image-parsers.d.ts +11 -0
- package/dist/types/modules/word/reader/math-parser.d.ts +12 -0
- package/dist/types/modules/word/reader/metadata-parsers.d.ts +17 -0
- package/dist/types/modules/word/reader/numbering-parser.d.ts +13 -0
- package/dist/types/modules/word/reader/paragraph-section-parsers.d.ts +12 -0
- package/dist/types/modules/word/reader/parse-utils.d.ts +91 -0
- package/dist/types/modules/word/reader/properties-parsers.d.ts +21 -0
- package/dist/types/modules/word/reader/reader-context.d.ts +69 -0
- package/dist/types/modules/word/reader/sdt-helpers.d.ts +29 -0
- package/dist/types/modules/word/reader/settings-parser.d.ts +8 -0
- package/dist/types/modules/word/reader/styles-parser.d.ts +12 -0
- package/dist/types/modules/word/reader/table-properties-parsers.d.ts +12 -0
- package/dist/types/modules/word/reader/theme-parser.d.ts +8 -0
- package/dist/types/modules/word/reader/watermark-parser.d.ts +15 -0
- package/dist/types/modules/word/security/cfb-reader.d.ts +37 -0
- package/dist/types/modules/word/{digital-signatures.d.ts → security/digital-signatures.d.ts} +19 -11
- package/dist/types/modules/word/security/document-protection.d.ts +93 -0
- package/dist/{browser/modules/word → types/modules/word/security}/encryption.d.ts +51 -4
- package/dist/types/modules/word/security/policy.d.ts +80 -0
- package/dist/types/modules/word/template/template-chart.d.ts +56 -0
- package/dist/types/modules/word/template/template-datasource.d.ts +154 -0
- package/dist/types/modules/word/template/template-engine.d.ts +121 -0
- package/dist/types/modules/word/types.d.ts +224 -25
- package/dist/types/modules/word/units.d.ts +26 -0
- package/dist/types/modules/word/writer/checkbox-writer.d.ts +17 -0
- package/dist/{browser/modules/word/writers → types/modules/word/writer}/comment-writer.d.ts +2 -1
- package/dist/types/modules/word/writer/common-parts.d.ts +57 -0
- package/dist/{browser/modules/word → types/modules/word/writer}/content-types.d.ts +2 -2
- package/dist/types/modules/word/writer/document-writer.d.ts +24 -0
- package/dist/types/modules/word/writer/docx-packager.d.ts +35 -0
- package/dist/{browser/modules/word/writers → types/modules/word/writer}/footnote-writer.d.ts +3 -2
- package/dist/{browser/modules/word/writers → types/modules/word/writer}/header-footer-writer.d.ts +3 -2
- package/dist/{browser/modules/word/writers → types/modules/word/writer}/image-writer.d.ts +1 -1
- package/dist/types/modules/word/writer/math-writer.d.ts +20 -0
- package/dist/types/modules/word/{writers → writer}/numbering-writer.d.ts +1 -1
- package/dist/types/modules/word/{writers → writer}/paragraph-writer.d.ts +2 -1
- package/dist/types/modules/word/{writers → writer}/parts-writer.d.ts +3 -3
- package/dist/types/modules/word/writer/reference-scanners.d.ts +42 -0
- package/dist/types/modules/word/writer/relationships.d.ts +52 -0
- package/dist/types/modules/word/writer/render-context.d.ts +124 -0
- package/dist/types/modules/word/{writers → writer}/run-writer.d.ts +10 -1
- package/dist/types/modules/word/writer/sdt-writer.d.ts +25 -0
- package/dist/types/modules/word/writer/stream-buf.d.ts +37 -0
- package/dist/types/modules/word/writer/streaming-writer.d.ts +344 -0
- package/dist/types/modules/word/writer/string-buf.d.ts +8 -0
- package/dist/types/modules/word/{writers → writer}/table-writer.d.ts +2 -1
- package/dist/types/modules/xml/types.d.ts +22 -0
- package/dist/types/utils/crypto.browser.d.ts +3 -1
- package/dist/types/utils/crypto.d.ts +4 -1
- package/dist/types/utils/font-metrics.d.ts +63 -0
- package/dist/types/utils/string-buf.d.ts +42 -0
- package/dist/types/utils/theme-colors.d.ts +55 -0
- package/package.json +121 -39
- package/dist/browser/modules/word/color-utils.js +0 -94
- package/dist/browser/modules/word/document.d.ts +0 -657
- package/dist/browser/modules/word/document.js +0 -1533
- package/dist/browser/modules/word/docx-packager.d.ts +0 -14
- package/dist/browser/modules/word/docx-packager.js +0 -822
- package/dist/browser/modules/word/docx-reader.d.ts +0 -11
- package/dist/browser/modules/word/docx-reader.js +0 -4929
- package/dist/browser/modules/word/encryption.js +0 -274
- package/dist/browser/modules/word/internal-utils.d.ts +0 -23
- package/dist/browser/modules/word/internal-utils.js +0 -54
- package/dist/browser/modules/word/namespaces.d.ts +0 -159
- package/dist/browser/modules/word/namespaces.js +0 -189
- package/dist/browser/modules/word/relationships.d.ts +0 -30
- package/dist/browser/modules/word/relationships.js +0 -48
- package/dist/browser/modules/word/writers/checkbox-writer.d.ts +0 -9
- package/dist/browser/modules/word/writers/checkbox-writer.js +0 -42
- package/dist/browser/modules/word/writers/document-writer.d.ts +0 -16
- package/dist/browser/modules/word/writers/document-writer.js +0 -461
- package/dist/browser/modules/word/writers/math-writer.d.ts +0 -9
- package/dist/cjs/modules/word/color-utils.js +0 -97
- package/dist/cjs/modules/word/document.js +0 -1645
- package/dist/cjs/modules/word/docx-packager.js +0 -825
- package/dist/cjs/modules/word/docx-reader.js +0 -4932
- package/dist/cjs/modules/word/encryption.js +0 -282
- package/dist/cjs/modules/word/internal-utils.js +0 -59
- package/dist/cjs/modules/word/namespaces.js +0 -192
- package/dist/cjs/modules/word/relationships.js +0 -55
- package/dist/cjs/modules/word/writers/checkbox-writer.js +0 -45
- package/dist/cjs/modules/word/writers/document-writer.js +0 -465
- package/dist/esm/modules/word/color-utils.js +0 -94
- package/dist/esm/modules/word/document.js +0 -1533
- package/dist/esm/modules/word/docx-packager.js +0 -822
- package/dist/esm/modules/word/docx-reader.js +0 -4929
- package/dist/esm/modules/word/encryption.js +0 -274
- package/dist/esm/modules/word/internal-utils.js +0 -54
- package/dist/esm/modules/word/namespaces.js +0 -189
- package/dist/esm/modules/word/relationships.js +0 -48
- package/dist/esm/modules/word/writers/checkbox-writer.js +0 -42
- package/dist/esm/modules/word/writers/document-writer.js +0 -461
- package/dist/types/modules/word/document.d.ts +0 -657
- package/dist/types/modules/word/docx-packager.d.ts +0 -14
- package/dist/types/modules/word/docx-reader.d.ts +0 -11
- package/dist/types/modules/word/internal-utils.d.ts +0 -23
- package/dist/types/modules/word/namespaces.d.ts +0 -159
- package/dist/types/modules/word/relationships.d.ts +0 -30
- package/dist/types/modules/word/writers/checkbox-writer.d.ts +0 -9
- package/dist/types/modules/word/writers/document-writer.d.ts +0 -16
- package/dist/types/modules/word/writers/math-writer.d.ts +0 -9
- /package/dist/browser/modules/word/{font-obfuscation.d.ts → font/font-obfuscation.d.ts} +0 -0
- /package/dist/browser/modules/word/{writers → writer}/chart-writer.d.ts +0 -0
- /package/dist/browser/modules/word/{writers → writer}/section-writer.d.ts +0 -0
- /package/dist/browser/modules/word/{writers → writer}/section-writer.js +0 -0
- /package/dist/browser/modules/word/{writers → writer}/styles-writer.d.ts +0 -0
- /package/dist/browser/modules/word/{writers → writer}/textbox-writer.d.ts +0 -0
- /package/dist/browser/modules/word/{writers → writer}/textbox-writer.js +0 -0
- /package/dist/browser/modules/word/{writers → writer}/toc-writer.d.ts +0 -0
- /package/dist/browser/modules/word/{writers → writer}/toc-writer.js +0 -0
- /package/dist/cjs/modules/word/{writers → writer}/section-writer.js +0 -0
- /package/dist/cjs/modules/word/{writers → writer}/textbox-writer.js +0 -0
- /package/dist/cjs/modules/word/{writers → writer}/toc-writer.js +0 -0
- /package/dist/esm/modules/word/{writers → writer}/section-writer.js +0 -0
- /package/dist/esm/modules/word/{writers → writer}/textbox-writer.js +0 -0
- /package/dist/esm/modules/word/{writers → writer}/toc-writer.js +0 -0
- /package/dist/types/modules/word/{font-obfuscation.d.ts → font/font-obfuscation.d.ts} +0 -0
- /package/dist/types/modules/word/{writers → writer}/chart-writer.d.ts +0 -0
- /package/dist/types/modules/word/{writers → writer}/section-writer.d.ts +0 -0
- /package/dist/types/modules/word/{writers → writer}/styles-writer.d.ts +0 -0
- /package/dist/types/modules/word/{writers → writer}/textbox-writer.d.ts +0 -0
- /package/dist/types/modules/word/{writers → writer}/toc-writer.d.ts +0 -0
|
@@ -0,0 +1,374 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Run-level builder functions for DOCX documents.
|
|
3
|
+
*
|
|
4
|
+
* These are pure run/field/math/symbol/image/shape/chart/SDT/checkbox builders
|
|
5
|
+
* that do not depend on paragraph or table builders.
|
|
6
|
+
*/
|
|
7
|
+
import type { Run, RunProperties, MathBlock, MathContent, CheckBox, FloatingImage, DrawingShape, Chart, ChartSeries, ChartAxis, ChartLegendPosition, ChartContent, StructuredDocumentTag, SdtProperties, Paragraph, Table, Emu, HexColor, PositionalTabAlignment, PositionalTabRelativeTo, PositionalTabLeader, RubyProperties } from "../types.js";
|
|
8
|
+
/** Create a text run. */
|
|
9
|
+
export declare function text(content: string, properties?: RunProperties): Run;
|
|
10
|
+
/** Create a bold text run. */
|
|
11
|
+
export declare function bold(content: string, properties?: Omit<RunProperties, "bold">): Run;
|
|
12
|
+
/** Create an italic text run. */
|
|
13
|
+
export declare function italic(content: string, properties?: Omit<RunProperties, "italic">): Run;
|
|
14
|
+
/** Create an underlined text run. */
|
|
15
|
+
export declare function underline(content: string, style?: "single" | "double" | "thick" | "dotted" | "dash" | "wave", properties?: Omit<RunProperties, "underline">): Run;
|
|
16
|
+
/** Create a strikethrough text run. */
|
|
17
|
+
export declare function strikethrough(content: string, properties?: Omit<RunProperties, "strike">): Run;
|
|
18
|
+
/** Create a run with a page break. */
|
|
19
|
+
export declare function pageBreak(): Run;
|
|
20
|
+
/** Create a run with a line break. */
|
|
21
|
+
export declare function lineBreak(): Run;
|
|
22
|
+
/** Create a run with a column break. */
|
|
23
|
+
export declare function columnBreak(): Run;
|
|
24
|
+
/** Create a tab run. */
|
|
25
|
+
export declare function tab(): Run;
|
|
26
|
+
/** Create a positional tab (w:ptab). */
|
|
27
|
+
export declare function positionalTab(options: {
|
|
28
|
+
alignment: PositionalTabAlignment;
|
|
29
|
+
relativeTo: PositionalTabRelativeTo;
|
|
30
|
+
leader?: PositionalTabLeader;
|
|
31
|
+
}): Run;
|
|
32
|
+
/**
|
|
33
|
+
* Create a ruby (phonetic guide) run — e.g. Japanese furigana or Chinese pinyin.
|
|
34
|
+
*
|
|
35
|
+
* @param baseText - The main text being annotated.
|
|
36
|
+
* @param rubyText - The phonetic text shown above the base.
|
|
37
|
+
* @param properties - Optional ruby properties (alignment, font size, language).
|
|
38
|
+
*/
|
|
39
|
+
export declare function ruby(baseText: string | Run | readonly Run[], rubyText: string | Run | readonly Run[], properties?: RubyProperties): Run;
|
|
40
|
+
/** Create a carriage return run. */
|
|
41
|
+
export declare function carriageReturn(): Run;
|
|
42
|
+
/** Create a no-break hyphen run. */
|
|
43
|
+
export declare function noBreakHyphen(): Run;
|
|
44
|
+
/** Create a soft hyphen run. */
|
|
45
|
+
export declare function softHyphen(): Run;
|
|
46
|
+
/** Create a run with a field code. */
|
|
47
|
+
export declare function field(instruction: string, cachedValue?: string): Run;
|
|
48
|
+
/** Create a PAGE field (current page number). */
|
|
49
|
+
export declare function pageNumberField(cachedValue?: string): Run;
|
|
50
|
+
/** Create a NUMPAGES field (total page count). */
|
|
51
|
+
export declare function totalPagesField(cachedValue?: string): Run;
|
|
52
|
+
/** Create a SECTIONPAGES field (pages in section). */
|
|
53
|
+
export declare function sectionPagesField(cachedValue?: string): Run;
|
|
54
|
+
/** Create a SECTION field (current section number). */
|
|
55
|
+
export declare function sectionField(cachedValue?: string): Run;
|
|
56
|
+
/** Create a DATE field. */
|
|
57
|
+
export declare function dateField(format?: string, cachedValue?: string): Run;
|
|
58
|
+
/** Create a SEQ (sequence) field for numbering figures, tables, etc. */
|
|
59
|
+
export declare function sequenceField(identifier: string, options?: {
|
|
60
|
+
cachedValue?: string;
|
|
61
|
+
hide?: boolean;
|
|
62
|
+
}): Run;
|
|
63
|
+
/** Create a TIME field (current time). */
|
|
64
|
+
export declare function timeField(format?: string, cachedValue?: string): Run;
|
|
65
|
+
/** Create an AUTHOR field. */
|
|
66
|
+
export declare function authorField(cachedValue?: string): Run;
|
|
67
|
+
/** Create a TITLE field. */
|
|
68
|
+
export declare function titleField(cachedValue?: string): Run;
|
|
69
|
+
/** Create a SUBJECT field. */
|
|
70
|
+
export declare function subjectField(cachedValue?: string): Run;
|
|
71
|
+
/** Create a KEYWORDS field. */
|
|
72
|
+
export declare function keywordsField(cachedValue?: string): Run;
|
|
73
|
+
/** Create a FILENAME field. */
|
|
74
|
+
export declare function fileNameField(options?: {
|
|
75
|
+
includePath?: boolean;
|
|
76
|
+
cachedValue?: string;
|
|
77
|
+
}): Run;
|
|
78
|
+
/** Create a FILESIZE field. */
|
|
79
|
+
export declare function fileSizeField(cachedValue?: string): Run;
|
|
80
|
+
/**
|
|
81
|
+
* Create a STYLEREF field (references text from nearest paragraph with given style).
|
|
82
|
+
*
|
|
83
|
+
* Commonly used in headers to show current chapter/section heading.
|
|
84
|
+
*/
|
|
85
|
+
export declare function styleRefField(styleName: string, options?: {
|
|
86
|
+
/** Search from bottom of page (default: top). */
|
|
87
|
+
fromBottom?: boolean;
|
|
88
|
+
/** Insert paragraph number instead of text. */
|
|
89
|
+
insertParagraphNumber?: boolean;
|
|
90
|
+
/** Insert position (above/below) reference. */
|
|
91
|
+
insertPosition?: boolean;
|
|
92
|
+
/** Suppress non-delimiter/non-numerical text. */
|
|
93
|
+
suppressNonNumeric?: boolean;
|
|
94
|
+
cachedValue?: string;
|
|
95
|
+
}): Run;
|
|
96
|
+
/**
|
|
97
|
+
* Create a REF field (references a bookmark).
|
|
98
|
+
*/
|
|
99
|
+
export declare function refField(bookmarkName: string, options?: {
|
|
100
|
+
/** Insert bookmark number. */
|
|
101
|
+
insertNumber?: boolean;
|
|
102
|
+
/** Hyperlink to bookmark. */
|
|
103
|
+
hyperlink?: boolean;
|
|
104
|
+
/** Paragraph number (no context). */
|
|
105
|
+
paragraphNumber?: boolean;
|
|
106
|
+
/** Relative paragraph number. */
|
|
107
|
+
relativeParagraphNumber?: boolean;
|
|
108
|
+
/** Full context paragraph number. */
|
|
109
|
+
fullContext?: boolean;
|
|
110
|
+
/** Suppress non-delimiter. */
|
|
111
|
+
suppressNonDelimiter?: boolean;
|
|
112
|
+
cachedValue?: string;
|
|
113
|
+
}): Run;
|
|
114
|
+
/** Create a PAGEREF field (references page of bookmark). */
|
|
115
|
+
export declare function pageRefField(bookmarkName: string, options?: {
|
|
116
|
+
hyperlink?: boolean;
|
|
117
|
+
relativePosition?: boolean;
|
|
118
|
+
cachedValue?: string;
|
|
119
|
+
}): Run;
|
|
120
|
+
/** Create a NOTEREF field (references a footnote/endnote). */
|
|
121
|
+
export declare function noteRefField(bookmarkName: string, options?: {
|
|
122
|
+
hyperlink?: boolean;
|
|
123
|
+
insertNumberFormat?: boolean;
|
|
124
|
+
cachedValue?: string;
|
|
125
|
+
}): Run;
|
|
126
|
+
/** Create a HYPERLINK field (alternative to w:hyperlink element). */
|
|
127
|
+
export declare function hyperlinkField(target: string, options?: {
|
|
128
|
+
/** Anchor within target (bookmark). */
|
|
129
|
+
anchor?: string;
|
|
130
|
+
/** Open in new window. */
|
|
131
|
+
newWindow?: boolean;
|
|
132
|
+
/** Display text (if omitted, uses target). */
|
|
133
|
+
displayText?: string;
|
|
134
|
+
/** Screen tip tooltip. */
|
|
135
|
+
tooltip?: string;
|
|
136
|
+
cachedValue?: string;
|
|
137
|
+
}): Run;
|
|
138
|
+
/** Create a QUOTE field (literal text). */
|
|
139
|
+
export declare function quoteField(text: string, cachedValue?: string): Run;
|
|
140
|
+
/**
|
|
141
|
+
* Create a TOC field for table of contents.
|
|
142
|
+
*
|
|
143
|
+
* @param options - TOC options.
|
|
144
|
+
*/
|
|
145
|
+
export declare function tocField(options?: {
|
|
146
|
+
/** Heading levels to include (e.g. "1-3"). */
|
|
147
|
+
headingLevels?: string;
|
|
148
|
+
/** Include paragraphs with these styles. */
|
|
149
|
+
styles?: readonly string[];
|
|
150
|
+
/** Include table entries (TC fields) with these levels. */
|
|
151
|
+
tcLevels?: string;
|
|
152
|
+
/** Hyperlinks for entries. */
|
|
153
|
+
hyperlink?: boolean;
|
|
154
|
+
/** Right-align page numbers. */
|
|
155
|
+
rightAlignedPageNumbers?: boolean;
|
|
156
|
+
/** Use tab leader (default "." dots). */
|
|
157
|
+
tabLeader?: "." | "-" | "_" | " ";
|
|
158
|
+
/** Suppress page numbers. */
|
|
159
|
+
noPageNumbers?: boolean;
|
|
160
|
+
/** Identifier for table of captions. */
|
|
161
|
+
captionIdentifier?: string;
|
|
162
|
+
cachedValue?: string;
|
|
163
|
+
}): Run;
|
|
164
|
+
/** Create a TC (table of contents entry) field. */
|
|
165
|
+
export declare function tcField(text: string, options?: {
|
|
166
|
+
level?: number;
|
|
167
|
+
suppressPageNumber?: boolean;
|
|
168
|
+
cachedValue?: string;
|
|
169
|
+
}): Run;
|
|
170
|
+
/** Create an XE (index entry) field. */
|
|
171
|
+
export declare function indexEntryField(text: string, options?: {
|
|
172
|
+
bold?: boolean;
|
|
173
|
+
italic?: boolean;
|
|
174
|
+
cachedValue?: string;
|
|
175
|
+
}): Run;
|
|
176
|
+
/** Create an INDEX field (renders index from XE entries). */
|
|
177
|
+
export declare function indexField(options?: {
|
|
178
|
+
bookmark?: string;
|
|
179
|
+
columns?: number;
|
|
180
|
+
entryType?: string;
|
|
181
|
+
cachedValue?: string;
|
|
182
|
+
}): Run;
|
|
183
|
+
/** Create an IF field (conditional content). */
|
|
184
|
+
export declare function ifField(condition: string, trueText: string, falseText: string, cachedValue?: string): Run;
|
|
185
|
+
/** Create an INCLUDETEXT field (includes external file content). */
|
|
186
|
+
export declare function includeTextField(filePath: string, options?: {
|
|
187
|
+
bookmark?: string;
|
|
188
|
+
cachedValue?: string;
|
|
189
|
+
}): Run;
|
|
190
|
+
/** Create an INCLUDEPICTURE field. */
|
|
191
|
+
export declare function includePictureField(filePath: string, cachedValue?: string): Run;
|
|
192
|
+
/** Create a FORMTEXT field (legacy text form field) with full properties. */
|
|
193
|
+
export declare function formTextField(options?: {
|
|
194
|
+
name?: string;
|
|
195
|
+
default?: string;
|
|
196
|
+
maxLength?: number;
|
|
197
|
+
format?: string;
|
|
198
|
+
helpText?: string;
|
|
199
|
+
statusText?: string;
|
|
200
|
+
enabled?: boolean;
|
|
201
|
+
cachedValue?: string;
|
|
202
|
+
}): Run;
|
|
203
|
+
/** Create a FORMCHECKBOX field (legacy checkbox form field) with full properties. */
|
|
204
|
+
export declare function formCheckboxField(options?: {
|
|
205
|
+
name?: string;
|
|
206
|
+
checked?: boolean;
|
|
207
|
+
default?: boolean;
|
|
208
|
+
size?: number;
|
|
209
|
+
cachedValue?: string;
|
|
210
|
+
}): Run;
|
|
211
|
+
/** Create a FORMDROPDOWN field (legacy dropdown form field) with full properties. */
|
|
212
|
+
export declare function formDropdownField(options?: {
|
|
213
|
+
name?: string;
|
|
214
|
+
entries?: readonly string[];
|
|
215
|
+
default?: number;
|
|
216
|
+
helpText?: string;
|
|
217
|
+
statusText?: string;
|
|
218
|
+
enabled?: boolean;
|
|
219
|
+
cachedValue?: string;
|
|
220
|
+
}): Run;
|
|
221
|
+
/** Create a math block. */
|
|
222
|
+
export declare function mathBlock(content: MathContent[]): MathBlock;
|
|
223
|
+
/** Create a math text run. */
|
|
224
|
+
export declare function mathRun(mathText: string, properties?: {
|
|
225
|
+
italic?: boolean;
|
|
226
|
+
bold?: boolean;
|
|
227
|
+
font?: string;
|
|
228
|
+
}): MathContent;
|
|
229
|
+
/** Create a math fraction. */
|
|
230
|
+
export declare function mathFraction(numerator: MathContent[], denominator: MathContent[], fractionType?: "bar" | "skw" | "lin" | "noBar"): MathContent;
|
|
231
|
+
/** Create a math square root. */
|
|
232
|
+
export declare function mathSqrt(content: MathContent[]): MathContent;
|
|
233
|
+
/** Create a math nth root. */
|
|
234
|
+
export declare function mathRoot(degree: MathContent[], content: MathContent[]): MathContent;
|
|
235
|
+
/** Create a math summation. */
|
|
236
|
+
export declare function mathSum(content: MathContent[], sub?: MathContent[], sup?: MathContent[]): MathContent;
|
|
237
|
+
/** Create a math integral. */
|
|
238
|
+
export declare function mathIntegral(content: MathContent[], sub?: MathContent[], sup?: MathContent[]): MathContent;
|
|
239
|
+
/** Create a math product. */
|
|
240
|
+
export declare function mathProduct(content: MathContent[], sub?: MathContent[], sup?: MathContent[]): MathContent;
|
|
241
|
+
/** Create a math superscript. */
|
|
242
|
+
export declare function mathSuperScript(base: MathContent[], superScript: MathContent[]): MathContent;
|
|
243
|
+
/** Create a math subscript. */
|
|
244
|
+
export declare function mathSubScript(base: MathContent[], subScript: MathContent[]): MathContent;
|
|
245
|
+
/** Create a math sub-superscript. */
|
|
246
|
+
export declare function mathSubSuperScript(base: MathContent[], subScript: MathContent[], superScript: MathContent[]): MathContent;
|
|
247
|
+
/** Create a math pre-sub-superscript (subscript/superscript before the base). */
|
|
248
|
+
export declare function mathPreSubSuperScript(base: MathContent[], preSubScript: MathContent[], preSuperScript: MathContent[]): MathContent;
|
|
249
|
+
/** Create a math phantom (invisible expression that takes up space). */
|
|
250
|
+
export declare function mathPhantom(content: MathContent[], options?: {
|
|
251
|
+
show?: boolean;
|
|
252
|
+
zeroWidth?: boolean;
|
|
253
|
+
zeroAscent?: boolean;
|
|
254
|
+
zeroDescent?: boolean;
|
|
255
|
+
transparent?: boolean;
|
|
256
|
+
}): MathContent;
|
|
257
|
+
/** Create a math group character (e.g. a horizontal brace over an expression). */
|
|
258
|
+
export declare function mathGroupChar(base: MathContent[], options?: {
|
|
259
|
+
char?: string;
|
|
260
|
+
position?: "top" | "bottom";
|
|
261
|
+
verticalAlign?: "top" | "center" | "bottom";
|
|
262
|
+
}): MathContent;
|
|
263
|
+
/** Create a math border box (draw borders around / strike through an expression). */
|
|
264
|
+
export declare function mathBorderBox(content: MathContent[], options?: {
|
|
265
|
+
hideTop?: boolean;
|
|
266
|
+
hideBottom?: boolean;
|
|
267
|
+
hideLeft?: boolean;
|
|
268
|
+
hideRight?: boolean;
|
|
269
|
+
strikeBlTr?: boolean;
|
|
270
|
+
strikeTlBr?: boolean;
|
|
271
|
+
strikeH?: boolean;
|
|
272
|
+
strikeV?: boolean;
|
|
273
|
+
}): MathContent;
|
|
274
|
+
/** Create a math delimiter (parentheses, brackets, etc.). */
|
|
275
|
+
export declare function mathDelimiter(content: MathContent[][], options?: {
|
|
276
|
+
beginChar?: string;
|
|
277
|
+
endChar?: string;
|
|
278
|
+
separatorChar?: string;
|
|
279
|
+
}): MathContent;
|
|
280
|
+
/** Create a math n-ary operator (sum, integral, product, etc.). */
|
|
281
|
+
export declare function mathNary(char: string, content: MathContent[], sub?: MathContent[], sup?: MathContent[]): MathContent;
|
|
282
|
+
/** Create a math function (sin, cos, lim, etc.). */
|
|
283
|
+
export declare function mathFunction(name: MathContent[], content: MathContent[]): MathContent;
|
|
284
|
+
/** Create a math limit (upper or lower). */
|
|
285
|
+
export declare function mathLimit(base: MathContent[], limit: MathContent[], limitType?: "upper" | "lower"): MathContent;
|
|
286
|
+
/** Create a math matrix. */
|
|
287
|
+
export declare function mathMatrix(rows: MathContent[][][]): MathContent;
|
|
288
|
+
/** Create a math accent (hat, tilde, etc.). */
|
|
289
|
+
export declare function mathAccent(content: MathContent[], char?: string): MathContent;
|
|
290
|
+
/** Create a math bar (overbar/underbar). */
|
|
291
|
+
export declare function mathBar(content: MathContent[], position?: "top" | "bottom"): MathContent;
|
|
292
|
+
/** Create a math box. */
|
|
293
|
+
export declare function mathBox(content: MathContent[]): MathContent;
|
|
294
|
+
/** Create a math equation array. */
|
|
295
|
+
export declare function mathEquationArray(rows: MathContent[][]): MathContent;
|
|
296
|
+
/** Create a symbol run. */
|
|
297
|
+
export declare function symbol(font: string, char: string, properties?: RunProperties): Run;
|
|
298
|
+
/** Create a floating image (body-level). */
|
|
299
|
+
export declare function floatingImage(options: {
|
|
300
|
+
rId: string;
|
|
301
|
+
width: Emu;
|
|
302
|
+
height: Emu;
|
|
303
|
+
horizontalPosition?: FloatingImage["horizontalPosition"];
|
|
304
|
+
verticalPosition?: FloatingImage["verticalPosition"];
|
|
305
|
+
wrap?: FloatingImage["wrap"];
|
|
306
|
+
altText?: string;
|
|
307
|
+
name?: string;
|
|
308
|
+
behindDoc?: boolean;
|
|
309
|
+
lockAnchor?: boolean;
|
|
310
|
+
layoutInCell?: boolean;
|
|
311
|
+
allowOverlap?: boolean;
|
|
312
|
+
simplePos?: {
|
|
313
|
+
x: Emu;
|
|
314
|
+
y: Emu;
|
|
315
|
+
};
|
|
316
|
+
distT?: Emu;
|
|
317
|
+
distB?: Emu;
|
|
318
|
+
distL?: Emu;
|
|
319
|
+
distR?: Emu;
|
|
320
|
+
rotation?: number;
|
|
321
|
+
flipHorizontal?: boolean;
|
|
322
|
+
flipVertical?: boolean;
|
|
323
|
+
srcRect?: FloatingImage["srcRect"];
|
|
324
|
+
}): FloatingImage;
|
|
325
|
+
/** Create a DrawingML shape. */
|
|
326
|
+
export declare function drawingShape(options: {
|
|
327
|
+
shapeType: DrawingShape["shapeType"];
|
|
328
|
+
width: Emu;
|
|
329
|
+
height: Emu;
|
|
330
|
+
fillColor?: HexColor;
|
|
331
|
+
noFill?: boolean;
|
|
332
|
+
outlineColor?: HexColor;
|
|
333
|
+
outlineWidth?: Emu;
|
|
334
|
+
noOutline?: boolean;
|
|
335
|
+
textContent?: readonly Paragraph[];
|
|
336
|
+
altText?: string;
|
|
337
|
+
name?: string;
|
|
338
|
+
horizontalPosition?: DrawingShape["horizontalPosition"];
|
|
339
|
+
verticalPosition?: DrawingShape["verticalPosition"];
|
|
340
|
+
wrap?: DrawingShape["wrap"];
|
|
341
|
+
behindDoc?: boolean;
|
|
342
|
+
rotation?: number;
|
|
343
|
+
}): DrawingShape;
|
|
344
|
+
/** Create a chart content block. */
|
|
345
|
+
export declare function chart(options: {
|
|
346
|
+
type: Chart["type"];
|
|
347
|
+
series: readonly ChartSeries[];
|
|
348
|
+
title?: string;
|
|
349
|
+
legend?: ChartLegendPosition;
|
|
350
|
+
categoryAxis?: ChartAxis;
|
|
351
|
+
valueAxis?: ChartAxis;
|
|
352
|
+
plotAreaColor?: HexColor;
|
|
353
|
+
chartAreaColor?: HexColor;
|
|
354
|
+
view3d?: boolean;
|
|
355
|
+
style?: number;
|
|
356
|
+
width?: Emu;
|
|
357
|
+
height?: Emu;
|
|
358
|
+
altText?: string;
|
|
359
|
+
name?: string;
|
|
360
|
+
}): ChartContent;
|
|
361
|
+
/** Create a structured document tag (content control). */
|
|
362
|
+
export declare function structuredDocumentTag(content: (Paragraph | Table)[], properties?: SdtProperties): StructuredDocumentTag;
|
|
363
|
+
/** Create a checkbox. */
|
|
364
|
+
export declare function checkBox(options?: {
|
|
365
|
+
checked?: boolean;
|
|
366
|
+
checkedState?: {
|
|
367
|
+
value: string;
|
|
368
|
+
font?: string;
|
|
369
|
+
};
|
|
370
|
+
uncheckedState?: {
|
|
371
|
+
value: string;
|
|
372
|
+
font?: string;
|
|
373
|
+
};
|
|
374
|
+
}): CheckBox;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Table builder functions for DOCX documents.
|
|
3
|
+
*
|
|
4
|
+
* Includes border, gridBorders, cell, row, table, simpleTable.
|
|
5
|
+
*/
|
|
6
|
+
import type { Border, Table, TableRow, TableCell, TableProperties, TableRowProperties, TableCellProperties, TableBorders, TableWidth, Paragraph, Twips } from "../types.js";
|
|
7
|
+
/** Shorthand border. */
|
|
8
|
+
export declare function border(style?: Border["style"], size?: number, color?: string): Border;
|
|
9
|
+
/** Create standard grid borders for a table. */
|
|
10
|
+
export declare function gridBorders(size?: number, color?: string): TableBorders;
|
|
11
|
+
/** Create a table cell. */
|
|
12
|
+
export declare function cell(content: string | (Paragraph | Table)[], properties?: TableCellProperties): TableCell;
|
|
13
|
+
/** Create a table row. */
|
|
14
|
+
export declare function row(cells: TableCell[], properties?: TableRowProperties): TableRow;
|
|
15
|
+
/** Create a table. */
|
|
16
|
+
export declare function table(rows: TableRow[], properties?: TableProperties, columnWidths?: Twips[]): Table;
|
|
17
|
+
/** Create a simple table from a 2D string array. */
|
|
18
|
+
export declare function simpleTable(data: string[][], options?: {
|
|
19
|
+
headerRow?: boolean;
|
|
20
|
+
borders?: boolean;
|
|
21
|
+
width?: TableWidth;
|
|
22
|
+
columnWidths?: Twips[];
|
|
23
|
+
}): Table;
|
|
@@ -16,6 +16,23 @@ export declare const NS_A = "http://schemas.openxmlformats.org/drawingml/2006/ma
|
|
|
16
16
|
export declare const NS_PIC = "http://schemas.openxmlformats.org/drawingml/2006/picture";
|
|
17
17
|
/** Markup compatibility namespace (mc:). */
|
|
18
18
|
export declare const NS_MC = "http://schemas.openxmlformats.org/markup-compatibility/2006";
|
|
19
|
+
/** Strict WordprocessingML main namespace. */
|
|
20
|
+
export declare const NS_W_STRICT = "http://purl.oclc.org/ooxml/wordprocessingml/main";
|
|
21
|
+
/** Strict Relationships namespace. */
|
|
22
|
+
export declare const NS_R_STRICT = "http://purl.oclc.org/ooxml/officeDocument/relationships";
|
|
23
|
+
/** Strict DrawingML Word Processing Drawing namespace. */
|
|
24
|
+
export declare const NS_WP_STRICT = "http://purl.oclc.org/ooxml/drawingml/wordprocessingDrawing";
|
|
25
|
+
/** Strict DrawingML main namespace. */
|
|
26
|
+
export declare const NS_A_STRICT = "http://purl.oclc.org/ooxml/drawingml/main";
|
|
27
|
+
/** Strict DrawingML picture namespace. */
|
|
28
|
+
export declare const NS_PIC_STRICT = "http://purl.oclc.org/ooxml/drawingml/picture";
|
|
29
|
+
/** Strict Markup compatibility namespace. */
|
|
30
|
+
export declare const NS_MC_STRICT = "http://purl.oclc.org/ooxml/markup-compatibility/2006";
|
|
31
|
+
/**
|
|
32
|
+
* Maps ISO 29500 Strict namespace URIs to their Transitional equivalents.
|
|
33
|
+
* Used during reading to normalize Strict documents into the internal model.
|
|
34
|
+
*/
|
|
35
|
+
export declare const STRICT_TO_TRANSITIONAL_NS: ReadonlyMap<string, string>;
|
|
19
36
|
/** VML namespace (v:). */
|
|
20
37
|
export declare const NS_V = "urn:schemas-microsoft-com:vml";
|
|
21
38
|
/** Office VML extensions (o:). */
|
|
@@ -64,8 +81,19 @@ export declare const NS_CONTENT_TYPES = "http://schemas.openxmlformats.org/packa
|
|
|
64
81
|
export declare const NS_PKG_RELS = "http://schemas.openxmlformats.org/package/2006/relationships";
|
|
65
82
|
/** DrawingML picture URI for graphicData. */
|
|
66
83
|
export declare const URI_PIC = "http://schemas.openxmlformats.org/drawingml/2006/picture";
|
|
84
|
+
/** DrawingML chart namespace (c:). */
|
|
85
|
+
export declare const NS_C_CHART = "http://schemas.openxmlformats.org/drawingml/2006/chart";
|
|
86
|
+
/** Chart Extensions namespace (cx:) — Office 2016+ chartEx. */
|
|
87
|
+
export declare const NS_CX_CHART = "http://schemas.microsoft.com/office/drawing/2014/chartex";
|
|
88
|
+
/** Flat OPC packaging namespace. */
|
|
89
|
+
export declare const NS_PKG = "http://schemas.microsoft.com/office/2006/xmlPackage";
|
|
67
90
|
/** Standard namespace attributes for w:document root element. */
|
|
68
|
-
export declare const DOCUMENT_NAMESPACES: Record<string, string
|
|
91
|
+
export declare const DOCUMENT_NAMESPACES: Readonly<Record<string, string>>;
|
|
92
|
+
/**
|
|
93
|
+
* Maps ISO 29500 Strict relationship type URIs to their Transitional equivalents.
|
|
94
|
+
* Used during reading to normalize Strict documents.
|
|
95
|
+
*/
|
|
96
|
+
export declare const STRICT_TO_TRANSITIONAL_REL: ReadonlyMap<string, string>;
|
|
69
97
|
/** OOXML relationship type URIs. */
|
|
70
98
|
export declare const RelType: {
|
|
71
99
|
readonly OfficeDocument: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument";
|
|
@@ -89,11 +117,13 @@ export declare const RelType: {
|
|
|
89
117
|
readonly Glossary: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/glossaryDocument";
|
|
90
118
|
readonly Font: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/font";
|
|
91
119
|
readonly Chart: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart";
|
|
120
|
+
readonly ChartEx: "http://schemas.microsoft.com/office/2014/relationships/chartEx";
|
|
92
121
|
readonly Diagram: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/diagramData";
|
|
93
122
|
readonly CustomXml: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml";
|
|
94
123
|
readonly CustomXmlProps: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps";
|
|
95
124
|
readonly VbaProject: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/vbaProject";
|
|
96
125
|
readonly People: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/people";
|
|
126
|
+
readonly Package: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/package";
|
|
97
127
|
readonly DigitalSignature: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/digital-signature/signature";
|
|
98
128
|
};
|
|
99
129
|
/** OOXML content type strings. */
|
|
@@ -101,6 +131,12 @@ export declare const ContentType: {
|
|
|
101
131
|
readonly Relationships: "application/vnd.openxmlformats-package.relationships+xml";
|
|
102
132
|
readonly Xml: "application/xml";
|
|
103
133
|
readonly Document: "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml";
|
|
134
|
+
/** Macro-enabled document (.docm) main part. */
|
|
135
|
+
readonly DocumentMacroEnabled: "application/vnd.ms-word.document.macroEnabled.main+xml";
|
|
136
|
+
/** Template (.dotx) main part. */
|
|
137
|
+
readonly Template: "application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml";
|
|
138
|
+
/** Macro-enabled template (.dotm) main part. */
|
|
139
|
+
readonly TemplateMacroEnabled: "application/vnd.ms-word.template.macroEnabled.main+xml";
|
|
104
140
|
readonly Styles: "application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml";
|
|
105
141
|
readonly Settings: "application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml";
|
|
106
142
|
readonly FontTable: "application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml";
|
|
@@ -128,6 +164,8 @@ export declare const ContentType: {
|
|
|
128
164
|
readonly Wmf: "image/x-wmf";
|
|
129
165
|
readonly ObfuscatedFont: "application/vnd.openxmlformats-officedocument.obfuscatedFont";
|
|
130
166
|
readonly Chart: "application/vnd.openxmlformats-officedocument.drawingml.chart+xml";
|
|
167
|
+
readonly ChartEx: "application/vnd.ms-office.chartEx+xml";
|
|
168
|
+
readonly Xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
|
|
131
169
|
readonly CustomXml: "application/xml";
|
|
132
170
|
readonly VbaProject: "application/vnd.ms-office.vbaProject";
|
|
133
171
|
};
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Conversion Intermediate Representation (IR)
|
|
3
|
+
*
|
|
4
|
+
* Format-agnostic semantic document model used by converters.
|
|
5
|
+
* Sits between DocxDocument (OOXML-specific) and output formats (HTML, Markdown, etc.).
|
|
6
|
+
*
|
|
7
|
+
* Purpose:
|
|
8
|
+
* - Normalize style resolution into direct formatting
|
|
9
|
+
* - Resolve numbering into concrete list markers
|
|
10
|
+
* - Flatten SDTs and tracked changes into final visible content
|
|
11
|
+
* - Provide a common "loss report" mechanism
|
|
12
|
+
* - Enable consistent behavior across all converters
|
|
13
|
+
*/
|
|
14
|
+
/** Severity of a conversion warning. */
|
|
15
|
+
export type ConversionSeverity = "info" | "warning" | "error";
|
|
16
|
+
/** A warning generated during conversion (feature loss, unsupported element, etc.). */
|
|
17
|
+
export interface ConversionWarning {
|
|
18
|
+
readonly severity: ConversionSeverity;
|
|
19
|
+
readonly code: string;
|
|
20
|
+
readonly message: string;
|
|
21
|
+
/** Path in the source document (e.g. "body[3].table.row[1].cell[0]"). */
|
|
22
|
+
readonly path?: string;
|
|
23
|
+
}
|
|
24
|
+
/** A registered media asset for the conversion. */
|
|
25
|
+
export interface ConversionAsset {
|
|
26
|
+
readonly id: string;
|
|
27
|
+
readonly mimeType: string;
|
|
28
|
+
readonly data: Uint8Array;
|
|
29
|
+
readonly altText?: string;
|
|
30
|
+
readonly width?: number;
|
|
31
|
+
readonly height?: number;
|
|
32
|
+
}
|
|
33
|
+
/** Resolved inline formatting (no style inheritance — everything is explicit). */
|
|
34
|
+
export interface ResolvedFormatting {
|
|
35
|
+
readonly bold?: boolean;
|
|
36
|
+
readonly italic?: boolean;
|
|
37
|
+
readonly underline?: boolean;
|
|
38
|
+
readonly strikethrough?: boolean;
|
|
39
|
+
readonly superscript?: boolean;
|
|
40
|
+
readonly subscript?: boolean;
|
|
41
|
+
readonly fontFamily?: string;
|
|
42
|
+
readonly fontSize?: number;
|
|
43
|
+
readonly color?: string;
|
|
44
|
+
readonly backgroundColor?: string;
|
|
45
|
+
readonly code?: boolean;
|
|
46
|
+
}
|
|
47
|
+
/** A semantic inline element. */
|
|
48
|
+
export type SemanticInline = {
|
|
49
|
+
readonly type: "text";
|
|
50
|
+
readonly text: string;
|
|
51
|
+
readonly format?: ResolvedFormatting;
|
|
52
|
+
} | {
|
|
53
|
+
readonly type: "lineBreak";
|
|
54
|
+
} | {
|
|
55
|
+
readonly type: "image";
|
|
56
|
+
readonly assetId: string;
|
|
57
|
+
readonly alt?: string;
|
|
58
|
+
readonly width?: number;
|
|
59
|
+
readonly height?: number;
|
|
60
|
+
} | {
|
|
61
|
+
readonly type: "link";
|
|
62
|
+
readonly href: string;
|
|
63
|
+
readonly children: readonly SemanticInline[];
|
|
64
|
+
} | {
|
|
65
|
+
readonly type: "footnoteRef";
|
|
66
|
+
readonly id: number;
|
|
67
|
+
} | {
|
|
68
|
+
readonly type: "endnoteRef";
|
|
69
|
+
readonly id: number;
|
|
70
|
+
} | {
|
|
71
|
+
readonly type: "math";
|
|
72
|
+
readonly latex?: string;
|
|
73
|
+
readonly text: string;
|
|
74
|
+
} | {
|
|
75
|
+
readonly type: "code";
|
|
76
|
+
readonly text: string;
|
|
77
|
+
};
|
|
78
|
+
/** A semantic block element. */
|
|
79
|
+
export type SemanticBlock = {
|
|
80
|
+
readonly type: "paragraph";
|
|
81
|
+
readonly children: readonly SemanticInline[];
|
|
82
|
+
readonly style?: SemanticParagraphStyle;
|
|
83
|
+
} | {
|
|
84
|
+
readonly type: "heading";
|
|
85
|
+
readonly level: 1 | 2 | 3 | 4 | 5 | 6;
|
|
86
|
+
readonly children: readonly SemanticInline[];
|
|
87
|
+
} | {
|
|
88
|
+
readonly type: "list";
|
|
89
|
+
readonly ordered: boolean;
|
|
90
|
+
readonly items: readonly SemanticListItem[];
|
|
91
|
+
} | {
|
|
92
|
+
readonly type: "table";
|
|
93
|
+
readonly rows: readonly SemanticTableRow[];
|
|
94
|
+
readonly caption?: string;
|
|
95
|
+
} | {
|
|
96
|
+
readonly type: "codeBlock";
|
|
97
|
+
readonly language?: string;
|
|
98
|
+
readonly text: string;
|
|
99
|
+
} | {
|
|
100
|
+
readonly type: "blockquote";
|
|
101
|
+
readonly children: readonly SemanticBlock[];
|
|
102
|
+
} | {
|
|
103
|
+
readonly type: "horizontalRule";
|
|
104
|
+
} | {
|
|
105
|
+
readonly type: "image";
|
|
106
|
+
readonly assetId: string;
|
|
107
|
+
readonly alt?: string;
|
|
108
|
+
readonly width?: number;
|
|
109
|
+
readonly height?: number;
|
|
110
|
+
readonly caption?: string;
|
|
111
|
+
} | {
|
|
112
|
+
/**
|
|
113
|
+
* Block-level mathematical expression. `text` is a plain-text
|
|
114
|
+
* fallback (always present); `mathML` is the full MathML
|
|
115
|
+
* representation when the converter could derive one.
|
|
116
|
+
*/
|
|
117
|
+
readonly type: "math";
|
|
118
|
+
readonly text: string;
|
|
119
|
+
readonly mathML?: string;
|
|
120
|
+
} | {
|
|
121
|
+
/**
|
|
122
|
+
* A chart reference. The chart binary is preserved in `assets` only
|
|
123
|
+
* when the source provided a rendered SVG; otherwise consumers
|
|
124
|
+
* should fall back to the `title` / `altText` for a textual
|
|
125
|
+
* placeholder.
|
|
126
|
+
*/
|
|
127
|
+
readonly type: "chart";
|
|
128
|
+
readonly chartId: string;
|
|
129
|
+
readonly title?: string;
|
|
130
|
+
readonly altText?: string;
|
|
131
|
+
/** Asset id of an SVG rendering, when available. */
|
|
132
|
+
readonly svgAssetId?: string;
|
|
133
|
+
} | {
|
|
134
|
+
/** Inline check-box state (carries `<w:checkBox>` semantics). */
|
|
135
|
+
readonly type: "checkBox";
|
|
136
|
+
readonly checked: boolean;
|
|
137
|
+
readonly label?: string;
|
|
138
|
+
} | {
|
|
139
|
+
/**
|
|
140
|
+
* Embedded foreign content (`<w:altChunk>`): HTML, RTF, plain text,
|
|
141
|
+
* etc. The renderer can either inline the data directly (when it
|
|
142
|
+
* knows how to handle `contentType`) or fall back to a placeholder.
|
|
143
|
+
*/
|
|
144
|
+
readonly type: "embed";
|
|
145
|
+
readonly contentType: string;
|
|
146
|
+
readonly data?: Uint8Array;
|
|
147
|
+
readonly fileName?: string;
|
|
148
|
+
} | {
|
|
149
|
+
/**
|
|
150
|
+
* Opaque OOXML drawing markup that cannot be safely flattened into
|
|
151
|
+
* the semantic model. Carried verbatim so consumers that want full
|
|
152
|
+
* fidelity (e.g. an OOXML→OOXML pipeline) can preserve the source
|
|
153
|
+
* markup; markdown / html renderers may emit a placeholder instead.
|
|
154
|
+
*/
|
|
155
|
+
readonly type: "raw";
|
|
156
|
+
readonly format: "ooxml-drawing";
|
|
157
|
+
readonly xml: string;
|
|
158
|
+
};
|
|
159
|
+
/** Paragraph style properties (resolved, not inherited). */
|
|
160
|
+
export interface SemanticParagraphStyle {
|
|
161
|
+
readonly alignment?: "left" | "center" | "right" | "justify";
|
|
162
|
+
readonly indentLeft?: number;
|
|
163
|
+
readonly indentRight?: number;
|
|
164
|
+
readonly spaceBefore?: number;
|
|
165
|
+
readonly spaceAfter?: number;
|
|
166
|
+
}
|
|
167
|
+
/** A list item (possibly nested). */
|
|
168
|
+
export interface SemanticListItem {
|
|
169
|
+
readonly children: readonly SemanticInline[];
|
|
170
|
+
readonly subList?: SemanticBlock;
|
|
171
|
+
}
|
|
172
|
+
/** A table row. */
|
|
173
|
+
export interface SemanticTableRow {
|
|
174
|
+
readonly cells: readonly SemanticTableCell[];
|
|
175
|
+
readonly isHeader?: boolean;
|
|
176
|
+
}
|
|
177
|
+
/** A table cell. */
|
|
178
|
+
export interface SemanticTableCell {
|
|
179
|
+
readonly children: readonly SemanticBlock[];
|
|
180
|
+
readonly colSpan?: number;
|
|
181
|
+
readonly rowSpan?: number;
|
|
182
|
+
readonly alignment?: "left" | "center" | "right";
|
|
183
|
+
}
|
|
184
|
+
/** A footnote/endnote definition. */
|
|
185
|
+
export interface SemanticNote {
|
|
186
|
+
readonly id: number;
|
|
187
|
+
readonly children: readonly SemanticBlock[];
|
|
188
|
+
}
|
|
189
|
+
/** The complete semantic document. */
|
|
190
|
+
export interface SemanticDocument {
|
|
191
|
+
readonly blocks: readonly SemanticBlock[];
|
|
192
|
+
readonly assets: readonly ConversionAsset[];
|
|
193
|
+
readonly footnotes: readonly SemanticNote[];
|
|
194
|
+
readonly endnotes: readonly SemanticNote[];
|
|
195
|
+
readonly metadata?: {
|
|
196
|
+
readonly title?: string;
|
|
197
|
+
readonly author?: string;
|
|
198
|
+
readonly subject?: string;
|
|
199
|
+
readonly language?: string;
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
/** Conversion context passed through the conversion pipeline. */
|
|
203
|
+
export interface ConversionContext {
|
|
204
|
+
readonly warnings: ConversionWarning[];
|
|
205
|
+
readonly assets: ConversionAsset[];
|
|
206
|
+
addWarning(severity: ConversionSeverity, code: string, message: string, path?: string): void;
|
|
207
|
+
registerAsset(mimeType: string, data: Uint8Array, altText?: string): string;
|
|
208
|
+
}
|
|
209
|
+
/** Create a new conversion context. */
|
|
210
|
+
export declare function createConversionContext(): ConversionContext;
|