@shbernal/ts-pptx 0.0.1 → 2.0.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 (53) hide show
  1. package/README.md +3 -1
  2. package/dist/browser.d.ts +5 -5
  3. package/dist/browser.js +2 -2
  4. package/dist/{diagnostics-DzY9Tyfm.d.ts → diagnostics-CQ0JWc9m.d.ts} +4 -21
  5. package/dist/{diagnostics-DzY9Tyfm.d.ts.map → diagnostics-CQ0JWc9m.d.ts.map} +1 -1
  6. package/dist/{errors-DRLpOpgQ.d.ts → errors-B22h8Qd0.d.ts} +3 -3
  7. package/dist/{errors-DRLpOpgQ.d.ts.map → errors-B22h8Qd0.d.ts.map} +1 -1
  8. package/dist/errors-DGE9zh3U.js.map +1 -1
  9. package/dist/{fit-CbxyHN69.js → fit-BSWY0AYt.js} +0 -0
  10. package/dist/{fit-CbxyHN69.js.map → fit-BSWY0AYt.js.map} +1 -1
  11. package/dist/{html-dom-wVa3TiG7.js → html-dom-BQLUntho.js} +2 -2
  12. package/dist/html-dom-BQLUntho.js.map +1 -0
  13. package/dist/html.d.ts +3 -3
  14. package/dist/html.js +1 -1
  15. package/dist/{image-size-C5Z1sKof.js → image-size-C8uYE8GJ.js} +3 -3
  16. package/dist/{image-size-C5Z1sKof.js.map → image-size-C8uYE8GJ.js.map} +1 -1
  17. package/dist/index.d.ts +5 -5
  18. package/dist/index.js +2 -2
  19. package/dist/inspect.d.ts +1 -1
  20. package/dist/inspect.js +2 -2
  21. package/dist/math.d.ts +1 -1
  22. package/dist/math.js +2 -1
  23. package/dist/math.js.map +1 -1
  24. package/dist/measure.d.ts +2 -2
  25. package/dist/measure.js +1 -1
  26. package/dist/node.d.ts +5 -5
  27. package/dist/node.js +1 -1
  28. package/dist/{pres-5x1bjCzk.d.ts → pres-GU-jjBEx.d.ts} +2 -2
  29. package/dist/{pres-5x1bjCzk.d.ts.map → pres-GU-jjBEx.d.ts.map} +1 -1
  30. package/dist/{presentation-RGOiun5P.d.ts → presentation-CVaTZw1V.d.ts} +316 -18
  31. package/dist/presentation-CVaTZw1V.d.ts.map +1 -0
  32. package/dist/{presentation-B0JWdTN1.js → presentation-MJe9WDi4.js} +21 -27
  33. package/dist/presentation-MJe9WDi4.js.map +1 -0
  34. package/dist/read.d.ts +4 -4
  35. package/dist/read.js +2 -2
  36. package/dist/script.d.ts +2 -2
  37. package/dist/script.d.ts.map +1 -1
  38. package/dist/script.js +0 -0
  39. package/dist/script.js.map +1 -1
  40. package/dist/{shapes-BZU8UTW2.js → shapes-CaOgR0i1.js} +910 -22
  41. package/dist/shapes-CaOgR0i1.js.map +1 -0
  42. package/dist/{slide-B6mDaM-P.d.ts → slide-BBlElWr9.d.ts} +223 -92
  43. package/dist/slide-BBlElWr9.d.ts.map +1 -0
  44. package/dist/{text-WRUbOy2r.js → text-B1ZrPEeK.js} +441 -186
  45. package/dist/text-B1ZrPEeK.js.map +1 -0
  46. package/dist/zip.d.ts +1 -1
  47. package/package.json +9 -20
  48. package/dist/html-dom-wVa3TiG7.js.map +0 -1
  49. package/dist/presentation-B0JWdTN1.js.map +0 -1
  50. package/dist/presentation-RGOiun5P.d.ts.map +0 -1
  51. package/dist/shapes-BZU8UTW2.js.map +0 -1
  52. package/dist/slide-B6mDaM-P.d.ts.map +0 -1
  53. package/dist/text-WRUbOy2r.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"image-size-C5Z1sKof.js","names":[],"sources":["../src/media/base64.ts","../src/media/image-size.ts"],"sourcesContent":["/**\n * Base64 payload handling for media parts — isomorphic across Node and browsers\n * (`TextEncoder`/`atob`/`btoa` only, no `Buffer`).\n */\n\n/**\n * Encode raw SVG markup as a base64 `image/svg+xml` data URI.\n * - lets callers pass inline SVG to `addImage({ svg })` without hand-rolling base64\n * - isomorphic and UTF-8 safe: uses the global `TextEncoder`/`btoa` (Node and browsers)\n * @param {string} svg - SVG markup, e.g. `'<svg ...>...</svg>'`\n * @returns {string} a `data:image/svg+xml;base64,...` URI\n */\nexport function svgMarkupToDataUri(svg: string): string {\n\treturn `data:image/svg+xml;base64,${bytesToBase64(new TextEncoder().encode(svg))}`\n}\n\n/**\n * Encode raw bytes as base64 (no `data:` prefix) using only `btoa`, so the result is the same\n * on Node, in a browser, and in a runtime that has neither `Buffer` nor `FileReader`.\n *\n * Chunked because `String.fromCharCode(...spread)` blows the argument-count limit on a payload\n * of any real size — a multi-megabyte video rel would throw rather than encode.\n * @param {Uint8Array} bytes - the payload\n * @returns {string} base64 text\n */\nexport function bytesToBase64(bytes: Uint8Array): string {\n\tconst CHUNK = 0x8000\n\tlet binary = ''\n\tfor (let i = 0; i < bytes.length; i += CHUNK) binary += String.fromCharCode(...bytes.subarray(i, i + CHUNK))\n\treturn btoa(binary)\n}\n\n/**\n * Decode a base64 image payload (raw base64 or a `data:` URI) to bytes.\n * - tolerant of the `data:[mime];base64,` prefix and of whitespace in the payload\n * @param {string} b64 - base64 string or data URI\n * @returns {Uint8Array | null} decoded bytes, or `null` when the payload is empty/undecodable\n */\nexport function decodeBase64ToBytes(b64: string): Uint8Array | null {\n\tif (!b64) return null\n\t// Strip any `data:...;base64,` prefix and surrounding whitespace\n\tconst comma = b64.indexOf('base64,')\n\tconst payload = (comma >= 0 ? b64.slice(comma + 'base64,'.length) : b64).replace(/\\s/g, '')\n\tif (!payload) return null\n\ttry {\n\t\tconst binary = atob(payload)\n\t\tconst bytes = new Uint8Array(binary.length)\n\t\tfor (let i = 0; i < binary.length; i++) bytes[i] = binary.charCodeAt(i)\n\t\treturn bytes\n\t} catch {\n\t\treturn null\n\t}\n}\n","/**\n * Intrinsic image geometry: reading a natural pixel size out of header bytes, and the\n * `<a:srcRect>` crop math that fits that natural size into a display box.\n *\n * Shared by both sides of the library — the write path (`addImage({ sizing })`) and the read\n * API's `Picture.setImage({ fit })` — which is why it lives outside `gen/` and `read/`.\n * Everything here is synchronous and pure: headers only, never pixel decoding.\n */\n\nimport { decodeBase64ToBytes } from './base64.js'\n\n/**\n * Read the intrinsic dimensions of an image from its header bytes.\n * - synchronous: parses only file-format headers, never decodes pixels\n * - raster: PNG, JPEG, GIF, BMP, and WebP (VP8 / VP8L / VP8X) — natural pixels\n * - vector: SVG — intrinsic size from the root `<svg>` width/height or viewBox\n * - unrecognized formats return `null` (no measurable intrinsic size)\n *\n * Used by image `sizing: 'cover' | 'contain'` to compute an aspect-correct\n * `<a:srcRect>` crop from the *natural* image ratio rather than the displayed box.\n * @param {string} dataB64 - base64 image payload or `data:` URI\n * @returns {{ w: number, h: number } | null} natural size, or `null` when unmeasurable\n */\nexport function getImageSizeFromBase64(dataB64: string): { w: number; h: number } | null {\n\tconst b = decodeBase64ToBytes(dataB64)\n\treturn b ? getImageSizeFromBytes(b) : null\n}\n\n/**\n * Read the intrinsic dimensions of an image from raw header bytes — the\n * byte-level core shared by {@link getImageSizeFromBase64} and the read API's\n * `Picture.setImage({ fit })`, which already holds the media bytes.\n * @param {Uint8Array} b - image bytes\n * @returns {{ w: number, h: number } | null} natural size, or `null` when unmeasurable\n */\nexport function getImageSizeFromBytes(b: Uint8Array): { w: number; h: number } | null {\n\tif (!b || b.length < 24) return null\n\n\t// Bounds-checked byte read: every access below is already guarded by an\n\t// explicit length check, so the `?? 0` fallback is unreachable in practice.\n\tconst u = (n: number): number => b[n] ?? 0\n\n\t// PNG: 8-byte signature, then IHDR with width@16 / height@20 (big-endian uint32)\n\tif (b[0] === 0x89 && b[1] === 0x50 && b[2] === 0x4e && b[3] === 0x47) {\n\t\tconst w = (u(16) << 24) | (u(17) << 16) | (u(18) << 8) | u(19)\n\t\tconst h = (u(20) << 24) | (u(21) << 16) | (u(22) << 8) | u(23)\n\t\treturn w > 0 && h > 0 ? { w, h } : null\n\t}\n\n\t// GIF: \"GIF87a\"/\"GIF89a\", width@6 / height@8 (little-endian uint16)\n\tif (b[0] === 0x47 && b[1] === 0x49 && b[2] === 0x46) {\n\t\tconst w = u(6) | (u(7) << 8)\n\t\tconst h = u(8) | (u(9) << 8)\n\t\treturn w > 0 && h > 0 ? { w, h } : null\n\t}\n\n\t// BMP: \"BM\", width@18 / height@22 (little-endian int32; height may be negative for top-down)\n\tif (b[0] === 0x42 && b[1] === 0x4d) {\n\t\tconst w = u(18) | (u(19) << 8) | (u(20) << 16) | (u(21) << 24)\n\t\tconst h = u(22) | (u(23) << 8) | (u(24) << 16) | (u(25) << 24)\n\t\tconst aw = Math.abs(w)\n\t\tconst ah = Math.abs(h)\n\t\treturn aw > 0 && ah > 0 ? { w: aw, h: ah } : null\n\t}\n\n\t// WebP: \"RIFF\"....\"WEBP\" then a VP8 / VP8L / VP8X chunk\n\tif (\n\t\tb[0] === 0x52 &&\n\t\tb[1] === 0x49 &&\n\t\tb[2] === 0x46 &&\n\t\tb[3] === 0x46 &&\n\t\tb[8] === 0x57 &&\n\t\tb[9] === 0x45 &&\n\t\tb[10] === 0x42 &&\n\t\tb[11] === 0x50\n\t) {\n\t\tconst fourCC = String.fromCharCode(u(12), u(13), u(14), u(15))\n\t\tif (fourCC === 'VP8 ' && b.length >= 30) {\n\t\t\t// Lossy: 14-bit width/height at offset 26/28 (little-endian, mask off scale bits)\n\t\t\tconst w = (u(26) | (u(27) << 8)) & 0x3fff\n\t\t\tconst h = (u(28) | (u(29) << 8)) & 0x3fff\n\t\t\treturn w > 0 && h > 0 ? { w, h } : null\n\t\t}\n\t\tif (fourCC === 'VP8L' && b.length >= 25) {\n\t\t\t// Lossless: 14-bit width/height packed starting at bit 0 of offset 21\n\t\t\tconst bits = u(21) | (u(22) << 8) | (u(23) << 16) | (u(24) << 24)\n\t\t\tconst w = (bits & 0x3fff) + 1\n\t\t\tconst h = ((bits >> 14) & 0x3fff) + 1\n\t\t\treturn w > 0 && h > 0 ? { w, h } : null\n\t\t}\n\t\tif (fourCC === 'VP8X' && b.length >= 30) {\n\t\t\t// Extended: 24-bit canvas width/height minus one at offset 24/27 (little-endian)\n\t\t\tconst w = (u(24) | (u(25) << 8) | (u(26) << 16)) + 1\n\t\t\tconst h = (u(27) | (u(28) << 8) | (u(29) << 16)) + 1\n\t\t\treturn w > 0 && h > 0 ? { w, h } : null\n\t\t}\n\t\treturn null\n\t}\n\n\t// JPEG: \"FFD8\", scan segment markers for a Start-Of-Frame (SOFn) and read height@5 / width@7\n\tif (b[0] === 0xff && b[1] === 0xd8) {\n\t\tlet i = 2\n\t\twhile (i + 9 < b.length) {\n\t\t\tif (b[i] !== 0xff) {\n\t\t\t\ti++\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tconst marker = u(i + 1)\n\t\t\t// SOF0..SOF15 carry frame dimensions, excluding DHT(C4)/JPG(C8)/DAC(CC)\n\t\t\tif (marker >= 0xc0 && marker <= 0xcf && marker !== 0xc4 && marker !== 0xc8 && marker !== 0xcc) {\n\t\t\t\tconst h = (u(i + 5) << 8) | u(i + 6)\n\t\t\t\tconst w = (u(i + 7) << 8) | u(i + 8)\n\t\t\t\treturn w > 0 && h > 0 ? { w, h } : null\n\t\t\t}\n\t\t\t// Standalone markers (RSTn / SOI / EOI / TEM) have no length payload\n\t\t\tif ((marker >= 0xd0 && marker <= 0xd9) || marker === 0x01) {\n\t\t\t\ti += 2\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\t// Otherwise skip this segment using its 2-byte big-endian length\n\t\t\tconst segLen = (u(i + 2) << 8) | u(i + 3)\n\t\t\tif (segLen < 2) break\n\t\t\ti += 2 + segLen\n\t\t}\n\t\treturn null\n\t}\n\n\t// SVG: text-based vector with no binary signature. When the payload is an\n\t// `<svg>` document, read its intrinsic size from the root element so that\n\t// `sizing: 'cover' | 'contain'` is aspect-correct for SVG, not just rasters.\n\tconst text = utf8Decode(b)\n\tif (/<svg[\\s>]/i.test(text)) return getSvgSizeFromMarkup(text)\n\n\treturn null\n}\n\n/**\n * Compute the `<a:srcRect>` crop percentages (each in 1/1000 of a percent, the\n * OOXML unit) for fitting an image of natural size `img` into a display `box`,\n * assuming the cropped region is then stretched to fill the box (`<a:stretch>`).\n *\n * - `cover`: fill the box, cropping the overflowing axis (positive l/r or t/b)\n * - `contain`: fit inside the box, letterboxing the short axis (negative l/r or t/b)\n *\n * Single source of truth for the crop math shared by the write side\n * (`ImageSizingXml`) and the read API's `Picture.setImage({ fit })`. `l`/`r` and\n * `t`/`b` are symmetric (centered crop).\n * @param {'cover' | 'contain'} type - fit mode\n * @param {{ w: number, h: number }} img - natural image pixel size\n * @param {{ w: number, h: number }} box - displayed frame size (any consistent unit)\n * @returns {{ l: number, r: number, t: number, b: number }} srcRect percentages\n */\nexport function fitSrcRectPercents(\n\ttype: 'cover' | 'contain',\n\timg: { w: number; h: number },\n\tbox: { w: number; h: number }\n): { l: number; r: number; t: number; b: number } {\n\tconst imgRatio = img.h / img.w\n\tconst boxRatio = box.h / box.w\n\tlet width: number\n\tlet height: number\n\tif (type === 'cover') {\n\t\tconst isBoxBased = boxRatio > imgRatio\n\t\twidth = isBoxBased ? box.h / imgRatio : box.w\n\t\theight = isBoxBased ? box.h : box.w * imgRatio\n\t} else {\n\t\tconst widthBased = boxRatio > imgRatio\n\t\twidth = widthBased ? box.w : box.h / imgRatio\n\t\theight = widthBased ? box.w * imgRatio : box.h\n\t}\n\tconst hz = Math.round(1e5 * 0.5 * (1 - box.w / width))\n\tconst vz = Math.round(1e5 * 0.5 * (1 - box.h / height))\n\treturn { l: hz, r: hz, t: vz, b: vz }\n}\n\n/**\n * Read the intrinsic size of an SVG document from its root `<svg>` element.\n * Follows the SVG sizing model: an explicit absolute `width`/`height` pair wins;\n * otherwise the `viewBox` width/height defines the size (and thus aspect ratio).\n * Percentage or missing `width`/`height` fall through to `viewBox`.\n * @param {string} svg - SVG markup\n * @returns {{ w: number, h: number } | null} intrinsic size, or `null` when undeterminable\n */\nfunction getSvgSizeFromMarkup(svg: string): { w: number; h: number } | null {\n\tconst openTag = /<svg\\b[^>]*>/i.exec(svg)?.[0]\n\tif (!openTag) return null\n\tconst attr = (name: string): string | null =>\n\t\tnew RegExp(`\\\\b${name}\\\\s*=\\\\s*[\"']([^\"']*)[\"']`, 'i').exec(openTag)?.[1] ?? null\n\t// Leading number with an optional absolute unit; a percentage is not an intrinsic length.\n\tconst absLength = (val: string | null): number => {\n\t\tif (val == null || /%\\s*$/.test(val)) return NaN\n\t\tconst m = /^\\s*\\+?(\\d*\\.?\\d+)/.exec(val)\n\t\treturn m ? parseFloat(m[1] ?? '') : NaN\n\t}\n\tlet w = absLength(attr('width'))\n\tlet h = absLength(attr('height'))\n\tif (!(w > 0 && h > 0)) {\n\t\tconst vb = attr('viewBox')\n\t\tconst p = vb\n\t\t\t? vb\n\t\t\t\t\t.trim()\n\t\t\t\t\t.split(/[\\s,]+/)\n\t\t\t\t\t.map(Number)\n\t\t\t: []\n\t\tconst vw = p[2]\n\t\tconst vh = p[3]\n\t\tif (p.length === 4 && vw != null && vh != null && vw > 0 && vh > 0) {\n\t\t\tw = vw\n\t\t\th = vh\n\t\t}\n\t}\n\treturn w > 0 && h > 0 ? { w, h } : null\n}\n\n/** Decode UTF-8 bytes to a string, isomorphic across Node and browsers. */\nfunction utf8Decode(bytes: Uint8Array): string {\n\treturn new TextDecoder().decode(bytes)\n}\n"],"mappings":";;;;;;;;;;;;AAYA,SAAgB,mBAAmB,KAAqB;CACvD,OAAO,6BAA6B,cAAc,IAAI,YAAY,CAAC,CAAC,OAAO,GAAG,CAAC;AAChF;;;;;;;;;;AAWA,SAAgB,cAAc,OAA2B;CACxD,MAAM,QAAQ;CACd,IAAI,SAAS;CACb,KAAK,IAAI,IAAI,GAAG,IAAI,MAAM,QAAQ,KAAK,OAAO,UAAU,OAAO,aAAa,GAAG,MAAM,SAAS,GAAG,IAAI,KAAK,CAAC;CAC3G,OAAO,KAAK,MAAM;AACnB;;;;;;;AAQA,SAAgB,oBAAoB,KAAgC;CACnE,IAAI,CAAC,KAAK,OAAO;CAEjB,MAAM,QAAQ,IAAI,QAAQ,SAAS;CACnC,MAAM,WAAW,SAAS,IAAI,IAAI,MAAM,QAAQ,CAAgB,IAAI,IAAA,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,KAAK;AACtC"}
