@silurus/ooxml 0.72.0 → 0.72.2
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-BPF-eH0O.js → docx-wLLJuetI.js} +2646 -2175
- package/dist/docx.mjs +2 -2
- package/dist/docx_parser_bg.wasm +0 -0
- package/dist/{find-cursor-DTrEBxjE.js → find-cursor-DBifiZop.js} +949 -923
- package/dist/{highlight-rect-B--cPQOV.js → highlight-rect-DTgfiJgA.js} +1 -1
- package/dist/index.mjs +3 -3
- package/dist/{pptx-BMxDfEYI.js → pptx-D3L4FQfI.js} +113 -107
- package/dist/pptx.mjs +2 -2
- package/dist/pptx_parser_bg.wasm +0 -0
- package/dist/render-worker-host-B5esxBj-.js +27 -0
- package/dist/render-worker-host-BzhGwe0I.js +27 -0
- package/dist/render-worker-host-Cg60RAG_.js +27 -0
- package/dist/{segments-Da-soh2U.js → segments--0hIQLXB.js} +1 -1
- package/dist/types/docx.d.ts +30 -0
- package/dist/types/index.d.ts +45 -0
- package/dist/types/pptx.d.ts +11 -0
- package/dist/types/xlsx.d.ts +3 -0
- package/dist/{visible-index-5hdq_oAL.js → visible-index-DSN5XPnm.js} +1 -1
- package/dist/{xlsx-bwQD8c1Q.js → xlsx-BWEqRZ25.js} +344 -337
- package/dist/xlsx.mjs +2 -2
- package/dist/xlsx_parser_bg.wasm +0 -0
- package/package.json +1 -1
- package/dist/render-worker-host-DL_kkykF.js +0 -27
- package/dist/render-worker-host-S0HOWgs0.js +0 -27
- package/dist/render-worker-host-l8yqDUfE.js +0 -27
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { V as e } from "./find-cursor-
|
|
1
|
+
import { V as e } from "./find-cursor-DBifiZop.js";
|
|
2
2
|
//#region packages/core/src/text/bidi/segments.ts
|
|
3
3
|
function t(t, n) {
|
|
4
4
|
return t === !0 ? "rtl" : t === !1 ? "ltr" : e().computeLevels(n, "auto").paragraphLevel === 1 ? "rtl" : "ltr";
|
package/dist/types/docx.d.ts
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
/** Resolved formatting of the WordprocessingML anchor character that hosts a
|
|
2
|
+
* floating drawing. The drawing has zero inline advance, but these metrics still
|
|
3
|
+
* participate in the containing line's height and document-grid allocation. */
|
|
4
|
+
export declare interface AnchorHostMetrics {
|
|
5
|
+
/** Effective `<w:sz>` in points. */
|
|
6
|
+
fontSize: number;
|
|
7
|
+
/** Resolved ascii/hAnsi font face. */
|
|
8
|
+
fontFamily?: string | null;
|
|
9
|
+
/** Resolved East Asian font face, retained for Far East line metrics. */
|
|
10
|
+
fontFamilyEastAsia?: string | null;
|
|
11
|
+
bold?: boolean;
|
|
12
|
+
italic?: boolean;
|
|
13
|
+
}
|
|
14
|
+
|
|
1
15
|
/**
|
|
2
16
|
* Observe an element's size and invoke a render callback, coalescing bursts to
|
|
3
17
|
* one call per animation frame and serializing overlapping async renders.
|
|
@@ -1115,6 +1129,8 @@ export declare interface DocRevision {
|
|
|
1115
1129
|
export declare type DocRun = {
|
|
1116
1130
|
type: 'text';
|
|
1117
1131
|
} & DocxTextRun | {
|
|
1132
|
+
type: 'anchorHost';
|
|
1133
|
+
} & AnchorHostMetrics | {
|
|
1118
1134
|
type: 'image';
|
|
1119
1135
|
} & ImageRun | {
|
|
1120
1136
|
type: 'chart';
|
|
@@ -1241,6 +1257,12 @@ export declare interface DocTableCell {
|
|
|
1241
1257
|
|
|
1242
1258
|
export declare interface DocTableRow {
|
|
1243
1259
|
cells: DocTableCell[];
|
|
1260
|
+
/** ECMA-376 §17.4.15 `<w:gridBefore>` — shared table-grid columns skipped
|
|
1261
|
+
* before placing this row's first real cell. Omitted/zero means none. */
|
|
1262
|
+
gridBefore?: number;
|
|
1263
|
+
/** ECMA-376 §17.4.14 `<w:gridAfter>` — shared table-grid columns skipped
|
|
1264
|
+
* after this row's last real cell. Omitted/zero means none. */
|
|
1265
|
+
gridAfter?: number;
|
|
1244
1266
|
rowHeight: number | null;
|
|
1245
1267
|
/** ECMA-376 §17.4.80 hRule. "auto" (default) = informational; "atLeast" =
|
|
1246
1268
|
* lower bound; "exact" = fixed clip. */
|
|
@@ -1276,6 +1298,8 @@ export declare class DocxDocument {
|
|
|
1276
1298
|
* shared FontFaceSet for the lifetime of the SPA (deduped + refcounted in core,
|
|
1277
1299
|
* so a web font shared with another open document survives until both go). */
|
|
1278
1300
|
private _googleFontFaces;
|
|
1301
|
+
/** Exact local faces used for version-adaptive Office line metrics. */
|
|
1302
|
+
private _localMetricFontFaces;
|
|
1279
1303
|
/** One stable closure per instance: core's path-keyed SVG cache namespaces on
|
|
1280
1304
|
* this identity, so two open documents never swap a shared zip path (e.g.
|
|
1281
1305
|
* word/media/image1.svg). Reusing one reference also lets the SVG cache hit
|
|
@@ -2742,6 +2766,10 @@ export declare interface ImageRun {
|
|
|
2742
2766
|
} | null;
|
|
2743
2767
|
widthPt: number;
|
|
2744
2768
|
heightPt: number;
|
|
2769
|
+
/** Effective DrawingML transform for grouped pictures. */
|
|
2770
|
+
rotation?: number;
|
|
2771
|
+
flipH?: boolean;
|
|
2772
|
+
flipV?: boolean;
|
|
2745
2773
|
/** true = wp:anchor (absolute positioned), false/undefined = wp:inline (flows with text) */
|
|
2746
2774
|
anchor?: boolean;
|
|
2747
2775
|
/** X offset in pt (anchor only) */
|
|
@@ -3690,6 +3718,8 @@ export declare interface ShapeRun {
|
|
|
3690
3718
|
strokeWidth?: number;
|
|
3691
3719
|
/** `<a:ln><a:prstDash val>` — ECMA-376 §20.1.8.48. Absent = solid. */
|
|
3692
3720
|
strokeDash?: string | null;
|
|
3721
|
+
/** Normalized line cap: `butt` | `round` | `square`. */
|
|
3722
|
+
strokeCap?: CanvasLineCap | null;
|
|
3693
3723
|
/** `<a:ln><a:headEnd>` line-start decoration (ECMA-376 §20.1.8.3). */
|
|
3694
3724
|
headEnd?: LineEnd | null;
|
|
3695
3725
|
/** `<a:ln><a:tailEnd>` line-end decoration (ECMA-376 §20.1.8.3). */
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
/** Resolved formatting of the WordprocessingML anchor character that hosts a
|
|
2
|
+
* floating drawing. The drawing has zero inline advance, but these metrics still
|
|
3
|
+
* participate in the containing line's height and document-grid allocation. */
|
|
4
|
+
declare interface AnchorHostMetrics {
|
|
5
|
+
/** Effective `<w:sz>` in points. */
|
|
6
|
+
fontSize: number;
|
|
7
|
+
/** Resolved ascii/hAnsi font face. */
|
|
8
|
+
fontFamily?: string | null;
|
|
9
|
+
/** Resolved East Asian font face, retained for Far East line metrics. */
|
|
10
|
+
fontFamilyEastAsia?: string | null;
|
|
11
|
+
bold?: boolean;
|
|
12
|
+
italic?: boolean;
|
|
13
|
+
}
|
|
14
|
+
|
|
1
15
|
declare interface ArrowEnd {
|
|
2
16
|
/** OOXML type: "none" | "triangle" | "stealth" | "diamond" | "oval" | "arrow" */
|
|
3
17
|
type: string;
|
|
@@ -619,6 +633,9 @@ declare interface ChartElement {
|
|
|
619
633
|
y: number;
|
|
620
634
|
width: number;
|
|
621
635
|
height: number;
|
|
636
|
+
rotation: number;
|
|
637
|
+
flipH: boolean;
|
|
638
|
+
flipV: boolean;
|
|
622
639
|
/**
|
|
623
640
|
* The chart payload, already in the canonical {@link ChartModel} shape emitted
|
|
624
641
|
* by the Rust parser (`ooxml_common::chart::ChartModel`). Passed straight to
|
|
@@ -1563,6 +1580,8 @@ declare interface DocRevision {
|
|
|
1563
1580
|
declare type DocRun = {
|
|
1564
1581
|
type: 'text';
|
|
1565
1582
|
} & DocxTextRun | {
|
|
1583
|
+
type: 'anchorHost';
|
|
1584
|
+
} & AnchorHostMetrics | {
|
|
1566
1585
|
type: 'image';
|
|
1567
1586
|
} & ImageRun | {
|
|
1568
1587
|
type: 'chart';
|
|
@@ -1689,6 +1708,12 @@ declare interface DocTableCell {
|
|
|
1689
1708
|
|
|
1690
1709
|
declare interface DocTableRow {
|
|
1691
1710
|
cells: DocTableCell[];
|
|
1711
|
+
/** ECMA-376 §17.4.15 `<w:gridBefore>` — shared table-grid columns skipped
|
|
1712
|
+
* before placing this row's first real cell. Omitted/zero means none. */
|
|
1713
|
+
gridBefore?: number;
|
|
1714
|
+
/** ECMA-376 §17.4.14 `<w:gridAfter>` — shared table-grid columns skipped
|
|
1715
|
+
* after this row's last real cell. Omitted/zero means none. */
|
|
1716
|
+
gridAfter?: number;
|
|
1692
1717
|
rowHeight: number | null;
|
|
1693
1718
|
/** ECMA-376 §17.4.80 hRule. "auto" (default) = informational; "atLeast" =
|
|
1694
1719
|
* lower bound; "exact" = fixed clip. */
|
|
@@ -1745,6 +1770,7 @@ export declare namespace docx {
|
|
|
1745
1770
|
FieldRun,
|
|
1746
1771
|
ImageRun,
|
|
1747
1772
|
ChartRun,
|
|
1773
|
+
AnchorHostMetrics,
|
|
1748
1774
|
ShapeRun,
|
|
1749
1775
|
TextPath,
|
|
1750
1776
|
ShapeText_2 as ShapeText,
|
|
@@ -1802,6 +1828,8 @@ declare class DocxDocument {
|
|
|
1802
1828
|
* shared FontFaceSet for the lifetime of the SPA (deduped + refcounted in core,
|
|
1803
1829
|
* so a web font shared with another open document survives until both go). */
|
|
1804
1830
|
private _googleFontFaces;
|
|
1831
|
+
/** Exact local faces used for version-adaptive Office line metrics. */
|
|
1832
|
+
private _localMetricFontFaces;
|
|
1805
1833
|
/** One stable closure per instance: core's path-keyed SVG cache namespaces on
|
|
1806
1834
|
* this identity, so two open documents never swap a shared zip path (e.g.
|
|
1807
1835
|
* word/media/image1.svg). Reusing one reference also lets the SVG cache hit
|
|
@@ -3480,6 +3508,10 @@ declare interface ImageRun {
|
|
|
3480
3508
|
} | null;
|
|
3481
3509
|
widthPt: number;
|
|
3482
3510
|
heightPt: number;
|
|
3511
|
+
/** Effective DrawingML transform for grouped pictures. */
|
|
3512
|
+
rotation?: number;
|
|
3513
|
+
flipH?: boolean;
|
|
3514
|
+
flipV?: boolean;
|
|
3483
3515
|
/** true = wp:anchor (absolute positioned), false/undefined = wp:inline (flows with text) */
|
|
3484
3516
|
anchor?: boolean;
|
|
3485
3517
|
/** X offset in pt (anchor only) */
|
|
@@ -3979,6 +4011,9 @@ declare interface MediaElement {
|
|
|
3979
4011
|
y: number;
|
|
3980
4012
|
width: number;
|
|
3981
4013
|
height: number;
|
|
4014
|
+
rotation: number;
|
|
4015
|
+
flipH: boolean;
|
|
4016
|
+
flipV: boolean;
|
|
3982
4017
|
/** "audio" or "video" */
|
|
3983
4018
|
mediaKind: 'audio' | 'video';
|
|
3984
4019
|
/** Poster image zip path (e.g. "ppt/media/image2.png"). Empty when no poster. */
|
|
@@ -6405,6 +6440,9 @@ declare interface ShapeInfo {
|
|
|
6405
6440
|
h: number;
|
|
6406
6441
|
/** Rotation in degrees, clockwise. */
|
|
6407
6442
|
rot: number;
|
|
6443
|
+
/** Effective DrawingML reflection after composing parent groups. */
|
|
6444
|
+
flipH?: boolean;
|
|
6445
|
+
flipV?: boolean;
|
|
6408
6446
|
fillColor?: string;
|
|
6409
6447
|
strokeColor?: string;
|
|
6410
6448
|
/** Stroke width in EMU. 0 = no stroke. */
|
|
@@ -6496,6 +6534,8 @@ declare interface ShapeRun {
|
|
|
6496
6534
|
strokeWidth?: number;
|
|
6497
6535
|
/** `<a:ln><a:prstDash val>` — ECMA-376 §20.1.8.48. Absent = solid. */
|
|
6498
6536
|
strokeDash?: string | null;
|
|
6537
|
+
/** Normalized line cap: `butt` | `round` | `square`. */
|
|
6538
|
+
strokeCap?: CanvasLineCap | null;
|
|
6499
6539
|
/** `<a:ln><a:headEnd>` line-start decoration (ECMA-376 §20.1.8.3). */
|
|
6500
6540
|
headEnd?: LineEnd | null;
|
|
6501
6541
|
/** `<a:ln><a:tailEnd>` line-end decoration (ECMA-376 §20.1.8.3). */
|
|
@@ -6930,6 +6970,8 @@ declare interface Stroke {
|
|
|
6930
6970
|
width: number;
|
|
6931
6971
|
/** OOXML prstDash value: "dash", "dot", "dashDot", "lgDash", "lgDashDot", etc. */
|
|
6932
6972
|
dashStyle?: string;
|
|
6973
|
+
/** Canvas line cap normalized from DrawingML/VML (`flat` → `butt`). */
|
|
6974
|
+
lineCap?: CanvasLineCap;
|
|
6933
6975
|
/** Arrow head at the start of the line */
|
|
6934
6976
|
headEnd?: ArrowEnd;
|
|
6935
6977
|
/** Arrow head at the end of the line */
|
|
@@ -6999,6 +7041,9 @@ declare interface TableElement {
|
|
|
6999
7041
|
y: number;
|
|
7000
7042
|
width: number;
|
|
7001
7043
|
height: number;
|
|
7044
|
+
rotation: number;
|
|
7045
|
+
flipH: boolean;
|
|
7046
|
+
flipV: boolean;
|
|
7002
7047
|
/** Column widths in EMU */
|
|
7003
7048
|
cols: number[];
|
|
7004
7049
|
rows: TableRow[];
|
package/dist/types/pptx.d.ts
CHANGED
|
@@ -251,6 +251,9 @@ export declare interface ChartElement {
|
|
|
251
251
|
y: number;
|
|
252
252
|
width: number;
|
|
253
253
|
height: number;
|
|
254
|
+
rotation: number;
|
|
255
|
+
flipH: boolean;
|
|
256
|
+
flipV: boolean;
|
|
254
257
|
/**
|
|
255
258
|
* The chart payload, already in the canonical {@link ChartModel} shape emitted
|
|
256
259
|
* by the Rust parser (`ooxml_common::chart::ChartModel`). Passed straight to
|
|
@@ -1491,6 +1494,9 @@ export declare interface MediaElement {
|
|
|
1491
1494
|
y: number;
|
|
1492
1495
|
width: number;
|
|
1493
1496
|
height: number;
|
|
1497
|
+
rotation: number;
|
|
1498
|
+
flipH: boolean;
|
|
1499
|
+
flipV: boolean;
|
|
1494
1500
|
/** "audio" or "video" */
|
|
1495
1501
|
mediaKind: 'audio' | 'video';
|
|
1496
1502
|
/** Poster image zip path (e.g. "ppt/media/image2.png"). Empty when no poster. */
|
|
@@ -3322,6 +3328,8 @@ export declare interface Stroke {
|
|
|
3322
3328
|
width: number;
|
|
3323
3329
|
/** OOXML prstDash value: "dash", "dot", "dashDot", "lgDash", "lgDashDot", etc. */
|
|
3324
3330
|
dashStyle?: string;
|
|
3331
|
+
/** Canvas line cap normalized from DrawingML/VML (`flat` → `butt`). */
|
|
3332
|
+
lineCap?: CanvasLineCap;
|
|
3325
3333
|
/** Arrow head at the start of the line */
|
|
3326
3334
|
headEnd?: ArrowEnd;
|
|
3327
3335
|
/** Arrow head at the end of the line */
|
|
@@ -3362,6 +3370,9 @@ export declare interface TableElement {
|
|
|
3362
3370
|
y: number;
|
|
3363
3371
|
width: number;
|
|
3364
3372
|
height: number;
|
|
3373
|
+
rotation: number;
|
|
3374
|
+
flipH: boolean;
|
|
3375
|
+
flipV: boolean;
|
|
3365
3376
|
/** Column widths in EMU */
|
|
3366
3377
|
cols: number[];
|
|
3367
3378
|
rows: TableRow[];
|
package/dist/types/xlsx.d.ts
CHANGED
|
@@ -1916,6 +1916,9 @@ export declare interface ShapeInfo {
|
|
|
1916
1916
|
h: number;
|
|
1917
1917
|
/** Rotation in degrees, clockwise. */
|
|
1918
1918
|
rot: number;
|
|
1919
|
+
/** Effective DrawingML reflection after composing parent groups. */
|
|
1920
|
+
flipH?: boolean;
|
|
1921
|
+
flipV?: boolean;
|
|
1919
1922
|
fillColor?: string;
|
|
1920
1923
|
strokeColor?: string;
|
|
1921
1924
|
/** Stroke width in EMU. 0 = no stroke. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Y as e, at as t, et as n, rt as r } from "./find-cursor-
|
|
1
|
+
import { Y as e, at as t, et as n, rt as r } from "./find-cursor-DBifiZop.js";
|
|
2
2
|
//#region packages/core/src/image/duotone-bitmap-by-path.ts
|
|
3
3
|
function i(e, t) {
|
|
4
4
|
return t ? `${e}|duo:${t.clr1}:${t.clr2}` : e;
|