@shbernal/ts-pptx 3.0.0 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/README.md +24 -0
  2. package/dist/{autopage-MxulehqQ.js → autopage-QQyfRtoK.js} +3 -3
  3. package/dist/{autopage-MxulehqQ.js.map → autopage-QQyfRtoK.js.map} +1 -1
  4. package/dist/browser.d.ts +5 -5
  5. package/dist/browser.d.ts.map +1 -1
  6. package/dist/browser.js +5 -5
  7. package/dist/{diagnostics-BqBTmA3a.d.ts → diagnostics-PMINsVP6.d.ts} +7 -7
  8. package/dist/{diagnostics-BqBTmA3a.d.ts.map → diagnostics-PMINsVP6.d.ts.map} +1 -1
  9. package/dist/{enums-oLLeaSW3.d.ts → enums-CoXnxiCI.d.ts} +5 -5
  10. package/dist/{enums-oLLeaSW3.d.ts.map → enums-CoXnxiCI.d.ts.map} +1 -1
  11. package/dist/{errors-BENA-Xuw.d.ts → errors-BeUEkNWL.d.ts} +24 -2
  12. package/dist/errors-BeUEkNWL.d.ts.map +1 -0
  13. package/dist/{errors-DGE9zh3U.js → errors-Bvln0H-7.js} +21 -2
  14. package/dist/errors-Bvln0H-7.js.map +1 -0
  15. package/dist/{fit-DGSwMMNs.js → fit-DhMbQG5O.js} +0 -0
  16. package/dist/fit-DhMbQG5O.js.map +1 -0
  17. package/dist/{html-dom--J-Xuucf.js → html-dom-DajBuobe.js} +5 -5
  18. package/dist/html-dom-DajBuobe.js.map +1 -0
  19. package/dist/html.d.ts +3 -3
  20. package/dist/html.js +2 -2
  21. package/dist/index.d.ts +5 -5
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/index.js +5 -5
  24. package/dist/inspect.d.ts +1 -1
  25. package/dist/inspect.js +4 -4
  26. package/dist/math.d.ts +1 -1
  27. package/dist/math.d.ts.map +1 -1
  28. package/dist/math.js +98 -2
  29. package/dist/math.js.map +1 -1
  30. package/dist/measure.d.ts +3 -3
  31. package/dist/measure.js +2 -2
  32. package/dist/node.d.ts +5 -5
  33. package/dist/node.d.ts.map +1 -1
  34. package/dist/node.js +4 -4
  35. package/dist/package-CaOLXSNi.d.ts.map +1 -1
  36. package/dist/{pres-2WsBGimU.d.ts → pres-BgvxhQ_m.d.ts} +3 -3
  37. package/dist/{pres-2WsBGimU.d.ts.map → pres-BgvxhQ_m.d.ts.map} +1 -1
  38. package/dist/{presentation-DAcOfzsP.js → presentation-BP1B8PCF.js} +5 -5
  39. package/dist/presentation-BP1B8PCF.js.map +1 -0
  40. package/dist/{presentation-CTVPpiwP.d.ts → presentation-DyIRDKkp.d.ts} +35 -17
  41. package/dist/presentation-DyIRDKkp.d.ts.map +1 -0
  42. package/dist/{presentation-types-BVw0EknS.d.ts → presentation-types-Dj4riuDs.d.ts} +2 -2
  43. package/dist/{presentation-types-BVw0EknS.d.ts.map → presentation-types-Dj4riuDs.d.ts.map} +1 -1
  44. package/dist/read.d.ts +4 -4
  45. package/dist/read.js +3 -3
  46. package/dist/script.d.ts +2 -2
  47. package/dist/script.js +0 -0
  48. package/dist/script.js.map +1 -1
  49. package/dist/{shapes-BWifcHDV.js → shapes-DMThLsZN.js} +26 -5
  50. package/dist/shapes-DMThLsZN.js.map +1 -0
  51. package/dist/{slide-YuSCGa45.d.ts → slide-BRAtT8Dl.d.ts} +8 -8
  52. package/dist/{slide-YuSCGa45.d.ts.map → slide-BRAtT8Dl.d.ts.map} +1 -1
  53. package/dist/{st-enums-CgadEyPM.js → st-enums-evQG2A7Z.js} +2 -2
  54. package/dist/{st-enums-CgadEyPM.js.map → st-enums-evQG2A7Z.js.map} +1 -1
  55. package/dist/{text-120VFSDm.js → text-B6PbMFih.js} +14 -11
  56. package/dist/text-B6PbMFih.js.map +1 -0
  57. package/dist/{units-B-JUKwCS.js → units-C7QM1KgH.js} +2 -2
  58. package/dist/{units-B-JUKwCS.js.map → units-C7QM1KgH.js.map} +1 -1
  59. package/dist/{units-internal-CiFWZWk4.js → units-internal-CR8s8YQa.js} +3 -3
  60. package/dist/{units-internal-CiFWZWk4.js.map → units-internal-CR8s8YQa.js.map} +1 -1
  61. package/dist/zip.d.ts +2 -2
  62. package/dist/zip.js +1 -1
  63. package/package.json +14 -16
  64. package/skills/ts-pptx-upstream/SKILL.md +247 -0
  65. package/dist/errors-BENA-Xuw.d.ts.map +0 -1
  66. package/dist/errors-DGE9zh3U.js.map +0 -1
  67. package/dist/fit-DGSwMMNs.js.map +0 -1
  68. package/dist/html-dom--J-Xuucf.js.map +0 -1
  69. package/dist/presentation-CTVPpiwP.d.ts.map +0 -1
  70. package/dist/presentation-DAcOfzsP.js.map +0 -1
  71. package/dist/shapes-BWifcHDV.js.map +0 -1
  72. package/dist/text-120VFSDm.js.map +0 -1
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 — see `entry-errors.ts`. Re-exported from every entry so `instanceof`\n// works whichever subpath a consumer imports.\nexport * from './entry-errors.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"}
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 * The operator-dictionary subset this module has to carry, keyed by the character temml\n * puts in the `<mo>` of an accent and valued by the combining mark OMML wants in `m:chr`.\n *\n * Two halves of one problem. **Which** `<mover>`s are accents: temml renders every accent\n * command as a bare `<mover>` with no `accent=\"true\"`, which is correct for a browser —\n * MathML renderers derive accent positioning from the operator dictionary, so the attribute\n * is redundant there — but mathml2omml has no dictionary and keys strictly off the\n * attribute, mapping a bare `<mover>` to `<m:limUpp>` (an over-*limit*, with limit spacing)\n * instead of `<m:acc>`. Membership in this table is the dictionary lookup that is otherwise\n * missing. **Which character** to attach: mathml2omml passes the `<mo>` text straight\n * through to `m:chr`, and temml emits the *spacing* modifiers (U+02C6 MODIFIER LETTER\n * CIRCUMFLEX, U+2192 RIGHTWARDS ARROW) while ECMA-376 §22.1.2.20 says an `accPr` character\n * \"should be within the range of (U+0300–U+036F) or (U+20D0–U+20EF)\" — the combining marks,\n * which is also what Word itself writes. Left alone, `\\vec{v}` would hang a full-size arrow\n * over the base instead of an arrow accent.\n *\n * Keyed by character rather than by LaTeX command because that is all that survives into\n * the MathML. Derived by rendering every accent command temml documents and reading back\n * the `<mo>` it produced; the commands each entry serves are named in the comments.\n */\nconst ACCENT_CHARS = new Map<string, string>([\n\t['ˆ', '̂'], // ˆ \\hat, \\^ → COMBINING CIRCUMFLEX ACCENT\n\t['~', '̃'], // ~ \\tilde, \\~ → COMBINING TILDE\n\t['´', '́'], // ´ \\acute → COMBINING ACUTE ACCENT\n\t['ˊ', '́'], // ˊ \\' → COMBINING ACUTE ACCENT\n\t['`', '̀'], // ` \\grave → COMBINING GRAVE ACCENT\n\t['ˋ', '̀'], // ˋ \\` → COMBINING GRAVE ACCENT\n\t['¨', '̈'], // ¨ \\ddot, \\\" → COMBINING DIAERESIS\n\t['˙', '̇'], // ˙ \\dot, \\. → COMBINING DOT ABOVE\n\t['‾', '̄'], // ‾ \\bar → COMBINING MACRON\n\t['ˉ', '̄'], // ˉ \\= → COMBINING MACRON\n\t['˘', '̆'], // ˘ \\breve, \\u → COMBINING BREVE\n\t['ˇ', '̌'], // ˇ \\check, \\v → COMBINING CARON\n\t['˚', '̊'], // ˚ \\mathring, \\r → COMBINING RING ABOVE\n\t['˝', '̋'], // ˝ \\H → COMBINING DOUBLE ACUTE ACCENT\n\t['→', '⃗'], // → \\vec → COMBINING RIGHT ARROW ABOVE\n\t['…', '⃛'], // … \\dddot → COMBINING THREE DOTS ABOVE\n])\n\n/** An `<mover>`'s last child, when that child is an `<mo>`: `[, attributes, text]`. */\nconst TRAILING_MO = /<mo\\b([^>]*)>([^<]*)<\\/mo>\\s*$/\n\n/**\n * Stamp `accent=\"true\"` on the `<mover>`s that are accents, and swap their operator for the\n * combining mark OMML wants. See {@link ACCENT_CHARS} for why both are needed.\n *\n * Scoped as narrowly as the defect. Only `<mo stretchy=\"false\">` qualifies, which is how\n * temml distinguishes a true accent from a *wide* one (`\\widehat`, `\\overrightarrow`) or a\n * group character (`\\overbrace`, `\\overgroup`) — those already reach `m:groupChr`, which is\n * a reasonable rendering, so they are left alone rather than churned. `\\stackrel` is an\n * over-relation whose character comes from the caller, so it stays `m:limUpp` unless the\n * caller happened to stack a diacritic. An `<mover>` that already states `accent` is the\n * author's call and is never rewritten.\n *\n * `<munder>` is deliberately **not** touched. The symmetric-looking fix — stamping\n * `accentunder=\"true\"` — makes mathml2omml emit `<m:acc>`, which is an *over*-accent: it\n * would move `\\utilde`'s tilde above the base. OMML has no under-accent object, so the\n * `m:limLow` an under-accent already produces is the closest thing available.\n *\n * Implemented against the tag text rather than through a DOM. temml's output is\n * machine-generated and well-formed, so pairing `<mover>` with `</mover>` on a stack is\n * exact, and this subpath otherwise carries no XML parser — the read path's is a different\n * dependency and pulling it in here would grow the module for one rewrite.\n */\nfunction markAccentedMovers(mathml: string): string {\n\tconst edits: { at: number; length: number; text: string }[] = []\n\tconst open: number[] = []\n\tconst tags = /<(\\/?)mover\\b[^>]*>/g\n\tfor (let tag = tags.exec(mathml); tag !== null; tag = tags.exec(mathml)) {\n\t\tif (tag[1] === '') {\n\t\t\t// `accent` already stated: the author has answered the question this asks.\n\t\t\topen.push(tag[0].includes('accent=') ? -1 : tag.index)\n\t\t\tcontinue\n\t\t}\n\t\tconst openAt = open.pop()\n\t\tif (openAt === undefined || openAt === -1) continue\n\n\t\tconst openEnd = mathml.indexOf('>', openAt) + 1\n\t\tconst mo = TRAILING_MO.exec(mathml.slice(openEnd, tag.index))\n\t\tif (!mo) continue\n\t\tconst [whole, attrs = '', operator = ''] = mo\n\t\t// `stretchy=\"false\"` is how temml separates a true accent from a wide one\n\t\t// (`\\widehat`) or a group character (`\\overbrace`); those already map well.\n\t\tif (!attrs.includes('stretchy=\"false\"')) continue\n\t\tconst combining = ACCENT_CHARS.get(operator)\n\t\t// A multi-character operator (`\\ddddot` renders as \"….\") has no single `m:chr`, so it\n\t\t// is not in the table and keeps the limit form rather than producing an invalid one.\n\t\tif (combining === undefined) continue\n\n\t\t// Applied right-to-left below, so earlier offsets stay valid.\n\t\tedits.push({\n\t\t\tat: openEnd + mo.index + whole.length - `${operator}</mo>`.length,\n\t\t\tlength: operator.length,\n\t\t\ttext: combining,\n\t\t})\n\t\tedits.push({ at: openAt + '<mover'.length, length: 0, text: ' accent=\"true\"' })\n\t}\n\n\tlet out = mathml\n\tfor (const edit of edits.sort((a, b) => b.at - a.at)) {\n\t\tout = out.slice(0, edit.at) + edit.text + out.slice(edit.at + edit.length)\n\t}\n\treturn out\n}\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\t// Applied here rather than in `mathmlToOmml`, because it compensates for something temml\n\t// does: a caller handing in their own MathML states `accent` themselves, and rewriting it\n\t// under them would be the module second-guessing an attribute the MathML spec gives them.\n\tconst oMath = mathmlToOmml(markAccentedMovers(mathml))\n\treturn display ? `<m:oMathPara>${DISPLAY_PARA_PR}${oMath}</m:oMathPara>` : oMath\n}\n\n// Error taxonomy — see `entry-errors.ts`. Re-exported from every entry so `instanceof`\n// works whichever subpath a consumer imports.\nexport * from './entry-errors.js'\n"],"mappings":"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"}
package/dist/measure.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { bn as TextPropsOptions, i as ObjectOptions, sn as MeasureTextOptions, un as OverflowBoxOptions, vn as TextMeasurement, yn as TextProps } from "./slide-YuSCGa45.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-BENA-Xuw.js";
1
+ import { bn as TextPropsOptions, i as ObjectOptions, sn as MeasureTextOptions, un as OverflowBoxOptions, vn as TextMeasurement, yn as TextProps } from "./slide-BRAtT8Dl.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-BeUEkNWL.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 {
@@ -90,7 +90,7 @@ declare const MIN_FONT_SCALE_PCT = 25;
90
90
  * each glyph advance up — so PowerPoint wraps marginally earlier and its fitted
