@silurus/ooxml 0.8.0 → 0.9.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 CHANGED
@@ -6,11 +6,11 @@
6
6
  [![npm downloads](https://img.shields.io/npm/dm/@silurus/ooxml.svg)](https://www.npmjs.com/package/@silurus/ooxml)
7
7
  [![license](https://img.shields.io/npm/l/@silurus/ooxml.svg)](./LICENSE)
8
8
 
9
- **[Demo (Storybook)](https://demo.silurus.dev)**
9
+ **[Demo (Storybook)](https://ooxml.silurus.dev)**
10
10
 
11
11
  A browser-based viewer for Office Open XML documents that renders to an HTML Canvas element.
12
12
  The parsers are written in Rust and compiled to WebAssembly; the renderers use the Canvas 2D API.
13
- Each format also exposes a headless engine (`PptxPresentation` / `DocxDocument` / `XlsxWorkbook`) that renders into any caller-supplied canvas, so you can compose your own UI — scroll views, thumbnail grids, master-detail panes — instead of being locked into the built-in viewer. See the `Examples` section in [the Storybook demo](https://demo.silurus.dev).
13
+ Each format also exposes a headless engine (`PptxPresentation` / `DocxDocument` / `XlsxWorkbook`) that renders into any caller-supplied canvas, so you can compose your own UI — scroll views, thumbnail grids, master-detail panes — instead of being locked into the built-in viewer. See the `Examples` section in [the Storybook demo](https://ooxml.silurus.dev).
14
14
 
15
15
  | PPTX | DOCX | XLSX |
16
16
  |:---:|:---:|:---:|
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./pptx-BGtPXrb6.cjs`),t=require(`./xlsx-DZYw6i9i.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-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}});
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
1
  import { t as e } from "./pptx-CsVDY5Ej.js";
2
- import { t } from "./xlsx-5xusOvzv.js";
2
+ import { t } from "./xlsx-C_nrVEax.js";
3
3
  import { t as n } from "./docx-BdQTKYcj.js";
4
4
  export { n as docx, e as pptx, t as xlsx };
@@ -141,6 +141,7 @@ declare type CfRule = {
141
141
  formula: string;
142
142
  dxfId: number | null;
143
143
  priority: number;
144
+ stopIfTrue: boolean;
144
145
  } | {
145
146
  type: 'colorScale';
146
147
  stops: CfStop[];
@@ -151,6 +152,7 @@ declare type CfRule = {
151
152
  min: CfValue;
152
153
  max: CfValue;
153
154
  priority: number;
155
+ gradient: boolean;
154
156
  } | {
155
157
  type: 'top10';
156
158
  top: boolean;
@@ -317,6 +319,11 @@ declare interface ConditionalFormat {
317
319
  rules: CfRule[];
318
320
  }
319
321
 
322
+ declare interface DefinedName {
323
+ name: string;
324
+ formula: string;
325
+ }
326
+
320
327
  declare interface DocParagraph {
321
328
  /**
322
329
  * ECMA-376 §17.18.44 ST_Jc. Renderer honors left, start, center, right, end,
@@ -1347,6 +1354,10 @@ declare interface Worksheet {
1347
1354
  charts: ChartAnchor[];
1348
1355
  /** Whether to display zero values (ECMA-376 §18.3.1.94). Defaults to true. */
1349
1356
  showZeros?: boolean;
1357
+ /** Whether to draw default grid lines (ECMA-376 §18.3.1.83
1358
+ * `<sheetView showGridLines>`). Mirrors the Excel "View → Gridlines"
1359
+ * checkbox. Defaults to true. */
1360
+ showGridlines?: boolean;
1350
1361
  /** Sheet tab color (ECMA-376 §18.3.1.79). */
1351
1362
  tabColor?: string | null;
1352
1363
  /** AutoFilter header range (ECMA-376 §18.3.1.2). */
@@ -1356,6 +1367,10 @@ declare interface Worksheet {
1356
1367
  /** A1-style cell refs of commented cells (ECMA-376 §18.7.3). Rendered as a
1357
1368
  * small red triangle in each cell's top-right corner. */
1358
1369
  commentRefs?: string[];
1370
+ /** Defined names in scope for this sheet (ECMA-376 §18.2.5). Used by
1371
+ * conditional-formatting `expression` rules that call named ranges
1372
+ * (e.g. `task_start`, `today`). */
1373
+ definedNames?: DefinedName[];
1359
1374
  }
1360
1375
 
1361
1376
  export declare namespace xlsx {
@@ -95,6 +95,7 @@ declare type CfRule = {
95
95
  formula: string;
96
96
  dxfId: number | null;
97
97
  priority: number;
98
+ stopIfTrue: boolean;
98
99
  } | {
99
100
  type: 'colorScale';
100
101
  stops: CfStop[];
@@ -105,6 +106,7 @@ declare type CfRule = {
105
106
  min: CfValue;
106
107
  max: CfValue;
107
108
  priority: number;
109
+ gradient: boolean;
108
110
  } | {
109
111
  type: 'top10';
110
112
  top: boolean;
@@ -194,6 +196,11 @@ declare interface ConditionalFormat {
194
196
  rules: CfRule[];
195
197
  }
196
198
 
199
+ declare interface DefinedName {
200
+ name: string;
201
+ formula: string;
202
+ }
203
+
197
204
  declare interface Dxf {
198
205
  font: Font | null;
199
206
  fill: Fill | null;
@@ -358,6 +365,10 @@ export declare interface Worksheet {
358
365
  charts: ChartAnchor[];
359
366
  /** Whether to display zero values (ECMA-376 §18.3.1.94). Defaults to true. */
360
367
  showZeros?: boolean;
368
+ /** Whether to draw default grid lines (ECMA-376 §18.3.1.83
369
+ * `<sheetView showGridLines>`). Mirrors the Excel "View → Gridlines"
370
+ * checkbox. Defaults to true. */
371
+ showGridlines?: boolean;
361
372
  /** Sheet tab color (ECMA-376 §18.3.1.79). */
362
373
  tabColor?: string | null;
363
374
  /** AutoFilter header range (ECMA-376 §18.3.1.2). */
@@ -367,6 +378,10 @@ export declare interface Worksheet {
367
378
  /** A1-style cell refs of commented cells (ECMA-376 §18.7.3). Rendered as a
368
379
  * small red triangle in each cell's top-right corner. */
369
380
  commentRefs?: string[];
381
+ /** Defined names in scope for this sheet (ECMA-376 §18.2.5). Used by
382
+ * conditional-formatting `expression` rules that call named ranges
383
+ * (e.g. `task_start`, `today`). */
384
+ definedNames?: DefinedName[];
370
385
  }
371
386
 
372
387
  /**