@shbernal/ts-pptx 4.0.1 → 4.2.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 (139) hide show
  1. package/README.md +147 -114
  2. package/dist/anim-presets-Qbgh8uut.js +55 -0
  3. package/dist/anim-presets-Qbgh8uut.js.map +1 -0
  4. package/dist/{autopage-odPz7zZO.js → autopage-DqZ37VpL.js} +11 -12
  5. package/dist/autopage-DqZ37VpL.js.map +1 -0
  6. package/dist/{binary-string-CKVAYI3M.js → binary-string-Ba8VM3b9.js} +3 -4
  7. package/dist/binary-string-Ba8VM3b9.js.map +1 -0
  8. package/dist/{body-insets-Dw_BeWD_.js → body-insets-BDHymJvz.js} +7 -9
  9. package/dist/body-insets-BDHymJvz.js.map +1 -0
  10. package/dist/browser.d.ts +24 -16
  11. package/dist/browser.d.ts.map +1 -1
  12. package/dist/browser.js +19 -19
  13. package/dist/browser.js.map +1 -1
  14. package/dist/{image-size-CvN2iCA4.js → chart-metadata-CwiTTcJq.js} +634 -537
  15. package/dist/chart-metadata-CwiTTcJq.js.map +1 -0
  16. package/dist/{clip-Bl01BPcN.d.ts → clip-ISfCMtWA.d.ts} +6 -10
  17. package/dist/clip-ISfCMtWA.d.ts.map +1 -0
  18. package/dist/{notes-Dh12JAbn.js → comments-CKIZYRbZ.js} +530 -401
  19. package/dist/comments-CKIZYRbZ.js.map +1 -0
  20. package/dist/{diagnostics-D8ot4Ei7.d.ts → diagnostics-MoA4MBq5.d.ts} +55 -53
  21. package/dist/diagnostics-MoA4MBq5.d.ts.map +1 -0
  22. package/dist/{embedded-fonts-DarT9aoa.d.ts → embedded-fonts-U7HIIhPO.d.ts} +4 -6
  23. package/dist/embedded-fonts-U7HIIhPO.d.ts.map +1 -0
  24. package/dist/{entry-compose-DCnvBZz2.d.ts → entry-compose-CiakSt-f.d.ts} +62 -81
  25. package/dist/entry-compose-CiakSt-f.d.ts.map +1 -0
  26. package/dist/{errors-C4oENPcu.js → entry-errors-JMthgJ2g.js} +45 -29
  27. package/dist/entry-errors-JMthgJ2g.js.map +1 -0
  28. package/dist/{table-cell-margins-EVg0EwxT.js → enums-BP9wsb9Q.js} +44 -47
  29. package/dist/enums-BP9wsb9Q.js.map +1 -0
  30. package/dist/{enums-BUKTUB6V.d.ts → enums-PcXr3o3J.d.ts} +13 -14
  31. package/dist/{enums-BUKTUB6V.d.ts.map → enums-PcXr3o3J.d.ts.map} +1 -1
  32. package/dist/families.d.ts +24 -26
  33. package/dist/families.d.ts.map +1 -1
  34. package/dist/families.js +3 -4
  35. package/dist/{fit-Cb7naFj6.js → fit-Bpmzep6O.js} +64 -56
  36. package/dist/fit-Bpmzep6O.js.map +1 -0
  37. package/dist/{font-metrics-v5fn7s7e.d.ts → font-metrics-DTppw4t3.d.ts} +62 -38
  38. package/dist/font-metrics-DTppw4t3.d.ts.map +1 -0
  39. package/dist/{grid-DikTjFey.js → grid-DUIMxjfl.js} +23 -26
  40. package/dist/grid-DUIMxjfl.js.map +1 -0
  41. package/dist/{html-dom-Iuog2wdK.js → html-dom-LZCgntnJ.js} +46 -47
  42. package/dist/html-dom-LZCgntnJ.js.map +1 -0
  43. package/dist/html.d.ts +53 -9
  44. package/dist/html.d.ts.map +1 -1
  45. package/dist/html.js +12 -13
  46. package/dist/html.js.map +1 -1
  47. package/dist/index.d.ts +21 -13
  48. package/dist/index.d.ts.map +1 -1
  49. package/dist/index.js +15 -15
  50. package/dist/index.js.map +1 -1
  51. package/dist/inspect.d.ts +16 -18
  52. package/dist/inspect.d.ts.map +1 -1
  53. package/dist/inspect.js +18 -19
  54. package/dist/inspect.js.map +1 -1
  55. package/dist/{text-anchor-CrYXAfUu.js → lock-attrs-CSQnFDHP.js} +62 -12
  56. package/dist/lock-attrs-CSQnFDHP.js.map +1 -0
  57. package/dist/math.d.ts +2 -4
  58. package/dist/math.d.ts.map +1 -1
  59. package/dist/math.js +12 -13
  60. package/dist/math.js.map +1 -1
  61. package/dist/measure.d.ts +23 -12
  62. package/dist/measure.d.ts.map +1 -1
  63. package/dist/measure.js +3 -3
  64. package/dist/node.d.ts +21 -13
  65. package/dist/node.d.ts.map +1 -1
  66. package/dist/node.js +12 -12
  67. package/dist/node.js.map +1 -1
  68. package/dist/{options-internal-WqgMf720.js → options-internal-BWgmLPdx.js} +4 -5
  69. package/dist/options-internal-BWgmLPdx.js.map +1 -0
  70. package/dist/{package-J49Ck6S2.d.ts → package-CANBWuSm.d.ts} +9 -13
  71. package/dist/package-CANBWuSm.d.ts.map +1 -0
  72. package/dist/{playbtn-CUqQdoDf.js → playbtn-BQZFJir9.js} +4 -5
  73. package/dist/playbtn-BQZFJir9.js.map +1 -0
  74. package/dist/{pres-C6qgOFAa.d.ts → pres-BkEkUAEM.d.ts} +410 -237
  75. package/dist/pres-BkEkUAEM.d.ts.map +1 -0
  76. package/dist/{presentation-DGYlAWhl.js → presentation-4Ggq0_Xa.js} +470 -315
  77. package/dist/presentation-4Ggq0_Xa.js.map +1 -0
  78. package/dist/{presentation-types-8jLQHI4M.d.ts → presentation-types-BgnZR-0a.d.ts} +1119 -468
  79. package/dist/presentation-types-BgnZR-0a.d.ts.map +1 -0
  80. package/dist/read.d.ts +18 -13
  81. package/dist/read.d.ts.map +1 -1
  82. package/dist/read.js +4 -4
  83. package/dist/script.d.ts +116 -65
  84. package/dist/script.d.ts.map +1 -1
  85. package/dist/script.js +2700 -780
  86. package/dist/script.js.map +1 -1
  87. package/dist/{shapes-re0KyQk_.js → shapes-CAPOjU0Q.js} +1564 -491
  88. package/dist/shapes-CAPOjU0Q.js.map +1 -0
  89. package/dist/{slide-Dx2ZeVZ6.d.ts → slide-BmT4kMoO.d.ts} +102 -89
  90. package/dist/slide-BmT4kMoO.d.ts.map +1 -0
  91. package/dist/{slide-size-BalTjFuv.js → slide-size-SkScz1ig.js} +2 -3
  92. package/dist/{slide-size-BalTjFuv.js.map → slide-size-SkScz1ig.js.map} +1 -1
  93. package/dist/{table-dom-BTDP3lEP.js → table-dom-BYga4FYY.js} +4 -5
  94. package/dist/{table-dom-BTDP3lEP.js.map → table-dom-BYga4FYY.js.map} +1 -1
  95. package/dist/{text-sN64Otf_.js → text-CU08xJGs.js} +393 -344
  96. package/dist/text-CU08xJGs.js.map +1 -0
  97. package/dist/{transition-speed-kUEWDWTx.js → transition-speed-CNJ0fSpQ.js} +2 -3
  98. package/dist/{transition-speed-kUEWDWTx.js.map → transition-speed-CNJ0fSpQ.js.map} +1 -1
  99. package/dist/{units-internal-XJlf-hOl.js → units-internal-BR3a4cIi.js} +34 -32
  100. package/dist/units-internal-BR3a4cIi.js.map +1 -0
  101. package/dist/{zip-CKd8ihcf.js → zip-7JTh61LX.js} +8 -10
  102. package/dist/zip-7JTh61LX.js.map +1 -0
  103. package/dist/{zip-C0leZZMj.d.ts → zip-uUjs9Cqx.d.ts} +4 -6
  104. package/dist/zip-uUjs9Cqx.d.ts.map +1 -0
  105. package/dist/zip.d.ts +3 -3
  106. package/dist/zip.js +3 -3
  107. package/dist/{zoom-DPUHh85d.js → zoom-CSSeOwM8.js} +1204 -620
  108. package/dist/zoom-CSSeOwM8.js.map +1 -0
  109. package/package.json +27 -28
  110. package/skills/{ts-pptx-upstream → pptx-ts-upstream}/SKILL.md +37 -84
  111. package/dist/autopage-odPz7zZO.js.map +0 -1
  112. package/dist/binary-string-CKVAYI3M.js.map +0 -1
  113. package/dist/body-insets-Dw_BeWD_.js.map +0 -1
  114. package/dist/clip-Bl01BPcN.d.ts.map +0 -1
  115. package/dist/diagnostics-D8ot4Ei7.d.ts.map +0 -1
  116. package/dist/embedded-fonts-DarT9aoa.d.ts.map +0 -1
  117. package/dist/entry-compose-DCnvBZz2.d.ts.map +0 -1
  118. package/dist/errors-C4oENPcu.js.map +0 -1
  119. package/dist/fit-Cb7naFj6.js.map +0 -1
  120. package/dist/font-metrics-v5fn7s7e.d.ts.map +0 -1
  121. package/dist/grid-DikTjFey.js.map +0 -1
  122. package/dist/html-dom-Iuog2wdK.js.map +0 -1
  123. package/dist/image-size-CvN2iCA4.js.map +0 -1
  124. package/dist/notes-Dh12JAbn.js.map +0 -1
  125. package/dist/options-internal-WqgMf720.js.map +0 -1
  126. package/dist/package-J49Ck6S2.d.ts.map +0 -1
  127. package/dist/playbtn-CUqQdoDf.js.map +0 -1
  128. package/dist/pres-C6qgOFAa.d.ts.map +0 -1
  129. package/dist/presentation-DGYlAWhl.js.map +0 -1
  130. package/dist/presentation-types-8jLQHI4M.d.ts.map +0 -1
  131. package/dist/shapes-re0KyQk_.js.map +0 -1
  132. package/dist/slide-Dx2ZeVZ6.d.ts.map +0 -1
  133. package/dist/table-cell-margins-EVg0EwxT.js.map +0 -1
  134. package/dist/text-anchor-CrYXAfUu.js.map +0 -1
  135. package/dist/text-sN64Otf_.js.map +0 -1
  136. package/dist/units-internal-XJlf-hOl.js.map +0 -1
  137. package/dist/zip-C0leZZMj.d.ts.map +0 -1
  138. package/dist/zip-CKd8ihcf.js.map +0 -1
  139. package/dist/zoom-DPUHh85d.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entry-errors-JMthgJ2g.js","names":[],"sources":["../src/diagnostics.ts","../src/errors.ts","../src/entry-errors.ts"],"sourcesContent":["/**\n * Central sink for library diagnostics.\n *\n * Every user-facing warning is routed through {@link warn} / {@link warnOnce} rather than calling\n * `console.warn` directly, so there is one place to apply a consistent prefix and one place a\n * consumer can take over (see {@link setDiagnosticHandler}). This module has no *runtime* imports\n * so it can be used from anywhere without risking an import cycle; `codes.ts` is types only and is\n * erased at compile time, so it does not cost that property.\n *\n * **A diagnostic's `code` is API; its `message` is not.** The code is a stable identifier a\n * consumer may branch on (`if (d.code === 'chart/non-finite-value')`); the wording behind it is\n * free to improve in any release. The vocabulary lives in `codes.ts` and is shared with the thrown\n * surface (`errors.ts`), so a condition that can both warn and throw reads the same either way.\n */\n\nimport type { DiagnosticCode } from './codes.js'\n\nexport type { DiagnosticCode }\n\n/** One diagnostic emitted by the library. */\nexport interface Diagnostic {\n\t/** Stable condition identifier; see {@link DiagnosticCode}. Branch on this, not on the text. */\n\treadonly code: DiagnosticCode\n\t/** Human-readable explanation. Free to change in any release; do not parse it. */\n\treadonly message: string\n\t/**\n\t * Structured context for the condition, when a site has any to give.\n\t *\n\t * Every rejection of an `ST_` enum value populates it: `checkEnumOrWarn` (`ooxml/check-enum.ts`)\n\t * carries `received` (the value the caller passed) and `valid`, the whole legal list, plus\n\t * whatever the call site adds. That reaches a handler for a line dash type, a table cell's 3-D\n\t * preset and a table's horizontal overflow, among others. Nothing else populates it yet, so a\n\t * handler must still treat the field as optional and must not assume a particular key is there\n\t * for a given code.\n\t */\n\treadonly detail?: Readonly<Record<string, unknown>>\n}\n\n/** Receives every {@link Diagnostic} the library emits. See {@link setDiagnosticHandler}. */\nexport type DiagnosticHandler = (diagnostic: Diagnostic) => void\n\n/** Prefix stamped on every warning so consumers can attribute console noise to this library. */\nconst WARN_PREFIX = 'pptx-ts'\n\n/** The default handler: one `console.warn` line per diagnostic, prefixed. */\nconst consoleHandler: DiagnosticHandler = (diagnostic) => {\n\tconsole.warn(`${WARN_PREFIX}: ${diagnostic.message}`)\n}\n\nlet handler: DiagnosticHandler = consoleHandler\n\n/**\n * Route every library diagnostic to `handler`, or pass `null` to restore the default\n * (one prefixed `console.warn` per diagnostic).\n *\n * This is process-global rather than per-presentation, deliberately: the emitting code is a tree\n * of free functions in `gen/**` with no presentation in scope, and threading a handler through\n * every signature would be a far larger and worse change than the problem warrants. The practical\n * consequence is that a process building several decks concurrently cannot attribute a diagnostic\n * to one of them. If that matters, correlate on `code`, or build the decks one at a time with the\n * handler set around each build: a handler set around concurrent builds sees all of their\n * diagnostics.\n *\n * A throwing handler propagates out of whatever library call emitted the diagnostic, which is the\n * supported way to make a specific condition fatal:\n *\n * ```ts\n * setDiagnosticHandler((d) => {\n * if (d.code === 'coord/bare-number-is-inches') throw new Error(d.message)\n * })\n * ```\n * @param next - the receiver, or `null` to restore the console default\n */\nexport function setDiagnosticHandler(next: DiagnosticHandler | null): void {\n\thandler = next ?? consoleHandler\n}\n\n/**\n * Emit a library diagnostic.\n * @param code - the stable condition identifier ({@link DiagnosticCode})\n * @param message - explanation, without a `pptx-ts:` prefix (the default handler adds one)\n * @param detail - optional structured context\n */\nexport function warn(code: DiagnosticCode, message: string, detail?: Readonly<Record<string, unknown>>): void {\n\thandler(detail === undefined ? { code, message } : { code, message, detail })\n}\n\n// Track diagnostics already emitted so a recurring condition (e.g. the same out-of-range fontSize\n// on every cell of a table) is reported once instead of flooding the handler. Keyed on code AND\n// message, so a *different* offending value under the same code still reports.\nconst seen = new Set<string>()\n\n/**\n * Emit a library diagnostic at most once per distinct code+message.\n *\n * \"Once\" is **process-global**, the same scope {@link setDiagnosticHandler} has and for the\n * same reason: the emitting code is a tree of free functions in `gen/**` with no presentation\n * in scope. The consequence is different, though, and worth stating on its own: a process that\n * builds several decks does not get a second report of a condition an earlier deck already\n * tripped, so the second deck's diagnostics are incomplete rather than merely unattributed.\n * {@link resetDiagnosticState} is how a host that cares gets each build a clean slate.\n *\n * @param code - the stable condition identifier ({@link DiagnosticCode})\n * @param message - explanation (see {@link warn})\n * @param detail - optional structured context\n */\nexport function warnOnce(code: DiagnosticCode, message: string, detail?: Readonly<Record<string, unknown>>): void {\n\tconst key = `${code}\\0${message}`\n\tif (seen.has(key)) return\n\tseen.add(key)\n\twarn(code, message, detail)\n}\n\n/**\n * Clear the `warnOnce` dedupe set, so a condition already reported reports again. (`warnOnce` is\n * internal and carries no page of its own, so it is named rather than linked.)\n *\n * Call it between builds in a host that builds more than one deck per process and wants each\n * build's diagnostics complete. Without it, deck two is silent about anything deck one already\n * warned for, which reads as \"no problems found\" rather than as \"already mentioned\".\n *\n * It also bounds the set. Most `warnOnce` messages interpolate the offending value, so a server\n * building decks from user input accumulates one entry per distinct bad value with no way to\n * release them.\n *\n * This does not touch the handler. {@link setDiagnosticHandler} owns that, and the two are\n * reset independently on purpose: a host usually installs its handler once and wants it to\n * survive.\n */\nexport function resetDiagnosticState(): void {\n\tseen.clear()\n}\n","/**\n * The library's error taxonomy.\n *\n * Every failure pptx-ts raises is a {@link PptxTsError} carrying a stable {@link ErrorCode}, so a\n * consumer can tell *\"you passed a bad coordinate\"* from *\"this font file is corrupt\"* from\n * *\"these bytes are not a package\"* without matching on message substrings. The classes are a\n * deliberately flat, coarse bucket (five of them), and the code carries the specificity. Do not\n * add a class per throw site; add a code.\n *\n * **The class and the code are API. The message is not.** Branch on `instanceof` and on `code`;\n * the wording behind them is free to improve in any release. Every error remains an\n * `instanceof Error`, so existing `catch` blocks keep working.\n *\n * Which class to reach for:\n *\n * | class | the failure is | who fixes it |\n * |---|---|---|\n * | {@link InvalidOptionError} | the caller passed something unusable | the caller's code |\n * | {@link UnsupportedFeatureError} | a well-formed request this build/runtime/shape cannot express | the caller's expectations, or the environment |\n * | {@link PackageReadError} | the input bytes are not a readable package | the input file |\n * | {@link MediaError} | a referenced image/font/AV resource would not load or decode | the resource |\n * | {@link InternalError} | an invariant of the library itself did not hold | pptx-ts (file a bug) |\n *\n * **Which of these is worth reporting upstream.** `InternalError` always is, and says so at\n * runtime. The middle three are worth reporting when the environment disagrees with us:\n * a `PackageReadError` on a file that opens cleanly in PowerPoint, a `MediaError` on an asset every\n * other tool loads, an `UnsupportedFeatureError` for something PowerPoint can plainly express.\n * `InvalidOptionError` is worth reporting only if the deck it refused is one PowerPoint can\n * express. See `skills/pptx-ts-upstream` for how to file one.\n *\n * @see `docs/errors-and-warnings.md` for the consumer-facing contract.\n * @see `codes.ts` for the code vocabulary, which is shared with the diagnostic (warning) surface.\n */\n\nimport type {\n\tErrorCode,\n\tInternalErrorCode,\n\tInvalidOptionErrorCode,\n\tMediaErrorCode,\n\tPackageReadErrorCode,\n\tUnsupportedFeatureErrorCode,\n} from './codes.js'\n\n/** Extra context accepted by every {@link PptxTsError} constructor. */\nexport interface PptxTsErrorOptions extends ErrorOptions {\n\t/**\n\t * Structured context for the condition, when a site has any to give. Mirrors `Diagnostic.detail`\n\t * so the same condition looks the same whether it was warned or thrown.\n\t */\n\treadonly detail?: Readonly<Record<string, unknown>>\n}\n\n/**\n * Base class for every error pptx-ts throws.\n *\n * Catch this to catch anything from the library; narrow with `instanceof` on a subclass, or branch\n * on {@link PptxTsError.code}, to react to something specific. It is never thrown directly: every\n * site picks one of the five subclasses.\n */\nexport class PptxTsError extends Error {\n\t/** Stable condition identifier (see {@link ErrorCode}). Branch on this, not on the text. */\n\treadonly code: ErrorCode\n\n\t/** Structured context for the condition, when the throwing site had any to give. */\n\treadonly detail?: Readonly<Record<string, unknown>>\n\n\t/**\n\t * @param code - the stable condition identifier\n\t * @param message - explanation for a human reading a stack trace; not part of the contract\n\t * @param options - standard `cause`, plus optional structured `detail`\n\t */\n\tconstructor(code: ErrorCode, message: string, options?: PptxTsErrorOptions) {\n\t\tsuper(message, options)\n\t\t// `name` drives how a stack trace and `console.log` label the error, and the default from\n\t\t// `Error` would say \"Error\" for every subclass. Derive it from the constructor so a subclass\n\t\t// never has to remember to set it.\n\t\tthis.name = new.target.name\n\t\tthis.code = code\n\t\tif (options?.detail !== undefined) this.detail = options.detail\n\t}\n}\n\n/**\n * The caller passed something the library cannot use: a non-finite coordinate, an unknown enum\n * value, a required option left out, a value outside its legal range.\n *\n * This is the error behind the project's throw-rather-than-coerce policy: emitting a degenerate\n * result (a zero-size shape, a silently dropped option) hides the mistake, so the library refuses\n * instead. Reaching one means the calling code needs to change.\n */\nexport class InvalidOptionError extends PptxTsError {\n\tdeclare readonly code: InvalidOptionErrorCode\n\tconstructor(code: InvalidOptionErrorCode, message: string, options?: PptxTsErrorOptions) {\n\t\tsuper(code, message, options)\n\t}\n}\n\n/**\n * The request is well-formed but cannot be expressed here: an optional peer dependency is not\n * installed, the runtime lacks a capability, or the shape/feature has no OOXML representation the\n * library emits.\n *\n * Distinct from {@link InvalidOptionError} because the caller did nothing wrong (the answer is\n * \"not here\", not \"not like that\"), and the fix is usually to install something or pick a different\n * approach rather than to correct a value.\n */\nexport class UnsupportedFeatureError extends PptxTsError {\n\tdeclare readonly code: UnsupportedFeatureErrorCode\n\tconstructor(code: UnsupportedFeatureErrorCode, message: string, options?: PptxTsErrorOptions) {\n\t\tsuper(code, message, options)\n\t}\n}\n\n/**\n * The bytes handed to the library are not a package it can read, or a part inside one is\n * structurally malformed: a missing `[Content_Types].xml`, a relationship pointing at nothing, a\n * slide part with no root element.\n *\n * Always about *input*. A problem with something the library is being asked to produce is an\n * {@link InvalidOptionError}.\n */\nexport class PackageReadError extends PptxTsError {\n\tdeclare readonly code: PackageReadErrorCode\n\tconstructor(code: PackageReadErrorCode, message: string, options?: PptxTsErrorOptions) {\n\t\tsuper(code, message, options)\n\t}\n}\n\n/**\n * A referenced image, font, or audio/video resource could not be fetched, read, or decoded.\n *\n * Kept apart from {@link PackageReadError} because the failure is in a resource the deck *points\n * at*, not in the package structure (a broken URL, an unreadable path, a corrupt font file), and\n * a consumer typically retries or substitutes rather than rejecting the deck.\n */\nexport class MediaError extends PptxTsError {\n\tdeclare readonly code: MediaErrorCode\n\tconstructor(code: MediaErrorCode, message: string, options?: PptxTsErrorOptions) {\n\t\tsuper(code, message, options)\n\t}\n}\n\n/**\n * Where a report of an `InternalError` should go. Appended to the message rather than left to the\n * docs, because a stack trace is the only artefact of the failure that reaches whoever (or\n * whatever) is debugging it. A pointer anywhere else is a pointer they have to already be looking\n * for. Most code that calls this library is written by an agent in a repository that is not this\n * one, and an agent that hits a library defect routes around it silently unless something in front\n * of it says the report is worth making.\n */\nconst REPORT_NOTICE =\n\t'This is a bug in pptx-ts, not in your deck or your code. Please report it:\\n' +\n\t'https://github.com/shbernal/pptx-ts/issues/new?template=bug.yml'\n\n/**\n * An invariant the library maintains itself did not hold.\n *\n * No consumer input should be able to produce one, which is the whole reason it is a separate\n * class: seeing it means the bug is in pptx-ts, and the useful response is to file it rather than\n * to keep adjusting the input.\n *\n * It is the one class in the taxonomy that extends its own message, appending `REPORT_NOTICE`\n * below the invariant that broke. The constructor is where that lives so a throw site added later\n * inherits it. The alternative, a notice pasted at each of the sites, is one every future site can\n * forget. Every other class leaves `message` exactly as given: a malformed package is the routine\n * outcome for a library that reads untrusted files, and a \"report this\" banner on each corrupt\n * input would train callers to ignore the one banner that always means something.\n *\n * This does not make the message API (see the class doc on {@link PptxTsError}). Branch on\n * `instanceof` or on {@link InternalError.code}, never on the text.\n */\nexport class InternalError extends PptxTsError {\n\tdeclare readonly code: InternalErrorCode\n\tconstructor(code: InternalErrorCode, message: string, options?: PptxTsErrorOptions) {\n\t\tsuper(code, `${message}\\n\\n${REPORT_NOTICE}`, options)\n\t}\n}\n","/**\n * pptx-ts: the error taxonomy, as every entry point republishes it\n *\n * Every failure the library throws. The classes and their `code` are API; the message is not.\n *\n * Each published subpath (`.`, `./read`, `./html`, `./zip`, …) re-exports this module so\n * `instanceof` works whichever one a consumer imports. That property depends on all of them\n * resolving to a single `errors.js`. They do, because there is one module here and\n * every entry names it. This file exists so that stays structurally true: the list used to be\n * pasted into all ten entries, identical down to the comment, and nothing would have caught\n * one of them drifting.\n *\n * Entries re-export it wholesale (`export * from './entry-errors.js'`) rather than naming the\n * members again, so adding an error class publishes it everywhere in one edit.\n */\n\nimport { PptxTsError, type PptxTsErrorOptions } from './errors.js'\nimport type { PptxTsCode } from './codes.js'\n\nexport {\n\tPptxTsError,\n\tInvalidOptionError,\n\tUnsupportedFeatureError,\n\tPackageReadError,\n\tMediaError,\n\tInternalError,\n\ttype PptxTsErrorOptions,\n} from './errors.js'\nexport type {\n\tErrorCode,\n\tPptxTsCode,\n\tInvalidOptionErrorCode,\n\tUnsupportedFeatureErrorCode,\n\tPackageReadErrorCode,\n\tMediaErrorCode,\n\tInternalErrorCode,\n} from './codes.js'\n\n/** @deprecated Renamed to {@link PptxTsError}. This alias is removed in v5. */\nexport const TsPptxError = PptxTsError\n/** @deprecated Renamed to {@link PptxTsError}. This alias is removed in v5. */\nexport type TsPptxError = PptxTsError\n/** @deprecated Renamed to {@link PptxTsErrorOptions}. This alias is removed in v5. */\nexport type TsPptxErrorOptions = PptxTsErrorOptions\n/** @deprecated Renamed to {@link PptxTsCode}. This alias is removed in v5. */\nexport type TsPptxCode = PptxTsCode\n"],"mappings":";;AA0CA,MAAM,cAAc;;AAGpB,MAAM,kBAAqC,eAAe;CACzD,QAAQ,KAAK,GAAG,YAAY,IAAI,WAAW,SAAS;AACrD;AAEA,IAAI,UAA6B;;;;;;;;;;;;;;;;;;;;;;;AAwBjC,SAAgB,qBAAqB,MAAsC;CAC1E,UAAU,QAAQ;AACnB;;;;;;;AAQA,SAAgB,KAAK,MAAsB,SAAiB,QAAkD;CAC7G,QAAQ,WAAW,KAAA,IAAY;EAAE;EAAM;CAAQ,IAAI;EAAE;EAAM;EAAS;CAAO,CAAC;AAC7E;AAKA,MAAM,uBAAO,IAAI,IAAY;;;;;;;;;;;;;;;AAgB7B,SAAgB,SAAS,MAAsB,SAAiB,QAAkD;CACjH,MAAM,MAAM,GAAG,KAAK,IAAI;CACxB,IAAI,KAAK,IAAI,GAAG,GAAG;CACnB,KAAK,IAAI,GAAG;CACZ,KAAK,MAAM,SAAS,MAAM;AAC3B;;;;;;;;;;;;;;;;;AAkBA,SAAgB,uBAA6B;CAC5C,KAAK,MAAM;AACZ;;;;;;;;;ACxEA,IAAa,cAAb,cAAiC,MAAM;;CAEtC;;CAGA;;;;;;CAOA,YAAY,MAAiB,SAAiB,SAA8B;EAC3E,MAAM,SAAS,OAAO;EAItB,KAAK,OAAO,WAAW;EACvB,KAAK,OAAO;EACZ,IAAI,SAAS,WAAW,KAAA,GAAW,KAAK,SAAS,QAAQ;CAC1D;AACD;;;;;;;;;AAUA,IAAa,qBAAb,cAAwC,YAAY;CAEnD,YAAY,MAA8B,SAAiB,SAA8B;EACxF,MAAM,MAAM,SAAS,OAAO;CAC7B;AACD;;;;;;;;;;AAWA,IAAa,0BAAb,cAA6C,YAAY;CAExD,YAAY,MAAmC,SAAiB,SAA8B;EAC7F,MAAM,MAAM,SAAS,OAAO;CAC7B;AACD;;;;;;;;;AAUA,IAAa,mBAAb,cAAsC,YAAY;CAEjD,YAAY,MAA4B,SAAiB,SAA8B;EACtF,MAAM,MAAM,SAAS,OAAO;CAC7B;AACD;;;;;;;;AASA,IAAa,aAAb,cAAgC,YAAY;CAE3C,YAAY,MAAsB,SAAiB,SAA8B;EAChF,MAAM,MAAM,SAAS,OAAO;CAC7B;AACD;;;;;;;;;AAUA,MAAM,gBACL;;;;;;;;;;;;;;;;;;AAoBD,IAAa,gBAAb,cAAmC,YAAY;CAE9C,YAAY,MAAyB,SAAiB,SAA8B;EACnF,MAAM,MAAM,GAAG,QAAQ,MAAM,iBAAiB,OAAO;CACtD;AACD;;;;;;;;;;;;;;;;;;ACzIA,MAAa,cAAc"}
