pptx-ts 3.7.0 → 4.0.1
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.
- package/README.md +116 -269
- package/dist/autopage-odPz7zZO.js +536 -0
- package/dist/autopage-odPz7zZO.js.map +1 -0
- package/dist/binary-string-CKVAYI3M.js +24 -0
- package/dist/binary-string-CKVAYI3M.js.map +1 -0
- package/dist/body-insets-Dw_BeWD_.js +54 -0
- package/dist/body-insets-Dw_BeWD_.js.map +1 -0
- package/dist/browser.d.ts +29 -9
- package/dist/browser.d.ts.map +1 -1
- package/dist/browser.js +41 -14
- package/dist/browser.js.map +1 -1
- package/dist/clip-Bl01BPcN.d.ts +67 -0
- package/dist/clip-Bl01BPcN.d.ts.map +1 -0
- package/dist/diagnostics-D8ot4Ei7.d.ts +244 -0
- package/dist/diagnostics-D8ot4Ei7.d.ts.map +1 -0
- package/dist/embedded-fonts-DarT9aoa.d.ts +20 -0
- package/dist/embedded-fonts-DarT9aoa.d.ts.map +1 -0
- package/dist/entry-compose-DCnvBZz2.d.ts +1046 -0
- package/dist/entry-compose-DCnvBZz2.d.ts.map +1 -0
- package/dist/{enums-CvRYniUA.d.ts → enums-BUKTUB6V.d.ts} +21 -13
- package/dist/{enums-CvRYniUA.d.ts.map → enums-BUKTUB6V.d.ts.map} +1 -1
- package/dist/{errors-Bvln0H-7.js → errors-C4oENPcu.js} +92 -2
- package/dist/errors-C4oENPcu.js.map +1 -0
- package/dist/families.d.ts +260 -0
- package/dist/families.d.ts.map +1 -0
- package/dist/families.js +57 -0
- package/dist/families.js.map +1 -0
- package/dist/{fit-BKs0zxMI.js → fit-Cb7naFj6.js} +249 -167
- package/dist/fit-Cb7naFj6.js.map +1 -0
- package/dist/font-metrics-v5fn7s7e.d.ts +613 -0
- package/dist/font-metrics-v5fn7s7e.d.ts.map +1 -0
- package/dist/grid-DikTjFey.js +187 -0
- package/dist/grid-DikTjFey.js.map +1 -0
- package/dist/{html-dom-B0I0QSbU.js → html-dom-Iuog2wdK.js} +121 -91
- package/dist/html-dom-Iuog2wdK.js.map +1 -0
- package/dist/html.d.ts +6 -6
- package/dist/html.d.ts.map +1 -1
- package/dist/html.js +7 -6
- package/dist/html.js.map +1 -1
- package/dist/image-size-CvN2iCA4.js +1611 -0
- package/dist/image-size-CvN2iCA4.js.map +1 -0
- package/dist/index.d.ts +24 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +31 -11
- package/dist/index.js.map +1 -1
- package/dist/inspect.d.ts +40 -31
- package/dist/inspect.d.ts.map +1 -1
- package/dist/inspect.js +40 -48
- package/dist/inspect.js.map +1 -1
- package/dist/math.d.ts +7 -5
- package/dist/math.d.ts.map +1 -1
- package/dist/math.js +16 -7
- package/dist/math.js.map +1 -1
- package/dist/measure.d.ts +12 -225
- package/dist/measure.d.ts.map +1 -1
- package/dist/measure.js +3 -3
- package/dist/node.d.ts +22 -8
- package/dist/node.d.ts.map +1 -1
- package/dist/node.js +27 -7
- package/dist/node.js.map +1 -1
- package/dist/notes-Dh12JAbn.js +3264 -0
- package/dist/notes-Dh12JAbn.js.map +1 -0
- package/dist/options-internal-WqgMf720.js +43 -0
- package/dist/options-internal-WqgMf720.js.map +1 -0
- package/dist/{package-CaOLXSNi.d.ts → package-J49Ck6S2.d.ts} +27 -12
- package/dist/package-J49Ck6S2.d.ts.map +1 -0
- package/dist/playbtn-CUqQdoDf.js +22 -0
- package/dist/playbtn-CUqQdoDf.js.map +1 -0
- package/dist/{slide-ZqAdVvHV.d.ts → pres-C6qgOFAa.d.ts} +1021 -1423
- package/dist/pres-C6qgOFAa.d.ts.map +1 -0
- package/dist/{presentation-DrJtj3-C.js → presentation-DGYlAWhl.js} +3208 -2727
- package/dist/presentation-DGYlAWhl.js.map +1 -0
- package/dist/{presentation-types-CDjScsev.d.ts → presentation-types-8jLQHI4M.d.ts} +1070 -683
- package/dist/presentation-types-8jLQHI4M.d.ts.map +1 -0
- package/dist/read.d.ts +9 -9
- package/dist/read.d.ts.map +1 -1
- package/dist/read.js +4 -4
- package/dist/script.d.ts +80 -66
- package/dist/script.d.ts.map +1 -1
- package/dist/script.js +2399 -1139
- package/dist/script.js.map +1 -1
- package/dist/{shapes-BemroU-z.js → shapes-re0KyQk_.js} +2807 -1609
- package/dist/shapes-re0KyQk_.js.map +1 -0
- package/dist/slide-Dx2ZeVZ6.d.ts +1256 -0
- package/dist/slide-Dx2ZeVZ6.d.ts.map +1 -0
- package/dist/slide-size-BalTjFuv.js +88 -0
- package/dist/slide-size-BalTjFuv.js.map +1 -0
- package/dist/{units-internal-Dg95w_YD.js → table-cell-margins-EVg0EwxT.js} +235 -273
- package/dist/table-cell-margins-EVg0EwxT.js.map +1 -0
- package/dist/table-dom-BTDP3lEP.js +21 -0
- package/dist/table-dom-BTDP3lEP.js.map +1 -0
- package/dist/text-anchor-CrYXAfUu.js +176 -0
- package/dist/text-anchor-CrYXAfUu.js.map +1 -0
- package/dist/text-sN64Otf_.js +3980 -0
- package/dist/text-sN64Otf_.js.map +1 -0
- package/dist/transition-speed-kUEWDWTx.js +14 -0
- package/dist/transition-speed-kUEWDWTx.js.map +1 -0
- package/dist/units-internal-XJlf-hOl.js +649 -0
- package/dist/units-internal-XJlf-hOl.js.map +1 -0
- package/dist/zip-C0leZZMj.d.ts +67 -0
- package/dist/zip-C0leZZMj.d.ts.map +1 -0
- package/dist/zip-CKd8ihcf.js +177 -0
- package/dist/zip-CKd8ihcf.js.map +1 -0
- package/dist/zip.d.ts +3 -68
- package/dist/zip.js +3 -163
- package/dist/zoom-DPUHh85d.js +8865 -0
- package/dist/zoom-DPUHh85d.js.map +1 -0
- package/package.json +106 -19
- package/skills/ts-pptx-upstream/SKILL.md +58 -57
- package/dist/autopage-DkjYZUFD.js +0 -423
- package/dist/autopage-DkjYZUFD.js.map +0 -1
- package/dist/diagnostics-DfBdDHre.d.ts +0 -829
- package/dist/diagnostics-DfBdDHre.d.ts.map +0 -1
- package/dist/errors-Bvln0H-7.js.map +0 -1
- package/dist/errors-PflMPWBn.d.ts +0 -182
- package/dist/errors-PflMPWBn.d.ts.map +0 -1
- package/dist/fit-BKs0zxMI.js.map +0 -1
- package/dist/html-dom-B0I0QSbU.js.map +0 -1
- package/dist/namespaces-BVnNu7sg.js +0 -666
- package/dist/namespaces-BVnNu7sg.js.map +0 -1
- package/dist/notes-CJFJaG6M.js +0 -1724
- package/dist/notes-CJFJaG6M.js.map +0 -1
- package/dist/package-CaOLXSNi.d.ts.map +0 -1
- package/dist/pres-BcBR3CSM.d.ts +0 -202
- package/dist/pres-BcBR3CSM.d.ts.map +0 -1
- package/dist/presentation-DrJtj3-C.js.map +0 -1
- package/dist/presentation-types-CDjScsev.d.ts.map +0 -1
- package/dist/shapes-BemroU-z.js.map +0 -1
- package/dist/slide-ZqAdVvHV.d.ts.map +0 -1
- package/dist/text-B8SLEaZx.js +0 -11327
- package/dist/text-B8SLEaZx.js.map +0 -1
- package/dist/units-1kRzYShk.js +0 -231
- package/dist/units-1kRzYShk.js.map +0 -1
- package/dist/units-internal-Dg95w_YD.js.map +0 -1
- package/dist/zip.d.ts.map +0 -1
- package/dist/zip.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-cell-margins-EVg0EwxT.js","names":[],"sources":["../src/ooxml/emu.ts","../src/units.ts","../src/enums.ts","../src/ooxml/table-cell-margins.ts"],"sourcesContent":["/**\n * The fixed ratios between English Metric Units, points and inches.\n *\n * `units.ts` publishes them, but it also holds the unit converters, which warn and throw, so it\n * imports `diagnostics.ts` and `errors.ts` at run time. A schema fact in `ooxml/` that only needs\n * a ratio (`body-insets.ts`) took both along with it. This module imports nothing, and `units.ts`\n * re-exports it, so the public names are unchanged.\n */\n\n/** EMU in one inch. */\nexport const EMU_PER_INCH = 914400\n/** EMU in one point. */\nexport const EMU_PER_POINT = 12700\n/** Points in one inch. */\nexport const POINTS_PER_INCH = 72\n","import { warn } from './diagnostics.js'\nimport { InvalidOptionError } from './errors.js'\nimport { EMU_PER_INCH, EMU_PER_POINT, POINTS_PER_INCH } from './ooxml/emu.js'\n/**\n * Public unit conversion helpers and standard PowerPoint slide-layout constants.\n */\n\n// Declared in `ooxml/emu.ts`, which imports nothing, so a schema fact can use them without this\n// module's run-time imports.\nexport { EMU_PER_INCH, EMU_PER_POINT, POINTS_PER_INCH }\n\n/**\n * DrawingML angle unit. `ST_Angle` (`rot`, shadow `dir`, gradient `ang`, …) is measured in\n * sixtieths-of-a-thousandth of a degree, i.e. 60000 units per degree. Multiply a value in\n * degrees by this to get the OOXML integer.\n */\nexport const ANGLE_UNITS_PER_DEGREE = 60000\n\n/**\n * DrawingML fixed-point percentage scale. `ST_Percentage` / `ST_PositiveFixedPercentage` and\n * related types (`<a:alpha>`, `<a:spcPct>`, shape adjustment guides, `<p:tav tm>`, …) encode\n * 100% as the integer 100000. Multiply a 0-1 fraction by this to get the OOXML value.\n */\nexport const PERCENT_SCALE = 100000\n\n/**\n * Scale for a percentage supplied as 0-100 (rather than a 0-1 fraction) into the same\n * fixed-point percentage integer as {@link PERCENT_SCALE} (1% = 1000 units, i.e. thousandths\n * of a percent). Use for inputs documented as percents: transparency/alpha, image crop insets,\n * gradient stops, bullet size, connector adjust, etc.\n */\nexport const FIXED_PCT_PER_PERCENT = PERCENT_SCALE / 100\n\n/**\n * DrawingML text measures font size (`sz`), character spacing (`spc`) and point line/paragraph\n * spacing (`<a:spcPts val>`) in hundredths of a point. Multiply a value in points by this to get\n * the OOXML integer.\n */\nexport const HUNDREDTHS_PER_POINT = 100\n\n/**\n * Convert a value in points to hundredths of a point (rounded), the integer unit DrawingML uses\n * for `sz`, `spc`, and `<a:spcPts val>`. See {@link HUNDREDTHS_PER_POINT}.\n */\nexport function ptToHundredths(pt: number): number {\n\tassertFiniteNumber(pt, 'points')\n\treturn Math.round(pt * HUNDREDTHS_PER_POINT)\n}\n\n/**\n * English Metric Units — the integer unit OOXML serializes geometry in (914400 per inch).\n *\n * Branded so a value that has already been resolved to EMU cannot be silently fed back into a\n * unit converter: {@link coordToEmu} only accepts a user `Coord`, so passing an `Emu` into it is\n * a compile-time error. This replaces the old runtime \"a number ≥ 100 must already be EMU\"\n * magnitude guess, which silently mis-rendered values near the threshold.\n */\nexport type Emu = number & { readonly __unit: 'emu' }\n\n/** A bare number larger than this (in inches) is almost certainly a mistake — likely a raw EMU\n * value passed where inches are expected. We interpret it as inches (the documented contract) but\n * warn, pointing at the explicit `\"<n>emu\"` form. ~1000in is far beyond any real slide. */\nconst IMPLAUSIBLE_INCHES = 1000\n\n/** Default pixel density for the `\"<n>px\"` coordinate unit: CSS reference pixels, also the\n * density ts-pptx assumes when reading an image header's pixel dimensions. */\nexport const DEFAULT_PX_PER_INCH = 96\n\n/**\n * The largest DrawingML coordinate, in EMU: the `maxInclusive` of `ST_Coordinate`, the type of\n * every shape offset and extent. The range is not symmetric; see {@link MIN_COORDINATE_EMU}.\n */\nexport const MAX_COORDINATE_EMU = 27273042316900\n\n/** The smallest DrawingML coordinate, in EMU: the `minInclusive` of `ST_Coordinate`. */\nexport const MIN_COORDINATE_EMU = -27273042329600\n\nexport type StandardLayoutName = 'LAYOUT_4x3' | 'LAYOUT_16x9' | 'LAYOUT_16x10' | 'LAYOUT_WIDE'\n\nexport interface StandardLayout {\n\t/** ts-pptx layout key used with `pptx.layout`. */\n\treadonly layout: StandardLayoutName\n\t/** PresentationML slide-size preset name, or `custom` for PowerPoint widescreen. */\n\treadonly name: string\n\t/** Slide width in inches — inches is ts-pptx's default coordinate unit, so this is the value to use for `addText`/`addShape` math. */\n\treadonly widthIn: number\n\t/** Slide height in inches. */\n\treadonly heightIn: number\n\t/** Slide width in English Metric Units. */\n\treadonly widthEmu: number\n\t/** Slide height in English Metric Units. */\n\treadonly heightEmu: number\n}\n\nexport function inchesToEmu(inches: number): Emu {\n\tassertFiniteNumber(inches, 'inches')\n\treturn inCoordinateRange(Math.round(inches * EMU_PER_INCH), inches, 'inches')\n}\n\nexport function pointsToEmu(points: number): Emu {\n\tassertFiniteNumber(points, 'points')\n\treturn inCoordinateRange(Math.round(points * EMU_PER_POINT), points, 'points')\n}\n\nexport function pixelsToEmu(pixels: number, dpi: number): Emu {\n\tassertFiniteNumber(pixels, 'pixels')\n\tassertPositiveFiniteNumber(dpi, 'dpi')\n\treturn inchesToEmu(pixels / dpi)\n}\n\n/**\n * Resolve a percentage of an axis length to EMU.\n *\n * **Published for consumers, and reached from one place inside `src/` on purpose.** Internally\n * only `parseCoord` needs it, because every `'50%'` a caller writes comes through there; it is\n * exported because a consumer computing its own geometry against a slide axis needs the same\n * arithmetic, and it belongs with the rest of the conversion set beside it rather than hidden\n * behind the one caller. Left exported deliberately rather than by oversight — this note is the\n * difference between the two, as it is on {@link emuToPixels}.\n * @param percent - percentage value (e.g. `50` for 50%)\n * @param axisEmu - the axis length in EMU (slide width for x/w, height for y/h)\n */\nexport function percentToEmu(percent: number, axisEmu: number): Emu {\n\tassertFiniteNumber(percent, 'percent')\n\tassertFiniteNumber(axisEmu, 'axisEmu')\n\treturn inCoordinateRange(Math.round((percent / 100) * axisEmu), percent, 'percent')\n}\n\n/**\n * The single user-coordinate → EMU boundary. Convert each user-supplied coordinate exactly once.\n *\n * Accepts (see {@link Coord}):\n * - a bare `number` → **always inches** (the documented unit); no magnitude guessing\n * - `\"<n>%\"` → percentage of `axisEmu`\n * - `\"<n>in\"` / `\"<n>pt\"` / `\"<n>px\"` / `\"<n>emu\"` → explicit units (the escape hatch for non-inch\n * values). `px` is resolved at {@link DEFAULT_PX_PER_INCH} (96), for authoring against a known\n * web/source canvas size.\n *\n * Throws on non-finite or unparseable input rather than silently emitting a degenerate 0-size.\n * @param value - user coordinate\n * @param axisEmu - axis length in EMU, used only to resolve percentages\n */\nexport function coordToEmu(value: number | string, axisEmu: number): Emu {\n\tif (typeof value === 'number') {\n\t\tassertFiniteNumber(value, 'coordinate')\n\t\tif (Math.abs(value) > IMPLAUSIBLE_INCHES) {\n\t\t\twarn(\n\t\t\t\t'coord/bare-number-is-inches',\n\t\t\t\t`coordinate ${value} interpreted as ${value} inches. A bare number is always inches; ` +\n\t\t\t\t\t`if you meant EMU, pass it as a string like \"${Math.round(value)}emu\".`\n\t\t\t)\n\t\t}\n\t\treturn inchesToEmu(value)\n\t}\n\n\tconst match = /^\\s*(-?\\d*\\.?\\d+)\\s*(%|in|pt|px|emu)\\s*$/.exec(value)\n\tif (!match) {\n\t\tthrow new InvalidOptionError(\n\t\t\t'coord/invalid-format',\n\t\t\t`Invalid coordinate \"${value}\". Expected a number (inches) or a string like \"50%\", \"5in\", \"72pt\", \"96px\", or \"914400emu\".`\n\t\t)\n\t}\n\tconst n = Number(match[1])\n\tswitch (match[2]) {\n\t\tcase '%':\n\t\t\treturn percentToEmu(n, axisEmu)\n\t\tcase 'in':\n\t\t\treturn inchesToEmu(n)\n\t\tcase 'pt':\n\t\t\treturn pointsToEmu(n)\n\t\tcase 'px':\n\t\t\treturn pixelsToEmu(n, DEFAULT_PX_PER_INCH)\n\t\tdefault: // 'emu'\n\t\t\tassertFiniteNumber(n, 'coordinate')\n\t\t\treturn inCoordinateRange(Math.round(n), n, 'EMU')\n\t}\n}\n\nexport function emuToInches(emu: number): number {\n\tassertFiniteNumber(emu, 'emu')\n\treturn emu / EMU_PER_INCH\n}\n\n/**\n * EMU → points, the unit the write API states line widths, font sizes and text insets in.\n *\n * The one conversion, for the library as well as for a consumer: three private forms of\n * `emu / EMU_PER_POINT` had grown around it — the read model's `null`-propagating `ptFromEmu`,\n * the script mapper's `points`, and a dozen inline divisions — while this stayed published and\n * uncalled.\n *\n * **The policy, and its one exception.** Every EMU→points conversion goes through here or through\n * `ptFromEmu` in `src/read/api/coords.ts`, which is this with a `null` passed along. (Named rather\n * than linked: it is internal, so a reference link to it resolves to nothing in the published\n * reference.) The exception is\n * `measure/*` — `fit.ts`, `paragraphs.ts`, `table-fit.ts` — where an inner box is computed as\n * `(extent - inset - inset) / EMU_PER_POINT` and then guarded with `!(x > 0)`. That guard is\n * written NaN-first on purpose: a box that cannot be measured is skipped, not reported. This\n * function asserts a finite input and throws instead, which is the right answer for a caller\n * stating a value and the wrong one for a pass whose whole job is to degrade quietly. Those\n * sites keep the division; nothing else may.\n */\nexport function emuToPoints(emu: number): number {\n\tassertFiniteNumber(emu, 'emu')\n\treturn emu / EMU_PER_POINT\n}\n\n/**\n * EMU → whole pixels at a stated DPI.\n *\n * **Published for consumers, and used nowhere in `src/` on purpose.** Nothing inside the\n * library thinks in pixels: it is the unit a caller placing library output on a canvas or in a\n * `<img>` needs, and the DPI is theirs to choose. Left exported deliberately rather than by\n * oversight — this note is the difference between the two.\n */\nexport function emuToPixels(emu: number, dpi: number): number {\n\tassertFiniteNumber(emu, 'emu')\n\tassertPositiveFiniteNumber(dpi, 'dpi')\n\treturn Math.round(emuToInches(emu) * dpi)\n}\n\nfunction standardLayout(layout: StandardLayoutName, name: string, widthIn: number, heightIn: number): StandardLayout {\n\treturn Object.freeze({\n\t\tlayout,\n\t\tname,\n\t\twidthIn,\n\t\theightIn,\n\t\twidthEmu: inchesToEmu(widthIn),\n\t\theightEmu: inchesToEmu(heightIn),\n\t})\n}\n\nexport const STANDARD_LAYOUTS: Readonly<Record<StandardLayoutName, StandardLayout>> = Object.freeze({\n\tLAYOUT_4x3: standardLayout('LAYOUT_4x3', 'screen4x3', 10, 7.5),\n\tLAYOUT_16x9: standardLayout('LAYOUT_16x9', 'screen16x9', 10, 5.625),\n\tLAYOUT_16x10: standardLayout('LAYOUT_16x10', 'screen16x10', 10, 6.25),\n\tLAYOUT_WIDE: standardLayout('LAYOUT_WIDE', 'custom', 40 / 3, 7.5),\n})\n\n/**\n * `emu` as an `Emu`, or a `coord/out-of-range` throw when it falls outside `ST_Coordinate`.\n *\n * A finite input is not enough on its own. `1e16` inches is finite and converts to `9.144e+21`,\n * which serializes in exponent notation and is not an `xsd:long` at all; `4e7` inches converts to\n * a long, but one past the bound. Neither is a coordinate PowerPoint can hold.\n * @param emu - the converted value\n * @param value - the caller's value, for the message\n * @param unit - the unit `value` was stated in, for the message\n */\nfunction inCoordinateRange(emu: number, value: number, unit: string): Emu {\n\tif (emu < MIN_COORDINATE_EMU || emu > MAX_COORDINATE_EMU)\n\t\tthrow new InvalidOptionError(\n\t\t\t'coord/out-of-range',\n\t\t\t`${value} ${unit} is ${emu} EMU, outside the DrawingML coordinate range ${MIN_COORDINATE_EMU} to ${MAX_COORDINATE_EMU} EMU.`\n\t\t)\n\treturn emu as Emu\n}\n\nfunction assertFiniteNumber(value: number, name: string): void {\n\tif (!Number.isFinite(value)) throw new InvalidOptionError('coord/non-finite', `${name} must be a finite number`)\n}\n\nfunction assertPositiveFiniteNumber(value: number, name: string): void {\n\tassertFiniteNumber(value, name)\n\tif (value <= 0) throw new InvalidOptionError('coord/not-positive', `${name} must be greater than 0`)\n}\n","/**\n * ts-pptx Enums\n * NOTE: `enum` wont work for objects, so use `Object.freeze`\n */\n\n/**\n * Output-type name accepted by the zip/write layer. Derived from the `OutputType`\n * enum (see below) so the two never drift: adding a member to the enum extends this\n * union automatically.\n */\nexport type ZIP_OUTPUT_TYPE = `${OutputType}`\nexport type WRITE_OUTPUT_TYPE = ZIP_OUTPUT_TYPE\n/**\n * Public chart-type name accepted by `addChart()`. Derived from the internal\n * `ChartType` enum (see below) so the two never drift: adding a member to the\n * enum extends this union automatically.\n */\nexport type CHART_NAME = `${ChartType}`\n/**\n * Public scheme-color name. Derived from the `SchemeColor` enum (see below) so the\n * two never drift.\n */\nexport type SCHEME_COLORS = `${SchemeColor}`\n\nexport enum TextAnchor {\n\tb = 'b',\n\tctr = 'ctr',\n\tt = 't',\n}\n\n// ENUM\nexport enum OutputType {\n\tarraybuffer = 'arraybuffer',\n\tbase64 = 'base64',\n\tbinarystring = 'binarystring',\n\tblob = 'blob',\n\tnodebuffer = 'nodebuffer',\n\tuint8array = 'uint8array',\n}\nexport enum ChartType {\n\tarea = 'area',\n\tbar = 'bar',\n\tbar3d = 'bar3D',\n\tbubble = 'bubble',\n\tbubble3d = 'bubble3D',\n\tdoughnut = 'doughnut',\n\tline = 'line',\n\tpie = 'pie',\n\tradar = 'radar',\n\tscatter = 'scatter',\n\tstock = 'stock',\n\tsurface = 'surface',\n\twaterfall = 'waterfall',\n\tfunnel = 'funnel',\n\ttreemap = 'treemap',\n\tsunburst = 'sunburst',\n\thistogram = 'histogram',\n\tpareto = 'pareto',\n\tboxWhisker = 'boxWhisker',\n\tregionMap = 'regionMap',\n}\nexport enum ShapeType {\n\taccentBorderCallout1 = 'accentBorderCallout1',\n\taccentBorderCallout2 = 'accentBorderCallout2',\n\taccentBorderCallout3 = 'accentBorderCallout3',\n\taccentCallout1 = 'accentCallout1',\n\taccentCallout2 = 'accentCallout2',\n\taccentCallout3 = 'accentCallout3',\n\tactionButtonBackPrevious = 'actionButtonBackPrevious',\n\tactionButtonBeginning = 'actionButtonBeginning',\n\tactionButtonBlank = 'actionButtonBlank',\n\tactionButtonDocument = 'actionButtonDocument',\n\tactionButtonEnd = 'actionButtonEnd',\n\tactionButtonForwardNext = 'actionButtonForwardNext',\n\tactionButtonHelp = 'actionButtonHelp',\n\tactionButtonHome = 'actionButtonHome',\n\tactionButtonInformation = 'actionButtonInformation',\n\tactionButtonMovie = 'actionButtonMovie',\n\tactionButtonReturn = 'actionButtonReturn',\n\tactionButtonSound = 'actionButtonSound',\n\tarc = 'arc',\n\tbentArrow = 'bentArrow',\n\tbentUpArrow = 'bentUpArrow',\n\tbevel = 'bevel',\n\tblockArc = 'blockArc',\n\tborderCallout1 = 'borderCallout1',\n\tborderCallout2 = 'borderCallout2',\n\tborderCallout3 = 'borderCallout3',\n\tbracePair = 'bracePair',\n\tbracketPair = 'bracketPair',\n\tcallout1 = 'callout1',\n\tcallout2 = 'callout2',\n\tcallout3 = 'callout3',\n\tcan = 'can',\n\tchartPlus = 'chartPlus',\n\tchartStar = 'chartStar',\n\tchartX = 'chartX',\n\tchevron = 'chevron',\n\tchord = 'chord',\n\tcircularArrow = 'circularArrow',\n\tcloud = 'cloud',\n\tcloudCallout = 'cloudCallout',\n\tcorner = 'corner',\n\tcornerTabs = 'cornerTabs',\n\tcube = 'cube',\n\tcurvedDownArrow = 'curvedDownArrow',\n\tcurvedLeftArrow = 'curvedLeftArrow',\n\tcurvedRightArrow = 'curvedRightArrow',\n\tcurvedUpArrow = 'curvedUpArrow',\n\tcustGeom = 'custGeom',\n\tdecagon = 'decagon',\n\tdiagStripe = 'diagStripe',\n\tdiamond = 'diamond',\n\tdodecagon = 'dodecagon',\n\tdonut = 'donut',\n\tdoubleWave = 'doubleWave',\n\tdownArrow = 'downArrow',\n\tdownArrowCallout = 'downArrowCallout',\n\tellipse = 'ellipse',\n\tellipseRibbon = 'ellipseRibbon',\n\tellipseRibbon2 = 'ellipseRibbon2',\n\tflowChartAlternateProcess = 'flowChartAlternateProcess',\n\tflowChartCollate = 'flowChartCollate',\n\tflowChartConnector = 'flowChartConnector',\n\tflowChartDecision = 'flowChartDecision',\n\tflowChartDelay = 'flowChartDelay',\n\tflowChartDisplay = 'flowChartDisplay',\n\tflowChartDocument = 'flowChartDocument',\n\tflowChartExtract = 'flowChartExtract',\n\tflowChartInputOutput = 'flowChartInputOutput',\n\tflowChartInternalStorage = 'flowChartInternalStorage',\n\tflowChartMagneticDisk = 'flowChartMagneticDisk',\n\tflowChartMagneticDrum = 'flowChartMagneticDrum',\n\tflowChartMagneticTape = 'flowChartMagneticTape',\n\tflowChartManualInput = 'flowChartManualInput',\n\tflowChartManualOperation = 'flowChartManualOperation',\n\tflowChartMerge = 'flowChartMerge',\n\tflowChartMultidocument = 'flowChartMultidocument',\n\tflowChartOfflineStorage = 'flowChartOfflineStorage',\n\tflowChartOffpageConnector = 'flowChartOffpageConnector',\n\tflowChartOnlineStorage = 'flowChartOnlineStorage',\n\tflowChartOr = 'flowChartOr',\n\tflowChartPredefinedProcess = 'flowChartPredefinedProcess',\n\tflowChartPreparation = 'flowChartPreparation',\n\tflowChartProcess = 'flowChartProcess',\n\tflowChartPunchedCard = 'flowChartPunchedCard',\n\tflowChartPunchedTape = 'flowChartPunchedTape',\n\tflowChartSort = 'flowChartSort',\n\tflowChartSummingJunction = 'flowChartSummingJunction',\n\tflowChartTerminator = 'flowChartTerminator',\n\tfoldedCorner = 'foldedCorner',\n\tframe = 'frame',\n\tfunnel = 'funnel',\n\tgear6 = 'gear6',\n\tgear9 = 'gear9',\n\thalfFrame = 'halfFrame',\n\theart = 'heart',\n\theptagon = 'heptagon',\n\thexagon = 'hexagon',\n\thomePlate = 'homePlate',\n\thorizontalScroll = 'horizontalScroll',\n\tirregularSeal1 = 'irregularSeal1',\n\tirregularSeal2 = 'irregularSeal2',\n\tleftArrow = 'leftArrow',\n\tleftArrowCallout = 'leftArrowCallout',\n\tleftBrace = 'leftBrace',\n\tleftBracket = 'leftBracket',\n\tleftCircularArrow = 'leftCircularArrow',\n\tleftRightArrow = 'leftRightArrow',\n\tleftRightArrowCallout = 'leftRightArrowCallout',\n\tleftRightCircularArrow = 'leftRightCircularArrow',\n\tleftRightRibbon = 'leftRightRibbon',\n\tleftRightUpArrow = 'leftRightUpArrow',\n\tleftUpArrow = 'leftUpArrow',\n\tlightningBolt = 'lightningBolt',\n\tline = 'line',\n\tlineInv = 'lineInv',\n\tmathDivide = 'mathDivide',\n\tmathEqual = 'mathEqual',\n\tmathMinus = 'mathMinus',\n\tmathMultiply = 'mathMultiply',\n\tmathNotEqual = 'mathNotEqual',\n\tmathPlus = 'mathPlus',\n\tmoon = 'moon',\n\tnoSmoking = 'noSmoking',\n\tnonIsoscelesTrapezoid = 'nonIsoscelesTrapezoid',\n\tnotchedRightArrow = 'notchedRightArrow',\n\toctagon = 'octagon',\n\tparallelogram = 'parallelogram',\n\tpentagon = 'pentagon',\n\tpie = 'pie',\n\tpieWedge = 'pieWedge',\n\tplaque = 'plaque',\n\tplaqueTabs = 'plaqueTabs',\n\tplus = 'plus',\n\tquadArrow = 'quadArrow',\n\tquadArrowCallout = 'quadArrowCallout',\n\trect = 'rect',\n\tribbon = 'ribbon',\n\tribbon2 = 'ribbon2',\n\trightArrow = 'rightArrow',\n\trightArrowCallout = 'rightArrowCallout',\n\trightBrace = 'rightBrace',\n\trightBracket = 'rightBracket',\n\tround1Rect = 'round1Rect',\n\tround2DiagRect = 'round2DiagRect',\n\tround2SameRect = 'round2SameRect',\n\troundRect = 'roundRect',\n\trtTriangle = 'rtTriangle',\n\tsmileyFace = 'smileyFace',\n\tsnip1Rect = 'snip1Rect',\n\tsnip2DiagRect = 'snip2DiagRect',\n\tsnip2SameRect = 'snip2SameRect',\n\tsnipRoundRect = 'snipRoundRect',\n\tsquareTabs = 'squareTabs',\n\tstar10 = 'star10',\n\tstar12 = 'star12',\n\tstar16 = 'star16',\n\tstar24 = 'star24',\n\tstar32 = 'star32',\n\tstar4 = 'star4',\n\tstar5 = 'star5',\n\tstar6 = 'star6',\n\tstar7 = 'star7',\n\tstar8 = 'star8',\n\tstripedRightArrow = 'stripedRightArrow',\n\tsun = 'sun',\n\tswooshArrow = 'swooshArrow',\n\tteardrop = 'teardrop',\n\ttrapezoid = 'trapezoid',\n\ttriangle = 'triangle',\n\tupArrow = 'upArrow',\n\tupArrowCallout = 'upArrowCallout',\n\tupDownArrow = 'upDownArrow',\n\tupDownArrowCallout = 'upDownArrowCallout',\n\tuturnArrow = 'uturnArrow',\n\tverticalScroll = 'verticalScroll',\n\twave = 'wave',\n\twedgeEllipseCallout = 'wedgeEllipseCallout',\n\twedgeRectCallout = 'wedgeRectCallout',\n\twedgeRoundRectCallout = 'wedgeRoundRectCallout',\n}\nexport enum SchemeColor {\n\ttext1 = 'tx1',\n\ttext2 = 'tx2',\n\tbackground1 = 'bg1',\n\tbackground2 = 'bg2',\n\taccent1 = 'accent1',\n\taccent2 = 'accent2',\n\taccent3 = 'accent3',\n\taccent4 = 'accent4',\n\taccent5 = 'accent5',\n\taccent6 = 'accent6',\n}\nexport enum AlignH {\n\tleft = 'left',\n\tcenter = 'center',\n\tright = 'right',\n\tjustify = 'justify',\n}\n/**\n * @deprecated The enum form of `VAlign`, which no option actually takes. Use the `VAlign`\n * string union (`'top' | 'middle' | 'bottom'`) or, for a text body's own anchoring,\n * {@link TextAnchor}. Unlike its sibling {@link AlignH} — which `TextPropsOptions.align`\n * really is typed as — nothing in the library reads this, so it is a third spelling of a\n * two-spelling fact. It will be removed in the next major.\n */\nexport enum AlignV {\n\ttop = 'top',\n\tmiddle = 'middle',\n\tbottom = 'bottom',\n}\n\n/**\n * Every shape geometry name `addShape` accepts: the friendly {@link ShapeType} names plus the\n * connector presets that enum does not surface.\n *\n * Derived from `ShapeType` rather than spelled out, for the reason `CHART_NAME`, `SCHEME_COLORS`,\n * `PLACEHOLDER_TYPE` and `CONNECTOR_PRESET_NAME` are each derived from their runtime source: the\n * two cannot drift. The hand-written union this replaced had all 179 members in enum order, and\n * the runtime `VALID_SHAPE_PRESETS` set was already built from `Object.values(ShapeType)`, so the\n * type and the set it is supposed to describe could disagree on exactly the half nothing checked.\n * The union this produces is character-for-character the one it replaces.\n */\nexport type SHAPE_NAME = `${ShapeType}` | CONNECTOR_PRESET_NAME\n\n/**\n * Valid ECMA-376 `ST_ShapeType` presets that are not surfaced with a friendly\n * `ShapeType` name. They are still legal geometries PowerPoint renders, so the\n * preset-validation set must accept them.\n */\nconst EXTRA_SHAPE_PRESETS = [\n\t'straightConnector1',\n\t'bentConnector2',\n\t'bentConnector3',\n\t'bentConnector4',\n\t'bentConnector5',\n\t'curvedConnector2',\n\t'curvedConnector3',\n\t'curvedConnector4',\n\t'curvedConnector5',\n] as const\n\n/**\n * Connector preset geometries (`straightConnector1` / `bentConnector{2-5}` /\n * `curvedConnector{2-5}`) that `addShape` can serialize but that are not surfaced\n * as friendly `ShapeType` names. Derived from `EXTRA_SHAPE_PRESETS` so the public\n * `SHAPE_NAME` union and the runtime `VALID_SHAPE_PRESETS` set share one source of\n * truth and cannot drift. Use `addConnector` for live, endpoint-bound connectors;\n * pass these to `addShape` for a static box-positioned connector geometry.\n */\nexport type CONNECTOR_PRESET_NAME = (typeof EXTRA_SHAPE_PRESETS)[number]\n\n/**\n * Every shape geometry name ts-pptx can serialize without corrupting the\n * package: the OOXML preset geometries (`ST_ShapeType` — `ShapeType` values\n * plus the unexposed connectors above) and `custGeom` (freeform paths, emitted\n * as `<a:custGeom>` rather than `<a:prstGeom>`). Used to reject bogus presets\n * before they become an invalid `<a:prstGeom prst=\"...\">` that triggers\n * PowerPoint's \"needs repair\" dialog and drops the shape.\n */\nexport const VALID_SHAPE_PRESETS: ReadonlySet<string> = new Set<string>([\n\t...Object.values(ShapeType),\n\t...EXTRA_SHAPE_PRESETS,\n])\n\n/**\n * Narrow a public `CHART_NAME` to the internal `ChartType` enum. Because\n * `CHART_NAME` is derived from `ChartType`, every `CHART_NAME` value is by\n * construction a valid enum value, so this conversion is total and safe — it is\n * the single boundary cast that lets internal code compare against the enum\n * (enum-to-enum) instead of enum-to-string.\n */\nexport function asChartType(name: CHART_NAME): ChartType {\n\treturn name as ChartType\n}\n\n/** Every {@link ChartType} value, for validating a caller-supplied `type` at the API boundary. */\nconst CHART_TYPES: ReadonlySet<string> = new Set<string>(Object.values(ChartType))\n\n/**\n * Is `name` a chart type this library emits?\n *\n * `CHART_NAME` constrains TypeScript callers, but `addChart` is reachable from plain JavaScript\n * where nothing enforces the union — and the two emitters partition the catalog between them by\n * `switch`, so an off-catalog string has no arm in either and cannot produce a plot. Checked once\n * at define time (`gen/define/chart.ts`) so the caller hears about it at the call that was wrong,\n * rather than getting a chart-shaped hole in the deck.\n */\nexport function isChartType(name: unknown): name is CHART_NAME {\n\treturn typeof name === 'string' && CHART_TYPES.has(name)\n}\n\n/**\n * The chartEx (`cx:` / Office 2016 chart-extension) chart types. Unlike the classic 2007 catalog\n * these do NOT emit a `<c:chartSpace>` chart part: they emit a separate `chartEx{N}.xml` part in\n * the `http://schemas.microsoft.com/office/drawing/2014/chartex` namespace, are referenced from\n * the slide through `<mc:AlternateContent>`, and render only in PowerPoint 2016+/Microsoft 365\n * (older Office, Google Slides, Keynote and LibreOffice show the `<mc:Fallback>` shape instead).\n * See `gen/chart/chartex-xml.ts`.\n */\nconst CHARTEX_TYPES: ReadonlySet<string> = new Set<string>([\n\tChartType.waterfall,\n\tChartType.funnel,\n\tChartType.treemap,\n\tChartType.sunburst,\n\tChartType.histogram,\n\tChartType.pareto,\n\tChartType.boxWhisker,\n\tChartType.regionMap,\n])\n\n/**\n * Is `type` a chartEx (cx:) chart? Accepts a `ChartType`/`CHART_NAME` string; anything else —\n * including a combo-chart `ChartMulti[]` array or `undefined` — is not a chartEx type (combos are\n * classic-only), so those return `false`.\n */\nexport function isChartExType(type: unknown): boolean {\n\treturn typeof type === 'string' && CHARTEX_TYPES.has(type)\n}\n\nexport enum SlideObjectType {\n\tchart = 'chart',\n\tconnector = 'connector',\n\tgroup = 'group',\n\thyperlink = 'hyperlink',\n\timage = 'image',\n\tmedia = 'media',\n\tmodel3d = 'model3d',\n\toleObject = 'oleObject',\n\tonline = 'online',\n\tplaceholder = 'placeholder',\n\ttable = 'table',\n\ttablecell = 'tablecell',\n\ttext = 'text',\n\tnotes = 'notes',\n\tzoom = 'zoom',\n}\n\n/**\n * Maps a friendly `ConnectorType` to its OOXML connector preset *family*. `straight`\n * has a single fixed preset; `elbow` and `curved` select a member by bend count\n * (`bentConnector{3,4,5}` / `curvedConnector{3,4,5}`) — see `connectorPresetFor`.\n *\n * Not exported: `connectorPresetFor`, eleven lines below, is its only reader, and\n * `docs/contributing/architecture.md` puts internal OOXML generators off the published surface unless\n * deliberately exposed. Callers name a connector by its `ConnectorType`, or by the\n * {@link CONNECTOR_PRESET_NAME} the function returns.\n */\nconst CONNECTOR_PRESETS = {\n\tstraight: 'straightConnector1',\n\telbow: 'bentConnector',\n\tcurved: 'curvedConnector',\n} as const satisfies Record<'straight' | 'elbow' | 'curved', string>\n\n/**\n * Resolve the concrete connector preset geometry name for a `type` + bend count.\n * `straight` ignores `bends` (it has no adjustable jog). For `elbow` / `curved`, the\n * preset suffix is `bends + 2`, so `bends` of 1/2/3 maps to `…Connector3/4/5`, each\n * of which exposes exactly `bends` adjustable guides (`adj1…adjN`).\n * @param {'straight' | 'elbow' | 'curved'} type - friendly connector routing style\n * @param {number} bends - number of adjustable bends (1–3); ignored for `straight`\n * @return {CONNECTOR_PRESET_NAME} OOXML preset geometry name (e.g. `bentConnector4`)\n */\nexport function connectorPresetFor(type: 'straight' | 'elbow' | 'curved', bends: number): CONNECTOR_PRESET_NAME {\n\tif (type === 'straight') return CONNECTOR_PRESETS.straight\n\treturn `${CONNECTOR_PRESETS[type]}${bends + 2}` as CONNECTOR_PRESET_NAME\n}\nexport enum PlaceholderType {\n\ttitle = 'title',\n\tbody = 'body',\n\timage = 'pic',\n\tchart = 'chart',\n\ttable = 'tbl',\n\tmedia = 'media',\n}\n/**\n * Placeholder-type name. Derived from the `PlaceholderType` enum (above) so the two\n * never drift.\n */\nexport type PLACEHOLDER_TYPE = `${PlaceholderType}`\n\n/**\n * Bullet glyph presets. Only `DEFAULT` is currently wired through to output; the remaining entries are\n * reserved and not yet selectable via options.\n */\nexport enum BulletType {\n\tDEFAULT = '•',\n\tCHECK = '✓',\n\tSTAR = '★',\n\tTRIANGLE = '▶',\n}\n\n/**\n * Built-in PowerPoint table style IDs.\n *\n * Each value is the GUID that goes into `<a:tableStyleId>` inside `<a:tblPr>`.\n * These 74 GUIDs are the complete set defined in [MS-OE376] §5.1.6.10 and are\n * resolved by PowerPoint without embedding any style definition in the file.\n *\n * Only these enum members are supported. Raw GUID strings are not accepted;\n * use `TableStyle` members exclusively.\n */\nexport enum TableStyle {\n\t// ── No style ────────────────────────────────────────────────────────────\n\tNO_STYLE_NO_GRID = '{2D5ABB26-0587-4C30-8999-92F81FD0307C}',\n\tNO_STYLE_TABLE_GRID = '{5940675A-B579-460E-94D1-54222C63F5DA}',\n\n\t// ── Themed Style 1 ──────────────────────────────────────────────────────\n\tTHEMED_STYLE_1_ACCENT_1 = '{3C2FFA5D-87B4-456A-9821-1D502468CF0F}',\n\tTHEMED_STYLE_1_ACCENT_2 = '{284E427A-3D55-4303-BF80-6455036E1DE7}',\n\tTHEMED_STYLE_1_ACCENT_3 = '{69C7853C-536D-4A76-A0AE-DD22124D55A5}',\n\tTHEMED_STYLE_1_ACCENT_4 = '{775DCB02-9BB8-47FD-8907-85C794F793BA}',\n\tTHEMED_STYLE_1_ACCENT_5 = '{35758FB7-9AC5-4552-8A53-C91805E547FA}',\n\tTHEMED_STYLE_1_ACCENT_6 = '{08FB837D-C827-4EFA-A057-4D05807E0F7C}',\n\n\t// ── Themed Style 2 ──────────────────────────────────────────────────────\n\tTHEMED_STYLE_2_ACCENT_1 = '{D113A9D2-9D6B-4929-AA2D-F23B5EE8CBE7}',\n\tTHEMED_STYLE_2_ACCENT_2 = '{18603FDC-E32A-4AB5-989C-0864C3EAD2B8}',\n\tTHEMED_STYLE_2_ACCENT_3 = '{306799F8-075E-4A3A-A7F6-7FBC6576F1A4}',\n\tTHEMED_STYLE_2_ACCENT_4 = '{E269D01E-BC32-4049-B463-5C60D7B0CCD2}',\n\tTHEMED_STYLE_2_ACCENT_5 = '{327F97BB-C833-4FB7-BDE5-3F7075034690}',\n\tTHEMED_STYLE_2_ACCENT_6 = '{638B1855-1B75-4FBE-930C-398BA8C253C6}',\n\n\t// ── Light Style 1 ───────────────────────────────────────────────────────\n\tLIGHT_STYLE_1 = '{9D7B26C5-4107-4FEC-AEDC-1716B250A1EF}',\n\tLIGHT_STYLE_1_ACCENT_1 = '{3B4B98B0-60AC-42C2-AFA5-B58CD77FA1E5}',\n\tLIGHT_STYLE_1_ACCENT_2 = '{0E3FDE45-AF77-4B5C-9715-49D594BDF05E}',\n\tLIGHT_STYLE_1_ACCENT_3 = '{C083E6E3-FA7D-4D7B-A595-EF9225AFEA82}',\n\tLIGHT_STYLE_1_ACCENT_4 = '{D27102A9-8310-4765-A935-A1911B00CA55}',\n\tLIGHT_STYLE_1_ACCENT_5 = '{5FD0F851-EC5A-4D38-B0AD-8093EC10F338}',\n\tLIGHT_STYLE_1_ACCENT_6 = '{68D230F3-CF80-4859-8CE7-A43EE81993B5}',\n\n\t// ── Light Style 2 ───────────────────────────────────────────────────────\n\tLIGHT_STYLE_2 = '{7E9639D4-E3E2-4D34-9284-5A2195B3D0D7}',\n\tLIGHT_STYLE_2_ACCENT_1 = '{69012ECD-51FC-41F1-AA8D-1B2483CD663E}',\n\tLIGHT_STYLE_2_ACCENT_2 = '{72833802-FEF1-4C79-8D5D-14CF1EAF98D9}',\n\tLIGHT_STYLE_2_ACCENT_3 = '{F2DE63D5-997A-4646-A377-4702673A728D}',\n\tLIGHT_STYLE_2_ACCENT_4 = '{17292A2E-F333-43FB-9621-5CBBE7FDCDCB}',\n\tLIGHT_STYLE_2_ACCENT_5 = '{5A111915-BE36-4E01-A7E5-04B1672EAD32}',\n\tLIGHT_STYLE_2_ACCENT_6 = '{912C8C85-51F0-491E-9774-3900AFEF0FD7}',\n\n\t// ── Light Style 3 ───────────────────────────────────────────────────────\n\tLIGHT_STYLE_3 = '{616DA210-FB5B-4158-B5E0-FEB733F419BA}',\n\tLIGHT_STYLE_3_ACCENT_1 = '{BC89EF96-8CEA-46FF-86C4-4CE0E7609802}',\n\tLIGHT_STYLE_3_ACCENT_2 = '{5DA37D80-6434-44D0-A028-1B22A696006F}',\n\tLIGHT_STYLE_3_ACCENT_3 = '{8799B23B-EC83-4686-B30A-512413B5E67A}',\n\tLIGHT_STYLE_3_ACCENT_4 = '{ED083AE6-46FA-4A59-8FB0-9F97EB10719F}',\n\tLIGHT_STYLE_3_ACCENT_5 = '{BDBED569-4797-4DF1-A0F4-6AAB3CD982D8}',\n\tLIGHT_STYLE_3_ACCENT_6 = '{E8B1032C-EA38-4F05-BA0D-38AFFFC7BED3}',\n\n\t// ── Medium Style 1 ──────────────────────────────────────────────────────\n\tMEDIUM_STYLE_1 = '{793D81CF-94F2-401A-BA57-92F5A7B2D0C5}',\n\tMEDIUM_STYLE_1_ACCENT_1 = '{B301B821-A1FF-4177-AEE7-76D212191A09}',\n\tMEDIUM_STYLE_1_ACCENT_2 = '{9DCAF9ED-07DC-4A11-8D7F-57B35C25682E}',\n\tMEDIUM_STYLE_1_ACCENT_3 = '{1FECB4D8-DB02-4DC6-A0A2-4F2EBAE1DC90}',\n\tMEDIUM_STYLE_1_ACCENT_4 = '{1E171933-4619-4E11-9A3F-F7608DF75F80}',\n\tMEDIUM_STYLE_1_ACCENT_5 = '{FABFCF23-3B69-468F-B69F-88F6DE6A72F2}',\n\tMEDIUM_STYLE_1_ACCENT_6 = '{10A1B5D5-9B99-4C35-A422-299274C87663}',\n\n\t// ── Medium Style 2 ──────────────────────────────────────────────────────\n\tMEDIUM_STYLE_2 = '{073A0DAA-6AF3-43AB-8588-CEC1D06C72B9}',\n\tMEDIUM_STYLE_2_ACCENT_1 = '{5C22544A-7EE6-4342-B048-85BDC9FD1C3A}',\n\tMEDIUM_STYLE_2_ACCENT_2 = '{21E4AEA4-8DFA-4A89-87EB-49C32662AFE0}',\n\tMEDIUM_STYLE_2_ACCENT_3 = '{F5AB1C69-6EDB-4FF4-983F-18BD219EF322}',\n\tMEDIUM_STYLE_2_ACCENT_4 = '{00A15C55-8517-42AA-B614-E9B94910E393}',\n\tMEDIUM_STYLE_2_ACCENT_5 = '{7DF18680-E054-41AD-8BC1-D1AEF772440D}',\n\tMEDIUM_STYLE_2_ACCENT_6 = '{93296810-A885-4BE3-A3E7-6D5BEEA58F35}',\n\n\t// ── Medium Style 3 ──────────────────────────────────────────────────────\n\tMEDIUM_STYLE_3 = '{8EC20E35-A176-4012-BC5E-935CFFF8708E}',\n\tMEDIUM_STYLE_3_ACCENT_1 = '{6E25E649-3F16-4E02-A733-19D2CDBF48F0}',\n\tMEDIUM_STYLE_3_ACCENT_2 = '{85BE263C-DBD7-4A20-BB59-AAB30ACAA65A}',\n\tMEDIUM_STYLE_3_ACCENT_3 = '{EB344D84-9AFB-497E-A393-DC336BA19D2E}',\n\tMEDIUM_STYLE_3_ACCENT_4 = '{EB9631B5-78F2-41C9-869B-9F39066F8104}',\n\tMEDIUM_STYLE_3_ACCENT_5 = '{74C1A8A3-306A-4EB7-A6B1-4F7E0EB9C5D6}',\n\tMEDIUM_STYLE_3_ACCENT_6 = '{2A488322-F2BA-4B5B-9748-0D474271808F}',\n\n\t// ── Medium Style 4 ──────────────────────────────────────────────────────\n\tMEDIUM_STYLE_4 = '{D7AC3CCA-C797-4891-BE02-D94E43425B78}',\n\tMEDIUM_STYLE_4_ACCENT_1 = '{69CF1AB2-1976-4502-BF36-3FF5EA218861}',\n\tMEDIUM_STYLE_4_ACCENT_2 = '{8A107856-5554-42FB-B03E-39F5DBC370BA}',\n\tMEDIUM_STYLE_4_ACCENT_3 = '{0505E3EF-67EA-436B-97B2-0124C06EBD24}',\n\tMEDIUM_STYLE_4_ACCENT_4 = '{C4B1156A-380E-4F78-BDF5-A606A8083BF9}',\n\tMEDIUM_STYLE_4_ACCENT_5 = '{22838BEF-8BB2-4498-84A7-C5851F593DF1}',\n\tMEDIUM_STYLE_4_ACCENT_6 = '{16D9F66E-5EB9-4882-86FB-DCBF35E3C3E4}',\n\n\t// ── Dark Style 1 ────────────────────────────────────────────────────────\n\tDARK_STYLE_1 = '{E8034E78-7F5D-4C2E-B375-FC64B27BC917}',\n\tDARK_STYLE_1_ACCENT_1 = '{125E5076-3810-47DD-B79F-674D7AD40C01}',\n\tDARK_STYLE_1_ACCENT_2 = '{37CE84F3-28C3-443E-9E96-99CF82512B78}',\n\tDARK_STYLE_1_ACCENT_3 = '{D03447BB-5D67-496B-8E87-E561075AD55C}',\n\tDARK_STYLE_1_ACCENT_4 = '{E929F9F4-4A8F-4326-A1B4-22849713DDAB}',\n\tDARK_STYLE_1_ACCENT_5 = '{8FD4443E-F989-4FC4-A0C8-D5A2AF1F390B}',\n\tDARK_STYLE_1_ACCENT_6 = '{AF606853-7671-496A-8E4F-DF71F8EC918B}',\n\n\t// ── Dark Style 2 ────────────────────────────────────────────────────────\n\tDARK_STYLE_2 = '{5202B0CA-FC54-4496-8BCA-5EF66A818D29}',\n\t/** Header uses Accent 2, body rows use Accent 1 */\n\tDARK_STYLE_2_ACCENT_1_ACCENT_2 = '{0660B408-B3CF-4A94-85FC-2B1E0A45F4A2}',\n\t/** Header uses Accent 4, body rows use Accent 3 */\n\tDARK_STYLE_2_ACCENT_3_ACCENT_4 = '{91EBBBCC-DAD2-459C-BE2E-F6DE35CF9A28}',\n\t/** Header uses Accent 6, body rows use Accent 5 */\n\tDARK_STYLE_2_ACCENT_5_ACCENT_6 = '{46F890A9-2807-4EBB-B81D-B2AA78EC7F39}',\n}\n","/**\n * A table cell's default text insets in EMU: the schema defaults of `a:tcPr/@marL`, `@marR`\n * (91440, 0.1in) and `@marT`, `@marB` (45720, 0.05in) on `CT_TableCellProperties`.\n *\n * Unlike the body insets in `body-insets.ts` these are real XSD defaults, so they are transcribed\n * from the schema rather than derived. A cell that states one side leaves the other three at these\n * values, not at zero.\n *\n * A module of its own, importing nothing, because `constants-internal.ts` derives the write path's\n * inch defaults from it and is reached by every entry. Taken from `body-insets.ts`, the record\n * brought that module's other exports into the read entry with it.\n */\nexport const TABLE_CELL_MARGIN_DEFAULTS_EMU = { left: 91440, right: 91440, top: 45720, bottom: 45720 } as const\n"],"mappings":";;;;;;;;;;;AAUA,MAAa,eAAe;;AAE5B,MAAa,gBAAgB;;AAE7B,MAAa,kBAAkB;;;;;;;;ACE/B,MAAa,yBAAyB;;;;;;AAOtC,MAAa,gBAAgB;;;;;;;AAQ7B,MAAa,wBAAwB,gBAAgB;;;;;;AAOrD,MAAa,uBAAuB;;;;;AAMpC,SAAgB,eAAe,IAAoB;CAClD,mBAAmB,IAAI,QAAQ;CAC/B,OAAO,KAAK,MAAM,KAAA,GAAyB;AAC5C;;;;AAeA,MAAM,qBAAqB;;;AAI3B,MAAa,sBAAsB;;;;;AAMnC,MAAa,qBAAqB;;AAGlC,MAAa,qBAAqB;AAmBlC,SAAgB,YAAY,QAAqB;CAChD,mBAAmB,QAAQ,QAAQ;CACnC,OAAO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,WAAA,4BAAA;CACA,WAAA,4BAAA;CACA,WAAA,4BAAA;CACA,WAAA,4BAAA;CACA,WAAA,4BAAA;CACA,WAAA,4BAAA;CAGA,WAAA,oBAAA;CACA,WAAA,6BAAA;CACA,WAAA,6BAAA;CACA,WAAA,6BAAA;CACA,WAAA,6BAAA;CACA,WAAA,6BAAA;CACA,WAAA,6BAAA;CAGA,WAAA,oBAAA;CACA,WAAA,6BAAA;CACA,WAAA,6BAAA;CACA,WAAA,6BAAA;CACA,WAAA,6BAAA;CACA,WAAA,6BAAA;CACA,WAAA,6BAAA;CAGA,WAAA,oBAAA;CACA,WAAA,6BAAA;CACA,WAAA,6BAAA;CACA,WAAA,6BAAA;CACA,WAAA,6BAAA;CACA,WAAA,6BAAA;CACA,WAAA,6BAAA;CAGA,WAAA,oBAAA;CACA,WAAA,6BAAA;CACA,WAAA,6BAAA;CACA,WAAA,6BAAA;CACA,WAAA,6BAAA;CACA,WAAA,6BAAA;CACA,WAAA,6BAAA;CAGA,WAAA,kBAAA;CACA,WAAA,2BAAA;CACA,WAAA,2BAAA;CACA,WAAA,2BAAA;CACA,WAAA,2BAAA;CACA,WAAA,2BAAA;CACA,WAAA,2BAAA;CAGA,WAAA,kBAAA;;CAEA,WAAA,oCAAA;;CAEA,WAAA,oCAAA;;CAEA,WAAA,oCAAA;;AACD,EAAA,CAAA,CAAA;;;;;;;;;;;;;;;ACxiBA,MAAa,iCAAiC;CAAE,MAAM;CAAO,OAAO;CAAO,KAAK;CAAO,QAAQ;AAAM"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { t as genTableToSlides } from "./html-dom-Iuog2wdK.js";
|
|
2
|
+
//#region src/families/table-dom.ts
|
|
3
|
+
/**
|
|
4
|
+
* ts-pptx: the table family's live-DOM half
|
|
5
|
+
*
|
|
6
|
+
* `tableToSlides` reproduces a rendered HTML `<table>` as a PowerPoint table, resolving the element
|
|
7
|
+
* id against the global `document`. It is the table family's, but it is composed separately because
|
|
8
|
+
* it is the browser entry's alone: wiring it into `families/table.ts` would put `gen/table/html-dom.ts`
|
|
9
|
+
* in the graph of every Node program that draws a table, and wiring it into the entry directly would
|
|
10
|
+
* make it the one thing a browser tier could not drop.
|
|
11
|
+
*/
|
|
12
|
+
const tableDomFamily = {
|
|
13
|
+
name: "table",
|
|
14
|
+
presentationAuthors: { tableToSlides(ctx, eleId, options) {
|
|
15
|
+
genTableToSlides(ctx.pres, eleId, options);
|
|
16
|
+
} }
|
|
17
|
+
};
|
|
18
|
+
//#endregion
|
|
19
|
+
export { tableDomFamily as t };
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=table-dom-BTDP3lEP.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-dom-BTDP3lEP.js","names":[],"sources":["../src/families/table-dom.ts"],"sourcesContent":["/**\n * ts-pptx: the table family's live-DOM half\n *\n * `tableToSlides` reproduces a rendered HTML `<table>` as a PowerPoint table, resolving the element\n * id against the global `document`. It is the table family's, but it is composed separately because\n * it is the browser entry's alone: wiring it into `families/table.ts` would put `gen/table/html-dom.ts`\n * in the graph of every Node program that draws a table, and wiring it into the entry directly would\n * make it the one thing a browser tier could not drop.\n */\n\nimport { genTableToSlides } from '../gen/table/html-dom.js'\nimport type { ConstructFamily } from './shared.js'\n\nexport const tableDomFamily = {\n\tname: 'table',\n\tpresentationAuthors: {\n\t\ttableToSlides(ctx, eleId, options) {\n\t\t\t// @note `options.verbose` (a documented dev-only flag on TableToSlidesProps) is read\n\t\t\t// inside genTableToSlides to trace the auto-paging layout process.\n\t\t\tgenTableToSlides(ctx.pres, eleId, options)\n\t\t},\n\t},\n} satisfies ConstructFamily\n"],"mappings":";;;;;;;;;;;AAaA,MAAa,iBAAiB;CAC7B,MAAM;CACN,qBAAqB,EACpB,cAAc,KAAK,OAAO,SAAS;EAGlC,iBAAiB,IAAI,MAAM,OAAO,OAAO;CAC1C,EACD;AACD"}
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import { mn as imageFormatForExtension, pn as imageFormatForContentType } from "./image-size-CvN2iCA4.js";
|
|
2
|
+
//#region src/media/content-type.ts
|
|
3
|
+
/**
|
|
4
|
+
* OPC content types for embedded media parts, keyed by file extension.
|
|
5
|
+
*
|
|
6
|
+
* Both mappings reproduce what PowerPoint itself authors rather than the IANA-preferred
|
|
7
|
+
* spelling — a package that disagrees (e.g. `audio/mp3` for an `.mp3`) is the kind of thing
|
|
8
|
+
* PowerPoint offers to repair.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Map an image file extension to its OOXML content type, through the format registry in
|
|
12
|
+
* `media/image-formats.ts`. An extension the registry does not carry falls through to
|
|
13
|
+
* `image/<extn>`, which is right for any format whose content type is its extension.
|
|
14
|
+
* Only the content type is derived here; the file extension (used for the media Target
|
|
15
|
+
* filename) is left to the caller.
|
|
16
|
+
* @param {string} extn - image file extension (e.g. `png`, `jpg`, `emf`)
|
|
17
|
+
* @returns {string} OOXML content type (e.g. `image/png`, `image/x-emf`)
|
|
18
|
+
*/
|
|
19
|
+
function imageContentType(extn) {
|
|
20
|
+
return imageFormatForExtension(extn)?.contentType ?? "image/" + (extn || "").toLowerCase();
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* The media type an inline payload states in its header, lower-cased, or `null` when it states none.
|
|
24
|
+
*
|
|
25
|
+
* Takes a `data:` URI or the same header without its `data:` scheme (`image/png;base64,…`), the
|
|
26
|
+
* two forms the definers accept. It is the one reading of that header: the patterns it replaces
|
|
27
|
+
* each stopped short somewhere, `image\/(\w+);` at `-`, `.` and `+`, so `data:image/x-emf;…` named
|
|
28
|
+
* no type and its EMF bytes were written into a `.png` part declared `image/png`.
|
|
29
|
+
* @param data - a `data:` URI, a header-first base64 payload, or anything else
|
|
30
|
+
* @returns the `type/subtype`, e.g. `image/x-emf`, or `null`
|
|
31
|
+
*/
|
|
32
|
+
function dataUriMediaType(data) {
|
|
33
|
+
return /^(?:data:)?([a-z]+\/[\w.+-]+)[;,]/i.exec(data || "")?.[1]?.toLowerCase() ?? null;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Resolve the file extension an embedded image part should carry, from the caller's source.
|
|
37
|
+
*
|
|
38
|
+
* A `data:` URI states its mime type outright, so it wins over `path`: the bytes are the thing
|
|
39
|
+
* being embedded, and a caller may supply them with no path at all (or with a path whose
|
|
40
|
+
* extension disagrees with the payload). The extension chosen here names the media part *and*,
|
|
41
|
+
* via {@link imageContentType}, decides the `<Default>` the package declares for it — so
|
|
42
|
+
* getting it from a placeholder path is how a deck ends up declaring `image/png` over SVG
|
|
43
|
+
* bytes, which is exactly the mismatch PowerPoint offers to "repair".
|
|
44
|
+
*
|
|
45
|
+
* A type the format registry carries names its part by the registry's extension (`image/x-emf` is
|
|
46
|
+
* `emf`, `image/svg+xml` is `svg`). Any other type names it by its subtype, so `image/jpg` keeps
|
|
47
|
+
* `jpg`. The result is always lower-cased, so a `data:image/PNG;` source names its part the same
|
|
48
|
+
* way a `photo.PNG` path does.
|
|
49
|
+
* @param {string} path - caller-supplied path/URL (may be empty); query and fragment are stripped
|
|
50
|
+
* @param {string} data - caller-supplied `data:`/base64 payload (may be empty)
|
|
51
|
+
* @returns {string} file extension, no dot (e.g. `png`, `jpeg`, `svg`)
|
|
52
|
+
*/
|
|
53
|
+
function imageExtensionForSource(path, data) {
|
|
54
|
+
const strPath = path || "";
|
|
55
|
+
const pathExtn = (((strPath.slice(strPath.lastIndexOf("/") + 1).split("?")[0] || "").split(".").pop() || "png").split("#")[0] || "png").toLowerCase();
|
|
56
|
+
const mime = dataUriMediaType(data);
|
|
57
|
+
if (mime?.startsWith("image/")) return imageFormatForContentType(mime)?.ext ?? mime.slice(6);
|
|
58
|
+
return pathExtn;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Map an audio content type's subtype back to the file extension a media part should use.
|
|
62
|
+
*
|
|
63
|
+
* Needed because a caller supplying sound bytes as a `data:` URI states a *content type*
|
|
64
|
+
* (`data:audio/x-wav;base64,…`), while the media part needs a *filename*. Taking the subtype
|
|
65
|
+
* verbatim produces `audio1.x-wav` — legal, since the package would then declare a matching
|
|
66
|
+
* `<Default Extension="x-wav"/>`, but a file type that does not exist and that no other tool
|
|
67
|
+
* recognises. `audio/x-wav` in particular is not an edge case: it is exactly what PowerPoint
|
|
68
|
+
* authors for an embedded transition sound, so it arrives on any deck read back in.
|
|
69
|
+
*
|
|
70
|
+
* Only the spellings that are *not* already an extension are listed; anything else (`ogg`,
|
|
71
|
+
* `flac`, `aac`, …) is its own extension and falls through. Read against {@link avContentType},
|
|
72
|
+
* which maps the same pairs in the other direction.
|
|
73
|
+
*/
|
|
74
|
+
function audioExtensionForSubtype(subtype) {
|
|
75
|
+
switch ((subtype || "").toLowerCase()) {
|
|
76
|
+
case "x-wav":
|
|
77
|
+
case "wave":
|
|
78
|
+
case "vnd.wave": return "wav";
|
|
79
|
+
case "mpeg": return "mp3";
|
|
80
|
+
case "x-ms-wma": return "wma";
|
|
81
|
+
case "mp4": return "m4a";
|
|
82
|
+
default: return (subtype || "").toLowerCase();
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Resolve the OPC content type for an embedded audio/video part by file extension,
|
|
87
|
+
* matching what PowerPoint authors (e.g. `mp3` → `audio/mpeg`, not `audio/mp3`).
|
|
88
|
+
* The `mtype` disambiguates extensions Office maps differently per kind and seeds
|
|
89
|
+
* the `mtype/extn` fallback for anything unlisted.
|
|
90
|
+
* @param {string} extn - media file extension (no dot), case-insensitive
|
|
91
|
+
* @param {'audio' | 'video'} mtype - whether the item is audio or video
|
|
92
|
+
*/
|
|
93
|
+
function avContentType(extn, mtype) {
|
|
94
|
+
switch ((extn || "").toLowerCase()) {
|
|
95
|
+
case "mp4": return mtype === "audio" ? "audio/mp4" : "video/mp4";
|
|
96
|
+
case "m4v": return "video/mp4";
|
|
97
|
+
case "mov": return "video/quicktime";
|
|
98
|
+
case "avi": return "video/avi";
|
|
99
|
+
case "wmv": return "video/x-ms-wmv";
|
|
100
|
+
case "mpg":
|
|
101
|
+
case "mpeg": return mtype === "audio" ? "audio/mpeg" : "video/mpeg";
|
|
102
|
+
case "ogv": return "video/ogg";
|
|
103
|
+
case "webm": return "video/webm";
|
|
104
|
+
case "mp3": return "audio/mpeg";
|
|
105
|
+
case "m4a": return "audio/mp4";
|
|
106
|
+
case "wav": return "audio/x-wav";
|
|
107
|
+
case "wma": return "audio/x-ms-wma";
|
|
108
|
+
case "aac": return "audio/aac";
|
|
109
|
+
case "oga":
|
|
110
|
+
case "ogg": return "audio/ogg";
|
|
111
|
+
case "flac": return "audio/flac";
|
|
112
|
+
default: return mtype + "/" + (extn || "").toLowerCase();
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* The extension an emitted *asset filename* should carry for a media content type, or `null`
|
|
117
|
+
* when nothing here names one and the caller should fall back to the source part's own suffix.
|
|
118
|
+
*
|
|
119
|
+
* This is the on-disk spelling, not the media part's: `image/jpeg` is `jpg` and `image/tiff` is
|
|
120
|
+
* `tif` here, because an asset directory is read by people and opened by desktop viewers. See the
|
|
121
|
+
* `filenameExt` column in `media/image-formats.ts`. Audio goes through {@link audioExtensionForSubtype}, which is
|
|
122
|
+
* already the one table for that direction.
|
|
123
|
+
*/
|
|
124
|
+
function assetFilenameExtension(contentType) {
|
|
125
|
+
const image = imageFormatForContentType(contentType);
|
|
126
|
+
if (image) return image.filenameExt;
|
|
127
|
+
const ct = (contentType || "").toLowerCase();
|
|
128
|
+
return ct.startsWith("audio/") ? audioExtensionForSubtype(ct.slice(6)) : null;
|
|
129
|
+
}
|
|
130
|
+
//#endregion
|
|
131
|
+
//#region src/ooxml/text-anchor.ts
|
|
132
|
+
/**
|
|
133
|
+
* Every `valign` the write API accepts, the anchor token it means, and the other spellings the
|
|
134
|
+
* definers between them have always taken.
|
|
135
|
+
*
|
|
136
|
+
* The three definers read `valign` three ways — `startsWith('b'|'m'|'t')`, a chain of
|
|
137
|
+
* `.replace('top','t')…` that let any other string through *verbatim* into `anchor=`, and a
|
|
138
|
+
* longer chain that also took `btm` and `center`. This table is the union of what they named;
|
|
139
|
+
* anything else is a warning and an omitted attribute rather than an invalid one.
|
|
140
|
+
*
|
|
141
|
+
* `valign` leads each row because it is the direction with a preferred answer: several spellings
|
|
142
|
+
* mean one anchor, and only one of them is what a generated script should write back.
|
|
143
|
+
*/
|
|
144
|
+
const VALIGN_TABLE = [
|
|
145
|
+
{
|
|
146
|
+
valign: "top",
|
|
147
|
+
anchor: "t",
|
|
148
|
+
aliases: ["t"]
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
valign: "middle",
|
|
152
|
+
anchor: "ctr",
|
|
153
|
+
aliases: [
|
|
154
|
+
"c",
|
|
155
|
+
"ctr",
|
|
156
|
+
"center",
|
|
157
|
+
"m"
|
|
158
|
+
]
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
valign: "bottom",
|
|
162
|
+
anchor: "b",
|
|
163
|
+
aliases: ["b", "btm"]
|
|
164
|
+
}
|
|
165
|
+
];
|
|
166
|
+
/** Every spelling of `valign` the definers accept, mapped to the one anchor token it means. */
|
|
167
|
+
const TEXT_ANCHOR_BY_VALIGN = Object.fromEntries(VALIGN_TABLE.flatMap((row) => [row.valign, ...row.aliases].map((spelling) => [spelling, row.anchor])));
|
|
168
|
+
/**
|
|
169
|
+
* An anchor token back to the `valign` a generated script writes — the preferred spelling of the
|
|
170
|
+
* row, never one of its aliases.
|
|
171
|
+
*/
|
|
172
|
+
const VALIGN_BY_ANCHOR = Object.fromEntries(VALIGN_TABLE.map((row) => [row.anchor, row.valign]));
|
|
173
|
+
//#endregion
|
|
174
|
+
export { avContentType as a, imageExtensionForSource as c, audioExtensionForSubtype as i, VALIGN_BY_ANCHOR as n, dataUriMediaType as o, assetFilenameExtension as r, imageContentType as s, TEXT_ANCHOR_BY_VALIGN as t };
|
|
175
|
+
|
|
176
|
+
//# sourceMappingURL=text-anchor-CrYXAfUu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text-anchor-CrYXAfUu.js","names":[],"sources":["../src/media/content-type.ts","../src/ooxml/text-anchor.ts"],"sourcesContent":["/**\n * OPC content types for embedded media parts, keyed by file extension.\n *\n * Both mappings reproduce what PowerPoint itself authors rather than the IANA-preferred\n * spelling — a package that disagrees (e.g. `audio/mp3` for an `.mp3`) is the kind of thing\n * PowerPoint offers to repair.\n */\n\nimport { imageFormatForContentType, imageFormatForExtension } from './image-formats.js'\n\n/**\n * Map an image file extension to its OOXML content type, through the format registry in\n * `media/image-formats.ts`. An extension the registry does not carry falls through to\n * `image/<extn>`, which is right for any format whose content type is its extension.\n * Only the content type is derived here; the file extension (used for the media Target\n * filename) is left to the caller.\n * @param {string} extn - image file extension (e.g. `png`, `jpg`, `emf`)\n * @returns {string} OOXML content type (e.g. `image/png`, `image/x-emf`)\n */\nexport function imageContentType(extn: string): string {\n\treturn imageFormatForExtension(extn)?.contentType ?? 'image/' + (extn || '').toLowerCase()\n}\n\n/**\n * The media type an inline payload states in its header, lower-cased, or `null` when it states none.\n *\n * Takes a `data:` URI or the same header without its `data:` scheme (`image/png;base64,…`), the\n * two forms the definers accept. It is the one reading of that header: the patterns it replaces\n * each stopped short somewhere, `image\\/(\\w+);` at `-`, `.` and `+`, so `data:image/x-emf;…` named\n * no type and its EMF bytes were written into a `.png` part declared `image/png`.\n * @param data - a `data:` URI, a header-first base64 payload, or anything else\n * @returns the `type/subtype`, e.g. `image/x-emf`, or `null`\n */\nexport function dataUriMediaType(data: string): string | null {\n\tconst match = /^(?:data:)?([a-z]+\\/[\\w.+-]+)[;,]/i.exec(data || '')\n\treturn match?.[1]?.toLowerCase() ?? null\n}\n\n/**\n * Resolve the file extension an embedded image part should carry, from the caller's source.\n *\n * A `data:` URI states its mime type outright, so it wins over `path`: the bytes are the thing\n * being embedded, and a caller may supply them with no path at all (or with a path whose\n * extension disagrees with the payload). The extension chosen here names the media part *and*,\n * via {@link imageContentType}, decides the `<Default>` the package declares for it — so\n * getting it from a placeholder path is how a deck ends up declaring `image/png` over SVG\n * bytes, which is exactly the mismatch PowerPoint offers to \"repair\".\n *\n * A type the format registry carries names its part by the registry's extension (`image/x-emf` is\n * `emf`, `image/svg+xml` is `svg`). Any other type names it by its subtype, so `image/jpg` keeps\n * `jpg`. The result is always lower-cased, so a `data:image/PNG;` source names its part the same\n * way a `photo.PNG` path does.\n * @param {string} path - caller-supplied path/URL (may be empty); query and fragment are stripped\n * @param {string} data - caller-supplied `data:`/base64 payload (may be empty)\n * @returns {string} file extension, no dot (e.g. `png`, `jpeg`, `svg`)\n */\nexport function imageExtensionForSource(path: string, data: string): string {\n\t// NOTE: Split to address URLs with params (eg: `path/brent.jpg?someParam=true`)\n\tconst strPath = path || ''\n\tconst pathFile = strPath.slice(strPath.lastIndexOf('/') + 1).split('?')[0] || ''\n\tconst pathExtn = ((pathFile.split('.').pop() || 'png').split('#')[0] || 'png').toLowerCase()\n\n\tconst mime = dataUriMediaType(data)\n\tif (mime?.startsWith('image/')) return imageFormatForContentType(mime)?.ext ?? mime.slice('image/'.length)\n\treturn pathExtn\n}\n\n/**\n * Map an audio content type's subtype back to the file extension a media part should use.\n *\n * Needed because a caller supplying sound bytes as a `data:` URI states a *content type*\n * (`data:audio/x-wav;base64,…`), while the media part needs a *filename*. Taking the subtype\n * verbatim produces `audio1.x-wav` — legal, since the package would then declare a matching\n * `<Default Extension=\"x-wav\"/>`, but a file type that does not exist and that no other tool\n * recognises. `audio/x-wav` in particular is not an edge case: it is exactly what PowerPoint\n * authors for an embedded transition sound, so it arrives on any deck read back in.\n *\n * Only the spellings that are *not* already an extension are listed; anything else (`ogg`,\n * `flac`, `aac`, …) is its own extension and falls through. Read against {@link avContentType},\n * which maps the same pairs in the other direction.\n */\nexport function audioExtensionForSubtype(subtype: string): string {\n\tswitch ((subtype || '').toLowerCase()) {\n\t\tcase 'x-wav':\n\t\tcase 'wave':\n\t\tcase 'vnd.wave':\n\t\t\treturn 'wav'\n\t\tcase 'mpeg':\n\t\t\treturn 'mp3'\n\t\tcase 'x-ms-wma':\n\t\t\treturn 'wma'\n\t\tcase 'mp4':\n\t\t\treturn 'm4a'\n\t\tdefault:\n\t\t\treturn (subtype || '').toLowerCase()\n\t}\n}\n\n/**\n * Resolve the OPC content type for an embedded audio/video part by file extension,\n * matching what PowerPoint authors (e.g. `mp3` → `audio/mpeg`, not `audio/mp3`).\n * The `mtype` disambiguates extensions Office maps differently per kind and seeds\n * the `mtype/extn` fallback for anything unlisted.\n * @param {string} extn - media file extension (no dot), case-insensitive\n * @param {'audio' | 'video'} mtype - whether the item is audio or video\n */\nexport function avContentType(extn: string, mtype: 'audio' | 'video'): string {\n\tswitch ((extn || '').toLowerCase()) {\n\t\t// video\n\t\tcase 'mp4':\n\t\t\treturn mtype === 'audio' ? 'audio/mp4' : 'video/mp4'\n\t\tcase 'm4v':\n\t\t\treturn 'video/mp4'\n\t\tcase 'mov':\n\t\t\treturn 'video/quicktime'\n\t\tcase 'avi':\n\t\t\treturn 'video/avi'\n\t\tcase 'wmv':\n\t\t\treturn 'video/x-ms-wmv'\n\t\tcase 'mpg':\n\t\tcase 'mpeg':\n\t\t\treturn mtype === 'audio' ? 'audio/mpeg' : 'video/mpeg'\n\t\tcase 'ogv':\n\t\t\treturn 'video/ogg'\n\t\tcase 'webm':\n\t\t\treturn 'video/webm'\n\t\t// audio\n\t\tcase 'mp3':\n\t\t\treturn 'audio/mpeg'\n\t\tcase 'm4a':\n\t\t\treturn 'audio/mp4'\n\t\tcase 'wav':\n\t\t\treturn 'audio/x-wav' // PowerPoint authors the x- form (e.g. embedded transition sounds)\n\t\tcase 'wma':\n\t\t\treturn 'audio/x-ms-wma'\n\t\tcase 'aac':\n\t\t\treturn 'audio/aac'\n\t\tcase 'oga':\n\t\tcase 'ogg':\n\t\t\treturn 'audio/ogg'\n\t\tcase 'flac':\n\t\t\treturn 'audio/flac'\n\t\tdefault:\n\t\t\treturn mtype + '/' + (extn || '').toLowerCase()\n\t}\n}\n\n/**\n * The extension an emitted *asset filename* should carry for a media content type, or `null`\n * when nothing here names one and the caller should fall back to the source part's own suffix.\n *\n * This is the on-disk spelling, not the media part's: `image/jpeg` is `jpg` and `image/tiff` is\n * `tif` here, because an asset directory is read by people and opened by desktop viewers. See the\n * `filenameExt` column in `media/image-formats.ts`. Audio goes through {@link audioExtensionForSubtype}, which is\n * already the one table for that direction.\n */\nexport function assetFilenameExtension(contentType: string): string | null {\n\tconst image = imageFormatForContentType(contentType)\n\tif (image) return image.filenameExt\n\tconst ct = (contentType || '').toLowerCase()\n\treturn ct.startsWith('audio/') ? audioExtensionForSubtype(ct.slice('audio/'.length)) : null\n}\n","/**\n * `a:bodyPr/@anchor` and `a:tcPr/@anchor`, and the write API's `valign` on the other side of it.\n *\n * Two tables stated the same correspondence in opposite directions and could not see each other:\n * the emitters' spelling table in `gen/drawingml/text-body.ts`, and its hand-written inverse in\n * `script/from-read/values.ts`, which maps a read deck's anchor back to the `valign` a generated\n * script writes. `script/` cannot import `gen/` — it has no such import anywhere, deliberately —\n * so the inverse could not be derived where it stood, and a token added to one table would have\n * meant a script that reads an anchor it cannot write back.\n *\n * The correspondence itself is a fact about the format, so it lives here, as one table with both\n * directions derived from it.\n *\n * This module keeps `ooxml/`'s no-runtime-imports property: {@link TEXT_ANCHORS} is the schema's\n * own list from a module with none either, and the {@link TextAnchor} reference is type-only, so\n * it is erased. That reference is still a real check — it is what ties the enum the write API\n * exposes to the tokens named here.\n */\n\nimport type { TextAnchor } from '../enums.js'\nimport { TEXT_ANCHORS } from './st-enums.js'\n\n/**\n * The `ST_TextAnchoringType` tokens this library writes, checked against both the schema's list\n * and the public {@link TextAnchor} enum.\n *\n * `Extract` is that check twice over: a token here that is not in `ST_TextAnchoringType`, or not\n * in the enum, is dropped from the type and the table below stops compiling. Compile-time on\n * purpose — every value in the table is a literal, so a runtime check could never fail, and a\n * check that cannot fail is worse than none.\n *\n * The library writes three of the schema's five: `just` and `dist` are anchoring modes no\n * option surfaces.\n */\nexport type TextAnchorToken = Extract<`${TextAnchor}`, (typeof TEXT_ANCHORS)[number]>\n\n/**\n * Every `valign` the write API accepts, the anchor token it means, and the other spellings the\n * definers between them have always taken.\n *\n * The three definers read `valign` three ways — `startsWith('b'|'m'|'t')`, a chain of\n * `.replace('top','t')…` that let any other string through *verbatim* into `anchor=`, and a\n * longer chain that also took `btm` and `center`. This table is the union of what they named;\n * anything else is a warning and an omitted attribute rather than an invalid one.\n *\n * `valign` leads each row because it is the direction with a preferred answer: several spellings\n * mean one anchor, and only one of them is what a generated script should write back.\n */\nconst VALIGN_TABLE = [\n\t{ valign: 'top', anchor: 't', aliases: ['t'] },\n\t{ valign: 'middle', anchor: 'ctr', aliases: ['c', 'ctr', 'center', 'm'] },\n\t{ valign: 'bottom', anchor: 'b', aliases: ['b', 'btm'] },\n] as const satisfies ReadonlyArray<{ valign: string; anchor: TextAnchorToken; aliases: readonly string[] }>\n\n/** Every spelling of `valign` the definers accept, mapped to the one anchor token it means. */\nexport const TEXT_ANCHOR_BY_VALIGN: Readonly<Record<string, TextAnchorToken>> = Object.fromEntries(\n\tVALIGN_TABLE.flatMap((row) => [row.valign, ...row.aliases].map((spelling) => [spelling, row.anchor]))\n)\n\n/**\n * An anchor token back to the `valign` a generated script writes — the preferred spelling of the\n * row, never one of its aliases.\n */\nexport const VALIGN_BY_ANCHOR: Readonly<Record<string, string>> = Object.fromEntries(\n\tVALIGN_TABLE.map((row) => [row.anchor, row.valign])\n)\n"],"mappings":";;;;;;;;;;;;;;;;;;AAmBA,SAAgB,iBAAiB,MAAsB;CACtD,OAAO,wBAAwB,IAAI,CAAC,EAAE,eAAe,YAAY,QAAQ,GAAA,CAAI,YAAY;AAC1F;;;;;;;;;;;AAYA,SAAgB,iBAAiB,MAA6B;CAE7D,OADc,qCAAqC,KAAK,QAAQ,EACrD,CAAC,GAAG,EAAE,EAAE,YAAY,KAAK;AACrC;;;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