@shbernal/ts-pptx 2.0.0 → 3.1.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 (85) hide show
  1. package/README.md +31 -2
  2. package/dist/{autopage-tmfjRzL4.js → autopage-QQyfRtoK.js} +4 -5
  3. package/dist/{autopage-tmfjRzL4.js.map → autopage-QQyfRtoK.js.map} +1 -1
  4. package/dist/browser.d.ts +14 -6
  5. package/dist/browser.d.ts.map +1 -1
  6. package/dist/browser.js +14 -6
  7. package/dist/browser.js.map +1 -1
  8. package/dist/{diagnostics-CQ0JWc9m.d.ts → diagnostics-PMINsVP6.d.ts} +97 -8
  9. package/dist/diagnostics-PMINsVP6.d.ts.map +1 -0
  10. package/dist/{enums-D3aF4QGb.d.ts → enums-CoXnxiCI.d.ts} +6 -5
  11. package/dist/{enums-D3aF4QGb.d.ts.map → enums-CoXnxiCI.d.ts.map} +1 -1
  12. package/dist/{errors-B22h8Qd0.d.ts → errors-BeUEkNWL.d.ts} +26 -4
  13. package/dist/errors-BeUEkNWL.d.ts.map +1 -0
  14. package/dist/{errors-DGE9zh3U.js → errors-Bvln0H-7.js} +21 -2
  15. package/dist/errors-Bvln0H-7.js.map +1 -0
  16. package/dist/{fit-BSWY0AYt.js → fit-DhMbQG5O.js} +0 -0
  17. package/dist/fit-DhMbQG5O.js.map +1 -0
  18. package/dist/{html-dom-BQLUntho.js → html-dom-DajBuobe.js} +20 -6
  19. package/dist/html-dom-DajBuobe.js.map +1 -0
  20. package/dist/html.d.ts +3 -3
  21. package/dist/html.d.ts.map +1 -1
  22. package/dist/html.js +7 -4
  23. package/dist/html.js.map +1 -1
  24. package/dist/index.d.ts +6 -6
  25. package/dist/index.d.ts.map +1 -1
  26. package/dist/index.js +6 -6
  27. package/dist/index.js.map +1 -1
  28. package/dist/inspect.d.ts +1 -1
  29. package/dist/inspect.js +4 -4
  30. package/dist/inspect.js.map +1 -1
  31. package/dist/math.d.ts +1 -1
  32. package/dist/math.d.ts.map +1 -1
  33. package/dist/math.js +98 -2
  34. package/dist/math.js.map +1 -1
  35. package/dist/measure.d.ts +3 -3
  36. package/dist/measure.js +2 -2
  37. package/dist/node.d.ts +14 -6
  38. package/dist/node.d.ts.map +1 -1
  39. package/dist/node.js +13 -5
  40. package/dist/node.js.map +1 -1
  41. package/dist/package-CaOLXSNi.d.ts.map +1 -1
  42. package/dist/{pres-GU-jjBEx.d.ts → pres-BgvxhQ_m.d.ts} +3 -3
  43. package/dist/{pres-GU-jjBEx.d.ts.map → pres-BgvxhQ_m.d.ts.map} +1 -1
  44. package/dist/{presentation-MJe9WDi4.js → presentation-BP1B8PCF.js} +863 -343
  45. package/dist/presentation-BP1B8PCF.js.map +1 -0
  46. package/dist/{presentation-CVaTZw1V.d.ts → presentation-DyIRDKkp.d.ts} +742 -595
  47. package/dist/presentation-DyIRDKkp.d.ts.map +1 -0
  48. package/dist/{presentation-types-BVw0EknS.d.ts → presentation-types-Dj4riuDs.d.ts} +2 -2
  49. package/dist/{presentation-types-BVw0EknS.d.ts.map → presentation-types-Dj4riuDs.d.ts.map} +1 -1
  50. package/dist/read.d.ts +5 -5
  51. package/dist/read.d.ts.map +1 -1
  52. package/dist/read.js +3 -3
  53. package/dist/script.d.ts +2 -2
  54. package/dist/script.d.ts.map +1 -1
  55. package/dist/script.js +0 -0
  56. package/dist/script.js.map +1 -1
  57. package/dist/{shapes-CaOgR0i1.js → shapes-DMThLsZN.js} +689 -1032
  58. package/dist/shapes-DMThLsZN.js.map +1 -0
  59. package/dist/{slide-BBlElWr9.d.ts → slide-BRAtT8Dl.d.ts} +197 -22
  60. package/dist/slide-BRAtT8Dl.d.ts.map +1 -0
  61. package/dist/{image-size-C8uYE8GJ.js → st-enums-evQG2A7Z.js} +233 -2
  62. package/dist/st-enums-evQG2A7Z.js.map +1 -0
  63. package/dist/{text-B1ZrPEeK.js → text-B6PbMFih.js} +725 -319
  64. package/dist/text-B6PbMFih.js.map +1 -0
  65. package/dist/{units-B-JUKwCS.js → units-C7QM1KgH.js} +2 -2
  66. package/dist/{units-B-JUKwCS.js.map → units-C7QM1KgH.js.map} +1 -1
  67. package/dist/{units-internal-7JcMfYti.js → units-internal-CR8s8YQa.js} +4 -3
  68. package/dist/units-internal-CR8s8YQa.js.map +1 -0
  69. package/dist/zip.d.ts +2 -2
  70. package/dist/zip.js +1 -1
  71. package/dist/zip.js.map +1 -1
  72. package/package.json +40 -29
  73. package/skills/ts-pptx-upstream/SKILL.md +247 -0
  74. package/dist/diagnostics-CQ0JWc9m.d.ts.map +0 -1
  75. package/dist/errors-B22h8Qd0.d.ts.map +0 -1
  76. package/dist/errors-DGE9zh3U.js.map +0 -1
  77. package/dist/fit-BSWY0AYt.js.map +0 -1
  78. package/dist/html-dom-BQLUntho.js.map +0 -1
  79. package/dist/image-size-C8uYE8GJ.js.map +0 -1
  80. package/dist/presentation-CVaTZw1V.d.ts.map +0 -1
  81. package/dist/presentation-MJe9WDi4.js.map +0 -1
  82. package/dist/shapes-CaOgR0i1.js.map +0 -1
  83. package/dist/slide-BBlElWr9.d.ts.map +0 -1
  84. package/dist/text-B1ZrPEeK.js.map +0 -1
  85. package/dist/units-internal-7JcMfYti.js.map +0 -1
