@silurus/ooxml 0.9.0 → 0.11.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/index.cjs CHANGED
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./pptx-BGtPXrb6.cjs`),t=require(`./xlsx-DkV1Stwd.cjs`),n=require(`./docx-5SgqrF74.cjs`);Object.defineProperty(exports,`docx`,{enumerable:!0,get:function(){return n.t}}),Object.defineProperty(exports,`pptx`,{enumerable:!0,get:function(){return e.t}}),Object.defineProperty(exports,`xlsx`,{enumerable:!0,get:function(){return t.t}});
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./pptx-BGtPXrb6.cjs`),t=require(`./xlsx-DYZg9gH8.cjs`),n=require(`./docx-5SgqrF74.cjs`);Object.defineProperty(exports,`docx`,{enumerable:!0,get:function(){return n.t}}),Object.defineProperty(exports,`pptx`,{enumerable:!0,get:function(){return e.t}}),Object.defineProperty(exports,`xlsx`,{enumerable:!0,get:function(){return t.t}});
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
1
  import { t as e } from "./pptx-CsVDY5Ej.js";
2
- import { t } from "./xlsx-C_nrVEax.js";
2
+ import { t } from "./xlsx-35w32FNQ.js";
3
3
  import { t as n } from "./docx-BdQTKYcj.js";
4
4
  export { n as docx, e as pptx, t as xlsx };
@@ -47,6 +47,12 @@ declare interface Border {
47
47
  bottom: BorderEdge | null;
48
48
  diagonalUp?: BorderEdge | null;
49
49
  diagonalDown?: BorderEdge | null;
50
+ /** Inner horizontal rule between rows inside a region
51
+ * (ECMA-376 §18.8.40 `tableStyleElement/border/horizontal`).
52
+ * Only set on table-style dxfs; absent on cell-level borders. */
53
+ horizontal?: BorderEdge | null;
54
+ /** Inner vertical rule between columns inside a region. */
55
+ vertical?: BorderEdge | null;
50
56
  }
51
57
 