@@ -1,5 +1,5 @@
1
- import { l as warn, n as InvalidOptionError } from "./errors-C4oENPcu.js";
2
- //#region src/ooxml/emu.ts
1
+ import { r as InvalidOptionError, u as warn } from "./entry-errors-JMthgJ2g.js";
2
+ // src/ooxml/emu.ts
3
3
  /**
4
4
  * The fixed ratios between English Metric Units, points and inches.
5
5
  *
@@ -14,8 +14,7 @@ const EMU_PER_INCH = 914400;
14
14
  const EMU_PER_POINT = 12700;
15
15
  /** Points in one inch. */
16
16
  const POINTS_PER_INCH = 72;
17
- //#endregion
18
- //#region src/units.ts
17
+ // src/units.ts
19
18
  /**
20
19
  * DrawingML angle unit. `ST_Angle` (`rot`, shadow `dir`, gradient `ang`, …) is measured in
21
20
  * sixtieths-of-a-thousandth of a degree, i.e. 60000 units per degree. Multiply a value in
@@ -49,12 +48,12 @@ function ptToHundredths(pt) {
49
48
  assertFiniteNumber(pt, "points");
50
49
  return Math.round(pt * 100);
51
50
  }
52
- /** A bare number larger than this (in inches) is almost certainly a mistake — likely a raw EMU
51
+ /** A bare number larger than this (in inches) is almost certainly a mistake, likely a raw EMU
53
52
  * value passed where inches are expected. We interpret it as inches (the documented contract) but
54
53
  * warn, pointing at the explicit `"<n>emu"` form. ~1000in is far beyond any real slide. */
