@shbernal/ts-pptx 3.1.0 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/README.md +39 -3
  2. package/dist/browser.d.ts +4 -4
  3. package/dist/browser.js +1 -1
  4. package/dist/{diagnostics-PMINsVP6.d.ts → diagnostics-Chjz_4_Q.d.ts} +4 -4
  5. package/dist/{diagnostics-PMINsVP6.d.ts.map → diagnostics-Chjz_4_Q.d.ts.map} +1 -1
  6. package/dist/{errors-BeUEkNWL.d.ts → errors-BVLCFr-t.d.ts} +2 -2
  7. package/dist/{errors-BeUEkNWL.d.ts.map → errors-BVLCFr-t.d.ts.map} +1 -1
  8. package/dist/html.d.ts +3 -3
  9. package/dist/index.d.ts +4 -4
  10. package/dist/index.js +1 -1
  11. package/dist/inspect.d.ts +1 -1
  12. package/dist/inspect.js +2 -2
  13. package/dist/math.d.ts +1 -1
  14. package/dist/measure.d.ts +2 -2
  15. package/dist/node.d.ts +4 -4
  16. package/dist/node.js +1 -1
  17. package/dist/{pres-BgvxhQ_m.d.ts → pres-C-EU3SkN.d.ts} +2 -2
  18. package/dist/{pres-BgvxhQ_m.d.ts.map → pres-C-EU3SkN.d.ts.map} +1 -1
  19. package/dist/{presentation-BP1B8PCF.js → presentation-CxnUVhK9.js} +100 -24
  20. package/dist/presentation-CxnUVhK9.js.map +1 -0
  21. package/dist/{presentation-DyIRDKkp.d.ts → presentation-Osx1cDdJ.d.ts} +128 -31
  22. package/dist/presentation-Osx1cDdJ.d.ts.map +1 -0
  23. package/dist/read.d.ts +4 -4
  24. package/dist/read.js +2 -2
  25. package/dist/script.d.ts +32 -4
  26. package/dist/script.d.ts.map +1 -1
  27. package/dist/script.js +0 -0
  28. package/dist/script.js.map +1 -1
  29. package/dist/{shapes-DMThLsZN.js → shapes-DoJBPrwN.js} +79 -61
  30. package/dist/shapes-DoJBPrwN.js.map +1 -0
  31. package/dist/{slide-BRAtT8Dl.d.ts → slide-BTfn1Pyp.d.ts} +92 -9
  32. package/dist/slide-BTfn1Pyp.d.ts.map +1 -0
  33. package/dist/{text-B6PbMFih.js → text-C4P9MNdf.js} +157 -77
  34. package/dist/text-C4P9MNdf.js.map +1 -0
  35. package/dist/zip.d.ts +1 -1
  36. package/package.json +5 -2
  37. package/skills/ts-pptx-upstream/SKILL.md +107 -14
  38. package/dist/presentation-BP1B8PCF.js.map +0 -1
  39. package/dist/presentation-DyIRDKkp.d.ts.map +0 -1
  40. package/dist/shapes-DMThLsZN.js.map +0 -1
  41. package/dist/slide-BRAtT8Dl.d.ts.map +0 -1
  42. package/dist/text-B6PbMFih.js.map +0 -1
