@shbernal/ts-pptx 4.0.1 → 4.2.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.
Files changed (139) hide show
  1. package/README.md +147 -114
  2. package/dist/anim-presets-Qbgh8uut.js +55 -0
  3. package/dist/anim-presets-Qbgh8uut.js.map +1 -0
  4. package/dist/{autopage-odPz7zZO.js → autopage-DqZ37VpL.js} +11 -12
  5. package/dist/autopage-DqZ37VpL.js.map +1 -0
  6. package/dist/{binary-string-CKVAYI3M.js → binary-string-Ba8VM3b9.js} +3 -4
  7. package/dist/binary-string-Ba8VM3b9.js.map +1 -0
  8. package/dist/{body-insets-Dw_BeWD_.js → body-insets-BDHymJvz.js} +7 -9
  9. package/dist/body-insets-BDHymJvz.js.map +1 -0
  10. package/dist/browser.d.ts +24 -16
  11. package/dist/browser.d.ts.map +1 -1
  12. package/dist/browser.js +19 -19
  13. package/dist/browser.js.map +1 -1
  14. package/dist/{image-size-CvN2iCA4.js → chart-metadata-CwiTTcJq.js} +634 -537
  15. package/dist/chart-metadata-CwiTTcJq.js.map +1 -0
  16. package/dist/{clip-Bl01BPcN.d.ts → clip-ISfCMtWA.d.ts} +6 -10
  17. package/dist/clip-ISfCMtWA.d.ts.map +1 -0
  18. package/dist/{notes-Dh12JAbn.js → comments-CKIZYRbZ.js} +530 -401
  19. package/dist/comments-CKIZYRbZ.js.map +1 -0
  20. package/dist/{diagnostics-D8ot4Ei7.d.ts → diagnostics-MoA4MBq5.d.ts} +55 -53
  21. package/dist/diagnostics-MoA4MBq5.d.ts.map +1 -0
  22. package/dist/{embedded-fonts-DarT9aoa.d.ts → embedded-fonts-U7HIIhPO.d.ts} +4 -6
  23. package/dist/embedded-fonts-U7HIIhPO.d.ts.map +1 -0
  24. package/dist/{entry-compose-DCnvBZz2.d.ts → entry-compose-CiakSt-f.d.ts} +62 -81
  25. package/dist/entry-compose-CiakSt-f.d.ts.map +1 -0
  26. package/dist/{errors-C4oENPcu.js → entry-errors-JMthgJ2g.js} +45 -29
  27. package/dist/entry-errors-JMthgJ2g.js.map +1 -0
  28. package/dist/{table-cell-margins-EVg0EwxT.js → enums-BP9wsb9Q.js} +44 -47
  29. package/dist/enums-BP9wsb9Q.js.map +1 -0
  30. package/dist/{enums-BUKTUB6V.d.ts → enums-PcXr3o3J.d.ts} +13 -14
  31. package/dist/{enums-BUKTUB6V.d.ts.map → enums-PcXr3o3J.d.ts.map} +1 -1
  32. package/dist/families.d.ts +24 -26
  33. package/dist/families.d.ts.map +1 -1
  34. package/dist/families.js +3 -4
  35. package/dist/{fit-Cb7naFj6.js → fit-Bpmzep6O.js} +64 -56
  36. package/dist/fit-Bpmzep6O.js.map +1 -0
  37. package/dist/{font-metrics-v5fn7s7e.d.ts → font-metrics-DTppw4t3.d.ts} +62 -38
  38. package/dist/font-metrics-DTppw4t3.d.ts.map +1 -0
  39. package/dist/{grid-DikTjFey.js → grid-DUIMxjfl.js} +23 -26
  40. package/dist/grid-DUIMxjfl.js.map +1 -0
  41. package/dist/{html-dom-Iuog2wdK.js → html-dom-LZCgntnJ.js} +46 -47
  42. package/dist/html-dom-LZCgntnJ.js.map +1 -0
  43. package/dist/html.d.ts +53 -9
  44. package/dist/html.d.ts.map +1 -1
  45. package/dist/html.js +12 -13
  46. package/dist/html.js.map +1 -1
  47. package/dist/index.d.ts +21 -13
  48. package/dist/index.d.ts.map +1 -1
  49. package/dist/index.js +15 -15
  50. package/dist/index.js.map +1 -1
  51. package/dist/inspect.d.ts +16 -18
  52. package/dist/inspect.d.ts.map +1 -1
  53. package/dist/inspect.js +18 -19
  54. package/dist/inspect.js.map +1 -1
  55. package/dist/{text-anchor-CrYXAfUu.js → lock-attrs-CSQnFDHP.js} +62 -12
  56. package/dist/lock-attrs-CSQnFDHP.js.map +1 -0
  57. package/dist/math.d.ts +2 -4
  58. package/dist/math.d.ts.map +1 -1
  59. package/dist/math.js +12 -13
  60. package/dist/math.js.map +1 -1
  61. package/dist/measure.d.ts +23 -12
  62. package/dist/measure.d.ts.map +1 -1
  63. package/dist/measure.js +3 -3
  64. package/dist/node.d.ts +21 -13
  65. package/dist/node.d.ts.map +1 -1
  66. package/dist/node.js +12 -12
  67. package/dist/node.js.map +1 -1
  68. package/dist/{options-internal-WqgMf720.js → options-internal-BWgmLPdx.js} +4 -5
  69. package/dist/options-internal-BWgmLPdx.js.map +1 -0
  70. package/dist/{package-J49Ck6S2.d.ts → package-CANBWuSm.d.ts} +9 -13
  71. package/dist/package-CANBWuSm.d.ts.map +1 -0
  72. package/dist/{playbtn-CUqQdoDf.js → playbtn-BQZFJir9.js} +4 -5
  73. package/dist/playbtn-BQZFJir9.js.map +1 -0
  74. package/dist/{pres-C6qgOFAa.d.ts → pres-BkEkUAEM.d.ts} +410 -237
  75. package/dist/pres-BkEkUAEM.d.ts.map +1 -0
  76. package/dist/{presentation-DGYlAWhl.js → presentation-4Ggq0_Xa.js} +470 -315
  77. package/dist/presentation-4Ggq0_Xa.js.map +1 -0
  78. package/dist/{presentation-types-8jLQHI4M.d.ts → presentation-types-BgnZR-0a.d.ts} +1119 -468
  79. package/dist/presentation-types-BgnZR-0a.d.ts.map +1 -0
  80. package/dist/read.d.ts +18 -13
  81. package/dist/read.d.ts.map +1 -1
  82. package/dist/read.js +4 -4
  83. package/dist/script.d.ts +116 -65
  84. package/dist/script.d.ts.map +1 -1
  85. package/dist/script.js +2700 -780
  86. package/dist/script.js.map +1 -1
  87. package/dist/{shapes-re0KyQk_.js → shapes-CAPOjU0Q.js} +1564 -491
  88. package/dist/shapes-CAPOjU0Q.js.map +1 -0
  89. package/dist/{slide-Dx2ZeVZ6.d.ts → slide-BmT4kMoO.d.ts} +102 -89
  90. package/dist/slide-BmT4kMoO.d.ts.map +1 -0
  91. package/dist/{slide-size-BalTjFuv.js → slide-size-SkScz1ig.js} +2 -3
  92. package/dist/{slide-size-BalTjFuv.js.map → slide-size-SkScz1ig.js.map} +1 -1
  93. package/dist/{table-dom-BTDP3lEP.js → table-dom-BYga4FYY.js} +4 -5
  94. package/dist/{table-dom-BTDP3lEP.js.map → table-dom-BYga4FYY.js.map} +1 -1
  95. package/dist/{text-sN64Otf_.js → text-CU08xJGs.js} +393 -344
  96. package/dist/text-CU08xJGs.js.map +1 -0
  97. package/dist/{transition-speed-kUEWDWTx.js → transition-speed-CNJ0fSpQ.js} +2 -3
  98. package/dist/{transition-speed-kUEWDWTx.js.map → transition-speed-CNJ0fSpQ.js.map} +1 -1
  99. package/dist/{units-internal-XJlf-hOl.js → units-internal-BR3a4cIi.js} +34 -32
  100. package/dist/units-internal-BR3a4cIi.js.map +1 -0
  101. package/dist/{zip-CKd8ihcf.js → zip-7JTh61LX.js} +8 -10
  102. package/dist/zip-7JTh61LX.js.map +1 -0
  103. package/dist/{zip-C0leZZMj.d.ts → zip-uUjs9Cqx.d.ts} +4 -6
  104. package/dist/zip-uUjs9Cqx.d.ts.map +1 -0
  105. package/dist/zip.d.ts +3 -3
  106. package/dist/zip.js +3 -3
  107. package/dist/{zoom-DPUHh85d.js → zoom-CSSeOwM8.js} +1204 -620
  108. package/dist/zoom-CSSeOwM8.js.map +1 -0
  109. package/package.json +27 -28
  110. package/skills/{ts-pptx-upstream → pptx-ts-upstream}/SKILL.md +37 -84
  111. package/dist/autopage-odPz7zZO.js.map +0 -1
  112. package/dist/binary-string-CKVAYI3M.js.map +0 -1
  113. package/dist/body-insets-Dw_BeWD_.js.map +0 -1
  114. package/dist/clip-Bl01BPcN.d.ts.map +0 -1
  115. package/dist/diagnostics-D8ot4Ei7.d.ts.map +0 -1
  116. package/dist/embedded-fonts-DarT9aoa.d.ts.map +0 -1
  117. package/dist/entry-compose-DCnvBZz2.d.ts.map +0 -1
  118. package/dist/errors-C4oENPcu.js.map +0 -1
  119. package/dist/fit-Cb7naFj6.js.map +0 -1
  120. package/dist/font-metrics-v5fn7s7e.d.ts.map +0 -1
  121. package/dist/grid-DikTjFey.js.map +0 -1
  122. package/dist/html-dom-Iuog2wdK.js.map +0 -1
  123. package/dist/image-size-CvN2iCA4.js.map +0 -1
  124. package/dist/notes-Dh12JAbn.js.map +0 -1
  125. package/dist/options-internal-WqgMf720.js.map +0 -1
  126. package/dist/package-J49Ck6S2.d.ts.map +0 -1
  127. package/dist/playbtn-CUqQdoDf.js.map +0 -1
  128. package/dist/pres-C6qgOFAa.d.ts.map +0 -1
  129. package/dist/presentation-DGYlAWhl.js.map +0 -1
  130. package/dist/presentation-types-8jLQHI4M.d.ts.map +0 -1
  131. package/dist/shapes-re0KyQk_.js.map +0 -1
  132. package/dist/slide-Dx2ZeVZ6.d.ts.map +0 -1
  133. package/dist/table-cell-margins-EVg0EwxT.js.map +0 -1
  134. package/dist/text-anchor-CrYXAfUu.js.map +0 -1
  135. package/dist/text-sN64Otf_.js.map +0 -1
  136. package/dist/units-internal-XJlf-hOl.js.map +0 -1
  137. package/dist/zip-C0leZZMj.d.ts.map +0 -1
  138. package/dist/zip-CKd8ihcf.js.map +0 -1
  139. package/dist/zoom-DPUHh85d.js.map +0 -1