91
91
  * box is marginally taller. Inflating measured width and height by these factors
92
92
  * makes the computed `fontScale` ≤ PowerPoint's across the calibration oracle
93
- * (`test/read/autofit-calibration-oracle.test.mjs`: 0 violations over the Aptos
93
+ * (`test/read/autofit-calibration-oracle.test.js`: 0 violations over the Aptos
94
94
  * cases). They err on the side of shrinking slightly too much, never overflowing.
95
95
  */
96
96
  declare const WIDTH_SAFETY_FACTOR = 1.03;
package/dist/measure.js CHANGED
@@ -1,3 +1,3 @@
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-DGSwMMNs.js";
1
+ import { a as TsPptxError, i as PackageReadError, n as InvalidOptionError, o as UnsupportedFeatureError, r as MediaError, t as InternalError } from "./errors-Bvln0H-7.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-DhMbQG5O.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,8 +1,8 @@
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-oLLeaSW3.js";
2
- import { $ as HAlign, $t as ChartSeriesOpts, A as TableToSlidesDocument, At as ChartLineDash, B as ShapeAdjustHandleXY, Bt as ChartPropsChartHistogram, C as TableCell, Ct as ChartAreaProps, D as TableProps, Dt as ChartExBinning, E as TableCellProps, Et as ChartErrorBarOptions, F as MediaProps, Ft as ChartPropsAxisVal, G as BackgroundProps, Gt as ChartPropsChartStock, H as ShapeConnectionSite, Ht as ChartPropsChartPie, I as MediaType, It as ChartPropsBase, J as DataOrPathProps, Jt as ChartPropsDataLabel, K as Color, Kt as ChartPropsChartSurface, L as OleObjectProps, Lt as ChartPropsChartBar, M as TableToSlidesProps, Mt as ChartOpts, N as ImageBaseProps, Nt as ChartPropsAxisCat, O as TableRow, Ot as ChartExGeography, P as ImageProps, Pt as ChartPropsAxisSer, Q as GradientStopProps, Qt as ChartPropsTitle, R as ShapeAdjustHandle, Rt as ChartPropsChartBoxWhisker, S as TransitionType, Sn as textRuns, St as PresetMaterialType, T as TableCellDiagonals, Tt as ChartDataPointStyle, U as ShapeGuide, Ut as ChartPropsChartRadar, V as ShapeAdjustValue, Vt as ChartPropsChartLine, W as ShapeProps, Wt as ChartPropsChartRegionMap, X as GeometryPoint, Xt as ChartPropsFillLine, Y as DataOrPathRequiredProps, Yt as ChartPropsDataTable, Z as GradientFillProps, Zt as ChartPropsLegend, _ as AnimationProps, _n as TextGlowProps, _t as ShapeFillProps, a as Slide, an as PlaceholderProps, at as PatternPreset, b as TransitionProps, bn as TextPropsOptions, bt as LightRigDirection, c as Model3dPoint, cn as NotesProps, ct as TextVertType, d as MasterTextStyleLevel, dn as ResolvedCommentAuthor, dt as BorderProps, en as LineCap, et as HexColor, f as MasterTextStyleProps, fn as SlideComment, ft as ConnectorProps, g as SlideNumberProps, gn as TextFitShrinkProps, gt as ShadowProps, h as SlideMasterProps, hn as TextBaseProps, ht as HyperlinkProps, i as ObjectOptions, in as ObjectNameProps, it as PatternFillProps, j as TableToSlidesElement, jt as ChartMulti, k as TableRowSlide, kt as ChartExStatistics, l as Model3dProps, ln as NotesTextOptions, lt as ThemeColor, m as SlideMasterObject, mn as TableLayoutResult, mt as HyperlinkActionJump, n as GroupChildProps, nn as OptsChartGridLine, nt as LinearGradientFillProps, o as SlideLayout, on as CommentProps, ot as PositionProps, p as SlideMasterChartProps, pn as TableCellLayout, pt as ConnectorType, q as Coord, qt as ChartPropsChartWaterfall, r as GroupProps, rn as ObjectLockProps, rt as Margin, s as Model3dCameraProps, sn as MeasureTextOptions, st as RadialGradientFillProps, t as AddSlideProps, tn as OptsChartData, tt as ImageFillProps, u as MasterBulletProps, un as OverflowBoxOptions, ut as VAlign, v as AnimationTrigger, vn as TextMeasurement, vt as ShapeLineProps, w as TableCell3DProps, wt as ChartAxisTickMark, x as TransitionSoundProps, xn as textRun, xt as LightRigType, y as PresetEffect, yn as TextProps, yt as BevelPresetType, z as ShapeAdjustHandlePolar, zt as ChartPropsChartDoughnut } from "./slide-YuSCGa45.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-2WsBGimU.js";
4
- import { A as SectionZoomProps, C as emuToPixels, D as pixelsToEmu, E as percentToEmu, M as SummaryZoomProps, N as ZoomBaseProps, O as pointsToEmu, S as emuToInches, T as inchesToEmu, _ as POINTS_PER_INCH, a as FlatSide, b as StandardLayoutName, c as PresentationCore, d as EMU_PER_INCH, f as EMU_PER_POINT, g as PERCENT_SCALE, h as HUNDREDTHS_PER_POINT, i as ClipShape, j as SlideZoomProps, k as ptToHundredths, l as ANGLE_UNITS_PER_DEGREE, m as FIXED_PCT_PER_PERCENT, n as DiagnosticHandler, o as HalfDiscPreset, p as Emu, r as setDiagnosticHandler, s as clipPath, t as Diagnostic, u as DEFAULT_PX_PER_INCH, v as STANDARD_LAYOUTS, w as emuToPoints, x as coordToEmu, y as StandardLayout } from "./diagnostics-BqBTmA3a.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-BENA-Xuw.js";
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-CoXnxiCI.js";
2
+ import { $ as HAlign, $t as ChartSeriesOpts, A as TableToSlidesDocument, At as ChartLineDash, B as ShapeAdjustHandleXY, Bt as ChartPropsChartHistogram, C as TableCell, Ct as ChartAreaProps, D as TableProps, Dt as ChartExBinning, E as TableCellProps, Et as ChartErrorBarOptions, F as MediaProps, Ft as ChartPropsAxisVal, G as BackgroundProps, Gt as ChartPropsChartStock, H as ShapeConnectionSite, Ht as ChartPropsChartPie, I as MediaType, It as ChartPropsBase, J as DataOrPathProps, Jt as ChartPropsDataLabel, K as Color, Kt as ChartPropsChartSurface, L as OleObjectProps, Lt as ChartPropsChartBar, M as TableToSlidesProps, Mt as ChartOpts, N as ImageBaseProps, Nt as ChartPropsAxisCat, O as TableRow, Ot as ChartExGeography, P as ImageProps, Pt as ChartPropsAxisSer, Q as GradientStopProps, Qt as ChartPropsTitle, R as ShapeAdjustHandle, Rt as ChartPropsChartBoxWhisker, S as TransitionType, Sn as textRuns, St as PresetMaterialType, T as TableCellDiagonals, Tt as ChartDataPointStyle, U as ShapeGuide, Ut as ChartPropsChartRadar, V as ShapeAdjustValue, Vt as ChartPropsChartLine, W as ShapeProps, Wt as ChartPropsChartRegionMap, X as GeometryPoint, Xt as ChartPropsFillLine, Y as DataOrPathRequiredProps, Yt as ChartPropsDataTable, Z as GradientFillProps, Zt as ChartPropsLegend, _ as AnimationProps, _n as TextGlowProps, _t as ShapeFillProps, a as Slide, an as PlaceholderProps, at as PatternPreset, b as TransitionProps, bn as TextPropsOptions, bt as LightRigDirection, c as Model3dPoint, cn as NotesProps, ct as TextVertType, d as MasterTextStyleLevel, dn as ResolvedCommentAuthor, dt as BorderProps, en as LineCap, et as HexColor, f as MasterTextStyleProps, fn as SlideComment, ft as ConnectorProps, g as SlideNumberProps, gn as TextFitShrinkProps, gt as ShadowProps, h as SlideMasterProps, hn as TextBaseProps, ht as HyperlinkProps, i as ObjectOptions, in as ObjectNameProps, it as PatternFillProps, j as TableToSlidesElement, jt as ChartMulti, k as TableRowSlide, kt as ChartExStatistics, l as Model3dProps, ln as NotesTextOptions, lt as ThemeColor, m as SlideMasterObject, mn as TableLayoutResult, mt as HyperlinkActionJump, n as GroupChildProps, nn as OptsChartGridLine, nt as LinearGradientFillProps, o as SlideLayout, on as CommentProps, ot as PositionProps, p as SlideMasterChartProps, pn as TableCellLayout, pt as ConnectorType, q as Coord, qt as ChartPropsChartWaterfall, r as GroupProps, rn as ObjectLockProps, rt as Margin, s as Model3dCameraProps, sn as MeasureTextOptions, st as RadialGradientFillProps, t as AddSlideProps, tn as OptsChartData, tt as ImageFillProps, u as MasterBulletProps, un as OverflowBoxOptions, ut as VAlign, v as AnimationTrigger, vn as TextMeasurement, vt as ShapeLineProps, w as TableCell3DProps, wt as ChartAxisTickMark, x as TransitionSoundProps, xn as textRun, xt as LightRigType, y as PresetEffect, yn as TextProps, yt as BevelPresetType, z as ShapeAdjustHandlePolar, zt as ChartPropsChartDoughnut } from "./slide-BRAtT8Dl.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-BgvxhQ_m.js";
4
+ import { A as SectionZoomProps, C as emuToPixels, D as pixelsToEmu, E as percentToEmu, M as SummaryZoomProps, N as ZoomBaseProps, O as pointsToEmu, S as emuToInches, T as inchesToEmu, _ as POINTS_PER_INCH, a as FlatSide, b as StandardLayoutName, c as PresentationCore, d as EMU_PER_INCH, f as EMU_PER_POINT, g as PERCENT_SCALE, h as HUNDREDTHS_PER_POINT, i as ClipShape, j as SlideZoomProps, k as ptToHundredths, l as ANGLE_UNITS_PER_DEGREE, m as FIXED_PCT_PER_PERCENT, n as DiagnosticHandler, o as HalfDiscPreset, p as Emu, r as setDiagnosticHandler, s as clipPath, t as Diagnostic, u as DEFAULT_PX_PER_INCH, v as STANDARD_LAYOUTS, w as emuToPoints, x as coordToEmu, y as StandardLayout } from "./diagnostics-PMINsVP6.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-BeUEkNWL.js";
6
6
  //#region src/node.d.ts
7
7
  /**
8
8
  * The Node entry, reached through the `node` export condition — a consumer importing the bare
@@ -1 +1 @@
1
- {"version":3,"file":"node.d.ts","names":[],"sources":["../src/node.ts"],"mappings":";;;;;;;;;;;;;;cAWa,eAAe;EAAA"}
1
+ {"version":3,"file":"node.d.ts","names":[],"sources":["../src/node.ts"],"mappings":";;;;;;;;;;;;;;cAWa,eAAe;EAC3B"}
package/dist/node.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { t as setDiagnosticHandler } from "./diagnostics-DYQC7xLV.js";
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
- 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 { i as PresentationCore, n as textRuns, r as clipPath, t as textRun } from "./text-120VFSDm.js";
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-CiFWZWk4.js";
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 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-C7QM1KgH.js";
4
+ import { i as PresentationCore, n as textRuns, r as clipPath, t as textRun } from "./text-B6PbMFih.js";
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-CR8s8YQa.js";
6
6
  import { Buffer } from "node:buffer";
7
7
  import fs from "node:fs/promises";
8
8
  //#region src/runtime/node.ts
@@ -1 +1 @@
1
- {"version":3,"file":"package-CaOLXSNi.d.ts","names":[],"sources":["../src/read/opc/content-types.ts","../src/read/opc/part.ts","../src/read/opc/relationships.ts","../src/read/opc/package.ts"],"mappings":";;;;;;;;cAUa;;SAKL,MAAM,cAAc;;EAgC3B,eAAe;;MAKX;;;;;;;EAUJ,iBAAiB,kBAAkB;;;;;;EAWnC,eAAe;;EAKf,cAAc,mBAAmB;EAOjC;;;;;;;;;;;cCtEY;;WACH;WACA;EAKG,YAAA,kBAAkB,qBAAqB,OAAO;;MAOtD;;MAOA;;MAKA,SAAS;;;;;MAQT,OAAO;;EAWX;MASI;;;;;EAQJ,aAAa;;;;UCzEG;EAChB;EACA;EACA;EACA;;;;;;;;cASY;;;WAEH;UAIF;;;;;SAQA,MAAM,aAAa,yBAAyB;;SAuC5C,MAAM,yBAAyB;MAIlC;;MAKA;;;;;;;EAUJ,IAAI,cAAc,gBAAgB,uCAAuC;;;;;;;;EAqBzE,UAAU,YAAY,cAAc,gBAAgB,uCAAuC;;;;;;EAkB3F,OAAO;EAMP,IAAI,aAAa;EAIjB,OAAO,eAAe;GAIrB,OAAO,aAAa,iBAAiB;;EAKtC,cAAc;EAgBd;;;;;;;;;KCvJW,+BAA+B,aAAa,cAAc;;;;;;;;;cAgBzD;;;WAIH,cAAc;UAIhB;;MAOH,SAAS,oBAAoB;SAIpB,KAAK,OAAO,WAAW,QAAQ;EA4B5C,KAAK,mBAAmB;EAIxB,mBAAmB,sBAAsB;;;;;EAQzC,iBAAiB,0BAAuB;;;;;EAexC,QAAQ,kBAAkB,qBAAqB,OAAO,aAAa;;;;;;;;;EAoBnE,WAAW;;;;;EAYX,qBAAqB,mBAAmB;;;;;;;;;;EAoBxC,oBAAoB;;;;;;EAuBd,QAAQ,QAAQ"}
1
+ {"version":3,"file":"package-CaOLXSNi.d.ts","names":[],"sources":["../src/read/opc/content-types.ts","../src/read/opc/part.ts","../src/read/opc/relationships.ts","../src/read/opc/package.ts"],"mappings":";;;;;;;;cAUa;;SAKL,MAAM,cAAc;;EAgC3B,eAAe;;MAKX;;;;;;;EAUJ,iBAAiB,kBAAkB;;;;;;EAWnC,eAAe;;EAKf,cAAc,mBAAmB;EAOjC;;;;;;;;;;;cCtEY;;WACH;WACA;EAKT,YAAY,kBAAkB,qBAAqB,OAAO;;MAOtD;;MAOA;;MAKA,SAAS;;;;;MAQT,OAAO;;EAWX;MASI;;;;;EAQJ,aAAa;;;;UCzEG;EAChB;EACA;EACA;EACA;;;;;;;;cASY;;;WAEH;UAIF;;;;;SAQA,MAAM,aAAa,yBAAyB;;SAuC5C,MAAM,yBAAyB;MAIlC;;MAKA;;;;;;;EAUJ,IAAI,cAAc,gBAAgB,uCAAuC;;;;;;;;EAqBzE,UAAU,YAAY,cAAc,gBAAgB,uCAAuC;;;;;;EAkB3F,OAAO;EAMP,IAAI,aAAa;EAIjB,OAAO,eAAe;GAIrB,OAAO,aAAa,iBAAiB;;EAKtC,cAAc;EAgBd;;;;;;;;;KCvJW,+BAA+B,aAAa,cAAc;;;;;;;;;cAgBzD;;;WAIH,cAAc;UAIhB;;MAOH,SAAS,oBAAoB;SAIpB,KAAK,OAAO,WAAW,QAAQ;EA4B5C,KAAK,mBAAmB;EAIxB,mBAAmB,sBAAsB;;;;;EAQzC,iBAAiB,0BAAuB;;;;;EAexC,QAAQ,kBAAkB,qBAAqB,OAAO,aAAa;;;;;;;;;EAoBnE,WAAW;;;;;EAYX,qBAAqB,mBAAmB;;;;;;;;;;EAoBxC,oBAAoB;;;;;;EAuBd,QAAQ,QAAQ"}
@@ -1,5 +1,5 @@
1
- import { y as WRITE_OUTPUT_TYPE } from "./enums-oLLeaSW3.js";
2
- import { a as Slide, et as HexColor } from "./slide-YuSCGa45.js";
1
+ import { y as WRITE_OUTPUT_TYPE } from "./enums-CoXnxiCI.js";
2
+ import { a as Slide, et as HexColor } from "./slide-BRAtT8Dl.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-2WsBGimU.d.ts.map
202
+ //# sourceMappingURL=pres-BgvxhQ_m.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pres-2WsBGimU.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;;;;;;;;;;;;EAYA;;UAEgB,mBAAmB;;;;;;EAMnC,aAAa;;UAEG,uBAAuB;;;;;EAKvC;;;;;;;;;;UAUgB;;WAEP;;WAEA,MAAM;;;;;;;UAOC;;;;;;EAMhB;;UAEgB;;;;EAIhB;;;;;EAKA;;UAEgB;EAChB;EACA;;;;;EAMA;EACA;EACA;;KAEW,kDAAkD;UAE7C;EAChB;EACA;EACA;EACA,aAAa;;;;;EAKb,YAAY;EACZ;;;;;EAKA;;;;;EAKA;EACA;EACA,OAAO;EACP"}
1
+ {"version":3,"file":"pres-BgvxhQ_m.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;;;;;;;;;;;;EAYA;;UAEgB,mBAAmB;;;;;;EAMnC,aAAa;;UAEG,uBAAuB;;;;;EAKvC;;;;;;;;;;UAUgB;;WAEP;;WAEA,MAAM;;;;;;;UAOC;;;;;;EAMhB;;UAEgB;;;;EAIhB;;;;;EAKA;;UAEgB;EAChB;EACA;;;;;EAMA;EACA;EACA;;KAEW,kDAAkD;UAE7C;EAChB;EACA;EACA;EACA,aAAa;;;;;EAKb,YAAY;EACZ;;;;;EAKA;;;;;EAKA;EACA;EACA,OAAO;EACP"}
@@ -1,9 +1,9 @@
1
- import { i as PackageReadError, n as InvalidOptionError, o as UnsupportedFeatureError, t as InternalError } from "./errors-DGE9zh3U.js";
2
- import { d as emuToInches } from "./units-B-JUKwCS.js";
3
- import { _ as SLIDE_LAYOUT_REL, b as THEME_REL, d as IMAGE_REL, f as NOTES_MASTER_REL, m as OFFICE_DOCUMENT_REL, p as NOTES_SLIDE_REL, v as SLIDE_MASTER_REL, y as SLIDE_REL } from "./st-enums-CgadEyPM.js";
1
+ import { i as PackageReadError, n as InvalidOptionError, o as UnsupportedFeatureError, t as InternalError } from "./errors-Bvln0H-7.js";
2
+ import { d as emuToInches } from "./units-C7QM1KgH.js";
3
+ import { _ as SLIDE_LAYOUT_REL, b as THEME_REL, d as IMAGE_REL, f as NOTES_MASTER_REL, m as OFFICE_DOCUMENT_REL, p as NOTES_SLIDE_REL, v as SLIDE_MASTER_REL, y as SLIDE_REL } from "./st-enums-evQG2A7Z.js";
4
4
  import { i as FONT_REL_TYPE, n as FONT_DATA_CONTENT_TYPE, r as FONT_DATA_EXTENSION, t as EMBEDDED_FONT_SLOTS } from "./embedded-fonts-MaynAHa9.js";
5
5
  import { ZipWriter, readZip } from "./zip.js";
6
- import { $ as resolveColor, A as resolveColorElement, At as getOrAddChild, B as placeholderInheritedColor, Ct as childElements, D as readPatternFill, Dt as firstChild, E as spPrXfrmEmu, Et as escapeXmlAttribute, F as resolveSlideThemeParts, Ft as removeAttr, G as slideDefinesColor, H as placeholderInheritedRunProps, It as removeChildrenByQName, J as fmtEntry, K as slideDefinesProp, L as LST_STYLE_LEVELS, Lt as replaceInParent, M as resolveMasterColorContext, Mt as intValue, N as resolveNotesColorContext, Nt as ownerDocumentOf, O as readPictureFill, Ot as firstChildElement, P as resolveSlideColorContext, Pt as parseXml, Q as parseClrScheme, R as RUN_PROP_NAMES, Rt as serializeXml, St as boolValue, T as TextFrame, Tt as descendantsByTag, U as placeholderInheritedXfrm, V as placeholderInheritedListStyles, W as placeholderOf, X as isA, Y as intAttr, Z as parseClrMap, _t as resolveRelativePartName, at as RPR_FILL_AFTER, b as Picture, bt as OOXML_NS, c as wrapShapeElement, ct as SPPR_EFFECT_AFTER, dt as SPPR_SCENE3D_AFTER, et as resolveSchemeToken, ft as SPPR_SP3D_AFTER, gt as relsPartNameFor, ht as relativePartName, it as FILL_CHOICES, j as resolveLayoutColorContext, jt as insertInOrder, k as readGradientFill, kt as getElements, l as GraphicFrame, lt as SPPR_FILL_AFTER, mt as partNameToZipPath, n as buildShapes, nt as styleRefLine, ot as SHAPE_AFTER_SPPR, pt as partNameExtension, q as SCHEME_SLOTS, rt as substitutePhClr, st as SPPR_AFTER_XFRM, t as GroupShape, tt as styleRefFill, ut as SPPR_LN_AFTER, vt as resolveSingleRel, wt as createElement, x as AutoShape, xt as attr, yt as zipPathToPartName, z as placeholderInheritedAnchor, zt as setAttr } from "./shapes-BWifcHDV.js";
6
+ import { $ as resolveColor, A as resolveColorElement, At as getOrAddChild, B as placeholderInheritedColor, Ct as childElements, D as readPatternFill, Dt as firstChild, E as spPrXfrmEmu, Et as escapeXmlAttribute, F as resolveSlideThemeParts, Ft as removeAttr, G as slideDefinesColor, H as placeholderInheritedRunProps, It as removeChildrenByQName, J as fmtEntry, K as slideDefinesProp, L as LST_STYLE_LEVELS, Lt as replaceInParent, M as resolveMasterColorContext, Mt as intValue, N as resolveNotesColorContext, Nt as ownerDocumentOf, O as readPictureFill, Ot as firstChildElement, P as resolveSlideColorContext, Pt as parseXml, Q as parseClrScheme, R as RUN_PROP_NAMES, Rt as serializeXml, St as boolValue, T as TextFrame, Tt as descendantsByTag, U as placeholderInheritedXfrm, V as placeholderInheritedListStyles, W as placeholderOf, X as isA, Y as intAttr, Z as parseClrMap, _t as resolveRelativePartName, at as RPR_FILL_AFTER, b as Picture, bt as OOXML_NS, c as wrapShapeElement, ct as SPPR_EFFECT_AFTER, dt as SPPR_SCENE3D_AFTER, et as resolveSchemeToken, ft as SPPR_SP3D_AFTER, gt as relsPartNameFor, ht as relativePartName, it as FILL_CHOICES, j as resolveLayoutColorContext, jt as insertInOrder, k as readGradientFill, kt as getElements, l as GraphicFrame, lt as SPPR_FILL_AFTER, mt as partNameToZipPath, n as buildShapes, nt as styleRefLine, ot as SHAPE_AFTER_SPPR, pt as partNameExtension, q as SCHEME_SLOTS, rt as substitutePhClr, st as SPPR_AFTER_XFRM, t as GroupShape, tt as styleRefFill, ut as SPPR_LN_AFTER, vt as resolveSingleRel, wt as createElement, x as AutoShape, xt as attr, yt as zipPathToPartName, z as placeholderInheritedAnchor, zt as setAttr } from "./shapes-DMThLsZN.js";
7
7
  //#region src/read/opc/content-types.ts
8
8
  /**
9
9
  * Overlay over `[Content_Types].xml`, used to resolve part content types at
@@ -4797,4 +4797,4 @@ var Presentation = class Presentation {
4797
4797
  //#endregion
4798
4798
  export { Placeholder as a, Theme as c, NotesSlide as d, OpcPackage as f, ContentTypes as h, Slide as i, readTagsForPart as l, Part as m, readCoreProperties as n, SlideLayout as o, Relationships as p, readCustomProperties as r, SlideMaster as s, Presentation as t, NotesPlaceholder as u };
4799
4799
 
4800
- //# sourceMappingURL=presentation-DAcOfzsP.js.map
4800
+ //# sourceMappingURL=presentation-BP1B8PCF.js.map