@shbernal/ts-pptx 3.1.0 → 3.3.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 (73) hide show
  1. package/README.md +55 -20
  2. package/dist/{autopage-QQyfRtoK.js → autopage-D1sqK6j7.js} +16 -15
  3. package/dist/{autopage-QQyfRtoK.js.map → autopage-D1sqK6j7.js.map} +1 -1
  4. package/dist/browser.d.ts +6 -6
  5. package/dist/browser.js +5 -6
  6. package/dist/browser.js.map +1 -1
  7. package/dist/{diagnostics-PMINsVP6.d.ts → diagnostics-B2yWpcjB.d.ts} +31 -14
  8. package/dist/{diagnostics-PMINsVP6.d.ts.map → diagnostics-B2yWpcjB.d.ts.map} +1 -1
  9. package/dist/{diagnostics-DYQC7xLV.js → diagnostics-H1QzgRSw.js} +0 -0
  10. package/dist/{diagnostics-DYQC7xLV.js.map → diagnostics-H1QzgRSw.js.map} +1 -1
  11. package/dist/{enums-CoXnxiCI.d.ts → enums-CvRYniUA.d.ts} +13 -3
  12. package/dist/{enums-CoXnxiCI.d.ts.map → enums-CvRYniUA.d.ts.map} +1 -1
  13. package/dist/{errors-BeUEkNWL.d.ts → errors-fB1KDJKQ.d.ts} +5 -5
  14. package/dist/{errors-BeUEkNWL.d.ts.map → errors-fB1KDJKQ.d.ts.map} +1 -1
  15. package/dist/{fit-DhMbQG5O.js → fit-CYJ1jkQI.js} +0 -0
  16. package/dist/fit-CYJ1jkQI.js.map +1 -0
  17. package/dist/{html-dom-DajBuobe.js → html-dom-CzewEdE1.js} +4 -5
  18. package/dist/{html-dom-DajBuobe.js.map → html-dom-CzewEdE1.js.map} +1 -1
  19. package/dist/html.d.ts +3 -3
  20. package/dist/html.js +1 -1
  21. package/dist/index.d.ts +6 -6
  22. package/dist/index.js +5 -6
  23. package/dist/index.js.map +1 -1
  24. package/dist/inspect.d.ts +1 -1
  25. package/dist/inspect.js +4 -4
  26. package/dist/math.d.ts +1 -1
  27. package/dist/measure.d.ts +96 -6
  28. package/dist/measure.d.ts.map +1 -1
  29. package/dist/measure.js +2 -2
  30. package/dist/node.d.ts +6 -6
  31. package/dist/node.js +4 -5
  32. package/dist/node.js.map +1 -1
  33. package/dist/notes-SCvpJz0l.js +1646 -0
  34. package/dist/notes-SCvpJz0l.js.map +1 -0
  35. package/dist/{pres-BgvxhQ_m.d.ts → pres-Cb-1xDne.d.ts} +4 -4
  36. package/dist/{pres-BgvxhQ_m.d.ts.map → pres-Cb-1xDne.d.ts.map} +1 -1
  37. package/dist/{presentation-BP1B8PCF.js → presentation-DeKTJGHf.js} +1096 -440
  38. package/dist/presentation-DeKTJGHf.js.map +1 -0
  39. package/dist/{presentation-DyIRDKkp.d.ts → presentation-types-B50aOUFI.d.ts} +804 -39
  40. package/dist/presentation-types-B50aOUFI.d.ts.map +1 -0
  41. package/dist/read.d.ts +4 -5
  42. package/dist/read.d.ts.map +1 -1
  43. package/dist/read.js +2 -2
  44. package/dist/script.d.ts +32 -4
  45. package/dist/script.d.ts.map +1 -1
  46. package/dist/script.js +0 -0
  47. package/dist/script.js.map +1 -1
  48. package/dist/{shapes-DMThLsZN.js → shapes-BXVgsk0F.js} +81 -63
  49. package/dist/shapes-BXVgsk0F.js.map +1 -0
  50. package/dist/{slide-BRAtT8Dl.d.ts → slide-DWw9UoI6.d.ts} +130 -11
  51. package/dist/slide-DWw9UoI6.d.ts.map +1 -0
  52. package/dist/{st-enums-evQG2A7Z.js → st-enums-bVnezkMJ.js} +33 -12
  53. package/dist/{st-enums-evQG2A7Z.js.map → st-enums-bVnezkMJ.js.map} +1 -1
  54. package/dist/{text-B6PbMFih.js → text-uM-zGton.js} +242 -1611
  55. package/dist/text-uM-zGton.js.map +1 -0
  56. package/dist/{units-internal-CR8s8YQa.js → units-internal-CGf4VrXy.js} +156 -4
  57. package/dist/units-internal-CGf4VrXy.js.map +1 -0
  58. package/dist/zip.d.ts +2 -2
  59. package/package.json +40 -28
  60. package/skills/ts-pptx-upstream/SKILL.md +107 -14
  61. package/dist/embedded-fonts-MaynAHa9.js +0 -94
  62. package/dist/embedded-fonts-MaynAHa9.js.map +0 -1
  63. package/dist/fit-DhMbQG5O.js.map +0 -1
  64. package/dist/presentation-BP1B8PCF.js.map +0 -1
  65. package/dist/presentation-DyIRDKkp.d.ts.map +0 -1
  66. package/dist/presentation-types-Dj4riuDs.d.ts +0 -538
  67. package/dist/presentation-types-Dj4riuDs.d.ts.map +0 -1
  68. package/dist/shapes-DMThLsZN.js.map +0 -1
  69. package/dist/slide-BRAtT8Dl.d.ts.map +0 -1
  70. package/dist/text-B6PbMFih.js.map +0 -1
  71. package/dist/units-C7QM1KgH.js +0 -144
  72. package/dist/units-C7QM1KgH.js.map +0 -1
  73. package/dist/units-internal-CR8s8YQa.js.map +0 -1
@@ -1,8 +1,15 @@
1
- import { _ as TextAnchor, f as SHAPE_NAME, g as TableStyle, h as SlideObjectType, i as CHART_NAME, l as PLACEHOLDER_TYPE, t as AlignH } from "./enums-CoXnxiCI.js";
1
+ import { _ as TextAnchor, f as SHAPE_NAME, g as TableStyle, h as SlideObjectType, i as CHART_NAME, l as PLACEHOLDER_TYPE, t as AlignH } from "./enums-CvRYniUA.js";
2
2
  //#region src/types/text.d.ts