@@ -1,12 +1,11 @@
1
- import { d as SHAPE_NAME, i as CHART_NAME, m as SlideObjectType, v as WRITE_OUTPUT_TYPE } from "./enums-BUKTUB6V.js";
2
- import { Bt as TextMeasurement, Ft as TableLayoutResult, Ht as TextPropsOptions, Kt as ImageProps, Nt as SlideComment, Ot as MeasureTextOptions, Q as ChartOpts, S as HexColor, Vt as TextProps, Z as ChartMulti, c as WriteFileProps, d as ThemeProps, f as BackgroundOption, i as PresLayout, jt as OverflowBoxOptions, kt as NotesProps, l as WriteProps, n as PackagePart, nn as ShapeProps, o as SectionProps, r as PartsProps, s as WriteBaseProps, t as CustomPropertyValue, xt as OptsChartData } from "./pres-C6qgOFAa.js";
3
- import { L as TableToSlidesProps, M as TableProps, N as TableRow, S as AnimationProps, T as TransitionProps, a as Slide, b as SlideMasterProps, n as GroupChildProps, o as SlideLayout, r as GroupProps, s as SlideObjectInfo, t as AddSlideProps, x as SlideNumberProps, y as SlideMasterObject } from "./slide-Dx2ZeVZ6.js";
4
- import { r as EmbeddedFontSlot } from "./embedded-fonts-DarT9aoa.js";
5
- import { A as SlideObject, D as SectionInternalProps, E as PresentationPropsInternal, M as SlideRelChart, N as SlideRelMedia, O as SlideLayoutInternal, T as PresSlideInternal, j as SlideRel, k as SlideMasterInternal, n as FontMetricsRegistry, w as ObjectOptionsInternal } from "./font-metrics-v5fn7s7e.js";
6
- import { s as MediaError } from "./diagnostics-D8ot4Ei7.js";
7
- import { c as ExtractedSlides, s as ExtractedSlide } from "./presentation-types-8jLQHI4M.js";
8
- import { r as ZipWriter } from "./zip-C0leZZMj.js";
9
- //#region src/runtime/types.d.ts
1
+ import { L as TableToSlidesProps, M as TableProps, N as TableRow, S as AnimationProps, T as TransitionProps, a as Slide, b as SlideMasterProps, n as GroupChildProps, o as SlideLayout, r as GroupProps, s as SlideObjectInfo, t as AddSlideProps, x as SlideNumberProps, y as SlideMasterObject } from "./slide-BmT4kMoO.js";
2
+ import { C as HexColor, Dt as OptsChartData, It as MeasureTextOptions, Jt as TextMeasurement, Lt as NotesProps, Ut as TableLayoutResult, Vt as SlideComment, Xt as TextPropsOptions, Yt as TextProps, c as WriteFileProps, en as ImageProps, f as ThemeProps, i as PresLayout, it as ChartOpts, l as WriteOutputMap, n as PackagePart, o as SectionProps, p as BackgroundOption, r as PartsProps, rt as ChartMulti, s as WriteBaseProps, t as CustomPropertyValue, u as WriteProps, un as ShapeProps, zt as OverflowBoxOptions } from "./pres-BkEkUAEM.js";
3
+ import { d as SHAPE_NAME, i as CHART_NAME, m as SlideObjectType, v as WRITE_OUTPUT_TYPE } from "./enums-PcXr3o3J.js";
4
+ import { A as SlideObject, D as SectionInternalProps, E as PresentationPropsInternal, M as SlideRelChart, N as SlideRelMedia, O as SlideLayoutInternal, T as PresSlideInternal, j as SlideRel, k as SlideMasterInternal, n as FontMetricsRegistry, w as ObjectOptionsInternal } from "./font-metrics-DTppw4t3.js";
5
+ import { u as MediaError } from "./diagnostics-MoA4MBq5.js";
6
+ import { r as EmbeddedFontSlot } from "./embedded-fonts-U7HIIhPO.js";
7
+ import { c as ExtractedSlides, s as ExtractedSlide } from "./presentation-types-BgnZR-0a.js";
8
+ import { r as ZipWriter } from "./zip-uUjs9Cqx.js";
10
9
  type RuntimeAdapter = {
11
10
  readonly writeFileOutputType: WRITE_OUTPUT_TYPE | null;
12
11
  /**
@@ -41,8 +40,6 @@ type RuntimeAdapter = {
41
40
  */
42
41
  loadFontData: (source: string) => Promise<Uint8Array>;
43
42
  };
