@silurus/ooxml 0.66.2 → 0.67.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/docx-ax5d8q4F.js +3166 -0
- package/dist/docx.mjs +2 -2
- package/dist/index.mjs +3 -3
- package/dist/pptx-10-ZMrrs.js +2066 -0
- package/dist/pptx.mjs +2 -2
- package/dist/render-worker-host-CX3eOOuv.js +27 -0
- package/dist/render-worker-host-CZjrumRh.js +27 -0
- package/dist/render-worker-host-DW2Upw5x.js +27 -0
- package/dist/{src-LzMutzSd.js → src-dTwJJJoi.js} +671 -582
- package/dist/types/docx.d.ts +16 -1
- package/dist/types/index.d.ts +46 -7
- package/dist/types/pptx.d.ts +8 -6
- package/dist/types/xlsx.d.ts +22 -0
- package/dist/xlsx-0MAip8l5.js +4128 -0
- package/dist/xlsx.mjs +2 -2
- package/package.json +1 -1
- package/dist/docx-DW_bVXxg.js +0 -3000
- package/dist/pptx-GygKVlSS.js +0 -2051
- package/dist/render-worker-host-4IbvpiUo.js +0 -27
- package/dist/render-worker-host-BdfGz_ou.js +0 -27
- package/dist/render-worker-host-D0ovEZj9.js +0 -27
- package/dist/xlsx-CO8NBW79.js +0 -4008
package/dist/types/docx.d.ts
CHANGED
|
@@ -46,11 +46,20 @@ export declare type BodyElement = {
|
|
|
46
46
|
* "continuous" (same page), "nextPage" (default; page break), "oddPage" /
|
|
47
47
|
* "evenPage" (page break + parity padding). The paginator switches its active
|
|
48
48
|
* newspaper-column geometry per section at each marker — fixing the regression
|
|
49
|
-
* where every section inherited the body-level section's columns.
|
|
49
|
+
* where every section inherited the body-level section's columns.
|
|
50
|
+
*
|
|
51
|
+
* `headers`/`footers` carry the ENDING section's resolved (§17.10.1-inherited)
|
|
52
|
+
* header/footer set, and `titlePage` its own `<w:titlePg>` flag, so the renderer
|
|
53
|
+
* can pick the active section's header/footer per page (mirroring how `columns`
|
|
54
|
+
* drives per-section column geometry). The body-level (final) section's sets
|
|
55
|
+
* live on {@link DocxDocumentModel.section}/`.headers`/`.footers` instead. */
|
|
50
56
|
| {
|
|
51
57
|
type: 'sectionBreak';
|
|
52
58
|
kind: 'continuous' | 'nextPage' | 'oddPage' | 'evenPage' | string;
|
|
53
59
|
columns?: ColumnsSpec | null;
|
|
60
|
+
headers?: HeadersFooters;
|
|
61
|
+
footers?: HeadersFooters;
|
|
62
|
+
titlePage?: boolean;
|
|
54
63
|
};
|
|
55
64
|
|
|
56
65
|
export declare interface BorderSpec {
|
|
@@ -1242,6 +1251,12 @@ export declare interface ShapeText {
|
|
|
1242
1251
|
* paragraphs. */
|
|
1243
1252
|
runs?: ShapeTextRun[];
|
|
1244
1253
|
alignment: string;
|
|
1254
|
+
/** ECMA-376 §17.3.1.33 `<w:spacing w:before>` of this text-box paragraph, in
|
|
1255
|
+
* pt — reserved ABOVE the paragraph inside the box. Absent/0 ⇒ no offset. */
|
|
1256
|
+
spaceBefore?: number;
|
|
1257
|
+
/** ECMA-376 §17.3.1.33 `<w:spacing w:after>` of this text-box paragraph, in
|
|
1258
|
+
* pt — reserved BELOW the paragraph. Absent/0 ⇒ no offset. */
|
|
1259
|
+
spaceAfter?: number;
|
|
1245
1260
|
/** Zip path of an inline image inside this text-box paragraph
|
|
1246
1261
|
* (`<w:drawing><wp:inline><a:blip r:embed>`), e.g. `word/media/image1.emf`.
|
|
1247
1262
|
* Absent for a text-only paragraph. */
|
package/dist/types/index.d.ts
CHANGED
|
@@ -91,11 +91,20 @@ declare type BodyElement = {
|
|
|
91
91
|
* "continuous" (same page), "nextPage" (default; page break), "oddPage" /
|
|
92
92
|
* "evenPage" (page break + parity padding). The paginator switches its active
|
|
93
93
|
* newspaper-column geometry per section at each marker — fixing the regression
|
|
94
|
-
* where every section inherited the body-level section's columns.
|
|
94
|
+
* where every section inherited the body-level section's columns.
|
|
95
|
+
*
|
|
96
|
+
* `headers`/`footers` carry the ENDING section's resolved (§17.10.1-inherited)
|
|
97
|
+
* header/footer set, and `titlePage` its own `<w:titlePg>` flag, so the renderer
|
|
98
|
+
* can pick the active section's header/footer per page (mirroring how `columns`
|
|
99
|
+
* drives per-section column geometry). The body-level (final) section's sets
|
|
100
|
+
* live on {@link DocxDocumentModel.section}/`.headers`/`.footers` instead. */
|
|
95
101
|
| {
|
|
96
102
|
type: 'sectionBreak';
|
|
97
103
|
kind: 'continuous' | 'nextPage' | 'oddPage' | 'evenPage' | string;
|
|
98
104
|
columns?: ColumnsSpec | null;
|
|
105
|
+
headers?: HeadersFooters;
|
|
106
|
+
footers?: HeadersFooters;
|
|
107
|
+
titlePage?: boolean;
|
|
99
108
|
};
|
|
100
109
|
|
|
101
110
|
declare interface Border {
|
|
@@ -1779,6 +1788,18 @@ declare interface ImageAnchor {
|
|
|
1779
1788
|
* svgBlip extension. Its MIME is always `image/svg+xml` and is owned by the
|
|
1780
1789
|
* SVG decoder. */
|
|
1781
1790
|
svgImagePath?: string;
|
|
1791
|
+
/** ECMA-376 §20.1.8.55 `<a:srcRect>` source-image crop. Each edge inset is a
|
|
1792
|
+
* fraction `0..1` of the source bitmap, measured inward, so the visible
|
|
1793
|
+
* source region is `[l, t, 1-r, 1-b]`. Absent (the common case) ⇒ the whole
|
|
1794
|
+
* blip fills the anchor rect; when present, the renderer draws only the
|
|
1795
|
+
* cropped sub-rectangle (raster only — a metafile is rasterized to the
|
|
1796
|
+
* display box, so its crop can't be honored faithfully and is skipped). */
|
|
1797
|
+
srcRect?: {
|
|
1798
|
+
l: number;
|
|
1799
|
+
t: number;
|
|
1800
|
+
r: number;
|
|
1801
|
+
b: number;
|
|
1802
|
+
};
|
|
1782
1803
|
}
|
|
1783
1804
|
|
|
1784
1805
|
/**
|
|
@@ -2539,14 +2560,16 @@ declare interface PictureElement {
|
|
|
2539
2560
|
*/
|
|
2540
2561
|
prstAdjust?: number[];
|
|
2541
2562
|
/**
|
|
2542
|
-
* ECMA-376 a:srcRect — source image crop as fractions (0..1) of the
|
|
2543
|
-
* width/height. Omitted when the image
|
|
2563
|
+
* ECMA-376 §20.1.8.55 a:srcRect — source image crop as fractions (0..1) of the
|
|
2564
|
+
* source width/height, measured inward from each edge. Omitted when the image
|
|
2565
|
+
* is not cropped; when present the parser emits all four edges (absent edges
|
|
2566
|
+
* default to 0), so the renderer reads them without a fallback.
|
|
2544
2567
|
*/
|
|
2545
2568
|
srcRect?: {
|
|
2546
|
-
l
|
|
2547
|
-
t
|
|
2548
|
-
r
|
|
2549
|
-
b
|
|
2569
|
+
l: number;
|
|
2570
|
+
t: number;
|
|
2571
|
+
r: number;
|
|
2572
|
+
b: number;
|
|
2550
2573
|
};
|
|
2551
2574
|
/** a:blip > a:alphaModFix@amt as 0..1. Undefined = fully opaque. */
|
|
2552
2575
|
alpha?: number;
|
|
@@ -3332,6 +3355,16 @@ declare type ShapeGeom = {
|
|
|
3332
3355
|
* when the picture carries no svgBlip extension. Its MIME is always
|
|
3333
3356
|
* `image/svg+xml` and is owned by the SVG decoder. */
|
|
3334
3357
|
svgImagePath?: string;
|
|
3358
|
+
/** ECMA-376 §20.1.8.55 `<a:srcRect>` source-image crop on the leaf pic
|
|
3359
|
+
* (fractions `0..1` inward from each edge; visible region `[l, t, 1-r,
|
|
3360
|
+
* 1-b]`). Absent ⇒ the whole blip fills the leaf rect. Honored identically
|
|
3361
|
+
* to the top-level {@link ImageAnchor.srcRect} (raster only). */
|
|
3362
|
+
srcRect?: {
|
|
3363
|
+
l: number;
|
|
3364
|
+
t: number;
|
|
3365
|
+
r: number;
|
|
3366
|
+
b: number;
|
|
3367
|
+
};
|
|
3335
3368
|
};
|
|
3336
3369
|
|
|
3337
3370
|
declare interface ShapeInfo {
|
|
@@ -3472,6 +3505,12 @@ declare interface ShapeText_2 {
|
|
|
3472
3505
|
* paragraphs. */
|
|
3473
3506
|
runs?: ShapeTextRun_2[];
|
|
3474
3507
|
alignment: string;
|
|
3508
|
+
/** ECMA-376 §17.3.1.33 `<w:spacing w:before>` of this text-box paragraph, in
|
|
3509
|
+
* pt — reserved ABOVE the paragraph inside the box. Absent/0 ⇒ no offset. */
|
|
3510
|
+
spaceBefore?: number;
|
|
3511
|
+
/** ECMA-376 §17.3.1.33 `<w:spacing w:after>` of this text-box paragraph, in
|
|
3512
|
+
* pt — reserved BELOW the paragraph. Absent/0 ⇒ no offset. */
|
|
3513
|
+
spaceAfter?: number;
|
|
3475
3514
|
/** Zip path of an inline image inside this text-box paragraph
|
|
3476
3515
|
* (`<w:drawing><wp:inline><a:blip r:embed>`), e.g. `word/media/image1.emf`.
|
|
3477
3516
|
* Absent for a text-only paragraph. */
|
package/dist/types/pptx.d.ts
CHANGED
|
@@ -1077,14 +1077,16 @@ export declare interface PictureElement {
|
|
|
1077
1077
|
*/
|
|
1078
1078
|
prstAdjust?: number[];
|
|
1079
1079
|
/**
|
|
1080
|
-
* ECMA-376 a:srcRect — source image crop as fractions (0..1) of the
|
|
1081
|
-
* width/height. Omitted when the image
|
|
1080
|
+
* ECMA-376 §20.1.8.55 a:srcRect — source image crop as fractions (0..1) of the
|
|
1081
|
+
* source width/height, measured inward from each edge. Omitted when the image
|
|
1082
|
+
* is not cropped; when present the parser emits all four edges (absent edges
|
|
1083
|
+
* default to 0), so the renderer reads them without a fallback.
|
|
1082
1084
|
*/
|
|
1083
1085
|
srcRect?: {
|
|
1084
|
-
l
|
|
1085
|
-
t
|
|
1086
|
-
r
|
|
1087
|
-
b
|
|
1086
|
+
l: number;
|
|
1087
|
+
t: number;
|
|
1088
|
+
r: number;
|
|
1089
|
+
b: number;
|
|
1088
1090
|
};
|
|
1089
1091
|
/** a:blip > a:alphaModFix@amt as 0..1. Undefined = fully opaque. */
|
|
1090
1092
|
alpha?: number;
|
package/dist/types/xlsx.d.ts
CHANGED
|
@@ -476,6 +476,18 @@ export declare interface ImageAnchor {
|
|
|
476
476
|
* svgBlip extension. Its MIME is always `image/svg+xml` and is owned by the
|
|
477
477
|
* SVG decoder. */
|
|
478
478
|
svgImagePath?: string;
|
|
479
|
+
/** ECMA-376 §20.1.8.55 `<a:srcRect>` source-image crop. Each edge inset is a
|
|
480
|
+
* fraction `0..1` of the source bitmap, measured inward, so the visible
|
|
481
|
+
* source region is `[l, t, 1-r, 1-b]`. Absent (the common case) ⇒ the whole
|
|
482
|
+
* blip fills the anchor rect; when present, the renderer draws only the
|
|
483
|
+
* cropped sub-rectangle (raster only — a metafile is rasterized to the
|
|
484
|
+
* display box, so its crop can't be honored faithfully and is skipped). */
|
|
485
|
+
srcRect?: {
|
|
486
|
+
l: number;
|
|
487
|
+
t: number;
|
|
488
|
+
r: number;
|
|
489
|
+
b: number;
|
|
490
|
+
};
|
|
479
491
|
}
|
|
480
492
|
|
|
481
493
|
export declare interface LegendManualLayout {
|
|
@@ -892,6 +904,16 @@ export declare type ShapeGeom = {
|
|
|
892
904
|
* when the picture carries no svgBlip extension. Its MIME is always
|
|
893
905
|
* `image/svg+xml` and is owned by the SVG decoder. */
|
|
894
906
|
svgImagePath?: string;
|
|
907
|
+
/** ECMA-376 §20.1.8.55 `<a:srcRect>` source-image crop on the leaf pic
|
|
908
|
+
* (fractions `0..1` inward from each edge; visible region `[l, t, 1-r,
|
|
909
|
+
* 1-b]`). Absent ⇒ the whole blip fills the leaf rect. Honored identically
|
|
910
|
+
* to the top-level {@link ImageAnchor.srcRect} (raster only). */
|
|
911
|
+
srcRect?: {
|
|
912
|
+
l: number;
|
|
913
|
+
t: number;
|
|
914
|
+
r: number;
|
|
915
|
+
b: number;
|
|
916
|
+
};
|
|
895
917
|
};
|
|
896
918
|
|
|
897
919
|
export declare interface ShapeInfo {
|