55
54
  const IMPLAUSIBLE_INCHES = 1e3;
56
55
  /** Default pixel density for the `"<n>px"` coordinate unit: CSS reference pixels, also the
57
- * density ts-pptx assumes when reading an image header's pixel dimensions. */
56
+ * density pptx-ts assumes when reading an image header's pixel dimensions. */
58
57
  const DEFAULT_PX_PER_INCH = 96;
59
58
  /**
60
59
  * The largest DrawingML coordinate, in EMU: the `maxInclusive` of `ST_Coordinate`, the type of
@@ -83,7 +82,7 @@ function pixelsToEmu(pixels, dpi) {
83
82
  * only `parseCoord` needs it, because every `'50%'` a caller writes comes through there; it is
84
83
  * exported because a consumer computing its own geometry against a slide axis needs the same
85
84
  * arithmetic, and it belongs with the rest of the conversion set beside it rather than hidden
86
- * behind the one caller. Left exported deliberately rather than by oversight — this note is the
85
+ * behind the one caller. Left exported deliberately rather than by oversight. This note is the
87
86
  * difference between the two, as it is on {@link emuToPixels}.
88
87
  * @param percent - percentage value (e.g. `50` for 50%)
89
88
  * @param axisEmu - the axis length in EMU (slide width for x/w, height for y/h)
@@ -134,15 +133,15 @@ function emuToInches(emu) {
134
133
  * EMU → points, the unit the write API states line widths, font sizes and text insets in.
135
134
  *
136
135
  * The one conversion, for the library as well as for a consumer: three private forms of
137
- * `emu / EMU_PER_POINT` had grown around it — the read model's `null`-propagating `ptFromEmu`,
138
- * the script mapper's `points`, and a dozen inline divisions — while this stayed published and
136
+ * `emu / EMU_PER_POINT` had grown around it (the read model's `null`-propagating `ptFromEmu`,
137
+ * the script mapper's `points`, and a dozen inline divisions) while this stayed published and
139
138
  * uncalled.
140
139
  *
141
140
  * **The policy, and its one exception.** Every EMU→points conversion goes through here or through
142
141
  * `ptFromEmu` in `src/read/api/coords.ts`, which is this with a `null` passed along. (Named rather
143
142
  * than linked: it is internal, so a reference link to it resolves to nothing in the published
144
143
  * reference.) The exception is
145
- * `measure/*` — `fit.ts`, `paragraphs.ts`, `table-fit.ts` — where an inner box is computed as
144
+ * `measure/*` (`fit.ts`, `paragraphs.ts`, `table-fit.ts`), where an inner box is computed as
146
145
  * `(extent - inset - inset) / EMU_PER_POINT` and then guarded with `!(x > 0)`. That guard is
147
146
  * written NaN-first on purpose: a box that cannot be measured is skipped, not reported. This
148
147
  * function asserts a finite input and throws instead, which is the right answer for a caller
@@ -159,7 +158,7 @@ function emuToPoints(emu) {
159
158
  * **Published for consumers, and used nowhere in `src/` on purpose.** Nothing inside the
160
159
  * library thinks in pixels: it is the unit a caller placing library output on a canvas or in a
161
160
  * `<img>` needs, and the DPI is theirs to choose. Left exported deliberately rather than by
162
- * oversight — this note is the difference between the two.
161
+ * oversight. This note is the difference between the two.
163
162
  */
