@silurus/ooxml 0.35.0 → 0.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -1
- package/dist/docx-BV9DuQ9z.cjs +1 -0
- package/dist/docx-DIFtUzAi.js +1137 -0
- package/dist/docx.cjs +1 -1
- package/dist/docx.mjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +3 -3
- package/dist/pptx-CzgfHii0.js +23305 -0
- package/dist/pptx-gWByFXpk.cjs +1 -0
- package/dist/pptx.cjs +1 -1
- package/dist/pptx.mjs +1 -1
- package/dist/types/docx.d.ts +9 -2
- package/dist/types/index.d.ts +44 -6
- package/dist/types/pptx.d.ts +18 -2
- package/dist/types/xlsx.d.ts +17 -2
- package/dist/xlsx-B_G9RPNS.cjs +11 -0
- package/dist/xlsx-g-Drk5UM.js +3172 -0
- package/dist/xlsx.cjs +1 -1
- package/dist/xlsx.mjs +1 -1
- package/package.json +1 -1
- package/dist/docx-BSqY4T0s.js +0 -1133
- package/dist/docx-CxZXjtTA.cjs +0 -1
- package/dist/pptx-CLc84h6v.cjs +0 -1
- package/dist/pptx-DdpPwDWz.js +0 -23301
- package/dist/xlsx-BlpzIqe6.cjs +0 -11
- package/dist/xlsx-Cnu9YR5Z.js +0 -3166
package/dist/pptx.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./autoResize-C6N7p_Or.cjs`),t=require(`./pptx-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./autoResize-C6N7p_Or.cjs`),t=require(`./pptx-gWByFXpk.cjs`);exports.PptxPresentation=t.r,exports.PptxViewer=t.n,exports.autoResize=e.t,exports.renderSlide=t.i;
|
package/dist/pptx.mjs
CHANGED
package/dist/types/docx.d.ts
CHANGED
|
@@ -336,9 +336,16 @@ declare interface LineSpacing {
|
|
|
336
336
|
explicit?: boolean;
|
|
337
337
|
}
|
|
338
338
|
|
|
339
|
-
/** Options for {@link DocxDocument.load}.
|
|
339
|
+
/** Options for {@link DocxDocument.load}. Extends the shared
|
|
340
340
|
* `LoadOptions` shape from `@silurus/ooxml-core`. */
|
|
341
|
-
export declare
|
|
341
|
+
export declare interface LoadOptions extends LoadOptions_2 {
|
|
342
|
+
/**
|
|
343
|
+
* Override the per-entry ZIP decompression cap (bytes) used by the
|
|
344
|
+
* zip-bomb guard in the Rust parser. Defaults to 512 MiB. Zero / negative
|
|
345
|
+
* values fall back to the default.
|
|
346
|
+
*/
|
|
347
|
+
maxZipEntryBytes?: number;
|
|
348
|
+
}
|
|
342
349
|
|
|
343
350
|
/**
|
|
344
351
|
* Common load-time options shared by the docx / pptx / xlsx viewer
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1028,9 +1028,18 @@ declare interface LineSpacing {
|
|
|
1028
1028
|
explicit?: boolean;
|
|
1029
1029
|
}
|
|
1030
1030
|
|
|
1031
|
-
/** Options for {@link PptxPresentation.load}.
|
|
1031
|
+
/** Options for {@link PptxPresentation.load}. Extends the shared
|
|
1032
1032
|
* `LoadOptions` shape from `@silurus/ooxml-core`. */
|
|
1033
|
-
declare
|
|
1033
|
+
declare interface LoadOptions extends LoadOptions_2 {
|
|
1034
|
+
/**
|
|
1035
|
+
* Override the per-entry ZIP decompression cap (bytes). Defaults to
|
|
1036
|
+
* 512 MiB — matches `MAX_ZIP_ENTRY_BYTES` in the Rust parser. Raising
|
|
1037
|
+
* this past 4 GiB requires a 64-bit WASM build; lowering it makes the
|
|
1038
|
+
* loader reject otherwise-legitimate large media decks. Zero or
|
|
1039
|
+
* negative values fall back to the default.
|
|
1040
|
+
*/
|
|
1041
|
+
maxZipEntryBytes?: number;
|
|
1042
|
+
}
|
|
1034
1043
|
|
|
1035
1044
|
/**
|
|
1036
1045
|
* Common load-time options shared by the docx / pptx / xlsx viewer
|
|
@@ -1054,13 +1063,28 @@ declare interface LoadOptions_2 {
|
|
|
1054
1063
|
useGoogleFonts?: boolean;
|
|
1055
1064
|
}
|
|
1056
1065
|
|
|
1057
|
-
/** Options for {@link XlsxWorkbook.load}.
|
|
1066
|
+
/** Options for {@link XlsxWorkbook.load}. Extends the shared
|
|
1058
1067
|
* `LoadOptions` shape from `@silurus/ooxml-core`. */
|
|
1059
|
-
declare
|
|
1068
|
+
declare interface LoadOptions_3 extends LoadOptions_2 {
|
|
1069
|
+
/**
|
|
1070
|
+
* Override the per-entry ZIP decompression cap (bytes) used by the
|
|
1071
|
+
* zip-bomb guard in the Rust parser. Defaults to 512 MiB. Applies to both
|
|
1072
|
+
* the initial workbook parse and per-sheet parse. Zero / negative values
|
|
1073
|
+
* fall back to the default.
|
|
1074
|
+
*/
|
|
1075
|
+
maxZipEntryBytes?: number;
|
|
1076
|
+
}
|
|
1060
1077
|
|
|
1061
|
-
/** Options for {@link DocxDocument.load}.
|
|
1078
|
+
/** Options for {@link DocxDocument.load}. Extends the shared
|
|
1062
1079
|
* `LoadOptions` shape from `@silurus/ooxml-core`. */
|
|
1063
|
-
declare
|
|
1080
|
+
declare interface LoadOptions_4 extends LoadOptions_2 {
|
|
1081
|
+
/**
|
|
1082
|
+
* Override the per-entry ZIP decompression cap (bytes) used by the
|
|
1083
|
+
* zip-bomb guard in the Rust parser. Defaults to 512 MiB. Zero / negative
|
|
1084
|
+
* values fall back to the default.
|
|
1085
|
+
*/
|
|
1086
|
+
maxZipEntryBytes?: number;
|
|
1087
|
+
}
|
|
1064
1088
|
|
|
1065
1089
|
declare interface ManualLayout {
|
|
1066
1090
|
xMode: string;
|
|
@@ -1440,6 +1464,13 @@ declare interface PptxViewerOptions extends RenderOptions {
|
|
|
1440
1464
|
* default — see {@link PptxPresentation.load} for privacy implications.
|
|
1441
1465
|
*/
|
|
1442
1466
|
useGoogleFonts?: boolean;
|
|
1467
|
+
/**
|
|
1468
|
+
* Override the per-entry ZIP decompression cap (bytes) used by the zip-bomb
|
|
1469
|
+
* guard in the Rust parser. Defaults to 512 MiB. Raise this to load decks
|
|
1470
|
+
* with very large embedded media, or lower it to tighten the budget for
|
|
1471
|
+
* untrusted input. Zero / negative values fall back to the default.
|
|
1472
|
+
*/
|
|
1473
|
+
maxZipEntryBytes?: number;
|
|
1443
1474
|
/**
|
|
1444
1475
|
* Enable interactive audio/video playback. When true, slides are rendered
|
|
1445
1476
|
* via {@link PptxPresentation.presentSlide} so media elements become
|
|
@@ -2518,6 +2549,12 @@ declare interface XlsxViewerOptions {
|
|
|
2518
2549
|
* privacy implications.
|
|
2519
2550
|
*/
|
|
2520
2551
|
useGoogleFonts?: boolean;
|
|
2552
|
+
/**
|
|
2553
|
+
* Override the per-entry ZIP decompression cap (bytes) used by the
|
|
2554
|
+
* zip-bomb guard in the Rust parser. Defaults to 512 MiB. Zero / negative
|
|
2555
|
+
* values fall back to the default.
|
|
2556
|
+
*/
|
|
2557
|
+
maxZipEntryBytes?: number;
|
|
2521
2558
|
}
|
|
2522
2559
|
|
|
2523
2560
|
declare class XlsxWorkbook {
|
|
@@ -2527,6 +2564,7 @@ declare class XlsxWorkbook {
|
|
|
2527
2564
|
/** Cache of loaded images keyed by their data URL. Shared across sheets. */
|
|
2528
2565
|
private imageCache;
|
|
2529
2566
|
private rawData;
|
|
2567
|
+
private maxZipEntryBytes;
|
|
2530
2568
|
constructor();
|
|
2531
2569
|
load(source: string | ArrayBuffer, opts?: LoadOptions_3): Promise<void>;
|
|
2532
2570
|
get sheetNames(): string[];
|
package/dist/types/pptx.d.ts
CHANGED
|
@@ -301,9 +301,18 @@ export declare interface LineBreak {
|
|
|
301
301
|
type: 'break';
|
|
302
302
|
}
|
|
303
303
|
|
|
304
|
-
/** Options for {@link PptxPresentation.load}.
|
|
304
|
+
/** Options for {@link PptxPresentation.load}. Extends the shared
|
|
305
305
|
* `LoadOptions` shape from `@silurus/ooxml-core`. */
|
|
306
|
-
export declare
|
|
306
|
+
export declare interface LoadOptions extends LoadOptions_2 {
|
|
307
|
+
/**
|
|
308
|
+
* Override the per-entry ZIP decompression cap (bytes). Defaults to
|
|
309
|
+
* 512 MiB — matches `MAX_ZIP_ENTRY_BYTES` in the Rust parser. Raising
|
|
310
|
+
* this past 4 GiB requires a 64-bit WASM build; lowering it makes the
|
|
311
|
+
* loader reject otherwise-legitimate large media decks. Zero or
|
|
312
|
+
* negative values fall back to the default.
|
|
313
|
+
*/
|
|
314
|
+
maxZipEntryBytes?: number;
|
|
315
|
+
}
|
|
307
316
|
|
|
308
317
|
/**
|
|
309
318
|
* Common load-time options shared by the docx / pptx / xlsx viewer
|
|
@@ -554,6 +563,13 @@ export declare interface PptxViewerOptions extends RenderOptions {
|
|
|
554
563
|
* default — see {@link PptxPresentation.load} for privacy implications.
|
|
555
564
|
*/
|
|
556
565
|
useGoogleFonts?: boolean;
|
|
566
|
+
/**
|
|
567
|
+
* Override the per-entry ZIP decompression cap (bytes) used by the zip-bomb
|
|
568
|
+
* guard in the Rust parser. Defaults to 512 MiB. Raise this to load decks
|
|
569
|
+
* with very large embedded media, or lower it to tighten the budget for
|
|
570
|
+
* untrusted input. Zero / negative values fall back to the default.
|
|
571
|
+
*/
|
|
572
|
+
maxZipEntryBytes?: number;
|
|
557
573
|
/**
|
|
558
574
|
* Enable interactive audio/video playback. When true, slides are rendered
|
|
559
575
|
* via {@link PptxPresentation.presentSlide} so media elements become
|
package/dist/types/xlsx.d.ts
CHANGED
|
@@ -414,9 +414,17 @@ declare interface LegendManualLayout {
|
|
|
414
414
|
h: number;
|
|
415
415
|
}
|
|
416
416
|
|
|
417
|
-
/** Options for {@link XlsxWorkbook.load}.
|
|
417
|
+
/** Options for {@link XlsxWorkbook.load}. Extends the shared
|
|
418
418
|
* `LoadOptions` shape from `@silurus/ooxml-core`. */
|
|
419
|
-
declare
|
|
419
|
+
declare interface LoadOptions extends LoadOptions_2 {
|
|
420
|
+
/**
|
|
421
|
+
* Override the per-entry ZIP decompression cap (bytes) used by the
|
|
422
|
+
* zip-bomb guard in the Rust parser. Defaults to 512 MiB. Applies to both
|
|
423
|
+
* the initial workbook parse and per-sheet parse. Zero / negative values
|
|
424
|
+
* fall back to the default.
|
|
425
|
+
*/
|
|
426
|
+
maxZipEntryBytes?: number;
|
|
427
|
+
}
|
|
420
428
|
|
|
421
429
|
/**
|
|
422
430
|
* Common load-time options shared by the docx / pptx / xlsx viewer
|
|
@@ -972,6 +980,12 @@ export declare interface XlsxViewerOptions {
|
|
|
972
980
|
* privacy implications.
|
|
973
981
|
*/
|
|
974
982
|
useGoogleFonts?: boolean;
|
|
983
|
+
/**
|
|
984
|
+
* Override the per-entry ZIP decompression cap (bytes) used by the
|
|
985
|
+
* zip-bomb guard in the Rust parser. Defaults to 512 MiB. Zero / negative
|
|
986
|
+
* values fall back to the default.
|
|
987
|
+
*/
|
|
988
|
+
maxZipEntryBytes?: number;
|
|
975
989
|
}
|
|
976
990
|
|
|
977
991
|
export declare class XlsxWorkbook {
|
|
@@ -981,6 +995,7 @@ export declare class XlsxWorkbook {
|
|
|
981
995
|
/** Cache of loaded images keyed by their data URL. Shared across sheets. */
|
|
982
996
|
private imageCache;
|
|
983
997
|
private rawData;
|
|
998
|
+
private maxZipEntryBytes;
|
|
984
999
|
constructor();
|
|
985
1000
|
load(source: string | ArrayBuffer, opts?: LoadOptions): Promise<void>;
|
|
986
1001
|
get sheetNames(): string[];
|