@shbernal/ts-pptx 3.4.0 → 3.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/dist/{autopage-BYlTzX-l.js → autopage-DkjYZUFD.js} +3 -3
  2. package/dist/{autopage-BYlTzX-l.js.map → autopage-DkjYZUFD.js.map} +1 -1
  3. package/dist/browser.d.ts +5 -5
  4. package/dist/browser.js +4 -4
  5. package/dist/browser.js.map +1 -1
  6. package/dist/{diagnostics-B0OmTOoz.d.ts → diagnostics-Du_s75MT.d.ts} +20 -5
  7. package/dist/diagnostics-Du_s75MT.d.ts.map +1 -0
  8. package/dist/{errors-fB1KDJKQ.d.ts → errors-PflMPWBn.d.ts} +3 -3
  9. package/dist/{errors-fB1KDJKQ.d.ts.map → errors-PflMPWBn.d.ts.map} +1 -1
  10. package/dist/{fit-TjpNbMru.js → fit-BKs0zxMI.js} +3 -3
  11. package/dist/{fit-TjpNbMru.js.map → fit-BKs0zxMI.js.map} +1 -1
  12. package/dist/{html-dom-yUSdCExA.js → html-dom-B0I0QSbU.js} +4 -4
  13. package/dist/{html-dom-yUSdCExA.js.map → html-dom-B0I0QSbU.js.map} +1 -1
  14. package/dist/html.d.ts +3 -3
  15. package/dist/html.js +1 -1
  16. package/dist/index.d.ts +5 -5
  17. package/dist/index.js +3 -3
  18. package/dist/inspect.d.ts +28 -4
  19. package/dist/inspect.d.ts.map +1 -1
  20. package/dist/inspect.js +42 -11
  21. package/dist/inspect.js.map +1 -1
  22. package/dist/math.d.ts +1 -1
  23. package/dist/measure.d.ts +2 -2
  24. package/dist/measure.js +1 -1
  25. package/dist/{namespaces-Sy_m7Nhd.js → namespaces-BVnNu7sg.js} +77 -3
  26. package/dist/namespaces-BVnNu7sg.js.map +1 -0
  27. package/dist/node.d.ts +5 -5
  28. package/dist/node.js +3 -3
  29. package/dist/{notes-bWApshah.js → notes-RLCwdlTE.js} +289 -313
  30. package/dist/{notes-bWApshah.js.map → notes-RLCwdlTE.js.map} +1 -1
  31. package/dist/{pres-Dybf7ZUl.d.ts → pres-C5__xkDh.d.ts} +2 -2
  32. package/dist/{pres-Dybf7ZUl.d.ts.map → pres-C5__xkDh.d.ts.map} +1 -1
  33. package/dist/{presentation-3rAKKRfm.js → presentation-Cp7vzlAw.js} +566 -519
  34. package/dist/presentation-Cp7vzlAw.js.map +1 -0
  35. package/dist/{presentation-types-D7cgT-eG.d.ts → presentation-types-DP_8jog7.d.ts} +514 -276
  36. package/dist/presentation-types-DP_8jog7.d.ts.map +1 -0
  37. package/dist/read.d.ts +31 -48
  38. package/dist/read.d.ts.map +1 -1
  39. package/dist/read.js +3 -3
  40. package/dist/script.d.ts +2 -2
  41. package/dist/script.d.ts.map +1 -1
  42. package/dist/script.js +84 -75
  43. package/dist/script.js.map +1 -1
  44. package/dist/{shapes-Dyw5bxwO.js → shapes-BemroU-z.js} +1010 -306
  45. package/dist/shapes-BemroU-z.js.map +1 -0
  46. package/dist/{slide-B_aInw3N.d.ts → slide-js0QpRV-.d.ts} +1278 -1254
  47. package/dist/slide-js0QpRV-.d.ts.map +1 -0
  48. package/dist/{text-DSN3anEh.js → text-CyetbF6p.js} +2039 -1417
  49. package/dist/text-CyetbF6p.js.map +1 -0
  50. package/dist/units-1kRzYShk.js +231 -0
  51. package/dist/units-1kRzYShk.js.map +1 -0
  52. package/dist/units-internal-Dg95w_YD.js +753 -0
  53. package/dist/units-internal-Dg95w_YD.js.map +1 -0
  54. package/dist/zip.d.ts +1 -1
  55. package/package.json +2 -1
  56. package/dist/diagnostics-B0OmTOoz.d.ts.map +0 -1
  57. package/dist/diagnostics-CPVADSL1.js +0 -90
  58. package/dist/diagnostics-CPVADSL1.js.map +0 -1
  59. package/dist/namespaces-Sy_m7Nhd.js.map +0 -1
  60. package/dist/presentation-3rAKKRfm.js.map +0 -1
  61. package/dist/presentation-types-D7cgT-eG.d.ts.map +0 -1
  62. package/dist/shapes-Dyw5bxwO.js.map +0 -1
  63. package/dist/slide-B_aInw3N.d.ts.map +0 -1
  64. package/dist/text-DSN3anEh.js.map +0 -1
  65. package/dist/units-internal-DNvK2I6o.js +0 -896
  66. package/dist/units-internal-DNvK2I6o.js.map +0 -1
@@ -1,5 +1,5 @@
1
- import { r as warn } from "./diagnostics-CPVADSL1.js";
2
- import { D as DEF_SLIDE_MARGIN_IN, F as LINEH_MODIFIER, a as inch2Emu, i as getSmartParseNumber, ot as EMU_PER_INCH, s as marginToEmu } from "./units-internal-DNvK2I6o.js";
1
+ import { r as EMU_PER_INCH, x as warn } from "./units-1kRzYShk.js";
2
+ import { D as DEF_SLIDE_MARGIN_IN, M as LINEH_MODIFIER, a as inch2Emu, i as getSmartParseNumber, s as marginToEmu } from "./units-internal-Dg95w_YD.js";
3
3
  //#region src/gen/table/autopage.ts
