pptx-ts 4.1.0 → 4.1.1-next.100.g96a3845

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 (104) hide show
  1. package/README.md +7 -7
  2. package/dist/anim-presets-CF4p8mnd.js +56 -0
  3. package/dist/anim-presets-CF4p8mnd.js.map +1 -0
  4. package/dist/{autopage-D4kyVp11.js → autopage-8Pwh-jsI.js} +5 -5
  5. package/dist/{autopage-D4kyVp11.js.map → autopage-8Pwh-jsI.js.map} +1 -1
  6. package/dist/{body-insets-kVHmjGc6.js → body-insets-CRTz4dbM.js} +2 -2
  7. package/dist/{body-insets-kVHmjGc6.js.map → body-insets-CRTz4dbM.js.map} +1 -1
  8. package/dist/browser.d.ts +13 -9
  9. package/dist/browser.d.ts.map +1 -1
  10. package/dist/browser.js +11 -9
  11. package/dist/browser.js.map +1 -1
  12. package/dist/{image-size-DwDbakcl.js → chart-metadata-BC-SkQlO.js} +510 -460
  13. package/dist/chart-metadata-BC-SkQlO.js.map +1 -0
  14. package/dist/{clip-DHDlnHUq.d.ts → clip-BajRBqRR.d.ts} +2 -2
  15. package/dist/{clip-DHDlnHUq.d.ts.map → clip-BajRBqRR.d.ts.map} +1 -1
  16. package/dist/{notes-BcT571R4.js → comments-CXwp71GL.js} +384 -238
  17. package/dist/comments-CXwp71GL.js.map +1 -0
  18. package/dist/{diagnostics-DiMmBU8P.d.ts → diagnostics-KFkofYBc.d.ts} +35 -25
  19. package/dist/diagnostics-KFkofYBc.d.ts.map +1 -0
  20. package/dist/{embedded-fonts-CI_YGW2d.d.ts → embedded-fonts-Bzyulsbl.d.ts} +2 -2
  21. package/dist/{embedded-fonts-CI_YGW2d.d.ts.map → embedded-fonts-Bzyulsbl.d.ts.map} +1 -1
  22. package/dist/{entry-compose-6hF9aTmT.d.ts → entry-compose-BOzZ9J5K.d.ts} +11 -11
  23. package/dist/entry-compose-BOzZ9J5K.d.ts.map +1 -0
  24. package/dist/{errors-Da2nXCJm.js → entry-errors-BRMlRV9p.js} +29 -10
  25. package/dist/entry-errors-BRMlRV9p.js.map +1 -0
  26. package/dist/{table-cell-margins-PDshga8T.js → enums-BwXKwMmg.js} +23 -23
  27. package/dist/enums-BwXKwMmg.js.map +1 -0
  28. package/dist/families.d.ts +5 -5
  29. package/dist/families.d.ts.map +1 -1
  30. package/dist/families.js +2 -2
  31. package/dist/{fit-CcXbg__l.js → fit-vz5JxCtc.js} +24 -7
  32. package/dist/{fit-CcXbg__l.js.map → fit-vz5JxCtc.js.map} +1 -1
  33. package/dist/{font-metrics-CBGmhLo0.d.ts → font-metrics-CvghMPmL.d.ts} +34 -6
  34. package/dist/font-metrics-CvghMPmL.d.ts.map +1 -0
  35. package/dist/{grid-9B2w5EaY.js → grid-BPkvmUH2.js} +18 -19
  36. package/dist/grid-BPkvmUH2.js.map +1 -0
  37. package/dist/{html-dom-DvJmuHt2.js → html-dom-CQxFKgze.js} +6 -6
  38. package/dist/html-dom-CQxFKgze.js.map +1 -0
  39. package/dist/html.d.ts +4 -4
  40. package/dist/html.js +7 -7
  41. package/dist/html.js.map +1 -1
  42. package/dist/index.d.ts +12 -8
  43. package/dist/index.d.ts.map +1 -1
  44. package/dist/index.js +8 -6
  45. package/dist/index.js.map +1 -1
  46. package/dist/inspect.d.ts +2 -2
  47. package/dist/inspect.js +5 -5
  48. package/dist/{text-anchor-BgLPbwbL.js → lock-attrs-Bm6h1gdn.js} +56 -3
  49. package/dist/lock-attrs-Bm6h1gdn.js.map +1 -0
  50. package/dist/math.d.ts +2 -2
  51. package/dist/math.js +2 -2
  52. package/dist/measure.d.ts +4 -4
  53. package/dist/measure.js +3 -3
  54. package/dist/node.d.ts +12 -8
  55. package/dist/node.d.ts.map +1 -1
  56. package/dist/node.js +8 -6
  57. package/dist/node.js.map +1 -1
  58. package/dist/{pres-BA9_lJbY.d.ts → pres-3fR4qGHf.d.ts} +225 -57
  59. package/dist/pres-3fR4qGHf.d.ts.map +1 -0
  60. package/dist/{presentation-Cyl74rq2.js → presentation-C6-AaVOe.js} +181 -40
  61. package/dist/presentation-C6-AaVOe.js.map +1 -0
  62. package/dist/{presentation-types-B3VQH4Bz.d.ts → presentation-types-Q77szHWz.d.ts} +746 -53
  63. package/dist/presentation-types-Q77szHWz.d.ts.map +1 -0
  64. package/dist/read.d.ts +5 -5
  65. package/dist/read.js +4 -4
  66. package/dist/script.d.ts +59 -12
  67. package/dist/script.d.ts.map +1 -1
  68. package/dist/script.js +2470 -536
  69. package/dist/script.js.map +1 -1
  70. package/dist/{shapes-BcyFdZpp.js → shapes-CnR9BbfQ.js} +1191 -147
  71. package/dist/shapes-CnR9BbfQ.js.map +1 -0
  72. package/dist/{slide-BqPtyKmb.d.ts → slide-C4I0dA2b.d.ts} +29 -9
  73. package/dist/slide-C4I0dA2b.d.ts.map +1 -0
  74. package/dist/{table-dom-CVbvUfgh.js → table-dom-B2QpmHh-.js} +2 -2
  75. package/dist/{table-dom-CVbvUfgh.js.map → table-dom-B2QpmHh-.js.map} +1 -1
  76. package/dist/{text-BvFFMMFQ.js → text-DARib7Qq.js} +239 -136
  77. package/dist/text-DARib7Qq.js.map +1 -0
  78. package/dist/{units-internal-DFcUYjh3.js → units-internal-CKHeSXX2.js} +3 -3
  79. package/dist/{units-internal-DFcUYjh3.js.map → units-internal-CKHeSXX2.js.map} +1 -1
  80. package/dist/{zip-CYZ0F6BV.js → zip-Mtv-eFTc.js} +2 -2
  81. package/dist/{zip-CYZ0F6BV.js.map → zip-Mtv-eFTc.js.map} +1 -1
  82. package/dist/zip.d.ts +2 -2
  83. package/dist/zip.js +3 -3
  84. package/dist/{zoom-BoNyOlPm.js → zoom-CHCsn5_9.js} +370 -229
  85. package/dist/zoom-CHCsn5_9.js.map +1 -0
  86. package/package.json +10 -9
  87. package/skills/{ts-pptx-upstream → pptx-ts-upstream}/SKILL.md +9 -9
  88. package/dist/diagnostics-DiMmBU8P.d.ts.map +0 -1
  89. package/dist/entry-compose-6hF9aTmT.d.ts.map +0 -1
  90. package/dist/errors-Da2nXCJm.js.map +0 -1
  91. package/dist/font-metrics-CBGmhLo0.d.ts.map +0 -1
  92. package/dist/grid-9B2w5EaY.js.map +0 -1
  93. package/dist/html-dom-DvJmuHt2.js.map +0 -1
  94. package/dist/image-size-DwDbakcl.js.map +0 -1
  95. package/dist/notes-BcT571R4.js.map +0 -1
  96. package/dist/pres-BA9_lJbY.d.ts.map +0 -1
  97. package/dist/presentation-Cyl74rq2.js.map +0 -1
  98. package/dist/presentation-types-B3VQH4Bz.d.ts.map +0 -1
  99. package/dist/shapes-BcyFdZpp.js.map +0 -1
  100. package/dist/slide-BqPtyKmb.d.ts.map +0 -1
  101. package/dist/table-cell-margins-PDshga8T.js.map +0 -1
  102. package/dist/text-BvFFMMFQ.js.map +0 -1
  103. package/dist/text-anchor-BgLPbwbL.js.map +0 -1
  104. package/dist/zoom-BoNyOlPm.js.map +0 -1
package/README.md CHANGED
@@ -12,7 +12,7 @@
12
12
 
13
13
  ---
14
14
 
