pptx-ts 4.0.1 → 4.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 (95) hide show
  1. package/README.md +147 -114
  2. package/dist/{autopage-odPz7zZO.js → autopage-D4kyVp11.js} +5 -5
  3. package/dist/{autopage-odPz7zZO.js.map → autopage-D4kyVp11.js.map} +1 -1
  4. package/dist/{body-insets-Dw_BeWD_.js → body-insets-kVHmjGc6.js} +2 -2
  5. package/dist/{body-insets-Dw_BeWD_.js.map → body-insets-kVHmjGc6.js.map} +1 -1
  6. package/dist/browser.d.ts +7 -7
  7. package/dist/browser.js +5 -5
  8. package/dist/{clip-Bl01BPcN.d.ts → clip-DHDlnHUq.d.ts} +2 -2
  9. package/dist/{clip-Bl01BPcN.d.ts.map → clip-DHDlnHUq.d.ts.map} +1 -1
  10. package/dist/{diagnostics-D8ot4Ei7.d.ts → diagnostics-DiMmBU8P.d.ts} +6 -6
  11. package/dist/{diagnostics-D8ot4Ei7.d.ts.map → diagnostics-DiMmBU8P.d.ts.map} +1 -1
  12. package/dist/{embedded-fonts-DarT9aoa.d.ts → embedded-fonts-CI_YGW2d.d.ts} +2 -2
  13. package/dist/{embedded-fonts-DarT9aoa.d.ts.map → embedded-fonts-CI_YGW2d.d.ts.map} +1 -1
  14. package/dist/{entry-compose-DCnvBZz2.d.ts → entry-compose-6hF9aTmT.d.ts} +19 -17
  15. package/dist/{entry-compose-DCnvBZz2.d.ts.map → entry-compose-6hF9aTmT.d.ts.map} +1 -1
  16. package/dist/{enums-BUKTUB6V.d.ts → enums-DQRpVOLh.d.ts} +3 -3
  17. package/dist/{enums-BUKTUB6V.d.ts.map → enums-DQRpVOLh.d.ts.map} +1 -1
  18. package/dist/{errors-C4oENPcu.js → errors-Da2nXCJm.js} +6 -6
  19. package/dist/{errors-C4oENPcu.js.map → errors-Da2nXCJm.js.map} +1 -1
  20. package/dist/families.d.ts +6 -6
  21. package/dist/families.js +2 -2
  22. package/dist/{fit-Cb7naFj6.js → fit-CcXbg__l.js} +10 -10
  23. package/dist/{fit-Cb7naFj6.js.map → fit-CcXbg__l.js.map} +1 -1
  24. package/dist/{font-metrics-v5fn7s7e.d.ts → font-metrics-CBGmhLo0.d.ts} +6 -6
  25. package/dist/{font-metrics-v5fn7s7e.d.ts.map → font-metrics-CBGmhLo0.d.ts.map} +1 -1
  26. package/dist/{grid-DikTjFey.js → grid-9B2w5EaY.js} +2 -2
  27. package/dist/{grid-DikTjFey.js.map → grid-9B2w5EaY.js.map} +1 -1
  28. package/dist/{html-dom-Iuog2wdK.js → html-dom-DvJmuHt2.js} +10 -10
  29. package/dist/html-dom-DvJmuHt2.js.map +1 -0
  30. package/dist/html.d.ts +3 -3
  31. package/dist/html.js +2 -2
  32. package/dist/{image-size-CvN2iCA4.js → image-size-DwDbakcl.js} +64 -5
  33. package/dist/image-size-DwDbakcl.js.map +1 -0
  34. package/dist/index.d.ts +7 -7
  35. package/dist/index.js +3 -3
  36. package/dist/inspect.d.ts +4 -4
  37. package/dist/inspect.js +4 -4
  38. package/dist/inspect.js.map +1 -1
  39. package/dist/math.d.ts +1 -1
  40. package/dist/math.js +1 -1
  41. package/dist/measure.d.ts +3 -3
  42. package/dist/measure.js +2 -2
  43. package/dist/node.d.ts +7 -7
  44. package/dist/node.js +3 -3
  45. package/dist/{notes-Dh12JAbn.js → notes-BcT571R4.js} +19 -18
  46. package/dist/notes-BcT571R4.js.map +1 -0
  47. package/dist/options-internal-WqgMf720.js.map +1 -1
  48. package/dist/{package-J49Ck6S2.d.ts → package-KoEgVwII.d.ts} +6 -2
  49. package/dist/{package-J49Ck6S2.d.ts.map → package-KoEgVwII.d.ts.map} +1 -1
  50. package/dist/{pres-C6qgOFAa.d.ts → pres-BA9_lJbY.d.ts} +32 -12
  51. package/dist/pres-BA9_lJbY.d.ts.map +1 -0
  52. package/dist/{presentation-DGYlAWhl.js → presentation-Cyl74rq2.js} +70 -35
  53. package/dist/presentation-Cyl74rq2.js.map +1 -0
  54. package/dist/{presentation-types-8jLQHI4M.d.ts → presentation-types-B3VQH4Bz.d.ts} +19 -15
  55. package/dist/presentation-types-B3VQH4Bz.d.ts.map +1 -0
  56. package/dist/read.d.ts +6 -6
  57. package/dist/read.js +3 -3
  58. package/dist/script.d.ts +2 -2
  59. package/dist/script.d.ts.map +1 -1
  60. package/dist/script.js +11 -11
  61. package/dist/script.js.map +1 -1
  62. package/dist/{shapes-re0KyQk_.js → shapes-BcyFdZpp.js} +14 -10
  63. package/dist/shapes-BcyFdZpp.js.map +1 -0
  64. package/dist/{slide-Dx2ZeVZ6.d.ts → slide-BqPtyKmb.d.ts} +12 -7
  65. package/dist/slide-BqPtyKmb.d.ts.map +1 -0
  66. package/dist/{table-cell-margins-EVg0EwxT.js → table-cell-margins-PDshga8T.js} +4 -4
  67. package/dist/{table-cell-margins-EVg0EwxT.js.map → table-cell-margins-PDshga8T.js.map} +1 -1
  68. package/dist/{table-dom-BTDP3lEP.js → table-dom-CVbvUfgh.js} +3 -3
  69. package/dist/{table-dom-BTDP3lEP.js.map → table-dom-CVbvUfgh.js.map} +1 -1
  70. package/dist/{text-sN64Otf_.js → text-BvFFMMFQ.js} +38 -36
  71. package/dist/{text-sN64Otf_.js.map → text-BvFFMMFQ.js.map} +1 -1
  72. package/dist/{text-anchor-CrYXAfUu.js → text-anchor-BgLPbwbL.js} +2 -2
  73. package/dist/{text-anchor-CrYXAfUu.js.map → text-anchor-BgLPbwbL.js.map} +1 -1
  74. package/dist/{units-internal-XJlf-hOl.js → units-internal-DFcUYjh3.js} +11 -6
  75. package/dist/units-internal-DFcUYjh3.js.map +1 -0
  76. package/dist/{zip-C0leZZMj.d.ts → zip-CTll_dr0.d.ts} +2 -2
  77. package/dist/{zip-C0leZZMj.d.ts.map → zip-CTll_dr0.d.ts.map} +1 -1
  78. package/dist/{zip-CKd8ihcf.js → zip-CYZ0F6BV.js} +2 -2
  79. package/dist/{zip-CKd8ihcf.js.map → zip-CYZ0F6BV.js.map} +1 -1
  80. package/dist/zip.d.ts +2 -2
  81. package/dist/zip.js +2 -2
  82. package/dist/{zoom-DPUHh85d.js → zoom-BoNyOlPm.js} +65 -51
  83. package/dist/zoom-BoNyOlPm.js.map +1 -0
  84. package/package.json +39 -31
  85. package/skills/ts-pptx-upstream/SKILL.md +18 -18
  86. package/dist/html-dom-Iuog2wdK.js.map +0 -1
  87. package/dist/image-size-CvN2iCA4.js.map +0 -1
  88. package/dist/notes-Dh12JAbn.js.map +0 -1
  89. package/dist/pres-C6qgOFAa.d.ts.map +0 -1
  90. package/dist/presentation-DGYlAWhl.js.map +0 -1
  91. package/dist/presentation-types-8jLQHI4M.d.ts.map +0 -1
  92. package/dist/shapes-re0KyQk_.js.map +0 -1
  93. package/dist/slide-Dx2ZeVZ6.d.ts.map +0 -1
  94. package/dist/units-internal-XJlf-hOl.js.map +0 -1
  95. package/dist/zoom-DPUHh85d.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"options-internal-WqgMf720.js","names":[],"sources":["../src/options-internal.ts"],"sourcesContent":["/**\n * ts-pptx: option-bag normalization helpers — one spelling of absent.\n *\n * `exactOptionalPropertyTypes` draws a line this library needs drawn: a `foo?: T` declaration says\n * the key is either *missing* or holds a `T`, and a key present with an `undefined` in it is a\n * third state. Readers here cannot see that state — every option is read with truthiness or `?.`\n * — but spreads can, and the generator spreads these bags constantly: a layout placeholder's\n * options onto a slide's, a column default under a cell's own, a combo subchart's overrides onto\n * the chart's. There the side that wins is decided by whether the key *exists*, not by what it\n * holds, so \"the caller said nothing\" and \"the caller said nothing, in writing\" produce different\n * output.\n *\n * These two helpers are how a normalizer stays on the right side of that. They are the write-side\n * twin of `compact()` (`script/from-read/values.ts`), which keeps the same invariant on the read\n * side and for the same reason.\n *\n * Internal: nothing here is exported from an entrypoint, the same way `constants-internal.ts` and\n * `units-internal.ts` are not.\n */\n\nimport type { OptionalKeysOf } from './types/internal.js'\n\n/**\n * Write a normalized value onto an option bag, spelling \"no value\" as an *absent* key.\n *\n * Reach for this wherever a normalizer's result may be nothing —\n * `setOrClear(opts, 'holeSize', clampChartPct(opts.holeSize, 10, 90, 'holeSize'))` — rather than\n * assigning the result directly, which leaves the caller's rejected value replaced by an\n * `undefined` instead of removed.\n *\n * Only optional keys are accepted, so this cannot be used to unset something required.\n * @param bag - the options bag to write onto\n * @param key - the key to set or remove\n * @param value - the normalized value, or `undefined` to remove the key\n */\nexport function setOrClear<T extends object, K extends OptionalKeysOf<T> & keyof T>(bag: T, key: K, value: T[K]): void {\n\tif (value === undefined) delete bag[key]\n\telse bag[key] = value\n}\n\n/**\n * The named properties of `source` that are actually set, as a new object.\n *\n * For the other shape this problem takes: a literal that projects a fixed key list off a bag that\n * may not state them all (`{ x: opts.x, y: opts.y, rotate: opts.rotate, … }`), which writes a key\n * for every name whether or not the source had one. Naming the keys once is also shorter than\n * spelling out the copy, and it cannot drift from itself the way a hand-written list can.\n *\n * Every key comes back optional and with `undefined` excluded from its type, which is the whole\n * claim: what this returns is the subset that was actually stated.\n * @param source - the bag to read from\n * @param keys - the keys to carry over\n */\nexport function pickDefined<T extends object, K extends keyof T>(\n\tsource: T,\n\tkeys: readonly K[]\n): { [P in K]?: Exclude<T[P], undefined> } {\n\tconst out: { [P in K]?: Exclude<T[P], undefined> } = {}\n\tfor (const key of keys) {\n\t\tconst value = source[key]\n\t\tif (value !== undefined) out[key] = value as Exclude<T[K], undefined>\n\t}\n\treturn out\n}\n"],"mappings":";;;;;;;;;;;;;;AAmCA,SAAgB,WAAoE,KAAQ,KAAQ,OAAmB;CACtH,IAAI,UAAU,KAAA,GAAW,OAAO,IAAI;MAC/B,IAAI,OAAO;AACjB;;;;;;;;;;;;;;AAeA,SAAgB,YACf,QACA,MAC0C;CAC1C,MAAM,MAA+C,CAAC;CACtD,KAAK,MAAM,OAAO,MAAM;EACvB,MAAM,QAAQ,OAAO;EACrB,IAAI,UAAU,KAAA,GAAW,IAAI,OAAO;CACrC;CACA,OAAO;AACR"}
