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/opc/index.cjs
CHANGED
|
@@ -138,6 +138,19 @@ var DEFAULT_XML_LIMITS = {
|
|
|
138
138
|
maxDepth: 512,
|
|
139
139
|
maxNodes: 5e6
|
|
140
140
|
};
|
|
141
|
+
var XmlLimitError = class extends Error {
|
|
142
|
+
code = "xml-limit";
|
|
143
|
+
/** The limit that was exceeded. */
|
|
144
|
+
limit;
|
|
145
|
+
/** Its value: the largest depth or element count allowed. */
|
|
146
|
+
maximum;
|
|
147
|
+
constructor(message, limit, maximum) {
|
|
148
|
+
super(message);
|
|
149
|
+
this.name = "XmlLimitError";
|
|
150
|
+
this.limit = limit;
|
|
151
|
+
this.maximum = maximum;
|
|
152
|
+
}
|
|
153
|
+
};
|
|
141
154
|
var TAG_RE = /<(\/?)([^\s\/><]+)(?:\s+[^\s=\/><]+\s*=\s*(?:"[^"<]*"|'[^'<]*'))*\s*(\/?)>/y;
|
|
142
155
|
var MARKUP_SKIPS = [
|
|
143
156
|
["<!--", "-->"],
|
|
@@ -171,11 +184,22 @@ function checkXmlLimits(xml, label, limits = {}) {
|
|
|
171
184
|
continue;
|
|
172
185
|
}
|
|
173
186
|
nodes++;
|
|
174
|
-
if (nodes > maxNodes)
|
|
187
|
+
if (nodes > maxNodes)
|
|
188
|
+
throw new XmlLimitError(
|
|
189
|
+
`${label} XML exceeds the limit of ${maxNodes} elements`,
|
|
190
|
+
"maxNodes",
|
|
191
|
+
maxNodes
|
|
192
|
+
);
|
|
175
193
|
if (!selfClosing && ++depth > maxDepth)
|
|
176
|
-
throw new
|
|
194
|
+
throw new XmlLimitError(
|
|
195
|
+
`${label} XML exceeds the nesting depth limit of ${maxDepth}`,
|
|
196
|
+
"maxDepth",
|
|
197
|
+
maxDepth
|
|
198
|
+
);
|
|
177
199
|
}
|
|
178
200
|
}
|
|
201
|
+
var CRLF_DECLARATION = /^<\?xml[^>]*\?>\r\n/;
|
|
202
|
+
var crlfDeclarations = /* @__PURE__ */ new WeakSet();
|
|
179
203
|
function parseXml(xml, options = {}) {
|
|
180
204
|
const label = options.label ?? "OOXML";
|
|
181
205
|
if (/<!DOCTYPE|<!ENTITY/i.test(xml))
|
|
@@ -197,9 +221,13 @@ function parseXml(xml, options = {}) {
|
|
|
197
221
|
}
|
|
198
222
|
if (parseError || !parsed.documentElement)
|
|
199
223
|
throw new Error(`Invalid ${label} XML: ${parseError || "missing root element"}`);
|
|
224
|
+
if (CRLF_DECLARATION.test(xml)) crlfDeclarations.add(parsed);
|
|
200
225
|
return parsed;
|
|
201
226
|
}
|
|
202
|
-
var buildXml = (node) =>
|
|
227
|
+
var buildXml = (node) => {
|
|
228
|
+
const xml = new xmldom.XMLSerializer().serializeToString(node);
|
|
229
|
+
return crlfDeclarations.has(node) ? xml.replace(/^(<\?xml[^>]*\?>)\n/, "$1\r\n") : xml;
|
|
230
|
+
};
|
|
203
231
|
var isElement = (node) => node.nodeType === 1;
|
|
204
232
|
var elements = (parent) => Array.from(parent.childNodes).filter(isElement);
|
|
205
233
|
function named(element, local, ns, lenient = true) {
|
|
@@ -465,10 +493,13 @@ var DEFAULT_ZIP_LIMITS = {
|
|
|
465
493
|
var ZipLimitError = class extends Error {
|
|
466
494
|
code = "ZIP_BOMB";
|
|
467
495
|
limit;
|
|
496
|
+
/** The check that failed (absent when the error was built without one). */
|
|
497
|
+
kind;
|
|
468
498
|
constructor(message, details) {
|
|
469
499
|
super(message);
|
|
470
500
|
this.name = "ZipLimitError";
|
|
471
501
|
this.limit = details.limit;
|
|
502
|
+
this.kind = details.kind;
|
|
472
503
|
}
|
|
473
504
|
};
|
|
474
505
|
var mib = (bytes) => Math.round(bytes / 1048576);
|
|
@@ -491,7 +522,7 @@ function resolveLimits(limits) {
|
|
|
491
522
|
maxEntryBytes: limits.maxEntryBytes ?? DEFAULT_ZIP_LIMITS.maxEntryBytes,
|
|
492
523
|
maxTotalBytes: limits.maxTotalBytes ?? DEFAULT_ZIP_LIMITS.maxTotalBytes,
|
|
493
524
|
label: limits.label ?? "ZIP",
|
|
494
|
-
fail: (message, limit) => create ? create(message, { limit }) : new ZipLimitError(message, { limit })
|
|
525
|
+
fail: (message, limit, kind) => create ? create(message, { limit, kind }) : new ZipLimitError(message, { limit, kind })
|
|
495
526
|
};
|
|
496
527
|
}
|
|
497
528
|
function inflateEntryGuarded(entry, alreadyRead, limits) {
|
|
@@ -514,13 +545,18 @@ function inflateEntryGuarded(entry, alreadyRead, limits) {
|
|
|
514
545
|
size += chunk.byteLength;
|
|
515
546
|
if (size > declared || size > r.maxEntryBytes)
|
|
516
547
|
return abort(
|
|
517
|
-
r.fail(
|
|
548
|
+
r.fail(
|
|
549
|
+
`${r.label} part ${entry.name} inflates past its declared size`,
|
|
550
|
+
r.maxEntryBytes,
|
|
551
|
+
size > declared ? "declaredSize" : "maxEntryBytes"
|
|
552
|
+
)
|
|
518
553
|
);
|
|
519
554
|
if (alreadyRead + size > r.maxTotalBytes)
|
|
520
555
|
return abort(
|
|
521
556
|
r.fail(
|
|
522
557
|
`${r.label} package exceeds the ${mib(r.maxTotalBytes)} MiB uncompressed content limit`,
|
|
523
|
-
r.maxTotalBytes
|
|
558
|
+
r.maxTotalBytes,
|
|
559
|
+
"maxTotalBytes"
|
|
524
560
|
)
|
|
525
561
|
);
|
|
526
562
|
chunks.push(chunk);
|
|
@@ -553,26 +589,29 @@ function guardZip(zip, limits = {}) {
|
|
|
553
589
|
if (entries.length > r.maxEntries)
|
|
554
590
|
throw r.fail(
|
|
555
591
|
`${r.label} package exceeds the ${r.maxEntries.toLocaleString("en-US")} part limit`,
|
|
556
|
-
r.maxEntries
|
|
592
|
+
r.maxEntries,
|
|
593
|
+
"maxEntries"
|
|
557
594
|
);
|
|
558
595
|
let declared = 0;
|
|
559
596
|
for (const entry of entries) {
|
|
560
597
|
const original = entry.unsafeOriginalName;
|
|
561
598
|
if (!isSafePartName(entry.name) || original !== void 0 && !isSafePartName(original))
|
|
562
|
-
throw r.fail(`${r.label} package has an unsafe part name`, r.maxEntries);
|
|
599
|
+
throw r.fail(`${r.label} package has an unsafe part name`, r.maxEntries, "partName");
|
|
563
600
|
if (entry.dir) continue;
|
|
564
601
|
const size = declaredEntrySize(entry);
|
|
565
602
|
if (size > r.maxEntryBytes)
|
|
566
603
|
throw r.fail(
|
|
567
604
|
`${r.label} part ${entry.name} exceeds the uncompressed part size limit`,
|
|
568
|
-
r.maxEntryBytes
|
|
605
|
+
r.maxEntryBytes,
|
|
606
|
+
"maxEntryBytes"
|
|
569
607
|
);
|
|
570
608
|
declared += size;
|
|
571
609
|
}
|
|
572
610
|
if (declared > r.maxTotalBytes)
|
|
573
611
|
throw r.fail(
|
|
574
612
|
`${r.label} package exceeds the ${mib(r.maxTotalBytes)} MiB uncompressed content limit`,
|
|
575
|
-
r.maxTotalBytes
|
|
613
|
+
r.maxTotalBytes,
|
|
614
|
+
"maxTotalBytes"
|
|
576
615
|
);
|
|
577
616
|
const produced = /* @__PURE__ */ new Map();
|
|
578
617
|
let total = 0;
|
|
@@ -610,7 +649,8 @@ async function openZip(input, limits = {}) {
|
|
|
610
649
|
if (bytes.byteLength > maxInput)
|
|
611
650
|
throw r.fail(
|
|
612
651
|
`${r.label} package exceeds the ${mib(maxInput)} MiB compressed input limit`,
|
|
613
|
-
maxInput
|
|
652
|
+
maxInput,
|
|
653
|
+
"maxInputBytes"
|
|
614
654
|
);
|
|
615
655
|
return guardZip(await JSZip__default.default.loadAsync(bytes), limits);
|
|
616
656
|
}
|
package/dist/opc/index.mjs
CHANGED
|
@@ -132,6 +132,19 @@ var DEFAULT_XML_LIMITS = {
|
|
|
132
132
|
maxDepth: 512,
|
|
133
133
|
maxNodes: 5e6
|
|
134
134
|
};
|
|
135
|
+
var XmlLimitError = class extends Error {
|
|
136
|
+
code = "xml-limit";
|
|
137
|
+
/** The limit that was exceeded. */
|
|
138
|
+
limit;
|
|
139
|
+
/** Its value: the largest depth or element count allowed. */
|
|
140
|
+
maximum;
|
|
141
|
+
constructor(message, limit, maximum) {
|
|
142
|
+
super(message);
|
|
143
|
+
this.name = "XmlLimitError";
|
|
144
|
+
this.limit = limit;
|
|
145
|
+
this.maximum = maximum;
|
|
146
|
+
}
|
|
147
|
+
};
|
|
135
148
|
var TAG_RE = /<(\/?)([^\s\/><]+)(?:\s+[^\s=\/><]+\s*=\s*(?:"[^"<]*"|'[^'<]*'))*\s*(\/?)>/y;
|
|
136
149
|
var MARKUP_SKIPS = [
|
|
137
150
|
["<!--", "-->"],
|
|
@@ -165,11 +178,22 @@ function checkXmlLimits(xml, label, limits = {}) {
|
|
|
165
178
|
continue;
|
|
166
179
|
}
|
|
167
180
|
nodes++;
|
|
168
|
-
if (nodes > maxNodes)
|
|
181
|
+
if (nodes > maxNodes)
|
|
182
|
+
throw new XmlLimitError(
|
|
183
|
+
`${label} XML exceeds the limit of ${maxNodes} elements`,
|
|
184
|
+
"maxNodes",
|
|
185
|
+
maxNodes
|
|
186
|
+
);
|
|
169
187
|
if (!selfClosing && ++depth > maxDepth)
|
|
170
|
-
throw new
|
|
188
|
+
throw new XmlLimitError(
|
|
189
|
+
`${label} XML exceeds the nesting depth limit of ${maxDepth}`,
|
|
190
|
+
"maxDepth",
|
|
191
|
+
maxDepth
|
|
192
|
+
);
|
|
171
193
|
}
|
|
172
194
|
}
|
|
195
|
+
var CRLF_DECLARATION = /^<\?xml[^>]*\?>\r\n/;
|
|
196
|
+
var crlfDeclarations = /* @__PURE__ */ new WeakSet();
|
|
173
197
|
function parseXml(xml, options = {}) {
|
|
174
198
|
const label = options.label ?? "OOXML";
|
|
175
199
|
if (/<!DOCTYPE|<!ENTITY/i.test(xml))
|
|
@@ -191,9 +215,13 @@ function parseXml(xml, options = {}) {
|
|
|
191
215
|
}
|
|
192
216
|
if (parseError || !parsed.documentElement)
|
|
193
217
|
throw new Error(`Invalid ${label} XML: ${parseError || "missing root element"}`);
|
|
218
|
+
if (CRLF_DECLARATION.test(xml)) crlfDeclarations.add(parsed);
|
|
194
219
|
return parsed;
|
|
195
220
|
}
|
|
196
|
-
var buildXml = (node) =>
|
|
221
|
+
var buildXml = (node) => {
|
|
222
|
+
const xml = new XMLSerializer().serializeToString(node);
|
|
223
|
+
return crlfDeclarations.has(node) ? xml.replace(/^(<\?xml[^>]*\?>)\n/, "$1\r\n") : xml;
|
|
224
|
+
};
|
|
197
225
|
var isElement = (node) => node.nodeType === 1;
|
|
198
226
|
var elements = (parent) => Array.from(parent.childNodes).filter(isElement);
|
|
199
227
|
function named(element, local, ns, lenient = true) {
|
|
@@ -459,10 +487,13 @@ var DEFAULT_ZIP_LIMITS = {
|
|
|
459
487
|
var ZipLimitError = class extends Error {
|
|
460
488
|
code = "ZIP_BOMB";
|
|
461
489
|
limit;
|
|
490
|
+
/** The check that failed (absent when the error was built without one). */
|
|
491
|
+
kind;
|
|
462
492
|
constructor(message, details) {
|
|
463
493
|
super(message);
|
|
464
494
|
this.name = "ZipLimitError";
|
|
465
495
|
this.limit = details.limit;
|
|
496
|
+
this.kind = details.kind;
|
|
466
497
|
}
|
|
467
498
|
};
|
|
468
499
|
var mib = (bytes) => Math.round(bytes / 1048576);
|
|
@@ -485,7 +516,7 @@ function resolveLimits(limits) {
|
|
|
485
516
|
maxEntryBytes: limits.maxEntryBytes ?? DEFAULT_ZIP_LIMITS.maxEntryBytes,
|
|
486
517
|
maxTotalBytes: limits.maxTotalBytes ?? DEFAULT_ZIP_LIMITS.maxTotalBytes,
|
|
487
518
|
label: limits.label ?? "ZIP",
|
|
488
|
-
fail: (message, limit) => create ? create(message, { limit }) : new ZipLimitError(message, { limit })
|
|
519
|
+
fail: (message, limit, kind) => create ? create(message, { limit, kind }) : new ZipLimitError(message, { limit, kind })
|
|
489
520
|
};
|
|
490
521
|
}
|
|
491
522
|
function inflateEntryGuarded(entry, alreadyRead, limits) {
|
|
@@ -508,13 +539,18 @@ function inflateEntryGuarded(entry, alreadyRead, limits) {
|
|
|
508
539
|
size += chunk.byteLength;
|
|
509
540
|
if (size > declared || size > r.maxEntryBytes)
|
|
510
541
|
return abort(
|
|
511
|
-
r.fail(
|
|
542
|
+
r.fail(
|
|
543
|
+
`${r.label} part ${entry.name} inflates past its declared size`,
|
|
544
|
+
r.maxEntryBytes,
|
|
545
|
+
size > declared ? "declaredSize" : "maxEntryBytes"
|
|
546
|
+
)
|
|
512
547
|
);
|
|
513
548
|
if (alreadyRead + size > r.maxTotalBytes)
|
|
514
549
|
return abort(
|
|
515
550
|
r.fail(
|
|
516
551
|
`${r.label} package exceeds the ${mib(r.maxTotalBytes)} MiB uncompressed content limit`,
|
|
517
|
-
r.maxTotalBytes
|
|
552
|
+
r.maxTotalBytes,
|
|
553
|
+
"maxTotalBytes"
|
|
518
554
|
)
|
|
519
555
|
);
|
|
520
556
|
chunks.push(chunk);
|
|
@@ -547,26 +583,29 @@ function guardZip(zip, limits = {}) {
|
|
|
547
583
|
if (entries.length > r.maxEntries)
|
|
548
584
|
throw r.fail(
|
|
549
585
|
`${r.label} package exceeds the ${r.maxEntries.toLocaleString("en-US")} part limit`,
|
|
550
|
-
r.maxEntries
|
|
586
|
+
r.maxEntries,
|
|
587
|
+
"maxEntries"
|
|
551
588
|
);
|
|
552
589
|
let declared = 0;
|
|
553
590
|
for (const entry of entries) {
|
|
554
591
|
const original = entry.unsafeOriginalName;
|
|
555
592
|
if (!isSafePartName(entry.name) || original !== void 0 && !isSafePartName(original))
|
|
556
|
-
throw r.fail(`${r.label} package has an unsafe part name`, r.maxEntries);
|
|
593
|
+
throw r.fail(`${r.label} package has an unsafe part name`, r.maxEntries, "partName");
|
|
557
594
|
if (entry.dir) continue;
|
|
558
595
|
const size = declaredEntrySize(entry);
|
|
559
596
|
if (size > r.maxEntryBytes)
|
|
560
597
|
throw r.fail(
|
|
561
598
|
`${r.label} part ${entry.name} exceeds the uncompressed part size limit`,
|
|
562
|
-
r.maxEntryBytes
|
|
599
|
+
r.maxEntryBytes,
|
|
600
|
+
"maxEntryBytes"
|
|
563
601
|
);
|
|
564
602
|
declared += size;
|
|
565
603
|
}
|
|
566
604
|
if (declared > r.maxTotalBytes)
|
|
567
605
|
throw r.fail(
|
|
568
606
|
`${r.label} package exceeds the ${mib(r.maxTotalBytes)} MiB uncompressed content limit`,
|
|
569
|
-
r.maxTotalBytes
|
|
607
|
+
r.maxTotalBytes,
|
|
608
|
+
"maxTotalBytes"
|
|
570
609
|
);
|
|
571
610
|
const produced = /* @__PURE__ */ new Map();
|
|
572
611
|
let total = 0;
|
|
@@ -604,7 +643,8 @@ async function openZip(input, limits = {}) {
|
|
|
604
643
|
if (bytes.byteLength > maxInput)
|
|
605
644
|
throw r.fail(
|
|
606
645
|
`${r.label} package exceeds the ${mib(maxInput)} MiB compressed input limit`,
|
|
607
|
-
maxInput
|
|
646
|
+
maxInput,
|
|
647
|
+
"maxInputBytes"
|
|
608
648
|
);
|
|
609
649
|
return guardZip(await JSZip.loadAsync(bytes), limits);
|
|
610
650
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type JSZip from 'jszip';
|
|
2
|
+
/** The entry names of a package, taken when it is opened, before anything is written to it. */
|
|
3
|
+
export declare const entryNames: (zip: JSZip) => ReadonlySet<string>;
|
|
4
|
+
/**
|
|
5
|
+
* Removes the folder entries JSZip adds for the parent folders of each file it writes (its
|
|
6
|
+
* `createFolders` default) unless the package had them when it was opened (`source`, from
|
|
7
|
+
* {@link entryNames}). Office writes no folder entries, so a saved package keeps the shape of its
|
|
8
|
+
* source instead of gaining a `word/` or `xl/` entry on every save.
|
|
9
|
+
*/
|
|
10
|
+
export declare function dropAddedFolders(zip: JSZip, source: ReadonlySet<string>): void;
|
|
11
|
+
//# sourceMappingURL=zip-folders.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zip-folders.d.ts","sourceRoot":"","sources":["../../opc/zip-folders.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,+FAA+F;AAC/F,eAAO,MAAM,UAAU,QAAS,KAAK,KAAG,WAAW,CAAC,MAAM,CAAoC,CAAC;AAE/F;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,GAAG,IAAI,CAG9E"}
|
package/dist/opc/zip-limits.d.ts
CHANGED
|
@@ -6,6 +6,11 @@ export declare const DEFAULT_ZIP_LIMITS: {
|
|
|
6
6
|
readonly maxEntryBytes: number;
|
|
7
7
|
readonly maxTotalBytes: number;
|
|
8
8
|
};
|
|
9
|
+
/**
|
|
10
|
+
* The check a package failed: one of the {@link ZipLimits} sizes, `declaredSize` (an entry
|
|
11
|
+
* inflates past the size its header declares) or `partName` (an unsafe part name).
|
|
12
|
+
*/
|
|
13
|
+
export type ZipLimitKind = 'maxInputBytes' | 'maxEntries' | 'maxEntryBytes' | 'maxTotalBytes' | 'declaredSize' | 'partName';
|
|
9
14
|
/** Size and hygiene limits applied while opening and reading a zip package. */
|
|
10
15
|
export interface ZipLimits {
|
|
11
16
|
/** Largest accepted package (compressed bytes). */
|
|
@@ -21,14 +26,18 @@ export interface ZipLimits {
|
|
|
21
26
|
/** Builds the error thrown on a violation; defaults to {@link ZipLimitError}. */
|
|
22
27
|
createError?: (message: string, details: {
|
|
23
28
|
limit: number;
|
|
29
|
+
kind: ZipLimitKind;
|
|
24
30
|
}) => Error;
|
|
25
31
|
}
|
|
26
32
|
/** Thrown when a package breaks a size, entry-count or part-name limit. */
|
|
27
33
|
export declare class ZipLimitError extends Error {
|
|
28
34
|
readonly code = "ZIP_BOMB";
|
|
29
35
|
readonly limit: number;
|
|
36
|
+
/** The check that failed (absent when the error was built without one). */
|
|
37
|
+
readonly kind: ZipLimitKind | undefined;
|
|
30
38
|
constructor(message: string, details: {
|
|
31
39
|
limit: number;
|
|
40
|
+
kind?: ZipLimitKind;
|
|
32
41
|
});
|
|
33
42
|
}
|
|
34
43
|
/** True when a zip entry name is a safe, relative part name (no traversal, drive or backslash). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zip-limits.d.ts","sourceRoot":"","sources":["../../opc/zip-limits.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,0DAA0D;AAC1D,eAAO,MAAM,kBAAkB;aAC9B,aAAa;aACb,UAAU,EAAE,KAAM;aAClB,aAAa;aACb,aAAa;CACJ,CAAC;AAEX,+EAA+E;AAC/E,MAAM,WAAW,SAAS;IACzB,mDAAmD;IACnD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,qCAAqC;IACrC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,0CAA0C;IAC1C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,mEAAmE;IACnE,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,0DAA0D;IAC1D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iFAAiF;IACjF,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,KAAK,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"zip-limits.d.ts","sourceRoot":"","sources":["../../opc/zip-limits.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,0DAA0D;AAC1D,eAAO,MAAM,kBAAkB;aAC9B,aAAa;aACb,UAAU,EAAE,KAAM;aAClB,aAAa;aACb,aAAa;CACJ,CAAC;AAEX;;;GAGG;AACH,MAAM,MAAM,YAAY,GACrB,eAAe,GACf,YAAY,GACZ,eAAe,GACf,eAAe,GACf,cAAc,GACd,UAAU,CAAC;AAEd,+EAA+E;AAC/E,MAAM,WAAW,SAAS;IACzB,mDAAmD;IACnD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,qCAAqC;IACrC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,0CAA0C;IAC1C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,mEAAmE;IACnE,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,0DAA0D;IAC1D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iFAAiF;IACjF,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,YAAY,CAAA;KAAE,KAAK,KAAK,CAAC;CACzF;AAED,2EAA2E;AAC3E,qBAAa,aAAc,SAAQ,KAAK;IACvC,QAAQ,CAAC,IAAI,cAAc;IAC3B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,2EAA2E;IAC3E,QAAQ,CAAC,IAAI,EAAE,YAAY,GAAG,SAAS,CAAC;IACxC,YAAY,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,YAAY,CAAA;KAAE,EAK3E;CACD;AAID,mGAAmG;AACnG,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAMpD;AAED,gFAAgF;AAChF,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,KAAK,CAAC,WAAW,GAAG,MAAM,CAIlE;AA0BD;;;;GAIG;AACH,wBAAgB,mBAAmB,CAClC,KAAK,EAAE,KAAK,CAAC,WAAW,EACxB,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,SAAS,GACf,OAAO,CAAC,UAAU,CAAC,CAmDrB;AASD;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,KAAK,EAAE,MAAM,GAAE,SAAc,GAAG,KAAK,CA6DlE;AAED,kFAAkF;AAClF,wBAAsB,OAAO,CAC5B,KAAK,EAAE,UAAU,GAAG,WAAW,EAC/B,MAAM,GAAE,SAAc,GACpB,OAAO,CAAC,KAAK,CAAC,CAWhB"}
|