@poe-platform/safe-bash 0.1.810 → 0.1.812
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/audio-ast/flac-source.d.ts +13 -0
- package/dist/audio-ast/index.d.ts +2 -0
- package/dist/audio-ast/index.js +253 -179
- package/dist/audio-ast/vorbis.d.ts +14 -0
- package/dist/image-ast/index.js +1 -1
- package/dist/json-ast/backed-json-parser.d.ts +12 -1
- package/dist/json-ast/index.d.ts +1 -1
- package/dist/office-xml/index.d.ts +1 -0
- package/dist/office-xml/retained-xml-edits.d.ts +22 -0
- package/dist/pdf-ast/cos/qpdf-json-document.d.ts +2 -1
- package/dist/pdf-ast/cos/value-parser.d.ts +23 -2
- package/dist/pdf-ast/extract/retained-form-field-details.d.ts +20 -0
- package/dist/pdf-ast/extract/retained-form-fields.d.ts +17 -4
- package/dist/pdf-ast/index.d.ts +1 -0
- package/dist/pdf-ast/index.js +844 -384
- package/dist/pdf-ast/retained-document.d.ts +6 -0
- package/dist/safe-bash/audio-ast.browser.js +3 -1
- package/dist/safe-bash/chunks/{chunk-65TFMAZU.js → chunk-BUYRKFW2.js} +8 -35
- package/dist/safe-bash/chunks/{chunk-ZA5FQ34E.js → chunk-TPG55BAQ.js} +0 -2
- package/dist/safe-bash/command-chunks/{biff-ORSHM4YX-QYPGRDAZ.js → biff-YKPDH35C-MVQIWNKV.js} +2192 -2155
- package/dist/safe-bash/command-chunks/{chunk-HEHGHIE2.js → chunk-22MOB45U.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-6DEWZMOL.js → chunk-2CORNDGF.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-DCD32BEY.js → chunk-2JSDKQ4J.js} +201 -84
- package/dist/safe-bash/command-chunks/{chunk-6UHGIWFX.js → chunk-2ZFLMWOX.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-HONWGFDA.js → chunk-33YCKZZX.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-AXWPJRY6.js → chunk-36XGIPOG.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-D5AYP2UM.js → chunk-3Q247UDJ.js} +26 -16
- package/dist/safe-bash/command-chunks/{chunk-32ADKP5E.js → chunk-456PHA3L.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-UJXP3T6R.js → chunk-4CKFNXRN.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-5L6GHFRW.js → chunk-554Z6IKP.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-ORZRWT62.js → chunk-56NYSX65.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-53JP3S6H.js → chunk-5HPU7D36.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-HARUYHH7.js → chunk-5HUICAWD.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-IC5GJI7E.js → chunk-5Q22ZLNC.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-YO3V5RLY.js → chunk-6CCQI6XZ.js} +12 -12
- package/dist/safe-bash/command-chunks/{chunk-EO2IVGV7.js → chunk-6M6TM5Z5.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-Z54Z3KRN.js → chunk-6QBMND4A.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-INX4JMQ6.js → chunk-6VPQ3CDZ.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-VGXVN3BX.js → chunk-7GKKMNL6.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-TZJC67W3.js → chunk-7PVHO47B.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-CM3C7AXJ.js → chunk-A2CLZMQZ.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-ASR27KHW.js → chunk-A5FZBR7X.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-DMDHE5KC.js → chunk-AHA6IWAJ.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-PTZ55XXN.js → chunk-APEWTWCC.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-YUVH6CE4.js → chunk-ATTWQVR2.js} +17 -17
- package/dist/safe-bash/command-chunks/{chunk-2VCKUNDZ.js → chunk-B2C3UPJS.js} +27 -17
- package/dist/safe-bash/command-chunks/{chunk-JON5DB3Z.js → chunk-B5LDP7AA.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-YTFWPJ3F.js → chunk-CJQSAATC.js} +26 -26
- package/dist/safe-bash/command-chunks/{chunk-CHJL6JMU.js → chunk-COKYZUBW.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-KCTV4NVX.js → chunk-CRV2Q3PB.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-V3WXPCKN.js → chunk-CV7M2QJU.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-VPDSQPSN.js → chunk-DM2CPMB4.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-3DTDMEOP.js → chunk-EAGIJ4VW.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-JW6CMBF2.js → chunk-EHSM5ZQS.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-WIOH7ZQN.js → chunk-ENT3IV2G.js} +12 -12
- package/dist/safe-bash/command-chunks/{chunk-5IE4LJGB.js → chunk-EUT24Y5Z.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-WC2OCF4H.js → chunk-FDCIPJBQ.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-COKZFXHG.js → chunk-FIIAYCWS.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-MWVFP2HY.js → chunk-GEM47B2P.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-EHL6B34L.js → chunk-HDJVJTCK.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-JMM3MNAY.js → chunk-HKATEVAP.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-VWY3EAVQ.js → chunk-HTVIYLVB.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-CHR2OD2U.js → chunk-HWQ2UHMT.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-Z4QJMDK3.js → chunk-IT7TAC3F.js} +16 -16
- package/dist/safe-bash/command-chunks/{chunk-EWS4KYJE.js → chunk-JFYWVQ4V.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-ZCX63QWA.js → chunk-JOCFI7TG.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-F5WTH4O4.js → chunk-JQVHUSDD.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-O4VJEGL6.js → chunk-K5GB2YMN.js} +10 -10
- package/dist/safe-bash/command-chunks/{chunk-27C3NT5V.js → chunk-KB7DUBVL.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-4DZ32PI7.js → chunk-KCOJA7EM.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-CAXJ4RLF.js → chunk-KJ4XXZIL.js} +12 -12
- package/dist/safe-bash/command-chunks/{chunk-U6QHTC5J.js → chunk-L5MCW6CM.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-LVL3A7YE.js → chunk-LCZDBW55.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-DJVRDUCA.js → chunk-LXLLA4PM.js} +17 -17
- package/dist/safe-bash/command-chunks/{chunk-K7AGAS3K.js → chunk-M7QE2MN7.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-SWT6ILF2.js → chunk-MPUHH2KR.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-3ZWBBS6U.js → chunk-NARD63DY.js} +437 -34
- package/dist/safe-bash/command-chunks/{chunk-DC3OJLRB.js → chunk-NQDIT667.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-LWZVDDJA.js → chunk-NUGQQDGE.js} +5 -1
- package/dist/safe-bash/command-chunks/{chunk-MFLQZLFR.js → chunk-OA75SGN2.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-5LATYOF7.js → chunk-OEJM666F.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-AF25YYIO.js → chunk-PMAM4N33.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-KMMAJ6H6.js → chunk-PNGDJA6M.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-62BHPSKJ.js → chunk-Q6S57NOQ.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-KJ3PEDI2.js → chunk-Q73EMLLZ.js} +146 -4
- package/dist/safe-bash/command-chunks/{chunk-FXKBM5KJ.js → chunk-QC5RMGSA.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-UQ6UIZMM.js → chunk-QD7ZRDUN.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-JHUYZZGV.js → chunk-QYMEASQ6.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-3GY5VDIX.js → chunk-QZZ73J2O.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-S2CYIGWH.js → chunk-R6EGGK5M.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-7AVN3OBH.js → chunk-RHYJVTJO.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-EWGDSO6U.js → chunk-RID6VYS3.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-MMBRBANA.js → chunk-RNSKXOG3.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-D3ZRZTY5.js → chunk-RQIQ75W5.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-DWKQPLRT.js → chunk-RRL3Y562.js} +11 -11
- package/dist/safe-bash/command-chunks/{chunk-NXCMXD74.js → chunk-S6R3IB36.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-XUPKFHAQ.js → chunk-SDTPO2VV.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-PIAGKRFW.js → chunk-SPLOIABU.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-Z5QOVRVH.js → chunk-SU26FZLJ.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-WLTJDNSQ.js → chunk-TVH4JORU.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-6XVMWFHD.js → chunk-TW73OXPR.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-SFO43CID.js → chunk-UAXSE3XE.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-K35BSUHO.js → chunk-UYWSIIUX.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-2E2YEDVB.js → chunk-W5YSINXC.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-EYNT4OEJ.js → chunk-WGG6G2KG.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-DVQBZXMQ.js → chunk-WJCN2IXI.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-XBZ4ZWGL.js → chunk-WVMHRNXZ.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-7GXUCQI4.js → chunk-WXRYDALR.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-S4IIOSRA.js → chunk-X7FA7ZD5.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-DPR5CYQV.js → chunk-XITDDJFT.js} +2 -0
- package/dist/safe-bash/command-chunks/{chunk-SFCERNHU.js → chunk-XPD636C4.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-HYDWQLJ3.js → chunk-XRVKWGVQ.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-ZEPDT6I5.js → chunk-XVLWZTPY.js} +249 -51
- package/dist/safe-bash/command-chunks/{chunk-3UJWHRK4.js → chunk-XVP6V5K3.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-KTI3BULE.js → chunk-XZ2FWFNV.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-QK3CHRGL.js → chunk-Y4EYCZFT.js} +10 -10
- package/dist/safe-bash/command-chunks/{chunk-GTWVMFBK.js → chunk-YORJDX4V.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-H6F5SN2N.js → chunk-YSMNXMAO.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-SE5SJ4JT.js → chunk-Z2JW6M2D.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-WH3TIOTS.js → chunk-ZEGNRZV2.js} +9 -2
- package/dist/safe-bash/command-chunks/{chunk-BYZUOF6X.js → chunk-ZEX53S5I.js} +4010 -3980
- package/dist/safe-bash/command-chunks/{chunk-HQYFRQ5W.js → chunk-ZIIO6GRY.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-NTRZMQZP.js → chunk-ZMHEGDU2.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-EYBXHGA6.js → chunk-ZXR6LXV5.js} +2 -2
- package/dist/safe-bash/command-chunks/{command-engine-BEWABZ75.js → command-engine-BCUQGJJ4.js} +58 -21
- package/dist/safe-bash/command-chunks/{engine-MEPOXIXT-WZMRHACG.js → engine-LAUEWYSQ-DQCEI5HE.js} +1 -1
- package/dist/safe-bash/command-chunks/pdf-XHHFTOT4-UJJYOYJ2.js +573 -0
- package/dist/safe-bash/commands/diff-patch/index.js +0 -3
- package/dist/safe-bash/commands/diff3/index.js +0 -2
- package/dist/safe-bash/full-core.browser.js +2 -2
- package/dist/safe-bash/plugins/index.browser.js +2 -2
- package/dist/safe-bash/plugins/index.js +3 -1
- package/dist/safe-bash/plugins/portable-commands.d.ts +1 -1
- package/dist/safe-bash/plugins/portable-commands.js +5 -3
- package/dist/safe-bash/registry-entry.browser.js +1 -1
- package/dist/safe-bash-command-apply-patch/apply.js +4 -4
- package/dist/safe-bash-command-apply-patch/index.js +4 -4
- package/dist/safe-bash-command-apply-patch/matcher.js +2 -2
- package/dist/safe-bash-command-apply-patch/parser.js +2 -2
- package/dist/safe-bash-command-apply-patch/shared.d.ts +2 -0
- package/dist/safe-bash-command-apply-patch/shared.js +1 -1
- package/dist/safe-bash-command-diff/index.js +0 -2
- package/dist/safe-bash-command-diff3/index.js +830 -56
- package/dist/safe-bash-command-ffmpeg/index.js +1 -1
- package/dist/safe-bash-command-ffprobe/index.js +2 -2
- package/dist/safe-bash-command-ffprobe/media.js +2 -2
- package/dist/safe-bash-command-html-to-markdown/index.js +75 -21
- package/dist/safe-bash-command-pandoc/command.js +3 -3
- package/dist/safe-bash-command-pandoc/execution.d.ts +2 -2
- package/dist/safe-bash-command-pandoc/index.d.ts +1 -1
- package/dist/safe-bash-command-pandoc/index.js +14 -14
- package/dist/safe-bash-command-pandoc/lua-filters.js +2 -2
- package/dist/safe-bash-command-pandoc/types.d.ts +17 -2
- package/dist/safe-bash-command-patch/index.js +2 -2
- package/dist/safe-bash-command-patch/patch-publication.js +1 -1
- package/dist/safe-bash-command-patch/patch.js +2 -2
- package/dist/safe-bash-command-pdftk/index.js +649 -265
- package/dist/safe-bash-command-pptx/command-engine.d.ts +12 -3
- package/dist/safe-bash-command-pptx/engine.d.ts +2 -2
- package/dist/safe-bash-command-pptx/engine.js +1 -1
- package/dist/safe-bash-command-qpdf/index.js +115 -9
- package/dist/safe-bash-command-soffice/index.js +1 -1
- package/dist/safe-bash-command-ssconvert/index.js +2 -2
- package/dist/safe-bash-command-xq/index.js +45 -29
- package/dist/safe-bash-diff-engine/document.d.ts +2 -1
- package/dist/safe-bash-diff-engine/document.js +7 -4
- package/dist/safe-bash-presentation-engine/accessibility.js +30 -30
- package/dist/safe-bash-presentation-engine/animation-editing.js +15 -15
- package/dist/safe-bash-presentation-engine/animations.js +15 -15
- package/dist/safe-bash-presentation-engine/backgrounds.js +16 -16
- package/dist/safe-bash-presentation-engine/bytes.js +3 -3
- package/dist/safe-bash-presentation-engine/chart-editing.js +33 -33
- package/dist/safe-bash-presentation-engine/chart-object-operations.js +24 -24
- package/dist/safe-bash-presentation-engine/charts.js +30 -30
- package/dist/safe-bash-presentation-engine/command-placeholder.js +56 -55
- package/dist/safe-bash-presentation-engine/comments.js +16 -16
- package/dist/safe-bash-presentation-engine/connector-operations.js +31 -31
- package/dist/safe-bash-presentation-engine/connectors.js +28 -28
- package/dist/safe-bash-presentation-engine/content-types.js +4 -4
- package/dist/safe-bash-presentation-engine/creation.js +6 -6
- package/dist/safe-bash-presentation-engine/diff.js +31 -31
- package/dist/safe-bash-presentation-engine/drawing-format.js +19 -19
- package/dist/safe-bash-presentation-engine/drawing-operations.js +30 -30
- package/dist/safe-bash-presentation-engine/drawing-schema.js +20 -20
- package/dist/safe-bash-presentation-engine/equations.js +16 -16
- package/dist/safe-bash-presentation-engine/errors.js +2 -2
- package/dist/safe-bash-presentation-engine/fields.js +16 -16
- package/dist/safe-bash-presentation-engine/font-metrics.js +3 -3
- package/dist/safe-bash-presentation-engine/image-extraction.js +19 -19
- package/dist/safe-bash-presentation-engine/image-formatting.js +31 -31
- package/dist/safe-bash-presentation-engine/image-insertion.js +17 -17
- package/dist/safe-bash-presentation-engine/image-replacement.js +20 -20
- package/dist/safe-bash-presentation-engine/image-value.js +4 -4
- package/dist/safe-bash-presentation-engine/images.js +18 -18
- package/dist/safe-bash-presentation-engine/index.d.ts +1 -1
- package/dist/safe-bash-presentation-engine/index.js +99 -95
- package/dist/safe-bash-presentation-engine/layouts.js +15 -15
- package/dist/safe-bash-presentation-engine/length.js +3 -3
- package/dist/safe-bash-presentation-engine/links.js +15 -15
- package/dist/safe-bash-presentation-engine/masters.js +14 -14
- package/dist/safe-bash-presentation-engine/media-editing.js +23 -23
- package/dist/safe-bash-presentation-engine/media-extraction.js +16 -16
- package/dist/safe-bash-presentation-engine/media.js +15 -15
- package/dist/safe-bash-presentation-engine/memberships.js +14 -14
- package/dist/safe-bash-presentation-engine/notes.js +15 -15
- package/dist/safe-bash-presentation-engine/ole-enum.js +4 -4
- package/dist/safe-bash-presentation-engine/ole-insertion.js +19 -19
- package/dist/safe-bash-presentation-engine/opaque-objects.js +9 -9
- package/dist/safe-bash-presentation-engine/package-reader.js +5 -5
- package/dist/safe-bash-presentation-engine/package-tools.js +15 -15
- package/dist/safe-bash-presentation-engine/package-uri.js +3 -3
- package/dist/safe-bash-presentation-engine/package-writer.js +4 -4
- package/dist/safe-bash-presentation-engine/presentation-model.js +55 -54
- package/dist/safe-bash-presentation-engine/presentation-settings.js +13 -13
- package/dist/safe-bash-presentation-engine/properties.js +15 -15
- package/dist/safe-bash-presentation-engine/relationships.js +4 -4
- package/dist/safe-bash-presentation-engine/resource-limits.js +1 -1
- package/dist/safe-bash-presentation-engine/retained-inspection.js +12 -12
- package/dist/safe-bash-presentation-engine/retained-package.js +4 -4
- package/dist/safe-bash-presentation-engine/retained-slide-publication.d.ts +24 -0
- package/dist/safe-bash-presentation-engine/retained-slide-settings.d.ts +15 -0
- package/dist/safe-bash-presentation-engine/retained-text.js +17 -17
- package/dist/safe-bash-presentation-engine/sanitize.js +16 -16
- package/dist/safe-bash-presentation-engine/selectors.js +10 -10
- package/dist/safe-bash-presentation-engine/shape-groups.js +30 -30
- package/dist/safe-bash-presentation-engine/shape-operations.js +29 -29
- package/dist/safe-bash-presentation-engine/shape-path-operations.js +31 -31
- package/dist/safe-bash-presentation-engine/shape-paths.js +15 -15
- package/dist/safe-bash-presentation-engine/shape-presets.js +3 -3
- package/dist/safe-bash-presentation-engine/shape-selection.js +30 -30
- package/dist/safe-bash-presentation-engine/shape-transforms.js +17 -17
- package/dist/safe-bash-presentation-engine/shapes.js +26 -26
- package/dist/safe-bash-presentation-engine/slide-copy.js +16 -16
- package/dist/safe-bash-presentation-engine/slide-import.js +17 -17
- package/dist/safe-bash-presentation-engine/slide-merge-split.js +19 -19
- package/dist/safe-bash-presentation-engine/slide-model.js +42 -42
- package/dist/safe-bash-presentation-engine/slide-removal.js +17 -17
- package/dist/safe-bash-presentation-engine/slide-transfer-budget.js +9 -9
- package/dist/safe-bash-presentation-engine/slides.d.ts +3 -0
- package/dist/safe-bash-presentation-engine/slides.js +24 -16
- package/dist/safe-bash-presentation-engine/table-operations.js +32 -32
- package/dist/safe-bash-presentation-engine/table-spans.js +31 -31
- package/dist/safe-bash-presentation-engine/tables.js +30 -30
- package/dist/safe-bash-presentation-engine/tags.js +15 -15
- package/dist/safe-bash-presentation-engine/template-bindings.js +32 -32
- package/dist/safe-bash-presentation-engine/template-repeat.js +39 -39
- package/dist/safe-bash-presentation-engine/text-fitting.js +26 -26
- package/dist/safe-bash-presentation-engine/text-frames.js +26 -26
- package/dist/safe-bash-presentation-engine/text-paragraphs.js +26 -26
- package/dist/safe-bash-presentation-engine/text-reading.js +11 -11
- package/dist/safe-bash-presentation-engine/text-replacement.js +16 -16
- package/dist/safe-bash-presentation-engine/text-runs.js +19 -19
- package/dist/safe-bash-presentation-engine/themes.js +15 -15
- package/dist/safe-bash-presentation-engine/transitions.js +15 -15
- package/dist/safe-bash-presentation-engine/validation.js +9 -9
- package/dist/safe-bash-presentation-engine/xml-parts.js +15 -15
- package/dist/safe-bash-presentation-engine/xml-view.js +3 -3
- package/dist/safe-bash-presentation-engine/xml.js +3 -3
- package/dist/safe-bash-xml-engine/json.d.ts +1 -0
- package/dist/safe-bash-xml-engine/json.js +203 -0
- package/dist/safe-bash-xml-engine/stored-json.d.ts +5 -0
- package/dist/spreadsheet-engine/rendering/print/bidi-runs.d.ts +5 -0
- package/dist/spreadsheet-engine/rendering/print/bidi-runs.js +35 -0
- package/dist/spreadsheet-engine/rendering/print/control-bidi.d.ts +8 -0
- package/dist/spreadsheet-engine/rendering/print/control-bidi.js +80 -0
- package/dist/spreadsheet-format-xls/biff-encrypted-properties.d.ts +4 -4
- package/dist/spreadsheet-format-xls/biff-encrypted-properties.js +76 -30
- package/dist/spreadsheet-format-xls/biff-encryption.js +1 -1
- package/dist/spreadsheet-format-xls/biff-metadata.d.ts +1 -0
- package/dist/spreadsheet-format-xls/biff-metadata.js +2 -2
- package/dist/spreadsheet-format-xls/biff-property-bytes.d.ts +4 -1
- package/dist/spreadsheet-format-xls/biff-property-bytes.js +1 -1
- package/dist/spreadsheet-format-xls/biff-range.js +1 -1
- package/dist/spreadsheet-format-xls/biff-write-metadata.js +10 -1
- package/package.json +5 -2
- package/dist/safe-bash/command-chunks/pdf-LOZAXXS6-ERI57IAV.js +0 -557
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import createBidi from "bidi-js";
|
|
2
|
+
const bidi = createBidi();
|
|
3
|
+
/** Pango's single-paragraph FriBidi profile for mixed letter/tab/control runs. */
|
|
4
|
+
export function controlBidiItems(text, direction, tick) {
|
|
5
|
+
tick(text.length * 128);
|
|
6
|
+
const types = Array.from(text, char => bidi.getBidiCharTypeName(char));
|
|
7
|
+
// Wider weak/neutral/explicit profiles need independent native qualification.
|
|
8
|
+
if (!types.includes("L") || !types.includes("R") || types.some(type => !["L", "R", "BN", "B", "S"].includes(type)))
|
|
9
|
+
return;
|
|
10
|
+
const levels = new Uint8Array(text.length);
|
|
11
|
+
let start = 0;
|
|
12
|
+
for (let index = 0; index <= text.length; index++) {
|
|
13
|
+
tick();
|
|
14
|
+
if (index < text.length && text[index] !== "\r" && text[index] !== "\u2029")
|
|
15
|
+
continue;
|
|
16
|
+
// FriBidi X8 stops explicit-level assignment at the first B. Later
|
|
17
|
+
// letters retain the initialized zero base before implicit resolution.
|
|
18
|
+
levels.set(bidi.getEmbeddingLevels(text.slice(start, index), start === 0 ? direction : "ltr").levels, start);
|
|
19
|
+
if (index < text.length)
|
|
20
|
+
levels[index] = direction === "rtl" ? 1 : 0;
|
|
21
|
+
start = index + 1;
|
|
22
|
+
}
|
|
23
|
+
// FriBidi L1 restores segment/paragraph separators to the original base.
|
|
24
|
+
let afterParagraph = false;
|
|
25
|
+
for (let index = 0; index < text.length; index++) {
|
|
26
|
+
tick();
|
|
27
|
+
if (text[index] === "\r" || text[index] === "\u2029")
|
|
28
|
+
afterParagraph = true;
|
|
29
|
+
if (afterParagraph && bidi.getBidiCharTypeName(text[index]) === "BN")
|
|
30
|
+
levels[index] = 0;
|
|
31
|
+
if (text[index] === "\t")
|
|
32
|
+
levels[index] = direction === "rtl" ? 1 : 0;
|
|
33
|
+
}
|
|
34
|
+
let reset = true;
|
|
35
|
+
for (let index = text.length - 1; index >= 0; index--) {
|
|
36
|
+
tick();
|
|
37
|
+
const char = text[index];
|
|
38
|
+
if (char === "\t" || char === "\r" || char === "\u2029")
|
|
39
|
+
reset = true;
|
|
40
|
+
else if (bidi.getBidiCharTypeName(char) !== "BN")
|
|
41
|
+
reset = false;
|
|
42
|
+
if (reset)
|
|
43
|
+
levels[index] = direction === "rtl" ? 1 : 0;
|
|
44
|
+
}
|
|
45
|
+
const items = [];
|
|
46
|
+
const itemLevels = [];
|
|
47
|
+
let previousControl = true;
|
|
48
|
+
for (let index = 0; index < text.length; index++) {
|
|
49
|
+
tick();
|
|
50
|
+
const char = text[index], level = levels[index];
|
|
51
|
+
const control = char === "\t" || char === "\r" || char === "\u2029";
|
|
52
|
+
if (control || previousControl || level !== itemLevels.at(-1)) {
|
|
53
|
+
items.push({ text: "", direction: level % 2 ? "rtl" : "ltr" });
|
|
54
|
+
itemLevels.push(level);
|
|
55
|
+
}
|
|
56
|
+
items.at(-1).text += char;
|
|
57
|
+
previousControl = control;
|
|
58
|
+
}
|
|
59
|
+
const order = items.map((_, index) => index);
|
|
60
|
+
const max = itemLevels.reduce((max, level) => Math.max(max, level), 0);
|
|
61
|
+
// Reorder the single rendered line, including controls, as Pango does.
|
|
62
|
+
for (let level = max; level >= 1; level--) {
|
|
63
|
+
for (let first = 0; first < order.length;) {
|
|
64
|
+
tick();
|
|
65
|
+
if (itemLevels[order[first]] < level) {
|
|
66
|
+
first++;
|
|
67
|
+
continue;
|
|
68
|
+
}
|
|
69
|
+
let last = first;
|
|
70
|
+
while (last < order.length && itemLevels[order[last]] >= level) {
|
|
71
|
+
tick();
|
|
72
|
+
last++;
|
|
73
|
+
}
|
|
74
|
+
for (let a = first, b = last - 1; a < b; a++, b--)
|
|
75
|
+
[order[a], order[b]] = [order[b], order[a]];
|
|
76
|
+
first = last;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
return { items, order };
|
|
80
|
+
}
|
|
@@ -3,10 +3,10 @@ import type { BiffPropertySource } from "./biff-encrypted-properties-write.js";
|
|
|
3
3
|
import type { BiffRc4Cipher } from "./biff-encryption.js";
|
|
4
4
|
/** Admit the outer container and reject hidden plaintext property collisions
|
|
5
5
|
* before asking for a password. POI emits an empty document-summary placeholder. */
|
|
6
|
-
export declare function encryptedBiffPropertyStream(streams: ReadonlyMap<string, Uint8Array> | undefined, context: CapabilityContext, charge: (amount: number) => void, propertySources?: ReadonlyMap<string, RangeSource>): Promise<Uint8Array>;
|
|
6
|
+
export declare function encryptedBiffPropertyStream(streams: ReadonlyMap<string, Uint8Array> | undefined, context: CapabilityContext, charge: (amount: number) => void, propertySources?: ReadonlyMap<string, RangeSource>): Promise<Uint8Array | RangeSource>;
|
|
7
7
|
/** MS-OFFCRYPTO 2.3.5.4: header/table restart block 0; each payload restarts its
|
|
8
8
|
* descriptor block. These are not Workbook's absolute-position 1024-byte chunks. */
|
|
9
9
|
export declare function decryptBiffPropertyContainer(encrypted: Uint8Array, keyStream: (block: number, length: number) => Uint8Array, context: CapabilityContext, charge: (amount: number) => void, createCipher?: (block: number) => BiffRc4Cipher): ReadonlyMap<string, Uint8Array>;
|
|
10
|
-
/** Decrypt
|
|
11
|
-
*
|
|
12
|
-
export declare function decryptBiffPropertySources(encrypted: Uint8Array, createCipher: (block: number) => BiffRc4Cipher, context: CapabilityContext, charge: (amount: number) => void): Promise<ReadonlyMap<string, BiffPropertySource>>;
|
|
10
|
+
/** Decrypt retained ciphertext and descriptor bytes directly into caller storage.
|
|
11
|
+
* Parsed descriptors and names remain resident; plaintext transfers are bounded. */
|
|
12
|
+
export declare function decryptBiffPropertySources(encrypted: Uint8Array | RangeSource, createCipher: (block: number) => BiffRc4Cipher, context: CapabilityContext, charge: (amount: number) => void): Promise<ReadonlyMap<string, BiffPropertySource>>;
|
|
@@ -23,7 +23,8 @@ export async function encryptedBiffPropertyStream(streams, context, charge, prop
|
|
|
23
23
|
invalidBiff("duplicate encrypted property stream");
|
|
24
24
|
names.add(key);
|
|
25
25
|
if (key === "ENCRYPTION") {
|
|
26
|
-
|
|
26
|
+
const input = propertySources?.get(name);
|
|
27
|
+
encrypted = input ? propertyRange(input, context) : bytes;
|
|
27
28
|
continue;
|
|
28
29
|
}
|
|
29
30
|
const file = propertyRange(propertySources?.get(name) ?? bytes, context);
|
|
@@ -45,9 +46,11 @@ export async function encryptedBiffPropertyStream(streams, context, charge, prop
|
|
|
45
46
|
}
|
|
46
47
|
if (!encrypted)
|
|
47
48
|
throw new SsconvertError("unsupported-feature", "Unsupported ssconvert feature: encrypted Excel workbook ancillary properties require the encryption stream");
|
|
48
|
-
|
|
49
|
+
const length = encrypted instanceof Uint8Array ? encrypted.length : encrypted.size;
|
|
50
|
+
if (length > context.limits.inputBytes)
|
|
49
51
|
throw new SsconvertError("resource-limit", "ssconvert encrypted BIFF property input limit exceeded");
|
|
50
|
-
|
|
52
|
+
if (length < 8)
|
|
53
|
+
invalidBiff("truncated binary data");
|
|
51
54
|
return encrypted;
|
|
52
55
|
}
|
|
53
56
|
/** MS-OFFCRYPTO 2.3.5.4: header/table restart block 0; each payload restarts its
|
|
@@ -99,7 +102,16 @@ export function decryptBiffPropertyContainer(encrypted, keyStream, context, char
|
|
|
99
102
|
};
|
|
100
103
|
try {
|
|
101
104
|
check();
|
|
102
|
-
|
|
105
|
+
if (encrypted.length > context.limits.inputBytes)
|
|
106
|
+
throw new SsconvertError("resource-limit", "ssconvert encrypted BIFF property input limit exceeded");
|
|
107
|
+
const source = new Binary(encrypted), { offset, size } = propertyTableRange(decrypt(source.slice(0, 8), 0), source);
|
|
108
|
+
const table = new Binary(decrypt(source.slice(offset, size), 0));
|
|
109
|
+
const reader = readEncryptedPropertyDescriptors(source, offset, size, context, charge);
|
|
110
|
+
let step = reader.next();
|
|
111
|
+
while (!step.done)
|
|
112
|
+
step = reader.next(table.slice(step.value.at, step.value.size));
|
|
113
|
+
table.bytes.fill(0);
|
|
114
|
+
const descriptors = step.value;
|
|
103
115
|
for (const entry of descriptors)
|
|
104
116
|
result.set(entry.name, decrypt(source.slice(entry.offset, entry.size), entry.block));
|
|
105
117
|
return result;
|
|
@@ -109,16 +121,16 @@ export function decryptBiffPropertyContainer(encrypted, keyStream, context, char
|
|
|
109
121
|
throw error;
|
|
110
122
|
}
|
|
111
123
|
}
|
|
112
|
-
function
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
const source = new Binary(encrypted), header = new Binary(decrypt(source.slice(0, 8), 0));
|
|
116
|
-
const offset = header.u32(0), size = header.u32(4);
|
|
117
|
-
header.bytes.fill(0);
|
|
124
|
+
function propertyTableRange(bytes, source) {
|
|
125
|
+
const header = new Binary(bytes), offset = header.u32(0), size = header.u32(4);
|
|
126
|
+
bytes.fill(0);
|
|
118
127
|
if (offset < 8 || size < 4)
|
|
119
128
|
invalidBiff("invalid encrypted property descriptor range");
|
|
120
129
|
source.check(offset, size);
|
|
121
|
-
|
|
130
|
+
return { offset, size };
|
|
131
|
+
}
|
|
132
|
+
function* readEncryptedPropertyDescriptors(source, offset, size, context, charge) {
|
|
133
|
+
const count = new Binary(yield { at: 0, size: 4 }).u32(0);
|
|
122
134
|
if (count > Math.floor((size - 4) / 18))
|
|
123
135
|
invalidBiff("invalid encrypted property descriptor count");
|
|
124
136
|
if (count > (context.limits.workbookNodes ?? context.limits.inputBytes))
|
|
@@ -128,23 +140,25 @@ function readEncryptedPropertyDescriptors(encrypted, decrypt, context, charge) {
|
|
|
128
140
|
const descriptors = [], names = new Set();
|
|
129
141
|
for (let i = 0; i < count; i++) {
|
|
130
142
|
context.signal.throwIfAborted();
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
143
|
+
const entry = new Binary(yield { at, size: 18 });
|
|
144
|
+
entry.check(0, 18);
|
|
145
|
+
const start = entry.u32(0), length = entry.u32(4), block = entry.u16(8), nameLength = entry.u8(10), flags = entry.u8(11);
|
|
146
|
+
if (flags !== 1 || entry.u32(12) !== 0)
|
|
134
147
|
invalidBiff("invalid encrypted property descriptor flags");
|
|
135
148
|
at += 16;
|
|
136
149
|
if (!nameLength || nameLength > 31)
|
|
137
150
|
invalidBiff("invalid encrypted property stream name");
|
|
138
|
-
|
|
151
|
+
const nameBytes = new Binary(yield { at, size: (nameLength + 1) * 2 });
|
|
152
|
+
nameBytes.check(0, (nameLength + 1) * 2);
|
|
139
153
|
charge(nameLength);
|
|
140
|
-
if (
|
|
154
|
+
if (nameBytes.u16(nameLength * 2) !== 0)
|
|
141
155
|
invalidBiff("unterminated encrypted property stream name");
|
|
142
156
|
textBytes += nameLength * 3;
|
|
143
157
|
if (textBytes > (context.limits.workbookTextBytes ?? context.limits.inputBytes))
|
|
144
158
|
throw new SsconvertError("resource-limit", "ssconvert encrypted BIFF property text limit exceeded");
|
|
145
159
|
let name;
|
|
146
160
|
try {
|
|
147
|
-
name = new TextDecoder("utf-16le", { fatal: true, ignoreBOM: true }).decode(
|
|
161
|
+
name = new TextDecoder("utf-16le", { fatal: true, ignoreBOM: true }).decode(nameBytes.slice(0, nameLength * 2));
|
|
148
162
|
}
|
|
149
163
|
catch {
|
|
150
164
|
invalidBiff("invalid encrypted property stream name");
|
|
@@ -160,7 +174,6 @@ function readEncryptedPropertyDescriptors(encrypted, decrypt, context, charge) {
|
|
|
160
174
|
}
|
|
161
175
|
if (at !== size)
|
|
162
176
|
invalidBiff("invalid encrypted property descriptor size");
|
|
163
|
-
table.bytes.fill(0);
|
|
164
177
|
charge(count * Math.ceil(Math.log2(count + 1)));
|
|
165
178
|
const ordered = [...descriptors].sort((a, b) => a.offset - b.offset);
|
|
166
179
|
for (let i = 1; i < ordered.length; i++)
|
|
@@ -168,10 +181,11 @@ function readEncryptedPropertyDescriptors(encrypted, decrypt, context, charge) {
|
|
|
168
181
|
invalidBiff("overlapping encrypted property payloads");
|
|
169
182
|
return descriptors;
|
|
170
183
|
}
|
|
171
|
-
/** Decrypt
|
|
172
|
-
*
|
|
184
|
+
/** Decrypt retained ciphertext and descriptor bytes directly into caller storage.
|
|
185
|
+
* Parsed descriptors and names remain resident; plaintext transfers are bounded. */
|
|
173
186
|
export async function decryptBiffPropertySources(encrypted, createCipher, context, charge) {
|
|
174
187
|
const result = new Map(), owned = [];
|
|
188
|
+
const input = propertyRange(encrypted, context);
|
|
175
189
|
let closed = false;
|
|
176
190
|
const check = () => { context.signal.throwIfAborted(); if (closed)
|
|
177
191
|
throw new SsconvertError("invalid-request", "Encrypted BIFF property reader disposed"); };
|
|
@@ -186,14 +200,16 @@ export async function decryptBiffPropertySources(encrypted, createCipher, contex
|
|
|
186
200
|
throw new AggregateError(errors, "Encrypted BIFF property cleanup failed");
|
|
187
201
|
};
|
|
188
202
|
context.own(close);
|
|
189
|
-
function* chunks(
|
|
203
|
+
async function* chunks(offset, size, block) {
|
|
190
204
|
check();
|
|
191
|
-
|
|
205
|
+
input.check(offset, size);
|
|
206
|
+
charge(size * 2 + 320);
|
|
192
207
|
const cipher = createCipher(block);
|
|
193
208
|
try {
|
|
194
209
|
check();
|
|
195
|
-
for (let at = 0; at <
|
|
196
|
-
const output =
|
|
210
|
+
for (let at = 0; at < size;) {
|
|
211
|
+
const output = await input.read(offset + at, Math.min(16384, size - at), { signal: context.signal });
|
|
212
|
+
at += output.length;
|
|
197
213
|
try {
|
|
198
214
|
cipher.xor(output);
|
|
199
215
|
check();
|
|
@@ -211,19 +227,49 @@ export async function decryptBiffPropertySources(encrypted, createCipher, contex
|
|
|
211
227
|
}
|
|
212
228
|
try {
|
|
213
229
|
check();
|
|
214
|
-
|
|
215
|
-
|
|
230
|
+
if (input.size > context.limits.inputBytes)
|
|
231
|
+
throw new SsconvertError("resource-limit", "ssconvert encrypted BIFF property input limit exceeded");
|
|
232
|
+
const decrypt = async (offset, size) => {
|
|
233
|
+
input.check(offset, size);
|
|
234
|
+
const output = new Uint8Array(size);
|
|
216
235
|
owned.push(output);
|
|
217
236
|
let at = 0;
|
|
218
|
-
for (const part of chunks(
|
|
237
|
+
for await (const part of chunks(offset, size, 0)) {
|
|
219
238
|
output.set(part, at);
|
|
220
239
|
at += part.length;
|
|
221
240
|
}
|
|
222
241
|
return output;
|
|
223
|
-
}
|
|
242
|
+
};
|
|
243
|
+
const { offset, size } = propertyTableRange(await decrypt(0, 8), input);
|
|
244
|
+
const table = await stagePropertyBytes({ length: size, chunks: () => chunks(offset, size, 0) }, context, context.limits.inputBytes);
|
|
245
|
+
const reader = readEncryptedPropertyDescriptors(input, offset, size, context, charge);
|
|
246
|
+
let step = reader.next();
|
|
247
|
+
try {
|
|
248
|
+
while (!step.done) {
|
|
249
|
+
const bytes = await table.read(step.value.at, step.value.size, { signal: context.signal });
|
|
250
|
+
try {
|
|
251
|
+
check();
|
|
252
|
+
step = reader.next(bytes);
|
|
253
|
+
}
|
|
254
|
+
finally {
|
|
255
|
+
bytes.fill(0);
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
catch (error) {
|
|
260
|
+
try {
|
|
261
|
+
await table.close();
|
|
262
|
+
}
|
|
263
|
+
catch (cleanup) {
|
|
264
|
+
throw new AggregateError([error, cleanup], "Encrypted BIFF descriptor read and cleanup failed");
|
|
265
|
+
}
|
|
266
|
+
throw error;
|
|
267
|
+
}
|
|
268
|
+
await table.close();
|
|
269
|
+
check();
|
|
270
|
+
const descriptors = step.value;
|
|
224
271
|
for (const entry of descriptors) {
|
|
225
|
-
const
|
|
226
|
-
const source = await stagePropertyBytes({ length: entry.size, chunks: () => chunks(bytes, entry.block) }, context, context.limits.inputBytes);
|
|
272
|
+
const source = await stagePropertyBytes({ length: entry.size, chunks: () => chunks(entry.offset, entry.size, entry.block) }, context, context.limits.inputBytes);
|
|
227
273
|
result.set(entry.name, source);
|
|
228
274
|
check();
|
|
229
275
|
}
|
|
@@ -339,7 +339,7 @@ export async function decryptBiffRecords(records, revision, context, streams, pr
|
|
|
339
339
|
}
|
|
340
340
|
};
|
|
341
341
|
// Staging must finish while the block-key base still exists.
|
|
342
|
-
return context.createWorkingStorage ? await decryptBiffPropertySources(properties, createCipher, context, admit) :
|
|
342
|
+
return context.createWorkingStorage || !(properties instanceof Uint8Array) ? await decryptBiffPropertySources(properties, createCipher, context, admit) :
|
|
343
343
|
decryptBiffPropertyContainer(properties, keyStream, context, admit, createCipher);
|
|
344
344
|
}
|
|
345
345
|
catch (error) {
|
|
@@ -5,6 +5,7 @@ import { type BiffRecord } from "./biff-binary.js";
|
|
|
5
5
|
export declare function biffNode(name: string, attributes: Readonly<Record<string, ImportedValue>>, text?: string, children?: readonly ImportedValue[]): ImportedValue;
|
|
6
6
|
export declare const biffProtectionPermissions: readonly ["objects", "scenarios", "formatCells", "formatColumns", "formatRows", "insertColumns", "insertRows", "insertHyperlinks", "deleteColumns", "deleteRows", "selectLockedCells", "sort", "autoFilter", "pivotTables", "selectUnlockedCells"];
|
|
7
7
|
export declare const biffMetadataOpcodes: Set<number>;
|
|
8
|
+
export declare function biffHeaderParts(text: string): Readonly<Record<string, string>>;
|
|
8
9
|
/** Source-backed neutral records consumed by both existing workbook writers. */
|
|
9
10
|
interface BiffMetadata {
|
|
10
11
|
records: UnsupportedRecord[];
|
|
@@ -11,7 +11,7 @@ export const biffProtectionPermissions = ["objects", "scenarios", "formatCells",
|
|
|
11
11
|
"sort", "autoFilter", "pivotTables", "selectUnlockedCells"];
|
|
12
12
|
export const biffMetadataOpcodes = new Set([0x2a, 0x2b, 0x25, 0x225, 0x81, 0x83, 0x84, 0xa1, 0x55, 0x23e, 0x3e,
|
|
13
13
|
0x1d, 0x1a, 0x1b, 0x41, 0xa0, 0x867, 0x1c, 0x1b6]);
|
|
14
|
-
function
|
|
14
|
+
export function biffHeaderParts(text) {
|
|
15
15
|
const values = { Left: "", Middle: "", Right: "" };
|
|
16
16
|
const substitutions = { P: "&[PAGE]", N: "&[PAGES]", D: "&[DATE]", T: "&[TIME]", F: "&[FILE]", A: "&[TAB]", Z: "&[PATH]" };
|
|
17
17
|
let side = "Left";
|
|
@@ -234,7 +234,7 @@ function* metadataSteps(length, revision, codepage, context) {
|
|
|
234
234
|
result.push({ source: "Gnumeric_XmlIO:sax", kind: "PrintInformation", disposition: "retained",
|
|
235
235
|
data: biffNode("PrintInformation", {}, "", [biffNode("Margins", {}, "", Object.entries(margins).map(([name, Points]) => biffNode(name, { Points, PrefUnit: "mm" }))),
|
|
236
236
|
biffNode("Scale", fitToPage ? { type: "fit", cols: fitColumns, rows: fitRows } : scale), ...Object.entries(print).map(([name, value]) => biffNode(name, { value })), biffNode("order", {}, order),
|
|
237
|
-
biffNode("orientation", {}, orientation), biffNode("Header",
|
|
237
|
+
biffNode("orientation", {}, orientation), biffNode("Header", biffHeaderParts(headerText)), biffNode("Footer", biffHeaderParts(footerText)),
|
|
238
238
|
biffNode("paper", {}, paper), biffNode("comments", { placement: commentPlacement }), biffNode("errors", { PrintErrorsAs: errorDisplay }), ...breaks]) });
|
|
239
239
|
if (objects.length)
|
|
240
240
|
result.push({ source: "Gnumeric_XmlIO:sax", kind: "Objects", disposition: "retained", data: biffNode("Objects", {}, "", objects) });
|
|
@@ -6,4 +6,7 @@ export type BiffPropertyBytes = Uint8Array | {
|
|
|
6
6
|
};
|
|
7
7
|
export declare function propertyChunks(value: BiffPropertyBytes): Iterable<Uint8Array>;
|
|
8
8
|
/** Consume lazy serialization once into caller storage; never retain emitted chunks. */
|
|
9
|
-
export declare function stagePropertyBytes(value: BiffPropertyBytes
|
|
9
|
+
export declare function stagePropertyBytes(value: BiffPropertyBytes | {
|
|
10
|
+
readonly length: number;
|
|
11
|
+
chunks(): AsyncIterable<Uint8Array>;
|
|
12
|
+
}, context: CapabilityContext, maximumBytes?: number): Promise<BiffPropertySource>;
|
|
@@ -61,7 +61,7 @@ export async function stagePropertyBytes(value, context, maximumBytes = context.
|
|
|
61
61
|
count = 0;
|
|
62
62
|
};
|
|
63
63
|
try {
|
|
64
|
-
for (const part of propertyChunks(value)) {
|
|
64
|
+
for await (const part of value instanceof Uint8Array ? propertyChunks(value) : value.chunks()) {
|
|
65
65
|
check();
|
|
66
66
|
if (part.length > source.size - written - count)
|
|
67
67
|
throw new SsconvertError('io', 'Invalid BIFF property serialization size');
|
|
@@ -100,7 +100,7 @@ export async function readBiffRange(input, context, probe = false) {
|
|
|
100
100
|
// Only these ancillary payloads are interpreted by the existing reader.
|
|
101
101
|
// Keep other names for its name/work admission, without copying ignored streams.
|
|
102
102
|
const needed = ["ENCRYPTION", "\u0005SUMMARYINFORMATION", "\u0005DOCUMENTSUMMARYINFORMATION"].includes(name.toUpperCase());
|
|
103
|
-
if (needed &&
|
|
103
|
+
if (needed && recordStore) {
|
|
104
104
|
propertySources.set(name, { size: stream.size, async read(at, count, options) {
|
|
105
105
|
try {
|
|
106
106
|
return await stream.read(at, count, options);
|
|
@@ -3,7 +3,7 @@ import { parseA1 } from "../spreadsheet-ast/index.js";
|
|
|
3
3
|
import { metadataNode } from "../spreadsheet-engine/codecs/xlsx-write-support.js";
|
|
4
4
|
import { words } from "./biff-write-binary.js";
|
|
5
5
|
import { biffString } from "./biff-write.js";
|
|
6
|
-
import { biffProtectionPermissions } from "./biff-metadata.js";
|
|
6
|
+
import { biffProtectionPermissions, biffHeaderParts } from "./biff-metadata.js";
|
|
7
7
|
import { biffFontWidth } from "./biff-font-widths.js";
|
|
8
8
|
import { writeBiffLabelRanges } from "./biff-label-ranges.js";
|
|
9
9
|
function concat(...parts) {
|
|
@@ -442,6 +442,15 @@ export class BiffMetadataWriter {
|
|
|
442
442
|
text += source[at] === "&" ? "&&" : source[at];
|
|
443
443
|
}
|
|
444
444
|
}
|
|
445
|
+
const original = sheet.view?.[name === "Header" ? "printHeader" : "printFooter"];
|
|
446
|
+
if (node && typeof original === "string") {
|
|
447
|
+
this.charge(original.length);
|
|
448
|
+
const sections = biffHeaderParts(original);
|
|
449
|
+
// Keep the imported token spelling (including formatting controls)
|
|
450
|
+
// when the normalized sections are unchanged. Explicit edits win.
|
|
451
|
+
if (Object.entries(sections).every(([side, value]) => value === (node.attributes[side] ?? "")))
|
|
452
|
+
text = original;
|
|
453
|
+
}
|
|
445
454
|
await output.record(opcode, biffString(text, revision, this.context, revision === 8 ? 2 : 1));
|
|
446
455
|
}
|
|
447
456
|
for (const [name, opcode] of [["hPageBreaks", 0x1b], ["vPageBreaks", 0x1a]]) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@poe-platform/safe-bash",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.812",
|
|
4
4
|
"description": "Extensible virtual shell with pluggable filesystems and streaming commands",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -1407,7 +1407,7 @@
|
|
|
1407
1407
|
"access": "public"
|
|
1408
1408
|
},
|
|
1409
1409
|
"dependencies": {
|
|
1410
|
-
"@poe-platform/safe-fs": "0.1.
|
|
1410
|
+
"@poe-platform/safe-fs": "0.1.812",
|
|
1411
1411
|
"pdf-lib": "1.17.1",
|
|
1412
1412
|
"@types/node": "^25.2.2",
|
|
1413
1413
|
"@formatjs/intl-numberformat": "9.4.0",
|
|
@@ -1420,6 +1420,7 @@
|
|
|
1420
1420
|
"parse5": "7.3.0",
|
|
1421
1421
|
"@pdf-lib/fontkit": "1.1.1",
|
|
1422
1422
|
"linebreak": "^1.1.0",
|
|
1423
|
+
"bidi-js": "1.1.0",
|
|
1423
1424
|
"saxes": "^6.0.0",
|
|
1424
1425
|
"temporal-polyfill": "1.0.4",
|
|
1425
1426
|
"@formatjs/intl-localematcher": "0.8.13",
|
|
@@ -2729,9 +2730,11 @@
|
|
|
2729
2730
|
"./dist/spreadsheet-engine/rendering/images/index.js",
|
|
2730
2731
|
"./dist/spreadsheet-engine/rendering/images/profile-raster.js",
|
|
2731
2732
|
"./dist/spreadsheet-engine/rendering/images/scene.js",
|
|
2733
|
+
"./dist/spreadsheet-engine/rendering/print/bidi-runs.js",
|
|
2732
2734
|
"./dist/spreadsheet-engine/rendering/print/blank-styles.js",
|
|
2733
2735
|
"./dist/spreadsheet-engine/rendering/print/border-junctions.js",
|
|
2734
2736
|
"./dist/spreadsheet-engine/rendering/print/cell-style.js",
|
|
2737
|
+
"./dist/spreadsheet-engine/rendering/print/control-bidi.js",
|
|
2735
2738
|
"./dist/spreadsheet-engine/rendering/print/diagonal-borders.js",
|
|
2736
2739
|
"./dist/spreadsheet-engine/rendering/print/font-normalization-data.js",
|
|
2737
2740
|
"./dist/spreadsheet-engine/rendering/print/font-normalization.js",
|