15
- [Install](#install) • [Quickstart](#quickstart) • [Read and edit](#read-and-edit-decks-too) • [Compare](#how-this-compares-with-pptxgenjs) • [Docs](https://shbernal.github.io/pptx-ts/)
15
+ [Quickstart](#quickstart) • [Read and edit](#read-and-edit-decks-too) • [Compare](#how-this-compares-with-pptxgenjs) • [Docs](https://shbernal.github.io/pptx-ts/)
16
16
 
17
17
  ---
18
18
 
@@ -69,9 +69,9 @@ Keynote, LibreOffice Impress and Google Slides import it on a best-effort basis.
69
69
  2. Save this as `hello.mts`:
70
70
 
71
71
  ```ts
72
- import TsPptx from "pptx-ts"
72
+ import PptxTs from "pptx-ts"
73
73
 
74
- const pptx = new TsPptx()
74
+ const pptx = new PptxTs()
75
75
  const slide = pptx.addSlide()
76
76
 
77
77
  slide.addText("Hello from pptx-ts", {
@@ -86,13 +86,13 @@ Keynote, LibreOffice Impress and Google Slides import it on a best-effort basis.
86
86
  await pptx.writeFile({ fileName: "hello.pptx" })
87
87
  ```
88
88
 
89
- 2. Run it. Node 24 strips the types itself, so there is no build step.
89
+ 3. Run it. Node 24 strips the types itself, so there is no build step.
90
90
 
91
91
  ```bash
92
92
  node hello.mts
93
93
  ```
94
94
 
95
- 3. Open `hello.pptx`.
95
+ 4. Open `hello.pptx`.
96
96
 
97
97
  Positions are in inches, from the top-left corner of a 10 by 5.625 inch slide.
98
98
  [Your first deck](docs/getting-started/first-deck.md) builds a four-slide report from an array, with a table, a chart and speaker notes.
@@ -138,7 +138,7 @@ pptx-ts builds those parts from your calls and zips them, with no Office process
138
138
  | --- | --- | --- |
139
139
  | Node.js 24 or later | `import`, or `require()` with the class on `.default` | writes to disk |
140
140
  | Browser, with a bundler | `import` | downloads the file |
141
- | Browser, no build step | `import TsPptx from "https://esm.sh/pptx-ts/browser"` | downloads the file |
141
+ | Browser, no build step | `import PptxTs from "https://esm.sh/pptx-ts/browser"` | downloads the file |
142
142
  | Deno, Bun, edge workers | `import` | throws; use `toBytes()` |
143
143
 
144
144
  [Where it runs](docs/getting-started/runtime.md) lists every entry point.
@@ -183,7 +183,7 @@ PptxGenJS](docs/comparison-syntax.md).
183
183
  Found a bug? [Open an issue](https://github.com/shbernal/pptx-ts/issues).
184
184
  Errors that are the library's fault print that link themselves.
185
185
 
186
- If an agent writes most of your code, install the `ts-pptx-upstream` skill that ships in the package.
186
+ If an agent writes most of your code, install the `pptx-ts-upstream` skill that ships in the package.
187
187
  It files a library defect the agent hits as an issue with a small reproduction, instead of a silent workaround.
188
188
  [CONTRIBUTING.md](CONTRIBUTING.md#the-skill-that-files-the-issue-for-you) has the install command.
189
189
 
@@ -0,0 +1,56 @@
1
+ //#region src/ooxml/anim-presets.ts
2
+ /** Every preset `addAnimation` writes. `satisfies` makes a preset added without a row a compile error. */
3
+ const ANIM_PRESET_IDENTITY = {
4
+ fadeIn: {
5
+ presetID: 10,
6
+ presetClass: "entr",
7
+ presetSubtype: 0,
8
+ defaultDurationMs: 500
9
+ },
10
+ flyIn: {
11
+ presetID: 2,
12
+ presetClass: "entr",
13
+ presetSubtype: 4,
14
+ defaultDurationMs: 500
15
+ },
16
+ appear: {
17
+ presetID: 1,
18
+ presetClass: "entr",
19
+ presetSubtype: 0,
20
+ defaultDurationMs: 500
21
+ },
22
+ wipe: {
23
+ presetID: 22,
24
+ presetClass: "entr",
25
+ presetSubtype: 4,
26
+ defaultDurationMs: 500
27
+ },
28
+ grow: {
29
+ presetID: 6,
30
+ presetClass: "emph",
31
+ presetSubtype: 0,
32
+ defaultDurationMs: 2e3
33
+ },
34
+ spin: {
35
+ presetID: 8,
36
+ presetClass: "emph",
37
+ presetSubtype: 0,
38
+ defaultDurationMs: 2e3
39
+ },
40
+ fadeOut: {
41
+ presetID: 10,
42
+ presetClass: "exit",
43
+ presetSubtype: 0,
44
+ defaultDurationMs: 500
45
+ },
46
+ flyOut: {
47
+ presetID: 2,
48
+ presetClass: "exit",
49
+ presetSubtype: 4,
50
+ defaultDurationMs: 500
51
+ }
52
+ };
53
+ //#endregion
54
+ export { ANIM_PRESET_IDENTITY as t };
55
+
56
+ //# sourceMappingURL=anim-presets-CF4p8mnd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"anim-presets-CF4p8mnd.js","names":[],"sources":["../src/ooxml/anim-presets.ts"],"sourcesContent":["/**\n * The build-animation presets `addAnimation` writes, by the identity PowerPoint gives each one in its\n * effect's `p:cTn` (`@presetClass`, `@presetID`, `@presetSubtype`) and the duration it takes when the\n * caller states none.\n *\n * `gen/anim/animation.ts` writes each preset from its row here, and `script/from-read/animation.ts`\n * recognises a read effect by the same row, so the two cannot disagree about which effect is which.\n *\n * This module keeps `ooxml/`'s no-runtime-imports property: the reference below is type-only.\n */\n\nimport type { PresetEffect } from '../types/animation.js'\n\n/** One preset's identity in the timing tree and its default duration. */\nexport interface AnimPresetIdentity {\n\tpresetID: number\n\tpresetClass: 'entr' | 'emph' | 'exit'\n\tpresetSubtype: number\n\tdefaultDurationMs: number\n}\n\n/** Every preset `addAnimation` writes. `satisfies` makes a preset added without a row a compile error. */\nexport const ANIM_PRESET_IDENTITY = {\n\tfadeIn: { presetID: 10, presetClass: 'entr', presetSubtype: 0, defaultDurationMs: 500 },\n\tflyIn: { presetID: 2, presetClass: 'entr', presetSubtype: 4, defaultDurationMs: 500 },\n\tappear: { presetID: 1, presetClass: 'entr', presetSubtype: 0, defaultDurationMs: 500 },\n\twipe: { presetID: 22, presetClass: 'entr', presetSubtype: 4, defaultDurationMs: 500 },\n\tgrow: { presetID: 6, presetClass: 'emph', presetSubtype: 0, defaultDurationMs: 2000 },\n\tspin: { presetID: 8, presetClass: 'emph', presetSubtype: 0, defaultDurationMs: 2000 },\n\tfadeOut: { presetID: 10, presetClass: 'exit', presetSubtype: 0, defaultDurationMs: 500 },\n\tflyOut: { presetID: 2, presetClass: 'exit', presetSubtype: 4, defaultDurationMs: 500 },\n} as const satisfies Record<PresetEffect, AnimPresetIdentity>\n"],"mappings":";;AAsBA,MAAa,uBAAuB;CACnC,QAAQ;EAAE,UAAU;EAAI,aAAa;EAAQ,eAAe;EAAG,mBAAmB;CAAI;CACtF,OAAO;EAAE,UAAU;EAAG,aAAa;EAAQ,eAAe;EAAG,mBAAmB;CAAI;CACpF,QAAQ;EAAE,UAAU;EAAG,aAAa;EAAQ,eAAe;EAAG,mBAAmB;CAAI;CACrF,MAAM;EAAE,UAAU;EAAI,aAAa;EAAQ,eAAe;EAAG,mBAAmB;CAAI;CACpF,MAAM;EAAE,UAAU;EAAG,aAAa;EAAQ,eAAe;EAAG,mBAAmB;CAAK;CACpF,MAAM;EAAE,UAAU;EAAG,aAAa;EAAQ,eAAe;EAAG,mBAAmB;CAAK;CACpF,SAAS;EAAE,UAAU;EAAI,aAAa;EAAQ,eAAe;EAAG,mBAAmB;CAAI;CACvF,QAAQ;EAAE,UAAU;EAAG,aAAa;EAAQ,eAAe;EAAG,mBAAmB;CAAI;AACtF"}
@@ -1,7 +1,7 @@
1
- import { l as warn } from "./errors-Da2nXCJm.js";
2
- import { C as usableTableWidthEmu, R as DEF_SLIDE_MARGIN_IN, _ as resolveCellMarginsInches, b as resolveTableColWidthsEmu, c as inch2Emu, d as marginToEmu, m as pinnedRowHeightInches, s as getSmartParseNumber, t as autoPageLineHeightEmu, y as resolveSlideMarginsInches } from "./units-internal-DFcUYjh3.js";
3
- import { F as EMU_PER_INCH } from "./table-cell-margins-PDshga8T.js";
4
- import { a as resolveSpan, n as tableColCount, r as walkTableGrid, s as withCheckedSpans } from "./grid-9B2w5EaY.js";
1
+ import { u as warn } from "./entry-errors-BRMlRV9p.js";
2
+ import { C as usableTableWidthEmu, R as DEF_SLIDE_MARGIN_IN, _ as resolveCellMarginsInches, b as resolveTableColWidthsEmu, c as inch2Emu, d as marginToEmu, m as pinnedRowHeightInches, s as getSmartParseNumber, t as autoPageLineHeightEmu, y as resolveSlideMarginsInches } from "./units-internal-CKHeSXX2.js";
3
+ import { F as EMU_PER_INCH } from "./enums-BwXKwMmg.js";
4
+ import { n as tableColCount, o as resolveSpan, r as walkTableGrid, s as withCheckedSpans } from "./grid-BPkvmUH2.js";
5
5
  //#region src/gen/table/autopage.ts
6
6
  /**
7
7
  * A cell for the pager's working grid, carrying the source cell's options only when it has some.
@@ -533,4 +533,4 @@ function getSlidesForTableRows(rows = [], tableProps = {}, presLayout, masterSli
533
533
  //#endregion
534
534
  export { getSlidesForTableRows as t };
535
535
 
536
- //# sourceMappingURL=autopage-D4kyVp11.js.map
536
+ //# sourceMappingURL=autopage-8Pwh-jsI.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"autopage-D4kyVp11.js","names":[],"sources":["../src/gen/table/autopage.ts"],"sourcesContent":["/**\n * pptx-ts: Table auto-paging core\n *\n * The DOM-independent heart of table generation: given rows that overflow a slide,\n * split them across as many slides as needed, measuring wrapped text to compute line\n * counts and row heights. `getSlidesForTableRows` is the in-memory core (fully\n * Node-testable); `parseTextToLines` is its private cell-wrapping helper.\n */\n\nimport { SlideObjectType } from '../../enums.js'\nimport { DEF_FONT_SIZE, DEF_SLIDE_MARGIN_IN } from '../../constants-internal.js'\nimport type { PresLayout, TableRowSlide, TableCellProps } from '../../types/index.js'\nimport type {\n\tSlideLayoutInternal,\n\tTableCellInternal,\n\tTableRowInternal,\n\tTableToSlidesPropsInternal,\n} from '../../types/internal.js'\nimport {\n\tautoPageLineHeightEmu,\n\tgetSmartParseNumber,\n\tinch2Emu,\n\tmarginToEmu,\n\tpinnedRowHeightInches,\n\tresolveCellMarginsInches,\n\tresolveSlideMarginsInches,\n\tresolveTableColWidthsEmu,\n\tusableTableWidthEmu,\n} from '../../units-internal.js'\nimport { warn } from '../../diagnostics.js'\nimport { type GridPlacement, tableColCount, walkTableGrid } from './grid.js'\nimport { resolveSpan, withCheckedSpans } from './spans.js'\nimport { EMU_PER_INCH, POINTS_PER_INCH } from '../../units.js'\n\ntype AutoPageCell = TableCellInternal & {\n\t_lineHeight: number\n\t_lines: TableCellInternal[][]\n\toptions: TableCellProps\n\ttext: TableCellInternal[]\n}\n\n/**\n * A cell for the pager's working grid, carrying the source cell's options only when it has some.\n *\n * Every one of these used to be an inline `{ …, options: cell.options }`, which put an `options`\n * key holding `undefined` on a cell whose source had none. Readers cannot see the difference —\n * they all go through `cell.options?.…` — but a `TableCellProps` bag *is* spread in\n * `gen/define/table.ts` (`{ ...colDef, ...headerRow, ...cell.options }`), where the two states\n * are not the same thing. So the model keeps one spelling of absent.\n * @param text - the cell's content, a string or the run list the pager is accumulating\n * @param options - the source cell's options, if it had any\n */\nfunction workingCell(text: string | TableCellInternal[], options: TableCellProps | undefined): TableCellInternal {\n\treturn options === undefined\n\t\t? { _type: SlideObjectType.tablecell, text }\n\t\t: { _type: SlideObjectType.tablecell, text, options }\n}\n\n// ===== Cell text wrapping =====\n\n/**\n * Break cell text into lines based upon table column width (e.g.: Magic Happens Here(tm))\n *\n * `charWeight` arrives as an argument rather than being read off `cell.options` because the\n * caller used to *stamp* it there: the table's weight was written onto the caller's own cell\n * options bag, or `delete`d from it when the table stated none. That mutated caller input --\n * which the chart path has a dedicated guard against -- and it made the option's precedence\n * differ by call site: the row-height probe read the cell's own value while the main loop had\n * just overwritten it with the table's. Both callers now resolve it the same way, and the more\n * specific statement wins, as it does everywhere else in this codebase.\n *\n * `fontSizePt` arrives resolved for the same reason. This read `cell.options.fontSize` or the\n * library default and never the table's `fontSize`, while the row's line height and the emitted\n * `sz` both used the table's. A table of 24pt text was wrapped as if it were 12pt, so the pager\n * counted about half the lines and rows ran off the bottom of each page.\n * @param {TableCellInternal} cell - table cell\n * @param {number} colWidth - table column width (inches)\n * @param {number} fontSizePt - resolved font size: the cell's, else the table's, else the default\n * @param {number} charWeight - resolved `autoPageCharWeight`: the cell's, else the table's, else 0\n * @param {boolean} [verbose] - dump the four wrapping stages; carries `addTable({ verbose })`\n * down, which is the only stage of the pager that flag did not reach\n * @return {TableRowInternal[]} - cell's text objects grouped into lines\n */\nfunction parseTextToLines(\n\tcell: TableCellInternal,\n\tcolWidth: number,\n\tfontSizePt: number,\n\tcharWeight: number,\n\tverbose?: boolean\n): TableCellInternal[][] {\n\t// FYI: CPL = Width / (font-size / font-constant)\n\t// FYI: CHAR:2.3, colWidth:10, fontSize:12 => CPL=138, (actual chars per line in PPT)=145 [14.5 CPI]\n\t// FYI: CHAR:2.3, colWidth:7 , fontSize:12 => CPL= 97, (actual chars per line in PPT)=100 [14.3 CPI]\n\t// FYI: CHAR:2.3, colWidth:9 , fontSize:16 => CPL= 96, (actual chars per line in PPT)=84 [ 9.3 CPI]\n\tconst FOCO = 2.3 + charWeight // Character Constant\n\t// `colWidth` is inches, so the column's width in points is `colWidth * 72`. This used to be\n\t// spelled `(colWidth / EMU_PER_POINT) * EMU_PER_INCH`, which is the same 72 with two EMU\n\t// constants that cancel -- except that the detour through EMU is not exact in binary floating\n\t// point, and `Math.floor` takes the hit. Over the 200,000 widths from 0.001in to 200in the two\n\t// forms disagree on 51, always by one point low: 6.625in is exactly 477 points, and the old\n\t// form floored 476.9999... to 476.\n\tconst CPL = Math.floor(colWidth * POINTS_PER_INCH) / (fontSizePt / FOCO) // Chars-Per-Line\n\n\t// The number the four dumps below exist to explain: every wrap decision in step 4 is\n\t// `strCurrLine.length + word.length > CPL`, so a wrap that looks wrong is almost always\n\t// a CPL that is wrong, and CPL is not recoverable from the lines themselves.\n\tif (verbose) console.log(`[0/4] colWidth=${colWidth}in fontSize=${fontSizePt} FOCO=${FOCO} CPL=${CPL}`)\n\n\tconst parsedLines: TableCellInternal[][] = []\n\tlet inputCells: TableCellInternal[] = []\n\tconst inputLines1: TableCellInternal[][] = []\n\tconst inputLines2: TableCellInternal[][] = []\n\n\t/**\n\t * EX INPUTS: `cell.text`\n\t * - string....: \"Account Name Column\"\n\t * - object....: { text:\"Account Name Column\" }\n\t * - object[]..: [{ text:\"Account Name\", options:{ bold:true } }, { text:\" Column\" }]\n\t * - object[]..: [{ text:\"Account Name\", options:{ breakLine:true } }, { text:\"Input\" }]\n\t */\n\n\t/**\n\t * EX OUTPUTS:\n\t * - string....: [{ text:\"Account Name Column\" }]\n\t * - object....: [{ text:\"Account Name Column\" }]\n\t * - object[]..: [{ text:\"Account Name\", options:{ breakLine:true } }, { text:\"Input\" }]\n\t * - object[]..: [{ text:\"Account Name\", options:{ breakLine:true } }, { text:\"Input\" }]\n\t */\n\n\t// STEP 1: Ensure inputCells is an array of TableCells\n\tif (cell.text && cell.text.toString().trim().length === 0) {\n\t\t// Allow a single space/whitespace as cell text (user-requested feature)\n\t\tinputCells.push({ _type: SlideObjectType.tablecell, text: ' ' })\n\t} else if (typeof cell.text === 'number' || typeof cell.text === 'string') {\n\t\tinputCells.push({ _type: SlideObjectType.tablecell, text: (cell.text || '').toString().trim() })\n\t} else if (Array.isArray(cell.text)) {\n\t\tinputCells = cell.text\n\t}\n\tif (verbose) {\n\t\tconsole.log('[1/4] inputCells')\n\t\tinputCells.forEach((cell, idx) => console.log(`[1/4] [${idx + 1}] cell: ${JSON.stringify(cell)}`))\n\t}\n\n\t// STEP 2: Group table cells into lines based on \"\\n\" or `breakLine` prop\n\t/**\n\t * - EX: `[{ text:\"Input Output\" }, { text:\"Extra\" }]` == 1 line\n\t * - EX: `[{ text:\"Input\" }, { text:\"Output\", options:{ breakLine:true } }]` == 1 line\n\t * - EX: `[{ text:\"Input\\nOutput\" }]` == 2 lines\n\t * - EX: `[{ text:\"Input\", options:{ breakLine:true } }, { text:\"Output\" }]` == 2 lines\n\t */\n\tlet newLine: TableCellInternal[] = []\n\tinputCells.forEach((cell) => {\n\t\tif (typeof cell.text !== 'string') return\n\n\t\tif (cell.text.includes('\\n')) {\n\t\t\t// Each non-last \\n-split part ends with a forced paragraph break; the last\n\t\t\t// part accumulates in newLine so subsequent runs stay on the same paragraph.\n\t\t\tconst parts = cell.text.split('\\n')\n\t\t\tparts.forEach((part, partIdx) => {\n\t\t\t\tconst isLastPart = partIdx === parts.length - 1\n\t\t\t\tif (isLastPart) {\n\t\t\t\t\tnewLine.push(workingCell(part, cell.options))\n\t\t\t\t} else {\n\t\t\t\t\tnewLine.push({\n\t\t\t\t\t\t_type: SlideObjectType.tablecell,\n\t\t\t\t\t\ttext: part,\n\t\t\t\t\t\toptions: { ...cell.options, breakLine: true },\n\t\t\t\t\t})\n\t\t\t\t\tinputLines1.push(newLine)\n\t\t\t\t\tnewLine = []\n\t\t\t\t}\n\t\t\t})\n\t\t} else {\n\t\t\tnewLine.push(workingCell(cell.text.trim(), cell.options))\n\t\t}\n\n\t\tif (cell.options?.breakLine) {\n\t\t\tif (verbose) console.log(`inputCells: new line > ${JSON.stringify(newLine)}`)\n\t\t\tinputLines1.push(newLine)\n\t\t\tnewLine = []\n\t\t}\n\t})\n\t// Flush remaining buffer after all cells are processed\n\tif (newLine.length > 0) {\n\t\tinputLines1.push(newLine)\n\t\tnewLine = []\n\t}\n\tif (verbose) {\n\t\tconsole.log(`[2/4] inputLines1 (${inputLines1.length})`)\n\t\tinputLines1.forEach((line, idx) => console.log(`[2/4] [${idx + 1}] line: ${JSON.stringify(line)}`))\n\t}\n\n\t// STEP 3: Tokenize every text object into words. All runs of one logical paragraph\n\t// are flattened into a single token list so step 4 tracks column position across\n\t// styled-run boundaries (fixes independent-reset bug for rich-text cells).\n\tinputLines1.forEach((line) => {\n\t\tconst lineTokens: TableCellInternal[] = []\n\t\tline.forEach((cell) => {\n\t\t\tconst cellTextStr = String(cell.text) // force convert to string (compiled JS is better with this than a cast)\n\t\t\tconst lineWords = cellTextStr.split(' ')\n\n\t\t\tlineWords.forEach((word, idx) => {\n\t\t\t\tconst cellProps = { ...cell.options }\n\t\t\t\t// IMPORTANT: Handle `breakLine` prop - we cannot apply to each word - only apply to very last word!\n\t\t\t\tif (cellProps?.breakLine) cellProps.breakLine = idx + 1 === lineWords.length\n\t\t\t\tlineTokens.push({\n\t\t\t\t\t_type: SlideObjectType.tablecell,\n\t\t\t\t\ttext: word + (idx + 1 < lineWords.length ? ' ' : ''),\n\t\t\t\t\toptions: cellProps,\n\t\t\t\t})\n\t\t\t})\n\t\t})\n\t\tinputLines2.push(lineTokens)\n\t})\n\tif (verbose) {\n\t\tconsole.log(`[3/4] inputLines2 (${inputLines2.length})`)\n\t\tinputLines2.forEach((line) => console.log(`[3/4] line: ${JSON.stringify(line)}`))\n\t}\n\n\t// STEP 4: Group cells/words into lines based upon space consumed by word letters\n\tinputLines2.forEach((line) => {\n\t\tlet lineCells: TableCellInternal[] = []\n\t\tlet strCurrLine = ''\n\n\t\tline.forEach((word) => {\n\t\t\tconst wordText = String(word.text || '')\n\t\t\t// A: create new line when horizontal space is exhausted.\n\t\t\t// `lineCells.length > 0` is the same guard the flush below carries, and for the same\n\t\t\t// reason: on the first word `strCurrLine` is `''`, so a word wider than the column on\n\t\t\t// its own fires this branch with nothing buffered and used to push an EMPTY line. The\n\t\t\t// cell's text survived -- the pager concatenates lines back together -- but its height\n\t\t\t// did not, because `_lines.length` is what prices the row. Twelve single-word rows in a\n\t\t\t// 0.4in column paged onto two slides when the word was long and one when it was short.\n\t\t\t// The word still overflows its column: nothing here breaks inside a word, which is the\n\t\t\t// stated behaviour rather than a gap (`docs/contributing/design/tables.md`). A hard\n\t\t\t// break would have to land at the `CPL` estimate, which is not where the renderer wraps,\n\t\t\t// and would then have to keep `_lines.length` and the emitted text in step -- the exact\n\t\t\t// pairing the phantom-line bug above got wrong.\n\t\t\tif (strCurrLine.length + wordText.length > CPL) {\n\t\t\t\tif (lineCells.length > 0) parsedLines.push(lineCells)\n\t\t\t\tlineCells = []\n\t\t\t\tstrCurrLine = ''\n\t\t\t}\n\n\t\t\t// B: add current word to line cells\n\t\t\tlineCells.push(word)\n\n\t\t\t// C: add current word to `strCurrLine` which we use to keep track of line's char length\n\t\t\tstrCurrLine += wordText\n\t\t})\n\n\t\t// Flush buffer: Only create a line when there's text to avoid empty row\n\t\tif (lineCells.length > 0) parsedLines.push(lineCells)\n\t})\n\tif (verbose) {\n\t\tconsole.log(`[4/4] parsedLines (${parsedLines.length})`)\n\t\tparsedLines.forEach((line, idx) => console.log(`[4/4] [Line ${idx + 1}]:\\n${JSON.stringify(line)}`))\n\t\tconsole.log('...............................................\\n\\n')\n\t}\n\n\t// Done:\n\treturn parsedLines\n}\n\n/**\n * The font size in points one auto-paged cell is measured at: the cell's own `fontSize`,\n * else the table's, else the library default. Pass `null` for the cell to ask the same\n * question of the table alone.\n */\nfunction resolveCellFontSize(\n\tcellOpts: TableCellProps | undefined | null,\n\ttableOpts: TableToSlidesPropsInternal\n): number {\n\tconst size = cellOpts?.fontSize ?? tableOpts.fontSize\n\treturn typeof size === 'number' ? size : DEF_FONT_SIZE\n}\n\n/**\n * The `autoPageCharWeight` a cell wraps at: its own, else the table's, else none.\n *\n * The sibling of {@link resolveCellFontSize}, and named for the same reason -- the two call\n * sites of {@link parseTextToLines} had resolved this one differently. The row-height probe\n * read the cell's own value; the main loop stamped the table's over it first, and `delete`d the\n * cell's when the table stated none, so a weight set on a cell alone was accepted and dropped.\n * The precedence here is the one every other paired option in this codebase uses.\n * @param cellOpts - the cell's own options, if any\n * @param tableOpts - the table's options\n */\nfunction resolveCellCharWeight(\n\tcellOpts: TableCellProps | undefined | null,\n\ttableOpts: TableToSlidesPropsInternal\n): number {\n\tconst weight = cellOpts?.autoPageCharWeight ?? tableOpts.autoPageCharWeight\n\treturn typeof weight === 'number' ? weight : 0\n}\n\n// ===== Auto-page engine =====\n// The in-memory core (fully Node-testable). Internally signposted by the\n// `// STEP 1..7` markers below: margins → column count → widths → the main\n// row-iteration/overflow loop (STEP 6) → final-slide flush (STEP 7).\n\n/**\n * The largest top and bottom cell margin in one row, in EMU.\n *\n * A cell's own `margin` wins over the table's when it states one, and a stated `0` counts as\n * stating one. Both sites that read this gated on truthiness and on `Array.isArray`, so a cell\n * asking for `margin: [0, …]` fell through to the table's margin instead of taking its own, and\n * a scalar `margin: 0.2` was not seen at all -- while the emitter broadcasts a scalar to four\n * sides. `resolveCellMarginsInches` is the resolver the emitter itself reads.\n * @param row - the row's cells\n * @param tableProps - the table's options, for the fallback margin\n * @returns the row's top and bottom margin allowance in EMU\n */\nfunction rowMarginsEmu(\n\trow: TableRowInternal,\n\ttableProps: TableToSlidesPropsInternal\n): { topEmu: number; btmEmu: number } {\n\tlet topEmu = 0\n\tlet btmEmu = 0\n\trow.forEach((cell) => {\n\t\tconst stated = cell?.options?.margin ?? tableProps.margin\n\t\tif (stated === undefined || stated === null) return\n\t\tconst [top, , btm] = resolveCellMarginsInches(stated)\n\t\tif (marginToEmu(top) > topEmu) topEmu = marginToEmu(top)\n\t\tif (marginToEmu(btm) > btmEmu) btmEmu = marginToEmu(btm)\n\t})\n\treturn { topEmu, btmEmu }\n}\n\n/** One row, measured: each cell's wrapped lines and what the row costs a page. */\ninterface MeasuredRow {\n\t/** One working cell per source cell, in row order, carrying its lines and its line height. */\n\tcells: AutoPageCell[]\n\t/** The row's tallest top margin plus its tallest bottom margin, in EMU. */\n\tmarginsEmu: number\n\t/** The tallest line height among the cells that do not span rows, in EMU. */\n\tlineHeightEmu: number\n\t/** The whole row: its margins plus its tallest cell's line count at `lineHeightEmu`. */\n\theightEmu: number\n}\n\n/**\n * Takes an array of table rows and breaks into an array of slides, which contain the calculated amount of table rows that fit on that slide\n * @param {TableCellInternal[][]} tableRows - table rows\n * @param {TableToSlidesPropsInternal} tableProps - table2slides properties\n * @param {PresLayout} presLayout - presentation layout\n * @param {SlideLayoutInternal} masterSlide - master slide\n * @return {TableRowSlide[]} array of table rows\n */\nexport function getSlidesForTableRows(\n\trows: TableCellInternal[][] = [],\n\ttableProps: TableToSlidesPropsInternal = {},\n\tpresLayout: PresLayout,\n\tmasterSlide?: SlideLayoutInternal | null\n): TableRowSlide[] {\n\t// `MAX_TABLE_SPAN` guards the two allocations a span decides, and its own module says it\n\t// covers both paths -- but `tableToSlides` reaches this function directly, without the\n\t// definer that applies the check, and its own `gridSpan` has no ceiling. So a\n\t// `colspan=\"4000000000\"` in a source table reached the column walk and the per-column depth\n\t// array, which is the allocation that takes the host process down with no exception to catch.\n\t// Checking here rather than at the call site keeps the one entry point guarded whoever calls\n\t// it; a grid whose spans are all fine is passed through by identity.\n\tconst tableRows = withCheckedSpans(rows)\n\tlet arrInchMargins = DEF_SLIDE_MARGIN_IN\n\tlet emuSlideTabW: number\n\tlet colWidthsIn: number[] = []\n\tlet emuSlideTabH = EMU_PER_INCH * 1\n\tlet emuTabCurrH = 0\n\tlet numCols = 0\n\tlet warnedNoTabH = false\n\tconst tableRowSlides: TableRowSlide[] = []\n\tconst tablePropX = getSmartParseNumber(tableProps.x, 'X', presLayout)\n\tconst tablePropY = getSmartParseNumber(tableProps.y, 'Y', presLayout)\n\tconst tablePropW = getSmartParseNumber(tableProps.w, 'X', presLayout)\n\tconst tablePropH = getSmartParseNumber(tableProps.h, 'Y', presLayout)\n\tlet tableCalcW: number = tablePropW\n\n\t/**\n\t * Where this page's table starts, in EMU from the top of the slide.\n\t *\n\t * There used to be three rules for two cases. The first page and \"every page after it\"\n\t * were handled together, then a block gated on `tableRowSlides.length > 1` overrode the\n\t * result -- so despite its own comment it began on the THIRD page, and its first arm\n\t * recomputed exactly what had just been computed. Page 2 therefore got a different usable\n\t * height from pages 3 and up: with `y` above the top margin and an explicit `h`, a\n\t * 60-row table paged 9 / 7 / 9 / 9 / 9 / 9 / 8, which is the same \"pages disagree about\n\t * how many identical rows fit\" symptom the margin-reset note in `calcSlideTabH` records.\n\t *\n\t * It is a function rather than two expressions because the too-small-height fallback in\n\t * `calcSlideTabH` had spelled the continuation arm its own way and drifted the same way\n\t * twice over: `autoPageSlideStartY || margin` discarded an explicit `0` that the main rule\n\t * honoured, and the `Math.min` clause below was missing outright. Two readings of one rule\n\t * is what the paragraph above is about; there is now one.\n\t */\n\tfunction startYEmu(): number {\n\t\t// A stated `y: 0` is the top edge of the slide, not a missing `y`: tested for truthiness, it\n\t\t// was budgeted from the top margin while `addTable` placed the page at 0.\n\t\tconst statedY = tableProps.y !== undefined && tableProps.y !== null\n\t\tif (tableRowSlides.length === 0) return statedY ? tablePropY : inch2Emu(arrInchMargins[0])\n\t\tif (typeof tableProps.autoPageSlideStartY === 'number') return inch2Emu(tableProps.autoPageSlideStartY)\n\t\t// RULE: after the first page the table starts at the top margin rather than at its\n\t\t// own `y` -- unless `y` is ABOVE the margin, in which case paging must not push the\n\t\t// table down and lose the space. Whichever is higher on the slide wins.\n\t\treturn inch2Emu(statedY ? Math.min(tablePropY / EMU_PER_INCH, arrInchMargins[0]) : arrInchMargins[0])\n\t}\n\n\tfunction calcSlideTabH(): void {\n\t\tconst emuStartY = startYEmu()\n\t\temuSlideTabH = (tablePropH || presLayout.height) - emuStartY - inch2Emu(arrInchMargins[2])\n\t\t// EXPLICIT-H FIX: an explicit `h` is the table's height (an extent), not a bottom\n\t\t// coordinate, so -- unlike `presLayout.height` -- the start-Y must not be subtracted from\n\t\t// it. Otherwise a table that begins mid-slide gets a tiny page while the pages that do\n\t\t// clamp to `h` render normally. Applied on every page: the floor used to reach the first\n\t\t// page and pages three and up, leaving page two as the one that could shrink below `h`.\n\t\tif (tablePropH && emuSlideTabH < tablePropH) emuSlideTabH = tablePropH\n\n\t\t// GUARD: a non-positive height, or one too small to fit even a single line of the base font,\n\t\t// means no row ever fits. That previously emitted degenerate empty overflow pages (rows:[]),\n\t\t// which made the recursive addTable throw \"Array expected\", or — with `h` smaller than one\n\t\t// line — placed one row per slide forever. Ignore the unusable height, fall back to the full\n\t\t// slide area between margins, and warn once rather than emit a broken table.\n\t\tconst emuBaseLineH = autoPageLineHeightEmu(\n\t\t\tresolveCellFontSize(null, tableProps),\n\t\t\ttableProps.autoPageLineWeight || 0\n\t\t)\n\t\tif (emuSlideTabH < emuBaseLineH) {\n\t\t\tconst fallbackH = presLayout.height - startYEmu() - inch2Emu(arrInchMargins[2])\n\t\t\tif (!warnedNoTabH) {\n\t\t\t\twarn(\n\t\t\t\t\t'table/autopage-height-too-small',\n\t\t\t\t\t'addTable/autoPage: the table height (`h`) leaves no room to paginate; ignoring it and using the slide height. Increase `h` or decrease `y`.'\n\t\t\t\t)\n\t\t\t\twarnedNoTabH = true\n\t\t\t}\n\t\t\temuSlideTabH = fallbackH > 0 ? fallbackH : presLayout.height\n\t\t}\n\t}\n\n\tif (tableProps.verbose) {\n\t\tconsole.log('[[VERBOSE MODE]]')\n\t\tconsole.log('|-- TABLE PROPS --------------------------------------------------------|')\n\t\tconsole.log(`| presLayout.width ................................ = ${(presLayout.width / EMU_PER_INCH).toFixed(1)}`)\n\t\tconsole.log(\n\t\t\t`| presLayout.height ............................... = ${(presLayout.height / EMU_PER_INCH).toFixed(1)}`\n\t\t)\n\t\tconsole.log(\n\t\t\t`| tableProps.x .................................... = ${typeof tableProps.x === 'number' ? (tableProps.x / EMU_PER_INCH).toFixed(1) : tableProps.x}`\n\t\t)\n\t\tconsole.log(\n\t\t\t`| tableProps.y .................................... = ${typeof tableProps.y === 'number' ? (tableProps.y / EMU_PER_INCH).toFixed(1) : tableProps.y}`\n\t\t)\n\t\tconsole.log(\n\t\t\t`| tableProps.w .................................... = ${typeof tableProps.w === 'number' ? (tableProps.w / EMU_PER_INCH).toFixed(1) : tableProps.w}`\n\t\t)\n\t\tconsole.log(\n\t\t\t`| tableProps.h .................................... = ${typeof tableProps.h === 'number' ? (tableProps.h / EMU_PER_INCH).toFixed(1) : tableProps.h}`\n\t\t)\n\t\tconsole.log(\n\t\t\t`| tableProps.slideMargin .......................... = ${tableProps.slideMargin ? String(tableProps.slideMargin) : ''}`\n\t\t)\n\t\tconsole.log(`| tableProps.margin ............................... = ${String(tableProps.margin)}`)\n\t\tconsole.log(`| tableProps.colW ................................. = ${String(tableProps.colW)}`)\n\t\tconsole.log(`| tableProps.autoPageSlideStartY .................. = ${tableProps.autoPageSlideStartY}`)\n\t\tconsole.log(`| tableProps.autoPageCharWeight ................... = ${tableProps.autoPageCharWeight}`)\n\t\tconsole.log('|-- CALCULATIONS -------------------------------------------------------|')\n\t\tconsole.log(`| tablePropX ...................................... = ${tablePropX / EMU_PER_INCH}`)\n\t\tconsole.log(`| tablePropY ...................................... = ${tablePropY / EMU_PER_INCH}`)\n\t\tconsole.log(`| tablePropW ...................................... = ${tablePropW / EMU_PER_INCH}`)\n\t\tconsole.log(`| tablePropH ...................................... = ${tablePropH / EMU_PER_INCH}`)\n\t\tconsole.log(`| tableCalcW ...................................... = ${tableCalcW / EMU_PER_INCH}`)\n\t}\n\n\t// STEP 1: Calculate margins\n\t{\n\t\t// The caller's value goes through unaltered, including an absent one: `resolveSlideMarginsInches`\n\t\t// owns all three tiers, and defaulting to `DEF_SLIDE_MARGIN_IN[0]` here handed it a stated\n\t\t// caller margin that no caller had stated, which suppressed the master's own `margin`.\n\t\tarrInchMargins = resolveSlideMarginsInches(masterSlide?._margin, tableProps.slideMargin)\n\n\t\tif (tableProps.verbose)\n\t\t\tconsole.log(`| arrInchMargins .................................. = [${arrInchMargins.join(', ')}]`)\n\t}\n\n\t// STEP 2: Calculate number of columns\n\t{\n\t\tnumCols = tableColCount(tableRows)\n\t\tif (tableProps.verbose) console.log(`| numCols ......................................... = ${numCols}`)\n\t}\n\n\t// Where every cell actually lands. The pager asks the grid two questions -- which columns a\n\t// cell spans, so its text is wrapped against the right width, and whether a rowspan opened\n\t// on an earlier row is still open here, so a page break does not split a merged group -- and\n\t// it used to answer both with its own occupancy array, once forwards through the row and\n\t// once again after it. `walkTableGrid` is the traversal the measured-fit pass and the\n\t// emitter's own grid build follow, so the widths this pager wraps against are the widths the\n\t// cells are finally given.\n\tconst placements: GridPlacement[][] = tableRows.map(() => [])\n\t/**\n\t * How many of each row's grid columns are held by a rowspan opened ABOVE it, accumulated as\n\t * the placements arrive rather than searched for afterwards.\n\t *\n\t * The question used to be answered by scanning every placement in the table, once per row,\n\t * which is quadratic in a table of any width. Two columns of short text and no spans at all:\n\t * 1000 rows took 55ms, 2000 took 115ms, 4000 took 333ms and 8000 took 1036ms. The same four\n\t * now take 24ms, 19ms, 40ms and 83ms -- so it was pure overhead, paid in full by the long\n\t * report table that is the whole reason this code exists.\n\t *\n\t * Filling forward instead is bounded by the placement's own `rowSpan`, so the total work is\n\t * the sum of all rowspans. That is safe to expand without a further check because\n\t * `walkTableGrid` has already clamped each `rowSpan` to `rows.length - r`: a span cannot\n\t * reach past the last row however large the caller wrote it, so the sum is bounded by the\n\t * grid rather than by anything the caller states.\n\t *\n\t * The fill starts at `row + 1`. A `rowSpan` of 1 must contribute nothing -- starting at\n\t * `row` would have every ordinary row counting itself as covered, and the\n\t * `coveredFromAbove(iRow) === numCols` reader below would then fire on all of them.\n\t */\n\tconst coveredCols: number[] = Array.from({ length: tableRows.length }, () => 0)\n\tfor (const placement of walkTableGrid(tableRows, numCols)) {\n\t\tplacements[placement.row]?.push(placement)\n\t\tconst last = Math.min(placement.row + placement.rowSpan, coveredCols.length)\n\t\tfor (let r = placement.row + 1; r < last; r++) coveredCols[r] = (coveredCols[r] ?? 0) + placement.colSpan\n\t}\n\t/** How many of `iRow`'s grid columns are held by a rowspan opened above it. */\n\tconst coveredFromAbove = (iRow: number): number => coveredCols[iRow] ?? 0\n\t/** Whether a rowspan opened above `iRow` is still covering it. */\n\tconst spannedFromAbove = (iRow: number): boolean => coveredFromAbove(iRow) > 0\n\n\t// STEP 3: Calculate width using tableProps.colW if possible. Only an array reaches here:\n\t// `addTableDefinition` turns a single `colW` into `w` before paging, and `tableToSlides` always\n\t// passes one width per column.\n\tif (!tablePropW && Array.isArray(tableProps.colW)) {\n\t\t// The `0` seed is what `colW: []` needs: an empty array is truthy, so it reached an\n\t\t// unseeded `reduce` and threw a raw `TypeError` — a failure this library did not raise as\n\t\t// a `TsPptxError`. Seeded, it totals `0`, which falls through to `usableTableWidthEmu`\n\t\t// exactly where `colW: undefined` lands. That is the reading intended: an empty array is a\n\t\t// caller stating no columns, not a table of width zero.\n\t\ttableCalcW = tableProps.colW.reduce((p, n) => p + n, 0) * EMU_PER_INCH\n\t\tif (tableProps.verbose)\n\t\t\tconsole.log(`| tableCalcW ...................................... = ${tableCalcW / EMU_PER_INCH}`)\n\t}\n\n\t// STEP 4: Calculate usable width now that total usable space is known (`emuSlideTabW`)\n\t{\n\t\temuSlideTabW = tableCalcW || usableTableWidthEmu(presLayout, tablePropX, arrInchMargins)\n\t\tif (tableProps.verbose)\n\t\t\tconsole.log(`| emuSlideTabW .................................... = ${(emuSlideTabW / EMU_PER_INCH).toFixed(1)}`)\n\t}\n\n\t// STEP 5: Resolve the column grid. `resolveTableColWidthsEmu` is the same resolver the\n\t// table emitter and the measured-fit pass read, so the widths this pager wraps text\n\t// against are the widths the emitted `<a:gridCol>`s carry. It also normalizes the array\n\t// to `numCols`: a short `colW` used to leave the trailing columns measuring against a\n\t// zero width. Inches, because that is the unit each paged table's `colW` takes; the grid\n\t// rides out on every `TableRowSlide` rather than being written back onto the caller's bag.\n\tcolWidthsIn = resolveTableColWidthsEmu(tableProps.colW, emuSlideTabW, numCols).map(\n\t\t(emu: number) => emu / EMU_PER_INCH\n\t)\n\n\t// Resolve a row's explicit height (inches) from the original `rowH` *array*, keyed by original\n\t// row index. A single-number `rowH` is left to propagate via table options (it applies uniformly,\n\t// so it needs no per-row remapping); only the array form is index-sensitive after pagination.\n\t// Whether a slot pins its row is `pinnedRowHeightInches`, the same rule the writer applies to\n\t// the array this builds — a `0` accepted here and rejected there is how the two readings drift.\n\tconst resolveRowH = (origRowIdx: number): number | undefined =>\n\t\tArray.isArray(tableProps.rowH) ? (pinnedRowHeightInches(tableProps.rowH[origRowIdx]) ?? undefined) : undefined\n\n\t/**\n\t * Wrap each of row `iRow`'s cells against the grid columns it covers, and price the row.\n\t *\n\t * The one row measure. The repeated header rows used to be priced by a second copy of it with its\n\t * own column cursor, which ignored the columns a rowspan holds -- the fault `walkTableGrid`\n\t * fixed for the main loop -- and skipped the line-height exemption for a cell that spans rows,\n\t * so a header row inside a rowspan was measured against the wrong columns.\n\t * @param iRow - the row's index in `tableRows`\n\t * @param verbose - dump the wrapping stages, as `addTable({ verbose })` asks\n\t */\n\tfunction measureRow(iRow: number, verbose?: boolean): MeasuredRow {\n\t\tconst row = tableRows[iRow] ?? []\n\t\tconst { topEmu, btmEmu } = rowMarginsEmu(row, tableProps)\n\t\t// Cells are keyed to grid columns, not to their position in the row: a colspan earlier in\n\t\t// the row shifts every later cell, and a rowspan opened above skips columns entirely.\n\t\t// Measuring a cell against `colW[iCell]` wrapped its text to another column's width.\n\t\tconst rowPlacements = placements[iRow] ?? []\n\t\tconst cells = row.map((cell, iCell): AutoPageCell => {\n\t\t\t// A row longer than the grid runs off the end of it: those cells are placed nowhere\n\t\t\t// and measure against no column, which is what the cursor did by clamping.\n\t\t\tconst placed = rowPlacements[iCell]\n\t\t\tconst colStart = placed ? placed.col : numCols\n\t\t\tconst cellColspan = placed ? placed.colSpan : resolveSpan(cell.options?.colspan, 'colspan')\n\t\t\t// A spanning cell is as wide as the columns it covers; the seed keeps a row longer than\n\t\t\t// the grid from throwing on an empty slice.\n\t\t\tconst totalColW = colWidthsIn.slice(colStart, colStart + cellColspan).reduce((prev, curr) => prev + curr, 0)\n\t\t\tconst fontSizePt = resolveCellFontSize(cell.options, tableProps)\n\t\t\treturn {\n\t\t\t\t_type: SlideObjectType.tablecell,\n\t\t\t\t_lines: parseTextToLines(cell, totalColW, fontSizePt, resolveCellCharWeight(cell.options, tableProps), verbose),\n\t\t\t\t// A cell that spans rows adds no line height to this one (or a page could break where\n\t\t\t\t// nothing needed it to). The grid's clamped span decides, not the option: `rowspan: 1`\n\t\t\t\t// is a valid \"no span\" that `withCheckedSpans` passes through, and testing the option\n\t\t\t\t// priced every such row at its margins alone.\n\t\t\t\t_lineHeight:\n\t\t\t\t\tplaced && placed.rowSpan > 1 ? 0 : autoPageLineHeightEmu(fontSizePt, tableProps.autoPageLineWeight || 0),\n\t\t\t\ttext: [],\n\t\t\t\toptions: cell.options || {},\n\t\t\t}\n\t\t})\n\t\tconst lineHeightEmu = cells.reduce((max, cell) => Math.max(max, cell._lineHeight), 0)\n\t\tconst maxLines = cells.reduce((max, cell) => Math.max(max, cell._lines.length), 0)\n\t\tconst marginsEmu = topEmu + btmEmu\n\t\treturn { cells, marginsEmu, lineHeightEmu, heightEmu: marginsEmu + maxLines * lineHeightEmu }\n\t}\n\n\t// What the repeated header rows cost a continuation page. Computed once: the rows and the\n\t// grid are the same on every page, so re-measuring per page would only be slower. Both callers\n\t// pass the header rows as the leading rows of `tableRows`, so each is measured at its own index,\n\t// against the grid placements the body rows use.\n\tconst repeatHeaderRows =\n\t\ttableProps.autoPageRepeatHeader && tableProps._arrObjTabHeadRows ? tableProps._arrObjTabHeadRows : []\n\tconst repeatHeaderHeightsEmu = repeatHeaderRows.map((_row, headIdx) => measureRow(headIdx).heightEmu)\n\n\t/**\n\t * The last row of the rowspan group that row `iRow` opens: the furthest row any of its spans\n\t * reaches, extended by every span a covered row opens in turn. `walkTableGrid` has clamped each\n\t * span to the table, so the walk ends inside it.\n\t * @param iRow - the row that opens the group\n\t */\n\tfunction rowSpanGroupEnd(iRow: number): number {\n\t\tlet end = iRow\n\t\tfor (let r = iRow; r <= end; r++) {\n\t\t\tfor (const placement of placements[r] ?? []) end = Math.max(end, r + placement.rowSpan - 1)\n\t\t}\n\t\treturn end\n\t}\n\n\t// STEP 6: **MAIN** Iterate over rows, add table content, create new slides as rows overflow\n\tlet newTableRowSlide: TableRowSlide = {\n\t\trows: [] as TableRowInternal[],\n\t\trowH: [] as Array<number | undefined>,\n\t\tcolW: colWidthsIn,\n\t\ty: startYEmu() / EMU_PER_INCH,\n\t}\n\t/** Rows placed on the working page other than its repeated header rows. */\n\tlet bodyRowsOnPage = 0\n\tlet warnedTallRowSpan = false\n\n\t/**\n\t * Close the working page and open the next: push the page when it has rows, re-derive the page\n\t * height, charge `chargedEmu` to the new page, then repeat the header rows onto it.\n\t * @param chargedEmu - what the new page already owes before its header rows: the margins of a\n\t * row that is starting over here, or nothing\n\t */\n\tfunction startNewPage(chargedEmu: number): void {\n\t\t// Never push an empty page: a row that does not fit yet has no content here, and an empty\n\t\t// `rows` slide crashes the recursive addTable.\n\t\tif (newTableRowSlide.rows.length > 0) tableRowSlides.push(newTableRowSlide)\n\t\t// Decided after the push: the page just closed is what makes this one a continuation.\n\t\tnewTableRowSlide = {\n\t\t\trows: [],\n\t\t\trowH: [] as Array<number | undefined>,\n\t\t\tcolW: colWidthsIn,\n\t\t\ty: startYEmu() / EMU_PER_INCH,\n\t\t}\n\t\tbodyRowsOnPage = 0\n\t\t// The page height depends on which page this is, so it is re-derived for the new one.\n\t\tcalcSlideTabH()\n\t\t// ORDER IS LOAD-BEARING. The charge used to be added and then wiped by the reset, so the first\n\t\t// row of every continuation slide was the only row in the table that paid no margin. That let\n\t\t// a continuation slide accept one row more than it had room for, and the extra row hung off\n\t\t// the bottom of the slide (upstream gitbrent/PptxGenJS#1200). The symptom is easy to miss\n\t\t// because the pager is *self*-consistent per slide: it only shows up as the first slide and\n\t\t// the continuation slides disagreeing about how many identical rows fit the identical space,\n\t\t// which is what test/regression/table/table-autopage-continuation-budget.test.ts pins.\n\t\temuTabCurrH = chargedEmu\n\t\tif (tableProps.verbose)\n\t\t\tconsole.log(\n\t\t\t\t`| SLIDE [${tableRowSlides.length}]: emuSlideTabH ...... = ${(emuSlideTabH / EMU_PER_INCH).toFixed(1)} `\n\t\t\t)\n\t\trepeatHeaderRows.forEach((headRow, headIdx) => {\n\t\t\tnewTableRowSlide.rows.push([...headRow])\n\t\t\t// Repeated header rows are the original leading rows, so carry their configured height.\n\t\t\tnewTableRowSlide.rowH?.push(resolveRowH(headIdx))\n\t\t\temuTabCurrH += repeatHeaderHeightsEmu[headIdx] ?? 0\n\t\t})\n\t}\n\n\ttableRows.forEach((row, iRow) => {\n\t\t// A: Row variables — detect active rowspan at the start of this row so we can\n\t\t// suppress page breaks that would split a rowspan group across slides.\n\t\tconst hasActiveRowSpan = spannedFromAbove(iRow)\n\t\t// B: Create new row in data model\n\t\tlet currTableRow: TableRowInternal = []\n\t\trow.forEach((cell) => currTableRow.push(workingCell([], cell.options)))\n\n\t\t// C: Calc usable vertical space/table height. Set default value first, adjust below when necessary.\n\t\tcalcSlideTabH()\n\t\tif (tableProps.verbose && iRow === 0)\n\t\t\tconsole.log(\n\t\t\t\t`| SLIDE [${tableRowSlides.length}]: emuSlideTabH ...... = ${(emuSlideTabH / EMU_PER_INCH).toFixed(1)} `\n\t\t\t)\n\n\t\t// C-2: A row that opens a rowspan is kept with the rows the span covers. Breaking a page\n\t\t// partway through it left the partial row as the page's last row still carrying `rowSpan`,\n\t\t// so the emitter wrote a `rowSpan=\"2\"` with no row under it -- the state PowerPoint reports\n\t\t// as corrupt. The whole group is priced before any of its lines is taken: when it does not\n\t\t// fit under rows already on the page, the page breaks before it, and a group taller than a\n\t\t// page is emitted whole on a page of its own.\n\t\tconst startsRowSpan = !hasActiveRowSpan && (placements[iRow] ?? []).some((placement) => placement.rowSpan > 1)\n\t\tif (startsRowSpan) {\n\t\t\tlet groupHeightEmu = 0\n\t\t\tfor (let r = iRow; r <= rowSpanGroupEnd(iRow); r++) groupHeightEmu += measureRow(r).heightEmu\n\t\t\tif (bodyRowsOnPage > 0 && emuTabCurrH + groupHeightEmu > emuSlideTabH) startNewPage(0)\n\t\t\tif (emuTabCurrH + groupHeightEmu > emuSlideTabH && !warnedTallRowSpan) {\n\t\t\t\twarn(\n\t\t\t\t\t'table/autopage-rowspan-too-tall',\n\t\t\t\t\t'addTable/autoPage: a group of rows joined by a rowspan is taller than a page; it is kept on one page and runs past its bottom. Reduce the span or the text in it.'\n\t\t\t\t)\n\t\t\t\twarnedTallRowSpan = true\n\t\t\t}\n\t\t}\n\t\tconst keepRowTogether = hasActiveRowSpan || startsRowSpan\n\n\t\t// D: --==[[ BUILD DATA SET ]]==-- (split each cell's text into lines, set its line height)\n\t\tconst {\n\t\t\tcells: rowCellLines,\n\t\t\tmarginsEmu: rowMarginsTotalEmu,\n\t\t\tlineHeightEmu: emuLineMaxH,\n\t\t} = measureRow(iRow, tableProps.verbose)\n\t\temuTabCurrH += rowMarginsTotalEmu // Start row height with margins\n\n\t\t/** E: --==[[ PAGE DATA SET ]]==--\n\t\t * Add text one-line-a-time to this row's cells until: lines are exhausted OR table height limit is hit\n\t\t *\n\t\t * Design:\n\t\t * - Building cells L-to-R/loop style wont work as one could be 100 lines and another 1 line\n\t\t * - Therefore, build the whole row, one-line-at-a-time, across each table columns\n\t\t * - Then, when the vertical size limit is hit is by any of the cells, make a new slide and continue adding any remaining lines\n\t\t *\n\t\t * Implementation:\n\t\t * - `rowCellLines` is an array of cells, one for each column in the table, with each cell containing an array of lines\n\t\t *\n\t\t * Sample Data:\n\t\t * - `rowCellLines` ..: [ TableCellInternal, TableCellInternal, TableCellInternal ]\n\t\t * - `TableCellInternal` .....: { _type: 'tablecell', _lines: TableCellInternal[], _lineHeight: 10 }\n\t\t * - `_lines` ........: [ {_type: 'tablecell', text: 'cell-1,line-1', options: {…}}, {_type: 'tablecell', text: 'cell-1,line-2', options: {…}} }\n\t\t * - `_lines` is TableCellInternal[] (the 1-N words in the line)\n\t\t * {\n\t\t * _lines: [{ text:'cell-1,line-1' }, { text:'cell-1,line-2' }], // TOTAL-CELL-HEIGHT = 2\n\t\t * _lines: [{ text:'cell-2,line-1' }, { text:'cell-2,line-2' }], // TOTAL-CELL-HEIGHT = 2\n\t\t * _lines: [{ text:'cell-3,line-1' }, { text:'cell-3,line-2' }, { text:'cell-3,line-3' }, { text:'cell-3,line-4' }], // TOTAL-CELL-HEIGHT = 4\n\t\t * }\n\t\t *\n\t\t * Example: 2 rows, with the firstrow overflowing onto a new slide\n\t\t * SLIDE 1:\n\t\t * |--------|--------|--------|--------|\n\t\t * | line-1 | line-1 | line-1 | line-1 |\n\t\t * | | | line-2 | |\n\t\t * | | | line-3 | |\n\t\t * |--------|--------|--------|--------|\n\t\t *\n\t\t * SLIDE 2:\n\t\t * |--------|--------|--------|--------|\n\t\t * | | | line-4 | |\n\t\t * |--------|--------|--------|--------|\n\t\t * | line-1 | line-1 | line-1 | line-1 |\n\t\t * |--------|--------|--------|--------|\n\t\t */\n\t\tif (tableProps.verbose) console.log(`\\n| SLIDE [${tableRowSlides.length}]: ROW [${iRow}]: START...`)\n\t\tlet currCellIdx = 0\n\t\tlet isDone = false\n\t\twhile (!isDone) {\n\t\t\tconst srcCell = rowCellLines[currCellIdx]\n\t\t\tif (!srcCell) break\n\t\t\tlet tgtCell = currTableRow[currCellIdx] // NOTE: may be redefined below (a new row may be created, thus changing this value)\n\n\t\t\t// 2: create a new slide if there is insufficient room for the current row,\n\t\t\t// but never break inside a rowspan group — keep spanned rows together.\n\t\t\tif (emuTabCurrH + emuLineMaxH > emuSlideTabH && !keepRowTogether) {\n\t\t\t\tif (tableProps.verbose) {\n\t\t\t\t\tconsole.log('\\n|-----------------------------------------------------------------------|')\n\t\t\t\t\t// prettier-ignore\n\t\t\t\t\tconsole.log(`|-- NEW SLIDE CREATED (currTabH+currLineH > maxH) => ${(emuTabCurrH / EMU_PER_INCH).toFixed(2)} + ${(srcCell._lineHeight / EMU_PER_INCH).toFixed(2)} > ${emuSlideTabH / EMU_PER_INCH}`)\n\t\t\t\t\tconsole.log('|-----------------------------------------------------------------------|\\n\\n')\n\t\t\t\t}\n\n\t\t\t\t// A: add current row slide or it will be lost (only if it has rows and text)\n\t\t\t\tif (\n\t\t\t\t\tcurrTableRow.length > 0 &&\n\t\t\t\t\tcurrTableRow.map((cell) => (Array.isArray(cell.text) ? cell.text.length : 0)).reduce((p, n) => p + n) > 0\n\t\t\t\t) {\n\t\t\t\t\tnewTableRowSlide.rows.push(currTableRow)\n\t\t\t\t\tnewTableRowSlide.rowH?.push(resolveRowH(iRow))\n\t\t\t\t}\n\n\t\t\t\t// B: open the next page. The row is starting over there, so it owes its cell margins\n\t\t\t\t// again.\n\t\t\t\tstartNewPage(rowMarginsTotalEmu)\n\n\t\t\t\t// C: reset working/curr row\n\t\t\t\tcurrTableRow = []\n\t\t\t\trow.forEach((cell) => currTableRow.push(workingCell([], cell.options)))\n\n\t\t\t\ttgtCell = currTableRow[currCellIdx]\n\t\t\t}\n\n\t\t\t// 3: set array of words that comprise this line\n\t\t\tconst currLine = srcCell._lines.shift()\n\n\t\t\t// 4: create new line by adding all words from curr line (or add empty if there are no words to avoid \"needs repair\" issue triggered when cells have null content)\n\t\t\tif (tgtCell && Array.isArray(tgtCell.text)) {\n\t\t\t\tif (currLine) tgtCell.text = tgtCell.text.concat(currLine)\n\t\t\t\telse if (tgtCell.text.length === 0)\n\t\t\t\t\ttgtCell.text = tgtCell.text.concat({ _type: SlideObjectType.tablecell, text: '' })\n\t\t\t\t// IMPORTANT: ^^^ add empty if there are no words to avoid \"needs repair\" issue triggered when cells have null content\n\t\t\t}\n\n\t\t\t// 5: increase table height by the curr line height (if we're on the last column)\n\t\t\tif (currCellIdx === rowCellLines.length - 1) emuTabCurrH += emuLineMaxH\n\n\t\t\t// 6: advance column/cell index (or circle back to first one to continue adding lines)\n\t\t\tcurrCellIdx = currCellIdx < rowCellLines.length - 1 ? currCellIdx + 1 : 0\n\n\t\t\t// 7: WIP: done?\n\t\t\tconst brent = rowCellLines.map((cell) => cell._lines.length).reduce((prev, next) => prev + next)\n\t\t\tif (brent === 0) isDone = true\n\t\t}\n\n\t\t// F: Flush/capture row buffer before it resets at the top of this loop.\n\t\t//\n\t\t// A row that states no cells is kept only when every one of its grid columns is held by a\n\t\t// rowspan from above. That is a real row -- a source row states only the cells it *starts*,\n\t\t// so one entirely covered from above states none at all, which is what `<tr></tr>` between\n\t\t// two spanned rows means -- and the emitter fills it with `vMerge` continuations. Dropping\n\t\t// it moved every later row up one while the emitter went on synthesizing that grid row's\n\t\t// continuations, so they landed in the next row's `<a:tr>`: a 2-column table came out with\n\t\t// a 4-cell row.\n\t\t//\n\t\t// An empty row NOT covered that way is a different thing and is still dropped: nothing\n\t\t// would fill it, and a `<a:tr>` carrying fewer `<a:tc>` than the grid has columns is the\n\t\t// malformation PowerPoint offers to repair.\n\t\tif (currTableRow.length > 0 || (row.length === 0 && coveredFromAbove(iRow) === numCols)) {\n\t\t\tnewTableRowSlide.rows.push(currTableRow)\n\t\t\tnewTableRowSlide.rowH?.push(resolveRowH(iRow))\n\t\t\tbodyRowsOnPage++\n\t\t}\n\n\t\tif (tableProps.verbose) {\n\t\t\tconsole.log(\n\t\t\t\t`- SLIDE [${tableRowSlides.length}]: ROW [${iRow}]: ...COMPLETE ...... emuTabCurrH = ${(emuTabCurrH / EMU_PER_INCH).toFixed(2)} ( emuSlideTabH = ${(\n\t\t\t\t\temuSlideTabH / EMU_PER_INCH\n\t\t\t\t).toFixed(2)} )`\n\t\t\t)\n\t\t}\n\t})\n\n\t// STEP 7: Flush buffer / add final slide (skip an empty trailing buffer; always keep at least\n\t// one slide so a non-empty table is never reduced to zero pages)\n\tif (newTableRowSlide.rows.length > 0 || tableRowSlides.length === 0) tableRowSlides.push(newTableRowSlide)\n\n\tif (tableProps.verbose) {\n\t\tconsole.log('\\n|================================================|')\n\t\tconsole.log(`| FINAL: tableRowSlides.length = ${tableRowSlides.length}`)\n\t\ttableRowSlides.forEach((slide) => console.log(slide))\n\t\tconsole.log('|================================================|\\n\\n')\n\t}\n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,IAAI,GAAG;IAC3C,IAAI,UAAU,QAAQ,OAAO,QAAQ,KAAK,OAAO,QAAQ;SACpD,IAAI,QAAQ,KAAK,WAAW,GAChC,QAAQ,OAAO,QAAQ,KAAK,OAAO;KAAE,OAAA;KAAkC,MAAM;IAAG,CAAC;GAEnF;GAGA,IAAI,gBAAgB,aAAa,SAAS,GAAG,eAAe;GAG5D,cAAc,cAAc,aAAa,SAAS,IAAI,cAAc,IAAI;GAIxE,IADc,aAAa,KAAK,SAAS,KAAK,OAAO,MAAM,CAAC,CAAC,QAAQ,MAAM,SAAS,OAAO,IACnF,MAAM,GAAG,SAAS;EAC3B;EAeA,IAAI,aAAa,SAAS,KAAM,IAAI,WAAW,KAAK,iBAAiB,IAAI,MAAM,SAAU;GACxF,iBAAiB,KAAK,KAAK,YAAY;GACvC,iBAAiB,MAAM,KAAK,YAAY,IAAI,CAAC;GAC7C;EACD;EAEA,IAAI,WAAW,SACd,QAAQ,IACP,YAAY,eAAe,OAAO,UAAU,KAAK,uCAAuC,cAAc,aAAA,CAAc,QAAQ,CAAC,EAAE,qBAC9H,eAAe,aAAA,CACd,QAAQ,CAAC,EAAE,GACd;CAEF,CAAC;CAID,IAAI,iBAAiB,KAAK,SAAS,KAAK,eAAe,WAAW,GAAG,eAAe,KAAK,gBAAgB;CAEzG,IAAI,WAAW,SAAS;EACvB,QAAQ,IAAI,sDAAsD;EAClE,QAAQ,IAAI,oCAAoC,eAAe,QAAQ;EACvE,eAAe,SAAS,UAAU,QAAQ,IAAI,KAAK,CAAC;EACpD,QAAQ,IAAI,wDAAwD;CACrE;CAGA,OAAO;AACR"}
1
+ {"version":3,"file":"autopage-8Pwh-jsI.js","names":[],"sources":["../src/gen/table/autopage.ts"],"sourcesContent":["/**\n * pptx-ts: Table auto-paging core\n *\n * The DOM-independent heart of table generation: given rows that overflow a slide,\n * split them across as many slides as needed, measuring wrapped text to compute line\n * counts and row heights. `getSlidesForTableRows` is the in-memory core (fully\n * Node-testable); `parseTextToLines` is its private cell-wrapping helper.\n */\n\nimport { SlideObjectType } from '../../enums.js'\nimport { DEF_FONT_SIZE, DEF_SLIDE_MARGIN_IN } from '../../constants-internal.js'\nimport type { PresLayout, TableRowSlide, TableCellProps } from '../../types/index.js'\nimport type {\n\tSlideLayoutInternal,\n\tTableCellInternal,\n\tTableRowInternal,\n\tTableToSlidesPropsInternal,\n} from '../../types/internal.js'\nimport {\n\tautoPageLineHeightEmu,\n\tgetSmartParseNumber,\n\tinch2Emu,\n\tmarginToEmu,\n\tpinnedRowHeightInches,\n\tresolveCellMarginsInches,\n\tresolveSlideMarginsInches,\n\tresolveTableColWidthsEmu,\n\tusableTableWidthEmu,\n} from '../../units-internal.js'\nimport { warn } from '../../diagnostics.js'\nimport { type GridPlacement, tableColCount, walkTableGrid } from './grid.js'\nimport { resolveSpan, withCheckedSpans } from './spans.js'\nimport { EMU_PER_INCH, POINTS_PER_INCH } from '../../units.js'\n\ntype AutoPageCell = TableCellInternal & {\n\t_lineHeight: number\n\t_lines: TableCellInternal[][]\n\toptions: TableCellProps\n\ttext: TableCellInternal[]\n}\n\n/**\n * A cell for the pager's working grid, carrying the source cell's options only when it has some.\n *\n * Every one of these used to be an inline `{ …, options: cell.options }`, which put an `options`\n * key holding `undefined` on a cell whose source had none. Readers cannot see the difference —\n * they all go through `cell.options?.…` — but a `TableCellProps` bag *is* spread in\n * `gen/define/table.ts` (`{ ...colDef, ...headerRow, ...cell.options }`), where the two states\n * are not the same thing. So the model keeps one spelling of absent.\n * @param text - the cell's content, a string or the run list the pager is accumulating\n * @param options - the source cell's options, if it had any\n */\nfunction workingCell(text: string | TableCellInternal[], options: TableCellProps | undefined): TableCellInternal {\n\treturn options === undefined\n\t\t? { _type: SlideObjectType.tablecell, text }\n\t\t: { _type: SlideObjectType.tablecell, text, options }\n}\n\n// ===== Cell text wrapping =====\n\n/**\n * Break cell text into lines based upon table column width (e.g.: Magic Happens Here(tm))\n *\n * `charWeight` arrives as an argument rather than being read off `cell.options` because the\n * caller used to *stamp* it there: the table's weight was written onto the caller's own cell\n * options bag, or `delete`d from it when the table stated none. That mutated caller input --\n * which the chart path has a dedicated guard against -- and it made the option's precedence\n * differ by call site: the row-height probe read the cell's own value while the main loop had\n * just overwritten it with the table's. Both callers now resolve it the same way, and the more\n * specific statement wins, as it does everywhere else in this codebase.\n *\n * `fontSizePt` arrives resolved for the same reason. This read `cell.options.fontSize` or the\n * library default and never the table's `fontSize`, while the row's line height and the emitted\n * `sz` both used the table's. A table of 24pt text was wrapped as if it were 12pt, so the pager\n * counted about half the lines and rows ran off the bottom of each page.\n * @param {TableCellInternal} cell - table cell\n * @param {number} colWidth - table column width (inches)\n * @param {number} fontSizePt - resolved font size: the cell's, else the table's, else the default\n * @param {number} charWeight - resolved `autoPageCharWeight`: the cell's, else the table's, else 0\n * @param {boolean} [verbose] - dump the four wrapping stages; carries `addTable({ verbose })`\n * down, which is the only stage of the pager that flag did not reach\n * @return {TableRowInternal[]} - cell's text objects grouped into lines\n */\nfunction parseTextToLines(\n\tcell: TableCellInternal,\n\tcolWidth: number,\n\tfontSizePt: number,\n\tcharWeight: number,\n\tverbose?: boolean\n): TableCellInternal[][] {\n\t// FYI: CPL = Width / (font-size / font-constant)\n\t// FYI: CHAR:2.3, colWidth:10, fontSize:12 => CPL=138, (actual chars per line in PPT)=145 [14.5 CPI]\n\t// FYI: CHAR:2.3, colWidth:7 , fontSize:12 => CPL= 97, (actual chars per line in PPT)=100 [14.3 CPI]\n\t// FYI: CHAR:2.3, colWidth:9 , fontSize:16 => CPL= 96, (actual chars per line in PPT)=84 [ 9.3 CPI]\n\tconst FOCO = 2.3 + charWeight // Character Constant\n\t// `colWidth` is inches, so the column's width in points is `colWidth * 72`. This used to be\n\t// spelled `(colWidth / EMU_PER_POINT) * EMU_PER_INCH`, which is the same 72 with two EMU\n\t// constants that cancel -- except that the detour through EMU is not exact in binary floating\n\t// point, and `Math.floor` takes the hit. Over the 200,000 widths from 0.001in to 200in the two\n\t// forms disagree on 51, always by one point low: 6.625in is exactly 477 points, and the old\n\t// form floored 476.9999... to 476.\n\tconst CPL = Math.floor(colWidth * POINTS_PER_INCH) / (fontSizePt / FOCO) // Chars-Per-Line\n\n\t// The number the four dumps below exist to explain: every wrap decision in step 4 is\n\t// `strCurrLine.length + word.length > CPL`, so a wrap that looks wrong is almost always\n\t// a CPL that is wrong, and CPL is not recoverable from the lines themselves.\n\tif (verbose) console.log(`[0/4] colWidth=${colWidth}in fontSize=${fontSizePt} FOCO=${FOCO} CPL=${CPL}`)\n\n\tconst parsedLines: TableCellInternal[][] = []\n\tlet inputCells: TableCellInternal[] = []\n\tconst inputLines1: TableCellInternal[][] = []\n\tconst inputLines2: TableCellInternal[][] = []\n\n\t/**\n\t * EX INPUTS: `cell.text`\n\t * - string....: \"Account Name Column\"\n\t * - object....: { text:\"Account Name Column\" }\n\t * - object[]..: [{ text:\"Account Name\", options:{ bold:true } }, { text:\" Column\" }]\n\t * - object[]..: [{ text:\"Account Name\", options:{ breakLine:true } }, { text:\"Input\" }]\n\t */\n\n\t/**\n\t * EX OUTPUTS:\n\t * - string....: [{ text:\"Account Name Column\" }]\n\t * - object....: [{ text:\"Account Name Column\" }]\n\t * - object[]..: [{ text:\"Account Name\", options:{ breakLine:true } }, { text:\"Input\" }]\n\t * - object[]..: [{ text:\"Account Name\", options:{ breakLine:true } }, { text:\"Input\" }]\n\t */\n\n\t// STEP 1: Ensure inputCells is an array of TableCells\n\tif (cell.text && cell.text.toString().trim().length === 0) {\n\t\t// Allow a single space/whitespace as cell text (user-requested feature)\n\t\tinputCells.push({ _type: SlideObjectType.tablecell, text: ' ' })\n\t} else if (typeof cell.text === 'number' || typeof cell.text === 'string') {\n\t\tinputCells.push({ _type: SlideObjectType.tablecell, text: (cell.text || '').toString().trim() })\n\t} else if (Array.isArray(cell.text)) {\n\t\tinputCells = cell.text\n\t}\n\tif (verbose) {\n\t\tconsole.log('[1/4] inputCells')\n\t\tinputCells.forEach((cell, idx) => console.log(`[1/4] [${idx + 1}] cell: ${JSON.stringify(cell)}`))\n\t}\n\n\t// STEP 2: Group table cells into lines based on \"\\n\" or `breakLine` prop\n\t/**\n\t * - EX: `[{ text:\"Input Output\" }, { text:\"Extra\" }]` == 1 line\n\t * - EX: `[{ text:\"Input\" }, { text:\"Output\", options:{ breakLine:true } }]` == 1 line\n\t * - EX: `[{ text:\"Input\\nOutput\" }]` == 2 lines\n\t * - EX: `[{ text:\"Input\", options:{ breakLine:true } }, { text:\"Output\" }]` == 2 lines\n\t */\n\tlet newLine: TableCellInternal[] = []\n\tinputCells.forEach((cell) => {\n\t\tif (typeof cell.text !== 'string') return\n\n\t\tif (cell.text.includes('\\n')) {\n\t\t\t// Each non-last \\n-split part ends with a forced paragraph break; the last\n\t\t\t// part accumulates in newLine so subsequent runs stay on the same paragraph.\n\t\t\tconst parts = cell.text.split('\\n')\n\t\t\tparts.forEach((part, partIdx) => {\n\t\t\t\tconst isLastPart = partIdx === parts.length - 1\n\t\t\t\tif (isLastPart) {\n\t\t\t\t\tnewLine.push(workingCell(part, cell.options))\n\t\t\t\t} else {\n\t\t\t\t\tnewLine.push({\n\t\t\t\t\t\t_type: SlideObjectType.tablecell,\n\t\t\t\t\t\ttext: part,\n\t\t\t\t\t\toptions: { ...cell.options, breakLine: true },\n\t\t\t\t\t})\n\t\t\t\t\tinputLines1.push(newLine)\n\t\t\t\t\tnewLine = []\n\t\t\t\t}\n\t\t\t})\n\t\t} else {\n\t\t\tnewLine.push(workingCell(cell.text.trim(), cell.options))\n\t\t}\n\n\t\tif (cell.options?.breakLine) {\n\t\t\tif (verbose) console.log(`inputCells: new line > ${JSON.stringify(newLine)}`)\n\t\t\tinputLines1.push(newLine)\n\t\t\tnewLine = []\n\t\t}\n\t})\n\t// Flush remaining buffer after all cells are processed\n\tif (newLine.length > 0) {\n\t\tinputLines1.push(newLine)\n\t\tnewLine = []\n\t}\n\tif (verbose) {\n\t\tconsole.log(`[2/4] inputLines1 (${inputLines1.length})`)\n\t\tinputLines1.forEach((line, idx) => console.log(`[2/4] [${idx + 1}] line: ${JSON.stringify(line)}`))\n\t}\n\n\t// STEP 3: Tokenize every text object into words. All runs of one logical paragraph\n\t// are flattened into a single token list so step 4 tracks column position across\n\t// styled-run boundaries (fixes independent-reset bug for rich-text cells).\n\tinputLines1.forEach((line) => {\n\t\tconst lineTokens: TableCellInternal[] = []\n\t\tline.forEach((cell) => {\n\t\t\tconst cellTextStr = String(cell.text) // force convert to string (compiled JS is better with this than a cast)\n\t\t\tconst lineWords = cellTextStr.split(' ')\n\n\t\t\tlineWords.forEach((word, idx) => {\n\t\t\t\tconst cellProps = { ...cell.options }\n\t\t\t\t// IMPORTANT: Handle `breakLine` prop - we cannot apply to each word - only apply to very last word!\n\t\t\t\tif (cellProps?.breakLine) cellProps.breakLine = idx + 1 === lineWords.length\n\t\t\t\tlineTokens.push({\n\t\t\t\t\t_type: SlideObjectType.tablecell,\n\t\t\t\t\ttext: word + (idx + 1 < lineWords.length ? ' ' : ''),\n\t\t\t\t\toptions: cellProps,\n\t\t\t\t})\n\t\t\t})\n\t\t})\n\t\tinputLines2.push(lineTokens)\n\t})\n\tif (verbose) {\n\t\tconsole.log(`[3/4] inputLines2 (${inputLines2.length})`)\n\t\tinputLines2.forEach((line) => console.log(`[3/4] line: ${JSON.stringify(line)}`))\n\t}\n\n\t// STEP 4: Group cells/words into lines based upon space consumed by word letters\n\tinputLines2.forEach((line) => {\n\t\tlet lineCells: TableCellInternal[] = []\n\t\tlet strCurrLine = ''\n\n\t\tline.forEach((word) => {\n\t\t\tconst wordText = String(word.text || '')\n\t\t\t// A: create new line when horizontal space is exhausted.\n\t\t\t// `lineCells.length > 0` is the same guard the flush below carries, and for the same\n\t\t\t// reason: on the first word `strCurrLine` is `''`, so a word wider than the column on\n\t\t\t// its own fires this branch with nothing buffered and used to push an EMPTY line. The\n\t\t\t// cell's text survived -- the pager concatenates lines back together -- but its height\n\t\t\t// did not, because `_lines.length` is what prices the row. Twelve single-word rows in a\n\t\t\t// 0.4in column paged onto two slides when the word was long and one when it was short.\n\t\t\t// The word still overflows its column: nothing here breaks inside a word, which is the\n\t\t\t// stated behaviour rather than a gap (`docs/contributing/design/tables.md`). A hard\n\t\t\t// break would have to land at the `CPL` estimate, which is not where the renderer wraps,\n\t\t\t// and would then have to keep `_lines.length` and the emitted text in step -- the exact\n\t\t\t// pairing the phantom-line bug above got wrong.\n\t\t\tif (strCurrLine.length + wordText.length > CPL) {\n\t\t\t\tif (lineCells.length > 0) parsedLines.push(lineCells)\n\t\t\t\tlineCells = []\n\t\t\t\tstrCurrLine = ''\n\t\t\t}\n\n\t\t\t// B: add current word to line cells\n\t\t\tlineCells.push(word)\n\n\t\t\t// C: add current word to `strCurrLine` which we use to keep track of line's char length\n\t\t\tstrCurrLine += wordText\n\t\t})\n\n\t\t// Flush buffer: Only create a line when there's text to avoid empty row\n\t\tif (lineCells.length > 0) parsedLines.push(lineCells)\n\t})\n\tif (verbose) {\n\t\tconsole.log(`[4/4] parsedLines (${parsedLines.length})`)\n\t\tparsedLines.forEach((line, idx) => console.log(`[4/4] [Line ${idx + 1}]:\\n${JSON.stringify(line)}`))\n\t\tconsole.log('...............................................\\n\\n')\n\t}\n\n\t// Done:\n\treturn parsedLines\n}\n\n/**\n * The font size in points one auto-paged cell is measured at: the cell's own `fontSize`,\n * else the table's, else the library default. Pass `null` for the cell to ask the same\n * question of the table alone.\n */\nfunction resolveCellFontSize(\n\tcellOpts: TableCellProps | undefined | null,\n\ttableOpts: TableToSlidesPropsInternal\n): number {\n\tconst size = cellOpts?.fontSize ?? tableOpts.fontSize\n\treturn typeof size === 'number' ? size : DEF_FONT_SIZE\n}\n\n/**\n * The `autoPageCharWeight` a cell wraps at: its own, else the table's, else none.\n *\n * The sibling of {@link resolveCellFontSize}, and named for the same reason -- the two call\n * sites of {@link parseTextToLines} had resolved this one differently. The row-height probe\n * read the cell's own value; the main loop stamped the table's over it first, and `delete`d the\n * cell's when the table stated none, so a weight set on a cell alone was accepted and dropped.\n * The precedence here is the one every other paired option in this codebase uses.\n * @param cellOpts - the cell's own options, if any\n * @param tableOpts - the table's options\n */\nfunction resolveCellCharWeight(\n\tcellOpts: TableCellProps | undefined | null,\n\ttableOpts: TableToSlidesPropsInternal\n): number {\n\tconst weight = cellOpts?.autoPageCharWeight ?? tableOpts.autoPageCharWeight\n\treturn typeof weight === 'number' ? weight : 0\n}\n\n// ===== Auto-page engine =====\n// The in-memory core (fully Node-testable). Internally signposted by the\n// `// STEP 1..7` markers below: margins → column count → widths → the main\n// row-iteration/overflow loop (STEP 6) → final-slide flush (STEP 7).\n\n/**\n * The largest top and bottom cell margin in one row, in EMU.\n *\n * A cell's own `margin` wins over the table's when it states one, and a stated `0` counts as\n * stating one. Both sites that read this gated on truthiness and on `Array.isArray`, so a cell\n * asking for `margin: [0, …]` fell through to the table's margin instead of taking its own, and\n * a scalar `margin: 0.2` was not seen at all -- while the emitter broadcasts a scalar to four\n * sides. `resolveCellMarginsInches` is the resolver the emitter itself reads.\n * @param row - the row's cells\n * @param tableProps - the table's options, for the fallback margin\n * @returns the row's top and bottom margin allowance in EMU\n */\nfunction rowMarginsEmu(\n\trow: TableRowInternal,\n\ttableProps: TableToSlidesPropsInternal\n): { topEmu: number; btmEmu: number } {\n\tlet topEmu = 0\n\tlet btmEmu = 0\n\trow.forEach((cell) => {\n\t\tconst stated = cell?.options?.margin ?? tableProps.margin\n\t\tif (stated === undefined || stated === null) return\n\t\tconst [top, , btm] = resolveCellMarginsInches(stated)\n\t\tif (marginToEmu(top) > topEmu) topEmu = marginToEmu(top)\n\t\tif (marginToEmu(btm) > btmEmu) btmEmu = marginToEmu(btm)\n\t})\n\treturn { topEmu, btmEmu }\n}\n\n/** One row, measured: each cell's wrapped lines and what the row costs a page. */\ninterface MeasuredRow {\n\t/** One working cell per source cell, in row order, carrying its lines and its line height. */\n\tcells: AutoPageCell[]\n\t/** The row's tallest top margin plus its tallest bottom margin, in EMU. */\n\tmarginsEmu: number\n\t/** The tallest line height among the cells that do not span rows, in EMU. */\n\tlineHeightEmu: number\n\t/** The whole row: its margins plus its tallest cell's line count at `lineHeightEmu`. */\n\theightEmu: number\n}\n\n/**\n * Takes an array of table rows and breaks into an array of slides, which contain the calculated amount of table rows that fit on that slide\n * @param {TableCellInternal[][]} tableRows - table rows\n * @param {TableToSlidesPropsInternal} tableProps - table2slides properties\n * @param {PresLayout} presLayout - presentation layout\n * @param {SlideLayoutInternal} masterSlide - master slide\n * @return {TableRowSlide[]} array of table rows\n */\nexport function getSlidesForTableRows(\n\trows: TableCellInternal[][] = [],\n\ttableProps: TableToSlidesPropsInternal = {},\n\tpresLayout: PresLayout,\n\tmasterSlide?: SlideLayoutInternal | null\n): TableRowSlide[] {\n\t// `MAX_TABLE_SPAN` guards the two allocations a span decides, and its own module says it\n\t// covers both paths -- but `tableToSlides` reaches this function directly, without the\n\t// definer that applies the check, and its own `gridSpan` has no ceiling. So a\n\t// `colspan=\"4000000000\"` in a source table reached the column walk and the per-column depth\n\t// array, which is the allocation that takes the host process down with no exception to catch.\n\t// Checking here rather than at the call site keeps the one entry point guarded whoever calls\n\t// it; a grid whose spans are all fine is passed through by identity.\n\tconst tableRows = withCheckedSpans(rows)\n\tlet arrInchMargins = DEF_SLIDE_MARGIN_IN\n\tlet emuSlideTabW: number\n\tlet colWidthsIn: number[] = []\n\tlet emuSlideTabH = EMU_PER_INCH * 1\n\tlet emuTabCurrH = 0\n\tlet numCols = 0\n\tlet warnedNoTabH = false\n\tconst tableRowSlides: TableRowSlide[] = []\n\tconst tablePropX = getSmartParseNumber(tableProps.x, 'X', presLayout)\n\tconst tablePropY = getSmartParseNumber(tableProps.y, 'Y', presLayout)\n\tconst tablePropW = getSmartParseNumber(tableProps.w, 'X', presLayout)\n\tconst tablePropH = getSmartParseNumber(tableProps.h, 'Y', presLayout)\n\tlet tableCalcW: number = tablePropW\n\n\t/**\n\t * Where this page's table starts, in EMU from the top of the slide.\n\t *\n\t * There used to be three rules for two cases. The first page and \"every page after it\"\n\t * were handled together, then a block gated on `tableRowSlides.length > 1` overrode the\n\t * result -- so despite its own comment it began on the THIRD page, and its first arm\n\t * recomputed exactly what had just been computed. Page 2 therefore got a different usable\n\t * height from pages 3 and up: with `y` above the top margin and an explicit `h`, a\n\t * 60-row table paged 9 / 7 / 9 / 9 / 9 / 9 / 8, which is the same \"pages disagree about\n\t * how many identical rows fit\" symptom the margin-reset note in `calcSlideTabH` records.\n\t *\n\t * It is a function rather than two expressions because the too-small-height fallback in\n\t * `calcSlideTabH` had spelled the continuation arm its own way and drifted the same way\n\t * twice over: `autoPageSlideStartY || margin` discarded an explicit `0` that the main rule\n\t * honoured, and the `Math.min` clause below was missing outright. Two readings of one rule\n\t * is what the paragraph above is about; there is now one.\n\t */\n\tfunction startYEmu(): number {\n\t\t// A stated `y: 0` is the top edge of the slide, not a missing `y`: tested for truthiness, it\n\t\t// was budgeted from the top margin while `addTable` placed the page at 0.\n\t\tconst statedY = tableProps.y !== undefined && tableProps.y !== null\n\t\tif (tableRowSlides.length === 0) return statedY ? tablePropY : inch2Emu(arrInchMargins[0])\n\t\tif (typeof tableProps.autoPageSlideStartY === 'number') return inch2Emu(tableProps.autoPageSlideStartY)\n\t\t// RULE: after the first page the table starts at the top margin rather than at its\n\t\t// own `y` -- unless `y` is ABOVE the margin, in which case paging must not push the\n\t\t// table down and lose the space. Whichever is higher on the slide wins.\n\t\treturn inch2Emu(statedY ? Math.min(tablePropY / EMU_PER_INCH, arrInchMargins[0]) : arrInchMargins[0])\n\t}\n\n\tfunction calcSlideTabH(): void {\n\t\tconst emuStartY = startYEmu()\n\t\temuSlideTabH = (tablePropH || presLayout.height) - emuStartY - inch2Emu(arrInchMargins[2])\n\t\t// EXPLICIT-H FIX: an explicit `h` is the table's height (an extent), not a bottom\n\t\t// coordinate, so -- unlike `presLayout.height` -- the start-Y must not be subtracted from\n\t\t// it. Otherwise a table that begins mid-slide gets a tiny page while the pages that do\n\t\t// clamp to `h` render normally. Applied on every page: the floor used to reach the first\n\t\t// page and pages three and up, leaving page two as the one that could shrink below `h`.\n\t\tif (tablePropH && emuSlideTabH < tablePropH) emuSlideTabH = tablePropH\n\n\t\t// GUARD: a non-positive height, or one too small to fit even a single line of the base font,\n\t\t// means no row ever fits. That previously emitted degenerate empty overflow pages (rows:[]),\n\t\t// which made the recursive addTable throw \"Array expected\", or — with `h` smaller than one\n\t\t// line — placed one row per slide forever. Ignore the unusable height, fall back to the full\n\t\t// slide area between margins, and warn once rather than emit a broken table.\n\t\tconst emuBaseLineH = autoPageLineHeightEmu(\n\t\t\tresolveCellFontSize(null, tableProps),\n\t\t\ttableProps.autoPageLineWeight || 0\n\t\t)\n\t\tif (emuSlideTabH < emuBaseLineH) {\n\t\t\tconst fallbackH = presLayout.height - startYEmu() - inch2Emu(arrInchMargins[2])\n\t\t\tif (!warnedNoTabH) {\n\t\t\t\twarn(\n\t\t\t\t\t'table/autopage-height-too-small',\n\t\t\t\t\t'addTable/autoPage: the table height (`h`) leaves no room to paginate; ignoring it and using the slide height. Increase `h` or decrease `y`.'\n\t\t\t\t)\n\t\t\t\twarnedNoTabH = true\n\t\t\t}\n\t\t\temuSlideTabH = fallbackH > 0 ? fallbackH : presLayout.height\n\t\t}\n\t}\n\n\tif (tableProps.verbose) {\n\t\tconsole.log('[[VERBOSE MODE]]')\n\t\tconsole.log('|-- TABLE PROPS --------------------------------------------------------|')\n\t\tconsole.log(`| presLayout.width ................................ = ${(presLayout.width / EMU_PER_INCH).toFixed(1)}`)\n\t\tconsole.log(\n\t\t\t`| presLayout.height ............................... = ${(presLayout.height / EMU_PER_INCH).toFixed(1)}`\n\t\t)\n\t\tconsole.log(\n\t\t\t`| tableProps.x .................................... = ${typeof tableProps.x === 'number' ? (tableProps.x / EMU_PER_INCH).toFixed(1) : tableProps.x}`\n\t\t)\n\t\tconsole.log(\n\t\t\t`| tableProps.y .................................... = ${typeof tableProps.y === 'number' ? (tableProps.y / EMU_PER_INCH).toFixed(1) : tableProps.y}`\n\t\t)\n\t\tconsole.log(\n\t\t\t`| tableProps.w .................................... = ${typeof tableProps.w === 'number' ? (tableProps.w / EMU_PER_INCH).toFixed(1) : tableProps.w}`\n\t\t)\n\t\tconsole.log(\n\t\t\t`| tableProps.h .................................... = ${typeof tableProps.h === 'number' ? (tableProps.h / EMU_PER_INCH).toFixed(1) : tableProps.h}`\n\t\t)\n\t\tconsole.log(\n\t\t\t`| tableProps.slideMargin .......................... = ${tableProps.slideMargin ? String(tableProps.slideMargin) : ''}`\n\t\t)\n\t\tconsole.log(`| tableProps.margin ............................... = ${String(tableProps.margin)}`)\n\t\tconsole.log(`| tableProps.colW ................................. = ${String(tableProps.colW)}`)\n\t\tconsole.log(`| tableProps.autoPageSlideStartY .................. = ${tableProps.autoPageSlideStartY}`)\n\t\tconsole.log(`| tableProps.autoPageCharWeight ................... = ${tableProps.autoPageCharWeight}`)\n\t\tconsole.log('|-- CALCULATIONS -------------------------------------------------------|')\n\t\tconsole.log(`| tablePropX ...................................... = ${tablePropX / EMU_PER_INCH}`)\n\t\tconsole.log(`| tablePropY ...................................... = ${tablePropY / EMU_PER_INCH}`)\n\t\tconsole.log(`| tablePropW ...................................... = ${tablePropW / EMU_PER_INCH}`)\n\t\tconsole.log(`| tablePropH ...................................... = ${tablePropH / EMU_PER_INCH}`)\n\t\tconsole.log(`| tableCalcW ...................................... = ${tableCalcW / EMU_PER_INCH}`)\n\t}\n\n\t// STEP 1: Calculate margins\n\t{\n\t\t// The caller's value goes through unaltered, including an absent one: `resolveSlideMarginsInches`\n\t\t// owns all three tiers, and defaulting to `DEF_SLIDE_MARGIN_IN[0]` here handed it a stated\n\t\t// caller margin that no caller had stated, which suppressed the master's own `margin`.\n\t\tarrInchMargins = resolveSlideMarginsInches(masterSlide?._margin, tableProps.slideMargin)\n\n\t\tif (tableProps.verbose)\n\t\t\tconsole.log(`| arrInchMargins .................................. = [${arrInchMargins.join(', ')}]`)\n\t}\n\n\t// STEP 2: Calculate number of columns\n\t{\n\t\tnumCols = tableColCount(tableRows)\n\t\tif (tableProps.verbose) console.log(`| numCols ......................................... = ${numCols}`)\n\t}\n\n\t// Where every cell actually lands. The pager asks the grid two questions -- which columns a\n\t// cell spans, so its text is wrapped against the right width, and whether a rowspan opened\n\t// on an earlier row is still open here, so a page break does not split a merged group -- and\n\t// it used to answer both with its own occupancy array, once forwards through the row and\n\t// once again after it. `walkTableGrid` is the traversal the measured-fit pass and the\n\t// emitter's own grid build follow, so the widths this pager wraps against are the widths the\n\t// cells are finally given.\n\tconst placements: GridPlacement[][] = tableRows.map(() => [])\n\t/**\n\t * How many of each row's grid columns are held by a rowspan opened ABOVE it, accumulated as\n\t * the placements arrive rather than searched for afterwards.\n\t *\n\t * The question used to be answered by scanning every placement in the table, once per row,\n\t * which is quadratic in a table of any width. Two columns of short text and no spans at all:\n\t * 1000 rows took 55ms, 2000 took 115ms, 4000 took 333ms and 8000 took 1036ms. The same four\n\t * now take 24ms, 19ms, 40ms and 83ms -- so it was pure overhead, paid in full by the long\n\t * report table that is the whole reason this code exists.\n\t *\n\t * Filling forward instead is bounded by the placement's own `rowSpan`, so the total work is\n\t * the sum of all rowspans. That is safe to expand without a further check because\n\t * `walkTableGrid` has already clamped each `rowSpan` to `rows.length - r`: a span cannot\n\t * reach past the last row however large the caller wrote it, so the sum is bounded by the\n\t * grid rather than by anything the caller states.\n\t *\n\t * The fill starts at `row + 1`. A `rowSpan` of 1 must contribute nothing -- starting at\n\t * `row` would have every ordinary row counting itself as covered, and the\n\t * `coveredFromAbove(iRow) === numCols` reader below would then fire on all of them.\n\t */\n\tconst coveredCols: number[] = Array.from({ length: tableRows.length }, () => 0)\n\tfor (const placement of walkTableGrid(tableRows, numCols)) {\n\t\tplacements[placement.row]?.push(placement)\n\t\tconst last = Math.min(placement.row + placement.rowSpan, coveredCols.length)\n\t\tfor (let r = placement.row + 1; r < last; r++) coveredCols[r] = (coveredCols[r] ?? 0) + placement.colSpan\n\t}\n\t/** How many of `iRow`'s grid columns are held by a rowspan opened above it. */\n\tconst coveredFromAbove = (iRow: number): number => coveredCols[iRow] ?? 0\n\t/** Whether a rowspan opened above `iRow` is still covering it. */\n\tconst spannedFromAbove = (iRow: number): boolean => coveredFromAbove(iRow) > 0\n\n\t// STEP 3: Calculate width using tableProps.colW if possible. Only an array reaches here:\n\t// `addTableDefinition` turns a single `colW` into `w` before paging, and `tableToSlides` always\n\t// passes one width per column.\n\tif (!tablePropW && Array.isArray(tableProps.colW)) {\n\t\t// The `0` seed is what `colW: []` needs: an empty array is truthy, so it reached an\n\t\t// unseeded `reduce` and threw a raw `TypeError` — a failure this library did not raise as\n\t\t// a `PptxTsError`. Seeded, it totals `0`, which falls through to `usableTableWidthEmu`\n\t\t// exactly where `colW: undefined` lands. That is the reading intended: an empty array is a\n\t\t// caller stating no columns, not a table of width zero.\n\t\ttableCalcW = tableProps.colW.reduce((p, n) => p + n, 0) * EMU_PER_INCH\n\t\tif (tableProps.verbose)\n\t\t\tconsole.log(`| tableCalcW ...................................... = ${tableCalcW / EMU_PER_INCH}`)\n\t}\n\n\t// STEP 4: Calculate usable width now that total usable space is known (`emuSlideTabW`)\n\t{\n\t\temuSlideTabW = tableCalcW || usableTableWidthEmu(presLayout, tablePropX, arrInchMargins)\n\t\tif (tableProps.verbose)\n\t\t\tconsole.log(`| emuSlideTabW .................................... = ${(emuSlideTabW / EMU_PER_INCH).toFixed(1)}`)\n\t}\n\n\t// STEP 5: Resolve the column grid. `resolveTableColWidthsEmu` is the same resolver the\n\t// table emitter and the measured-fit pass read, so the widths this pager wraps text\n\t// against are the widths the emitted `<a:gridCol>`s carry. It also normalizes the array\n\t// to `numCols`: a short `colW` used to leave the trailing columns measuring against a\n\t// zero width. Inches, because that is the unit each paged table's `colW` takes; the grid\n\t// rides out on every `TableRowSlide` rather than being written back onto the caller's bag.\n\tcolWidthsIn = resolveTableColWidthsEmu(tableProps.colW, emuSlideTabW, numCols).map(\n\t\t(emu: number) => emu / EMU_PER_INCH\n\t)\n\n\t// Resolve a row's explicit height (inches) from the original `rowH` *array*, keyed by original\n\t// row index. A single-number `rowH` is left to propagate via table options (it applies uniformly,\n\t// so it needs no per-row remapping); only the array form is index-sensitive after pagination.\n\t// Whether a slot pins its row is `pinnedRowHeightInches`, the same rule the writer applies to\n\t// the array this builds — a `0` accepted here and rejected there is how the two readings drift.\n\tconst resolveRowH = (origRowIdx: number): number | undefined =>\n\t\tArray.isArray(tableProps.rowH) ? (pinnedRowHeightInches(tableProps.rowH[origRowIdx]) ?? undefined) : undefined\n\n\t/**\n\t * Wrap each of row `iRow`'s cells against the grid columns it covers, and price the row.\n\t *\n\t * The one row measure. The repeated header rows used to be priced by a second copy of it with its\n\t * own column cursor, which ignored the columns a rowspan holds -- the fault `walkTableGrid`\n\t * fixed for the main loop -- and skipped the line-height exemption for a cell that spans rows,\n\t * so a header row inside a rowspan was measured against the wrong columns.\n\t * @param iRow - the row's index in `tableRows`\n\t * @param verbose - dump the wrapping stages, as `addTable({ verbose })` asks\n\t */\n\tfunction measureRow(iRow: number, verbose?: boolean): MeasuredRow {\n\t\tconst row = tableRows[iRow] ?? []\n\t\tconst { topEmu, btmEmu } = rowMarginsEmu(row, tableProps)\n\t\t// Cells are keyed to grid columns, not to their position in the row: a colspan earlier in\n\t\t// the row shifts every later cell, and a rowspan opened above skips columns entirely.\n\t\t// Measuring a cell against `colW[iCell]` wrapped its text to another column's width.\n\t\tconst rowPlacements = placements[iRow] ?? []\n\t\tconst cells = row.map((cell, iCell): AutoPageCell => {\n\t\t\t// A row longer than the grid runs off the end of it: those cells are placed nowhere\n\t\t\t// and measure against no column, which is what the cursor did by clamping.\n\t\t\tconst placed = rowPlacements[iCell]\n\t\t\tconst colStart = placed ? placed.col : numCols\n\t\t\tconst cellColspan = placed ? placed.colSpan : resolveSpan(cell.options?.colspan, 'colspan')\n\t\t\t// A spanning cell is as wide as the columns it covers; the seed keeps a row longer than\n\t\t\t// the grid from throwing on an empty slice.\n\t\t\tconst totalColW = colWidthsIn.slice(colStart, colStart + cellColspan).reduce((prev, curr) => prev + curr, 0)\n\t\t\tconst fontSizePt = resolveCellFontSize(cell.options, tableProps)\n\t\t\treturn {\n\t\t\t\t_type: SlideObjectType.tablecell,\n\t\t\t\t_lines: parseTextToLines(cell, totalColW, fontSizePt, resolveCellCharWeight(cell.options, tableProps), verbose),\n\t\t\t\t// A cell that spans rows adds no line height to this one (or a page could break where\n\t\t\t\t// nothing needed it to). The grid's clamped span decides, not the option: `rowspan: 1`\n\t\t\t\t// is a valid \"no span\" that `withCheckedSpans` passes through, and testing the option\n\t\t\t\t// priced every such row at its margins alone.\n\t\t\t\t_lineHeight:\n\t\t\t\t\tplaced && placed.rowSpan > 1 ? 0 : autoPageLineHeightEmu(fontSizePt, tableProps.autoPageLineWeight || 0),\n\t\t\t\ttext: [],\n\t\t\t\toptions: cell.options || {},\n\t\t\t}\n\t\t})\n\t\tconst lineHeightEmu = cells.reduce((max, cell) => Math.max(max, cell._lineHeight), 0)\n\t\tconst maxLines = cells.reduce((max, cell) => Math.max(max, cell._lines.length), 0)\n\t\tconst marginsEmu = topEmu + btmEmu\n\t\treturn { cells, marginsEmu, lineHeightEmu, heightEmu: marginsEmu + maxLines * lineHeightEmu }\n\t}\n\n\t// What the repeated header rows cost a continuation page. Computed once: the rows and the\n\t// grid are the same on every page, so re-measuring per page would only be slower. Both callers\n\t// pass the header rows as the leading rows of `tableRows`, so each is measured at its own index,\n\t// against the grid placements the body rows use.\n\tconst repeatHeaderRows =\n\t\ttableProps.autoPageRepeatHeader && tableProps._arrObjTabHeadRows ? tableProps._arrObjTabHeadRows : []\n\tconst repeatHeaderHeightsEmu = repeatHeaderRows.map((_row, headIdx) => measureRow(headIdx).heightEmu)\n\n\t/**\n\t * The last row of the rowspan group that row `iRow` opens: the furthest row any of its spans\n\t * reaches, extended by every span a covered row opens in turn. `walkTableGrid` has clamped each\n\t * span to the table, so the walk ends inside it.\n\t * @param iRow - the row that opens the group\n\t */\n\tfunction rowSpanGroupEnd(iRow: number): number {\n\t\tlet end = iRow\n\t\tfor (let r = iRow; r <= end; r++) {\n\t\t\tfor (const placement of placements[r] ?? []) end = Math.max(end, r + placement.rowSpan - 1)\n\t\t}\n\t\treturn end\n\t}\n\n\t// STEP 6: **MAIN** Iterate over rows, add table content, create new slides as rows overflow\n\tlet newTableRowSlide: TableRowSlide = {\n\t\trows: [] as TableRowInternal[],\n\t\trowH: [] as Array<number | undefined>,\n\t\tcolW: colWidthsIn,\n\t\ty: startYEmu() / EMU_PER_INCH,\n\t}\n\t/** Rows placed on the working page other than its repeated header rows. */\n\tlet bodyRowsOnPage = 0\n\tlet warnedTallRowSpan = false\n\n\t/**\n\t * Close the working page and open the next: push the page when it has rows, re-derive the page\n\t * height, charge `chargedEmu` to the new page, then repeat the header rows onto it.\n\t * @param chargedEmu - what the new page already owes before its header rows: the margins of a\n\t * row that is starting over here, or nothing\n\t */\n\tfunction startNewPage(chargedEmu: number): void {\n\t\t// Never push an empty page: a row that does not fit yet has no content here, and an empty\n\t\t// `rows` slide crashes the recursive addTable.\n\t\tif (newTableRowSlide.rows.length > 0) tableRowSlides.push(newTableRowSlide)\n\t\t// Decided after the push: the page just closed is what makes this one a continuation.\n\t\tnewTableRowSlide = {\n\t\t\trows: [],\n\t\t\trowH: [] as Array<number | undefined>,\n\t\t\tcolW: colWidthsIn,\n\t\t\ty: startYEmu() / EMU_PER_INCH,\n\t\t}\n\t\tbodyRowsOnPage = 0\n\t\t// The page height depends on which page this is, so it is re-derived for the new one.\n\t\tcalcSlideTabH()\n\t\t// ORDER IS LOAD-BEARING. The charge used to be added and then wiped by the reset, so the first\n\t\t// row of every continuation slide was the only row in the table that paid no margin. That let\n\t\t// a continuation slide accept one row more than it had room for, and the extra row hung off\n\t\t// the bottom of the slide (upstream gitbrent/PptxGenJS#1200). The symptom is easy to miss\n\t\t// because the pager is *self*-consistent per slide: it only shows up as the first slide and\n\t\t// the continuation slides disagreeing about how many identical rows fit the identical space,\n\t\t// which is what test/regression/table/table-autopage-continuation-budget.test.ts pins.\n\t\temuTabCurrH = chargedEmu\n\t\tif (tableProps.verbose)\n\t\t\tconsole.log(\n\t\t\t\t`| SLIDE [${tableRowSlides.length}]: emuSlideTabH ...... = ${(emuSlideTabH / EMU_PER_INCH).toFixed(1)} `\n\t\t\t)\n\t\trepeatHeaderRows.forEach((headRow, headIdx) => {\n\t\t\tnewTableRowSlide.rows.push([...headRow])\n\t\t\t// Repeated header rows are the original leading rows, so carry their configured height.\n\t\t\tnewTableRowSlide.rowH?.push(resolveRowH(headIdx))\n\t\t\temuTabCurrH += repeatHeaderHeightsEmu[headIdx] ?? 0\n\t\t})\n\t}\n\n\ttableRows.forEach((row, iRow) => {\n\t\t// A: Row variables — detect active rowspan at the start of this row so we can\n\t\t// suppress page breaks that would split a rowspan group across slides.\n\t\tconst hasActiveRowSpan = spannedFromAbove(iRow)\n\t\t// B: Create new row in data model\n\t\tlet currTableRow: TableRowInternal = []\n\t\trow.forEach((cell) => currTableRow.push(workingCell([], cell.options)))\n\n\t\t// C: Calc usable vertical space/table height. Set default value first, adjust below when necessary.\n\t\tcalcSlideTabH()\n\t\tif (tableProps.verbose && iRow === 0)\n\t\t\tconsole.log(\n\t\t\t\t`| SLIDE [${tableRowSlides.length}]: emuSlideTabH ...... = ${(emuSlideTabH / EMU_PER_INCH).toFixed(1)} `\n\t\t\t)\n\n\t\t// C-2: A row that opens a rowspan is kept with the rows the span covers. Breaking a page\n\t\t// partway through it left the partial row as the page's last row still carrying `rowSpan`,\n\t\t// so the emitter wrote a `rowSpan=\"2\"` with no row under it -- the state PowerPoint reports\n\t\t// as corrupt. The whole group is priced before any of its lines is taken: when it does not\n\t\t// fit under rows already on the page, the page breaks before it, and a group taller than a\n\t\t// page is emitted whole on a page of its own.\n\t\tconst startsRowSpan = !hasActiveRowSpan && (placements[iRow] ?? []).some((placement) => placement.rowSpan > 1)\n\t\tif (startsRowSpan) {\n\t\t\tlet groupHeightEmu = 0\n\t\t\tfor (let r = iRow; r <= rowSpanGroupEnd(iRow); r++) groupHeightEmu += measureRow(r).heightEmu\n\t\t\tif (bodyRowsOnPage > 0 && emuTabCurrH + groupHeightEmu > emuSlideTabH) startNewPage(0)\n\t\t\tif (emuTabCurrH + groupHeightEmu > emuSlideTabH && !warnedTallRowSpan) {\n\t\t\t\twarn(\n\t\t\t\t\t'table/autopage-rowspan-too-tall',\n\t\t\t\t\t'addTable/autoPage: a group of rows joined by a rowspan is taller than a page; it is kept on one page and runs past its bottom. Reduce the span or the text in it.'\n\t\t\t\t)\n\t\t\t\twarnedTallRowSpan = true\n\t\t\t}\n\t\t}\n\t\tconst keepRowTogether = hasActiveRowSpan || startsRowSpan\n\n\t\t// D: --==[[ BUILD DATA SET ]]==-- (split each cell's text into lines, set its line height)\n\t\tconst {\n\t\t\tcells: rowCellLines,\n\t\t\tmarginsEmu: rowMarginsTotalEmu,\n\t\t\tlineHeightEmu: emuLineMaxH,\n\t\t} = measureRow(iRow, tableProps.verbose)\n\t\temuTabCurrH += rowMarginsTotalEmu // Start row height with margins\n\n\t\t/** E: --==[[ PAGE DATA SET ]]==--\n\t\t * Add text one-line-a-time to this row's cells until: lines are exhausted OR table height limit is hit\n\t\t *\n\t\t * Design:\n\t\t * - Building cells L-to-R/loop style wont work as one could be 100 lines and another 1 line\n\t\t * - Therefore, build the whole row, one-line-at-a-time, across each table columns\n\t\t * - Then, when the vertical size limit is hit is by any of the cells, make a new slide and continue adding any remaining lines\n\t\t *\n\t\t * Implementation:\n\t\t * - `rowCellLines` is an array of cells, one for each column in the table, with each cell containing an array of lines\n\t\t *\n\t\t * Sample Data:\n\t\t * - `rowCellLines` ..: [ TableCellInternal, TableCellInternal, TableCellInternal ]\n\t\t * - `TableCellInternal` .....: { _type: 'tablecell', _lines: TableCellInternal[], _lineHeight: 10 }\n\t\t * - `_lines` ........: [ {_type: 'tablecell', text: 'cell-1,line-1', options: {…}}, {_type: 'tablecell', text: 'cell-1,line-2', options: {…}} }\n\t\t * - `_lines` is TableCellInternal[] (the 1-N words in the line)\n\t\t * {\n\t\t * _lines: [{ text:'cell-1,line-1' }, { text:'cell-1,line-2' }], // TOTAL-CELL-HEIGHT = 2\n\t\t * _lines: [{ text:'cell-2,line-1' }, { text:'cell-2,line-2' }], // TOTAL-CELL-HEIGHT = 2\n\t\t * _lines: [{ text:'cell-3,line-1' }, { text:'cell-3,line-2' }, { text:'cell-3,line-3' }, { text:'cell-3,line-4' }], // TOTAL-CELL-HEIGHT = 4\n\t\t * }\n\t\t *\n\t\t * Example: 2 rows, with the firstrow overflowing onto a new slide\n\t\t * SLIDE 1:\n\t\t * |--------|--------|--------|--------|\n\t\t * | line-1 | line-1 | line-1 | line-1 |\n\t\t * | | | line-2 | |\n\t\t * | | | line-3 | |\n\t\t * |--------|--------|--------|--------|\n\t\t *\n\t\t * SLIDE 2:\n\t\t * |--------|--------|--------|--------|\n\t\t * | | | line-4 | |\n\t\t * |--------|--------|--------|--------|\n\t\t * | line-1 | line-1 | line-1 | line-1 |\n\t\t * |--------|--------|--------|--------|\n\t\t */\n\t\tif (tableProps.verbose) console.log(`\\n| SLIDE [${tableRowSlides.length}]: ROW [${iRow}]: START...`)\n\t\tlet currCellIdx = 0\n\t\tlet isDone = false\n\t\twhile (!isDone) {\n\t\t\tconst srcCell = rowCellLines[currCellIdx]\n\t\t\tif (!srcCell) break\n\t\t\tlet tgtCell = currTableRow[currCellIdx] // NOTE: may be redefined below (a new row may be created, thus changing this value)\n\n\t\t\t// 2: create a new slide if there is insufficient room for the current row,\n\t\t\t// but never break inside a rowspan group — keep spanned rows together.\n\t\t\tif (emuTabCurrH + emuLineMaxH > emuSlideTabH && !keepRowTogether) {\n\t\t\t\tif (tableProps.verbose) {\n\t\t\t\t\tconsole.log('\\n|-----------------------------------------------------------------------|')\n\t\t\t\t\t// prettier-ignore\n\t\t\t\t\tconsole.log(`|-- NEW SLIDE CREATED (currTabH+currLineH > maxH) => ${(emuTabCurrH / EMU_PER_INCH).toFixed(2)} + ${(srcCell._lineHeight / EMU_PER_INCH).toFixed(2)} > ${emuSlideTabH / EMU_PER_INCH}`)\n\t\t\t\t\tconsole.log('|-----------------------------------------------------------------------|\\n\\n')\n\t\t\t\t}\n\n\t\t\t\t// A: add current row slide or it will be lost (only if it has rows and text)\n\t\t\t\tif (\n\t\t\t\t\tcurrTableRow.length > 0 &&\n\t\t\t\t\tcurrTableRow.map((cell) => (Array.isArray(cell.text) ? cell.text.length : 0)).reduce((p, n) => p + n) > 0\n\t\t\t\t) {\n\t\t\t\t\tnewTableRowSlide.rows.push(currTableRow)\n\t\t\t\t\tnewTableRowSlide.rowH?.push(resolveRowH(iRow))\n\t\t\t\t}\n\n\t\t\t\t// B: open the next page. The row is starting over there, so it owes its cell margins\n\t\t\t\t// again.\n\t\t\t\tstartNewPage(rowMarginsTotalEmu)\n\n\t\t\t\t// C: reset working/curr row\n\t\t\t\tcurrTableRow = []\n\t\t\t\trow.forEach((cell) => currTableRow.push(workingCell([], cell.options)))\n\n\t\t\t\ttgtCell = currTableRow[currCellIdx]\n\t\t\t}\n\n\t\t\t// 3: set array of words that comprise this line\n\t\t\tconst currLine = srcCell._lines.shift()\n\n\t\t\t// 4: create new line by adding all words from curr line (or add empty if there are no words to avoid \"needs repair\" issue triggered when cells have null content)\n\t\t\tif (tgtCell && Array.isArray(tgtCell.text)) {\n\t\t\t\tif (currLine) tgtCell.text = tgtCell.text.concat(currLine)\n\t\t\t\telse if (tgtCell.text.length === 0)\n\t\t\t\t\ttgtCell.text = tgtCell.text.concat({ _type: SlideObjectType.tablecell, text: '' })\n\t\t\t\t// IMPORTANT: ^^^ add empty if there are no words to avoid \"needs repair\" issue triggered when cells have null content\n\t\t\t}\n\n\t\t\t// 5: increase table height by the curr line height (if we're on the last column)\n\t\t\tif (currCellIdx === rowCellLines.length - 1) emuTabCurrH += emuLineMaxH\n\n\t\t\t// 6: advance column/cell index (or circle back to first one to continue adding lines)\n\t\t\tcurrCellIdx = currCellIdx < rowCellLines.length - 1 ? currCellIdx + 1 : 0\n\n\t\t\t// 7: WIP: done?\n\t\t\tconst brent = rowCellLines.map((cell) => cell._lines.length).reduce((prev, next) => prev + next)\n\t\t\tif (brent === 0) isDone = true\n\t\t}\n\n\t\t// F: Flush/capture row buffer before it resets at the top of this loop.\n\t\t//\n\t\t// A row that states no cells is kept only when every one of its grid columns is held by a\n\t\t// rowspan from above. That is a real row -- a source row states only the cells it *starts*,\n\t\t// so one entirely covered from above states none at all, which is what `<tr></tr>` between\n\t\t// two spanned rows means -- and the emitter fills it with `vMerge` continuations. Dropping\n\t\t// it moved every later row up one while the emitter went on synthesizing that grid row's\n\t\t// continuations, so they landed in the next row's `<a:tr>`: a 2-column table came out with\n\t\t// a 4-cell row.\n\t\t//\n\t\t// An empty row NOT covered that way is a different thing and is still dropped: nothing\n\t\t// would fill it, and a `<a:tr>` carrying fewer `<a:tc>` than the grid has columns is the\n\t\t// malformation PowerPoint offers to repair.\n\t\tif (currTableRow.length > 0 || (row.length === 0 && coveredFromAbove(iRow) === numCols)) {\n\t\t\tnewTableRowSlide.rows.push(currTableRow)\n\t\t\tnewTableRowSlide.rowH?.push(resolveRowH(iRow))\n\t\t\tbodyRowsOnPage++\n\t\t}\n\n\t\tif (tableProps.verbose) {\n\t\t\tconsole.log(\n\t\t\t\t`- SLIDE [${tableRowSlides.length}]: ROW [${iRow}]: ...COMPLETE ...... emuTabCurrH = ${(emuTabCurrH / EMU_PER_INCH).toFixed(2)} ( emuSlideTabH = ${(\n\t\t\t\t\temuSlideTabH / EMU_PER_INCH\n\t\t\t\t).toFixed(2)} )`\n\t\t\t)\n\t\t}\n\t})\n\n\t// STEP 7: Flush buffer / add final slide (skip an empty trailing buffer; always keep at least\n\t// one slide so a non-empty table is never reduced to zero pages)\n\tif (newTableRowSlide.rows.length > 0 || tableRowSlides.length === 0) tableRowSlides.push(newTableRowSlide)\n\n\tif (tableProps.verbose) {\n\t\tconsole.log('\\n|================================================|')\n\t\tconsole.log(`| FINAL: tableRowSlides.length = ${tableRowSlides.length}`)\n\t\ttableRowSlides.forEach((slide) => console.log(slide))\n\t\tconsole.log('|================================================|\\n\\n')\n\t}\n\n\t// LAST:\n\treturn tableRowSlides\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAoDA,SAAS,YAAY,MAAoC,SAAwD;CAChH,OAAO,YAAY,KAAA,IAChB;EAAE,OAAA;EAAkC;CAAK,IACzC;EAAE,OAAA;EAAkC;EAAM;CAAQ;AACtD;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,SAAS,iBACR,MACA,UACA,YACA,YACA,SACwB;CAKxB,MAAM,OAAO,MAAM;CAOnB,MAAM,MAAM,KAAK,MAAM,WAAA,EAA0B,KAAK,aAAa;CAKnE,IAAI,SAAS,QAAQ,IAAI,kBAAkB,SAAS,cAAc,WAAW,QAAQ,KAAK,OAAO,KAAK;CAEtG,MAAM,cAAqC,CAAC;CAC5C,IAAI,aAAkC,CAAC;CACvC,MAAM,cAAqC,CAAC;CAC5C,MAAM,cAAqC,CAAC;;;;;;;;;;;;;;;CAmB5C,IAAI,KAAK,QAAQ,KAAK,KAAK,SAAS,CAAC,CAAC,KAAK,CAAC,CAAC,WAAW,GAEvD,WAAW,KAAK;EAAE,OAAA;EAAkC,MAAM;CAAI,CAAC;MACzD,IAAI,OAAO,KAAK,SAAS,YAAY,OAAO,KAAK,SAAS,UAChE,WAAW,KAAK;EAAE,OAAA;EAAkC,OAAO,KAAK,QAAQ,GAAA,CAAI,SAAS,CAAC,CAAC,KAAK;CAAE,CAAC;MACzF,IAAI,MAAM,QAAQ,KAAK,IAAI,GACjC,aAAa,KAAK;CAEnB,IAAI,SAAS;EACZ,QAAQ,IAAI,kBAAkB;EAC9B,WAAW,SAAS,MAAM,QAAQ,QAAQ,IAAI,UAAU,MAAM,EAAE,UAAU,KAAK,UAAU,IAAI,GAAG,CAAC;CAClG;;;;;;;CASA,IAAI,UAA+B,CAAC;CACpC,WAAW,SAAS,SAAS;EAC5B,IAAI,OAAO,KAAK,SAAS,UAAU;EAEnC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  * PowerPoint's default `a:bodyPr` text insets.
@@ -51,4 +51,4 @@ const BODY_INSET_DEFAULTS_EMU = {
51
51
  //#endregion
52
52
  export { BODY_INSET_DEFAULTS_IN as n, BODY_INSET_DEFAULTS_PT as r, BODY_INSET_DEFAULTS_EMU as t };
53
53
 
54
- //# sourceMappingURL=body-insets-kVHmjGc6.js.map
54
+ //# sourceMappingURL=body-insets-CRTz4dbM.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"body-insets-kVHmjGc6.js","names":[],"sources":["../src/ooxml/body-insets.ts"],"sourcesContent":["/**\n * PowerPoint's default `a:bodyPr` text insets.\n *\n * ECMA-376 §21.1.2.1.1 states them in prose; the XSD leaves `lIns`/`tIns`/`rIns`/`bIns`\n * optional with no schema default, so a reader that wants to know what an omitted side is\n * inset by has to carry the numbers itself. Four places did, in three units and two orders:\n * the script mapper as a points record, the round-trip canonicaliser as an inches tuple in\n * `[top, right, bottom, left]`, `inspect.ts` as two inch scalars, and the measured-fit\n * solver as two EMU scalars — that last one deciding the inner box every `autoFit` is\n * computed against, so a correction here would have left every fit decision on the old\n * numbers.\n *\n * The canonicaliser's tuple in particular has to be exactly `pointsToInches` of the mapper's\n * record, or `isDefaultMargin` stops matching and every text frame that spells its insets\n * reports four spurious differences. Nothing linked them; this module is the link.\n *\n * It is a fact about the schema, so — like `st-enums.ts` — it belongs to neither `gen/` nor\n * `read/` nor `script/`.\n */\n\nimport { EMU_PER_POINT, POINTS_PER_INCH } from './emu.js'\n\n/** The four default insets in points: 7.2pt (0.1in) left and right, 3.6pt (0.05in) top and bottom. */\nexport const BODY_INSET_DEFAULTS_PT = { left: 7.2, right: 7.2, top: 3.6, bottom: 3.6 } as const\n\n/**\n * The same four in inches, in the write API's `margin` order — `[top, right, bottom, left]`.\n *\n * Derived rather than transcribed, so it cannot drift from {@link BODY_INSET_DEFAULTS_PT}.\n */\nexport const BODY_INSET_DEFAULTS_IN: readonly number[] = [\n\tBODY_INSET_DEFAULTS_PT.top / POINTS_PER_INCH,\n\tBODY_INSET_DEFAULTS_PT.right / POINTS_PER_INCH,\n\tBODY_INSET_DEFAULTS_PT.bottom / POINTS_PER_INCH,\n\tBODY_INSET_DEFAULTS_PT.left / POINTS_PER_INCH,\n]\n\n/**\n * The same four in EMU, which is the unit the measured-fit solver works in.\n *\n * Derived rather than transcribed, for the same reason {@link BODY_INSET_DEFAULTS_IN} is.\n */\nexport const BODY_INSET_DEFAULTS_EMU = {\n\tleft: BODY_INSET_DEFAULTS_PT.left * EMU_PER_POINT,\n\tright: BODY_INSET_DEFAULTS_PT.right * EMU_PER_POINT,\n\ttop: BODY_INSET_DEFAULTS_PT.top * EMU_PER_POINT,\n\tbottom: BODY_INSET_DEFAULTS_PT.bottom * EMU_PER_POINT,\n} as const\n\n/**\n * A table cell's default text insets in EMU. They happen to equal {@link BODY_INSET_DEFAULTS_EMU}.\n * Declared in `table-cell-margins.ts`, which imports nothing, so the write path's inch defaults can\n * derive from it without bringing this module along.\n */\nexport { TABLE_CELL_MARGIN_DEFAULTS_EMU } from './table-cell-margins.js'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAuBA,MAAa,yBAAyB;CAAE,MAAM;CAAK,OAAO;CAAK,KAAK;CAAK,QAAQ;AAAI;;;;;;AAOrF,MAAa,yBAA4C;CACxD,uBAAuB,MAAA;CACvB,uBAAuB,QAAA;CACvB,uBAAuB,SAAA;CACvB,uBAAuB,OAAA;AACxB;;;;;;AAOA,MAAa,0BAA0B;CACtC,MAAM,uBAAuB,OAAO;CACpC,OAAO,uBAAuB,QAAQ;CACtC,KAAK,uBAAuB,MAAM;CAClC,QAAQ,uBAAuB,SAAS;AACzC"}
1
+ {"version":3,"file":"body-insets-CRTz4dbM.js","names":[],"sources":["../src/ooxml/body-insets.ts"],"sourcesContent":["/**\n * PowerPoint's default `a:bodyPr` text insets.\n *\n * ECMA-376 §21.1.2.1.1 states them in prose; the XSD leaves `lIns`/`tIns`/`rIns`/`bIns`\n * optional with no schema default, so a reader that wants to know what an omitted side is\n * inset by has to carry the numbers itself. Four places did, in three units and two orders:\n * the script mapper as a points record, the round-trip canonicaliser as an inches tuple in\n * `[top, right, bottom, left]`, `inspect.ts` as two inch scalars, and the measured-fit\n * solver as two EMU scalars — that last one deciding the inner box every `autoFit` is\n * computed against, so a correction here would have left every fit decision on the old\n * numbers.\n *\n * The canonicaliser's tuple in particular has to be exactly `pointsToInches` of the mapper's\n * record, or `isDefaultMargin` stops matching and every text frame that spells its insets\n * reports four spurious differences. Nothing linked them; this module is the link.\n *\n * It is a fact about the schema, so — like `st-enums.ts` — it belongs to neither `gen/` nor\n * `read/` nor `script/`.\n */\n\nimport { EMU_PER_POINT, POINTS_PER_INCH } from './emu.js'\n\n/** The four default insets in points: 7.2pt (0.1in) left and right, 3.6pt (0.05in) top and bottom. */\nexport const BODY_INSET_DEFAULTS_PT = { left: 7.2, right: 7.2, top: 3.6, bottom: 3.6 } as const\n\n/**\n * The same four in inches, in the write API's `margin` order — `[top, right, bottom, left]`.\n *\n * Derived rather than transcribed, so it cannot drift from {@link BODY_INSET_DEFAULTS_PT}.\n */\nexport const BODY_INSET_DEFAULTS_IN: readonly number[] = [\n\tBODY_INSET_DEFAULTS_PT.top / POINTS_PER_INCH,\n\tBODY_INSET_DEFAULTS_PT.right / POINTS_PER_INCH,\n\tBODY_INSET_DEFAULTS_PT.bottom / POINTS_PER_INCH,\n\tBODY_INSET_DEFAULTS_PT.left / POINTS_PER_INCH,\n]\n\n/**\n * The same four in EMU, which is the unit the measured-fit solver works in.\n *\n * Derived rather than transcribed, for the same reason {@link BODY_INSET_DEFAULTS_IN} is.\n */\nexport const BODY_INSET_DEFAULTS_EMU = {\n\tleft: BODY_INSET_DEFAULTS_PT.left * EMU_PER_POINT,\n\tright: BODY_INSET_DEFAULTS_PT.right * EMU_PER_POINT,\n\ttop: BODY_INSET_DEFAULTS_PT.top * EMU_PER_POINT,\n\tbottom: BODY_INSET_DEFAULTS_PT.bottom * EMU_PER_POINT,\n} as const\n\n/**\n * A table cell's default text insets in EMU. They happen to equal {@link BODY_INSET_DEFAULTS_EMU}.\n * Declared in `table-cell-margins.ts`, which imports nothing, so the write path's inch defaults can\n * derive from it without bringing this module along.\n */\nexport { TABLE_CELL_MARGIN_DEFAULTS_EMU } from './table-cell-margins.js'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAuBA,MAAa,yBAAyB;CAAE,MAAM;CAAK,OAAO;CAAK,KAAK;CAAK,QAAQ;AAAI;;;;;;AAOrF,MAAa,yBAA4C;CACxD,uBAAuB,MAAA;CACvB,uBAAuB,QAAA;CACvB,uBAAuB,SAAA;CACvB,uBAAuB,OAAA;AACxB;;;;;;AAOA,MAAa,0BAA0B;CACtC,MAAM,uBAAuB,OAAO;CACpC,OAAO,uBAAuB,QAAQ;CACtC,KAAK,uBAAuB,MAAM;CAClC,QAAQ,uBAAuB,SAAS;AACzC"}
package/dist/browser.d.ts CHANGED
@@ -1,19 +1,19 @@
1
1
  import { C as isChartType, S as isChartExType, _ as VALID_SHAPE_PRESETS, a as CONNECTOR_PRESET_NAME, b as asChartType, c as PLACEHOLDER_TYPE, d as SHAPE_NAME, f as SchemeColor, g as TextAnchor, h as TableStyle, i as CHART_NAME, l as PlaceholderType, m as SlideObjectType, n as AlignV, o as ChartType, p as ShapeType, r as BulletType, s as OutputType, t as AlignH, u as SCHEME_COLORS, v as WRITE_OUTPUT_TYPE, x as connectorPresetFor, y as ZIP_OUTPUT_TYPE } from "./enums-DQRpVOLh.js";
2
- import { $ as ChartOpts, $t as ShapeAdjustHandleXY, A as RadialGradientFillProps, At as NotesProps, B as ShadowProps, Bt as TextGlowProps, C as HexColor, Ct as OptsChartGridLine, D as PatternFillProps, Dt as PlaceholderProps, E as Margin, Et as ObjectNameProps, F as ConnectorProps, Ft as TableCellLayout, G as ChartAxisTickMark, Gt as textRuns, H as ShapeLineProps, Ht as TextProps, I as ConnectorType, It as TableLayoutResult, J as ChartExBinning, Jt as MediaProps, K as ChartDataPointStyle, Kt as ImageBaseProps, L as FillOption, Lt as TextBaseProps, M as ThemeColor, Mt as OverflowBoxOptions, N as VAlign, Nt as ResolvedCommentAuthor, O as PatternPreset, Ot as CommentProps, P as BorderProps, Pt as SlideComment, Q as ChartMulti, Qt as ShapeAdjustHandlePolar, R as HyperlinkActionJump, Rt as TextBulletProps, S as HAlign, St as OptsChartData, T as LinearGradientFillProps, Tt as ObjectLockProps, U as StrokeProps, Ut as TextPropsOptions, V as ShapeFillProps, Vt as TextMeasurement, W as ChartAreaProps, Wt as textRun, X as ChartExStatistics, Xt as OleObjectProps, Y as ChartExGeography, Yt as MediaType, Z as ChartLineDash, Zt as ShapeAdjustHandle, _ as DataOrPathProps, _n as RadarStyle, _t as ChartPropsFillLine, a as PresentationProps, an as BarDirection, at as ChartPropsChartBoxWhisker, b as GradientFillProps, bt as ChartSeriesOpts, c as WriteFileProps, ct as ChartPropsChartLine, d as ThemeColorScheme, dt as ChartPropsChartRegionMap, en as ShapeAdjustValue, et as ChartPropsAxisCat, f as ThemeProps, fn as LegendPosition, ft as ChartPropsChartStock, g as Coord, gn as PresetMaterialType, gt as ChartPropsDataTable, h as Color, hn as LineDataSymbol, ht as ChartPropsDataLabel, i as PresLayout, in as Bar3DShape, it as ChartPropsChartBar, j as TextVertType, jt as NotesTextOptions, k as PositionProps, kt as MeasureTextOptions, l as WriteOutputMap, ln as DataLabelPosition, lt as ChartPropsChartPie, m as BackgroundProps, mn as LightRigType, mt as ChartPropsChartWaterfall, n as PackagePart, nn as ShapeGuide, nt as ChartPropsAxisVal, o as SectionProps, on as BarGrouping, ot as ChartPropsChartDoughnut, p as BackgroundOption, pn as LightRigDirection, pt as ChartPropsChartSurface, q as ChartErrorBarOptions, qt as ImageProps, r as PartsProps, rn as ShapeProps, rt as ChartPropsBase, s as WriteBaseProps, sn as BevelPresetType, st as ChartPropsChartHistogram, t as CustomPropertyValue, tn as ShapeConnectionSite, tt as ChartPropsAxisSer, u as WriteProps, un as DisplayBlanksAs, ut as ChartPropsChartRadar, v as DataOrPathRequiredProps, vn as RadarStyleAlias, vt as ChartPropsLegend, w as ImageFillProps, wn as TimeUnit, wt as CommonObjectDescriptor, x as GradientStopProps, xt as LineCap, y as GeometryPoint, yt as ChartPropsTitle, z as HyperlinkProps, zt as TextFitShrinkProps } from "./pres-BA9_lJbY.js";
3
- import { A as TableCellDiagonals, C as AnimationTrigger, D as TransitionType, E as TransitionSoundProps, F as TableToSlidesDocument, I as TableToSlidesElement, L as TableToSlidesProps, M as TableProps, N as TableRow, O as TableCell, P as TableRowSlide, S as AnimationProps, T as TransitionProps, _ as MasterTextStyleProps, a as Slide, b as SlideMasterProps, c as SectionZoomProps, d as ZoomBaseProps, f as Model3dCameraProps, g as MasterTextStyleLevel, h as MasterBulletProps, i as ObjectOptions, j as TableCellProps, k as TableCell3DProps, l as SlideZoomProps, m as Model3dProps, n as GroupChildProps, o as SlideLayout, p as Model3dPoint, r as GroupProps, s as SlideObjectInfo, t as AddSlideProps, u as SummaryZoomProps, v as SlideMasterChartProps, w as PresetEffect, x as SlideNumberProps, y as SlideMasterObject } from "./slide-BqPtyKmb.js";
4
- import { _ as PackageReadErrorCode, a as InternalError, c as PackageReadError, d as UnsupportedFeatureError, f as DiagnosticCode, g as MediaErrorCode, h as InvalidOptionErrorCode, i as setDiagnosticHandler, l as TsPptxError, m as InternalErrorCode, n as DiagnosticHandler, o as InvalidOptionError, p as ErrorCode, r as resetDiagnosticState, s as MediaError, t as Diagnostic, u as TsPptxErrorOptions, v as TsPptxCode, y as UnsupportedFeatureErrorCode } from "./diagnostics-DiMmBU8P.js";
5
- import { A as pixelsToEmu, C as StandardLayoutName, D as emuToPoints, E as emuToPixels, M as ptToHundredths, O as inchesToEmu, S as StandardLayout, T as emuToInches, _ as HUNDREDTHS_PER_POINT, b as PERCENT_SCALE, c as ConstructFamily, g as FIXED_PCT_PER_PERCENT, h as Emu, i as ComposedSlide, j as pointsToEmu, k as percentToEmu, m as DEFAULT_PX_PER_INCH, n as Composed, p as ANGLE_UNITS_PER_DEGREE, r as ComposedPresentation, s as PresentationCore, t as ComposeOptions, v as MAX_COORDINATE_EMU, w as coordToEmu, x as STANDARD_LAYOUTS, y as MIN_COORDINATE_EMU } from "./entry-compose-6hF9aTmT.js";
6
- import { a as EMU_PER_INCH, i as clipPath, n as FlatSide, o as EMU_PER_POINT, r as HalfDiscPreset, s as POINTS_PER_INCH, t as ClipShape } from "./clip-DHDlnHUq.js";
2
+ import { $ as ChartExBinning, $t as ImageBaseProps, A as PositionProps, At as ObjectLockProps, B as HyperlinkActionJump, Bt as ResolvedCommentAuthor, C as HexColor, Ct as ChartPropsLegend, D as PatternFillProps, Dt as OptsChartData, E as Margin, En as RadarStyleAlias, Et as LineCap, F as ActionHyperlinkProps, Ft as CommentProps, G as ShapeLineProps, Gt as TextBulletProps, H as HyperlinkProps, Ht as TableCellLayout, I as BorderProps, It as MeasureTextOptions, J as UrlHyperlinkProps, Jt as TextMeasurement, K as SlideHyperlinkProps, Kt as TextFitShrinkProps, L as ConnectorProps, Lt as NotesProps, M as TextVertType, Mn as TimeUnit, Mt as PlaceholderBinding, N as ThemeColor, Nt as PlaceholderOption, O as PatternPreset, Ot as OptsChartGridLine, P as VAlign, Pt as PlaceholderProps, Q as ChartErrorBarOptions, Qt as textRuns, R as ConnectorType, Rt as NotesTextOptions, S as HAlign, Sn as LineDataSymbol, St as ChartPropsFillLine, T as LinearGradientFillProps, Tn as RadarStyle, Tt as ChartSeriesOpts, U as ShadowProps, Ut as TableLayoutResult, V as HyperlinkBaseProps, Vt as SlideComment, W as ShapeFillProps, Wt as TextBaseProps, X as ChartAxisTickMark, Xt as TextPropsOptions, Y as ChartAreaProps, Yt as TextProps, Z as ChartDataPointStyle, Zt as textRun, _ as DataOrPathProps, _n as DisplayBlanksAs, _t as ChartPropsChartStock, a as PresentationProps, an as ShapeAdjustHandlePolar, at as ChartPropsAxisCat, b as GradientFillProps, bn as LightRigDirection, bt as ChartPropsDataLabel, c as WriteFileProps, cn as ShapeConnectionSite, ct as ChartPropsBase, d as ThemeColorScheme, dn as Bar3DShape, dt as ChartPropsChartDoughnut, en as ImageProps, et as ChartExGeography, f as ThemeProps, fn as BarDirection, ft as ChartPropsChartHistogram, g as Coord, gn as DataLabelPosition, gt as ChartPropsChartRegionMap, h as Color, ht as ChartPropsChartRadar, i as PresLayout, in as ShapeAdjustHandle, it as ChartOpts, j as RadialGradientFillProps, jt as ObjectNameProps, k as PlaceholderPositionProps, kt as CommonObjectDescriptor, l as WriteOutputMap, ln as ShapeGuide, lt as ChartPropsChartBar, m as BackgroundProps, mn as BevelPresetType, mt as ChartPropsChartPie, n as PackagePart, nn as MediaType, nt as ChartLineDash, o as SectionProps, on as ShapeAdjustHandleXY, ot as ChartPropsAxisSer, p as BackgroundOption, pn as BarGrouping, pt as ChartPropsChartLine, q as StrokeProps, qt as TextGlowProps, r as PartsProps, rn as OleObjectProps, rt as ChartMulti, s as WriteBaseProps, sn as ShapeAdjustValue, st as ChartPropsAxisVal, t as CustomPropertyValue, tn as MediaProps, tt as ChartExStatistics, u as WriteProps, un as ShapeProps, ut as ChartPropsChartBoxWhisker, v as DataOrPathRequiredProps, vt as ChartPropsChartSurface, w as ImageFillProps, wn as PresetMaterialType, wt as ChartPropsTitle, x as GradientStopProps, xn as LightRigType, xt as ChartPropsDataTable, y as GeometryPoint, yn as LegendPosition, yt as ChartPropsChartWaterfall, z as FillOption, zt as OverflowBoxOptions } from "./pres-3fR4qGHf.js";
3
+ import { A as TableCellDiagonals, C as AnimationTrigger, D as TransitionType, E as TransitionSoundProps, F as TableToSlidesDocument, I as TableToSlidesElement, L as TableToSlidesProps, M as TableProps, N as TableRow, O as TableCell, P as TableRowSlide, S as AnimationProps, T as TransitionProps, _ as MasterTextStyleProps, a as Slide, b as SlideMasterProps, c as SectionZoomProps, d as ZoomBaseProps, f as Model3dCameraProps, g as MasterTextStyleLevel, h as MasterBulletProps, i as ObjectOptions, j as TableCellProps, k as TableCell3DProps, l as SlideZoomProps, m as Model3dProps, n as GroupChildProps, o as SlideLayout, p as Model3dPoint, r as GroupProps, s as SlideObjectInfo, t as AddSlideProps, u as SummaryZoomProps, v as SlideMasterChartProps, w as PresetEffect, x as SlideNumberProps, y as SlideMasterObject } from "./slide-C4I0dA2b.js";
4
+ import { S as UnsupportedFeatureErrorCode, _ as InternalErrorCode, a as TsPptxCode, b as PackageReadErrorCode, c as InternalError, d as PackageReadError, f as PptxTsError, g as ErrorCode, h as DiagnosticCode, i as setDiagnosticHandler, l as InvalidOptionError, m as UnsupportedFeatureError, n as DiagnosticHandler, o as TsPptxError, p as PptxTsErrorOptions, r as resetDiagnosticState, s as TsPptxErrorOptions, t as Diagnostic, u as MediaError, v as InvalidOptionErrorCode, x as PptxTsCode, y as MediaErrorCode } from "./diagnostics-KFkofYBc.js";
5
+ import { A as pixelsToEmu, C as StandardLayoutName, D as emuToPoints, E as emuToPixels, M as ptToHundredths, O as inchesToEmu, S as StandardLayout, T as emuToInches, _ as HUNDREDTHS_PER_POINT, b as PERCENT_SCALE, c as ConstructFamily, g as FIXED_PCT_PER_PERCENT, h as Emu, i as ComposedSlide, j as pointsToEmu, k as percentToEmu, m as DEFAULT_PX_PER_INCH, n as Composed, p as ANGLE_UNITS_PER_DEGREE, r as ComposedPresentation, s as PresentationCore, t as ComposeOptions, v as MAX_COORDINATE_EMU, w as coordToEmu, x as STANDARD_LAYOUTS, y as MIN_COORDINATE_EMU } from "./entry-compose-BOzZ9J5K.js";
6
+ import { a as EMU_PER_INCH, i as clipPath, n as FlatSide, o as EMU_PER_POINT, r as HalfDiscPreset, s as POINTS_PER_INCH, t as ClipShape } from "./clip-BajRBqRR.js";
7
7
  //#region src/browser.d.ts
8
8
  /**
9
9
  * The browser entry, reached through the `browser` export condition — a bundler resolving the
10
10
  * bare `pptx-ts` specifier for the web lands here without naming this subpath.
11
11
  *
12
12
  * Same authoring API as every other entry (see `entry-surface.ts`), plus one method that only
13
- * makes sense with a live DOM: {@link TsPptx.tableToSlides}. `writeFile` triggers a download
13
+ * makes sense with a live DOM: {@link PptxTs.tableToSlides}. `writeFile` triggers a download
14
14
  * rather than touching a filesystem.
15
15
  */
16
- export declare class TsPptx extends PresentationCore {
16
+ export declare class PptxTs extends PresentationCore {
17
17
  constructor();
18
18
  /**
19
19
  * Reproduces a rendered HTML `<table>` as a PowerPoint table — including column widths,
@@ -35,7 +35,7 @@ export declare class TsPptx extends PresentationCore {
35
35
  /**
36
36
  * Compose a presentation from the construct families it needs, on the browser adapter.
37
37
  *
38
- * The counterpart to {@link TsPptx}, which is composed with every family there is. This one costs
38
+ * The counterpart to {@link PptxTs}, which is composed with every family there is. This one costs
39
39
  * what it carries: the core tier (text, shapes, images, groups, speaker notes) plus whatever
40
40
  * `use` names, and nothing else reaches the bundle. `tableToSlides` is one of those families
41
41
  * (`domTables`), so a deck that wants it composes it.
@@ -46,6 +46,10 @@ export declare class TsPptx extends PresentationCore {
46
46
  * const pres = createPresentation({ use: [charts, domTables] })
47
47
  */
48
48
  export declare function createPresentation<const Fs extends readonly ConstructFamily[] = []>(opts?: ComposeOptions<Fs>): Composed<Fs>;
49
+ /** @deprecated Renamed to {@link PptxTs}. This alias is removed in v5. */
50
+ export declare const TsPptx: typeof PptxTs;
51
+ /** @deprecated Renamed to {@link PptxTs}. This alias is removed in v5. */
52
+ export type TsPptx = PptxTs;
49
53
  //#endregion
50
- export { ANGLE_UNITS_PER_DEGREE, AddSlideProps, AlignH, AlignV, AnimationProps, AnimationTrigger, BackgroundOption, BackgroundProps, type Bar3DShape, type BarDirection, type BarGrouping, type BevelPresetType, BorderProps, BulletType, CHART_NAME, CONNECTOR_PRESET_NAME, ChartAreaProps, ChartAxisTickMark, ChartDataPointStyle, ChartErrorBarOptions, ChartExBinning, ChartExGeography, ChartExStatistics, ChartLineDash, ChartMulti, ChartOpts, ChartPropsAxisCat, ChartPropsAxisSer, ChartPropsAxisVal, ChartPropsBase, ChartPropsChartBar, ChartPropsChartBoxWhisker, ChartPropsChartDoughnut, ChartPropsChartHistogram, ChartPropsChartLine, ChartPropsChartPie, ChartPropsChartRadar, ChartPropsChartRegionMap, ChartPropsChartStock, ChartPropsChartSurface, ChartPropsChartWaterfall, ChartPropsDataLabel, ChartPropsDataTable, ChartPropsFillLine, ChartPropsLegend, ChartPropsTitle, ChartSeriesOpts, ChartType, ClipShape, Color, CommentProps, CommonObjectDescriptor, type ComposeOptions, type Composed, type ComposedPresentation, type ComposedSlide, ConnectorProps, ConnectorType, type ConstructFamily, Coord, CustomPropertyValue, DEFAULT_PX_PER_INCH, type DataLabelPosition, DataOrPathProps, DataOrPathRequiredProps, type Diagnostic, type DiagnosticCode, type DiagnosticHandler, type DisplayBlanksAs, EMU_PER_INCH, EMU_PER_POINT, Emu, type ErrorCode, FIXED_PCT_PER_PERCENT, FillOption, FlatSide, GeometryPoint, GradientFillProps, GradientStopProps, GroupChildProps, GroupProps, HAlign, HUNDREDTHS_PER_POINT, HalfDiscPreset, HexColor, HyperlinkActionJump, HyperlinkProps, ImageBaseProps, ImageFillProps, ImageProps, InternalError, type InternalErrorCode, InvalidOptionError, type InvalidOptionErrorCode, type LegendPosition, type LightRigDirection, type LightRigType, LineCap, type LineDataSymbol, LinearGradientFillProps, MAX_COORDINATE_EMU, MIN_COORDINATE_EMU, Margin, MasterBulletProps, MasterTextStyleLevel, MasterTextStyleProps, MeasureTextOptions, MediaError, type MediaErrorCode, MediaProps, MediaType, Model3dCameraProps, Model3dPoint, Model3dProps, NotesProps, NotesTextOptions, ObjectLockProps, ObjectNameProps, ObjectOptions, OleObjectProps, OptsChartData, OptsChartGridLine, OutputType, OverflowBoxOptions, PERCENT_SCALE, PLACEHOLDER_TYPE, POINTS_PER_INCH, PackagePart, PackageReadError, type PackageReadErrorCode, PartsProps, PatternFillProps, PatternPreset, PlaceholderProps, PlaceholderType, PositionProps, PresLayout, PresentationProps, PresetEffect, type PresetMaterialType, type RadarStyle, type RadarStyleAlias, RadialGradientFillProps, ResolvedCommentAuthor, SCHEME_COLORS, SHAPE_NAME, STANDARD_LAYOUTS, SchemeColor, SectionProps, SectionZoomProps, ShadowProps, ShapeAdjustHandle, ShapeAdjustHandlePolar, ShapeAdjustHandleXY, ShapeAdjustValue, ShapeConnectionSite, ShapeFillProps, ShapeGuide, ShapeLineProps, ShapeProps, ShapeType, Slide, SlideComment, SlideLayout, SlideMasterChartProps, SlideMasterObject, SlideMasterProps, SlideNumberProps, SlideObjectInfo, SlideObjectType, SlideZoomProps, StandardLayout, StandardLayoutName, StrokeProps, SummaryZoomProps, TableCell, TableCell3DProps, TableCellDiagonals, TableCellLayout, TableCellProps, TableLayoutResult, TableProps, TableRow, TableRowSlide, TableStyle, TableToSlidesDocument, TableToSlidesElement, TableToSlidesProps, TextAnchor, TextBaseProps, TextBulletProps, TextFitShrinkProps, TextGlowProps, TextMeasurement, TextProps, TextPropsOptions, TextVertType, ThemeColor, ThemeColorScheme, ThemeProps, type TimeUnit, TransitionProps, TransitionSoundProps, TransitionType, TsPptx as default, type TsPptxCode, TsPptxError, type TsPptxErrorOptions, UnsupportedFeatureError, type UnsupportedFeatureErrorCode, VALID_SHAPE_PRESETS, VAlign, WRITE_OUTPUT_TYPE, WriteBaseProps, WriteFileProps, WriteOutputMap, WriteProps, ZIP_OUTPUT_TYPE, ZoomBaseProps, asChartType, clipPath, connectorPresetFor, coordToEmu, emuToInches, emuToPixels, emuToPoints, inchesToEmu, isChartExType, isChartType, percentToEmu, pixelsToEmu, pointsToEmu, ptToHundredths, resetDiagnosticState, setDiagnosticHandler, textRun, textRuns };
54
+ export { ANGLE_UNITS_PER_DEGREE, ActionHyperlinkProps, AddSlideProps, AlignH, AlignV, AnimationProps, AnimationTrigger, BackgroundOption, BackgroundProps, type Bar3DShape, type BarDirection, type BarGrouping, type BevelPresetType, BorderProps, BulletType, CHART_NAME, CONNECTOR_PRESET_NAME, ChartAreaProps, ChartAxisTickMark, ChartDataPointStyle, ChartErrorBarOptions, ChartExBinning, ChartExGeography, ChartExStatistics, ChartLineDash, ChartMulti, ChartOpts, ChartPropsAxisCat, ChartPropsAxisSer, ChartPropsAxisVal, ChartPropsBase, ChartPropsChartBar, ChartPropsChartBoxWhisker, ChartPropsChartDoughnut, ChartPropsChartHistogram, ChartPropsChartLine, ChartPropsChartPie, ChartPropsChartRadar, ChartPropsChartRegionMap, ChartPropsChartStock, ChartPropsChartSurface, ChartPropsChartWaterfall, ChartPropsDataLabel, ChartPropsDataTable, ChartPropsFillLine, ChartPropsLegend, ChartPropsTitle, ChartSeriesOpts, ChartType, ClipShape, Color, CommentProps, CommonObjectDescriptor, type ComposeOptions, type Composed, type ComposedPresentation, type ComposedSlide, ConnectorProps, ConnectorType, type ConstructFamily, Coord, CustomPropertyValue, DEFAULT_PX_PER_INCH, type DataLabelPosition, DataOrPathProps, DataOrPathRequiredProps, type Diagnostic, type DiagnosticCode, type DiagnosticHandler, type DisplayBlanksAs, EMU_PER_INCH, EMU_PER_POINT, Emu, type ErrorCode, FIXED_PCT_PER_PERCENT, FillOption, FlatSide, GeometryPoint, GradientFillProps, GradientStopProps, GroupChildProps, GroupProps, HAlign, HUNDREDTHS_PER_POINT, HalfDiscPreset, HexColor, HyperlinkActionJump, HyperlinkBaseProps, HyperlinkProps, ImageBaseProps, ImageFillProps, ImageProps, InternalError, type InternalErrorCode, InvalidOptionError, type InvalidOptionErrorCode, type LegendPosition, type LightRigDirection, type LightRigType, LineCap, type LineDataSymbol, LinearGradientFillProps, MAX_COORDINATE_EMU, MIN_COORDINATE_EMU, Margin, MasterBulletProps, MasterTextStyleLevel, MasterTextStyleProps, MeasureTextOptions, MediaError, type MediaErrorCode, MediaProps, MediaType, Model3dCameraProps, Model3dPoint, Model3dProps, NotesProps, NotesTextOptions, ObjectLockProps, ObjectNameProps, ObjectOptions, OleObjectProps, OptsChartData, OptsChartGridLine, OutputType, OverflowBoxOptions, PERCENT_SCALE, PLACEHOLDER_TYPE, POINTS_PER_INCH, PackagePart, PackageReadError, type PackageReadErrorCode, PartsProps, PatternFillProps, PatternPreset, PlaceholderBinding, PlaceholderOption, PlaceholderPositionProps, PlaceholderProps, PlaceholderType, PositionProps, PptxTs as default, type PptxTsCode, PptxTsError, type PptxTsErrorOptions, PresLayout, PresentationProps, PresetEffect, type PresetMaterialType, type RadarStyle, type RadarStyleAlias, RadialGradientFillProps, ResolvedCommentAuthor, SCHEME_COLORS, SHAPE_NAME, STANDARD_LAYOUTS, SchemeColor, SectionProps, SectionZoomProps, ShadowProps, ShapeAdjustHandle, ShapeAdjustHandlePolar, ShapeAdjustHandleXY, ShapeAdjustValue, ShapeConnectionSite, ShapeFillProps, ShapeGuide, ShapeLineProps, ShapeProps, ShapeType, Slide, SlideComment, SlideHyperlinkProps, SlideLayout, SlideMasterChartProps, SlideMasterObject, SlideMasterProps, SlideNumberProps, SlideObjectInfo, SlideObjectType, SlideZoomProps, StandardLayout, StandardLayoutName, StrokeProps, SummaryZoomProps, TableCell, TableCell3DProps, TableCellDiagonals, TableCellLayout, TableCellProps, TableLayoutResult, TableProps, TableRow, TableRowSlide, TableStyle, TableToSlidesDocument, TableToSlidesElement, TableToSlidesProps, TextAnchor, TextBaseProps, TextBulletProps, TextFitShrinkProps, TextGlowProps, TextMeasurement, TextProps, TextPropsOptions, TextVertType, ThemeColor, ThemeColorScheme, ThemeProps, type TimeUnit, TransitionProps, TransitionSoundProps, TransitionType, TsPptxCode, TsPptxError, TsPptxErrorOptions, UnsupportedFeatureError, type UnsupportedFeatureErrorCode, UrlHyperlinkProps, VALID_SHAPE_PRESETS, VAlign, WRITE_OUTPUT_TYPE, WriteBaseProps, WriteFileProps, WriteOutputMap, WriteProps, ZIP_OUTPUT_TYPE, ZoomBaseProps, asChartType, clipPath, connectorPresetFor, coordToEmu, emuToInches, emuToPixels, emuToPoints, inchesToEmu, isChartExType, isChartType, percentToEmu, pixelsToEmu, pointsToEmu, ptToHundredths, resetDiagnosticState, setDiagnosticHandler, textRun, textRuns };
51
55
  //# sourceMappingURL=browser.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"browser.d.ts","names":[],"sources":["../src/browser.ts"],"mappings":";;;;;;;;;;;;;;;qBAsBa,eAAe;EAC3B;;;;;;;;;;;;;;;;EAqBA,cAAc,eAAe,UAAS;;;;;;;;;;;;;;;wBAkBvB,yBAAyB,oBAAoB,wBAC5D,OAAO,eAAe,MACpB,SAAS"}
1
+ {"version":3,"file":"browser.d.ts","names":[],"sources":["../src/browser.ts"],"mappings":";;;;;;;;;;;;;;;qBAsBa,eAAe;EAC3B;;;;;;;;;;;;;;;;EAqBA,cAAc,eAAe,UAAS;;;;;;;;;;;;;;;wBAkBvB,yBAAyB,oBAAoB,wBAC5D,OAAO,eAAe,MACpB,SAAS;;qBAOC,eAAM;;YAEP,SAAS"}
package/dist/browser.js CHANGED
@@ -1,8 +1,8 @@
1
- import { a as TsPptxError, c as setDiagnosticHandler, i as PackageReadError, n as InvalidOptionError, o as UnsupportedFeatureError, r as MediaError, s as resetDiagnosticState, t as InternalError } from "./errors-Da2nXCJm.js";
2
- import { A as inchesToEmu, C as MIN_COORDINATE_EMU, D as emuToInches, E as coordToEmu, F as EMU_PER_INCH, I as EMU_PER_POINT, L as POINTS_PER_INCH, M as pixelsToEmu, N as pointsToEmu, O as emuToPixels, P as ptToHundredths, S as MAX_COORDINATE_EMU, T as STANDARD_LAYOUTS, _ as isChartType, a as ChartType, b as FIXED_PCT_PER_PERCENT, c as SchemeColor, d as TableStyle, f as TextAnchor, g as isChartExType, h as connectorPresetFor, i as BulletType, j as percentToEmu, k as emuToPoints, l as ShapeType, m as asChartType, n as AlignH, o as OutputType, p as VALID_SHAPE_PRESETS, r as AlignV, s as PlaceholderType, u as SlideObjectType, v as ANGLE_UNITS_PER_DEGREE, w as PERCENT_SCALE, x as HUNDREDTHS_PER_POINT, y as DEFAULT_PX_PER_INCH } from "./table-cell-margins-PDshga8T.js";
3
- import { c as ALL_CONSTRUCT_FAMILIES, d as IMG_SVG_PLACEHOLDER, i as fetchFontBytes, l as composePresentation, n as textRuns, r as clipPath, t as textRun, u as PresentationCore } from "./text-BvFFMMFQ.js";
4
- import { r as PPTX_CONTENT_TYPE } from "./zip-CYZ0F6BV.js";
5
- import { t as tableDomFamily } from "./table-dom-CVbvUfgh.js";
1
+ import { a as PackageReadError, c as resetDiagnosticState, i as MediaError, l as setDiagnosticHandler, n as InternalError, o as PptxTsError, r as InvalidOptionError, s as UnsupportedFeatureError, t as TsPptxError } from "./entry-errors-BRMlRV9p.js";
2
+ import { A as inchesToEmu, C as MIN_COORDINATE_EMU, D as emuToInches, E as coordToEmu, F as EMU_PER_INCH, I as EMU_PER_POINT, L as POINTS_PER_INCH, M as pixelsToEmu, N as pointsToEmu, O as emuToPixels, P as ptToHundredths, S as MAX_COORDINATE_EMU, T as STANDARD_LAYOUTS, a as OutputType, b as FIXED_PCT_PER_PERCENT, c as ShapeType, d as TextAnchor, f as VALID_SHAPE_PRESETS, g as isChartType, h as isChartExType, i as ChartType, j as percentToEmu, k as emuToPoints, l as SlideObjectType, m as connectorPresetFor, n as AlignV, o as PlaceholderType, p as asChartType, r as BulletType, s as SchemeColor, t as AlignH, u as TableStyle, v as ANGLE_UNITS_PER_DEGREE, w as PERCENT_SCALE, x as HUNDREDTHS_PER_POINT, y as DEFAULT_PX_PER_INCH } from "./enums-BwXKwMmg.js";
3
+ import { c as ALL_CONSTRUCT_FAMILIES, d as IMG_SVG_PLACEHOLDER, i as fetchFontBytes, l as composePresentation, n as textRuns, r as clipPath, t as textRun, u as PresentationCore } from "./text-DARib7Qq.js";
4
+ import { r as PPTX_CONTENT_TYPE } from "./zip-Mtv-eFTc.js";
5
+ import { t as tableDomFamily } from "./table-dom-B2QpmHh-.js";
6
6
  //#region src/runtime/browser.ts
7
7
  function createBrowserRuntime() {
8
8
  return {
@@ -89,10 +89,10 @@ async function writeFile(fileName, data) {
89
89
  * bare `pptx-ts` specifier for the web lands here without naming this subpath.
90
90
  *
91
91
  * Same authoring API as every other entry (see `entry-surface.ts`), plus one method that only
92
- * makes sense with a live DOM: {@link TsPptx.tableToSlides}. `writeFile` triggers a download
92
+ * makes sense with a live DOM: {@link PptxTs.tableToSlides}. `writeFile` triggers a download
93
93
  * rather than touching a filesystem.
94
94
  */
95
- var TsPptx = class extends PresentationCore {
95
+ var PptxTs = class extends PresentationCore {
96
96
  constructor() {
97
97
  super(createBrowserRuntime(), [...ALL_CONSTRUCT_FAMILIES, tableDomFamily]);
98
98
  }
@@ -118,7 +118,7 @@ var TsPptx = class extends PresentationCore {
118
118
  /**
119
119
  * Compose a presentation from the construct families it needs, on the browser adapter.
120
120
  *
121
- * The counterpart to {@link TsPptx}, which is composed with every family there is. This one costs
121
+ * The counterpart to {@link PptxTs}, which is composed with every family there is. This one costs
122
122
  * what it carries: the core tier (text, shapes, images, groups, speaker notes) plus whatever
123
123
  * `use` names, and nothing else reaches the bundle. `tableToSlides` is one of those families
124
124
  * (`domTables`), so a deck that wants it composes it.
@@ -131,7 +131,9 @@ var TsPptx = class extends PresentationCore {
131
131
  function createPresentation(opts) {
132
132
  return composePresentation(createBrowserRuntime(), opts);
133
133
  }
134
+ /** @deprecated Renamed to {@link PptxTs}. This alias is removed in v5. */
135
+ const TsPptx = PptxTs;
134
136
  //#endregion
135
- export { ANGLE_UNITS_PER_DEGREE, AlignH, AlignV, BulletType, ChartType, DEFAULT_PX_PER_INCH, EMU_PER_INCH, EMU_PER_POINT, FIXED_PCT_PER_PERCENT, HUNDREDTHS_PER_POINT, InternalError, InvalidOptionError, MAX_COORDINATE_EMU, MIN_COORDINATE_EMU, MediaError, OutputType, PERCENT_SCALE, POINTS_PER_INCH, PackageReadError, PlaceholderType, STANDARD_LAYOUTS, SchemeColor, ShapeType, SlideObjectType, TableStyle, TextAnchor, TsPptx, TsPptx as default, TsPptxError, UnsupportedFeatureError, VALID_SHAPE_PRESETS, asChartType, clipPath, connectorPresetFor, coordToEmu, createPresentation, emuToInches, emuToPixels, emuToPoints, inchesToEmu, isChartExType, isChartType, percentToEmu, pixelsToEmu, pointsToEmu, ptToHundredths, resetDiagnosticState, setDiagnosticHandler, textRun, textRuns };
137
+ export { ANGLE_UNITS_PER_DEGREE, AlignH, AlignV, BulletType, ChartType, DEFAULT_PX_PER_INCH, EMU_PER_INCH, EMU_PER_POINT, FIXED_PCT_PER_PERCENT, HUNDREDTHS_PER_POINT, InternalError, InvalidOptionError, MAX_COORDINATE_EMU, MIN_COORDINATE_EMU, MediaError, OutputType, PERCENT_SCALE, POINTS_PER_INCH, PackageReadError, PlaceholderType, PptxTs, PptxTs as default, PptxTsError, STANDARD_LAYOUTS, SchemeColor, ShapeType, SlideObjectType, TableStyle, TextAnchor, TsPptx, TsPptxError, UnsupportedFeatureError, VALID_SHAPE_PRESETS, asChartType, clipPath, connectorPresetFor, coordToEmu, createPresentation, emuToInches, emuToPixels, emuToPoints, inchesToEmu, isChartExType, isChartType, percentToEmu, pixelsToEmu, pointsToEmu, ptToHundredths, resetDiagnosticState, setDiagnosticHandler, textRun, textRuns };
136
138
 
137
139
  //# sourceMappingURL=browser.js.map