1
+ {"version":3,"file":"image-size-C8uYE8GJ.js","names":[],"sources":["../src/media/base64.ts","../src/media/image-size.ts"],"sourcesContent":["/**\n * Base64 payload handling for media parts — isomorphic across Node and browsers\n * (`TextEncoder`/`atob`/`btoa` only, no `Buffer`).\n */\n\n/**\n * Encode raw SVG markup as a base64 `image/svg+xml` data URI.\n * - lets callers pass inline SVG to `addImage({ svg })` without hand-rolling base64\n * - isomorphic and UTF-8 safe: uses the global `TextEncoder`/`btoa` (Node and browsers)\n * @param {string} svg - SVG markup, e.g. `'<svg ...>...</svg>'`\n * @returns {string} a `data:image/svg+xml;base64,...` URI\n */\nexport function svgMarkupToDataUri(svg: string): string {\n\treturn `data:image/svg+xml;base64,${bytesToBase64(new TextEncoder().encode(svg))}`\n}\n\n/**\n * Encode raw bytes as base64 (no `data:` prefix) using only `btoa`, so the result is the same\n * on Node, in a browser, and in a runtime that has neither `Buffer` nor `FileReader`.\n *\n * Chunked because `String.fromCharCode(...spread)` blows the argument-count limit on a payload\n * of any real size — a multi-megabyte video rel would throw rather than encode.\n * @param {Uint8Array} bytes - the payload\n * @returns {string} base64 text\n */\nexport function bytesToBase64(bytes: Uint8Array): string {\n\tconst CHUNK = 0x8000\n\tlet binary = ''\n\tfor (let i = 0; i < bytes.length; i += CHUNK) binary += String.fromCharCode(...bytes.subarray(i, i + CHUNK))\n\treturn btoa(binary)\n}\n\n/**\n * Decode a base64 image payload (raw base64 or a `data:` URI) to bytes.\n * - tolerant of the `data:[mime];base64,` prefix and of whitespace in the payload\n * @param {string} b64 - base64 string or data URI\n * @returns {Uint8Array | null} decoded bytes, or `null` when the payload is empty/undecodable\n */\nexport function decodeBase64ToBytes(b64: string): Uint8Array | null {\n\tif (!b64) return null\n\t// Strip any `data:...;base64,` prefix and surrounding whitespace\n\tconst comma = b64.indexOf('base64,')\n\tconst payload = (comma >= 0 ? b64.slice(comma + 'base64,'.length) : b64).replace(/\\s/g, '')\n\tif (!payload) return null\n\ttry {\n\t\tconst binary = atob(payload)\n\t\tconst bytes = new Uint8Array(binary.length)\n\t\tfor (let i = 0; i < binary.length; i++) bytes[i] = binary.charCodeAt(i)\n\t\treturn bytes\n\t} catch {\n\t\treturn null\n\t}\n}\n","/**\n * Intrinsic image geometry: reading a natural pixel size out of header bytes, and the\n * `<a:srcRect>` crop math that fits that natural size into a display box.\n *\n * Shared by both sides of the library — the write path (`addImage({ sizing })`) and the read\n * API's `Picture.setImage({ fit })` — which is why it lives outside `gen/` and `read/`.\n * Everything here is synchronous and pure: headers only, never pixel decoding.\n */\n\nimport { decodeBase64ToBytes } from './base64.js'\n\n/**\n * Read the intrinsic dimensions of an image from its header bytes.\n * - synchronous: parses only file-format headers, never decodes pixels\n * - raster: PNG, JPEG, GIF, BMP, and WebP (VP8 / VP8L / VP8X) — natural pixels\n * - vector: SVG — intrinsic size from the root `<svg>` width/height or viewBox\n * - unrecognized formats return `null` (no measurable intrinsic size)\n *\n * Used by image `sizing: 'cover' | 'contain'` to compute an aspect-correct\n * `<a:srcRect>` crop from the *natural* image ratio rather than the displayed box.\n * @param {string} dataB64 - base64 image payload or `data:` URI\n * @returns {{ w: number, h: number } | null} natural size, or `null` when unmeasurable\n */\nexport function getImageSizeFromBase64(dataB64: string): { w: number; h: number } | null {\n\tconst b = decodeBase64ToBytes(dataB64)\n\treturn b ? getImageSizeFromBytes(b) : null\n}\n\n/**\n * Read the intrinsic dimensions of an image from raw header bytes — the\n * byte-level core shared by {@link getImageSizeFromBase64} and the read API's\n * `Picture.setImage({ fit })`, which already holds the media bytes.\n * @param {Uint8Array} b - image bytes\n * @returns {{ w: number, h: number } | null} natural size, or `null` when unmeasurable\n */\nexport function getImageSizeFromBytes(b: Uint8Array): { w: number; h: number } | null {\n\tif (!b || b.length < 24) return null\n\n\t// Bounds-checked byte read: every access below is already guarded by an\n\t// explicit length check, so the `?? 0` fallback is unreachable in practice.\n\tconst u = (n: number): number => b[n] ?? 0\n\n\t// PNG: 8-byte signature, then IHDR with width@16 / height@20 (big-endian uint32)\n\tif (b[0] === 0x89 && b[1] === 0x50 && b[2] === 0x4e && b[3] === 0x47) {\n\t\tconst w = (u(16) << 24) | (u(17) << 16) | (u(18) << 8) | u(19)\n\t\tconst h = (u(20) << 24) | (u(21) << 16) | (u(22) << 8) | u(23)\n\t\treturn w > 0 && h > 0 ? { w, h } : null\n\t}\n\n\t// GIF: \"GIF87a\"/\"GIF89a\", width@6 / height@8 (little-endian uint16)\n\tif (b[0] === 0x47 && b[1] === 0x49 && b[2] === 0x46) {\n\t\tconst w = u(6) | (u(7) << 8)\n\t\tconst h = u(8) | (u(9) << 8)\n\t\treturn w > 0 && h > 0 ? { w, h } : null\n\t}\n\n\t// BMP: \"BM\", width@18 / height@22 (little-endian int32; height may be negative for top-down)\n\tif (b[0] === 0x42 && b[1] === 0x4d) {\n\t\tconst w = u(18) | (u(19) << 8) | (u(20) << 16) | (u(21) << 24)\n\t\tconst h = u(22) | (u(23) << 8) | (u(24) << 16) | (u(25) << 24)\n\t\tconst aw = Math.abs(w)\n\t\tconst ah = Math.abs(h)\n\t\treturn aw > 0 && ah > 0 ? { w: aw, h: ah } : null\n\t}\n\n\t// WebP: \"RIFF\"....\"WEBP\" then a VP8 / VP8L / VP8X chunk\n\tif (\n\t\tb[0] === 0x52 &&\n\t\tb[1] === 0x49 &&\n\t\tb[2] === 0x46 &&\n\t\tb[3] === 0x46 &&\n\t\tb[8] === 0x57 &&\n\t\tb[9] === 0x45 &&\n\t\tb[10] === 0x42 &&\n\t\tb[11] === 0x50\n\t) {\n\t\tconst fourCC = String.fromCharCode(u(12), u(13), u(14), u(15))\n\t\tif (fourCC === 'VP8 ' && b.length >= 30) {\n\t\t\t// Lossy: 14-bit width/height at offset 26/28 (little-endian, mask off scale bits)\n\t\t\tconst w = (u(26) | (u(27) << 8)) & 0x3fff\n\t\t\tconst h = (u(28) | (u(29) << 8)) & 0x3fff\n\t\t\treturn w > 0 && h > 0 ? { w, h } : null\n\t\t}\n\t\tif (fourCC === 'VP8L' && b.length >= 25) {\n\t\t\t// Lossless: 14-bit width/height packed starting at bit 0 of offset 21\n\t\t\tconst bits = u(21) | (u(22) << 8) | (u(23) << 16) | (u(24) << 24)\n\t\t\tconst w = (bits & 0x3fff) + 1\n\t\t\tconst h = ((bits >> 14) & 0x3fff) + 1\n\t\t\treturn w > 0 && h > 0 ? { w, h } : null\n\t\t}\n\t\tif (fourCC === 'VP8X' && b.length >= 30) {\n\t\t\t// Extended: 24-bit canvas width/height minus one at offset 24/27 (little-endian)\n\t\t\tconst w = (u(24) | (u(25) << 8) | (u(26) << 16)) + 1\n\t\t\tconst h = (u(27) | (u(28) << 8) | (u(29) << 16)) + 1\n\t\t\treturn w > 0 && h > 0 ? { w, h } : null\n\t\t}\n\t\treturn null\n\t}\n\n\t// JPEG: \"FFD8\", scan segment markers for a Start-Of-Frame (SOFn) and read height@5 / width@7\n\tif (b[0] === 0xff && b[1] === 0xd8) {\n\t\tlet i = 2\n\t\twhile (i + 9 < b.length) {\n\t\t\tif (b[i] !== 0xff) {\n\t\t\t\ti++\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tconst marker = u(i + 1)\n\t\t\t// SOF0..SOF15 carry frame dimensions, excluding DHT(C4)/JPG(C8)/DAC(CC)\n\t\t\tif (marker >= 0xc0 && marker <= 0xcf && marker !== 0xc4 && marker !== 0xc8 && marker !== 0xcc) {\n\t\t\t\tconst h = (u(i + 5) << 8) | u(i + 6)\n\t\t\t\tconst w = (u(i + 7) << 8) | u(i + 8)\n\t\t\t\treturn w > 0 && h > 0 ? { w, h } : null\n\t\t\t}\n\t\t\t// Standalone markers (RSTn / SOI / EOI / TEM) have no length payload\n\t\t\tif ((marker >= 0xd0 && marker <= 0xd9) || marker === 0x01) {\n\t\t\t\ti += 2\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\t// Otherwise skip this segment using its 2-byte big-endian length\n\t\t\tconst segLen = (u(i + 2) << 8) | u(i + 3)\n\t\t\tif (segLen < 2) break\n\t\t\ti += 2 + segLen\n\t\t}\n\t\treturn null\n\t}\n\n\t// SVG: text-based vector with no binary signature. When the payload is an\n\t// `<svg>` document, read its intrinsic size from the root element so that\n\t// `sizing: 'cover' | 'contain'` is aspect-correct for SVG, not just rasters.\n\tconst text = utf8Decode(b)\n\tif (/<svg[\\s>]/i.test(text)) return getSvgSizeFromMarkup(text)\n\n\treturn null\n}\n\n/**\n * Compute the `<a:srcRect>` crop percentages (each in 1/1000 of a percent, the\n * OOXML unit) for fitting an image of natural size `img` into a display `box`,\n * assuming the cropped region is then stretched to fill the box (`<a:stretch>`).\n *\n * - `cover`: fill the box, cropping the overflowing axis (positive l/r or t/b)\n * - `contain`: fit inside the box, letterboxing the short axis (negative l/r or t/b)\n *\n * Single source of truth for the crop math shared by the write side\n * (`ImageSizingXml`) and the read API's `Picture.setImage({ fit })`. `l`/`r` and\n * `t`/`b` are symmetric (centered crop).\n * @param {'cover' | 'contain'} type - fit mode\n * @param {{ w: number, h: number }} img - natural image pixel size\n * @param {{ w: number, h: number }} box - displayed frame size (any consistent unit)\n * @returns {{ l: number, r: number, t: number, b: number }} srcRect percentages\n */\nexport function fitSrcRectPercents(\n\ttype: 'cover' | 'contain',\n\timg: { w: number; h: number },\n\tbox: { w: number; h: number }\n): { l: number; r: number; t: number; b: number } {\n\tconst imgRatio = img.h / img.w\n\tconst boxRatio = box.h / box.w\n\tlet width: number\n\tlet height: number\n\tif (type === 'cover') {\n\t\tconst isBoxBased = boxRatio > imgRatio\n\t\twidth = isBoxBased ? box.h / imgRatio : box.w\n\t\theight = isBoxBased ? box.h : box.w * imgRatio\n\t} else {\n\t\tconst widthBased = boxRatio > imgRatio\n\t\twidth = widthBased ? box.w : box.h / imgRatio\n\t\theight = widthBased ? box.w * imgRatio : box.h\n\t}\n\tconst hz = Math.round(1e5 * 0.5 * (1 - box.w / width))\n\tconst vz = Math.round(1e5 * 0.5 * (1 - box.h / height))\n\treturn { l: hz, r: hz, t: vz, b: vz }\n}\n\n/**\n * Read the intrinsic size of an SVG document from its root `<svg>` element.\n * Follows the SVG sizing model: an explicit absolute `width`/`height` pair wins;\n * otherwise the `viewBox` width/height defines the size (and thus aspect ratio).\n * Percentage or missing `width`/`height` fall through to `viewBox`.\n * @param {string} svg - SVG markup\n * @returns {{ w: number, h: number } | null} intrinsic size, or `null` when undeterminable\n */\nfunction getSvgSizeFromMarkup(svg: string): { w: number; h: number } | null {\n\tconst openTag = /<svg\\b[^>]*>/i.exec(svg)?.[0]\n\tif (!openTag) return null\n\tconst attr = (name: string): string | null =>\n\t\tnew RegExp(`\\\\b${name}\\\\s*=\\\\s*[\"']([^\"']*)[\"']`, 'i').exec(openTag)?.[1] ?? null\n\t// Leading number with an optional absolute unit; a percentage is not an intrinsic length.\n\tconst absLength = (val: string | null): number => {\n\t\tif (val == null || /%\\s*$/.test(val)) return NaN\n\t\tconst m = /^\\s*\\+?(\\d*\\.?\\d+)/.exec(val)\n\t\treturn m ? parseFloat(m[1] ?? '') : NaN\n\t}\n\tlet w = absLength(attr('width'))\n\tlet h = absLength(attr('height'))\n\tif (!(w > 0 && h > 0)) {\n\t\tconst vb = attr('viewBox')\n\t\tconst p = vb\n\t\t\t? vb\n\t\t\t\t\t.trim()\n\t\t\t\t\t.split(/[\\s,]+/)\n\t\t\t\t\t.map(Number)\n\t\t\t: []\n\t\tconst vw = p[2]\n\t\tconst vh = p[3]\n\t\tif (p.length === 4 && vw != null && vh != null && vw > 0 && vh > 0) {\n\t\t\tw = vw\n\t\t\th = vh\n\t\t}\n\t}\n\treturn w > 0 && h > 0 ? { w, h } : null\n}\n\n/** Decode UTF-8 bytes to a string, isomorphic across Node and browsers. */\nfunction utf8Decode(bytes: Uint8Array): string {\n\treturn new TextDecoder().decode(bytes)\n}\n"],"mappings":";;;;;;;;;;;;AAYA,SAAgB,mBAAmB,KAAqB;CACvD,OAAO,6BAA6B,cAAc,IAAI,YAAY,CAAC,CAAC,OAAO,GAAG,CAAC;AAChF;;;;;;;;;;AAWA,S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I,KACP,GACC,KAAK,CAAC,CACN,MAAM,QAAQ,CAAC,CACf,IAAI,MAAM,IACX,CAAC;EACJ,MAAM,KAAK,EAAE;EACb,MAAM,KAAK,EAAE;EACb,IAAI,EAAE,WAAW,KAAK,MAAM,QAAQ,MAAM,QAAQ,KAAK,KAAK,KAAK,GAAG;GACnE,IAAI;GACJ,IAAI;EACL;CACD;CACA,OAAO,IAAI,KAAK,IAAI,IAAI;EAAE;EAAG;CAAE,IAAI;AACpC;;AAGA,SAAS,WAAW,OAA2B;CAC9C,OAAO,IAAI,YAAY,CAAC,CAAC,OAAO,KAAK;AACtC"}
package/dist/index.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, x as asChartType, y as WRITE_OUTPUT_TYPE } from "./enums-D3aF4QGb.js";
2
- import { $ as LinearGradientFillProps, $t as CommentProps, A as ImageBaseProps, At as ChartPropsChartBar, B as ShapeGuide, Bt as ChartPropsChartWaterfall, C as TableRow, Ct as ChartLineDash, D as TableToSlidesDocument, Dt as ChartPropsAxisSer, E as TableStyleRegionProps, Et as ChartPropsAxisCat, F as ShapeAdjustHandle, Ft as ChartPropsChartPie, G as DataOrPathProps, Gt as ChartPropsTitle, H as BackgroundProps, Ht as ChartPropsDataTable, I as ShapeAdjustHandlePolar, It as ChartPropsChartRadar, J as GradientFillProps, Jt as OptsChartData, K as DataOrPathRequiredProps, Kt as ChartSeriesOpts, L as ShapeAdjustHandleXY, Lt as ChartPropsChartRegionMap, M as MediaProps, Mt as ChartPropsChartDoughnut, N as MediaType, Nt as ChartPropsChartHistogram, O as TableToSlidesElement, Ot as ChartPropsAxisVal, P as OleObjectProps, Pt as ChartPropsChartLine, Q as ImageFillProps, Qt as PlaceholderProps, R as ShapeAdjustValue, Rt as ChartPropsChartStock, S as TableProps, St as ChartExStatistics, T as TableStyleProps, Tt as ChartOpts, U as Color, Ut as ChartPropsFillLine, V as ShapeProps, Vt as ChartPropsDataLabel, W as Coord, Wt as ChartPropsLegend, X as HAlign, Xt as ObjectLockProps, Y as GradientStopProps, Yt as OptsChartGridLine, Z as HexColor, Zt as ObjectNameProps, _ as TransitionProps, _t as ChartAxisTickMark, a as Slide, an as SlideComment, at as TextVertType, b as TableCell, bt as ChartExBinning, c as MasterTextStyleLevel, cn as TextBaseProps, ct as BorderProps, d as SlideMasterObject, dn as TextMeasurement, dt as HyperlinkActionJump, en as MeasureTextOptions, et as Margin, f as SlideMasterProps, fn as TextProps, ft as HyperlinkProps, g as PresetEffect, gt as ChartAreaProps, h as AnimationTrigger, hn as textRuns, ht as ShapeLineProps, i as ObjectOptions, in as ResolvedCommentAuthor, it as RadialGradientFillProps, j as ImageProps, jt as ChartPropsChartBoxWhisker, k as TableToSlidesProps, kt as ChartPropsBase, l as MasterTextStyleProps, ln as TextFitShrinkProps, lt as ConnectorProps, m as AnimationProps, mn as textRun, mt as ShapeFillProps, n as GroupChildProps, nn as NotesTextOptions, nt as PatternPreset, o as SlideLayout, on as TableCellLayout, ot as ThemeColor, p as SlideNumberProps, pn as TextPropsOptions, pt as ShadowProps, q as GeometryPoint, qt as LineCap, r as GroupProps, rn as OverflowBoxOptions, rt as PositionProps, s as MasterBulletProps, sn as TableLayoutResult, st as VAlign, t as AddSlideProps, tn as NotesProps, tt as PatternFillProps, u as SlideMasterChartProps, un as TextGlowProps, ut as ConnectorType, v as TransitionSoundProps, vt as ChartDataPointStyle, w as TableRowSlide, wt as ChartMulti, x as TableCellProps, xt as ChartExGeography, y as TransitionType, yt as ChartErrorBarOptions, z as ShapeConnectionSite, zt as ChartPropsChartSurface } from "./slide-B6mDaM-P.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-5x1bjCzk.js";
4
- import { C as pixelsToEmu, D as SlideZoomProps, E as SectionZoomProps, O as SummaryZoomProps, S as percentToEmu, T as ptToHundredths, _ as coordToEmu, a as ANGLE_UNITS_PER_DEGREE, b as emuToPoints, c as EMU_PER_POINT, d as HUNDREDTHS_PER_POINT, f as PERCENT_SCALE, g as StandardLayoutName, h as StandardLayout, i as PresentationCore, k as ZoomBaseProps, l as Emu, m as STANDARD_LAYOUTS, n as DiagnosticHandler, o as DEFAULT_PX_PER_INCH, p as POINTS_PER_INCH, r as setDiagnosticHandler, s as EMU_PER_INCH, t as Diagnostic, u as FIXED_PCT_PER_PERCENT, v as emuToInches, w as pointsToEmu, x as inchesToEmu, y as emuToPixels } from "./diagnostics-DzY9Tyfm.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-DRLpOpgQ.js";
2
+ import { $ as GradientStopProps, $t as OptsChartGridLine, A as TableRowSlide, At as ChartPropsAxisCat, B as ShapeAdjustHandlePolar, Bt as ChartPropsChartRadar, C as PresetMaterialType, Ct as ChartErrorBarOptions, D as TableCellProps, Dt as ChartLineDash, E as TableCellDiagonals, Et as ChartExStatistics, F as ImageProps, Ft as ChartPropsChartBoxWhisker, G as ShapeProps, Gt as ChartPropsDataLabel, H as ShapeAdjustValue, Ht as ChartPropsChartStock, I as MediaProps, It as ChartPropsChartDoughnut, J as Coord, Jt as ChartPropsLegend, K as BackgroundProps, Kt as ChartPropsDataTable, L as MediaType, Lt as ChartPropsChartHistogram, M as TableToSlidesElement, Mt as ChartPropsAxisVal, N as TableToSlidesProps, Nt as ChartPropsBase, O as TableProps, Ot as ChartMulti, P as ImageBaseProps, Pt as ChartPropsChartBar, Q as GradientFillProps, Qt as OptsChartData, R as OleObjectProps, Rt as ChartPropsChartLine, S as LightRigType, St as ChartDataPointStyle, T as TableCell3DProps, Tt as ChartExGeography, U as ShapeConnectionSite, Ut as ChartPropsChartSurface, V as ShapeAdjustHandleXY, Vt as ChartPropsChartRegionMap, W as ShapeGuide, Wt as ChartPropsChartWaterfall, X as DataOrPathRequiredProps, Xt as ChartSeriesOpts, Y as DataOrPathProps, Yt as ChartPropsTitle, Z as GeometryPoint, Zt as LineCap, _ as TransitionProps, _n as TextPropsOptions, _t as ShadowProps, a as Slide, an as NotesProps, at as PatternFillProps, b as BevelPresetType, bt as ChartAreaProps, c as MasterTextStyleLevel, cn as ResolvedCommentAuthor, ct as RadialGradientFillProps, d as SlideMasterObject, dn as TableLayoutResult, dt as VAlign, en as ObjectLockProps, et as HAlign, f as SlideMasterProps, fn as TextBaseProps, ft as BorderProps, g as PresetEffect, gn as TextProps, gt as HyperlinkProps, h as AnimationTrigger, hn as TextMeasurement, ht as HyperlinkActionJump, i as ObjectOptions, in as MeasureTextOptions, it as Margin, j as TableToSlidesDocument, jt as ChartPropsAxisSer, k as TableRow, kt as ChartOpts, l as MasterTextStyleProps, ln as SlideComment, lt as TextVertType, m as AnimationProps, mn as TextGlowProps, mt as ConnectorType, n as GroupChildProps, nn as PlaceholderProps, nt as ImageFillProps, o as SlideLayout, on as NotesTextOptions, ot as PatternPreset, p as SlideNumberProps, pn as TextFitShrinkProps, pt as ConnectorProps, q as Color, qt as ChartPropsFillLine, r as GroupProps, rn as CommentProps, rt as LinearGradientFillProps, s as MasterBulletProps, sn as OverflowBoxOptions, st as PositionProps, t as AddSlideProps, tn as ObjectNameProps, tt as HexColor, u as SlideMasterChartProps, un as TableCellLayout, ut as ThemeColor, v as TransitionSoundProps, vn as textRun, vt as ShapeFillProps, w as TableCell, wt as ChartExBinning, x as LightRigDirection, xt as ChartAxisTickMark, y as TransitionType, yn as textRuns, yt as ShapeLineProps, z as ShapeAdjustHandle, zt as ChartPropsChartPie } from "./slide-BBlElWr9.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-GU-jjBEx.js";
4
+ import { C as pixelsToEmu, D as SlideZoomProps, E as SectionZoomProps, O as SummaryZoomProps, S as percentToEmu, T as ptToHundredths, _ as coordToEmu, a as ANGLE_UNITS_PER_DEGREE, b as emuToPoints, c as EMU_PER_POINT, d as HUNDREDTHS_PER_POINT, f as PERCENT_SCALE, g as StandardLayoutName, h as StandardLayout, i as PresentationCore, k as ZoomBaseProps, l as Emu, m as STANDARD_LAYOUTS, n as DiagnosticHandler, o as DEFAULT_PX_PER_INCH, p as POINTS_PER_INCH, r as setDiagnosticHandler, s as EMU_PER_INCH, t as Diagnostic, u as FIXED_PCT_PER_PERCENT, v as emuToInches, w as pointsToEmu, x as inchesToEmu, y as emuToPixels } from "./diagnostics-CQ0JWc9m.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-B22h8Qd0.js";
6
6
  //#region src/index.d.ts
