@silurus/ooxml 0.64.3 → 0.66.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 +6 -4
- package/dist/docx-DKCCH23H.js +3005 -0
- package/dist/docx.mjs +2 -2
- package/dist/index.mjs +3 -3
- package/dist/math.mjs +1 -1
- package/dist/pptx-GygKVlSS.js +2051 -0
- package/dist/pptx.mjs +2 -2
- package/dist/render-worker-host-4IbvpiUo.js +27 -0
- package/dist/render-worker-host-BUJvU02z.js +27 -0
- package/dist/render-worker-host-BdfGz_ou.js +27 -0
- package/dist/{src-Bq0uxZNP.js → src-LzMutzSd.js} +1975 -711
- package/dist/types/docx.d.ts +316 -7
- package/dist/types/index.d.ts +421 -11
- package/dist/types/pptx.d.ts +98 -4
- package/dist/types/xlsx.d.ts +1 -1
- package/dist/xlsx-CO8NBW79.js +4008 -0
- package/dist/xlsx.mjs +2 -2
- package/package.json +1 -1
- package/dist/docx-CjF9O42U.js +0 -2192
- package/dist/pptx-C0W9FWYJ.js +0 -2025
- package/dist/render-worker-host-2MxRtN0b.js +0 -27
- package/dist/render-worker-host-CPjQXxSa.js +0 -27
- package/dist/render-worker-host-DxJeyoZe.js +0 -27
- package/dist/xlsx-QYJaX8UA.js +0 -3994
- /package/dist/{mathjax-CNh-4Cw1.js → mathjax-Q1s8_eMq.js} +0 -0
package/dist/types/pptx.d.ts
CHANGED
|
@@ -45,7 +45,38 @@ export declare interface Bevel3d {
|
|
|
45
45
|
prst: string;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
/**
|
|
49
|
+
* Picture bullet — ECMA-376 §21.1.2.4.2 `<a:buBlip><a:blip r:embed>`. The
|
|
50
|
+
* embed is resolved to the blip's embedded zip path + mime at parse time
|
|
51
|
+
* (mirrors {@link ImageFill}); the renderer fetches the bytes lazily by path
|
|
52
|
+
* via the same `getCachedBitmap(imagePath, mimeType, fetchImage)` path used for
|
|
53
|
+
* `pic`/blipFill. PPTX-only: the shared core `Bullet` union (used by docx/xlsx,
|
|
54
|
+
* which have no picture bullets) does not carry this variant, so it lives on
|
|
55
|
+
* the PPTX side, exactly like {@link Paragraph} extends the core paragraph.
|
|
56
|
+
*/
|
|
57
|
+
export declare interface BlipBullet {
|
|
58
|
+
type: 'blip';
|
|
59
|
+
/** Embedded zip path of the bullet image (e.g. "ppt/media/image1.png"). */
|
|
60
|
+
imagePath: string;
|
|
61
|
+
/** MIME type of the blip at {@link BlipBullet.imagePath} (e.g. `image/png`). */
|
|
62
|
+
mimeType: string;
|
|
63
|
+
/**
|
|
64
|
+
* `<a:buSzPct val>` (ECMA-376 §21.1.2.4.3) as a percentage of the text size
|
|
65
|
+
* (100 = same size). `null` when no explicit `<a:buSzPct>` is present, in
|
|
66
|
+
* which case the renderer uses the spec default of 100%.
|
|
67
|
+
*/
|
|
68
|
+
sizePct: number | null;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* PPTX bullet marker. The shared core {@link CoreBullet} union
|
|
73
|
+
* (none/inherit/char/autoNum) plus the PPTX-only picture bullet
|
|
74
|
+
* ({@link BlipBullet}, §21.1.2.4.2). The parser emits the `blip` variant with
|
|
75
|
+
* `type: "blip"`, so this is a discriminated union just like the core one.
|
|
76
|
+
*/
|
|
77
|
+
export declare type Bullet = Bullet_2 | BlipBullet;
|
|
78
|
+
|
|
79
|
+
declare type Bullet_2 = {
|
|
49
80
|
type: 'none';
|
|
50
81
|
} | {
|
|
51
82
|
type: 'inherit';
|
|
@@ -213,6 +244,9 @@ export declare interface ChartElement {
|
|
|
213
244
|
/** `<c:chartSpace><c:spPr><a:ln@w>` border width in EMU. null = 1px hairline
|
|
214
245
|
* when a color is present. */
|
|
215
246
|
chartBorderWidthEmu?: number | null;
|
|
247
|
+
/** Secondary value axis for combo charts (bar + line with a right-hand
|
|
248
|
+
* axis). null/absent for the common single value-axis case. */
|
|
249
|
+
secondaryValAxis?: SecondaryValueAxis | null;
|
|
216
250
|
}
|
|
217
251
|
|
|
218
252
|
declare interface ChartErrBars {
|
|
@@ -427,6 +461,13 @@ export declare interface ChartModel {
|
|
|
427
461
|
* ("standard" — line, no fill). Only consulted for `chartType === "radar"`.
|
|
428
462
|
*/
|
|
429
463
|
radarStyle?: string | null;
|
|
464
|
+
/**
|
|
465
|
+
* Secondary value axis for combo charts (bar + line). When present, series
|
|
466
|
+
* with `useSecondaryAxis` are plotted against this axis's independent scale
|
|
467
|
+
* and the axis is drawn on the right edge of the plot. null/absent = single
|
|
468
|
+
* value axis (the common case). See {@link SecondaryValueAxis}.
|
|
469
|
+
*/
|
|
470
|
+
secondaryValAxis?: SecondaryValueAxis | null;
|
|
430
471
|
}
|
|
431
472
|
|
|
432
473
|
export declare interface ChartSeries {
|
|
@@ -456,10 +497,19 @@ export declare interface ChartSeries {
|
|
|
456
497
|
*/
|
|
457
498
|
labelColor?: string | null;
|
|
458
499
|
/**
|
|
459
|
-
* Mixed chart: per-series chart type override. Currently only "line" (XLSX
|
|
460
|
-
* is honoured; other values are treated as the
|
|
500
|
+
* Mixed chart: per-series chart type override. Currently only "line" (XLSX
|
|
501
|
+
* and PPTX combo charts) is honoured; other values are treated as the
|
|
502
|
+
* chart's primary type.
|
|
461
503
|
*/
|
|
462
504
|
seriesType?: string | null;
|
|
505
|
+
/**
|
|
506
|
+
* Combo chart: this series is plotted against the SECONDARY value axis
|
|
507
|
+
* (`ChartModel.secondaryValAxis`) — the `<c:valAx>` with `axPos="r"` /
|
|
508
|
+
* `<c:crosses val="max">`. When false/absent the series uses the primary
|
|
509
|
+
* (left) value-axis scale. PowerPoint's "Revenue vs. gross margin" combo
|
|
510
|
+
* (sample-14 slide-8) puts the margin line on a 0–100% secondary axis.
|
|
511
|
+
*/
|
|
512
|
+
useSecondaryAxis?: boolean | null;
|
|
463
513
|
/**
|
|
464
514
|
* Scatter-only X values (as strings). When null the series uses
|
|
465
515
|
* `ChartModel.categories` as X.
|
|
@@ -875,6 +925,13 @@ export declare interface NoFill {
|
|
|
875
925
|
* `eaLnBrk` flag that the pptx parser emits but the shared core model does not
|
|
876
926
|
* carry (docx/xlsx paragraphs don't surface it). Mirrors the Rust
|
|
877
927
|
* `Paragraph` struct's `ea_ln_brk` field 1:1.
|
|
928
|
+
*
|
|
929
|
+
* Note on `bullet`: the parser also emits the picture-bullet variant
|
|
930
|
+
* ({@link BlipBullet}, `type: "blip"`) at runtime, but `bullet` keeps the
|
|
931
|
+
* narrower core type here because a TS interface can only *narrow* an inherited
|
|
932
|
+
* property, not widen its union (the core `Paragraph.bullet` is used by
|
|
933
|
+
* docx/xlsx, which have no picture bullets). Consumers that need the picture
|
|
934
|
+
* variant narrow `bullet` with {@link asBullet} / a `type === 'blip'` check.
|
|
878
935
|
*/
|
|
879
936
|
export declare interface Paragraph extends Paragraph_2 {
|
|
880
937
|
/**
|
|
@@ -901,7 +958,7 @@ declare interface Paragraph_2 {
|
|
|
901
958
|
spaceLine: SpaceLine | null;
|
|
902
959
|
/** List nesting level (0–8) */
|
|
903
960
|
lvl: number;
|
|
904
|
-
bullet:
|
|
961
|
+
bullet: Bullet_2;
|
|
905
962
|
defFontSize: number | null;
|
|
906
963
|
defColor: string | null;
|
|
907
964
|
defBold: boolean | null;
|
|
@@ -1416,6 +1473,43 @@ export declare interface Scene3d {
|
|
|
1416
1473
|
lightRig?: LightRig;
|
|
1417
1474
|
}
|
|
1418
1475
|
|
|
1476
|
+
/**
|
|
1477
|
+
* A secondary value axis (combo charts). Mirrors the primary value-axis
|
|
1478
|
+
* properties but lives in its own object so the flat primary-axis fields stay
|
|
1479
|
+
* untouched. Parsed from the right-hand `<c:valAx>` (`axPos="r"`,
|
|
1480
|
+
* `<c:crosses val="max">`).
|
|
1481
|
+
*/
|
|
1482
|
+
declare interface SecondaryValueAxis {
|
|
1483
|
+
/** `<c:scaling><c:min val>`. null = derive from the series data. */
|
|
1484
|
+
min: number | null;
|
|
1485
|
+
/** `<c:scaling><c:max val>`. null = derive from the series data. */
|
|
1486
|
+
max: number | null;
|
|
1487
|
+
/** `<c:title>` plain text. null = no title. */
|
|
1488
|
+
title: string | null;
|
|
1489
|
+
/** `<c:delete val="1"/>` — hide labels/ticks entirely. */
|
|
1490
|
+
hidden: boolean;
|
|
1491
|
+
/** `<c:numFmt formatCode>` for tick labels. */
|
|
1492
|
+
formatCode?: string | null;
|
|
1493
|
+
/** `<c:txPr>…<a:solidFill>` tick-label color (hex without '#'). */
|
|
1494
|
+
fontColor?: string | null;
|
|
1495
|
+
/** `<c:txPr>` tick-label font size (hpt). */
|
|
1496
|
+
fontSizeHpt?: number | null;
|
|
1497
|
+
/** `<c:spPr><a:ln><a:solidFill>` axis-line color (hex without '#'). */
|
|
1498
|
+
lineColor?: string | null;
|
|
1499
|
+
/** `<c:spPr><a:ln w>` axis-line width in EMU. */
|
|
1500
|
+
lineWidthEmu?: number | null;
|
|
1501
|
+
/** `<c:spPr><a:ln><a:noFill>` — hide just the axis rule. */
|
|
1502
|
+
lineHidden: boolean;
|
|
1503
|
+
/** `<c:majorTickMark>` — "cross" (default) | "out" | "in" | "none". */
|
|
1504
|
+
majorTickMark: string;
|
|
1505
|
+
/** `<c:title>` run-prop font size (hpt). */
|
|
1506
|
+
titleFontSizeHpt?: number | null;
|
|
1507
|
+
/** `<c:title>` run-prop bold flag. */
|
|
1508
|
+
titleFontBold?: boolean | null;
|
|
1509
|
+
/** `<c:title>` run-prop color (hex without '#'). */
|
|
1510
|
+
titleFontColor?: string | null;
|
|
1511
|
+
}
|
|
1512
|
+
|
|
1419
1513
|
export declare interface Shadow {
|
|
1420
1514
|
color: string;
|
|
1421
1515
|
alpha: number;
|
package/dist/types/xlsx.d.ts
CHANGED
|
@@ -757,7 +757,7 @@ export declare interface RenderViewportOptions {
|
|
|
757
757
|
cellScale?: number;
|
|
758
758
|
/** Pre-decoded image sources keyed by their zip `imagePath` (for ImageAnchor
|
|
759
759
|
* and group-leaf image rendering). */
|
|
760
|
-
loadedImages?: Map<string, CanvasImageSource>;
|
|
760
|
+
loadedImages?: Map<string, CanvasImageSource | null>;
|
|
761
761
|
/** Fetch an embedded image's bytes by zip path, wrapped in a Blob of the given
|
|
762
762
|
* MIME (twin of pptx/docx `fetchImage`). The orchestrator decodes these into
|
|
763
763
|
* {@link loadedImages} before the synchronous draw. Supplied by
|