@@ -1,4 +1,4 @@
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-D3aF4QGb.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-CoXnxiCI.js";
2
2
  //#region src/types/text.d.ts
3
3
  interface TextBaseProps {
4
4
  /**
@@ -1475,6 +1475,72 @@ interface ChartOpts extends ChartPropsAxisCat, ChartPropsAxisSer, ChartPropsAxis
1475
1475
  metadata?: Record<string, string>;
1476
1476
  }
1477
1477
  //#endregion
1478
+ //#region src/ooxml/st-enums.d.ts
1479
+ /**
1480
+ * `ST_` simple-type enumerations from ECMA-376, declared once as the single source of both the
1481
+ * TypeScript union a caller is checked against and the runtime list a value is validated against.
1482
+ *
1483
+ * **The problem this solves.** Each of these used to exist twice: a hand-written string union in
1484
+ * `src/types/` (what the compiler enforces) and a hand-written array in `src/gen/` or `src/read/`
1485
+ * (what the validator checks at run time). Nothing tied the two together, so adding a member to
1486
+ * one and not the other produced either a value TypeScript accepts and the validator drops, or a
1487
+ * value the validator passes and the type rejects. Two of them had already diverged in *order*,
1488
+ * which is harmless, but nothing would have caught a divergence in *content*.
1489
+ *
1490
+ * **The shape.** Every entry is a `readonly` tuple declared `as const`, with its union derived via
1491
+ * `(typeof X)[number]`. Widening the tuple widens the union in the same edit — they cannot drift.
1492
+ * This is the idiom already used for `EMBEDDED_FONT_SLOTS` and `EXTRA_SHAPE_PRESETS`; this module
1493
+ * brings the stragglers onto it.
1494
+ *
1495
+ * **Why this module is neither `gen/` nor `read/`.** `src/types/` needs the unions for the public
1496
+ * write API, `src/gen/` needs the tuples to vet a value before emitting it, and `src/read/` needs
1497
+ * them to vet a value before writing it into a loaded part. It is a fact about the schema, so it
1498
+ * belongs to none of the three.
1499
+ *
1500
+ * Values are listed in **schema declaration order**, which is the order the diagnostics print
1501
+ * when they tell a caller what is legal.
1502
+ */
1503
+ /**
1504
+ * `ST_BevelPresetType` — the bevel profile applied to a 3-D edge.
1505
+ * @see ECMA-376 Part 1 §20.1.10.9
1506
+ */
1507
+ declare const BEVEL_PRESETS: readonly ['relaxedInset', 'circle', 'slope', 'cross', 'angle', 'softRound', 'convex', 'coolSlant', 'divot', 'riblet', 'hardEdge', 'artDeco'];
1508
+ type BevelPresetType = (typeof BEVEL_PRESETS)[number];
1509
+ /**
1510
+ * `ST_PresetMaterialType` — how a 3-D surface responds to light.
1511
+ * @see ECMA-376 Part 1 §20.1.10.50
1512
+ */
1513
+ declare const PRESET_MATERIALS: readonly ['legacyMatte', 'legacyPlastic', 'legacyMetal', 'legacyWireframe', 'matte', 'plastic', 'metal', 'warmMatte', 'translucentPowder', 'powder', 'dkEdge', 'softEdge', 'clear', 'flat', 'softmetal'];
1514
+ type PresetMaterialType = (typeof PRESET_MATERIALS)[number];
1515
+ /**
1516
+ * `ST_LightRigType` — the preset lighting scene.
1517
+ * @see ECMA-376 Part 1 §20.1.10.35
1518
+ */
1519
+ declare const LIGHT_RIGS: readonly ['legacyFlat1', 'legacyFlat2', 'legacyFlat3', 'legacyFlat4', 'legacyNormal1', 'legacyNormal2', 'legacyNormal3', 'legacyNormal4', 'legacyHarsh1', 'legacyHarsh2', 'legacyHarsh3', 'legacyHarsh4', 'threePt', 'balanced', 'soft', 'harsh', 'flood', 'contrasting', 'morning', 'sunrise', 'sunset', 'chilly', 'freezing', 'flat', 'twoPt', 'glow', 'brightRoom'];
1520
+ type LightRigType = (typeof LIGHT_RIGS)[number];
1521
+ /**
1522
+ * `ST_LightRigDirection` — where the light rig sits relative to the scene.
1523
+ * @see ECMA-376 Part 1 §20.1.10.33
1524
+ */
1525
+ declare const LIGHT_RIG_DIRECTIONS: readonly ['tl', 't', 'tr', 'l', 'r', 'bl', 'b', 'br'];
1526
+ type LightRigDirection = (typeof LIGHT_RIG_DIRECTIONS)[number];
1527
+ /**
1528
+ * `ST_TextVerticalType` — `a:bodyPr/@vert` and `a:tcPr/@vert`.
1529
+ * @see ECMA-376 Part 1 §20.1.10.83
1530
+ */
1531
+ declare const TEXT_VERTICAL: readonly ['horz', 'vert', 'vert270', 'wordArtVert', 'eaVert', 'mongolianVert', 'wordArtVertRtl'];
1532
+ type TextVerticalType = (typeof TEXT_VERTICAL)[number];
1533
+ /**
1534
+ * `ST_PresetLineDashVal` — the dash pattern of a line or border (`a:prstDash/@val`).
1535
+ *
1536
+ * The `sys*` members are the "system" dashes whose exact dot/gap ratio the renderer picks; the
1537
+ * rest are defined by the spec. Both `BorderProps.dashType` and `ShapeLineProps.dashType` accept
1538
+ * this whole set, so a caller who knows one knows the other.
1539
+ * @see ECMA-376 Part 1 §20.1.10.49
1540
+ */
1541
+ declare const PRESET_LINE_DASHES: readonly ['solid', 'dot', 'dash', 'lgDash', 'dashDot', 'lgDashDot', 'lgDashDotDot', 'sysDash', 'sysDot', 'sysDashDot', 'sysDashDotDot'];
1542
+ type PresetLineDashVal = (typeof PRESET_LINE_DASHES)[number];
1543
+ //#endregion
1478
1544
  //#region src/types/style.d.ts
1479
1545
  interface BorderProps {
1480
1546
  /**
@@ -1650,7 +1716,7 @@ interface ShapeLineProps extends ShapeFillProps {
1650
1716
  * carry can also be authored and replicated.
1651
1717
  * @default 'solid'
1652
1718
  */
1653
- dashType?: 'solid' | 'dot' | 'dash' | 'lgDash' | 'dashDot' | 'lgDashDot' | 'lgDashDotDot' | 'sysDash' | 'sysDot' | 'sysDashDot' | 'sysDashDotDot';
1719
+ dashType?: PresetLineDashVal;
1654
1720
  /**
1655
1721
  * Line end cap style
1656
1722
  * @default 'flat'
@@ -1938,7 +2004,7 @@ type VAlign = 'top' | 'middle' | 'bottom';
1938
2004
  * Text body `vert` attribute — flow/rotation direction of the text within its box.
1939
2005
  * Maps to `<a:bodyPr vert="…">` (ECMA-376 `ST_TextVerticalType`).
1940
2006
  */
1941
- type TextVertType = 'eaVert' | 'horz' | 'mongolianVert' | 'vert' | 'vert270' | 'wordArtVert' | 'wordArtVertRtl';
2007
+ type TextVertType = TextVerticalType;
1942
2008
  /**
1943
2009
  * A single node of a freeform (`custGeom`) path.
1944
2010
  * - coordinates are authored in the object's own inch/EMU space (0..width, 0..height), not slide-relative and not normalized
@@ -2165,9 +2231,15 @@ interface ImageBaseProps extends PositionProps, ObjectNameProps {
2165
2231
  * - When a `data` (base64) image is supplied and `w`/`h` are omitted, the natural pixel
2166
2232
  * size is read from the image header (PNG/JPEG/GIF/BMP/WebP) and used at 96 DPI
2167
2233
  * (natural pixels / 96 = inches).
2168
- * - When only one of `w`/`h` is given, the other is derived from the natural aspect ratio.
2169
- * - `path` images and vector (SVG) data cannot be measured synchronously, so an omitted
2170
- * dimension falls back to 1 inch.
2234
+ * - When only one of `w`/`h` is given, the other is derived from the natural aspect ratio —
2235
+ * for an SVG too, from its `width`/`height` or `viewBox`.
2236
+ * - A `path` image is measured at export time (its bytes are not available synchronously);
2237
+ * an omitted dimension falls back to 1 inch if it stays unmeasurable.
2238
+ * - An SVG with *neither* dimension given also falls back to 1 inch: its user units carry a
2239
+ * dependable aspect ratio but only a conventional magnitude, so a 24-unit icon is not
2240
+ * treated as a quarter-inch object.
2241
+ * - A vector source placed in a box whose ratio differs from its own is letterboxed, not
2242
+ * stretched; see {@link sizing} to override.
2171
2243
  */
2172
2244
  /**
2173
2245
  * Alt Text value ("How would you describe this object and its contents to someone who is blind?")
@@ -2276,31 +2348,38 @@ interface ImageBaseProps extends PositionProps, ObjectNameProps {
2276
2348
  };
2277
2349
  /**
2278
2350
  * Image sizing options
2351
+ * - omit entirely for the default: a raster fills the `w`×`h` box, a vector (SVG) source is
2352
+ * letterboxed to its own aspect ratio inside that box
2279
2353
  */
2280
2354
  sizing?: {
2281
2355
  /**
2282
2356
  * Sizing type
2283
2357
  * - `cover` / `contain` fit the image into the `w`×`h` box using the image's *natural*
2284
- * pixel aspect ratio (read from the embedded PNG/JPEG/GIF/BMP/WebP header). If the
2285
- * natural size cannot be determined (e.g. SVG or an unrecognized format) the displayed
2286
- * `w`/`h` ratio is used as a fallback and a warning is logged.
2358
+ * aspect ratio — read from the embedded PNG/JPEG/GIF/BMP/WebP header, or from an SVG's
2359
+ * `width`/`height` or `viewBox`. If the natural size cannot be determined (an
2360
+ * unrecognized format, or an SVG carrying neither) the displayed `w`/`h` ratio is used
2361
+ * as a fallback and a warning is logged.
2287
2362
  * - `crop` cuts a window out of the displayed image using the `x`/`y`/`w`/`h` offsets.
2363
+ * - `stretch` fills the box regardless of aspect ratio. This is what a raster does
2364
+ * anyway; name it explicitly to opt a vector source out of its aspect-correct default.
2288
2365
  */
2289
- type: 'contain' | 'cover' | 'crop';
2366
+ type: 'contain' | 'cover' | 'crop' | 'stretch';
2290
2367
  /**
2291
2368
  * Image width
2292
2369
  * - inches or percentage
2370
+ * - defaults to the picture's own `w`, which is what `cover`/`contain` almost always want
2293
2371
  * @example 10.25 // position in inches
2294
2372
  * @example '75%' // position as percentage of slide size
2295
2373
  */
2296
- w: Coord;
2374
+ w?: Coord;
2297
2375
  /**
2298
2376
  * Image height
2299
2377
  * - inches or percentage
2378
+ * - defaults to the picture's own `h`
2300
2379
  * @example 10.25 // position in inches
2301
2380
  * @example '75%' // position as percentage of slide size
2302
2381
  */
2303
- h: Coord;
2382
+ h?: Coord;
2304
2383
  /**
2305
2384
  * Offset from left to crop image
2306
2385
  * - `crop` only
@@ -2626,14 +2705,6 @@ interface TableCellDiagonals {
2626
2705
  /** Bottom-left to top-right (`╱`, `a:lnBlToTr`). */
2627
2706
  blToTr?: BorderProps;
2628
2707
  }
2629
- /** `ST_BevelPresetType` — the bevel profile applied to a cell's edges. */
2630
- type BevelPresetType = 'relaxedInset' | 'circle' | 'slope' | 'cross' | 'angle' | 'softRound' | 'convex' | 'coolSlant' | 'divot' | 'riblet' | 'hardEdge' | 'artDeco';
2631
- /** `ST_PresetMaterialType` — how a 3-D surface responds to light. */
2632
- type PresetMaterialType = 'legacyMatte' | 'legacyPlastic' | 'legacyMetal' | 'legacyWireframe' | 'matte' | 'plastic' | 'metal' | 'warmMatte' | 'translucentPowder' | 'powder' | 'dkEdge' | 'softEdge' | 'clear' | 'flat' | 'softmetal';
2633
- /** `ST_LightRigType` — the preset lighting scene. */
2634
- type LightRigType = 'legacyFlat1' | 'legacyFlat2' | 'legacyFlat3' | 'legacyFlat4' | 'legacyNormal1' | 'legacyNormal2' | 'legacyNormal3' | 'legacyNormal4' | 'legacyHarsh1' | 'legacyHarsh2' | 'legacyHarsh3' | 'legacyHarsh4' | 'threePt' | 'balanced' | 'soft' | 'harsh' | 'flood' | 'contrasting' | 'morning' | 'sunrise' | 'sunset' | 'chilly' | 'freezing' | 'flat' | 'twoPt' | 'glow' | 'brightRoom';
2635
- /** `ST_LightRigDirection` — where the light rig sits relative to the scene. */
2636
- type LightRigDirection = 'tl' | 't' | 'tr' | 'l' | 'r' | 'bl' | 'b' | 'br';
2637
2708
  /**
2638
2709
  * A cell's 3-D bevel (`a:tcPr/a:cell3D`).
2639
2710
  *
@@ -3351,6 +3422,108 @@ interface SlideMasterProps {
3351
3422
  textStyles?: MasterTextStyleProps;
3352
3423
  }
3353
3424
  //#endregion
3425
+ //#region src/types/model3d.d.ts
3426
+ /** A point or direction in the model's 3D scene, in metres. */
3427
+ interface Model3dPoint {
3428
+ x: number;
3429
+ y: number;
3430
+ z: number;
3431
+ }
3432
+ /**
3433
+ * Camera override for `addModel3d()`, mapping onto `am3d:camera`.
3434
+ *
3435
+ * The defaults are what PowerPoint itself wrote for a 2×2×2 cube, and they are correct for any
3436
+ * model whose bounding box is roughly cubic **once `meterPerModelUnit` is right** — the camera is
3437
+ * expressed in metres, so the scale is what actually decides framing.
3438
+ *
3439
+ * PowerPoint's own rule, measured against three models: it normalizes the model's largest
3440
+ * bounding-box extent to 1 metre and then places the camera at
3441
+ *
3442
+ * ```
3443
+ * pos.z = |halfExtents / maxExtent| / sin(fov / 2)
3444
+ * ```
3445
+ *
3446
+ * looking at the origin. A caller who knows their model's bounding box can reproduce that
3447
+ * exactly; a caller who does not should at least set `meterPerModelUnit` to `1 / maxExtent`.
3448
+ */
3449
+ interface Model3dCameraProps {
3450
+ /**
3451
+ * Camera position in metres (`am3d:camera/am3d:pos`).
3452
+ * @default { x: 0, y: 0, z: 2.2630334 }
3453
+ */
3454
+ pos?: Model3dPoint;
3455
+ /**
3456
+ * Point the camera aims at, in metres (`am3d:camera/am3d:lookAt`).
3457
+ * @default { x: 0, y: 0, z: 0 }
3458
+ */
3459
+ lookAt?: Model3dPoint;
3460
+ /**
3461
+ * Camera "up" direction (`am3d:camera/am3d:up`). Need not be normalized.
3462
+ * @default { x: 0, y: 1, z: 0 }
3463
+ */
3464
+ up?: Model3dPoint;
3465
+ /**
3466
+ * Vertical field of view in **degrees** (`am3d:perspective@fov`).
3467
+ * - range: greater than 0 and less than 180
3468
+ * @default 45
3469
+ */
3470
+ fov?: number;
3471
+ }
3472
+ /**
3473
+ * Add an embedded 3D model (PowerPoint's Insert ▸ 3D Models) to a slide.
3474
+ *
3475
+ * The `.glb` bytes travel inside the `.pptx` (in `ppt/media/`), so PowerPoint 2019+ renders and
3476
+ * lets the viewer orbit the model. Requires either `data` or `path`. Linked (non-embedded)
3477
+ * models are not supported.
3478
+ */
3479
+ interface Model3dBaseProps extends PositionProps, ObjectNameProps {
3480
+ /**
3481
+ * Picture of the model shown wherever the live 3D view is unavailable — a raster image `path`
3482
+ * (Node/local) or base64 `data:` URI.
3483
+ * - the library cannot render a 3D scene, so when this is omitted a neutral gray placeholder is
3484
+ * embedded; PowerPoint 2019+ draws the live model over it, but every other consumer — and
3485
+ * PowerPoint's own `mc:Fallback` path, thumbnails, and PDF export — shows exactly what is here
3486
+ * - supply a real render whenever the deck is meant to read correctly outside PowerPoint
3487
+ * @example { path: 'assets/engine-render.png' }
3488
+ */
3489
+ preview?: {
3490
+ path?: string;
3491
+ data?: string;
3492
+ };
3493
+ /**
3494
+ * Camera override. Omitted, ts-pptx emits the camera PowerPoint wrote for a 2×2×2 cube.
3495
+ * @see {@link Model3dCameraProps} for the framing formula and when this matters.
3496
+ */
3497
+ camera?: Model3dCameraProps;
3498
+ /**
3499
+ * Metres per model unit (`am3d:trans/am3d:meterPerModelUnit`) — the scale that decides how
3500
+ * large the model is in the scene the {@link camera} looks at.
3501
+ *
3502
+ * This is the single override most models need. PowerPoint sets it to `1 / maxExtent`, where
3503
+ * `maxExtent` is the model's largest bounding-box dimension in model units, which normalizes
3504
+ * every model to 1 metre across. ts-pptx does not parse the `.glb`, so it cannot measure that
3505
+ * — it defaults to `0.5`, correct for a model 2 units across. A model 100 units across left at
3506
+ * the default is a 50-metre object with the camera 2.26 metres from its centre, i.e. the
3507
+ * viewer is inside it.
3508
+ * - range: greater than 0
3509
+ * @default 0.5
3510
+ * @example 1 / 100 // a model whose largest bounding-box dimension is 100 units
3511
+ */
3512
+ meterPerModelUnit?: number;
3513
+ /**
3514
+ * Alt text (`p:cNvPr@descr`) — what a screen reader announces for the model.
3515
+ */
3516
+ altText?: string;
3517
+ }
3518
+ /**
3519
+ * Options for `slide.addModel3d()`. Requires either `data` (base64, with or without a
3520
+ * `data:...;base64,` header) or `path` (a local/remote `.glb` read at export time).
3521
+ *
3522
+ * Sizing note: `w`/`h` default to 4 × 3 inches rather than being measured. A 3D model has no
3523
+ * intrinsic aspect ratio, and the library never opens the payload.
3524
+ */
3525
+ type Model3dProps = Model3dBaseProps & DataOrPathRequiredProps;
3526
+ //#endregion
3354
3527
  //#region src/types/slide.d.ts
3355
3528
  /**
3356
3529
  * A child object that can be placed inside a group via `slide.addGroup()`.
@@ -3464,6 +3637,8 @@ interface Slide {
3464
3637
  addConnector: (options: ConnectorProps) => Slide;
3465
3638
  addImage: (options: ImageProps) => Slide;
3466
3639
  addMedia: (options: MediaProps) => Slide;
3640
+ /** Embed a 3D model (Insert ▸ 3D Models) — a `.glb` PowerPoint 2019+ renders live. */
3641
+ addModel3d: (options: Model3dProps) => Slide;
3467
3642
  /** Embed an OLE object (Insert ▸ Object) whose bytes travel inside the `.pptx`. */
3468
3643
  addOleObject: (options: OleObjectProps) => Slide;
3469
3644
  addComment: (options: CommentProps) => Slide;
@@ -3523,5 +3698,5 @@ interface AddSlideProps {
3523
3698
  sectionTitle?: string;
3524
3699
  }
3525
3700
  //#endregion
3526
- export { GradientStopProps as $, OptsChartGridLine as $t, TableRowSlide as A, ChartPropsAxisCat as At, ShapeAdjustHandlePolar as B, ChartPropsChartRadar as Bt, PresetMaterialType as C, ChartErrorBarOptions as Ct, TableCellProps as D, ChartLineDash as Dt, TableCellDiagonals as E, ChartExStatistics as Et, ImageProps as F, ChartPropsChartBoxWhisker as Ft, ShapeProps as G, ChartPropsDataLabel as Gt, ShapeAdjustValue as H, ChartPropsChartStock as Ht, MediaProps as I, ChartPropsChartDoughnut as It, Coord as J, ChartPropsLegend as Jt, BackgroundProps as K, ChartPropsDataTable as Kt, MediaType as L, ChartPropsChartHistogram as Lt, TableToSlidesElement as M, ChartPropsAxisVal as Mt, TableToSlidesProps as N, ChartPropsBase as Nt, TableProps as O, ChartMulti as Ot, ImageBaseProps as P, ChartPropsChartBar as Pt, GradientFillProps as Q, OptsChartData as Qt, OleObjectProps as R, ChartPropsChartLine as Rt, LightRigType as S, ChartDataPointStyle as St, TableCell3DProps as T, ChartExGeography as Tt, ShapeConnectionSite as U, ChartPropsChartSurface as Ut, ShapeAdjustHandleXY as V, ChartPropsChartRegionMap as Vt, ShapeGuide as W, ChartPropsChartWaterfall as Wt, DataOrPathRequiredProps as X, ChartSeriesOpts as Xt, DataOrPathProps as Y, ChartPropsTitle as Yt, GeometryPoint as Z, LineCap as Zt, TransitionProps as _, TextPropsOptions as _n, ShadowProps as _t, Slide as a, NotesProps as an, PatternFillProps as at, BevelPresetType as b, ChartAreaProps as bt, MasterTextStyleLevel as c, ResolvedCommentAuthor as cn, RadialGradientFillProps as ct, SlideMasterObject as d, TableLayoutResult as dn, VAlign as dt, ObjectLockProps as en, HAlign as et, SlideMasterProps as f, TextBaseProps as fn, BorderProps as ft, PresetEffect as g, TextProps as gn, HyperlinkProps as gt, AnimationTrigger as h, TextMeasurement as hn, HyperlinkActionJump as ht, ObjectOptions as i, MeasureTextOptions as in, Margin as it, TableToSlidesDocument as j, ChartPropsAxisSer as jt, TableRow as k, ChartOpts as kt, MasterTextStyleProps as l, SlideComment as ln, TextVertType as lt, AnimationProps as m, TextGlowProps as mn, ConnectorType as mt, GroupChildProps as n, PlaceholderProps as nn, ImageFillProps as nt, SlideLayout as o, NotesTextOptions as on, PatternPreset as ot, SlideNumberProps as p, TextFitShrinkProps as pn, ConnectorProps as pt, Color as q, ChartPropsFillLine as qt, GroupProps as r, CommentProps as rn, LinearGradientFillProps as rt, MasterBulletProps as s, OverflowBoxOptions as sn, PositionProps as st, AddSlideProps as t, ObjectNameProps as tn, HexColor as tt, SlideMasterChartProps as u, TableCellLayout as un, ThemeColor as ut, TransitionSoundProps as v, textRun as vn, ShapeFillProps as vt, TableCell as w, ChartExBinning as wt, LightRigDirection as x, ChartAxisTickMark as xt, TransitionType as y, textRuns as yn, ShapeLineProps as yt, ShapeAdjustHandle as z, ChartPropsChartPie as zt };
3527
- //# sourceMappingURL=slide-BBlElWr9.d.ts.map
3701
+ 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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slide-BRAtT8Dl.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;;;;;;;EAOA;;;;;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,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,3 +1,5 @@
1
+ import { r as warnOnce } from "./diagnostics-DYQC7xLV.js";
2
+ import { n as InvalidOptionError } from "./errors-Bvln0H-7.js";
1
3
  //#region src/media/base64.ts
2
4
  /**
3
5
  * Base64 payload handling for media parts — isomorphic across Node and browsers
@@ -247,6 +249,235 @@ function utf8Decode(bytes) {
247
249
  return new TextDecoder().decode(bytes);
248
250
  }
249
251
  //#endregion
250
- export { decodeBase64ToBytes as a, bytesToBase64 as i, getImageSizeFromBase64 as n, svgMarkupToDataUri as o, getImageSizeFromBytes as r, fitSrcRectPercents as t };
252
+ //#region src/ooxml/rel-types.ts
253
+ /**
254
+ * Prefix for `.rels` `Type` URIs — append the type name (`slide`, `image`, `theme`, …).
255
+ * Exported for the write side, which builds one-off rel types at their call sites.
256
+ */
257
+ const OFFICE_REL = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/";
258
+ /** `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";
260
+ /** `p:sldIdLst` → a slide part. */
261
+ const SLIDE_REL = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/slide";
262
+ /** A slide → its layout; a master → each of its layouts. */
263
+ const SLIDE_LAYOUT_REL = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideLayout";
264
+ /** A layout → its master; the presentation → each master. */
265
+ const SLIDE_MASTER_REL = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideMaster";
266
+ /** A slide → its notes slide. */
267
+ const NOTES_SLIDE_REL = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/notesSlide";
268
+ /** A notes slide → the notes master; the presentation → the notes master. */
269
+ const NOTES_MASTER_REL = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/notesMaster";
270
+ /** 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";
272
+ /** 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";
274
+ /** Any part → an image in `ppt/media/`. */
275
+ const IMAGE_REL = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image";
276
+ //#endregion
277
+ //#region src/ooxml/check-enum.ts
278
+ /**
279
+ * Check a value against its `ST_` union, reporting and dropping it when outside (the write-path
280
+ * policy — see the module note).
281
+ *
282
+ * `undefined`/`null` returns `null` without reporting: an unset option is not an invalid one, and
283
+ * it is by far the common case.
284
+ *
285
+ * The offending value is interpolated into the message deliberately. {@link warnOnce} dedups on
286
+ * code **and** message, so keeping the value in the text is what lets a second, *different* bad
287
+ * value under the same code still get reported.
288
+ * @param value - the value the caller supplied, if any
289
+ * @param valid - the enum's members
290
+ * @param code - the condition to report
291
+ * @param label - how to name the offending option in the message, e.g. ``'table cell: cell3D `preset`'``
292
+ * @param detail - extra structured context to merge into the diagnostic's `detail`
293
+ * @returns the value when legal, else `null`
294
+ */
295
+ function checkEnumOrWarn(value, valid, code, label, detail) {
296
+ if (value === void 0 || value === null) return null;
297
+ if (valid.includes(value)) return value;
298
+ warnOnce(code, `${label} value \`${String(value)}\` is not valid and is ignored — use one of ${valid.join(", ")}.`, {
299
+ received: value,
300
+ valid,
301
+ ...detail
302
+ });
303
+ return null;
304
+ }
305
+ /**
306
+ * Check a value against its `ST_` union, throwing when outside (the read/edit-path policy — see
307
+ * the module note).
308
+ * @param value - the value the caller asked for
309
+ * @param valid - the enum's members
310
+ * @param attribute - the attribute's name, for the message
311
+ * @param code - the condition to report
312
+ * @returns `value`, when it is legal
313
+ */
314
+ function checkEnumOrThrow(value, valid, attribute, code) {
315
+ if (valid.includes(value)) return value;
316
+ throw new InvalidOptionError(code, `Invalid ${attribute}: ${JSON.stringify(value)}. Expected one of: ${valid.join(", ")}.`);
317
+ }
318
+ //#endregion
319
+ //#region src/ooxml/st-enums.ts
320
+ /**
321
+ * `ST_` simple-type enumerations from ECMA-376, declared once as the single source of both the
322
+ * TypeScript union a caller is checked against and the runtime list a value is validated against.
323
+ *
324
+ * **The problem this solves.** Each of these used to exist twice: a hand-written string union in
325
+ * `src/types/` (what the compiler enforces) and a hand-written array in `src/gen/` or `src/read/`
326
+ * (what the validator checks at run time). Nothing tied the two together, so adding a member to
327
+ * one and not the other produced either a value TypeScript accepts and the validator drops, or a
328
+ * value the validator passes and the type rejects. Two of them had already diverged in *order*,
329
+ * which is harmless, but nothing would have caught a divergence in *content*.
330
+ *
331
+ * **The shape.** Every entry is a `readonly` tuple declared `as const`, with its union derived via
332
+ * `(typeof X)[number]`. Widening the tuple widens the union in the same edit — they cannot drift.
333
+ * This is the idiom already used for `EMBEDDED_FONT_SLOTS` and `EXTRA_SHAPE_PRESETS`; this module
334
+ * brings the stragglers onto it.
335
+ *
336
+ * **Why this module is neither `gen/` nor `read/`.** `src/types/` needs the unions for the public
337
+ * write API, `src/gen/` needs the tuples to vet a value before emitting it, and `src/read/` needs
338
+ * them to vet a value before writing it into a loaded part. It is a fact about the schema, so it
339
+ * belongs to none of the three.
340
+ *
341
+ * Values are listed in **schema declaration order**, which is the order the diagnostics print
342
+ * when they tell a caller what is legal.
343
+ */
344
+ /**
345
+ * `ST_BevelPresetType` — the bevel profile applied to a 3-D edge.
346
+ * @see ECMA-376 Part 1 §20.1.10.9
347
+ */
348
+ const BEVEL_PRESETS = [
349
+ "relaxedInset",
350
+ "circle",
351
+ "slope",
352
+ "cross",
353
+ "angle",
354
+ "softRound",
355
+ "convex",
356
+ "coolSlant",
357
+ "divot",
358
+ "riblet",
359
+ "hardEdge",
360
+ "artDeco"
361
+ ];
362
+ /**
363
+ * `ST_PresetMaterialType` — how a 3-D surface responds to light.
364
+ * @see ECMA-376 Part 1 §20.1.10.50
365
+ */
366
+ const PRESET_MATERIALS = [
367
+ "legacyMatte",
368
+ "legacyPlastic",
369
+ "legacyMetal",
370
+ "legacyWireframe",
371
+ "matte",
372
+ "plastic",
373
+ "metal",
374
+ "warmMatte",
375
+ "translucentPowder",
376
+ "powder",
377
+ "dkEdge",
378
+ "softEdge",
379
+ "clear",
380
+ "flat",
381
+ "softmetal"
382
+ ];
383
+ /**
384
+ * `ST_LightRigType` — the preset lighting scene.
385
+ * @see ECMA-376 Part 1 §20.1.10.35
386
+ */
387
+ const LIGHT_RIGS = [
388
+ "legacyFlat1",
389
+ "legacyFlat2",
390
+ "legacyFlat3",
391
+ "legacyFlat4",
392
+ "legacyNormal1",
393
+ "legacyNormal2",
394
+ "legacyNormal3",
395
+ "legacyNormal4",
396
+ "legacyHarsh1",
397
+ "legacyHarsh2",
398
+ "legacyHarsh3",
399
+ "legacyHarsh4",
400
+ "threePt",
401
+ "balanced",
402
+ "soft",
403
+ "harsh",
404
+ "flood",
405
+ "contrasting",
406
+ "morning",
407
+ "sunrise",
408
+ "sunset",
409
+ "chilly",
410
+ "freezing",
411
+ "flat",
412
+ "twoPt",
413
+ "glow",
414
+ "brightRoom"
415
+ ];
416
+ /**
417
+ * `ST_LightRigDirection` — where the light rig sits relative to the scene.
418
+ * @see ECMA-376 Part 1 §20.1.10.33
419
+ */
420
+ const LIGHT_RIG_DIRECTIONS = [
421
+ "tl",
422
+ "t",
423
+ "tr",
424
+ "l",
425
+ "r",
426
+ "bl",
427
+ "b",
428
+ "br"
429
+ ];
430
+ /**
431
+ * `ST_TextHorzOverflowType` — `a:bodyPr/@horzOverflow` and `a:tcPr/@horzOverflow`.
432
+ * @see ECMA-376 Part 1 §20.1.10.68
433
+ */
434
+ const TEXT_HORZ_OVERFLOW = ["clip", "overflow"];
435
+ /**
436
+ * `ST_TextAnchoringType` — `a:bodyPr/@anchor` and `a:tcPr/@anchor`.
437
+ * @see ECMA-376 Part 1 §20.1.10.60
438
+ */
439
+ const TEXT_ANCHORS = [
440
+ "t",
441
+ "ctr",
442
+ "b",
443
+ "just",
444
+ "dist"
445
+ ];
446
+ /**
447
+ * `ST_TextVerticalType` — `a:bodyPr/@vert` and `a:tcPr/@vert`.
448
+ * @see ECMA-376 Part 1 §20.1.10.83
449
+ */
450
+ const TEXT_VERTICAL = [
451
+ "horz",
452
+ "vert",
453
+ "vert270",
454
+ "wordArtVert",
455
+ "eaVert",
456
+ "mongolianVert",
457
+ "wordArtVertRtl"
458
+ ];
459
+ /**
460
+ * `ST_PresetLineDashVal` — the dash pattern of a line or border (`a:prstDash/@val`).
461
+ *
462
+ * The `sys*` members are the "system" dashes whose exact dot/gap ratio the renderer picks; the
463
+ * rest are defined by the spec. Both `BorderProps.dashType` and `ShapeLineProps.dashType` accept
464
+ * this whole set, so a caller who knows one knows the other.
465
+ * @see ECMA-376 Part 1 §20.1.10.49
466
+ */
467
+ const PRESET_LINE_DASHES = [
468
+ "solid",
469
+ "dot",
470
+ "dash",
471
+ "lgDash",
472
+ "dashDot",
473
+ "lgDashDot",
474
+ "lgDashDotDot",
475
+ "sysDash",
476
+ "sysDot",
477
+ "sysDashDot",
478
+ "sysDashDotDot"
479
+ ];
480
+ //#endregion
481
+ 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 };
251
482
 
252
- //# sourceMappingURL=image-size-C8uYE8GJ.js.map
483
+ //# sourceMappingURL=st-enums-evQG2A7Z.js.map