44
- //#endregion
45
- //#region src/units.d.ts
46
43
  /**
47
44
  * DrawingML angle unit. `ST_Angle` (`rot`, shadow `dir`, gradient `ang`, …) is measured in
48
45
  * sixtieths-of-a-thousandth of a degree, i.e. 60000 units per degree. Multiply a value in
@@ -74,7 +71,7 @@ declare const HUNDREDTHS_PER_POINT = 100;
74
71
  */
75
72
  declare function ptToHundredths(pt: number): number;
76
73
  /**
77
- * English Metric Units — the integer unit OOXML serializes geometry in (914400 per inch).
74
+ * English Metric Units: the integer unit OOXML serializes geometry in (914400 per inch).
78
75
  *
79
76
  * Branded so a value that has already been resolved to EMU cannot be silently fed back into a
80
77
  * unit converter: {@link coordToEmu} only accepts a user `Coord`, so passing an `Emu` into it is
@@ -85,7 +82,7 @@ type Emu = number & {
85
82
  readonly __unit: 'emu';
86
83
  };
87
84
  /** Default pixel density for the `"<n>px"` coordinate unit: CSS reference pixels, also the
88
- * density ts-pptx assumes when reading an image header's pixel dimensions. */
85
+ * density pptx-ts assumes when reading an image header's pixel dimensions. */
89
86
  declare const DEFAULT_PX_PER_INCH = 96;
90
87
  /**
91
88
  * The largest DrawingML coordinate, in EMU: the `maxInclusive` of `ST_Coordinate`, the type of
@@ -96,11 +93,11 @@ declare const MAX_COORDINATE_EMU = 27273042316900;
96
93
  declare const MIN_COORDINATE_EMU = -27273042329600;
97
94
  type StandardLayoutName = 'LAYOUT_4x3' | 'LAYOUT_16x9' | 'LAYOUT_16x10' | 'LAYOUT_WIDE';
98
95
  interface StandardLayout {
99
- /** ts-pptx layout key used with `pptx.layout`. */
96
+ /** pptx-ts layout key used with `pptx.layout`. */
100
97
  readonly layout: StandardLayoutName;
101
98
  /** PresentationML slide-size preset name, or `custom` for PowerPoint widescreen. */
102
99
  readonly name: string;
103
- /** Slide width in inches — inches is ts-pptx's default coordinate unit, so this is the value to use for `addText`/`addShape` math. */
100
+ /** Slide width in inches. Inches is pptx-ts's default coordinate unit, so this is the value to use for `addText`/`addShape` math. */
104
101
  readonly widthIn: number;
105
102
  /** Slide height in inches. */
106
103
  readonly heightIn: number;
@@ -119,7 +116,7 @@ declare function pixelsToEmu(pixels: number, dpi: number): Emu;
119
116
  * only `parseCoord` needs it, because every `'50%'` a caller writes comes through there; it is
120
117
  * exported because a consumer computing its own geometry against a slide axis needs the same
121
118
  * arithmetic, and it belongs with the rest of the conversion set beside it rather than hidden
122
- * behind the one caller. Left exported deliberately rather than by oversight — this note is the
119
+ * behind the one caller. Left exported deliberately rather than by oversight. This note is the
123
120
  * difference between the two, as it is on {@link emuToPixels}.
124
121
  * @param percent - percentage value (e.g. `50` for 50%)
125
122
  * @param axisEmu - the axis length in EMU (slide width for x/w, height for y/h)
@@ -145,15 +142,15 @@ declare function emuToInches(emu: number): number;
145
142
  * EMU → points, the unit the write API states line widths, font sizes and text insets in.
146
143
  *
147
144
  * The one conversion, for the library as well as for a consumer: three private forms of