52
58
  declare interface BorderEdge {
@@ -82,6 +88,11 @@ declare interface Cell {
82
88
  colRef: string;
83
89
  value: CellValue;
84
90
  styleIndex: number;
91
+ /** Raw `<f>` formula text (ECMA-376 §18.3.1.40), when present. The renderer
92
+ * uses this to recompute volatile functions (TODAY, NOW) at display time
93
+ * so the cached `<v>` — frozen when the file was last saved — doesn't
94
+ * show a stale date. */
95
+ formula?: string;
85
96
  }
86
97
 
87
98
  declare interface CellBorders {
@@ -130,6 +141,11 @@ declare interface CellXf {
130
141
  shrinkToFit?: boolean;
131
142
  }
132
143
 
144
+ declare interface CfIcon {
145
+ iconSet: string;
146
+ iconId: number;
147
+ }
148
+
133
149
  declare type CfRule = {
134
150
  type: 'cellIs';
135
151
  operator: string;
@@ -171,6 +187,7 @@ declare type CfRule = {
171
187
  cfvos: CfValue[];
172
188
  reverse: boolean;
173
189
  priority: number;
190
+ customIcons?: CfIcon[];
174
191
  } | {
175
192
  type: 'other';
176
193
  kind: string;
@@ -1243,6 +1260,27 @@ declare interface TableElement {
1243
1260
  rows: TableRow[];
1244
1261
  }
1245
1262
 
1263
+ declare interface TableInfo {
1264
+ range: CellRange;
1265
+ styleName: string;
1266
+ headerRowCount: number;
1267
+ totalsRowCount: number;
1268
+ showRowStripes: boolean;
1269
+ showColumnStripes: boolean;
1270
+ showFirstColumn: boolean;
1271
+ showLastColumn: boolean;
1272
+ /** Accent color resolved by the parser from the built-in style name against
1273
+ * the file's theme accents (e.g. `TableStyleLight18` → accent3). */
1274
+ accentColor: string;
1275
+ /** Dxf index for the `wholeTable` element of a custom `<tableStyle>`
1276
+ * (ECMA-376 §18.8.40). When set, its border/fill apply to every cell of
1277
+ * the table as a base layer. Undefined for built-in style names. */
1278
+ wholeTableDxf?: number;
1279
+ /** Dxf index for the `headerRow` element of a custom `<tableStyle>` —
1280
+ * provides header background, font color/weight, and vertical separators. */
1281
+ headerRowDxf?: number;
1282
+ }
1283
+
1246
1284
  declare interface TableRow {
1247
1285
  /** Row height in EMU */
1248
1286
  height: number;
@@ -1371,6 +1409,9 @@ declare interface Worksheet {
1371
1409
  * conditional-formatting `expression` rules that call named ranges
1372
1410
  * (e.g. `task_start`, `today`). */
1373
1411
  definedNames?: DefinedName[];
1412
+ /** Excel Tables on this sheet (ECMA-376 §18.5). The renderer overlays a
1413
+ * built-in style (bold header, banded rows) on the given ranges. */
1414
+ tables?: TableInfo[];
1374
1415
  }
1375
1416
 
1376
1417
  export declare namespace xlsx {
@@ -30,6 +30,12 @@ export declare interface Border {
30
30
  bottom: BorderEdge | null;
31
31
  diagonalUp?: BorderEdge | null;
32
32
  diagonalDown?: BorderEdge | null;
33
+ /** Inner horizontal rule between rows inside a region
34
+ * (ECMA-376 §18.8.40 `tableStyleElement/border/horizontal`).
35
+ * Only set on table-style dxfs; absent on cell-level borders. */
36
+ horizontal?: BorderEdge | null;
37
+ /** Inner vertical rule between columns inside a region. */
38
+ vertical?: BorderEdge | null;
33
39
  }
34
40
 
35
41
  export declare interface BorderEdge {
@@ -43,6 +49,11 @@ export declare interface Cell {
43
49
  colRef: string;
44
50
  value: CellValue;
45
51
  styleIndex: number;
52
+ /** Raw `<f>` formula text (ECMA-376 §18.3.1.40), when present. The renderer
53
+ * uses this to recompute volatile functions (TODAY, NOW) at display time
54
+ * so the cached `<v>` — frozen when the file was last saved — doesn't
55
+ * show a stale date. */
56
+ formula?: string;
46
57
  }
47
58
 
48
59
  declare interface CellRange {
@@ -84,6 +95,11 @@ export declare interface CellXf {
84
95
  shrinkToFit?: boolean;
85
96
  }
86
97
 
98
+ declare interface CfIcon {
99
+ iconSet: string;
100
+ iconId: number;
101
+ }
102
+
87
103
  declare type CfRule = {
88
104
  type: 'cellIs';
89
105
  operator: string;
@@ -125,6 +141,7 @@ declare type CfRule = {
125
141
  cfvos: CfValue[];
126
142
  reverse: boolean;
127
143
  priority: number;
144
+ customIcons?: CfIcon[];
128
145
  } | {
129
146
  type: 'other';
130
147
  kind: string;
@@ -339,6 +356,27 @@ export declare interface Styles {
339
356
  dxfs: Dxf[];
340
357
  }
341
358
 
359
+ declare interface TableInfo {
360
+ range: CellRange;
361
+ styleName: string;
362
+ headerRowCount: number;
363
+ totalsRowCount: number;
364
+ showRowStripes: boolean;
365
+ showColumnStripes: boolean;
366
+ showFirstColumn: boolean;
367
+ showLastColumn: boolean;
368
+ /** Accent color resolved by the parser from the built-in style name against
369
+ * the file's theme accents (e.g. `TableStyleLight18` → accent3). */
370
+ accentColor: string;
371
+ /** Dxf index for the `wholeTable` element of a custom `<tableStyle>`
372
+ * (ECMA-376 §18.8.40). When set, its border/fill apply to every cell of
373
+ * the table as a base layer. Undefined for built-in style names. */
374
+ wholeTableDxf?: number;
375
+ /** Dxf index for the `headerRow` element of a custom `<tableStyle>` —
376
+ * provides header background, font color/weight, and vertical separators. */
377
+ headerRowDxf?: number;
378
+ }
379
+
342
380
  export declare interface ViewportRange {
343
381
  row: number;
344
382
  col: number;
@@ -382,6 +420,9 @@ export declare interface Worksheet {
382
420
  * conditional-formatting `expression` rules that call named ranges
383
421
  * (e.g. `task_start`, `today`). */
384
422
  definedNames?: DefinedName[];
423
+ /** Excel Tables on this sheet (ECMA-376 §18.5). The renderer overlays a
424
+ * built-in style (bold header, banded rows) on the given ranges. */
425
+ tables?: TableInfo[];
385
426
  }
386
427
 
387
428
  /**