164
163
  function emuToPixels(emu, dpi) {
165
164
  assertFiniteNumber(emu, "emu");
@@ -203,8 +202,26 @@ function assertPositiveFiniteNumber(value, name) {
203
202
  assertFiniteNumber(value, name);
204
203
  if (value <= 0) throw new InvalidOptionError("coord/not-positive", `${name} must be greater than 0`);
205
204
  }
206
- //#endregion
207
- //#region src/enums.ts
205
+ // src/ooxml/table-cell-margins.ts
206
+ /**
207
+ * A table cell's default text insets in EMU: the schema defaults of `a:tcPr/@marL`, `@marR`
208
+ * (91440, 0.1in) and `@marT`, `@marB` (45720, 0.05in) on `CT_TableCellProperties`.
209
+ *
210
+ * Unlike the body insets in `body-insets.ts` these are real XSD defaults, so they are transcribed
211
+ * from the schema rather than derived. A cell that states one side leaves the other three at these
212
+ * values, not at zero.
213
+ *
214
+ * A module of its own, importing nothing, because `constants-internal.ts` derives the write path's
215
+ * inch defaults from it and is reached by every entry. Taken from `body-insets.ts`, the record
216
+ * brought that module's other exports into the read entry with it.
217
+ */
218
+ const TABLE_CELL_MARGIN_DEFAULTS_EMU = {
219
+ left: 91440,
220
+ right: 91440,
221
+ top: 45720,
222
+ bottom: 45720
223
+ };
224
+ // src/enums.ts
208
225
  let TextAnchor = /* @__PURE__ */ function(TextAnchor) {
209
226
  TextAnchor["b"] = "b";
210
227
  TextAnchor["ctr"] = "ctr";
@@ -448,8 +465,8 @@ let AlignH = /* @__PURE__ */ function(AlignH) {
448
465
  /**
449
466
  * @deprecated The enum form of `VAlign`, which no option actually takes. Use the `VAlign`
450
467
  * string union (`'top' | 'middle' | 'bottom'`) or, for a text body's own anchoring,
451
- * {@link TextAnchor}. Unlike its sibling {@link AlignH} — which `TextPropsOptions.align`
452
- * really is typed as — nothing in the library reads this, so it is a third spelling of a
468
+ * {@link TextAnchor}. Unlike its sibling {@link AlignH} (which `TextPropsOptions.align`
469
+ * really is typed as), nothing in the library reads this, so it is a third spelling of a
453
470
  * two-spelling fact. It will be removed in the next major.
454
471
  */
455
472
  let AlignV = /* @__PURE__ */ function(AlignV) {
@@ -475,8 +492,8 @@ const EXTRA_SHAPE_PRESETS = [
475
492
  "curvedConnector5"
476
493
  ];
477
494
  /**
478
- * Every shape geometry name ts-pptx can serialize without corrupting the
479
- * package: the OOXML preset geometries (`ST_ShapeType` — `ShapeType` values
495
+ * Every shape geometry name pptx-ts can serialize without corrupting the
496
+ * package: the OOXML preset geometries (`ST_ShapeType`: `ShapeType` values
480
497
  * plus the unexposed connectors above) and `custGeom` (freeform paths, emitted
481
498
  * as `<a:custGeom>` rather than `<a:prstGeom>`). Used to reject bogus presets
482
499
  * before they become an invalid `<a:prstGeom prst="...">` that triggers
@@ -486,7 +503,7 @@ const VALID_SHAPE_PRESETS = /* @__PURE__ */ new Set([...Object.values(ShapeType)
486
503
  /**
487
504
  * Narrow a public `CHART_NAME` to the internal `ChartType` enum. Because
488
505
  * `CHART_NAME` is derived from `ChartType`, every `CHART_NAME` value is by
489
- * construction a valid enum value, so this conversion is total and safe — it is
506
+ * construction a valid enum value, so this conversion is total and safe. It is
490
507
  * the single boundary cast that lets internal code compare against the enum
491
508
  * (enum-to-enum) instead of enum-to-string.
492
509
  */
@@ -499,7 +516,7 @@ const CHART_TYPES = new Set(Object.values(ChartType));
499
516
  * Is `name` a chart type this library emits?
500
517
  *
501
518
  * `CHART_NAME` constrains TypeScript callers, but `addChart` is reachable from plain JavaScript
502
- * where nothing enforces the union — and the two emitters partition the catalog between them by
519
+ * where nothing enforces the union, and the two emitters partition the catalog between them by
503
520
  * `switch`, so an off-catalog string has no arm in either and cannot produce a plot. Checked once
504
521
  * at define time (`gen/define/chart.ts`) so the caller hears about it at the call that was wrong,
505
522
  * rather than getting a chart-shaped hole in the deck.
@@ -526,8 +543,8 @@ const CHARTEX_TYPES = /* @__PURE__ */ new Set([
526
543
  "regionMap"
527
544
  ]);
528
545
  /**
529
- * Is `type` a chartEx (cx:) chart? Accepts a `ChartType`/`CHART_NAME` string; anything else —
530
- * including a combo-chart `ChartMulti[]` array or `undefined` — is not a chartEx type (combos are
546
+ * Is `type` a chartEx (cx:) chart? Accepts a `ChartType`/`CHART_NAME` string; anything else
547
+ * (including a combo-chart `ChartMulti[]` array or `undefined`) is not a chartEx type (combos are
531
548
  * classic-only), so those return `false`.
532
549
  */
533
550
  function isChartExType(type) {
@@ -554,7 +571,7 @@ let SlideObjectType = /* @__PURE__ */ function(SlideObjectType) {
554
571
  /**
555
572
  * Maps a friendly `ConnectorType` to its OOXML connector preset *family*. `straight`
556
573
  * has a single fixed preset; `elbow` and `curved` select a member by bend count
557
- * (`bentConnector{3,4,5}` / `curvedConnector{3,4,5}`) — see `connectorPresetFor`.
574
+ * (`bentConnector{3,4,5}` / `curvedConnector{3,4,5}`); see `connectorPresetFor`.
558
575
  *
559
576
  * Not exported: `connectorPresetFor`, eleven lines below, is its only reader, and
560
577
  * `docs/contributing/architecture.md` puts internal OOXML generators off the published surface unless
@@ -603,8 +620,9 @@ let BulletType = /* @__PURE__ */ function(BulletType) {
603
620
  * Built-in PowerPoint table style IDs.
604
621
  *
605
622
  * Each value is the GUID that goes into `<a:tableStyleId>` inside `<a:tblPr>`.
606
- * These 74 GUIDs are the complete set defined in [MS-OE376] §5.1.6.10 and are
607
- * resolved by PowerPoint without embedding any style definition in the file.
623
+ * These 74 GUIDs are the complete set defined in [MS-OE376] §5.1.6.10. PowerPoint
624
+ * resolves them from its own gallery; the deck also carries the definition of each one
625
+ * its tables use in `ppt/tableStyles.xml`, as PowerPoint writes it, for other readers.
608
626
  *
609
627
  * Only these enum members are supported. Raw GUID strings are not accepted;
610
628
  * use `TableStyle` members exclusively.
@@ -689,27 +707,6 @@ let TableStyle = /* @__PURE__ */ function(TableStyle) {
689
707
  TableStyle["DARK_STYLE_2_ACCENT_5_ACCENT_6"] = "{46F890A9-2807-4EBB-B81D-B2AA78EC7F39}";
690
708
  return TableStyle;
691
709
  }({});
692
- //#endregion
693
- //#region src/ooxml/table-cell-margins.ts
694
- /**
695
- * A table cell's default text insets in EMU: the schema defaults of `a:tcPr/@marL`, `@marR`
696
- * (91440, 0.1in) and `@marT`, `@marB` (45720, 0.05in) on `CT_TableCellProperties`.
697
- *
698
- * Unlike the body insets in `body-insets.ts` these are real XSD defaults, so they are transcribed
699
- * from the schema rather than derived. A cell that states one side leaves the other three at these
700
- * values, not at zero.
701
- *
702
- * A module of its own, importing nothing, because `constants-internal.ts` derives the write path's
703
- * inch defaults from it and is reached by every entry. Taken from `body-insets.ts`, the record
704
- * brought that module's other exports into the read entry with it.
705
- */
706
- const TABLE_CELL_MARGIN_DEFAULTS_EMU = {
707
- left: 91440,
708
- right: 91440,
709
- top: 45720,
710
- bottom: 45720
711
- };
712
- //#endregion
713
- export { inchesToEmu as A, MIN_COORDINATE_EMU as C, emuToInches as D, coordToEmu as E, EMU_PER_INCH as F, EMU_PER_POINT as I, POINTS_PER_INCH as L, pixelsToEmu as M, pointsToEmu as N, emuToPixels as O, ptToHundredths as P, MAX_COORDINATE_EMU as S, STANDARD_LAYOUTS as T, isChartType as _, ChartType as a, FIXED_PCT_PER_PERCENT as b, SchemeColor as c, TableStyle as d, TextAnchor as f, isChartExType as g, connectorPresetFor as h, BulletType as i, percentToEmu as j, emuToPoints as k, ShapeType as l, asChartType as m, AlignH as n, OutputType as o, VALID_SHAPE_PRESETS as p, AlignV as r, PlaceholderType as s, TABLE_CELL_MARGIN_DEFAULTS_EMU as t, SlideObjectType as u, ANGLE_UNITS_PER_DEGREE as v, PERCENT_SCALE as w, HUNDREDTHS_PER_POINT as x, DEFAULT_PX_PER_INCH as y };
710
+ export { inchesToEmu as A, MIN_COORDINATE_EMU as C, emuToInches as D, coordToEmu as E, EMU_PER_INCH as F, EMU_PER_POINT as I, POINTS_PER_INCH as L, pixelsToEmu as M, pointsToEmu as N, emuToPixels as O, ptToHundredths as P, MAX_COORDINATE_EMU as S, STANDARD_LAYOUTS as T, TABLE_CELL_MARGIN_DEFAULTS_EMU as _, OutputType as a, FIXED_PCT_PER_PERCENT as b, ShapeType as c, TextAnchor as d, VALID_SHAPE_PRESETS as f, isChartType as g, isChartExType as h, ChartType as i, percentToEmu as j, emuToPoints as k, SlideObjectType as l, connectorPresetFor as m, AlignV as n, PlaceholderType as o, asChartType as p, BulletType as r, SchemeColor as s, AlignH as t, TableStyle as u, ANGLE_UNITS_PER_DEGREE as v, PERCENT_SCALE as w, HUNDREDTHS_PER_POINT as x, DEFAULT_PX_PER_INCH as y };
714
711
 
715
- //# sourceMappingURL=table-cell-margins-EVg0EwxT.js.map
712
+ //# sourceMappingURL=enums-BP9wsb9Q.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enums-BP9wsb9Q.js","names":[],"sources":["../src/ooxml/emu.ts","../src/units.ts","../src/ooxml/table-cell-margins.ts","../src/enums.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 pptx-ts 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/** pptx-ts 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 pptx-ts'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 * 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","/**\n * pptx-ts 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 pptx-ts 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 = '&#x2022;',\n\tCHECK = '&#x2713;',\n\tSTAR = '&#x2605;',\n\tTRIANGLE = '&#x25B6;',\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. PowerPoint\n * resolves them from its own gallery; the deck also carries the definition of each one\n * its tables use in `ppt/tableStyles.xml`, as PowerPoint writes it, for other readers.\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"],"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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AA;CAGA,WAAA,mBAAA;CACA,WAAA,4BAAA;CACA,WAAA,4BAAA;CACA,WAAA,4BAAA;CACA,WAAA,4BAAA;CACA,WAAA,4BAAA;CACA,WAAA,4BAAA;CAGA,WAAA,mBAAA;CACA,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"}
@@ -1,6 +1,5 @@
1
- //#region src/enums.d.ts
2
1
  /**
3
- * ts-pptx Enums
2
+ * pptx-ts Enums
4
3
  * NOTE: `enum` wont work for objects, so use `Object.freeze`
5
4
  */
6
5
  /**
@@ -258,8 +257,8 @@ declare enum AlignH {
258
257
  /**
259
258
  * @deprecated The enum form of `VAlign`, which no option actually takes. Use the `VAlign`
260
259
  * string union (`'top' | 'middle' | 'bottom'`) or, for a text body's own anchoring,
261
- * {@link TextAnchor}. Unlike its sibling {@link AlignH} — which `TextPropsOptions.align`
262
- * really is typed as — nothing in the library reads this, so it is a third spelling of a
260
+ * {@link TextAnchor}. Unlike its sibling {@link AlignH} (which `TextPropsOptions.align`
261
+ * really is typed as), nothing in the library reads this, so it is a third spelling of a
263
262
  * two-spelling fact. It will be removed in the next major.
264
263
  */
265
264
  declare enum AlignV {
@@ -295,8 +294,8 @@ declare const EXTRA_SHAPE_PRESETS: readonly ['straightConnector1', 'bentConnecto
295
294
  */
296
295
  type CONNECTOR_PRESET_NAME = (typeof EXTRA_SHAPE_PRESETS)[number];
297
296
  /**
298
- * Every shape geometry name ts-pptx can serialize without corrupting the
299
- * package: the OOXML preset geometries (`ST_ShapeType` — `ShapeType` values
297
+ * Every shape geometry name pptx-ts can serialize without corrupting the
298
+ * package: the OOXML preset geometries (`ST_ShapeType`: `ShapeType` values
300
299
  * plus the unexposed connectors above) and `custGeom` (freeform paths, emitted
301
300
  * as `<a:custGeom>` rather than `<a:prstGeom>`). Used to reject bogus presets
302
301
  * before they become an invalid `<a:prstGeom prst="...">` that triggers
@@ -306,7 +305,7 @@ declare const VALID_SHAPE_PRESETS: ReadonlySet<string>;
306
305
  /**
307
306
  * Narrow a public `CHART_NAME` to the internal `ChartType` enum. Because
308
307
  * `CHART_NAME` is derived from `ChartType`, every `CHART_NAME` value is by
309
- * construction a valid enum value, so this conversion is total and safe — it is
308
+ * construction a valid enum value, so this conversion is total and safe. It is
310
309
  * the single boundary cast that lets internal code compare against the enum
311
310
  * (enum-to-enum) instead of enum-to-string.
312
311
  */
@@ -315,15 +314,15 @@ declare function asChartType(name: CHART_NAME): ChartType;
315
314
  * Is `name` a chart type this library emits?
316
315
  *
317
316
  * `CHART_NAME` constrains TypeScript callers, but `addChart` is reachable from plain JavaScript
318
- * where nothing enforces the union — and the two emitters partition the catalog between them by
317
+ * where nothing enforces the union, and the two emitters partition the catalog between them by
319
318
  * `switch`, so an off-catalog string has no arm in either and cannot produce a plot. Checked once
320
319
  * at define time (`gen/define/chart.ts`) so the caller hears about it at the call that was wrong,
321
320
  * rather than getting a chart-shaped hole in the deck.
322
321
  */
323
322
  declare function isChartType(name: unknown): name is CHART_NAME;
324
323
  /**
325
- * Is `type` a chartEx (cx:) chart? Accepts a `ChartType`/`CHART_NAME` string; anything else —
326
- * including a combo-chart `ChartMulti[]` array or `undefined` — is not a chartEx type (combos are
324
+ * Is `type` a chartEx (cx:) chart? Accepts a `ChartType`/`CHART_NAME` string; anything else
325
+ * (including a combo-chart `ChartMulti[]` array or `undefined`) is not a chartEx type (combos are
327
326
  * classic-only), so those return `false`.
328
327
  */
329
328
  declare function isChartExType(type: unknown): boolean;
@@ -381,8 +380,9 @@ declare enum BulletType {
381
380
  * Built-in PowerPoint table style IDs.
382
381
  *
383
382
  * Each value is the GUID that goes into `<a:tableStyleId>` inside `<a:tblPr>`.
384
- * These 74 GUIDs are the complete set defined in [MS-OE376] §5.1.6.10 and are
385
- * resolved by PowerPoint without embedding any style definition in the file.
383
+ * These 74 GUIDs are the complete set defined in [MS-OE376] §5.1.6.10. PowerPoint
384
+ * resolves them from its own gallery; the deck also carries the definition of each one
385
+ * its tables use in `ppt/tableStyles.xml`, as PowerPoint writes it, for other readers.
386
386
  *
387
387
  * Only these enum members are supported. Raw GUID strings are not accepted;
388
388
  * use `TableStyle` members exclusively.
@@ -466,6 +466,5 @@ declare enum TableStyle {
466
466
  /** Header uses Accent 6, body rows use Accent 5 */
467
467
  DARK_STYLE_2_ACCENT_5_ACCENT_6 = "{46F890A9-2807-4EBB-B81D-B2AA78EC7F39}"
468
468
  }
469
- //#endregion
470
469
  export { isChartType as C, isChartExType as S, VALID_SHAPE_PRESETS as _, CONNECTOR_PRESET_NAME as a, asChartType as b, PLACEHOLDER_TYPE as c, SHAPE_NAME as d, SchemeColor as f, TextAnchor as g, TableStyle as h, CHART_NAME as i, PlaceholderType as l, SlideObjectType as m, AlignV as n, ChartType as o, ShapeType as p, BulletType as r, OutputType as s, AlignH as t, SCHEME_COLORS as u, WRITE_OUTPUT_TYPE as v, connectorPresetFor as x, ZIP_OUTPUT_TYPE as y };
471
- //# sourceMappingURL=enums-BUKTUB6V.d.ts.map
470
+ //# sourceMappingURL=enums-PcXr3o3J.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"enums-BUKTUB6V.d.ts","names":[],"sources":["../src/enums.ts"],"mappings":";;;;;;;;;;KAUY,qBAAqB;KACrB,oBAAoB;;;;;;KAMpB,gBAAgB;;;;;KAKhB,mBAAmB;aAEnB;EACX;EACA;EACA;;aAIW;EACX;EACA;EACA;EACA;EACA;EACA;;aAEW;EACX;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;aAEW;EACX;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;aAEW;EACX;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;aAEW;EACX;EACA;EACA;EACA;;;;;;;;;aASW;EACX;EACA;EACA;;;;;;;;;;;;;KAcW,gBAAgB,cAAc;;;;;;cAOpC;;;;;;;;;KAoBM,gCAAgC;;;;;;;;;cAU/B,qBAAqB;;;;;;;;iBAYlB,YAAY,MAAM,aAAa;;;;;;;;;;iBAgB/B,YAAY,gBAAgB,QAAQ;;;;;;iBA4BpC,cAAc;aAIlB;EACX;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;;;;;;;;;iBA4Be,mBAAmB,uCAAuC,gBAAgB;aAI9E;EACX;EACA;EACA;EACA;EACA;EACA;;;;;;KAMW,sBAAsB;;;;;aAMtB;EACX;EACA;EACA;EACA;;;;;;;;;;;;aAaW;EAEX;EACA;EAGA;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;;EAEA;;EAEA;;EAEA"}
1
+ {"version":3,"file":"enums-PcXr3o3J.d.ts","names":[],"sources":["../src/enums.ts"],"mappings":";;;;;;;;;KAUY,qBAAqB;KACrB,oBAAoB;;;;;;KAMpB,gBAAgB;;;;;KAKhB,mBAAmB;aAEnB;EACX;EACA;EACA;;aAIW;EACX;EACA;EACA;EACA;EACA;EACA;;aAEW;EACX;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;aAEW;EACX;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;aAEW;EACX;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;aAEW;EACX;EACA;EACA;EACA;;;;;;;;;aASW;EACX;EACA;EACA;;;;;;;;;;;;;KAcW,gBAAgB,cAAc;;;;;;cAOpC;;;;;;;;;KAoBM,gCAAgC;;;;;;;;;cAU/B,qBAAqB;;;;;;;;iBAYlB,YAAY,MAAM,aAAa;;;;;;;;;;iBAgB/B,YAAY,gBAAgB,QAAQ;;;;;;iBA4BpC,cAAc;aAIlB;EACX;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;;;;;;;;;iBA4Be,mBAAmB,uCAAuC,gBAAgB;aAI9E;EACX;EACA;EACA;EACA;EACA;EACA;;;;;;KAMW,sBAAsB;;;;;aAMtB;EACX;EACA;EACA;EACA;;;;;;;;;;;;;aAcW;EAEX;EACA;EAGA;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;;EAEA;;EAEA;;EAEA"}
@@ -1,10 +1,24 @@
1
- import { d as SHAPE_NAME, i as CHART_NAME } from "./enums-BUKTUB6V.js";
2
- import { Bt as TextMeasurement, Dt as CommentProps, Ft as TableLayoutResult, Ht as TextPropsOptions, Kt as ImageProps, Ot as MeasureTextOptions, P as ConnectorProps, Q as ChartOpts, Vt as TextProps, Yt as OleObjectProps, Z as ChartMulti, jt as OverflowBoxOptions, kt as NotesProps, nn as ShapeProps, qt as MediaProps, xt as OptsChartData } from "./pres-C6qgOFAa.js";
3
- import { L as TableToSlidesProps, M as TableProps, N as TableRow, S as AnimationProps, c as SectionZoomProps, d as ZoomBaseProps, l as SlideZoomProps, m as Model3dProps, n as GroupChildProps, r as GroupProps, v as SlideMasterChartProps } from "./slide-Dx2ZeVZ6.js";
4
- import { T as PresSlideInternal } from "./font-metrics-v5fn7s7e.js";
5
- import { a as renderImageObject, c as ConstructFamily, d as PartContributor, f as RenderContext, l as PresentationAuthorContext, o as renderTextObject, u as SlideBuilder } from "./entry-compose-DCnvBZz2.js";
6
- import { s as ExtractedSlide } from "./presentation-types-8jLQHI4M.js";
7
- //#region src/gen/slide/objects/chart.d.ts
1
+ /**
2
+ * The construct families, as the `pptx-ts/families` subpath publishes them.
3
+ *
4
+ * What a caller hands to `createPresentation({ use: [...] })`. Each value is one family: the
5
+ * methods it adds to a slide, the child descriptors it recognises in a slide master or a group,
6
+ * the renderer that emits its XML, and the parts it puts in the package.
7
+ *
8
+ * Naming one here is what puts its code in your bundle, which is the whole point: a program that
9
+ * composes `charts` pays for charts, and a program that does not, does not.
10
+ *
11
+ * The core tier -- text, shapes, images, groups and speaker notes -- is composed for you. Those
12
+ * five are exported anyway, so a caller can be explicit; listing one changes nothing.
13
+ *
14
+ * @module
15
+ */
16
+ import { a as renderImageObject, c as ConstructFamily, d as PartContributor, f as RenderContext, l as PresentationAuthorContext, o as renderTextObject, u as SlideBuilder } from "./entry-compose-CiakSt-f.js";
17
+ import { Dt as OptsChartData, Ft as CommentProps, It as MeasureTextOptions, Jt as TextMeasurement, L as ConnectorProps, Lt as NotesProps, Ut as TableLayoutResult, Xt as TextPropsOptions, Yt as TextProps, en as ImageProps, it as ChartOpts, rn as OleObjectProps, rt as ChartMulti, tn as MediaProps, un as ShapeProps, zt as OverflowBoxOptions } from "./pres-BkEkUAEM.js";
18
+ import { L as TableToSlidesProps, M as TableProps, N as TableRow, S as AnimationProps, c as SectionZoomProps, d as ZoomBaseProps, l as SlideZoomProps, m as Model3dProps, n as GroupChildProps, r as GroupProps, v as SlideMasterChartProps } from "./slide-BmT4kMoO.js";
19
+ import { T as PresSlideInternal } from "./font-metrics-DTppw4t3.js";
20
+ import { d as SHAPE_NAME, i as CHART_NAME } from "./enums-PcXr3o3J.js";
21
+ import { s as ExtractedSlide } from "./presentation-types-BgnZR-0a.js";
8
22
  /**
9
23
  * Render a `chart` slide object to its `<p:graphicFrame>` XML referencing the chart part.
10
24
  *
@@ -14,8 +28,6 @@ import { s as ExtractedSlide } from "./presentation-types-8jLQHI4M.js";
14
28
  * `<mc:Fallback>` placeholder shape shown by every other consumer.
15
29
  */
16
30
  declare function renderChartObject(ctx: RenderContext): string;
17
- //#endregion
18
- //#region src/gen/extract-charts.d.ts
19
31
  /**
20
32
  * Charts: the chart part XML plus its embedded workbook bytes. The chart part's own `.rels`
21
33
  * (workbook reference) is rebuilt on injection.
@@ -27,26 +39,18 @@ declare function renderChartObject(ctx: RenderContext): string;
27
39
  * the classic-or-chartEx choice for the package writer too.
28
40
  */
29
41
  declare function chartsOf(slide: PresSlideInternal): ExtractedSlide['charts'];
30
- //#endregion
31
- //#region src/gen/slide/objects/table.d.ts
32
42
  /**
33
43
  * Render a `table` slide object to its `<p:graphicFrame>` XML (merge-grid, row/col spans, per-cell styling).
34
44
  */
35
45
  declare function renderTableObject(ctx: RenderContext): string;
36
- //#endregion
37
- //#region src/gen/slide/objects/media.d.ts
38
46
  /**
39
47
  * Render a `media` (audio/video/online) slide object to its `<p:pic>` XML.
40
48
  */
41
49
  declare function renderMediaObject(ctx: RenderContext): string;
42
- //#endregion
43
- //#region src/gen/slide/objects/connector.d.ts
44
50
  /**
45
51
  * Render a `connector` slide object to its `<p:cxnSp>` XML (start/end shape bindings via shapeIds).
46
52
  */
47
53
  declare function renderConnectorObject(ctx: RenderContext): string;
48
- //#endregion
49
- //#region src/gen/slide/objects/ole.d.ts
50
54
  /**
51
55
  * Render an `oleObject` slide object to its `<p:graphicFrame>` XML.
52
56
  *
@@ -55,29 +59,23 @@ declare function renderConnectorObject(ctx: RenderContext): string;
55
59
  * PowerPoint renders by drawing the live embedded document); the `mc:Fallback` repeats it with a
56
60
  * `<p:pic>` preview so every other consumer shows the cached picture.
57
61
  *
58
- * Note `mc:Choice Requires="v"` only *declares* the VML namespace — modern PowerPoint writes no
62
+ * Note `mc:Choice Requires="v"` only *declares* the VML namespace. Modern PowerPoint writes no
59
63
  * `spid` and no `vmlDrawing` part, so neither is emitted here.
60
64
  */
61
65
  declare function renderOleObject(ctx: RenderContext): string;
62
- //#endregion
63
- //#region src/gen/slide/objects/model3d.d.ts
64
66
  /**
65
67
  * Render a `model3d` slide object to its `<mc:AlternateContent>` XML. The `mc:Choice` carries the
66
68
  * real `<p:graphicFrame>` (the `am3d:model3d` graphicData PowerPoint 2019+ renders live); the
67
69
  * `mc:Fallback` carries the cached preview picture. See `gen/define/model3d.ts`.
68
70
  */
69
71
  declare function renderModel3dObject(ctx: RenderContext): string;
70
- //#endregion
71
- //#region src/gen/slide/objects/zoom.d.ts
72
72
  /**
73
73
  * Render a `zoom` slide object to its `<mc:AlternateContent>` XML. The `mc:Choice` carries the real
74
74
  * `<p:graphicFrame>` (Slide/Section/Summary Zoom in the 2016 zoom namespaces, read by PowerPoint
75
- * 2016+); the `mc:Fallback` carries a hyperlinked picture — or, for a Summary Zoom, a group of them —
75
+ * 2016+); the `mc:Fallback` carries a hyperlinked picture (or, for a Summary Zoom, a group of them),
76
76
  * so pre-2016 consumers still get a clickable navigation thumbnail. See `gen/define/zoom.ts`.
77
77
  */
78
78
  declare function renderZoomObject(ctx: RenderContext): string;
79
- //#endregion
80
- //#region src/families.d.ts
81
79
  /** Text boxes. Core: composed whether you ask for it or not. */
82
80
  export declare const text: {
83
81
  name: "text";
@@ -168,6 +166,7 @@ export declare const tables: {
168
166
  renderers: {
169
167
  table: typeof renderTableObject;
170
168
  };
169
+ parts: PartContributor;
171
170
  };
172
171
  /**
173
172
  * `tableToSlides`: reproducing a rendered HTML `<table>`. Needs a live DOM, so it belongs to a
@@ -255,6 +254,5 @@ export declare const measure: {
255
254
  tableLayout(ctx: PresentationAuthorContext, rows: TableRow[], opts: TableProps): TableLayoutResult;
256
255
  };
257
256
  };
258
- //#endregion
259
257
  export type { ConstructFamily };
260
258
  //# sourceMappingURL=families.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"families.d.ts","names":[],"sources":["../src/gen/slide/objects/chart.ts","../src/gen/extract-charts.ts","../src/gen/slide/objects/table.ts","../src/gen/slide/objects/media.ts","../src/gen/slide/objects/connector.ts","../src/gen/slide/objects/ole.ts","../src/gen/slide/objects/model3d.ts","../src/gen/slide/objects/zoom.ts","../src/families.ts"],"mappings":";;;;;;;;;;;;;;;iBAwDgB,kBAAkB,KAAK;;;;;;;;;;;;;iBClCvB,SAAS,OAAO,oBAAoB;;;;;;iBC4LpC,kBAAkB,KAAK;;;;;;iBC/LvB,kBAAkB,KAAK;;;;;;iBCHvB,sBAAsB,KAAK;;;;;;;;;;;;;;iBCU3B,gBAAgB,KAAK;;;;;;;;iBCyHrB,oBAAoB,KAAK;;;;;;;;;iBCtBzB,iBAAiB,KAAK;;;;qBCzFzB;;;mBAAA;;;;;;;;;;;;;;qBAEA;;;oBAAA;;;;;;;;;;;;;qBAEA;;;oBAAA;;;;;;;;;;qBAEA;;;oBAAA;;;;;qBAEA;;;oBAAA;;;;;qBAGA;;;oBAAA;;;;;;;;;;;;;;;;qBAEA;;;oBAAA;;;;;;;;;;qBAKA;;;uBAAA,mDAAA;;;;qBAEA;;;oBAAA;;;;;;;qBAEA;;;wBAAA;;;;;;;qBAEA;;;wBAAA;;;;;;;qBAEA;;;sBAAA;;;;;;;qBAEA;;;wBAAA;;;;;;;;;qBAEA;;;sBAAA;;;;;qBAEA;;;wBAAA,uBAAA;;;;qBAEA;;;qBAAA"}
1
+ {"version":3,"file":"families.d.ts","names":["_$__slide_js0.default","_$__families_shared_js0.PresentationAuthorContext"],"sources":["../src/gen/slide/objects/chart.ts","../src/gen/extract-charts.ts","../src/gen/slide/objects/table.ts","../src/gen/slide/objects/media.ts","../src/gen/slide/objects/connector.ts","../src/gen/slide/objects/ole.ts","../src/gen/slide/objects/model3d.ts","../src/gen/slide/objects/zoom.ts","../src/families.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA0DgB,kBAAkB,KAAK;;;;;;;;;;;iBClCvB,SAAS,OAAO,oBAAoB;;;;iBC2LpC,kBAAkB,KAAK;;;;iBChMvB,kBAAkB,KAAK;;;;iBCHvB,sBAAsB,KAAK;;;;;;;;;;;;iBCU3B,gBAAgB,KAAK;;;;;;iBCyHrB,oBAAoB,KAAK;;;;;;;iBCtBzB,iBAAiB,KAAK;;qBCzFzB;;;I,eAAAA,c;;;;;;;;;;;;;;qBAEA;;;I,gBAAAA,c;;;;;;;;;;;;;qBAEA;;;I,gBAAAA,c;;;;;;;;;;qBAEA;;;I,gBAAAA,c;;;;;qBAEA;;;I,gBAAAA,c;;;;;qBAGA;;;I,gBAAAA,c;;;;;;;;;;;;;;;;qBAEA;;;I,gBAAAA,c;;;;;;;;;;;qBAKA;;;I,mBAAAC,2B;;;;qBAEA;;;I,gBAAAD,c;;;;;;;qBAEA;;;I,oBAAAA,c;;;;;;;qBAEA;;;I,oBAAAA,c;;;;;;;qBAEA;;;I,kBAAAA,c;;;;;;;qBAEA;;;I,oBAAAA,c;;;;;;;;;qBAEA;;;I,kBAAAA,c;;;;;qBAEA;;;I,oBAAAA,c;;;;qBAEA;;;I,iBAAAC,2B"}
package/dist/families.js CHANGED
@@ -1,6 +1,6 @@
1
- import { a as mediaFamily, c as commentsFamily, d as textFamily, f as shapeFamily, h as groupFamily, i as model3dFamily, l as chartFamily, m as imageFamily, n as tableFamily, o as measureFamily, p as notesFamily, r as oleFamily, s as connectorFamily, t as zoomFamily, u as animationsFamily } from "./zoom-DPUHh85d.js";
2
- import { t as tableDomFamily } from "./table-dom-BTDP3lEP.js";
3
- //#region src/families.ts
1
+ import { a as mediaFamily, c as commentsFamily, d as textFamily, f as shapeFamily, h as groupFamily, i as model3dFamily, l as chartFamily, m as imageFamily, n as tableFamily, o as measureFamily, p as notesFamily, r as oleFamily, s as connectorFamily, t as zoomFamily, u as animationsFamily } from "./zoom-CSSeOwM8.js";
2
+ import { t as tableDomFamily } from "./table-dom-BYga4FYY.js";
3
+ // src/families.ts
4
4
  /**
5
5
  * The construct families, as the `pptx-ts/families` subpath publishes them.
6
6
  *
@@ -51,7 +51,6 @@ const comments = commentsFamily;
51
51
  const animations = animationsFamily;
52
52
  /** `measureText`, `overflowsBox` and `tableLayout` on the presentation. */
53
53
  const measure = measureFamily;
54
- //#endregion
55
54
  export { animations, charts, comments, connectors, domTables, groups, images, measure, media, models3d, notes, oleObjects, shapes, tables, text, zooms };
56
55
 
57
56
  //# sourceMappingURL=families.js.map