ooxml-core 1.27.2 → 1.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{PptxHandler-WRJXTPGV.mjs → PptxHandler-AFVUHNJO.mjs} +3 -3
- package/dist/PptxHandler-EZW4YAWL.mjs +4 -0
- package/dist/{PptxHandler-FRQKHTCM.cjs → PptxHandler-WI23AJHM.cjs} +3 -3
- package/dist/{PresentationBuilder-POXKHTV7.mjs → PresentationBuilder-DYEHCRHX.mjs} +2 -2
- package/dist/{PresentationBuilder-YO5YOTA3.cjs → PresentationBuilder-KUNPJTRL.cjs} +5 -5
- package/dist/{PresentationBuilder-LWR5X3JA.mjs → PresentationBuilder-WGTZPVOG.mjs} +3 -3
- package/dist/automation/index.cjs +16 -7
- package/dist/automation/index.mjs +16 -7
- package/dist/chart/index.cjs +16 -7
- package/dist/chart/index.mjs +16 -7
- package/dist/{chunk-36TR3PER.cjs → chunk-A2PC3CBO.cjs} +28 -7
- package/dist/{chunk-XW4XB6P4.mjs → chunk-D7CAHL6J.mjs} +1 -1
- package/dist/{chunk-JJ37PCNR.mjs → chunk-EYCM7RVL.mjs} +28 -7
- package/dist/{chunk-K6DNX3YC.cjs → chunk-IQ7CB7BJ.cjs} +1581 -1232
- package/dist/{chunk-G67MARDL.mjs → chunk-LGSBK3BV.mjs} +258 -258
- package/dist/{chunk-I57SMSU6.mjs → chunk-LNPVKKR5.mjs} +28 -7
- package/dist/{chunk-RNUYMB73.mjs → chunk-N5ROEHEQ.mjs} +509 -160
- package/dist/{chunk-TIQWSSGI.mjs → chunk-RCEHCVLC.mjs} +1 -1
- package/dist/{chunk-3VIPI6IA.mjs → chunk-V33RUK4D.mjs} +5 -5
- package/dist/{chunk-6LCBTFNL.mjs → chunk-YNGMSNF4.mjs} +528 -159
- package/dist/docx/embedded.cjs +16 -7
- package/dist/docx/embedded.mjs +16 -7
- package/dist/docx/index.cjs +16 -7
- package/dist/docx/index.mjs +16 -7
- package/dist/docx/load/index.cjs +16 -7
- package/dist/docx/load/index.mjs +16 -7
- package/dist/index.cjs +16 -7
- package/dist/index.mjs +16 -7
- package/dist/opc/index.cjs +16 -7
- package/dist/opc/index.mjs +16 -7
- package/dist/opc/zip-limits.d.ts +8 -1
- package/dist/opc/zip-limits.d.ts.map +1 -1
- package/dist/pptx/automation/index.cjs +807 -418
- package/dist/pptx/automation/index.d.ts +4 -4
- package/dist/pptx/automation/index.mjs +6 -6
- package/dist/pptx/chunks/{index-D_d4NTVP.d.ts → index-0slnMhMO.d.ts} +126 -10
- package/dist/pptx/chunks/index-0slnMhMO.d.ts.map +1 -0
- package/dist/pptx/chunks/{index-CdRlUz-v.d.ts → index-DP-R2qY1.d.ts} +3 -3
- package/dist/pptx/chunks/{index-CdRlUz-v.d.ts.map → index-DP-R2qY1.d.ts.map} +1 -1
- package/dist/pptx/chunks/{index-lwMA6pP5.d.ts → index-OQwOyNYK.d.ts} +4 -4
- package/dist/pptx/chunks/{index-lwMA6pP5.d.ts.map → index-OQwOyNYK.d.ts.map} +1 -1
- package/dist/pptx/chunks/{text-operations-CNfUj45U.d.ts → text-operations-dyvh8gyE.d.ts} +23 -1
- package/dist/pptx/chunks/{text-operations-CNfUj45U.d.ts.map → text-operations-dyvh8gyE.d.ts.map} +1 -1
- package/dist/pptx/cli/index.cjs +632 -246
- package/dist/pptx/cli/index.d.ts +1 -1
- package/dist/pptx/cli/index.mjs +5 -5
- package/dist/pptx/converter/index.d.ts +1 -1
- package/dist/pptx/converter/index.mjs +3 -3
- package/dist/pptx/editor/render/find-replace.cjs +14 -14
- package/dist/pptx/editor/render/find-replace.d.ts +2 -2
- package/dist/pptx/editor/render/find-replace.mjs +1 -1
- package/dist/pptx/editor/render/slide-operations.cjs +8 -8
- package/dist/pptx/editor/render/slide-operations.mjs +2 -2
- package/dist/pptx/index.cjs +1047 -639
- package/dist/pptx/index.d.ts +5 -5
- package/dist/pptx/index.mjs +6 -6
- package/dist/pptx/node/index.d.ts +1 -1
- package/dist/pptx/signature-node/index.cjs +28 -7
- package/dist/pptx/signature-node/index.mjs +2 -2
- package/dist/visio/index.cjs +14 -6
- package/dist/visio/index.mjs +14 -6
- package/dist/visio/ui/index.cjs +14 -6
- package/dist/visio/ui/index.mjs +14 -6
- package/dist/xlsx/index.cjs +14 -6
- package/dist/xlsx/index.mjs +14 -6
- package/dist/xlsx/load/index.cjs +14 -6
- package/dist/xlsx/load/index.mjs +14 -6
- package/dist/xlsx/ui/index.cjs +14 -6
- package/dist/xlsx/ui/index.mjs +14 -6
- package/package.json +5 -5
- package/dist/PptxHandler-RETSKQ5E.mjs +0 -4
- package/dist/pptx/chunks/index-D_d4NTVP.d.ts.map +0 -1
package/dist/opc/index.cjs
CHANGED
|
@@ -504,11 +504,14 @@ var ZipLimitError = class extends Error {
|
|
|
504
504
|
limit;
|
|
505
505
|
/** The check that failed (absent when the error was built without one). */
|
|
506
506
|
kind;
|
|
507
|
+
/** The observed value, when known (a lower bound for a size found while inflating). */
|
|
508
|
+
actual;
|
|
507
509
|
constructor(message, details) {
|
|
508
510
|
super(message);
|
|
509
511
|
this.name = "ZipLimitError";
|
|
510
512
|
this.limit = details.limit;
|
|
511
513
|
this.kind = details.kind;
|
|
514
|
+
this.actual = details.actual;
|
|
512
515
|
}
|
|
513
516
|
};
|
|
514
517
|
var mib = (bytes) => Math.round(bytes / 1048576);
|
|
@@ -531,7 +534,7 @@ function resolveLimits(limits) {
|
|
|
531
534
|
maxEntryBytes: limits.maxEntryBytes ?? DEFAULT_ZIP_LIMITS.maxEntryBytes,
|
|
532
535
|
maxTotalBytes: limits.maxTotalBytes ?? DEFAULT_ZIP_LIMITS.maxTotalBytes,
|
|
533
536
|
label: limits.label ?? "ZIP",
|
|
534
|
-
fail: (message, limit, kind) => create ? create(message, { limit, kind }) : new ZipLimitError(message, { limit, kind })
|
|
537
|
+
fail: (message, limit, kind, actual) => create ? create(message, { limit, kind, actual }) : new ZipLimitError(message, { limit, kind, actual })
|
|
535
538
|
};
|
|
536
539
|
}
|
|
537
540
|
async function inflateEntryGuarded(entry, alreadyRead, limits) {
|
|
@@ -586,7 +589,8 @@ async function* streamEntryGuarded(entry, alreadyRead, limits) {
|
|
|
586
589
|
r.fail(
|
|
587
590
|
`${r.label} part ${entry.name} inflates past its declared size`,
|
|
588
591
|
r.maxEntryBytes,
|
|
589
|
-
size > declared ? "declaredSize" : "maxEntryBytes"
|
|
592
|
+
size > declared ? "declaredSize" : "maxEntryBytes",
|
|
593
|
+
size
|
|
590
594
|
)
|
|
591
595
|
);
|
|
592
596
|
if (alreadyRead + size > r.maxTotalBytes)
|
|
@@ -594,7 +598,8 @@ async function* streamEntryGuarded(entry, alreadyRead, limits) {
|
|
|
594
598
|
r.fail(
|
|
595
599
|
`${r.label} package exceeds the ${mib(r.maxTotalBytes)} MiB uncompressed content limit`,
|
|
596
600
|
r.maxTotalBytes,
|
|
597
|
-
"maxTotalBytes"
|
|
601
|
+
"maxTotalBytes",
|
|
602
|
+
alreadyRead + size
|
|
598
603
|
)
|
|
599
604
|
);
|
|
600
605
|
queue.push(chunk);
|
|
@@ -641,7 +646,8 @@ function guardZip(zip, limits = {}) {
|
|
|
641
646
|
throw r.fail(
|
|
642
647
|
`${r.label} package exceeds the ${r.maxEntries.toLocaleString("en-US")} part limit`,
|
|
643
648
|
r.maxEntries,
|
|
644
|
-
"maxEntries"
|
|
649
|
+
"maxEntries",
|
|
650
|
+
entries.length
|
|
645
651
|
);
|
|
646
652
|
let declared = 0;
|
|
647
653
|
for (const entry of entries) {
|
|
@@ -654,7 +660,8 @@ function guardZip(zip, limits = {}) {
|
|
|
654
660
|
throw r.fail(
|
|
655
661
|
`${r.label} part ${entry.name} exceeds the uncompressed part size limit`,
|
|
656
662
|
r.maxEntryBytes,
|
|
657
|
-
"maxEntryBytes"
|
|
663
|
+
"maxEntryBytes",
|
|
664
|
+
size
|
|
658
665
|
);
|
|
659
666
|
declared += size;
|
|
660
667
|
}
|
|
@@ -662,7 +669,8 @@ function guardZip(zip, limits = {}) {
|
|
|
662
669
|
throw r.fail(
|
|
663
670
|
`${r.label} package exceeds the ${mib(r.maxTotalBytes)} MiB uncompressed content limit`,
|
|
664
671
|
r.maxTotalBytes,
|
|
665
|
-
"maxTotalBytes"
|
|
672
|
+
"maxTotalBytes",
|
|
673
|
+
declared
|
|
666
674
|
);
|
|
667
675
|
const produced = /* @__PURE__ */ new Map();
|
|
668
676
|
let total = 0;
|
|
@@ -701,7 +709,8 @@ async function openZip(input, limits = {}) {
|
|
|
701
709
|
throw r.fail(
|
|
702
710
|
`${r.label} package exceeds the ${mib(maxInput)} MiB compressed input limit`,
|
|
703
711
|
maxInput,
|
|
704
|
-
"maxInputBytes"
|
|
712
|
+
"maxInputBytes",
|
|
713
|
+
bytes.byteLength
|
|
705
714
|
);
|
|
706
715
|
return guardZip(await JSZip__default.default.loadAsync(bytes), limits);
|
|
707
716
|
}
|
package/dist/opc/index.mjs
CHANGED
|
@@ -498,11 +498,14 @@ var ZipLimitError = class extends Error {
|
|
|
498
498
|
limit;
|
|
499
499
|
/** The check that failed (absent when the error was built without one). */
|
|
500
500
|
kind;
|
|
501
|
+
/** The observed value, when known (a lower bound for a size found while inflating). */
|
|
502
|
+
actual;
|
|
501
503
|
constructor(message, details) {
|
|
502
504
|
super(message);
|
|
503
505
|
this.name = "ZipLimitError";
|
|
504
506
|
this.limit = details.limit;
|
|
505
507
|
this.kind = details.kind;
|
|
508
|
+
this.actual = details.actual;
|
|
506
509
|
}
|
|
507
510
|
};
|
|
508
511
|
var mib = (bytes) => Math.round(bytes / 1048576);
|
|
@@ -525,7 +528,7 @@ function resolveLimits(limits) {
|
|
|
525
528
|
maxEntryBytes: limits.maxEntryBytes ?? DEFAULT_ZIP_LIMITS.maxEntryBytes,
|
|
526
529
|
maxTotalBytes: limits.maxTotalBytes ?? DEFAULT_ZIP_LIMITS.maxTotalBytes,
|
|
527
530
|
label: limits.label ?? "ZIP",
|
|
528
|
-
fail: (message, limit, kind) => create ? create(message, { limit, kind }) : new ZipLimitError(message, { limit, kind })
|
|
531
|
+
fail: (message, limit, kind, actual) => create ? create(message, { limit, kind, actual }) : new ZipLimitError(message, { limit, kind, actual })
|
|
529
532
|
};
|
|
530
533
|
}
|
|
531
534
|
async function inflateEntryGuarded(entry, alreadyRead, limits) {
|
|
@@ -580,7 +583,8 @@ async function* streamEntryGuarded(entry, alreadyRead, limits) {
|
|
|
580
583
|
r.fail(
|
|
581
584
|
`${r.label} part ${entry.name} inflates past its declared size`,
|
|
582
585
|
r.maxEntryBytes,
|
|
583
|
-
size > declared ? "declaredSize" : "maxEntryBytes"
|
|
586
|
+
size > declared ? "declaredSize" : "maxEntryBytes",
|
|
587
|
+
size
|
|
584
588
|
)
|
|
585
589
|
);
|
|
586
590
|
if (alreadyRead + size > r.maxTotalBytes)
|
|
@@ -588,7 +592,8 @@ async function* streamEntryGuarded(entry, alreadyRead, limits) {
|
|
|
588
592
|
r.fail(
|
|
589
593
|
`${r.label} package exceeds the ${mib(r.maxTotalBytes)} MiB uncompressed content limit`,
|
|
590
594
|
r.maxTotalBytes,
|
|
591
|
-
"maxTotalBytes"
|
|
595
|
+
"maxTotalBytes",
|
|
596
|
+
alreadyRead + size
|
|
592
597
|
)
|
|
593
598
|
);
|
|
594
599
|
queue.push(chunk);
|
|
@@ -635,7 +640,8 @@ function guardZip(zip, limits = {}) {
|
|
|
635
640
|
throw r.fail(
|
|
636
641
|
`${r.label} package exceeds the ${r.maxEntries.toLocaleString("en-US")} part limit`,
|
|
637
642
|
r.maxEntries,
|
|
638
|
-
"maxEntries"
|
|
643
|
+
"maxEntries",
|
|
644
|
+
entries.length
|
|
639
645
|
);
|
|
640
646
|
let declared = 0;
|
|
641
647
|
for (const entry of entries) {
|
|
@@ -648,7 +654,8 @@ function guardZip(zip, limits = {}) {
|
|
|
648
654
|
throw r.fail(
|
|
649
655
|
`${r.label} part ${entry.name} exceeds the uncompressed part size limit`,
|
|
650
656
|
r.maxEntryBytes,
|
|
651
|
-
"maxEntryBytes"
|
|
657
|
+
"maxEntryBytes",
|
|
658
|
+
size
|
|
652
659
|
);
|
|
653
660
|
declared += size;
|
|
654
661
|
}
|
|
@@ -656,7 +663,8 @@ function guardZip(zip, limits = {}) {
|
|
|
656
663
|
throw r.fail(
|
|
657
664
|
`${r.label} package exceeds the ${mib(r.maxTotalBytes)} MiB uncompressed content limit`,
|
|
658
665
|
r.maxTotalBytes,
|
|
659
|
-
"maxTotalBytes"
|
|
666
|
+
"maxTotalBytes",
|
|
667
|
+
declared
|
|
660
668
|
);
|
|
661
669
|
const produced = /* @__PURE__ */ new Map();
|
|
662
670
|
let total = 0;
|
|
@@ -695,7 +703,8 @@ async function openZip(input, limits = {}) {
|
|
|
695
703
|
throw r.fail(
|
|
696
704
|
`${r.label} package exceeds the ${mib(maxInput)} MiB compressed input limit`,
|
|
697
705
|
maxInput,
|
|
698
|
-
"maxInputBytes"
|
|
706
|
+
"maxInputBytes",
|
|
707
|
+
bytes.byteLength
|
|
699
708
|
);
|
|
700
709
|
return guardZip(await JSZip.loadAsync(bytes), limits);
|
|
701
710
|
}
|
package/dist/opc/zip-limits.d.ts
CHANGED
|
@@ -23,10 +23,14 @@ export interface ZipLimits {
|
|
|
23
23
|
maxTotalBytes?: number;
|
|
24
24
|
/** Format name used in error messages, such as `DOCX`. */
|
|
25
25
|
label?: string;
|
|
26
|
-
/**
|
|
26
|
+
/**
|
|
27
|
+
* Builds the error thrown on a violation; defaults to {@link ZipLimitError}. `actual` is the
|
|
28
|
+
* observed value when there is one (a lower bound for a size found while inflating).
|
|
29
|
+
*/
|
|
27
30
|
createError?: (message: string, details: {
|
|
28
31
|
limit: number;
|
|
29
32
|
kind: ZipLimitKind;
|
|
33
|
+
actual?: number | undefined;
|
|
30
34
|
}) => Error;
|
|
31
35
|
}
|
|
32
36
|
/** Thrown when a package breaks a size, entry-count or part-name limit. */
|
|
@@ -35,9 +39,12 @@ export declare class ZipLimitError extends Error {
|
|
|
35
39
|
readonly limit: number;
|
|
36
40
|
/** The check that failed (absent when the error was built without one). */
|
|
37
41
|
readonly kind: ZipLimitKind | undefined;
|
|
42
|
+
/** The observed value, when known (a lower bound for a size found while inflating). */
|
|
43
|
+
readonly actual: number | undefined;
|
|
38
44
|
constructor(message: string, details: {
|
|
39
45
|
limit: number;
|
|
40
46
|
kind?: ZipLimitKind;
|
|
47
|
+
actual?: number | undefined;
|
|
41
48
|
});
|
|
42
49
|
}
|
|
43
50
|
/** True when a zip entry name is a safe, relative part name (no traversal, drive or backslash). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zip-limits.d.ts","sourceRoot":"","sources":["../../opc/zip-limits.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,0DAA0D;AAC1D,eAAO,MAAM,kBAAkB;aAC9B,aAAa;aACb,UAAU,EAAE,KAAM;aAClB,aAAa;aACb,aAAa;CACJ,CAAC;AAEX;;;GAGG;AACH,MAAM,MAAM,YAAY,GACrB,eAAe,GACf,YAAY,GACZ,eAAe,GACf,eAAe,GACf,cAAc,GACd,UAAU,CAAC;AAEd,+EAA+E;AAC/E,MAAM,WAAW,SAAS;IACzB,mDAAmD;IACnD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,qCAAqC;IACrC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,0CAA0C;IAC1C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,mEAAmE;IACnE,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,0DAA0D;IAC1D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf
|
|
1
|
+
{"version":3,"file":"zip-limits.d.ts","sourceRoot":"","sources":["../../opc/zip-limits.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,0DAA0D;AAC1D,eAAO,MAAM,kBAAkB;aAC9B,aAAa;aACb,UAAU,EAAE,KAAM;aAClB,aAAa;aACb,aAAa;CACJ,CAA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