7
7
  /**
8
8
  * The runtime-agnostic entry: what a consumer gets from the bare `@shbernal/ts-pptx` specifier
@@ -20,5 +20,5 @@ declare class TsPptx extends PresentationCore {
20
20
  constructor();
21
21
  }
22
22
  //#endregion
23
- export { ANGLE_UNITS_PER_DEGREE, AddSlideProps, AlignH, AlignV, AnimationProps, AnimationTrigger, BackgroundProps, 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, 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, GeometryPoint, GradientFillProps, GradientStopProps, GroupChildProps, GroupProps, HAlign, HUNDREDTHS_PER_POINT, HexColor, HyperlinkActionJump, HyperlinkProps, ImageBaseProps, ImageFillProps, ImageProps, InternalError, type InternalErrorCode, InvalidOptionError, type InvalidOptionErrorCode, LineCap, LinearGradientFillProps, Margin, MasterBulletProps, MasterTextStyleLevel, MasterTextStyleProps, MeasureTextOptions, MediaError, type MediaErrorCode, MediaProps, MediaType, 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, 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, TableCellLayout, TableCellProps, TableLayoutResult, TableProps, TableRow, TableRowSlide, TableStyle, TableStyleProps, TableStyleRegionProps, 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, connectorPresetFor, coordToEmu, emuToInches, emuToPixels, emuToPoints, inchesToEmu, isChartExType, percentToEmu, pixelsToEmu, pointsToEmu, ptToHundredths, setDiagnosticHandler, textRun, textRuns };
23
+ export { ANGLE_UNITS_PER_DEGREE, AddSlideProps, AlignH, AlignV, AnimationProps, AnimationTrigger, BackgroundProps, 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, 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, GeometryPoint, GradientFillProps, GradientStopProps, GroupChildProps, GroupProps, HAlign, HUNDREDTHS_PER_POINT, HexColor, HyperlinkActionJump, HyperlinkProps, ImageBaseProps, ImageFillProps, ImageProps, InternalError, type InternalErrorCode, InvalidOptionError, type InvalidOptionErrorCode, LightRigDirection, LightRigType, LineCap, LinearGradientFillProps, Margin, MasterBulletProps, MasterTextStyleLevel, MasterTextStyleProps, MeasureTextOptions, MediaError, type MediaErrorCode, MediaProps, MediaType, 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, 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, connectorPresetFor, coordToEmu, emuToInches, emuToPixels, emuToPoints, inchesToEmu, isChartExType, percentToEmu, pixelsToEmu, pointsToEmu, ptToHundredths, setDiagnosticHandler, textRun, textRuns };
24
24
  //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import { t as setDiagnosticHandler } from "./diagnostics-DYQC7xLV.js";
2
2
  import { a as TsPptxError, i as PackageReadError, n as InvalidOptionError, o as UnsupportedFeatureError, r as MediaError, t as InternalError } from "./errors-DGE9zh3U.js";
3
3
  import { _ as pointsToEmu, a as FIXED_PCT_PER_PERCENT, 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 } from "./units-B-JUKwCS.js";
4
- import { n as textRuns, r as PresentationCore, t as textRun } from "./text-WRUbOy2r.js";
4
+ import { n as textRuns, r as PresentationCore, t as textRun } from "./text-B1ZrPEeK.js";
5
5
  import { $ as connectorPresetFor, B as AlignV, G as PlaceholderType, H as CONNECTOR_PRESETS, J as SlideObjectType, K as SchemeColor, Q as asChartType, U as ChartType, V as BulletType, W as OutputType, X as TextAnchor, Y as TableStyle, Z as VALID_SHAPE_PRESETS, et as isChartExType, j as IMG_SVG_PLACEHOLDER, q as ShapeType, z as AlignH } from "./units-internal-7JcMfYti.js";
6
- import { i as bytesToBase64 } from "./image-size-C5Z1sKof.js";
6
+ import { i as bytesToBase64 } from "./image-size-C8uYE8GJ.js";
7
7
  //#region src/runtime/neutral.ts
8
8
  /**
9
9
  * The adapter for a runtime that is neither Node nor a browser — Deno, Bun, an edge worker,
package/dist/inspect.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { a as TsPptxError, 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-DRLpOpgQ.js";
1
+ import { a as TsPptxError, 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-B22h8Qd0.js";
2
2
  import { n as OpcPackage } from "./package-CaOLXSNi.js";
3
3
  //#region src/inspect.d.ts
4
4
  /**
package/dist/inspect.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { n as warn } from "./diagnostics-DYQC7xLV.js";
2
2
  import { a as TsPptxError, i as PackageReadError, n as InvalidOptionError, o as UnsupportedFeatureError, r as MediaError, t as InternalError } from "./errors-DGE9zh3U.js";
3
3
  import { d as emuToInches, l as STANDARD_LAYOUTS } from "./units-B-JUKwCS.js";
4
- import { J as OOXML_NS, Y as attr, at as intValue, et as firstChild } from "./shapes-BZU8UTW2.js";
5
- import { f as OpcPackage, t as Presentation } from "./presentation-B0JWdTN1.js";
4
+ import { X as attr, Y as OOXML_NS, ot as intValue, tt as firstChild } from "./shapes-CaOgR0i1.js";
5
+ import { f as OpcPackage, t as Presentation } from "./presentation-MJe9WDi4.js";
6
6
  //#region src/inspect.ts
7
7
  /**
8
8
  * A cheap, flat snapshot of what a `.pptx` contains: every element on every
package/dist/math.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { a as TsPptxError, 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-DRLpOpgQ.js";
1
+ import { a as TsPptxError, 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-B22h8Qd0.js";
2
2
  //#region src/math.d.ts
3
3
  /**
4
4
  * Convert a MathML string to OMML for the `math:` option on `addText`.
package/dist/math.js CHANGED
@@ -95,7 +95,8 @@ function latexToOmml(latex, opts = {}) {
95
95
  });
96
96
  } catch (err) {
97
97
  const pe = err;
98
- throw new InvalidOptionError("math/invalid-latex", `Invalid LaTeX${typeof pe.position === "number" ? ` (position ${pe.position})` : ""}: ${pe.message}`, { cause: err });
98
+ const pos = typeof pe.position === "number" ? ` (position ${pe.position})` : "";
99
+ throw new InvalidOptionError("math/invalid-latex", `Invalid LaTeX${pos}: ${pe.message}`, { cause: err });
99
100
  }
100
101
  const oMath = mathmlToOmml(mathml);
101
102
  return display ? `<m:oMathPara>${DISPLAY_PARA_PR}${oMath}</m:oMathPara>` : oMath;
package/dist/math.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"math.js","names":[],"sources":["../src/math.ts"],"sourcesContent":["/**\n * `@shbernal/ts-pptx/math` — author display equations in LaTeX or MathML and get\n * OMML for the `math:` option on `addText` (see {@link TextProps.math}).\n *\n * Pipeline: LaTeX --temml--> MathML --mathml2omml--> OMML.\n *\n * Both converters are **optional peer dependencies** (temml is MIT, mathml2omml is\n * LGPL-3.0-or-later); install them to use this subpath:\n *\n * ```sh\n * npm install temml mathml2omml\n * ```\n *\n * This subpath is **Node-only**: it loads the converters synchronously via\n * `node:module`'s `createRequire`, so `latexToOmml()` / `mathmlToOmml()` stay\n * synchronous. Both display and inline (in-sentence) equations are supported: a\n * default `latexToOmml()` returns a centered display `<m:oMathPara>`, while\n * `latexToOmml(tex, { display: false })` (and `mathmlToOmml()`) return the bare\n * `<m:oMath>` form you pass to a text item with `inline: true` to flow it\n * mid-paragraph (see {@link TextProps.inline}).\n *\n * @module\n */\nimport { createRequire } from 'node:module'\nimport { InvalidOptionError, UnsupportedFeatureError } from './errors.js'\n\nconst nodeRequire = createRequire(import.meta.url)\n\n/** Minimal shape of the temml API we depend on. */\ninterface TemmlModule {\n\trenderToString(latex: string, options?: { displayMode?: boolean; throwOnError?: boolean }): string\n}\n/** temml's `ParseError` carries a `position` (character offset into the source). */\ninterface TemmlParseError extends Error {\n\tposition?: number\n}\n\nconst MISSING_DEPS_MESSAGE =\n\t\"@shbernal/ts-pptx/math requires the optional peer dependencies 'temml' and \" +\n\t\"'mathml2omml'. Install them with: npm install temml mathml2omml\"\n\n/** Require an optional peer, remapping a not-found error to the install hint. */\nfunction requirePeer<T>(id: string): T {\n\ttry {\n\t\treturn nodeRequire(id) as T\n\t} catch (err) {\n\t\tif ((err as NodeJS.ErrnoException | undefined)?.code === 'MODULE_NOT_FOUND') {\n\t\t\tthrow new UnsupportedFeatureError('math/missing-optional-peer', MISSING_DEPS_MESSAGE, { cause: err })\n\t\t}\n\t\tthrow err\n\t}\n}\n\nlet temmlModule: TemmlModule | undefined\nlet mml2ommlFn: ((mathml: string) => string) | undefined\n\nfunction loadTemml(): TemmlModule {\n\tif (!temmlModule) {\n\t\tconst mod = requirePeer<TemmlModule | { default: TemmlModule }>('temml')\n\t\ttemmlModule = 'renderToString' in mod ? mod : mod.default\n\t}\n\treturn temmlModule\n}\n\nfunction loadMml2omml(): (mathml: string) => string {\n\tif (!mml2ommlFn) {\n\t\tconst mod = requirePeer<{ mml2omml: (mathml: string) => string }>('mathml2omml')\n\t\tmml2ommlFn = mod.mml2omml\n\t}\n\treturn mml2ommlFn\n}\n\n/**\n * mathml2omml puts namespace declarations on the `<m:oMath>` opening tag: `xmlns:m`\n * (redundant — the `<a14:m>` envelope the `math:` option authors already declares it)\n * and `xmlns:w` (unused in the output it produces). Strip them so the result is a bare\n * `<m:oMath>` that drops into the `math:` option cleanly.\n */\nfunction stripOMathNamespaces(omml: string): string {\n\treturn omml.replace(/^(\\s*<m:oMath)\\b[^>]*>/, '$1>')\n}\n\n/** Centered-display paragraph props, matching what the `math:` emitter/oracle author. */\nconst DISPLAY_PARA_PR = '<m:oMathParaPr><m:jc m:val=\"centerGroup\"/></m:oMathParaPr>'\n\n/**\n * Convert a MathML string to OMML for the `math:` option on `addText`.\n *\n * Canonical output form: a bare `<m:oMath>…</m:oMath>` in the `m:` namespace, with no\n * namespace declarations (the `math:` option's envelope supplies the `m` prefix).\n *\n * @param mathml - a MathML string (e.g. `<math>…</math>`)\n * @returns OMML `<m:oMath>…</m:oMath>`\n */\nexport function mathmlToOmml(mathml: string): string {\n\tconst mml2omml = loadMml2omml()\n\treturn stripOMathNamespaces(mml2omml(mathml).trim())\n}\n\nexport interface LatexToOmmlOptions {\n\t/**\n\t * Display (block) math: render in `displayMode` and wrap the result in\n\t * `<m:oMathPara>` (a centered display-math paragraph). Default `true`. When `false`,\n\t * temml renders in inline mode and the result is a bare `<m:oMath>`.\n\t */\n\tdisplay?: boolean\n}\n\n/**\n * Convert a LaTeX string to OMML for the `math:` option on `addText`.\n *\n * Display math (the default) is returned as a full `<m:oMathPara>` centered display\n * paragraph; with `{ display: false }` a bare `<m:oMath>` is returned (both forms are\n * accepted by the `math:` option). Throws on invalid LaTeX, surfacing temml's parse\n * position.\n *\n * @param latex - a LaTeX math expression, e.g. `x = \\frac{-b \\pm \\sqrt{b^2-4ac}}{2a}`\n * @param opts - see {@link LatexToOmmlOptions}\n * @returns OMML `<m:oMathPara>…</m:oMathPara>` (display) or `<m:oMath>…</m:oMath>` (inline)\n * @throws {Error} if the LaTeX cannot be parsed\n */\nexport function latexToOmml(latex: string, opts: LatexToOmmlOptions = {}): string {\n\tconst display = opts.display ?? true\n\tconst temml = loadTemml()\n\tlet mathml: string\n\ttry {\n\t\tmathml = temml.renderToString(latex, { displayMode: display, throwOnError: true })\n\t} catch (err) {\n\t\tconst pe = err as TemmlParseError\n\t\tconst pos = typeof pe.position === 'number' ? ` (position ${pe.position})` : ''\n\t\tthrow new InvalidOptionError('math/invalid-latex', `Invalid LaTeX${pos}: ${pe.message}`, { cause: err })\n\t}\n\tconst oMath = mathmlToOmml(mathml)\n\treturn display ? `<m:oMathPara>${DISPLAY_PARA_PR}${oMath}</m:oMathPara>` : oMath\n}\n\n// Error taxonomy — every failure the library throws. The classes and their `code` are API;\n// the message is not. Re-exported from every entry so `instanceof` works whichever subpath a\n// consumer imports — they all resolve to one shared module, so the classes are identical.\nexport {\n\tTsPptxError,\n\tInvalidOptionError,\n\tUnsupportedFeatureError,\n\tPackageReadError,\n\tMediaError,\n\tInternalError,\n\ttype TsPptxErrorOptions,\n} from './errors.js'\nexport type {\n\tErrorCode,\n\tTsPptxCode,\n\tInvalidOptionErrorCode,\n\tUnsupportedFeatureErrorCode,\n\tPackageReadErrorCode,\n\tMediaErrorCode,\n\tInternalErrorCode,\n} from './codes.js'\n"],"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 {"version":3,"file":"math.js","names":[],"sources":["../src/math.ts"],"sourcesContent":["/**\n * `@shbernal/ts-pptx/math` — author display equations in LaTeX or MathML and get\n * OMML for the `math:` option on `addText` (see {@link TextProps.math}).\n *\n * Pipeline: LaTeX --temml--> MathML --mathml2omml--> OMML.\n *\n * Both converters are **optional peer dependencies** (temml is MIT, mathml2omml is\n * LGPL-3.0-or-later); install them to use this subpath:\n *\n * ```sh\n * npm install temml mathml2omml\n * ```\n *\n * This subpath is **Node-only**: it loads the converters synchronously via\n * `node:module`'s `createRequire`, so `latexToOmml()` / `mathmlToOmml()` stay\n * synchronous. Both display and inline (in-sentence) equations are supported: a\n * default `latexToOmml()` returns a centered display `<m:oMathPara>`, while\n * `latexToOmml(tex, { display: false })` (and `mathmlToOmml()`) return the bare\n * `<m:oMath>` form you pass to a text item with `inline: true` to flow it\n * mid-paragraph (see {@link TextProps.inline}).\n *\n * @module\n */\nimport { createRequire } from 'node:module'\nimport { InvalidOptionError, UnsupportedFeatureError } from './errors.js'\n\nconst nodeRequire = createRequire(import.meta.url)\n\n/** Minimal shape of the temml API we depend on. */\ninterface TemmlModule {\n\trenderToString(latex: string, options?: { displayMode?: boolean; throwOnError?: boolean }): string\n}\n/** temml's `ParseError` carries a `position` (character offset into the source). */\ninterface TemmlParseError extends Error {\n\tposition?: number\n}\n\nconst MISSING_DEPS_MESSAGE =\n\t\"@shbernal/ts-pptx/math requires the optional peer dependencies 'temml' and \" +\n\t\"'mathml2omml'. Install them with: npm install temml mathml2omml\"\n\n/** Require an optional peer, remapping a not-found error to the install hint. */\nfunction requirePeer<T>(id: string): T {\n\ttry {\n\t\treturn nodeRequire(id) as T\n\t} catch (err) {\n\t\tif ((err as NodeJS.ErrnoException | undefined)?.code === 'MODULE_NOT_FOUND') {\n\t\t\tthrow new UnsupportedFeatureError('math/missing-optional-peer', MISSING_DEPS_MESSAGE, { cause: err })\n\t\t}\n\t\tthrow err\n\t}\n}\n\nlet temmlModule: TemmlModule | undefined\nlet mml2ommlFn: ((mathml: string) => string) | undefined\n\nfunction loadTemml(): TemmlModule {\n\tif (!temmlModule) {\n\t\tconst mod = requirePeer<TemmlModule | { default: TemmlModule }>('temml')\n\t\ttemmlModule = 'renderToString' in mod ? mod : mod.default\n\t}\n\treturn temmlModule\n}\n\nfunction loadMml2omml(): (mathml: string) => string {\n\tif (!mml2ommlFn) {\n\t\tconst mod = requirePeer<{ mml2omml: (mathml: string) => string }>('mathml2omml')\n\t\tmml2ommlFn = mod.mml2omml\n\t}\n\treturn mml2ommlFn\n}\n\n/**\n * mathml2omml puts namespace declarations on the `<m:oMath>` opening tag: `xmlns:m`\n * (redundant — the `<a14:m>` envelope the `math:` option authors already declares it)\n * and `xmlns:w` (unused in the output it produces). Strip them so the result is a bare\n * `<m:oMath>` that drops into the `math:` option cleanly.\n */\nfunction stripOMathNamespaces(omml: string): string {\n\treturn omml.replace(/^(\\s*<m:oMath)\\b[^>]*>/, '$1>')\n}\n\n/** Centered-display paragraph props, matching what the `math:` emitter/oracle author. */\nconst DISPLAY_PARA_PR = '<m:oMathParaPr><m:jc m:val=\"centerGroup\"/></m:oMathParaPr>'\n\n/**\n * Convert a MathML string to OMML for the `math:` option on `addText`.\n *\n * Canonical output form: a bare `<m:oMath>…</m:oMath>` in the `m:` namespace, with no\n * namespace declarations (the `math:` option's envelope supplies the `m` prefix).\n *\n * @param mathml - a MathML string (e.g. `<math>…</math>`)\n * @returns OMML `<m:oMath>…</m:oMath>`\n */\nexport function mathmlToOmml(mathml: string): string {\n\tconst mml2omml = loadMml2omml()\n\treturn stripOMathNamespaces(mml2omml(mathml).trim())\n}\n\nexport interface LatexToOmmlOptions {\n\t/**\n\t * Display (block) math: render in `displayMode` and wrap the result in\n\t * `<m:oMathPara>` (a centered display-math paragraph). Default `true`. When `false`,\n\t * temml renders in inline mode and the result is a bare `<m:oMath>`.\n\t */\n\tdisplay?: boolean\n}\n\n/**\n * Convert a LaTeX string to OMML for the `math:` option on `addText`.\n *\n * Display math (the default) is returned as a full `<m:oMathPara>` centered display\n * paragraph; with `{ display: false }` a bare `<m:oMath>` is returned (both forms are\n * accepted by the `math:` option). Throws on invalid LaTeX, surfacing temml's parse\n * position.\n *\n * @param latex - a LaTeX math expression, e.g. `x = \\frac{-b \\pm \\sqrt{b^2-4ac}}{2a}`\n * @param opts - see {@link LatexToOmmlOptions}\n * @returns OMML `<m:oMathPara>…</m:oMathPara>` (display) or `<m:oMath>…</m:oMath>` (inline)\n * @throws {Error} if the LaTeX cannot be parsed\n */\nexport function latexToOmml(latex: string, opts: LatexToOmmlOptions = {}): string {\n\tconst display = opts.display ?? true\n\tconst temml = loadTemml()\n\tlet mathml: string\n\ttry {\n\t\tmathml = temml.renderToString(latex, { displayMode: display, throwOnError: true })\n\t} catch (err) {\n\t\tconst pe = err as TemmlParseError\n\t\tconst pos = typeof pe.position === 'number' ? ` (position ${pe.position})` : ''\n\t\tthrow new InvalidOptionError('math/invalid-latex', `Invalid LaTeX${pos}: ${pe.message}`, { cause: err })\n\t}\n\tconst oMath = mathmlToOmml(mathml)\n\treturn display ? `<m:oMathPara>${DISPLAY_PARA_PR}${oMath}</m:oMathPara>` : oMath\n}\n\n// Error taxonomy — every failure the library throws. The classes and their `code` are API;\n// the message is not. Re-exported from every entry so `instanceof` works whichever subpath a\n// consumer imports — they all resolve to one shared module, so the classes are identical.\nexport {\n\tTsPptxError,\n\tInvalidOptionError,\n\tUnsupportedFeatureError,\n\tPackageReadError,\n\tMediaError,\n\tInternalError,\n\ttype TsPptxErrorOptions,\n} from './errors.js'\nexport type {\n\tErrorCode,\n\tTsPptxCode,\n\tInvalidOptionErrorCode,\n\tUnsupportedFeatureErrorCode,\n\tPackageReadErrorCode,\n\tMediaErrorCode,\n\tInternalErrorCode,\n} from './codes.js'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,MAAM,cAAc,cAAc,YAAY,GAAG;AAWjD,MAAM,uBACL;;AAID,SAAS,YAAe,IAAe;CACtC,IAAI;EACH,OAAO,YAAY,EAAE;CACtB,SAAS,KAAK;EACb,IAAK,KAA2C,SAAS,oBACxD,MAAM,IAAI,wBAAwB,8BAA8B,sBAAsB,EAAE,OAAO,IAAI,CAAC;EAErG,MAAM;CACP;AACD;AAEA,IAAI;AACJ,IAAI;AAEJ,SAAS,YAAyB;CACjC,IAAI,CAAC,aAAa;EACjB,MAAM,MAAM,YAAoD,OAAO;EACvE,cAAc,oBAAoB,MAAM,MAAM,IAAI;CACnD;CACA,OAAO;AACR;AAEA,SAAS,eAA2C;CACnD,IAAI,CAAC,YAEJ,aADY,YAAsD,aACnD,CAAC,CAAC;CAElB,OAAO;AACR;;;;;;;AAQA,SAAS,qBAAqB,MAAsB;CACnD,OAAO,KAAK,QAAQ,0BAA0B,KAAK;AACpD;;AAGA,MAAM,kBAAkB;;;;;;;;;;AAWxB,SAAgB,aAAa,QAAwB;CAEpD,OAAO,qBADU,aACkB,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC;AACpD;;;;;;;;;;;;;;AAwBA,SAAgB,YAAY,OAAe,OAA2B,CAAC,GAAW;CACjF,MAAM,UAAU,KAAK,WAAW;CAChC,MAAM,QAAQ,UAAU;CACxB,IAAI;CACJ,IAAI;EACH,SAAS,MAAM,eAAe,OAAO;GAAE,aAAa;GAAS,cAAc;EAAK,CAAC;CAClF,SAAS,KAAK;EACb,MAAM,KAAK;EACX,MAAM,MAAM,OAAO,GAAG,aAAa,WAAW,cAAc,GAAG,SAAS,KAAK;EAC7E,MAAM,IAAI,mBAAmB,sBAAsB,gBAAgB,IAAI,IAAI,GAAG,WAAW,EAAE,OAAO,IAAI,CAAC;CACxG;CACA,MAAM,QAAQ,aAAa,MAAM;CACjC,OAAO,UAAU,gBAAgB,kBAAkB,MAAM,kBAAkB;AAC5E"}
package/dist/measure.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { dn as TextMeasurement, en as MeasureTextOptions, fn as TextProps, i as ObjectOptions, pn as TextPropsOptions, rn as OverflowBoxOptions } from "./slide-B6mDaM-P.js";
2
- import { a as TsPptxError, 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-DRLpOpgQ.js";
1
+ import { _n as TextPropsOptions, gn as TextProps, hn as TextMeasurement, i as ObjectOptions, in as MeasureTextOptions, sn as OverflowBoxOptions } from "./slide-BBlElWr9.js";
2
+ import { a as TsPptxError, 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-B22h8Qd0.js";
3
3
  //#region src/measure/font-metrics.d.ts
4
4
  /** Per-(face,bold,italic) advance-width source backed by a parsed font file. */
5
5
  interface FontMetrics {
package/dist/measure.js CHANGED
@@ -1,3 +1,3 @@
1
1
  import { a as TsPptxError, i as PackageReadError, n as InvalidOptionError, o as UnsupportedFeatureError, r as MediaError, t as InternalError } from "./errors-DGE9zh3U.js";
2
- import { _ as parseFontMetrics, a as FONT_SCALE_STEP_PCT, c as SINGLE_LINE_PITCH, d as measureLayout, f as solveResize, g as makeRegistryResolver, h as getHeuristicFontMetrics, i as buildFitParagraphs, l as WIDTH_SAFETY_FACTOR, m as FontMetricsRegistry, n as measureText, o as HEIGHT_SAFETY_FACTOR, p as solveShrink, s as MIN_FONT_SCALE_PCT, u as measureHeightPt } from "./fit-CbxyHN69.js";
2
+ import { _ as parseFontMetrics, a as FONT_SCALE_STEP_PCT, c as SINGLE_LINE_PITCH, d as measureLayout, f as solveResize, g as makeRegistryResolver, h as getHeuristicFontMetrics, i as buildFitParagraphs, l as WIDTH_SAFETY_FACTOR, m as FontMetricsRegistry, n as measureText, o as HEIGHT_SAFETY_FACTOR, p as solveShrink, s as MIN_FONT_SCALE_PCT, u as measureHeightPt } from "./fit-BSWY0AYt.js";
3
3
  export { FONT_SCALE_STEP_PCT, FontMetricsRegistry, HEIGHT_SAFETY_FACTOR, InternalError, InvalidOptionError, MIN_FONT_SCALE_PCT, MediaError, PackageReadError, SINGLE_LINE_PITCH, TsPptxError, UnsupportedFeatureError, WIDTH_SAFETY_FACTOR, buildFitParagraphs, getHeuristicFontMetrics, makeRegistryResolver, measureHeightPt, measureLayout, measureText, parseFontMetrics, solveResize, solveShrink };
package/dist/node.d.ts CHANGED
@@ -1,12 +1,12 @@
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, x as asChartType, y as WRITE_OUTPUT_TYPE } from "./enums-D3aF4QGb.js";
2
- import { $ as LinearGradientFillProps, $t as CommentProps, A as ImageBaseProps, At as ChartPropsChartBar, B as ShapeGuide, Bt as ChartPropsChartWaterfall, C as TableRow, Ct as ChartLineDash, D as TableToSlidesDocument, Dt as ChartPropsAxisSer, E as TableStyleRegionProps, Et as ChartPropsAxisCat, F as ShapeAdjustHandle, Ft as ChartPropsChartPie, G as DataOrPathProps, Gt as ChartPropsTitle, H as BackgroundProps, Ht as ChartPropsDataTable, I as ShapeAdjustHandlePolar, It as ChartPropsChartRadar, J as GradientFillProps, Jt as OptsChartData, K as DataOrPathRequiredProps, Kt as ChartSeriesOpts, L as ShapeAdjustHandleXY, Lt as ChartPropsChartRegionMap, M as MediaProps, Mt as ChartPropsChartDoughnut, N as MediaType, Nt as ChartPropsChartHistogram, O as TableToSlidesElement, Ot as ChartPropsAxisVal, P as OleObjectProps, Pt as ChartPropsChartLine, Q as ImageFillProps, Qt as PlaceholderProps, R as ShapeAdjustValue, Rt as ChartPropsChartStock, S as TableProps, St as ChartExStatistics, T as TableStyleProps, Tt as ChartOpts, U as Color, Ut as ChartPropsFillLine, V as ShapeProps, Vt as ChartPropsDataLabel, W as Coord, Wt as ChartPropsLegend, X as HAlign, Xt as ObjectLockProps, Y as GradientStopProps, Yt as OptsChartGridLine, Z as HexColor, Zt as ObjectNameProps, _ as TransitionProps, _t as ChartAxisTickMark, a as Slide, an as SlideComment, at as TextVertType, b as TableCell, bt as ChartExBinning, c as MasterTextStyleLevel, cn as TextBaseProps, ct as BorderProps, d as SlideMasterObject, dn as TextMeasurement, dt as HyperlinkActionJump, en as MeasureTextOptions, et as Margin, f as SlideMasterProps, fn as TextProps, ft as HyperlinkProps, g as PresetEffect, gt as ChartAreaProps, h as AnimationTrigger, hn as textRuns, ht as ShapeLineProps, i as ObjectOptions, in as ResolvedCommentAuthor, it as RadialGradientFillProps, j as ImageProps, jt as ChartPropsChartBoxWhisker, k as TableToSlidesProps, kt as ChartPropsBase, l as MasterTextStyleProps, ln as TextFitShrinkProps, lt as ConnectorProps, m as AnimationProps, mn as textRun, mt as ShapeFillProps, n as GroupChildProps, nn as NotesTextOptions, nt as PatternPreset, o as SlideLayout, on as TableCellLayout, ot as ThemeColor, p as SlideNumberProps, pn as TextPropsOptions, pt as ShadowProps, q as GeometryPoint, qt as LineCap, r as GroupProps, rn as OverflowBoxOptions, rt as PositionProps, s as MasterBulletProps, sn as TableLayoutResult, st as VAlign, t as AddSlideProps, tn as NotesProps, tt as PatternFillProps, u as SlideMasterChartProps, un as TextGlowProps, ut as ConnectorType, v as TransitionSoundProps, vt as ChartDataPointStyle, w as TableRowSlide, wt as ChartMulti, x as TableCellProps, xt as ChartExGeography, y as TransitionType, yt as ChartErrorBarOptions, z as ShapeConnectionSite, zt as ChartPropsChartSurface } from "./slide-B6mDaM-P.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-5x1bjCzk.js";
4
- import { C as pixelsToEmu, D as SlideZoomProps, E as SectionZoomProps, O as SummaryZoomProps, S as percentToEmu, T as ptToHundredths, _ as coordToEmu, a as ANGLE_UNITS_PER_DEGREE, b as emuToPoints, c as EMU_PER_POINT, d as HUNDREDTHS_PER_POINT, f as PERCENT_SCALE, g as StandardLayoutName, h as StandardLayout, i as PresentationCore, k as ZoomBaseProps, l as Emu, m as STANDARD_LAYOUTS, n as DiagnosticHandler, o as DEFAULT_PX_PER_INCH, p as POINTS_PER_INCH, r as setDiagnosticHandler, s as EMU_PER_INCH, t as Diagnostic, u as FIXED_PCT_PER_PERCENT, v as emuToInches, w as pointsToEmu, x as inchesToEmu, y as emuToPixels } from "./diagnostics-DzY9Tyfm.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-DRLpOpgQ.js";
2
+ import { $ as GradientStopProps, $t as OptsChartGridLine, A as TableRowSlide, At as ChartPropsAxisCat, B as ShapeAdjustHandlePolar, Bt as ChartPropsChartRadar, C as PresetMaterialType, Ct as ChartErrorBarOptions, D as TableCellProps, Dt as ChartLineDash, E as TableCellDiagonals, Et as ChartExStatistics, F as ImageProps, Ft as ChartPropsChartBoxWhisker, G as ShapeProps, Gt as ChartPropsDataLabel, H as ShapeAdjustValue, Ht as ChartPropsChartStock, I as MediaProps, It as ChartPropsChartDoughnut, J as Coord, Jt as ChartPropsLegend, K as BackgroundProps, Kt as ChartPropsDataTable, L as MediaType, Lt as ChartPropsChartHistogram, M as TableToSlidesElement, Mt as ChartPropsAxisVal, N as TableToSlidesProps, Nt as ChartPropsBase, O as TableProps, Ot as ChartMulti, P as ImageBaseProps, Pt as ChartPropsChartBar, Q as GradientFillProps, Qt as OptsChartData, R as OleObjectProps, Rt as ChartPropsChartLine, S as LightRigType, St as ChartDataPointStyle, T as TableCell3DProps, Tt as ChartExGeography, U as ShapeConnectionSite, Ut as ChartPropsChartSurface, V as ShapeAdjustHandleXY, Vt as ChartPropsChartRegionMap, W as ShapeGuide, Wt as ChartPropsChartWaterfall, X as DataOrPathRequiredProps, Xt as ChartSeriesOpts, Y as DataOrPathProps, Yt as ChartPropsTitle, Z as GeometryPoint, Zt as LineCap, _ as TransitionProps, _n as TextPropsOptions, _t as ShadowProps, a as Slide, an as NotesProps, at as PatternFillProps, b as BevelPresetType, bt as ChartAreaProps, c as MasterTextStyleLevel, cn as ResolvedCommentAuthor, ct as RadialGradientFillProps, d as SlideMasterObject, dn as TableLayoutResult, dt as VAlign, en as ObjectLockProps, et as HAlign, f as SlideMasterProps, fn as TextBaseProps, ft as BorderProps, g as PresetEffect, gn as TextProps, gt as HyperlinkProps, h as AnimationTrigger, hn as TextMeasurement, ht as HyperlinkActionJump, i as ObjectOptions, in as MeasureTextOptions, it as Margin, j as TableToSlidesDocument, jt as ChartPropsAxisSer, k as TableRow, kt as ChartOpts, l as MasterTextStyleProps, ln as SlideComment, lt as TextVertType, m as AnimationProps, mn as TextGlowProps, mt as ConnectorType, n as GroupChildProps, nn as PlaceholderProps, nt as ImageFillProps, o as SlideLayout, on as NotesTextOptions, ot as PatternPreset, p as SlideNumberProps, pn as TextFitShrinkProps, pt as ConnectorProps, q as Color, qt as ChartPropsFillLine, r as GroupProps, rn as CommentProps, rt as LinearGradientFillProps, s as MasterBulletProps, sn as OverflowBoxOptions, st as PositionProps, t as AddSlideProps, tn as ObjectNameProps, tt as HexColor, u as SlideMasterChartProps, un as TableCellLayout, ut as ThemeColor, v as TransitionSoundProps, vn as textRun, vt as ShapeFillProps, w as TableCell, wt as ChartExBinning, x as LightRigDirection, xt as ChartAxisTickMark, y as TransitionType, yn as textRuns, yt as ShapeLineProps, z as ShapeAdjustHandle, zt as ChartPropsChartPie } from "./slide-BBlElWr9.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-GU-jjBEx.js";
4
+ import { C as pixelsToEmu, D as SlideZoomProps, E as SectionZoomProps, O as SummaryZoomProps, S as percentToEmu, T as ptToHundredths, _ as coordToEmu, a as ANGLE_UNITS_PER_DEGREE, b as emuToPoints, c as EMU_PER_POINT, d as HUNDREDTHS_PER_POINT, f as PERCENT_SCALE, g as StandardLayoutName, h as StandardLayout, i as PresentationCore, k as ZoomBaseProps, l as Emu, m as STANDARD_LAYOUTS, n as DiagnosticHandler, o as DEFAULT_PX_PER_INCH, p as POINTS_PER_INCH, r as setDiagnosticHandler, s as EMU_PER_INCH, t as Diagnostic, u as FIXED_PCT_PER_PERCENT, v as emuToInches, w as pointsToEmu, x as inchesToEmu, y as emuToPixels } from "./diagnostics-CQ0JWc9m.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-B22h8Qd0.js";
6
6
  //#region src/node.d.ts
7
7
  declare class TsPptx extends PresentationCore {
8
8
  constructor();
9
9
  }
10
10
  //#endregion
11
- export { ANGLE_UNITS_PER_DEGREE, AddSlideProps, AlignH, AlignV, AnimationProps, AnimationTrigger, BackgroundProps, 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, 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, GeometryPoint, GradientFillProps, GradientStopProps, GroupChildProps, GroupProps, HAlign, HUNDREDTHS_PER_POINT, HexColor, HyperlinkActionJump, HyperlinkProps, ImageBaseProps, ImageFillProps, ImageProps, InternalError, type InternalErrorCode, InvalidOptionError, type InvalidOptionErrorCode, LineCap, LinearGradientFillProps, Margin, MasterBulletProps, MasterTextStyleLevel, MasterTextStyleProps, MeasureTextOptions, MediaError, type MediaErrorCode, MediaProps, MediaType, 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, 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, TableCellLayout, TableCellProps, TableLayoutResult, TableProps, TableRow, TableRowSlide, TableStyle, TableStyleProps, TableStyleRegionProps, 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, connectorPresetFor, coordToEmu, emuToInches, emuToPixels, emuToPoints, inchesToEmu, isChartExType, percentToEmu, pixelsToEmu, pointsToEmu, ptToHundredths, setDiagnosticHandler, textRun, textRuns };
11
+ export { ANGLE_UNITS_PER_DEGREE, AddSlideProps, AlignH, AlignV, AnimationProps, AnimationTrigger, BackgroundProps, 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, 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, GeometryPoint, GradientFillProps, GradientStopProps, GroupChildProps, GroupProps, HAlign, HUNDREDTHS_PER_POINT, HexColor, HyperlinkActionJump, HyperlinkProps, ImageBaseProps, ImageFillProps, ImageProps, InternalError, type InternalErrorCode, InvalidOptionError, type InvalidOptionErrorCode, LightRigDirection, LightRigType, LineCap, LinearGradientFillProps, Margin, MasterBulletProps, MasterTextStyleLevel, MasterTextStyleProps, MeasureTextOptions, MediaError, type MediaErrorCode, MediaProps, MediaType, 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, 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, connectorPresetFor, coordToEmu, emuToInches, emuToPixels, emuToPoints, inchesToEmu, isChartExType, percentToEmu, pixelsToEmu, pointsToEmu, ptToHundredths, setDiagnosticHandler, textRun, textRuns };
12
12
  //# sourceMappingURL=node.d.ts.map
package/dist/node.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { t as setDiagnosticHandler } from "./diagnostics-DYQC7xLV.js";
2
2
  import { a as TsPptxError, i as PackageReadError, n as InvalidOptionError, o as UnsupportedFeatureError, r as MediaError, t as InternalError } from "./errors-DGE9zh3U.js";
3
3
  import { _ as pointsToEmu, a as FIXED_PCT_PER_PERCENT, 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 } from "./units-B-JUKwCS.js";
4
- import { n as textRuns, r as PresentationCore, t as textRun } from "./text-WRUbOy2r.js";
4
+ import { n as textRuns, r as PresentationCore, t as textRun } from "./text-B1ZrPEeK.js";
5
5
  import { $ as connectorPresetFor, B as AlignV, G as PlaceholderType, H as CONNECTOR_PRESETS, J as SlideObjectType, K as SchemeColor, Q as asChartType, U as ChartType, V as BulletType, W as OutputType, X as TextAnchor, Y as TableStyle, Z as VALID_SHAPE_PRESETS, et as isChartExType, j as IMG_SVG_PLACEHOLDER, q as ShapeType, z as AlignH } from "./units-internal-7JcMfYti.js";
6
6
  import { Buffer } from "node:buffer";
7
7
  import fs from "node:fs/promises";
@@ -1,5 +1,5 @@
1
1
  import { y as WRITE_OUTPUT_TYPE } from "./enums-D3aF4QGb.js";
2
- import { Z as HexColor, a as Slide } from "./slide-B6mDaM-P.js";
2
+ import { a as Slide, tt as HexColor } from "./slide-BBlElWr9.js";
3
3
  //#region src/types/theme.d.ts
4
4
  /**
5
5
  * Theme color scheme overrides. Each slot maps to one `<a:clrScheme>` entry in `theme1.xml`;
@@ -199,4 +199,4 @@ interface PresentationProps {
199
199
  }
200
200
  //#endregion
201
201
  export { PresentationProps as a, WriteFileProps as c, ThemeProps as d, PresLayout as i, WriteProps as l, PackagePart as n, SectionProps as o, PartsProps as r, WriteBaseProps as s, CustomPropertyValue as t, ThemeColorScheme as u };
202
- //# sourceMappingURL=pres-5x1bjCzk.d.ts.map
202
+ //# sourceMappingURL=pres-GU-jjBEx.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pres-5x1bjCzk.d.ts","names":[],"sources":["../src/types/theme.ts","../src/types/pres.ts"],"mappings":";;;;;;;;;;;;UAgBiB;;EAEhB,MAAM;;EAEN,MAAM;;EAEN,MAAM;;EAEN,MAAM;;EAEN,UAAU;;EAEV,UAAU;;EAEV,UAAU;;EAEV,UAAU;;EAEV,UAAU;;EAEV,UAAU;;EAEV,QAAQ;;EAER,WAAW;;UAEK;;;;;;EAMhB;;;;;;EAMA;;;;;;;EAOA;;;;;;;EAOA;;;;;;;EAOA;;;;;;;EAOA;;;;;;;EAOA,cAAc;;;;UC/EE;;;;;;EAMhB;;;;;;;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