@shbernal/ts-pptx 4.1.0 → 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 +11 -11
  2. package/dist/anim-presets-Qbgh8uut.js +55 -0
  3. package/dist/anim-presets-Qbgh8uut.js.map +1 -0
  4. package/dist/{autopage-D4kyVp11.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-kVHmjGc6.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-DwDbakcl.js → chart-metadata-CwiTTcJq.js} +576 -538
  15. package/dist/chart-metadata-CwiTTcJq.js.map +1 -0
  16. package/dist/{clip-DHDlnHUq.d.ts → clip-ISfCMtWA.d.ts} +6 -10
  17. package/dist/clip-ISfCMtWA.d.ts.map +1 -0
  18. package/dist/{notes-BcT571R4.js → comments-CKIZYRbZ.js} +517 -389
  19. package/dist/comments-CKIZYRbZ.js.map +1 -0
  20. package/dist/{diagnostics-DiMmBU8P.d.ts → diagnostics-MoA4MBq5.d.ts} +52 -50
  21. package/dist/diagnostics-MoA4MBq5.d.ts.map +1 -0
  22. package/dist/{embedded-fonts-CI_YGW2d.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-6hF9aTmT.d.ts → entry-compose-CiakSt-f.d.ts} +53 -74
  25. package/dist/entry-compose-CiakSt-f.d.ts.map +1 -0
  26. package/dist/{errors-Da2nXCJm.js → entry-errors-JMthgJ2g.js} +41 -25
  27. package/dist/entry-errors-JMthgJ2g.js.map +1 -0
  28. package/dist/{table-cell-margins-PDshga8T.js → enums-BP9wsb9Q.js} +42 -45
  29. package/dist/enums-BP9wsb9Q.js.map +1 -0
  30. package/dist/{enums-DQRpVOLh.d.ts → enums-PcXr3o3J.d.ts} +11 -12
  31. package/dist/{enums-DQRpVOLh.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-CcXbg__l.js → fit-Bpmzep6O.js} +60 -52
  36. package/dist/fit-Bpmzep6O.js.map +1 -0
  37. package/dist/{font-metrics-CBGmhLo0.d.ts → font-metrics-DTppw4t3.d.ts} +61 -37
  38. package/dist/font-metrics-DTppw4t3.d.ts.map +1 -0
  39. package/dist/{grid-9B2w5EaY.js → grid-DUIMxjfl.js} +23 -26
  40. package/dist/grid-DUIMxjfl.js.map +1 -0
  41. package/dist/{html-dom-DvJmuHt2.js → html-dom-LZCgntnJ.js} +42 -43
  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 +14 -16
  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-BgLPbwbL.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-KoEgVwII.d.ts → package-CANBWuSm.d.ts} +4 -12
  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-BA9_lJbY.d.ts → pres-BkEkUAEM.d.ts} +383 -230
  75. package/dist/pres-BkEkUAEM.d.ts.map +1 -0
  76. package/dist/{presentation-Cyl74rq2.js → presentation-4Ggq0_Xa.js} +408 -288
  77. package/dist/presentation-4Ggq0_Xa.js.map +1 -0
  78. package/dist/{presentation-types-B3VQH4Bz.d.ts → presentation-types-BgnZR-0a.d.ts} +1104 -457
  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 +2697 -777
  86. package/dist/script.js.map +1 -1
  87. package/dist/{shapes-BcyFdZpp.js → shapes-CAPOjU0Q.js} +1556 -487
  88. package/dist/shapes-CAPOjU0Q.js.map +1 -0
  89. package/dist/{slide-BqPtyKmb.d.ts → slide-BmT4kMoO.d.ts} +94 -86
  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-CVbvUfgh.js → table-dom-BYga4FYY.js} +3 -4
  94. package/dist/{table-dom-CVbvUfgh.js.map → table-dom-BYga4FYY.js.map} +1 -1
  95. package/dist/{text-BvFFMMFQ.js → text-CU08xJGs.js} +365 -318
  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-DFcUYjh3.js → units-internal-BR3a4cIi.js} +26 -29
  100. package/dist/units-internal-BR3a4cIi.js.map +1 -0
  101. package/dist/{zip-CYZ0F6BV.js → zip-7JTh61LX.js} +8 -10
  102. package/dist/zip-7JTh61LX.js.map +1 -0
  103. package/dist/{zip-CTll_dr0.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-BoNyOlPm.js → zoom-CSSeOwM8.js} +1153 -583
  108. package/dist/zoom-CSSeOwM8.js.map +1 -0
  109. package/package.json +20 -21
  110. package/skills/{ts-pptx-upstream → pptx-ts-upstream}/SKILL.md +27 -74
  111. package/dist/autopage-D4kyVp11.js.map +0 -1
  112. package/dist/binary-string-CKVAYI3M.js.map +0 -1
  113. package/dist/body-insets-kVHmjGc6.js.map +0 -1
  114. package/dist/clip-DHDlnHUq.d.ts.map +0 -1
  115. package/dist/diagnostics-DiMmBU8P.d.ts.map +0 -1
  116. package/dist/embedded-fonts-CI_YGW2d.d.ts.map +0 -1
  117. package/dist/entry-compose-6hF9aTmT.d.ts.map +0 -1
  118. package/dist/errors-Da2nXCJm.js.map +0 -1
  119. package/dist/fit-CcXbg__l.js.map +0 -1
  120. package/dist/font-metrics-CBGmhLo0.d.ts.map +0 -1
  121. package/dist/grid-9B2w5EaY.js.map +0 -1
  122. package/dist/html-dom-DvJmuHt2.js.map +0 -1
  123. package/dist/image-size-DwDbakcl.js.map +0 -1
  124. package/dist/notes-BcT571R4.js.map +0 -1
  125. package/dist/options-internal-WqgMf720.js.map +0 -1
  126. package/dist/package-KoEgVwII.d.ts.map +0 -1
  127. package/dist/playbtn-CUqQdoDf.js.map +0 -1
  128. package/dist/pres-BA9_lJbY.d.ts.map +0 -1
  129. package/dist/presentation-Cyl74rq2.js.map +0 -1
  130. package/dist/presentation-types-B3VQH4Bz.d.ts.map +0 -1
  131. package/dist/shapes-BcyFdZpp.js.map +0 -1
  132. package/dist/slide-BqPtyKmb.d.ts.map +0 -1
  133. package/dist/table-cell-margins-PDshga8T.js.map +0 -1
  134. package/dist/text-BvFFMMFQ.js.map +0 -1
  135. package/dist/text-anchor-BgLPbwbL.js.map +0 -1
  136. package/dist/units-internal-DFcUYjh3.js.map +0 -1
  137. package/dist/zip-CTll_dr0.d.ts.map +0 -1
  138. package/dist/zip-CYZ0F6BV.js.map +0 -1
  139. package/dist/zoom-BoNyOlPm.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-DQRpVOLh.js";
