@poe-platform/safe-bash 0.1.816 → 0.1.818
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/image-ast/index.js +2 -2
- package/dist/mp4-ast/index.d.ts +2 -1
- package/dist/mp4-ast/mp4-metadata-source.d.ts +10 -0
- package/dist/mp4-ast/mp4-packets-source.d.ts +8 -1
- package/dist/mp4-ast/types.d.ts +21 -3
- package/dist/pdf-ast/ast.d.ts +2 -0
- package/dist/pdf-ast/content/evaluator.d.ts +11 -0
- package/dist/pdf-ast/content/retained-evaluator.d.ts +2 -2
- package/dist/pdf-ast/content/retained-page.d.ts +2 -2
- package/dist/pdf-ast/cos/value-parser.d.ts +2 -0
- package/dist/pdf-ast/extract/html-text-stream.d.ts +14 -0
- package/dist/pdf-ast/extract/logical-text-stream.d.ts +14 -0
- package/dist/pdf-ast/extract/raw-text-index.d.ts +18 -4
- package/dist/pdf-ast/extract/retained-color.d.ts +6 -6
- package/dist/pdf-ast/extract/retained-decoded-image.d.ts +2 -2
- package/dist/pdf-ast/extract/stored-text-glyphs.d.ts +8 -0
- package/dist/pdf-ast/fonts/resolve.d.ts +5 -1
- package/dist/pdf-ast/fonts/retained.d.ts +2 -2
- package/dist/pdf-ast/image.d.ts +2 -0
- package/dist/pdf-ast/image.js +19 -0
- package/dist/pdf-ast/index.d.ts +3 -0
- package/dist/pdf-ast/index.js +264 -66845
- package/dist/pdf-ast/render/postscript.d.ts +6 -0
- package/dist/pdf-ast/render/raster.d.ts +21 -1
- package/dist/pdf-ast/retained-document.d.ts +16 -95
- package/dist/pdf-ast/retained-reader.d.ts +109 -0
- package/dist/safe-bash/command-chunks/biff-AYJZR2YV-JPESBEOO.js +5741 -0
- package/dist/safe-bash/command-chunks/{chunk-SL4LD25A.js → chunk-232N24HE.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-ALD53QFL.js → chunk-2C4QMQQD.js} +42 -12
- package/dist/safe-bash/command-chunks/{chunk-3PM46VWH.js → chunk-2FEMMALH.js} +4 -4
- package/dist/safe-bash/command-chunks/chunk-2J4OQT3F.js +153 -0
- package/dist/safe-bash/command-chunks/{chunk-QDV2NIFR.js → chunk-2TMTGVJR.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-ARE267HR.js → chunk-2WTDP3TP.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-GEDO5V32.js → chunk-2XR7B6DY.js} +602 -211
- package/dist/safe-bash/command-chunks/{chunk-EY3UE26F.js → chunk-2YC6MWQB.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-UPWLHHZ2.js → chunk-37KBCKDF.js} +13 -13
- package/dist/safe-bash/command-chunks/{chunk-DOVWHVHI.js → chunk-3B6554G6.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-FB2WPI3M.js → chunk-3ZGO24WG.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-GR4ONCQ5.js → chunk-424NYO35.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-MQE77MEQ.js → chunk-45GTHPL5.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-AF2IO57Q.js → chunk-4OHTYYNU.js} +8 -136
- package/dist/safe-bash/command-chunks/{chunk-ICJH6A73.js → chunk-4PMMJ45F.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-57PK2QFX.js → chunk-4SFX6YGC.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-G3LUT475.js → chunk-4WHTTCKY.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-DBZCTL7C.js → chunk-4Z7PBIMP.js} +20 -18
- package/dist/safe-bash/command-chunks/{chunk-A4P37F3P.js → chunk-57SKL76U.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-J6FNSVHT.js → chunk-5GP4A3TD.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-OFONWWEZ.js → chunk-5IHJWBDR.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-A2L3U7DW.js → chunk-5OS4Q3AX.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-FUYZUETI.js → chunk-5PMLTSQ5.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-TXU7MMHN.js → chunk-5RDS6CNQ.js} +13 -13
- package/dist/safe-bash/command-chunks/{chunk-FR63MJSO.js → chunk-5UGQGB5Y.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-UKAGRRLZ.js → chunk-5VY5O37W.js} +1 -1
- package/dist/safe-bash/command-chunks/chunk-5WS6DXYE.js +68444 -0
- package/dist/safe-bash/command-chunks/{chunk-2ALHVXEM.js → chunk-6EK76ERE.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-4772DJKS.js → chunk-6GCK2KSL.js} +61 -26
- package/dist/safe-bash/command-chunks/{chunk-T5OQ53XS.js → chunk-6IID5HTY.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-EZDWPTYB.js → chunk-6LOAJOWK.js} +13 -13
- package/dist/safe-bash/command-chunks/{chunk-WMBELKPP.js → chunk-6PE2L522.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-ZAYTFXUX.js → chunk-73KY3MZ3.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-BOVDUJ3A.js → chunk-77WBFVZQ.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-3DWFXESW.js → chunk-7GJJDM2F.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-WIW3KDBS.js → chunk-7NFICYRU.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-35DU6I2M.js → chunk-7ZEGARPB.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-A5SPMSKD.js → chunk-A32PUWYE.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-KYIGYYEY.js → chunk-A32ZROH5.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-IOXMGD2H.js → chunk-ADVQZLLE.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-CGJ7GMHO.js → chunk-AEZU6NZE.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-KDDXLHN7.js → chunk-ATHU53C2.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-R7LF4XQV.js → chunk-B6T2526I.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-PPN53PX3.js → chunk-BB7HBO56.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-ZM7HMBAJ.js → chunk-BDGNKRY4.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-VMZIAFVJ.js → chunk-BFRSYJUC.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-X42MJT2J.js → chunk-BJL7AGA5.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-VZTVR3JI.js → chunk-C2QUG7IP.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-IVKAFEPO.js → chunk-C34RLMAC.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-5O45KGW5.js → chunk-C5VUJOUQ.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-LQDANF2B.js → chunk-CCNOZKAK.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-FEBTT5NH.js → chunk-CEHICGP6.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-SICTBSLW.js → chunk-CODJMTSA.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-LJ3UYESS.js → chunk-CP5EO5TT.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-45DKGZYO.js → chunk-CSS5KXQC.js} +329 -152
- package/dist/safe-bash/command-chunks/{chunk-6RLWPB44.js → chunk-CZSLXQU2.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-3ZWFE4CK.js → chunk-D2ZT2UUT.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-WH624PKJ.js → chunk-D5XSGHXN.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-NDALIHKK.js → chunk-D7UFAIBS.js} +18 -18
- package/dist/safe-bash/command-chunks/{chunk-ISFGPCED.js → chunk-DCKAY6HV.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-LNAZ3E4Q.js → chunk-DGCJVZW6.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-LFSWLJPR.js → chunk-DJB5RB6U.js} +288 -32
- package/dist/safe-bash/command-chunks/{chunk-FGHSE3RZ.js → chunk-DZ4ELL34.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-LQX7RAF7.js → chunk-EBKKYRQJ.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-QNETPOMH.js → chunk-EDBNI7WE.js} +14 -14
- package/dist/safe-bash/command-chunks/{chunk-5GDF5FAS.js → chunk-EEJ3YXVO.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-RTHYAGKI.js → chunk-ETN25WCR.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-ET6LMDEX.js → chunk-EV3DPRWE.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-3MUFXGA2.js → chunk-F2JUB7JI.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-345YBIHP.js → chunk-F42WV2YO.js} +19 -19
- package/dist/safe-bash/command-chunks/{chunk-FTZFCMVI.js → chunk-FAVWWMFW.js} +12 -12
- package/dist/safe-bash/command-chunks/{chunk-XBWD6SI3.js → chunk-FDRE535F.js} +16 -16
- package/dist/safe-bash/command-chunks/{chunk-WMV5224N.js → chunk-FILE5PBI.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-XPQUUFQD.js → chunk-FPOM47UA.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-QMBMZSJF.js → chunk-FQ2WRT4Q.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-H56BSMFQ.js → chunk-FVAFISPY.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-2QZUAZTH.js → chunk-GIQUIF6E.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-2TWXRJPB.js → chunk-GNORF6RY.js} +13 -13
- package/dist/safe-bash/command-chunks/{chunk-K7VDCBXW.js → chunk-GPLN6JV2.js} +24 -24
- package/dist/safe-bash/command-chunks/{chunk-DZOKH5BL.js → chunk-GQ7BD75U.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-N4HWOLGZ.js → chunk-GY2C555A.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-N32AP43V.js → chunk-GZNX5SS4.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-YPG55QTP.js → chunk-HCJWEB6P.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-4ABR3KGK.js → chunk-HNY7LZ5P.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-P462JTNT.js → chunk-HOBXZX23.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-5KZMR6AJ.js → chunk-HW3IOXT6.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-3VGQTLO6.js → chunk-HX7QQNWS.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-TXWDR2P4.js → chunk-IBT3OWXB.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-OHEZQ4QA.js → chunk-IFBLXBBM.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-HOJ7WDTS.js → chunk-IJZUUXLL.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-BZRWZ6GO.js → chunk-IKU7ZBF3.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-CKIXC7AO.js → chunk-IPKYPADE.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-IWVANZWH.js → chunk-JLPBGKVC.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-6M3JTPKE.js → chunk-JNRX5EFF.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-5YL453ZF.js → chunk-JSX5CFZY.js} +36 -36
- package/dist/safe-bash/command-chunks/{chunk-V6JPIZUW.js → chunk-JT656DKZ.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-DM5WURQL.js → chunk-JY2T3KV2.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-IZ3SD5S2.js → chunk-K2NV6H7E.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-62RG3GHF.js → chunk-K6E56LND.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-FLSXHLJG.js → chunk-KADQKXZE.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-URQSUMMJ.js → chunk-KFFV7HBL.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-ONQP4FNV.js → chunk-KZICRCQ7.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-N35IJXBK.js → chunk-L6X4EEN6.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-SHLT5R64.js → chunk-LF7YJ5VQ.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-GMBUOYTN.js → chunk-LNHTLWIL.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-A6OTPNNI.js → chunk-LPKMNCC5.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-MUTARE5I.js → chunk-LSKA4IR4.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-N3ZH4YYH.js → chunk-LTWX23FS.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-JA36YOZI.js → chunk-LUJUYUOG.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-4X2MPZXW.js → chunk-M42GCI5F.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-AYQPJQJR.js → chunk-M5BFAMXD.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-OFDJJRAD.js → chunk-M7DZ7COK.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-RINR7XPR.js → chunk-MMSKDYK6.js} +234 -8
- package/dist/safe-bash/command-chunks/{chunk-NKK76B4V.js → chunk-MN7EEK6Y.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-OBIXFO25.js → chunk-MOJQT6RW.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-HOKPYTHQ.js → chunk-MPRUGL4W.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-CORUUCS2.js → chunk-MRBX4KEP.js} +3 -3
- package/dist/safe-bash/command-chunks/chunk-MTWFSBNG.js +137 -0
- package/dist/safe-bash/command-chunks/{chunk-RRAQII52.js → chunk-MURNTGDL.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-KDBU5Q2N.js → chunk-MWVELMXZ.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-PRO7JOIH.js → chunk-N3MAYM6Y.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-E22EAYJN.js → chunk-NFWLZDMY.js} +177 -34
- package/dist/safe-bash/command-chunks/{chunk-GAROGIVU.js → chunk-NP2QXF2X.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-SNA2LVBX.js → chunk-NPVOYY2A.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-ENMJHB2C.js → chunk-NTXRKJPZ.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-3K5CVXUV.js → chunk-NZF56C25.js} +10 -10
- package/dist/safe-bash/command-chunks/{chunk-5MNQTHED.js → chunk-OA4MEWTN.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-SWIF6BBY.js → chunk-OL75SBZL.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-LT2YCGC5.js → chunk-OVQSILY3.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-WDVPHDBH.js → chunk-P57V45F2.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-OWCBX5M2.js → chunk-PAY4ULWY.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-CHZE6FNT.js → chunk-PFUZPAXQ.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-NLCUQD7Y.js → chunk-PX6E5MHY.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-POGVOCOB.js → chunk-QCN7MRRU.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-ZZERSKAR.js → chunk-QLE6JUR7.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-LZY46GYY.js → chunk-QMWBKR4C.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-BIJW6QWB.js → chunk-QNLX3CZH.js} +13 -13
- package/dist/safe-bash/command-chunks/{chunk-MDFNUNK5.js → chunk-QWX5IERU.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-WOL3LBXE.js → chunk-R2N3E267.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-ZNCPIZCN.js → chunk-R6X63VAO.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-FGARVKAX.js → chunk-RNIFPFGC.js} +13 -11
- package/dist/safe-bash/command-chunks/{chunk-OIHQXURE.js → chunk-ROE6KD4C.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-BKK4MS3V.js → chunk-RR6XG2I6.js} +1 -1
- package/dist/safe-bash/command-chunks/chunk-RYOHOS2I.js +398 -0
- package/dist/safe-bash/command-chunks/{chunk-4QEJPP3K.js → chunk-S5X7PBO4.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-IHLZ6HNQ.js → chunk-TSKJNCKD.js} +3 -2
- package/dist/safe-bash/command-chunks/{chunk-U42WHQRH.js → chunk-TTTNFKT6.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-EWC56JNI.js → chunk-TTVJJZOM.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-TY7JXEWI.js → chunk-UBX5I5HY.js} +11 -11
- package/dist/safe-bash/command-chunks/{chunk-QOKFSYD5.js → chunk-UE34SQET.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-DXOXUKQB.js → chunk-UH4CQIU3.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-VNNNVT4C.js → chunk-UZZ2WJQV.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-QNX5LZBK.js → chunk-V6NZVM7C.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-KLAC2MIZ.js → chunk-VEZULAIA.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-OCV5ZU35.js → chunk-VSTAHYCV.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-UFLMOU3B.js → chunk-VUJCVXD4.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-5V7WIQ2D.js → chunk-VW67MA53.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-B2C3UPJS.js → chunk-W42SUPD6.js} +13 -1
- package/dist/safe-bash/command-chunks/{chunk-2IMIKROX.js → chunk-WI5NEHPD.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-SBXS4S6Y.js → chunk-WJSU2UVG.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-VVWHFNHD.js → chunk-WPEIOUJN.js} +415 -25
- package/dist/safe-bash/command-chunks/{chunk-YKODRSGT.js → chunk-WRCYZJNO.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-TID5TSQW.js → chunk-WRJV7OVO.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-T4SEQU66.js → chunk-X4TWJNW7.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-CKA7ZROU.js → chunk-X6KFCAWZ.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-ROQ3VNVX.js → chunk-X6KO7D6R.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-S5ER73EA.js → chunk-XB5ZZHFD.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-FHQOFEQK.js → chunk-XLFOLLUZ.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-UJYXSLM6.js → chunk-XLPEPCQC.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-UT5X6QRU.js → chunk-XQFEP43Y.js} +5 -5
- package/dist/safe-bash/command-chunks/chunk-Y7XL6CWB.js +771 -0
- package/dist/safe-bash/command-chunks/{chunk-RVWIEXR7.js → chunk-YKEMSPJZ.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-ERWIJYCS.js → chunk-YN3OEJAZ.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-6YF2QADH.js → chunk-YOYK2I4N.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-26JE5JEB.js → chunk-YS5ZKMRJ.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-LMLBQSAM.js → chunk-YW7WU7W2.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-YXR4JE4U.js → chunk-Z33YS3DW.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-T2FRXSQT.js → chunk-ZBXUAM34.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-VVV45NLY.js → chunk-ZJUU5IAS.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-7OCTMVYJ.js → chunk-ZNABMTV3.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-6JGICYHP.js → chunk-ZSF2T5D4.js} +1 -1
- package/dist/safe-bash/command-chunks/{command-engine-GHE6QUHU.js → command-engine-PFYHL7GS.js} +14 -4
- package/dist/safe-bash/command-chunks/{engine-RG6HQCCB-FXYZS264.js → engine-5AVSKFBI-D7Q5VPUN.js} +1 -1
- package/dist/safe-bash/command-chunks/model-store-IIWQHSEZ.js +54 -0
- package/dist/safe-bash/command-chunks/odf-SL5TG4B3-XI3FNOTN.js +3041 -0
- package/dist/safe-bash/command-chunks/{xlsx-RE54MFCS-IQ6OXXKK.js → xlsx-RE54MFCS-4UZ5W3U7.js} +1 -1
- package/dist/safe-bash-command-apply-patch/apply.js +1 -1
- package/dist/safe-bash-command-apply-patch/index.js +1 -1
- package/dist/safe-bash-command-awk/awk-inspection.js +2 -2
- package/dist/safe-bash-command-awk/awk.js +5 -5
- package/dist/safe-bash-command-awk/index.js +5 -5
- package/dist/safe-bash-command-cp/index.js +4 -4
- package/dist/safe-bash-command-csvkit/index.js +1 -1
- package/dist/safe-bash-command-diff/diff.js +2 -2
- package/dist/safe-bash-command-diff/index.js +2 -2
- 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-node/commands/node/browser.js +6 -6
- package/dist/safe-bash-command-node/commands/node/default-runtime.js +6 -6
- package/dist/safe-bash-command-node/commands/node/filesystem.js +2 -2
- package/dist/safe-bash-command-node/commands/node/safejs.js +6 -6
- package/dist/safe-bash-command-node/commands/node/timers.js +2 -2
- package/dist/safe-bash-command-patch/index.js +3 -3
- package/dist/safe-bash-command-patch/patch-formats.js +2 -2
- package/dist/safe-bash-command-patch/patch.js +3 -3
- package/dist/safe-bash-command-patch/unified.js +1 -1
- package/dist/safe-bash-command-pdftoppm/index.js +89 -124
- package/dist/safe-bash-command-pdftotext/index.d.ts +1 -1
- package/dist/safe-bash-command-pdftotext/index.js +538 -379
- package/dist/safe-bash-command-playwright-cli/index.js +19 -19
- package/dist/safe-bash-command-playwright-cli/playwright/abilities.js +6 -6
- package/dist/safe-bash-command-playwright-cli/playwright/adapter.js +3 -3
- package/dist/safe-bash-command-playwright-cli/playwright/controller.js +13 -13
- package/dist/safe-bash-command-playwright-cli/playwright/index.js +19 -19
- package/dist/safe-bash-command-playwright-cli/playwright/native-storage-replacement.js +2 -2
- package/dist/safe-bash-command-playwright-cli/playwright/open-options.js +2 -2
- package/dist/safe-bash-command-playwright-cli/playwright/profile.js +5 -5
- package/dist/safe-bash-command-playwright-cli/playwright/standard-capabilities.js +4 -4
- package/dist/safe-bash-command-playwright-cli/playwright/storage-capabilities.js +3 -3
- package/dist/safe-bash-command-pptx/engine.js +1 -1
- package/dist/safe-bash-command-python/executor.js +10 -10
- package/dist/safe-bash-command-python/index.js +10 -10
- package/dist/safe-bash-command-python/jspi.js +2 -2
- package/dist/safe-bash-command-safejs/index.js +2 -2
- package/dist/safe-bash-command-safejs/runtime.js +2 -2
- package/dist/safe-bash-command-ssconvert/index.js +16 -16
- package/dist/safe-bash-command-unzip/index.js +4 -4
- package/dist/safe-bash-docx-engine/ancillary-resources.js +10 -10
- package/dist/safe-bash-docx-engine/batch-operations.js +67 -67
- package/dist/safe-bash-docx-engine/batch-result-schema.js +79 -79
- package/dist/safe-bash-docx-engine/batch.js +78 -78
- package/dist/safe-bash-docx-engine/bookmarks.js +18 -18
- package/dist/safe-bash-docx-engine/charts.js +11 -11
- package/dist/safe-bash-docx-engine/command-option-rules.js +6 -6
- package/dist/safe-bash-docx-engine/command-properties.js +3 -3
- package/dist/safe-bash-docx-engine/comments.js +26 -26
- package/dist/safe-bash-docx-engine/control-bindings.js +21 -21
- package/dist/safe-bash-docx-engine/control-repeat.js +21 -21
- package/dist/safe-bash-docx-engine/controls.js +19 -19
- package/dist/safe-bash-docx-engine/create.js +11 -11
- package/dist/safe-bash-docx-engine/diagrams.js +11 -11
- package/dist/safe-bash-docx-engine/diff.js +13 -13
- package/dist/safe-bash-docx-engine/document-properties.js +16 -16
- package/dist/safe-bash-docx-engine/equations.js +17 -17
- package/dist/safe-bash-docx-engine/extract.js +14 -14
- package/dist/safe-bash-docx-engine/fields.js +23 -23
- package/dist/safe-bash-docx-engine/font-inventory.js +18 -18
- package/dist/safe-bash-docx-engine/font-resources.js +6 -6
- package/dist/safe-bash-docx-engine/image-batch-operations.js +14 -14
- package/dist/safe-bash-docx-engine/image-insertion.js +21 -21
- package/dist/safe-bash-docx-engine/image-layout.js +19 -19
- package/dist/safe-bash-docx-engine/image-replacement.js +22 -22
- package/dist/safe-bash-docx-engine/images.js +19 -19
- package/dist/safe-bash-docx-engine/index.js +111 -111
- package/dist/safe-bash-docx-engine/inspection.js +20 -20
- package/dist/safe-bash-docx-engine/invocation.js +9 -9
- package/dist/safe-bash-docx-engine/io.js +9 -9
- package/dist/safe-bash-docx-engine/links.js +21 -21
- package/dist/safe-bash-docx-engine/lists.js +20 -20
- package/dist/safe-bash-docx-engine/locations.js +15 -15
- package/dist/safe-bash-docx-engine/notes.js +22 -22
- package/dist/safe-bash-docx-engine/objects.js +19 -19
- package/dist/safe-bash-docx-engine/operation-json-schema.js +3 -3
- package/dist/safe-bash-docx-engine/operation-schema.js +2 -2
- package/dist/safe-bash-docx-engine/pack.js +14 -14
- package/dist/safe-bash-docx-engine/package-view-batch-operations.js +22 -22
- package/dist/safe-bash-docx-engine/pandoc-adapter.js +29 -29
- package/dist/safe-bash-docx-engine/paragraph-edit.js +25 -25
- package/dist/safe-bash-docx-engine/part-provider.js +3 -3
- package/dist/safe-bash-docx-engine/property-values.js +3 -3
- package/dist/safe-bash-docx-engine/publication.js +9 -9
- package/dist/safe-bash-docx-engine/removal.js +21 -21
- package/dist/safe-bash-docx-engine/revision-decisions.js +22 -22
- package/dist/safe-bash-docx-engine/revision-edit.js +20 -20
- package/dist/safe-bash-docx-engine/revisions.js +18 -18
- package/dist/safe-bash-docx-engine/run-format.js +20 -20
- package/dist/safe-bash-docx-engine/sanitize.js +34 -34
- package/dist/safe-bash-docx-engine/sections.js +19 -19
- package/dist/safe-bash-docx-engine/settings.js +11 -11
- package/dist/safe-bash-docx-engine/shape-edit.js +21 -21
- package/dist/safe-bash-docx-engine/signatures.js +15 -15
- package/dist/safe-bash-docx-engine/stories.js +22 -22
- package/dist/safe-bash-docx-engine/structure-model-batch-operations.js +38 -38
- package/dist/safe-bash-docx-engine/style-model-batch-operations.js +27 -27
- package/dist/safe-bash-docx-engine/style-model-result-schema.js +44 -44
- package/dist/safe-bash-docx-engine/styles.js +18 -18
- package/dist/safe-bash-docx-engine/table-edit.js +27 -27
- package/dist/safe-bash-docx-engine/table-read.js +16 -16
- package/dist/safe-bash-docx-engine/template.js +22 -22
- package/dist/safe-bash-docx-engine/text-replace.js +20 -20
- package/dist/safe-bash-docx-engine/text-resource-read.js +16 -16
- package/dist/safe-bash-docx-engine/text.js +16 -16
- package/dist/safe-bash-docx-engine/validation.js +7 -7
- package/dist/safe-bash-docx-engine/xml-parts.js +22 -22
- package/dist/safe-bash-network-engine/index.js +4 -4
- package/dist/safe-bash-network-engine/transfer.js +12 -12
- package/dist/safe-bash-presentation-engine/accessibility.js +15 -15
- package/dist/safe-bash-presentation-engine/animation-editing.js +5 -5
- package/dist/safe-bash-presentation-engine/animations.js +5 -5
- package/dist/safe-bash-presentation-engine/backgrounds.js +6 -6
- package/dist/safe-bash-presentation-engine/chart-editing.js +18 -18
- package/dist/safe-bash-presentation-engine/chart-object-operations.js +12 -12
- package/dist/safe-bash-presentation-engine/charts.js +15 -15
- package/dist/safe-bash-presentation-engine/command-placeholder.js +39 -38
- package/dist/safe-bash-presentation-engine/comments.js +6 -6
- package/dist/safe-bash-presentation-engine/connector-operations.js +16 -16
- package/dist/safe-bash-presentation-engine/connectors.js +13 -13
- package/dist/safe-bash-presentation-engine/diff.js +21 -20
- package/dist/safe-bash-presentation-engine/drawing-format.js +7 -7
- package/dist/safe-bash-presentation-engine/drawing-operations.js +15 -15
- package/dist/safe-bash-presentation-engine/drawing-schema.js +8 -8
- package/dist/safe-bash-presentation-engine/equations.js +6 -6
- package/dist/safe-bash-presentation-engine/fields.js +6 -6
- package/dist/safe-bash-presentation-engine/image-extraction.js +7 -7
- package/dist/safe-bash-presentation-engine/image-formatting.js +16 -16
- package/dist/safe-bash-presentation-engine/image-insertion.js +6 -6
- package/dist/safe-bash-presentation-engine/image-replacement.js +7 -7
- package/dist/safe-bash-presentation-engine/images.js +6 -6
- package/dist/safe-bash-presentation-engine/index.js +96 -95
- package/dist/safe-bash-presentation-engine/layouts.js +5 -5
- package/dist/safe-bash-presentation-engine/links.js +5 -5
- package/dist/safe-bash-presentation-engine/masters.js +4 -4
- package/dist/safe-bash-presentation-engine/media-editing.js +10 -10
- package/dist/safe-bash-presentation-engine/media-extraction.js +6 -6
- package/dist/safe-bash-presentation-engine/media.js +5 -5
- package/dist/safe-bash-presentation-engine/memberships.d.ts +1 -0
- package/dist/safe-bash-presentation-engine/memberships.js +12 -6
- package/dist/safe-bash-presentation-engine/notes.js +6 -6
- package/dist/safe-bash-presentation-engine/ole-insertion.js +6 -6
- package/dist/safe-bash-presentation-engine/opaque-objects.js +2 -2
- package/dist/safe-bash-presentation-engine/package-tools.js +6 -6
- package/dist/safe-bash-presentation-engine/presentation-model.js +38 -37
- package/dist/safe-bash-presentation-engine/presentation-settings.d.ts +1 -0
- package/dist/safe-bash-presentation-engine/presentation-settings.js +12 -5
- package/dist/safe-bash-presentation-engine/properties.js +7 -6
- package/dist/safe-bash-presentation-engine/retained-inspection.js +3 -3
- package/dist/safe-bash-presentation-engine/retained-memberships.d.ts +25 -0
- package/dist/safe-bash-presentation-engine/retained-presentation-settings.d.ts +25 -0
- package/dist/safe-bash-presentation-engine/retained-tags.d.ts +20 -0
- package/dist/safe-bash-presentation-engine/retained-text.d.ts +24 -4
- package/dist/safe-bash-presentation-engine/retained-text.js +17 -15
- package/dist/safe-bash-presentation-engine/sanitize.js +8 -7
- package/dist/safe-bash-presentation-engine/selectors.js +2 -2
- package/dist/safe-bash-presentation-engine/shape-groups.js +15 -15
- package/dist/safe-bash-presentation-engine/shape-operations.js +14 -14
- package/dist/safe-bash-presentation-engine/shape-path-operations.js +16 -16
- package/dist/safe-bash-presentation-engine/shape-paths.js +5 -5
- package/dist/safe-bash-presentation-engine/shape-selection.js +15 -15
- package/dist/safe-bash-presentation-engine/shape-transforms.js +5 -5
- package/dist/safe-bash-presentation-engine/shapes.js +11 -11
- package/dist/safe-bash-presentation-engine/slide-copy.js +7 -5
- package/dist/safe-bash-presentation-engine/slide-import.js +6 -6
- package/dist/safe-bash-presentation-engine/slide-merge-split.js +8 -8
- package/dist/safe-bash-presentation-engine/slide-model.js +24 -24
- package/dist/safe-bash-presentation-engine/slide-removal.js +7 -7
- package/dist/safe-bash-presentation-engine/slide-transfer-budget.js +2 -2
- package/dist/safe-bash-presentation-engine/slides.js +5 -5
- package/dist/safe-bash-presentation-engine/table-operations.js +17 -17
- package/dist/safe-bash-presentation-engine/table-spans.js +16 -16
- package/dist/safe-bash-presentation-engine/tables.js +15 -15
- package/dist/safe-bash-presentation-engine/tags.d.ts +2 -0
- package/dist/safe-bash-presentation-engine/tags.js +15 -7
- package/dist/safe-bash-presentation-engine/template-bindings.js +16 -16
- package/dist/safe-bash-presentation-engine/template-repeat.js +24 -22
- package/dist/safe-bash-presentation-engine/text-fitting.js +11 -11
- package/dist/safe-bash-presentation-engine/text-frames.js +11 -11
- package/dist/safe-bash-presentation-engine/text-paragraphs.js +11 -11
- package/dist/safe-bash-presentation-engine/text-reading.js +3 -3
- package/dist/safe-bash-presentation-engine/text-replacement.js +6 -6
- package/dist/safe-bash-presentation-engine/text-runs.js +8 -8
- package/dist/safe-bash-presentation-engine/themes.js +5 -5
- package/dist/safe-bash-presentation-engine/transitions.js +5 -5
- package/dist/safe-bash-presentation-engine/validation.js +2 -2
- package/dist/safe-bash-presentation-engine/xml-parts.js +5 -5
- package/dist/safe-bash-xml-engine/document.js +2 -2
- package/dist/safe-bash-xml-engine/index.js +2 -2
- package/dist/safe-bash-xml-engine/recovery.d.ts +6 -2
- package/dist/safe-bash-xml-engine/stored-document.d.ts +3 -0
- package/dist/safe-bash-xml-engine/stored-document.js +1 -1
- package/dist/safe-bash-xml-engine/stored-evaluate.js +2 -2
- package/dist/safe-bash-xml-engine/stored-map.d.ts +21 -0
- package/dist/safe-bash-zip-engine/index.js +3 -3
- package/dist/safe-bash-zip-engine/zip/repair.js +3 -3
- package/dist/safe-bash-zip-engine/zip/safety.js +1 -1
- package/dist/safe-bash-zip-engine/zip/sfx.js +3 -3
- package/dist/safe-bash-zip-engine/zip/volumes.js +1 -1
- package/dist/safe-bash-zip-engine/zip-format.js +3 -3
- package/dist/spreadsheet-engine/formatting/cell-text.js +1 -1
- package/dist/spreadsheet-engine/{rendering/print → formatting}/general-number.js +3 -3
- package/dist/spreadsheet-engine/formulas/functions/python-printf.js +9 -7
- package/dist/spreadsheet-engine/solver/program.js +3 -2
- package/dist/spreadsheet-engine/solver/run.js +8 -2
- package/dist/spreadsheet-engine/solver/sensitivity.d.ts +4 -2
- package/dist/spreadsheet-engine/solver/sensitivity.js +80 -42
- package/dist/spreadsheet-format-xls/biff-properties-merge.d.ts +2 -1
- package/dist/spreadsheet-format-xls/biff-properties-merge.js +36 -30
- package/dist/spreadsheet-format-xls/biff-properties-write.js +16 -7
- package/dist/spreadsheet-format-xls/biff-properties.d.ts +4 -2
- package/dist/spreadsheet-format-xls/biff-properties.js +141 -122
- package/dist/spreadsheet-format-xls/biff-property-names.d.ts +27 -0
- package/dist/spreadsheet-format-xls/biff-property-names.js +210 -0
- package/dist/spreadsheet-format-xls/biff-property-observations.d.ts +33 -0
- package/dist/spreadsheet-format-xls/biff-property-observations.js +160 -0
- package/dist/xlsx-ast/comment-geometry.js +1 -1
- package/package.json +7 -4
- package/third-party/pdf-ast/THIRD_PARTY_NOTICES.md +15 -0
- package/third-party/pdf-ast/licenses/PYTHON-PSF.txt +254 -0
- package/third-party/pdf-ast/licenses/V8-BSD.txt +61 -0
- package/dist/safe-bash/command-chunks/biff-UBP2BZLK-JPODPKS3.js +0 -5448
- package/dist/safe-bash/command-chunks/chunk-6EZWG56T.js +0 -455
- package/dist/safe-bash/command-chunks/chunk-O2HNOQQG.js +0 -161
- package/dist/safe-bash/command-chunks/chunk-ZUP5TBRG.js +0 -99
- package/dist/safe-bash/command-chunks/model-store-I7YAWL5V.js +0 -54
- package/dist/safe-bash/command-chunks/odf-3EA3EVSD-7B5GVNTC.js +0 -3097
- package/dist/safe-bash/command-chunks/{chunk-SRXARACJ.js → chunk-3TP4SSPS.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-NCNHJRIY.js → chunk-3W3HLPCX.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-P4OWVKMD.js → chunk-BQXKO3X7.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-OCOJMKDP.js → chunk-CVMHDJ7J.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-AV6N7DDA.js → chunk-DDYPQAXN.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-FEKECRJP.js → chunk-EBTKM7KX.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-WVD5WZXD.js → chunk-FPNUGKCX.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-6W4RMBFH.js → chunk-N6VNHC3B.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-M3OXQXCU.js → chunk-NBRXQUK7.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-LECGQSQW.js → chunk-SF56V6QK.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-2ANW3FXH.js → chunk-U33GIOUY.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-5QXRIZSS.js → chunk-V3NKL42J.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-OEKLEUUW.js → chunk-YZE7BKHC.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-WXW665TV.js → chunk-ZSHXZ3XG.js} +6 -6
- package/dist/safe-bash/command-chunks/{dif-BXKPQOCO-4KB3RC6G.js → dif-BXKPQOCO-FVJYYGYB.js} +4 -4
- package/dist/safe-bash/command-chunks/{pln-DFS7VLVS-OVOBS4QX.js → pln-DFS7VLVS-JATX6FS7.js} +3 -3
- package/dist/safe-bash/command-chunks/{psion-YBI6JEQI-GY4S6ZLC.js → psion-YBI6JEQI-6OMC2PGC.js} +3 -3
- package/dist/safe-bash/command-chunks/{sylk-25D7TL2Y-RU6ANKGT.js → sylk-25D7TL2Y-NJKBZZTF.js} +4 -4
- /package/dist/spreadsheet-engine/{rendering/print → formatting}/general-number.d.ts +0 -0
|
@@ -1,21 +1,29 @@
|
|
|
1
1
|
import {
|
|
2
2
|
fieldTypeKinds
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-Z33YS3DW.js";
|
|
4
4
|
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
streamJson
|
|
8
|
-
} from "./chunk-FB2WPI3M.js";
|
|
5
|
+
readRetainedPropertyValue
|
|
6
|
+
} from "./chunk-MTWFSBNG.js";
|
|
9
7
|
import {
|
|
8
|
+
paragraphAlignments,
|
|
10
9
|
readFramePropertyValues,
|
|
11
10
|
textVerticalModes
|
|
12
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-NZF56C25.js";
|
|
12
|
+
import {
|
|
13
|
+
validateTextRunOptions
|
|
14
|
+
} from "./chunk-424NYO35.js";
|
|
13
15
|
import {
|
|
14
16
|
validateTextReadingOptions
|
|
15
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-WRCYZJNO.js";
|
|
18
|
+
import {
|
|
19
|
+
openRetainedPresentationIndex,
|
|
20
|
+
rawJson,
|
|
21
|
+
stageRetainedOutput,
|
|
22
|
+
streamJson
|
|
23
|
+
} from "./chunk-3ZGO24WG.js";
|
|
16
24
|
import {
|
|
17
25
|
SelectionError
|
|
18
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-3W3HLPCX.js";
|
|
19
27
|
import {
|
|
20
28
|
dialects,
|
|
21
29
|
openRetainedCompatibility
|
|
@@ -23,6 +31,9 @@ import {
|
|
|
23
31
|
import {
|
|
24
32
|
equationOpaqueElements
|
|
25
33
|
} from "./chunk-GTOMW4VV.js";
|
|
34
|
+
import {
|
|
35
|
+
InvalidXmlError
|
|
36
|
+
} from "./chunk-G3FK5VVG.js";
|
|
26
37
|
import {
|
|
27
38
|
OfficeError,
|
|
28
39
|
RetainedValues,
|
|
@@ -34,6 +45,301 @@ import {
|
|
|
34
45
|
resolveOfficeResources
|
|
35
46
|
} from "./chunk-KM2SMMXZ.js";
|
|
36
47
|
|
|
48
|
+
// packages/safe-bash-presentation-engine/src/retained-paragraph-formatting.ts
|
|
49
|
+
async function readRetainedParagraphFormatting(document, paragraph) {
|
|
50
|
+
async function local(node, keys) {
|
|
51
|
+
for (const key of keys) if (await equal(document.raw(node.localName), literal(key))) return key;
|
|
52
|
+
return void 0;
|
|
53
|
+
}
|
|
54
|
+
async function* children(parent, keys) {
|
|
55
|
+
if (parent) {
|
|
56
|
+
for await (const node of document.children(parent)) if (node.kind === "element" && await equal(document.namespace(node), document.namespace(parent)) && await local(node, keys)) yield node;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
async function first(parent, keys) {
|
|
60
|
+
for await (const node of children(parent, keys)) return node;
|
|
61
|
+
return void 0;
|
|
62
|
+
}
|
|
63
|
+
async function attr(parent, key) {
|
|
64
|
+
if (parent) {
|
|
65
|
+
for await (const node of document.attributes(parent)) if (await equal(document.namespace(node), literal("")) && await local(node, [key])) return () => document.text(node);
|
|
66
|
+
}
|
|
67
|
+
return null;
|
|
68
|
+
}
|
|
69
|
+
let properties;
|
|
70
|
+
for await (const node of children(paragraph, ["pPr"])) {
|
|
71
|
+
if (properties) throw new OfficeError("invalid-xml", "Ambiguous paragraph properties.", "parse");
|
|
72
|
+
properties = node;
|
|
73
|
+
}
|
|
74
|
+
async function numeric(source, scale) {
|
|
75
|
+
if (!source) return null;
|
|
76
|
+
const value = await readRetainedPropertyValue("number", source(), () => {
|
|
77
|
+
});
|
|
78
|
+
if (typeof value !== "number") throw new OfficeError("invalid-xml", "Invalid paragraph number.", "parse");
|
|
79
|
+
return value / scale;
|
|
80
|
+
}
|
|
81
|
+
async function spacing(key) {
|
|
82
|
+
const parent = await first(properties, [key]), node = await first(parent, ["spcPts", "spcPct"]);
|
|
83
|
+
if (!node) return null;
|
|
84
|
+
const source = await attr(node, "val");
|
|
85
|
+
if (!source) return null;
|
|
86
|
+
if (await local(node, ["spcPts"])) return { unit: "pt", value: await numeric(source, 100) };
|
|
87
|
+
let last = -1;
|
|
88
|
+
for await (const bytes of source()) if (bytes.length) last = bytes[bytes.length - 1];
|
|
89
|
+
async function* withoutPercent() {
|
|
90
|
+
let pending;
|
|
91
|
+
for await (const bytes of source()) if (bytes.length) {
|
|
92
|
+
if (pending) yield pending;
|
|
93
|
+
pending = new Uint8Array(bytes);
|
|
94
|
+
}
|
|
95
|
+
if (pending) yield pending.subarray(0, pending.length - 1);
|
|
96
|
+
}
|
|
97
|
+
return { unit: "multiple", value: await numeric(last === 37 ? withoutPercent : source, last === 37 ? 100 : 1e5) };
|
|
98
|
+
}
|
|
99
|
+
const bulletNode = await first(properties, ["buNone", "buChar", "buAutoNum", "buBlip"]);
|
|
100
|
+
async function bullet() {
|
|
101
|
+
if (!bulletNode) return null;
|
|
102
|
+
const kind = await local(bulletNode, ["buNone", "buChar", "buAutoNum", "buBlip"]);
|
|
103
|
+
if (kind === "buNone") return { kind: "none" };
|
|
104
|
+
if (kind === "buChar") return { kind: "character", character: await attr(bulletNode, "char") };
|
|
105
|
+
if (kind !== "buAutoNum") return { kind: "picture" };
|
|
106
|
+
const start = await attr(bulletNode, "startAt");
|
|
107
|
+
let startAt = null;
|
|
108
|
+
if (start) {
|
|
109
|
+
let whitespace = true;
|
|
110
|
+
for await (const character of characters(start())) if (character.trim() !== "") {
|
|
111
|
+
whitespace = false;
|
|
112
|
+
break;
|
|
113
|
+
}
|
|
114
|
+
startAt = whitespace ? 0 : await readRetainedPropertyValue("number", start(), () => {
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
return { kind: "numbered", scheme: await attr(bulletNode, "type"), ...start ? { startAt } : {} };
|
|
118
|
+
}
|
|
119
|
+
const bulletValue = await bullet(), before = await spacing("spcBef"), after = await spacing("spcAft");
|
|
120
|
+
const align = await attr(properties, "algn"), rtl = await attr(properties, "rtl");
|
|
121
|
+
let direction = null;
|
|
122
|
+
if (rtl) {
|
|
123
|
+
let valid = false;
|
|
124
|
+
for (const value of ["0", "1", "false", "true"]) if (await equal(rtl(), literal(value))) {
|
|
125
|
+
direction = value === "1" || value === "true";
|
|
126
|
+
valid = true;
|
|
127
|
+
break;
|
|
128
|
+
}
|
|
129
|
+
if (!valid) throw new OfficeError("invalid-xml", "Invalid paragraph direction.", "parse");
|
|
130
|
+
}
|
|
131
|
+
let alignment = align;
|
|
132
|
+
if (align) {
|
|
133
|
+
for (const [index, key] of ["l", "ctr", "r", "just", "dist", "thaiDist", "justLow"].entries()) if (await equal(align(), literal(key))) {
|
|
134
|
+
alignment = paragraphAlignments[index];
|
|
135
|
+
break;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
const marginLeft = await numeric(await attr(properties, "marL"), 12700), marginRight = await numeric(await attr(properties, "marR"), 12700), indent = await numeric(await attr(properties, "indent"), 12700), defaultTabSize = await numeric(await attr(properties, "defTabSz"), 12700), level = await numeric(await attr(properties, "lvl"), 1), lineSpacing = await spacing("lnSpc");
|
|
139
|
+
const tabList = await first(properties, ["tabLst"]);
|
|
140
|
+
async function* tabs() {
|
|
141
|
+
for await (const node of children(tabList, ["tab"])) {
|
|
142
|
+
const position = await numeric(await attr(node, "pos"), 12700), source = await attr(node, "algn");
|
|
143
|
+
let alignment2 = source ?? "left";
|
|
144
|
+
const mappings = { l: "left", ctr: "center", r: "right", dec: "decimal" };
|
|
145
|
+
if (source) {
|
|
146
|
+
for (const key of [...Object.keys(mappings), ...Object.getOwnPropertyNames(Object.prototype)]) if (await equal(source(), literal(key))) {
|
|
147
|
+
const value = mappings[key];
|
|
148
|
+
alignment2 = typeof value === "function" ? void 0 : value;
|
|
149
|
+
break;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
yield { position, alignment: alignment2 };
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
return { alignment, marginLeft, marginRight, indent, defaultTabSize, level, rtl: direction, lineSpacing, spaceBefore: before?.unit === "pt" ? before.value : null, spaceAfter: after?.unit === "pt" ? after.value : null, bullet: bulletValue, tabs: tabList ? tabs() : null };
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
// packages/safe-bash-presentation-engine/src/retained-run-formatting.ts
|
|
159
|
+
async function readRetainedRunFormatting(document, run) {
|
|
160
|
+
const fail = (message) => {
|
|
161
|
+
throw new OfficeError("invalid-xml", message, "parse");
|
|
162
|
+
};
|
|
163
|
+
async function* children(parent, local) {
|
|
164
|
+
if (parent) {
|
|
165
|
+
for await (const node of document.children(parent)) if (node.kind === "element" && await equal(document.namespace(node), document.namespace(parent)) && await equal(document.raw(node.localName), literal(local))) yield node;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
async function first(parent, local) {
|
|
169
|
+
for await (const node of children(parent, local)) return node;
|
|
170
|
+
return void 0;
|
|
171
|
+
}
|
|
172
|
+
async function attribute(parent, local) {
|
|
173
|
+
if (parent) {
|
|
174
|
+
for await (const node of document.attributes(parent)) if (await equal(document.namespace(node), literal("")) && await equal(document.raw(node.localName), literal(local))) return () => document.text(node);
|
|
175
|
+
}
|
|
176
|
+
return null;
|
|
177
|
+
}
|
|
178
|
+
async function token(source, tokens) {
|
|
179
|
+
if (source) {
|
|
180
|
+
for (const value of tokens) if (await equal(source(), literal(value))) return value;
|
|
181
|
+
}
|
|
182
|
+
return void 0;
|
|
183
|
+
}
|
|
184
|
+
let properties;
|
|
185
|
+
for await (const node of children(run, "rPr")) {
|
|
186
|
+
if (properties) fail("Ambiguous run properties.");
|
|
187
|
+
properties = node;
|
|
188
|
+
}
|
|
189
|
+
const attr = (key) => attribute(properties, key);
|
|
190
|
+
const child = (key) => first(properties, key);
|
|
191
|
+
async function boolean(key) {
|
|
192
|
+
const source = await attr(key);
|
|
193
|
+
if (!source) return null;
|
|
194
|
+
const value = await token(source, ["0", "1", "false", "true"]);
|
|
195
|
+
if (value === void 0) fail("Invalid run boolean.");
|
|
196
|
+
return value === "1" || value === "true";
|
|
197
|
+
}
|
|
198
|
+
async function numeric(key, scale) {
|
|
199
|
+
const source = await attr(key);
|
|
200
|
+
if (!source) return null;
|
|
201
|
+
let nonempty = false, whitespace = true;
|
|
202
|
+
for await (const character of characters(source())) {
|
|
203
|
+
nonempty = true;
|
|
204
|
+
if (character.trim() !== "") {
|
|
205
|
+
whitespace = false;
|
|
206
|
+
break;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
const value = nonempty && whitespace ? 0 : await readRetainedPropertyValue("number", source(), () => {
|
|
210
|
+
});
|
|
211
|
+
if (typeof value !== "number") return fail("Invalid run number.");
|
|
212
|
+
return value / scale;
|
|
213
|
+
}
|
|
214
|
+
const cs = await child("cs");
|
|
215
|
+
async function fontNumber(key) {
|
|
216
|
+
const source = await attribute(cs, key);
|
|
217
|
+
if (!source) return null;
|
|
218
|
+
let phase = "leading", digits = false;
|
|
219
|
+
for await (const character of characters(source())) {
|
|
220
|
+
if (character.trim() === "") {
|
|
221
|
+
if (phase === "sign") fail("Invalid complex-script font classification.");
|
|
222
|
+
if (phase === "digits") phase = "trailing";
|
|
223
|
+
} else if (phase === "leading" && (character === "+" || character === "-")) phase = "sign";
|
|
224
|
+
else if (phase !== "trailing" && character >= "0" && character <= "9") {
|
|
225
|
+
digits = true;
|
|
226
|
+
phase = "digits";
|
|
227
|
+
} else fail("Invalid complex-script font classification.");
|
|
228
|
+
}
|
|
229
|
+
const value = await readRetainedPropertyValue("number", source(), () => {
|
|
230
|
+
});
|
|
231
|
+
if (!digits || typeof value !== "number" || !Number.isInteger(value)) return fail("Invalid complex-script font classification.");
|
|
232
|
+
return value;
|
|
233
|
+
}
|
|
234
|
+
const charset = await fontNumber("charset"), pitch = await fontNumber("pitchFamily"), panoseSource = await attribute(cs, "panose");
|
|
235
|
+
let panose = null;
|
|
236
|
+
if (panoseSource) {
|
|
237
|
+
panose = "";
|
|
238
|
+
let trailing = false;
|
|
239
|
+
for await (const character of characters(panoseSource())) {
|
|
240
|
+
if (character.trim() === "") {
|
|
241
|
+
if (panose) trailing = true;
|
|
242
|
+
continue;
|
|
243
|
+
}
|
|
244
|
+
if (trailing || panose.length >= 20) fail("Invalid complex-script font classification.");
|
|
245
|
+
panose += character.toUpperCase();
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
const classification = { complexScriptCharset: charset, complexScriptPitchFamily: pitch, complexScriptPanose: panose };
|
|
249
|
+
try {
|
|
250
|
+
validateTextRunOptions(classification);
|
|
251
|
+
} catch {
|
|
252
|
+
fail("Invalid complex-script font classification.");
|
|
253
|
+
}
|
|
254
|
+
const rtl = await child("rtl"), rtlSource = await attribute(rtl, "val");
|
|
255
|
+
const transitional = await equal(document.namespace(run), literal("http://schemas.openxmlformats.org/drawingml/2006/main"));
|
|
256
|
+
const direction = await token(rtlSource, transitional ? ["0", "1", "false", "true", "on", "off"] : ["0", "1", "false", "true"]);
|
|
257
|
+
if (rtlSource && direction === void 0) fail("Invalid run direction.");
|
|
258
|
+
async function strike() {
|
|
259
|
+
const source = await attr("strike");
|
|
260
|
+
const mappings = { noStrike: "none", sngStrike: "single", dblStrike: "double" };
|
|
261
|
+
const key = await token(source, [...Object.keys(mappings), ...Object.getOwnPropertyNames(Object.prototype)]);
|
|
262
|
+
if (key === void 0) return source;
|
|
263
|
+
const value = mappings[key];
|
|
264
|
+
return typeof value === "function" ? void 0 : value;
|
|
265
|
+
}
|
|
266
|
+
async function percentage(source) {
|
|
267
|
+
if (!source) throw new InvalidXmlError("Missing percentage value.");
|
|
268
|
+
let phase = "leading", digits = 0, dot = false, percent = false, invalid = false, count = 0;
|
|
269
|
+
async function* numericSource() {
|
|
270
|
+
for await (const character of characters(source())) {
|
|
271
|
+
if (" \r\n".includes(character)) {
|
|
272
|
+
if (phase === "body") phase = "trailing";
|
|
273
|
+
continue;
|
|
274
|
+
}
|
|
275
|
+
if (phase === "trailing" || percent) invalid = true;
|
|
276
|
+
phase = "body";
|
|
277
|
+
if (character === "%") {
|
|
278
|
+
percent = true;
|
|
279
|
+
continue;
|
|
280
|
+
}
|
|
281
|
+
if (count++ === 0 && (character === "+" || character === "-")) {
|
|
282
|
+
yield* literal(character);
|
|
283
|
+
continue;
|
|
284
|
+
}
|
|
285
|
+
if (character === "." && !dot) dot = true;
|
|
286
|
+
else if (character >= "0" && character <= "9") digits++;
|
|
287
|
+
else invalid = true;
|
|
288
|
+
yield* literal(character);
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
const value = await readRetainedPropertyValue("number", numericSource(), () => {
|
|
292
|
+
});
|
|
293
|
+
if (invalid || !digits || !percent && dot || typeof value !== "number") throw new InvalidXmlError("Invalid numeric XML token.");
|
|
294
|
+
if (!percent && !Number.isSafeInteger(value)) throw new InvalidXmlError("XML integer exceeds the safe range.");
|
|
295
|
+
return value / (percent ? 100 : 1e5);
|
|
296
|
+
}
|
|
297
|
+
async function color(parent) {
|
|
298
|
+
if (!parent) return null;
|
|
299
|
+
const kinds = { hslClr: "HSL", prstClr: "PRESET", schemeClr: "SCHEME", scrgbClr: "SCRGB", srgbClr: "RGB", sysClr: "SYSTEM" };
|
|
300
|
+
let node, kind;
|
|
301
|
+
for await (const candidate of document.children(parent)) {
|
|
302
|
+
if (candidate.kind !== "element" || !await equal(document.namespace(candidate), document.namespace(parent))) continue;
|
|
303
|
+
for (const key of Object.keys(kinds)) if (await equal(document.raw(candidate.localName), literal(key))) {
|
|
304
|
+
if (node) throw new OfficeError("invalid-xml", "Multiple color choices.", "index");
|
|
305
|
+
node = candidate;
|
|
306
|
+
kind = key;
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
if (!node || !kind) return null;
|
|
310
|
+
async function transform(local) {
|
|
311
|
+
let found;
|
|
312
|
+
for await (const value of children(node, local)) {
|
|
313
|
+
if (found) throw new OfficeError("invalid-xml", "Multiple brightness transforms.", "index");
|
|
314
|
+
found = value;
|
|
315
|
+
}
|
|
316
|
+
return found ? percentage(await attribute(found, "val")) : void 0;
|
|
317
|
+
}
|
|
318
|
+
const off = await transform("lumOff"), mod = await transform("lumMod");
|
|
319
|
+
return { type: kinds[kind], rgb: kind === "srgbClr" ? await attribute(node, "val") : null, theme: kind === "schemeClr" ? await attribute(node, "val") : null, brightness: off ?? (mod === void 0 ? 0 : mod - 1) };
|
|
320
|
+
}
|
|
321
|
+
return {
|
|
322
|
+
eastAsiaFont: await attribute(await child("ea"), "typeface"),
|
|
323
|
+
complexScriptFont: await attribute(cs, "typeface"),
|
|
324
|
+
symbolFont: await attribute(await child("sym"), "typeface"),
|
|
325
|
+
...classification,
|
|
326
|
+
alternateLanguage: await attr("altLang"),
|
|
327
|
+
rtl: rtl ? ["1", "true", "on"].includes(direction ?? "0") : null,
|
|
328
|
+
font: await attribute(await child("latin"), "typeface"),
|
|
329
|
+
size: await numeric("sz", 100),
|
|
330
|
+
language: await attr("lang"),
|
|
331
|
+
bold: await boolean("b"),
|
|
332
|
+
italic: await boolean("i"),
|
|
333
|
+
underline: await attr("u"),
|
|
334
|
+
strike: await strike(),
|
|
335
|
+
baseline: await numeric("baseline", 1e3),
|
|
336
|
+
capitalization: await attr("cap"),
|
|
337
|
+
spacing: await numeric("spc", 100),
|
|
338
|
+
color: await color(await child("solidFill")),
|
|
339
|
+
highlight: await color(await child("highlight"))
|
|
340
|
+
};
|
|
341
|
+
}
|
|
342
|
+
|
|
37
343
|
// packages/safe-bash-presentation-engine/src/retained-frame-formatting.ts
|
|
38
344
|
async function readRetainedFrameFormatting(document, body) {
|
|
39
345
|
const malformed = () => {
|
|
@@ -97,14 +403,22 @@ async function readRetainedFrameFormatting(document, body) {
|
|
|
97
403
|
// packages/safe-bash-presentation-engine/src/retained-text.ts
|
|
98
404
|
import { PagedStorage } from "@poe-platform/safe-fs/storage";
|
|
99
405
|
async function openRetainedText(archive, fingerprint, options, settings, readingMode = "text") {
|
|
100
|
-
validateTextReadingOptions(options);
|
|
406
|
+
if (readingMode !== "runs" && readingMode !== "paragraphs") validateTextReadingOptions(options);
|
|
407
|
+
const { paragraph: selectedParagraph, ...paragraphReading } = options;
|
|
408
|
+
const { run: selectedRun, ...readingOptions } = paragraphReading;
|
|
409
|
+
if (readingMode === "runs") {
|
|
410
|
+
for (const value of [selectedParagraph, selectedRun]) if (value !== void 0 && (!Number.isSafeInteger(value) || value < 0)) throw new OfficeError("invalid-value", "Invalid run formatting options.", "usage");
|
|
411
|
+
}
|
|
412
|
+
if (readingMode === "paragraphs" && selectedParagraph !== void 0 && (!Number.isSafeInteger(selectedParagraph) || selectedParagraph < 0)) throw new OfficeError("invalid-value", "Invalid paragraph formatting options.", "usage");
|
|
413
|
+
if (readingMode === "runs" || readingMode === "paragraphs") validateTextReadingOptions(readingMode === "runs" ? readingOptions : paragraphReading);
|
|
101
414
|
const selection = options.select === void 0 ? void 0 : { ...options.select, ...options.select.position ? { position: { ...options.select.position } } : {} };
|
|
102
415
|
const scope = options.scope ?? "slides", shape = options.shape;
|
|
103
416
|
const context = resolveOfficeResources(settings), working = { ...settings.workingStorage }, signal = context.signal ?? new AbortController().signal;
|
|
104
417
|
const index = await openRetainedPresentationIndex(archive, fingerprint, { ...context, workingStorage: working });
|
|
105
418
|
const pages = new PagedStorage({ fs: working.fs, cwd: working.directory, env: {}, signal }, (working.cacheBytes ?? 1024 * 1024) / 16384);
|
|
106
419
|
const traversal = new PagedStorage({ fs: working.fs, cwd: working.directory, env: {}, signal }, (working.cacheBytes ?? 1024 * 1024) / 16384);
|
|
107
|
-
let closed = false, closing, firstBody = 0, lastBody = 0, firstOwner = 0, lastOwner = 0, fieldCount = 0, frameCount = 0;
|
|
420
|
+
let closed = false, closing, firstBody = 0, lastBody = 0, firstOwner = 0, lastOwner = 0, fieldCount = 0, frameCount = 0, runCount = 0, paragraphCount = 0;
|
|
421
|
+
let formattingError;
|
|
108
422
|
const check = () => {
|
|
109
423
|
if (closed) throw new OfficeError("invalid-handle", "Text is closed.", "select");
|
|
110
424
|
if (signal.aborted) throw new OfficeError("cancelled", "Operation cancelled.", "select");
|
|
@@ -270,10 +584,50 @@ async function openRetainedText(archive, fingerprint, options, settings, reading
|
|
|
270
584
|
let paragraphIndex = 0;
|
|
271
585
|
for await (const paragraph of children(node, "p", drawing)) {
|
|
272
586
|
if (readingMode === "frames") break;
|
|
273
|
-
const paragraphPointer = pages.allocate(
|
|
274
|
-
let fieldInline = 0;
|
|
587
|
+
const paragraphPointer = pages.allocate(6 /* Count */ * 8), paragraphRow = [0, 0, 0, paragraphIndex++, 0, 0];
|
|
588
|
+
let fieldInline = 0, runIndex = 0;
|
|
589
|
+
if (readingMode === "paragraphs" && (selectedParagraph === void 0 || selectedParagraph === paragraphRow[3 /* Index */]) && !formattingError) {
|
|
590
|
+
try {
|
|
591
|
+
const formatted = await readRetainedParagraphFormatting(document, paragraph), format = await values.store(streamJson(formatted));
|
|
592
|
+
paragraphRow[4 /* Format */] = format.start;
|
|
593
|
+
paragraphRow[5 /* FormatLength */] = format.length;
|
|
594
|
+
paragraphCount++;
|
|
595
|
+
} catch (error) {
|
|
596
|
+
if (error instanceof OfficeError && error.code === "invalid-xml") formattingError = error;
|
|
597
|
+
else throw error;
|
|
598
|
+
}
|
|
599
|
+
}
|
|
275
600
|
for await (const inline of view.children(paragraph)) {
|
|
601
|
+
if (readingMode === "paragraphs") continue;
|
|
276
602
|
const kind = await is(inline, "br", drawing) ? 1 : await is(inline, "r", drawing) ? 0 : await is(inline, "fld", drawing) ? 2 : -1;
|
|
603
|
+
if (readingMode === "runs") {
|
|
604
|
+
let runNode = false;
|
|
605
|
+
for (const local of ["r", "fld", "br"]) if (inline.kind === "element" && await equal(document.raw(inline.localName), literal(local))) runNode = true;
|
|
606
|
+
if (!runNode) continue;
|
|
607
|
+
const position = runIndex++;
|
|
608
|
+
if (selectedParagraph !== void 0 && selectedParagraph !== paragraphRow[3 /* Index */] || selectedRun !== void 0 && selectedRun !== position || formattingError) continue;
|
|
609
|
+
let formatted;
|
|
610
|
+
try {
|
|
611
|
+
formatted = await readRetainedRunFormatting(document, inline);
|
|
612
|
+
} catch (error) {
|
|
613
|
+
if (error instanceof OfficeError && error.code === "invalid-xml") {
|
|
614
|
+
formattingError = error;
|
|
615
|
+
continue;
|
|
616
|
+
}
|
|
617
|
+
throw error;
|
|
618
|
+
}
|
|
619
|
+
const format = await values.store(streamJson(formatted)), pointer2 = pages.allocate(14 /* Count */ * 8);
|
|
620
|
+
const data = Array(14 /* Count */).fill(0);
|
|
621
|
+
data[11 /* Format */] = format.start;
|
|
622
|
+
data[12 /* FormatLength */] = format.length;
|
|
623
|
+
data[13 /* Run */] = position;
|
|
624
|
+
await write(pointer2, data);
|
|
625
|
+
runCount++;
|
|
626
|
+
if (paragraphRow[2 /* LastInline */]) await write(paragraphRow[2 /* LastInline */], [pointer2]);
|
|
627
|
+
else paragraphRow[1 /* Inlines */] = pointer2;
|
|
628
|
+
paragraphRow[2 /* LastInline */] = pointer2;
|
|
629
|
+
continue;
|
|
630
|
+
}
|
|
277
631
|
if (kind < 0) continue;
|
|
278
632
|
async function* text() {
|
|
279
633
|
if (kind === 1) yield* literal("\v");
|
|
@@ -288,8 +642,8 @@ async function openRetainedText(archive, fingerprint, options, settings, reading
|
|
|
288
642
|
}
|
|
289
643
|
const cached = kind === 2 && fieldIndex >= 0 ? await values.store(fieldText()) : { start: 0, length: 0 };
|
|
290
644
|
if (kind === 2 && fieldIndex >= 0) fieldCount++;
|
|
291
|
-
const pointer = pages.allocate(
|
|
292
|
-
await write(pointer, [0, kind, value.start, value.length, identifier.start, identifier.length, type.start, type.length, fieldIndex, cached.start, cached.length]);
|
|
645
|
+
const pointer = pages.allocate(14 /* Count */ * 8);
|
|
646
|
+
await write(pointer, [0, kind, value.start, value.length, identifier.start, identifier.length, type.start, type.length, fieldIndex, cached.start, cached.length, 0, 0, 0]);
|
|
293
647
|
if (paragraphRow[2 /* LastInline */]) await write(paragraphRow[2 /* LastInline */], [pointer]);
|
|
294
648
|
else paragraphRow[1 /* Inlines */] = pointer;
|
|
295
649
|
paragraphRow[2 /* LastInline */] = pointer;
|
|
@@ -365,26 +719,58 @@ async function openRetainedText(archive, fingerprint, options, settings, reading
|
|
|
365
719
|
await index.close();
|
|
366
720
|
await traversal.close();
|
|
367
721
|
check();
|
|
722
|
+
if (formattingError) throw formattingError;
|
|
723
|
+
async function* paragraphFormats() {
|
|
724
|
+
try {
|
|
725
|
+
for await (const body of rows(firstBody, 10 /* Count */)) {
|
|
726
|
+
const location = { fingerprint, scope, owner: await name(range(body, 1 /* Owner */)), objectId: String(body[3 /* Id */]), coordinateSystem: "identity" };
|
|
727
|
+
for await (const paragraph of rows(body[4 /* Paragraphs */], 6 /* Count */)) if (paragraph[4 /* Format */]) yield {
|
|
728
|
+
location,
|
|
729
|
+
paragraph: paragraph[3 /* Index */],
|
|
730
|
+
coordinateSystem: "zero-based",
|
|
731
|
+
formatting: { [rawJson]: () => values.read(range(paragraph, 4 /* Format */)) }
|
|
732
|
+
};
|
|
733
|
+
}
|
|
734
|
+
} catch (error) {
|
|
735
|
+
throw failure(error);
|
|
736
|
+
}
|
|
737
|
+
}
|
|
738
|
+
async function* runs() {
|
|
739
|
+
try {
|
|
740
|
+
for await (const body of rows(firstBody, 10 /* Count */)) {
|
|
741
|
+
const location = { fingerprint, scope, owner: await name(range(body, 1 /* Owner */)), objectId: String(body[3 /* Id */]), coordinateSystem: "identity" };
|
|
742
|
+
for await (const paragraph of rows(body[4 /* Paragraphs */], 6 /* Count */)) for await (const inline of rows(paragraph[1 /* Inlines */], 14 /* Count */)) if (inline[11 /* Format */]) yield {
|
|
743
|
+
location,
|
|
744
|
+
paragraph: paragraph[3 /* Index */],
|
|
745
|
+
run: inline[13 /* Run */],
|
|
746
|
+
coordinateSystem: "zero-based",
|
|
747
|
+
formatting: { [rawJson]: () => values.read(range(inline, 11 /* Format */)) }
|
|
748
|
+
};
|
|
749
|
+
}
|
|
750
|
+
} catch (error) {
|
|
751
|
+
throw failure(error);
|
|
752
|
+
}
|
|
753
|
+
}
|
|
368
754
|
async function* inlineText(first) {
|
|
369
|
-
for await (const inline of rows(first,
|
|
755
|
+
for await (const inline of rows(first, 14 /* Count */)) yield* values.read(range(inline, 2 /* Text */));
|
|
370
756
|
}
|
|
371
757
|
async function* bodyText(first) {
|
|
372
758
|
let separator = false;
|
|
373
|
-
for await (const paragraph of rows(first,
|
|
759
|
+
for await (const paragraph of rows(first, 6 /* Count */)) {
|
|
374
760
|
if (separator) yield* literal("\n");
|
|
375
761
|
separator = true;
|
|
376
762
|
yield* inlineText(paragraph[1 /* Inlines */]);
|
|
377
763
|
}
|
|
378
764
|
}
|
|
379
765
|
async function* inlines(first) {
|
|
380
|
-
for await (const inline of rows(first,
|
|
766
|
+
for await (const inline of rows(first, 14 /* Count */)) {
|
|
381
767
|
if (inline[1 /* Kind */] === 1) yield { kind: "break", text: "\v" };
|
|
382
768
|
else if (inline[1 /* Kind */] === 0) yield { kind: "run", text: () => values.read(range(inline, 2 /* Text */)) };
|
|
383
769
|
else yield { kind: "field", cachedText: () => values.read(range(inline, 2 /* Text */)), fieldId: inline[4 /* FieldId */] === -1 ? null : () => values.read(range(inline, 4 /* FieldId */)), fieldType: inline[6 /* FieldType */] === -1 ? null : () => values.read(range(inline, 6 /* FieldType */)) };
|
|
384
770
|
}
|
|
385
771
|
}
|
|
386
772
|
async function* paragraphs(first) {
|
|
387
|
-
for await (const paragraph of rows(first,
|
|
773
|
+
for await (const paragraph of rows(first, 6 /* Count */)) yield { index: paragraph[3 /* Index */], coordinateSystem: "zero-based", text: () => inlineText(paragraph[1 /* Inlines */]), inlines: inlines(paragraph[1 /* Inlines */]) };
|
|
388
774
|
}
|
|
389
775
|
async function* segments() {
|
|
390
776
|
try {
|
|
@@ -408,7 +794,7 @@ async function openRetainedText(archive, fingerprint, options, settings, reading
|
|
|
408
794
|
try {
|
|
409
795
|
for await (const body of rows(firstBody, 10 /* Count */)) {
|
|
410
796
|
const location = { fingerprint, scope, owner: await name(range(body, 1 /* Owner */)), objectId: String(body[3 /* Id */]), coordinateSystem: "identity" };
|
|
411
|
-
for await (const paragraph of rows(body[4 /* Paragraphs */],
|
|
797
|
+
for await (const paragraph of rows(body[4 /* Paragraphs */], 6 /* Count */)) for await (const inline of rows(paragraph[1 /* Inlines */], 14 /* Count */)) if (inline[1 /* Kind */] === 2 && inline[8 /* FieldIndex */] >= 0) {
|
|
412
798
|
const fieldType = inline[6 /* FieldType */] === -1 ? null : () => values.read(range(inline, 6 /* FieldType */));
|
|
413
799
|
let kind = null;
|
|
414
800
|
if (fieldType) {
|
|
@@ -433,7 +819,7 @@ async function openRetainedText(archive, fingerprint, options, settings, reading
|
|
|
433
819
|
throw failure(error);
|
|
434
820
|
}
|
|
435
821
|
}
|
|
436
|
-
return Object.freeze({ close, segments, fields, fieldCount, frames, frameCount, async *text() {
|
|
822
|
+
return Object.freeze({ close, segments, paragraphFormats, paragraphCount, runs, runCount, fields, fieldCount, frames, frameCount, async *text() {
|
|
437
823
|
let separator = false;
|
|
438
824
|
for await (const segment of segments()) {
|
|
439
825
|
if (separator) yield* literal("\n");
|
|
@@ -449,9 +835,9 @@ async function openRetainedText(archive, fingerprint, options, settings, reading
|
|
|
449
835
|
}
|
|
450
836
|
async function stageRetainedText(archive, fingerprint, options, settings, output) {
|
|
451
837
|
const format = { ...output }, operation = format.operation ?? "text.get";
|
|
452
|
-
if (!["text.get", "fields.list", "fields.get", "text.frames.list", "text.frames.get"].includes(operation)) throw new OfficeError("invalid-value", "Invalid retained text operation.", "usage");
|
|
453
|
-
const frames = operation.startsWith("text.frames."), fields = operation.startsWith("fields.");
|
|
454
|
-
const text = await openRetainedText(archive, fingerprint, options, settings, frames ? "frames" : "text").catch((error) => {
|
|
838
|
+
if (!["text.get", "fields.list", "fields.get", "text.frames.list", "text.frames.get", "text.runs.list", "text.runs.get", "text.paragraphs.list", "text.paragraphs.get"].includes(operation)) throw new OfficeError("invalid-value", "Invalid retained text operation.", "usage");
|
|
839
|
+
const paragraphs = operation.startsWith("text.paragraphs."), runs = operation.startsWith("text.runs."), frames = operation.startsWith("text.frames."), fields = operation.startsWith("fields.");
|
|
840
|
+
const text = await openRetainedText(archive, fingerprint, options, settings, frames ? "frames" : runs ? "runs" : paragraphs ? "paragraphs" : "text").catch((error) => {
|
|
455
841
|
if (frames && error instanceof SelectionError && error.code === "missing-selection") return void 0;
|
|
456
842
|
throw error;
|
|
457
843
|
});
|
|
@@ -460,7 +846,7 @@ async function stageRetainedText(archive, fingerprint, options, settings, output
|
|
|
460
846
|
}
|
|
461
847
|
let staged;
|
|
462
848
|
async function* locations() {
|
|
463
|
-
for await (const item of frames ? frameRecords() : fields ? text.fields() : text.segments()) yield item.location;
|
|
849
|
+
for await (const item of frames ? frameRecords() : runs ? text.runs() : paragraphs ? text.paragraphFormats() : fields ? text.fields() : text.segments()) yield item.location;
|
|
464
850
|
}
|
|
465
851
|
async function* items() {
|
|
466
852
|
for await (const field of text.fields()) yield {
|
|
@@ -478,13 +864,17 @@ async function stageRetainedText(archive, fingerprint, options, settings, output
|
|
|
478
864
|
}
|
|
479
865
|
async function* render() {
|
|
480
866
|
if (format.json) {
|
|
481
|
-
yield* streamJson({ version: 1, operation, ok: true, data: frames ? { frames: frameRecords() } : fields ? { items: items() } : { text: text.text, order: "structural", segments: text.segments() }, warnings: [], errors: [], affected: 0, locations: locations() });
|
|
867
|
+
yield* streamJson({ version: 1, operation, ok: true, data: frames ? { frames: frameRecords() } : runs ? { runs: text.runs() } : paragraphs ? { paragraphs: text.paragraphFormats() } : fields ? { items: items() } : { text: text.text, order: "structural", segments: text.segments() }, warnings: [], errors: [], affected: 0, locations: locations() });
|
|
482
868
|
yield* literal("\n");
|
|
483
869
|
} else if (frames) yield* streamJson(frameRecords());
|
|
870
|
+
else if (runs) yield* streamJson(text.runs());
|
|
871
|
+
else if (paragraphs) yield* streamJson(text.paragraphFormats());
|
|
484
872
|
else if (fields) yield* streamJson(text.fields());
|
|
485
873
|
else yield* text.text();
|
|
486
874
|
}
|
|
487
875
|
try {
|
|
876
|
+
if (operation === "text.paragraphs.get" && text.paragraphCount !== 1) throw new SelectionError(text.paragraphCount ? "ambiguous-selection" : "missing-selection");
|
|
877
|
+
if (operation === "text.runs.get" && text.runCount !== 1) throw new SelectionError(text.runCount ? "ambiguous-selection" : "missing-selection");
|
|
488
878
|
if (operation === "fields.get" && text.fieldCount !== 1) throw new SelectionError(text.fieldCount ? "ambiguous-selection" : "missing-selection");
|
|
489
879
|
if (operation === "text.frames.get" && text?.frameCount !== 1) throw new SelectionError(text?.frameCount ? "ambiguous-selection" : "missing-selection");
|
|
490
880
|
staged = await stageRetainedOutput(render(), settings, format.maxOutputBytes);
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
measurePackageResourceSerialization
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ETN25WCR.js";
|
|
4
4
|
import {
|
|
5
5
|
validateDocxInvocation
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-BDGNKRY4.js";
|
|
7
7
|
import {
|
|
8
8
|
readDocumentArchive
|
|
9
9
|
} from "./chunk-5BUL25DF.js";
|
|
10
10
|
import {
|
|
11
11
|
UnsupportedEditError
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-QMWBKR4C.js";
|
|
13
13
|
import {
|
|
14
14
|
documentDialects
|
|
15
15
|
} from "./chunk-WLANDWNW.js";
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import {
|
|
2
2
|
sectionState
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-LSKA4IR4.js";
|
|
4
4
|
import {
|
|
5
5
|
openDocumentLocations
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-MWVELMXZ.js";
|
|
7
7
|
import {
|
|
8
8
|
sectionAttribute
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-JY2T3KV2.js";
|
|
10
10
|
import {
|
|
11
11
|
paragraphTextRun,
|
|
12
12
|
replaceParagraphContent
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-MPRUGL4W.js";
|
|
14
14
|
import {
|
|
15
15
|
findRelationshipPart,
|
|
16
16
|
retainedRelationshipTargets
|
|
17
17
|
} from "./chunk-UIX3CASN.js";
|
|
18
18
|
import {
|
|
19
19
|
validateDocxInvocation
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-BDGNKRY4.js";
|
|
21
21
|
import {
|
|
22
22
|
assertDocumentEditable,
|
|
23
23
|
publishDocumentArchive
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-LTWX23FS.js";
|
|
25
25
|
import {
|
|
26
26
|
DocumentPackage
|
|
27
27
|
} from "./chunk-5BUL25DF.js";
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
activeXmlChildren,
|
|
32
32
|
editActiveRelationshipXml,
|
|
33
33
|
xmlValue
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-QMWBKR4C.js";
|
|
35
35
|
import {
|
|
36
36
|
relationshipXmlRows
|
|
37
37
|
} from "./chunk-WI4522BH.js";
|