pptx-ts 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +319 -0
  3. package/dist/autopage-DkjYZUFD.js +423 -0
  4. package/dist/autopage-DkjYZUFD.js.map +1 -0
  5. package/dist/browser.d.ts +31 -0
  6. package/dist/browser.d.ts.map +1 -0
  7. package/dist/browser.js +110 -0
  8. package/dist/browser.js.map +1 -0
  9. package/dist/diagnostics-Du_s75MT.d.ts +829 -0
  10. package/dist/diagnostics-Du_s75MT.d.ts.map +1 -0
  11. package/dist/enums-CvRYniUA.d.ts +463 -0
  12. package/dist/enums-CvRYniUA.d.ts.map +1 -0
  13. package/dist/errors-Bvln0H-7.js +112 -0
  14. package/dist/errors-Bvln0H-7.js.map +1 -0
  15. package/dist/errors-PflMPWBn.d.ts +182 -0
  16. package/dist/errors-PflMPWBn.d.ts.map +1 -0
  17. package/dist/fit-BKs0zxMI.js +1356 -0
  18. package/dist/fit-BKs0zxMI.js.map +1 -0
  19. package/dist/html-dom-B0I0QSbU.js +679 -0
  20. package/dist/html-dom-B0I0QSbU.js.map +1 -0
  21. package/dist/html.d.ts +26 -0
  22. package/dist/html.d.ts.map +1 -0
  23. package/dist/html.js +63 -0
  24. package/dist/html.js.map +1 -0
  25. package/dist/index.d.ts +24 -0
  26. package/dist/index.d.ts.map +1 -0
  27. package/dist/index.js +57 -0
  28. package/dist/index.js.map +1 -0
  29. package/dist/inspect.d.ts +197 -0
  30. package/dist/inspect.d.ts.map +1 -0
  31. package/dist/inspect.js +317 -0
  32. package/dist/inspect.js.map +1 -0
  33. package/dist/math.d.ts +37 -0
  34. package/dist/math.d.ts.map +1 -0
  35. package/dist/math.js +203 -0
  36. package/dist/math.js.map +1 -0
  37. package/dist/measure.d.ts +313 -0
  38. package/dist/measure.d.ts.map +1 -0
  39. package/dist/measure.js +3 -0
  40. package/dist/namespaces-BVnNu7sg.js +666 -0
  41. package/dist/namespaces-BVnNu7sg.js.map +1 -0
  42. package/dist/node.d.ts +20 -0
  43. package/dist/node.d.ts.map +1 -0
  44. package/dist/node.js +55 -0
  45. package/dist/node.js.map +1 -0
  46. package/dist/notes-RLCwdlTE.js +1703 -0
  47. package/dist/notes-RLCwdlTE.js.map +1 -0
  48. package/dist/package-CaOLXSNi.d.ts +193 -0
  49. package/dist/package-CaOLXSNi.d.ts.map +1 -0
  50. package/dist/pres-C5__xkDh.d.ts +202 -0
  51. package/dist/pres-C5__xkDh.d.ts.map +1 -0
  52. package/dist/presentation-Cp7vzlAw.js +5427 -0
  53. package/dist/presentation-Cp7vzlAw.js.map +1 -0
  54. package/dist/presentation-types-DP_8jog7.d.ts +4872 -0
  55. package/dist/presentation-types-DP_8jog7.d.ts.map +1 -0
  56. package/dist/read.d.ts +55 -0
  57. package/dist/read.d.ts.map +1 -0
  58. package/dist/read.js +4 -0
  59. package/dist/script.d.ts +581 -0
  60. package/dist/script.d.ts.map +1 -0
  61. package/dist/script.js +3741 -0
  62. package/dist/script.js.map +1 -0
  63. package/dist/shapes-BemroU-z.js +6951 -0
  64. package/dist/shapes-BemroU-z.js.map +1 -0
  65. package/dist/slide-js0QpRV-.d.ts +3873 -0
  66. package/dist/slide-js0QpRV-.d.ts.map +1 -0
  67. package/dist/text-CyetbF6p.js +11278 -0
  68. package/dist/text-CyetbF6p.js.map +1 -0
  69. package/dist/units-1kRzYShk.js +231 -0
  70. package/dist/units-1kRzYShk.js.map +1 -0
  71. package/dist/units-internal-Dg95w_YD.js +753 -0
  72. package/dist/units-internal-Dg95w_YD.js.map +1 -0
  73. package/dist/zip.d.ts +68 -0
  74. package/dist/zip.d.ts.map +1 -0
  75. package/dist/zip.js +163 -0
  76. package/dist/zip.js.map +1 -0
  77. package/package.json +152 -0
  78. package/skills/ts-pptx-upstream/SKILL.md +340 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diagnostics-Du_s75MT.d.ts","names":[],"sources":["../src/types/zoom.ts","../src/types/internal.ts","../src/runtime/types.ts","../src/units.ts","../src/presentation.ts","../src/clip.ts","../src/diagnostics.ts"],"mappings":"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"}