148
- * `emu / EMU_PER_POINT` had grown around it — the read model's `null`-propagating `ptFromEmu`,
149
- * the script mapper's `points`, and a dozen inline divisions — while this stayed published and
145
+ * `emu / EMU_PER_POINT` had grown around it (the read model's `null`-propagating `ptFromEmu`,
146
+ * the script mapper's `points`, and a dozen inline divisions) while this stayed published and
150
147
  * uncalled.
151
148
  *
152
149
  * **The policy, and its one exception.** Every EMU→points conversion goes through here or through
153
150
  * `ptFromEmu` in `src/read/api/coords.ts`, which is this with a `null` passed along. (Named rather
154
151
  * than linked: it is internal, so a reference link to it resolves to nothing in the published
155
152
  * reference.) The exception is
156
- * `measure/*` — `fit.ts`, `paragraphs.ts`, `table-fit.ts` — where an inner box is computed as
153
+ * `measure/*` (`fit.ts`, `paragraphs.ts`, `table-fit.ts`), where an inner box is computed as
157
154
  * `(extent - inset - inset) / EMU_PER_POINT` and then guarded with `!(x > 0)`. That guard is
158
155
  * written NaN-first on purpose: a box that cannot be measured is skipped, not reported. This
159
156
  * function asserts a finite input and throws instead, which is the right answer for a caller
@@ -167,16 +164,12 @@ declare function emuToPoints(emu: number): number;
167
164
  * **Published for consumers, and used nowhere in `src/` on purpose.** Nothing inside the
168
165
  * library thinks in pixels: it is the unit a caller placing library output on a canvas or in a
169
166
  * `<img>` needs, and the DPI is theirs to choose. Left exported deliberately rather than by
170
- * oversight — this note is the difference between the two.
167
+ * oversight. This note is the difference between the two.
171
168
  */
172
169
  declare function emuToPixels(emu: number, dpi: number): number;
173
170
  declare const STANDARD_LAYOUTS: Readonly<Record<StandardLayoutName, StandardLayout>>;
174
- //#endregion
175
- //#region src/gen/oxml/el.d.ts
176
171
  /** Attribute values; `undefined`/`null` omit the attribute entirely. */
177
172
  type XmlAttrs = Record<string, string | number | null | undefined>;
178
- //#endregion
179
- //#region src/gen/slide/objects/shared.d.ts
180
173
  /**
181
174
  * Everything the dispatch in `gen/slide/object.ts` has already resolved for one slide object,
182
175
  * handed to whichever renderer that object's `_type` selects.
@@ -191,9 +184,9 @@ type XmlAttrs = Record<string, string | number | null | undefined>;
191
184
  * Everything a renderer needs is here, and that is now a requirement rather than an observation:
192
185
  * a renderer is called through {@link RendererTable}, so it takes this and nothing else. Two used
193
186
  * to take a second argument. The connector's `shapeIds` map is genuine context and moved onto this
194
- * interface; the image's `{ imgWidth, imgHeight }` was `frame.cx`/`frame.cy` under another name —
195
- * the dispatch captured them from the same two variables the frame is built from, two statements
196
- * apart — so it reads the frame instead.
187
+ * interface; the image's `{ imgWidth, imgHeight }` was `frame.cx`/`frame.cy` under another name
188
+ * (the dispatch captured them from the same two variables the frame is built from, two statements
189
+ * apart), so it reads the frame instead.
197
190
  */
198
191
  interface RenderContext {
199
192
  /** The slide object being emitted. */
@@ -202,20 +195,20 @@ interface RenderContext {
202
195
  * Its `<p:cNvPr>` id, from the one allocator (`collectSlideShapeIds`).
203
196
  *
204
197
  * Every renderer used to recompute it as `idx + 2` off the walk index, and the group walk
205
- * kept a second counter for children — so the map that answers a forward reference (a
198
+ * kept a second counter for children, so the map that answers a forward reference (a
206
199
  * connector's `a:stCxn`, an animation's `p:spTgt spid`) and the ids actually emitted were two
207
200
  * derivations that had to be kept in step by hand.
208
201
  */
209
202
  shapeId: number;
210
203
  /**
211
- * Every object's id, not just this one's — the whole map `shapeId` was read out of.
204
+ * Every object's id, not just this one's: the whole map `shapeId` was read out of.
212
205
  *
213
206
  * A forward reference resolves through it: a connector names its endpoints by `objectName`
214
207
  * and has to answer with the id the target will be emitted with, which the walk has not
215
208
  * reached yet.
216
209
  */
217
210
  shapeIds: ReadonlyMap<SlideObject, number>;
218
- /** The page it belongs to — a slide, a layout or the master. */
211
+ /** The page it belongs to: a slide, a layout or the master. */
219
212
  slide: PresSlideInternal | SlideLayoutInternal | SlideMasterInternal;
220
213
  /** The resolved box in EMU: normalized for negative extents, then overridden by a placeholder. */
221
214
  frame: {
@@ -248,7 +241,7 @@ type RenderedObjectType = SlideObjectType.chart | SlideObjectType.connector | Sl
248
241
  /** One shape family's emitter: everything it needs is in the {@link RenderContext}. */
249
242
  type ObjectRenderer = (ctx: RenderContext) => string;
250
243
  /**
251
- * Which renderer emits each shape family — the dispatch's whole knowledge of what a family's XML
244
+ * Which renderer emits each shape family: the dispatch's whole knowledge of what a family's XML
252
245
  * looks like, supplied to it from outside.
253
246
  *
254
247
  * It has to come from outside. A named import inside a reachable function body is retained
@@ -264,8 +257,6 @@ type ObjectRenderer = (ctx: RenderContext) => string;
264
257
  * absent is a routing bug rather than a silent omission, and the dispatch throws.
265
258
  */
266
259
  type RendererTable = Partial<Record<RenderedObjectType, ObjectRenderer>>;
267
- //#endregion
268
- //#region src/gen/opc/content-types.d.ts
269
260
  /** One `Default` entry: a file extension, and the content type every part named with it carries. */
270
261
  interface ContentTypeDefault {
271
262
  readonly extension: string;
@@ -273,7 +264,7 @@ interface ContentTypeDefault {
273
264
  }
274
265
  /**
275
266
  * One `Override` entry: an absolute part name and its content type. `leadingSpace` asks for the
276
- * historic insignificant space before the tag — see {@link LEADING_SPACE}; which entries carry it
267
+ * historic insignificant space before the tag (see {@link LEADING_SPACE}); which entries carry it
277
268
  * is a fact about the bytes already shipped, not a style choice.
278
269
  */
279
270
  interface ContentTypeOverride {
@@ -281,9 +272,7 @@ interface ContentTypeOverride {
281
272
  readonly contentType: string;
282
273
  readonly leadingSpace?: boolean;
283
274
  }
284
- //#endregion
285
- //#region src/package/parts/shared.d.ts
286
- /** A slide, a layout, or the master — anything carrying the rel arrays a part can be derived from. */
275
+ /** A slide, a layout, or the master: anything carrying the rel arrays a part can be derived from. */
287
276
  type PartTarget = PresSlideInternal | SlideLayoutInternal | SlideMasterInternal;
288
277
  /**
289
278
  * One construct family's contribution to the package.
@@ -312,11 +301,16 @@ interface ContributedParts {
312
301
  /** Written once, after the slide master and its rels. */
313
302
  readonly afterMaster?: (pres: PresentationPropsInternal, zip: ZipWriter) => void;
314
303
  /**
315
- * Written from one target's rel arrays, for every layout, then every slide, then the master —
304
+ * Written from one target's rel arrays, for every layout, then every slide, then the master,
316
305
  * last, alongside the media parts. Any promises returned join the single pool the packager
317
306
  * awaits, so a family with async part work does not serialize the write.
318
307
  */
319
308
  readonly fromTargetRels?: (target: PartTarget, zip: ZipWriter) => Promise<unknown>[] | void;
309
+ /**
310
+ * `a:tblStyle` elements for `ppt/tableStyles.xml`. The core writes that part, because every
311
+ * deck has one; a family only says what goes in it.
312
+ */
313
+ readonly tableStyles?: (pres: PresentationPropsInternal) => string[];
320
314
  }
321
315
  /**
322
316
  * Which `[Content_Types].xml` entries a family needs. Each hook names the slot its entries land
@@ -329,8 +323,6 @@ interface ContributedContentTypes {
329
323
  readonly perLayout?: (layout: SlideLayoutInternal, layoutNumber: number) => ContentTypeOverride[];
330
324
  readonly trailing?: (pres: PresentationPropsInternal) => ContentTypeOverride[];
331
325
  }
332
- //#endregion
333
- //#region src/slide.d.ts
334
326
  declare class SlideBuilder {
335
327
  #private;
336
328
  private readonly _setSlideNum;
@@ -361,7 +353,7 @@ declare class SlideBuilder {
361
353
  * The authoring methods, one per construct family, bound in the constructor.
362
354
  *
363
355
  * Declared here and assigned there: the signature each one keeps is the public one on
364
- * {@link Slide}, and a method the presentation was not composed with still answers — with the
356
+ * {@link Slide}, and a method the presentation was not composed with still answers, with the
365
357
  * name of the family it needs, rather than `undefined is not a function`.
366
358
  */
367
359
  addAnimation: Slide['addAnimation'];
@@ -384,13 +376,13 @@ declare class SlideBuilder {
384
376
  constructor(params: {
385
377
  addSlide: (layout: SlideLayoutInternal | null) => PresSlideInternal;
386
378
  getSlide: (slideNum: number) => PresSlideInternal | undefined;
387
- getSections?: () => SectionInternalProps[];
379
+ getSections: () => SectionInternalProps[];
388
380
  presLayout: PresLayout;
389
381
  setSlideNum: (value: SlideNumberProps) => void;
390
382
  slideId: number;
391
383
  slideRId: number;
392
384
  slideNumber: number;
393
- slideLayout?: SlideLayoutInternal;
385
+ slideLayout: SlideLayoutInternal;
394
386
  authors: SlideAuthors;
395
387
  childAuthors: ChildAuthors;
396
388
  });
@@ -454,8 +446,6 @@ declare class SlideBuilder {
454
446
  /** Slide height in inches (resolved from the active presentation layout). */
455
447
  get height(): number;
456
448
  }
457
- //#endregion
458
- //#region src/families/shared.d.ts
459
449
  /**
460
450
  * Every construct family, by name. A name is what a diagnostic can say about a family that is not
461
451
  * composed, so it exists even for the families every tier carries.
@@ -465,7 +455,7 @@ type FamilyName = 'animations' | 'chart' | 'comments' | 'connector' | 'group' |
465
455
  type SlideAuthorMethod = 'addAnimation' | 'addChart' | 'addComment' | 'addConnector' | 'addGroup' | 'addImage' | 'addMedia' | 'addModel3d' | 'addNotes' | 'addOleObject' | 'addSectionZoom' | 'addShape' | 'addSlideZoom' | 'addSummaryZoom' | 'addTable' | 'addText' | 'groupObjects';
466
456
  /**
467
457
  * One family method's author: the public signature, with the slide it authors onto in front and
468
- * the return dropped. Chaining is not the author's business — `SlideBuilder` returns the slide
458
+ * the return dropped. Chaining is not the author's business: `SlideBuilder` returns the slide
469
459
  * from every bound method, so an author that returned one could only return the same one.
470
460
  */
471
461
  type Author<M extends SlideAuthorMethod> = (slide: SlideBuilder, ...args: Parameters<Slide[M]>) => void;
@@ -514,7 +504,7 @@ type ChildDescriptorKey = 'chart' | 'image' | 'line' | 'rect' | 'roundRect' | 's
514
504
  type ChildDescriptor<K extends ChildDescriptorKey> = Extract<SlideMasterObject, Record<K, unknown>>[K];
515
505
  /**
516
506
  * The child descriptors a list of families recognises. A descriptor whose key is missing is one
517
- * nothing composed can author, and both walks warn — naming the family behind the key when
507
+ * nothing composed can author, and both walks warn, naming the family behind the key when
518
508
  * {@link CHILD_DESCRIPTOR_FAMILIES} has one, so a `{ chart: … }` in a master's `objects` on a
519
509
  * chartless presentation says what to compose rather than disappearing from the deck.
520
510
  */
@@ -548,15 +538,13 @@ interface ConstructFamily {
548
538
  readonly extract?: SlideExtractors;
549
539
  }
550
540
  /**
551
- * A presentation author with its context already supplied — what a method on the presentation
541
+ * A presentation author with its context already supplied: what a method on the presentation
552
542
  * calls, having nothing left to pass but its own arguments.
553
543
  */
554
544
  type BoundPresentationAuthor<F> = F extends ((ctx: PresentationAuthorContext, ...args: infer A) => infer R) ? (...args: A) => R : never;
555
- //#endregion
556
- //#region src/presentation.d.ts
557
545
  /**
558
- * Main presentation class and package export flow — the public entry point consumers
559
- * instantiate (`new TsPptx()`). Owns presentation-level state and metadata, collects
546
+ * Main presentation class and package export flow: the public entry point consumers
547
+ * instantiate (`new PptxTs()`). Owns presentation-level state and metadata, collects
560
548
  * slides, and drives `write`/`writeFile`/`stream`. The actual OOXML string building is
561
549
  * delegated to the `gen-*` modules; runtime file/stream output goes through the injected
562
550
  * `RuntimeAdapter`. Enums (`AlignH`, `ChartType`, `ShapeType`, …) are imported from the
@@ -565,12 +553,12 @@ type BoundPresentationAuthor<F> = F extends ((ctx: PresentationAuthorContext, ..
565
553
  * Rough layout of the class body:
566
554
  * - Metadata accessors layout / author / company / title / theme / sections getters+setters
567
555
  * - Private slide helpers addNewSlide, getSlide, setSlideNumber
568
- * - Public export methods stream / write / writeFile — delegate packaging to `writePackage`
556
+ * - Public export methods stream / write / writeFile; delegate packaging to `writePackage`
569
557
  * - Public authoring methods addSlide / defineLayout / defineSlideMaster / defineTableStyle
570
558
  *
571
559
  * Package assembly (`[Content_Types].xml`, the rels graph, per-part XML, the ZIP) lives in
572
560
  * `package/assemble.ts`; this class provides the deck state via {@link PresentationCore.packageSource}.
573
- * The live-DOM `tableToSlides()` is NOT here — it is added by the browser entry subclass
561
+ * The live-DOM `tableToSlides()` is NOT here; it is added by the browser entry subclass
574
562
  * (`browser.ts`) so it stays out of the Node build and out of the core chunk.
575
563
  */
576
564
  declare class PresentationCore {
@@ -591,7 +579,7 @@ declare class PresentationCore {
591
579
  set layout(value: string | StandardLayout);
592
580
  get layout(): string;
593
581
  /**
594
- * ts-pptx Library Version
582
+ * pptx-ts Library Version
595
583
  */
596
584
  private readonly _version;
597
585
  get version(): string;
@@ -659,7 +647,7 @@ declare class PresentationCore {
659
647
  /**
660
648
  * slide layout definition objects, used for generating slide layout files.
661
649
  * `protected` (not `private`) so the browser entry subclass can resolve
662
- * `tableToSlides({ masterTitle })` against them — that method lives on the
650
+ * `tableToSlides({ masterTitle })` against them. That method lives on the
663
651
  * browser build only (it reads a live DOM), see `browser.ts`.
664
652
  */
665
653
  protected readonly _slideLayouts: SlideLayoutInternal[];
@@ -693,7 +681,7 @@ declare class PresentationCore {
693
681
  */
694
682
  private readonly getSections;
695
683
  /**
696
- * Enables the `Slide` class to set ts-pptx [Presentation] master/layout slidenumbers
684
+ * Enables the `Slide` class to set pptx-ts [Presentation] master/layout slidenumbers
697
685
  * @param {SlideNumberProps} slideNum - slide number config
698
686
  */
699
687
  private readonly setSlideNumber;
@@ -706,14 +694,14 @@ declare class PresentationCore {
706
694
  * Author + serialize this presentation's slides as injectable descriptors,
707
695
  * WITHOUT producing a `.pptx` package. Runs the same media-encode, placeholder
708
696
  * backfill, and measured-fit passes `write()` uses, then serializes each slide
709
- * body and resolves its image media to decoded bytes — so a loaded deck can
697
+ * body and resolves its image media to decoded bytes, so a loaded deck can
710
698
  * splice the slides in via `Presentation.appendSlides()` (see `pptx-ts/read`)
711
699
  * while keeping its own masters/layouts/theme byte-identical.
712
700
  *
713
701
  * Returns the deck's slide size (EMU, for the destination size check) and one
714
702
  * descriptor per authored slide. Charts, audio/video media, online media, and
715
703
  * internal slide-to-slide hyperlinks are surfaced as descriptors alongside the
716
- * serialized body — this method does not resolve them into a package; the append
704
+ * serialized body. This method does not resolve them into a package; the append
717
705
  * path consumes each descriptor to reserve the parts and rebuild the rel graph.
718
706
  */
719
707
  extractSlides: (opts?: {
@@ -793,11 +781,11 @@ declare class PresentationCore {
793
781
  }): Promise<void>;
794
782
  /**
795
783
  * Measure how tall text wraps at a given width, using the **same** calibrated wrap
796
- * model the export-time autofit bake uses — so a layout-time prediction matches the
784
+ * model the export-time autofit bake uses, so a layout-time prediction matches the
797
785
  * value `fit:'shrink'`/`'resize'` would bake. Synchronous: register the face's metrics
798
- * first with {@link TsPptx.registerFontMetrics} (lookup is sync).
786
+ * first with {@link PptxTs.registerFontMetrics} (lookup is sync).
799
787
  *
800
- * Lets a consumer size its own geometry before export — grow a card to fit its text,
788
+ * Lets a consumer size its own geometry before export: grow a card to fit its text,
801
789
  * reflow a grid, or detect overflow at layout time. Heights err **tall** (conservative),
802
790
  * so the returned height is ≥ what PowerPoint/LibreOffice render.
803
791
  * @param {string | TextProps[]} text - a string or run array (per-run options override the defaults in `opts`)
@@ -810,7 +798,7 @@ declare class PresentationCore {
810
798
  /**
811
799
  * Convenience overflow check: `true` if `text` does not fit a box of inner size
812
800
  * `wIn`×`hIn` (inches) at full size. Because the model errs tall, this is a
813
- * **conservative** (slightly over-reporting) check — appropriate for a build-time
801
+ * **conservative** (slightly over-reporting) check, appropriate for a build-time
814
802
  * warning, not a hard gate. An unmeasurable (unnamed theme-default) face reports
815
803
  * `false` (no overflow) so the linter does not false-positive on faces it cannot measure.
816
804
  * @param {string | TextProps[]} text - a string or run array
@@ -820,13 +808,13 @@ declare class PresentationCore {
820
808
  overflowsBox(text: string | TextProps[], opts: OverflowBoxOptions): boolean;
821
809
  /**
822
810
  * Compute the per-cell geometry of a table laid out at `opts.x`/`y`/`w`, without
823
- * adding it to a slide — so a consumer can place images or shapes precisely over
811
+ * adding it to a slide, so a consumer can place images or shapes precisely over
824
812
  * cells. Column widths (cell `x`/`w`) are exact, derived from the same logic the
825
813
  * writer uses. Row heights (`y`/`h`) are exact when pinned by `rowH` (array or
826
814
  * scalar) or table `h`; an auto-height row is estimated with the same conservative
827
- * (tall) text model as {@link TsPptx.measureText} and flagged `heightExact:false`
828
- * (register the cell font via {@link TsPptx.registerFontMetrics} for an exact
829
- * estimate). Geometry is for a single, un-paginated table — `autoPage` paging is
815
+ * (tall) text model as {@link PptxTs.measureText} and flagged `heightExact:false`
816
+ * (register the cell font via {@link PptxTs.registerFontMetrics} for an exact
817
+ * estimate). Geometry is for a single, un-paginated table; `autoPage` paging is
830
818
  * not modeled.
831
819
  * @param {TableRow[]} rows - the same `rows` passed to `slide.addTable`
832
820
  * @param {TableProps} opts - the same table options (`x`, `y`, `w`, `colW`, `rowH`, `h`, …)
@@ -849,11 +837,13 @@ declare class PresentationCore {
849
837
  /**
850
838
  * Export the current Presentation as ZIP content with the selected type
851
839
  * @param {WriteProps} props output properties
852
- * @returns {Promise<string | ArrayBuffer | Blob | Uint8Array>} file content in selected type
840
+ * @returns file content in the selected type: a `Blob` when `outputType` is left out, else
841
+ * the {@link WriteOutputMap} entry for it
842
+ * @example const bytes = await pptx.write({ outputType: 'uint8array' }) // Uint8Array, no cast
853
843
  */
854
- write(props?: WriteProps): Promise<string | ArrayBuffer | Blob | Uint8Array>;
844
+ write<T extends WRITE_OUTPUT_TYPE = 'blob'>(props?: WriteProps<T>): Promise<WriteOutputMap[T]>;
855
845
  /**
856
- * Assemble the current Presentation into its OOXML package parts WITHOUT zipping — the raw
846
+ * Assemble the current Presentation into its OOXML package parts WITHOUT zipping: the raw
857
847
  * `path → bytes` contents `write()` would compress into the `.pptx`. Use this to stream parts
858
848
  * into a custom container, inspect individual parts, or feed a pipeline that does its own
859
849
  * archiving. To produce a real `.pptx` file, use {@link write} / {@link writeFile} instead.
@@ -907,22 +897,16 @@ declare class PresentationCore {
907
897
  */
908
898
  defineSlideMaster(props: SlideMasterProps): void;
909
899
  }
910
- //#endregion
911
- //#region src/gen/slide/objects/text.d.ts
912
900
  /**
913
901
  * Render a `text` / `placeholder` slide object to its `<p:sp>` XML.
914
902
  */
915
903
  declare function renderTextObject(ctx: RenderContext): string;
916
- //#endregion
917
- //#region src/gen/slide/objects/image.d.ts
918
904
  /**
919
905
  * Render an `image` slide object to its `<p:pic>` XML (sizing/crop, rounding, hyperlink, shadow).
920
906
  */
921
907
  declare function renderImageObject(ctx: RenderContext): string;
922
- //#endregion
923
- //#region src/families/core.d.ts
924
908
  /**
925
- * ts-pptx: the construct families every presentation carries
909
+ * pptx-ts: the construct families every presentation carries
926
910
  *
927
911
  * The core tier. A composed presentation gets these whether it asks for them or not, so
928
912
  * `createPresentation()` with no families still authors text, shapes, images, groups and speaker
@@ -987,8 +971,6 @@ declare const CORE_CONSTRUCT_FAMILIES: readonly [{
987
971
  };
988
972
  parts: PartContributor;
989
973
  }];
990
- //#endregion
991
- //#region src/entry-compose.d.ts
992
974
  /** Turn a union into the intersection of its members. */
993
975
  type UnionToIntersection<U> = (U extends unknown ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never;
994
976
  /** One method's public signature, re-pointed at the slide type the caller actually holds. */
@@ -1041,6 +1023,5 @@ interface ComposeOptions<Fs extends readonly ConstructFamily[]> {
1041
1023
  }
1042
1024
  /** What a family list composes to once the core tier is in front of it. */
1043
1025
  type Composed<Fs extends readonly ConstructFamily[]> = ComposedPresentation<SlideMethodsOf<[...typeof CORE_CONSTRUCT_FAMILIES, ...Fs]>, PresentationMethodsOf<[...typeof CORE_CONSTRUCT_FAMILIES, ...Fs]>>;
1044
- //#endregion
1045
1026
  export { pixelsToEmu as A, StandardLayoutName as C, emuToPoints as D, emuToPixels as E, ptToHundredths as M, inchesToEmu as O, StandardLayout as S, emuToInches as T, HUNDREDTHS_PER_POINT as _, renderImageObject as a, PERCENT_SCALE as b, ConstructFamily as c, PartContributor as d, RenderContext as f, FIXED_PCT_PER_PERCENT as g, Emu as h, ComposedSlide as i, pointsToEmu as j, percentToEmu as k, PresentationAuthorContext as l, DEFAULT_PX_PER_INCH as m, Composed as n, renderTextObject as o, ANGLE_UNITS_PER_DEGREE as p, ComposedPresentation as r, PresentationCore as s, ComposeOptions as t, SlideBuilder as u, MAX_COORDINATE_EMU as v, coordToEmu as w, STANDARD_LAYOUTS as x, MIN_COORDINATE_EMU as y };
1046
- //# sourceMappingURL=entry-compose-DCnvBZz2.d.ts.map
1027
+ //# sourceMappingURL=entry-compose-CiakSt-f.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entry-compose-CiakSt-f.d.ts","names":["_$___slide_js0.default"],"sources":["../src/runtime/types.ts","../src/units.ts","../src/gen/oxml/el.ts","../src/gen/slide/objects/shared.ts","../src/gen/opc/content-types.ts","../src/package/parts/shared.ts","../src/slide.ts","../src/families/shared.ts","../src/presentation.ts","../src/gen/slide/objects/text.ts","../src/gen/slide/objects/image.ts","../src/families/core.ts","../src/entry-compose.ts"],"mappings":";;;;;;;;KAIY;WACF,qBAAqB;;;;;;;;;;;;EAY9B,YAAY,KAAK;IAAkB;QAAmB;;;;;;;;;EAStD,sBAAsB,KAAK,kBAAkB,QAAQ;EACrD,YAAY,kBAAkB,eAAe,cAAc,OAAO,eAAe;;;;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AAsB,oBAAoB,qBAAqB,cACpE,oBAAoB,QAAQ;EAAc;kCAC1C;;;;;;;;;KAWK,cAAc,UAAU,qBAAqB,KAAK,OAAO,wBACnE,KAAK,IAAI,gBAAgB,4BACvB,iBAAiB,cAAc,IAAI,KACnC,QAAQ,MAAM,IAAI,cAAc;;KAI/B,+BACH,WAAW,wBAAwB,wBAAwB,YAAY,oBAAoB;;;;;KAOjF,qBAAqB,UAAU,mBAAmB,gBAAgB,uBAAuB,KACpG,qCACmB,uBAEnB,KAAK,2BAA2B;EAAO,WAAW,UAAU,kBAAkB,cAAc;;;UAG5E,eAAe,oBAAoB;;EAEnD,MAAM;;;KAIK,SAAS,oBAAoB,qBAAqB,qBAC7D,0BAA0B,4BAA4B,MACtD,iCAAiC,4BAA4B"}
@@ -1,6 +1,6 @@
1
- //#region src/diagnostics.ts
1
+ // src/diagnostics.ts
2
2
  /** Prefix stamped on every warning so consumers can attribute console noise to this library. */
3
- const WARN_PREFIX = "ts-pptx";
3
+ const WARN_PREFIX = "pptx-ts";
4
4
  /** The default handler: one `console.warn` line per diagnostic, prefixed. */
5
5
  const consoleHandler = (diagnostic) => {
6
6
  console.warn(`${WARN_PREFIX}: ${diagnostic.message}`);
@@ -34,7 +34,7 @@ function setDiagnosticHandler(next) {
34
34
  /**
35
35
  * Emit a library diagnostic.
36
36
  * @param code - the stable condition identifier ({@link DiagnosticCode})
37
- * @param message - explanation, without a `ts-pptx:` prefix (the default handler adds one)
37
+ * @param message - explanation, without a `pptx-ts:` prefix (the default handler adds one)
38
38
  * @param detail - optional structured context
39
39
  */
40
40
  function warn(code, message, detail) {
@@ -53,7 +53,7 @@ const seen = /* @__PURE__ */ new Set();
53
53
  *
54
54
  * "Once" is **process-global**, the same scope {@link setDiagnosticHandler} has and for the
55
55
  * same reason: the emitting code is a tree of free functions in `gen/**` with no presentation
56
- * in scope. The consequence is different, though, and worth stating on its own — a process that
56
+ * in scope. The consequence is different, though, and worth stating on its own: a process that
57
57
  * builds several decks does not get a second report of a condition an earlier deck already
58
58
  * tripped, so the second deck's diagnostics are incomplete rather than merely unattributed.
59
59
  * {@link resetDiagnosticState} is how a host that cares gets each build a clean slate.
@@ -80,24 +80,23 @@ function warnOnce(code, message, detail) {
80
80
  * building decks from user input accumulates one entry per distinct bad value with no way to
81
81
  * release them.
82
82
  *
83
- * This does not touch the handler — {@link setDiagnosticHandler} owns that, and the two are
83
+ * This does not touch the handler. {@link setDiagnosticHandler} owns that, and the two are
84
84
  * reset independently on purpose: a host usually installs its handler once and wants it to
85
85
  * survive.
86
86
  */
87
87
  function resetDiagnosticState() {
88
88
  seen.clear();
89
89
  }
90
- //#endregion
91
- //#region src/errors.ts
90
+ // src/errors.ts
92
91
  /**
93
- * Base class for every error ts-pptx throws.
92
+ * Base class for every error pptx-ts throws.
94
93
  *
95
94
  * Catch this to catch anything from the library; narrow with `instanceof` on a subclass, or branch
96
- * on {@link TsPptxError.code}, to react to something specific. It is never thrown directly — every
95
+ * on {@link PptxTsError.code}, to react to something specific. It is never thrown directly: every
97
96
  * site picks one of the five subclasses.
98
97
  */
99
- var TsPptxError = class extends Error {
100
- /** Stable condition identifier — see {@link ErrorCode}. Branch on this, not on the text. */
98
+ var PptxTsError = class extends Error {
99
+ /** Stable condition identifier (see {@link ErrorCode}). Branch on this, not on the text. */
101
100
  code;
102
101
  /** Structured context for the condition, when the throwing site had any to give. */
103
102
  detail;
@@ -114,14 +113,14 @@ var TsPptxError = class extends Error {
114
113
  }
115
114
  };
116
115
  /**
117
- * The caller passed something the library cannot use — a non-finite coordinate, an unknown enum
116
+ * The caller passed something the library cannot use: a non-finite coordinate, an unknown enum
118
117
  * value, a required option left out, a value outside its legal range.
119
118
  *
120
119
  * This is the error behind the project's throw-rather-than-coerce policy: emitting a degenerate
121
120
  * result (a zero-size shape, a silently dropped option) hides the mistake, so the library refuses
122
121
  * instead. Reaching one means the calling code needs to change.
123
122
  */
124
- var InvalidOptionError = class extends TsPptxError {
123
+ var InvalidOptionError = class extends PptxTsError {
125
124
  constructor(code, message, options) {
126
125
  super(code, message, options);
127
126
  }
@@ -131,24 +130,24 @@ var InvalidOptionError = class extends TsPptxError {
131
130
  * installed, the runtime lacks a capability, or the shape/feature has no OOXML representation the
132
131
  * library emits.
133
132
  *
134
- * Distinct from {@link InvalidOptionError} because the caller did nothing wrong — the answer is
135
- * "not here", not "not like that" — and the fix is usually to install something or pick a different
133
+ * Distinct from {@link InvalidOptionError} because the caller did nothing wrong (the answer is
134
+ * "not here", not "not like that"), and the fix is usually to install something or pick a different
136
135
  * approach rather than to correct a value.
137
136
  */
138
- var UnsupportedFeatureError = class extends TsPptxError {
137
+ var UnsupportedFeatureError = class extends PptxTsError {
139
138
  constructor(code, message, options) {
140
139
  super(code, message, options);
141
140
  }
142
141
  };
143
142
  /**
144
143
  * The bytes handed to the library are not a package it can read, or a part inside one is
145
- * structurally malformed — a missing `[Content_Types].xml`, a relationship pointing at nothing, a
144
+ * structurally malformed: a missing `[Content_Types].xml`, a relationship pointing at nothing, a
146
145
  * slide part with no root element.
147
146
  *
148
147
  * Always about *input*. A problem with something the library is being asked to produce is an
149
148
  * {@link InvalidOptionError}.
150
149
  */
151
- var PackageReadError = class extends TsPptxError {
150
+ var PackageReadError = class extends PptxTsError {
152
151
  constructor(code, message, options) {
153
152
  super(code, message, options);
154
153
  }
@@ -157,10 +156,10 @@ var PackageReadError = class extends TsPptxError {
157
156
  * A referenced image, font, or audio/video resource could not be fetched, read, or decoded.
158
157
  *
159
158
  * Kept apart from {@link PackageReadError} because the failure is in a resource the deck *points
160
- * at*, not in the package structure — a broken URL, an unreadable path, a corrupt font file — and
159
+ * at*, not in the package structure (a broken URL, an unreadable path, a corrupt font file), and
161
160
  * a consumer typically retries or substitutes rather than rejecting the deck.
162
161
  */
163
- var MediaError = class extends TsPptxError {
162
+ var MediaError = class extends PptxTsError {
164
163
  constructor(code, message, options) {
165
164
  super(code, message, options);
166
165
  }
@@ -168,35 +167,52 @@ var MediaError = class extends TsPptxError {
168
167
  /**
169
168
  * Where a report of an `InternalError` should go. Appended to the message rather than left to the
170
169
  * docs, because a stack trace is the only artefact of the failure that reaches whoever (or
171
- * whatever) is debugging it — a pointer anywhere else is a pointer they have to already be looking
170
+ * whatever) is debugging it. A pointer anywhere else is a pointer they have to already be looking
172
171
  * for. Most code that calls this library is written by an agent in a repository that is not this
173
172
  * one, and an agent that hits a library defect routes around it silently unless something in front
174
173
  * of it says the report is worth making.
175
174
  */
176
- const REPORT_NOTICE = "This is a bug in ts-pptx, not in your deck or your code. Please report it:\nhttps://github.com/shbernal/ts-pptx/issues/new?template=agent-report.yml";
175
+ const REPORT_NOTICE = "This is a bug in pptx-ts, not in your deck or your code. Please report it:\nhttps://github.com/shbernal/pptx-ts/issues/new?template=bug.yml";
177
176
  /**
178
177
  * An invariant the library maintains itself did not hold.
179
178
  *
180
179
  * No consumer input should be able to produce one, which is the whole reason it is a separate
181
- * class: seeing it means the bug is in ts-pptx, and the useful response is to file it rather than
180
+ * class: seeing it means the bug is in pptx-ts, and the useful response is to file it rather than
182
181
  * to keep adjusting the input.
183
182
  *
184
183
  * It is the one class in the taxonomy that extends its own message, appending `REPORT_NOTICE`
185
184
  * below the invariant that broke. The constructor is where that lives so a throw site added later
186
- * inherits it — the alternative, a notice pasted at each of the sites, is one every future site can
185
+ * inherits it. The alternative, a notice pasted at each of the sites, is one every future site can
187
186
  * forget. Every other class leaves `message` exactly as given: a malformed package is the routine
188
187
  * outcome for a library that reads untrusted files, and a "report this" banner on each corrupt
189
188
  * input would train callers to ignore the one banner that always means something.
190
189
  *
191
- * This does not make the message API — see the class doc on {@link TsPptxError}. Branch on
190
+ * This does not make the message API (see the class doc on {@link PptxTsError}). Branch on
192
191
  * `instanceof` or on {@link InternalError.code}, never on the text.
193
192
  */
194
- var InternalError = class extends TsPptxError {
193
+ var InternalError = class extends PptxTsError {
195
194
  constructor(code, message, options) {
196
195
  super(code, `${message}\n\n${REPORT_NOTICE}`, options);
197
196
  }
198
197
  };
199
- //#endregion
200
- export { TsPptxError as a, setDiagnosticHandler as c, PackageReadError as i, warn as l, InvalidOptionError as n, UnsupportedFeatureError as o, MediaError as r, resetDiagnosticState as s, InternalError as t, warnOnce as u };
198
+ // src/entry-errors.ts
199
+ /**
200
+ * pptx-ts: the error taxonomy, as every entry point republishes it
201
+ *
202
+ * Every failure the library throws. The classes and their `code` are API; the message is not.
203
+ *
204
+ * Each published subpath (`.`, `./read`, `./html`, `./zip`, …) re-exports this module so
205
+ * `instanceof` works whichever one a consumer imports. That property depends on all of them
206
+ * resolving to a single `errors.js`. They do, because there is one module here and
207
+ * every entry names it. This file exists so that stays structurally true: the list used to be
208
+ * pasted into all ten entries, identical down to the comment, and nothing would have caught
209
+ * one of them drifting.
210
+ *
211
+ * Entries re-export it wholesale (`export * from './entry-errors.js'`) rather than naming the
212
+ * members again, so adding an error class publishes it everywhere in one edit.
213
+ */
214
+ /** @deprecated Renamed to {@link PptxTsError}. This alias is removed in v5. */
215
+ const TsPptxError = PptxTsError;
216
+ export { PackageReadError as a, resetDiagnosticState as c, warnOnce as d, MediaError as i, setDiagnosticHandler as l, InternalError as n, PptxTsError as o, InvalidOptionError as r, UnsupportedFeatureError as s, TsPptxError as t, warn as u };
201
217
 
202
- //# sourceMappingURL=errors-C4oENPcu.js.map
218
+ //# sourceMappingURL=entry-errors-JMthgJ2g.js.map