4
4
  /**
5
5
  * Break cell text into lines based upon table column width (e.g.: Magic Happens Here(tm))
@@ -420,4 +420,4 @@ function getSlidesForTableRows(tableRows = [], tableProps = {}, presLayout, mast
420
420
  //#endregion
421
421
  export { getSlidesForTableRows as t };
422
422
 
423
- //# sourceMappingURL=autopage-BYlTzX-l.js.map
423
+ //# sourceMappingURL=autopage-DkjYZUFD.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"autopage-BYlTzX-l.js","names":[],"sources":["../src/gen/table/autopage.ts"],"sourcesContent":["/**\n * ts-pptx: 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, LINEH_MODIFIER } from '../../constants-internal.js'\nimport type {\n\tPresLayout,\n\tTableCell,\n\tTableToSlidesProps,\n\tTableRow,\n\tTableRowSlide,\n\tTableCellProps,\n} from '../../types/index.js'\nimport type { SlideLayoutInternal } from '../../types/internal.js'\nimport { getSmartParseNumber, inch2Emu, marginToEmu } from '../../units-internal.js'\nimport { warn } from '../../diagnostics.js'\nimport { EMU_PER_INCH, POINTS_PER_INCH } from '../../units.js'\n\ntype AutoPageCell = TableCell & {\n\t_lineHeight: number\n\t_lines: TableCell[][]\n\toptions: TableCellProps\n\ttext: TableCell[]\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 * @param {TableCell} cell - table cell\n * @param {number} colWidth - table column width (inches)\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 {TableRow[]} - cell's text objects grouped into lines\n */\nfunction parseTextToLines(cell: TableCell, colWidth: number, verbose?: boolean): TableCell[][] {\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 + (cell.options?.autoPageCharWeight ? cell.options.autoPageCharWeight : 0) // 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 =\n\t\tMath.floor(colWidth * POINTS_PER_INCH) / ((cell.options?.fontSize ? cell.options.fontSize : DEF_FONT_SIZE) / 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)\n\t\tconsole.log(\n\t\t\t`[0/4] colWidth=${colWidth}in fontSize=${cell.options?.fontSize ?? DEF_FONT_SIZE} FOCO=${FOCO} CPL=${CPL}`\n\t\t)\n\n\tconst parsedLines: TableCell[][] = []\n\tlet inputCells: TableCell[] = []\n\tconst inputLines1: TableCell[][] = []\n\tconst inputLines2: TableCell[][] = []\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: TableCell[] = []\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({ _type: SlideObjectType.tablecell, text: part, options: 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({ _type: SlideObjectType.tablecell, text: cell.text.trim(), options: 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: TableCell[] = []\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: TableCell[] = []\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\tif (strCurrLine.length + wordText.length > CPL) {\n\t\t\t\tparsedLines.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// ===== 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 * 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 {TableCell[][]} tableRows - table rows\n * @param {TableToSlidesProps} 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\ttableRows: TableCell[][] = [],\n\ttableProps: TableToSlidesProps = {},\n\tpresLayout: PresLayout,\n\tmasterSlide?: SlideLayoutInternal | null\n): TableRowSlide[] {\n\tlet arrInchMargins = DEF_SLIDE_MARGIN_IN\n\tlet emuSlideTabW: 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\tfunction calcSlideTabH(): void {\n\t\tlet emuStartY = 0\n\t\tif (tableRowSlides.length === 0) emuStartY = tablePropY || inch2Emu(arrInchMargins[0])\n\t\tif (tableRowSlides.length > 0) emuStartY = inch2Emu(tableProps.autoPageSlideStartY || arrInchMargins[0])\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\n\t\t// bottom coordinate, so — unlike `presLayout.height` — the first slide must NOT subtract the\n\t\t// start-Y from it. Otherwise a table that begins mid-slide gets a tiny first page (only a few\n\t\t// rows) while later pages, which already clamp to `h`, render normally. Mirror the\n\t\t// subsequent-slide rule below: never let an explicit `h` shrink the usable height below `h`.\n\t\tif (tableRowSlides.length === 0 && tablePropH && emuSlideTabH < tablePropH) emuSlideTabH = tablePropH\n\t\tif (tableRowSlides.length > 1) {\n\t\t\t// D: RULE: Use margins for starting point after the initial Slide, not `opt.y`\n\t\t\tif (typeof tableProps.autoPageSlideStartY === 'number') {\n\t\t\t\temuSlideTabH = (tablePropH || presLayout.height) - inch2Emu(tableProps.autoPageSlideStartY + arrInchMargins[2])\n\t\t\t} else if (tablePropY) {\n\t\t\t\temuSlideTabH =\n\t\t\t\t\t(tablePropH || presLayout.height) -\n\t\t\t\t\tinch2Emu(\n\t\t\t\t\t\t(tablePropY / EMU_PER_INCH < arrInchMargins[0] ? tablePropY / EMU_PER_INCH : arrInchMargins[0]) +\n\t\t\t\t\t\t\tarrInchMargins[2]\n\t\t\t\t\t)\n\t\t\t\t// Use whichever is greater: area between margins or the table H provided (dont shrink usable area - the whole point of over-riding Y on paging is to *increase* usable space)\n\t\t\t\tif (emuSlideTabH < tablePropH) emuSlideTabH = tablePropH\n\t\t\t}\n\t\t}\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 = inch2Emu(\n\t\t\t((typeof tableProps.fontSize === 'number' ? tableProps.fontSize : DEF_FONT_SIZE) *\n\t\t\t\t(LINEH_MODIFIER + (tableProps.autoPageLineWeight || 0))) /\n\t\t\t\t100\n\t\t)\n\t\tif (emuSlideTabH < emuBaseLineH) {\n\t\t\tconst emuStartY =\n\t\t\t\ttableRowSlides.length === 0\n\t\t\t\t\t? tablePropY || inch2Emu(arrInchMargins[0])\n\t\t\t\t\t: inch2Emu(tableProps.autoPageSlideStartY || arrInchMargins[0])\n\t\t\tconst fallbackH = presLayout.height - emuStartY - 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// Important: Use default size as zero cell margin is causing our tables to be too large and touch bottom of slide!\n\t\tif (!tableProps.slideMargin && tableProps.slideMargin !== 0) tableProps.slideMargin = DEF_SLIDE_MARGIN_IN[0]\n\n\t\tif (masterSlide && typeof masterSlide._margin !== 'undefined') {\n\t\t\tif (Array.isArray(masterSlide._margin)) arrInchMargins = masterSlide._margin\n\t\t\telse if (!isNaN(Number(masterSlide._margin))) {\n\t\t\t\tarrInchMargins = [\n\t\t\t\t\tNumber(masterSlide._margin),\n\t\t\t\t\tNumber(masterSlide._margin),\n\t\t\t\t\tNumber(masterSlide._margin),\n\t\t\t\t\tNumber(masterSlide._margin),\n\t\t\t\t]\n\t\t\t}\n\t\t} else if (tableProps.slideMargin || tableProps.slideMargin === 0) {\n\t\t\tif (Array.isArray(tableProps.slideMargin)) arrInchMargins = tableProps.slideMargin\n\t\t\telse if (!isNaN(tableProps.slideMargin))\n\t\t\t\tarrInchMargins = [\n\t\t\t\t\ttableProps.slideMargin,\n\t\t\t\t\ttableProps.slideMargin,\n\t\t\t\t\ttableProps.slideMargin,\n\t\t\t\t\ttableProps.slideMargin,\n\t\t\t\t]\n\t\t}\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\t// NOTE: Cells may have a colspan, so merely taking the length of the [0] (or any other) row is not\n\t\t// ....: sufficient to determine column count. Therefore, check each cell for a colspan and total cols as reqd\n\t\tconst firstRow = tableRows[0] || []\n\t\tfirstRow.forEach((cell) => {\n\t\t\tif (!cell) cell = { _type: SlideObjectType.tablecell }\n\t\t\tconst cellOpts = cell.options || null\n\t\t\tnumCols += Number(cellOpts?.colspan ? cellOpts.colspan : 1)\n\t\t})\n\t\tif (tableProps.verbose) console.log(`| numCols ......................................... = ${numCols}`)\n\t}\n\n\t// Track per-column remaining rowspan depths so we can suppress page breaks that would\n\t// fall inside a rowspan group. colSpanDepths[c] = how many more rows column c is still\n\t// occupied by a rowspan that started in a previous row.\n\tconst colSpanDepths: number[] = new Array<number>(numCols).fill(0)\n\n\t// STEP 3: Calculate width using tableProps.colW if possible\n\tif (!tablePropW && tableProps.colW) {\n\t\ttableCalcW = Array.isArray(tableProps.colW)\n\t\t\t? tableProps.colW.reduce((p, n) => p + n) * EMU_PER_INCH\n\t\t\t: tableProps.colW * numCols || 0\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 =\n\t\t\ttableCalcW || inch2Emu((tablePropX ? tablePropX / EMU_PER_INCH : arrInchMargins[1]) + arrInchMargins[3])\n\t\tif (tableProps.verbose)\n\t\t\tconsole.log(`| emuSlideTabW .................................... = ${(emuSlideTabW / EMU_PER_INCH).toFixed(1)}`)\n\t}\n\n\t// STEP 5: Calculate column widths if not provided (emuSlideTabW will be used below to determine lines-per-col)\n\tif (!tableProps.colW || !Array.isArray(tableProps.colW)) {\n\t\tif (tableProps.colW && !isNaN(Number(tableProps.colW))) {\n\t\t\tconst arrColW: number[] = []\n\t\t\tconst colW = Number(tableProps.colW)\n\t\t\tconst firstRow = tableRows[0] || []\n\t\t\tfirstRow.forEach(() => arrColW.push(colW))\n\t\t\ttableProps.colW = []\n\t\t\tarrColW.forEach((val) => {\n\t\t\t\tif (Array.isArray(tableProps.colW)) tableProps.colW.push(val)\n\t\t\t})\n\t\t} else {\n\t\t\t// No column widths provided? Then distribute cols.\n\t\t\ttableProps.colW = []\n\t\t\tfor (let iCol = 0; iCol < numCols; iCol++) {\n\t\t\t\ttableProps.colW.push(emuSlideTabW / EMU_PER_INCH / numCols)\n\t\t\t}\n\t\t}\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\tconst resolveRowH = (origRowIdx: number): number | undefined =>\n\t\tArray.isArray(tableProps.rowH) && typeof tableProps.rowH[origRowIdx] === 'number'\n\t\t\t? tableProps.rowH[origRowIdx]\n\t\t\t: undefined\n\n\t// STEP 6: **MAIN** Iterate over rows, add table content, create new slides as rows overflow\n\tlet newTableRowSlide: TableRowSlide = { rows: [] as TableRow[], rowH: [] as Array<number | undefined> }\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 = colSpanDepths.some((d) => d > 0)\n\t\tconst rowCellLines: AutoPageCell[] = []\n\t\tlet maxCellMarTopEmu = 0\n\t\tlet maxCellMarBtmEmu = 0\n\n\t\t// B: Create new row in data model, calc `maxCellMar*`\n\t\tlet currTableRow: TableRow = []\n\t\trow.forEach((cell) => {\n\t\t\tcurrTableRow.push({\n\t\t\t\t_type: SlideObjectType.tablecell,\n\t\t\t\ttext: [],\n\t\t\t\toptions: cell.options,\n\t\t\t})\n\n\t\t\t// Cell margins are inches (see `marginToEmu`); prefer the cell's own top/bottom margin, else the table's.\n\t\t\tconst cellMargin = Array.isArray(cell.options?.margin) ? cell.options.margin : undefined\n\t\t\tconst tableMargin = Array.isArray(tableProps.margin) ? tableProps.margin : null\n\t\t\tif (cellMargin?.[0] && marginToEmu(cellMargin[0]) > maxCellMarTopEmu)\n\t\t\t\tmaxCellMarTopEmu = marginToEmu(cellMargin[0])\n\t\t\telse if (tableMargin?.[0] && marginToEmu(tableMargin[0]) > maxCellMarTopEmu)\n\t\t\t\tmaxCellMarTopEmu = marginToEmu(tableMargin[0])\n\t\t\tif (cellMargin?.[2] && marginToEmu(cellMargin[2]) > maxCellMarBtmEmu)\n\t\t\t\tmaxCellMarBtmEmu = marginToEmu(cellMargin[2])\n\t\t\telse if (tableMargin?.[2] && marginToEmu(tableMargin[2]) > maxCellMarBtmEmu)\n\t\t\t\tmaxCellMarBtmEmu = marginToEmu(tableMargin[2])\n\t\t})\n\n\t\t// C: Calc usable vertical space/table height. Set default value first, adjust below when necessary.\n\t\tcalcSlideTabH()\n\t\temuTabCurrH += maxCellMarTopEmu + maxCellMarBtmEmu // Start row height with margins\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// D: --==[[ BUILD DATA SET ]]==-- (iterate over cells: split text into lines[], set `lineHeight`)\n\t\trow.forEach((cell, iCell) => {\n\t\t\tconst newCellOptions = cell.options || {}\n\t\t\tconst newCell: AutoPageCell = {\n\t\t\t\t_type: SlideObjectType.tablecell,\n\t\t\t\t_lines: [],\n\t\t\t\t_lineHeight: inch2Emu(\n\t\t\t\t\t((cell.options?.fontSize\n\t\t\t\t\t\t? cell.options.fontSize\n\t\t\t\t\t\t: tableProps.fontSize\n\t\t\t\t\t\t\t? tableProps.fontSize\n\t\t\t\t\t\t\t: DEF_FONT_SIZE) *\n\t\t\t\t\t\t(LINEH_MODIFIER + (tableProps.autoPageLineWeight ? tableProps.autoPageLineWeight : 0))) /\n\t\t\t\t\t\t100\n\t\t\t\t),\n\t\t\t\ttext: [],\n\t\t\t\toptions: newCellOptions,\n\t\t\t}\n\n\t\t\t// E-1: Exempt cells with `rowspan` from increasing lineHeight (or we could create a new slide when unecessary!)\n\t\t\tif (newCellOptions.rowspan) newCell._lineHeight = 0\n\n\t\t\t// E-2: The parseTextToLines method uses `autoPageCharWeight`, so inherit from table options\n\t\t\tnewCellOptions.autoPageCharWeight = tableProps.autoPageCharWeight || undefined\n\n\t\t\t// E-3: **MAIN** Parse cell contents into lines based upon col width, font, etc\n\t\t\tconst tableColW = Array.isArray(tableProps.colW) ? tableProps.colW : []\n\t\t\tlet totalColW = tableColW[iCell] ?? 0\n\t\t\tconst cellColspan = cell.options?.colspan\n\t\t\tif (cellColspan) {\n\t\t\t\ttotalColW = tableColW\n\t\t\t\t\t.filter((_cell, idx) => idx >= iCell && idx < idx + cellColspan)\n\t\t\t\t\t.reduce((prev, curr) => prev + curr)\n\t\t\t}\n\n\t\t\t// E-4: Create lines based upon available column width\n\t\t\tnewCell._lines = parseTextToLines(cell, totalColW, tableProps.verbose)\n\n\t\t\t// E-5: Add cell to array\n\t\t\trowCellLines.push(newCell)\n\t\t})\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` ..: [ TableCell, TableCell, TableCell ]\n\t\t * - `TableCell` .....: { _type: 'tablecell', _lines: TableCell[], _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 TableCell[] (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 emuLineMaxH = 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// 1: calc emuLineMaxH\n\t\t\trowCellLines.forEach((cell) => {\n\t\t\t\tif (cell._lineHeight >= emuLineMaxH) emuLineMaxH = cell._lineHeight\n\t\t\t})\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 && !hasActiveRowSpan) {\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: add current slide to Slides array (never push an empty page: a row that does not\n\t\t\t\t// fit yet has no content here, and an empty `rows` slide crashes the recursive addTable)\n\t\t\t\tif (newTableRowSlide.rows.length > 0) tableRowSlides.push(newTableRowSlide)\n\n\t\t\t\t// C: reset working/curr slide to hold rows as they're created\n\t\t\t\tconst newRows: TableRow[] = []\n\t\t\t\tnewTableRowSlide = { rows: newRows, rowH: [] as Array<number | undefined> }\n\n\t\t\t\t// D: reset working/curr row\n\t\t\t\tcurrTableRow = []\n\t\t\t\trow.forEach((cell) => currTableRow.push({ _type: SlideObjectType.tablecell, text: [], options: cell.options }))\n\n\t\t\t\t// E: Calc usable vertical space/table height now as we may still be in the same row and code above (\"C: Calc usable vertical space/table height.\") calc may now be invalid\n\t\t\t\tcalcSlideTabH()\n\n\t\t\t\t// F: reset current table height for this new Slide, then re-charge the row's cell\n\t\t\t\t// margins onto it — the row is starting over here, so it owes them again.\n\t\t\t\t//\n\t\t\t\t// ORDER IS LOAD-BEARING. These two statements used to run the other way round: the\n\t\t\t\t// margins were added and then wiped by the reset, so the first row of every\n\t\t\t\t// continuation slide was the only row in the table that paid no margin. That let a\n\t\t\t\t// continuation slide accept one row more than it had room for, and the extra row\n\t\t\t\t// hung off the bottom of the slide (upstream gitbrent/PptxGenJS#1200). The symptom\n\t\t\t\t// is easy to miss because the pager is *self*-consistent per slide: it only shows\n\t\t\t\t// up as the first slide and the continuation slides disagreeing about how many\n\t\t\t\t// identical rows fit the identical space — which is what\n\t\t\t\t// test/regression/table-autopage-continuation-budget.test.js pins.\n\t\t\t\temuTabCurrH = maxCellMarTopEmu + maxCellMarBtmEmu\n\t\t\t\tif (tableProps.verbose)\n\t\t\t\t\tconsole.log(\n\t\t\t\t\t\t`| SLIDE [${tableRowSlides.length}]: emuSlideTabH ...... = ${(emuSlideTabH / EMU_PER_INCH).toFixed(1)} `\n\t\t\t\t\t)\n\n\t\t\t\t// G: handle repeat headers option /or/ Add new empty row to continue current lines into\n\t\t\t\tif (tableProps.autoPageRepeatHeader && tableProps._arrObjTabHeadRows) {\n\t\t\t\t\ttableProps._arrObjTabHeadRows.forEach((row, headIdx) => {\n\t\t\t\t\t\tconst newHeadRow: TableRow = []\n\t\t\t\t\t\tlet maxLineHeight = 0\n\t\t\t\t\t\trow.forEach((cell) => {\n\t\t\t\t\t\t\tnewHeadRow.push(cell)\n\t\t\t\t\t\t\tif ((cell._lineHeight || 0) > maxLineHeight) maxLineHeight = cell._lineHeight || 0\n\t\t\t\t\t\t})\n\t\t\t\t\t\tnewTableRowSlide.rows.push(newHeadRow)\n\t\t\t\t\t\t// Repeated header rows are the original leading rows, so carry their configured height.\n\t\t\t\t\t\tnewTableRowSlide.rowH?.push(resolveRowH(headIdx))\n\t\t\t\t\t\t// NOTE: possible imprecision — this accumulates line height only; cell top/bottom\n\t\t\t\t\t\t// margins are not added, so autoPage row-height estimates can run slightly short.\n\t\t\t\t\t\temuTabCurrH += maxLineHeight\n\t\t\t\t\t})\n\t\t\t\t}\n\n\t\t\t\t// WIP: NEW: TEST THIS!!\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\tif (currTableRow.length > 0) {\n\t\t\tnewTableRowSlide.rows.push(currTableRow)\n\t\t\tnewTableRowSlide.rowH?.push(resolveRowH(iRow))\n\t\t}\n\n\t\t// G: Update colSpanDepths for the next row's hasActiveRowSpan check.\n\t\t// Snapshot occupied columns *before* adding new spans from this row so that\n\t\t// cells in this row are placed correctly even when the row itself starts spans.\n\t\tconst occupiedBefore = [...colSpanDepths]\n\t\tlet colCursor = 0\n\t\trow.forEach((cell) => {\n\t\t\twhile (colCursor < numCols && (occupiedBefore[colCursor] ?? 0) > 0) colCursor++\n\t\t\tconst cellColspan = cell.options?.colspan ?? 1\n\t\t\tconst cellRowspan = cell.options?.rowspan ?? 1\n\t\t\tif (cellRowspan > 1) {\n\t\t\t\tfor (let c = 0; c < cellColspan && colCursor + c < numCols; c++) {\n\t\t\t\t\tcolSpanDepths[colCursor + c] = cellRowspan\n\t\t\t\t}\n\t\t\t}\n\t\t\tcolCursor += cellColspan\n\t\t})\n\t\t// Consume one row from every active span (including ones just opened above).\n\t\tfor (let c = 0; c < numCols; c++) {\n\t\t\tconst depth = colSpanDepths[c] ?? 0\n\t\t\tif (depth > 0) colSpanDepths[c] = depth - 1\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 t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AAO;AACR"}
1
+ {"version":3,"file":"autopage-DkjYZUFD.js","names":[],"sources":["../src/gen/table/autopage.ts"],"sourcesContent":["/**\n * ts-pptx: 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, LINEH_MODIFIER } from '../../constants-internal.js'\nimport type {\n\tPresLayout,\n\tTableCell,\n\tTableToSlidesProps,\n\tTableRow,\n\tTableRowSlide,\n\tTableCellProps,\n} from '../../types/index.js'\nimport type { SlideLayoutInternal } from '../../types/internal.js'\nimport { getSmartParseNumber, inch2Emu, marginToEmu } from '../../units-internal.js'\nimport { warn } from '../../diagnostics.js'\nimport { EMU_PER_INCH, POINTS_PER_INCH } from '../../units.js'\n\ntype AutoPageCell = TableCell & {\n\t_lineHeight: number\n\t_lines: TableCell[][]\n\toptions: TableCellProps\n\ttext: TableCell[]\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 * @param {TableCell} cell - table cell\n * @param {number} colWidth - table column width (inches)\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 {TableRow[]} - cell's text objects grouped into lines\n */\nfunction parseTextToLines(cell: TableCell, colWidth: number, verbose?: boolean): TableCell[][] {\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 + (cell.options?.autoPageCharWeight ? cell.options.autoPageCharWeight : 0) // 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 =\n\t\tMath.floor(colWidth * POINTS_PER_INCH) / ((cell.options?.fontSize ? cell.options.fontSize : DEF_FONT_SIZE) / 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)\n\t\tconsole.log(\n\t\t\t`[0/4] colWidth=${colWidth}in fontSize=${cell.options?.fontSize ?? DEF_FONT_SIZE} FOCO=${FOCO} CPL=${CPL}`\n\t\t)\n\n\tconst parsedLines: TableCell[][] = []\n\tlet inputCells: TableCell[] = []\n\tconst inputLines1: TableCell[][] = []\n\tconst inputLines2: TableCell[][] = []\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: TableCell[] = []\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({ _type: SlideObjectType.tablecell, text: part, options: 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({ _type: SlideObjectType.tablecell, text: cell.text.trim(), options: 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: TableCell[] = []\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: TableCell[] = []\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\tif (strCurrLine.length + wordText.length > CPL) {\n\t\t\t\tparsedLines.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// ===== 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 * 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 {TableCell[][]} tableRows - table rows\n * @param {TableToSlidesProps} 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\ttableRows: TableCell[][] = [],\n\ttableProps: TableToSlidesProps = {},\n\tpresLayout: PresLayout,\n\tmasterSlide?: SlideLayoutInternal | null\n): TableRowSlide[] {\n\tlet arrInchMargins = DEF_SLIDE_MARGIN_IN\n\tlet emuSlideTabW: 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\tfunction calcSlideTabH(): void {\n\t\tlet emuStartY = 0\n\t\tif (tableRowSlides.length === 0) emuStartY = tablePropY || inch2Emu(arrInchMargins[0])\n\t\tif (tableRowSlides.length > 0) emuStartY = inch2Emu(tableProps.autoPageSlideStartY || arrInchMargins[0])\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\n\t\t// bottom coordinate, so — unlike `presLayout.height` — the first slide must NOT subtract the\n\t\t// start-Y from it. Otherwise a table that begins mid-slide gets a tiny first page (only a few\n\t\t// rows) while later pages, which already clamp to `h`, render normally. Mirror the\n\t\t// subsequent-slide rule below: never let an explicit `h` shrink the usable height below `h`.\n\t\tif (tableRowSlides.length === 0 && tablePropH && emuSlideTabH < tablePropH) emuSlideTabH = tablePropH\n\t\tif (tableRowSlides.length > 1) {\n\t\t\t// D: RULE: Use margins for starting point after the initial Slide, not `opt.y`\n\t\t\tif (typeof tableProps.autoPageSlideStartY === 'number') {\n\t\t\t\temuSlideTabH = (tablePropH || presLayout.height) - inch2Emu(tableProps.autoPageSlideStartY + arrInchMargins[2])\n\t\t\t} else if (tablePropY) {\n\t\t\t\temuSlideTabH =\n\t\t\t\t\t(tablePropH || presLayout.height) -\n\t\t\t\t\tinch2Emu(\n\t\t\t\t\t\t(tablePropY / EMU_PER_INCH < arrInchMargins[0] ? tablePropY / EMU_PER_INCH : arrInchMargins[0]) +\n\t\t\t\t\t\t\tarrInchMargins[2]\n\t\t\t\t\t)\n\t\t\t\t// Use whichever is greater: area between margins or the table H provided (dont shrink usable area - the whole point of over-riding Y on paging is to *increase* usable space)\n\t\t\t\tif (emuSlideTabH < tablePropH) emuSlideTabH = tablePropH\n\t\t\t}\n\t\t}\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 = inch2Emu(\n\t\t\t((typeof tableProps.fontSize === 'number' ? tableProps.fontSize : DEF_FONT_SIZE) *\n\t\t\t\t(LINEH_MODIFIER + (tableProps.autoPageLineWeight || 0))) /\n\t\t\t\t100\n\t\t)\n\t\tif (emuSlideTabH < emuBaseLineH) {\n\t\t\tconst emuStartY =\n\t\t\t\ttableRowSlides.length === 0\n\t\t\t\t\t? tablePropY || inch2Emu(arrInchMargins[0])\n\t\t\t\t\t: inch2Emu(tableProps.autoPageSlideStartY || arrInchMargins[0])\n\t\t\tconst fallbackH = presLayout.height - emuStartY - 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// Important: Use default size as zero cell margin is causing our tables to be too large and touch bottom of slide!\n\t\tif (!tableProps.slideMargin && tableProps.slideMargin !== 0) tableProps.slideMargin = DEF_SLIDE_MARGIN_IN[0]\n\n\t\tif (masterSlide && typeof masterSlide._margin !== 'undefined') {\n\t\t\tif (Array.isArray(masterSlide._margin)) arrInchMargins = masterSlide._margin\n\t\t\telse if (!isNaN(Number(masterSlide._margin))) {\n\t\t\t\tarrInchMargins = [\n\t\t\t\t\tNumber(masterSlide._margin),\n\t\t\t\t\tNumber(masterSlide._margin),\n\t\t\t\t\tNumber(masterSlide._margin),\n\t\t\t\t\tNumber(masterSlide._margin),\n\t\t\t\t]\n\t\t\t}\n\t\t} else if (tableProps.slideMargin || tableProps.slideMargin === 0) {\n\t\t\tif (Array.isArray(tableProps.slideMargin)) arrInchMargins = tableProps.slideMargin\n\t\t\telse if (!isNaN(tableProps.slideMargin))\n\t\t\t\tarrInchMargins = [\n\t\t\t\t\ttableProps.slideMargin,\n\t\t\t\t\ttableProps.slideMargin,\n\t\t\t\t\ttableProps.slideMargin,\n\t\t\t\t\ttableProps.slideMargin,\n\t\t\t\t]\n\t\t}\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\t// NOTE: Cells may have a colspan, so merely taking the length of the [0] (or any other) row is not\n\t\t// ....: sufficient to determine column count. Therefore, check each cell for a colspan and total cols as reqd\n\t\tconst firstRow = tableRows[0] || []\n\t\tfirstRow.forEach((cell) => {\n\t\t\tif (!cell) cell = { _type: SlideObjectType.tablecell }\n\t\t\tconst cellOpts = cell.options || null\n\t\t\tnumCols += Number(cellOpts?.colspan ? cellOpts.colspan : 1)\n\t\t})\n\t\tif (tableProps.verbose) console.log(`| numCols ......................................... = ${numCols}`)\n\t}\n\n\t// Track per-column remaining rowspan depths so we can suppress page breaks that would\n\t// fall inside a rowspan group. colSpanDepths[c] = how many more rows column c is still\n\t// occupied by a rowspan that started in a previous row.\n\tconst colSpanDepths: number[] = new Array<number>(numCols).fill(0)\n\n\t// STEP 3: Calculate width using tableProps.colW if possible\n\tif (!tablePropW && tableProps.colW) {\n\t\ttableCalcW = Array.isArray(tableProps.colW)\n\t\t\t? tableProps.colW.reduce((p, n) => p + n) * EMU_PER_INCH\n\t\t\t: tableProps.colW * numCols || 0\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 =\n\t\t\ttableCalcW || inch2Emu((tablePropX ? tablePropX / EMU_PER_INCH : arrInchMargins[1]) + arrInchMargins[3])\n\t\tif (tableProps.verbose)\n\t\t\tconsole.log(`| emuSlideTabW .................................... = ${(emuSlideTabW / EMU_PER_INCH).toFixed(1)}`)\n\t}\n\n\t// STEP 5: Calculate column widths if not provided (emuSlideTabW will be used below to determine lines-per-col)\n\tif (!tableProps.colW || !Array.isArray(tableProps.colW)) {\n\t\tif (tableProps.colW && !isNaN(Number(tableProps.colW))) {\n\t\t\tconst arrColW: number[] = []\n\t\t\tconst colW = Number(tableProps.colW)\n\t\t\tconst firstRow = tableRows[0] || []\n\t\t\tfirstRow.forEach(() => arrColW.push(colW))\n\t\t\ttableProps.colW = []\n\t\t\tarrColW.forEach((val) => {\n\t\t\t\tif (Array.isArray(tableProps.colW)) tableProps.colW.push(val)\n\t\t\t})\n\t\t} else {\n\t\t\t// No column widths provided? Then distribute cols.\n\t\t\ttableProps.colW = []\n\t\t\tfor (let iCol = 0; iCol < numCols; iCol++) {\n\t\t\t\ttableProps.colW.push(emuSlideTabW / EMU_PER_INCH / numCols)\n\t\t\t}\n\t\t}\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\tconst resolveRowH = (origRowIdx: number): number | undefined =>\n\t\tArray.isArray(tableProps.rowH) && typeof tableProps.rowH[origRowIdx] === 'number'\n\t\t\t? tableProps.rowH[origRowIdx]\n\t\t\t: undefined\n\n\t// STEP 6: **MAIN** Iterate over rows, add table content, create new slides as rows overflow\n\tlet newTableRowSlide: TableRowSlide = { rows: [] as TableRow[], rowH: [] as Array<number | undefined> }\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 = colSpanDepths.some((d) => d > 0)\n\t\tconst rowCellLines: AutoPageCell[] = []\n\t\tlet maxCellMarTopEmu = 0\n\t\tlet maxCellMarBtmEmu = 0\n\n\t\t// B: Create new row in data model, calc `maxCellMar*`\n\t\tlet currTableRow: TableRow = []\n\t\trow.forEach((cell) => {\n\t\t\tcurrTableRow.push({\n\t\t\t\t_type: SlideObjectType.tablecell,\n\t\t\t\ttext: [],\n\t\t\t\toptions: cell.options,\n\t\t\t})\n\n\t\t\t// Cell margins are inches (see `marginToEmu`); prefer the cell's own top/bottom margin, else the table's.\n\t\t\tconst cellMargin = Array.isArray(cell.options?.margin) ? cell.options.margin : undefined\n\t\t\tconst tableMargin = Array.isArray(tableProps.margin) ? tableProps.margin : null\n\t\t\tif (cellMargin?.[0] && marginToEmu(cellMargin[0]) > maxCellMarTopEmu)\n\t\t\t\tmaxCellMarTopEmu = marginToEmu(cellMargin[0])\n\t\t\telse if (tableMargin?.[0] && marginToEmu(tableMargin[0]) > maxCellMarTopEmu)\n\t\t\t\tmaxCellMarTopEmu = marginToEmu(tableMargin[0])\n\t\t\tif (cellMargin?.[2] && marginToEmu(cellMargin[2]) > maxCellMarBtmEmu)\n\t\t\t\tmaxCellMarBtmEmu = marginToEmu(cellMargin[2])\n\t\t\telse if (tableMargin?.[2] && marginToEmu(tableMargin[2]) > maxCellMarBtmEmu)\n\t\t\t\tmaxCellMarBtmEmu = marginToEmu(tableMargin[2])\n\t\t})\n\n\t\t// C: Calc usable vertical space/table height. Set default value first, adjust below when necessary.\n\t\tcalcSlideTabH()\n\t\temuTabCurrH += maxCellMarTopEmu + maxCellMarBtmEmu // Start row height with margins\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// D: --==[[ BUILD DATA SET ]]==-- (iterate over cells: split text into lines[], set `lineHeight`)\n\t\trow.forEach((cell, iCell) => {\n\t\t\tconst newCellOptions = cell.options || {}\n\t\t\tconst newCell: AutoPageCell = {\n\t\t\t\t_type: SlideObjectType.tablecell,\n\t\t\t\t_lines: [],\n\t\t\t\t_lineHeight: inch2Emu(\n\t\t\t\t\t((cell.options?.fontSize\n\t\t\t\t\t\t? cell.options.fontSize\n\t\t\t\t\t\t: tableProps.fontSize\n\t\t\t\t\t\t\t? tableProps.fontSize\n\t\t\t\t\t\t\t: DEF_FONT_SIZE) *\n\t\t\t\t\t\t(LINEH_MODIFIER + (tableProps.autoPageLineWeight ? tableProps.autoPageLineWeight : 0))) /\n\t\t\t\t\t\t100\n\t\t\t\t),\n\t\t\t\ttext: [],\n\t\t\t\toptions: newCellOptions,\n\t\t\t}\n\n\t\t\t// E-1: Exempt cells with `rowspan` from increasing lineHeight (or we could create a new slide when unecessary!)\n\t\t\tif (newCellOptions.rowspan) newCell._lineHeight = 0\n\n\t\t\t// E-2: The parseTextToLines method uses `autoPageCharWeight`, so inherit from table options\n\t\t\tnewCellOptions.autoPageCharWeight = tableProps.autoPageCharWeight || undefined\n\n\t\t\t// E-3: **MAIN** Parse cell contents into lines based upon col width, font, etc\n\t\t\tconst tableColW = Array.isArray(tableProps.colW) ? tableProps.colW : []\n\t\t\tlet totalColW = tableColW[iCell] ?? 0\n\t\t\tconst cellColspan = cell.options?.colspan\n\t\t\tif (cellColspan) {\n\t\t\t\ttotalColW = tableColW\n\t\t\t\t\t.filter((_cell, idx) => idx >= iCell && idx < idx + cellColspan)\n\t\t\t\t\t.reduce((prev, curr) => prev + curr)\n\t\t\t}\n\n\t\t\t// E-4: Create lines based upon available column width\n\t\t\tnewCell._lines = parseTextToLines(cell, totalColW, tableProps.verbose)\n\n\t\t\t// E-5: Add cell to array\n\t\t\trowCellLines.push(newCell)\n\t\t})\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` ..: [ TableCell, TableCell, TableCell ]\n\t\t * - `TableCell` .....: { _type: 'tablecell', _lines: TableCell[], _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 TableCell[] (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 emuLineMaxH = 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// 1: calc emuLineMaxH\n\t\t\trowCellLines.forEach((cell) => {\n\t\t\t\tif (cell._lineHeight >= emuLineMaxH) emuLineMaxH = cell._lineHeight\n\t\t\t})\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 && !hasActiveRowSpan) {\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: add current slide to Slides array (never push an empty page: a row that does not\n\t\t\t\t// fit yet has no content here, and an empty `rows` slide crashes the recursive addTable)\n\t\t\t\tif (newTableRowSlide.rows.length > 0) tableRowSlides.push(newTableRowSlide)\n\n\t\t\t\t// C: reset working/curr slide to hold rows as they're created\n\t\t\t\tconst newRows: TableRow[] = []\n\t\t\t\tnewTableRowSlide = { rows: newRows, rowH: [] as Array<number | undefined> }\n\n\t\t\t\t// D: reset working/curr row\n\t\t\t\tcurrTableRow = []\n\t\t\t\trow.forEach((cell) => currTableRow.push({ _type: SlideObjectType.tablecell, text: [], options: cell.options }))\n\n\t\t\t\t// E: Calc usable vertical space/table height now as we may still be in the same row and code above (\"C: Calc usable vertical space/table height.\") calc may now be invalid\n\t\t\t\tcalcSlideTabH()\n\n\t\t\t\t// F: reset current table height for this new Slide, then re-charge the row's cell\n\t\t\t\t// margins onto it — the row is starting over here, so it owes them again.\n\t\t\t\t//\n\t\t\t\t// ORDER IS LOAD-BEARING. These two statements used to run the other way round: the\n\t\t\t\t// margins were added and then wiped by the reset, so the first row of every\n\t\t\t\t// continuation slide was the only row in the table that paid no margin. That let a\n\t\t\t\t// continuation slide accept one row more than it had room for, and the extra row\n\t\t\t\t// hung off the bottom of the slide (upstream gitbrent/PptxGenJS#1200). The symptom\n\t\t\t\t// is easy to miss because the pager is *self*-consistent per slide: it only shows\n\t\t\t\t// up as the first slide and the continuation slides disagreeing about how many\n\t\t\t\t// identical rows fit the identical space — which is what\n\t\t\t\t// test/regression/table-autopage-continuation-budget.test.js pins.\n\t\t\t\temuTabCurrH = maxCellMarTopEmu + maxCellMarBtmEmu\n\t\t\t\tif (tableProps.verbose)\n\t\t\t\t\tconsole.log(\n\t\t\t\t\t\t`| SLIDE [${tableRowSlides.length}]: emuSlideTabH ...... = ${(emuSlideTabH / EMU_PER_INCH).toFixed(1)} `\n\t\t\t\t\t)\n\n\t\t\t\t// G: handle repeat headers option /or/ Add new empty row to continue current lines into\n\t\t\t\tif (tableProps.autoPageRepeatHeader && tableProps._arrObjTabHeadRows) {\n\t\t\t\t\ttableProps._arrObjTabHeadRows.forEach((row, headIdx) => {\n\t\t\t\t\t\tconst newHeadRow: TableRow = []\n\t\t\t\t\t\tlet maxLineHeight = 0\n\t\t\t\t\t\trow.forEach((cell) => {\n\t\t\t\t\t\t\tnewHeadRow.push(cell)\n\t\t\t\t\t\t\tif ((cell._lineHeight || 0) > maxLineHeight) maxLineHeight = cell._lineHeight || 0\n\t\t\t\t\t\t})\n\t\t\t\t\t\tnewTableRowSlide.rows.push(newHeadRow)\n\t\t\t\t\t\t// Repeated header rows are the original leading rows, so carry their configured height.\n\t\t\t\t\t\tnewTableRowSlide.rowH?.push(resolveRowH(headIdx))\n\t\t\t\t\t\t// NOTE: possible imprecision — this accumulates line height only; cell top/bottom\n\t\t\t\t\t\t// margins are not added, so autoPage row-height estimates can run slightly short.\n\t\t\t\t\t\temuTabCurrH += maxLineHeight\n\t\t\t\t\t})\n\t\t\t\t}\n\n\t\t\t\t// WIP: NEW: TEST THIS!!\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\tif (currTableRow.length > 0) {\n\t\t\tnewTableRowSlide.rows.push(currTableRow)\n\t\t\tnewTableRowSlide.rowH?.push(resolveRowH(iRow))\n\t\t}\n\n\t\t// G: Update colSpanDepths for the next row's hasActiveRowSpan check.\n\t\t// Snapshot occupied columns *before* adding new spans from this row so that\n\t\t// cells in this row are placed correctly even when the row itself starts spans.\n\t\tconst occupiedBefore = [...colSpanDepths]\n\t\tlet colCursor = 0\n\t\trow.forEach((cell) => {\n\t\t\twhile (colCursor < numCols && (occupiedBefore[colCursor] ?? 0) > 0) colCursor++\n\t\t\tconst cellColspan = cell.options?.colspan ?? 1\n\t\t\tconst cellRowspan = cell.options?.rowspan ?? 1\n\t\t\tif (cellRowspan > 1) {\n\t\t\t\tfor (let c = 0; c < cellColspan && colCursor + c < numCols; c++) {\n\t\t\t\t\tcolSpanDepths[colCursor + c] = cellRowspan\n\t\t\t\t}\n\t\t\t}\n\t\t\tcolCursor += cellColspan\n\t\t})\n\t\t// Consume one row from every active span (including ones just opened above).\n\t\tfor (let c = 0; c < numCols; c++) {\n\t\t\tconst depth = colSpanDepths[c] ?? 0\n\t\t\tif (depth > 0) colSpanDepths[c] = depth - 1\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":";;;;;;;;;;;AAyCA,SAAS,iBAAiB,MAAiB,UAAkB,SAAkC;CAK9F,MAAM,OAAO,OAAO,KAAK,SAAS,qBAAqB,KAAK,QAAQ,qBAAqB;CAOzF,MAAM,MACL,KAAK,MAAM,WAAA,EAA0B,MAAM,KAAK,SAAS,WAAW,KAAK,QAAQ,WAAA,MAA4B;CAK9G,IAAI,SACH,QAAQ,IACP,kBAAkB,SAAS,cAAc,KAAK,SAAS,YAAA,GAA0B,QAAQ,KAAK,OAAO,KACtG;CAED,MAAM,cAA6B,CAAC;CACpC,IAAI,aAA0B,CAAC;CAC/B,MAAM,cAA6B,CAAC;CACpC,MAAM,cAA6B,CAAC;;;;;;;;;;;;;;;CAmBpC,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,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AClC,IAAI,QAAQ,GAAG,cAAc,KAAK,QAAQ;EAC3C;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"}
package/dist/browser.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { C as isChartExType, S as connectorPresetFor, _ as TextAnchor, a as CONNECTOR_PRESETS, b as ZIP_OUTPUT_TYPE, c as OutputType, d as SCHEME_COLORS, f as SHAPE_NAME, g as TableStyle, h as SlideObjectType, i as CHART_NAME, l as PLACEHOLDER_TYPE, m as ShapeType, n as AlignV, o as CONNECTOR_PRESET_NAME, p as SchemeColor, r as BulletType, s as ChartType, t as AlignH, u as PlaceholderType, v as VALID_SHAPE_PRESETS, w as isChartType, x as asChartType, y as WRITE_OUTPUT_TYPE } from "./enums-CvRYniUA.js";
2
- import { $ as PositionProps, $t as CommentProps, A as TableToSlidesDocument, At as ChartPropsChartBar, B as Coord, Bt as ChartPropsChartWaterfall, C as TableCell, Ct as ChartLineDash, D as TableProps, Dt as ChartPropsAxisSer, E as TableCellProps, Et as ChartPropsAxisCat, F as MediaProps, Ft as ChartPropsChartPie, G as GradientStopProps, Gt as ChartPropsTitle, H as DataOrPathRequiredProps, Ht as ChartPropsDataTable, I as MediaType, It as ChartPropsChartRadar, J as ImageFillProps, Jt as OptsChartData, K as HAlign, Kt as ChartSeriesOpts, L as OleObjectProps, Lt as ChartPropsChartRegionMap, M as TableToSlidesProps, Mt as ChartPropsChartDoughnut, N as ImageBaseProps, Nt as ChartPropsChartHistogram, O as TableRow, Ot as ChartPropsAxisVal, P as ImageProps, Pt as ChartPropsChartLine, Q as PatternPreset, Qt as PlaceholderProps, R as BackgroundProps, Rt as ChartPropsChartStock, S as TransitionType, Sn as ShapeProps, St as ChartExStatistics, T as TableCellDiagonals, Tt as ChartOpts, U as GeometryPoint, Ut as ChartPropsFillLine, V as DataOrPathProps, Vt as ChartPropsDataLabel, W as GradientFillProps, Wt as ChartPropsLegend, X as Margin, Xt as ObjectLockProps, Y as LinearGradientFillProps, Yt as OptsChartGridLine, Z as PatternFillProps, Zt as ObjectNameProps, _ as AnimationProps, _n as ShapeAdjustHandlePolar, _t as ChartAxisTickMark, a as Slide, an as SlideComment, at as ConnectorProps, b as TransitionProps, bn as ShapeConnectionSite, bt as ChartExBinning, c as Model3dPoint, cn as TextBaseProps, ct as HyperlinkProps, d as MasterTextStyleLevel, dn as TextMeasurement, dt as ShapeLineProps, en as MeasureTextOptions, et as RadialGradientFillProps, f as MasterTextStyleProps, fn as TextProps, ft as BevelPresetType, g as SlideNumberProps, gn as ShapeAdjustHandle, gt as ChartAreaProps, h as SlideMasterProps, hn as textRuns, ht as PresetMaterialType, i as ObjectOptions, in as ResolvedCommentAuthor, it as BorderProps, j as TableToSlidesElement, jt as ChartPropsChartBoxWhisker, k as TableRowSlide, kt as ChartPropsBase, l as Model3dProps, ln as TextFitShrinkProps, lt as ShadowProps, m as SlideMasterObject, mn as textRun, mt as LightRigType, n as GroupChildProps, nn as NotesTextOptions, nt as ThemeColor, o as SlideLayout, on as TableCellLayout, ot as ConnectorType, p as SlideMasterChartProps, pn as TextPropsOptions, pt as LightRigDirection, q as HexColor, qt as LineCap, r as GroupProps, rn as OverflowBoxOptions, rt as VAlign, s as Model3dCameraProps, sn as TableLayoutResult, st as HyperlinkActionJump, t as AddSlideProps, tn as NotesProps, tt as TextVertType, u as MasterBulletProps, un as TextGlowProps, ut as ShapeFillProps, v as AnimationTrigger, vn as ShapeAdjustHandleXY, vt as ChartDataPointStyle, w as TableCell3DProps, wt as ChartMulti, x as TransitionSoundProps, xn as ShapeGuide, xt as ChartExGeography, y as PresetEffect, yn as ShapeAdjustValue, yt as ChartErrorBarOptions, z as Color, zt as ChartPropsChartSurface } from "./slide-B_aInw3N.js";
3
- import { a as PresentationProps, c as WriteFileProps, d as ThemeProps, i as PresLayout, l as WriteProps, n as PackagePart, o as SectionProps, r as PartsProps, s as WriteBaseProps, t as CustomPropertyValue, u as ThemeColorScheme } from "./pres-Dybf7ZUl.js";
4
- import { A as ptToHundredths, C as emuToInches, D as percentToEmu, E as inchesToEmu, M as SlideZoomProps, N as SummaryZoomProps, O as pixelsToEmu, P as ZoomBaseProps, S as coordToEmu, T as emuToPoints, _ as PERCENT_SCALE, a as ClipShape, b as StandardLayout, c as clipPath, d as DEFAULT_PX_PER_INCH, f as EMU_PER_INCH, g as HUNDREDTHS_PER_POINT, h as FIXED_PCT_PER_PERCENT, i as setDiagnosticHandler, j as SectionZoomProps, k as pointsToEmu, l as PresentationCore, m as Emu, n as DiagnosticHandler, o as FlatSide, p as EMU_PER_POINT, r as resetDiagnosticState, s as HalfDiscPreset, t as Diagnostic, u as ANGLE_UNITS_PER_DEGREE, v as POINTS_PER_INCH, w as emuToPixels, x as StandardLayoutName, y as STANDARD_LAYOUTS } from "./diagnostics-B0OmTOoz.js";
5
- import { a as TsPptxError, c as DiagnosticCode, d as InvalidOptionErrorCode, f as MediaErrorCode, h as UnsupportedFeatureErrorCode, i as PackageReadError, l as ErrorCode, m as TsPptxCode, n as InvalidOptionError, o as TsPptxErrorOptions, p as PackageReadErrorCode, r as MediaError, s as UnsupportedFeatureError, t as InternalError, u as InternalErrorCode } from "./errors-fB1KDJKQ.js";
2
+ import { $ as BorderProps, $t as NotesProps, A as TableToSlidesDocument, At as ChartPropsChartHistogram, B as GradientStopProps, Bt as ChartPropsFillLine, C as TableCell, Cn as ShapeConnectionSite, Ct as ChartPropsAxisCat, D as TableProps, Dt as ChartPropsChartBar, E as TableCellProps, Et as ChartPropsBase, F as Coord, Ft as ChartPropsChartStock, G as Margin, Gt as OptsChartData, H as HexColor, Ht as ChartPropsTitle, I as DataOrPathProps, It as ChartPropsChartSurface, J as PositionProps, Jt as ObjectLockProps, K as PatternFillProps, Kt as OptsChartGridLine, L as DataOrPathRequiredProps, Lt as ChartPropsChartWaterfall, M as TableToSlidesProps, Mt as ChartPropsChartPie, N as BackgroundProps, Nt as ChartPropsChartRadar, O as TableRow, Ot as ChartPropsChartBoxWhisker, P as Color, Pt as ChartPropsChartRegionMap, Q as VAlign, Qt as MeasureTextOptions, R as GeometryPoint, Rt as ChartPropsDataLabel, S as TransitionType, Sn as ShapeAdjustValue, St as ChartOpts, T as TableCellDiagonals, Tn as ShapeProps, Tt as ChartPropsAxisVal, U as ImageFillProps, Ut as ChartSeriesOpts, V as HAlign, Vt as ChartPropsLegend, W as LinearGradientFillProps, Wt as LineCap, X as TextVertType, Xt as PlaceholderProps, Y as RadialGradientFillProps, Yt as ObjectNameProps, Z as ThemeColor, Zt as CommentProps, _ as AnimationProps, _n as MediaType, _t as ChartExBinning, a as Slide, an as TableLayoutResult, at as ShapeFillProps, b as TransitionProps, bn as ShapeAdjustHandlePolar, bt as ChartLineDash, c as Model3dPoint, cn as TextGlowProps, d as MasterTextStyleLevel, dn as TextPropsOptions, dt as PresetMaterialType, en as NotesTextOptions, et as ConnectorProps, f as MasterTextStyleProps, fn as textRun, g as SlideNumberProps, gn as MediaProps, gt as ChartErrorBarOptions, h as SlideMasterProps, hn as ImageProps, ht as ChartDataPointStyle, i as ObjectOptions, in as TableCellLayout, it as ShadowProps, j as TableToSlidesElement, jt as ChartPropsChartLine, k as TableRowSlide, kt as ChartPropsChartDoughnut, l as Model3dProps, ln as TextMeasurement, lt as LightRigDirection, m as SlideMasterObject, mn as ImageBaseProps, mt as ChartAxisTickMark, n as GroupChildProps, nn as ResolvedCommentAuthor, nt as HyperlinkActionJump, o as SlideLayout, on as TextBaseProps, ot as ShapeLineProps, p as SlideMasterChartProps, pn as textRuns, pt as ChartAreaProps, q as PatternPreset, qt as CommonObjectDescriptor, r as GroupProps, rn as SlideComment, rt as HyperlinkProps, s as Model3dCameraProps, sn as TextFitShrinkProps, st as BevelPresetType, t as AddSlideProps, tn as OverflowBoxOptions, tt as ConnectorType, u as MasterBulletProps, un as TextProps, ut as LightRigType, v as AnimationTrigger, vn as OleObjectProps, vt as ChartExGeography, w as TableCell3DProps, wn as ShapeGuide, wt as ChartPropsAxisSer, x as TransitionSoundProps, xn as ShapeAdjustHandleXY, xt as ChartMulti, y as PresetEffect, yn as ShapeAdjustHandle, yt as ChartExStatistics, z as GradientFillProps, zt as ChartPropsDataTable } from "./slide-js0QpRV-.js";
3
+ import { a as PresentationProps, c as WriteFileProps, d as ThemeProps, i as PresLayout, l as WriteProps, n as PackagePart, o as SectionProps, r as PartsProps, s as WriteBaseProps, t as CustomPropertyValue, u as ThemeColorScheme } from "./pres-C5__xkDh.js";
4
+ import { A as ptToHundredths, C as emuToInches, D as percentToEmu, E as inchesToEmu, M as SlideZoomProps, N as SummaryZoomProps, O as pixelsToEmu, P as ZoomBaseProps, S as coordToEmu, T as emuToPoints, _ as PERCENT_SCALE, a as ClipShape, b as StandardLayout, c as clipPath, d as DEFAULT_PX_PER_INCH, f as EMU_PER_INCH, g as HUNDREDTHS_PER_POINT, h as FIXED_PCT_PER_PERCENT, i as setDiagnosticHandler, j as SectionZoomProps, k as pointsToEmu, l as PresentationCore, m as Emu, n as DiagnosticHandler, o as FlatSide, p as EMU_PER_POINT, r as resetDiagnosticState, s as HalfDiscPreset, t as Diagnostic, u as ANGLE_UNITS_PER_DEGREE, v as POINTS_PER_INCH, w as emuToPixels, x as StandardLayoutName, y as STANDARD_LAYOUTS } from "./diagnostics-Du_s75MT.js";
5
+ import { a as TsPptxError, c as DiagnosticCode, d as InvalidOptionErrorCode, f as MediaErrorCode, h as UnsupportedFeatureErrorCode, i as PackageReadError, l as ErrorCode, m as TsPptxCode, n as InvalidOptionError, o as TsPptxErrorOptions, p as PackageReadErrorCode, r as MediaError, s as UnsupportedFeatureError, t as InternalError, u as InternalErrorCode } from "./errors-PflMPWBn.js";
6
6
  //#region src/browser.d.ts
7
7
  /**
8
8
  * The browser entry, reached through the `browser` export condition — a bundler resolving the
@@ -27,5 +27,5 @@ declare class TsPptx extends PresentationCore {
27
27
  tableToSlides(eleId: string, options?: TableToSlidesProps): void;
28
28
  }
29
29
  //#endregion
30
- export { ANGLE_UNITS_PER_DEGREE, AddSlideProps, AlignH, AlignV, AnimationProps, AnimationTrigger, BackgroundProps, type BevelPresetType, BorderProps, BulletType, CHART_NAME, CONNECTOR_PRESETS, 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, ConnectorProps, ConnectorType, Coord, CustomPropertyValue, DEFAULT_PX_PER_INCH, DataOrPathProps, DataOrPathRequiredProps, type Diagnostic, type DiagnosticCode, type DiagnosticHandler, EMU_PER_INCH, EMU_PER_POINT, Emu, type ErrorCode, FIXED_PCT_PER_PERCENT, FlatSide, GeometryPoint, GradientFillProps, GradientStopProps, GroupChildProps, GroupProps, HAlign, HUNDREDTHS_PER_POINT, HalfDiscPreset, HexColor, HyperlinkActionJump, HyperlinkProps, ImageBaseProps, ImageFillProps, ImageProps, InternalError, type InternalErrorCode, InvalidOptionError, type InvalidOptionErrorCode, type LightRigDirection, type LightRigType, LineCap, LinearGradientFillProps, 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, 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, SlideObjectType, SlideZoomProps, StandardLayout, StandardLayoutName, SummaryZoomProps, TableCell, TableCell3DProps, TableCellDiagonals, TableCellLayout, TableCellProps, TableLayoutResult, TableProps, TableRow, TableRowSlide, TableStyle, TableToSlidesDocument, TableToSlidesElement, TableToSlidesProps, TextAnchor, TextBaseProps, TextFitShrinkProps, TextGlowProps, TextMeasurement, TextProps, TextPropsOptions, TextVertType, ThemeColor, ThemeColorScheme, ThemeProps, TransitionProps, TransitionSoundProps, TransitionType, TsPptx, TsPptx as default, type TsPptxCode, TsPptxError, type TsPptxErrorOptions, UnsupportedFeatureError, type UnsupportedFeatureErrorCode, VALID_SHAPE_PRESETS, VAlign, WRITE_OUTPUT_TYPE, WriteBaseProps, WriteFileProps, WriteProps, ZIP_OUTPUT_TYPE, ZoomBaseProps, asChartType, clipPath, connectorPresetFor, coordToEmu, emuToInches, emuToPixels, emuToPoints, inchesToEmu, isChartExType, isChartType, percentToEmu, pixelsToEmu, pointsToEmu, ptToHundredths, resetDiagnosticState, setDiagnosticHandler, textRun, textRuns };
30
+ export { ANGLE_UNITS_PER_DEGREE, AddSlideProps, AlignH, AlignV, AnimationProps, AnimationTrigger, BackgroundProps, type BevelPresetType, BorderProps, BulletType, CHART_NAME, CONNECTOR_PRESETS, 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, ConnectorProps, ConnectorType, Coord, CustomPropertyValue, DEFAULT_PX_PER_INCH, DataOrPathProps, DataOrPathRequiredProps, type Diagnostic, type DiagnosticCode, type DiagnosticHandler, EMU_PER_INCH, EMU_PER_POINT, Emu, type ErrorCode, FIXED_PCT_PER_PERCENT, FlatSide, GeometryPoint, GradientFillProps, GradientStopProps, GroupChildProps, GroupProps, HAlign, HUNDREDTHS_PER_POINT, HalfDiscPreset, HexColor, HyperlinkActionJump, HyperlinkProps, ImageBaseProps, ImageFillProps, ImageProps, InternalError, type InternalErrorCode, InvalidOptionError, type InvalidOptionErrorCode, type LightRigDirection, type LightRigType, LineCap, LinearGradientFillProps, 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, 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, SlideObjectType, SlideZoomProps, StandardLayout, StandardLayoutName, SummaryZoomProps, TableCell, TableCell3DProps, TableCellDiagonals, TableCellLayout, TableCellProps, TableLayoutResult, TableProps, TableRow, TableRowSlide, TableStyle, TableToSlidesDocument, TableToSlidesElement, TableToSlidesProps, TextAnchor, TextBaseProps, TextFitShrinkProps, TextGlowProps, TextMeasurement, TextProps, TextPropsOptions, TextVertType, ThemeColor, ThemeColorScheme, ThemeProps, TransitionProps, TransitionSoundProps, TransitionType, TsPptx, TsPptx as default, type TsPptxCode, TsPptxError, type TsPptxErrorOptions, UnsupportedFeatureError, type UnsupportedFeatureErrorCode, VALID_SHAPE_PRESETS, VAlign, WRITE_OUTPUT_TYPE, WriteBaseProps, WriteFileProps, WriteProps, ZIP_OUTPUT_TYPE, ZoomBaseProps, asChartType, clipPath, connectorPresetFor, coordToEmu, emuToInches, emuToPixels, emuToPoints, inchesToEmu, isChartExType, isChartType, percentToEmu, pixelsToEmu, pointsToEmu, ptToHundredths, resetDiagnosticState, setDiagnosticHandler, textRun, textRuns };
31
31
  //# sourceMappingURL=browser.d.ts.map
package/dist/browser.js CHANGED
@@ -1,8 +1,8 @@
1
- import { n as setDiagnosticHandler, t as resetDiagnosticState } from "./diagnostics-CPVADSL1.js";
1
+ import { _ as pointsToEmu, a as FIXED_PCT_PER_PERCENT, b as setDiagnosticHandler, c as POINTS_PER_INCH, d as emuToInches, f as emuToPixels, g as pixelsToEmu, h as percentToEmu, i as EMU_PER_POINT, l as STANDARD_LAYOUTS, m as inchesToEmu, n as DEFAULT_PX_PER_INCH, o as HUNDREDTHS_PER_POINT, p as emuToPoints, r as EMU_PER_INCH, s as PERCENT_SCALE, t as ANGLE_UNITS_PER_DEGREE, u as coordToEmu, v as ptToHundredths, y as resetDiagnosticState } from "./units-1kRzYShk.js";
2
2
  import { a as TsPptxError, i as PackageReadError, n as InvalidOptionError, o as UnsupportedFeatureError, r as MediaError, t as InternalError } from "./errors-Bvln0H-7.js";
3
- import { $ as VALID_SHAPE_PRESETS, G as ChartType, H as AlignV, J as SchemeColor, K as OutputType, M as IMG_SVG_PLACEHOLDER, Q as TextAnchor, U as BulletType, V as AlignH, W as CONNECTOR_PRESETS, X as SlideObjectType, Y as ShapeType, Z as TableStyle, _t as inchesToEmu, at as DEFAULT_PX_PER_INCH, bt as pointsToEmu, ct as FIXED_PCT_PER_PERCENT, dt as POINTS_PER_INCH, et as asChartType, ft as STANDARD_LAYOUTS, gt as emuToPoints, ht as emuToPixels, it as ANGLE_UNITS_PER_DEGREE, lt as HUNDREDTHS_PER_POINT, mt as emuToInches, nt as isChartExType, ot as EMU_PER_INCH, pt as coordToEmu, q as PlaceholderType, rt as isChartType, st as EMU_PER_POINT, tt as connectorPresetFor, ut as PERCENT_SCALE, vt as percentToEmu, xt as ptToHundredths, yt as pixelsToEmu } from "./units-internal-DNvK2I6o.js";
4
- import { c as PresentationCore, i as fetchFontBytes, n as textRuns, r as clipPath, t as textRun } from "./text-DSN3anEh.js";
5
- import { t as genTableToSlides } from "./html-dom-yUSdCExA.js";
3
+ import { c as PresentationCore, i as fetchFontBytes, l as IMG_SVG_PLACEHOLDER, n as textRuns, r as clipPath, t as textRun } from "./text-CyetbF6p.js";
4
+ import { $ as isChartExType, B as BulletType, G as SchemeColor, H as ChartType, J as TableStyle, K as ShapeType, Q as connectorPresetFor, R as AlignH, U as OutputType, V as CONNECTOR_PRESETS, W as PlaceholderType, X as VALID_SHAPE_PRESETS, Y as TextAnchor, Z as asChartType, et as isChartType, q as SlideObjectType, z as AlignV } from "./units-internal-Dg95w_YD.js";
5
+ import { t as genTableToSlides } from "./html-dom-B0I0QSbU.js";
6
6
  //#region src/runtime/browser.ts
7
7
  function createBrowserRuntime() {
8
8
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"browser.js","names":[],"sources":["../src/runtime/browser.ts","../src/browser.ts"],"sourcesContent":["import { IMG_SVG_PLACEHOLDER } from '../constants-internal.js'\nimport { MediaError } from '../errors.js'\nimport type { SlideRelMedia } from '../types/internal.js'\nimport type { RuntimeAdapter } from './types.js'\nimport { fetchFontBytes } from './fetch-media.js'\n\nexport function createBrowserRuntime(): RuntimeAdapter {\n\treturn {\n\t\twriteFileOutputType: null,\n\t\tloadMedia,\n\t\tcreateSvgPngPreview,\n\t\twriteFile,\n\t\tloadFontData: fetchFontBytes,\n\t}\n}\n\n/**\n * Returns a `data:` URI, not raw base64 — see {@link RuntimeAdapter.loadMedia}. The `FileReader`\n * is what makes this adapter's own implementation worth keeping: it decodes the blob off the main\n * thread, where the shared `fetchMediaBase64` would encode the whole payload synchronously.\n */\nasync function loadMedia(rel: SlideRelMedia & { path: string }): Promise<string> {\n\tconst response = await fetch(rel.path)\n\tif (!response.ok) throw new MediaError('media/fetch-failed', `Unable to load image (fetch): ${rel.path}`)\n\tconst blob = await response.blob()\n\n\treturn await new Promise<string>((resolve, reject) => {\n\t\tconst reader = new FileReader()\n\t\treader.onloadend = () => resolve(reader.result as string)\n\t\treader.onerror = () =>\n\t\t\treject(new MediaError('media/decode-failed', `Unable to load image (FileReader): ${rel.path}`))\n\t\treader.readAsDataURL(blob)\n\t})\n}\n\nasync function createSvgPngPreview(rel: SlideRelMedia): Promise<string> {\n\treturn await new Promise((resolve, reject) => {\n\t\tconst image = new Image()\n\t\tconst fail = (reason?: unknown) => {\n\t\t\trel.data = IMG_SVG_PLACEHOLDER\n\t\t\treject(\n\t\t\t\tnew MediaError(\n\t\t\t\t\t'media/svg-preview-failed',\n\t\t\t\t\t`Unable to load image (image.onerror): ${rel.path}${reason ? ` - ${String(reason)}` : ''}`\n\t\t\t\t)\n\t\t\t)\n\t\t}\n\n\t\timage.onload = () => {\n\t\t\tif (image.width + image.height === 0) {\n\t\t\t\tfail('h/w=0')\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst canvas = document.createElement('CANVAS') as HTMLCanvasElement\n\t\t\tconst ctx = canvas.getContext('2d')\n\t\t\tif (!ctx) {\n\t\t\t\tfail('canvas 2d context unavailable')\n\t\t\t\treturn\n\t\t\t}\n\t\t\tcanvas.width = image.width\n\t\t\tcanvas.height = image.height\n\t\t\tctx.drawImage(image, 0, 0)\n\t\t\ttry {\n\t\t\t\t// `rel.type` is `image/png`, not the SVG's type, so this is a valid canvas output\n\t\t\t\t// type and not an `image/svg+xml` that silently falls back to PNG.\n\t\t\t\t// `createSvgPngPreview` is only called on a rel flagged `isSvgPng` — all three\n\t\t\t\t// call sites in `gen/media.ts` filter on it — and the only two places that\n\t\t\t\t// create such a rel (`gen/define/image.ts`, `gen/define/text.ts`) set the\n\t\t\t\t// *fallback's* type, since that is the part this writes. The SVG keeps its own\n\t\t\t\t// rel beside it.\n\t\t\t\trel.data = canvas.toDataURL(rel.type)\n\t\t\t\tresolve('done')\n\t\t\t} catch (ex) {\n\t\t\t\tfail(ex)\n\t\t\t}\n\t\t}\n\t\timage.onerror = () => fail()\n\t\timage.src = typeof rel.data === 'string' ? rel.data : IMG_SVG_PLACEHOLDER\n\t})\n}\n\nasync function writeFile(fileName: string, data: string | ArrayBuffer | Blob | Uint8Array): Promise<string> {\n\tconst eleLink = document.createElement('a')\n\teleLink.setAttribute('style', 'display:none;')\n\teleLink.dataset['interception'] = 'off'\n\tdocument.body.appendChild(eleLink)\n\n\tconst url = window.URL.createObjectURL(\n\t\tnew Blob([data as Blob], { type: 'application/vnd.openxmlformats-officedocument.presentationml.presentation' })\n\t)\n\teleLink.href = url\n\teleLink.download = fileName\n\teleLink.click()\n\n\tsetTimeout(() => {\n\t\twindow.URL.revokeObjectURL(url)\n\t\tdocument.body.removeChild(eleLink)\n\t}, 100)\n\n\treturn fileName\n}\n","import PresentationCore from './presentation.js'\nimport { createBrowserRuntime } from './runtime/browser.js'\nimport { genTableToSlides } from './gen/table/html-dom.js'\nimport type { TableToSlidesProps } from './types/index.js'\n\n/**\n * The browser entry, reached through the `browser` export condition — a bundler resolving the\n * bare `@shbernal/ts-pptx` specifier for the web lands here without naming this subpath.\n *\n * Same authoring API as every other entry (see `entry-surface.ts`), plus one method that only\n * makes sense with a live DOM: {@link TsPptx.tableToSlides}. `writeFile` triggers a download\n * rather than touching a filesystem.\n */\nexport class TsPptx extends PresentationCore {\n\tconstructor() {\n\t\tsuper(createBrowserRuntime())\n\t}\n\n\t/**\n\t * Reproduces a rendered HTML `<table>` as a PowerPoint table — including column widths,\n\t * style, etc. — creating one or more slides as needed. Resolves `eleId` against the global\n\t * `document`, so it exists only on the browser/standalone build; the same conversion is\n\t * available anywhere there is a DOM as the free `tableToSlides` on `ts-pptx/html`, which\n\t * also takes the element directly. The in-memory `slide.addTable(rows, opts)` path remains\n\t * the platform-agnostic way to build a table from data you already hold.\n\t * @param {string} eleId - table HTML element ID\n\t * @param {TableToSlidesProps} options - generation options\n\t */\n\ttableToSlides(eleId: string, options: TableToSlidesProps = {}): void {\n\t\t// @note `options.verbose` (a documented dev-only flag on TableToSlidesProps) is read\n\t\t// inside genTableToSlides to trace the auto-paging layout process.\n\t\tgenTableToSlides(this, eleId, options)\n\t}\n}\n\nexport { TsPptx as default }\nexport * from './entry-surface.js'\n"],"mappings":";;;;;;AAMA,SAAgB,uBAAuC;CACtD,OAAO;EACN,qBAAqB;EACrB;EACA;EACA;EACA,cAAc;CACf;AACD;;;;;;AAOA,eAAe,UAAU,KAAwD;CAChF,MAAM,WAAW,MAAM,MAAM,IAAI,IAAI;CACrC,IAAI,CAAC,SAAS,IAAI,MAAM,IAAI,WAAW,sBAAsB,iCAAiC,IAAI,MAAM;CACxG,MAAM,OAAO,MAAM,SAAS,KAAK;CAEjC,OAAO,MAAM,IAAI,SAAiB,SAAS,WAAW;EACrD,MAAM,SAAS,IAAI,WAAW;EAC9B,OAAO,kBAAkB,QAAQ,OAAO,MAAgB;EACxD,OAAO,gBACN,OAAO,IAAI,WAAW,uBAAuB,sCAAsC,IAAI,MAAM,CAAC;EAC/F,OAAO,cAAc,IAAI;CAC1B,CAAC;AACF;AAEA,eAAe,oBAAoB,KAAqC;CACvE,OAAO,MAAM,IAAI,SAAS,SAAS,WAAW;EAC7C,MAAM,QAAQ,IAAI,MAAM;EACxB,MAAM,QAAQ,WAAqB;GAClC,IAAI,OAAO;GACX,OACC,IAAI,WACH,4BACA,yCAAyC,IAAI,OAAO,SAAS,MAAM,OAAO,MAAM,MAAM,IACvF,CACD;EACD;EAEA,MAAM,eAAe;GACpB,IAAI,MAAM,QAAQ,MAAM,WAAW,GAAG;IACrC,KAAK,OAAO;IACZ;GACD;GACA,MAAM,SAAS,SAAS,cAAc,QAAQ;GAC9C,MAAM,MAAM,OAAO,WAAW,IAAI;GAClC,IAAI,CAAC,KAAK;IACT,KAAK,+BAA+B;IACpC;GACD;GACA,OAAO,QAAQ,MAAM;GACrB,OAAO,SAAS,MAAM;GACtB,IAAI,UAAU,OAAO,GAAG,CAAC;GACzB,IAAI;IAQH,IAAI,OAAO,OAAO,UAAU,IAAI,IAAI;IACpC,QAAQ,MAAM;GACf,SAAS,IAAI;IACZ,KAAK,EAAE;GACR;EACD;EACA,MAAM,gBAAgB,KAAK;EAC3B,MAAM,MAAM,OAAO,IAAI,SAAS,WAAW,IAAI,OAAO;CACvD,CAAC;AACF;AAEA,eAAe,UAAU,UAAkB,MAAiE;CAC3G,MAAM,UAAU,SAAS,cAAc,GAAG;CAC1C,QAAQ,aAAa,SAAS,eAAe;CAC7C,QAAQ,QAAQ,kBAAkB;CAClC,SAAS,KAAK,YAAY,OAAO;CAEjC,MAAM,MAAM,OAAO,IAAI,gBACtB,IAAI,KAAK,CAAC,IAAY,GAAG,EAAE,MAAM,4EAA4E,CAAC,CAC/G;CACA,QAAQ,OAAO;CACf,QAAQ,WAAW;CACnB,QAAQ,MAAM;CAEd,iBAAiB;EAChB,OAAO,IAAI,gBAAgB,GAAG;EAC9B,SAAS,KAAK,YAAY,OAAO;CAClC,GAAG,GAAG;CAEN,OAAO;AACR;;;;;;;;;;;ACvFA,IAAa,SAAb,cAA4B,iBAAiB;CAC5C,cAAc;EACb,MAAM,qBAAqB,CAAC;CAC7B;;;;;;;;;;;CAYA,cAAc,OAAe,UAA8B,CAAC,GAAS;EAGpE,iBAAiB,MAAM,OAAO,OAAO;CACtC;AACD"}
1
+ {"version":3,"file":"browser.js","names":[],"sources":["../src/runtime/browser.ts","../src/browser.ts"],"sourcesContent":["import { IMG_SVG_PLACEHOLDER } from '../media/placeholders.js'\nimport { MediaError } from '../errors.js'\nimport type { SlideRelMedia } from '../types/internal.js'\nimport type { RuntimeAdapter } from './types.js'\nimport { fetchFontBytes } from './fetch-media.js'\n\nexport function createBrowserRuntime(): RuntimeAdapter {\n\treturn {\n\t\twriteFileOutputType: null,\n\t\tloadMedia,\n\t\tcreateSvgPngPreview,\n\t\twriteFile,\n\t\tloadFontData: fetchFontBytes,\n\t}\n}\n\n/**\n * Returns a `data:` URI, not raw base64 — see {@link RuntimeAdapter.loadMedia}. The `FileReader`\n * is what makes this adapter's own implementation worth keeping: it decodes the blob off the main\n * thread, where the shared `fetchMediaBase64` would encode the whole payload synchronously.\n */\nasync function loadMedia(rel: SlideRelMedia & { path: string }): Promise<string> {\n\tconst response = await fetch(rel.path)\n\tif (!response.ok) throw new MediaError('media/fetch-failed', `Unable to load image (fetch): ${rel.path}`)\n\tconst blob = await response.blob()\n\n\treturn await new Promise<string>((resolve, reject) => {\n\t\tconst reader = new FileReader()\n\t\treader.onloadend = () => resolve(reader.result as string)\n\t\treader.onerror = () =>\n\t\t\treject(new MediaError('media/decode-failed', `Unable to load image (FileReader): ${rel.path}`))\n\t\treader.readAsDataURL(blob)\n\t})\n}\n\nasync function createSvgPngPreview(rel: SlideRelMedia): Promise<string> {\n\treturn await new Promise((resolve, reject) => {\n\t\tconst image = new Image()\n\t\tconst fail = (reason?: unknown) => {\n\t\t\trel.data = IMG_SVG_PLACEHOLDER\n\t\t\treject(\n\t\t\t\tnew MediaError(\n\t\t\t\t\t'media/svg-preview-failed',\n\t\t\t\t\t`Unable to load image (image.onerror): ${rel.path}${reason ? ` - ${String(reason)}` : ''}`\n\t\t\t\t)\n\t\t\t)\n\t\t}\n\n\t\timage.onload = () => {\n\t\t\tif (image.width + image.height === 0) {\n\t\t\t\tfail('h/w=0')\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst canvas = document.createElement('CANVAS') as HTMLCanvasElement\n\t\t\tconst ctx = canvas.getContext('2d')\n\t\t\tif (!ctx) {\n\t\t\t\tfail('canvas 2d context unavailable')\n\t\t\t\treturn\n\t\t\t}\n\t\t\tcanvas.width = image.width\n\t\t\tcanvas.height = image.height\n\t\t\tctx.drawImage(image, 0, 0)\n\t\t\ttry {\n\t\t\t\t// `rel.type` is `image/png`, not the SVG's type, so this is a valid canvas output\n\t\t\t\t// type and not an `image/svg+xml` that silently falls back to PNG.\n\t\t\t\t// `createSvgPngPreview` is only called on a rel flagged `isSvgPng` — all three\n\t\t\t\t// call sites in `gen/media.ts` filter on it — and the only two places that\n\t\t\t\t// create such a rel (`gen/define/image.ts`, `gen/define/text.ts`) set the\n\t\t\t\t// *fallback's* type, since that is the part this writes. The SVG keeps its own\n\t\t\t\t// rel beside it.\n\t\t\t\trel.data = canvas.toDataURL(rel.type)\n\t\t\t\tresolve('done')\n\t\t\t} catch (ex) {\n\t\t\t\tfail(ex)\n\t\t\t}\n\t\t}\n\t\timage.onerror = () => fail()\n\t\timage.src = typeof rel.data === 'string' ? rel.data : IMG_SVG_PLACEHOLDER\n\t})\n}\n\nasync function writeFile(fileName: string, data: string | ArrayBuffer | Blob | Uint8Array): Promise<string> {\n\tconst eleLink = document.createElement('a')\n\teleLink.setAttribute('style', 'display:none;')\n\teleLink.dataset['interception'] = 'off'\n\tdocument.body.appendChild(eleLink)\n\n\tconst url = window.URL.createObjectURL(\n\t\tnew Blob([data as Blob], { type: 'application/vnd.openxmlformats-officedocument.presentationml.presentation' })\n\t)\n\teleLink.href = url\n\teleLink.download = fileName\n\teleLink.click()\n\n\tsetTimeout(() => {\n\t\twindow.URL.revokeObjectURL(url)\n\t\tdocument.body.removeChild(eleLink)\n\t}, 100)\n\n\treturn fileName\n}\n","import PresentationCore from './presentation.js'\nimport { createBrowserRuntime } from './runtime/browser.js'\nimport { genTableToSlides } from './gen/table/html-dom.js'\nimport type { TableToSlidesProps } from './types/index.js'\n\n/**\n * The browser entry, reached through the `browser` export condition — a bundler resolving the\n * bare `@shbernal/ts-pptx` specifier for the web lands here without naming this subpath.\n *\n * Same authoring API as every other entry (see `entry-surface.ts`), plus one method that only\n * makes sense with a live DOM: {@link TsPptx.tableToSlides}. `writeFile` triggers a download\n * rather than touching a filesystem.\n */\nexport class TsPptx extends PresentationCore {\n\tconstructor() {\n\t\tsuper(createBrowserRuntime())\n\t}\n\n\t/**\n\t * Reproduces a rendered HTML `<table>` as a PowerPoint table — including column widths,\n\t * style, etc. — creating one or more slides as needed. Resolves `eleId` against the global\n\t * `document`, so it exists only on the browser/standalone build; the same conversion is\n\t * available anywhere there is a DOM as the free `tableToSlides` on `ts-pptx/html`, which\n\t * also takes the element directly. The in-memory `slide.addTable(rows, opts)` path remains\n\t * the platform-agnostic way to build a table from data you already hold.\n\t * @param {string} eleId - table HTML element ID\n\t * @param {TableToSlidesProps} options - generation options\n\t */\n\ttableToSlides(eleId: string, options: TableToSlidesProps = {}): void {\n\t\t// @note `options.verbose` (a documented dev-only flag on TableToSlidesProps) is read\n\t\t// inside genTableToSlides to trace the auto-paging layout process.\n\t\tgenTableToSlides(this, eleId, options)\n\t}\n}\n\nexport { TsPptx as default }\nexport * from './entry-surface.js'\n"],"mappings":";;;;;;AAMA,SAAgB,uBAAuC;CACtD,OAAO;EACN,qBAAqB;EACrB;EACA;EACA;EACA,cAAc;CACf;AACD;;;;;;AAOA,eAAe,UAAU,KAAwD;CAChF,MAAM,WAAW,MAAM,MAAM,IAAI,IAAI;CACrC,IAAI,CAAC,SAAS,IAAI,MAAM,IAAI,WAAW,sBAAsB,iCAAiC,IAAI,MAAM;CACxG,MAAM,OAAO,MAAM,SAAS,KAAK;CAEjC,OAAO,MAAM,IAAI,SAAiB,SAAS,WAAW;EACrD,MAAM,SAAS,IAAI,WAAW;EAC9B,OAAO,kBAAkB,QAAQ,OAAO,MAAgB;EACxD,OAAO,gBACN,OAAO,IAAI,WAAW,uBAAuB,sCAAsC,IAAI,MAAM,CAAC;EAC/F,OAAO,cAAc,IAAI;CAC1B,CAAC;AACF;AAEA,eAAe,oBAAoB,KAAqC;CACvE,OAAO,MAAM,IAAI,SAAS,SAAS,WAAW;EAC7C,MAAM,QAAQ,IAAI,MAAM;EACxB,MAAM,QAAQ,WAAqB;GAClC,IAAI,OAAO;GACX,OACC,IAAI,WACH,4BACA,yCAAyC,IAAI,OAAO,SAAS,MAAM,OAAO,MAAM,MAAM,IACvF,CACD;EACD;EAEA,MAAM,eAAe;GACpB,IAAI,MAAM,QAAQ,MAAM,WAAW,GAAG;IACrC,KAAK,OAAO;IACZ;GACD;GACA,MAAM,SAAS,SAAS,cAAc,QAAQ;GAC9C,MAAM,MAAM,OAAO,WAAW,IAAI;GAClC,IAAI,CAAC,KAAK;IACT,KAAK,+BAA+B;IACpC;GACD;GACA,OAAO,QAAQ,MAAM;GACrB,OAAO,SAAS,MAAM;GACtB,IAAI,UAAU,OAAO,GAAG,CAAC;GACzB,IAAI;IAQH,IAAI,OAAO,OAAO,UAAU,IAAI,IAAI;IACpC,QAAQ,MAAM;GACf,SAAS,IAAI;IACZ,KAAK,EAAE;GACR;EACD;EACA,MAAM,gBAAgB,KAAK;EAC3B,MAAM,MAAM,OAAO,IAAI,SAAS,WAAW,IAAI,OAAO;CACvD,CAAC;AACF;AAEA,eAAe,UAAU,UAAkB,MAAiE;CAC3G,MAAM,UAAU,SAAS,cAAc,GAAG;CAC1C,QAAQ,aAAa,SAAS,eAAe;CAC7C,QAAQ,QAAQ,kBAAkB;CAClC,SAAS,KAAK,YAAY,OAAO;CAEjC,MAAM,MAAM,OAAO,IAAI,gBACtB,IAAI,KAAK,CAAC,IAAY,GAAG,EAAE,MAAM,4EAA4E,CAAC,CAC/G;CACA,QAAQ,OAAO;CACf,QAAQ,WAAW;CACnB,QAAQ,MAAM;CAEd,iBAAiB;EAChB,OAAO,IAAI,gBAAgB,GAAG;EAC9B,SAAS,KAAK,YAAY,OAAO;CAClC,GAAG,GAAG;CAEN,OAAO;AACR;;;;;;;;;;;ACvFA,IAAa,SAAb,cAA4B,iBAAiB;CAC5C,cAAc;EACb,MAAM,qBAAqB,CAAC;CAC7B;;;;;;;;;;;CAYA,cAAc,OAAe,UAA8B,CAAC,GAAS;EAGpE,iBAAiB,MAAM,OAAO,OAAO;CACtC;AACD"}
@@ -1,8 +1,8 @@
1
1
  import { f as SHAPE_NAME, h as SlideObjectType, i as CHART_NAME, s as ChartType, y as WRITE_OUTPUT_TYPE } from "./enums-CvRYniUA.js";
2
- import { $ as PositionProps, C as TableCell, D as TableProps, F as MediaProps, I as MediaType, Jt as OptsChartData, O as TableRow, R as BackgroundProps, Tt as ChartOpts, U as GeometryPoint, X as Margin, a as Slide, an as SlideComment, ct as HyperlinkProps, dn as TextMeasurement, en as MeasureTextOptions, f as MasterTextStyleProps, fn as TextProps, g as SlideNumberProps, h as SlideMasterProps, i as ObjectOptions, o as SlideLayout, rn as OverflowBoxOptions, sn as TableLayoutResult, t as AddSlideProps, wt as ChartMulti } from "./slide-B_aInw3N.js";
3
- import { c as WriteFileProps, d as ThemeProps, i as PresLayout, l as WriteProps, n as PackagePart, o as SectionProps, r as PartsProps, s as WriteBaseProps, t as CustomPropertyValue } from "./pres-Dybf7ZUl.js";
4
- import { a as ExtractedSlides, pn as EmbeddedFontSlot } from "./presentation-types-D7cgT-eG.js";
5
- import { c as DiagnosticCode } from "./errors-fB1KDJKQ.js";
2
+ import { C as TableCell, D as TableProps, G as Margin, Gt as OptsChartData, J as PositionProps, Jt as ObjectLockProps, N as BackgroundProps, O as TableRow, Qt as MeasureTextOptions, R as GeometryPoint, St as ChartOpts, _n as MediaType, a as Slide, an as TableLayoutResult, f as MasterTextStyleProps, g as SlideNumberProps, gn as MediaProps, h as SlideMasterProps, i as ObjectOptions, ln as TextMeasurement, o as SlideLayout, rn as SlideComment, rt as HyperlinkProps, t as AddSlideProps, tn as OverflowBoxOptions, un as TextProps, xt as ChartMulti } from "./slide-js0QpRV-.js";
3
+ import { c as WriteFileProps, d as ThemeProps, i as PresLayout, l as WriteProps, n as PackagePart, o as SectionProps, r as PartsProps, s as WriteBaseProps, t as CustomPropertyValue } from "./pres-C5__xkDh.js";
4
+ import { a as ExtractedSlides, gn as EmbeddedFontSlot } from "./presentation-types-DP_8jog7.js";
5
+ import { c as DiagnosticCode } from "./errors-PflMPWBn.js";
6
6
  //#region src/types/zoom.d.ts
7
7
  /** Options shared by all three zoom kinds. */
8
8
  interface ZoomBaseProps extends PositionProps {
@@ -23,6 +23,21 @@ interface ZoomBaseProps extends PositionProps {
23
23
  returnToParent?: boolean;
24
24
  /** Zoom transition duration in milliseconds (`zmPr@transitionDur`). Default `1000`. */
25
25
  transitionDur?: number;
26
+ /**
27
+ * Object lock flags ({@link ObjectLockProps}), as `objectLock` on every other object type.
28
+ *
29
+ * A zoom is a `p:graphicFrame`, so these land on its `a:graphicFrameLocks` and the flags that
30
+ * apply are the graphic-frame ones (`noGrp`, `noDrilldown`, `noSelect`, `noChangeAspect`,
31
+ * `noMove`, `noResize`); a picture-only flag warns and is dropped, as everywhere else. The
32
+ * `mc:Fallback` picture keeps its own fixed lock set — it is what pre-2016 consumers draw, and
33
+ * folding a graphic-frame flag set onto a `a:picLocks` element would warn about every flag the
34
+ * two element types do not share.
35
+ *
36
+ * `noChangeAspect` is on by default (a zoom tile mirrors its target slide's aspect); pass it
37
+ * `false` to lift it.
38
+ * @example { noMove: true, noResize: true } // pin the tile in place
39
+ */
40
+ objectLock?: ObjectLockProps;
26
41
  }
27
42
  /** Slide Zoom: a tile that zooms to a single target slide. */
28
43
  interface SlideZoomProps extends ZoomBaseProps {
@@ -811,4 +826,4 @@ declare function setDiagnosticHandler(next: DiagnosticHandler | null): void;
811
826
  declare function resetDiagnosticState(): void;
812
827
  //#endregion
813
828
  export { ptToHundredths as A, emuToInches as C, percentToEmu as D, inchesToEmu as E, SlideZoomProps as M, SummaryZoomProps as N, pixelsToEmu as O, ZoomBaseProps as P, coordToEmu as S, emuToPoints as T, PERCENT_SCALE as _, ClipShape as a, StandardLayout as b, clipPath as c, DEFAULT_PX_PER_INCH as d, EMU_PER_INCH as f, HUNDREDTHS_PER_POINT as g, FIXED_PCT_PER_PERCENT as h, setDiagnosticHandler as i, SectionZoomProps as j, pointsToEmu as k, PresentationCore as l, Emu as m, DiagnosticHandler as n, FlatSide as o, EMU_PER_POINT as p, resetDiagnosticState as r, HalfDiscPreset as s, Diagnostic as t, ANGLE_UNITS_PER_DEGREE as u, POINTS_PER_INCH as v, emuToPixels as w, StandardLayoutName as x, STANDARD_LAYOUTS as y };
814
- //# sourceMappingURL=diagnostics-B0OmTOoz.d.ts.map
829
+ //# sourceMappingURL=diagnostics-Du_s75MT.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diagnostics-Du_s75MT.d.ts","names":[],"sources":["../src/types/zoom.ts","../src/types/internal.ts","../src/runtime/types.ts","../src/units.ts","../src/presentation.ts","../src/clip.ts","../src/diagnostics.ts"],"mappings":";;;;;;;UAkBiB,sBAAsB;;EAEtC;;;;;EAKA;IAAe;IAAe;;;;;;EAK9B;;EAEA;;;;;;;;;;;;;;;EAeA,aAAa;;;UAIG,uBAAuB;;EAEvC,QAAQ;;;UAIQ,yBAAyB;;EAEzC;;;;;;KAOW,mBAAmB;;;UCjCd,8BAA8B;EAC9C;;EAEA;;UAEgB,0BAA0B;EAC1C,QAAQ,YAAY;;UAEJ,sBAAsB;EACtC,MAAM,aAAa;EACnB,MAAM;EACN,MAAM;EAEN;EACA;EACA;EACA;;;;;;;EAOA;;UAGgB;EAChB,MAAM;;;;;;;;EAQN;EACA;EACA;EACA,OAAO;EACP;EACA;EACA;EACA;;UAEgB;EAChB;EACA,OAAO;EACP;EACA;EACA,gBAAgB;;EAEhB;EACA;EACA;IAAY;IAAW;;;;;;;;;;EASvB;;;;;;;;;EASA;EACA;;EAEA;;UAEgB;EAChB,OAAO;EACP,UAAU;EAEV,OAAO;EAEP,aAAa;EAEb;EAEA;EACA;EACA,YAAY;EAEZ;EACA,QAAQ;EACR;EACA;EACA;EACA,QAAQ;EAER,gBAAgB;EAEhB,OAAO;EAEP,MAAM;EAEN,UAAU;;;;;;;;UAQM;;EAEhB;;EAEA;;EAEA;IAAO;IAAW;IAAW;;;EAE7B;IAAU;IAAW;IAAW;;;EAEhC;IAAM;IAAY;IAAY;;;EAE9B;;EAEA;;;UAGgB;;EAEhB;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;EACA;;;UAGgB;;EAEhB;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;IAAS;IAAW;IAAW;IAAY;;;;UAG3B;EAChB;EACA,OAAO;;EAEP;;EAEA;;UAEgB;EAChB;EACA,UAAU;EACV;EACA,aAAa;EACb,OAAO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
  * `image/unmeasurable-natural-size` whether it came from `addImage` or from `Picture.setImage`.
32
32
  */
33
- type DiagnosticCode = 'object-name/empty' | 'object-name/control-characters' | 'object-name/too-long' | 'object-name/duplicate' | 'animation/target-index-out-of-range' | 'animation/target-not-found' | 'animation/target-missing' | 'chart/invalid-axis-time-unit' | 'chart/non-finite-value' | 'chart/error-bars-missing-values' | 'chart/axis-type-conflict' | 'chart/invalid-metadata' | 'chart/invalid-metadata-key' | 'chart/invalid-metadata-value' | 'chart/option-out-of-range' | 'chart/invalid-subtotal-index' | 'chart/symbol-size-out-of-range' | 'chart/invalid-grid-line-size' | 'chart/invalid-grid-line-style' | 'chart/invalid-grid-line-cap' | 'chart/layout-out-of-range' | 'chart/stock-series-count' | 'comment/missing-author' | 'comment/missing-text' | 'connector/bends-ignored-for-straight' | 'connector/adj-out-of-range' | 'connector/unresolved-binding' | 'group/unsupported-child' | 'group/unrecognized-child' | 'group/no-children' | 'group/partial-frame' | 'image-fill/missing-source' | 'image-fill/missing-base64-header' | 'image-fill/svg-unsupported' | 'image-fill/unresolved-media' | 'image/crop-and-sizing-conflict' | 'image/unmeasurable-natural-size' | 'table/invalid-border' | 'table/invalid-outer-border' | 'table/invalid-horz-overflow' | 'table/invalid-cell3d' | 'table/col-width-count-mismatch' | 'table/autopage-height-too-small' | 'text/invalid-columns' | 'text/invalid-column-spacing' | 'text/invalid-fit-percentage' | 'text/char-spacing-out-of-range' | 'text/line-spacing-out-of-range' | 'text/paragraph-margin-out-of-range' | 'text/paragraph-indent-out-of-range' | 'font/size-out-of-range' | 'bullet/size-out-of-range' | 'bullet/image-missing-base64-header' | 'bullet/image-embed-failed' | 'bullet/invalid-character-code' | 'zoom/missing-target' | 'zoom/unresolved-target' | 'zoom/missing-section-title' | 'zoom/section-not-found' | 'zoom/section-empty' | 'zoom/no-sections-to-summarize' | 'color/not-a-string' | 'color/invalid-value' | 'shadow/invalid-type' | 'shadow/angle-out-of-range' | 'shadow/transparency-out-of-range' | 'shadow/color-has-hash' | 'geometry/invalid-shape-adjust' | 'geometry/shape-adjust-overridden' | 'geometry/arc-node-point-ignored' | 'geometry/invalid-guide' | 'geometry/unknown-guide-operation' | 'geometry/invalid-connection-site' | 'border/unknown-key' | 'border/invalid-dash-type' | 'object-lock/unsupported-on-shape' | 'media/load-failed' | 'model3d/preview-missing' | 'theme/invalid-color-override' | 'master/invalid-text-style-font-size' | 'master/too-many-text-style-levels' | 'notes/hyperlink-slide-unsupported' | 'html/image-missing-source' | 'section/missing-argument' | 'section/missing-title' | 'section/duplicate-title' | 'slide/section-not-found' | 'layout/invalid-definition' | 'inspect/group-transform-missing' | 'inspect/group-transform-degenerate' | 'measure/shrink-unmeasured' | 'measure/resize-unmeasured' | 'measure/heuristic-metrics' | 'measure/uncovered-codepoints' | 'margin/legacy-points' | 'transparency/out-of-range' | 'opacity/out-of-range' | 'line/width-out-of-range' | 'coord/bare-number-is-inches';
33
+ type DiagnosticCode = 'object-name/empty' | 'object-name/control-characters' | 'object-name/too-long' | 'object-name/duplicate' | 'animation/target-index-out-of-range' | 'animation/target-not-found' | 'animation/target-missing' | 'chart/invalid-axis-time-unit' | 'chart/non-finite-value' | 'chart/error-bars-missing-values' | 'chart/axis-type-conflict' | 'chart/invalid-metadata' | 'chart/invalid-metadata-key' | 'chart/invalid-metadata-value' | 'chart/option-out-of-range' | 'chart/invalid-subtotal-index' | 'chart/symbol-size-out-of-range' | 'chart/invalid-grid-line-size' | 'chart/invalid-grid-line-style' | 'chart/invalid-grid-line-cap' | 'chart/layout-out-of-range' | 'chart/stock-series-count' | 'chart/point-count-mismatch' | 'chart/point-index-out-of-range' | 'comment/missing-author' | 'comment/missing-text' | 'connector/bends-ignored-for-straight' | 'connector/adj-out-of-range' | 'connector/unresolved-binding' | 'group/unsupported-child' | 'group/unrecognized-child' | 'group/no-children' | 'group/partial-frame' | 'image-fill/missing-source' | 'image-fill/missing-base64-header' | 'image-fill/svg-unsupported' | 'image-fill/unresolved-media' | 'image/crop-and-sizing-conflict' | 'image/unmeasurable-natural-size' | 'table/invalid-border' | 'table/invalid-outer-border' | 'table/invalid-horz-overflow' | 'table/invalid-cell3d' | 'table/col-width-count-mismatch' | 'table/span-out-of-range' | 'table/autopage-height-too-small' | 'text/invalid-columns' | 'text/invalid-column-spacing' | 'text/invalid-fit-percentage' | 'text/char-spacing-out-of-range' | 'text/line-spacing-out-of-range' | 'text/paragraph-margin-out-of-range' | 'text/paragraph-indent-out-of-range' | 'font/size-out-of-range' | 'bullet/size-out-of-range' | 'bullet/image-missing-base64-header' | 'bullet/image-embed-failed' | 'bullet/invalid-character-code' | 'zoom/missing-target' | 'zoom/unresolved-target' | 'zoom/missing-section-title' | 'zoom/section-not-found' | 'zoom/section-empty' | 'zoom/no-sections-to-summarize' | 'color/not-a-string' | 'color/invalid-value' | 'shadow/invalid-type' | 'shadow/angle-out-of-range' | 'shadow/transparency-out-of-range' | 'shadow/color-has-hash' | 'geometry/invalid-shape-adjust' | 'geometry/shape-adjust-overridden' | 'geometry/arc-node-point-ignored' | 'geometry/invalid-guide' | 'geometry/unknown-guide-operation' | 'geometry/invalid-connection-site' | 'border/unknown-key' | 'border/invalid-dash-type' | 'object-lock/unsupported-on-shape' | 'media/load-failed' | 'model3d/preview-missing' | 'theme/invalid-color-override' | 'master/invalid-text-style-font-size' | 'master/too-many-text-style-levels' | 'notes/hyperlink-slide-unsupported' | 'html/image-missing-source' | 'section/missing-argument' | 'section/missing-title' | 'section/duplicate-title' | 'slide/section-not-found' | 'layout/invalid-definition' | 'diagram/drawing-cache-not-updated' | 'diagram/point-has-no-text-body' | 'inspect/group-transform-missing' | 'inspect/group-transform-degenerate' | 'measure/shrink-unmeasured' | 'measure/resize-unmeasured' | 'measure/heuristic-metrics' | 'measure/uncovered-codepoints' | 'margin/legacy-points' | 'transparency/out-of-range' | 'opacity/out-of-range' | 'line/width-out-of-range' | 'coord/bare-number-is-inches';
34
34
  /**
35
35
  * Conditions carried by `InvalidOptionError`: the caller passed something the library cannot use.
36
36
  *
@@ -49,7 +49,7 @@ type UnsupportedFeatureErrorCode = 'gradient/type-unsupported' | 'group/kind-not
49
49
  * can read, or a part inside one is structurally malformed. Always about *input*, never about
50
50
  * something the library is asked to produce.
51
51
  */
52
- type PackageReadErrorCode = 'zip/not-a-zip-archive' | 'zip/file-read-failed' | 'package/not-an-opc-package' | 'package/content-types-invalid-root' | 'package/content-types-entry-incomplete' | 'package/part-content-type-missing' | 'package/relationships-invalid-root' | 'package/relationship-incomplete' | 'package/relationship-invalid-target-mode' | 'package/duplicate-relationship-id' | 'package/relationship-target-escapes-root' | 'package/relationship-target-missing' | 'package/office-document-relationship-invalid' | 'package/part-missing' | 'package/part-has-no-root' | 'slide/no-shape-tree' | 'shape/no-non-visual-properties' | 'table/cell-has-no-text-body';
52
+ type PackageReadErrorCode = 'zip/not-a-zip-archive' | 'zip/file-read-failed' | 'package/not-an-opc-package' | 'package/content-types-invalid-root' | 'package/content-types-entry-incomplete' | 'package/part-content-type-missing' | 'package/relationships-invalid-root' | 'package/relationship-incomplete' | 'package/relationship-invalid-target-mode' | 'package/duplicate-relationship-id' | 'package/relationship-target-escapes-root' | 'package/relationship-target-missing' | 'package/office-document-relationship-invalid' | 'package/part-missing' | 'package/part-has-no-root' | 'slide/no-shape-tree' | 'shape/no-non-visual-properties' | 'table/cell-has-no-text-body' | 'diagram/parent-edge-cycle';
53
53
  /**
54
54
  * Conditions carried by `MediaError`: an image, font, or audio/video payload could not be fetched,
55
55
  * read, or decoded. Kept separate from `PackageReadError` because the failure is in a *referenced
@@ -179,4 +179,4 @@ declare class InternalError extends TsPptxError {
179
179
  }
180
180
  //#endregion
181
181
  export { TsPptxError as a, DiagnosticCode as c, InvalidOptionErrorCode as d, MediaErrorCode as f, UnsupportedFeatureErrorCode as h, PackageReadError as i, ErrorCode as l, TsPptxCode as m, InvalidOptionError as n, TsPptxErrorOptions as o, PackageReadErrorCode as p, MediaError as r, UnsupportedFeatureError as s, InternalError as t, InternalErrorCode as u };
182
- //# sourceMappingURL=errors-fB1KDJKQ.d.ts.map
182
+ //# sourceMappingURL=errors-PflMPWBn.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"errors-fB1KDJKQ.d.ts","names":[],"sources":["../src/codes.ts","../src/errors.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAgCY;;;;;;;KA2HA;;;;;;KA8IA;;;;;;KAsBA;;;;;;;KA8BA;;;;;;KAqBA;;;;;;;;;;;;;;KAgCA,YACT,yBACA,8BACA,uBACA,iBACA;;KAGS,aAAa,iBAAiB;;;;UC9WzB,2BAA2B;;;;;WAKlC,SAAS,SAAS;;;;;;;;;cAUf,oBAAoB;;WAEvB,MAAM;;WAGN,SAAS,SAAS;;;;;;EAO3B,YAAY,MAAM,WAAW,iBAAiB,UAAU;;;;;;;;;;cAmB5C,2BAA2B;WACtB,MAAM;EACvB,YAAY,MAAM,wBAAwB,iBAAiB,UAAU;;;;;;;;;;;cAczD,gCAAgC;WAC3B,MAAM;EACvB,YAAY,MAAM,6BAA6B,iBAAiB,UAAU;;;;;;;;;;cAa9D,yBAAyB;WACpB,MAAM;EACvB,YAAY,MAAM,sBAAsB,iBAAiB,UAAU;;;;;;;;;cAYvD,mBAAmB;WACd,MAAM;EACvB,YAAY,MAAM,gBAAgB,iBAAiB,UAAU;;;;;;;;;;;;;;;;;;;cAkCjD,sBAAsB;WACjB,MAAM;EACvB,YAAY,MAAM,mBAAmB,iBAAiB,UAAU"}
1
+ {"version":3,"file":"errors-PflMPWBn.d.ts","names":[],"sources":["../src/codes.ts","../src/errors.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAgCY;;;;;;;KAiIA;;;;;;KA8IA;;;;;;KAsBA;;;;;;;KAkCA;;;;;;KAqBA;;;;;;;;;;;;;;KAgCA,YACT,yBACA,8BACA,uBACA,iBACA;;KAGS,aAAa,iBAAiB;;;;UCxXzB,2BAA2B;;;;;WAKlC,SAAS,SAAS;;;;;;;;;cAUf,oBAAoB;;WAEvB,MAAM;;WAGN,SAAS,SAAS;;;;;;EAO3B,YAAY,MAAM,WAAW,iBAAiB,UAAU;;;;;;;;;;cAmB5C,2BAA2B;WACtB,MAAM;EACvB,YAAY,MAAM,wBAAwB,iBAAiB,UAAU;;;;;;;;;;;cAczD,gCAAgC;WAC3B,MAAM;EACvB,YAAY,MAAM,6BAA6B,iBAAiB,UAAU;;;;;;;;;;cAa9D,yBAAyB;WACpB,MAAM;EACvB,YAAY,MAAM,sBAAsB,iBAAiB,UAAU;;;;;;;;;cAYvD,mBAAmB;WACd,MAAM;EACvB,YAAY,MAAM,gBAAgB,iBAAiB,UAAU;;;;;;;;;;;;;;;;;;;cAkCjD,sBAAsB;WACjB,MAAM;EACvB,YAAY,MAAM,mBAAmB,iBAAiB,UAAU"}
@@ -1,6 +1,6 @@
1
- import { r as warn } from "./diagnostics-CPVADSL1.js";
1
+ import { d as emuToInches, i as EMU_PER_POINT, x as warn } from "./units-1kRzYShk.js";
2
2
  import { n as InvalidOptionError, o as UnsupportedFeatureError, r as MediaError } from "./errors-Bvln0H-7.js";
3
- import { F as LINEH_MODIFIER, a as inch2Emu, i as getSmartParseNumber, mt as emuToInches, s as marginToEmu, st as EMU_PER_POINT, u as resolveTableColWidthsEmu, y as DEF_CELL_MARGIN_IN } from "./units-internal-DNvK2I6o.js";
3
+ import { M as LINEH_MODIFIER, a as inch2Emu, i as getSmartParseNumber, s as marginToEmu, u as resolveTableColWidthsEmu, y as DEF_CELL_MARGIN_IN } from "./units-internal-Dg95w_YD.js";
4
4
  //#region src/measure/font-collection.ts
5
5
  /**
6
6
  * Font **collection** (`.ttc` / `.otc`) support for the write-side metrics.
@@ -1353,4 +1353,4 @@ function applyMeasuredFit(slides, registry) {
1353
1353
  //#endregion
1354
1354
  export { parseFontMetrics as _, FONT_SCALE_STEP_PCT as a, SINGLE_LINE_PITCH as c, measureLayout as d, solveResize as f, makeRegistryResolver as g, getHeuristicFontMetrics as h, buildFitParagraphs as i, WIDTH_SAFETY_FACTOR as l, FontMetricsRegistry as m, measureText as n, HEIGHT_SAFETY_FACTOR as o, solveShrink as p, computeTableLayout as r, MIN_FONT_SCALE_PCT as s, applyMeasuredFit as t, measureHeightPt as u, isFontCollection as v, listFontFaces as y };
1355
1355
 
1356
- //# sourceMappingURL=fit-TjpNbMru.js.map
1356
+ //# sourceMappingURL=fit-BKs0zxMI.js.map