ooxml-core 1.8.4 → 1.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/PptxHandler-5UURGJEV.mjs +2 -0
- package/dist/{PptxHandler-BL4B7CZO.mjs → PptxHandler-ADEFY476.mjs} +2 -2
- package/dist/PptxHandler-U5XB2HUE.cjs +11 -0
- package/dist/automation/index.cjs +7239 -4037
- package/dist/automation/index.mjs +7239 -4037
- package/dist/chunk-3N6XMMTT.cjs +87913 -0
- package/dist/{chunk-TTPZITQN.mjs → chunk-5NVJN4E6.mjs} +30 -2
- package/dist/{chunk-ZAP5WLEN.mjs → chunk-A6P7G3UK.mjs} +1 -1
- package/dist/{chunk-CPKNMQLX.cjs → chunk-AWIDASUW.cjs} +25 -2
- package/dist/{chunk-SVQZXP3F.mjs → chunk-CBNKBVX5.mjs} +25 -2
- package/dist/{chunk-GAGSCAR3.mjs → chunk-CCHYFCPD.mjs} +1199 -348
- package/dist/chunk-R6KSBNKX.mjs +44133 -0
- package/dist/chunk-S6DOCMQC.cjs +44451 -0
- package/dist/{chunk-Z7IQR4S4.mjs → chunk-WUE5ZHU3.mjs} +269 -21
- package/dist/chunk-ZE53K7DH.mjs +87907 -0
- package/dist/{chunk-NIHPA63A.mjs → chunk-ZOUGMAZG.mjs} +54 -37
- package/dist/docx/block-parser.d.ts.map +1 -1
- package/dist/docx/cell-blocks.d.ts +4 -0
- package/dist/docx/cell-blocks.d.ts.map +1 -0
- package/dist/docx/document-paragraphs.d.ts.map +1 -1
- package/dist/docx/document-parts.d.ts +2 -0
- package/dist/docx/document-parts.d.ts.map +1 -1
- package/dist/docx/embedded.cjs +189 -20
- package/dist/docx/embedded.mjs +189 -20
- package/dist/docx/index.cjs +219 -24
- package/dist/docx/index.mjs +219 -24
- package/dist/docx/layout/adapt-table.d.ts +2 -2
- package/dist/docx/layout/adapt-table.d.ts.map +1 -1
- package/dist/docx/layout/adapter.d.ts.map +1 -1
- package/dist/docx/layout/flow-paragraph.d.ts +5 -0
- package/dist/docx/layout/flow-paragraph.d.ts.map +1 -1
- package/dist/docx/layout/flow-table.d.ts +2 -1
- package/dist/docx/layout/flow-table.d.ts.map +1 -1
- package/dist/docx/layout/footnote-columns.d.ts +22 -0
- package/dist/docx/layout/footnote-columns.d.ts.map +1 -0
- package/dist/docx/layout/footnote-flow.d.ts +27 -0
- package/dist/docx/layout/footnote-flow.d.ts.map +1 -0
- package/dist/docx/layout/footnote-split.d.ts +7 -0
- package/dist/docx/layout/footnote-split.d.ts.map +1 -0
- package/dist/docx/layout/index.cjs +1528 -119
- package/dist/docx/layout/index.mjs +1528 -120
- package/dist/docx/layout/input.d.ts +17 -1
- package/dist/docx/layout/input.d.ts.map +1 -1
- package/dist/docx/layout/legacy-footnote-flow.d.ts +18 -0
- package/dist/docx/layout/legacy-footnote-flow.d.ts.map +1 -0
- package/dist/docx/layout/line-metrics.d.ts.map +1 -1
- package/dist/docx/layout/nested-frame-profile.d.ts +9 -0
- package/dist/docx/layout/nested-frame-profile.d.ts.map +1 -0
- package/dist/docx/layout/page-cursor.d.ts +15 -8
- package/dist/docx/layout/page-cursor.d.ts.map +1 -1
- package/dist/docx/layout/page-flow.d.ts.map +1 -1
- package/dist/docx/layout/paragraph-layout.d.ts.map +1 -1
- package/dist/docx/layout/paragraph-tokens.d.ts +2 -0
- package/dist/docx/layout/paragraph-tokens.d.ts.map +1 -1
- package/dist/docx/layout/reference-footnotes.d.ts +7 -0
- package/dist/docx/layout/reference-footnotes.d.ts.map +1 -0
- package/dist/docx/layout/result.d.ts +44 -0
- package/dist/docx/layout/result.d.ts.map +1 -1
- package/dist/docx/layout/section-flow.d.ts +2 -0
- package/dist/docx/layout/section-flow.d.ts.map +1 -1
- package/dist/docx/layout/table-border-layout.d.ts +16 -0
- package/dist/docx/layout/table-border-layout.d.ts.map +1 -0
- package/dist/docx/layout/table-cell-layout.d.ts +12 -0
- package/dist/docx/layout/table-cell-layout.d.ts.map +1 -0
- package/dist/docx/layout/table-content.d.ts +4 -0
- package/dist/docx/layout/table-content.d.ts.map +1 -0
- package/dist/docx/layout/table-footnotes.d.ts +32 -0
- package/dist/docx/layout/table-footnotes.d.ts.map +1 -0
- package/dist/docx/layout/table-frames.d.ts +4 -0
- package/dist/docx/layout/table-frames.d.ts.map +1 -0
- package/dist/docx/layout/table-layout.d.ts +16 -5
- package/dist/docx/layout/table-layout.d.ts.map +1 -1
- package/dist/docx/layout/table-note-completion.d.ts +5 -0
- package/dist/docx/layout/table-note-completion.d.ts.map +1 -0
- package/dist/docx/layout/table-note-stories.d.ts +6 -0
- package/dist/docx/layout/table-note-stories.d.ts.map +1 -0
- package/dist/docx/load/index.cjs +194 -25
- package/dist/docx/load/index.mjs +194 -25
- package/dist/docx/model-run.d.ts +2 -0
- package/dist/docx/model-run.d.ts.map +1 -1
- package/dist/docx/model.d.ts +7 -0
- package/dist/docx/model.d.ts.map +1 -1
- package/dist/docx/notes.d.ts +5 -0
- package/dist/docx/notes.d.ts.map +1 -1
- package/dist/docx/parse-table.d.ts.map +1 -1
- package/dist/docx/parse.d.ts.map +1 -1
- package/dist/docx/save.d.ts.map +1 -1
- package/dist/docx/section-model.d.ts +2 -0
- package/dist/docx/section-model.d.ts.map +1 -1
- package/dist/docx/sections.d.ts.map +1 -1
- package/dist/docx/settings.d.ts +2 -0
- package/dist/docx/settings.d.ts.map +1 -1
- package/dist/docx/table-model.d.ts +3 -1
- package/dist/docx/table-model.d.ts.map +1 -1
- package/dist/docx/ui/index.cjs +55 -0
- package/dist/docx/ui/index.d.ts +1 -0
- package/dist/docx/ui/index.d.ts.map +1 -1
- package/dist/docx/ui/index.mjs +55 -1
- package/dist/docx/ui/table-structure-guard.d.ts +4 -0
- package/dist/docx/ui/table-structure-guard.d.ts.map +1 -0
- package/dist/docx/write-footnote-columns.d.ts +3 -0
- package/dist/docx/write-footnote-columns.d.ts.map +1 -0
- package/dist/docx/write-notes.d.ts.map +1 -1
- package/dist/docx/write-run.d.ts.map +1 -1
- package/dist/docx/write-sections.d.ts.map +1 -1
- package/dist/index.cjs +8 -5
- package/dist/index.mjs +8 -5
- package/dist/opc/clone-part-graph.d.ts +4 -0
- package/dist/opc/clone-part-graph.d.ts.map +1 -1
- package/dist/opc/index.cjs +8 -5
- package/dist/opc/index.mjs +8 -5
- package/dist/pptx/automation/index.cjs +1156 -389
- package/dist/pptx/automation/index.d.ts +4 -4
- package/dist/pptx/automation/index.mjs +5 -5
- package/dist/pptx/chunks/{index-CKIUurnd.d.ts → index-Cuxtr76Y.d.ts} +29 -10
- package/dist/pptx/chunks/index-Cuxtr76Y.d.ts.map +1 -0
- package/dist/pptx/chunks/{index-Cn-GzYGp.d.ts → index-DUCGeZh7.d.ts} +94 -5
- package/dist/pptx/chunks/index-DUCGeZh7.d.ts.map +1 -0
- package/dist/pptx/chunks/{smart-art-Q2kZQtHh.d.ts → smart-art-D-sXa_Nb.d.ts} +11 -1
- package/dist/pptx/chunks/smart-art-D-sXa_Nb.d.ts.map +1 -0
- package/dist/pptx/chunks/{text-operations-BHfAm5K9.d.ts → text-operations-BqHmLaLA.d.ts} +54 -13
- package/dist/pptx/chunks/text-operations-BqHmLaLA.d.ts.map +1 -0
- package/dist/pptx/cli/index.cjs +1157 -395
- package/dist/pptx/cli/index.d.ts +1 -1
- package/dist/pptx/cli/index.mjs +4 -4
- package/dist/pptx/converter/index.cjs +54 -36
- package/dist/pptx/converter/index.d.ts +1 -1
- package/dist/pptx/converter/index.mjs +2 -2
- package/dist/pptx/editor/render/collaboration-live-patch-target.cjs +2 -2
- package/dist/pptx/editor/render/collaboration-live-patch-target.mjs +1 -1
- package/dist/pptx/editor/render/find-replace.cjs +416 -45
- package/dist/pptx/editor/render/find-replace.d.ts +35 -4
- package/dist/pptx/editor/render/find-replace.d.ts.map +1 -1
- package/dist/pptx/editor/render/find-replace.mjs +416 -46
- package/dist/pptx/editor/render/remap-text.cjs +2 -2
- package/dist/pptx/editor/render/remap-text.d.ts.map +1 -1
- package/dist/pptx/editor/render/remap-text.mjs +1 -1
- package/dist/pptx/editor/render/slide-operations.cjs +87 -0
- package/dist/pptx/editor/render/slide-operations.d.ts +17 -1
- package/dist/pptx/editor/render/slide-operations.d.ts.map +1 -1
- package/dist/pptx/editor/render/slide-operations.mjs +83 -1
- package/dist/pptx/editor/render/slide-search.cjs +6 -10
- package/dist/pptx/editor/render/slide-search.d.ts +1 -1
- package/dist/pptx/editor/render/slide-search.mjs +6 -10
- package/dist/pptx/editor/render/template-editing.d.ts +1 -1
- package/dist/pptx/editor/render/template-editing.d.ts.map +1 -1
- package/dist/pptx/index.cjs +1651 -419
- package/dist/pptx/index.d.ts +5 -5
- package/dist/pptx/index.mjs +5 -5
- package/dist/pptx/smartart-layouts/index.d.ts +1 -1
- package/dist/teams/index.cjs +965 -34
- package/dist/teams/index.mjs +965 -34
- package/dist/visio/accessibility.d.ts +10 -0
- package/dist/visio/accessibility.d.ts.map +1 -0
- package/dist/visio/cell-formula.d.ts +2 -0
- package/dist/visio/cell-formula.d.ts.map +1 -1
- package/dist/visio/connector-curve-aligned.d.ts +5 -0
- package/dist/visio/connector-curve-aligned.d.ts.map +1 -0
- package/dist/visio/connector-curve-spans.d.ts +14 -0
- package/dist/visio/connector-curve-spans.d.ts.map +1 -0
- package/dist/visio/connector-jumps.d.ts +5 -0
- package/dist/visio/connector-jumps.d.ts.map +1 -0
- package/dist/visio/connector-route-walk.d.ts +2 -1
- package/dist/visio/connector-route-walk.d.ts.map +1 -1
- package/dist/visio/date-cache.d.ts +3 -0
- package/dist/visio/date-cache.d.ts.map +1 -0
- package/dist/visio/edit-alt-text-scope.d.ts +5 -0
- package/dist/visio/edit-alt-text-scope.d.ts.map +1 -0
- package/dist/visio/edit-alt-text.d.ts +3 -0
- package/dist/visio/edit-alt-text.d.ts.map +1 -0
- package/dist/visio/edit-commands.d.ts +7 -2
- package/dist/visio/edit-commands.d.ts.map +1 -1
- package/dist/visio/edit-formatting-commands.d.ts +5 -0
- package/dist/visio/edit-formatting-commands.d.ts.map +1 -1
- package/dist/visio/edit-formatting-paint.d.ts.map +1 -1
- package/dist/visio/edit-formatting-scope.d.ts.map +1 -1
- package/dist/visio/edit-line-jump-cache.d.ts +4 -0
- package/dist/visio/edit-line-jump-cache.d.ts.map +1 -0
- package/dist/visio/edit-master-index.d.ts.map +1 -1
- package/dist/visio/edit-metadata-commands.d.ts +10 -2
- package/dist/visio/edit-metadata-commands.d.ts.map +1 -1
- package/dist/visio/edit-metadata.d.ts +3 -1
- package/dist/visio/edit-metadata.d.ts.map +1 -1
- package/dist/visio/edit-page-alt-text.d.ts +4 -0
- package/dist/visio/edit-page-alt-text.d.ts.map +1 -0
- package/dist/visio/edit-page-layout.d.ts.map +1 -1
- package/dist/visio/edit-page-rename.d.ts.map +1 -1
- package/dist/visio/edit-page-setup-commands.d.ts +7 -1
- package/dist/visio/edit-page-setup-commands.d.ts.map +1 -1
- package/dist/visio/edit-page-size.d.ts.map +1 -1
- package/dist/visio/edit-pages.d.ts.map +1 -1
- package/dist/visio/edit-recalculate-index.d.ts.map +1 -1
- package/dist/visio/edit-scope.d.ts.map +1 -1
- package/dist/visio/edit-shape-create.d.ts.map +1 -1
- package/dist/visio/edit-stencil-connector-write.d.ts.map +1 -1
- package/dist/visio/edit-style-admission.d.ts.map +1 -1
- package/dist/visio/edit-text-field.d.ts.map +1 -1
- package/dist/visio/edit-text.d.ts.map +1 -1
- package/dist/visio/edit.d.ts +1 -1
- package/dist/visio/edit.d.ts.map +1 -1
- package/dist/visio/index.cjs +1215 -248
- package/dist/visio/index.d.ts +2 -1
- package/dist/visio/index.d.ts.map +1 -1
- package/dist/visio/index.mjs +1215 -249
- package/dist/visio/line-jumps.d.ts +1 -5
- package/dist/visio/line-jumps.d.ts.map +1 -1
- package/dist/visio/model.d.ts +13 -0
- package/dist/visio/model.d.ts.map +1 -1
- package/dist/visio/page-layout.d.ts +11 -2
- package/dist/visio/page-layout.d.ts.map +1 -1
- package/dist/visio/parser.d.ts.map +1 -1
- package/dist/visio/shape-metadata.d.ts +6 -0
- package/dist/visio/shape-metadata.d.ts.map +1 -1
- package/dist/visio/shapes.d.ts.map +1 -1
- package/dist/visio/text-field-case.d.ts +2 -0
- package/dist/visio/text-field-case.d.ts.map +1 -0
- package/dist/visio/text-field-display.d.ts.map +1 -1
- package/dist/visio/text-field-fraction.d.ts +3 -0
- package/dist/visio/text-field-fraction.d.ts.map +1 -0
- package/dist/visio/text-field-numeric.d.ts +4 -0
- package/dist/visio/text-field-numeric.d.ts.map +1 -0
- package/dist/visio/text-field-system-date.d.ts +4 -0
- package/dist/visio/text-field-system-date.d.ts.map +1 -0
- package/dist/visio/text-fields.d.ts +1 -0
- package/dist/visio/text-fields.d.ts.map +1 -1
- package/dist/visio/ui/connector-preview.d.ts +1 -1
- package/dist/visio/ui/connector-preview.d.ts.map +1 -1
- package/dist/visio/ui/data-graphic-rules.d.ts +2 -0
- package/dist/visio/ui/data-graphic-rules.d.ts.map +1 -1
- package/dist/visio/ui/data-graphics.d.ts +3 -2
- package/dist/visio/ui/data-graphics.d.ts.map +1 -1
- package/dist/visio/ui/edit-commands.d.ts.map +1 -1
- package/dist/visio/ui/index.cjs +19310 -18157
- package/dist/visio/ui/index.mjs +19310 -18158
- package/dist/visio/ui/scene-details.d.ts.map +1 -1
- package/dist/visio/ui/scene-validation.d.ts.map +1 -1
- package/dist/visio/ui/snapshot-scene.d.ts +2 -1
- package/dist/visio/ui/snapshot-scene.d.ts.map +1 -1
- package/dist/visio/ui/text-field-catalog.d.ts.map +1 -1
- package/dist/visio/xml-attribute-whitespace.d.ts +5 -0
- package/dist/visio/xml-attribute-whitespace.d.ts.map +1 -0
- package/dist/xlsx/edit/index.d.ts +1 -0
- package/dist/xlsx/edit/index.d.ts.map +1 -1
- package/dist/xlsx/edit/insert-guard.d.ts.map +1 -1
- package/dist/xlsx/edit/merge.d.ts.map +1 -1
- package/dist/xlsx/edit/page-breaks.d.ts +5 -0
- package/dist/xlsx/edit/page-breaks.d.ts.map +1 -0
- package/dist/xlsx/edit/pivots.d.ts +8 -0
- package/dist/xlsx/edit/pivots.d.ts.map +1 -0
- package/dist/xlsx/edit/print-titles.d.ts +7 -0
- package/dist/xlsx/edit/print-titles.d.ts.map +1 -0
- package/dist/xlsx/edit/session.d.ts.map +1 -1
- package/dist/xlsx/edit/sheets.d.ts.map +1 -1
- package/dist/xlsx/edit/shift-formulas.d.ts.map +1 -1
- package/dist/xlsx/edit/shift-sheet.d.ts.map +1 -1
- package/dist/xlsx/edit/sparkline-ranges.d.ts +11 -0
- package/dist/xlsx/edit/sparkline-ranges.d.ts.map +1 -0
- package/dist/xlsx/edit/sparkline-xml.d.ts +13 -0
- package/dist/xlsx/edit/sparkline-xml.d.ts.map +1 -0
- package/dist/xlsx/edit/sparklines.d.ts +16 -0
- package/dist/xlsx/edit/sparklines.d.ts.map +1 -0
- package/dist/xlsx/edit/table-edits.d.ts.map +1 -1
- package/dist/xlsx/edit/tables.d.ts.map +1 -1
- package/dist/xlsx/edit/types.d.ts +22 -1
- package/dist/xlsx/edit/types.d.ts.map +1 -1
- package/dist/xlsx/formula/functions/text-regex.d.ts.map +1 -1
- package/dist/xlsx/index.cjs +3638 -1199
- package/dist/xlsx/index.d.ts +1 -0
- package/dist/xlsx/index.d.ts.map +1 -1
- package/dist/xlsx/index.mjs +3619 -1200
- package/dist/xlsx/layout/cell-view.d.ts +2 -0
- package/dist/xlsx/layout/cell-view.d.ts.map +1 -1
- package/dist/xlsx/layout/header-footer.d.ts +58 -0
- package/dist/xlsx/layout/header-footer.d.ts.map +1 -0
- package/dist/xlsx/layout/index.d.ts +5 -0
- package/dist/xlsx/layout/index.d.ts.map +1 -1
- package/dist/xlsx/layout/print-breaks.d.ts +11 -0
- package/dist/xlsx/layout/print-breaks.d.ts.map +1 -0
- package/dist/xlsx/layout/print-layout.d.ts +34 -0
- package/dist/xlsx/layout/print-layout.d.ts.map +1 -0
- package/dist/xlsx/layout/print-merges.d.ts +18 -0
- package/dist/xlsx/layout/print-merges.d.ts.map +1 -0
- package/dist/xlsx/layout/print-repeat.d.ts +12 -0
- package/dist/xlsx/layout/print-repeat.d.ts.map +1 -0
- package/dist/xlsx/layout/print-titles.d.ts +20 -0
- package/dist/xlsx/layout/print-titles.d.ts.map +1 -0
- package/dist/xlsx/layout/sparkline-data.d.ts.map +1 -1
- package/dist/xlsx/layout/sparkline-view.d.ts.map +1 -1
- package/dist/xlsx/load/index.cjs +8165 -6945
- package/dist/xlsx/load/index.mjs +8165 -6945
- package/dist/xlsx/model-pivots.d.ts +67 -0
- package/dist/xlsx/model-pivots.d.ts.map +1 -0
- package/dist/xlsx/model.d.ts +5 -0
- package/dist/xlsx/model.d.ts.map +1 -1
- package/dist/xlsx/pivot/admission.d.ts +5 -0
- package/dist/xlsx/pivot/admission.d.ts.map +1 -0
- package/dist/xlsx/pivot/aggregate.d.ts +21 -0
- package/dist/xlsx/pivot/aggregate.d.ts.map +1 -0
- package/dist/xlsx/pivot/cache-xml.d.ts +9 -0
- package/dist/xlsx/pivot/cache-xml.d.ts.map +1 -0
- package/dist/xlsx/pivot/data.d.ts +12 -0
- package/dist/xlsx/pivot/data.d.ts.map +1 -0
- package/dist/xlsx/pivot/hierarchy-first.d.ts +21 -0
- package/dist/xlsx/pivot/hierarchy-first.d.ts.map +1 -0
- package/dist/xlsx/pivot/hierarchy.d.ts +5 -0
- package/dist/xlsx/pivot/hierarchy.d.ts.map +1 -0
- package/dist/xlsx/pivot/index.d.ts +3 -0
- package/dist/xlsx/pivot/index.d.ts.map +1 -0
- package/dist/xlsx/pivot/measures.d.ts +13 -0
- package/dist/xlsx/pivot/measures.d.ts.map +1 -0
- package/dist/xlsx/pivot/read.d.ts +5 -0
- package/dist/xlsx/pivot/read.d.ts.map +1 -0
- package/dist/xlsx/pivot/table-xml.d.ts +5 -0
- package/dist/xlsx/pivot/table-xml.d.ts.map +1 -0
- package/dist/xlsx/pivot/values-axis.d.ts +9 -0
- package/dist/xlsx/pivot/values-axis.d.ts.map +1 -0
- package/dist/xlsx/pivot/write.d.ts +11 -0
- package/dist/xlsx/pivot/write.d.ts.map +1 -0
- package/dist/xlsx/read/load.d.ts.map +1 -1
- package/dist/xlsx/read/sheet-props.d.ts.map +1 -1
- package/dist/xlsx/ui/commands/i18n/index.d.ts.map +1 -1
- package/dist/xlsx/ui/commands/i18n/navigation.d.ts.map +1 -1
- package/dist/xlsx/ui/commands/i18n/pivots.d.ts +3 -0
- package/dist/xlsx/ui/commands/i18n/pivots.d.ts.map +1 -0
- package/dist/xlsx/ui/commands/i18n/print-layout.d.ts +3 -0
- package/dist/xlsx/ui/commands/i18n/print-layout.d.ts.map +1 -0
- package/dist/xlsx/ui/commands/i18n/sparklines.d.ts +3 -0
- package/dist/xlsx/ui/commands/i18n/sparklines.d.ts.map +1 -0
- package/dist/xlsx/ui/commands/i18n/tools.d.ts.map +1 -1
- package/dist/xlsx/ui/commands/page-breaks.d.ts +3 -0
- package/dist/xlsx/ui/commands/page-breaks.d.ts.map +1 -0
- package/dist/xlsx/ui/index.cjs +2421 -288
- package/dist/xlsx/ui/index.d.ts +1 -0
- package/dist/xlsx/ui/index.d.ts.map +1 -1
- package/dist/xlsx/ui/index.mjs +2421 -289
- package/dist/xlsx/write/page-setup.d.ts.map +1 -1
- package/dist/xlsx/write/save.d.ts.map +1 -1
- package/dist/xlsx/write/sheet-parts.d.ts +1 -0
- package/dist/xlsx/write/sheet-parts.d.ts.map +1 -1
- package/dist/xlsx/write/workbook-part.d.ts +1 -1
- package/dist/xlsx/write/workbook-part.d.ts.map +1 -1
- package/dist/xlsx/write/worksheet.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/pptx/chunks/index-CKIUurnd.d.ts.map +0 -1
- package/dist/pptx/chunks/index-Cn-GzYGp.d.ts.map +0 -1
- package/dist/pptx/chunks/smart-art-Q2kZQtHh.d.ts.map +0 -1
- package/dist/pptx/chunks/text-operations-BHfAm5K9.d.ts.map +0 -1
package/dist/docx/index.mjs
CHANGED
|
@@ -56,8 +56,8 @@ function named(element, local, ns, lenient = true) {
|
|
|
56
56
|
}
|
|
57
57
|
var children = (parent, local, ns, lenient = true) => elements(parent).filter((element) => named(element, local, ns, lenient));
|
|
58
58
|
var first = (parent, local, ns, lenient = true) => parent ? children(parent, local, ns, lenient)[0] : void 0;
|
|
59
|
-
function attr(element, local, ns,
|
|
60
|
-
return element?.getAttributeNS(ns, local) ?? element?.getAttribute(`${
|
|
59
|
+
function attr(element, local, ns, prefix2) {
|
|
60
|
+
return element?.getAttributeNS(ns, local) ?? element?.getAttribute(`${prefix2}:${local}`) ?? void 0;
|
|
61
61
|
}
|
|
62
62
|
var relAttr = (element, local) => attr(element, local, NS.r, "r");
|
|
63
63
|
|
|
@@ -684,24 +684,24 @@ var parseLigatures = (props) => {
|
|
|
684
684
|
};
|
|
685
685
|
function extensionPrefix(doc, ns, preferred) {
|
|
686
686
|
const root = doc.documentElement;
|
|
687
|
-
let
|
|
688
|
-
for (let index = 1; root.lookupNamespaceURI(
|
|
689
|
-
|
|
690
|
-
root.setAttributeNS(XMLNS, `xmlns:${
|
|
691
|
-
return
|
|
687
|
+
let prefix2 = preferred;
|
|
688
|
+
for (let index = 1; root.lookupNamespaceURI(prefix2) && root.lookupNamespaceURI(prefix2) !== ns; index++)
|
|
689
|
+
prefix2 = `${preferred}${index}`;
|
|
690
|
+
root.setAttributeNS(XMLNS, `xmlns:${prefix2}`, ns);
|
|
691
|
+
return prefix2;
|
|
692
692
|
}
|
|
693
693
|
function writeLigatures(doc, props, value) {
|
|
694
694
|
for (const element2 of ligatureElements(props)) props.removeChild(element2);
|
|
695
695
|
if (value === void 0) return;
|
|
696
|
-
const
|
|
696
|
+
const prefix2 = extensionPrefix(doc, WORD_2010_NS, "w14");
|
|
697
697
|
const mc = extensionPrefix(doc, MC, "mc");
|
|
698
698
|
const ignored = new Set(
|
|
699
699
|
(doc.documentElement.getAttributeNS(MC, "Ignorable") ?? "").split(/\s+/).filter(Boolean)
|
|
700
700
|
);
|
|
701
|
-
ignored.add(
|
|
701
|
+
ignored.add(prefix2);
|
|
702
702
|
doc.documentElement.setAttributeNS(MC, `${mc}:Ignorable`, [...ignored].join(" "));
|
|
703
|
-
const element = doc.createElementNS(WORD_2010_NS, `${
|
|
704
|
-
element.setAttributeNS(WORD_2010_NS, `${
|
|
703
|
+
const element = doc.createElementNS(WORD_2010_NS, `${prefix2}:ligatures`);
|
|
704
|
+
element.setAttributeNS(WORD_2010_NS, `${prefix2}:val`, value);
|
|
705
705
|
props.appendChild(element);
|
|
706
706
|
}
|
|
707
707
|
|
|
@@ -2545,7 +2545,7 @@ async function applyCoreProperties(zip, next, prior) {
|
|
|
2545
2545
|
const root = doc.documentElement;
|
|
2546
2546
|
for (const field of PROPERTY_FIELDS) {
|
|
2547
2547
|
if ((next?.[field] ?? "") === (prior?.[field] ?? "")) continue;
|
|
2548
|
-
const [
|
|
2548
|
+
const [prefix2, ns] = PREFIX[field];
|
|
2549
2549
|
let element = child(root, field);
|
|
2550
2550
|
const value = next?.[field] ?? "";
|
|
2551
2551
|
if (!value) {
|
|
@@ -2553,7 +2553,7 @@ async function applyCoreProperties(zip, next, prior) {
|
|
|
2553
2553
|
continue;
|
|
2554
2554
|
}
|
|
2555
2555
|
if (!element) {
|
|
2556
|
-
element = doc.createElementNS(ns, `${
|
|
2556
|
+
element = doc.createElementNS(ns, `${prefix2}:${field}`);
|
|
2557
2557
|
root.appendChild(element);
|
|
2558
2558
|
}
|
|
2559
2559
|
element.textContent = value;
|
|
@@ -3461,6 +3461,36 @@ function writeTable(doc, table, node, base, writeParagraph, replaceSlots2) {
|
|
|
3461
3461
|
return node;
|
|
3462
3462
|
}
|
|
3463
3463
|
|
|
3464
|
+
// docx/write-footnote-columns.ts
|
|
3465
|
+
var W15 = "http://schemas.microsoft.com/office/word/2012/wordml";
|
|
3466
|
+
var XMLNS2 = "http://www.w3.org/2000/xmlns/";
|
|
3467
|
+
var MC2 = "http://schemas.openxmlformats.org/markup-compatibility/2006";
|
|
3468
|
+
function prefix(doc, preferred, namespace) {
|
|
3469
|
+
let name = preferred;
|
|
3470
|
+
for (let suffix = 1; doc.documentElement.lookupNamespaceURI(name) && doc.documentElement.lookupNamespaceURI(name) !== namespace; suffix++)
|
|
3471
|
+
name = preferred + suffix;
|
|
3472
|
+
doc.documentElement.setAttributeNS(XMLNS2, "xmlns:" + name, namespace);
|
|
3473
|
+
return name;
|
|
3474
|
+
}
|
|
3475
|
+
function writeFootnoteColumns(doc, section, value) {
|
|
3476
|
+
if (value !== void 0 && (!Number.isInteger(value) || value < 0 || value > 2147483647))
|
|
3477
|
+
throw new Error("Footnote column count must be an integer from 0 to 2147483647.");
|
|
3478
|
+
const old = elements(section).filter(
|
|
3479
|
+
(element2) => element2.namespaceURI === W15 && element2.localName === "footnoteColumns"
|
|
3480
|
+
);
|
|
3481
|
+
for (const element2 of old) section.removeChild(element2);
|
|
3482
|
+
if (value === void 0) return;
|
|
3483
|
+
const w15 = prefix(doc, "w15", W15), mc = prefix(doc, "mc", MC2);
|
|
3484
|
+
const ignored = new Set(
|
|
3485
|
+
(doc.documentElement.getAttributeNS(MC2, "Ignorable") ?? "").split(/\s+/).filter(Boolean)
|
|
3486
|
+
);
|
|
3487
|
+
ignored.add(w15);
|
|
3488
|
+
doc.documentElement.setAttributeNS(MC2, mc + ":Ignorable", [...ignored].join(" "));
|
|
3489
|
+
const element = doc.createElementNS(W15, w15 + ":footnoteColumns");
|
|
3490
|
+
element.setAttributeNS(WORD_NS, "w:val", String(value));
|
|
3491
|
+
section.appendChild(element);
|
|
3492
|
+
}
|
|
3493
|
+
|
|
3464
3494
|
// docx/page-borders.ts
|
|
3465
3495
|
var SIDES3 = ["top", "left", "bottom", "right"];
|
|
3466
3496
|
var ATTRIBUTES = ["offsetFrom", "display", "zOrder"];
|
|
@@ -3604,6 +3634,7 @@ var WRITABLE = /* @__PURE__ */ new Set([
|
|
|
3604
3634
|
"footerDistanceTwips",
|
|
3605
3635
|
"gutterTwips",
|
|
3606
3636
|
"columns",
|
|
3637
|
+
"footnoteColumns",
|
|
3607
3638
|
"titlePage",
|
|
3608
3639
|
"verticalAlign",
|
|
3609
3640
|
"pageNumbering",
|
|
@@ -3667,6 +3698,8 @@ var AFTER_TITLEPG = [
|
|
|
3667
3698
|
var AFTER_PGBORDERS = ["lnNumType", ...AFTER_LNNUM];
|
|
3668
3699
|
var AFTER_TYPE = ["pgSz", ...AFTER_PGSZ];
|
|
3669
3700
|
function writeSectionProperties(doc, sectPr, section, base) {
|
|
3701
|
+
if (section.footnoteColumns !== base?.footnoteColumns)
|
|
3702
|
+
writeFootnoteColumns(doc, sectPr, section.footnoteColumns);
|
|
3670
3703
|
if (section.type === "nextPage")
|
|
3671
3704
|
for (const type of children2(sectPr, "type")) sectPr.removeChild(type);
|
|
3672
3705
|
else setW5(child2(doc, sectPr, "type", AFTER_TYPE), "val", section.type);
|
|
@@ -5904,7 +5937,7 @@ function readBuiltInChartStyle(root) {
|
|
|
5904
5937
|
for (const content of children(root, "AlternateContent", NS.mc)) {
|
|
5905
5938
|
for (const choice of children(content, "Choice", NS.mc)) {
|
|
5906
5939
|
const requires = choice.getAttribute("Requires")?.trim().split(/\s+/);
|
|
5907
|
-
if (!requires?.length || !requires.every((
|
|
5940
|
+
if (!requires?.length || !requires.every((prefix2) => choice.lookupNamespaceURI(prefix2) === C14))
|
|
5908
5941
|
continue;
|
|
5909
5942
|
const modern = first(choice, "style", C14)?.getAttribute("val");
|
|
5910
5943
|
if (modern && /^\d+$/.test(modern) && Number(modern) >= 101 && Number(modern) <= 148)
|
|
@@ -6224,12 +6257,12 @@ var CHART_ROOT_BINDINGS = /* @__PURE__ */ new Map([
|
|
|
6224
6257
|
var DECLARATION = / xmlns:([A-Za-z_][\w.-]*)="([^"]*)"/g;
|
|
6225
6258
|
function stripDeclarations(xml, bindings) {
|
|
6226
6259
|
const conflicting = /* @__PURE__ */ new Set();
|
|
6227
|
-
for (const [,
|
|
6228
|
-
if (
|
|
6229
|
-
conflicting.add(
|
|
6260
|
+
for (const [, prefix2, uri] of xml.matchAll(DECLARATION))
|
|
6261
|
+
if (prefix2 !== void 0 && bindings.has(prefix2) && bindings.get(prefix2) !== uri)
|
|
6262
|
+
conflicting.add(prefix2);
|
|
6230
6263
|
return xml.replace(
|
|
6231
6264
|
DECLARATION,
|
|
6232
|
-
(match,
|
|
6265
|
+
(match, prefix2, uri) => bindings.get(prefix2) === uri && !conflicting.has(prefix2) ? "" : match
|
|
6233
6266
|
);
|
|
6234
6267
|
}
|
|
6235
6268
|
var innerXml = (element) => stripDeclarations(elements(element).map(buildXml).join(""), CHART_ROOT_BINDINGS);
|
|
@@ -7582,11 +7615,11 @@ function cssFontFamily(name) {
|
|
|
7582
7615
|
// chart/render/chart-svg-appearance.ts
|
|
7583
7616
|
var nextPaintId = 0;
|
|
7584
7617
|
function chartGradientPaint(model, width = 1024, height = 768) {
|
|
7585
|
-
const
|
|
7618
|
+
const prefix2 = `xlsx-chart-${++nextPaintId}`;
|
|
7586
7619
|
const appearance = { ...model.appearance };
|
|
7587
7620
|
const defs = [];
|
|
7588
7621
|
const shadowPaint = (shadow, suffix) => {
|
|
7589
|
-
const id = `${
|
|
7622
|
+
const id = `${prefix2}-${suffix}`;
|
|
7590
7623
|
const pad = Math.max(4, shadow.blur * 3 + Math.abs(shadow.dx) + Math.abs(shadow.dy));
|
|
7591
7624
|
defs.push(
|
|
7592
7625
|
`<filter id="${id}" filterUnits="userSpaceOnUse" x="${n(-pad)}" y="${n(-pad)}" width="${n(width + pad * 2)}" height="${n(height + pad * 2)}" color-interpolation-filters="sRGB">${svgDropShadowElement(shadow, { number: n, color: (value) => esc(value) })}</filter>`
|
|
@@ -7601,7 +7634,7 @@ function chartGradientPaint(model, width = 1024, height = 768) {
|
|
|
7601
7634
|
};
|
|
7602
7635
|
}
|
|
7603
7636
|
const paint = (gradient, suffix, bounds) => {
|
|
7604
|
-
const def = buildChartGradientDef(`${
|
|
7637
|
+
const def = buildChartGradientDef(`${prefix2}-${suffix}`, gradient, bounds);
|
|
7605
7638
|
defs.push(chartGradientMarkup(def));
|
|
7606
7639
|
return `url(#${def.id})`;
|
|
7607
7640
|
};
|
|
@@ -9307,6 +9340,10 @@ function createRun(doc, run, base, old, allocator) {
|
|
|
9307
9340
|
node.appendChild(code);
|
|
9308
9341
|
return node;
|
|
9309
9342
|
}
|
|
9343
|
+
if (run.noteSeparator) {
|
|
9344
|
+
node.appendChild(makeW(doc, run.noteSeparator));
|
|
9345
|
+
return node;
|
|
9346
|
+
}
|
|
9310
9347
|
if (run.noteMark) {
|
|
9311
9348
|
node.appendChild(makeW(doc, run.noteMark === "footnote" ? "footnoteRef" : "endnoteRef"));
|
|
9312
9349
|
return node;
|
|
@@ -11228,7 +11265,12 @@ async function applyNoteEdits(zip, model, base, pendingMedia, docPrIds) {
|
|
|
11228
11265
|
const original = baseNotes.get(note.id);
|
|
11229
11266
|
return !original || JSON.stringify(original.blocks) !== JSON.stringify(note.blocks);
|
|
11230
11267
|
});
|
|
11231
|
-
|
|
11268
|
+
const separators = kind === "footnote" ? model.footnoteSeparators : void 0;
|
|
11269
|
+
const baseSeparators = kind === "footnote" ? base.footnoteSeparators : void 0;
|
|
11270
|
+
const editedSeparators = ["separator", "continuationSeparator"].filter(
|
|
11271
|
+
(type) => separators?.[type] && JSON.stringify(separators[type].blocks) !== JSON.stringify(baseSeparators?.[type]?.blocks)
|
|
11272
|
+
);
|
|
11273
|
+
if (!edited.length && !removed.length && !editedSeparators.length) continue;
|
|
11232
11274
|
const file = zip.file(part);
|
|
11233
11275
|
const doc = parseXml2(file ? await file.async("string") : await createNotesPart(zip, kind));
|
|
11234
11276
|
const elements2 = new Map(
|
|
@@ -11240,6 +11282,24 @@ async function applyNoteEdits(zip, model, base, pendingMedia, docPrIds) {
|
|
|
11240
11282
|
doc.documentElement.removeChild(element);
|
|
11241
11283
|
}
|
|
11242
11284
|
const allocator = await allocatorForPart(zip, part, doc, docPrIds);
|
|
11285
|
+
for (const type of editedSeparators) {
|
|
11286
|
+
const separator = separators[type];
|
|
11287
|
+
let element = children2(doc.documentElement, kind).find((node) => getW(node, "type") === type);
|
|
11288
|
+
if (!element) {
|
|
11289
|
+
element = doc.createElementNS(WORD_NS3, `w:${kind}`);
|
|
11290
|
+
element.setAttributeNS(WORD_NS3, "w:id", separator.id);
|
|
11291
|
+
element.setAttributeNS(WORD_NS3, "w:type", type);
|
|
11292
|
+
doc.documentElement.appendChild(element);
|
|
11293
|
+
}
|
|
11294
|
+
applyBlocks(
|
|
11295
|
+
doc,
|
|
11296
|
+
element,
|
|
11297
|
+
separator.blocks,
|
|
11298
|
+
baseSeparators?.[type]?.blocks ?? [],
|
|
11299
|
+
allocator,
|
|
11300
|
+
contentWidthTwips
|
|
11301
|
+
);
|
|
11302
|
+
}
|
|
11243
11303
|
for (const note of edited) {
|
|
11244
11304
|
let element = elements2.get(note.id);
|
|
11245
11305
|
const original = baseNotes.get(note.id);
|
|
@@ -11407,6 +11467,43 @@ async function applyTrackChangesSetting(zip, enabled2) {
|
|
|
11407
11467
|
}
|
|
11408
11468
|
await applySettingsFlag(zip, "trackRevisions", enabled2);
|
|
11409
11469
|
}
|
|
11470
|
+
async function applyCompatibilityMode(zip, mode) {
|
|
11471
|
+
if (mode !== void 0 && (!Number.isInteger(mode) || mode <= 0 || mode > 2147483647))
|
|
11472
|
+
throw new RangeError("Compatibility mode must be a positive integer.");
|
|
11473
|
+
const file = zip.file(SETTINGS_PATH);
|
|
11474
|
+
if (!file && mode === void 0) return;
|
|
11475
|
+
const doc = parseXml2(
|
|
11476
|
+
await file?.async("string") ?? `<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:settings xmlns:w="${WORD_NS}"/>`
|
|
11477
|
+
);
|
|
11478
|
+
const root = doc.documentElement;
|
|
11479
|
+
let compat = children2(root, "compat")[0];
|
|
11480
|
+
if (!compat && mode !== void 0) {
|
|
11481
|
+
compat = makeW(doc, "compat");
|
|
11482
|
+
const rank = SETTINGS_ORDER.indexOf("compat");
|
|
11483
|
+
const after = Array.from(root.childNodes).find(
|
|
11484
|
+
(node) => node.nodeType === 1 && SETTINGS_ORDER.indexOf(node.localName ?? "") > rank
|
|
11485
|
+
);
|
|
11486
|
+
root.insertBefore(compat, after ?? null);
|
|
11487
|
+
}
|
|
11488
|
+
const uri = "http://schemas.microsoft.com/office/word";
|
|
11489
|
+
if (compat) {
|
|
11490
|
+
for (const setting of children2(compat, "compatSetting"))
|
|
11491
|
+
if (setting.getAttributeNS(WORD_NS, "name") === "compatibilityMode" && setting.getAttributeNS(WORD_NS, "uri") === uri)
|
|
11492
|
+
compat.removeChild(setting);
|
|
11493
|
+
if (mode !== void 0) {
|
|
11494
|
+
const setting = makeW(doc, "compatSetting");
|
|
11495
|
+
setting.setAttributeNS(WORD_NS, "w:name", "compatibilityMode");
|
|
11496
|
+
setting.setAttributeNS(WORD_NS, "w:uri", uri);
|
|
11497
|
+
setting.setAttributeNS(WORD_NS, "w:val", String(mode));
|
|
11498
|
+
compat.appendChild(setting);
|
|
11499
|
+
}
|
|
11500
|
+
}
|
|
11501
|
+
zip.file(SETTINGS_PATH, buildXml(doc));
|
|
11502
|
+
if (!file) {
|
|
11503
|
+
await ensureContentTypeOverride(zip, SETTINGS_PATH, SETTINGS_CONTENT_TYPE);
|
|
11504
|
+
await ensureDocumentRelationship(zip, SETTINGS_RELATIONSHIP_TYPE, "settings.xml");
|
|
11505
|
+
}
|
|
11506
|
+
}
|
|
11410
11507
|
|
|
11411
11508
|
// docx/page-background.ts
|
|
11412
11509
|
var HEX = /^[0-9a-fA-F]{6}$/;
|
|
@@ -11438,6 +11535,7 @@ function documentBlockLists(model) {
|
|
|
11438
11535
|
(slots) => Object.values(slots ?? {}).flatMap((content) => content ? [content.blocks] : [])
|
|
11439
11536
|
)
|
|
11440
11537
|
),
|
|
11538
|
+
...Object.values(model.footnoteSeparators ?? {}).map((note) => note.blocks),
|
|
11441
11539
|
...[...model.footnotes ?? [], ...model.endnotes ?? []].map((note) => note.blocks)
|
|
11442
11540
|
];
|
|
11443
11541
|
}
|
|
@@ -11470,6 +11568,14 @@ function mapDocumentParagraphs(model, map) {
|
|
|
11470
11568
|
...section.footers ? { footers: slots(section.footers) } : {}
|
|
11471
11569
|
}))
|
|
11472
11570
|
} : {},
|
|
11571
|
+
...model.footnoteSeparators ? {
|
|
11572
|
+
footnoteSeparators: Object.fromEntries(
|
|
11573
|
+
Object.entries(model.footnoteSeparators).map(([kind, note]) => [
|
|
11574
|
+
kind,
|
|
11575
|
+
{ ...note, blocks: mapBlockParagraphs(note.blocks, map) }
|
|
11576
|
+
])
|
|
11577
|
+
)
|
|
11578
|
+
} : {},
|
|
11473
11579
|
...model.footnotes ? {
|
|
11474
11580
|
footnotes: model.footnotes.map((note) => ({
|
|
11475
11581
|
...note,
|
|
@@ -11650,6 +11756,8 @@ async function saveDocx(model, pendingMedia) {
|
|
|
11650
11756
|
await applyNumberingCatalog(zip, model, binding);
|
|
11651
11757
|
await applyCoreProperties(zip, model.properties, binding?.base.properties);
|
|
11652
11758
|
if (binding) await applyStyleNumbering(zip, model, binding.base);
|
|
11759
|
+
if (model.compatibilityMode !== binding?.base.compatibilityMode)
|
|
11760
|
+
await applyCompatibilityMode(zip, model.compatibilityMode);
|
|
11653
11761
|
if (Boolean(model.evenAndOddHeaders) !== Boolean(binding?.base.evenAndOddHeaders))
|
|
11654
11762
|
await applySettingsFlag(zip, "evenAndOddHeaders", Boolean(model.evenAndOddHeaders));
|
|
11655
11763
|
if (model.pageColor !== binding?.base.pageColor)
|
|
@@ -11720,6 +11828,20 @@ function parseCell(cell, parseParagraph3, id) {
|
|
|
11720
11828
|
if (margins) result.margins = margins;
|
|
11721
11829
|
const nested = children2(cell, "tbl").map(nestedPreview);
|
|
11722
11830
|
if (nested.length) result.nestedTables = nested;
|
|
11831
|
+
if (nested.length) {
|
|
11832
|
+
let paragraphIndex = 0, tableIndex = 0;
|
|
11833
|
+
result.sourceBlocks = Array.from(cell.childNodes).flatMap(
|
|
11834
|
+
(child3) => {
|
|
11835
|
+
if (child3.nodeType !== 1) return [];
|
|
11836
|
+
const element = child3;
|
|
11837
|
+
if (element.namespaceURI !== WORD_NS) return [];
|
|
11838
|
+
if (element.localName === "p") return [result.paragraphs[paragraphIndex++]];
|
|
11839
|
+
if (element.localName === "tbl")
|
|
11840
|
+
return [parseTable(element, `${id}-nested${tableIndex++}`, parseParagraph3)];
|
|
11841
|
+
return [];
|
|
11842
|
+
}
|
|
11843
|
+
);
|
|
11844
|
+
}
|
|
11723
11845
|
return result;
|
|
11724
11846
|
}
|
|
11725
11847
|
function parseLook(element) {
|
|
@@ -11937,6 +12059,7 @@ function parseRun2(node, revision) {
|
|
|
11937
12059
|
let breakKind;
|
|
11938
12060
|
let noteReference;
|
|
11939
12061
|
let noteMark;
|
|
12062
|
+
let noteSeparator;
|
|
11940
12063
|
let fieldChar;
|
|
11941
12064
|
const fieldCode = content.length > 0 && content.every((child3) => named2(child3, "instrText")) ? content.map((child3) => textContent(child3)).join("") : void 0;
|
|
11942
12065
|
const only = content.length === 1 ? content[0] : void 0;
|
|
@@ -11952,6 +12075,8 @@ function parseRun2(node, revision) {
|
|
|
11952
12075
|
if (id) noteReference = { kind: "endnote", id };
|
|
11953
12076
|
} else if (named2(only, "footnoteRef")) noteMark = "footnote";
|
|
11954
12077
|
else if (named2(only, "endnoteRef")) noteMark = "endnote";
|
|
12078
|
+
else if (named2(only, "separator")) noteSeparator = "separator";
|
|
12079
|
+
else if (named2(only, "continuationSeparator")) noteSeparator = "continuationSeparator";
|
|
11955
12080
|
else if (named2(only, "fldChar")) {
|
|
11956
12081
|
const type = getW(only, "fldCharType");
|
|
11957
12082
|
if (type === "begin" || type === "separate" || type === "end") fieldChar = type;
|
|
@@ -11969,6 +12094,7 @@ function parseRun2(node, revision) {
|
|
|
11969
12094
|
if (breakKind) run.break = breakKind;
|
|
11970
12095
|
if (noteReference) run.noteReference = noteReference;
|
|
11971
12096
|
if (noteMark) run.noteMark = noteMark;
|
|
12097
|
+
if (noteSeparator) run.noteSeparator = noteSeparator;
|
|
11972
12098
|
if (fieldChar) {
|
|
11973
12099
|
run.fieldChar = fieldChar;
|
|
11974
12100
|
const flags = parseFieldFlags(only);
|
|
@@ -12145,6 +12271,14 @@ function pageBordersOf(element) {
|
|
|
12145
12271
|
return borders ? { pageBorders: borders } : {};
|
|
12146
12272
|
}
|
|
12147
12273
|
function parseOneSection(section, endsAtBlockId) {
|
|
12274
|
+
const footnoteColumns = parseUnsignedInteger(
|
|
12275
|
+
getW(
|
|
12276
|
+
elements(section).find(
|
|
12277
|
+
(element) => element.localName === "footnoteColumns" && element.namespaceURI === "http://schemas.microsoft.com/office/word/2012/wordml"
|
|
12278
|
+
),
|
|
12279
|
+
"val"
|
|
12280
|
+
)
|
|
12281
|
+
);
|
|
12148
12282
|
const size = first2(section, "pgSz");
|
|
12149
12283
|
const margins = first2(section, "pgMar");
|
|
12150
12284
|
const typeValue = enumValue(isStSectionMark, getW(first2(section, "type"), "val"), "w:type");
|
|
@@ -12169,6 +12303,7 @@ function parseOneSection(section, endsAtBlockId) {
|
|
|
12169
12303
|
...footerDistance !== void 0 ? { footerDistanceTwips: footerDistance } : {},
|
|
12170
12304
|
...gutter !== void 0 ? { gutterTwips: gutter } : {},
|
|
12171
12305
|
columns: parseColumns(section),
|
|
12306
|
+
...footnoteColumns !== void 0 ? { footnoteColumns } : {},
|
|
12172
12307
|
...onOffElement(first2(section, "titlePg")) === true ? { titlePage: true } : {},
|
|
12173
12308
|
...vAlignValue ? { verticalAlign: vAlignValue } : {},
|
|
12174
12309
|
...pgNum ? {
|
|
@@ -12206,6 +12341,32 @@ function parseRawSections(body, blocks) {
|
|
|
12206
12341
|
return sections;
|
|
12207
12342
|
}
|
|
12208
12343
|
|
|
12344
|
+
// docx/cell-blocks.ts
|
|
12345
|
+
function cellSourceBlocks(cell) {
|
|
12346
|
+
if (!cell.sourceBlocks) return cell.paragraphs;
|
|
12347
|
+
const originalIds = new Set(
|
|
12348
|
+
cell.sourceBlocks.filter((block) => block.type === "paragraph").map((block) => block.id)
|
|
12349
|
+
);
|
|
12350
|
+
const positions = new Map(cell.paragraphs.map((paragraph, index) => [paragraph.id, index]));
|
|
12351
|
+
const blocks = [];
|
|
12352
|
+
let cursor = 0;
|
|
12353
|
+
for (const source of cell.sourceBlocks) {
|
|
12354
|
+
if (source.type === "table") {
|
|
12355
|
+
blocks.push(source);
|
|
12356
|
+
continue;
|
|
12357
|
+
}
|
|
12358
|
+
const position = positions.get(source.id);
|
|
12359
|
+
if (position !== void 0 && position >= cursor) {
|
|
12360
|
+
blocks.push(...cell.paragraphs.slice(cursor, position + 1));
|
|
12361
|
+
cursor = position + 1;
|
|
12362
|
+
}
|
|
12363
|
+
while (cursor < cell.paragraphs.length && !originalIds.has(cell.paragraphs[cursor].id))
|
|
12364
|
+
blocks.push(cell.paragraphs[cursor++]);
|
|
12365
|
+
}
|
|
12366
|
+
blocks.push(...cell.paragraphs.slice(cursor));
|
|
12367
|
+
return blocks;
|
|
12368
|
+
}
|
|
12369
|
+
|
|
12209
12370
|
// docx/notes.ts
|
|
12210
12371
|
var skippedTypes = /* @__PURE__ */ new Set(["separator", "continuationSeparator"]);
|
|
12211
12372
|
function parseNotesPart(xml, kind, parseBlocks) {
|
|
@@ -12222,6 +12383,29 @@ function parseNotesPart(xml, kind, parseBlocks) {
|
|
|
12222
12383
|
}
|
|
12223
12384
|
return notes;
|
|
12224
12385
|
}
|
|
12386
|
+
function parseFootnoteSeparators(xml, parseBlocks) {
|
|
12387
|
+
const root = parseXml2(xml).documentElement;
|
|
12388
|
+
const result = {};
|
|
12389
|
+
for (const element of children2(root, "footnote")) {
|
|
12390
|
+
const type = getW(element, "type");
|
|
12391
|
+
if (type !== "separator" && type !== "continuationSeparator") continue;
|
|
12392
|
+
for (const run of Array.from(element.getElementsByTagNameNS(root.namespaceURI, "r"))) {
|
|
12393
|
+
const content = Array.from(run.childNodes).filter((child3) => child3.nodeType === 1).filter((child3) => child3.localName !== "rPr");
|
|
12394
|
+
if (content.length < 2 || !content.some((child3) => skippedTypes.has(child3.localName)))
|
|
12395
|
+
continue;
|
|
12396
|
+
const props = children2(run, "rPr")[0];
|
|
12397
|
+
for (const child3 of content) {
|
|
12398
|
+
const split = run.cloneNode(false);
|
|
12399
|
+
if (props) split.appendChild(props.cloneNode(true));
|
|
12400
|
+
split.appendChild(child3.cloneNode(true));
|
|
12401
|
+
run.parentNode.insertBefore(split, run);
|
|
12402
|
+
}
|
|
12403
|
+
run.parentNode.removeChild(run);
|
|
12404
|
+
}
|
|
12405
|
+
result[type] = { id: getW(element, "id") ?? type, blocks: parseBlocks(element, `fn-${type}-`) };
|
|
12406
|
+
}
|
|
12407
|
+
return result;
|
|
12408
|
+
}
|
|
12225
12409
|
var romanNumerals = [
|
|
12226
12410
|
[1e3, "M"],
|
|
12227
12411
|
[900, "CM"],
|
|
@@ -12285,7 +12469,7 @@ function walkBlocks(blocks, kind, order) {
|
|
|
12285
12469
|
if (block.type === "paragraph") walkParagraph(block, kind, order);
|
|
12286
12470
|
else
|
|
12287
12471
|
for (const row of block.rows)
|
|
12288
|
-
for (const cell of row) walkBlocks(cell
|
|
12472
|
+
for (const cell of row) walkBlocks(cellSourceBlocks(cell), kind, order);
|
|
12289
12473
|
}
|
|
12290
12474
|
}
|
|
12291
12475
|
function numberNotesInOrder(blocks, kind) {
|
|
@@ -12308,6 +12492,10 @@ async function readPart(zip, path2) {
|
|
|
12308
12492
|
function parseSettings(xml) {
|
|
12309
12493
|
if (!xml) return { evenAndOddHeaders: false, autoHyphenation: false };
|
|
12310
12494
|
const root = parseXml2(xml).documentElement;
|
|
12495
|
+
const compatibility = (first2(root, "compat") ? children2(first2(root, "compat"), "compatSetting") : []).find(
|
|
12496
|
+
(setting) => getW(setting, "name") === "compatibilityMode" && getW(setting, "uri") === "http://schemas.microsoft.com/office/word"
|
|
12497
|
+
);
|
|
12498
|
+
const compatibilityMode = compatibility ? Number(getW(compatibility, "val")) : void 0;
|
|
12311
12499
|
const footnoteNumFmt = enumValue(
|
|
12312
12500
|
isStNumberFormat,
|
|
12313
12501
|
getW(first2(first2(root, "footnotePr"), "numFmt"), "val"),
|
|
@@ -12319,6 +12507,7 @@ function parseSettings(xml) {
|
|
|
12319
12507
|
"w:endnotePr/w:numFmt"
|
|
12320
12508
|
);
|
|
12321
12509
|
return {
|
|
12510
|
+
...compatibilityMode !== void 0 && Number.isInteger(compatibilityMode) && compatibilityMode > 0 ? { compatibilityMode } : {},
|
|
12322
12511
|
evenAndOddHeaders: onOffElement(first2(root, "evenAndOddHeaders")) === true,
|
|
12323
12512
|
autoHyphenation: onOffElement(first2(root, "autoHyphenation")) === true,
|
|
12324
12513
|
...footnoteNumFmt ? { footnoteNumFmt } : {},
|
|
@@ -12383,9 +12572,10 @@ async function parseDocumentParts(zip, body, blocks, drawings) {
|
|
|
12383
12572
|
const endnotesXml = await readPart(zip, "word/endnotes.xml");
|
|
12384
12573
|
const notesParser = async (path2) => {
|
|
12385
12574
|
const context = await partContext(zip, path2, drawings);
|
|
12386
|
-
return (container,
|
|
12575
|
+
return (container, prefix2) => withParseWarnings(warnings, () => parseBlocksFromContainer(container, prefix2, context));
|
|
12387
12576
|
};
|
|
12388
12577
|
const footnotes = footnotesXml ? parseNotesPart(footnotesXml, "footnote", await notesParser("word/footnotes.xml")) : void 0;
|
|
12578
|
+
const footnoteSeparators = footnotesXml ? parseFootnoteSeparators(footnotesXml, await notesParser("word/footnotes.xml")) : void 0;
|
|
12389
12579
|
const endnotes = endnotesXml ? parseNotesPart(endnotesXml, "endnote", await notesParser("word/endnotes.xml")) : void 0;
|
|
12390
12580
|
if (sections.some((section) => section.columns.count > 1))
|
|
12391
12581
|
warnings.push(
|
|
@@ -12397,7 +12587,9 @@ async function parseDocumentParts(zip, body, blocks, drawings) {
|
|
|
12397
12587
|
);
|
|
12398
12588
|
return {
|
|
12399
12589
|
sections,
|
|
12590
|
+
...settings.compatibilityMode !== void 0 ? { compatibilityMode: settings.compatibilityMode } : {},
|
|
12400
12591
|
...footnotes ? { footnotes } : {},
|
|
12592
|
+
...footnoteSeparators ? { footnoteSeparators } : {},
|
|
12401
12593
|
...endnotes ? { endnotes } : {},
|
|
12402
12594
|
...settings.footnoteNumFmt ? { footnoteNumFmt: settings.footnoteNumFmt } : {},
|
|
12403
12595
|
...settings.endnoteNumFmt ? { endnoteNumFmt: settings.endnoteNumFmt } : {},
|
|
@@ -12585,7 +12777,9 @@ async function readPackage(input) {
|
|
|
12585
12777
|
);
|
|
12586
12778
|
const parts = await parseDocumentParts(zip, body, blocks, drawings);
|
|
12587
12779
|
model.sections = parts.sections;
|
|
12780
|
+
if (parts.compatibilityMode !== void 0) model.compatibilityMode = parts.compatibilityMode;
|
|
12588
12781
|
if (parts.footnotes) model.footnotes = parts.footnotes;
|
|
12782
|
+
if (parts.footnoteSeparators) model.footnoteSeparators = parts.footnoteSeparators;
|
|
12589
12783
|
if (parts.endnotes) model.endnotes = parts.endnotes;
|
|
12590
12784
|
if (parts.footnoteNumFmt) model.footnoteNumFmt = parts.footnoteNumFmt;
|
|
12591
12785
|
if (parts.endnoteNumFmt) model.endnoteNumFmt = parts.endnoteNumFmt;
|
|
@@ -12632,6 +12826,7 @@ async function readPackage(input) {
|
|
|
12632
12826
|
(slots) => Object.values(slots ?? {}).flatMap((content) => content?.blocks ?? [])
|
|
12633
12827
|
)
|
|
12634
12828
|
),
|
|
12829
|
+
...Object.values(model.footnoteSeparators ?? {}).flatMap((note) => note.blocks),
|
|
12635
12830
|
...[...model.footnotes ?? [], ...model.endnotes ?? []].flatMap((note) => note.blocks)
|
|
12636
12831
|
];
|
|
12637
12832
|
await resolveDocumentDiagrams(
|
|
@@ -2,11 +2,11 @@ import { type DocumentModel, type Paragraph, type Table, type TableBorderSide }
|
|
|
2
2
|
import type { LayoutBorder, LayoutParagraph, LayoutTable } from './input.js';
|
|
3
3
|
/** `#rrggbb` from a model color, which the parser stores with or without its `#`. */
|
|
4
4
|
export declare function cssHex(value: string | undefined): string | undefined;
|
|
5
|
-
export declare function border(side: TableBorderSide | undefined, theme: DocumentModel['theme']): LayoutBorder | undefined;
|
|
5
|
+
export declare function border(side: TableBorderSide | undefined, theme: DocumentModel['theme'], preserveSingleWidth?: boolean): LayoutBorder | undefined;
|
|
6
6
|
/**
|
|
7
7
|
* Converts a model table for pagination: grid positions and widths (merged cells span grid
|
|
8
8
|
* columns), cell margins, resolved borders and shading (table style, table and cell layers), and
|
|
9
9
|
* vertical merges drawn as one cell by hiding the borders between the merged cells.
|
|
10
10
|
*/
|
|
11
|
-
export declare function adaptTable(table: Table, model: DocumentModel, adaptParagraph: (paragraph: Paragraph) => LayoutParagraph): LayoutTable;
|
|
11
|
+
export declare function adaptTable(table: Table, model: DocumentModel, adaptParagraph: (paragraph: Paragraph) => LayoutParagraph, _nested?: boolean): LayoutTable;
|
|
12
12
|
//# sourceMappingURL=adapt-table.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapt-table.d.ts","sourceRoot":"","sources":["../../../docx/layout/adapt-table.ts"],"names":[],"mappings":"AAAA,OAAO,EAKN,KAAK,aAAa,EAClB,KAAK,SAAS,EACd,KAAK,KAAK,EACV,KAAK,eAAe,EAEpB,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"adapt-table.d.ts","sourceRoot":"","sources":["../../../docx/layout/adapt-table.ts"],"names":[],"mappings":"AAAA,OAAO,EAKN,KAAK,aAAa,EAClB,KAAK,SAAS,EACd,KAAK,KAAK,EACV,KAAK,eAAe,EAEpB,MAAM,UAAU,CAAC;AAGlB,OAAO,KAAK,EACX,YAAY,EAGZ,eAAe,EACf,WAAW,EAGX,MAAM,SAAS,CAAC;AAWjB,qFAAqF;AACrF,wBAAgB,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAGpE;AAED,wBAAgB,MAAM,CACrB,IAAI,EAAE,eAAe,GAAG,SAAS,EACjC,KAAK,EAAE,aAAa,CAAC,OAAO,CAAC,EAC7B,mBAAmB,UAAQ,GACzB,YAAY,GAAG,SAAS,CAoB1B;AAgBD;;;;GAIG;AACH,wBAAgB,UAAU,CACzB,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,aAAa,EACpB,cAAc,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,eAAe,EACzD,OAAO,UAAQ,GACb,WAAW,CAoFb"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../docx/layout/adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAS,aAAa,EAAyC,MAAM,UAAU,CAAC;AAsB5F,OAAO,EAIN,KAAK,mBAAmB,EACxB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAEX,mBAAmB,EAKnB,MAAM,SAAS,CAAC;AA2BjB,oFAAoF;AACpF,wBAAgB,kBAAkB,CACjC,KAAK,EAAE,aAAa,EACpB,IAAI,GAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAe,EAC1C,OAAO,GAAE,mBAAwB,GAC/B,mBAAmB,
|
|
1
|
+
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../docx/layout/adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAS,aAAa,EAAyC,MAAM,UAAU,CAAC;AAsB5F,OAAO,EAIN,KAAK,mBAAmB,EACxB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAEX,mBAAmB,EAKnB,MAAM,SAAS,CAAC;AA2BjB,oFAAoF;AACpF,wBAAgB,kBAAkB,CACjC,KAAK,EAAE,aAAa,EACpB,IAAI,GAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAe,EAC1C,OAAO,GAAE,mBAAwB,GAC/B,mBAAmB,CAiXrB"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import type { PageCursor } from './page-cursor.js';
|
|
2
2
|
import type { ParagraphLayoutResult } from './paragraph-layout.js';
|
|
3
3
|
import type { LayoutParagraph } from './input.js';
|
|
4
|
+
import type { LayoutFootnoteBox, LayoutLine } from './result.js';
|
|
4
5
|
export interface ParagraphPlacement {
|
|
6
|
+
/** Measured Word compatibility modes do not reserve a text line for an empty column-break marker. */
|
|
7
|
+
trimLeadingColumnBreak?: boolean;
|
|
5
8
|
paragraph: LayoutParagraph;
|
|
6
9
|
layout: ParagraphLayoutResult;
|
|
7
10
|
/** Spacing-before in px, with `w:contextualSpacing` suppression already resolved by the caller. */
|
|
@@ -14,6 +17,8 @@ export interface ParagraphPlacement {
|
|
|
14
17
|
requiredTogetherPx: number;
|
|
15
18
|
/** Lays unconsumed tokens out at the cursor's new column width. */
|
|
16
19
|
reflow?: (startToken: number) => ParagraphLayoutResult;
|
|
20
|
+
/** Notes referenced by these lines, laid out at the cursor's current column width. */
|
|
21
|
+
footnotes?: (lines: readonly LayoutLine[], includeUnanchored: boolean) => LayoutFootnoteBox[];
|
|
17
22
|
}
|
|
18
23
|
/**
|
|
19
24
|
* Places one paragraph's lines into `cursor`, splitting across page/column
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flow-paragraph.d.ts","sourceRoot":"","sources":["../../../docx/layout/flow-paragraph.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"flow-paragraph.d.ts","sourceRoot":"","sources":["../../../docx/layout/flow-paragraph.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAsB,MAAM,UAAU,CAAC;AAGlF,MAAM,WAAW,kBAAkB;IAClC,qGAAqG;IACrG,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,SAAS,EAAE,eAAe,CAAC;IAC3B,MAAM,EAAE,qBAAqB,CAAC;IAC9B,mGAAmG;IACnG,eAAe,EAAE,MAAM,CAAC;IACxB;;;;OAIG;IACH,kBAAkB,EAAE,MAAM,CAAC;IAC3B,mEAAmE;IACnE,MAAM,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,qBAAqB,CAAC;IACvD,sFAAsF;IACtF,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,UAAU,EAAE,EAAE,iBAAiB,EAAE,OAAO,KAAK,iBAAiB,EAAE,CAAC;CAC9F;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAC7B,MAAM,EAAE,UAAU,EAClB,SAAS,EAAE,kBAAkB,EAC7B,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,GAC7B,IAAI,CAgLN"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ReferenceFootnotes } from './reference-footnotes.js';
|
|
1
2
|
import type { PageCursor } from './page-cursor.js';
|
|
2
3
|
import type { TextMeasurer } from './measure.js';
|
|
3
4
|
import type { LayoutTable } from './input.js';
|
|
@@ -8,5 +9,5 @@ import type { LayoutTable } from './input.js';
|
|
|
8
9
|
* table touches becomes its own `LayoutTableBox` sharing the table's
|
|
9
10
|
* `blockId`, since a single result box can only live in one column.
|
|
10
11
|
*/
|
|
11
|
-
export declare function placeTable(cursor: PageCursor, table: LayoutTable, measurer: TextMeasurer, note: (message: string) => void): void;
|
|
12
|
+
export declare function placeTable(cursor: PageCursor, table: LayoutTable, measurer: TextMeasurer, note: (message: string) => void, resolveFootnotes?: ReferenceFootnotes): void;
|
|
12
13
|
//# sourceMappingURL=flow-table.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flow-table.d.ts","sourceRoot":"","sources":["../../../docx/layout/flow-table.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"flow-table.d.ts","sourceRoot":"","sources":["../../../docx/layout/flow-table.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,KAAK,EAAE,WAAW,EAAkB,MAAM,SAAS,CAAC;AAG3D;;;;;;GAMG;AACH,wBAAgB,UAAU,CACzB,MAAM,EAAE,UAAU,EAClB,KAAK,EAAE,WAAW,EAClB,QAAQ,EAAE,YAAY,EACtB,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,EAC/B,gBAAgB,CAAC,EAAE,kBAAkB,GACnC,IAAI,CA8QN"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { LayoutColumns } from './input.js';
|
|
2
|
+
import type { LayoutFootnoteBox, LayoutPageBox } from './result.js';
|
|
3
|
+
export interface FootnoteColumn {
|
|
4
|
+
xPx: number;
|
|
5
|
+
widthPx: number;
|
|
6
|
+
}
|
|
7
|
+
export type ReflowFootnote = (note: LayoutFootnoteBox, width: number) => LayoutFootnoteBox;
|
|
8
|
+
export declare function footnoteColumns(page: LayoutPageBox, columns: LayoutColumns): FootnoteColumn[];
|
|
9
|
+
/** Columns flow in reference order; a split within this physical page is not a continued-page mark. */
|
|
10
|
+
export declare function packFootnotes(notes: readonly LayoutFootnoteBox[], columns: readonly FootnoteColumn[], height: number, reflow: ReflowFootnote): {
|
|
11
|
+
placed: LayoutFootnoteBox[];
|
|
12
|
+
remaining: LayoutFootnoteBox[];
|
|
13
|
+
heightPx: number;
|
|
14
|
+
};
|
|
15
|
+
/** Minimal balanced height, bounded to 0.01px; the result retains complete source lines. */
|
|
16
|
+
export declare function balancedFootnotes(notes: readonly LayoutFootnoteBox[], columns: readonly FootnoteColumn[], limit: number, reflow: ReflowFootnote): {
|
|
17
|
+
placed: LayoutFootnoteBox[];
|
|
18
|
+
remaining: LayoutFootnoteBox[];
|
|
19
|
+
heightPx: number;
|
|
20
|
+
};
|
|
21
|
+
export declare function minimumFootnoteHeight(notes: readonly LayoutFootnoteBox[], columns: readonly FootnoteColumn[], reflow: ReflowFootnote): number;
|
|
22
|
+
//# sourceMappingURL=footnote-columns.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"footnote-columns.d.ts","sourceRoot":"","sources":["../../../docx/layout/footnote-columns.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEjE,MAAM,WAAW,cAAc;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;CAChB;AACD,MAAM,MAAM,cAAc,GAAG,CAAC,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAE,MAAM,KAAK,iBAAiB,CAAC;AAC3F,wBAAgB,eAAe,CAAC,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,aAAa,GAAG,cAAc,EAAE,CAU7F;AACD,uGAAuG;AACvG,wBAAgB,aAAa,CAC5B,KAAK,EAAE,SAAS,iBAAiB,EAAE,EACnC,OAAO,EAAE,SAAS,cAAc,EAAE,EAClC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,cAAc;;;;EA4BtB;AACD,4FAA4F;AAC5F,wBAAgB,iBAAiB,CAChC,KAAK,EAAE,SAAS,iBAAiB,EAAE,EACnC,OAAO,EAAE,SAAS,cAAc,EAAE,EAClC,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,cAAc;;;;EAatB;AACD,wBAAgB,qBAAqB,CACpC,KAAK,EAAE,SAAS,iBAAiB,EAAE,EACnC,OAAO,EAAE,SAAS,cAAc,EAAE,EAClC,MAAM,EAAE,cAAc,GACpB,MAAM,CAIR"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { LayoutFootnoteBox, LayoutPageBox } from './result.js';
|
|
2
|
+
import type { LayoutColumns } from './input.js';
|
|
3
|
+
import { type ReflowFootnote } from './footnote-columns.js';
|
|
4
|
+
/** Space for the short rule above a page's footnotes. */
|
|
5
|
+
export declare const FOOTNOTE_SEPARATOR_PX = 12;
|
|
6
|
+
/** Page-wide note reservation and continuation. The source document is never changed. */
|
|
7
|
+
export declare class FootnoteFlow {
|
|
8
|
+
private readonly report;
|
|
9
|
+
private readonly separator?;
|
|
10
|
+
private readonly columns?;
|
|
11
|
+
private readonly reflow;
|
|
12
|
+
private pending;
|
|
13
|
+
private remaining;
|
|
14
|
+
private sources;
|
|
15
|
+
constructor(report: (message: string) => void, separator?: ((page: LayoutPageBox, continued: boolean) => LayoutPageBox['footnoteSeparator']) | undefined, columns?: LayoutColumns | undefined, reflow?: ReflowFootnote);
|
|
16
|
+
private separatorHeight;
|
|
17
|
+
get hasContinuation(): boolean;
|
|
18
|
+
hold(blockId: string, notes: LayoutFootnoteBox[], bodyMinimum: number, freshBodyMinimum?: number): void;
|
|
19
|
+
reserved(page: LayoutPageBox, _columnIndex?: number): number;
|
|
20
|
+
pendingHeight(page: LayoutPageBox, capacity: number, bodyUsed: number, _columnIndex?: number): number;
|
|
21
|
+
/** A later column cannot grow the page-wide note area into body content already placed. */
|
|
22
|
+
blockedByEarlierColumn(page: LayoutPageBox, capacity: number, bodyBottom: number): boolean;
|
|
23
|
+
commit(blockId: string, page: LayoutPageBox, available: number, _columnIndex?: number): boolean;
|
|
24
|
+
resume(page: LayoutPageBox, capacity: number, _columnIndex?: number, width?: number): void;
|
|
25
|
+
private append;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=footnote-flow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"footnote-flow.d.ts","sourceRoot":"","sources":["../../../docx/layout/footnote-flow.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,OAAO,EAIN,KAAK,cAAc,EACnB,MAAM,oBAAoB,CAAC;AAS5B,yDAAyD;AACzD,eAAO,MAAM,qBAAqB,KAAK,CAAC;AAExC,yFAAyF;AACzF,qBAAa,YAAY;IAQvB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC;IAI3B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC;IACzB,OAAO,CAAC,QAAQ,CAAC,MAAM;IAbxB,OAAO,CAAC,OAAO,CAEF;IACb,OAAO,CAAC,SAAS,CAA2B;IAC5C,OAAO,CAAC,OAAO,CAAqD;IAEpE,YACkB,MAAM,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,EACjC,SAAS,CAAC,GAAE,CAC5B,IAAI,EAAE,aAAa,EACnB,SAAS,EAAE,OAAO,KACd,aAAa,CAAC,mBAAmB,CAAC,aAAA,EACtB,OAAO,CAAC,EAAE,aAAa,YAAA,EACvB,MAAM,GAAE,cAA+B,EACrD;IAEJ,OAAO,CAAC,eAAe;IAOvB,IAAI,eAAe,IAAI,OAAO,CAE7B;IAED,IAAI,CACH,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,iBAAiB,EAAE,EAC1B,WAAW,EAAE,MAAM,EACnB,gBAAgB,SAAc,GAC5B,IAAI,CAEN;IAED,QAAQ,CAAC,IAAI,EAAE,aAAa,EAAE,YAAY,SAAI,GAAG,MAAM,CAKtD;IAED,aAAa,CAAC,IAAI,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,YAAY,SAAI,GAAG,MAAM,CA4B/F;IAED,2FAA2F;IAC3F,sBAAsB,CAAC,IAAI,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAmBzF;IAED,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,SAAI,GAAG,OAAO,CAMzF;IAED,MAAM,CAAC,IAAI,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAKzF;IAED,OAAO,CAAC,MAAM;CAwDd"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { LayoutFootnoteBox } from './result.js';
|
|
2
|
+
/** Split a note at a complete line boundary, retaining its identity and source ranges. */
|
|
3
|
+
export declare function splitNote(note: LayoutFootnoteBox, budget: number): {
|
|
4
|
+
before?: LayoutFootnoteBox;
|
|
5
|
+
after?: LayoutFootnoteBox;
|
|
6
|
+
};
|
|
7
|
+
//# sourceMappingURL=footnote-split.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"footnote-split.d.ts","sourceRoot":"","sources":["../../../docx/layout/footnote-split.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAsB,MAAM,UAAU,CAAC;AACtE,0FAA0F;AAC1F,wBAAgB,SAAS,CACxB,IAAI,EAAE,iBAAiB,EACvB,MAAM,EAAE,MAAM,GACZ;IACF,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,KAAK,CAAC,EAAE,iBAAiB,CAAC;CAC1B,CAqDA"}
|