3
3
  interface TextBaseProps {
4
4
  /**
5
5
  * Horizontal alignment
6
+ *
7
+ * When a shape's text is an array of runs, set this on **every run** of a paragraph.
8
+ * {@link breakLine} is not the only paragraph boundary: two adjacent runs whose `align`
9
+ * differs start a new one, so stating it on the opening run alone splits the paragraph in
10
+ * two. That is the mirror of {@link bullet}, {@link paraMarginLeft} and {@link paraIndent},
11
+ * which are read from the opening run only. Neither mistake changes the run count — the
12
+ * only symptom is a differently shaped paragraph, with no error.
6
13
  * @default 'left'
7
14
  */
8
15
  align?: HAlign;
@@ -28,9 +35,24 @@ interface TextBaseProps {
28
35
  * Add standard or custom bullet
29
36
  * - use `true` for standard bullet
30
37
  * - pass object options for custom bullet
38
+ * - `false` (and omitting the option) is the *explicit off*: it writes `<a:buNone/>`
39
+ * plus `marL="0" indent="0"`, which overrides whatever bullet the layout's or
40
+ * master's list style sets for this level
41
+ * - `'inherit'` states nothing at all — no bullet child and no margin attributes — so
42
+ * the list style keeps reaching the paragraph. This is the one state omission
43
+ * cannot spell, because omitting the option means `false` here for compatibility
44
+ *
45
+ * The margins are only a *default* of the bullet state: {@link paraMarginLeft} and
46
+ * {@link paraIndent} state `@marL`/`@indent` independently in any of the three, including
47
+ * an inherited margin under a drawn bullet.
48
+ *
49
+ * When a shape's text is an array of runs, state this on the **opening run only**. A run
50
+ * that draws a bullet starts a new paragraph by itself, so repeating it — the placement
51
+ * that {@link align} requires — turns one three-run paragraph into three one-run
52
+ * paragraphs. A paragraph takes its properties from its first run.
31
53
  * @default false
32
54
  */
33
- bullet?: boolean | {
55
+ bullet?: boolean | 'inherit' | {
34
56
  /**
35
57
  * Bullet type
36
58
  * @default bullet
@@ -101,11 +123,14 @@ interface TextBaseProps {
101
123
  color?: HexColor;
102
124
  };
103
125
  /**
104
- * Text capitalization
126
+ * Text capitalization (`a:rPr/@cap`, `ST_TextCapsType`)
105
127
  * - `'all'` = ALL CAPS
106
128
  * - `'small'` = Small Caps
107
- * - `'none'` = no override (default)
129
+ * - `'none'` = the *explicit off*: it writes `cap="none"`, which overrides a capitalization
130
+ * the run would otherwise inherit. Omitting the option states nothing and lets that
131
+ * inheritance stand
108
132
  * - PowerPoint: Font > Effects > All Caps / Small Caps
133
+ * @default (unset) inherit
109
134
  */
110
135
  caps?: 'none' | 'small' | 'all';
111
136
  /**
@@ -156,6 +181,42 @@ interface TextBaseProps {
156
181
  * @example 'fr-CA' // french Canadian
157
182
  */
158
183
  lang?: string;
184
+ /**
185
+ * First-line indent (points) — `a:pPr/@indent`, the offset of the paragraph's FIRST line
186
+ * from {@link paraMarginLeft}. Negative hangs the first line to the left of the body, which
187
+ * is what a bulleted paragraph does; positive indents it to the right, the "first line
188
+ * indented" prose form. PowerPoint: Paragraph > Indentation > Special.
189
+ * - `'inherit'` writes no `@indent` at all, so the paragraph takes whatever its list style
190
+ * (`a:lstStyle` → placeholder → layout → master) sets — the same third state
191
+ * {@link bullet} spells, on the attribute beside it
192
+ * - omitting the option keeps the bullet-derived default: a drawn bullet hangs the first
193
+ * line by its margin, `bullet: false` writes `indent="0"`, `bullet: 'inherit'` writes
194
+ * nothing
195
+ * - a value here overrides all of those, in every bullet state
196
+ * @example -18 // hang the first line 18pt left of the body text
197
+ * @example 18 // indent the first line 18pt, prose style
198
+ * @example 'inherit' // keep the list style's indent, even on a bulleted paragraph
199
+ * @remarks Read from the **opening run** of a paragraph, like {@link bullet} and unlike
200
+ * {@link align}; a value on a continuation run is ignored.
201
+ */
202
+ paraIndent?: number | 'inherit';
203
+ /**
204
+ * Left margin of the paragraph (points) — `a:pPr/@marL`, where the paragraph's body text
205
+ * starts. This is the paragraph's own margin, not the text frame's internal padding
206
+ * (`margin`) and not the discrete outline level (`indentLevel`, which writes `a:p/@lvl`).
207
+ * PowerPoint: Paragraph > Indentation > Before text.
208
+ * - `'inherit'` writes no `@marL` at all, so the paragraph takes whatever its list style
209
+ * (`a:lstStyle` → placeholder → layout → master) sets — the third state that omission
210
+ * cannot spell, since omitting it writes the bullet-derived default
211
+ * - omitting the option keeps that default: a drawn bullet writes its own margin (see
212
+ * `bullet.indent`), `bullet: false` writes `marL="0"`, `bullet: 'inherit'` writes nothing
213
+ * - a value here overrides all of those, in every bullet state
214
+ * @example 36 // body text starts 36pt (0.5in) from the frame's text edge
215
+ * @example 'inherit' // keep the list style's margin, even on a bulleted paragraph
216
+ * @remarks Read from the **opening run** of a paragraph, like {@link bullet} and unlike
217
+ * {@link align}; a value on a continuation run is ignored.
218
+ */
219
+ paraMarginLeft?: number | 'inherit';
159
220
  /**
160
221
  * Add a soft line-break (shift+enter) before line text content
161
222
  * @default false
@@ -189,10 +250,15 @@ interface TextBaseProps {
189
250
  /**
190
251
  * underline properties
191
252
  * - PowerPoint: Font > Color & Underline > Underline Style/Underline Color
192
- * @default (none)
253
+ * - `style` is the full `ST_TextUnderlineType` enumeration (ECMA-376 §20.1.10.81)
254
+ * - `'none'` is the *explicit off*: it writes `a:rPr/@u="none"`, which overrides an
255
+ * underline the run would otherwise inherit from its list style, placeholder, layout or
256
+ * master. Omitting the option instead states nothing and lets that inheritance stand —
257
+ * the two are different facts, not two spellings of one.
258
+ * @default (unset) inherit
193
259
  */
194
260
  underline?: {
195
- style?: 'dash' | 'dashHeavy' | 'dashLong' | 'dashLongHeavy' | 'dbl' | 'dotDash' | 'dotDashHeave' | 'dotDotDash' | 'dotDotDashHeavy' | 'dotted' | 'dottedHeavy' | 'heavy' | 'none' | 'sng' | 'wavy' | 'wavyDbl' | 'wavyHeavy';
261
+ style?: 'dash' | 'dashHeavy' | 'dashLong' | 'dashLongHeavy' | 'dbl' | 'dotDash' | 'dotDashHeavy' | 'dotDotDash' | 'dotDotDashHeavy' | 'dotted' | 'dottedHeavy' | 'heavy' | 'none' | 'sng' | 'wavy' | 'wavyDbl' | 'wavyHeavy' | 'words';
196
262
  color?: Color;
197
263
  };
198
264
  /**
@@ -388,7 +454,19 @@ interface TextPropsOptions extends PositionProps, DataOrPathProps, TextBaseProps
388
454
  rtlMode?: boolean;
389
455
  shadow?: ShadowProps;
390
456
  shape?: SHAPE_NAME;
391
- strike?: boolean | 'dblStrike' | 'sngStrike';
457
+ /**
458
+ * Strikethrough (`a:rPr/@strike`, `ST_TextStrikeType` — ECMA-376 §20.1.10.78)
459
+ * - `true` is `'sngStrike'`; `'dblStrike'` is the double rule
460
+ * - `'noStrike'` is the *explicit off*: it writes `strike="noStrike"`, which overrides a
461
+ * strikethrough the run would otherwise inherit from its list style, placeholder, layout
462
+ * or master
463
+ * - `false`, like leaving the option out, writes no attribute at all and so states
464
+ * *nothing* — the run keeps whatever it inherits. This matches `bold`/`italic`, whose
465
+ * falsy arm is likewise an omission; reach for `'noStrike'` when the intent is "not
466
+ * struck" rather than "unspecified"
467
+ * @default (unset) inherit
468
+ */
469
+ strike?: boolean | 'noStrike' | 'sngStrike' | 'dblStrike';
392
470
  subscript?: boolean;
393
471
  superscript?: boolean;
394
472
  /**
@@ -491,6 +569,24 @@ interface TextMeasurement {
491
569
  * the face via {@link TsPptx.registerFontMetrics} for an exact result.
492
570
  */
493
571
  approximatedFaces: string[];
572
+ /**
573
+ * Code points in the measured text — sorted, deduplicated — whose run resolved to a
574
+ * **registered** face that has no glyph for them. Empty for fully covered text.
575
+ *
576
+ * Unlike everything else here, a non-empty list means the numbers are **not reliably
577
+ * conservative**. PowerPoint renders such a code point from a substituted face and
578
+ * measures it in that face's advances; this model has no fallback and charges the
579
+ * registered font's `.notdef` advance, which is unrelated to the glyph that paints. A
580
+ * `.notdef` wider than the real glyph over-reports (harmless); a narrower one
581
+ * under-reports the width and can drop a line, so `heightIn` may come back **short**
582
+ * and the text overflow. Register a face that covers them (or set an explicit
583
+ * `fontFace` on those runs) before trusting the height.
584
+ *
585
+ * Faces with no registered metrics are not audited — they measure through the
586
+ * cmap-less heuristic and are reported in {@link approximatedFaces} instead.
587
+ * `String.fromCodePoint(...uncoveredCodepoints)` renders the list.
588
+ */
589
+ uncoveredCodepoints: number[];
494
590
  /** True if the text fits a box of inner height `hIn` (inches) at full size. */
495
591
  fitsBox: (hIn: number) => boolean;
496
592
  /** The `fontScale` (percent) that fits inner height `hIn`; `100` if it already fits, never below the shrink floor. */
@@ -854,9 +950,18 @@ interface ChartPropsFillLine {
854
950
  border?: BorderProps;
855
951
  /**
856
952
  * PowerPoint: Format Chart Area/Plot Area > Fill
953
+ *
954
+ * Omitting `fill` leaves the area transparent (`<a:noFill/>`), as does a `fill` that
955
+ * states neither a `color` nor a `type` — `transparency` alone is not a fill, since
956
+ * there is no colour for the alpha to apply to.
957
+ *
958
+ * `type: 'image'` is not supported here and falls back to no fill with a warning: a
959
+ * blip fill needs a media relationship on the chart part, which nothing registers.
857
960
  * @example fill: {color: '696969'} // hex RGB color value
858
961
  * @example fill: {color: SchemeColor.background2} // Theme color value
859
- * @example fill: {transparency: 50} // 50% transparency
962
+ * @example fill: {color: '696969', transparency: 50} // 50% transparent grey
963
+ * @example fill: {type: 'gradient', gradient: {kind: 'linear', angle: 90, stops: [{position: 0, color: '0088CC'}, {position: 100, color: 'FFFFFF'}]}}
964
+ * @example fill: {type: 'inherit'} // no fill child at all -- take the chart style's fill
860
965
  */
861
966
  fill?: ShapeFillProps;
862
967
  }
@@ -1674,9 +1779,21 @@ interface ShapeFillProps {
1674
1779
  transparency?: number;
1675
1780
  /**
1676
1781
  * Fill type
1782
+ *
1783
+ * `'none'` and `'inherit'` are different states, and both have to be spelled out
1784
+ * because omitting `fill` is not one of them: the shape/text-box emitter defaults a
1785
+ * missing `fill` to `<a:noFill/>`.
1786
+ * - `'none'` emits `<a:noFill/>` — an explicit transparent interior.
1787
+ * - `'inherit'` emits no fill child at all, leaving the interior to
1788
+ * `p:style/a:fillRef` or the placeholder. This is the only way to author that
1789
+ * state from `addShape`/`addText`.
1790
+ *
1791
+ * On a table cell (`TableCellProps.fill`) and a slide background the two spellings
1792
+ * differ the same way, except that *omitting* the option there already means
1793
+ * inherit, so `'inherit'` is merely the explicit form of the default.
1677
1794
  * @default 'solid'
1678
1795
  */
1679
- type?: 'none' | 'solid' | 'gradient' | 'pattern' | 'image';
1796
+ type?: 'none' | 'inherit' | 'solid' | 'gradient' | 'pattern' | 'image';
1680
1797
  /**
1681
1798
  * Native PPTX gradient fill options.
1682
1799
  */
@@ -3326,7 +3443,9 @@ type SlideMasterObject = {
3326
3443
  * Any preset shape, addressed by `SHAPE_NAME` (e.g. `ShapeType.ellipse`).
3327
3444
  * Generalizes the `line`/`rect`/`roundRect` shortcuts to every preset the
3328
3445
  * `addShape()` serializer supports (ellipse, triangle, chevron, …).
3329
- * @example { shape: { type: 'ellipse', options: { x: 1, y: 1, w: 2, h: 2, fill: { color: 'FF0000' } } } }
3446
+ *
3447
+ * A union member's comment cannot carry block tags, so this stands in for `@example`:
3448
+ * `{ shape: { type: 'ellipse', options: { x: 1, y: 1, w: 2, h: 2, fill: { color: 'FF0000' } } } }`
3330
3449
  */
3331
3450
  {
3332
3451
  shape: {
@@ -3699,4 +3818,4 @@ interface AddSlideProps {
3699
3818
  }
3700
3819
  //#endregion
3701
3820
  export { HAlign as $, ChartSeriesOpts as $t, TableToSlidesDocument as A, ChartLineDash as At, ShapeAdjustHandleXY as B, ChartPropsChartHistogram as Bt, TableCell as C, ChartAreaProps as Ct, TableProps as D, ChartExBinning as Dt, TableCellProps as E, ChartErrorBarOptions as Et, MediaProps as F, ChartPropsAxisVal as Ft, BackgroundProps as G, ChartPropsChartStock as Gt, ShapeConnectionSite as H, ChartPropsChartPie as Ht, MediaType as I, ChartPropsBase as It, DataOrPathProps as J, ChartPropsDataLabel as Jt, Color as K, ChartPropsChartSurface as Kt, OleObjectProps as L, ChartPropsChartBar as Lt, TableToSlidesProps as M, ChartOpts as Mt, ImageBaseProps as N, ChartPropsAxisCat as Nt, TableRow as O, ChartExGeography as Ot, ImageProps as P, ChartPropsAxisSer as Pt, GradientStopProps as Q, ChartPropsTitle as Qt, ShapeAdjustHandle as R, ChartPropsChartBoxWhisker as Rt, TransitionType as S, textRuns as Sn, PresetMaterialType as St, TableCellDiagonals as T, ChartDataPointStyle as Tt, ShapeGuide as U, ChartPropsChartRadar as Ut, ShapeAdjustValue as V, ChartPropsChartLine as Vt, ShapeProps as W, ChartPropsChartRegionMap as Wt, GeometryPoint as X, ChartPropsFillLine as Xt, DataOrPathRequiredProps as Y, ChartPropsDataTable as Yt, GradientFillProps as Z, ChartPropsLegend as Zt, AnimationProps as _, TextGlowProps as _n, ShapeFillProps as _t, Slide as a, PlaceholderProps as an, PatternPreset as at, TransitionProps as b, TextPropsOptions as bn, LightRigDirection as bt, Model3dPoint as c, NotesProps as cn, TextVertType as ct, MasterTextStyleLevel as d, ResolvedCommentAuthor as dn, BorderProps as dt, LineCap as en, HexColor as et, MasterTextStyleProps as f, SlideComment as fn, ConnectorProps as ft, SlideNumberProps as g, TextFitShrinkProps as gn, ShadowProps as gt, SlideMasterProps as h, TextBaseProps as hn, HyperlinkProps as ht, ObjectOptions as i, ObjectNameProps as in, PatternFillProps as it, TableToSlidesElement as j, ChartMulti as jt, TableRowSlide as k, ChartExStatistics as kt, Model3dProps as l, NotesTextOptions as ln, ThemeColor as lt, SlideMasterObject as m, TableLayoutResult as mn, HyperlinkActionJump as mt, GroupChildProps as n, OptsChartGridLine as nn, LinearGradientFillProps as nt, SlideLayout as o, CommentProps as on, PositionProps as ot, SlideMasterChartProps as p, TableCellLayout as pn, ConnectorType as pt, Coord as q, ChartPropsChartWaterfall as qt, GroupProps as r, ObjectLockProps as rn, Margin as rt, Model3dCameraProps as s, MeasureTextOptions as sn, RadialGradientFillProps as st, AddSlideProps as t, OptsChartData as tn, ImageFillProps as tt, MasterBulletProps as u, OverflowBoxOptions as un, VAlign as ut, AnimationTrigger as v, TextMeasurement as vn, ShapeLineProps as vt, TableCell3DProps as w, ChartAxisTickMark as wt, TransitionSoundProps as x, textRun as xn, LightRigType as xt, PresetEffect as y, TextProps as yn, BevelPresetType as yt, ShapeAdjustHandlePolar as z, ChartPropsChartDoughnut as zt };
3702
- //# sourceMappingURL=slide-BRAtT8Dl.d.ts.map
3821
+ //# sourceMappingURL=slide-DWw9UoI6.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slide-DWw9UoI6.d.ts","names":[],"sources":["../src/types/text.ts","../src/types/object.ts","../src/types/chart.ts","../src/ooxml/st-enums.ts","../src/types/style.ts","../src/types/core.ts","../src/types/shape.ts","../src/types/media.ts","../src/types/table.ts","../src/types/animation.ts","../src/types/master.ts","../src/types/model3d.ts","../src/types/slide.ts"],"mappings":";;UAYiB;;;;;;;;;;;;EAYhB,QAAQ;;;;;EAKR;;;;;EAKA;;;;;;;;EAQA;;;;;;;;;;;;;;;;;;;;;;EAsBA;;;;;IAQG;;;;;IAKA;;;;;IAKA;;;;;;IAMA;;;;;;IAMA;;;;;IAKA;;;;;;IAsBA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;EACT;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,aAAa;;;;;;EAMb,cAAc;;EAEd,YAAY;;UAEI;EAChB,aAAa;;UAEG;EAChB,SAAS,MAAM,iBAAiB,SAAS;IAAc,MAAM;MAAe;EAC5E,SAAS,QAAQ,cAAc,UAAU,YAAY;EACrD,eAAe,SAAS,mBAAmB;EAC3C,WAAW,SAAS,eAAe;EACnC,WAAW,SAAS,eAAe;;EAEnC,aAAa,SAAS,iBAAiB;;EAEvC,eAAe,SAAS,mBAAmB;EAC3C,aAAa,SAAS,iBAAiB;EACvC,WAAW,gBAAgB,aAAa,iBAAiB;EACzD,WAAW,WAAW,YAAY,UAAU,eAAe;EAC3D,WAAW,WAAW,YAAY,UAAU,eAAe;EAC3D,UAAU,wBAAwB,aAAa,UAAU,qBAAqB;EAC9E,eAAe,SAAS,mBAAmB;;EAE3C,WAAW,UAAU,mBAAmB,UAAU,eAAe;;EAEjE,eAAe,uBAAuB,UAAU,eAAe;WAEtD,qBAAqB;;;;;EAM9B,aAAa;;;;;;WAOJ;;;;WAIA;;;;;;;;;EAUT,aAAa;;;;;;EAMb,QAAQ;;;;;EAKR;;;;EAIA,cAAc;;UAEE;;EAEhB;EACA"}
@@ -1,4 +1,4 @@
1
- import { r as warnOnce } from "./diagnostics-DYQC7xLV.js";
1
+ import { r as warnOnce } from "./diagnostics-H1QzgRSw.js";
2
2
  import { n as InvalidOptionError } from "./errors-Bvln0H-7.js";
3
3
  //#region src/media/base64.ts
4
4
  /**
@@ -251,28 +251,49 @@ function utf8Decode(bytes) {
251
251
  //#endregion
252
252
  //#region src/ooxml/rel-types.ts
253
253
  /**
254
+ * OPC relationship type URIs, and the two schema-URI bases they are built from.
255
+ *
256
+ * These are long, near-identical strings that differ in one path segment, which makes a typo
257
+ * both easy to write and invisible on review — a wrong URI does not throw, it silently matches
258
+ * nothing on the read side and produces a part PowerPoint ignores or rejects on the write side.
259
+ *
260
+ * **Why this module is neither `gen/` nor `read/`.** Both halves need the same URIs, and for a
261
+ * while each kept its own copy (`gen/oxml/schema-uris.ts`, `read/api/rel-types.ts`), with a note
262
+ * in both saying a shared home was "a separate decision". It is this module: a rel type is a fact
263
+ * about the OOXML package format, not about writing or reading one, so neither side should own it.
264
+ * A divergence between the two copies would mean the writer emitting a rel the reader cannot find
265
+ * — a round-trip bug with no compile-time signal.
266
+ *
267
+ * Only types used by more than one module live here. A rel type exactly one module cares about
268
+ * (`chart`, `hyperlink`, `tags`, the two comments parts, `oleObject`, the MS media rels, …) stays
269
+ * declared next to the code that reads or emits it — hoisting those would trade a definition you
270
+ * can see for one you have to go and find, and buy nothing.
271
+ */
272
+ /** Root of every ECMA-376 schema URI. Private: callers want one of the prefixes below. */
273
+ const SCHEMA_BASE = "http://schemas.openxmlformats.org/";
274
+ /**
254
275
  * Prefix for `.rels` `Type` URIs — append the type name (`slide`, `image`, `theme`, …).
255
276
  * Exported for the write side, which builds one-off rel types at their call sites.
256
277
  */
257
- const OFFICE_REL = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/";
278
+ const OFFICE_REL = SCHEMA_BASE + "officeDocument/2006/relationships/";
258
279
  /** `xmlns` of every `<Relationships>` part. Also the prefix of the package-scoped rel types. */
259
- const PACKAGE_REL_NS = "http://schemas.openxmlformats.org/package/2006/relationships";
280
+ const PACKAGE_REL_NS = SCHEMA_BASE + "package/2006/relationships";
260
281
  /** `p:sldIdLst` → a slide part. */
261
- const SLIDE_REL = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/slide";
282
+ const SLIDE_REL = OFFICE_REL + "slide";
262
283
  /** A slide → its layout; a master → each of its layouts. */
263
- const SLIDE_LAYOUT_REL = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideLayout";
284
+ const SLIDE_LAYOUT_REL = OFFICE_REL + "slideLayout";
264
285
  /** A layout → its master; the presentation → each master. */
265
- const SLIDE_MASTER_REL = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideMaster";
286
+ const SLIDE_MASTER_REL = OFFICE_REL + "slideMaster";
266
287
  /** A slide → its notes slide. */
267
- const NOTES_SLIDE_REL = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/notesSlide";
288
+ const NOTES_SLIDE_REL = OFFICE_REL + "notesSlide";
268
289
  /** A notes slide → the notes master; the presentation → the notes master. */
269
- const NOTES_MASTER_REL = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/notesMaster";
290
+ const NOTES_MASTER_REL = OFFICE_REL + "notesMaster";
270
291
  /** A master or notes master → its theme. Layouts and slides inherit it rather than holding one. */
271
- const THEME_REL = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme";
292
+ const THEME_REL = OFFICE_REL + "theme";
272
293
  /** The package root → `ppt/presentation.xml`. The entry point to everything above. */
273
- const OFFICE_DOCUMENT_REL = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument";
294
+ const OFFICE_DOCUMENT_REL = OFFICE_REL + "officeDocument";
274
295
  /** Any part → an image in `ppt/media/`. */
275
- const IMAGE_REL = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image";
296
+ const IMAGE_REL = OFFICE_REL + "image";
276
297
  //#endregion
277
298
  //#region src/ooxml/check-enum.ts
278
299
  /**
@@ -480,4 +501,4 @@ const PRESET_LINE_DASHES = [
480
501
  //#endregion
481
502
  export { getImageSizeFromBytes as C, svgMarkupToDataUri as E, getImageSizeFromBase64 as S, decodeBase64ToBytes as T, SLIDE_LAYOUT_REL as _, PRESET_MATERIALS as a, THEME_REL as b, TEXT_VERTICAL as c, IMAGE_REL as d, NOTES_MASTER_REL as f, PACKAGE_REL_NS as g, OFFICE_REL as h, PRESET_LINE_DASHES as i, checkEnumOrThrow as l, OFFICE_DOCUMENT_REL as m, LIGHT_RIGS as n, TEXT_ANCHORS as o, NOTES_SLIDE_REL as p, LIGHT_RIG_DIRECTIONS as r, TEXT_HORZ_OVERFLOW as s, BEVEL_PRESETS as t, checkEnumOrWarn as u, SLIDE_MASTER_REL as v, bytesToBase64 as w, fitSrcRectPercents as x, SLIDE_REL as y };
482
503
 
483
- //# sourceMappingURL=st-enums-evQG2A7Z.js.map
504
+ //# sourceMappingURL=st-enums-bVnezkMJ.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"st-enums-evQG2A7Z.js","names":[],"sources":["../src/media/base64.ts","../src/media/image-size.ts","../src/ooxml/rel-types.ts","../src/ooxml/check-enum.ts","../src/ooxml/st-enums.ts"],"sourcesContent":["/**\n * Base64 payload handling for media parts — isomorphic across Node and browsers\n * (`TextEncoder`/`atob`/`btoa` only, no `Buffer`).\n */\n\n/**\n * Encode raw SVG markup as a base64 `image/svg+xml` data URI.\n * - lets callers pass inline SVG to `addImage({ svg })` without hand-rolling base64\n * - isomorphic and UTF-8 safe: uses the global `TextEncoder`/`btoa` (Node and browsers)\n * @param {string} svg - SVG markup, e.g. `'<svg ...>...</svg>'`\n * @returns {string} a `data:image/svg+xml;base64,...` URI\n */\nexport function svgMarkupToDataUri(svg: string): string {\n\treturn `data:image/svg+xml;base64,${bytesToBase64(new TextEncoder().encode(svg))}`\n}\n\n/**\n * Encode raw bytes as base64 (no `data:` prefix) using only `btoa`, so the result is the same\n * on Node, in a browser, and in a runtime that has neither `Buffer` nor `FileReader`.\n *\n * Chunked because `String.fromCharCode(...spread)` blows the argument-count limit on a payload\n * of any real size — a multi-megabyte video rel would throw rather than encode.\n * @param {Uint8Array} bytes - the payload\n * @returns {string} base64 text\n */\nexport function bytesToBase64(bytes: Uint8Array): string {\n\tconst CHUNK = 0x8000\n\tlet binary = ''\n\tfor (let i = 0; i < bytes.length; i += CHUNK) binary += String.fromCharCode(...bytes.subarray(i, i + CHUNK))\n\treturn btoa(binary)\n}\n\n/**\n * Decode a base64 image payload (raw base64 or a `data:` URI) to bytes.\n * - tolerant of the `data:[mime];base64,` prefix and of whitespace in the payload\n * @param {string} b64 - base64 string or data URI\n * @returns {Uint8Array | null} decoded bytes, or `null` when the payload is empty/undecodable\n */\nexport function decodeBase64ToBytes(b64: string): Uint8Array | null {\n\tif (!b64) return null\n\t// Strip any `data:...;base64,` prefix and surrounding whitespace\n\tconst comma = b64.indexOf('base64,')\n\tconst payload = (comma >= 0 ? b64.slice(comma + 'base64,'.length) : b64).replace(/\\s/g, '')\n\tif (!payload) return null\n\ttry {\n\t\tconst binary = atob(payload)\n\t\tconst bytes = new Uint8Array(binary.length)\n\t\tfor (let i = 0; i < binary.length; i++) bytes[i] = binary.charCodeAt(i)\n\t\treturn bytes\n\t} catch {\n\t\treturn null\n\t}\n}\n","/**\n * Intrinsic image geometry: reading a natural pixel size out of header bytes, and the\n * `<a:srcRect>` crop math that fits that natural size into a display box.\n *\n * Shared by both sides of the library — the write path (`addImage({ sizing })`) and the read\n * API's `Picture.setImage({ fit })` — which is why it lives outside `gen/` and `read/`.\n * Everything here is synchronous and pure: headers only, never pixel decoding.\n */\n\nimport { decodeBase64ToBytes } from './base64.js'\n\n/**\n * Read the intrinsic dimensions of an image from its header bytes.\n * - synchronous: parses only file-format headers, never decodes pixels\n * - raster: PNG, JPEG, GIF, BMP, and WebP (VP8 / VP8L / VP8X) — natural pixels\n * - vector: SVG — intrinsic size from the root `<svg>` width/height or viewBox\n * - unrecognized formats return `null` (no measurable intrinsic size)\n *\n * Used by image `sizing: 'cover' | 'contain'` to compute an aspect-correct\n * `<a:srcRect>` crop from the *natural* image ratio rather than the displayed box.\n * @param {string} dataB64 - base64 image payload or `data:` URI\n * @returns {{ w: number, h: number } | null} natural size, or `null` when unmeasurable\n */\nexport function getImageSizeFromBase64(dataB64: string): { w: number; h: number } | null {\n\tconst b = decodeBase64ToBytes(dataB64)\n\treturn b ? getImageSizeFromBytes(b) : null\n}\n\n/**\n * Read the intrinsic dimensions of an image from raw header bytes — the\n * byte-level core shared by {@link getImageSizeFromBase64} and the read API's\n * `Picture.setImage({ fit })`, which already holds the media bytes.\n * @param {Uint8Array} b - image bytes\n * @returns {{ w: number, h: number } | null} natural size, or `null` when unmeasurable\n */\nexport function getImageSizeFromBytes(b: Uint8Array): { w: number; h: number } | null {\n\tif (!b || b.length < 24) return null\n\n\t// Bounds-checked byte read: every access below is already guarded by an\n\t// explicit length check, so the `?? 0` fallback is unreachable in practice.\n\tconst u = (n: number): number => b[n] ?? 0\n\n\t// PNG: 8-byte signature, then IHDR with width@16 / height@20 (big-endian uint32)\n\tif (b[0] === 0x89 && b[1] === 0x50 && b[2] === 0x4e && b[3] === 0x47) {\n\t\tconst w = (u(16) << 24) | (u(17) << 16) | (u(18) << 8) | u(19)\n\t\tconst h = (u(20) << 24) | (u(21) << 16) | (u(22) << 8) | u(23)\n\t\treturn w > 0 && h > 0 ? { w, h } : null\n\t}\n\n\t// GIF: \"GIF87a\"/\"GIF89a\", width@6 / height@8 (little-endian uint16)\n\tif (b[0] === 0x47 && b[1] === 0x49 && b[2] === 0x46) {\n\t\tconst w = u(6) | (u(7) << 8)\n\t\tconst h = u(8) | (u(9) << 8)\n\t\treturn w > 0 && h > 0 ? { w, h } : null\n\t}\n\n\t// BMP: \"BM\", width@18 / height@22 (little-endian int32; height may be negative for top-down)\n\tif (b[0] === 0x42 && b[1] === 0x4d) {\n\t\tconst w = u(18) | (u(19) << 8) | (u(20) << 16) | (u(21) << 24)\n\t\tconst h = u(22) | (u(23) << 8) | (u(24) << 16) | (u(25) << 24)\n\t\tconst aw = Math.abs(w)\n\t\tconst ah = Math.abs(h)\n\t\treturn aw > 0 && ah > 0 ? { w: aw, h: ah } : null\n\t}\n\n\t// WebP: \"RIFF\"....\"WEBP\" then a VP8 / VP8L / VP8X chunk\n\tif (\n\t\tb[0] === 0x52 &&\n\t\tb[1] === 0x49 &&\n\t\tb[2] === 0x46 &&\n\t\tb[3] === 0x46 &&\n\t\tb[8] === 0x57 &&\n\t\tb[9] === 0x45 &&\n\t\tb[10] === 0x42 &&\n\t\tb[11] === 0x50\n\t) {\n\t\tconst fourCC = String.fromCharCode(u(12), u(13), u(14), u(15))\n\t\tif (fourCC === 'VP8 ' && b.length >= 30) {\n\t\t\t// Lossy: 14-bit width/height at offset 26/28 (little-endian, mask off scale bits)\n\t\t\tconst w = (u(26) | (u(27) << 8)) & 0x3fff\n\t\t\tconst h = (u(28) | (u(29) << 8)) & 0x3fff\n\t\t\treturn w > 0 && h > 0 ? { w, h } : null\n\t\t}\n\t\tif (fourCC === 'VP8L' && b.length >= 25) {\n\t\t\t// Lossless: 14-bit width/height packed starting at bit 0 of offset 21\n\t\t\tconst bits = u(21) | (u(22) << 8) | (u(23) << 16) | (u(24) << 24)\n\t\t\tconst w = (bits & 0x3fff) + 1\n\t\t\tconst h = ((bits >> 14) & 0x3fff) + 1\n\t\t\treturn w > 0 && h > 0 ? { w, h } : null\n\t\t}\n\t\tif (fourCC === 'VP8X' && b.length >= 30) {\n\t\t\t// Extended: 24-bit canvas width/height minus one at offset 24/27 (little-endian)\n\t\t\tconst w = (u(24) | (u(25) << 8) | (u(26) << 16)) + 1\n\t\t\tconst h = (u(27) | (u(28) << 8) | (u(29) << 16)) + 1\n\t\t\treturn w > 0 && h > 0 ? { w, h } : null\n\t\t}\n\t\treturn null\n\t}\n\n\t// JPEG: \"FFD8\", scan segment markers for a Start-Of-Frame (SOFn) and read height@5 / width@7\n\tif (b[0] === 0xff && b[1] === 0xd8) {\n\t\tlet i = 2\n\t\twhile (i + 9 < b.length) {\n\t\t\tif (b[i] !== 0xff) {\n\t\t\t\ti++\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tconst marker = u(i + 1)\n\t\t\t// SOF0..SOF15 carry frame dimensions, excluding DHT(C4)/JPG(C8)/DAC(CC)\n\t\t\tif (marker >= 0xc0 && marker <= 0xcf && marker !== 0xc4 && marker !== 0xc8 && marker !== 0xcc) {\n\t\t\t\tconst h = (u(i + 5) << 8) | u(i + 6)\n\t\t\t\tconst w = (u(i + 7) << 8) | u(i + 8)\n\t\t\t\treturn w > 0 && h > 0 ? { w, h } : null\n\t\t\t}\n\t\t\t// Standalone markers (RSTn / SOI / EOI / TEM) have no length payload\n\t\t\tif ((marker >= 0xd0 && marker <= 0xd9) || marker === 0x01) {\n\t\t\t\ti += 2\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\t// Otherwise skip this segment using its 2-byte big-endian length\n\t\t\tconst segLen = (u(i + 2) << 8) | u(i + 3)\n\t\t\tif (segLen < 2) break\n\t\t\ti += 2 + segLen\n\t\t}\n\t\treturn null\n\t}\n\n\t// SVG: text-based vector with no binary signature. When the payload is an\n\t// `<svg>` document, read its intrinsic size from the root element so that\n\t// `sizing: 'cover' | 'contain'` is aspect-correct for SVG, not just rasters.\n\tconst text = utf8Decode(b)\n\tif (/<svg[\\s>]/i.test(text)) return getSvgSizeFromMarkup(text)\n\n\treturn null\n}\n\n/**\n * Compute the `<a:srcRect>` crop percentages (each in 1/1000 of a percent, the\n * OOXML unit) for fitting an image of natural size `img` into a display `box`,\n * assuming the cropped region is then stretched to fill the box (`<a:stretch>`).\n *\n * - `cover`: fill the box, cropping the overflowing axis (positive l/r or t/b)\n * - `contain`: fit inside the box, letterboxing the short axis (negative l/r or t/b)\n *\n * Single source of truth for the crop math shared by the write side\n * (`ImageSizingXml`) and the read API's `Picture.setImage({ fit })`. `l`/`r` and\n * `t`/`b` are symmetric (centered crop).\n * @param {'cover' | 'contain'} type - fit mode\n * @param {{ w: number, h: number }} img - natural image pixel size\n * @param {{ w: number, h: number }} box - displayed frame size (any consistent unit)\n * @returns {{ l: number, r: number, t: number, b: number }} srcRect percentages\n */\nexport function fitSrcRectPercents(\n\ttype: 'cover' | 'contain',\n\timg: { w: number; h: number },\n\tbox: { w: number; h: number }\n): { l: number; r: number; t: number; b: number } {\n\tconst imgRatio = img.h / img.w\n\tconst boxRatio = box.h / box.w\n\tlet width: number\n\tlet height: number\n\tif (type === 'cover') {\n\t\tconst isBoxBased = boxRatio > imgRatio\n\t\twidth = isBoxBased ? box.h / imgRatio : box.w\n\t\theight = isBoxBased ? box.h : box.w * imgRatio\n\t} else {\n\t\tconst widthBased = boxRatio > imgRatio\n\t\twidth = widthBased ? box.w : box.h / imgRatio\n\t\theight = widthBased ? box.w * imgRatio : box.h\n\t}\n\tconst hz = Math.round(1e5 * 0.5 * (1 - box.w / width))\n\tconst vz = Math.round(1e5 * 0.5 * (1 - box.h / height))\n\treturn { l: hz, r: hz, t: vz, b: vz }\n}\n\n/**\n * Read the intrinsic size of an SVG document from its root `<svg>` element.\n * Follows the SVG sizing model: an explicit absolute `width`/`height` pair wins;\n * otherwise the `viewBox` width/height defines the size (and thus aspect ratio).\n * Percentage or missing `width`/`height` fall through to `viewBox`.\n * @param {string} svg - SVG markup\n * @returns {{ w: number, h: number } | null} intrinsic size, or `null` when undeterminable\n */\nfunction getSvgSizeFromMarkup(svg: string): { w: number; h: number } | null {\n\tconst openTag = /<svg\\b[^>]*>/i.exec(svg)?.[0]\n\tif (!openTag) return null\n\tconst attr = (name: string): string | null =>\n\t\tnew RegExp(`\\\\b${name}\\\\s*=\\\\s*[\"']([^\"']*)[\"']`, 'i').exec(openTag)?.[1] ?? null\n\t// Leading number with an optional absolute unit; a percentage is not an intrinsic length.\n\tconst absLength = (val: string | null): number => {\n\t\tif (val == null || /%\\s*$/.test(val)) return NaN\n\t\tconst m = /^\\s*\\+?(\\d*\\.?\\d+)/.exec(val)\n\t\treturn m ? parseFloat(m[1] ?? '') : NaN\n\t}\n\tlet w = absLength(attr('width'))\n\tlet h = absLength(attr('height'))\n\tif (!(w > 0 && h > 0)) {\n\t\tconst vb = attr('viewBox')\n\t\tconst p = vb\n\t\t\t? vb\n\t\t\t\t\t.trim()\n\t\t\t\t\t.split(/[\\s,]+/)\n\t\t\t\t\t.map(Number)\n\t\t\t: []\n\t\tconst vw = p[2]\n\t\tconst vh = p[3]\n\t\tif (p.length === 4 && vw != null && vh != null && vw > 0 && vh > 0) {\n\t\t\tw = vw\n\t\t\th = vh\n\t\t}\n\t}\n\treturn w > 0 && h > 0 ? { w, h } : null\n}\n\n/** Decode UTF-8 bytes to a string, isomorphic across Node and browsers. */\nfunction utf8Decode(bytes: Uint8Array): string {\n\treturn new TextDecoder().decode(bytes)\n}\n","/**\n * OPC relationship type URIs, and the two schema-URI bases they are built from.\n *\n * These are long, near-identical strings that differ in one path segment, which makes a typo\n * both easy to write and invisible on review — a wrong URI does not throw, it silently matches\n * nothing on the read side and produces a part PowerPoint ignores or rejects on the write side.\n *\n * **Why this module is neither `gen/` nor `read/`.** Both halves need the same URIs, and for a\n * while each kept its own copy (`gen/oxml/schema-uris.ts`, `read/api/rel-types.ts`), with a note\n * in both saying a shared home was \"a separate decision\". It is this module: a rel type is a fact\n * about the OOXML package format, not about writing or reading one, so neither side should own it.\n * A divergence between the two copies would mean the writer emitting a rel the reader cannot find\n * — a round-trip bug with no compile-time signal.\n *\n * Only types used by more than one module live here. A rel type exactly one module cares about\n * (`chart`, `hyperlink`, `tags`, the two comments parts, `oleObject`, the MS media rels, …) stays\n * declared next to the code that reads or emits it — hoisting those would trade a definition you\n * can see for one you have to go and find, and buy nothing.\n */\n\n/** Root of every ECMA-376 schema URI. Private: callers want one of the prefixes below. */\nconst SCHEMA_BASE = 'http://schemas.openxmlformats.org/'\n\n/**\n * Prefix for `.rels` `Type` URIs — append the type name (`slide`, `image`, `theme`, …).\n * Exported for the write side, which builds one-off rel types at their call sites.\n */\nexport const OFFICE_REL = SCHEMA_BASE + 'officeDocument/2006/relationships/'\n\n/** `xmlns` of every `<Relationships>` part. Also the prefix of the package-scoped rel types. */\nexport const PACKAGE_REL_NS = SCHEMA_BASE + 'package/2006/relationships'\n\n/** `p:sldIdLst` → a slide part. */\nexport const SLIDE_REL = OFFICE_REL + 'slide'\n/** A slide → its layout; a master → each of its layouts. */\nexport const SLIDE_LAYOUT_REL = OFFICE_REL + 'slideLayout'\n/** A layout → its master; the presentation → each master. */\nexport const SLIDE_MASTER_REL = OFFICE_REL + 'slideMaster'\n/** A slide → its notes slide. */\nexport const NOTES_SLIDE_REL = OFFICE_REL + 'notesSlide'\n/** A notes slide → the notes master; the presentation → the notes master. */\nexport const NOTES_MASTER_REL = OFFICE_REL + 'notesMaster'\n/** A master or notes master → its theme. Layouts and slides inherit it rather than holding one. */\nexport const THEME_REL = OFFICE_REL + 'theme'\n/** The package root → `ppt/presentation.xml`. The entry point to everything above. */\nexport const OFFICE_DOCUMENT_REL = OFFICE_REL + 'officeDocument'\n/** Any part → an image in `ppt/media/`. */\nexport const IMAGE_REL = OFFICE_REL + 'image'\n","/**\n * Validating a value against an `ST_` enumeration, under the two policies the library uses.\n *\n * **Why validate at all.** A value outside its `ST_` union makes the containing part\n * schema-invalid, and PowerPoint reports that as a *corrupt file* rather than as a mis-set\n * option — so the cost of letting one through is a deck that will not open, attributed to\n * nothing in particular. Both halves therefore check before a value reaches the XML.\n *\n * **Why two policies.** They differ deliberately, and the difference is about where the value\n * came from:\n *\n * - {@link checkEnumOrWarn} (write path) reports and **drops** the attribute, leaving the\n * renderer on the schema default. An option here comes from a deck being built, and losing one\n * attribute is better than failing an entire build over it.\n * - {@link checkEnumOrThrow} (read/edit path) **throws**. A value here comes from a caller\n * editing one attribute of a loaded deck, so silently doing nothing would leave them looking at\n * an unchanged file with no explanation.\n *\n * Before this module the two policies were spread across three near-identical private validators\n * (two in `gen/`, one in `read/`), each with its own wording; adding an enum meant writing a\n * fourth. The policy split is worth keeping — the triplication was not.\n */\n\nimport type { DiagnosticCode, InvalidOptionErrorCode } from '../codes.js'\nimport { warnOnce } from '../diagnostics.js'\nimport { InvalidOptionError } from '../errors.js'\n\n/**\n * Check a value against its `ST_` union, reporting and dropping it when outside (the write-path\n * policy — see the module note).\n *\n * `undefined`/`null` returns `null` without reporting: an unset option is not an invalid one, and\n * it is by far the common case.\n *\n * The offending value is interpolated into the message deliberately. {@link warnOnce} dedups on\n * code **and** message, so keeping the value in the text is what lets a second, *different* bad\n * value under the same code still get reported.\n * @param value - the value the caller supplied, if any\n * @param valid - the enum's members\n * @param code - the condition to report\n * @param label - how to name the offending option in the message, e.g. ``'table cell: cell3D `preset`'``\n * @param detail - extra structured context to merge into the diagnostic's `detail`\n * @returns the value when legal, else `null`\n */\nexport function checkEnumOrWarn<T extends string>(\n\tvalue: string | undefined | null,\n\tvalid: readonly T[],\n\tcode: DiagnosticCode,\n\tlabel: string,\n\tdetail?: Readonly<Record<string, unknown>>\n): T | null {\n\tif (value === undefined || value === null) return null\n\tif ((valid as readonly string[]).includes(value)) return value as T\n\twarnOnce(code, `${label} value \\`${String(value)}\\` is not valid and is ignored — use one of ${valid.join(', ')}.`, {\n\t\treceived: value,\n\t\tvalid,\n\t\t...detail,\n\t})\n\treturn null\n}\n\n/**\n * Check a value against its `ST_` union, throwing when outside (the read/edit-path policy — see\n * the module note).\n * @param value - the value the caller asked for\n * @param valid - the enum's members\n * @param attribute - the attribute's name, for the message\n * @param code - the condition to report\n * @returns `value`, when it is legal\n */\nexport function checkEnumOrThrow<T extends string>(\n\tvalue: string,\n\tvalid: readonly T[],\n\tattribute: string,\n\tcode: InvalidOptionErrorCode\n): T {\n\tif ((valid as readonly string[]).includes(value)) return value as T\n\tthrow new InvalidOptionError(\n\t\tcode,\n\t\t`Invalid ${attribute}: ${JSON.stringify(value)}. Expected one of: ${valid.join(', ')}.`\n\t)\n}\n","/**\n * `ST_` simple-type enumerations from ECMA-376, declared once as the single source of both the\n * TypeScript union a caller is checked against and the runtime list a value is validated against.\n *\n * **The problem this solves.** Each of these used to exist twice: a hand-written string union in\n * `src/types/` (what the compiler enforces) and a hand-written array in `src/gen/` or `src/read/`\n * (what the validator checks at run time). Nothing tied the two together, so adding a member to\n * one and not the other produced either a value TypeScript accepts and the validator drops, or a\n * value the validator passes and the type rejects. Two of them had already diverged in *order*,\n * which is harmless, but nothing would have caught a divergence in *content*.\n *\n * **The shape.** Every entry is a `readonly` tuple declared `as const`, with its union derived via\n * `(typeof X)[number]`. Widening the tuple widens the union in the same edit — they cannot drift.\n * This is the idiom already used for `EMBEDDED_FONT_SLOTS` and `EXTRA_SHAPE_PRESETS`; this module\n * brings the stragglers onto it.\n *\n * **Why this module is neither `gen/` nor `read/`.** `src/types/` needs the unions for the public\n * write API, `src/gen/` needs the tuples to vet a value before emitting it, and `src/read/` needs\n * them to vet a value before writing it into a loaded part. It is a fact about the schema, so it\n * belongs to none of the three.\n *\n * Values are listed in **schema declaration order**, which is the order the diagnostics print\n * when they tell a caller what is legal.\n */\n\n/**\n * `ST_BevelPresetType` — the bevel profile applied to a 3-D edge.\n * @see ECMA-376 Part 1 §20.1.10.9\n */\nexport const BEVEL_PRESETS = [\n\t'relaxedInset',\n\t'circle',\n\t'slope',\n\t'cross',\n\t'angle',\n\t'softRound',\n\t'convex',\n\t'coolSlant',\n\t'divot',\n\t'riblet',\n\t'hardEdge',\n\t'artDeco',\n] as const\nexport type BevelPresetType = (typeof BEVEL_PRESETS)[number]\n\n/**\n * `ST_PresetMaterialType` — how a 3-D surface responds to light.\n * @see ECMA-376 Part 1 §20.1.10.50\n */\nexport const PRESET_MATERIALS = [\n\t'legacyMatte',\n\t'legacyPlastic',\n\t'legacyMetal',\n\t'legacyWireframe',\n\t'matte',\n\t'plastic',\n\t'metal',\n\t'warmMatte',\n\t'translucentPowder',\n\t'powder',\n\t'dkEdge',\n\t'softEdge',\n\t'clear',\n\t'flat',\n\t'softmetal',\n] as const\nexport type PresetMaterialType = (typeof PRESET_MATERIALS)[number]\n\n/**\n * `ST_LightRigType` — the preset lighting scene.\n * @see ECMA-376 Part 1 §20.1.10.35\n */\nexport const LIGHT_RIGS = [\n\t'legacyFlat1',\n\t'legacyFlat2',\n\t'legacyFlat3',\n\t'legacyFlat4',\n\t'legacyNormal1',\n\t'legacyNormal2',\n\t'legacyNormal3',\n\t'legacyNormal4',\n\t'legacyHarsh1',\n\t'legacyHarsh2',\n\t'legacyHarsh3',\n\t'legacyHarsh4',\n\t'threePt',\n\t'balanced',\n\t'soft',\n\t'harsh',\n\t'flood',\n\t'contrasting',\n\t'morning',\n\t'sunrise',\n\t'sunset',\n\t'chilly',\n\t'freezing',\n\t'flat',\n\t'twoPt',\n\t'glow',\n\t'brightRoom',\n] as const\nexport type LightRigType = (typeof LIGHT_RIGS)[number]\n\n/**\n * `ST_LightRigDirection` — where the light rig sits relative to the scene.\n * @see ECMA-376 Part 1 §20.1.10.33\n */\nexport const LIGHT_RIG_DIRECTIONS = ['tl', 't', 'tr', 'l', 'r', 'bl', 'b', 'br'] as const\nexport type LightRigDirection = (typeof LIGHT_RIG_DIRECTIONS)[number]\n\n/**\n * `ST_TextHorzOverflowType` — `a:bodyPr/@horzOverflow` and `a:tcPr/@horzOverflow`.\n * @see ECMA-376 Part 1 §20.1.10.68\n */\nexport const TEXT_HORZ_OVERFLOW = ['clip', 'overflow'] as const\nexport type TextHorzOverflowType = (typeof TEXT_HORZ_OVERFLOW)[number]\n\n/**\n * `ST_TextAnchoringType` — `a:bodyPr/@anchor` and `a:tcPr/@anchor`.\n * @see ECMA-376 Part 1 §20.1.10.60\n */\nexport const TEXT_ANCHORS = ['t', 'ctr', 'b', 'just', 'dist'] as const\nexport type TextAnchoringType = (typeof TEXT_ANCHORS)[number]\n\n/**\n * `ST_TextVerticalType` — `a:bodyPr/@vert` and `a:tcPr/@vert`.\n * @see ECMA-376 Part 1 §20.1.10.83\n */\nexport const TEXT_VERTICAL = [\n\t'horz',\n\t'vert',\n\t'vert270',\n\t'wordArtVert',\n\t'eaVert',\n\t'mongolianVert',\n\t'wordArtVertRtl',\n] as const\nexport type TextVerticalType = (typeof TEXT_VERTICAL)[number]\n\n/**\n * `ST_PresetLineDashVal` — the dash pattern of a line or border (`a:prstDash/@val`).\n *\n * The `sys*` members are the \"system\" dashes whose exact dot/gap ratio the renderer picks; the\n * rest are defined by the spec. Both `BorderProps.dashType` and `ShapeLineProps.dashType` accept\n * this whole set, so a caller who knows one knows the other.\n * @see ECMA-376 Part 1 §20.1.10.49\n */\nexport const PRESET_LINE_DASHES = [\n\t'solid',\n\t'dot',\n\t'dash',\n\t'lgDash',\n\t'dashDot',\n\t'lgDashDot',\n\t'lgDashDotDot',\n\t'sysDash',\n\t'sysDot',\n\t'sysDashDot',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,IAAI,mBACT,MACA,WAAW,UAAU,IAAI,KAAK,UAAU,KAAK,EAAE,qBAAqB,MAAM,KAAK,IAAI,EAAE,EACtF;AACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACpDA,MAAa,gBAAgB;CAC5B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;;;;AAOA,MAAa,mBAAmB;CAC/B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;;;;AAOA,MAAa,aAAa;CACzB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;;;;AAOA,MAAa,uBAAuB;CAAC;CAAM;CAAK;CAAM;CAAK;CAAK;CAAM;CAAK;AAAI;;;;;AAO/E,MAAa,qBAAqB,CAAC,QAAQ,UAAU;;;;;AAOrD,MAAa,eAAe;CAAC;CAAK;CAAO;CAAK;CAAQ;AAAM;;;;;AAO5D,MAAa,gBAAgB;CAC5B;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;;;;;;;;AAWA,MAAa,qBAAqB;CACjC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD"}
1
+ {"version":3,"file":"st-enums-bVnezkMJ.js","names":[],"sources":["../src/media/base64.ts","../src/media/image-size.ts","../src/ooxml/rel-types.ts","../src/ooxml/check-enum.ts","../src/ooxml/st-enums.ts"],"sourcesContent":["/**\n * Base64 payload handling for media parts — isomorphic across Node and browsers\n * (`TextEncoder`/`atob`/`btoa` only, no `Buffer`).\n */\n\n/**\n * Encode raw SVG markup as a base64 `image/svg+xml` data URI.\n * - lets callers pass inline SVG to `addImage({ svg })` without hand-rolling base64\n * - isomorphic and UTF-8 safe: uses the global `TextEncoder`/`btoa` (Node and browsers)\n * @param {string} svg - SVG markup, e.g. `'<svg ...>...</svg>'`\n * @returns {string} a `data:image/svg+xml;base64,...` URI\n */\nexport function svgMarkupToDataUri(svg: string): string {\n\treturn `data:image/svg+xml;base64,${bytesToBase64(new TextEncoder().encode(svg))}`\n}\n\n/**\n * Encode raw bytes as base64 (no `data:` prefix) using only `btoa`, so the result is the same\n * on Node, in a browser, and in a runtime that has neither `Buffer` nor `FileReader`.\n *\n * Chunked because `String.fromCharCode(...spread)` blows the argument-count limit on a payload\n * of any real size — a multi-megabyte video rel would throw rather than encode.\n * @param {Uint8Array} bytes - the payload\n * @returns {string} base64 text\n */\nexport function bytesToBase64(bytes: Uint8Array): string {\n\tconst CHUNK = 0x8000\n\tlet binary = ''\n\tfor (let i = 0; i < bytes.length; i += CHUNK) binary += String.fromCharCode(...bytes.subarray(i, i + CHUNK))\n\treturn btoa(binary)\n}\n\n/**\n * Decode a base64 image payload (raw base64 or a `data:` URI) to bytes.\n * - tolerant of the `data:[mime];base64,` prefix and of whitespace in the payload\n * @param {string} b64 - base64 string or data URI\n * @returns {Uint8Array | null} decoded bytes, or `null` when the payload is empty/undecodable\n */\nexport function decodeBase64ToBytes(b64: string): Uint8Array | null {\n\tif (!b64) return null\n\t// Strip any `data:...;base64,` prefix and surrounding whitespace\n\tconst comma = b64.indexOf('base64,')\n\tconst payload = (comma >= 0 ? b64.slice(comma + 'base64,'.length) : b64).replace(/\\s/g, '')\n\tif (!payload) return null\n\ttry {\n\t\tconst binary = atob(payload)\n\t\tconst bytes = new Uint8Array(binary.length)\n\t\tfor (let i = 0; i < binary.length; i++) bytes[i] = binary.charCodeAt(i)\n\t\treturn bytes\n\t} catch {\n\t\treturn null\n\t}\n}\n","/**\n * Intrinsic image geometry: reading a natural pixel size out of header bytes, and the\n * `<a:srcRect>` crop math that fits that natural size into a display box.\n *\n * Shared by both sides of the library — the write path (`addImage({ sizing })`) and the read\n * API's `Picture.setImage({ fit })` — which is why it lives outside `gen/` and `read/`.\n * Everything here is synchronous and pure: headers only, never pixel decoding.\n */\n\nimport { decodeBase64ToBytes } from './base64.js'\n\n/**\n * Read the intrinsic dimensions of an image from its header bytes.\n * - synchronous: parses only file-format headers, never decodes pixels\n * - raster: PNG, JPEG, GIF, BMP, and WebP (VP8 / VP8L / VP8X) — natural pixels\n * - vector: SVG — intrinsic size from the root `<svg>` width/height or viewBox\n * - unrecognized formats return `null` (no measurable intrinsic size)\n *\n * Used by image `sizing: 'cover' | 'contain'` to compute an aspect-correct\n * `<a:srcRect>` crop from the *natural* image ratio rather than the displayed box.\n * @param {string} dataB64 - base64 image payload or `data:` URI\n * @returns {{ w: number, h: number } | null} natural size, or `null` when unmeasurable\n */\nexport function getImageSizeFromBase64(dataB64: string): { w: number; h: number } | null {\n\tconst b = decodeBase64ToBytes(dataB64)\n\treturn b ? getImageSizeFromBytes(b) : null\n}\n\n/**\n * Read the intrinsic dimensions of an image from raw header bytes — the\n * byte-level core shared by {@link getImageSizeFromBase64} and the read API's\n * `Picture.setImage({ fit })`, which already holds the media bytes.\n * @param {Uint8Array} b - image bytes\n * @returns {{ w: number, h: number } | null} natural size, or `null` when unmeasurable\n */\nexport function getImageSizeFromBytes(b: Uint8Array): { w: number; h: number } | null {\n\tif (!b || b.length < 24) return null\n\n\t// Bounds-checked byte read: every access below is already guarded by an\n\t// explicit length check, so the `?? 0` fallback is unreachable in practice.\n\tconst u = (n: number): number => b[n] ?? 0\n\n\t// PNG: 8-byte signature, then IHDR with width@16 / height@20 (big-endian uint32)\n\tif (b[0] === 0x89 && b[1] === 0x50 && b[2] === 0x4e && b[3] === 0x47) {\n\t\tconst w = (u(16) << 24) | (u(17) << 16) | (u(18) << 8) | u(19)\n\t\tconst h = (u(20) << 24) | (u(21) << 16) | (u(22) << 8) | u(23)\n\t\treturn w > 0 && h > 0 ? { w, h } : null\n\t}\n\n\t// GIF: \"GIF87a\"/\"GIF89a\", width@6 / height@8 (little-endian uint16)\n\tif (b[0] === 0x47 && b[1] === 0x49 && b[2] === 0x46) {\n\t\tconst w = u(6) | (u(7) << 8)\n\t\tconst h = u(8) | (u(9) << 8)\n\t\treturn w > 0 && h > 0 ? { w, h } : null\n\t}\n\n\t// BMP: \"BM\", width@18 / height@22 (little-endian int32; height may be negative for top-down)\n\tif (b[0] === 0x42 && b[1] === 0x4d) {\n\t\tconst w = u(18) | (u(19) << 8) | (u(20) << 16) | (u(21) << 24)\n\t\tconst h = u(22) | (u(23) << 8) | (u(24) << 16) | (u(25) << 24)\n\t\tconst aw = Math.abs(w)\n\t\tconst ah = Math.abs(h)\n\t\treturn aw > 0 && ah > 0 ? { w: aw, h: ah } : null\n\t}\n\n\t// WebP: \"RIFF\"....\"WEBP\" then a VP8 / VP8L / VP8X chunk\n\tif (\n\t\tb[0] === 0x52 &&\n\t\tb[1] === 0x49 &&\n\t\tb[2] === 0x46 &&\n\t\tb[3] === 0x46 &&\n\t\tb[8] === 0x57 &&\n\t\tb[9] === 0x45 &&\n\t\tb[10] === 0x42 &&\n\t\tb[11] === 0x50\n\t) {\n\t\tconst fourCC = String.fromCharCode(u(12), u(13), u(14), u(15))\n\t\tif (fourCC === 'VP8 ' && b.length >= 30) {\n\t\t\t// Lossy: 14-bit width/height at offset 26/28 (little-endian, mask off scale bits)\n\t\t\tconst w = (u(26) | (u(27) << 8)) & 0x3fff\n\t\t\tconst h = (u(28) | (u(29) << 8)) & 0x3fff\n\t\t\treturn w > 0 && h > 0 ? { w, h } : null\n\t\t}\n\t\tif (fourCC === 'VP8L' && b.length >= 25) {\n\t\t\t// Lossless: 14-bit width/height packed starting at bit 0 of offset 21\n\t\t\tconst bits = u(21) | (u(22) << 8) | (u(23) << 16) | (u(24) << 24)\n\t\t\tconst w = (bits & 0x3fff) + 1\n\t\t\tconst h = ((bits >> 14) & 0x3fff) + 1\n\t\t\treturn w > 0 && h > 0 ? { w, h } : null\n\t\t}\n\t\tif (fourCC === 'VP8X' && b.length >= 30) {\n\t\t\t// Extended: 24-bit canvas width/height minus one at offset 24/27 (little-endian)\n\t\t\tconst w = (u(24) | (u(25) << 8) | (u(26) << 16)) + 1\n\t\t\tconst h = (u(27) | (u(28) << 8) | (u(29) << 16)) + 1\n\t\t\treturn w > 0 && h > 0 ? { w, h } : null\n\t\t}\n\t\treturn null\n\t}\n\n\t// JPEG: \"FFD8\", scan segment markers for a Start-Of-Frame (SOFn) and read height@5 / width@7\n\tif (b[0] === 0xff && b[1] === 0xd8) {\n\t\tlet i = 2\n\t\twhile (i + 9 < b.length) {\n\t\t\tif (b[i] !== 0xff) {\n\t\t\t\ti++\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tconst marker = u(i + 1)\n\t\t\t// SOF0..SOF15 carry frame dimensions, excluding DHT(C4)/JPG(C8)/DAC(CC)\n\t\t\tif (marker >= 0xc0 && marker <= 0xcf && marker !== 0xc4 && marker !== 0xc8 && marker !== 0xcc) {\n\t\t\t\tconst h = (u(i + 5) << 8) | u(i + 6)\n\t\t\t\tconst w = (u(i + 7) << 8) | u(i + 8)\n\t\t\t\treturn w > 0 && h > 0 ? { w, h } : null\n\t\t\t}\n\t\t\t// Standalone markers (RSTn / SOI / EOI / TEM) have no length payload\n\t\t\tif ((marker >= 0xd0 && marker <= 0xd9) || marker === 0x01) {\n\t\t\t\ti += 2\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\t// Otherwise skip this segment using its 2-byte big-endian length\n\t\t\tconst segLen = (u(i + 2) << 8) | u(i + 3)\n\t\t\tif (segLen < 2) break\n\t\t\ti += 2 + segLen\n\t\t}\n\t\treturn null\n\t}\n\n\t// SVG: text-based vector with no binary signature. When the payload is an\n\t// `<svg>` document, read its intrinsic size from the root element so that\n\t// `sizing: 'cover' | 'contain'` is aspect-correct for SVG, not just rasters.\n\tconst text = utf8Decode(b)\n\tif (/<svg[\\s>]/i.test(text)) return getSvgSizeFromMarkup(text)\n\n\treturn null\n}\n\n/**\n * Compute the `<a:srcRect>` crop percentages (each in 1/1000 of a percent, the\n * OOXML unit) for fitting an image of natural size `img` into a display `box`,\n * assuming the cropped region is then stretched to fill the box (`<a:stretch>`).\n *\n * - `cover`: fill the box, cropping the overflowing axis (positive l/r or t/b)\n * - `contain`: fit inside the box, letterboxing the short axis (negative l/r or t/b)\n *\n * Single source of truth for the crop math shared by the write side\n * (`ImageSizingXml`) and the read API's `Picture.setImage({ fit })`. `l`/`r` and\n * `t`/`b` are symmetric (centered crop).\n * @param {'cover' | 'contain'} type - fit mode\n * @param {{ w: number, h: number }} img - natural image pixel size\n * @param {{ w: number, h: number }} box - displayed frame size (any consistent unit)\n * @returns {{ l: number, r: number, t: number, b: number }} srcRect percentages\n */\nexport function fitSrcRectPercents(\n\ttype: 'cover' | 'contain',\n\timg: { w: number; h: number },\n\tbox: { w: number; h: number }\n): { l: number; r: number; t: number; b: number } {\n\tconst imgRatio = img.h / img.w\n\tconst boxRatio = box.h / box.w\n\tlet width: number\n\tlet height: number\n\tif (type === 'cover') {\n\t\tconst isBoxBased = boxRatio > imgRatio\n\t\twidth = isBoxBased ? box.h / imgRatio : box.w\n\t\theight = isBoxBased ? box.h : box.w * imgRatio\n\t} else {\n\t\tconst widthBased = boxRatio > imgRatio\n\t\twidth = widthBased ? box.w : box.h / imgRatio\n\t\theight = widthBased ? box.w * imgRatio : box.h\n\t}\n\tconst hz = Math.round(1e5 * 0.5 * (1 - box.w / width))\n\tconst vz = Math.round(1e5 * 0.5 * (1 - box.h / height))\n\treturn { l: hz, r: hz, t: vz, b: vz }\n}\n\n/**\n * Read the intrinsic size of an SVG document from its root `<svg>` element.\n * Follows the SVG sizing model: an explicit absolute `width`/`height` pair wins;\n * otherwise the `viewBox` width/height defines the size (and thus aspect ratio).\n * Percentage or missing `width`/`height` fall through to `viewBox`.\n * @param {string} svg - SVG markup\n * @returns {{ w: number, h: number } | null} intrinsic size, or `null` when undeterminable\n */\nfunction getSvgSizeFromMarkup(svg: string): { w: number; h: number } | null {\n\tconst openTag = /<svg\\b[^>]*>/i.exec(svg)?.[0]\n\tif (!openTag) return null\n\tconst attr = (name: string): string | null =>\n\t\tnew RegExp(`\\\\b${name}\\\\s*=\\\\s*[\"']([^\"']*)[\"']`, 'i').exec(openTag)?.[1] ?? null\n\t// Leading number with an optional absolute unit; a percentage is not an intrinsic length.\n\tconst absLength = (val: string | null): number => {\n\t\tif (val == null || /%\\s*$/.test(val)) return NaN\n\t\tconst m = /^\\s*\\+?(\\d*\\.?\\d+)/.exec(val)\n\t\treturn m ? parseFloat(m[1] ?? '') : NaN\n\t}\n\tlet w = absLength(attr('width'))\n\tlet h = absLength(attr('height'))\n\tif (!(w > 0 && h > 0)) {\n\t\tconst vb = attr('viewBox')\n\t\tconst p = vb\n\t\t\t? vb\n\t\t\t\t\t.trim()\n\t\t\t\t\t.split(/[\\s,]+/)\n\t\t\t\t\t.map(Number)\n\t\t\t: []\n\t\tconst vw = p[2]\n\t\tconst vh = p[3]\n\t\tif (p.length === 4 && vw != null && vh != null && vw > 0 && vh > 0) {\n\t\t\tw = vw\n\t\t\th = vh\n\t\t}\n\t}\n\treturn w > 0 && h > 0 ? { w, h } : null\n}\n\n/** Decode UTF-8 bytes to a string, isomorphic across Node and browsers. */\nfunction utf8Decode(bytes: Uint8Array): string {\n\treturn new TextDecoder().decode(bytes)\n}\n","/**\n * OPC relationship type URIs, and the two schema-URI bases they are built from.\n *\n * These are long, near-identical strings that differ in one path segment, which makes a typo\n * both easy to write and invisible on review — a wrong URI does not throw, it silently matches\n * nothing on the read side and produces a part PowerPoint ignores or rejects on the write side.\n *\n * **Why this module is neither `gen/` nor `read/`.** Both halves need the same URIs, and for a\n * while each kept its own copy (`gen/oxml/schema-uris.ts`, `read/api/rel-types.ts`), with a note\n * in both saying a shared home was \"a separate decision\". It is this module: a rel type is a fact\n * about the OOXML package format, not about writing or reading one, so neither side should own it.\n * A divergence between the two copies would mean the writer emitting a rel the reader cannot find\n * — a round-trip bug with no compile-time signal.\n *\n * Only types used by more than one module live here. A rel type exactly one module cares about\n * (`chart`, `hyperlink`, `tags`, the two comments parts, `oleObject`, the MS media rels, …) stays\n * declared next to the code that reads or emits it — hoisting those would trade a definition you\n * can see for one you have to go and find, and buy nothing.\n */\n\n/** Root of every ECMA-376 schema URI. Private: callers want one of the prefixes below. */\nconst SCHEMA_BASE = 'http://schemas.openxmlformats.org/'\n\n/**\n * Prefix for `.rels` `Type` URIs — append the type name (`slide`, `image`, `theme`, …).\n * Exported for the write side, which builds one-off rel types at their call sites.\n */\nexport const OFFICE_REL = SCHEMA_BASE + 'officeDocument/2006/relationships/'\n\n/** `xmlns` of every `<Relationships>` part. Also the prefix of the package-scoped rel types. */\nexport const PACKAGE_REL_NS = SCHEMA_BASE + 'package/2006/relationships'\n\n/** `p:sldIdLst` → a slide part. */\nexport const SLIDE_REL = OFFICE_REL + 'slide'\n/** A slide → its layout; a master → each of its layouts. */\nexport const SLIDE_LAYOUT_REL = OFFICE_REL + 'slideLayout'\n/** A layout → its master; the presentation → each master. */\nexport const SLIDE_MASTER_REL = OFFICE_REL + 'slideMaster'\n/** A slide → its notes slide. */\nexport const NOTES_SLIDE_REL = OFFICE_REL + 'notesSlide'\n/** A notes slide → the notes master; the presentation → the notes master. */\nexport const NOTES_MASTER_REL = OFFICE_REL + 'notesMaster'\n/** A master or notes master → its theme. Layouts and slides inherit it rather than holding one. */\nexport const THEME_REL = OFFICE_REL + 'theme'\n/** The package root → `ppt/presentation.xml`. The entry point to everything above. */\nexport const OFFICE_DOCUMENT_REL = OFFICE_REL + 'officeDocument'\n/** Any part → an image in `ppt/media/`. */\nexport const IMAGE_REL = OFFICE_REL + 'image'\n","/**\n * Validating a value against an `ST_` enumeration, under the two policies the library uses.\n *\n * **Why validate at all.** A value outside its `ST_` union makes the containing part\n * schema-invalid, and PowerPoint reports that as a *corrupt file* rather than as a mis-set\n * option — so the cost of letting one through is a deck that will not open, attributed to\n * nothing in particular. Both halves therefore check before a value reaches the XML.\n *\n * **Why two policies.** They differ deliberately, and the difference is about where the value\n * came from:\n *\n * - {@link checkEnumOrWarn} (write path) reports and **drops** the attribute, leaving the\n * renderer on the schema default. An option here comes from a deck being built, and losing one\n * attribute is better than failing an entire build over it.\n * - {@link checkEnumOrThrow} (read/edit path) **throws**. A value here comes from a caller\n * editing one attribute of a loaded deck, so silently doing nothing would leave them looking at\n * an unchanged file with no explanation.\n *\n * Before this module the two policies were spread across three near-identical private validators\n * (two in `gen/`, one in `read/`), each with its own wording; adding an enum meant writing a\n * fourth. The policy split is worth keeping — the triplication was not.\n */\n\nimport type { DiagnosticCode, InvalidOptionErrorCode } from '../codes.js'\nimport { warnOnce } from '../diagnostics.js'\nimport { InvalidOptionError } from '../errors.js'\n\n/**\n * Check a value against its `ST_` union, reporting and dropping it when outside (the write-path\n * policy — see the module note).\n *\n * `undefined`/`null` returns `null` without reporting: an unset option is not an invalid one, and\n * it is by far the common case.\n *\n * The offending value is interpolated into the message deliberately. {@link warnOnce} dedups on\n * code **and** message, so keeping the value in the text is what lets a second, *different* bad\n * value under the same code still get reported.\n * @param value - the value the caller supplied, if any\n * @param valid - the enum's members\n * @param code - the condition to report\n * @param label - how to name the offending option in the message, e.g. ``'table cell: cell3D `preset`'``\n * @param detail - extra structured context to merge into the diagnostic's `detail`\n * @returns the value when legal, else `null`\n */\nexport function checkEnumOrWarn<T extends string>(\n\tvalue: string | undefined | null,\n\tvalid: readonly T[],\n\tcode: DiagnosticCode,\n\tlabel: string,\n\tdetail?: Readonly<Record<string, unknown>>\n): T | null {\n\tif (value === undefined || value === null) return null\n\tif ((valid as readonly string[]).includes(value)) return value as T\n\twarnOnce(code, `${label} value \\`${String(value)}\\` is not valid and is ignored — use one of ${valid.join(', ')}.`, {\n\t\treceived: value,\n\t\tvalid,\n\t\t...detail,\n\t})\n\treturn null\n}\n\n/**\n * Check a value against its `ST_` union, throwing when outside (the read/edit-path policy — see\n * the module note).\n * @param value - the value the caller asked for\n * @param valid - the enum's members\n * @param attribute - the attribute's name, for the message\n * @param code - the condition to report\n * @returns `value`, when it is legal\n */\nexport function checkEnumOrThrow<T extends string>(\n\tvalue: string,\n\tvalid: readonly T[],\n\tattribute: string,\n\tcode: InvalidOptionErrorCode\n): T {\n\tif ((valid as readonly string[]).includes(value)) return value as T\n\tthrow new InvalidOptionError(\n\t\tcode,\n\t\t`Invalid ${attribute}: ${JSON.stringify(value)}. Expected one of: ${valid.join(', ')}.`\n\t)\n}\n","/**\n * `ST_` simple-type enumerations from ECMA-376, declared once as the single source of both the\n * TypeScript union a caller is checked against and the runtime list a value is validated against.\n *\n * **The problem this solves.** Each of these used to exist twice: a hand-written string union in\n * `src/types/` (what the compiler enforces) and a hand-written array in `src/gen/` or `src/read/`\n * (what the validator checks at run time). Nothing tied the two together, so adding a member to\n * one and not the other produced either a value TypeScript accepts and the validator drops, or a\n * value the validator passes and the type rejects. Two of them had already diverged in *order*,\n * which is harmless, but nothing would have caught a divergence in *content*.\n *\n * **The shape.** Every entry is a `readonly` tuple declared `as const`, with its union derived via\n * `(typeof X)[number]`. Widening the tuple widens the union in the same edit — they cannot drift.\n * This is the idiom already used for `EMBEDDED_FONT_SLOTS` and `EXTRA_SHAPE_PRESETS`; this module\n * brings the stragglers onto it.\n *\n * **Why this module is neither `gen/` nor `read/`.** `src/types/` needs the unions for the public\n * write API, `src/gen/` needs the tuples to vet a value before emitting it, and `src/read/` needs\n * them to vet a value before writing it into a loaded part. It is a fact about the schema, so it\n * belongs to none of the three.\n *\n * Values are listed in **schema declaration order**, which is the order the diagnostics print\n * when they tell a caller what is legal.\n */\n\n/**\n * `ST_BevelPresetType` — the bevel profile applied to a 3-D edge.\n * @see ECMA-376 Part 1 §20.1.10.9\n */\nexport const BEVEL_PRESETS = [\n\t'relaxedInset',\n\t'circle',\n\t'slope',\n\t'cross',\n\t'angle',\n\t'softRound',\n\t'convex',\n\t'coolSlant',\n\t'divot',\n\t'riblet',\n\t'hardEdge',\n\t'artDeco',\n] as const\nexport type BevelPresetType = (typeof BEVEL_PRESETS)[number]\n\n/**\n * `ST_PresetMaterialType` — how a 3-D surface responds to light.\n * @see ECMA-376 Part 1 §20.1.10.50\n */\nexport const PRESET_MATERIALS = [\n\t'legacyMatte',\n\t'legacyPlastic',\n\t'legacyMetal',\n\t'legacyWireframe',\n\t'matte',\n\t'plastic',\n\t'metal',\n\t'warmMatte',\n\t'translucentPowder',\n\t'powder',\n\t'dkEdge',\n\t'softEdge',\n\t'clear',\n\t'flat',\n\t'softmetal',\n] as const\nexport type PresetMaterialType = (typeof PRESET_MATERIALS)[number]\n\n/**\n * `ST_LightRigType` — the preset lighting scene.\n * @see ECMA-376 Part 1 §20.1.10.35\n */\nexport const LIGHT_RIGS = [\n\t'legacyFlat1',\n\t'legacyFlat2',\n\t'legacyFlat3',\n\t'legacyFlat4',\n\t'legacyNormal1',\n\t'legacyNormal2',\n\t'legacyNormal3',\n\t'legacyNormal4',\n\t'legacyHarsh1',\n\t'legacyHarsh2',\n\t'legacyHarsh3',\n\t'legacyHarsh4',\n\t'threePt',\n\t'balanced',\n\t'soft',\n\t'harsh',\n\t'flood',\n\t'contrasting',\n\t'morning',\n\t'sunrise',\n\t'sunset',\n\t'chilly',\n\t'freezing',\n\t'flat',\n\t'twoPt',\n\t'glow',\n\t'brightRoom',\n] as const\nexport type LightRigType = (typeof LIGHT_RIGS)[number]\n\n/**\n * `ST_LightRigDirection` — where the light rig sits relative to the scene.\n * @see ECMA-376 Part 1 §20.1.10.33\n */\nexport const LIGHT_RIG_DIRECTIONS = ['tl', 't', 'tr', 'l', 'r', 'bl', 'b', 'br'] as const\nexport type LightRigDirection = (typeof LIGHT_RIG_DIRECTIONS)[number]\n\n/**\n * `ST_TextHorzOverflowType` — `a:bodyPr/@horzOverflow` and `a:tcPr/@horzOverflow`.\n * @see ECMA-376 Part 1 §20.1.10.68\n */\nexport const TEXT_HORZ_OVERFLOW = ['clip', 'overflow'] as const\nexport type TextHorzOverflowType = (typeof TEXT_HORZ_OVERFLOW)[number]\n\n/**\n * `ST_TextAnchoringType` — `a:bodyPr/@anchor` and `a:tcPr/@anchor`.\n * @see ECMA-376 Part 1 §20.1.10.60\n */\nexport const TEXT_ANCHORS = ['t', 'ctr', 'b', 'just', 'dist'] as const\nexport type TextAnchoringType = (typeof TEXT_ANCHORS)[number]\n\n/**\n * `ST_TextVerticalType` — `a:bodyPr/@vert` and `a:tcPr/@vert`.\n * @see ECMA-376 Part 1 §20.1.10.83\n */\nexport const TEXT_VERTICAL = [\n\t'horz',\n\t'vert',\n\t'vert270',\n\t'wordArtVert',\n\t'eaVert',\n\t'mongolianVert',\n\t'wordArtVertRtl',\n] as const\nexport type TextVerticalType = (typeof TEXT_VERTICAL)[number]\n\n/**\n * `ST_PresetLineDashVal` — the dash pattern of a line or border (`a:prstDash/@val`).\n *\n * The `sys*` members are the \"system\" dashes whose exact dot/gap ratio the renderer picks; the\n * rest are defined by the spec. Both `BorderProps.dashType` and `ShapeLineProps.dashType` accept\n * this whole set, so a caller who knows one knows the other.\n * @see ECMA-376 Part 1 §20.1.10.49\n */\nexport const PRESET_LINE_DASHES = [\n\t'solid',\n\t'dot',\n\t'dash',\n\t'lgDash',\n\t'dashDot',\n\t'lgDashDot',\n\t'lgDashDotDot',\n\t'sysDash',\n\t'sysDot',\n\t'sysDashDot',\n\t'sysDashDotDot',\n] as const\nexport type PresetLineDashVal = (typeof PRESET_LINE_DASHES)[number]\n"],"mappings":";;;;;;;;;;;;;;AAYA,SAAgB,mBAAmB,KAAqB;CACvD,OAAO,6BAA6B,cAAc,IAAI,YAAY,CAAC,CAAC,OAAO,GAAG,CAAC;AAChF;;;;;;;;;;AAWA,SAAgB,cAAc,OAA2B;CACxD,MAAM,QAAQ;CACd,IAAI,SAAS;CACb,KAAK,IAAI,IAAI,GAAG,IAAI,MAAM,QAAQ,KAAK,OAAO,UAAU,OAAO,aAAa,GAAG,MAAM,SAAS,GAAG,IAAI,KAAK,CAAC;CAC3G,OAAO,KAAK,MAAM;AACnB;;;;;;;AAQA,SAAgB,oBAAoB,KAAgC;CACnE,IAAI,CAAC,KAAK,OAAO;CAEjB,MAAM,QAAQ,IAAI,QAAQ,SAAS;CACn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