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,6 +1,6 @@
1
- import { i as PackageReadError, l as warn, n as InvalidOptionError, o as UnsupportedFeatureError, t as InternalError } from "./errors-C4oENPcu.js";
2
- import { F as EMU_PER_INCH, I as EMU_PER_POINT, P as ptToHundredths, b as FIXED_PCT_PER_PERCENT, k as emuToPoints, v as ANGLE_UNITS_PER_DEGREE, w as PERCENT_SCALE } from "./table-cell-margins-EVg0EwxT.js";
3
- import { $t as THEME_REL, E as EMBEDDED_FONT_SLOTS, Ft as OFFICE_DOCUMENT_REL, G as TEXT_HORZ_OVERFLOW, H as TEXT_ANCHORS, I as PRESET_LINE_DASHES, Jt as SLIDE_MASTER_REL, Kt as SLIDE_LAYOUT_REL, S as COLOR_MAP_TOKENS, V as SCHEME_COLOR_VALUES, X as TEXT_VERTICAL, Xt as TABLE_STYLES_CONTENT_TYPE, Y as TEXT_UNDERLINE_TYPES, Z as THEME_COLOR_SLOTS, c as checkEnumOrThrow, h as stripHash, in as OOXML_NS, jt as NOTES_MASTER_REL, on as TABLE_GRAPHIC_DATA_URI, p as isHexColor, pn as imageFormatForContentType, r as getImageSizeFromBytes, t as fitSrcRectPercents, u as boolValue, wt as IMAGE_REL } from "./image-size-CvN2iCA4.js";
1
+ import { i as PackageReadError, l as warn, n as InvalidOptionError, o as UnsupportedFeatureError, t as InternalError } from "./errors-Da2nXCJm.js";
2
+ import { F as EMU_PER_INCH, I as EMU_PER_POINT, P as ptToHundredths, b as FIXED_PCT_PER_PERCENT, k as emuToPoints, v as ANGLE_UNITS_PER_DEGREE, w as PERCENT_SCALE } from "./table-cell-margins-PDshga8T.js";
3
+ import { E as EMBEDDED_FONT_SLOTS, H as SCHEME_COLOR_VALUES, It as OFFICE_DOCUMENT_REL, K as TEXT_HORZ_OVERFLOW, L as PRESET_LINE_DASHES, Mt as NOTES_MASTER_REL, Q as THEME_COLOR_SLOTS, S as COLOR_MAP_TOKENS, Tt as IMAGE_REL, U as TEXT_ANCHORS, X as TEXT_UNDERLINE_TYPES, Yt as SLIDE_MASTER_REL, Z as TEXT_VERTICAL, Zt as TABLE_STYLES_CONTENT_TYPE, an as OOXML_NS, c as checkEnumOrThrow, en as THEME_REL, h as stripHash, mn as imageFormatForContentType, p as isHexColor, qt as SLIDE_LAYOUT_REL, r as getImageSizeFromBytes, sn as TABLE_GRAPHIC_DATA_URI, t as fitSrcRectPercents, u as boolValue } from "./image-size-DwDbakcl.js";
4
4
  import { DOMParser, MIME_TYPE, XMLSerializer, onErrorStopParsing } from "@xmldom/xmldom";
5
5
  /** Parse an XML string strictly: any well-formedness error throws. */
6
6
  function parseXml(xml) {
@@ -745,7 +745,7 @@ const TXBODY_AFTER_LSTSTYLE = successorsOf(TEXT_BODY_SEQUENCE, "a:lstStyle");
745
745
  * never hand-computes a tint/shade again.
746
746
  *
747
747
  * Colour-space model (verified against PowerPoint output — see
748
- * `test/read/color-transform.test.js`): the working colour is kept canonical as
748
+ * `test/read/color-transform.test.ts`): the working colour is kept canonical as
749
749
  * sRGB between transforms; each transform converts into the space its family
750
750
  * operates in, applies, and converts back to sRGB. Transforms apply in **document