1
+ {"version":3,"file":"options-internal-WqgMf720.js","names":[],"sources":["../src/options-internal.ts"],"sourcesContent":["/**\n * pptx-ts: option-bag normalization helpers — one spelling of absent.\n *\n * `exactOptionalPropertyTypes` draws a line this library needs drawn: a `foo?: T` declaration says\n * the key is either *missing* or holds a `T`, and a key present with an `undefined` in it is a\n * third state. Readers here cannot see that state — every option is read with truthiness or `?.`\n * — but spreads can, and the generator spreads these bags constantly: a layout placeholder's\n * options onto a slide's, a column default under a cell's own, a combo subchart's overrides onto\n * the chart's. There the side that wins is decided by whether the key *exists*, not by what it\n * holds, so \"the caller said nothing\" and \"the caller said nothing, in writing\" produce different\n * output.\n *\n * These two helpers are how a normalizer stays on the right side of that. They are the write-side\n * twin of `compact()` (`script/from-read/values.ts`), which keeps the same invariant on the read\n * side and for the same reason.\n *\n * Internal: nothing here is exported from an entrypoint, the same way `constants-internal.ts` and\n * `units-internal.ts` are not.\n */\n\nimport type { OptionalKeysOf } from './types/internal.js'\n\n/**\n * Write a normalized value onto an option bag, spelling \"no value\" as an *absent* key.\n *\n * Reach for this wherever a normalizer's result may be nothing —\n * `setOrClear(opts, 'holeSize', clampChartPct(opts.holeSize, 10, 90, 'holeSize'))` — rather than\n * assigning the result directly, which leaves the caller's rejected value replaced by an\n * `undefined` instead of removed.\n *\n * Only optional keys are accepted, so this cannot be used to unset something required.\n * @param bag - the options bag to write onto\n * @param key - the key to set or remove\n * @param value - the normalized value, or `undefined` to remove the key\n */\nexport function setOrClear<T extends object, K extends OptionalKeysOf<T> & keyof T>(bag: T, key: K, value: T[K]): void {\n\tif (value === undefined) delete bag[key]\n\telse bag[key] = value\n}\n\n/**\n * The named properties of `source` that are actually set, as a new object.\n *\n * For the other shape this problem takes: a literal that projects a fixed key list off a bag that\n * may not state them all (`{ x: opts.x, y: opts.y, rotate: opts.rotate, … }`), which writes a key\n * for every name whether or not the source had one. Naming the keys once is also shorter than\n * spelling out the copy, and it cannot drift from itself the way a hand-written list can.\n *\n * Every key comes back optional and with `undefined` excluded from its type, which is the whole\n * claim: what this returns is the subset that was actually stated.\n * @param source - the bag to read from\n * @param keys - the keys to carry over\n */\nexport function pickDefined<T extends object, K extends keyof T>(\n\tsource: T,\n\tkeys: readonly K[]\n): { [P in K]?: Exclude<T[P], undefined> } {\n\tconst out: { [P in K]?: Exclude<T[P], undefined> } = {}\n\tfor (const key of keys) {\n\t\tconst value = source[key]\n\t\tif (value !== undefined) out[key] = value as Exclude<T[K], undefined>\n\t}\n\treturn out\n}\n"],"mappings":";;;;;;;;;;;;;;AAmCA,SAAgB,WAAoE,KAAQ,KAAQ,OAAmB;CACtH,IAAI,UAAU,KAAA,GAAW,OAAO,IAAI;MAC/B,IAAI,OAAO;AACjB;;;;;;;;;;;;;;AAeA,SAAgB,YACf,QACA,MAC0C;CAC1C,MAAM,MAA+C,CAAC;CACtD,KAAK,MAAM,OAAO,MAAM;EACvB,MAAM,QAAQ,OAAO;EACrB,IAAI,UAAU,KAAA,GAAW,IAAI,OAAO;CACrC;CACA,OAAO;AACR"}
@@ -154,7 +154,11 @@ declare class OpcPackage {
154
154
  /** All parts, keyed by partname, in zip/add order. */
155
155
  get parts(): ReadonlyMap<string, Part>;
156
156
  static load(input: OpcInput): Promise<OpcPackage>;
157
- part(partName: string): Part | undefined;
157
+ /**
158
+ * The part at `partName`, or `undefined`. Takes `null`, as a part-name getter such as
159
+ * `Picture.imagePartName` reads when there is no part to name, and misses on it.
160
+ */
161
+ part(partName: string | null): Part | undefined;
158
162
  partsByContentType(contentType: string): Part[];
159
163
  /**
160
164
  * Relationships owned by a part ('/' for the package-level
@@ -205,4 +209,4 @@ declare class OpcPackage {
205
209
  }
206
210
  //#endregion
207
211
  export { Part as a, Relationships as i, OpcPackage as n, Element as o, Relationship as r, ContentTypes as s, OpcInput as t };
208
- //# sourceMappingURL=package-J49Ck6S2.d.ts.map
212
+ //# sourceMappingURL=package-KoEgVwII.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"package-J49Ck6S2.d.ts","names":[],"sources":["../src/read/opc/content-types.ts","../src/read/opc/part.ts","../src/read/opc/relationships.ts","../src/read/opc/package.ts"],"mappings":";;;;;;;;cAaa;;SAKL,MAAM,cAAc;;EAgC3B,eAAe;;MAKX;;;;;;;EAUJ,iBAAiB,kBAAkB;;;;;;EAWnC,eAAe;;EAKf,cAAc,mBAAmB;EAOjC;;;;;;;;;;;cCxEY;;WACH;WACA;EAKT,YAAY,kBAAkB,qBAAqB,OAAO;;MAOtD;;MAOA;;;;;;;;;;MAaA,iBAAiB;;;;;MAQjB,OAAO;;EAWX;MASI;;;;;;EASJ,aAAa;;;;UChFG;EAChB;EACA;EACA;EACA;;;;;;;;cASY;;;WAEH;UAIF;;;;;SAQA,MAAM,aAAa,yBAAyB;;SAuC5C,MAAM,yBAAyB;MAIlC;;MAKA;;;;;;;EAUJ,IAAI,cAAc,gBAAgB,uCAAuC;;;;;;;;EAgBzE,UAAU,YAAY,cAAc,gBAAgB,uCAAuC;;;;;;EA8B3F,OAAO;EASP,IAAI,aAAa;EAIjB,OAAO,eAAe;GAIrB,OAAO,aAAa,iBAAiB;;EAiBtC,cAAc;EAoBd;;;;;;;;;KCnLW,+BAA+B,aAAa,cAAc;;;;;;;;;cAezD;;;WAIH,cAAc;UAchB;;MAOH,SAAS,oBAAoB;SAIpB,KAAK,OAAO,WAAW,QAAQ;EA4B5C,KAAK,mBAAmB;EAIxB,mBAAmB,sBAAsB;;;;;EAoBzC,iBAAiB,0BAAuB;;;;;EAexC,QAAQ,kBAAkB,qBAAqB,OAAO,aAAa;;;;;;;;;;;EAuBnE,WAAW;;;;;EAgBX,qBAAqB,mBAAmB;;;;;;;;;;;;;;EAqBxC,oBAAoB,0BAA0B,QAAQ;;;;;;EAiChD,QAAQ,QAAQ"}
1
+ {"version":3,"file":"package-KoEgVwII.d.ts","names":[],"sources":["../src/read/opc/content-types.ts","../src/read/opc/part.ts","../src/read/opc/relationships.ts","../src/read/opc/package.ts"],"mappings":";;;;;;;;cAaa;;SAKL,MAAM,cAAc;;EAgC3B,eAAe;;MAKX;;;;;;;EAUJ,iBAAiB,kBAAkB;;;;;;EAWnC,eAAe;;EAKf,cAAc,mBAAmB;EAOjC;;;;;;;;;;;cCxEY;;WACH;WACA;EAKT,YAAY,kBAAkB,qBAAqB,OAAO;;MAOtD;;MAOA;;;;;;;;;;MAaA,iBAAiB;;;;;MAQjB,OAAO;;EAWX;MASI;;;;;;EASJ,aAAa;;;;UChFG;EAChB;EACA;EACA;EACA;;;;;;;;cASY;;;WAEH;UAIF;;;;;SAQA,MAAM,aAAa,yBAAyB;;SAuC5C,MAAM,yBAAyB;MAIlC;;MAKA;;;;;;;EAUJ,IAAI,cAAc,gBAAgB,uCAAuC;;;;;;;;EAgBzE,UAAU,YAAY,cAAc,gBAAgB,uCAAuC;;;;;;EA8B3F,OAAO;EASP,IAAI,aAAa;EAIjB,OAAO,eAAe;GAIrB,OAAO,aAAa,iBAAiB;;EAiBtC,cAAc;EAoBd;;;;;;;;;KCnLW,+BAA+B,aAAa,cAAc;;;;;;;;;cAezD;;;WAIH,cAAc;UAchB;;MAOH,SAAS,oBAAoB;SAIpB,KAAK,OAAO,WAAW,QAAQ;;;;;EAgC5C,KAAK,0BAA0B;EAI/B,mBAAmB,sBAAsB;;;;;EAoBzC,iBAAiB,0BAAuB;;;;;EAexC,QAAQ,kBAAkB,qBAAqB,OAAO,aAAa;;;;;;;;;;;EAuBnE,WAAW;;;;;EAgBX,qBAAqB,mBAAmB;;;;;;;;;;;;;;EAqBxC,oBAAoB,0BAA0B,QAAQ;;;;;;EAiChD,QAAQ,QAAQ"}
@@ -1,4 +1,4 @@
1
- import { c as PLACEHOLDER_TYPE, d as SHAPE_NAME, i as CHART_NAME, v as WRITE_OUTPUT_TYPE } from "./enums-BUKTUB6V.js";
1
+ import { c as PLACEHOLDER_TYPE, d as SHAPE_NAME, i as CHART_NAME, v as WRITE_OUTPUT_TYPE } from "./enums-DQRpVOLh.js";
2
2
  //#region src/ooxml/st-enums.d.ts
3
3
  /**
4
4
  * `ST_` simple-type enumerations from ECMA-376, declared once as the single source of both the
@@ -82,6 +82,10 @@ type LightRigDirection = (typeof LIGHT_RIG_DIRECTIONS)[number];
82
82
  */
83
83
  declare const TEXT_HORZ_OVERFLOW: readonly ['clip', 'overflow'];
84
84
  type TextHorzOverflowType = (typeof TEXT_HORZ_OVERFLOW)[number];
85
+ /**
86
+ * `ST_PresetPatternVal` — `a:pattFill/@prst`, the hatch a pattern fill draws.
87
+ */
88
+ declare const PATTERN_PRESETS: readonly ['pct5', 'pct10', 'pct20', 'pct25', 'pct30', 'pct40', 'pct50', 'pct60', 'pct70', 'pct75', 'pct80', 'pct90', 'horz', 'vert', 'ltHorz', 'ltVert', 'dkHorz', 'dkVert', 'narHorz', 'narVert', 'dashHorz', 'dashVert', 'cross', 'dnDiag', 'upDiag', 'ltDnDiag', 'ltUpDiag', 'dkDnDiag', 'dkUpDiag', 'wdDnDiag', 'wdUpDiag', 'dashDnDiag', 'dashUpDiag', 'diagCross', 'smCheck', 'lgCheck', 'smGrid', 'lgGrid', 'dotGrid', 'smConfetti', 'lgConfetti', 'horzBrick', 'diagBrick', 'solidDmnd', 'openDmnd', 'dotDmnd', 'plaid', 'sphere', 'weave', 'divot', 'shingle', 'wave', 'trellis', 'zigZag'];
85
89
  /**
86
90
  * `ST_TextVerticalType` — `a:bodyPr/@vert` and `a:tcPr/@vert`.
87
91
  * @see ECMA-376 Part 1 §20.1.10.83
@@ -658,7 +662,7 @@ interface ImageBaseProps extends PositionProps, ObjectNameProps {
658
662
  };
659
663
  /**
660
664
  * Raw SVG markup to embed as the image source
661
- * - convenience for `data: 'data:image/svg+xml;base64,...'`; ts-pptx encodes it for you
665
+ * - convenience for `data: 'data:image/svg+xml;base64,...'`; pptx-ts encodes it for you
662
666
  * - ignored when `data` or `path` is also provided
663
667
  * @example '<svg viewBox="0 0 24 24">...</svg>'
664
668
  */
@@ -1675,10 +1679,13 @@ interface OptsChartData {
1675
1679
  */
1676
1680
  sizes?: number[];
1677
1681
  /**
1678
- * category values
1682
+ * category values. A `null` is a gap: the point has no value, and the embedded workbook
1683
+ * holds an empty cell for it. How a line or area chart draws across one is
1684
+ * `displayBlanksAs`.
1679
1685
  * @example [2000, 2010, 2020]
1686
+ * @example [5, null, 7] // no value for the second category
1680
1687
  */
1681
- values?: number[];
1688
+ values?: Array<number | null>;
1682
1689
  /**
1683
1690
  * Custom text label per data point, replacing the auto-generated value label.
1684
1691
  * Index aligns with `values[]`. Empty string or missing entries fall back to the chart-level label settings.
@@ -2479,7 +2486,7 @@ interface ChartPropsChartBoxWhisker {
2479
2486
  * PowerPoint resolves against its Bing-backed geography database when the deck is opened.
2480
2487
  *
2481
2488
  * These fields tell PowerPoint how to interpret ambiguous region names (e.g. "Georgia" the country
2482
- * vs. the US state). They do NOT change what ts-pptx writes beyond the `<cx:geography>` hint —
2489
+ * vs. the US state). They do NOT change what pptx-ts writes beyond the `<cx:geography>` hint —
2483
2490
  * the actual map is resolved and rendered by PowerPoint 2016+/Microsoft 365 at open time, so the
2484
2491
  * region names must match PowerPoint's geography database or the map renders blank.
2485
2492
  */
@@ -2671,7 +2678,7 @@ interface ChartOpts extends ChartPropsAxisCat, ChartPropsAxisSer, ChartPropsAxis
2671
2678
  altText?: string;
2672
2679
  /**
2673
2680
  * Custom chart-level metadata, emitted as a schema-valid extension on the chart space
2674
- * (`c:chartSpace/c:extLst`) under a stable ts-pptx vendor GUID.
2681
+ * (`c:chartSpace/c:extLst`) under a stable pptx-ts vendor GUID.
2675
2682
  * - Use for round-trippable, machine-readable annotations a consumer wants to travel with the
2676
2683
  * chart (e.g. a source-data id, a generator tag, a semantic role). PowerPoint preserves the
2677
2684
  * extension untouched and ignores it for rendering.
@@ -3206,7 +3213,7 @@ interface RadialGradientFillProps {
3206
3213
  }
3207
3214
  type GradientFillProps = LinearGradientFillProps | RadialGradientFillProps;
3208
3215
  /** OOXML ST_PresetPatternVal — preset pattern names for `<a:pattFill prst="...">` */
3209
- type PatternPreset = 'pct5' | 'pct10' | 'pct20' | 'pct25' | 'pct30' | 'pct40' | 'pct50' | 'pct60' | 'pct70' | 'pct75' | 'pct80' | 'pct90' | 'horz' | 'vert' | 'ltHorz' | 'ltVert' | 'dkHorz' | 'dkVert' | 'narHorz' | 'narVert' | 'dashHorz' | 'dashVert' | 'cross' | 'dnDiag' | 'upDiag' | 'ltDnDiag' | 'ltUpDiag' | 'dkDnDiag' | 'dkUpDiag' | 'wdDnDiag' | 'wdUpDiag' | 'dashDnDiag' | 'dashUpDiag' | 'diagCross' | 'smCheck' | 'lgCheck' | 'smGrid' | 'lgGrid' | 'dotGrid' | 'smConfetti' | 'lgConfetti' | 'horzBrick' | 'diagBrick' | 'solidDmnd' | 'openDmnd' | 'dotDmnd' | 'plaid' | 'sphere' | 'weave' | 'divot' | 'shingle' | 'wave' | 'trellis' | 'zigZag';
3216
+ type PatternPreset = (typeof PATTERN_PRESETS)[number];
3210
3217
  interface PatternFillProps {
3211
3218
  /** OOXML preset pattern (`prst` attribute on `<a:pattFill>`). */
3212
3219
  preset: PatternPreset;
@@ -3414,13 +3421,26 @@ interface WriteBaseProps {
3414
3421
  */
3415
3422
  onMediaError?: 'throw' | 'placeholder';
3416
3423
  }
3417
- interface WriteProps extends WriteBaseProps {
3424
+ interface WriteProps<T extends WRITE_OUTPUT_TYPE = WRITE_OUTPUT_TYPE> extends WriteBaseProps {
3418
3425
  /**
3419
- * Output type
3426
+ * Output type. `write()` resolves to the matching {@link WriteOutputMap} entry.
3420
3427
  * - values: 'arraybuffer' | 'base64' | 'binarystring' | 'blob' | 'nodebuffer' | 'uint8array'
3421
3428
  * @default 'blob'
3422
3429
  */
3423
- outputType?: WRITE_OUTPUT_TYPE;
3430
+ outputType?: T;
3431
+ }
3432
+ /**
3433
+ * What `write()` resolves to for each {@link WriteProps.outputType}. `'nodebuffer'` is a Node
3434
+ * `Buffer` at run time, typed as the `Uint8Array` it extends so the declaration does not need
3435
+ * Node's types.
3436
+ */
3437
+ interface WriteOutputMap {
3438
+ arraybuffer: ArrayBuffer;
3439
+ base64: string;
3440
+ binarystring: string;
3441
+ blob: Blob;
3442
+ nodebuffer: Uint8Array;
3443
+ uint8array: Uint8Array;
3424
3444
  }
3425
3445
  interface WriteFileProps extends WriteBaseProps {
3426
3446
  /**
@@ -3520,5 +3540,5 @@ interface PresentationProps {
3520
3540
  title: string;
3521
3541
  }
3522
3542
  //#endregion
3523
- export { ChartPropsAxisCat as $, ShapeAdjustValue as $t, TextVertType as A, NotesTextOptions as At, ShapeFillProps as B, TextMeasurement as Bt, ImageFillProps as C, TimeUnit as Cn, CommonObjectDescriptor as Ct, PatternPreset as D, CommentProps as Dt, PatternFillProps as E, PlaceholderProps as Et, ConnectorType as F, TableLayoutResult as Ft, ChartDataPointStyle as G, ImageBaseProps as Gt, StrokeProps as H, TextPropsOptions as Ht, FillOption as I, TextBaseProps as It, ChartExGeography as J, MediaType as Jt, ChartErrorBarOptions as K, ImageProps as Kt, HyperlinkActionJump as L, TextBulletProps as Lt, VAlign as M, ResolvedCommentAuthor as Mt, BorderProps as N, SlideComment as Nt, PositionProps as O, MeasureTextOptions as Ot, ConnectorProps as P, TableCellLayout as Pt, ChartOpts as Q, ShapeAdjustHandleXY as Qt, HyperlinkProps as R, TextFitShrinkProps as Rt, HexColor as S, ThemeColorSlot as Sn, OptsChartGridLine as St, Margin as T, ObjectNameProps as Tt, ChartAreaProps as U, textRun as Ut, ShapeLineProps as V, TextProps as Vt, ChartAxisTickMark as W, textRuns as Wt, ChartLineDash as X, ShapeAdjustHandle as Xt, ChartExStatistics as Y, OleObjectProps as Yt, ChartMulti as Z, ShapeAdjustHandlePolar as Zt, DataOrPathRequiredProps as _, RadarStyleAlias as _n, ChartPropsLegend as _t, PresentationProps as a, BarGrouping as an, ChartPropsChartDoughnut as at, GradientStopProps as b, TextHorzOverflowType as bn, LineCap as bt, WriteFileProps as c, DataLabelPosition as cn, ChartPropsChartPie as ct, ThemeProps as d, LegendPosition as dn, ChartPropsChartStock as dt, ShapeConnectionSite as en, ChartPropsAxisSer as et, BackgroundOption as f, LightRigDirection as fn, ChartPropsChartSurface as ft, DataOrPathProps as g, RadarStyle as gn, ChartPropsFillLine as gt, Coord as h, PresetMaterialType as hn, ChartPropsDataTable as ht, PresLayout as i, BarDirection as in, ChartPropsChartBoxWhisker as it, ThemeColor as j, OverflowBoxOptions as jt, RadialGradientFillProps as k, NotesProps as kt, WriteProps as l, DisplayBlanksAs as ln, ChartPropsChartRadar as lt, Color as m, LineDataSymbol as mn, ChartPropsDataLabel as mt, PackagePart as n, ShapeProps as nn, ChartPropsBase as nt, SectionProps as o, BevelPresetType as on, ChartPropsChartHistogram as ot, BackgroundProps as p, LightRigType as pn, ChartPropsChartWaterfall as pt, ChartExBinning as q, MediaProps as qt, PartsProps as r, Bar3DShape as rn, ChartPropsChartBar as rt, WriteBaseProps as s, ColorMapToken as sn, ChartPropsChartLine as st, CustomPropertyValue as t, ShapeGuide as tn, ChartPropsAxisVal as tt, ThemeColorScheme as u, EMBEDDED_FONT_SLOTS as un, ChartPropsChartRegionMap as ut, GeometryPoint as v, TEXT_AUTONUM_SCHEMES as vn, ChartPropsTitle as vt, LinearGradientFillProps as w, ObjectLockProps as wt, HAlign as x, TextShapeType as xn, OptsChartData as xt, GradientFillProps as y, TRANSITION_TYPES as yn, ChartSeriesOpts as yt, ShadowProps as z, TextGlowProps as zt };
3524
- //# sourceMappingURL=pres-C6qgOFAa.d.ts.map
3543
+ export { ChartOpts as $, ShapeAdjustHandleXY as $t, RadialGradientFillProps as A, NotesProps as At, ShadowProps as B, TextGlowProps as Bt, HexColor as C, ThemeColorSlot as Cn, OptsChartGridLine as Ct, PatternFillProps as D, PlaceholderProps as Dt, Margin as E, ObjectNameProps as Et, ConnectorProps as F, TableCellLayout as Ft, ChartAxisTickMark as G, textRuns as Gt, ShapeLineProps as H, TextProps as Ht, ConnectorType as I, TableLayoutResult as It, ChartExBinning as J, MediaProps as Jt, ChartDataPointStyle as K, ImageBaseProps as Kt, FillOption as L, TextBaseProps as Lt, ThemeColor as M, OverflowBoxOptions as Mt, VAlign as N, ResolvedCommentAuthor as Nt, PatternPreset as O, CommentProps as Ot, BorderProps as P, SlideComment as Pt, ChartMulti as Q, ShapeAdjustHandlePolar as Qt, HyperlinkActionJump as R, TextBulletProps as Rt, HAlign as S, TextShapeType as Sn, OptsChartData as St, LinearGradientFillProps as T, ObjectLockProps as Tt, StrokeProps as U, TextPropsOptions as Ut, ShapeFillProps as V, TextMeasurement as Vt, ChartAreaProps as W, textRun as Wt, ChartExStatistics as X, OleObjectProps as Xt, ChartExGeography as Y, MediaType as Yt, ChartLineDash as Z, ShapeAdjustHandle as Zt, DataOrPathProps as _, RadarStyle as _n, ChartPropsFillLine as _t, PresentationProps as a, BarDirection as an, ChartPropsChartBoxWhisker as at, GradientFillProps as b, TRANSITION_TYPES as bn, ChartSeriesOpts as bt, WriteFileProps as c, ColorMapToken as cn, ChartPropsChartLine as ct, ThemeColorScheme as d, EMBEDDED_FONT_SLOTS as dn, ChartPropsChartRegionMap as dt, ShapeAdjustValue as en, ChartPropsAxisCat as et, ThemeProps as f, LegendPosition as fn, ChartPropsChartStock as ft, Coord as g, PresetMaterialType as gn, ChartPropsDataTable as gt, Color as h, LineDataSymbol as hn, ChartPropsDataLabel as ht, PresLayout as i, Bar3DShape as in, ChartPropsChartBar as it, TextVertType as j, NotesTextOptions as jt, PositionProps as k, MeasureTextOptions as kt, WriteOutputMap as l, DataLabelPosition as ln, ChartPropsChartPie as lt, BackgroundProps as m, LightRigType as mn, ChartPropsChartWaterfall as mt, PackagePart as n, ShapeGuide as nn, ChartPropsAxisVal as nt, SectionProps as o, BarGrouping as on, ChartPropsChartDoughnut as ot, BackgroundOption as p, LightRigDirection as pn, ChartPropsChartSurface as pt, ChartErrorBarOptions as q, ImageProps as qt, PartsProps as r, ShapeProps as rn, ChartPropsBase as rt, WriteBaseProps as s, BevelPresetType as sn, ChartPropsChartHistogram as st, CustomPropertyValue as t, ShapeConnectionSite as tn, ChartPropsAxisSer as tt, WriteProps as u, DisplayBlanksAs as un, ChartPropsChartRadar as ut, DataOrPathRequiredProps as v, RadarStyleAlias as vn, ChartPropsLegend as vt, ImageFillProps as w, TimeUnit as wn, CommonObjectDescriptor as wt, GradientStopProps as x, TextHorzOverflowType as xn, LineCap as xt, GeometryPoint as y, TEXT_AUTONUM_SCHEMES as yn, ChartPropsTitle as yt, HyperlinkProps as z, TextFitShrinkProps as zt };
3544
+ //# sourceMappingURL=pres-BA9_lJbY.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pres-BA9_lJbY.d.ts","names":[],"sources":["../src/ooxml/st-enums.ts","../src/types/shape.ts","../src/types/media.ts","../src/types/text.ts","../src/types/object.ts","../src/types/chart.ts","../src/types/style.ts","../src/types/core.ts","../src/types/theme.ts","../src/types/pres.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAoCa;;cA6CA;;cAGA;;cAGA;;cAsBA;;;;;;;;cAqCA;;;;;cAwDA;KAcD,0BAA0B;;;;;cAMzB;KAiBD,6BAA6B;;;;;cAM5B;KA6BD,uBAAuB;;;;;cAMtB;KACD,4BAA4B;;;;;cAM3B;KACD,+BAA+B;;;;cAc9B;;;;;cA6DA;KASD,2BAA2B;;;;;;cAO1B;;;;;;;;;cAaA;KACD,sBAAsB;;;;;;;;;cAUrB;KA2CD,wBAAwB;;;;;;;;;cAUvB;KAaD,4BAA4B;;;;;cAM3B;KACD,uBAAuB;;;;;;cAOtB;KACD,sBAAsB;;;;;cAarB;KACD,qBAAqB;;;;;cAMpB;KACD,qBAAqB;;;;;;;;;;;;cAapB;WAAwB;WAAmB;;KAC5C,+BAA+B;;;;;cAY9B;KACD,yBAAyB;;;;;cAMxB;KACD,0BAA0B;;;;;;;;;;cAWzB;KACD,4BAA4B;;;;;;;;;;cAW3B;KACD,yBAAyB;;cAGxB;KACD,4BAA4B;;cAG3B;KACD,0BAA0B;;cAGz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;;EAKA;EACA;EACA,OAAO;EACP"}
@@ -1,12 +1,12 @@
1
- import { i as PackageReadError, l as warn, n as InvalidOptionError, o as UnsupportedFeatureError, t as InternalError } from "./errors-C4oENPcu.js";
2
- import { X as MIN_SLIDE_MASTER_ID, Y as MAX_SLIDE_ID } from "./units-internal-XJlf-hOl.js";
3
- import { D as emuToInches } from "./table-cell-margins-EVg0EwxT.js";
4
- import { $t as THEME_REL, At as NOTES_MASTER_CONTENT_TYPE, Ct as HYPERLINK_REL, Dt as MS_MEDIA_REL, E as EMBEDDED_FONT_SLOTS, Et as MODERN_COMMENT_AUTHORS_REL, Ft as OFFICE_DOCUMENT_REL, Ht as RELATIONSHIPS_CONTENT_TYPE, It as OFFICE_REL, Jt as SLIDE_MASTER_REL, Kt as SLIDE_LAYOUT_REL, Lt as PACKAGE_REL, Mt as NOTES_SLIDE_CONTENT_TYPE, Nt as NOTES_SLIDE_REL, Ot as MS_POWERPOINT_CONTENT, Qt as THEME_CONTENT_TYPE, S as COLOR_MAP_TOKENS, Ut as SHARED_PARTS, Wt as SLIDE_CONTENT_TYPE, Xt as TABLE_STYLES_CONTENT_TYPE, Yt as SLIDE_REL, Z as THEME_COLOR_SLOTS, Zt as TABLE_STYLES_REL, _t as CORE_PROPS_REL, at as CHARTEX_REL, ct as CHART_CONTENT_TYPE, dt as CHART_STYLE_REL, en as VIDEO_REL, fn as imageFormatForBytes, in as OOXML_NS, it as CHARTEX_CONTENT_TYPE, jt as NOTES_MASTER_REL, kt as MS_REL, lt as CHART_REL, ot as CHART_COLOR_STYLE_CONTENT_TYPE, pt as COMMENTS_REL, rn as XLSX_CONTENT_TYPE, rt as AUDIO_REL, st as CHART_COLOR_STYLE_REL, u as boolValue, ut as CHART_STYLE_CONTENT_TYPE, wt as IMAGE_REL, zt as PRESENTATION_MAIN_CONTENT_TYPE } from "./image-size-CvN2iCA4.js";
5
- import { Ct as FONT_DATA_CONTENT_TYPE, Ot as XML_DECL, Rt as encodeXmlAttrValue, St as voidEl, Tt as FONT_REL_TYPE, n as makeXmlNotesMaster, o as makeXmlNotesSlideSkeleton, wt as FONT_DATA_EXTENSION, xt as raw, yt as el } from "./notes-Dh12JAbn.js";
1
+ import { i as PackageReadError, l as warn, n as InvalidOptionError, o as UnsupportedFeatureError, t as InternalError } from "./errors-Da2nXCJm.js";
2
+ import { X as MIN_SLIDE_MASTER_ID, Y as MAX_SLIDE_ID } from "./units-internal-DFcUYjh3.js";
3
+ import { D as emuToInches } from "./table-cell-margins-PDshga8T.js";
4
+ import { $t as THEME_CONTENT_TYPE, At as MS_REL, Bt as PRESENTATION_MAIN_CONTENT_TYPE, Dt as MODERN_COMMENT_AUTHORS_REL, E as EMBEDDED_FONT_SLOTS, Gt as SLIDE_CONTENT_TYPE, It as OFFICE_DOCUMENT_REL, Lt as OFFICE_REL, Mt as NOTES_MASTER_REL, Nt as NOTES_SLIDE_CONTENT_TYPE, Ot as MS_MEDIA_REL, Pt as NOTES_SLIDE_REL, Q as THEME_COLOR_SLOTS, Qt as TABLE_STYLES_REL, Rt as PACKAGE_REL, S as COLOR_MAP_TOKENS, Tt as IMAGE_REL, Ut as RELATIONSHIPS_CONTENT_TYPE, Wt as SHARED_PARTS, Xt as SLIDE_REL, Yt as SLIDE_MASTER_REL, Zt as TABLE_STYLES_CONTENT_TYPE, an as OOXML_NS, at as CHARTEX_CONTENT_TYPE, ct as CHART_COLOR_STYLE_REL, dt as CHART_STYLE_CONTENT_TYPE, en as THEME_REL, ft as CHART_STYLE_REL, in as XLSX_CONTENT_TYPE, it as AUDIO_REL, jt as NOTES_MASTER_CONTENT_TYPE, kt as MS_POWERPOINT_CONTENT, lt as CHART_CONTENT_TYPE, mt as COMMENTS_REL, ot as CHARTEX_REL, pn as imageFormatForBytes, qt as SLIDE_LAYOUT_REL, st as CHART_COLOR_STYLE_CONTENT_TYPE, tn as VIDEO_REL, u as boolValue, ut as CHART_REL, vt as CORE_PROPS_REL, wt as HYPERLINK_REL } from "./image-size-DwDbakcl.js";
5
+ import { Ct as FONT_DATA_CONTENT_TYPE, Ot as XML_DECL, Rt as encodeXmlAttrValue, St as voidEl, Tt as FONT_REL_TYPE, n as makeXmlNotesMaster, o as makeXmlNotesSlideSkeleton, wt as FONT_DATA_EXTENSION, xt as raw, yt as el } from "./notes-BcT571R4.js";
6
6
  import { t as pickDefined } from "./options-internal-WqgMf720.js";
7
- import { n as readZip, t as ZipWriter } from "./zip-CKd8ihcf.js";
7
+ import { n as readZip, t as ZipWriter } from "./zip-CYZ0F6BV.js";
8
8
  import { t as transitionSpeedForDuration } from "./transition-speed-kUEWDWTx.js";
9
- import { $ as placeholderInheritedColor, $t as relsPartNameFor, A as flattenAnimations, At as CSLD_AFTER_BG, B as readColorRef, Bt as SLIDE_AFTER_TRANSITION, Ct as styleRefFill, E as AutoShape, Et as themeElementsOfRoot, Ft as PRESENTATION_AFTER_SLD_ID_LST, G as resolveSlideColorContext, Gt as SPPR_LN_AFTER, H as resolveLayoutColorContext, Ht as SPPR_AFTER_XFRM, It as PRESENTATION_AFTER_SLD_MASTER_ID_LST, J as checkPositiveEmu, Jt as TXBODY_AFTER_BODYPR, K as resolveSlideThemeParts, Kt as SPPR_SCENE3D_AFTER, L as readPatternFill, Lt as RPR_FILL_AFTER, M as pruneSpids, Mt as LN_SLOTS, N as remapSpids, Nt as PRESENTATION_AFTER_EMBEDDED_FONT_LST, O as carryShapeAnimations, Ot as hasFillChoice, P as TextFrame, Pt as PRESENTATION_AFTER_NOTES_MASTER_ID_LST, Q as placeholderInheritedAnchor, Qt as relativePartName, R as readPictureFill, Rt as RUN_AFTER_RPR, St as resolveSchemeToken, T as Picture, Tt as substitutePhClr, U as resolveMasterColorContext, Ut as SPPR_EFFECT_AFTER, Vt as SLIDE_MASTER_AFTER_SLD_LAYOUT_ID_LST, W as resolveNotesColorContext, Wt as SPPR_FILL_AFTER, X as RUN_PROP_NAMES, Xt as partNameExtension, Y as LST_STYLE_LEVELS, Yt as TXBODY_AFTER_LSTSTYLE, Z as lstStyleLevelDefRPr, Zt as partNameToZipPath, _n as parseXml, _t as isA, an as boolAttr, at as slideDefinesProp, bn as serializeXml, bt as replaceColorElement, cn as descendantsByTag, ct as carriedDecorations, dn as getElements, dt as nextDrawingId, en as resolveRelativePartName, et as placeholderInheritedListStyles, fn as getOrAddChild, ft as nthShapeChild, gn as ownerDocumentOf, gt as fmtEntry, hn as numberValue, ht as spTreeOf, in as attr, it as slideDefinesColor, j as hasAnimations, jt as EMBEDDED_FONT_ENTRY_AFTER, k as enumerateSpids, l as wrapShapeElement, ln as firstChild, lt as collectElements, m as resolveTableCellTextStyle, mn as numberAttr, mt as reassignDrawingIds, n as buildShapes, nn as singleRelPart, nt as placeholderInheritedXfrm, on as childElements, ot as cSldName, pn as insertInOrder, pt as nvPrOf, q as checkFiniteEmu, qt as SPPR_SP3D_AFTER, r as findShapeByIdDeep, rn as zipPathToPartName, rt as placeholderOf, sn as createElement, st as cSldOf, t as GroupShape, tn as resolveSingleRel, tt as placeholderInheritedRunProps, u as GraphicFrame, un as firstChildElement, ut as firstShapeChild, vn as removeAttr, vt as parseClrMap, wt as styleRefLine, xn as setAttr, xt as resolveColor, yn as removeChildrenByQName, yt as parseClrScheme, z as readGradientFill, zt as SHAPE_AFTER_SPPR } from "./shapes-re0KyQk_.js";
9
+ import { $ as placeholderInheritedColor, $t as relsPartNameFor, A as flattenAnimations, At as CSLD_AFTER_BG, B as readColorRef, Bt as SLIDE_AFTER_TRANSITION, Ct as styleRefFill, E as AutoShape, Et as themeElementsOfRoot, Ft as PRESENTATION_AFTER_SLD_ID_LST, G as resolveSlideColorContext, Gt as SPPR_LN_AFTER, H as resolveLayoutColorContext, Ht as SPPR_AFTER_XFRM, It as PRESENTATION_AFTER_SLD_MASTER_ID_LST, J as checkPositiveEmu, Jt as TXBODY_AFTER_BODYPR, K as resolveSlideThemeParts, Kt as SPPR_SCENE3D_AFTER, L as readPatternFill, Lt as RPR_FILL_AFTER, M as pruneSpids, Mt as LN_SLOTS, N as remapSpids, Nt as PRESENTATION_AFTER_EMBEDDED_FONT_LST, O as carryShapeAnimations, Ot as hasFillChoice, P as TextFrame, Pt as PRESENTATION_AFTER_NOTES_MASTER_ID_LST, Q as placeholderInheritedAnchor, Qt as relativePartName, R as readPictureFill, Rt as RUN_AFTER_RPR, St as resolveSchemeToken, T as Picture, Tt as substitutePhClr, U as resolveMasterColorContext, Ut as SPPR_EFFECT_AFTER, Vt as SLIDE_MASTER_AFTER_SLD_LAYOUT_ID_LST, W as resolveNotesColorContext, Wt as SPPR_FILL_AFTER, X as RUN_PROP_NAMES, Xt as partNameExtension, Y as LST_STYLE_LEVELS, Yt as TXBODY_AFTER_LSTSTYLE, Z as lstStyleLevelDefRPr, Zt as partNameToZipPath, _n as parseXml, _t as isA, an as boolAttr, at as slideDefinesProp, bn as serializeXml, bt as replaceColorElement, cn as descendantsByTag, ct as carriedDecorations, dn as getElements, dt as nextDrawingId, en as resolveRelativePartName, et as placeholderInheritedListStyles, fn as getOrAddChild, ft as nthShapeChild, gn as ownerDocumentOf, gt as fmtEntry, hn as numberValue, ht as spTreeOf, in as attr, it as slideDefinesColor, j as hasAnimations, jt as EMBEDDED_FONT_ENTRY_AFTER, k as enumerateSpids, l as wrapShapeElement, ln as firstChild, lt as collectElements, m as resolveTableCellTextStyle, mn as numberAttr, mt as reassignDrawingIds, n as buildShapes, nn as singleRelPart, nt as placeholderInheritedXfrm, on as childElements, ot as cSldName, pn as insertInOrder, pt as nvPrOf, q as checkFiniteEmu, qt as SPPR_SP3D_AFTER, r as findShapeByIdDeep, rn as zipPathToPartName, rt as placeholderOf, sn as createElement, st as cSldOf, t as GroupShape, tn as resolveSingleRel, tt as placeholderInheritedRunProps, u as GraphicFrame, un as firstChildElement, ut as firstShapeChild, vn as removeAttr, vt as parseClrMap, wt as styleRefLine, xn as setAttr, xt as resolveColor, yn as removeChildrenByQName, yt as parseClrScheme, z as readGradientFill, zt as SHAPE_AFTER_SPPR } from "./shapes-BcyFdZpp.js";
10
10
  //#region src/read/opc/content-types.ts
11
11
  /**
12
12
  * Overlay over `[Content_Types].xml`, used to resolve part content types at
@@ -357,8 +357,12 @@ var OpcPackage = class OpcPackage {
357
357
  }
358
358
  return new OpcPackage(parts, contentTypes, contentTypesBytes);
359
359
  }
360
+ /**
361
+ * The part at `partName`, or `undefined`. Takes `null`, as a part-name getter such as
362
+ * `Picture.imagePartName` reads when there is no part to name, and misses on it.
363
+ */
360
364
  part(partName) {
361
- return this.parts.get(partName);
365
+ return partName === null ? void 0 : this.parts.get(partName);
362
366
  }
363
367
  partsByContentType(contentType) {
364
368
  if (!this.#partsByContentType) {
@@ -869,7 +873,7 @@ var TemplatePart = class {
869
873
  const spTree = this.spTree();
870
874
  return spTree ? buildShapes(spTree, this) : [];
871
875
  }
872
- /** The shape anywhere in this tier's tree with the given drawing id, or `undefined`. */
876
+ /** The shape anywhere in this tier's tree with the given drawing id, or `undefined` (always, for `null`). */
873
877
  shapeByIdDeep(id) {
874
878
  return findShapeByIdDeep(this.shapes, id);
875
879
  }
@@ -1087,7 +1091,7 @@ var NotesSlide = class {
1087
1091
  const spTree = this.#spTree();
1088
1092
  return spTree ? buildShapes(spTree, this) : [];
1089
1093
  }
1090
- /** The shape anywhere in the notes tree with the given drawing id, or `undefined`. */
1094
+ /** The shape anywhere in the notes tree with the given drawing id, or `undefined` (always, for `null`). */
1091
1095
  shapeByIdDeep(id) {
1092
1096
  return findShapeByIdDeep(this.shapes, id);
1093
1097
  }
@@ -1969,7 +1973,7 @@ function ensureNotesMasterForAuthoring(dest, slidePartName) {
1969
1973
  * The part it builds is the generator's, not a second design: the fixed three-
1970
1974
  * placeholder frame comes from {@link makeXmlNotesSlideSkeleton}, and the body
1971
1975
  * paragraphs carry the same elements and attributes the write path emits for a plain
1972
- * `pptx.addSlide().addNotes(text)`. `test/read/add-notes.test.js` asserts that
1976
+ * `pptx.addSlide().addNotes(text)`. `test/read/add-notes.test.ts` asserts that
1973
1977
  * equivalence, so the two cannot drift apart unnoticed — the same guarantee
1974
1978
  * `src/ooxml/` gives the constants both halves share.
1975
1979
  *
@@ -2906,8 +2910,12 @@ var Slide = class {
2906
2910
  get slideNumberPlaceholder() {
2907
2911
  return this.placeholder("sldNum") ?? null;
2908
2912
  }
2909
- /** The first top-level shape with the given drawing id (`p:cNvPr/@id`), or `undefined`. */
2913
+ /**
2914
+ * The first top-level shape with the given drawing id (`p:cNvPr/@id`), or `undefined`. Takes
2915
+ * `null`, as a shape's `id` reads when its `p:cNvPr` has no `@id`, and misses on it.
2916
+ */
2910
2917
  shapeById(id) {
2918
+ if (id === null) return void 0;
2911
2919
  return this.shapes.find((shape) => shape.id === id);
2912
2920
  }
2913
2921
  /**
@@ -3399,7 +3407,7 @@ function mergeEmbeddedFontEntries(dest, entries) {
3399
3407
  //#endregion
3400
3408
  //#region src/read/api/ops/slide-size.ts
3401
3409
  /**
3402
- * ts-pptx: slide-size preconditions for the import surface
3410
+ * pptx-ts: slide-size preconditions for the import surface
3403
3411
  *
3404
3412
  * Every import entry point starts by asking whether the two decks agree on canvas size, and
3405
3413
  * the five that asked wrote out the same comparison, the same `unknown`-printing formatter
@@ -3454,7 +3462,7 @@ function slideSizesMatch(target, incoming) {
3454
3462
  //#endregion
3455
3463
  //#region src/read/api/ops/append-slides.ts
3456
3464
  /**
3457
- * ts-pptx: the body of {@link Presentation.appendSlides}
3465
+ * pptx-ts: the body of {@link Presentation.appendSlides}
3458
3466
  *
3459
3467
  * The hybrid "generate onto an existing deck" path: a slide producer authors slides, they are
3460
3468
  * spliced into this package under fresh partnames, and every dependency each one carries —
@@ -3897,7 +3905,7 @@ var ImportMemo = class {
3897
3905
  * 4. bake each placeholder run's effective colour and size/weight (inherited from
3898
3906
  * the source layout/master text styles) explicitly onto the run, each other
3899
3907
  * shape's run the ones it takes from the source `p:defaultTextStyle`, and each
3900
- * table cell's run the ones it takes from the source `p:otherStyle`;
3908
+ * table cell's run the ones it takes from the source `p:otherStyle` and theme;
3901
3909
  * 5. rewrite every remaining `a:schemeClr` to its literal `a:srgbClr`.
3902
3910
  *
3903
3911
  * Steps run in this order so the inherited/materialized backgrounds are present
@@ -4294,25 +4302,26 @@ function resolveDefaultTextStyleRuns(root, ctx) {
4294
4302
  }
4295
4303
  }
4296
4304
  /**
4297
- * Bake what a table cell's runs take from the source master's `p:otherStyle`: size, and bold and
4298
- * italic where the cell's table style states neither, per paragraph level, wherever the run, its
4299
- * paragraph and the cell's own list style state none of them.
4305
+ * Bake what a table cell's runs take from the source deck: size, and bold and italic where the
4306
+ * cell's table style states neither, from the master's `p:otherStyle` per paragraph level, and the
4307
+ * colour from the table style's text style, else `tx1`, resolved against the source theme. Each is
4308
+ * written wherever the run, its paragraph and the cell's own list style state none of it.
4300
4309
  *
4301
4310
  * Cell text resolves through `p:otherStyle`, not `p:defaultTextStyle` (`TableCell.textFrame`), and
4302
- * the rebind swaps the source master for the destination's, so without this a cell's text changes
4303
- * size between two decks whose masters differ there. PowerPoint's Keep Source Formatting paste
4304
- * writes nothing onto the cells; it keeps them on a copy of the source master instead
4305
- * (`test/read/fixtures/authoring/probe-table-text-paste.ps1`), which is the look this pins.
4311
+ * the rebind swaps the source master and theme for the destination's, so without this a cell's text
4312
+ * changes size and colour between two decks whose masters or themes differ. PowerPoint's Keep Source
4313
+ * Formatting paste writes nothing onto the cells; it keeps them on a copy of the source master
4314
+ * instead (`test/read/fixtures/authoring/probe-table-text-paste.ps1`), which is the look this pins.
4306
4315
  *
4307
- * The table style travels with the slide, so what it states is left to it. Where the table names a
4308
- * style the source does not define, a built-in PowerPoint draws from its own definition, and bold
4309
- * and italic are left alone because what that style states is unknown. A cell's colour and face do
4310
- * not come from `p:otherStyle` at all, so they are not visited.
4316
+ * Only the table's style id travels with the slide, and PowerPoint resolves that id against its own
4317
+ * built-in gallery, never a definition in the package. The source's `tableStyles.xml` says what the
4318
+ * style states, so bold and italic it states are left to it. Where the source does not define the
4319
+ * style, bold, italic and colour are left alone because what the style states is unknown. The face
4320
+ * re-binds to the destination theme, as it does for every other text tier.
4311
4321
  */
4312
4322
  function resolveTableCellRuns(root, ctx) {
4313
4323
  const txStyles = ctx.masterRoot ? firstChild(ctx.masterRoot, "p:txStyles") : null;
4314
4324
  const otherStyle = txStyles && firstChild(txStyles, "p:otherStyle");
4315
- if (!otherStyle) return;
4316
4325
  for (const tbl of descendantsByTag(root, OOXML_NS.a, "tbl")) {
4317
4326
  const tblPr = firstChild(tbl, "a:tblPr");
4318
4327
  const styleId = (tblPr && firstChild(tblPr, "a:tableStyleId"))?.textContent?.trim() || null;
@@ -4335,25 +4344,51 @@ function resolveTableCellRuns(root, ctx) {
4335
4344
  const txBody = firstChild(tc, "a:txBody");
4336
4345
  if (!txBody) return;
4337
4346
  const styled = style ? resolveTableCellTextStyle(style, flags, rowIndex, colIndex, rows.length, colCount, ctx) : null;
4347
+ const color = styleUnknown ? null : tableCellTextColor(styled, ownerDocumentOf(tbl), ctx);
4338
4348
  const cellLst = firstChild(txBody, "a:lstStyle");
4339
4349
  for (const p of getElements(txBody, "a:p")) {
4340
4350
  const runs = [...getElements(p, "a:r"), ...getElements(p, "a:fld")];
4341
4351
  if (runs.length === 0) continue;
4342
4352
  const pPr = firstChild(p, "a:pPr");
4343
4353
  const level = (pPr && numberValue(attr(pPr, "lvl"))) ?? 0;
4344
- const defRPr = lstStyleLevelDefRPr(otherStyle, level);
4345
- if (!defRPr) continue;
4354
+ const defRPr = otherStyle && lstStyleLevelDefRPr(otherStyle, level);
4346
4355
  const props = {
4347
- sz: attr(defRPr, "sz"),
4348
- b: styleUnknown || styled?.bold != null ? null : attr(defRPr, "b"),
4349
- i: styleUnknown || styled?.italic != null ? null : attr(defRPr, "i")
4356
+ sz: defRPr ? attr(defRPr, "sz") : null,
4357
+ b: !defRPr || styleUnknown || styled?.bold != null ? null : attr(defRPr, "b"),
4358
+ i: !defRPr || styleUnknown || styled?.italic != null ? null : attr(defRPr, "i")
4350
4359
  };
4351
- for (const run of runs) writeRunProps(run, props, pPr, cellLst, level);
4360
+ for (const run of runs) {
4361
+ writeRunProps(run, props, pPr, cellLst, level);
4362
+ if (color && !slideDefinesColor(run, pPr, cellLst, level)) writeRunColor(run, color);
4363
+ }
4352
4364
  }
4353
4365
  });
4354
4366
  });
4355
4367
  }
4356
4368
  }
4369
+ /**
4370
+ * The colour a cell's text paints on the source deck: what its table style's text style names,
4371
+ * else `tx1`, as `TableCell.textFrame` resolves it. The transforms are rebuilt as elements so
4372
+ * {@link writeRunColor} re-emits them.
4373
+ */
4374
+ function tableCellTextColor(styled, doc, ctx) {
4375
+ if (styled?.color) {
4376
+ const transforms = styled.color.transforms.map(({ name, value }) => {
4377
+ const t = createElement(doc, `a:${name}`);
4378
+ if (value !== null) setAttr(t, "val", value);
4379
+ return t;
4380
+ });
4381
+ return {
4382
+ hex: styled.color.hex,
4383
+ transforms
4384
+ };
4385
+ }
4386
+ const tx1 = resolveSchemeToken("tx1", ctx);
4387
+ return tx1 ? {
4388
+ hex: tx1,
4389
+ transforms: []
4390
+ } : null;
4391
+ }
4357
4392
  /** The source deck's `a:tblStyle` with this id, or `null` when the source defines none. */
4358
4393
  function sourceTableStyle(ctx, styleId) {
4359
4394
  if (!ctx.tableStyles) return null;
@@ -4847,7 +4882,7 @@ function carryMasterGraphics(ctx, slideRoot, newPartName, slidePartName, owned)
4847
4882
  /**
4848
4883
  * The partname of the layout this deck's slides should attach to in `preserve` mode: the
4849
4884
  * first layout of the first slide master. Throws when the deck has no master/layout to attach
4850
- * to (a deck ts-pptx always provides).
4885
+ * to (a deck pptx-ts always provides).
4851
4886
  * @param {Presentation} dest - the destination deck
4852
4887
  * @return {string} partname of the destination layout
4853
4888
  */
@@ -5905,4 +5940,4 @@ var Presentation = class Presentation {
5905
5940
  //#endregion
5906
5941
  export { Slide as a, NotesSlide as c, SlideMaster as d, Theme as f, ContentTypes as g, Part as h, readExtendedProperties as i, Placeholder as l, Relationships as m, readCoreProperties as n, readTagsForPart as o, OpcPackage as p, readCustomProperties as r, NotesPlaceholder as s, Presentation as t, SlideLayout as u };
5907
5942
 
5908
- //# sourceMappingURL=presentation-DGYlAWhl.js.map
5943
+ //# sourceMappingURL=presentation-Cyl74rq2.js.map