ooxml-core 1.20.0 → 1.22.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 +35 -0
- package/dist/{PptxHandler-TEKISCJO.cjs → PptxHandler-DNSXWTQV.cjs} +3 -3
- package/dist/{PptxHandler-FYD7IYXT.mjs → PptxHandler-FSKKPZZC.mjs} +3 -3
- package/dist/PptxHandler-H7MEWJJJ.mjs +4 -0
- package/dist/{PresentationBuilder-IMB4DVRN.mjs → PresentationBuilder-7TSENZTX.mjs} +2 -2
- package/dist/{PresentationBuilder-NCKASKXU.cjs → PresentationBuilder-A5NI35VN.cjs} +5 -5
- package/dist/{PresentationBuilder-EYI6Z2JP.mjs → PresentationBuilder-RIJWQSEU.mjs} +3 -3
- package/dist/automation/docx-forms.d.ts +26 -0
- package/dist/automation/docx-forms.d.ts.map +1 -0
- package/dist/automation/index.cjs +39159 -14352
- package/dist/automation/index.d.ts +5 -0
- package/dist/automation/index.d.ts.map +1 -1
- package/dist/automation/index.mjs +39145 -14353
- package/dist/automation/node.cjs +37 -0
- package/dist/automation/node.d.ts +32 -1
- package/dist/automation/node.d.ts.map +1 -1
- package/dist/automation/node.mjs +36 -1
- package/dist/automation/proposal.d.ts +25 -0
- package/dist/automation/proposal.d.ts.map +1 -0
- package/dist/automation/tools/define.d.ts +27 -0
- package/dist/automation/tools/define.d.ts.map +1 -0
- package/dist/automation/tools/docx-tools.d.ts +4 -0
- package/dist/automation/tools/docx-tools.d.ts.map +1 -0
- package/dist/automation/tools/index.d.ts +16 -0
- package/dist/automation/tools/index.d.ts.map +1 -0
- package/dist/automation/tools/types.d.ts +52 -0
- package/dist/automation/tools/types.d.ts.map +1 -0
- package/dist/automation/tools/visio-tools.d.ts +4 -0
- package/dist/automation/tools/visio-tools.d.ts.map +1 -0
- package/dist/automation/tools/xlsx-tools.d.ts +8 -0
- package/dist/automation/tools/xlsx-tools.d.ts.map +1 -0
- package/dist/automation/xlsx-edits.d.ts +88 -0
- package/dist/automation/xlsx-edits.d.ts.map +1 -0
- package/dist/automation/xlsx-proposal.d.ts +34 -0
- package/dist/automation/xlsx-proposal.d.ts.map +1 -0
- package/dist/automation/xlsx.d.ts +10 -5
- package/dist/automation/xlsx.d.ts.map +1 -1
- package/dist/chart/axis-range.d.ts.map +1 -1
- package/dist/chart/bubble-radius.d.ts +0 -5
- package/dist/chart/bubble-radius.d.ts.map +1 -1
- package/dist/chart/extent.d.ts +9 -0
- package/dist/chart/extent.d.ts.map +1 -0
- package/dist/chart/histogram-binning.d.ts.map +1 -1
- package/dist/chart/index.cjs +56 -18
- package/dist/chart/index.mjs +56 -18
- package/dist/chart/render/chart-svg-cartesian.d.ts.map +1 -1
- package/dist/chart/render/chart-svg-legend.d.ts.map +1 -1
- package/dist/chart/render/chart-view-ex.d.ts.map +1 -1
- package/dist/chart/render/chart-view.d.ts.map +1 -1
- package/dist/chart/trendline-fit.d.ts.map +1 -1
- package/dist/{chunk-3IENHIFD.cjs → chunk-4LZIUJI3.cjs} +52 -12
- package/dist/{chunk-LEV2SVMK.mjs → chunk-4QPOJCJG.mjs} +45 -8
- package/dist/{chunk-CC5UNZOO.mjs → chunk-6IIMI5RS.mjs} +52 -12
- package/dist/{chunk-MN27HKHM.mjs → chunk-BA7Z6ATM.mjs} +5 -5
- package/dist/{chunk-LVM3IZJ2.mjs → chunk-DLFMCZZT.mjs} +1 -1
- package/dist/{chunk-M4XLF4R7.mjs → chunk-GBKBR4CX.mjs} +20 -8
- package/dist/{chunk-NXKATFM5.cjs → chunk-HL3FBJ6X.cjs} +1065 -1016
- package/dist/{chunk-WXY5EDGT.mjs → chunk-LF5E5ZOH.mjs} +51 -2
- package/dist/chunk-MHNETXQB.mjs +1 -0
- package/dist/{chunk-MNXKRXFB.mjs → chunk-Q5PKBQXH.mjs} +52 -3
- package/dist/{chunk-GQYQQ3GA.mjs → chunk-VQF6HQEE.mjs} +1 -1
- package/dist/collab/embedding.d.ts +108 -0
- package/dist/collab/embedding.d.ts.map +1 -0
- package/dist/collab/index.cjs +423 -293
- package/dist/collab/index.d.ts +2 -0
- package/dist/collab/index.d.ts.map +1 -1
- package/dist/collab/index.mjs +415 -294
- package/dist/collab/webrtc-provider.d.ts +21 -0
- package/dist/collab/webrtc-provider.d.ts.map +1 -0
- package/dist/color/theme-palette.d.ts +5 -1
- package/dist/color/theme-palette.d.ts.map +1 -1
- package/dist/crypto/index.cjs +27 -2
- package/dist/crypto/index.mjs +27 -2
- package/dist/diagram/index.cjs +31 -3
- package/dist/diagram/index.mjs +31 -3
- package/dist/docx/block-parser.d.ts.map +1 -1
- package/dist/docx/cell-blocks.d.ts +7 -1
- package/dist/docx/cell-blocks.d.ts.map +1 -1
- package/dist/docx/content-control-edit.d.ts +14 -0
- package/dist/docx/content-control-edit.d.ts.map +1 -1
- package/dist/docx/content-control-model.d.ts +8 -0
- package/dist/docx/content-control-model.d.ts.map +1 -1
- package/dist/docx/content-control-values.d.ts +20 -0
- package/dist/docx/content-control-values.d.ts.map +1 -0
- package/dist/docx/content-control.d.ts +7 -1
- package/dist/docx/content-control.d.ts.map +1 -1
- package/dist/docx/element-order.d.ts +10 -5
- package/dist/docx/element-order.d.ts.map +1 -1
- package/dist/docx/embedded.cjs +3861 -1379
- package/dist/docx/embedded.mjs +3861 -1379
- package/dist/docx/field-instruction.d.ts +22 -0
- package/dist/docx/field-instruction.d.ts.map +1 -0
- package/dist/docx/form-field-model.d.ts +48 -0
- package/dist/docx/form-field-model.d.ts.map +1 -0
- package/dist/docx/form-fields.d.ts +31 -0
- package/dist/docx/form-fields.d.ts.map +1 -0
- package/dist/docx/form-fill-fields.d.ts +61 -0
- package/dist/docx/form-fill-fields.d.ts.map +1 -0
- package/dist/docx/form-fill-labels.d.ts +8 -0
- package/dist/docx/form-fill-labels.d.ts.map +1 -0
- package/dist/docx/form-fill-sites.d.ts +59 -0
- package/dist/docx/form-fill-sites.d.ts.map +1 -0
- package/dist/docx/form-fill-values.d.ts +28 -0
- package/dist/docx/form-fill-values.d.ts.map +1 -0
- package/dist/docx/form-fill-write.d.ts +26 -0
- package/dist/docx/form-fill-write.d.ts.map +1 -0
- package/dist/docx/glossary.d.ts +15 -0
- package/dist/docx/glossary.d.ts.map +1 -0
- package/dist/docx/index.cjs +5929 -3153
- package/dist/docx/index.d.ts +7 -0
- package/dist/docx/index.d.ts.map +1 -1
- package/dist/docx/index.mjs +5913 -3154
- package/dist/docx/inline-annotations.d.ts +21 -0
- package/dist/docx/inline-annotations.d.ts.map +1 -0
- package/dist/docx/inline-container-markers.d.ts +14 -0
- package/dist/docx/inline-container-markers.d.ts.map +1 -0
- package/dist/docx/inline-containers.d.ts +54 -0
- package/dist/docx/inline-containers.d.ts.map +1 -0
- package/dist/docx/inline-form-field-bookmarks.d.ts +15 -0
- package/dist/docx/inline-form-field-bookmarks.d.ts.map +1 -0
- package/dist/docx/inline-marker-positions.d.ts +15 -0
- package/dist/docx/inline-marker-positions.d.ts.map +1 -0
- package/dist/docx/inline-markers.d.ts +63 -0
- package/dist/docx/inline-markers.d.ts.map +1 -0
- package/dist/docx/inline-slots.d.ts +24 -0
- package/dist/docx/inline-slots.d.ts.map +1 -0
- package/dist/docx/layout/adapter.d.ts.map +1 -1
- package/dist/docx/layout/index.cjs +1176 -563
- package/dist/docx/layout/index.d.ts +2 -1
- package/dist/docx/layout/index.d.ts.map +1 -1
- package/dist/docx/layout/index.mjs +1175 -564
- package/dist/docx/layout/input.d.ts +5 -1
- package/dist/docx/layout/input.d.ts.map +1 -1
- package/dist/docx/layout/page-style-refs.d.ts +21 -0
- package/dist/docx/layout/page-style-refs.d.ts.map +1 -0
- package/dist/docx/layout/paragraph-fragments.d.ts.map +1 -1
- package/dist/docx/layout/result.d.ts +1 -0
- package/dist/docx/layout/result.d.ts.map +1 -1
- package/dist/docx/layout/tab-stops.d.ts +8 -1
- package/dist/docx/layout/tab-stops.d.ts.map +1 -1
- package/dist/docx/load/index.cjs +3969 -1487
- package/dist/docx/load/index.mjs +3969 -1487
- package/dist/docx/model-run.d.ts +24 -2
- package/dist/docx/model-run.d.ts.map +1 -1
- package/dist/docx/model.d.ts +5 -0
- package/dist/docx/model.d.ts.map +1 -1
- package/dist/docx/numbering-format.d.ts.map +1 -1
- package/dist/docx/parse-warnings.d.ts.map +1 -1
- package/dist/docx/parse.d.ts.map +1 -1
- package/dist/docx/run-segmentation.d.ts +11 -0
- package/dist/docx/run-segmentation.d.ts.map +1 -0
- package/dist/docx/save.d.ts.map +1 -1
- package/dist/docx/section-model.d.ts +5 -0
- package/dist/docx/section-model.d.ts.map +1 -1
- package/dist/docx/sections.d.ts +4 -2
- package/dist/docx/sections.d.ts.map +1 -1
- package/dist/docx/settings.d.ts +9 -0
- package/dist/docx/settings.d.ts.map +1 -1
- package/dist/docx/special-characters.d.ts +34 -0
- package/dist/docx/special-characters.d.ts.map +1 -0
- package/dist/docx/style-ref-fields.d.ts +40 -0
- package/dist/docx/style-ref-fields.d.ts.map +1 -0
- package/dist/docx/style-ref.d.ts +85 -0
- package/dist/docx/style-ref.d.ts.map +1 -0
- package/dist/docx/table-model.d.ts +2 -2
- package/dist/docx/table-model.d.ts.map +1 -1
- package/dist/docx/ui/break-note-schema.d.ts.map +1 -1
- package/dist/docx/ui/content-control-commands.d.ts +20 -8
- package/dist/docx/ui/content-control-commands.d.ts.map +1 -1
- package/dist/docx/ui/content-control-guard.d.ts +4 -1
- package/dist/docx/ui/content-control-guard.d.ts.map +1 -1
- package/dist/docx/ui/content-control-paste.d.ts +23 -0
- package/dist/docx/ui/content-control-paste.d.ts.map +1 -0
- package/dist/docx/ui/content-control-rows.d.ts +15 -0
- package/dist/docx/ui/content-control-rows.d.ts.map +1 -0
- package/dist/docx/ui/content-control-sources.d.ts +12 -0
- package/dist/docx/ui/content-control-sources.d.ts.map +1 -0
- package/dist/docx/ui/content-control-spans.d.ts +29 -6
- package/dist/docx/ui/content-control-spans.d.ts.map +1 -1
- package/dist/docx/ui/content-control-temporary.d.ts +10 -0
- package/dist/docx/ui/content-control-temporary.d.ts.map +1 -0
- package/dist/docx/ui/form-field-commands.d.ts +41 -0
- package/dist/docx/ui/form-field-commands.d.ts.map +1 -0
- package/dist/docx/ui/form-field-guard.d.ts +24 -0
- package/dist/docx/ui/form-field-guard.d.ts.map +1 -0
- package/dist/docx/ui/form-text-blank.d.ts +18 -0
- package/dist/docx/ui/form-text-blank.d.ts.map +1 -0
- package/dist/docx/ui/index.cjs +9276 -7132
- package/dist/docx/ui/index.d.ts +5 -0
- package/dist/docx/ui/index.d.ts.map +1 -1
- package/dist/docx/ui/index.mjs +9259 -7137
- package/dist/docx/ui/positional-tab-input.d.ts +7 -0
- package/dist/docx/ui/positional-tab-input.d.ts.map +1 -0
- package/dist/docx/ui/run-compare.d.ts.map +1 -1
- package/dist/docx/ui/run-extra-mark.d.ts +1 -1
- package/dist/docx/ui/run-extra-mark.d.ts.map +1 -1
- package/dist/docx/ui/schema-marks.d.ts +1 -1
- package/dist/docx/ui/schema-marks.d.ts.map +1 -1
- package/dist/docx/ui/symbol-font.d.ts +4 -0
- package/dist/docx/ui/symbol-font.d.ts.map +1 -0
- package/dist/docx/ui/yjs-collaboration.d.ts +12 -1
- package/dist/docx/ui/yjs-collaboration.d.ts.map +1 -1
- package/dist/docx/write-block-placement.d.ts +7 -0
- package/dist/docx/write-block-placement.d.ts.map +1 -1
- package/dist/docx/write-content-control.d.ts +6 -0
- package/dist/docx/write-content-control.d.ts.map +1 -1
- package/dist/docx/write-header-footer.d.ts +6 -2
- package/dist/docx/write-header-footer.d.ts.map +1 -1
- package/dist/docx/write-inline.d.ts +12 -16
- package/dist/docx/write-inline.d.ts.map +1 -1
- package/dist/docx/write-paragraph.d.ts.map +1 -1
- package/dist/docx/write-revisions.d.ts.map +1 -1
- package/dist/docx/write-run.d.ts.map +1 -1
- package/dist/docx/write-section-properties.d.ts +5 -0
- package/dist/docx/write-section-properties.d.ts.map +1 -0
- package/dist/docx/write-sections.d.ts.map +1 -1
- package/dist/docx/write-table-controls.d.ts +15 -0
- package/dist/docx/write-table-controls.d.ts.map +1 -0
- package/dist/docx/write-table-properties.d.ts.map +1 -1
- package/dist/docx/write-table.d.ts.map +1 -1
- package/dist/docx/write.d.ts.map +1 -1
- package/dist/docx/xml.d.ts +6 -0
- package/dist/docx/xml.d.ts.map +1 -1
- package/dist/drawingml/index.cjs +31 -3
- package/dist/drawingml/index.mjs +31 -3
- package/dist/index.cjs +77 -26
- package/dist/index.mjs +77 -26
- package/dist/math/index.cjs +27 -2
- package/dist/math/index.mjs +27 -2
- package/dist/opc/index.cjs +51 -11
- package/dist/opc/index.mjs +51 -11
- package/dist/opc/zip-folders.d.ts +11 -0
- package/dist/opc/zip-folders.d.ts.map +1 -0
- package/dist/opc/zip-limits.d.ts +9 -0
- package/dist/opc/zip-limits.d.ts.map +1 -1
- package/dist/pptx/automation/index.cjs +28818 -7388
- package/dist/pptx/automation/index.d.ts +93 -3
- package/dist/pptx/automation/index.d.ts.map +1 -1
- package/dist/pptx/automation/index.mjs +740 -63
- package/dist/pptx/automation/schemas/chart-formatting-schemas.d.ts +1 -1
- package/dist/pptx/automation/schemas/chart-schemas.d.ts +1 -1
- package/dist/pptx/automation/schemas/chart-user-shape-schemas.d.ts +1 -1
- package/dist/pptx/automation/schemas/element-schemas.d.ts +1 -1
- package/dist/pptx/automation/schemas/export-schemas.d.ts +1 -1
- package/dist/pptx/automation/schemas/geometry-schemas.d.ts +1 -1
- package/dist/pptx/automation/schemas/hyperlink-schemas.d.ts +1 -1
- package/dist/pptx/automation/schemas/index.mjs +1 -0
- package/dist/pptx/automation/schemas/json-schemas.d.ts +1 -1
- package/dist/pptx/automation/schemas/layout-schemas.d.ts +1 -1
- package/dist/pptx/automation/schemas/lock-schemas.d.ts +1 -1
- package/dist/pptx/automation/schemas/metadata-schemas.d.ts +1 -1
- package/dist/pptx/automation/schemas/ole-schemas.d.ts +1 -1
- package/dist/pptx/automation/schemas/presentation-schemas.d.ts +1 -1
- package/dist/pptx/automation/schemas/section-schemas.d.ts +1 -1
- package/dist/pptx/automation/schemas/slide-schemas.d.ts +1 -1
- package/dist/pptx/automation/schemas/smartart-schemas.d.ts +1 -1
- package/dist/pptx/automation/schemas/table-style-schemas.d.ts +1 -1
- package/dist/pptx/automation/schemas/template-schemas.d.ts +1 -1
- package/dist/pptx/automation/schemas/theme-schemas.d.ts +1 -1
- package/dist/pptx/automation/schemas/validation-schemas.d.ts +1 -1
- package/dist/pptx/chunks/{index-CgFX0T7b.d.ts → index-CPhsd7Df.d.ts} +9 -1
- package/dist/pptx/chunks/{index-CgFX0T7b.d.ts.map → index-CPhsd7Df.d.ts.map} +1 -1
- package/dist/pptx/chunks/{index-qwVYoFn6.d.ts → index-Q5mM8kIR.d.ts} +2 -2
- package/dist/pptx/chunks/{index-qwVYoFn6.d.ts.map → index-Q5mM8kIR.d.ts.map} +1 -1
- package/dist/pptx/chunks/{schemas-CWr181Wx.d.ts → schemas-fuDGetRe.d.ts} +2 -2
- package/dist/pptx/chunks/{schemas-CWr181Wx.d.ts.map → schemas-fuDGetRe.d.ts.map} +1 -1
- package/dist/pptx/cli/index.cjs +116 -17
- package/dist/pptx/cli/index.mjs +5 -5
- package/dist/pptx/converter/index.cjs +12 -3
- package/dist/pptx/converter/index.d.ts +1 -1
- package/dist/pptx/converter/index.mjs +3 -3
- package/dist/pptx/editor/render/find-replace.cjs +14 -14
- package/dist/pptx/editor/render/find-replace.d.ts +1 -1
- package/dist/pptx/editor/render/find-replace.mjs +1 -1
- package/dist/pptx/editor/render/slide-operations.cjs +8 -8
- package/dist/pptx/editor/render/slide-operations.mjs +2 -2
- package/dist/pptx/index.cjs +116 -17
- package/dist/pptx/index.d.ts +2 -2
- package/dist/pptx/index.mjs +6 -6
- package/dist/pptx/signature-node/index.cjs +20 -8
- package/dist/pptx/signature-node/index.mjs +2 -2
- package/dist/teams/index.cjs +105 -70
- package/dist/teams/index.mjs +105 -70
- package/dist/text/text-diff.d.ts +15 -0
- package/dist/text/text-diff.d.ts.map +1 -0
- package/dist/visio/collab/bind.d.ts +44 -0
- package/dist/visio/collab/bind.d.ts.map +1 -0
- package/dist/visio/collab/compose.d.ts +15 -0
- package/dist/visio/collab/compose.d.ts.map +1 -0
- package/dist/visio/collab/index.cjs +1194 -0
- package/dist/visio/collab/index.d.ts +8 -0
- package/dist/visio/collab/index.d.ts.map +1 -0
- package/dist/visio/collab/index.mjs +1152 -0
- package/dist/visio/collab/keys.d.ts +22 -0
- package/dist/visio/collab/keys.d.ts.map +1 -0
- package/dist/visio/collab/order.d.ts +11 -0
- package/dist/visio/collab/order.d.ts.map +1 -0
- package/dist/visio/collab/package.d.ts +37 -0
- package/dist/visio/collab/package.d.ts.map +1 -0
- package/dist/visio/collab/read.d.ts +41 -0
- package/dist/visio/collab/read.d.ts.map +1 -0
- package/dist/visio/collab/scan.d.ts +28 -0
- package/dist/visio/collab/scan.d.ts.map +1 -0
- package/dist/visio/collab/schema.d.ts +70 -0
- package/dist/visio/collab/schema.d.ts.map +1 -0
- package/dist/visio/collab/snapshot.d.ts +61 -0
- package/dist/visio/collab/snapshot.d.ts.map +1 -0
- package/dist/visio/collab/write.d.ts +20 -0
- package/dist/visio/collab/write.d.ts.map +1 -0
- package/dist/visio/index.cjs +159 -39
- package/dist/visio/index.mjs +159 -39
- package/dist/visio/ui/collab-options.d.ts +24 -0
- package/dist/visio/ui/collab-options.d.ts.map +1 -0
- package/dist/visio/ui/collab-presence.d.ts +31 -0
- package/dist/visio/ui/collab-presence.d.ts.map +1 -0
- package/dist/visio/ui/contract.d.ts +9 -3
- package/dist/visio/ui/contract.d.ts.map +1 -1
- package/dist/visio/ui/document-history.d.ts +3 -1
- package/dist/visio/ui/document-history.d.ts.map +1 -1
- package/dist/visio/ui/index.cjs +284 -95
- package/dist/visio/ui/index.d.ts +2 -0
- package/dist/visio/ui/index.d.ts.map +1 -1
- package/dist/visio/ui/index.mjs +278 -95
- package/dist/xlsx/collab/index.cjs +8 -3
- package/dist/xlsx/collab/index.mjs +8 -3
- package/dist/xlsx/compare/cells.d.ts +22 -0
- package/dist/xlsx/compare/cells.d.ts.map +1 -0
- package/dist/xlsx/compare/compare.d.ts +12 -0
- package/dist/xlsx/compare/compare.d.ts.map +1 -0
- package/dist/xlsx/compare/conditional.d.ts +7 -0
- package/dist/xlsx/compare/conditional.d.ts.map +1 -0
- package/dist/xlsx/compare/format-key.d.ts +34 -0
- package/dist/xlsx/compare/format-key.d.ts.map +1 -0
- package/dist/xlsx/compare/group.d.ts +8 -0
- package/dist/xlsx/compare/group.d.ts.map +1 -0
- package/dist/xlsx/compare/index.d.ts +5 -0
- package/dist/xlsx/compare/index.d.ts.map +1 -0
- package/dist/xlsx/compare/rich-text.d.ts +7 -0
- package/dist/xlsx/compare/rich-text.d.ts.map +1 -0
- package/dist/xlsx/compare/sheets.d.ts +22 -0
- package/dist/xlsx/compare/sheets.d.ts.map +1 -0
- package/dist/xlsx/compare/structure.d.ts +11 -0
- package/dist/xlsx/compare/structure.d.ts.map +1 -0
- package/dist/xlsx/compare/text.d.ts +8 -0
- package/dist/xlsx/compare/text.d.ts.map +1 -0
- package/dist/xlsx/compare/types.d.ts +173 -0
- package/dist/xlsx/compare/types.d.ts.map +1 -0
- package/dist/xlsx/edit/cell-values.d.ts.map +1 -1
- package/dist/xlsx/edit/clipboard-html.d.ts.map +1 -1
- package/dist/xlsx/edit/clipboard-text.d.ts.map +1 -1
- package/dist/xlsx/edit/clipboard.d.ts.map +1 -1
- package/dist/xlsx/edit/clone-cell.d.ts +9 -0
- package/dist/xlsx/edit/clone-cell.d.ts.map +1 -0
- package/dist/xlsx/edit/history.d.ts +8 -3
- package/dist/xlsx/edit/history.d.ts.map +1 -1
- package/dist/xlsx/edit/timelines.d.ts.map +1 -1
- package/dist/xlsx/formula/change-areas.d.ts +9 -0
- package/dist/xlsx/formula/change-areas.d.ts.map +1 -0
- package/dist/xlsx/formula/engine-prepare.d.ts +8 -0
- package/dist/xlsx/formula/engine-prepare.d.ts.map +1 -1
- package/dist/xlsx/formula/engine.d.ts.map +1 -1
- package/dist/xlsx/formula/spill.d.ts +5 -1
- package/dist/xlsx/formula/spill.d.ts.map +1 -1
- package/dist/xlsx/index.cjs +2461 -1192
- package/dist/xlsx/index.d.ts +1 -0
- package/dist/xlsx/index.d.ts.map +1 -1
- package/dist/xlsx/index.mjs +2454 -1193
- package/dist/xlsx/layout/cell-view.d.ts.map +1 -1
- package/dist/xlsx/layout/navigate.d.ts.map +1 -1
- package/dist/xlsx/layout/style-view.d.ts +5 -0
- package/dist/xlsx/layout/style-view.d.ts.map +1 -1
- package/dist/xlsx/load/csv-dates.d.ts +22 -0
- package/dist/xlsx/load/csv-dates.d.ts.map +1 -0
- package/dist/xlsx/load/csv-import.d.ts +64 -0
- package/dist/xlsx/load/csv-import.d.ts.map +1 -0
- package/dist/xlsx/load/csv-separators.d.ts +13 -0
- package/dist/xlsx/load/csv-separators.d.ts.map +1 -0
- package/dist/xlsx/load/csv-traits.d.ts +20 -0
- package/dist/xlsx/load/csv-traits.d.ts.map +1 -0
- package/dist/xlsx/load/csv.d.ts +8 -4
- package/dist/xlsx/load/csv.d.ts.map +1 -1
- package/dist/xlsx/load/detect.d.ts +13 -0
- package/dist/xlsx/load/detect.d.ts.map +1 -1
- package/dist/xlsx/load/errors.d.ts +1 -0
- package/dist/xlsx/load/errors.d.ts.map +1 -1
- package/dist/xlsx/load/index.cjs +537 -91
- package/dist/xlsx/load/index.d.ts +3 -1
- package/dist/xlsx/load/index.d.ts.map +1 -1
- package/dist/xlsx/load/index.mjs +536 -92
- package/dist/xlsx/numfmt/input-date.d.ts +2 -0
- package/dist/xlsx/numfmt/input-date.d.ts.map +1 -1
- package/dist/xlsx/pivot/cache-xml.d.ts.map +1 -1
- package/dist/xlsx/pivot/groups.d.ts.map +1 -1
- package/dist/xlsx/read/index.d.ts +2 -1
- package/dist/xlsx/read/index.d.ts.map +1 -1
- package/dist/xlsx/read/limits.d.ts +50 -0
- package/dist/xlsx/read/limits.d.ts.map +1 -0
- package/dist/xlsx/read/load.d.ts +11 -1
- package/dist/xlsx/read/load.d.ts.map +1 -1
- package/dist/xlsx/read/package.d.ts +5 -23
- package/dist/xlsx/read/package.d.ts.map +1 -1
- package/dist/xlsx/read/shared-strings.d.ts +2 -2
- package/dist/xlsx/read/shared-strings.d.ts.map +1 -1
- package/dist/xlsx/read/worksheet.d.ts +2 -0
- package/dist/xlsx/read/worksheet.d.ts.map +1 -1
- package/dist/xlsx/stable-key.d.ts +3 -0
- package/dist/xlsx/stable-key.d.ts.map +1 -0
- package/dist/xlsx/styles.d.ts.map +1 -1
- package/dist/xlsx/ui/index.cjs +662 -372
- package/dist/xlsx/ui/index.mjs +662 -372
- package/dist/xlsx/ui/locales/de/shell.d.ts.map +1 -1
- package/dist/xlsx/ui/locales/en/shell.d.ts.map +1 -1
- package/dist/xlsx/ui/locales/es/shell.d.ts.map +1 -1
- package/dist/xlsx/ui/locales/fr/shell.d.ts.map +1 -1
- package/dist/xlsx/ui/locales/zh-CN/shell.d.ts.map +1 -1
- package/dist/xlsx/write/sheet-props.d.ts.map +1 -1
- package/dist/xml/index.cjs +32 -3
- package/dist/xml/index.mjs +32 -4
- package/dist/xml/xml.d.ts +11 -1
- package/dist/xml/xml.d.ts.map +1 -1
- package/package.json +6 -1
- package/dist/PptxHandler-SITN3K3F.mjs +0 -4
package/dist/pptx/cli/index.cjs
CHANGED
|
@@ -81,17 +81,24 @@ var init_type_guards = __esm({
|
|
|
81
81
|
function stripFontStyleSuffix(fontName) {
|
|
82
82
|
let name = fontName.trim();
|
|
83
83
|
let stripped = false;
|
|
84
|
-
|
|
84
|
+
let previous = "";
|
|
85
|
+
let tokens = 0;
|
|
86
|
+
for (; ; ) {
|
|
85
87
|
const idx = name.lastIndexOf(" ");
|
|
86
88
|
if (idx <= 0) {
|
|
87
89
|
break;
|
|
88
90
|
}
|
|
89
91
|
const token2 = name.slice(idx + 1).toLowerCase().replace(/-/g, "");
|
|
90
|
-
|
|
92
|
+
const prefix = FONT_WEIGHT_PREFIX_TOKENS.has(token2) && FONT_PREFIXED_WEIGHT_TOKENS.has(previous);
|
|
93
|
+
if (!prefix && (tokens >= 2 || !FONT_STYLE_SUFFIX_TOKENS.has(token2))) {
|
|
91
94
|
break;
|
|
92
95
|
}
|
|
93
96
|
name = name.slice(0, idx).trim();
|
|
94
97
|
stripped = true;
|
|
98
|
+
previous = prefix ? "" : token2;
|
|
99
|
+
if (!prefix) {
|
|
100
|
+
tokens++;
|
|
101
|
+
}
|
|
95
102
|
}
|
|
96
103
|
return stripped && name.length > 0 ? name : void 0;
|
|
97
104
|
}
|
|
@@ -132,7 +139,7 @@ function quoteFontName(name) {
|
|
|
132
139
|
}
|
|
133
140
|
return `"${trimmed2}"`;
|
|
134
141
|
}
|
|
135
|
-
var FONT_SUBSTITUTION_MAP, FONT_STYLE_SUFFIX_TOKENS, CSS_GENERIC_FAMILIES;
|
|
142
|
+
var FONT_SUBSTITUTION_MAP, FONT_STYLE_SUFFIX_TOKENS, FONT_WEIGHT_PREFIX_TOKENS, FONT_PREFIXED_WEIGHT_TOKENS, CSS_GENERIC_FAMILIES;
|
|
136
143
|
var init_font_substitution = __esm({
|
|
137
144
|
"pptx/core/utils/font-substitution.ts"() {
|
|
138
145
|
FONT_SUBSTITUTION_MAP = {
|
|
@@ -320,6 +327,8 @@ var init_font_substitution = __esm({
|
|
|
320
327
|
"italic",
|
|
321
328
|
"oblique"
|
|
322
329
|
]);
|
|
330
|
+
FONT_WEIGHT_PREFIX_TOKENS = /* @__PURE__ */ new Set(["semi", "demi", "extra", "ultra"]);
|
|
331
|
+
FONT_PREFIXED_WEIGHT_TOKENS = /* @__PURE__ */ new Set(["bold", "light", "black"]);
|
|
323
332
|
CSS_GENERIC_FAMILIES = /* @__PURE__ */ new Set([
|
|
324
333
|
"serif",
|
|
325
334
|
"sans-serif",
|
|
@@ -10382,7 +10391,7 @@ function getShapeType(shapeType) {
|
|
|
10382
10391
|
if (normalized === "downarrow") {
|
|
10383
10392
|
return "downArrow";
|
|
10384
10393
|
}
|
|
10385
|
-
if (normalized.includes("connector")) {
|
|
10394
|
+
if (normalized.includes("connector") && !normalized.startsWith("flowchart")) {
|
|
10386
10395
|
return "connector";
|
|
10387
10396
|
}
|
|
10388
10397
|
if (PRESET_SHAPE_CLIP_PATHS[normalized] !== void 0) {
|
|
@@ -14686,7 +14695,7 @@ function resolveLimits(limits) {
|
|
|
14686
14695
|
maxEntryBytes: limits.maxEntryBytes ?? DEFAULT_ZIP_LIMITS.maxEntryBytes,
|
|
14687
14696
|
maxTotalBytes: limits.maxTotalBytes ?? DEFAULT_ZIP_LIMITS.maxTotalBytes,
|
|
14688
14697
|
label: limits.label ?? "ZIP",
|
|
14689
|
-
fail: (message, limit) => create ? create(message, { limit }) : new ZipLimitError(message, { limit })
|
|
14698
|
+
fail: (message, limit, kind) => create ? create(message, { limit, kind }) : new ZipLimitError(message, { limit, kind })
|
|
14690
14699
|
};
|
|
14691
14700
|
}
|
|
14692
14701
|
function inflateEntryGuarded(entry2, alreadyRead, limits) {
|
|
@@ -14709,13 +14718,18 @@ function inflateEntryGuarded(entry2, alreadyRead, limits) {
|
|
|
14709
14718
|
size += chunk2.byteLength;
|
|
14710
14719
|
if (size > declared || size > r.maxEntryBytes)
|
|
14711
14720
|
return abort(
|
|
14712
|
-
r.fail(
|
|
14721
|
+
r.fail(
|
|
14722
|
+
`${r.label} part ${entry2.name} inflates past its declared size`,
|
|
14723
|
+
r.maxEntryBytes,
|
|
14724
|
+
size > declared ? "declaredSize" : "maxEntryBytes"
|
|
14725
|
+
)
|
|
14713
14726
|
);
|
|
14714
14727
|
if (alreadyRead + size > r.maxTotalBytes)
|
|
14715
14728
|
return abort(
|
|
14716
14729
|
r.fail(
|
|
14717
14730
|
`${r.label} package exceeds the ${mib(r.maxTotalBytes)} MiB uncompressed content limit`,
|
|
14718
|
-
r.maxTotalBytes
|
|
14731
|
+
r.maxTotalBytes,
|
|
14732
|
+
"maxTotalBytes"
|
|
14719
14733
|
)
|
|
14720
14734
|
);
|
|
14721
14735
|
chunks.push(chunk2);
|
|
@@ -14748,26 +14762,29 @@ function guardZip(zip, limits = {}) {
|
|
|
14748
14762
|
if (entries.length > r.maxEntries)
|
|
14749
14763
|
throw r.fail(
|
|
14750
14764
|
`${r.label} package exceeds the ${r.maxEntries.toLocaleString("en-US")} part limit`,
|
|
14751
|
-
r.maxEntries
|
|
14765
|
+
r.maxEntries,
|
|
14766
|
+
"maxEntries"
|
|
14752
14767
|
);
|
|
14753
14768
|
let declared = 0;
|
|
14754
14769
|
for (const entry2 of entries) {
|
|
14755
14770
|
const original = entry2.unsafeOriginalName;
|
|
14756
14771
|
if (!isSafePartName(entry2.name) || original !== void 0 && !isSafePartName(original))
|
|
14757
|
-
throw r.fail(`${r.label} package has an unsafe part name`, r.maxEntries);
|
|
14772
|
+
throw r.fail(`${r.label} package has an unsafe part name`, r.maxEntries, "partName");
|
|
14758
14773
|
if (entry2.dir) continue;
|
|
14759
14774
|
const size = declaredEntrySize(entry2);
|
|
14760
14775
|
if (size > r.maxEntryBytes)
|
|
14761
14776
|
throw r.fail(
|
|
14762
14777
|
`${r.label} part ${entry2.name} exceeds the uncompressed part size limit`,
|
|
14763
|
-
r.maxEntryBytes
|
|
14778
|
+
r.maxEntryBytes,
|
|
14779
|
+
"maxEntryBytes"
|
|
14764
14780
|
);
|
|
14765
14781
|
declared += size;
|
|
14766
14782
|
}
|
|
14767
14783
|
if (declared > r.maxTotalBytes)
|
|
14768
14784
|
throw r.fail(
|
|
14769
14785
|
`${r.label} package exceeds the ${mib(r.maxTotalBytes)} MiB uncompressed content limit`,
|
|
14770
|
-
r.maxTotalBytes
|
|
14786
|
+
r.maxTotalBytes,
|
|
14787
|
+
"maxTotalBytes"
|
|
14771
14788
|
);
|
|
14772
14789
|
const produced = /* @__PURE__ */ new Map();
|
|
14773
14790
|
let total = 0;
|
|
@@ -14805,7 +14822,8 @@ async function openZip(input, limits = {}) {
|
|
|
14805
14822
|
if (bytes.byteLength > maxInput)
|
|
14806
14823
|
throw r.fail(
|
|
14807
14824
|
`${r.label} package exceeds the ${mib(maxInput)} MiB compressed input limit`,
|
|
14808
|
-
maxInput
|
|
14825
|
+
maxInput,
|
|
14826
|
+
"maxInputBytes"
|
|
14809
14827
|
);
|
|
14810
14828
|
return guardZip(await JSZip__default.default.loadAsync(bytes), limits);
|
|
14811
14829
|
}
|
|
@@ -14821,10 +14839,13 @@ var init_zip_limits = __esm({
|
|
|
14821
14839
|
ZipLimitError = class extends Error {
|
|
14822
14840
|
code = "ZIP_BOMB";
|
|
14823
14841
|
limit;
|
|
14842
|
+
/** The check that failed (absent when the error was built without one). */
|
|
14843
|
+
kind;
|
|
14824
14844
|
constructor(message, details) {
|
|
14825
14845
|
super(message);
|
|
14826
14846
|
this.name = "ZipLimitError";
|
|
14827
14847
|
this.limit = details.limit;
|
|
14848
|
+
this.kind = details.kind;
|
|
14828
14849
|
}
|
|
14829
14850
|
};
|
|
14830
14851
|
mib = (bytes) => Math.round(bytes / 1048576);
|
|
@@ -33278,9 +33299,18 @@ function checkXmlLimits(xml, label, limits = {}) {
|
|
|
33278
33299
|
continue;
|
|
33279
33300
|
}
|
|
33280
33301
|
nodes++;
|
|
33281
|
-
if (nodes > maxNodes)
|
|
33302
|
+
if (nodes > maxNodes)
|
|
33303
|
+
throw new XmlLimitError(
|
|
33304
|
+
`${label} XML exceeds the limit of ${maxNodes} elements`,
|
|
33305
|
+
"maxNodes",
|
|
33306
|
+
maxNodes
|
|
33307
|
+
);
|
|
33282
33308
|
if (!selfClosing && ++depth > maxDepth2)
|
|
33283
|
-
throw new
|
|
33309
|
+
throw new XmlLimitError(
|
|
33310
|
+
`${label} XML exceeds the nesting depth limit of ${maxDepth2}`,
|
|
33311
|
+
"maxDepth",
|
|
33312
|
+
maxDepth2
|
|
33313
|
+
);
|
|
33284
33314
|
}
|
|
33285
33315
|
}
|
|
33286
33316
|
function parseXml(xml, options = {}) {
|
|
@@ -33304,6 +33334,7 @@ function parseXml(xml, options = {}) {
|
|
|
33304
33334
|
}
|
|
33305
33335
|
if (parseError || !parsed.documentElement)
|
|
33306
33336
|
throw new Error(`Invalid ${label} XML: ${parseError || "missing root element"}`);
|
|
33337
|
+
if (CRLF_DECLARATION.test(xml)) crlfDeclarations.add(parsed);
|
|
33307
33338
|
return parsed;
|
|
33308
33339
|
}
|
|
33309
33340
|
function named(element, local, ns, lenient = true) {
|
|
@@ -33313,7 +33344,7 @@ function named(element, local, ns, lenient = true) {
|
|
|
33313
33344
|
function attr(element, local, ns, prefix) {
|
|
33314
33345
|
return element?.getAttributeNS(ns, local) ?? element?.getAttribute(`${prefix}:${local}`) ?? void 0;
|
|
33315
33346
|
}
|
|
33316
|
-
var DEFAULT_XML_LIMITS, TAG_RE, MARKUP_SKIPS, buildXml, isElement, elements, children2, first, relAttr;
|
|
33347
|
+
var DEFAULT_XML_LIMITS, XmlLimitError, TAG_RE, MARKUP_SKIPS, CRLF_DECLARATION, crlfDeclarations, buildXml, isElement, elements, children2, first, relAttr;
|
|
33317
33348
|
var init_xml = __esm({
|
|
33318
33349
|
"xml/xml.ts"() {
|
|
33319
33350
|
init_namespaces();
|
|
@@ -33321,13 +33352,31 @@ var init_xml = __esm({
|
|
|
33321
33352
|
maxDepth: 512,
|
|
33322
33353
|
maxNodes: 5e6
|
|
33323
33354
|
};
|
|
33355
|
+
XmlLimitError = class extends Error {
|
|
33356
|
+
code = "xml-limit";
|
|
33357
|
+
/** The limit that was exceeded. */
|
|
33358
|
+
limit;
|
|
33359
|
+
/** Its value: the largest depth or element count allowed. */
|
|
33360
|
+
maximum;
|
|
33361
|
+
constructor(message, limit, maximum) {
|
|
33362
|
+
super(message);
|
|
33363
|
+
this.name = "XmlLimitError";
|
|
33364
|
+
this.limit = limit;
|
|
33365
|
+
this.maximum = maximum;
|
|
33366
|
+
}
|
|
33367
|
+
};
|
|
33324
33368
|
TAG_RE = /<(\/?)([^\s\/><]+)(?:\s+[^\s=\/><]+\s*=\s*(?:"[^"<]*"|'[^'<]*'))*\s*(\/?)>/y;
|
|
33325
33369
|
MARKUP_SKIPS = [
|
|
33326
33370
|
["<!--", "-->"],
|
|
33327
33371
|
["<![CDATA[", "]]>"],
|
|
33328
33372
|
["<?", "?>"]
|
|
33329
33373
|
];
|
|
33330
|
-
|
|
33374
|
+
CRLF_DECLARATION = /^<\?xml[^>]*\?>\r\n/;
|
|
33375
|
+
crlfDeclarations = /* @__PURE__ */ new WeakSet();
|
|
33376
|
+
buildXml = (node) => {
|
|
33377
|
+
const xml = new xmldom.XMLSerializer().serializeToString(node);
|
|
33378
|
+
return crlfDeclarations.has(node) ? xml.replace(/^(<\?xml[^>]*\?>)\n/, "$1\r\n") : xml;
|
|
33379
|
+
};
|
|
33331
33380
|
isElement = (node) => node.nodeType === 1;
|
|
33332
33381
|
elements = (parent) => Array.from(parent.childNodes).filter(isElement);
|
|
33333
33382
|
children2 = (parent, local, ns, lenient = true) => elements(parent).filter((element) => named(element, local, ns, lenient));
|
|
@@ -129529,6 +129578,7 @@ var init_PptxHandlerRuntimeGeometryParsing = __esm({
|
|
|
129529
129578
|
var PptxHandlerRuntime61;
|
|
129530
129579
|
var init_PptxHandlerRuntimeShapeImageFill = __esm({
|
|
129531
129580
|
"pptx/core/core/runtime/PptxHandlerRuntimeShapeImageFill.ts"() {
|
|
129581
|
+
init_group_parsing_helpers();
|
|
129532
129582
|
init_xml_access();
|
|
129533
129583
|
init_group_shape_geometry();
|
|
129534
129584
|
init_PptxHandlerRuntimeGeometryParsing();
|
|
@@ -129700,6 +129750,53 @@ var init_PptxHandlerRuntimeShapeImageFill = __esm({
|
|
|
129700
129750
|
return null;
|
|
129701
129751
|
}
|
|
129702
129752
|
}
|
|
129753
|
+
/**
|
|
129754
|
+
* A text-bearing shape whose picture fill is inherited from its layout or
|
|
129755
|
+
* master placeholder (`a:blipFill` absent from its own `spPr`) gets
|
|
129756
|
+
* `fillMode: 'image'` from the merged properties but no image: the blip's
|
|
129757
|
+
* relationship id belongs to the part that authored it, not the slide.
|
|
129758
|
+
* Resolve it against the layout's, then the master's, relationships.
|
|
129759
|
+
*/
|
|
129760
|
+
async resolveInheritedFillImage(element, shape, slidePath) {
|
|
129761
|
+
const style = element?.shapeStyle;
|
|
129762
|
+
if (!element || !style || style.fillMode !== "image" || style.fillImageUrl) {
|
|
129763
|
+
return;
|
|
129764
|
+
}
|
|
129765
|
+
const placeholderInfo = this.extractPlaceholderInfo(xmlPath(shape, "p:nvSpPr", "p:nvPr"));
|
|
129766
|
+
const inherited = placeholderInfo ? this.findPlaceholderContext(slidePath, placeholderInfo) : void 0;
|
|
129767
|
+
const effectiveSpPr = this.mergeXmlObjects(
|
|
129768
|
+
inherited?.shape?.["p:spPr"],
|
|
129769
|
+
xmlChild(shape, "p:spPr")
|
|
129770
|
+
);
|
|
129771
|
+
const blipFill = effectiveSpPr?.["a:blipFill"];
|
|
129772
|
+
const blip = blipFill?.["a:blip"];
|
|
129773
|
+
const relId = String(blip?.["@_r:embed"] ?? blip?.["@_r:link"] ?? "");
|
|
129774
|
+
if (!relId) {
|
|
129775
|
+
return;
|
|
129776
|
+
}
|
|
129777
|
+
const layoutPath = this.resolveLayoutPathForSlide(slidePath);
|
|
129778
|
+
const masterPath = layoutPath ? this.resolveMasterPathForLayout(layoutPath) : void 0;
|
|
129779
|
+
for (const partPath of [layoutPath, masterPath]) {
|
|
129780
|
+
if (!partPath || !this.slideRelsMap.get(partPath)?.has(relId)) {
|
|
129781
|
+
continue;
|
|
129782
|
+
}
|
|
129783
|
+
const fill = await resolveGroupFillImagePure(
|
|
129784
|
+
this,
|
|
129785
|
+
blipFill,
|
|
129786
|
+
partPath
|
|
129787
|
+
);
|
|
129788
|
+
if (fill) {
|
|
129789
|
+
const isUrl = /^(?:data:|blob:|https?:)/u.test(fill.fillImageUrl);
|
|
129790
|
+
const decoded = isUrl ? void 0 : await this.getImageData(fill.fillImageUrl);
|
|
129791
|
+
style.fillImageUrl = decoded ?? fill.fillImageUrl;
|
|
129792
|
+
style.fillImageMode = fill.fillImageMode;
|
|
129793
|
+
if (element.type === "text") {
|
|
129794
|
+
element.type = "shape";
|
|
129795
|
+
}
|
|
129796
|
+
}
|
|
129797
|
+
return;
|
|
129798
|
+
}
|
|
129799
|
+
}
|
|
129703
129800
|
textVerticalAlignFromDrawingValue(value) {
|
|
129704
129801
|
const normalized = String(value ?? "").trim().toLowerCase();
|
|
129705
129802
|
if (normalized.length === 0) {
|
|
@@ -132174,7 +132271,9 @@ var init_PptxHandlerRuntimeSpTreeParsing = __esm({
|
|
|
132174
132271
|
slidePath
|
|
132175
132272
|
);
|
|
132176
132273
|
}
|
|
132177
|
-
|
|
132274
|
+
const parsed = this.parseShape(node, `${idPrefix}shape-${indexInType}`, slidePath);
|
|
132275
|
+
await this.resolveInheritedFillImage(parsed, node, slidePath);
|
|
132276
|
+
return parsed;
|
|
132178
132277
|
}
|
|
132179
132278
|
case "p:pic":
|
|
132180
132279
|
return this.parsePicture(node, `${idPrefix}pic-${indexInType}`, slidePath);
|
package/dist/pptx/cli/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { replaceText, findText, mergePresentation } from '../../chunk-
|
|
3
|
-
import { PptxMarkdownConverter } from '../../chunk-
|
|
4
|
-
import { PptxHandler } from '../../chunk-
|
|
5
|
-
import { SvgExporter, isImageLikeElement, blobUrlToDataUrl } from '../../chunk-
|
|
6
|
-
import '../../chunk-
|
|
2
|
+
import { replaceText, findText, mergePresentation } from '../../chunk-DLFMCZZT.mjs';
|
|
3
|
+
import { PptxMarkdownConverter } from '../../chunk-VQF6HQEE.mjs';
|
|
4
|
+
import { PptxHandler } from '../../chunk-Q5PKBQXH.mjs';
|
|
5
|
+
import { SvgExporter, isImageLikeElement, blobUrlToDataUrl } from '../../chunk-4QPOJCJG.mjs';
|
|
6
|
+
import '../../chunk-GBKBR4CX.mjs';
|
|
7
7
|
import '../../chunk-3GXV5MPC.mjs';
|
|
8
8
|
import '../../chunk-54S5A5PZ.mjs';
|
|
9
9
|
import '../../chunk-KII4AAYH.mjs';
|
|
@@ -48,17 +48,24 @@ var init_type_guards = __esm({
|
|
|
48
48
|
function stripFontStyleSuffix(fontName) {
|
|
49
49
|
let name = fontName.trim();
|
|
50
50
|
let stripped = false;
|
|
51
|
-
|
|
51
|
+
let previous = "";
|
|
52
|
+
let tokens = 0;
|
|
53
|
+
for (; ; ) {
|
|
52
54
|
const idx = name.lastIndexOf(" ");
|
|
53
55
|
if (idx <= 0) {
|
|
54
56
|
break;
|
|
55
57
|
}
|
|
56
58
|
const token = name.slice(idx + 1).toLowerCase().replace(/-/g, "");
|
|
57
|
-
|
|
59
|
+
const prefix = FONT_WEIGHT_PREFIX_TOKENS.has(token) && FONT_PREFIXED_WEIGHT_TOKENS.has(previous);
|
|
60
|
+
if (!prefix && (tokens >= 2 || !FONT_STYLE_SUFFIX_TOKENS.has(token))) {
|
|
58
61
|
break;
|
|
59
62
|
}
|
|
60
63
|
name = name.slice(0, idx).trim();
|
|
61
64
|
stripped = true;
|
|
65
|
+
previous = prefix ? "" : token;
|
|
66
|
+
if (!prefix) {
|
|
67
|
+
tokens++;
|
|
68
|
+
}
|
|
62
69
|
}
|
|
63
70
|
return stripped && name.length > 0 ? name : void 0;
|
|
64
71
|
}
|
|
@@ -99,7 +106,7 @@ function quoteFontName(name) {
|
|
|
99
106
|
}
|
|
100
107
|
return `"${trimmed}"`;
|
|
101
108
|
}
|
|
102
|
-
var FONT_SUBSTITUTION_MAP, FONT_STYLE_SUFFIX_TOKENS, CSS_GENERIC_FAMILIES;
|
|
109
|
+
var FONT_SUBSTITUTION_MAP, FONT_STYLE_SUFFIX_TOKENS, FONT_WEIGHT_PREFIX_TOKENS, FONT_PREFIXED_WEIGHT_TOKENS, CSS_GENERIC_FAMILIES;
|
|
103
110
|
var init_font_substitution = __esm({
|
|
104
111
|
"pptx/core/utils/font-substitution.ts"() {
|
|
105
112
|
FONT_SUBSTITUTION_MAP = {
|
|
@@ -287,6 +294,8 @@ var init_font_substitution = __esm({
|
|
|
287
294
|
"italic",
|
|
288
295
|
"oblique"
|
|
289
296
|
]);
|
|
297
|
+
FONT_WEIGHT_PREFIX_TOKENS = /* @__PURE__ */ new Set(["semi", "demi", "extra", "ultra"]);
|
|
298
|
+
FONT_PREFIXED_WEIGHT_TOKENS = /* @__PURE__ */ new Set(["bold", "light", "black"]);
|
|
290
299
|
CSS_GENERIC_FAMILIES = /* @__PURE__ */ new Set([
|
|
291
300
|
"serif",
|
|
292
301
|
"sans-serif",
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as SlideProcessor, B as generateMediaFilename, C as PptxJsonAssetStats, D as SvgExportOptions, E as isPptxJsonText, F as deriveOutputPath, H as ConversionResult, I as getDirectory, L as normalizePath, M as PptxConverterOptions, N as PptxMarkdownConverter, O as SvgExporter, P as DocumentConverter, R as MediaContext, S as PPTX_JSON_VERSION, T as decodePptxJsonText, U as FileSystemAdapter, V as ConversionOptions, _ as decodeJsonValue, a as deserializePptxFromJson, b as PPTX_JSON_FORMAT, c as pptxDataFromJsonDocument, d as serializePptxToJson, f as PRESENTATION_FIELD_KEYS, g as bytesToBase64, h as base64ToBytes, i as PptxJsonFormatError, j as SlideProcessorOptions, k as SlideMetadataRenderer, l as PptxJsonSerializeOptions, m as JsonAssetAccumulator, n as PptxJsonConverterOptions, o as parsePptxJson, p as PRESENTATION_FIELD_NAMES, r as applyImportedPptxData, s as parsePptxJsonDocument, t as PptxJsonConverter, u as buildPptxJsonDocument, v as encodeJsonValue, w as PptxJsonDocument, x as PPTX_JSON_MIME_TYPE, y as PPTX_JSON_FILE_EXTENSION, z as dataUrlToMediaBytes } from "../chunks/index-
|
|
1
|
+
import { A as SlideProcessor, B as generateMediaFilename, C as PptxJsonAssetStats, D as SvgExportOptions, E as isPptxJsonText, F as deriveOutputPath, H as ConversionResult, I as getDirectory, L as normalizePath, M as PptxConverterOptions, N as PptxMarkdownConverter, O as SvgExporter, P as DocumentConverter, R as MediaContext, S as PPTX_JSON_VERSION, T as decodePptxJsonText, U as FileSystemAdapter, V as ConversionOptions, _ as decodeJsonValue, a as deserializePptxFromJson, b as PPTX_JSON_FORMAT, c as pptxDataFromJsonDocument, d as serializePptxToJson, f as PRESENTATION_FIELD_KEYS, g as bytesToBase64, h as base64ToBytes, i as PptxJsonFormatError, j as SlideProcessorOptions, k as SlideMetadataRenderer, l as PptxJsonSerializeOptions, m as JsonAssetAccumulator, n as PptxJsonConverterOptions, o as parsePptxJson, p as PRESENTATION_FIELD_NAMES, r as applyImportedPptxData, s as parsePptxJsonDocument, t as PptxJsonConverter, u as buildPptxJsonDocument, v as encodeJsonValue, w as PptxJsonDocument, x as PPTX_JSON_MIME_TYPE, y as PPTX_JSON_FILE_EXTENSION, z as dataUrlToMediaBytes } from "../chunks/index-CPhsd7Df.js";
|
|
2
2
|
export { type ConversionOptions, type ConversionResult, DocumentConverter, type FileSystemAdapter, type JsonAssetAccumulator, MediaContext, PPTX_JSON_FILE_EXTENSION, PPTX_JSON_FORMAT, PPTX_JSON_MIME_TYPE, PPTX_JSON_VERSION, PRESENTATION_FIELD_KEYS, PRESENTATION_FIELD_NAMES, type PptxConverterOptions, type PptxJsonAssetStats, PptxJsonConverter, type PptxJsonConverterOptions, type PptxJsonDocument, PptxJsonFormatError, type PptxJsonSerializeOptions, PptxMarkdownConverter, SlideMetadataRenderer, SlideProcessor, type SlideProcessorOptions, type SvgExportOptions, SvgExporter, applyImportedPptxData, base64ToBytes, buildPptxJsonDocument, bytesToBase64, dataUrlToMediaBytes, decodeJsonValue, decodePptxJsonText, deriveOutputPath, deserializePptxFromJson, encodeJsonValue, generateMediaFilename, getDirectory, isPptxJsonText, normalizePath, parsePptxJson, parsePptxJsonDocument, pptxDataFromJsonDocument, serializePptxToJson };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '../../chunk-6Q7TP72Y.mjs';
|
|
2
|
-
export { DocumentConverter, MediaContext, PptxMarkdownConverter, SlideMetadataRenderer, SlideProcessor, dataUrlToMediaBytes, deriveOutputPath, generateMediaFilename, getDirectory, normalizePath } from '../../chunk-
|
|
3
|
-
export { PPTX_JSON_FILE_EXTENSION, PPTX_JSON_FORMAT, PPTX_JSON_MIME_TYPE, PPTX_JSON_VERSION, PRESENTATION_FIELD_KEYS, PRESENTATION_FIELD_NAMES, PptxJsonConverter, PptxJsonFormatError, SvgExporter, applyImportedPptxData, base64ToBytes, buildPptxJsonDocument, bytesToBase64, decodeJsonValue, decodePptxJsonText, deserializePptxFromJson, encodeJsonValue, isPptxJsonText, parsePptxJson, parsePptxJsonDocument, pptxDataFromJsonDocument, serializePptxToJson } from '../../chunk-
|
|
4
|
-
import '../../chunk-
|
|
2
|
+
export { DocumentConverter, MediaContext, PptxMarkdownConverter, SlideMetadataRenderer, SlideProcessor, dataUrlToMediaBytes, deriveOutputPath, generateMediaFilename, getDirectory, normalizePath } from '../../chunk-VQF6HQEE.mjs';
|
|
3
|
+
export { PPTX_JSON_FILE_EXTENSION, PPTX_JSON_FORMAT, PPTX_JSON_MIME_TYPE, PPTX_JSON_VERSION, PRESENTATION_FIELD_KEYS, PRESENTATION_FIELD_NAMES, PptxJsonConverter, PptxJsonFormatError, SvgExporter, applyImportedPptxData, base64ToBytes, buildPptxJsonDocument, bytesToBase64, decodeJsonValue, decodePptxJsonText, deserializePptxFromJson, encodeJsonValue, isPptxJsonText, parsePptxJson, parsePptxJsonDocument, pptxDataFromJsonDocument, serializePptxToJson } from '../../chunk-4QPOJCJG.mjs';
|
|
4
|
+
import '../../chunk-GBKBR4CX.mjs';
|
|
5
5
|
import '../../chunk-54S5A5PZ.mjs';
|
|
6
6
|
import '../../chunk-KII4AAYH.mjs';
|
|
7
7
|
import '../../chunk-7P6ASYW6.mjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk4LZIUJI3_cjs = require('../../../chunk-4LZIUJI3.cjs');
|
|
4
4
|
var chunkXZPZHXV4_cjs = require('../../../chunk-XZPZHXV4.cjs');
|
|
5
5
|
require('../../../chunk-5W2QL4SB.cjs');
|
|
6
6
|
var chunkAWIDASUW_cjs = require('../../../chunk-AWIDASUW.cjs');
|
|
@@ -145,10 +145,10 @@ function* findSlideTextTargets(slide, includeNotes = false, includeChartTitles =
|
|
|
145
145
|
function patchTableXml(element, rowIndex, colIndex, original, runs) {
|
|
146
146
|
if (!element.rawXml) return void 0;
|
|
147
147
|
const rawXml = structuredClone(element.rawXml);
|
|
148
|
-
const table =
|
|
149
|
-
const row =
|
|
150
|
-
const cell =
|
|
151
|
-
const paragraphs =
|
|
148
|
+
const table = chunk4LZIUJI3_cjs.getTblFromRawXml(rawXml);
|
|
149
|
+
const row = chunk4LZIUJI3_cjs.ensureArray(table?.["a:tr"])[rowIndex];
|
|
150
|
+
const cell = chunk4LZIUJI3_cjs.ensureArray(row?.["a:tc"])[colIndex];
|
|
151
|
+
const paragraphs = chunk4LZIUJI3_cjs.ensureArray(
|
|
152
152
|
cell?.["a:txBody"]?.["a:p"]
|
|
153
153
|
);
|
|
154
154
|
let paragraphIndex = 0, runIndex = 0, fieldIndex = 0;
|
|
@@ -163,7 +163,7 @@ function patchTableXml(element, rowIndex, colIndex, original, runs) {
|
|
|
163
163
|
if (previous.isLineBreak) continue;
|
|
164
164
|
const paragraph = paragraphs[paragraphIndex];
|
|
165
165
|
const key = previous.isField ? "a:fld" : "a:r";
|
|
166
|
-
const xmlRun =
|
|
166
|
+
const xmlRun = chunk4LZIUJI3_cjs.ensureArray(paragraph?.[key])[previous.isField ? fieldIndex++ : runIndex++];
|
|
167
167
|
if (!xmlRun) return void 0;
|
|
168
168
|
if (previous.text !== runs[index].text) xmlRun["a:t"] = runs[index].text;
|
|
169
169
|
}
|
|
@@ -173,7 +173,7 @@ function updateNode(nodes, nodeId, text) {
|
|
|
173
173
|
return nodes.map((node) => {
|
|
174
174
|
if (node.id === nodeId) {
|
|
175
175
|
const originalParagraphs = node.paragraphs ?? (node.runs?.length ? [{ items: node.runs.map((run) => ({ kind: "run", run })) }] : void 0);
|
|
176
|
-
const paragraphs = originalParagraphs ?
|
|
176
|
+
const paragraphs = originalParagraphs ? chunk4LZIUJI3_cjs.reconcileSmartArtTextParagraphs(originalParagraphs, text) : void 0;
|
|
177
177
|
return { ...node, text, ...paragraphs ? { paragraphs } : {} };
|
|
178
178
|
}
|
|
179
179
|
if (!node.children) return node;
|
|
@@ -252,14 +252,14 @@ function replaceLeaf(element, match, replacement) {
|
|
|
252
252
|
);
|
|
253
253
|
if (!runs) return element;
|
|
254
254
|
let text = runs.map((run) => run.isParagraphBreak ? "\n" : run.isLineBreak ? "" : run.text).join("");
|
|
255
|
-
let rawXml = cell.textRuns?.length ? patchTableXml(element, rowIndex, colIndex, original2, runs) :
|
|
255
|
+
let rawXml = cell.textRuns?.length ? patchTableXml(element, rowIndex, colIndex, original2, runs) : chunk4LZIUJI3_cjs.updateCellTextInRawXml(element, rowIndex, colIndex, text);
|
|
256
256
|
if (rawXml) {
|
|
257
|
-
const table =
|
|
258
|
-
const xmlRow =
|
|
259
|
-
const xmlCell =
|
|
260
|
-
text =
|
|
257
|
+
const table = chunk4LZIUJI3_cjs.getTblFromRawXml(rawXml);
|
|
258
|
+
const xmlRow = chunk4LZIUJI3_cjs.ensureArray(table?.["a:tr"])[rowIndex];
|
|
259
|
+
const xmlCell = chunk4LZIUJI3_cjs.ensureArray(xmlRow?.["a:tc"])[colIndex];
|
|
260
|
+
text = chunk4LZIUJI3_cjs.flattenCellTxBodyText(
|
|
261
261
|
xmlCell?.["a:txBody"],
|
|
262
|
-
(value) =>
|
|
262
|
+
(value) => chunk4LZIUJI3_cjs.ensureArray(value)
|
|
263
263
|
);
|
|
264
264
|
}
|
|
265
265
|
const rows = [...element.tableData.rows], cells = [...row.cells];
|
|
@@ -273,7 +273,7 @@ function replaceLeaf(element, match, replacement) {
|
|
|
273
273
|
if (!node || match.startOffset < 0 || match.startOffset + match.length > node.text.length)
|
|
274
274
|
return element;
|
|
275
275
|
const text = node.text.slice(0, match.startOffset) + replacement + node.text.slice(match.startOffset + match.length);
|
|
276
|
-
const next =
|
|
276
|
+
const next = chunk4LZIUJI3_cjs.updateSmartArtNodeText({ ...data, nodes }, node.id, text);
|
|
277
277
|
const drawingShapes = next.drawingShapes?.map((shape, index) => {
|
|
278
278
|
if (shape === data.drawingShapes?.[index] || !shape.textSegments) return shape;
|
|
279
279
|
return {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../../chunks/index-
|
|
1
|
+
import "../../chunks/index-Q5mM8kIR.js";
|
|
2
2
|
import { C as PptxSlide } from "../../chunks/text-operations-CfLVZ7DK.js";
|
|
3
3
|
//#region pptx/editor/render/find-replace.d.ts
|
|
4
4
|
/** Identifies a single match of the find query at segment-level precision. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { updateCellTextInRawXml, getTblFromRawXml, ensureArray, flattenCellTxBodyText, updateSmartArtNodeText, reconcileSmartArtTextParagraphs } from '../../../chunk-
|
|
1
|
+
import { updateCellTextInRawXml, getTblFromRawXml, ensureArray, flattenCellTxBodyText, updateSmartArtNodeText, reconcileSmartArtTextParagraphs } from '../../../chunk-6IIMI5RS.mjs';
|
|
2
2
|
import { hasTextProperties } from '../../../chunk-GXHKNSZX.mjs';
|
|
3
3
|
import '../../../chunk-CA7KCNL3.mjs';
|
|
4
4
|
import { remapTextToSegments } from '../../../chunk-CBNKBVX5.mjs';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
require('../../../chunk-
|
|
4
|
-
var
|
|
3
|
+
require('../../../chunk-HL3FBJ6X.cjs');
|
|
4
|
+
var chunk4LZIUJI3_cjs = require('../../../chunk-4LZIUJI3.cjs');
|
|
5
5
|
require('../../../chunk-XZPZHXV4.cjs');
|
|
6
6
|
require('../../../chunk-5W2QL4SB.cjs');
|
|
7
7
|
|
|
@@ -20,7 +20,7 @@ function reassignElementId(element) {
|
|
|
20
20
|
return newElement;
|
|
21
21
|
}
|
|
22
22
|
function duplicateSlide(slide, newSlideNumber) {
|
|
23
|
-
const cloned =
|
|
23
|
+
const cloned = chunk4LZIUJI3_cjs.cloneSlide(slide);
|
|
24
24
|
cloned.sourceSlideId = slide.id.startsWith("ppt/slides/") ? slide.id : slide.sourceSlideId ?? slide.id;
|
|
25
25
|
cloned.id = `slide${newSlideNumber}`;
|
|
26
26
|
cloned.rId = `rId${newSlideNumber + 1}`;
|
|
@@ -50,7 +50,7 @@ function duplicateSlide(slide, newSlideNumber) {
|
|
|
50
50
|
function captureSlideClipboard(slides, ids) {
|
|
51
51
|
return ids.flatMap((id) => {
|
|
52
52
|
const slide = slides.find((candidate) => candidate.id === id);
|
|
53
|
-
return slide ? [
|
|
53
|
+
return slide ? [chunk4LZIUJI3_cjs.cloneSlide(slide)] : [];
|
|
54
54
|
});
|
|
55
55
|
}
|
|
56
56
|
function createSlidePaste(clipboard, insertAt, templates = {}) {
|
|
@@ -61,14 +61,14 @@ function createSlidePaste(clipboard, insertAt, templates = {}) {
|
|
|
61
61
|
})),
|
|
62
62
|
sourceIds: clipboard.map((slide) => slide.id),
|
|
63
63
|
insertAt,
|
|
64
|
-
templateElements: clipboard.map((slide) => (templates[slide.id] ?? []).map(
|
|
64
|
+
templateElements: clipboard.map((slide) => (templates[slide.id] ?? []).map(chunk4LZIUJI3_cjs.cloneElement))
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
67
|
function insertSlidePaste(slides, request) {
|
|
68
68
|
const index = Math.max(0, Math.min(slides.length, request.insertAt));
|
|
69
69
|
const next = [
|
|
70
70
|
...slides.slice(0, index),
|
|
71
|
-
...request.copies.map(
|
|
71
|
+
...request.copies.map(chunk4LZIUJI3_cjs.cloneSlide),
|
|
72
72
|
...slides.slice(index)
|
|
73
73
|
];
|
|
74
74
|
return next.map(
|
|
@@ -78,12 +78,12 @@ function insertSlidePaste(slides, request) {
|
|
|
78
78
|
function applySlidePasteTemplates(mapping, request) {
|
|
79
79
|
const next = { ...mapping };
|
|
80
80
|
request.copies.forEach((copy, index) => {
|
|
81
|
-
next[copy.id] = (request.templateElements[index] ?? []).map(
|
|
81
|
+
next[copy.id] = (request.templateElements[index] ?? []).map(chunk4LZIUJI3_cjs.cloneElement);
|
|
82
82
|
});
|
|
83
83
|
return next;
|
|
84
84
|
}
|
|
85
85
|
function captureSlideClipboardTemplates(mapping, ids) {
|
|
86
|
-
return Object.fromEntries(ids.map((id) => [id, (mapping[id] ?? []).map(
|
|
86
|
+
return Object.fromEntries(ids.map((id) => [id, (mapping[id] ?? []).map(chunk4LZIUJI3_cjs.cloneElement)]));
|
|
87
87
|
}
|
|
88
88
|
function makeSlideId(idGenerator) {
|
|
89
89
|
if (idGenerator) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import '../../../chunk-
|
|
2
|
-
import { cloneSlide, cloneElement } from '../../../chunk-
|
|
1
|
+
import '../../../chunk-LF5E5ZOH.mjs';
|
|
2
|
+
import { cloneSlide, cloneElement } from '../../../chunk-6IIMI5RS.mjs';
|
|
3
3
|
import '../../../chunk-GXHKNSZX.mjs';
|
|
4
4
|
import '../../../chunk-CA7KCNL3.mjs';
|
|
5
5
|
|