@silurus/ooxml 0.22.1 → 0.23.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
@@ -423,6 +423,7 @@ export const PptxViewerComponent = component$<{ src: string }>(({ src }) => {
423
423
  | | Row / column sizing (custom widths and heights) | ✅ |
424
424
  | | Hidden rows / columns | ✅ |
425
425
  | **Elements** | Images (`<xdr:twoCellAnchor>`) | ✅ |
426
+ | | Drawing shapes / text boxes (`xdr:sp`, `xdr:txBody`) | ✅ |
426
427
  | | Charts (bar, line, area, radar, scatter / bubble) | ✅ |
427
428
  | | Chart markers (circle / square / diamond / triangle / x / plus / star / dot / dash, per-point `<c:dPt>` overrides) | ✅ |
428
429
  | | Chart data labels (`<c:dLbl>` per-point with CELLRANGE / VALUE / SERIESNAME / CATEGORYNAME field references, position `l`/`r`/`t`/`b`/`ctr`/`outEnd`) | ✅ |
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./xlsx-Dl5zdO5q.cjs`),t=require(`./pptx-Ywwc_EMp.cjs`),n=require(`./docx-DKPVLT6O.cjs`);Object.defineProperty(exports,`docx`,{enumerable:!0,get:function(){return n.t}}),Object.defineProperty(exports,`pptx`,{enumerable:!0,get:function(){return t.t}}),Object.defineProperty(exports,`xlsx`,{enumerable:!0,get:function(){return e.t}});
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./xlsx-C338java.cjs`),t=require(`./pptx-Ywwc_EMp.cjs`),n=require(`./docx-DKPVLT6O.cjs`);Object.defineProperty(exports,`docx`,{enumerable:!0,get:function(){return n.t}}),Object.defineProperty(exports,`pptx`,{enumerable:!0,get:function(){return t.t}}),Object.defineProperty(exports,`xlsx`,{enumerable:!0,get:function(){return e.t}});
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { t as e } from "./xlsx-CDVcKDiM.js";
1
+ import { t as e } from "./xlsx-C1BPPkHW.js";
2
2
  import { t } from "./pptx-nyHInjlO.js";
3
3
  import { t as n } from "./docx-C_zG3e0V.js";
4
4
  export { n as docx, t as pptx, e as xlsx };
@@ -1539,6 +1539,15 @@ declare interface ShapeInfo {
1539
1539
  /** Stroke width in EMU. 0 = no stroke. */
1540
1540
  strokeWidth: number;
1541
1541
  geom: ShapeGeom;
1542
+ /** Optional text body (`<xdr:txBody>`, ECMA-376 §20.5.2.34). Present for
1543
+ * text boxes (`txBox="1"`) and any other shape that carries visible text. */
1544
+ text?: ShapeText;
1545
+ }
1546
+
1547
+ declare interface ShapeParagraph {
1548
+ /** `<a:pPr@algn>` — `l` (default) | `ctr` | `r` | `just` | `dist`. */
1549
+ align: string;
1550
+ runs: ShapeTextRun[];
1542
1551
  }
1543
1552
 
1544
1553
  declare interface ShapeRun {
@@ -1563,6 +1572,26 @@ declare interface ShapeRun {
1563
1572
  wrapMode?: string | null;
1564
1573
  }
1565
1574
 
1575
+ declare interface ShapeText {
1576
+ /** `<a:bodyPr@anchor>` — vertical alignment of the text block within the
1577
+ * shape rect. `t` (top, default), `ctr` (middle), `b` (bottom). */
1578
+ anchor: string;
1579
+ /** `<a:bodyPr@wrap>` — `square` (wrap to width) | `none`. */
1580
+ wrap: string;
1581
+ paragraphs: ShapeParagraph[];
1582
+ }
1583
+
1584
+ declare interface ShapeTextRun {
1585
+ text: string;
1586
+ bold: boolean;
1587
+ italic: boolean;
1588
+ /** Font size in points (already converted from `<a:rPr@sz>` 100ths-of-a-pt).
1589
+ * 0 = inherit (renderer falls back to its default). */
1590
+ size: number;
1591
+ color?: string;
1592
+ fontFace?: string;
1593
+ }
1594
+
1566
1595
  declare interface SharedString {
1567
1596
  text: string;
1568
1597
  runs?: Run[];
@@ -589,6 +589,35 @@ declare interface ShapeInfo {
589
589
  /** Stroke width in EMU. 0 = no stroke. */
590
590
  strokeWidth: number;
591
591
  geom: ShapeGeom;
592
+ /** Optional text body (`<xdr:txBody>`, ECMA-376 §20.5.2.34). Present for
593
+ * text boxes (`txBox="1"`) and any other shape that carries visible text. */
594
+ text?: ShapeText;
595
+ }
596
+
597
+ declare interface ShapeParagraph {
598
+ /** `<a:pPr@algn>` — `l` (default) | `ctr` | `r` | `just` | `dist`. */
599
+ align: string;
600
+ runs: ShapeTextRun[];
601
+ }
602
+
603
+ declare interface ShapeText {
604
+ /** `<a:bodyPr@anchor>` — vertical alignment of the text block within the
605
+ * shape rect. `t` (top, default), `ctr` (middle), `b` (bottom). */
606
+ anchor: string;
607
+ /** `<a:bodyPr@wrap>` — `square` (wrap to width) | `none`. */
608
+ wrap: string;
609
+ paragraphs: ShapeParagraph[];
610
+ }
611
+
612
+ declare interface ShapeTextRun {
613
+ text: string;
614
+ bold: boolean;
615
+ italic: boolean;
616
+ /** Font size in points (already converted from `<a:rPr@sz>` 100ths-of-a-pt).
617
+ * 0 = inherit (renderer falls back to its default). */
618
+ size: number;
619
+ color?: string;
620
+ fontFace?: string;
592
621
  }
593
622
 
594
623
  declare interface SharedString {