@@ -0,0 +1,463 @@
1
+ //#region src/enums.d.ts
2
+ /**
3
+ * ts-pptx Enums
4
+ * NOTE: `enum` wont work for objects, so use `Object.freeze`
5
+ */
6
+ /**
7
+ * Output-type name accepted by the zip/write layer. Derived from the `OutputType`
8
+ * enum (see below) so the two never drift: adding a member to the enum extends this
9
+ * union automatically.
10
+ */
11
+ type ZIP_OUTPUT_TYPE = `${OutputType}`;
12
+ type WRITE_OUTPUT_TYPE = ZIP_OUTPUT_TYPE;
13
+ /**
14
+ * Public chart-type name accepted by `addChart()`. Derived from the internal
15
+ * `ChartType` enum (see below) so the two never drift: adding a member to the
16
+ * enum extends this union automatically.
17
+ */
18
+ type CHART_NAME = `${ChartType}`;
19
+ /**
20
+ * Public scheme-color name. Derived from the `SchemeColor` enum (see below) so the
21
+ * two never drift.
22
+ */
23
+ type SCHEME_COLORS = `${SchemeColor}`;
24
+ declare enum TextAnchor {
25
+ b = "b",
26
+ ctr = "ctr",
27
+ t = "t"
28
+ }
29
+ declare enum OutputType {
30
+ arraybuffer = "arraybuffer",
31
+ base64 = "base64",
32
+ binarystring = "binarystring",
33
+ blob = "blob",
34
+ nodebuffer = "nodebuffer",
35
+ uint8array = "uint8array"
36
+ }
37
+ declare enum ChartType {
38
+ area = "area",
39
+ bar = "bar",
40
+ bar3d = "bar3D",
41
+ bubble = "bubble",
42
+ bubble3d = "bubble3D",
43
+ doughnut = "doughnut",
44
+ line = "line",
45
+ pie = "pie",
46
+ radar = "radar",
47
+ scatter = "scatter",
48
+ stock = "stock",
49
+ surface = "surface",
50
+ waterfall = "waterfall",
51
+ funnel = "funnel",
52
+ treemap = "treemap",
53
+ sunburst = "sunburst",
54
+ histogram = "histogram",
55
+ pareto = "pareto",
56
+ boxWhisker = "boxWhisker",
57
+ regionMap = "regionMap"
58
+ }
59
+ declare enum ShapeType {
60
+ accentBorderCallout1 = "accentBorderCallout1",
61
+ accentBorderCallout2 = "accentBorderCallout2",
62
+ accentBorderCallout3 = "accentBorderCallout3",
63
+ accentCallout1 = "accentCallout1",
64
+ accentCallout2 = "accentCallout2",
65
+ accentCallout3 = "accentCallout3",
66
+ actionButtonBackPrevious = "actionButtonBackPrevious",
67
+ actionButtonBeginning = "actionButtonBeginning",
68
+ actionButtonBlank = "actionButtonBlank",
69
+ actionButtonDocument = "actionButtonDocument",
70
+ actionButtonEnd = "actionButtonEnd",
71
+ actionButtonForwardNext = "actionButtonForwardNext",
72
+ actionButtonHelp = "actionButtonHelp",
73
+ actionButtonHome = "actionButtonHome",
74
+ actionButtonInformation = "actionButtonInformation",
75
+ actionButtonMovie = "actionButtonMovie",
76
+ actionButtonReturn = "actionButtonReturn",
77
+ actionButtonSound = "actionButtonSound",
78
+ arc = "arc",
79
+ bentArrow = "bentArrow",
80
+ bentUpArrow = "bentUpArrow",
81
+ bevel = "bevel",
82
+ blockArc = "blockArc",
83
+ borderCallout1 = "borderCallout1",
84
+ borderCallout2 = "borderCallout2",
85
+ borderCallout3 = "borderCallout3",
86
+ bracePair = "bracePair",
87
+ bracketPair = "bracketPair",
88
+ callout1 = "callout1",
89
+ callout2 = "callout2",
90
+ callout3 = "callout3",
91
+ can = "can",
92
+ chartPlus = "chartPlus",
93
+ chartStar = "chartStar",
94
+ chartX = "chartX",
95
+ chevron = "chevron",
96
+ chord = "chord",
97
+ circularArrow = "circularArrow",
98
+ cloud = "cloud",
99
+ cloudCallout = "cloudCallout",
100
+ corner = "corner",
101
+ cornerTabs = "cornerTabs",
102
+ cube = "cube",
103
+ curvedDownArrow = "curvedDownArrow",
104
+ curvedLeftArrow = "curvedLeftArrow",
105
+ curvedRightArrow = "curvedRightArrow",
106
+ curvedUpArrow = "curvedUpArrow",
107
+ custGeom = "custGeom",
108
+ decagon = "decagon",
109
+ diagStripe = "diagStripe",
110
+ diamond = "diamond",
111
+ dodecagon = "dodecagon",
112
+ donut = "donut",
113
+ doubleWave = "doubleWave",
114
+ downArrow = "downArrow",
115
+ downArrowCallout = "downArrowCallout",
116
+ ellipse = "ellipse",
117
+ ellipseRibbon = "ellipseRibbon",
118
+ ellipseRibbon2 = "ellipseRibbon2",
119
+ flowChartAlternateProcess = "flowChartAlternateProcess",
120
+ flowChartCollate = "flowChartCollate",
121
+ flowChartConnector = "flowChartConnector",
122
+ flowChartDecision = "flowChartDecision",
123
+ flowChartDelay = "flowChartDelay",
124
+ flowChartDisplay = "flowChartDisplay",
125
+ flowChartDocument = "flowChartDocument",
126
+ flowChartExtract = "flowChartExtract",
127
+ flowChartInputOutput = "flowChartInputOutput",
128
+ flowChartInternalStorage = "flowChartInternalStorage",
129
+ flowChartMagneticDisk = "flowChartMagneticDisk",
130
+ flowChartMagneticDrum = "flowChartMagneticDrum",
131
+ flowChartMagneticTape = "flowChartMagneticTape",
132
+ flowChartManualInput = "flowChartManualInput",
133
+ flowChartManualOperation = "flowChartManualOperation",
134
+ flowChartMerge = "flowChartMerge",
135
+ flowChartMultidocument = "flowChartMultidocument",
136
+ flowChartOfflineStorage = "flowChartOfflineStorage",
137
+ flowChartOffpageConnector = "flowChartOffpageConnector",
138
+ flowChartOnlineStorage = "flowChartOnlineStorage",
139
+ flowChartOr = "flowChartOr",
140
+ flowChartPredefinedProcess = "flowChartPredefinedProcess",
141
+ flowChartPreparation = "flowChartPreparation",
142
+ flowChartProcess = "flowChartProcess",
143
+ flowChartPunchedCard = "flowChartPunchedCard",
144
+ flowChartPunchedTape = "flowChartPunchedTape",
145
+ flowChartSort = "flowChartSort",
146
+ flowChartSummingJunction = "flowChartSummingJunction",
147
+ flowChartTerminator = "flowChartTerminator",
148
+ foldedCorner = "foldedCorner",
149
+ frame = "frame",
150
+ funnel = "funnel",
151
+ gear6 = "gear6",
152
+ gear9 = "gear9",
153
+ halfFrame = "halfFrame",
154
+ heart = "heart",
155
+ heptagon = "heptagon",
156
+ hexagon = "hexagon",
157
+ homePlate = "homePlate",
158
+ horizontalScroll = "horizontalScroll",
159
+ irregularSeal1 = "irregularSeal1",
160
+ irregularSeal2 = "irregularSeal2",
161
+ leftArrow = "leftArrow",
162
+ leftArrowCallout = "leftArrowCallout",
163
+ leftBrace = "leftBrace",
164
+ leftBracket = "leftBracket",
165
+ leftCircularArrow = "leftCircularArrow",
166
+ leftRightArrow = "leftRightArrow",
167
+ leftRightArrowCallout = "leftRightArrowCallout",
168
+ leftRightCircularArrow = "leftRightCircularArrow",
169
+ leftRightRibbon = "leftRightRibbon",
170
+ leftRightUpArrow = "leftRightUpArrow",
171
+ leftUpArrow = "leftUpArrow",
172
+ lightningBolt = "lightningBolt",
173
+ line = "line",
174
+ lineInv = "lineInv",
175
+ mathDivide = "mathDivide",
176
+ mathEqual = "mathEqual",
177
+ mathMinus = "mathMinus",
178
+ mathMultiply = "mathMultiply",
179
+ mathNotEqual = "mathNotEqual",
180
+ mathPlus = "mathPlus",
181
+ moon = "moon",
182
+ noSmoking = "noSmoking",
183
+ nonIsoscelesTrapezoid = "nonIsoscelesTrapezoid",
184
+ notchedRightArrow = "notchedRightArrow",
185
+ octagon = "octagon",
186
+ parallelogram = "parallelogram",
187
+ pentagon = "pentagon",
188
+ pie = "pie",
189
+ pieWedge = "pieWedge",
190
+ plaque = "plaque",
191
+ plaqueTabs = "plaqueTabs",
192
+ plus = "plus",
193
+ quadArrow = "quadArrow",
194
+ quadArrowCallout = "quadArrowCallout",
195
+ rect = "rect",
196
+ ribbon = "ribbon",
197
+ ribbon2 = "ribbon2",
198
+ rightArrow = "rightArrow",
199
+ rightArrowCallout = "rightArrowCallout",
200
+ rightBrace = "rightBrace",
201
+ rightBracket = "rightBracket",
202
+ round1Rect = "round1Rect",
203
+ round2DiagRect = "round2DiagRect",
204
+ round2SameRect = "round2SameRect",
205
+ roundRect = "roundRect",
206
+ rtTriangle = "rtTriangle",
207
+ smileyFace = "smileyFace",
208
+ snip1Rect = "snip1Rect",
209
+ snip2DiagRect = "snip2DiagRect",
210
+ snip2SameRect = "snip2SameRect",
211
+ snipRoundRect = "snipRoundRect",
212
+ squareTabs = "squareTabs",
213
+ star10 = "star10",
214
+ star12 = "star12",
215
+ star16 = "star16",
216
+ star24 = "star24",
217
+ star32 = "star32",
218
+ star4 = "star4",
219
+ star5 = "star5",
220
+ star6 = "star6",
221
+ star7 = "star7",
222
+ star8 = "star8",
223
+ stripedRightArrow = "stripedRightArrow",
224
+ sun = "sun",
225
+ swooshArrow = "swooshArrow",
226
+ teardrop = "teardrop",
227
+ trapezoid = "trapezoid",
228
+ triangle = "triangle",
229
+ upArrow = "upArrow",
230
+ upArrowCallout = "upArrowCallout",
231
+ upDownArrow = "upDownArrow",
232
+ upDownArrowCallout = "upDownArrowCallout",
233
+ uturnArrow = "uturnArrow",
234
+ verticalScroll = "verticalScroll",
235
+ wave = "wave",
236
+ wedgeEllipseCallout = "wedgeEllipseCallout",
237
+ wedgeRectCallout = "wedgeRectCallout",
238
+ wedgeRoundRectCallout = "wedgeRoundRectCallout"
239
+ }
240
+ declare enum SchemeColor {
241
+ text1 = "tx1",
242
+ text2 = "tx2",
243
+ background1 = "bg1",
244
+ background2 = "bg2",
245
+ accent1 = "accent1",
246
+ accent2 = "accent2",
247
+ accent3 = "accent3",
248
+ accent4 = "accent4",
249
+ accent5 = "accent5",
250
+ accent6 = "accent6"
251
+ }
252
+ declare enum AlignH {
253
+ left = "left",
254
+ center = "center",
255
+ right = "right",
256
+ justify = "justify"
257
+ }
258
+ declare enum AlignV {
259
+ top = "top",
260
+ middle = "middle",
261
+ bottom = "bottom"
262
+ }
263
+ type SHAPE_NAME = 'accentBorderCallout1' | 'accentBorderCallout2' | 'accentBorderCallout3' | 'accentCallout1' | 'accentCallout2' | 'accentCallout3' | 'actionButtonBackPrevious' | 'actionButtonBeginning' | 'actionButtonBlank' | 'actionButtonDocument' | 'actionButtonEnd' | 'actionButtonForwardNext' | 'actionButtonHelp' | 'actionButtonHome' | 'actionButtonInformation' | 'actionButtonMovie' | 'actionButtonReturn' | 'actionButtonSound' | 'arc' | 'bentArrow' | 'bentUpArrow' | 'bevel' | 'blockArc' | 'borderCallout1' | 'borderCallout2' | 'borderCallout3' | 'bracePair' | 'bracketPair' | 'callout1' | 'callout2' | 'callout3' | 'can' | 'chartPlus' | 'chartStar' | 'chartX' | 'chevron' | 'chord' | 'circularArrow' | 'cloud' | 'cloudCallout' | 'corner' | 'cornerTabs' | 'cube' | 'curvedDownArrow' | 'curvedLeftArrow' | 'curvedRightArrow' | 'curvedUpArrow' | 'custGeom' | 'decagon' | 'diagStripe' | 'diamond' | 'dodecagon' | 'donut' | 'doubleWave' | 'downArrow' | 'downArrowCallout' | 'ellipse' | 'ellipseRibbon' | 'ellipseRibbon2' | 'flowChartAlternateProcess' | 'flowChartCollate' | 'flowChartConnector' | 'flowChartDecision' | 'flowChartDelay' | 'flowChartDisplay' | 'flowChartDocument' | 'flowChartExtract' | 'flowChartInputOutput' | 'flowChartInternalStorage' | 'flowChartMagneticDisk' | 'flowChartMagneticDrum' | 'flowChartMagneticTape' | 'flowChartManualInput' | 'flowChartManualOperation' | 'flowChartMerge' | 'flowChartMultidocument' | 'flowChartOfflineStorage' | 'flowChartOffpageConnector' | 'flowChartOnlineStorage' | 'flowChartOr' | 'flowChartPredefinedProcess' | 'flowChartPreparation' | 'flowChartProcess' | 'flowChartPunchedCard' | 'flowChartPunchedTape' | 'flowChartSort' | 'flowChartSummingJunction' | 'flowChartTerminator' | 'foldedCorner' | 'frame' | 'funnel' | 'gear6' | 'gear9' | 'halfFrame' | 'heart' | 'heptagon' | 'hexagon' | 'homePlate' | 'horizontalScroll' | 'irregularSeal1' | 'irregularSeal2' | 'leftArrow' | 'leftArrowCallout' | 'leftBrace' | 'leftBracket' | 'leftCircularArrow' | 'leftRightArrow' | 'leftRightArrowCallout' | 'leftRightCircularArrow' | 'leftRightRibbon' | 'leftRightUpArrow' | 'leftUpArrow' | 'lightningBolt' | 'line' | 'lineInv' | 'mathDivide' | 'mathEqual' | 'mathMinus' | 'mathMultiply' | 'mathNotEqual' | 'mathPlus' | 'moon' | 'noSmoking' | 'nonIsoscelesTrapezoid' | 'notchedRightArrow' | 'octagon' | 'parallelogram' | 'pentagon' | 'pie' | 'pieWedge' | 'plaque' | 'plaqueTabs' | 'plus' | 'quadArrow' | 'quadArrowCallout' | 'rect' | 'ribbon' | 'ribbon2' | 'rightArrow' | 'rightArrowCallout' | 'rightBrace' | 'rightBracket' | 'round1Rect' | 'round2DiagRect' | 'round2SameRect' | 'roundRect' | 'rtTriangle' | 'smileyFace' | 'snip1Rect' | 'snip2DiagRect' | 'snip2SameRect' | 'snipRoundRect' | 'squareTabs' | 'star10' | 'star12' | 'star16' | 'star24' | 'star32' | 'star4' | 'star5' | 'star6' | 'star7' | 'star8' | 'stripedRightArrow' | 'sun' | 'swooshArrow' | 'teardrop' | 'trapezoid' | 'triangle' | 'upArrow' | 'upArrowCallout' | 'upDownArrow' | 'upDownArrowCallout' | 'uturnArrow' | 'verticalScroll' | 'wave' | 'wedgeEllipseCallout' | 'wedgeRectCallout' | 'wedgeRoundRectCallout' | CONNECTOR_PRESET_NAME;
264
+ /**
265
+ * Valid ECMA-376 `ST_ShapeType` presets that are not surfaced with a friendly
266
+ * `ShapeType` name. They are still legal geometries PowerPoint renders, so the
267
+ * preset-validation set must accept them.
268
+ */
269
+ declare const EXTRA_SHAPE_PRESETS: readonly ['straightConnector1', 'bentConnector2', 'bentConnector3', 'bentConnector4', 'bentConnector5', 'curvedConnector2', 'curvedConnector3', 'curvedConnector4', 'curvedConnector5'];
270
+ /**
271
+ * Connector preset geometries (`straightConnector1` / `bentConnector{2-5}` /
272
+ * `curvedConnector{2-5}`) that `addShape` can serialize but that are not surfaced
273
+ * as friendly `ShapeType` names. Derived from `EXTRA_SHAPE_PRESETS` so the public
274
+ * `SHAPE_NAME` union and the runtime `VALID_SHAPE_PRESETS` set share one source of
275
+ * truth and cannot drift. Use `addConnector` for live, endpoint-bound connectors;
276
+ * pass these to `addShape` for a static box-positioned connector geometry.
277
+ */
278
+ type CONNECTOR_PRESET_NAME = (typeof EXTRA_SHAPE_PRESETS)[number];
279
+ /**
280
+ * Every shape geometry name ts-pptx can serialize without corrupting the
281
+ * package: the OOXML preset geometries (`ST_ShapeType` — `ShapeType` values
282
+ * plus the unexposed connectors above) and `custGeom` (freeform paths, emitted
283
+ * as `<a:custGeom>` rather than `<a:prstGeom>`). Used to reject bogus presets
284
+ * before they become an invalid `<a:prstGeom prst="...">` that triggers
285
+ * PowerPoint's "needs repair" dialog and drops the shape.
286
+ */
287
+ declare const VALID_SHAPE_PRESETS: ReadonlySet<string>;
288
+ /**
289
+ * Narrow a public `CHART_NAME` to the internal `ChartType` enum. Because
290
+ * `CHART_NAME` is derived from `ChartType`, every `CHART_NAME` value is by
291
+ * construction a valid enum value, so this conversion is total and safe — it is
292
+ * the single boundary cast that lets internal code compare against the enum
293
+ * (enum-to-enum) instead of enum-to-string.
294
+ */
295
+ declare function asChartType(name: CHART_NAME): ChartType;
296
+ /**
297
+ * Is `name` a chart type this library emits?
298
+ *
299
+ * `CHART_NAME` constrains TypeScript callers, but `addChart` is reachable from plain JavaScript
300
+ * where nothing enforces the union — and the two emitters partition the catalog between them by
301
+ * `switch`, so an off-catalog string has no arm in either and cannot produce a plot. Checked once
302
+ * at define time (`gen/define/chart.ts`) so the caller hears about it at the call that was wrong,
303
+ * rather than getting a chart-shaped hole in the deck.
304
+ */
305
+ declare function isChartType(name: unknown): name is CHART_NAME;
306
+ /**
307
+ * Is `type` a chartEx (cx:) chart? Accepts a `ChartType`/`CHART_NAME` string; anything else —
308
+ * including a combo-chart `ChartMulti[]` array or `undefined` — is not a chartEx type (combos are
309
+ * classic-only), so those return `false`.
310
+ */
311
+ declare function isChartExType(type: unknown): boolean;
312
+ declare enum SlideObjectType {
313
+ chart = "chart",
314
+ connector = "connector",
315
+ group = "group",
316
+ hyperlink = "hyperlink",
317
+ image = "image",
318
+ media = "media",
319
+ model3d = "model3d",
320
+ oleObject = "oleObject",
321
+ online = "online",
322
+ placeholder = "placeholder",
323
+ table = "table",
324
+ tablecell = "tablecell",
325
+ text = "text",
326
+ notes = "notes",
327
+ zoom = "zoom"
328
+ }
329
+ /**
330
+ * Maps a friendly `ConnectorType` to its OOXML connector preset *family*. `straight`
331
+ * has a single fixed preset; `elbow` and `curved` select a member by bend count
332
+ * (`bentConnector{3,4,5}` / `curvedConnector{3,4,5}`) — see `connectorPresetFor`.
333
+ */
334
+ declare const CONNECTOR_PRESETS: {
335
+ readonly straight: 'straightConnector1';
336
+ readonly elbow: 'bentConnector';
337
+ readonly curved: 'curvedConnector';
338
+ };
339
+ /**
340
+ * Resolve the concrete connector preset geometry name for a `type` + bend count.
341
+ * `straight` ignores `bends` (it has no adjustable jog). For `elbow` / `curved`, the
342
+ * preset suffix is `bends + 2`, so `bends` of 1/2/3 maps to `…Connector3/4/5`, each
343
+ * of which exposes exactly `bends` adjustable guides (`adj1…adjN`).
344
+ * @param {'straight' | 'elbow' | 'curved'} type - friendly connector routing style
345
+ * @param {number} bends - number of adjustable bends (1–3); ignored for `straight`
346
+ * @return {CONNECTOR_PRESET_NAME} OOXML preset geometry name (e.g. `bentConnector4`)
347
+ */
348
+ declare function connectorPresetFor(type: 'straight' | 'elbow' | 'curved', bends: number): CONNECTOR_PRESET_NAME;
349
+ declare enum PlaceholderType {
350
+ title = "title",
351
+ body = "body",
352
+ image = "pic",
353
+ chart = "chart",
354
+ table = "tbl",
355
+ media = "media"
356
+ }
357
+ /**
358
+ * Placeholder-type name. Derived from the `PlaceholderType` enum (above) so the two
359
+ * never drift.
360
+ */
361
+ type PLACEHOLDER_TYPE = `${PlaceholderType}`;
362
+ /**
363
+ * Bullet glyph presets. Only `DEFAULT` is currently wired through to output; the remaining entries are
364
+ * reserved and not yet selectable via options.
365
+ */
366
+ declare enum BulletType {
367
+ DEFAULT = "&#x2022;",
368
+ CHECK = "&#x2713;",
369
+ STAR = "&#x2605;",
370
+ TRIANGLE = "&#x25B6;"
371
+ }
372
+ /**
373
+ * Built-in PowerPoint table style IDs.
374
+ *
375
+ * Each value is the GUID that goes into `<a:tableStyleId>` inside `<a:tblPr>`.
376
+ * These 74 GUIDs are the complete set defined in [MS-OE376] §5.1.6.10 and are
377
+ * resolved by PowerPoint without embedding any style definition in the file.
378
+ *
379
+ * Only these enum members are supported. Raw GUID strings are not accepted;
380
+ * use `TableStyle` members exclusively.
381
+ */
382
+ declare enum TableStyle {
383
+ NO_STYLE_NO_GRID = "{2D5ABB26-0587-4C30-8999-92F81FD0307C}",
384
+ NO_STYLE_TABLE_GRID = "{5940675A-B579-460E-94D1-54222C63F5DA}",
385
+ THEMED_STYLE_1_ACCENT_1 = "{3C2FFA5D-87B4-456A-9821-1D502468CF0F}",
386
+ THEMED_STYLE_1_ACCENT_2 = "{284E427A-3D55-4303-BF80-6455036E1DE7}",
387
+ THEMED_STYLE_1_ACCENT_3 = "{69C7853C-536D-4A76-A0AE-DD22124D55A5}",
388
+ THEMED_STYLE_1_ACCENT_4 = "{775DCB02-9BB8-47FD-8907-85C794F793BA}",
389
+ THEMED_STYLE_1_ACCENT_5 = "{35758FB7-9AC5-4552-8A53-C91805E547FA}",
390
+ THEMED_STYLE_1_ACCENT_6 = "{08FB837D-C827-4EFA-A057-4D05807E0F7C}",
391
+ THEMED_STYLE_2_ACCENT_1 = "{D113A9D2-9D6B-4929-AA2D-F23B5EE8CBE7}",
392
+ THEMED_STYLE_2_ACCENT_2 = "{18603FDC-E32A-4AB5-989C-0864C3EAD2B8}",
393
+ THEMED_STYLE_2_ACCENT_3 = "{306799F8-075E-4A3A-A7F6-7FBC6576F1A4}",
394
+ THEMED_STYLE_2_ACCENT_4 = "{E269D01E-BC32-4049-B463-5C60D7B0CCD2}",
395
+ THEMED_STYLE_2_ACCENT_5 = "{327F97BB-C833-4FB7-BDE5-3F7075034690}",
396
+ THEMED_STYLE_2_ACCENT_6 = "{638B1855-1B75-4FBE-930C-398BA8C253C6}",
397
+ LIGHT_STYLE_1 = "{9D7B26C5-4107-4FEC-AEDC-1716B250A1EF}",
398
+ LIGHT_STYLE_1_ACCENT_1 = "{3B4B98B0-60AC-42C2-AFA5-B58CD77FA1E5}",
399
+ LIGHT_STYLE_1_ACCENT_2 = "{0E3FDE45-AF77-4B5C-9715-49D594BDF05E}",
400
+ LIGHT_STYLE_1_ACCENT_3 = "{C083E6E3-FA7D-4D7B-A595-EF9225AFEA82}",
401
+ LIGHT_STYLE_1_ACCENT_4 = "{D27102A9-8310-4765-A935-A1911B00CA55}",
402
+ LIGHT_STYLE_1_ACCENT_5 = "{5FD0F851-EC5A-4D38-B0AD-8093EC10F338}",
403
+ LIGHT_STYLE_1_ACCENT_6 = "{68D230F3-CF80-4859-8CE7-A43EE81993B5}",
404
+ LIGHT_STYLE_2 = "{7E9639D4-E3E2-4D34-9284-5A2195B3D0D7}",
405
+ LIGHT_STYLE_2_ACCENT_1 = "{69012ECD-51FC-41F1-AA8D-1B2483CD663E}",
406
+ LIGHT_STYLE_2_ACCENT_2 = "{72833802-FEF1-4C79-8D5D-14CF1EAF98D9}",
407
+ LIGHT_STYLE_2_ACCENT_3 = "{F2DE63D5-997A-4646-A377-4702673A728D}",
408
+ LIGHT_STYLE_2_ACCENT_4 = "{17292A2E-F333-43FB-9621-5CBBE7FDCDCB}",
409
+ LIGHT_STYLE_2_ACCENT_5 = "{5A111915-BE36-4E01-A7E5-04B1672EAD32}",
410
+ LIGHT_STYLE_2_ACCENT_6 = "{912C8C85-51F0-491E-9774-3900AFEF0FD7}",
411
+ LIGHT_STYLE_3 = "{616DA210-FB5B-4158-B5E0-FEB733F419BA}",
412
+ LIGHT_STYLE_3_ACCENT_1 = "{BC89EF96-8CEA-46FF-86C4-4CE0E7609802}",
413
+ LIGHT_STYLE_3_ACCENT_2 = "{5DA37D80-6434-44D0-A028-1B22A696006F}",
414
+ LIGHT_STYLE_3_ACCENT_3 = "{8799B23B-EC83-4686-B30A-512413B5E67A}",
415
+ LIGHT_STYLE_3_ACCENT_4 = "{ED083AE6-46FA-4A59-8FB0-9F97EB10719F}",
416
+ LIGHT_STYLE_3_ACCENT_5 = "{BDBED569-4797-4DF1-A0F4-6AAB3CD982D8}",
417
+ LIGHT_STYLE_3_ACCENT_6 = "{E8B1032C-EA38-4F05-BA0D-38AFFFC7BED3}",
418
+ MEDIUM_STYLE_1 = "{793D81CF-94F2-401A-BA57-92F5A7B2D0C5}",
419
+ MEDIUM_STYLE_1_ACCENT_1 = "{B301B821-A1FF-4177-AEE7-76D212191A09}",
420
+ MEDIUM_STYLE_1_ACCENT_2 = "{9DCAF9ED-07DC-4A11-8D7F-57B35C25682E}",
421
+ MEDIUM_STYLE_1_ACCENT_3 = "{1FECB4D8-DB02-4DC6-A0A2-4F2EBAE1DC90}",
422
+ MEDIUM_STYLE_1_ACCENT_4 = "{1E171933-4619-4E11-9A3F-F7608DF75F80}",
423
+ MEDIUM_STYLE_1_ACCENT_5 = "{FABFCF23-3B69-468F-B69F-88F6DE6A72F2}",
424
+ MEDIUM_STYLE_1_ACCENT_6 = "{10A1B5D5-9B99-4C35-A422-299274C87663}",
425
+ MEDIUM_STYLE_2 = "{073A0DAA-6AF3-43AB-8588-CEC1D06C72B9}",
426
+ MEDIUM_STYLE_2_ACCENT_1 = "{5C22544A-7EE6-4342-B048-85BDC9FD1C3A}",
427
+ MEDIUM_STYLE_2_ACCENT_2 = "{21E4AEA4-8DFA-4A89-87EB-49C32662AFE0}",
428
+ MEDIUM_STYLE_2_ACCENT_3 = "{F5AB1C69-6EDB-4FF4-983F-18BD219EF322}",
429
+ MEDIUM_STYLE_2_ACCENT_4 = "{00A15C55-8517-42AA-B614-E9B94910E393}",
430
+ MEDIUM_STYLE_2_ACCENT_5 = "{7DF18680-E054-41AD-8BC1-D1AEF772440D}",
431
+ MEDIUM_STYLE_2_ACCENT_6 = "{93296810-A885-4BE3-A3E7-6D5BEEA58F35}",
432
+ MEDIUM_STYLE_3 = "{8EC20E35-A176-4012-BC5E-935CFFF8708E}",
433
+ MEDIUM_STYLE_3_ACCENT_1 = "{6E25E649-3F16-4E02-A733-19D2CDBF48F0}",
434
+ MEDIUM_STYLE_3_ACCENT_2 = "{85BE263C-DBD7-4A20-BB59-AAB30ACAA65A}",
435
+ MEDIUM_STYLE_3_ACCENT_3 = "{EB344D84-9AFB-497E-A393-DC336BA19D2E}",
436
+ MEDIUM_STYLE_3_ACCENT_4 = "{EB9631B5-78F2-41C9-869B-9F39066F8104}",
437
+ MEDIUM_STYLE_3_ACCENT_5 = "{74C1A8A3-306A-4EB7-A6B1-4F7E0EB9C5D6}",
438
+ MEDIUM_STYLE_3_ACCENT_6 = "{2A488322-F2BA-4B5B-9748-0D474271808F}",
439
+ MEDIUM_STYLE_4 = "{D7AC3CCA-C797-4891-BE02-D94E43425B78}",
440
+ MEDIUM_STYLE_4_ACCENT_1 = "{69CF1AB2-1976-4502-BF36-3FF5EA218861}",
441
+ MEDIUM_STYLE_4_ACCENT_2 = "{8A107856-5554-42FB-B03E-39F5DBC370BA}",
442
+ MEDIUM_STYLE_4_ACCENT_3 = "{0505E3EF-67EA-436B-97B2-0124C06EBD24}",
443
+ MEDIUM_STYLE_4_ACCENT_4 = "{C4B1156A-380E-4F78-BDF5-A606A8083BF9}",
444
+ MEDIUM_STYLE_4_ACCENT_5 = "{22838BEF-8BB2-4498-84A7-C5851F593DF1}",
445
+ MEDIUM_STYLE_4_ACCENT_6 = "{16D9F66E-5EB9-4882-86FB-DCBF35E3C3E4}",
446
+ DARK_STYLE_1 = "{E8034E78-7F5D-4C2E-B375-FC64B27BC917}",
447
+ DARK_STYLE_1_ACCENT_1 = "{125E5076-3810-47DD-B79F-674D7AD40C01}",
448
+ DARK_STYLE_1_ACCENT_2 = "{37CE84F3-28C3-443E-9E96-99CF82512B78}",
449
+ DARK_STYLE_1_ACCENT_3 = "{D03447BB-5D67-496B-8E87-E561075AD55C}",
450
+ DARK_STYLE_1_ACCENT_4 = "{E929F9F4-4A8F-4326-A1B4-22849713DDAB}",
451
+ DARK_STYLE_1_ACCENT_5 = "{8FD4443E-F989-4FC4-A0C8-D5A2AF1F390B}",
452
+ DARK_STYLE_1_ACCENT_6 = "{AF606853-7671-496A-8E4F-DF71F8EC918B}",
453
+ DARK_STYLE_2 = "{5202B0CA-FC54-4496-8BCA-5EF66A818D29}",
454
+ /** Header uses Accent 2, body rows use Accent 1 */
455
+ DARK_STYLE_2_ACCENT_1_ACCENT_2 = "{0660B408-B3CF-4A94-85FC-2B1E0A45F4A2}",
456
+ /** Header uses Accent 4, body rows use Accent 3 */
457
+ DARK_STYLE_2_ACCENT_3_ACCENT_4 = "{91EBBBCC-DAD2-459C-BE2E-F6DE35CF9A28}",
458
+ /** Header uses Accent 6, body rows use Accent 5 */
459
+ DARK_STYLE_2_ACCENT_5_ACCENT_6 = "{46F890A9-2807-4EBB-B81D-B2AA78EC7F39}"
460
+ }
461
+ //#endregion
462
+ export { isChartExType as C, connectorPresetFor as S, TextAnchor as _, CONNECTOR_PRESETS as a, ZIP_OUTPUT_TYPE as b, OutputType as c, SCHEME_COLORS as d, SHAPE_NAME as f, TableStyle as g, SlideObjectType as h, CHART_NAME as i, PLACEHOLDER_TYPE as l, ShapeType as m, AlignV as n, CONNECTOR_PRESET_NAME as o, SchemeColor as p, BulletType as r, ChartType as s, AlignH as t, PlaceholderType as u, VALID_SHAPE_PRESETS as v, isChartType as w, asChartType as x, WRITE_OUTPUT_TYPE as y };
463
+ //# sourceMappingURL=enums-CvRYniUA.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enums-CvRYniUA.d.ts","names":[],"sources":["../src/enums.ts"],"mappings":";;;;;;;;;;KAUY,qBAAqB;KACrB,oBAAoB;;;;;;KAMpB,gBAAgB;;;;;KAKhB,mBAAmB;aAEnB;EACX;EACA;EACA;;aAIW;EACX;EACA;EACA;EACA;EACA;EACA;;aAEW;EACX;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;aAEW;EACX;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;aAEW;EACX;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;aAEW;EACX;EACA;EACA;EACA;;aAEW;EACX;EACA;EACA;;KAGW,8iGAoLT;;;;;;cAOG;;;;;;;;;KAoBM,gCAAgC;;;;;;;;;cAU/B,qBAAqB;;;;;;;;iBAYlB,YAAY,MAAM,aAAa;;;;;;;;;;iBAgB/B,YAAY,gBAAgB,QAAQ;;;;;;iBA4BpC,cAAc;aAIlB;EACX;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;;;;;cAQY;WACF;WACH;WACC;;;;;;;;;;;iBAYO,mBAAmB,uCAAuC,gBAAgB;aAI9E;EACX;EACA;EACA;EACA;EACA;EACA;;;;;;KAMW,sBAAsB;;;;;aAMtB;EACX;EACA;EACA;EACA;;;;;;;;;;;;aAaW;EAEX;EACA;EAGA;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;;EAEA;;EAEA;;EAEA"}
@@ -0,0 +1,112 @@
1
+ //#region src/errors.ts
2
+ /**
3
+ * Base class for every error ts-pptx throws.
4
+ *
5
+ * Catch this to catch anything from the library; narrow with `instanceof` on a subclass, or branch
6
+ * on {@link TsPptxError.code}, to react to something specific. It is never thrown directly — every
7
+ * site picks one of the five subclasses.
8
+ */
9
+ var TsPptxError = class extends Error {
10
+ /** Stable condition identifier — see {@link ErrorCode}. Branch on this, not on the text. */
11
+ code;
12
+ /** Structured context for the condition, when the throwing site had any to give. */
13
+ detail;
14
+ /**
15
+ * @param code - the stable condition identifier
16
+ * @param message - explanation for a human reading a stack trace; not part of the contract
17
+ * @param options - standard `cause`, plus optional structured `detail`
18
+ */
19
+ constructor(code, message, options) {
20
+ super(message, options);
21
+ this.name = new.target.name;
22
+ this.code = code;
23
+ if (options?.detail !== void 0) this.detail = options.detail;
24
+ }
25
+ };
26
+ /**
27
+ * The caller passed something the library cannot use — a non-finite coordinate, an unknown enum
28
+ * value, a required option left out, a value outside its legal range.
29
+ *
30
+ * This is the error behind the project's throw-rather-than-coerce policy: emitting a degenerate
31
+ * result (a zero-size shape, a silently dropped option) hides the mistake, so the library refuses
32
+ * instead. Reaching one means the calling code needs to change.
33
+ */
34
+ var InvalidOptionError = class extends TsPptxError {
35
+ constructor(code, message, options) {
36
+ super(code, message, options);
37
+ }
38
+ };
39
+ /**
40
+ * The request is well-formed but cannot be expressed here: an optional peer dependency is not
41
+ * installed, the runtime lacks a capability, or the shape/feature has no OOXML representation the
42
+ * library emits.
43
+ *
44
+ * Distinct from {@link InvalidOptionError} because the caller did nothing wrong — the answer is
45
+ * "not here", not "not like that" — and the fix is usually to install something or pick a different
46
+ * approach rather than to correct a value.
47
+ */
48
+ var UnsupportedFeatureError = class extends TsPptxError {
49
+ constructor(code, message, options) {
50
+ super(code, message, options);
51
+ }
52
+ };
53
+ /**
54
+ * The bytes handed to the library are not a package it can read, or a part inside one is
55
+ * structurally malformed — a missing `[Content_Types].xml`, a relationship pointing at nothing, a
56
+ * slide part with no root element.
57
+ *
58
+ * Always about *input*. A problem with something the library is being asked to produce is an
59
+ * {@link InvalidOptionError}.
60
+ */
61
+ var PackageReadError = class extends TsPptxError {
62
+ constructor(code, message, options) {
63
+ super(code, message, options);
64
+ }
65
+ };
66
+ /**
67
+ * A referenced image, font, or audio/video resource could not be fetched, read, or decoded.
68
+ *
69
+ * Kept apart from {@link PackageReadError} because the failure is in a resource the deck *points
70
+ * at*, not in the package structure — a broken URL, an unreadable path, a corrupt font file — and
71
+ * a consumer typically retries or substitutes rather than rejecting the deck.
72
+ */
73
+ var MediaError = class extends TsPptxError {
74
+ constructor(code, message, options) {
75
+ super(code, message, options);
76
+ }
77
+ };
78
+ /**
79
+ * Where a report of an `InternalError` should go. Appended to the message rather than left to the
80
+ * docs, because a stack trace is the only artefact of the failure that reaches whoever (or
81
+ * whatever) is debugging it — a pointer anywhere else is a pointer they have to already be looking
82
+ * for. Most code that calls this library is written by an agent in a repository that is not this
83
+ * one, and an agent that hits a library defect routes around it silently unless something in front
84
+ * of it says the report is worth making.
85
+ */
86
+ 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";
87
+ /**
88
+ * An invariant the library maintains itself did not hold.
89
+ *
90
+ * No consumer input should be able to produce one, which is the whole reason it is a separate
91
+ * class: seeing it means the bug is in ts-pptx, and the useful response is to file it rather than
92
+ * to keep adjusting the input.
93
+ *
94
+ * It is the one class in the taxonomy that extends its own message, appending `REPORT_NOTICE`
95
+ * below the invariant that broke. The constructor is where that lives so a throw site added later
96
+ * inherits it — the alternative, a notice pasted at each of the sites, is one every future site can
97
+ * forget. Every other class leaves `message` exactly as given: a malformed package is the routine
98
+ * outcome for a library that reads untrusted files, and a "report this" banner on each corrupt
99
+ * input would train callers to ignore the one banner that always means something.
100
+ *
101
+ * This does not make the message API — see the class doc on {@link TsPptxError}. Branch on
102
+ * `instanceof` or on {@link InternalError.code}, never on the text.
103
+ */
104
+ var InternalError = class extends TsPptxError {
105
+ constructor(code, message, options) {
106
+ super(code, `${message}\n\n${REPORT_NOTICE}`, options);
107
+ }
108
+ };
109
+ //#endregion
110
+ export { TsPptxError as a, PackageReadError as i, InvalidOptionError as n, UnsupportedFeatureError as o, MediaError as r, InternalError as t };
111
+
112
+ //# sourceMappingURL=errors-Bvln0H-7.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors-Bvln0H-7.js","names":[],"sources":["../src/errors.ts"],"sourcesContent":["/**\n * The library's error taxonomy.\n *\n * Every failure ts-pptx raises is a {@link TsPptxError} 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 | ts-pptx (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/ts-pptx-upstream` for how to file one.\n *\n * @see `docs/errors.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 TsPptxError} constructor. */\nexport interface TsPptxErrorOptions 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 ts-pptx throws.\n *\n * Catch this to catch anything from the library; narrow with `instanceof` on a subclass, or branch\n * on {@link TsPptxError.code}, to react to something specific. It is never thrown directly — every\n * site picks one of the five subclasses.\n */\nexport class TsPptxError 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?: TsPptxErrorOptions) {\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 TsPptxError {\n\tdeclare readonly code: InvalidOptionErrorCode\n\tconstructor(code: InvalidOptionErrorCode, message: string, options?: TsPptxErrorOptions) {\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 TsPptxError {\n\tdeclare readonly code: UnsupportedFeatureErrorCode\n\tconstructor(code: UnsupportedFeatureErrorCode, message: string, options?: TsPptxErrorOptions) {\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 TsPptxError {\n\tdeclare readonly code: PackageReadErrorCode\n\tconstructor(code: PackageReadErrorCode, message: string, options?: TsPptxErrorOptions) {\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 TsPptxError {\n\tdeclare readonly code: MediaErrorCode\n\tconstructor(code: MediaErrorCode, message: string, options?: TsPptxErrorOptions) {\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 ts-pptx, not in your deck or your code. Please report it:\\n' +\n\t'https://github.com/shbernal/ts-pptx/issues/new?template=agent-report.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 ts-pptx, 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 TsPptxError}. Branch on\n * `instanceof` or on {@link InternalError.code}, never on the text.\n */\nexport class InternalError extends TsPptxError {\n\tdeclare readonly code: InternalErrorCode\n\tconstructor(code: InternalErrorCode, message: string, options?: TsPptxErrorOptions) {\n\t\tsuper(code, `${message}\\n\\n${REPORT_NOTICE}`, options)\n\t}\n}\n"],"mappings":";;;;;;;;AA2DA,IAAa,cAAb,cAAiC,MAAM;;CAEtC;;CAGA;;;;;;CAOA,YAAY,MAAiB,SAAiB,SAA8B;EAC3E,MAAM,SAAS,OAAO;EAItB,KAAK,OAAO,WAAW;EACvB,KAAK,OAAO;EACZ,IAAI,SAAS,WAAW,KAAA,GAAW,KAAK,SAAS,QAAQ;CAC1D;AACD;;;;;;;;;AAUA,IAAa,qBAAb,cAAwC,YAAY;CAEnD,YAAY,MAA8B,SAAiB,SAA8B;EACxF,MAAM,MAAM,SAAS,OAAO;CAC7B;AACD;;;;;;;;;;AAWA,IAAa,0BAAb,cAA6C,YAAY;CAExD,YAAY,MAAmC,SAAiB,SAA8B;EAC7F,MAAM,MAAM,SAAS,OAAO;CAC7B;AACD;;;;;;;;;AAUA,IAAa,mBAAb,cAAsC,YAAY;CAEjD,YAAY,MAA4B,SAAiB,SAA8B;EACtF,MAAM,MAAM,SAAS,OAAO;CAC7B;AACD;;;;;;;;AASA,IAAa,aAAb,cAAgC,YAAY;CAE3C,YAAY,MAAsB,SAAiB,SAA8B;EAChF,MAAM,MAAM,SAAS,OAAO;CAC7B;AACD;;;;;;;;;AAUA,MAAM,gBACL;;;;;;;;;;;;;;;;;;AAoBD,IAAa,gBAAb,cAAmC,YAAY;CAE9C,YAAY,MAAyB,SAAiB,SAA8B;EACnF,MAAM,MAAM,GAAG,QAAQ,MAAM,iBAAiB,OAAO;CACtD;AACD"}