ooxml-core 1.50.1 → 1.51.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/README.md +11 -0
- package/dist/{PptxHandler-IDMS4H7X.mjs → PptxHandler-6GRVJRHP.mjs} +2 -2
- package/dist/PptxHandler-E6QYPF7X.mjs +8 -0
- package/dist/PptxHandler-UNQVCIGM.cjs +17 -0
- package/dist/PresentationBuilder-DVDJSV5R.mjs +8 -0
- package/dist/PresentationBuilder-F5UWRF6H.cjs +25 -0
- package/dist/{PresentationBuilder-GI4236KL.mjs → PresentationBuilder-T6YKWPF7.mjs} +2 -2
- package/dist/automation/index.cjs +5839 -4503
- package/dist/automation/index.mjs +5839 -4503
- package/dist/chunk-25IJEN7R.cjs +36 -0
- package/dist/chunk-25JN3ZQM.mjs +58 -0
- package/dist/{chunk-7XYVFUB3.cjs → chunk-2IO523MM.cjs} +1 -0
- package/dist/{chunk-53KMIHYN.mjs → chunk-4LUZHBTT.mjs} +83 -31
- package/dist/chunk-554UZLPS.mjs +237 -0
- package/dist/{chunk-E2XIU4A3.mjs → chunk-63RAF3TS.mjs} +1 -1
- package/dist/{chunk-QRBVN63F.mjs → chunk-6IUYKP77.mjs} +1 -1
- package/dist/{chunk-3IVY333X.mjs → chunk-BIMV5FVL.mjs} +481 -193
- package/dist/{chunk-CODMW5KF.cjs → chunk-CVUMILG3.cjs} +1 -0
- package/dist/{chunk-NBMXEVHL.mjs → chunk-FX6WL42B.mjs} +1 -0
- package/dist/chunk-GI4Y6BBX.mjs +21 -0
- package/dist/{chunk-NJD62JHC.mjs → chunk-GZL4ERW3.mjs} +8 -3
- package/dist/chunk-HWL2AGLD.cjs +98 -0
- package/dist/chunk-HZAB3YDO.cjs +234 -0
- package/dist/chunk-IDATIFCG.mjs +226 -0
- package/dist/chunk-LO55N7VL.cjs +247 -0
- package/dist/{chunk-FFLU4LUQ.cjs → chunk-LUBPW5NP.cjs} +1629 -1609
- package/dist/chunk-MUNEIE2J.cjs +62 -0
- package/dist/{chunk-DCQILGAJ.mjs → chunk-RYUADJV6.mjs} +4 -4
- package/dist/chunk-TOBK5FC4.mjs +88 -0
- package/dist/chunk-UV4LMGVZ.mjs +31 -0
- package/dist/{chunk-O3YGBYGZ.mjs → chunk-VRVHM6TJ.mjs} +1 -0
- package/dist/chunk-W7LVJC32.cjs +25 -0
- package/dist/chunk-WAZ7T2BL.cjs +169 -0
- package/dist/{chunk-3OKY56UM.mjs → chunk-YX33WEKS.mjs} +411 -391
- package/dist/docx/auto-number-fields.d.ts +22 -0
- package/dist/docx/auto-number-fields.d.ts.map +1 -0
- package/dist/docx/block-parser.d.ts.map +1 -1
- package/dist/docx/character-styles.d.ts.map +1 -1
- package/dist/docx/clipboard/css.d.ts +21 -0
- package/dist/docx/clipboard/css.d.ts.map +1 -0
- package/dist/docx/clipboard/html-tokens.d.ts +38 -0
- package/dist/docx/clipboard/html-tokens.d.ts.map +1 -0
- package/dist/docx/clipboard/index.d.ts +6 -0
- package/dist/docx/clipboard/index.d.ts.map +1 -0
- package/dist/docx/clipboard/word-fields.d.ts +13 -0
- package/dist/docx/clipboard/word-fields.d.ts.map +1 -0
- package/dist/docx/clipboard/word-fragment.d.ts +14 -0
- package/dist/docx/clipboard/word-fragment.d.ts.map +1 -0
- package/dist/docx/clipboard/word-html.d.ts +22 -0
- package/dist/docx/clipboard/word-html.d.ts.map +1 -0
- package/dist/docx/clipboard/word-list-scan.d.ts +25 -0
- package/dist/docx/clipboard/word-list-scan.d.ts.map +1 -0
- package/dist/docx/clipboard/word-lists.d.ts +13 -0
- package/dist/docx/clipboard/word-lists.d.ts.map +1 -0
- package/dist/docx/clipboard/word-runs.d.ts +18 -0
- package/dist/docx/clipboard/word-runs.d.ts.map +1 -0
- package/dist/docx/clipboard/word-styles.d.ts +35 -0
- package/dist/docx/clipboard/word-styles.d.ts.map +1 -0
- package/dist/docx/compare/build.d.ts +48 -0
- package/dist/docx/compare/build.d.ts.map +1 -0
- package/dist/docx/compare/compare.d.ts +18 -0
- package/dist/docx/compare/compare.d.ts.map +1 -0
- package/dist/docx/compare/context.d.ts +42 -0
- package/dist/docx/compare/context.d.ts.map +1 -0
- package/dist/docx/compare/diff.d.ts +20 -0
- package/dist/docx/compare/diff.d.ts.map +1 -0
- package/dist/docx/compare/index.d.ts +4 -0
- package/dist/docx/compare/index.d.ts.map +1 -0
- package/dist/docx/compare/slide.d.ts +9 -0
- package/dist/docx/compare/slide.d.ts.map +1 -0
- package/dist/docx/compare/spans.d.ts +13 -0
- package/dist/docx/compare/spans.d.ts.map +1 -0
- package/dist/docx/compare/story.d.ts +7 -0
- package/dist/docx/compare/story.d.ts.map +1 -0
- package/dist/docx/compare/table.d.ts +23 -0
- package/dist/docx/compare/table.d.ts.map +1 -0
- package/dist/docx/compare/tokens.d.ts +50 -0
- package/dist/docx/compare/tokens.d.ts.map +1 -0
- package/dist/docx/compare/types.d.ts +51 -0
- package/dist/docx/compare/types.d.ts.map +1 -0
- package/dist/docx/compatibility.d.ts +46 -0
- package/dist/docx/compatibility.d.ts.map +1 -0
- package/dist/docx/computed-fields.d.ts +39 -0
- package/dist/docx/computed-fields.d.ts.map +1 -0
- package/dist/docx/doc-property-field.d.ts +17 -0
- package/dist/docx/doc-property-field.d.ts.map +1 -0
- package/dist/docx/document-parts.d.ts +2 -0
- package/dist/docx/document-parts.d.ts.map +1 -1
- package/dist/docx/drawing-wrap.d.ts +21 -0
- package/dist/docx/drawing-wrap.d.ts.map +1 -0
- package/dist/docx/drawing.d.ts.map +1 -1
- package/dist/docx/embedded.cjs +3965 -2313
- package/dist/docx/embedded.mjs +3965 -2313
- package/dist/docx/field-format.d.ts +45 -0
- package/dist/docx/field-format.d.ts.map +1 -0
- package/dist/docx/field-result-spans.d.ts +62 -0
- package/dist/docx/field-result-spans.d.ts.map +1 -0
- package/dist/docx/field-runs.d.ts.map +1 -1
- package/dist/docx/field-stories.d.ts +9 -0
- package/dist/docx/field-stories.d.ts.map +1 -0
- package/dist/docx/find-stories.d.ts +27 -0
- package/dist/docx/find-stories.d.ts.map +1 -0
- package/dist/docx/highlight.d.ts +19 -0
- package/dist/docx/highlight.d.ts.map +1 -1
- package/dist/docx/hyperlink.d.ts +7 -0
- package/dist/docx/hyperlink.d.ts.map +1 -1
- package/dist/docx/index.cjs +7359 -3476
- package/dist/docx/index.d.ts +13 -1
- package/dist/docx/index.d.ts.map +1 -1
- package/dist/docx/index.mjs +7327 -3476
- package/dist/docx/inline-model.d.ts +21 -0
- package/dist/docx/inline-model.d.ts.map +1 -1
- package/dist/docx/inline-slots.d.ts.map +1 -1
- package/dist/docx/inspect-document.d.ts +21 -0
- package/dist/docx/inspect-document.d.ts.map +1 -0
- package/dist/docx/kinsoku-settings.d.ts +9 -0
- package/dist/docx/kinsoku-settings.d.ts.map +1 -0
- package/dist/docx/layout/adapt-table-floating.d.ts +11 -0
- package/dist/docx/layout/adapt-table-floating.d.ts.map +1 -0
- 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/computed-field-runs.d.ts +8 -0
- package/dist/docx/layout/computed-field-runs.d.ts.map +1 -0
- package/dist/docx/layout/floats.d.ts +3 -1
- package/dist/docx/layout/floats.d.ts.map +1 -1
- package/dist/docx/layout/flow-floating-table.d.ts +13 -0
- package/dist/docx/layout/flow-floating-table.d.ts.map +1 -0
- package/dist/docx/layout/flow-table.d.ts +1 -1
- package/dist/docx/layout/flow-table.d.ts.map +1 -1
- package/dist/docx/layout/index.cjs +2280 -941
- package/dist/docx/layout/index.mjs +2276 -942
- package/dist/docx/layout/input.d.ts +50 -0
- package/dist/docx/layout/input.d.ts.map +1 -1
- package/dist/docx/layout/layout.d.ts.map +1 -1
- 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 +6 -0
- package/dist/docx/layout/paragraph-tokens.d.ts.map +1 -1
- package/dist/docx/layout/result.d.ts +12 -0
- package/dist/docx/layout/result.d.ts.map +1 -1
- package/dist/docx/layout/section-flow.d.ts.map +1 -1
- package/dist/docx/layout/table-autofit-distribute.d.ts +18 -0
- package/dist/docx/layout/table-autofit-distribute.d.ts.map +1 -0
- package/dist/docx/layout/table-autofit-measure.d.ts +15 -0
- package/dist/docx/layout/table-autofit-measure.d.ts.map +1 -0
- package/dist/docx/layout/table-autofit.d.ts +10 -0
- package/dist/docx/layout/table-autofit.d.ts.map +1 -0
- package/dist/docx/layout/table-cell-layout.d.ts.map +1 -1
- package/dist/docx/layout/text-breaks.d.ts +38 -13
- package/dist/docx/layout/text-breaks.d.ts.map +1 -1
- package/dist/docx/layout/wrap.d.ts +1 -1
- package/dist/docx/layout/wrap.d.ts.map +1 -1
- package/dist/docx/list-number-fields.d.ts +25 -0
- package/dist/docx/list-number-fields.d.ts.map +1 -0
- package/dist/docx/load/index.cjs +4355 -2703
- package/dist/docx/load/index.mjs +4355 -2703
- package/dist/docx/model-paragraph.d.ts +12 -1
- package/dist/docx/model-paragraph.d.ts.map +1 -1
- package/dist/docx/model.d.ts +26 -1
- package/dist/docx/model.d.ts.map +1 -1
- package/dist/docx/note-convert.d.ts +45 -0
- package/dist/docx/note-convert.d.ts.map +1 -0
- package/dist/docx/numbering-counters.d.ts +17 -0
- package/dist/docx/numbering-counters.d.ts.map +1 -0
- package/dist/docx/numbering-format.d.ts +11 -2
- package/dist/docx/numbering-format.d.ts.map +1 -1
- package/dist/docx/outline-numbering.d.ts +6 -0
- package/dist/docx/outline-numbering.d.ts.map +1 -0
- package/dist/docx/package-information-save.d.ts +9 -0
- package/dist/docx/package-information-save.d.ts.map +1 -0
- package/dist/docx/package-information.d.ts +43 -0
- package/dist/docx/package-information.d.ts.map +1 -0
- package/dist/docx/package-properties.d.ts +5 -0
- package/dist/docx/package-properties.d.ts.map +1 -0
- package/dist/docx/paragraph-styles.d.ts +2 -0
- package/dist/docx/paragraph-styles.d.ts.map +1 -1
- package/dist/docx/parse-revisions.d.ts +2 -0
- package/dist/docx/parse-revisions.d.ts.map +1 -1
- package/dist/docx/parse-table-floating.d.ts +5 -0
- package/dist/docx/parse-table-floating.d.ts.map +1 -0
- package/dist/docx/parse-table.d.ts.map +1 -1
- package/dist/docx/parse.d.ts.map +1 -1
- package/dist/docx/part-relationships.d.ts.map +1 -1
- package/dist/docx/personal-information.d.ts +18 -0
- package/dist/docx/personal-information.d.ts.map +1 -0
- package/dist/docx/picture-crop-edit.d.ts +18 -0
- package/dist/docx/picture-crop-edit.d.ts.map +1 -0
- package/dist/docx/picture-watermark.d.ts +29 -0
- package/dist/docx/picture-watermark.d.ts.map +1 -0
- package/dist/docx/relationship-allocator.d.ts.map +1 -1
- package/dist/docx/remove-document-information.d.ts +8 -0
- package/dist/docx/remove-document-information.d.ts.map +1 -0
- package/dist/docx/revision-commands.d.ts +6 -1
- package/dist/docx/revision-commands.d.ts.map +1 -1
- package/dist/docx/revision-ids.d.ts.map +1 -1
- package/dist/docx/run-language.d.ts +9 -0
- package/dist/docx/run-language.d.ts.map +1 -0
- package/dist/docx/run-properties-snapshot.d.ts +9 -0
- package/dist/docx/run-properties-snapshot.d.ts.map +1 -0
- package/dist/docx/run-style-model.d.ts +4 -0
- package/dist/docx/run-style-model.d.ts.map +1 -1
- package/dist/docx/save-modified.d.ts +2 -1
- package/dist/docx/save-modified.d.ts.map +1 -1
- package/dist/docx/save.d.ts.map +1 -1
- package/dist/docx/style-ref-fields.d.ts +1 -8
- package/dist/docx/style-ref-fields.d.ts.map +1 -1
- package/dist/docx/symbol-field.d.ts +21 -0
- package/dist/docx/symbol-field.d.ts.map +1 -0
- package/dist/docx/table-cell-write.d.ts.map +1 -1
- package/dist/docx/table-defaults.d.ts +2 -0
- package/dist/docx/table-defaults.d.ts.map +1 -1
- package/dist/docx/table-margins.d.ts +18 -0
- package/dist/docx/table-margins.d.ts.map +1 -0
- package/dist/docx/table-model.d.ts +23 -0
- package/dist/docx/table-model.d.ts.map +1 -1
- package/dist/docx/table-structure-check.d.ts.map +1 -1
- package/dist/docx/table-styles.d.ts.map +1 -1
- package/dist/docx/ui/index.cjs +787 -435
- 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 +784 -436
- package/dist/docx/ui/inline-content-schema.d.ts.map +1 -1
- package/dist/docx/ui/paragraph-attributes.d.ts +6 -0
- package/dist/docx/ui/paragraph-attributes.d.ts.map +1 -1
- package/dist/docx/ui/ribbon-action-ids.d.ts +1 -1
- package/dist/docx/ui/ribbon-action-ids.d.ts.map +1 -1
- package/dist/docx/ui/ribbon-legacy-labels.d.ts +1 -1
- package/dist/docx/ui/ribbon-legacy-labels.d.ts.map +1 -1
- package/dist/docx/ui/run-adapter.d.ts.map +1 -1
- package/dist/docx/ui/schema-marks.d.ts +2 -19
- package/dist/docx/ui/schema-marks.d.ts.map +1 -1
- package/dist/docx/ui/track-run-formatting.d.ts.map +1 -1
- package/dist/docx/ui/yjs-document-attributes.d.ts +5 -0
- package/dist/docx/ui/yjs-document-attributes.d.ts.map +1 -1
- package/dist/docx/write-drawing-wrap.d.ts +22 -0
- package/dist/docx/write-drawing-wrap.d.ts.map +1 -0
- package/dist/docx/write-drawing.d.ts.map +1 -1
- package/dist/docx/write-revisions.d.ts +3 -1
- package/dist/docx/write-revisions.d.ts.map +1 -1
- package/dist/docx/write-shape.d.ts.map +1 -1
- package/dist/docx/write-table-properties.d.ts.map +1 -1
- package/dist/docx/write.d.ts.map +1 -1
- package/dist/drawingml/html-text-paste.d.ts +28 -0
- package/dist/drawingml/html-text-paste.d.ts.map +1 -0
- package/dist/drawingml/html-text-style.d.ts +18 -0
- package/dist/drawingml/html-text-style.d.ts.map +1 -0
- package/dist/drawingml/index.cjs +762 -0
- package/dist/drawingml/index.d.ts +1 -0
- package/dist/drawingml/index.d.ts.map +1 -1
- package/dist/drawingml/index.mjs +760 -1
- package/dist/index.cjs +1205 -276
- package/dist/index.mjs +1205 -276
- package/dist/pptx/automation/index.cjs +568 -182
- package/dist/pptx/automation/index.d.ts +4 -4
- package/dist/pptx/automation/index.mjs +6 -5
- package/dist/pptx/chunks/{index-BCy58n13.d.ts → index-8ZfPndYR.d.ts} +2 -2
- package/dist/pptx/chunks/{index-BCy58n13.d.ts.map → index-8ZfPndYR.d.ts.map} +1 -1
- package/dist/pptx/chunks/{index-OwiX5IVw.d.ts → index-DVhD9Kd5.d.ts} +4 -4
- package/dist/pptx/chunks/{index-OwiX5IVw.d.ts.map → index-DVhD9Kd5.d.ts.map} +1 -1
- package/dist/pptx/chunks/{index-oQHWAO7M.d.ts → index-DsUnUj-V.d.ts} +5 -5
- package/dist/pptx/chunks/{index-oQHWAO7M.d.ts.map → index-DsUnUj-V.d.ts.map} +1 -1
- package/dist/pptx/chunks/{index-AZN38e6S.d.ts → index-xB7MDLI7.d.ts} +4 -4
- package/dist/pptx/chunks/{index-AZN38e6S.d.ts.map → index-xB7MDLI7.d.ts.map} +1 -1
- package/dist/pptx/chunks/{presentation-DOaYIW-l.d.ts → presentation-BvnVkFPJ.d.ts} +26 -2
- package/dist/pptx/chunks/{presentation-DOaYIW-l.d.ts.map → presentation-BvnVkFPJ.d.ts.map} +1 -1
- package/dist/pptx/chunks/{text-operations-CYSXno9L.d.ts → text-operations-D7TCPhlv.d.ts} +2 -2
- package/dist/pptx/chunks/{text-operations-CYSXno9L.d.ts.map → text-operations-D7TCPhlv.d.ts.map} +1 -1
- package/dist/pptx/cli/index.cjs +511 -126
- package/dist/pptx/cli/index.d.ts +1 -1
- package/dist/pptx/cli/index.mjs +4 -4
- package/dist/pptx/converter/index.cjs +7 -2
- package/dist/pptx/converter/index.d.ts +1 -1
- package/dist/pptx/converter/index.mjs +2 -2
- package/dist/pptx/editor/render/custom-show-operations.cjs +2 -2
- package/dist/pptx/editor/render/custom-show-operations.mjs +1 -1
- package/dist/pptx/editor/render/find-replace.cjs +16 -15
- package/dist/pptx/editor/render/find-replace.d.ts +2 -2
- package/dist/pptx/editor/render/find-replace.mjs +3 -2
- package/dist/pptx/editor/render/font-family-update.d.ts +2 -2
- package/dist/pptx/editor/render/paragraph-geometry-overrides.d.ts +2 -2
- package/dist/pptx/editor/render/segments-text-edit.cjs +159 -0
- package/dist/pptx/editor/render/segments-text-edit.d.ts +26 -0
- package/dist/pptx/editor/render/segments-text-edit.d.ts.map +1 -0
- package/dist/pptx/editor/render/segments-text-edit.mjs +156 -0
- package/dist/pptx/editor/render/slide-operations.cjs +12 -9
- package/dist/pptx/editor/render/slide-operations.mjs +6 -3
- package/dist/pptx/editor/render/table-cell-edit.cjs +5 -5
- package/dist/pptx/editor/render/table-cell-edit.d.ts.map +1 -1
- package/dist/pptx/editor/render/table-cell-edit.mjs +1 -1
- package/dist/pptx/editor/render/table-cell-merge.cjs +3 -3
- package/dist/pptx/editor/render/table-cell-merge.mjs +1 -1
- package/dist/pptx/editor/render/table-cell-rich-text.cjs +41 -0
- package/dist/pptx/editor/render/table-cell-rich-text.d.ts +50 -0
- package/dist/pptx/editor/render/table-cell-rich-text.d.ts.map +1 -0
- package/dist/pptx/editor/render/table-cell-rich-text.mjs +8 -0
- package/dist/pptx/editor/render/table-cell-source.cjs +23 -0
- package/dist/pptx/editor/render/table-cell-source.d.ts +31 -0
- package/dist/pptx/editor/render/table-cell-source.d.ts.map +1 -0
- package/dist/pptx/editor/render/table-cell-source.mjs +6 -0
- package/dist/pptx/editor/render/table-cells-text-style.cjs +116 -0
- package/dist/pptx/editor/render/table-cells-text-style.d.ts +37 -0
- package/dist/pptx/editor/render/table-cells-text-style.d.ts.map +1 -0
- package/dist/pptx/editor/render/table-cells-text-style.mjs +113 -0
- package/dist/pptx/editor/render/table-data-grid-ops.cjs +40 -94
- package/dist/pptx/editor/render/table-data-grid-ops.mjs +3 -88
- package/dist/pptx/editor/render/table-grid-fill.cjs +30 -0
- package/dist/pptx/editor/render/table-grid-fill.d.ts +34 -0
- package/dist/pptx/editor/render/table-grid-fill.d.ts.map +1 -0
- package/dist/pptx/editor/render/table-grid-fill.mjs +28 -0
- package/dist/pptx/editor/render/table-layout.cjs +6 -6
- package/dist/pptx/editor/render/table-layout.d.ts +2 -2
- package/dist/pptx/editor/render/table-layout.d.ts.map +1 -1
- package/dist/pptx/editor/render/table-layout.mjs +1 -1
- package/dist/pptx/editor/render/table-merge.cjs +5 -5
- package/dist/pptx/editor/render/table-merge.mjs +1 -1
- package/dist/pptx/editor/render/text-content-style.d.ts +2 -2
- package/dist/pptx/editor/render/text-runs-style-patch.d.ts +2 -2
- package/dist/pptx/editor/render/text-style-scope.d.ts +2 -2
- package/dist/pptx/editor/render/update-text-segment-style.d.ts +2 -2
- package/dist/pptx/index.cjs +526 -203
- package/dist/pptx/index.d.ts +7 -7
- package/dist/pptx/index.mjs +5 -5
- package/dist/pptx/node/index.d.ts +1 -1
- package/dist/pptx/smartart-layouts/index.d.ts +2 -2
- package/dist/teams/index.cjs +35 -25
- package/dist/teams/index.mjs +35 -25
- package/dist/text/complex-breaks.d.ts +24 -0
- package/dist/text/complex-breaks.d.ts.map +1 -0
- package/dist/text/east-asian.d.ts +32 -0
- package/dist/text/east-asian.d.ts.map +1 -0
- package/dist/text/font-metrics/advance-width.d.ts.map +1 -1
- package/dist/text/font-metrics/design-advances-powerpoint.generated.d.ts +13 -0
- package/dist/text/font-metrics/design-advances-powerpoint.generated.d.ts.map +1 -0
- package/dist/text/font-metrics/design-advances.generated.d.ts +1 -3
- package/dist/text/font-metrics/design-advances.generated.d.ts.map +1 -1
- package/dist/text/html-tokens.d.ts +45 -0
- package/dist/text/html-tokens.d.ts.map +1 -0
- package/dist/text/index.cjs +535 -87
- package/dist/text/index.d.ts +5 -0
- package/dist/text/index.d.ts.map +1 -1
- package/dist/text/index.mjs +514 -88
- package/dist/text/kinsoku.d.ts +55 -0
- package/dist/text/kinsoku.d.ts.map +1 -0
- package/dist/text/truetype/embedding.d.ts +42 -0
- package/dist/text/truetype/embedding.d.ts.map +1 -0
- package/dist/text/webfonts/google-fonts-request.d.ts +3 -2
- package/dist/text/webfonts/google-fonts-request.d.ts.map +1 -1
- package/dist/text/webfonts/look-alikes.d.ts +7 -2
- package/dist/text/webfonts/look-alikes.d.ts.map +1 -1
- package/dist/text/windows-1252.d.ts +10 -0
- package/dist/text/windows-1252.d.ts.map +1 -0
- package/dist/visio/index.cjs +33 -9
- package/dist/visio/index.mjs +33 -9
- package/dist/visio/ui/index.cjs +33 -9
- package/dist/visio/ui/index.mjs +33 -9
- package/dist/xlsx/collab/index.cjs +10 -6
- package/dist/xlsx/collab/index.mjs +10 -6
- package/dist/xlsx/edit/clipboard-html-parse.d.ts +1 -0
- package/dist/xlsx/edit/clipboard-html-parse.d.ts.map +1 -1
- package/dist/xlsx/formula/functions/text-convert.d.ts.map +1 -1
- package/dist/xlsx/index.cjs +96 -51
- package/dist/xlsx/index.mjs +96 -51
- package/dist/xlsx/load/index.cjs +10 -6
- package/dist/xlsx/load/index.mjs +10 -6
- package/dist/xlsx/ui/index.cjs +97 -52
- package/dist/xlsx/ui/index.mjs +97 -52
- package/package.json +1 -1
- package/dist/PptxHandler-72NTA5ZY.cjs +0 -14
- package/dist/PptxHandler-O4IJ3TKZ.mjs +0 -5
- package/dist/PresentationBuilder-ORM22QGC.mjs +0 -5
- package/dist/PresentationBuilder-T2ETYT3L.cjs +0 -22
- package/dist/chunk-X4RL5AZ7.cjs +0 -120
- package/dist/{chunk-PRGXRAAU.mjs → chunk-4Y76EAKK.mjs} +131 -131
- package/dist/{chunk-EN3KSEW5.cjs → chunk-MMULWQOM.cjs} +131 -131
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunk5W2QL4SB_cjs = require('./chunk-5W2QL4SB.cjs');
|
|
4
|
+
|
|
5
|
+
// pptx/core/core/runtime/table-structural-helpers.ts
|
|
6
|
+
var DEFAULT_ROW_HEIGHT_PX = 40;
|
|
7
|
+
var DEFAULT_ROW_HEIGHT_EMU = DEFAULT_ROW_HEIGHT_PX * chunk5W2QL4SB_cjs.EMU_PER_PX;
|
|
8
|
+
function ensureArray(value) {
|
|
9
|
+
if (value === void 0 || value === null) {
|
|
10
|
+
return [];
|
|
11
|
+
}
|
|
12
|
+
return Array.isArray(value) ? value : [value];
|
|
13
|
+
}
|
|
14
|
+
function createDefaultXmlCell() {
|
|
15
|
+
return {
|
|
16
|
+
"a:txBody": {
|
|
17
|
+
"a:bodyPr": {},
|
|
18
|
+
"a:lstStyle": {},
|
|
19
|
+
"a:p": {
|
|
20
|
+
// Match PowerPoint's "Insert Table" default: every paragraph-end
|
|
21
|
+
// run carries `lang="en-US" dirty="0"`.
|
|
22
|
+
"a:endParaRPr": { "@_lang": "en-US", "@_dirty": "0" }
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"a:tcPr": {}
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
function getTblFromRawXml(rawXml) {
|
|
29
|
+
const graphicData = rawXml["a:graphic"]?.["a:graphicData"];
|
|
30
|
+
return graphicData?.["a:tbl"];
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
exports.DEFAULT_ROW_HEIGHT_EMU = DEFAULT_ROW_HEIGHT_EMU;
|
|
34
|
+
exports.createDefaultXmlCell = createDefaultXmlCell;
|
|
35
|
+
exports.ensureArray = ensureArray;
|
|
36
|
+
exports.getTblFromRawXml = getTblFromRawXml;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { paragraphContentEntries } from './chunk-554UZLPS.mjs';
|
|
2
|
+
import { getTblFromRawXml, ensureArray } from './chunk-UV4LMGVZ.mjs';
|
|
3
|
+
import { xmlText } from './chunk-4Y76EAKK.mjs';
|
|
4
|
+
|
|
5
|
+
// pptx/editor/render/table-cell-source.ts
|
|
6
|
+
var CELL_CONTENT_TAGS = /* @__PURE__ */ new Set(["a:r", "a:br", "a:fld"]);
|
|
7
|
+
function tableCellSourceXml(element, row, col) {
|
|
8
|
+
const tbl = element.rawXml ? getTblFromRawXml(element.rawXml) : void 0;
|
|
9
|
+
const rows = ensureArray(tbl?.["a:tr"]);
|
|
10
|
+
const cells = ensureArray(rows[row]?.["a:tc"]);
|
|
11
|
+
return cells[col];
|
|
12
|
+
}
|
|
13
|
+
function pairTableCellSource(runs, cellXml) {
|
|
14
|
+
const txBody = cellXml?.["a:txBody"];
|
|
15
|
+
if (!txBody || typeof txBody !== "object") {
|
|
16
|
+
return void 0;
|
|
17
|
+
}
|
|
18
|
+
const paragraphs = ensureArray(txBody["a:p"]).map(
|
|
19
|
+
(paragraph2) => paragraph2 && typeof paragraph2 === "object" ? paragraph2 : {}
|
|
20
|
+
);
|
|
21
|
+
const entries = paragraphs.map(
|
|
22
|
+
(paragraph2) => paragraphContentEntries(paragraph2, CELL_CONTENT_TAGS).entries
|
|
23
|
+
);
|
|
24
|
+
const paired = [];
|
|
25
|
+
let paragraph = 0;
|
|
26
|
+
let entry = 0;
|
|
27
|
+
for (const run of runs) {
|
|
28
|
+
if (run.isParagraphBreak) {
|
|
29
|
+
if (entry !== (entries[paragraph]?.length ?? 0)) {
|
|
30
|
+
return void 0;
|
|
31
|
+
}
|
|
32
|
+
paragraph++;
|
|
33
|
+
entry = 0;
|
|
34
|
+
paired.push(void 0);
|
|
35
|
+
continue;
|
|
36
|
+
}
|
|
37
|
+
const next = entries[paragraph]?.[entry++];
|
|
38
|
+
if (!next) {
|
|
39
|
+
return void 0;
|
|
40
|
+
}
|
|
41
|
+
const [tag, item] = next;
|
|
42
|
+
const node = item && typeof item === "object" ? item : {};
|
|
43
|
+
const expected = run.isLineBreak ? "a:br" : run.isField ? "a:fld" : "a:r";
|
|
44
|
+
if (tag !== expected || tag !== "a:br" && (xmlText(node["a:t"]) ?? "") !== run.text) {
|
|
45
|
+
return void 0;
|
|
46
|
+
}
|
|
47
|
+
paired.push({ tag: expected, xml: node });
|
|
48
|
+
}
|
|
49
|
+
if (paragraph !== paragraphs.length - 1 || entry !== (entries[paragraph]?.length ?? 0)) {
|
|
50
|
+
return void 0;
|
|
51
|
+
}
|
|
52
|
+
return { paragraphs, runs: paired };
|
|
53
|
+
}
|
|
54
|
+
function withRunStyle(source, style) {
|
|
55
|
+
return source ? { ...source, style: { ...style } } : void 0;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export { pairTableCellSource, tableCellSourceXml, withRunStyle };
|
|
@@ -1,33 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
// pptx/core/core/runtime/table-structural-helpers.ts
|
|
5
|
-
var DEFAULT_ROW_HEIGHT_PX = 40;
|
|
6
|
-
var DEFAULT_ROW_HEIGHT_EMU = DEFAULT_ROW_HEIGHT_PX * EMU_PER_PX;
|
|
7
|
-
function ensureArray(value) {
|
|
8
|
-
if (value === void 0 || value === null) {
|
|
9
|
-
return [];
|
|
10
|
-
}
|
|
11
|
-
return Array.isArray(value) ? value : [value];
|
|
12
|
-
}
|
|
13
|
-
function createDefaultXmlCell() {
|
|
14
|
-
return {
|
|
15
|
-
"a:txBody": {
|
|
16
|
-
"a:bodyPr": {},
|
|
17
|
-
"a:lstStyle": {},
|
|
18
|
-
"a:p": {
|
|
19
|
-
// Match PowerPoint's "Insert Table" default: every paragraph-end
|
|
20
|
-
// run carries `lang="en-US" dirty="0"`.
|
|
21
|
-
"a:endParaRPr": { "@_lang": "en-US", "@_dirty": "0" }
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
"a:tcPr": {}
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
function getTblFromRawXml(rawXml) {
|
|
28
|
-
const graphicData = rawXml["a:graphic"]?.["a:graphicData"];
|
|
29
|
-
return graphicData?.["a:tbl"];
|
|
30
|
-
}
|
|
1
|
+
import { ensureArray, getTblFromRawXml } from './chunk-UV4LMGVZ.mjs';
|
|
2
|
+
import { xmlText } from './chunk-4Y76EAKK.mjs';
|
|
31
3
|
|
|
32
4
|
// pptx/core/core/runtime/table-cell-text-xml.ts
|
|
33
5
|
var xmlArray = (value) => ensureArray(value);
|
|
@@ -84,6 +56,86 @@ function rebuildCellTextBody(existingTxBody, text) {
|
|
|
84
56
|
return newTxBody;
|
|
85
57
|
}
|
|
86
58
|
|
|
59
|
+
// pptx/core/core/runtime/table-cell-run-style-xml.ts
|
|
60
|
+
function setRunFlag(rPr, attribute, value, on) {
|
|
61
|
+
if (value) {
|
|
62
|
+
rPr[attribute] = on;
|
|
63
|
+
} else {
|
|
64
|
+
delete rPr[attribute];
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
var AFTER_LATIN = [
|
|
68
|
+
"a:ea",
|
|
69
|
+
"a:cs",
|
|
70
|
+
"a:sym",
|
|
71
|
+
"a:hlinkClick",
|
|
72
|
+
"a:hlinkMouseOver",
|
|
73
|
+
"a:rtl",
|
|
74
|
+
"a:extLst"
|
|
75
|
+
];
|
|
76
|
+
function setRunLatinTypeface(rPr, typeface) {
|
|
77
|
+
const existing = rPr["a:latin"];
|
|
78
|
+
const latin = {
|
|
79
|
+
...existing && typeof existing === "object" ? existing : {},
|
|
80
|
+
"@_typeface": typeface
|
|
81
|
+
};
|
|
82
|
+
const tail = [];
|
|
83
|
+
for (const key of AFTER_LATIN) {
|
|
84
|
+
if (key in rPr) {
|
|
85
|
+
tail.push([key, rPr[key]]);
|
|
86
|
+
delete rPr[key];
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
delete rPr["a:latin"];
|
|
90
|
+
rPr["a:latin"] = latin;
|
|
91
|
+
for (const [key, value] of tail) {
|
|
92
|
+
rPr[key] = value;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
function applyCellRunStyleUpdates(rPr, styleUpdates) {
|
|
96
|
+
if ("bold" in styleUpdates) {
|
|
97
|
+
setRunFlag(rPr, "@_b", styleUpdates.bold, "1");
|
|
98
|
+
}
|
|
99
|
+
if ("italic" in styleUpdates) {
|
|
100
|
+
setRunFlag(rPr, "@_i", styleUpdates.italic, "1");
|
|
101
|
+
}
|
|
102
|
+
if ("underline" in styleUpdates) {
|
|
103
|
+
setRunFlag(rPr, "@_u", styleUpdates.underline, "sng");
|
|
104
|
+
}
|
|
105
|
+
if ("strikethrough" in styleUpdates) {
|
|
106
|
+
setRunFlag(rPr, "@_strike", styleUpdates.strikethrough, "sngStrike");
|
|
107
|
+
}
|
|
108
|
+
if (typeof styleUpdates.fontSize === "number" && styleUpdates.fontSize > 0) {
|
|
109
|
+
rPr["@_sz"] = String(Math.round(styleUpdates.fontSize * 100));
|
|
110
|
+
}
|
|
111
|
+
if ("color" in styleUpdates && typeof styleUpdates.color === "string") {
|
|
112
|
+
const hex = styleUpdates.color.replace("#", "");
|
|
113
|
+
const tail = [];
|
|
114
|
+
for (const key of Object.keys(rPr)) {
|
|
115
|
+
if (key.startsWith("a:") && !["a:ln"].includes(key)) {
|
|
116
|
+
tail.push([key, rPr[key]]);
|
|
117
|
+
delete rPr[key];
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
rPr["a:solidFill"] = { "a:srgbClr": { "@_val": hex } };
|
|
121
|
+
for (const [key, value] of tail) {
|
|
122
|
+
if (![
|
|
123
|
+
"a:solidFill",
|
|
124
|
+
"a:noFill",
|
|
125
|
+
"a:gradFill",
|
|
126
|
+
"a:pattFill",
|
|
127
|
+
"a:blipFill",
|
|
128
|
+
"a:grpFill"
|
|
129
|
+
].includes(key)) {
|
|
130
|
+
rPr[key] = value;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
if (typeof styleUpdates.fontFamily === "string" && styleUpdates.fontFamily) {
|
|
135
|
+
setRunLatinTypeface(rPr, styleUpdates.fontFamily);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
87
139
|
// pptx/core/core/runtime/table-cell-rawxml-ops.ts
|
|
88
140
|
function updateCellTextInRawXml(element, rowIndex, colIndex, text) {
|
|
89
141
|
if (!element.rawXml) {
|
|
@@ -109,4 +161,4 @@ function updateCellTextInRawXml(element, rowIndex, colIndex, text) {
|
|
|
109
161
|
return newRawXml;
|
|
110
162
|
}
|
|
111
163
|
|
|
112
|
-
export {
|
|
164
|
+
export { applyCellRunStyleUpdates, flattenCellTxBodyText, tableCellTextBodyMatches, updateCellTextInRawXml };
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
import { xmlHasChild } from './chunk-4Y76EAKK.mjs';
|
|
2
|
+
|
|
3
|
+
// pptx/core/core/runtime/xml-child-scan.ts
|
|
4
|
+
function isXmlObject(value) {
|
|
5
|
+
return Boolean(value && typeof value === "object" && !Array.isArray(value));
|
|
6
|
+
}
|
|
7
|
+
function ensureItems(value) {
|
|
8
|
+
if (value === void 0 || value === null) {
|
|
9
|
+
return [];
|
|
10
|
+
}
|
|
11
|
+
return Array.isArray(value) ? value : [value];
|
|
12
|
+
}
|
|
13
|
+
function localName(name) {
|
|
14
|
+
const colon = name.indexOf(":");
|
|
15
|
+
return colon >= 0 ? name.slice(colon + 1) : name;
|
|
16
|
+
}
|
|
17
|
+
var TAG_NAME_RE = /<(\/)?([A-Za-z_][\w.:-]*)/uy;
|
|
18
|
+
function findTagClose(xml, start) {
|
|
19
|
+
let index = start;
|
|
20
|
+
while (index < xml.length) {
|
|
21
|
+
const char = xml[index];
|
|
22
|
+
if (char === '"' || char === "'") {
|
|
23
|
+
const closingQuote = xml.indexOf(char, index + 1);
|
|
24
|
+
index = closingQuote === -1 ? xml.length : closingQuote + 1;
|
|
25
|
+
continue;
|
|
26
|
+
}
|
|
27
|
+
if (char === ">") {
|
|
28
|
+
return index + 1;
|
|
29
|
+
}
|
|
30
|
+
index++;
|
|
31
|
+
}
|
|
32
|
+
return xml.length;
|
|
33
|
+
}
|
|
34
|
+
function nextTag(xml, from) {
|
|
35
|
+
let open = xml.indexOf("<", from);
|
|
36
|
+
while (open !== -1) {
|
|
37
|
+
TAG_NAME_RE.lastIndex = open;
|
|
38
|
+
const nameMatch = TAG_NAME_RE.exec(xml);
|
|
39
|
+
if (nameMatch) {
|
|
40
|
+
const end = findTagClose(xml, open);
|
|
41
|
+
const selfClosing = xml[end - 2] === "/";
|
|
42
|
+
return { closing: Boolean(nameMatch[1]), selfClosing, name: nameMatch[2], start: open, end };
|
|
43
|
+
}
|
|
44
|
+
open = xml.indexOf("<", open + 1);
|
|
45
|
+
}
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
function scanDirectChildren(inner) {
|
|
49
|
+
const children = [];
|
|
50
|
+
let depth = 0;
|
|
51
|
+
let open = null;
|
|
52
|
+
let cursor = 0;
|
|
53
|
+
let tag = nextTag(inner, cursor);
|
|
54
|
+
while (tag) {
|
|
55
|
+
if (tag.closing) {
|
|
56
|
+
depth = Math.max(0, depth - 1);
|
|
57
|
+
if (depth === 0 && open) {
|
|
58
|
+
children.push({ tag: open.tag, inner: inner.slice(open.innerStart, tag.start) });
|
|
59
|
+
open = null;
|
|
60
|
+
}
|
|
61
|
+
} else if (tag.selfClosing) {
|
|
62
|
+
if (depth === 0) {
|
|
63
|
+
children.push({ tag: tag.name, inner: "" });
|
|
64
|
+
}
|
|
65
|
+
} else {
|
|
66
|
+
if (depth === 0) {
|
|
67
|
+
open = { tag: tag.name, innerStart: tag.end };
|
|
68
|
+
}
|
|
69
|
+
depth++;
|
|
70
|
+
}
|
|
71
|
+
cursor = tag.end;
|
|
72
|
+
tag = nextTag(inner, cursor);
|
|
73
|
+
}
|
|
74
|
+
return children;
|
|
75
|
+
}
|
|
76
|
+
function extractElementInnerXml(xml, wanted) {
|
|
77
|
+
const fragments = [];
|
|
78
|
+
let cursor = 0;
|
|
79
|
+
let tag = nextTag(xml, cursor);
|
|
80
|
+
while (tag) {
|
|
81
|
+
if (tag.closing || localName(tag.name) !== wanted) {
|
|
82
|
+
cursor = tag.end;
|
|
83
|
+
tag = nextTag(xml, cursor);
|
|
84
|
+
continue;
|
|
85
|
+
}
|
|
86
|
+
if (tag.selfClosing) {
|
|
87
|
+
fragments.push("");
|
|
88
|
+
cursor = tag.end;
|
|
89
|
+
tag = nextTag(xml, cursor);
|
|
90
|
+
continue;
|
|
91
|
+
}
|
|
92
|
+
const innerStart = tag.end;
|
|
93
|
+
let depth = 1;
|
|
94
|
+
let inner = xml.slice(innerStart);
|
|
95
|
+
let nested = nextTag(xml, innerStart);
|
|
96
|
+
while (nested) {
|
|
97
|
+
if (localName(nested.name) === wanted) {
|
|
98
|
+
depth += nested.closing ? -1 : nested.selfClosing ? 0 : 1;
|
|
99
|
+
if (depth === 0) {
|
|
100
|
+
inner = xml.slice(innerStart, nested.start);
|
|
101
|
+
break;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
nested = nextTag(xml, nested.end);
|
|
105
|
+
}
|
|
106
|
+
fragments.push(inner);
|
|
107
|
+
cursor = nested ? nested.end : xml.length;
|
|
108
|
+
tag = nextTag(xml, cursor);
|
|
109
|
+
}
|
|
110
|
+
return fragments;
|
|
111
|
+
}
|
|
112
|
+
function isGroupedByTag(tags) {
|
|
113
|
+
const seen = /* @__PURE__ */ new Set();
|
|
114
|
+
let previous = "";
|
|
115
|
+
for (const tag of tags) {
|
|
116
|
+
if (tag !== previous && seen.has(tag)) {
|
|
117
|
+
return false;
|
|
118
|
+
}
|
|
119
|
+
seen.add(tag);
|
|
120
|
+
previous = tag;
|
|
121
|
+
}
|
|
122
|
+
return true;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// pptx/core/core/runtime/paragraph-sibling-order.ts
|
|
126
|
+
var childOrder = /* @__PURE__ */ new WeakMap();
|
|
127
|
+
var groupedParagraphs = /* @__PURE__ */ new WeakSet();
|
|
128
|
+
function hasOwnFontDeclaration(node) {
|
|
129
|
+
return xmlHasChild(node, "a:latin") || xmlHasChild(node, "a:ea") || xmlHasChild(node, "a:cs");
|
|
130
|
+
}
|
|
131
|
+
var MIXED_CONTENT_MARKERS = ["<a:fld", "<a:br", "m:oMath", "a14:m", "mc:AlternateContent"];
|
|
132
|
+
function tagSequenceSignature(tags) {
|
|
133
|
+
const counts = /* @__PURE__ */ new Map();
|
|
134
|
+
for (const tag of tags) {
|
|
135
|
+
counts.set(tag, (counts.get(tag) ?? 0) + 1);
|
|
136
|
+
}
|
|
137
|
+
return signatureOf(counts);
|
|
138
|
+
}
|
|
139
|
+
function parsedParagraphSignature(paragraph) {
|
|
140
|
+
const counts = /* @__PURE__ */ new Map();
|
|
141
|
+
for (const [key, value] of Object.entries(paragraph)) {
|
|
142
|
+
if (key.startsWith("@_") || key === "#text") {
|
|
143
|
+
continue;
|
|
144
|
+
}
|
|
145
|
+
counts.set(key, (counts.get(key) ?? 0) + ensureItems(value).length);
|
|
146
|
+
}
|
|
147
|
+
return signatureOf(counts);
|
|
148
|
+
}
|
|
149
|
+
function signatureOf(counts) {
|
|
150
|
+
return [...counts.entries()].sort((a, b) => a[0] < b[0] ? -1 : 1).map(([name, count]) => `${name}:${count}`).join(",");
|
|
151
|
+
}
|
|
152
|
+
function collectParsedParagraphs(root) {
|
|
153
|
+
const result = [];
|
|
154
|
+
const stack = [root];
|
|
155
|
+
while (stack.length > 0) {
|
|
156
|
+
const current = stack.pop();
|
|
157
|
+
if (!current || typeof current !== "object") {
|
|
158
|
+
continue;
|
|
159
|
+
}
|
|
160
|
+
if (Array.isArray(current)) {
|
|
161
|
+
for (let index = current.length - 1; index >= 0; index--) {
|
|
162
|
+
stack.push(current[index]);
|
|
163
|
+
}
|
|
164
|
+
continue;
|
|
165
|
+
}
|
|
166
|
+
for (const [key, value] of Object.entries(current).reverse()) {
|
|
167
|
+
if (key.startsWith("@_")) {
|
|
168
|
+
continue;
|
|
169
|
+
}
|
|
170
|
+
if (localName(key) === "p") {
|
|
171
|
+
for (const item of ensureItems(value)) {
|
|
172
|
+
if (isXmlObject(item)) {
|
|
173
|
+
result.push(item);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
} else {
|
|
177
|
+
stack.push(value);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
return result;
|
|
182
|
+
}
|
|
183
|
+
function annotateParagraphSiblingOrder(xml, parsed) {
|
|
184
|
+
if (!MIXED_CONTENT_MARKERS.some((marker) => xml.includes(marker))) {
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
const orders = extractElementInnerXml(xml, "p").map((inner) => scanDirectChildren(inner).map((child) => child.tag)).filter((order) => order.length > 0);
|
|
188
|
+
if (orders.length === 0) {
|
|
189
|
+
return;
|
|
190
|
+
}
|
|
191
|
+
const bySignature = /* @__PURE__ */ new Map();
|
|
192
|
+
for (const order of orders) {
|
|
193
|
+
const signature = tagSequenceSignature(order);
|
|
194
|
+
const bucket = bySignature.get(signature);
|
|
195
|
+
if (bucket) {
|
|
196
|
+
bucket.push(order);
|
|
197
|
+
} else {
|
|
198
|
+
bySignature.set(signature, [order]);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
for (const paragraph of collectParsedParagraphs(parsed)) {
|
|
202
|
+
const order = bySignature.get(parsedParagraphSignature(paragraph))?.shift();
|
|
203
|
+
if (!order) {
|
|
204
|
+
continue;
|
|
205
|
+
}
|
|
206
|
+
if (isGroupedByTag(order)) {
|
|
207
|
+
groupedParagraphs.add(paragraph);
|
|
208
|
+
} else {
|
|
209
|
+
childOrder.set(paragraph, order);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
function paragraphContentEntries(paragraph, contentTags) {
|
|
214
|
+
const order = childOrder.get(paragraph);
|
|
215
|
+
if (!order) {
|
|
216
|
+
const entries2 = Object.keys(paragraph).flatMap(
|
|
217
|
+
(key) => contentTags.has(key) ? ensureItems(paragraph[key]).map((item) => [key, item]) : []
|
|
218
|
+
);
|
|
219
|
+
return { entries: entries2, authored: groupedParagraphs.has(paragraph) };
|
|
220
|
+
}
|
|
221
|
+
const consumed = /* @__PURE__ */ new Map();
|
|
222
|
+
const entries = [];
|
|
223
|
+
for (const tag of order) {
|
|
224
|
+
const index = consumed.get(tag) ?? 0;
|
|
225
|
+
consumed.set(tag, index + 1);
|
|
226
|
+
if (!contentTags.has(tag)) {
|
|
227
|
+
continue;
|
|
228
|
+
}
|
|
229
|
+
const item = ensureItems(paragraph[tag])[index];
|
|
230
|
+
if (item !== void 0) {
|
|
231
|
+
entries.push([tag, item]);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
return { entries, authored: true };
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
export { annotateParagraphSiblingOrder, ensureItems, extractElementInnerXml, hasOwnFontDeclaration, isGroupedByTag, isXmlObject, localName, paragraphContentEntries, scanDirectChildren };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { hasTextProperties, isImageLikeElement, blobUrlToDataUrl, getSubstituteFontFamily, stripXmlOrderSuffix } from './chunk-
|
|
1
|
+
import { hasTextProperties, isImageLikeElement, blobUrlToDataUrl, getSubstituteFontFamily, stripXmlOrderSuffix } from './chunk-GZL4ERW3.mjs';
|
|
2
2
|
|
|
3
3
|
// pptx/converter/media-context.ts
|
|
4
4
|
var MIME_TO_EXT = {
|