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/visio/ui/index.mjs
CHANGED
|
@@ -8,7 +8,8 @@ var propertyKeys = [
|
|
|
8
8
|
"pageIndex",
|
|
9
9
|
"zoom",
|
|
10
10
|
"showToolbar",
|
|
11
|
-
"ribbonAddIns"
|
|
11
|
+
"ribbonAddIns",
|
|
12
|
+
"collaboration"
|
|
12
13
|
];
|
|
13
14
|
var eventKeys = [
|
|
14
15
|
"document-load",
|
|
@@ -18,9 +19,63 @@ var eventKeys = [
|
|
|
18
19
|
"zoom-change",
|
|
19
20
|
"shape-select",
|
|
20
21
|
"selection-change",
|
|
21
|
-
"office-ribbon-add-in"
|
|
22
|
+
"office-ribbon-add-in",
|
|
23
|
+
"collaboration-change"
|
|
22
24
|
];
|
|
23
25
|
|
|
26
|
+
// visio/ui/collab-presence.ts
|
|
27
|
+
var VISIO_PRESENCE_MAX_SELECTION = 64;
|
|
28
|
+
var VISIO_PRESENCE_MAX_ID = 128;
|
|
29
|
+
var VISIO_PRESENCE_MAX_COORDINATE = 1e5;
|
|
30
|
+
var clean = (value3) => typeof value3 === "string" && value3.length > 0 ? value3.slice(0, VISIO_PRESENCE_MAX_ID) : void 0;
|
|
31
|
+
var coordinate = (value3) => typeof value3 === "number" && Number.isFinite(value3) ? Math.max(-VISIO_PRESENCE_MAX_COORDINATE, Math.min(VISIO_PRESENCE_MAX_COORDINATE, value3)) : void 0;
|
|
32
|
+
function sanitizeVisioPresence(raw) {
|
|
33
|
+
const page = typeof raw.page === "number" && Number.isFinite(raw.page) ? String(raw.page) : raw.page;
|
|
34
|
+
if (typeof page !== "string") return null;
|
|
35
|
+
const presence = { page: page.slice(0, VISIO_PRESENCE_MAX_ID) };
|
|
36
|
+
const x = coordinate(raw.x);
|
|
37
|
+
const y = coordinate(raw.y);
|
|
38
|
+
if (x !== void 0 && y !== void 0) {
|
|
39
|
+
presence.x = x;
|
|
40
|
+
presence.y = y;
|
|
41
|
+
}
|
|
42
|
+
if (Array.isArray(raw.selection)) {
|
|
43
|
+
const ids = /* @__PURE__ */ new Set();
|
|
44
|
+
for (const entry3 of raw.selection) {
|
|
45
|
+
const id3 = clean(entry3);
|
|
46
|
+
if (id3) ids.add(id3);
|
|
47
|
+
if (ids.size >= VISIO_PRESENCE_MAX_SELECTION) break;
|
|
48
|
+
}
|
|
49
|
+
if (ids.size) presence.selection = [...ids];
|
|
50
|
+
}
|
|
51
|
+
return presence;
|
|
52
|
+
}
|
|
53
|
+
var VISIO_INITIAL_PRESENCE = Object.freeze({ page: "" });
|
|
54
|
+
function multiply(p, c2) {
|
|
55
|
+
return [
|
|
56
|
+
p[0] * c2[0] + p[2] * c2[1],
|
|
57
|
+
p[1] * c2[0] + p[3] * c2[1],
|
|
58
|
+
p[0] * c2[2] + p[2] * c2[3],
|
|
59
|
+
p[1] * c2[2] + p[3] * c2[3],
|
|
60
|
+
p[0] * c2[4] + p[2] * c2[5] + p[4],
|
|
61
|
+
p[1] * c2[4] + p[3] * c2[5] + p[5]
|
|
62
|
+
];
|
|
63
|
+
}
|
|
64
|
+
function visioShapeFrame(page, id3) {
|
|
65
|
+
const identity = [1, 0, 0, 1, 0, 0];
|
|
66
|
+
const find = (shapes, parent) => {
|
|
67
|
+
for (const shape of shapes) {
|
|
68
|
+
const transform2 = multiply(parent, shape.transform);
|
|
69
|
+
if (shape.id === id3) return { transform: transform2, width: shape.width, height: shape.height };
|
|
70
|
+
const inner = shape.children.length ? find(shape.children, transform2) : void 0;
|
|
71
|
+
if (inner) return inner;
|
|
72
|
+
}
|
|
73
|
+
return void 0;
|
|
74
|
+
};
|
|
75
|
+
const frame = find(page.shapes, identity);
|
|
76
|
+
return frame && [...frame.transform, frame.width, frame.height].every(Number.isFinite) ? frame : void 0;
|
|
77
|
+
}
|
|
78
|
+
|
|
24
79
|
// visio/ui/demo-document.ts
|
|
25
80
|
function box(id3, name3, x, y, width, height, fill, kind = "box") {
|
|
26
81
|
const path2 = kind === "diamond" ? `M ${width / 2} 0 L ${width} ${height / 2} L ${width / 2} ${height} L 0 ${height / 2} Z` : `M 0 0 L ${width} 0 L ${width} ${height} L 0 ${height} Z`;
|
|
@@ -170,15 +225,23 @@ var clampHistoryEntries = (entries) => Math.min(
|
|
|
170
225
|
Math.max(2, Number.isFinite(entries) ? Math.round(entries) : EDIT_HISTORY_LIMITS.maxEntries)
|
|
171
226
|
);
|
|
172
227
|
var DocumentHistory = class {
|
|
173
|
-
|
|
228
|
+
/** The last saved snapshot: the first one until the host calls `markClean()`. */
|
|
229
|
+
#baseline;
|
|
174
230
|
#entries;
|
|
175
231
|
#index = 0;
|
|
176
232
|
#truncated = false;
|
|
177
233
|
#maxEntries = EDIT_HISTORY_LIMITS.maxEntries;
|
|
178
234
|
constructor(bytes, maxEntries) {
|
|
179
235
|
if (maxEntries !== void 0) this.#maxEntries = clampHistoryEntries(maxEntries);
|
|
180
|
-
this
|
|
181
|
-
this.#entries = [this
|
|
236
|
+
this.#baseline = { bytes: Uint8Array.from(bytes), diagnostics: Object.freeze([]) };
|
|
237
|
+
this.#entries = [this.#baseline];
|
|
238
|
+
}
|
|
239
|
+
get original() {
|
|
240
|
+
return this.#baseline;
|
|
241
|
+
}
|
|
242
|
+
/** Declare the current snapshot saved: it becomes the reference `dirty` is measured against. */
|
|
243
|
+
markClean() {
|
|
244
|
+
this.#baseline = this.current;
|
|
182
245
|
}
|
|
183
246
|
get current() {
|
|
184
247
|
return this.#entries[this.#index];
|
|
@@ -1090,6 +1153,19 @@ var DEFAULT_XML_LIMITS = {
|
|
|
1090
1153
|
maxDepth: 512,
|
|
1091
1154
|
maxNodes: 5e6
|
|
1092
1155
|
};
|
|
1156
|
+
var XmlLimitError = class extends Error {
|
|
1157
|
+
code = "xml-limit";
|
|
1158
|
+
/** The limit that was exceeded. */
|
|
1159
|
+
limit;
|
|
1160
|
+
/** Its value: the largest depth or element count allowed. */
|
|
1161
|
+
maximum;
|
|
1162
|
+
constructor(message, limit2, maximum) {
|
|
1163
|
+
super(message);
|
|
1164
|
+
this.name = "XmlLimitError";
|
|
1165
|
+
this.limit = limit2;
|
|
1166
|
+
this.maximum = maximum;
|
|
1167
|
+
}
|
|
1168
|
+
};
|
|
1093
1169
|
var TAG_RE = /<(\/?)([^\s\/><]+)(?:\s+[^\s=\/><]+\s*=\s*(?:"[^"<]*"|'[^'<]*'))*\s*(\/?)>/y;
|
|
1094
1170
|
var MARKUP_SKIPS = [
|
|
1095
1171
|
["<!--", "-->"],
|
|
@@ -1123,11 +1199,22 @@ function checkXmlLimits(xml, label2, limits = {}) {
|
|
|
1123
1199
|
continue;
|
|
1124
1200
|
}
|
|
1125
1201
|
nodes++;
|
|
1126
|
-
if (nodes > maxNodes)
|
|
1202
|
+
if (nodes > maxNodes)
|
|
1203
|
+
throw new XmlLimitError(
|
|
1204
|
+
`${label2} XML exceeds the limit of ${maxNodes} elements`,
|
|
1205
|
+
"maxNodes",
|
|
1206
|
+
maxNodes
|
|
1207
|
+
);
|
|
1127
1208
|
if (!selfClosing && ++depth > maxDepth)
|
|
1128
|
-
throw new
|
|
1209
|
+
throw new XmlLimitError(
|
|
1210
|
+
`${label2} XML exceeds the nesting depth limit of ${maxDepth}`,
|
|
1211
|
+
"maxDepth",
|
|
1212
|
+
maxDepth
|
|
1213
|
+
);
|
|
1129
1214
|
}
|
|
1130
1215
|
}
|
|
1216
|
+
var CRLF_DECLARATION = /^<\?xml[^>]*\?>\r\n/;
|
|
1217
|
+
var crlfDeclarations = /* @__PURE__ */ new WeakSet();
|
|
1131
1218
|
function parseXml(xml, options2 = {}) {
|
|
1132
1219
|
const label2 = options2.label ?? "OOXML";
|
|
1133
1220
|
if (/<!DOCTYPE|<!ENTITY/i.test(xml))
|
|
@@ -1149,9 +1236,13 @@ function parseXml(xml, options2 = {}) {
|
|
|
1149
1236
|
}
|
|
1150
1237
|
if (parseError || !parsed.documentElement)
|
|
1151
1238
|
throw new Error(`Invalid ${label2} XML: ${parseError || "missing root element"}`);
|
|
1239
|
+
if (CRLF_DECLARATION.test(xml)) crlfDeclarations.add(parsed);
|
|
1152
1240
|
return parsed;
|
|
1153
1241
|
}
|
|
1154
|
-
var buildXml = (node3) =>
|
|
1242
|
+
var buildXml = (node3) => {
|
|
1243
|
+
const xml = new XMLSerializer().serializeToString(node3);
|
|
1244
|
+
return crlfDeclarations.has(node3) ? xml.replace(/^(<\?xml[^>]*\?>)\n/, "$1\r\n") : xml;
|
|
1245
|
+
};
|
|
1155
1246
|
var isElement = (node3) => node3.nodeType === 1;
|
|
1156
1247
|
var elements = (parent) => Array.from(parent.childNodes).filter(isElement);
|
|
1157
1248
|
function named(element2, local, ns, lenient = true) {
|
|
@@ -3307,7 +3398,7 @@ function evaluateVisioFormula(source, resolve, limits = {}) {
|
|
|
3307
3398
|
if (point2.kind !== "call" || point2.name !== "PNT")
|
|
3308
3399
|
return formulaFailure("unsupported", `${name3} of something other than PNT(x,y)`);
|
|
3309
3400
|
if (point2.args.length !== 2) return formulaFailure("arity", "Invalid PNT argument count");
|
|
3310
|
-
const [x, y] = point2.args.map((
|
|
3401
|
+
const [x, y] = point2.args.map((coordinate2) => evaluate(coordinate2, depth + 2));
|
|
3311
3402
|
const picked = name3 === "PNTX" ? x : y;
|
|
3312
3403
|
for (const item of [x, y])
|
|
3313
3404
|
if (item.unit !== "scalar" && item.unit !== "length")
|
|
@@ -4134,8 +4225,8 @@ function visioSimplifyIndices(points2, tolerance) {
|
|
|
4134
4225
|
return result2;
|
|
4135
4226
|
}
|
|
4136
4227
|
function visioSimplifyPath(points2, tolerance) {
|
|
4137
|
-
const
|
|
4138
|
-
return visioSimplifyIndices(
|
|
4228
|
+
const clean6 = visioCleanSamples(points2);
|
|
4229
|
+
return visioSimplifyIndices(clean6, tolerance).map((index2) => clean6[index2]);
|
|
4139
4230
|
}
|
|
4140
4231
|
function visioCatmullRomSegments(points2, closed) {
|
|
4141
4232
|
const count = points2.length;
|
|
@@ -10729,9 +10820,9 @@ function createWorksheet(name3, sheetId5) {
|
|
|
10729
10820
|
};
|
|
10730
10821
|
}
|
|
10731
10822
|
|
|
10732
|
-
// xlsx/
|
|
10733
|
-
function
|
|
10734
|
-
return JSON.stringify(sortKeys(
|
|
10823
|
+
// xlsx/stable-key.ts
|
|
10824
|
+
function stableKey(value3) {
|
|
10825
|
+
return JSON.stringify(sortKeys(value3));
|
|
10735
10826
|
}
|
|
10736
10827
|
function sortKeys(value3) {
|
|
10737
10828
|
if (Array.isArray(value3)) return value3.map(sortKeys);
|
|
@@ -10745,6 +10836,11 @@ function sortKeys(value3) {
|
|
|
10745
10836
|
}
|
|
10746
10837
|
return value3;
|
|
10747
10838
|
}
|
|
10839
|
+
|
|
10840
|
+
// xlsx/styles.ts
|
|
10841
|
+
function styleKey(style2) {
|
|
10842
|
+
return stableKey(style2);
|
|
10843
|
+
}
|
|
10748
10844
|
function styleAt(workbook, styleId) {
|
|
10749
10845
|
const style2 = workbook.styles[styleId ?? 0] ?? workbook.styles[0];
|
|
10750
10846
|
if (!style2) throw new Error("Workbook has no default cell style");
|
|
@@ -13354,10 +13450,13 @@ var DEFAULT_ZIP_LIMITS = {
|
|
|
13354
13450
|
var ZipLimitError = class extends Error {
|
|
13355
13451
|
code = "ZIP_BOMB";
|
|
13356
13452
|
limit;
|
|
13453
|
+
/** The check that failed (absent when the error was built without one). */
|
|
13454
|
+
kind;
|
|
13357
13455
|
constructor(message, details) {
|
|
13358
13456
|
super(message);
|
|
13359
13457
|
this.name = "ZipLimitError";
|
|
13360
13458
|
this.limit = details.limit;
|
|
13459
|
+
this.kind = details.kind;
|
|
13361
13460
|
}
|
|
13362
13461
|
};
|
|
13363
13462
|
var mib = (bytes) => Math.round(bytes / 1048576);
|
|
@@ -13380,7 +13479,7 @@ function resolveLimits(limits) {
|
|
|
13380
13479
|
maxEntryBytes: limits.maxEntryBytes ?? DEFAULT_ZIP_LIMITS.maxEntryBytes,
|
|
13381
13480
|
maxTotalBytes: limits.maxTotalBytes ?? DEFAULT_ZIP_LIMITS.maxTotalBytes,
|
|
13382
13481
|
label: limits.label ?? "ZIP",
|
|
13383
|
-
fail: (message, limit2) => create2 ? create2(message, { limit: limit2 }) : new ZipLimitError(message, { limit: limit2 })
|
|
13482
|
+
fail: (message, limit2, kind) => create2 ? create2(message, { limit: limit2, kind }) : new ZipLimitError(message, { limit: limit2, kind })
|
|
13384
13483
|
};
|
|
13385
13484
|
}
|
|
13386
13485
|
function inflateEntryGuarded(entry3, alreadyRead, limits) {
|
|
@@ -13403,13 +13502,18 @@ function inflateEntryGuarded(entry3, alreadyRead, limits) {
|
|
|
13403
13502
|
size3 += chunk.byteLength;
|
|
13404
13503
|
if (size3 > declared || size3 > r.maxEntryBytes)
|
|
13405
13504
|
return abort(
|
|
13406
|
-
r.fail(
|
|
13505
|
+
r.fail(
|
|
13506
|
+
`${r.label} part ${entry3.name} inflates past its declared size`,
|
|
13507
|
+
r.maxEntryBytes,
|
|
13508
|
+
size3 > declared ? "declaredSize" : "maxEntryBytes"
|
|
13509
|
+
)
|
|
13407
13510
|
);
|
|
13408
13511
|
if (alreadyRead + size3 > r.maxTotalBytes)
|
|
13409
13512
|
return abort(
|
|
13410
13513
|
r.fail(
|
|
13411
13514
|
`${r.label} package exceeds the ${mib(r.maxTotalBytes)} MiB uncompressed content limit`,
|
|
13412
|
-
r.maxTotalBytes
|
|
13515
|
+
r.maxTotalBytes,
|
|
13516
|
+
"maxTotalBytes"
|
|
13413
13517
|
)
|
|
13414
13518
|
);
|
|
13415
13519
|
chunks.push(chunk);
|
|
@@ -13442,26 +13546,29 @@ function guardZip(zip, limits = {}) {
|
|
|
13442
13546
|
if (entries.length > r.maxEntries)
|
|
13443
13547
|
throw r.fail(
|
|
13444
13548
|
`${r.label} package exceeds the ${r.maxEntries.toLocaleString("en-US")} part limit`,
|
|
13445
|
-
r.maxEntries
|
|
13549
|
+
r.maxEntries,
|
|
13550
|
+
"maxEntries"
|
|
13446
13551
|
);
|
|
13447
13552
|
let declared = 0;
|
|
13448
13553
|
for (const entry3 of entries) {
|
|
13449
13554
|
const original = entry3.unsafeOriginalName;
|
|
13450
13555
|
if (!isSafePartName(entry3.name) || original !== void 0 && !isSafePartName(original))
|
|
13451
|
-
throw r.fail(`${r.label} package has an unsafe part name`, r.maxEntries);
|
|
13556
|
+
throw r.fail(`${r.label} package has an unsafe part name`, r.maxEntries, "partName");
|
|
13452
13557
|
if (entry3.dir) continue;
|
|
13453
13558
|
const size3 = declaredEntrySize(entry3);
|
|
13454
13559
|
if (size3 > r.maxEntryBytes)
|
|
13455
13560
|
throw r.fail(
|
|
13456
13561
|
`${r.label} part ${entry3.name} exceeds the uncompressed part size limit`,
|
|
13457
|
-
r.maxEntryBytes
|
|
13562
|
+
r.maxEntryBytes,
|
|
13563
|
+
"maxEntryBytes"
|
|
13458
13564
|
);
|
|
13459
13565
|
declared += size3;
|
|
13460
13566
|
}
|
|
13461
13567
|
if (declared > r.maxTotalBytes)
|
|
13462
13568
|
throw r.fail(
|
|
13463
13569
|
`${r.label} package exceeds the ${mib(r.maxTotalBytes)} MiB uncompressed content limit`,
|
|
13464
|
-
r.maxTotalBytes
|
|
13570
|
+
r.maxTotalBytes,
|
|
13571
|
+
"maxTotalBytes"
|
|
13465
13572
|
);
|
|
13466
13573
|
const produced = /* @__PURE__ */ new Map();
|
|
13467
13574
|
let total = 0;
|
|
@@ -15330,10 +15437,69 @@ function mergeComments(legacy, threaded) {
|
|
|
15330
15437
|
(a2, b) => a2.address.row - b.address.row || a2.address.col - b.address.col
|
|
15331
15438
|
);
|
|
15332
15439
|
}
|
|
15333
|
-
|
|
15334
|
-
|
|
15335
|
-
var
|
|
15336
|
-
|
|
15440
|
+
|
|
15441
|
+
// xlsx/read/limits.ts
|
|
15442
|
+
var DEFAULT_XLSX_LOAD_LIMITS = {
|
|
15443
|
+
maxInputBytes: 50 * 1024 * 1024,
|
|
15444
|
+
maxParts: 1e4,
|
|
15445
|
+
maxPartBytes: 200 * 1024 * 1024,
|
|
15446
|
+
maxTotalBytes: 300 * 1024 * 1024,
|
|
15447
|
+
maxXmlElements: 5e6
|
|
15448
|
+
};
|
|
15449
|
+
var WorkbookTooLargeError = class extends Error {
|
|
15450
|
+
code = "workbook-too-large";
|
|
15451
|
+
/** The limit that was exceeded, as named in {@link XlsxLoadLimits}. */
|
|
15452
|
+
limit;
|
|
15453
|
+
/** The value of that limit when the load failed. */
|
|
15454
|
+
maximum;
|
|
15455
|
+
constructor(message, limit2, maximum, options2) {
|
|
15456
|
+
super(message, options2);
|
|
15457
|
+
this.name = "WorkbookTooLargeError";
|
|
15458
|
+
this.limit = limit2;
|
|
15459
|
+
this.maximum = maximum;
|
|
15460
|
+
}
|
|
15461
|
+
};
|
|
15462
|
+
function resolveLoadLimits(limits = {}) {
|
|
15463
|
+
const resolved = { ...DEFAULT_XLSX_LOAD_LIMITS };
|
|
15464
|
+
for (const name3 of Object.keys(resolved)) {
|
|
15465
|
+
const value3 = limits[name3];
|
|
15466
|
+
if (value3 === void 0) continue;
|
|
15467
|
+
if (!Number.isFinite(value3) || value3 <= 0)
|
|
15468
|
+
throw new RangeError(`limits.${name3} must be a positive finite number`);
|
|
15469
|
+
resolved[name3] = value3;
|
|
15470
|
+
}
|
|
15471
|
+
return resolved;
|
|
15472
|
+
}
|
|
15473
|
+
var ZIP_LIMIT_NAMES = {
|
|
15474
|
+
maxInputBytes: "maxInputBytes",
|
|
15475
|
+
maxEntries: "maxParts",
|
|
15476
|
+
maxEntryBytes: "maxPartBytes",
|
|
15477
|
+
maxTotalBytes: "maxTotalBytes"
|
|
15478
|
+
};
|
|
15479
|
+
function zipLimitsFor(limits) {
|
|
15480
|
+
return {
|
|
15481
|
+
maxInputBytes: limits.maxInputBytes,
|
|
15482
|
+
maxEntries: limits.maxParts,
|
|
15483
|
+
maxEntryBytes: limits.maxPartBytes,
|
|
15484
|
+
maxTotalBytes: limits.maxTotalBytes,
|
|
15485
|
+
label: "XLSX",
|
|
15486
|
+
createError: (message, { limit: limit2, kind }) => {
|
|
15487
|
+
const name3 = ZIP_LIMIT_NAMES[kind];
|
|
15488
|
+
return name3 ? new WorkbookTooLargeError(message, name3, limit2) : new ZipLimitError(message, { limit: limit2, kind });
|
|
15489
|
+
}
|
|
15490
|
+
};
|
|
15491
|
+
}
|
|
15492
|
+
function parseDataXml(xml, label2, maxXmlElements = DEFAULT_XLSX_LOAD_LIMITS.maxXmlElements) {
|
|
15493
|
+
try {
|
|
15494
|
+
return parseXml(xml, { label: label2, limits: { maxNodes: maxXmlElements } });
|
|
15495
|
+
} catch (error) {
|
|
15496
|
+
if (error instanceof XmlLimitError && error.limit === "maxNodes")
|
|
15497
|
+
throw new WorkbookTooLargeError(error.message, "maxXmlElements", error.maximum, {
|
|
15498
|
+
cause: error
|
|
15499
|
+
});
|
|
15500
|
+
throw error;
|
|
15501
|
+
}
|
|
15502
|
+
}
|
|
15337
15503
|
var CONTENT_TYPES = {
|
|
15338
15504
|
workbook: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml",
|
|
15339
15505
|
workbookMacro: "application/vnd.ms-excel.sheet.macroEnabled.main+xml",
|
|
@@ -15404,16 +15570,15 @@ var SourceIndex = class {
|
|
|
15404
15570
|
};
|
|
15405
15571
|
var mib2 = (bytes) => Math.round(bytes / 1048576);
|
|
15406
15572
|
async function readZipParts(input, limits = {}) {
|
|
15407
|
-
const
|
|
15408
|
-
const
|
|
15409
|
-
maxEntries: limits.maxParts ?? MAX_PARTS,
|
|
15410
|
-
maxEntryBytes: limits.maxPartBytes ?? MAX_PART_BYTES,
|
|
15411
|
-
maxTotalBytes: limits.maxTotalBytes ?? MAX_UNCOMPRESSED_BYTES,
|
|
15412
|
-
label: "XLSX"
|
|
15413
|
-
};
|
|
15573
|
+
const resolved = resolveLoadLimits(limits);
|
|
15574
|
+
const maxInput = resolved.maxInputBytes;
|
|
15414
15575
|
const bytes = input instanceof Uint8Array ? input : new Uint8Array(input);
|
|
15415
15576
|
if (bytes.byteLength > maxInput)
|
|
15416
|
-
throw new
|
|
15577
|
+
throw new WorkbookTooLargeError(
|
|
15578
|
+
`XLSX package exceeds the ${mib2(maxInput)} MiB compressed input limit`,
|
|
15579
|
+
"maxInputBytes",
|
|
15580
|
+
maxInput
|
|
15581
|
+
);
|
|
15417
15582
|
let loaded;
|
|
15418
15583
|
try {
|
|
15419
15584
|
loaded = await JSZip.loadAsync(bytes);
|
|
@@ -15423,7 +15588,7 @@ async function readZipParts(input, limits = {}) {
|
|
|
15423
15588
|
{ cause: error }
|
|
15424
15589
|
);
|
|
15425
15590
|
}
|
|
15426
|
-
const zip = guardZip(loaded,
|
|
15591
|
+
const zip = guardZip(loaded, zipLimitsFor(resolved));
|
|
15427
15592
|
const parts = /* @__PURE__ */ new Map();
|
|
15428
15593
|
for (const entry3 of Object.values(zip.files)) {
|
|
15429
15594
|
if (entry3.dir) continue;
|
|
@@ -15630,9 +15795,9 @@ function parseRichString(element2, palette) {
|
|
|
15630
15795
|
const text8 = parsed.map((run) => run.text).join("");
|
|
15631
15796
|
return { text: text8, runs: parsed };
|
|
15632
15797
|
}
|
|
15633
|
-
function parseSharedStrings(xml, palette) {
|
|
15798
|
+
function parseSharedStrings(xml, palette, maxXmlElements) {
|
|
15634
15799
|
if (!xml) return [];
|
|
15635
|
-
const root2 =
|
|
15800
|
+
const root2 = parseDataXml(xml, "XLSX shared strings", maxXmlElements).documentElement;
|
|
15636
15801
|
return xChildren(root2, "si").map((si) => parseRichString(si, palette));
|
|
15637
15802
|
}
|
|
15638
15803
|
|
|
@@ -16164,8 +16329,8 @@ function sigmaGradientStops(stops) {
|
|
|
16164
16329
|
|
|
16165
16330
|
// color/hex-rgb.ts
|
|
16166
16331
|
function parseArgbHex(hex2) {
|
|
16167
|
-
const
|
|
16168
|
-
const rgb6 =
|
|
16332
|
+
const clean6 = hex2.replace(/^#/, "");
|
|
16333
|
+
const rgb6 = clean6.length === 8 ? clean6.slice(2) : clean6;
|
|
16169
16334
|
if (!/^[0-9a-fA-F]{6}$/.test(rgb6)) return void 0;
|
|
16170
16335
|
return [0, 2, 4].map((i) => parseInt(rgb6.slice(i, i + 2), 16));
|
|
16171
16336
|
}
|
|
@@ -20744,7 +20909,11 @@ function parseWorksheet(ctx, partName, name3, sheetId5) {
|
|
|
20744
20909
|
return sheet;
|
|
20745
20910
|
}
|
|
20746
20911
|
const split = splitSheetData(xml);
|
|
20747
|
-
const root2 =
|
|
20912
|
+
const root2 = parseDataXml(
|
|
20913
|
+
split?.xml ?? xml,
|
|
20914
|
+
"XLSX worksheet",
|
|
20915
|
+
ctx.maxXmlElements
|
|
20916
|
+
).documentElement;
|
|
20748
20917
|
const byName = /* @__PURE__ */ new Map();
|
|
20749
20918
|
const cfBlocks = [];
|
|
20750
20919
|
for (const node3 of elements(root2)) {
|
|
@@ -20818,8 +20987,9 @@ function liftPrintAreas(workbook) {
|
|
|
20818
20987
|
return false;
|
|
20819
20988
|
});
|
|
20820
20989
|
}
|
|
20821
|
-
async function loadXlsx(input) {
|
|
20822
|
-
const
|
|
20990
|
+
async function loadXlsx(input, options2 = {}) {
|
|
20991
|
+
const limits = resolveLoadLimits(options2.limits);
|
|
20992
|
+
const parts = await readZipParts(input, limits);
|
|
20823
20993
|
const source = new SourceIndex(parts);
|
|
20824
20994
|
const workbookPart = source.workbookPart();
|
|
20825
20995
|
if (!workbookPart) throw new Error("XLSX package has no workbook part (xl/workbook.xml)");
|
|
@@ -20840,7 +21010,8 @@ async function loadXlsx(input) {
|
|
|
20840
21010
|
source,
|
|
20841
21011
|
sharedStrings: parseSharedStrings(
|
|
20842
21012
|
stringsPart ? source.text(stringsPart) : void 0,
|
|
20843
|
-
styles.palette
|
|
21013
|
+
styles.palette,
|
|
21014
|
+
limits.maxXmlElements
|
|
20844
21015
|
),
|
|
20845
21016
|
xfMap: styles.xfMap,
|
|
20846
21017
|
date1904: book.date1904,
|
|
@@ -20848,7 +21019,8 @@ async function loadXlsx(input) {
|
|
|
20848
21019
|
dxfs: styles.dxfs,
|
|
20849
21020
|
persons: parsePersons(personsPart ? source.text(personsPart) : void 0),
|
|
20850
21021
|
dynamicCells: parseDynamicArrayMetadata(metadataPart ? source.text(metadataPart) : void 0),
|
|
20851
|
-
warn
|
|
21022
|
+
warn,
|
|
21023
|
+
maxXmlElements: limits.maxXmlElements
|
|
20852
21024
|
};
|
|
20853
21025
|
const rels = source.rels(workbookPart);
|
|
20854
21026
|
const sheets = book.sheets.map((entry3) => {
|
|
@@ -21266,12 +21438,12 @@ function autoSeriesColor(theme2, index2) {
|
|
|
21266
21438
|
}
|
|
21267
21439
|
|
|
21268
21440
|
// chart/render/chart-scale.ts
|
|
21269
|
-
var
|
|
21441
|
+
var clean2 = (n) => Number(n.toPrecision(12));
|
|
21270
21442
|
function* units2(raw) {
|
|
21271
21443
|
let exp = Math.floor(Math.log10(raw)) - 1;
|
|
21272
21444
|
for (; ; ) {
|
|
21273
21445
|
const base2 = 10 ** exp;
|
|
21274
|
-
for (const m of [1, 2, 5]) yield
|
|
21446
|
+
for (const m of [1, 2, 5]) yield clean2(m * base2);
|
|
21275
21447
|
exp++;
|
|
21276
21448
|
}
|
|
21277
21449
|
}
|
|
@@ -21304,13 +21476,13 @@ function niceScale(dataMin, dataMax, options2 = {}) {
|
|
|
21304
21476
|
const top = fixedHi ? hi : hi + range2 * 0.05;
|
|
21305
21477
|
const bottom = fixedLo ? lo : lo - range2 * 0.05;
|
|
21306
21478
|
for (const unit3 of units2(range2 / maxIntervals)) {
|
|
21307
|
-
const min = fixedLo ? lo : Math.floor(
|
|
21308
|
-
const max = fixedHi ? hi : Math.ceil(
|
|
21479
|
+
const min = fixedLo ? lo : Math.floor(clean2(bottom / unit3)) * unit3;
|
|
21480
|
+
const max = fixedHi ? hi : Math.ceil(clean2(top / unit3)) * unit3;
|
|
21309
21481
|
const intervals = Math.round((max - min) / unit3);
|
|
21310
21482
|
if (intervals <= maxIntervals && intervals > 0) {
|
|
21311
21483
|
const ticks = [];
|
|
21312
|
-
for (let i = 0; i <= intervals; i++) ticks.push(
|
|
21313
|
-
return { min:
|
|
21484
|
+
for (let i = 0; i <= intervals; i++) ticks.push(clean2(min + i * unit3));
|
|
21485
|
+
return { min: clean2(min), max: clean2(max), majorUnit: unit3, ticks };
|
|
21314
21486
|
}
|
|
21315
21487
|
}
|
|
21316
21488
|
return { min: lo, max: hi, majorUnit: range2, ticks: [lo, hi] };
|
|
@@ -21322,8 +21494,8 @@ var PERCENT_SCALE = {
|
|
|
21322
21494
|
ticks: [0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1]
|
|
21323
21495
|
};
|
|
21324
21496
|
function formatAxisValue(value3, percent = false) {
|
|
21325
|
-
if (percent) return `${
|
|
21326
|
-
const v =
|
|
21497
|
+
if (percent) return `${clean2(value3 * 100)}%`;
|
|
21498
|
+
const v = clean2(value3);
|
|
21327
21499
|
if (Math.abs(v) >= 1e15 || v !== 0 && Math.abs(v) < 1e-6)
|
|
21328
21500
|
return v.toExponential(2).replace("e+", "E+").replace("e-", "E-");
|
|
21329
21501
|
const [int3 = "0", frac] = String(Math.abs(v)).split(".");
|
|
@@ -21331,14 +21503,24 @@ function formatAxisValue(value3, percent = false) {
|
|
|
21331
21503
|
return `${v < 0 ? "-" : ""}${grouped}${frac ? `.${frac}` : ""}`;
|
|
21332
21504
|
}
|
|
21333
21505
|
|
|
21506
|
+
// chart/extent.ts
|
|
21507
|
+
function extentOf(values) {
|
|
21508
|
+
let min = Infinity;
|
|
21509
|
+
let max = -Infinity;
|
|
21510
|
+
for (const value3 of values) {
|
|
21511
|
+
min = Math.min(min, value3);
|
|
21512
|
+
max = Math.max(max, value3);
|
|
21513
|
+
}
|
|
21514
|
+
return { min, max };
|
|
21515
|
+
}
|
|
21516
|
+
|
|
21334
21517
|
// chart/axis-range.ts
|
|
21335
21518
|
function computeLogValueRange(series, logBase) {
|
|
21336
21519
|
const allValues = series.flatMap((item) => item.values).filter((value3) => value3 !== null && Number.isFinite(value3) && value3 > 0);
|
|
21337
21520
|
if (allValues.length === 0) {
|
|
21338
21521
|
return { min: 1, max: logBase, span: 1, logScale: true, logBase };
|
|
21339
21522
|
}
|
|
21340
|
-
const dataMin =
|
|
21341
|
-
const dataMax = Math.max(...allValues);
|
|
21523
|
+
const { min: dataMin, max: dataMax } = extentOf(allValues);
|
|
21342
21524
|
const logMin = Math.floor(Math.log(dataMin) / Math.log(logBase));
|
|
21343
21525
|
const logMax = Math.ceil(Math.log(dataMax) / Math.log(logBase));
|
|
21344
21526
|
const min = logBase ** logMin;
|
|
@@ -22066,8 +22248,7 @@ function computeHistogramBins(values, options2, format5 = String) {
|
|
|
22066
22248
|
});
|
|
22067
22249
|
}
|
|
22068
22250
|
if (regular.length > 0) {
|
|
22069
|
-
const min =
|
|
22070
|
-
const max = Math.max(...regular.map((item) => item.value));
|
|
22251
|
+
const { min, max } = extentOf(regular.map((item) => item.value));
|
|
22071
22252
|
const requestedSize = options2.binSize && options2.binSize > 0 ? options2.binSize : void 0;
|
|
22072
22253
|
const requestedCount = options2.binCount && options2.binCount > 0 ? options2.binCount : void 0;
|
|
22073
22254
|
const start = requestedSize ? Math.floor(min / requestedSize) * requestedSize : min;
|
|
@@ -22195,8 +22376,9 @@ function waterfallView(chart, model, ctx) {
|
|
|
22195
22376
|
colors: { increase: role(0), decrease: role(1), total: role(2) }
|
|
22196
22377
|
};
|
|
22197
22378
|
const ends = steps.flatMap((step3) => [step3.startValue, step3.endValue]);
|
|
22379
|
+
const range2 = extentOf(ends);
|
|
22198
22380
|
model.valueAxis = {
|
|
22199
|
-
...ends.length ? niceScale(
|
|
22381
|
+
...ends.length ? niceScale(range2.min, range2.max) : niceScale(0, 1),
|
|
22200
22382
|
percent: false
|
|
22201
22383
|
};
|
|
22202
22384
|
const labels = model.categories;
|
|
@@ -22312,7 +22494,8 @@ function chartSummaryView(chart, theme2, options2 = {}) {
|
|
|
22312
22494
|
s.xValues = s.values.map((_, k) => numeric4 ? toNumber(cats[k] ?? null) : k + 1);
|
|
22313
22495
|
});
|
|
22314
22496
|
const xs = series.flatMap((s) => s.xValues ?? []).filter((x) => x !== null);
|
|
22315
|
-
|
|
22497
|
+
const range2 = extentOf(xs);
|
|
22498
|
+
model.xAxis = xs.length ? niceScale(range2.min, range2.max) : niceScale(0, 1);
|
|
22316
22499
|
}
|
|
22317
22500
|
if (type === "stock") model.stock = stockView(chart.stock, ctx);
|
|
22318
22501
|
if (type === "bubble") bubbleView(chart, model, ctx.evaluateRef);
|
|
@@ -23135,8 +23318,8 @@ function themeColor2(cells4, name3, resources, report, gradientRendered = false)
|
|
|
23135
23318
|
// visio/theme-gradient.ts
|
|
23136
23319
|
function linearGradientEndpoints(width, height, angle) {
|
|
23137
23320
|
const radians = angle / 6e4 * Math.PI / 180;
|
|
23138
|
-
const
|
|
23139
|
-
const dx =
|
|
23321
|
+
const clean6 = (value3) => Math.abs(value3) < 1e-12 ? 0 : value3;
|
|
23322
|
+
const dx = clean6(Math.cos(radians)), dy = clean6(-Math.sin(radians));
|
|
23140
23323
|
const half = (Math.abs(dx) * width + Math.abs(dy) * height) / 2;
|
|
23141
23324
|
return {
|
|
23142
23325
|
start: [width / 2 - dx * half, height / 2 - dy * half],
|
|
@@ -24803,8 +24986,8 @@ function roundedOrthogonalPath(points2, radius, point2) {
|
|
|
24803
24986
|
}
|
|
24804
24987
|
|
|
24805
24988
|
// visio/geometry.ts
|
|
24806
|
-
var
|
|
24807
|
-
var point = (x, y) => `${
|
|
24989
|
+
var clean3 = (value3) => Math.abs(value3) < 1e-12 ? 0 : Number(value3.toFixed(9));
|
|
24990
|
+
var point = (x, y) => `${clean3(x)} ${clean3(y)}`;
|
|
24808
24991
|
function shapeTransformDetails(cells4, width, height, report) {
|
|
24809
24992
|
const pinX = number(cells4, "PinX", width / 2, report), pinY = number(cells4, "PinY", height / 2, report);
|
|
24810
24993
|
const angle = number(cells4, "Angle", 0, report);
|
|
@@ -24844,7 +25027,7 @@ function ellipticalArc(startX, startY, x, y, midX, midY, angle, ratio) {
|
|
|
24844
25027
|
const sweep = middle <= span ? 1 : 0;
|
|
24845
25028
|
const large = (sweep ? span : tau - span) > Math.PI ? 1 : 0;
|
|
24846
25029
|
if (!Number.isFinite(radius) || radius > 1e9) return void 0;
|
|
24847
|
-
return `A ${point(radius, radius / ratio)} ${
|
|
25030
|
+
return `A ${point(radius, radius / ratio)} ${clean3(angle * 180 / Math.PI)} ${large} ${sweep} ${point(x, y)}`;
|
|
24848
25031
|
}
|
|
24849
25032
|
function geometryPaths(sheet, width, height, report, consume, consumeWork = () => {
|
|
24850
25033
|
}) {
|
|
@@ -24976,7 +25159,7 @@ function geometryPaths(sheet, width, height, report, consume, consumeWork = () =
|
|
|
24976
25159
|
);
|
|
24977
25160
|
break;
|
|
24978
25161
|
}
|
|
24979
|
-
const rotation =
|
|
25162
|
+
const rotation = clean3(Math.atan2(b, a2) * 180 / Math.PI);
|
|
24980
25163
|
commands.push(
|
|
24981
25164
|
`M ${point(x + a2, y + b)} A ${point(rx, ry)} ${rotation} 0 1 ${point(x - a2, y - b)} A ${point(rx, ry)} ${rotation} 0 1 ${point(x + a2, y + b)} Z`
|
|
24982
25165
|
);
|
|
@@ -31863,8 +32046,8 @@ function invert(m) {
|
|
|
31863
32046
|
(m[1] * m[4] - m[0] * m[5]) / det
|
|
31864
32047
|
];
|
|
31865
32048
|
}
|
|
31866
|
-
var
|
|
31867
|
-
var text4 = (p) => `${
|
|
32049
|
+
var clean4 = (value3) => Math.abs(value3) < 1e-9 ? 0 : Number(value3.toFixed(6));
|
|
32050
|
+
var text4 = (p) => `${clean4(p.x)} ${clean4(p.y)}`;
|
|
31868
32051
|
var horizontal = (s) => Math.abs(s.b.x - s.a.x) > Math.abs(s.b.y - s.a.y);
|
|
31869
32052
|
var vertical = (s) => Math.abs(s.b.y - s.a.y) > Math.abs(s.b.x - s.a.x);
|
|
31870
32053
|
function crossing(s, other, margin) {
|
|
@@ -31920,7 +32103,7 @@ function jump(style2, from, to, local, reverse) {
|
|
|
31920
32103
|
const start = local(from), top = at2(0, half);
|
|
31921
32104
|
const radius = Math.hypot(end.x - start.x, end.y - start.y) / 2;
|
|
31922
32105
|
const sweep = (end.x - start.x) * (top.y - start.y) - (end.y - start.y) * (top.x - start.x) > 0 ? 0 : 1;
|
|
31923
|
-
return `A ${
|
|
32106
|
+
return `A ${clean4(radius)} ${clean4(radius)} 0 0 ${sweep} ${text4(end)}`;
|
|
31924
32107
|
}
|
|
31925
32108
|
var connector = (shape, glued) => shape.kind === "connector" && !shape.hidden && !shape.children.length && (shape.connectorRoute !== void 0 || glued.has(shape.id));
|
|
31926
32109
|
function visioLineJumpPaths(page) {
|
|
@@ -37592,7 +37775,7 @@ function assertParentIndependent(facts, from, ids) {
|
|
|
37592
37775
|
}
|
|
37593
37776
|
|
|
37594
37777
|
// visio/edit-group.ts
|
|
37595
|
-
var
|
|
37778
|
+
var clean5 = (value3) => Math.abs(value3) < 1e-12 ? 0 : value3;
|
|
37596
37779
|
var NONE = /* @__PURE__ */ new Map();
|
|
37597
37780
|
function topLevel(root2) {
|
|
37598
37781
|
const containers = children2(root2, "Shapes");
|
|
@@ -37712,7 +37895,7 @@ function groupVisioShapes(root2, document, edit, check, instances = NONE) {
|
|
|
37712
37895
|
const topmost = members3[members3.length - 1];
|
|
37713
37896
|
topmost.parentNode.insertBefore(group2, topmost);
|
|
37714
37897
|
for (const plan of plans) {
|
|
37715
|
-
const x =
|
|
37898
|
+
const x = clean5(plan.pinX - minX), y = clean5(plan.pinY - minY);
|
|
37716
37899
|
const instance = instances.get(plan.member);
|
|
37717
37900
|
if (instance) placeInstance(instance, x, y, check);
|
|
37718
37901
|
else {
|
|
@@ -37785,9 +37968,9 @@ function ungroupVisioShape(root2, document, edit, check, instances = NONE) {
|
|
|
37785
37968
|
if (Math.abs(Math.abs(angle) - Math.PI) < 1e-12) angle = Math.PI;
|
|
37786
37969
|
const plan = {
|
|
37787
37970
|
member: member2,
|
|
37788
|
-
pinX:
|
|
37789
|
-
pinY:
|
|
37790
|
-
angle:
|
|
37971
|
+
pinX: clean5(a2 * box5.pinX + c2 * box5.pinY + e),
|
|
37972
|
+
pinY: clean5(b * box5.pinX + d * box5.pinY + f),
|
|
37973
|
+
angle: clean5(angle),
|
|
37791
37974
|
flipX: box5.flipX !== parent.flipX ? 1 : 0,
|
|
37792
37975
|
flipY: box5.flipY !== parent.flipY ? 1 : 0,
|
|
37793
37976
|
box: box5
|
|
@@ -39969,7 +40152,7 @@ function assertTextFields(text8) {
|
|
|
39969
40152
|
}
|
|
39970
40153
|
|
|
39971
40154
|
// visio/ui/scene-validation.ts
|
|
39972
|
-
var
|
|
40155
|
+
var MAX_INPUT_BYTES = 32 * 1024 * 1024;
|
|
39973
40156
|
var MAX_DIMENSION = 1e4;
|
|
39974
40157
|
var MAX_SHAPES = 25e3;
|
|
39975
40158
|
function finite4(value3, label2, min = -MAX_DIMENSION, max = MAX_DIMENSION) {
|
|
@@ -40646,7 +40829,7 @@ function visioPageEditToDrawing(page, edit) {
|
|
|
40646
40829
|
if (!Number.isFinite(ratio) || ratio <= 0 || page.id !== edit.pageId)
|
|
40647
40830
|
throw new Error("Invalid page scale or edit page.");
|
|
40648
40831
|
if (ratio === 1) return edit;
|
|
40649
|
-
const
|
|
40832
|
+
const coordinate2 = (value3) => {
|
|
40650
40833
|
const drawing2 = value3 / ratio;
|
|
40651
40834
|
if (!Number.isFinite(drawing2)) throw new Error("Drawing coordinate exceeds finite limits.");
|
|
40652
40835
|
return drawing2;
|
|
@@ -40662,41 +40845,41 @@ function visioPageEditToDrawing(page, edit) {
|
|
|
40662
40845
|
case "create-text-box":
|
|
40663
40846
|
return {
|
|
40664
40847
|
...edit,
|
|
40665
|
-
x:
|
|
40666
|
-
y:
|
|
40667
|
-
width:
|
|
40668
|
-
height:
|
|
40848
|
+
x: coordinate2(edit.x),
|
|
40849
|
+
y: coordinate2(edit.y),
|
|
40850
|
+
width: coordinate2(edit.width),
|
|
40851
|
+
height: coordinate2(edit.height)
|
|
40669
40852
|
};
|
|
40670
40853
|
case "create-path":
|
|
40671
40854
|
return {
|
|
40672
40855
|
...edit,
|
|
40673
|
-
x:
|
|
40674
|
-
y:
|
|
40856
|
+
x: coordinate2(edit.x),
|
|
40857
|
+
y: coordinate2(edit.y),
|
|
40675
40858
|
segments: edit.segments.map((segment) => ({
|
|
40676
40859
|
...segment,
|
|
40677
|
-
x:
|
|
40678
|
-
y:
|
|
40860
|
+
x: coordinate2(segment.x),
|
|
40861
|
+
y: coordinate2(segment.y),
|
|
40679
40862
|
...segment.kind === "cubic" ? {
|
|
40680
|
-
x1:
|
|
40681
|
-
y1:
|
|
40682
|
-
x2:
|
|
40683
|
-
y2:
|
|
40684
|
-
} : segment.kind === "arc" ? { a:
|
|
40863
|
+
x1: coordinate2(segment.x1),
|
|
40864
|
+
y1: coordinate2(segment.y1),
|
|
40865
|
+
x2: coordinate2(segment.x2),
|
|
40866
|
+
y2: coordinate2(segment.y2)
|
|
40867
|
+
} : segment.kind === "arc" ? { a: coordinate2(segment.a), b: coordinate2(segment.b) } : {}
|
|
40685
40868
|
}))
|
|
40686
40869
|
};
|
|
40687
40870
|
case "create-line":
|
|
40688
40871
|
return {
|
|
40689
40872
|
...edit,
|
|
40690
|
-
beginX:
|
|
40691
|
-
beginY:
|
|
40692
|
-
endX:
|
|
40693
|
-
endY:
|
|
40873
|
+
beginX: coordinate2(edit.beginX),
|
|
40874
|
+
beginY: coordinate2(edit.beginY),
|
|
40875
|
+
endX: coordinate2(edit.endX),
|
|
40876
|
+
endY: coordinate2(edit.endY)
|
|
40694
40877
|
};
|
|
40695
40878
|
case "move-shape":
|
|
40696
40879
|
case "move-line-endpoint":
|
|
40697
|
-
return { ...edit, x:
|
|
40880
|
+
return { ...edit, x: coordinate2(edit.x), y: coordinate2(edit.y) };
|
|
40698
40881
|
case "resize-shape":
|
|
40699
|
-
return { ...edit, width:
|
|
40882
|
+
return { ...edit, width: coordinate2(edit.width), height: coordinate2(edit.height) };
|
|
40700
40883
|
default:
|
|
40701
40884
|
return edit;
|
|
40702
40885
|
}
|
|
@@ -41804,11 +41987,11 @@ var boundedNumber = (value3) => Number.isFinite(value3) && Math.abs(value3) <= 1
|
|
|
41804
41987
|
function visioDrawingPoint(page, point2, options2 = {}) {
|
|
41805
41988
|
if (![point2.x, point2.y, page.width, page.height].every(boundedNumber) || page.width <= 0 || page.height <= 0)
|
|
41806
41989
|
return void 0;
|
|
41807
|
-
const
|
|
41990
|
+
const coordinate2 = (value3, maximum) => {
|
|
41808
41991
|
const bounded6 = options2.bounded === false ? value3 : Math.max(0, Math.min(maximum, value3));
|
|
41809
41992
|
return options2.snap === false ? bounded6 : Math.round(bounded6 / SNAP) * SNAP;
|
|
41810
41993
|
};
|
|
41811
|
-
return { x:
|
|
41994
|
+
return { x: coordinate2(point2.x, page.width), y: coordinate2(point2.y, page.height) };
|
|
41812
41995
|
}
|
|
41813
41996
|
function visioDrawBounds(start, end) {
|
|
41814
41997
|
if (![start.x, start.y, end.x, end.y].every(boundedNumber))
|
|
@@ -45003,4 +45186,4 @@ async function createSampleVsdx() {
|
|
|
45003
45186
|
return (await editVsdx(pages.bytes, PAGES.flatMap(shapeEdits))).bytes;
|
|
45004
45187
|
}
|
|
45005
45188
|
|
|
45006
|
-
export { DocumentHistory, EDIT_HISTORY_LIMITS, EMPTY_EDIT_STATE, EMPTY_SELECTION, EMPTY_TEXT_SEARCH, FOREIGN_VECTOR_SCENE_LIMITS, ForeignVectorBudget,
|
|
45189
|
+
export { DocumentHistory, EDIT_HISTORY_LIMITS, EMPTY_EDIT_STATE, EMPTY_SELECTION, EMPTY_TEXT_SEARCH, FOREIGN_VECTOR_SCENE_LIMITS, ForeignVectorBudget, MAX_INPUT_BYTES, TEXT_SEARCH_LIMITS, VISIO_AUTO_CONNECT_DIRECTIONS, VISIO_AUTO_CONNECT_GAP, VISIO_AUTO_CONNECT_REACH, VISIO_BULLET_STYLES, VISIO_CHART_OBJECT_SIZE, VISIO_DATA_GRAPHIC_FILL_ROW, VISIO_DATA_GRAPHIC_ICONS, VISIO_DATA_GRAPHIC_ROW, VISIO_DIAGRAM_RULE_SETS, VISIO_FIELD_CATEGORIES, VISIO_FORMAT_PAINTER_LIMITS, VISIO_GRID_DENSITY_CHOICES, IDENTITY_AFFINE as VISIO_IDENTITY_TRANSFORM, VISIO_INITIAL_PRESENCE, VISIO_LAYOUT_LABELS, VISIO_LAYOUT_STYLES, VISIO_PAGE_SIZE_PRESETS, VISIO_PAPER_SIZES, VISIO_PASTE_TEXT_LIMIT, VISIO_PATH_CLOSE_DISTANCE, VISIO_PATH_TOLERANCE, VISIO_PICTURE_DPI, VISIO_PRESENCE_MAX_COORDINATE, VISIO_PRESENCE_MAX_ID, VISIO_PRESENCE_MAX_SELECTION, VISIO_RESIZE_HANDLES, VISIO_RULER_DENSITY_CHOICES, VISIO_SELECT_TYPES, VISIO_SELECT_TYPE_LABELS, VISIO_SUBPROCESS_SHAPE, VISIO_TEXT_BLOCK_HANDLES, VISIO_TEXT_LANGUAGES, VISIO_TEXT_REPLACE_LIMITS, VisioTextDraftError, assertShapeDetails, assertViewableDocument, checkVisioDiagram, clampHistoryEntries, compatibilityNotes, compatibilityText, composeAffine as composeVisioTransform, copySnapshotScene, createSampleVsdx, demoDocument, editErrorMessage, eventKeys, excelSerialToIso, hasVisibleShapeContent, indexDocumentText, inspectForeignVectorResource, isEditCancellation, isVisioPathTool, normalizeVisioHyperlinkAddress, propertyKeys, sameSelection, sanitizeVisioPresence, searchDocumentText, selectionKey, snapshotEdits, snapshotSelection, textSearchStatus, validateSearchQuery, visioAddConnectionPointCommand, visioArrangeCommands, visioAutoAlignCommands, visioAutoConnectArrows, visioAutoConnectNeighbor, visioAutoConnectPlacement, visioAutoConnectPlan, visioAutoConnectShape, visioAutoConnectSidePoint, visioBoxCreationCommand, visioCalloutCommand, visioChangeCaseCommand, visioChangeCaseShape, visioChangeMasterCommand, visioChangeMasterTargets, visioChangeShapeCommand, visioChangeShapeRefusal, visioChartObjectInsertCommand, visioClipboardShape, visioColorRules, visioConnectableShape, visioConnectorCreationCommand, visioConnectorEdges, visioConnectorEndHandles, visioConnectorMovePreviews, visioConnectorPreviewPath, visioConnectorRouteOf, visioContainerCommand, visioCopyableShape, visioDataGraphicEdits, visioDataGraphicFields, visioDataGraphicMarker, visioDataGraphicParts, visioDataTable, visioDrawBounds, visioDrawIsLargeEnough, visioDrawPlan, visioDrawingPoint, visioDuplicateCommand, visioFileMasterDropCommand, visioFillPatternTransform, visioFitToDrawingEdits, visioFollowTarget, visioFontFamilies, visioFormatPainterEdits, visioFormatPainterSnapshot, visioFormatTargetShape, visioFormattingShape, visioGlowKey, visioGlueableShape, visioGradientInstances, visioGridSteps, visioGroupCommand, visioGuideCreateCommand, visioGuideMoveCommand, visioKeepAutoSize, visioLayerAssignCommand, visioLayerAssignCommands, visioLayerAssignState, visioLegendEdits, visioLineCreationCommand, visioLineDashLengths, visioLocalFormattingShape, visioLocalRotationShape, visioMarqueeBox, visioMarqueeSelection, visioMasterDropCommand, visioMasterDropRefusal, visioMasterDropSize, visioMasterPreviewBox, visioMatchingPaperSize, visioMovableGroup, visioMoveCommands, visioMovePreviewTransform, visioMoveTargets, visioMovementShape, visioNearestConnectionPoint, visioNewLayerNames, visioNewPageId, visioNextShapeId, visioNudgeCommands, visioOrderingShape, visioOrientationEdits, visioPageBreaks, visioPageConnectionPoints, visioPageDecorationState, visioPageDragDelta, visioPageEditToDrawing, visioPageGuides, visioPageInsertCommand, visioPageMasters, visioPageOrientationCommand, visioPageSizeCommand, visioPageSizePresetCommand, visioPageSizePresetEdits, visioPageSizeState, visioPaperSize, visioParseRange, visioPasteCommand, visioPasteTextCommand, visioPasteTextValue, visioPathDrawPlan, visioPathPreview, visioPictureInsertCommand, visioPrintTile, visioQuarterTurnCommand, visioReLayoutCommands, visioReflectionKey, visioRemoveDataGraphicEdits, visioRenderedGradientStopCount, visioRenderedGradientStops, visioResizeDrag, visioResizeFrame, visioResizeShape, visioRotationPreviewTransform, visioRotationShape, visioRulerDensityFactor, visioRulerGridEdits, visioRulerGridValues, visioSceneToLocal, visioSelectByType, visioSelectionIsOnPage, visioShadowPreset, visioShapeDataNumber, visioShapeDataRow, visioShapeDataText, visioShapeEffectValues, visioShapeFormattingState, visioShapeFrame, visioShapeLocalPoint, visioShapePageBox, visioShapeReport, visioShapeReportCsv, visioShapeReportTable, visioShapeReportText, visioShapeSelectType, visioShapeSnapBox, visioSizePositionCommand, visioSizePositionState, visioSnapMoveDelta, visioStencilDropCommand, visioStencilInstanceShape, visioStencilShape, visioStencilSubShape, visioStraightLineHandles, visioStrokeGradient, visioStyleFormattingShape, visioSubprocessCommand, visioSvgStrokeStyle, visioTextAppendEdit, visioTextBlockDrag, visioTextBlockEdit, visioTextBlockFrame, visioTextBlockMatrix, visioTextBlockShape, visioTextDialogPatch, visioTextDialogValues, visioTextDraftEdit, visioTextFontStepCommand, visioTextFormattingState, visioTextIndentCommand, visioTextOccurrenceSelection, visioTextReplaceCommands, visioTextReplaceFindNext, visioTextReplaceOccurrences, visioTextReplacePlan, visioTextShape, visioTextSource, visioUngroupCommand, visioWithCalloutLeaders, visioWithContainerMembers, visioWithDataGraphics, visioWorkbookGrid };
|