2
- import { $ as ChartOpts, At as NotesProps, C as HexColor, Ht as TextProps, It as TableLayoutResult, Mt as OverflowBoxOptions, Pt as SlideComment, Q as ChartMulti, St as OptsChartData, Ut as TextPropsOptions, Vt as TextMeasurement, c as WriteFileProps, f as ThemeProps, i as PresLayout, kt as MeasureTextOptions, l as WriteOutputMap, n as PackagePart, o as SectionProps, p as BackgroundOption, qt as ImageProps, r as PartsProps, rn as ShapeProps, s as WriteBaseProps, t as CustomPropertyValue, u as WriteProps } from "./pres-BA9_lJbY.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-BqPtyKmb.js";
4
- import { r as EmbeddedFontSlot } from "./embedded-fonts-CI_YGW2d.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-CBGmhLo0.js";
6
- import { s as MediaError } from "./diagnostics-DiMmBU8P.js";
7
- import { c as ExtractedSlides, s as ExtractedSlide } from "./presentation-types-B3VQH4Bz.js";
8
- import { r as ZipWriter } from "./zip-CTll_dr0.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
@@ -100,7 +97,7 @@ interface StandardLayout {
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 pptx-ts'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 {
@@ -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[];
@@ -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`, …)
@@ -855,7 +843,7 @@ declare class PresentationCore {
855
843
  */
856
844
  write<T extends WRITE_OUTPUT_TYPE = 'blob'>(props?: WriteProps<T>): Promise<WriteOutputMap[T]>;
857
845
  /**
858
- * 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
859
847
  * `path → bytes` contents `write()` would compress into the `.pptx`. Use this to stream parts
860
848
  * into a custom container, inspect individual parts, or feed a pipeline that does its own
861
849
  * archiving. To produce a real `.pptx` file, use {@link write} / {@link writeFile} instead.
@@ -909,20 +897,14 @@ declare class PresentationCore {
909
897
  */
910
898
  defineSlideMaster(props: SlideMasterProps): void;
911
899
  }
912
- //#endregion
913
- //#region src/gen/slide/objects/text.d.ts
914
900
  /**
915
901
  * Render a `text` / `placeholder` slide object to its `<p:sp>` XML.
916
902
  */
917
903
  declare function renderTextObject(ctx: RenderContext): string;
918
- //#endregion
919
- //#region src/gen/slide/objects/image.d.ts
920
904
  /**
921
905
  * Render an `image` slide object to its `<p:pic>` XML (sizing/crop, rounding, hyperlink, shadow).
922
906
  */
923
907
  declare function renderImageObject(ctx: RenderContext): string;
924
- //#endregion
925
- //#region src/families/core.d.ts
926
908
  /**
927
909
  * pptx-ts: the construct families every presentation carries
928
910
  *
@@ -989,8 +971,6 @@ declare const CORE_CONSTRUCT_FAMILIES: readonly [{
989
971
  };
990
972
  parts: PartContributor;
991
973
  }];
992
- //#endregion
993
- //#region src/entry-compose.d.ts
994
974
  /** Turn a union into the intersection of its members. */
995
975
  type UnionToIntersection<U> = (U extends unknown ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never;
996
976
  /** One method's public signature, re-pointed at the slide type the caller actually holds. */
@@ -1043,6 +1023,5 @@ interface ComposeOptions<Fs extends readonly ConstructFamily[]> {
1043
1023
  }
1044
1024
  /** What a family list composes to once the core tier is in front of it. */
1045
1025
  type Composed<Fs extends readonly ConstructFamily[]> = ComposedPresentation<SlideMethodsOf<[...typeof CORE_CONSTRUCT_FAMILIES, ...Fs]>, PresentationMethodsOf<[...typeof CORE_CONSTRUCT_FAMILIES, ...Fs]>>;
1046
- //#endregion
1047
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 };
1048
- //# sourceMappingURL=entry-compose-6hF9aTmT.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;;;;;;;EAOjF,eAAe,mBAAmB,QAAQ;;;;;;;cClB9B;;;;;;cAOA;;;;;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;;;;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,4 +1,4 @@
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
3
  const WARN_PREFIX = "pptx-ts";
4
4
  /** The default handler: one `console.warn` line per diagnostic, prefixed. */
@@ -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
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,12 +167,12 @@ 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 pptx-ts, not in your deck or your code. Please report it:\nhttps://github.com/shbernal/pptx-ts/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
  *
@@ -183,20 +182,37 @@ const REPORT_NOTICE = "This is a bug in pptx-ts, not in your deck or your code.
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-Da2nXCJm.js.map
218
+ //# sourceMappingURL=entry-errors-JMthgJ2g.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entry-errors-JMthgJ2g.js","names":[],"sources":["../src/diagnostics.ts","../src/errors.ts","../src/entry-errors.ts"],"sourcesContent":["/**\n * Central sink for library diagnostics.\n *\n * Every user-facing warning is routed through {@link warn} / {@link warnOnce} rather than calling\n * `console.warn` directly, so there is one place to apply a consistent prefix and one place a\n * consumer can take over (see {@link setDiagnosticHandler}). This module has no *runtime* imports\n * so it can be used from anywhere without risking an import cycle; `codes.ts` is types only and is\n * erased at compile time, so it does not cost that property.\n *\n * **A diagnostic's `code` is API; its `message` is not.** The code is a stable identifier a\n * consumer may branch on (`if (d.code === 'chart/non-finite-value')`); the wording behind it is\n * free to improve in any release. The vocabulary lives in `codes.ts` and is shared with the thrown\n * surface (`errors.ts`), so a condition that can both warn and throw reads the same either way.\n */\n\nimport type { DiagnosticCode } from './codes.js'\n\nexport type { DiagnosticCode }\n\n/** One diagnostic emitted by the library. */\nexport interface Diagnostic {\n\t/** Stable condition identifier; see {@link DiagnosticCode}. Branch on this, not on the text. */\n\treadonly code: DiagnosticCode\n\t/** Human-readable explanation. Free to change in any release; do not parse it. */\n\treadonly message: string\n\t/**\n\t * Structured context for the condition, when a site has any to give.\n\t *\n\t * Every rejection of an `ST_` enum value populates it: `checkEnumOrWarn` (`ooxml/check-enum.ts`)\n\t * carries `received` (the value the caller passed) and `valid`, the whole legal list, plus\n\t * whatever the call site adds. That reaches a handler for a line dash type, a table cell's 3-D\n\t * preset and a table's horizontal overflow, among others. Nothing else populates it yet, so a\n\t * handler must still treat the field as optional and must not assume a particular key is there\n\t * for a given code.\n\t */\n\treadonly detail?: Readonly<Record<string, unknown>>\n}\n\n/** Receives every {@link Diagnostic} the library emits. See {@link setDiagnosticHandler}. */\nexport type DiagnosticHandler = (diagnostic: Diagnostic) => void\n\n/** Prefix stamped on every warning so consumers can attribute console noise to this library. */\nconst WARN_PREFIX = 'pptx-ts'\n\n/** The default handler: one `console.warn` line per diagnostic, prefixed. */\nconst consoleHandler: DiagnosticHandler = (diagnostic) => {\n\tconsole.warn(`${WARN_PREFIX}: ${diagnostic.message}`)\n}\n\nlet handler: DiagnosticHandler = consoleHandler\n\n/**\n * Route every library diagnostic to `handler`, or pass `null` to restore the default\n * (one prefixed `console.warn` per diagnostic).\n *\n * This is process-global rather than per-presentation, deliberately: the emitting code is a tree\n * of free functions in `gen/**` with no presentation in scope, and threading a handler through\n * every signature would be a far larger and worse change than the problem warrants. The practical\n * consequence is that a process building several decks concurrently cannot attribute a diagnostic\n * to one of them. If that matters, correlate on `code`, or build the decks one at a time with the\n * handler set around each build: a handler set around concurrent builds sees all of their\n * diagnostics.\n *\n * A throwing handler propagates out of whatever library call emitted the diagnostic, which is the\n * supported way to make a specific condition fatal:\n *\n * ```ts\n * setDiagnosticHandler((d) => {\n * if (d.code === 'coord/bare-number-is-inches') throw new Error(d.message)\n * })\n * ```\n * @param next - the receiver, or `null` to restore the console default\n */\nexport function setDiagnosticHandler(next: DiagnosticHandler | null): void {\n\thandler = next ?? consoleHandler\n}\n\n/**\n * Emit a library diagnostic.\n * @param code - the stable condition identifier ({@link DiagnosticCode})\n * @param message - explanation, without a `pptx-ts:` prefix (the default handler adds one)\n * @param detail - optional structured context\n */\nexport function warn(code: DiagnosticCode, message: string, detail?: Readonly<Record<string, unknown>>): void {\n\thandler(detail === undefined ? { code, message } : { code, message, detail })\n}\n\n// Track diagnostics already emitted so a recurring condition (e.g. the same out-of-range fontSize\n// on every cell of a table) is reported once instead of flooding the handler. Keyed on code AND\n// message, so a *different* offending value under the same code still reports.\nconst seen = new Set<string>()\n\n/**\n * Emit a library diagnostic at most once per distinct code+message.\n *\n * \"Once\" is **process-global**, the same scope {@link setDiagnosticHandler} has and for the\n * same reason: the emitting code is a tree of free functions in `gen/**` with no presentation\n * in scope. The consequence is different, though, and worth stating on its own: a process that\n * builds several decks does not get a second report of a condition an earlier deck already\n * tripped, so the second deck's diagnostics are incomplete rather than merely unattributed.\n * {@link resetDiagnosticState} is how a host that cares gets each build a clean slate.\n *\n * @param code - the stable condition identifier ({@link DiagnosticCode})\n * @param message - explanation (see {@link warn})\n * @param detail - optional structured context\n */\nexport function warnOnce(code: DiagnosticCode, message: string, detail?: Readonly<Record<string, unknown>>): void {\n\tconst key = `${code}\\0${message}`\n\tif (seen.has(key)) return\n\tseen.add(key)\n\twarn(code, message, detail)\n}\n\n/**\n * Clear the `warnOnce` dedupe set, so a condition already reported reports again. (`warnOnce` is\n * internal and carries no page of its own, so it is named rather than linked.)\n *\n * Call it between builds in a host that builds more than one deck per process and wants each\n * build's diagnostics complete. Without it, deck two is silent about anything deck one already\n * warned for, which reads as \"no problems found\" rather than as \"already mentioned\".\n *\n * It also bounds the set. Most `warnOnce` messages interpolate the offending value, so a server\n * building decks from user input accumulates one entry per distinct bad value with no way to\n * release them.\n *\n * This does not touch the handler. {@link setDiagnosticHandler} owns that, and the two are\n * reset independently on purpose: a host usually installs its handler once and wants it to\n * survive.\n */\nexport function resetDiagnosticState(): void {\n\tseen.clear()\n}\n","/**\n * The library's error taxonomy.\n *\n * Every failure pptx-ts raises is a {@link PptxTsError} carrying a stable {@link ErrorCode}, so a\n * consumer can tell *\"you passed a bad coordinate\"* from *\"this font file is corrupt\"* from\n * *\"these bytes are not a package\"* without matching on message substrings. The classes are a\n * deliberately flat, coarse bucket (five of them), and the code carries the specificity. Do not\n * add a class per throw site; add a code.\n *\n * **The class and the code are API. The message is not.** Branch on `instanceof` and on `code`;\n * the wording behind them is free to improve in any release. Every error remains an\n * `instanceof Error`, so existing `catch` blocks keep working.\n *\n * Which class to reach for:\n *\n * | class | the failure is | who fixes it |\n * |---|---|---|\n * | {@link InvalidOptionError} | the caller passed something unusable | the caller's code |\n * | {@link UnsupportedFeatureError} | a well-formed request this build/runtime/shape cannot express | the caller's expectations, or the environment |\n * | {@link PackageReadError} | the input bytes are not a readable package | the input file |\n * | {@link MediaError} | a referenced image/font/AV resource would not load or decode | the resource |\n * | {@link InternalError} | an invariant of the library itself did not hold | pptx-ts (file a bug) |\n *\n * **Which of these is worth reporting upstream.** `InternalError` always is, and says so at\n * runtime. The middle three are worth reporting when the environment disagrees with us:\n * a `PackageReadError` on a file that opens cleanly in PowerPoint, a `MediaError` on an asset every\n * other tool loads, an `UnsupportedFeatureError` for something PowerPoint can plainly express.\n * `InvalidOptionError` is worth reporting only if the deck it refused is one PowerPoint can\n * express. See `skills/pptx-ts-upstream` for how to file one.\n *\n * @see `docs/errors-and-warnings.md` for the consumer-facing contract.\n * @see `codes.ts` for the code vocabulary, which is shared with the diagnostic (warning) surface.\n */\n\nimport type {\n\tErrorCode,\n\tInternalErrorCode,\n\tInvalidOptionErrorCode,\n\tMediaErrorCode,\n\tPackageReadErrorCode,\n\tUnsupportedFeatureErrorCode,\n} from './codes.js'\n\n/** Extra context accepted by every {@link PptxTsError} constructor. */\nexport interface PptxTsErrorOptions extends ErrorOptions {\n\t/**\n\t * Structured context for the condition, when a site has any to give. Mirrors `Diagnostic.detail`\n\t * so the same condition looks the same whether it was warned or thrown.\n\t */\n\treadonly detail?: Readonly<Record<string, unknown>>\n}\n\n/**\n * Base class for every error pptx-ts throws.\n *\n * Catch this to catch anything from the library; narrow with `instanceof` on a subclass, or branch\n * on {@link PptxTsError.code}, to react to something specific. It is never thrown directly: every\n * site picks one of the five subclasses.\n */\nexport class PptxTsError extends Error {\n\t/** Stable condition identifier (see {@link ErrorCode}). Branch on this, not on the text. */\n\treadonly code: ErrorCode\n\n\t/** Structured context for the condition, when the throwing site had any to give. */\n\treadonly detail?: Readonly<Record<string, unknown>>\n\n\t/**\n\t * @param code - the stable condition identifier\n\t * @param message - explanation for a human reading a stack trace; not part of the contract\n\t * @param options - standard `cause`, plus optional structured `detail`\n\t */\n\tconstructor(code: ErrorCode, message: string, options?: PptxTsErrorOptions) {\n\t\tsuper(message, options)\n\t\t// `name` drives how a stack trace and `console.log` label the error, and the default from\n\t\t// `Error` would say \"Error\" for every subclass. Derive it from the constructor so a subclass\n\t\t// never has to remember to set it.\n\t\tthis.name = new.target.name\n\t\tthis.code = code\n\t\tif (options?.detail !== undefined) this.detail = options.detail\n\t}\n}\n\n/**\n * The caller passed something the library cannot use: a non-finite coordinate, an unknown enum\n * value, a required option left out, a value outside its legal range.\n *\n * This is the error behind the project's throw-rather-than-coerce policy: emitting a degenerate\n * result (a zero-size shape, a silently dropped option) hides the mistake, so the library refuses\n * instead. Reaching one means the calling code needs to change.\n */\nexport class InvalidOptionError extends PptxTsError {\n\tdeclare readonly code: InvalidOptionErrorCode\n\tconstructor(code: InvalidOptionErrorCode, message: string, options?: PptxTsErrorOptions) {\n\t\tsuper(code, message, options)\n\t}\n}\n\n/**\n * The request is well-formed but cannot be expressed here: an optional peer dependency is not\n * installed, the runtime lacks a capability, or the shape/feature has no OOXML representation the\n * library emits.\n *\n * Distinct from {@link InvalidOptionError} because the caller did nothing wrong (the answer is\n * \"not here\", not \"not like that\"), and the fix is usually to install something or pick a different\n * approach rather than to correct a value.\n */\nexport class UnsupportedFeatureError extends PptxTsError {\n\tdeclare readonly code: UnsupportedFeatureErrorCode\n\tconstructor(code: UnsupportedFeatureErrorCode, message: string, options?: PptxTsErrorOptions) {\n\t\tsuper(code, message, options)\n\t}\n}\n\n/**\n * The bytes handed to the library are not a package it can read, or a part inside one is\n * structurally malformed: a missing `[Content_Types].xml`, a relationship pointing at nothing, a\n * slide part with no root element.\n *\n * Always about *input*. A problem with something the library is being asked to produce is an\n * {@link InvalidOptionError}.\n */\nexport class PackageReadError extends PptxTsError {\n\tdeclare readonly code: PackageReadErrorCode\n\tconstructor(code: PackageReadErrorCode, message: string, options?: PptxTsErrorOptions) {\n\t\tsuper(code, message, options)\n\t}\n}\n\n/**\n * A referenced image, font, or audio/video resource could not be fetched, read, or decoded.\n *\n * Kept apart from {@link PackageReadError} because the failure is in a resource the deck *points\n * at*, not in the package structure (a broken URL, an unreadable path, a corrupt font file), and\n * a consumer typically retries or substitutes rather than rejecting the deck.\n */\nexport class MediaError extends PptxTsError {\n\tdeclare readonly code: MediaErrorCode\n\tconstructor(code: MediaErrorCode, message: string, options?: PptxTsErrorOptions) {\n\t\tsuper(code, message, options)\n\t}\n}\n\n/**\n * Where a report of an `InternalError` should go. Appended to the message rather than left to the\n * docs, because a stack trace is the only artefact of the failure that reaches whoever (or\n * whatever) is debugging it. A pointer anywhere else is a pointer they have to already be looking\n * for. Most code that calls this library is written by an agent in a repository that is not this\n * one, and an agent that hits a library defect routes around it silently unless something in front\n * of it says the report is worth making.\n */\nconst REPORT_NOTICE =\n\t'This is a bug in pptx-ts, not in your deck or your code. Please report it:\\n' +\n\t'https://github.com/shbernal/pptx-ts/issues/new?template=bug.yml'\n\n/**\n * An invariant the library maintains itself did not hold.\n *\n * No consumer input should be able to produce one, which is the whole reason it is a separate\n * class: seeing it means the bug is in pptx-ts, and the useful response is to file it rather than\n * to keep adjusting the input.\n *\n * It is the one class in the taxonomy that extends its own message, appending `REPORT_NOTICE`\n * below the invariant that broke. The constructor is where that lives so a throw site added later\n * inherits it. The alternative, a notice pasted at each of the sites, is one every future site can\n * forget. Every other class leaves `message` exactly as given: a malformed package is the routine\n * outcome for a library that reads untrusted files, and a \"report this\" banner on each corrupt\n * input would train callers to ignore the one banner that always means something.\n *\n * This does not make the message API (see the class doc on {@link PptxTsError}). Branch on\n * `instanceof` or on {@link InternalError.code}, never on the text.\n */\nexport class InternalError extends PptxTsError {\n\tdeclare readonly code: InternalErrorCode\n\tconstructor(code: InternalErrorCode, message: string, options?: PptxTsErrorOptions) {\n\t\tsuper(code, `${message}\\n\\n${REPORT_NOTICE}`, options)\n\t}\n}\n","/**\n * pptx-ts: the error taxonomy, as every entry point republishes it\n *\n * Every failure the library throws. The classes and their `code` are API; the message is not.\n *\n * Each published subpath (`.`, `./read`, `./html`, `./zip`, …) re-exports this module so\n * `instanceof` works whichever one a consumer imports. That property depends on all of them\n * resolving to a single `errors.js`. They do, because there is one module here and\n * every entry names it. This file exists so that stays structurally true: the list used to be\n * pasted into all ten entries, identical down to the comment, and nothing would have caught\n * one of them drifting.\n *\n * Entries re-export it wholesale (`export * from './entry-errors.js'`) rather than naming the\n * members again, so adding an error class publishes it everywhere in one edit.\n */\n\nimport { PptxTsError, type PptxTsErrorOptions } from './errors.js'\nimport type { PptxTsCode } from './codes.js'\n\nexport {\n\tPptxTsError,\n\tInvalidOptionError,\n\tUnsupportedFeatureError,\n\tPackageReadError,\n\tMediaError,\n\tInternalError,\n\ttype PptxTsErrorOptions,\n} from './errors.js'\nexport type {\n\tErrorCode,\n\tPptxTsCode,\n\tInvalidOptionErrorCode,\n\tUnsupportedFeatureErrorCode,\n\tPackageReadErrorCode,\n\tMediaErrorCode,\n\tInternalErrorCode,\n} from './codes.js'\n\n/** @deprecated Renamed to {@link PptxTsError}. This alias is removed in v5. */\nexport const TsPptxError = PptxTsError\n/** @deprecated Renamed to {@link PptxTsError}. This alias is removed in v5. */\nexport type TsPptxError = PptxTsError\n/** @deprecated Renamed to {@link PptxTsErrorOptions}. This alias is removed in v5. */\nexport type TsPptxErrorOptions = PptxTsErrorOptions\n/** @deprecated Renamed to {@link PptxTsCode}. This alias is removed in v5. */\nexport type TsPptxCode = PptxTsCode\n"],"mappings":";;AA0CA,MAAM,cAAc;;AAGpB,MAAM,kBAAqC,eAAe;CACzD,QAAQ,KAAK,GAAG,YAAY,IAAI,WAAW,SAAS;AACrD;AAEA,IAAI,UAA6B;;;;;;;;;;;;;;;;;;;;;;;AAwBjC,SAAgB,qBAAqB,MAA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