@@ -28,9 +28,19 @@ interface TextBaseProps {
28
28
  * Add standard or custom bullet
29
29
  * - use `true` for standard bullet
30
30
  * - pass object options for custom bullet
31
+ * - `false` (and omitting the option) is the *explicit off*: it writes `<a:buNone/>`
32
+ * plus `marL="0" indent="0"`, which overrides whatever bullet the layout's or
33
+ * master's list style sets for this level
34
+ * - `'inherit'` states nothing at all — no bullet child and no margin attributes — so
35
+ * the list style keeps reaching the paragraph. This is the one state omission
36
+ * cannot spell, because omitting the option means `false` here for compatibility
37
+ *
38
+ * The margins are only a *default* of the bullet state: {@link paraMarginLeft} and
39
+ * {@link paraIndent} state `@marL`/`@indent` independently in any of the three, including
40
+ * an inherited margin under a drawn bullet.
31
41
  * @default false
32
42
  */
33
- bullet?: boolean | {
43
+ bullet?: boolean | 'inherit' | {
34
44
  /**
35
45
  * Bullet type
36
46
  * @default bullet
@@ -101,11 +111,14 @@ interface TextBaseProps {
101
111
  color?: HexColor;
102
112
  };
103
113
  /**
104
- * Text capitalization
114
+ * Text capitalization (`a:rPr/@cap`, `ST_TextCapsType`)
105
115
  * - `'all'` = ALL CAPS
106
116
  * - `'small'` = Small Caps
107
- * - `'none'` = no override (default)
117
+ * - `'none'` = the *explicit off*: it writes `cap="none"`, which overrides a capitalization
118
+ * the run would otherwise inherit. Omitting the option states nothing and lets that
119
+ * inheritance stand
108
120
  * - PowerPoint: Font > Effects > All Caps / Small Caps
121
+ * @default (unset) inherit
109
122
  */
110
123
  caps?: 'none' | 'small' | 'all';
111
124
  /**
@@ -156,6 +169,38 @@ interface TextBaseProps {
156
169
  * @example 'fr-CA' // french Canadian
157
170
  */
158
171
  lang?: string;
172
+ /**
173
+ * First-line indent (points) — `a:pPr/@indent`, the offset of the paragraph's FIRST line
174
+ * from {@link paraMarginLeft}. Negative hangs the first line to the left of the body, which
175
+ * is what a bulleted paragraph does; positive indents it to the right, the "first line
176
+ * indented" prose form. PowerPoint: Paragraph > Indentation > Special.
177
+ * - `'inherit'` writes no `@indent` at all, so the paragraph takes whatever its list style
178
+ * (`a:lstStyle` → placeholder → layout → master) sets — the same third state
179
+ * {@link bullet} spells, on the attribute beside it
180
+ * - omitting the option keeps the bullet-derived default: a drawn bullet hangs the first
181
+ * line by its margin, `bullet: false` writes `indent="0"`, `bullet: 'inherit'` writes
182
+ * nothing
183
+ * - a value here overrides all of those, in every bullet state
184
+ * @example -18 // hang the first line 18pt left of the body text
185
+ * @example 18 // indent the first line 18pt, prose style
186
+ * @example 'inherit' // keep the list style's indent, even on a bulleted paragraph
187
+ */
188
+ paraIndent?: number | 'inherit';
189
+ /**
190
+ * Left margin of the paragraph (points) — `a:pPr/@marL`, where the paragraph's body text
191
+ * starts. This is the paragraph's own margin, not the text frame's internal padding
192
+ * (`margin`) and not the discrete outline level (`indentLevel`, which writes `a:p/@lvl`).
193
+ * PowerPoint: Paragraph > Indentation > Before text.
194
+ * - `'inherit'` writes no `@marL` at all, so the paragraph takes whatever its list style
195
+ * (`a:lstStyle` → placeholder → layout → master) sets — the third state that omission
196
+ * cannot spell, since omitting it writes the bullet-derived default
197
+ * - omitting the option keeps that default: a drawn bullet writes its own margin (see
198
+ * `bullet.indent`), `bullet: false` writes `marL="0"`, `bullet: 'inherit'` writes nothing
199
+ * - a value here overrides all of those, in every bullet state
200
+ * @example 36 // body text starts 36pt (0.5in) from the frame's text edge
201
+ * @example 'inherit' // keep the list style's margin, even on a bulleted paragraph
202
+ */
203
+ paraMarginLeft?: number | 'inherit';
159
204
  /**
160
205
  * Add a soft line-break (shift+enter) before line text content
161
206
  * @default false
@@ -189,10 +234,15 @@ interface TextBaseProps {
189
234
  /**
190
235
  * underline properties
191
236
  * - PowerPoint: Font > Color & Underline > Underline Style/Underline Color
192
- * @default (none)
237
+ * - `style` is the full `ST_TextUnderlineType` enumeration (ECMA-376 §20.1.10.81)
238
+ * - `'none'` is the *explicit off*: it writes `a:rPr/@u="none"`, which overrides an
239
+ * underline the run would otherwise inherit from its list style, placeholder, layout or
240
+ * master. Omitting the option instead states nothing and lets that inheritance stand —
241
+ * the two are different facts, not two spellings of one.
242
+ * @default (unset) inherit
193
243
  */
194
244
  underline?: {
195
- style?: 'dash' | 'dashHeavy' | 'dashLong' | 'dashLongHeavy' | 'dbl' | 'dotDash' | 'dotDashHeave' | 'dotDotDash' | 'dotDotDashHeavy' | 'dotted' | 'dottedHeavy' | 'heavy' | 'none' | 'sng' | 'wavy' | 'wavyDbl' | 'wavyHeavy';
245
+ style?: 'dash' | 'dashHeavy' | 'dashLong' | 'dashLongHeavy' | 'dbl' | 'dotDash' | 'dotDashHeavy' | 'dotDotDash' | 'dotDotDashHeavy' | 'dotted' | 'dottedHeavy' | 'heavy' | 'none' | 'sng' | 'wavy' | 'wavyDbl' | 'wavyHeavy' | 'words';
196
246
  color?: Color;
197
247
  };
198
248
  /**
@@ -388,7 +438,19 @@ interface TextPropsOptions extends PositionProps, DataOrPathProps, TextBaseProps
388
438
  rtlMode?: boolean;
389
439
  shadow?: ShadowProps;
390
440
  shape?: SHAPE_NAME;
391
- strike?: boolean | 'dblStrike' | 'sngStrike';
441
+ /**
442
+ * Strikethrough (`a:rPr/@strike`, `ST_TextStrikeType` — ECMA-376 §20.1.10.78)
443
+ * - `true` is `'sngStrike'`; `'dblStrike'` is the double rule
444
+ * - `'noStrike'` is the *explicit off*: it writes `strike="noStrike"`, which overrides a
445
+ * strikethrough the run would otherwise inherit from its list style, placeholder, layout
446
+ * or master
447
+ * - `false`, like leaving the option out, writes no attribute at all and so states
448
+ * *nothing* — the run keeps whatever it inherits. This matches `bold`/`italic`, whose
449
+ * falsy arm is likewise an omission; reach for `'noStrike'` when the intent is "not
450
+ * struck" rather than "unspecified"
451
+ * @default (unset) inherit
452
+ */
453
+ strike?: boolean | 'noStrike' | 'sngStrike' | 'dblStrike';
392
454
  subscript?: boolean;
393
455
  superscript?: boolean;
394
456
  /**
@@ -854,9 +916,18 @@ interface ChartPropsFillLine {
854
916
  border?: BorderProps;
855
917
  /**
856
918
  * PowerPoint: Format Chart Area/Plot Area > Fill
919
+ *
920
+ * Omitting `fill` leaves the area transparent (`<a:noFill/>`), as does a `fill` that
921
+ * states neither a `color` nor a `type` — `transparency` alone is not a fill, since
922
+ * there is no colour for the alpha to apply to.
923
+ *
924
+ * `type: 'image'` is not supported here and falls back to no fill with a warning: a
925
+ * blip fill needs a media relationship on the chart part, which nothing registers.
857
926
  * @example fill: {color: '696969'} // hex RGB color value
858
927
  * @example fill: {color: SchemeColor.background2} // Theme color value
859
- * @example fill: {transparency: 50} // 50% transparency
928
+ * @example fill: {color: '696969', transparency: 50} // 50% transparent grey
929
+ * @example fill: {type: 'gradient', gradient: {kind: 'linear', angle: 90, stops: [{position: 0, color: '0088CC'}, {position: 100, color: 'FFFFFF'}]}}
930
+ * @example fill: {type: 'inherit'} // no fill child at all -- take the chart style's fill
860
931
  */
861
932
  fill?: ShapeFillProps;
862
933
  }
@@ -1674,9 +1745,21 @@ interface ShapeFillProps {
1674
1745
  transparency?: number;
1675
1746
  /**
1676
1747
  * Fill type
1748
+ *
1749
+ * `'none'` and `'inherit'` are different states, and both have to be spelled out
1750
+ * because omitting `fill` is not one of them: the shape/text-box emitter defaults a
1751
+ * missing `fill` to `<a:noFill/>`.
1752
+ * - `'none'` emits `<a:noFill/>` — an explicit transparent interior.
1753
+ * - `'inherit'` emits no fill child at all, leaving the interior to
1754
+ * `p:style/a:fillRef` or the placeholder. This is the only way to author that
1755
+ * state from `addShape`/`addText`.
1756
+ *
1757
+ * On a table cell (`TableCellProps.fill`) and a slide background the two spellings
1758
+ * differ the same way, except that *omitting* the option there already means
1759
+ * inherit, so `'inherit'` is merely the explicit form of the default.
1677
1760
  * @default 'solid'
1678
1761
  */
1679
- type?: 'none' | 'solid' | 'gradient' | 'pattern' | 'image';
1762
+ type?: 'none' | 'inherit' | 'solid' | 'gradient' | 'pattern' | 'image';
1680
1763
  /**
1681
1764
  * Native PPTX gradient fill options.
1682
1765
  */
@@ -3699,4 +3782,4 @@ interface AddSlideProps {
3699
3782
  }
3700
3783
  //#endregion
3701
3784
  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
3785
+ //# sourceMappingURL=slide-BTfn1Pyp.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slide-BTfn1Pyp.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;;;;;EAKhB,QAAQ;;;;;EAKR;;;;;EAKA;;;;;;;;EAQA;;;;;;;;;;;;;;;;;EAiBA;;;;;IAQG;;;;;IAKA;;;;;IAKA;;;;;;IAMA;;;;;;IAMA;;;;;IAKA;;;;;;IAsBA;;;;;;;;;;;IAWA;MAAU;MAAe;;;;;;;IAMzB;;;;;IAKA;;;;;IAKA,QAAQ;;;;;;;;;;;;EAYX;;;;;;;;EAQA,QAAQ;;;;;;;;;;EAUR;;;;;;;;EAQA;;;;;EAKA;;;;;EAKA,YAAY;;;;;EAKZ;;;;;;;EAOA;;;;;;;;;;;;;;;;;EAiBA;;;;;;;;;;;;;;;EAeA;;;;;EAKA;;;;;;EAMA,WAAW;IAAQ;IAAkB;;;;;;;;;;EASrC;;;;;;;EAOA;;;;;;;;;;;EAWA;IACC;IAmBA,QAAQ;;;;;;EAMT,SAAS;;UAGO;;;;;EAKhB,QAAQ;;;;;;EAMR;;;;EAIA;;UAGgB;;;;EAIhB;;;;;;;;;EASA;;;;;;EAMA;;UAGgB,yBAAyB,eAAe,iBAAiB,eAAe;EACxF;IAEC,QAAQ;IACR,SAAS;IACT;IACA;IACA;IACA;IACA;IACA;IACA,OAAO;IACP;IACA;;EAED;EAEA;;;;EAIA;;;;;;;;EAQA;;;;;;;;EAQA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6BA,qCAAqC;;;;;;;EAOrC,OAAO;;;;;EAKP;;;;;EAKA;EACA,OAAO;EACP,YAAY;EACZ;EACA;EACA,OAAO;;;;;;EAMP;;;;;;;EAOA;;;;;;;;;;;EAWA,SAAS;EACT;IAAY,OAAO;IAAO;;EAC1B;EACA;;;;;;;;;;;;EAYA;;;;;;EAMA;;;;;;;EAOA;;;;;EAKA;EACA,SAAS;EACT,QAAQ;;;;;;;;;;;;;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B,UAAU;;;;;;;;;;;;;;;UAapC,mBAAmB,eAAe;;EAElD;;EAEA;;EAEA;;UAEgB,sBAAsB,gBAAgB,eAAe,YAAY,gBAAgB;EACjG;EACA,mBAAmB;;EAEnB;;EAEA;IAAc;IAAc;;;EAE5B;IAAY;IAAc;;;;;;;;;EAQ1B;IAAY;IAAY;;EAExB,KAAK;EACL,KAAK;EACL,SAAS;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"}
@@ -3208,6 +3208,9 @@ function genXmlColorSelection(props) {
3208
3208
  case "none":
3209
3209
  outText += voidEl("a:noFill");
3210
3210
  break;
3211
+ case "inherit":
3212
+ outText += "";
3213
+ break;
3211
3214
  case "solid":
3212
3215
  outText += el("a:solidFill", null, raw(createColorElement(colorVal, internalElements)));
3213
3216
  break;
@@ -4825,6 +4828,27 @@ function makeSurfaceScene(opts) {
4825
4828
  * {@link ./data-refs}.
4826
4829
  */
4827
4830
  /**
4831
+ * Whether a chart-area/plot-area `fill` says anything the fill dispatch can act on.
4832
+ *
4833
+ * `c:spPr` is `a:CT_ShapeProperties` — the same optional `EG_FillProperties` group the
4834
+ * shape path writes into — so gradient, pattern and an omitted fill child are all legal
4835
+ * here. The gate used to be `fill?.color`, which meant every spelling carrying no colour
4836
+ * (`gradient`, `pattern`, `image`, `inherit`) fell to the no-fill arm and did nothing.
4837
+ *
4838
+ * The gate cannot simply be `fill != null`. `normalizeChartOptions` defaults
4839
+ * `plotArea.fill` to `{}`, so every chart in existence arrives here with a fill object,
4840
+ * and a presence check would paint each one a default grey. The same is true of the one
4841
+ * input a caller can write by hand: `{ transparency: 50 }` alone is not a fill, since
4842
+ * there is no colour for the alpha to apply to. Both stay no-fill.
4843
+ *
4844
+ * A payload with no `type` (`{ gradient }`, `{ pattern }`) is likewise not stated, which
4845
+ * matches the shape path: only `line` infers its type from a bare `gradient`, fills have
4846
+ * always wanted `type: 'gradient'` spelled out.
4847
+ */
4848
+ function isStatedFill(fill) {
4849
+ return Boolean(fill?.color || fill?.type);
4850
+ }
4851
+ /**
4828
4852
  * Build the chartSpace/chart header: chartSpace open, title (or autoTitleDeleted),
4829
4853
  * optional 3D view, and the plotArea open with optional manual layout.
4830
4854
  */
@@ -4980,7 +5004,7 @@ function makeChartPlotAreaPropsXml(rel) {
4980
5004
  strXml += "</c:dTable>";
4981
5005
  }
4982
5006
  strXml += " <c:spPr>";
4983
- strXml += plotArea.fill?.color ? genXmlColorSelection(plotArea.fill) : "<a:noFill/>";
5007
+ strXml += isStatedFill(plotArea.fill) ? genXmlColorSelection(plotArea.fill) : "<a:noFill/>";
4984
5008
  strXml += plotArea.border ? `<a:ln w="${valToPts(resolveBorderWidth(plotArea.border, 1))}" cap="flat">${genXmlColorSelection({
4985
5009
  color: plotArea.border.color ?? "363636",
4986
5010
  transparency: plotArea.border.transparency
@@ -5079,7 +5103,7 @@ function makeXmlCharts(rel) {
5079
5103
  if (rel.opts._type === "scatter") strXml += "<c:showDLblsOverMax val=\"1\"/>";
5080
5104
  strXml += "</c:chart>";
5081
5105
  strXml += "<c:spPr>";
5082
- strXml += chartArea.fill?.color ? genXmlColorSelection(chartArea.fill) : "<a:noFill/>";
5106
+ strXml += isStatedFill(chartArea.fill) ? genXmlColorSelection(chartArea.fill) : "<a:noFill/>";
5083
5107
  strXml += chartArea.border ? `<a:ln w="${valToPts(resolveBorderWidth(chartArea.border, 1))}" cap="flat">${genXmlColorSelection({
5084
5108
  color: chartArea.border.color ?? "363636",
5085
5109
  transparency: chartArea.border.transparency
@@ -6396,6 +6420,28 @@ function clampCharSpacingSpc(charSpacingPts) {
6396
6420
  if (clamped !== raw) warnOnce("text/char-spacing-out-of-range", `charSpacing ${charSpacingPts} is outside the valid range -4000..4000pt; using ${clamped / 100}.`);
6397
6421
  return clamped;
6398
6422
  }
6423
+ /**
6424
+ * Clamp a paragraph's left margin (points) into ST_TextMargin (0..4032pt, i.e. 0..51206400 EMU);
6425
+ * returns EMU for `a:pPr/@marL`. The type is unsigned — a negative margin is not a narrower one,
6426
+ * it is a value PowerPoint reports as needing repair.
6427
+ */
6428
+ function clampParaMarginEmu(marginPts) {
6429
+ const raw = valToPts(marginPts);
6430
+ const clamped = Math.min(51206400, Math.max(0, raw));
6431
+ if (clamped !== raw) warnOnce("text/paragraph-margin-out-of-range", `paraMarginLeft ${marginPts} is outside the valid range 0-4032pt; using ${clamped / EMU_PER_POINT}.`);
6432
+ return clamped;
6433
+ }
6434
+ /**
6435
+ * Clamp a first-line indent (points) into ST_TextIndent (-4032..4032pt); returns EMU for
6436
+ * `a:pPr/@indent`. Unlike the margin this one is signed: a negative indent is the hanging
6437
+ * indent every bulleted paragraph uses.
6438
+ */
6439
+ function clampParaIndentEmu(indentPts) {
6440
+ const raw = valToPts(indentPts);
6441
+ const clamped = Math.min(51206400, Math.max(-51206400, raw));
6442
+ if (clamped !== raw) warnOnce("text/paragraph-indent-out-of-range", `paraIndent ${indentPts} is outside the valid range -4032..4032pt; using ${clamped / EMU_PER_POINT}.`);
6443
+ return clamped;
6444
+ }
6399
6445
  /** Clamp line spacing (points) into ST_TextSpacingPoint (0..1584pt); returns hundredths for `<a:spcPts val>`. */
6400
6446
  function clampLineSpacingPts(lineSpacingPts) {
6401
6447
  const raw = ptToHundredths(lineSpacingPts);
@@ -6623,6 +6669,37 @@ const HLINK_TEXT_COLOR_EXT = el("a:extLst", null, raw(el("a:ext", { uri: "{A12FA
6623
6669
  closePrefix: " "
6624
6670
  });
6625
6671
  /**
6672
+ * Whether a `bullet` value makes the paragraph DRAW a bullet (a glyph, a number or a picture).
6673
+ *
6674
+ * Two call sites downstream of the emitter act on "this paragraph has a bullet" rather than on
6675
+ * "this paragraph says something about its bullet", and both were plain truthiness tests until
6676
+ * `'inherit'` — a truthy string that draws nothing — joined the union. Left as truthiness they
6677
+ * would have broken the line grouping (every run starting its own paragraph) and eaten a real
6678
+ * leading `•` from text that emits no `a:buChar` to duplicate it.
6679
+ * @param {TextPropsOptions['bullet']} bullet - the option value
6680
+ * @return {boolean} true when bullet markup is emitted
6681
+ */
6682
+ function emitsBulletMarkup(bullet) {
6683
+ return !!bullet && bullet !== "inherit";
6684
+ }
6685
+ /**
6686
+ * One paragraph margin attribute's value in EMU, or `null` when the attribute is not written.
6687
+ *
6688
+ * Three inputs, because the option has three states and so does the attribute: an explicit
6689
+ * number is clamped and written, `'inherit'` writes nothing, and an absent option falls back to
6690
+ * whatever the `bullet` arm decided — which is also `null` for `bullet: 'inherit'`, the one arm
6691
+ * that states nothing on its own.
6692
+ * @param {number|'inherit'|undefined} option - `paraMarginLeft` / `paraIndent` as given
6693
+ * @param {number|null} fallbackEmu - the bullet arm's default, `null` for no attribute
6694
+ * @param {Function} clamp - the attribute's ST_* range clamp (points in, EMU out)
6695
+ * @return {number|null} the EMU value to write, or null to omit the attribute
6696
+ */
6697
+ function resolveParagraphMargin(option, fallbackEmu, clamp) {
6698
+ if (option === void 0) return fallbackEmu;
6699
+ if (option === "inherit") return null;
6700
+ return clamp(option);
6701
+ }
6702
+ /**
6626
6703
  * Generate XML Paragraph Properties
6627
6704
  * @param {SlideObject|TextProps} textObj - text object
6628
6705
  * @param {boolean} isDefault - array of default relations
@@ -6637,44 +6714,47 @@ function genXmlParagraphProperties(textObj, isDefault) {
6637
6714
  let strXmlTabStops = "";
6638
6715
  const tag = isDefault ? "a:lvl1pPr" : "a:pPr";
6639
6716
  let bulletMarL = valToPts(27);
6717
+ let defaultMarL = null;
6718
+ let defaultIndent = null;
6719
+ let indentBeforeMarL = false;
6640
6720
  let paragraphPropXml = `<${tag}${opts.rtlMode ? " rtl=\"1\" " : ""}`;
6641
- if (opts.align) switch (opts.align) {
6642
- case "left":
6643
- paragraphPropXml += " algn=\"l\"";
6644
- break;
6645
- case "right":
6646
- paragraphPropXml += " algn=\"r\"";
6647
- break;
6648
- case "center":
6649
- paragraphPropXml += " algn=\"ctr\"";
6650
- break;
6651
- case "justify":
6652
- paragraphPropXml += " algn=\"just\"";
6653
- break;
6654
- default: paragraphPropXml += "";
6655
- }
6656
- if (opts.lineSpacing) strXmlLnSpc = el("a:lnSpc", null, raw(voidEl("a:spcPts", { val: clampLineSpacingPts(opts.lineSpacing) })));
6657
- else if (opts.lineSpacingMultiple) strXmlLnSpc = el("a:lnSpc", null, raw(voidEl("a:spcPct", { val: Math.round(opts.lineSpacingMultiple * PERCENT_SCALE) })));
6658
- if (opts.indentLevel && !isNaN(Number(opts.indentLevel)) && opts.indentLevel > 0) paragraphPropXml += ` lvl="${opts.indentLevel}"`;
6659
- if (opts.paraSpaceBefore && !isNaN(Number(opts.paraSpaceBefore)) && opts.paraSpaceBefore > 0) strXmlParaSpc += el("a:spcBef", null, raw(voidEl("a:spcPts", { val: ptToHundredths(opts.paraSpaceBefore) })));
6660
- if (opts.paraSpaceAfter && !isNaN(Number(opts.paraSpaceAfter)) && opts.paraSpaceAfter > 0) strXmlParaSpc += el("a:spcAft", null, raw(voidEl("a:spcPts", { val: ptToHundredths(opts.paraSpaceAfter) })));
6661
- if (typeof opts.bullet === "object") {
6662
- const bulletImage = opts.bullet.image;
6663
- const isPictureBullet = !!(bulletImage && (bulletImage.path || bulletImage.data));
6664
- if (opts.bullet?.indent) bulletMarL = valToPts(opts.bullet.indent);
6665
- if (opts.bullet.color && !isPictureBullet) strXmlBulletColor = el("a:buClr", null, raw(createColorElement(opts.bullet.color)));
6666
- let bulletSizePct;
6667
- if (opts.bullet.size !== void 0) {
6668
- const bulletSize = Number(opts.bullet.size);
6669
- if (isNaN(bulletSize) || bulletSize < 25 || bulletSize > 400) warn("bullet/size-out-of-range", "`bullet.size` must be a percentage between 25 and 400!");
6670
- else bulletSizePct = Math.round(bulletSize * FIXED_PCT_PER_PERCENT);
6721
+ {
6722
+ if (opts.align) switch (opts.align) {
6723
+ case "left":
6724
+ paragraphPropXml += " algn=\"l\"";
6725
+ break;
6726
+ case "right":
6727
+ paragraphPropXml += " algn=\"r\"";
6728
+ break;
6729
+ case "center":
6730
+ paragraphPropXml += " algn=\"ctr\"";
6731
+ break;
6732
+ case "justify":
6733
+ paragraphPropXml += " algn=\"just\"";
6734
+ break;
6735
+ default: paragraphPropXml += "";
6671
6736
  }
6672
- const strXmlBulletSize = bulletSizePct === void 0 ? "" : voidEl("a:buSzPct", { val: bulletSizePct });
6673
- const strXmlBulletFont = opts.bullet.fontFace ? voidEl("a:buFont", { typeface: opts.bullet.fontFace }) : "";
6674
- const bulletIndentAttrs = () => ` marL="${opts.indentLevel && opts.indentLevel > 0 ? bulletMarL + bulletMarL * opts.indentLevel : bulletMarL}" indent="-${bulletMarL}"`;
6675
- if (isPictureBullet) {
6676
- paragraphPropXml += bulletIndentAttrs();
6677
- if (opts.bullet._rId) {
6737
+ if (opts.lineSpacing) strXmlLnSpc = el("a:lnSpc", null, raw(voidEl("a:spcPts", { val: clampLineSpacingPts(opts.lineSpacing) })));
6738
+ else if (opts.lineSpacingMultiple) strXmlLnSpc = el("a:lnSpc", null, raw(voidEl("a:spcPct", { val: Math.round(opts.lineSpacingMultiple * PERCENT_SCALE) })));
6739
+ if (opts.indentLevel && !isNaN(Number(opts.indentLevel)) && opts.indentLevel > 0) paragraphPropXml += ` lvl="${opts.indentLevel}"`;
6740
+ if (opts.paraSpaceBefore && !isNaN(Number(opts.paraSpaceBefore)) && opts.paraSpaceBefore > 0) strXmlParaSpc += el("a:spcBef", null, raw(voidEl("a:spcPts", { val: ptToHundredths(opts.paraSpaceBefore) })));
6741
+ if (opts.paraSpaceAfter && !isNaN(Number(opts.paraSpaceAfter)) && opts.paraSpaceAfter > 0) strXmlParaSpc += el("a:spcAft", null, raw(voidEl("a:spcPts", { val: ptToHundredths(opts.paraSpaceAfter) })));
6742
+ if (typeof opts.bullet === "object") {
6743
+ const bulletImage = opts.bullet.image;
6744
+ const isPictureBullet = !!(bulletImage && (bulletImage.path || bulletImage.data));
6745
+ if (opts.bullet?.indent) bulletMarL = valToPts(opts.bullet.indent);
6746
+ defaultMarL = opts.indentLevel && opts.indentLevel > 0 ? bulletMarL + bulletMarL * opts.indentLevel : bulletMarL;
6747
+ defaultIndent = -bulletMarL;
6748
+ if (opts.bullet.color && !isPictureBullet) strXmlBulletColor = el("a:buClr", null, raw(createColorElement(opts.bullet.color)));
6749
+ let bulletSizePct;
6750
+ if (opts.bullet.size !== void 0) {
6751
+ const bulletSize = Number(opts.bullet.size);
6752
+ if (isNaN(bulletSize) || bulletSize < 25 || bulletSize > 400) warn("bullet/size-out-of-range", "`bullet.size` must be a percentage between 25 and 400!");
6753
+ else bulletSizePct = Math.round(bulletSize * FIXED_PCT_PER_PERCENT);
6754
+ }
6755
+ const strXmlBulletSize = bulletSizePct === void 0 ? "" : voidEl("a:buSzPct", { val: bulletSizePct });
6756
+ const strXmlBulletFont = opts.bullet.fontFace ? voidEl("a:buFont", { typeface: opts.bullet.fontFace }) : "";
6757
+ if (isPictureBullet) if (opts.bullet._rId) {
6678
6758
  const svgExt = opts.bullet._rIdSvg ? el("a:extLst", null, raw(el("a:ext", { uri: "{96DAC541-7B7A-43D3-8B79-37D633B846F1}" }, raw(voidEl("asvg:svgBlip", {
6679
6759
  "xmlns:asvg": "http://schemas.microsoft.com/office/drawing/2016/SVG/main",
6680
6760
  "r:embed": `rId${opts.bullet._rIdSvg}`
@@ -6684,38 +6764,41 @@ function genXmlParagraphProperties(textObj, isDefault) {
6684
6764
  warn("bullet/image-embed-failed", "picture `bullet.image` could not be embedded; using a default bullet glyph");
6685
6765
  strXmlBullet = strXmlBulletSize + strXmlBulletFont + buChar("&#x2022;");
6686
6766
  }
6687
- } else if (opts.bullet.type && opts.bullet.type.toString().toLowerCase() === "number") {
6688
- paragraphPropXml += bulletIndentAttrs();
6689
- strXmlBullet = strXmlBulletSize + (strXmlBulletFont || voidEl("a:buFont", { typeface: "+mj-lt" })) + voidEl("a:buAutoNum", {
6767
+ else if (opts.bullet.type && opts.bullet.type.toString().toLowerCase() === "number") strXmlBullet = strXmlBulletSize + (strXmlBulletFont || voidEl("a:buFont", { typeface: "+mj-lt" })) + voidEl("a:buAutoNum", {
6690
6768
  type: opts.bullet.numberType || "arabicPeriod",
6691
6769
  startAt: opts.bullet.numberStartAt || "1"
6692
6770
  });
6693
- } else if (opts.bullet.characterCode) {
6694
- let bulletCode = `&#x${opts.bullet.characterCode};`;
6695
- if (!/^[0-9A-Fa-f]{4}$/.test(opts.bullet.characterCode)) {
6696
- warn("bullet/invalid-character-code", "`bullet.characterCode` should be a 4-digit unicode character (ex: 22AB)!");
6697
- bulletCode = "&#x2022;";
6698
- }
6699
- paragraphPropXml += bulletIndentAttrs();
6700
- strXmlBullet = strXmlBulletSize + strXmlBulletFont + buChar(bulletCode);
6701
- } else {
6702
- paragraphPropXml += bulletIndentAttrs();
6703
- strXmlBullet = strXmlBulletSize + strXmlBulletFont + buChar("&#x2022;");
6771
+ else if (opts.bullet.characterCode) {
6772
+ let bulletCode = `&#x${opts.bullet.characterCode};`;
6773
+ if (!/^[0-9A-Fa-f]{4}$/.test(opts.bullet.characterCode)) {
6774
+ warn("bullet/invalid-character-code", "`bullet.characterCode` should be a 4-digit unicode character (ex: 22AB)!");
6775
+ bulletCode = "&#x2022;";
6776
+ }
6777
+ strXmlBullet = strXmlBulletSize + strXmlBulletFont + buChar(bulletCode);
6778
+ } else strXmlBullet = strXmlBulletSize + strXmlBulletFont + buChar("&#x2022;");
6779
+ } else if (opts.bullet === "inherit") {} else if (opts.bullet) {
6780
+ defaultMarL = opts.indentLevel && opts.indentLevel > 0 ? bulletMarL + bulletMarL * opts.indentLevel : bulletMarL;
6781
+ defaultIndent = -bulletMarL;
6782
+ strXmlBullet = buChar("&#x2022;");
6783
+ } else if (!opts.bullet) {
6784
+ defaultMarL = 0;
6785
+ defaultIndent = 0;
6786
+ indentBeforeMarL = true;
6787
+ strXmlBullet = voidEl("a:buNone");
6704
6788
  }
6705
- } else if (opts.bullet) {
6706
- paragraphPropXml += ` marL="${opts.indentLevel && opts.indentLevel > 0 ? bulletMarL + bulletMarL * opts.indentLevel : bulletMarL}" indent="-${bulletMarL}"`;
6707
- strXmlBullet = buChar("&#x2022;");
6708
- } else if (!opts.bullet) {
6709
- paragraphPropXml += " indent=\"0\" marL=\"0\"";
6710
- strXmlBullet = voidEl("a:buNone");
6711
- }
6712
- if (opts.tabStops && Array.isArray(opts.tabStops)) strXmlTabStops = el("a:tabLst", null, raw(opts.tabStops.map((stop) => voidEl("a:tab", {
6713
- pos: inch2Emu(stop.position || 1),
6714
- algn: stop.alignment || "l"
6715
- })).join("")));
6716
- paragraphPropXml += ">" + strXmlLnSpc + strXmlParaSpc + strXmlBulletColor + strXmlBullet + strXmlTabStops;
6717
- if (isDefault) paragraphPropXml += genXmlTextRunProperties(opts, true);
6718
- paragraphPropXml += "</" + tag + ">";
6789
+ const marLEmu = resolveParagraphMargin(opts.paraMarginLeft, defaultMarL, clampParaMarginEmu);
6790
+ const indentEmu = resolveParagraphMargin(opts.paraIndent, defaultIndent, clampParaIndentEmu);
6791
+ const marLAttr = marLEmu === null ? "" : ` marL="${marLEmu}"`;
6792
+ const indentAttr = indentEmu === null ? "" : ` indent="${indentEmu}"`;
6793
+ paragraphPropXml += indentBeforeMarL ? indentAttr + marLAttr : marLAttr + indentAttr;
6794
+ if (opts.tabStops && Array.isArray(opts.tabStops)) strXmlTabStops = el("a:tabLst", null, raw(opts.tabStops.map((stop) => voidEl("a:tab", {
6795
+ pos: inch2Emu(stop.position || 1),
6796
+ algn: stop.alignment || "l"
6797
+ })).join("")));
6798
+ paragraphPropXml += ">" + strXmlLnSpc + strXmlParaSpc + strXmlBulletColor + strXmlBullet + strXmlTabStops;
6799
+ if (isDefault) paragraphPropXml += genXmlTextRunProperties(opts, true);
6800
+ paragraphPropXml += "</" + tag + ">";
6801
+ }
6719
6802
  return paragraphPropXml;
6720
6803
  }
6721
6804
  /**
@@ -6836,7 +6919,7 @@ function groupRunsIntoLines(arrTextObjects, opts) {
6836
6919
  arrLines.push(arrTexts);
6837
6920
  arrTexts = [];
6838
6921
  }
6839
- } else if (arrTexts.length > 0 && textObj.options.bullet) {
6922
+ } else if (arrTexts.length > 0 && emitsBulletMarkup(textObj.options.bullet)) {
6840
6923
  arrLines.push(arrTexts);
6841
6924
  arrTexts = [];
6842
6925
  textObj.options.breakLine = false;
@@ -6866,7 +6949,6 @@ function renderTextParagraphsXml(arrLines, slideObj, opts) {
6866
6949
  }
6867
6950
  let reqsClosingFontSize = false;
6868
6951
  let paraXml = "";
6869
- let paragraphPropXml = `<a:pPr ${line[0]?.options?.rtlMode ? " rtl=\"1\" " : ""}`;
6870
6952
  let paragraphPropEmitted = false;
6871
6953
  line.forEach((textObj, idx) => {
6872
6954
  textObj.options._lineIdx = idx;
@@ -6877,20 +6959,18 @@ function renderTextParagraphsXml(arrLines, slideObj, opts) {
6877
6959
  textObj.options.indentLevel = textObj.options.indentLevel || opts.indentLevel;
6878
6960
  textObj.options.paraSpaceBefore = textObj.options.paraSpaceBefore || opts.paraSpaceBefore;
6879
6961
  textObj.options.paraSpaceAfter = textObj.options.paraSpaceAfter || opts.paraSpaceAfter;
6962
+ textObj.options.paraMarginLeft = textObj.options.paraMarginLeft ?? opts.paraMarginLeft;
6963
+ textObj.options.paraIndent = textObj.options.paraIndent ?? opts.paraIndent;
6880
6964
  if (!paragraphPropEmitted) {
6881
- paragraphPropXml = genXmlParagraphProperties(textObj, false);
6882
- const cleaned = paragraphPropXml.replace("<a:pPr></a:pPr>", "");
6883
- if (cleaned) {
6884
- paraXml += cleaned;
6885
- paragraphPropEmitted = true;
6886
- }
6965
+ paragraphPropEmitted = true;
6966
+ paraXml += genXmlParagraphProperties(textObj, false).replace("<a:pPr></a:pPr>", "");
6887
6967
  }
6888
6968
  const textOptions = textObj.options;
6889
6969
  Object.entries(opts).filter(([key]) => !(textObj.options.hyperlink && key === "color")).forEach(([key, val]) => {
6890
6970
  if (key !== "bullet" && !textOptions[key]) textOptions[key] = val;
6891
6971
  });
6892
6972
  let _textRunObj = textObj;
6893
- if (idx === 0 && line[0]?.options.bullet && typeof textObj.text === "string") {
6973
+ if (idx === 0 && emitsBulletMarkup(line[0]?.options.bullet) && typeof textObj.text === "string") {
6894
6974
  const _stripped = textObj.text.replace(/^[\u2022\u25E6\u25AA\u25AB\u25CF\u25CB\u2023\u2043\u2219]\s*/, "");
6895
6975
  if (_stripped !== textObj.text) _textRunObj = {
6896
6976
  text: _stripped,
@@ -11008,7 +11088,7 @@ async function writePackage(source, props) {
11008
11088
  * the OfficeGen project (Copyright 2013 Ziv Barber). This project is likewise MIT; the full
11009
11089
  * license text is in `LICENSE` at the repository root.
11010
11090
  */
11011
- const VERSION = "3.1.0";
11091
+ const VERSION = "3.2.0";
11012
11092
  function standardLayoutToPresLayout(layout) {
11013
11093
  return {
11014
11094
  name: layout.name,
@@ -11896,4 +11976,4 @@ function textRuns(runs) {
11896
11976
  //#endregion
11897
11977
  export { PresentationCore as i, textRuns as n, clipPath as r, textRun as t };
11898
11978
 
11899
- //# sourceMappingURL=text-B6PbMFih.js.map
11979
+ //# sourceMappingURL=text-C4P9MNdf.js.map