@qrcommunication/gigapdf-lib 0.123.1 → 0.124.1

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.d.cts CHANGED
@@ -1062,6 +1062,9 @@ interface GigaShape {
1062
1062
  stroke: [number, number, number] | null;
1063
1063
  stroke_width: number;
1064
1064
  dash: number[];
1065
+ /** Non-opaque paint opacity (`0..=1`). Omitted = opaque. */
1066
+ fill_alpha?: number;
1067
+ stroke_alpha?: number;
1065
1068
  /**
1066
1069
  * Full gradient fill (PPTX/ODP `gradFill`). Primes over the flat `fill`,
1067
1070
  * which keeps the first stop's colour as the fallback. Present since 0.117.0.
@@ -1073,6 +1076,8 @@ interface GigaShape {
1073
1076
  /** A free-floating text box holding a list of blocks (mirror of `model::TextBox`). */
1074
1077
  interface GigaTextBox {
1075
1078
  blocks: GigaBlock[];
1079
+ /** Fill/stroke/gradient/shadow of the text-box container. Omitted when unset. */
1080
+ paint?: GigaShape;
1076
1081
  }
1077
1082
  /** A typed spreadsheet cell (mirror of `model::SheetCell`). */
1078
1083
  interface GigaSheetCell {
@@ -1579,6 +1584,8 @@ interface ImageElementInfo {
1579
1584
  * the placement box above is NOT intersected with it.
1580
1585
  */
1581
1586
  clipBounds: [number, number, number, number] | null;
1587
+ /** Author-supplied alternative text from the figure structure, if present. */
1588
+ alt: string | null;
1582
1589
  }
1583
1590
  /**
1584
1591
  * One path segment from {@link GigaPdfDoc.vectorPaths} (page user space, origin
@@ -3388,6 +3395,8 @@ declare class GigaPdfDoc {
3388
3395
  * non-empty) or the call otherwise fails.
3389
3396
  */
3390
3397
  setFigureAlt(index: number, alt: string): boolean;
3398
+ /** Set alternative text on an image by page and unified element index. */
3399
+ setImageAlt(page: number, index: number, alt: string): boolean;
3391
3400
  /**
3392
3401
  * Serialize the document encrypted with the PDF Standard Security Handler.
3393
3402
  * Defaults to **AES-256 (R6)**. `fileId` is the document `/ID` (any stable
package/dist/index.d.ts CHANGED
@@ -1062,6 +1062,9 @@ interface GigaShape {
1062
1062
  stroke: [number, number, number] | null;
1063
1063
  stroke_width: number;
1064
1064
  dash: number[];
1065
+ /** Non-opaque paint opacity (`0..=1`). Omitted = opaque. */
1066
+ fill_alpha?: number;
1067
+ stroke_alpha?: number;
1065
1068
  /**
1066
1069
  * Full gradient fill (PPTX/ODP `gradFill`). Primes over the flat `fill`,
1067
1070
  * which keeps the first stop's colour as the fallback. Present since 0.117.0.
@@ -1073,6 +1076,8 @@ interface GigaShape {
1073
1076
  /** A free-floating text box holding a list of blocks (mirror of `model::TextBox`). */
1074
1077
  interface GigaTextBox {
1075
1078
  blocks: GigaBlock[];
1079
+ /** Fill/stroke/gradient/shadow of the text-box container. Omitted when unset. */
1080
+ paint?: GigaShape;
1076
1081
  }
1077
1082
  /** A typed spreadsheet cell (mirror of `model::SheetCell`). */
1078
1083
  interface GigaSheetCell {
@@ -1579,6 +1584,8 @@ interface ImageElementInfo {
1579
1584
  * the placement box above is NOT intersected with it.
1580
1585
  */
1581
1586
  clipBounds: [number, number, number, number] | null;
1587
+ /** Author-supplied alternative text from the figure structure, if present. */
1588
+ alt: string | null;
1582
1589
  }
1583
1590
  /**
1584
1591
  * One path segment from {@link GigaPdfDoc.vectorPaths} (page user space, origin
@@ -3388,6 +3395,8 @@ declare class GigaPdfDoc {
3388
3395
  * non-empty) or the call otherwise fails.
3389
3396
  */
3390
3397
  setFigureAlt(index: number, alt: string): boolean;
3398
+ /** Set alternative text on an image by page and unified element index. */
3399
+ setImageAlt(page: number, index: number, alt: string): boolean;
3391
3400
  /**
3392
3401
  * Serialize the document encrypted with the PDF Standard Security Handler.
3393
3402
  * Defaults to **AES-256 (R6)**. `fileId` is the document `/ID` (any stable
package/dist/index.js CHANGED
@@ -2613,6 +2613,13 @@ var GigaPdfDoc = class {
2613
2613
  setFigureAlt(index, alt) {
2614
2614
  return this.g._withStr(alt, (p, l) => this.ex().gp_set_figure_alt(this.h, index, p, l)) === 0;
2615
2615
  }
2616
+ /** Set alternative text on an image by page and unified element index. */
2617
+ setImageAlt(page, index, alt) {
2618
+ return this.g._withStr(
2619
+ alt,
2620
+ (p, l) => this.ex().gp_set_image_alt(this.h, page, index, p, l)
2621
+ ) === 0;
2622
+ }
2616
2623
  // security
2617
2624
  /**
2618
2625
  * Serialize the document encrypted with the PDF Standard Security Handler.