751
751
  * order** (ECMA-376 §20.1.2.3).
@@ -1084,7 +1084,7 @@ function setSolidFill(parent, afterOrder, color) {
1084
1084
  *
1085
1085
  * This is spec data, not observed behaviour: the values come from the enumeration's own
1086
1086
  * documentation, and the table is asserted complete against the schema's 190-value list in
1087
- * `test/read/preset-color.test.js` — a name the reader cannot resolve is a hole in the table,
1087
+ * `test/read/preset-color.test.ts` — a name the reader cannot resolve is a hole in the table,
1088
1088
  * and that test is what finds it.
1089
1089
  */
1090
1090
  /**
@@ -1937,7 +1937,7 @@ function slideDefinesProp(name, run, pPr, slideLst, level) {
1937
1937
  //#endregion
1938
1938
  //#region src/read/api/coords.ts
1939
1939
  /**
1940
- * ts-pptx: units at the read model's boundary — validated on the way in, converted on the way out.
1940
+ * pptx-ts: units at the read model's boundary — validated on the way in, converted on the way out.
1941
1941
  *
1942
1942
  * Every read-side setter that takes a measurement has to answer the same two questions before
1943
1943
  * the value reaches an attribute: is it finite, and (for an extent) is it positive. `NaN` or
@@ -6287,9 +6287,11 @@ var Diagram = class {
6287
6287
  }
6288
6288
  /**
6289
6289
  * The point with this `@modelId`, or `null` — the lookup every connection getter implies,
6290
- * since a `DiagramConnection` names its ends by id and nothing else resolves them.
6290
+ * since a `DiagramConnection` names its ends by id and nothing else resolves them. Takes
6291
+ * `null`, as a connection end with no id reads, and misses on it.
6291
6292
  */
6292
6293
  point(modelId) {
6294
+ if (modelId === null) return null;
6293
6295
  return this.points.find((candidate) => candidate.modelId === modelId) ?? null;
6294
6296
  }
6295
6297
  /** Every edge (`dgm:cxnLst/dgm:cxn`) in document order. */
@@ -6989,7 +6991,7 @@ function resolveTableCellTextStyle(style, flags, row, col, rowCount, colCount, c
6989
6991
  * `CT_TableCellProperties` declares its children as a **sequence**, so an append-only
6990
6992
  * implementation produces an out-of-order `a:tcPr` — which PowerPoint reports as a corrupt
6991
6993
  * file rather than as a bad edit. Every insertion therefore goes through
6992
- * {@link getOrAddChild} / {@link insertInOrder} with the new element's *successors*, which is
6994
+ * {@link insertInOrder} with the new element's *successors*, which is
6993
6995
  * what `TCPR_AFTER` tabulates; it and the sequence it derives from live in
6994
6996
  * `src/ooxml/sequence.ts` alongside the other complexType orderings.
6995
6997
  *
@@ -8132,9 +8134,11 @@ function buildShapes(parent, host) {
8132
8134
  * pre-order so a group is visited before its children. Backs
8133
8135
  * {@link ShapeHost.shapeByIdDeep} on all three hosts — drawing ids are unique
8134
8136
  * within a part, so the first match is the only match and the walk order just
8135
- * fixes a deterministic one.
8137
+ * fixes a deterministic one. A `null` id, as a shape's `id` reads when it has
8138
+ * no `@id`, is a miss, not a match on the first shape that lacks one too.
8136
8139
  */
8137
8140
  function findShapeByIdDeep(shapes, id) {
8141
+ if (id === null) return void 0;
8138
8142
  for (const shape of shapes) {
8139
8143
  if (shape.id === id) return shape;
8140
8144
  if (shape instanceof GroupShape) {
@@ -8146,4 +8150,4 @@ function findShapeByIdDeep(shapes, id) {
8146
8150
  //#endregion
8147
8151
  export { placeholderInheritedColor as $, relsPartNameFor as $t, flattenAnimations as A, CSLD_AFTER_BG as At, readColorRef as B, SLIDE_AFTER_TRANSITION as Bt, ChartSeries as C, styleRefFill as Ct, Shape as D, presetColorHex as Dt, AutoShape as E, themeElementsOfRoot as Et, Paragraph as F, PRESENTATION_AFTER_SLD_ID_LST as Ft, resolveSlideColorContext as G, SPPR_LN_AFTER as Gt, resolveLayoutColorContext as H, SPPR_AFTER_XFRM as Ht, Run as I, PRESENTATION_AFTER_SLD_MASTER_ID_LST as It, checkPositiveEmu as J, TXBODY_AFTER_BODYPR as Jt, resolveSlideThemeParts as K, SPPR_SCENE3D_AFTER as Kt, readPatternFill as L, RPR_FILL_AFTER as Lt, pruneSpids as M, LN_SLOTS as Mt, remapSpids as N, PRESENTATION_AFTER_EMBEDDED_FONT_LST as Nt, carryShapeAnimations as O, hasFillChoice as Ot, TextFrame as P, PRESENTATION_AFTER_NOTES_MASTER_ID_LST as Pt, placeholderInheritedAnchor as Q, relativePartName as Qt, readPictureFill as R, RUN_AFTER_RPR as Rt, ChartAxis as S, resolveSchemeToken as St, Picture as T, substitutePhClr as Tt, resolveMasterColorContext as U, SPPR_EFFECT_AFTER as Ut, resolveColorElement as V, SLIDE_MASTER_AFTER_SLD_LAYOUT_ID_LST as Vt, resolveNotesColorContext as W, SPPR_FILL_AFTER as Wt, RUN_PROP_NAMES as X, partNameExtension as Xt, LST_STYLE_LEVELS as Y, TXBODY_AFTER_LSTSTYLE as Yt, lstStyleLevelDefRPr as Z, partNameToZipPath as Zt, DiagramPoint as _, parseXml as _n, isA as _t, isConnector as a, boolAttr as an, slideDefinesProp as at, ChartExSeries as b, serializeXml as bn, replaceColorElement as bt, isPicture as c, descendantsByTag as cn, carriedDecorations as ct, Table as d, getElements as dn, nextDrawingId as dt, resolveRelativePartName as en, placeholderInheritedListStyles as et, TableRow as f, getOrAddChild as fn, nthShapeChild as ft, DiagramNode as g, ownerDocumentOf as gn, fmtEntry as gt, Diagram as h, numberValue as hn, spTreeOf as ht, isAutoShape as i, attr as in, slideDefinesColor as it, hasAnimations as j, EMBEDDED_FONT_ENTRY_AFTER as jt, enumerateSpids as k, applyColorTransforms as kt, wrapShapeElement as l, firstChild as ln, collectElements as lt, resolveTableCellTextStyle as m, numberAttr as mn, reassignDrawingIds as mt, buildShapes as n, singleRelPart as nn, placeholderInheritedXfrm as nt, isGraphicFrame as o, childElements as on, cSldName as ot, TableCell as p, insertInOrder as pn, nvPrOf as pt, checkFiniteEmu as q, SPPR_SP3D_AFTER as qt, findShapeByIdDeep as r, zipPathToPartName as rn, placeholderOf as rt, isGroupShape as s, createElement as sn, cSldOf as st, GroupShape as t, resolveSingleRel as tn, placeholderInheritedRunProps as tt, GraphicFrame as u, firstChildElement as un, firstShapeChild as ut, ChartEx as v, removeAttr as vn, parseClrMap as vt, Connector as w, styleRefLine as wt, Chart as x, setAttr as xn, resolveColor as xt, ChartExAxis as y, removeChildrenByQName as yn, parseClrScheme as yt, readGradientFill as z, SHAPE_AFTER_SPPR as zt };
8148
8152
 
8149
- //# sourceMappingURL=shapes-re0KyQk_.js.map
8153
+ //# sourceMappingURL=shapes-BcyFdZpp.js.map