ooxml-core 1.41.0 → 1.43.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 (166) hide show
  1. package/README.md +4 -0
  2. package/dist/{PptxHandler-3AGIITR7.mjs → PptxHandler-3VAVJDFB.mjs} +2 -2
  3. package/dist/PptxHandler-V23RDNEX.cjs +14 -0
  4. package/dist/PptxHandler-WB3KL2WH.mjs +5 -0
  5. package/dist/{PresentationBuilder-JNID4B4Z.mjs → PresentationBuilder-7LJMTRJ6.mjs} +2 -2
  6. package/dist/{PresentationBuilder-MZBKYOYD.cjs → PresentationBuilder-KHL6GONR.cjs} +6 -6
  7. package/dist/{PresentationBuilder-5DPKFUXP.mjs → PresentationBuilder-PY2GB4IG.mjs} +3 -3
  8. package/dist/automation/index.cjs +79 -91
  9. package/dist/automation/index.mjs +79 -91
  10. package/dist/chart/index.cjs +12 -9
  11. package/dist/chart/index.mjs +12 -9
  12. package/dist/{chunk-ZYCBJKAE.mjs → chunk-243ZYX2B.mjs} +1 -1
  13. package/dist/{chunk-LRBWCRQ3.cjs → chunk-3J6VIKLP.cjs} +3 -3
  14. package/dist/{chunk-DD7COXWR.mjs → chunk-4LEVL6ZW.mjs} +30 -13
  15. package/dist/chunk-CODMW5KF.cjs +110 -0
  16. package/dist/{chunk-HTELXT2N.mjs → chunk-HLYOHD2Z.mjs} +30 -12
  17. package/dist/{chunk-P3WAKBVS.mjs → chunk-IPV3J3I5.mjs} +82 -90
  18. package/dist/{chunk-6LGRRQ3K.mjs → chunk-JHYU7HGG.mjs} +1 -1
  19. package/dist/{chunk-JXR6YWBW.mjs → chunk-KCDLTVUI.mjs} +125 -126
  20. package/dist/chunk-O3YGBYGZ.mjs +104 -0
  21. package/dist/{chunk-75KBNUKS.cjs → chunk-QZPOPUI5.cjs} +82 -89
  22. package/dist/{chunk-3BIFRTU4.cjs → chunk-RNZQ2OU4.cjs} +1294 -1276
  23. package/dist/{chunk-UE23HF2N.mjs → chunk-VKFKEVHK.mjs} +1 -1
  24. package/dist/{chunk-KKVD3R6O.mjs → chunk-WEAWSXUX.mjs} +4 -4
  25. package/dist/diagram/index.cjs +499 -370
  26. package/dist/diagram/index.d.ts +1 -0
  27. package/dist/diagram/index.d.ts.map +1 -1
  28. package/dist/diagram/index.mjs +495 -371
  29. package/dist/docx/embedded.cjs +67 -89
  30. package/dist/docx/embedded.mjs +67 -89
  31. package/dist/docx/index.cjs +125 -110
  32. package/dist/docx/index.mjs +125 -110
  33. package/dist/docx/layout/index.cjs +257 -110
  34. package/dist/docx/layout/index.d.ts +1 -0
  35. package/dist/docx/layout/index.d.ts.map +1 -1
  36. package/dist/docx/layout/index.mjs +257 -111
  37. package/dist/docx/layout/webfont-runs.d.ts +5 -0
  38. package/dist/docx/layout/webfont-runs.d.ts.map +1 -0
  39. package/dist/docx/load/index.cjs +67 -89
  40. package/dist/docx/load/index.mjs +67 -89
  41. package/dist/docx/shape-svg.d.ts.map +1 -1
  42. package/dist/docx/ui/index.cjs +79 -98
  43. package/dist/docx/ui/index.mjs +79 -98
  44. package/dist/drawingml/dash-pattern.d.ts +61 -0
  45. package/dist/drawingml/dash-pattern.d.ts.map +1 -0
  46. package/dist/drawingml/index.cjs +249 -43
  47. package/dist/drawingml/index.d.ts +3 -0
  48. package/dist/drawingml/index.d.ts.map +1 -1
  49. package/dist/drawingml/index.mjs +241 -44
  50. package/dist/drawingml/rect-path-gradient.d.ts +5 -0
  51. package/dist/drawingml/rect-path-gradient.d.ts.map +1 -1
  52. package/dist/drawingml/shape-path-gradient.d.ts +57 -0
  53. package/dist/drawingml/shape-path-gradient.d.ts.map +1 -0
  54. package/dist/geometry/index.cjs +68 -90
  55. package/dist/geometry/index.mjs +68 -90
  56. package/dist/geometry/preset-shape-definitions-exact-action-buttons.d.ts +2 -2
  57. package/dist/geometry/preset-shape-definitions-exact-action-buttons.d.ts.map +1 -1
  58. package/dist/geometry/preset-shape-definitions-exact-arrows.d.ts.map +1 -1
  59. package/dist/geometry/preset-shape-definitions-exact-scrolls.d.ts.map +1 -1
  60. package/dist/index.cjs +2937 -493
  61. package/dist/index.mjs +2937 -493
  62. package/dist/pptx/automation/index.cjs +366 -197
  63. package/dist/pptx/automation/index.d.ts +11 -17
  64. package/dist/pptx/automation/index.d.ts.map +1 -1
  65. package/dist/pptx/automation/index.mjs +156 -71
  66. package/dist/pptx/chunks/{elements-6BMEOo7i.d.ts → elements-PBugbKtv.d.ts} +3 -873
  67. package/dist/pptx/chunks/elements-PBugbKtv.d.ts.map +1 -0
  68. package/dist/pptx/chunks/{index-BbXLv6As.d.ts → index-Bj-hur0D.d.ts} +4 -4
  69. package/dist/pptx/chunks/{index-BbXLv6As.d.ts.map → index-Bj-hur0D.d.ts.map} +1 -1
  70. package/dist/pptx/chunks/{index-DvN0TkJJ.d.ts → index-CCJiD-Bm.d.ts} +14 -10
  71. package/dist/pptx/chunks/index-CCJiD-Bm.d.ts.map +1 -0
  72. package/dist/pptx/chunks/{index-Dija_Wth.d.ts → index-CGNb1TV9.d.ts} +22 -4
  73. package/dist/pptx/chunks/index-CGNb1TV9.d.ts.map +1 -0
  74. package/dist/pptx/chunks/table-C7ITXL3Y.d.ts +875 -0
  75. package/dist/pptx/chunks/table-C7ITXL3Y.d.ts.map +1 -0
  76. package/dist/pptx/chunks/{text-operations-DorONr3h.d.ts → text-operations-BNJr7aGa.d.ts} +3 -2
  77. package/dist/pptx/chunks/text-operations-BNJr7aGa.d.ts.map +1 -0
  78. package/dist/pptx/cli/index.cjs +180 -102
  79. package/dist/pptx/cli/index.d.ts +1 -1
  80. package/dist/pptx/cli/index.mjs +4 -4
  81. package/dist/pptx/converter/index.cjs +69 -91
  82. package/dist/pptx/converter/index.d.ts +1 -1
  83. package/dist/pptx/converter/index.mjs +2 -2
  84. package/dist/pptx/editor/render/custom-show-operations.cjs +2 -2
  85. package/dist/pptx/editor/render/custom-show-operations.mjs +1 -1
  86. package/dist/pptx/editor/render/find-replace.cjs +15 -15
  87. package/dist/pptx/editor/render/find-replace.d.ts +2 -2
  88. package/dist/pptx/editor/render/find-replace.mjs +2 -2
  89. package/dist/pptx/editor/render/slide-operations.cjs +9 -9
  90. package/dist/pptx/editor/render/slide-operations.mjs +3 -3
  91. package/dist/pptx/editor/render/table-data-grid-ops.cjs +5 -5
  92. package/dist/pptx/editor/render/table-data-grid-ops.mjs +1 -1
  93. package/dist/pptx/editor/render/table-layout.cjs +6 -6
  94. package/dist/pptx/editor/render/table-layout.d.ts +8 -37
  95. package/dist/pptx/editor/render/table-layout.d.ts.map +1 -1
  96. package/dist/pptx/editor/render/table-layout.mjs +1 -1
  97. package/dist/pptx/editor/render/text-runs-style-patch.d.ts +1 -1
  98. package/dist/pptx/editor/render/text-style-scope.d.ts +1 -1
  99. package/dist/pptx/index.cjs +225 -135
  100. package/dist/pptx/index.d.ts +6 -5
  101. package/dist/pptx/index.mjs +5 -5
  102. package/dist/pptx/node/index.d.ts +1 -1
  103. package/dist/teams/index.cjs +136 -91
  104. package/dist/teams/index.mjs +136 -91
  105. package/dist/text/css-font-family.d.ts.map +1 -1
  106. package/dist/text/font-metrics/design-advances.generated.d.ts +3 -1
  107. package/dist/text/font-metrics/design-advances.generated.d.ts.map +1 -1
  108. package/dist/text/index.cjs +2252 -0
  109. package/dist/text/index.d.ts +1 -0
  110. package/dist/text/index.d.ts.map +1 -1
  111. package/dist/text/index.mjs +2231 -1
  112. package/dist/text/metric-font-family.d.ts.map +1 -1
  113. package/dist/text/webfonts/font-weight-names.d.ts +66 -0
  114. package/dist/text/webfonts/font-weight-names.d.ts.map +1 -0
  115. package/dist/text/webfonts/google-fonts-catalogue.d.ts +14 -0
  116. package/dist/text/webfonts/google-fonts-catalogue.d.ts.map +1 -0
  117. package/dist/text/webfonts/google-fonts-lookup.d.ts +7 -0
  118. package/dist/text/webfonts/google-fonts-lookup.d.ts.map +1 -0
  119. package/dist/text/webfonts/google-fonts-request.d.ts +57 -0
  120. package/dist/text/webfonts/google-fonts-request.d.ts.map +1 -0
  121. package/dist/text/webfonts/index.d.ts +12 -0
  122. package/dist/text/webfonts/index.d.ts.map +1 -0
  123. package/dist/text/webfonts/metric-clones.d.ts +17 -0
  124. package/dist/text/webfonts/metric-clones.d.ts.map +1 -0
  125. package/dist/text/webfonts/webfont-faces.d.ts +24 -0
  126. package/dist/text/webfonts/webfont-faces.d.ts.map +1 -0
  127. package/dist/visio/index.cjs +64 -0
  128. package/dist/visio/index.d.ts +1 -0
  129. package/dist/visio/index.d.ts.map +1 -1
  130. package/dist/visio/index.mjs +64 -1
  131. package/dist/visio/ui/index.cjs +8 -0
  132. package/dist/visio/ui/index.mjs +8 -0
  133. package/dist/visio/webfont-runs.d.ts +27 -0
  134. package/dist/visio/webfont-runs.d.ts.map +1 -0
  135. package/dist/xlsx/collab/index.cjs +67 -89
  136. package/dist/xlsx/collab/index.mjs +67 -89
  137. package/dist/xlsx/index.cjs +2253 -118
  138. package/dist/xlsx/index.mjs +2249 -119
  139. package/dist/xlsx/layout/font-stack.d.ts +8 -0
  140. package/dist/xlsx/layout/font-stack.d.ts.map +1 -0
  141. package/dist/xlsx/layout/index.d.ts +3 -1
  142. package/dist/xlsx/layout/index.d.ts.map +1 -1
  143. package/dist/xlsx/layout/shape-paint.d.ts.map +1 -1
  144. package/dist/xlsx/layout/shape-view.d.ts.map +1 -1
  145. package/dist/xlsx/layout/style-view.d.ts +2 -0
  146. package/dist/xlsx/layout/style-view.d.ts.map +1 -1
  147. package/dist/xlsx/layout/webfont-runs.d.ts +11 -0
  148. package/dist/xlsx/layout/webfont-runs.d.ts.map +1 -0
  149. package/dist/xlsx/load/index.cjs +67 -89
  150. package/dist/xlsx/load/index.mjs +67 -89
  151. package/dist/xlsx/ui/commands/util.d.ts.map +1 -1
  152. package/dist/xlsx/ui/context.d.ts +5 -0
  153. package/dist/xlsx/ui/context.d.ts.map +1 -1
  154. package/dist/xlsx/ui/grid/cell-paint.d.ts +3 -2
  155. package/dist/xlsx/ui/grid/cell-paint.d.ts.map +1 -1
  156. package/dist/xlsx/ui/index.cjs +2093 -102
  157. package/dist/xlsx/ui/index.mjs +2093 -103
  158. package/package.json +1 -1
  159. package/dist/PptxHandler-EL4E4SPH.mjs +0 -5
  160. package/dist/PptxHandler-OIZ3R3DJ.cjs +0 -14
  161. package/dist/chunk-3IT6ZD7K.mjs +0 -213
  162. package/dist/chunk-FRUB573B.cjs +0 -219
  163. package/dist/pptx/chunks/elements-6BMEOo7i.d.ts.map +0 -1
  164. package/dist/pptx/chunks/index-Dija_Wth.d.ts.map +0 -1
  165. package/dist/pptx/chunks/index-DvN0TkJJ.d.ts.map +0 -1
  166. package/dist/pptx/chunks/text-operations-DorONr3h.d.ts.map +0 -1
@@ -1,6 +1,7 @@
1
1
  import { C as ConnectorConnectionPoint, D as StrokeDashType, E as ShadowEffect, S as ConnectorArrowType, T as PptxShapeLocks, i as TextStyle, k as XmlObject, l as EffectDagContainer, r as TextSegment, v as Pptx3DShape, x as DrawingScene3D } from "./text-t_wJ2OwM.js";
2
2
  import { t as PptxThemeColorRef } from "./color-ref-CwUQoKPJ.js";
3
3
  import { Gt as PptxCustomPathProperties, Wt as GeometryAdjustmentHandle, n as PptxSmartArtData } from "./smart-art-DB37AsFP.js";
4
+ import { v as PptxTableData } from "./table-C7ITXL3Y.js";
4
5
  interface PptxCustomDashSegment {
5
6
  /** Dash length as a non-negative percentage in thousandths of one percent. */
6
7
  dash: number;
@@ -3079,877 +3080,6 @@ interface PptxChartData {
3079
3080
  */
3080
3081
  elementFormats?: PptxChartElementFormats;
3081
3082
  }
3082
- /**
3083
- * A `a:fillRef`/`a:lnRef`/`a:effectRef`-style style-matrix reference: an
3084
- * index into the theme's format scheme (`a:fmtScheme/a:fillStyleLst`, 1-based
3085
- * per ECMA-376 §20.1.4.1.12) plus an optional colour transform child.
3086
- *
3087
- * Distinct from an already-resolved {@link ParsedTableStyleFill}: a fill ref
3088
- * points AT a theme style-matrix entry rather than carrying a colour choice
3089
- * directly, though the two commonly appear together (`<a:fillRef idx="2">
3090
- * <a:schemeClr val="accent1"/></a:fillRef>`).
3091
- *
3092
- * @example
3093
- * ```ts
3094
- * const ref: ParsedTableFillRef = { idx: 2, color: { schemeColor: 'accent1' } };
3095
- * // => satisfies ParsedTableFillRef
3096
- * ```
3097
- */
3098
- interface ParsedTableFillRef {
3099
- /** 1-based index into the theme format scheme's fill style list. */
3100
- idx: number;
3101
- /** Colour transform child (`a:schemeClr`/`a:srgbClr`) applied to the referenced style. */
3102
- color?: ParsedTableStyleFill;
3103
- }
3104
- /**
3105
- * One leaf (or `effectDag`-wrapped) node of an `a:effectLst`/`a:effectDag`
3106
- * effect chain, kept mostly opaque: {@link kind} names the OOXML element so a
3107
- * consumer can recognise common effects (`outerShdw`, `glow`, `softEdge`,
3108
- * `reflection`, `blur`, `innerShdw`, `prstShdw`, `fillOverlay`, `alphaModFix`,
3109
- * `alphaInv`, `grayscl`, `biLevel`, `duotone`, `hsl`, `lum`, `tint`) without
3110
- * this module re-deriving the full shape-effect taxonomy already modelled on
3111
- * `ShapeStyle`; {@link xml} preserves the node verbatim for lossless re-emit.
3112
- *
3113
- * @example
3114
- * ```ts
3115
- * const effect: ParsedTableStyleEffect = {
3116
- * kind: 'outerShdw',
3117
- * xml: { '@_blurRad': '40000', '@_dist': '20000', '@_dir': '5400000' },
3118
- * };
3119
- * // => satisfies ParsedTableStyleEffect
3120
- * ```
3121
- */
3122
- interface ParsedTableStyleEffect {
3123
- /** The OOXML element's local name, e.g. `outerShdw`, `glow`, `softEdge`. */
3124
- kind: string;
3125
- /** Verbatim XML node (attributes + children) for lossless round-trip. */
3126
- xml: XmlObject;
3127
- }
3128
- /**
3129
- * A patch to apply to ONE `CT_TableStyle` section (`a:wholeTbl`, `a:band1H`,
3130
- * `a:firstRow`, a corner cell, ...) when editing an existing table style.
3131
- * Every field is independently optional: an absent field leaves that facet
3132
- * of the section untouched, `null` (currently only supported for
3133
- * {@link fill}/{@link text}/{@link borders}/{@link cell3D} at the top level)
3134
- * is not accepted here (delete a whole style with
3135
- * `deleteTableStyleFromMap` / `tableStylesToDelete` instead of clearing every
3136
- * facet of every section).
3137
- *
3138
- * @example
3139
- * ```ts
3140
- * const patch: TableStyleSectionPatch = {
3141
- * fill: { schemeColor: 'accent2', tint: 40000 },
3142
- * text: { bold: true },
3143
- * };
3144
- * // => satisfies TableStyleSectionPatch
3145
- * ```
3146
- */
3147
- interface TableStyleSectionPatch {
3148
- fill?: ParsedTableStyleFill;
3149
- text?: ParsedTableStyleText;
3150
- borders?: ParsedTableStyleBorders;
3151
- cell3D?: PptxTableCell3D;
3152
- }
3153
- /**
3154
- * Options for creating a brand-new `a:tblStyle` entry with
3155
- * `createTableStyleEntry` (`packages/core/.../table-style-editor.ts`).
3156
- *
3157
- * @example
3158
- * ```ts
3159
- * const opts: CreateTableStyleOptions = { styleName: 'My Custom Style' };
3160
- * // => satisfies CreateTableStyleOptions
3161
- * ```
3162
- */
3163
- interface CreateTableStyleOptions {
3164
- /** Display name for the new style (`a:tblStyle/@styleName`). */
3165
- styleName: string;
3166
- /**
3167
- * An existing entry to deep-clone section-by-section as the starting
3168
- * point (all fill/text/border/cell3D/background sections), with a fresh
3169
- * `styleId` substituted in. Omit for a blank style with no sections.
3170
- */
3171
- basedOn?: ParsedTableStyleEntry;
3172
- /**
3173
- * Explicit style GUID (braced, e.g. `{...}`). When omitted a new GUID is
3174
- * generated (`globalThis.crypto.randomUUID()` when available).
3175
- */
3176
- styleId?: string;
3177
- }
3178
- /**
3179
- * Per-cell visual style for a table cell.
3180
- *
3181
- * All fields are optional - unset values inherit from the table style.
3182
- *
3183
- * @example
3184
- * ```ts
3185
- * const header: PptxTableCellStyle = {
3186
- * bold: true,
3187
- * fontSize: 14,
3188
- * color: "#FFFFFF",
3189
- * backgroundColor: "#0055AA",
3190
- * align: "center",
3191
- * };
3192
- * // => satisfies PptxTableCellStyle
3193
- * ```
3194
- */
3195
- interface PptxTableCellStyle {
3196
- /** Font size in points (`a:rPr@sz / 100`). */
3197
- fontSize?: number;
3198
- bold?: boolean;
3199
- italic?: boolean;
3200
- underline?: boolean;
3201
- color?: string;
3202
- /**
3203
- * Font family from the first run's `a:rPr/a:latin@typeface` (falling back to
3204
- * `a:ea` / `a:cs`). Per-run families live on {@link PptxTableCellTextRun}.
3205
- */
3206
- fontFamily?: string;
3207
- /**
3208
- * Raw XML colour-choice node preserved from `a:tc/a:txBody/.../a:rPr/a:solidFill`
3209
- * for round-trip serialisation. Currently unused by the cell-level writer
3210
- * (cell text colour falls through `writeCellTextFormatting`), reserved for
3211
- * future expansion alongside the run-properties round-trip path.
3212
- */
3213
- colorXml?: XmlObject;
3214
- /**
3215
- * Typed theme colour reference for the cell text colour, set when
3216
- * {@link colorXml} is a plain `a:schemeClr`. Wins on save, mirroring
3217
- * `TextStyle.colorRef`. Distinct from {@link ParsedTableStyleFill.schemeColor},
3218
- * which describes a `ppt/tableStyles.xml` section fill rather than an
3219
- * individual cell override.
3220
- */
3221
- colorRef?: PptxThemeColorRef;
3222
- backgroundColor?: string;
3223
- /**
3224
- * Raw XML colour-choice node preserved from cell `a:tcPr/a:solidFill` for
3225
- * round-trip serialisation. Re-emitted verbatim when the resolved
3226
- * {@link backgroundColor} still matches the original colour.
3227
- */
3228
- backgroundColorXml?: XmlObject;
3229
- /**
3230
- * Typed theme colour reference for the cell fill, set when
3231
- * {@link backgroundColorXml} is a plain `a:schemeClr`. Wins on save,
3232
- * mirroring `ShapeStyle.fillColorRef`.
3233
- */
3234
- backgroundColorRef?: PptxThemeColorRef;
3235
- borderColor?: string;
3236
- /** Top border width in px. */
3237
- borderTopWidth?: number;
3238
- /** Bottom border width in px. */
3239
- borderBottomWidth?: number;
3240
- /** Left border width in px. */
3241
- borderLeftWidth?: number;
3242
- /** Right border width in px. */
3243
- borderRightWidth?: number;
3244
- /** Top border color as hex. */
3245
- borderTopColor?: string;
3246
- /** Bottom border color as hex. */
3247
- borderBottomColor?: string;
3248
- /** Left border color as hex. */
3249
- borderLeftColor?: string;
3250
- /** Right border color as hex. */
3251
- borderRightColor?: string;
3252
- align?: TextStyle['align'];
3253
- vAlign?: 'top' | 'middle' | 'bottom';
3254
- /** Text direction from `a:tcPr/@vert` (spec values from CT_TextVerticalType). */
3255
- textDirection?: 'vert' | 'vert270' | 'eaVert' | 'wordArtVert' | 'wordArtVertRtl' | 'mongolianVert';
3256
- /** Cell left margin in px (from a:tcPr > a:tcMar > a:marL). */
3257
- marginLeft?: number;
3258
- /** Cell right margin in px. */
3259
- marginRight?: number;
3260
- /** Cell top margin in px. */
3261
- marginTop?: number;
3262
- /** Cell bottom margin in px. */
3263
- marginBottom?: number;
3264
- /** Diagonal border top-left to bottom-right color. */
3265
- borderDiagDownColor?: string;
3266
- /** Diagonal border top-left to bottom-right width in px. */
3267
- borderDiagDownWidth?: number;
3268
- /** Diagonal border bottom-left to top-right color. */
3269
- borderDiagUpColor?: string;
3270
- /** Diagonal border bottom-left to top-right width in px. */
3271
- borderDiagUpWidth?: number;
3272
- /** Table cell border dash style (legacy single value). */
3273
- borderDash?: string;
3274
- /** Per-edge border dash styles. */
3275
- borderTopDash?: string;
3276
- borderBottomDash?: string;
3277
- borderLeftDash?: string;
3278
- borderRightDash?: string;
3279
- /** Cell text shadow colour. */
3280
- textShadowColor?: string;
3281
- /** Cell text shadow blur radius in px. */
3282
- textShadowBlur?: number;
3283
- /** Cell text shadow horizontal offset in px. */
3284
- textShadowOffsetX?: number;
3285
- /** Cell text shadow vertical offset in px. */
3286
- textShadowOffsetY?: number;
3287
- /** Cell text shadow opacity (0-1). */
3288
- textShadowOpacity?: number;
3289
- /** Cell text glow colour. */
3290
- textGlowColor?: string;
3291
- /** Cell text glow radius in px. */
3292
- textGlowRadius?: number;
3293
- /** Cell text glow opacity (0-1). */
3294
- textGlowOpacity?: number;
3295
- /** Cell fill mode: solid, gradient, pattern, image, or none. */
3296
- fillMode?: 'solid' | 'gradient' | 'pattern' | 'image' | 'none';
3297
- /** Gradient fill stops (colours with positions). */
3298
- gradientFillStops?: Array<{
3299
- color: string;
3300
- position: number;
3301
- opacity?: number;
3302
- }>;
3303
- /** Gradient angle in degrees. */
3304
- gradientFillAngle?: number;
3305
- /** Gradient type: linear or radial. */
3306
- gradientFillType?: 'linear' | 'radial';
3307
- /** Path gradient sub-type. */
3308
- gradientFillPathType?: 'circle' | 'rect' | 'shape';
3309
- /** Focal point for radial gradients (0–1 fractions). */
3310
- gradientFillFocalPoint?: {
3311
- x: number;
3312
- y: number;
3313
- };
3314
- /** Raw fillToRect LTRB values (0–1 fractions) for gradient sizing. */
3315
- gradientFillFillToRect?: {
3316
- l: number;
3317
- t: number;
3318
- r: number;
3319
- b: number;
3320
- };
3321
- /** Pre-computed CSS gradient string for rendering. */
3322
- gradientFillCss?: string;
3323
- /** Pattern fill preset name (e.g. "ltDnDiag"). */
3324
- patternFillPreset?: string;
3325
- /** Pattern fill foreground colour. */
3326
- patternFillForeground?: string;
3327
- /** Pattern fill background colour. */
3328
- patternFillBackground?: string;
3329
- /**
3330
- * Image fill (`a:tcPr/a:blipFill`, CT_TableCellProperties). Resolved
3331
- * archive-relative path (or external `http(s):`/`data:` URL) for the
3332
- * cell's background image, from `a:blipFill/a:blip/@r:embed` (or
3333
- * `@r:link`). Present when `fillMode` is `'image'`.
3334
- *
3335
- * The parser resolves this synchronously (path only, no binary read);
3336
- * a viewer's load pipeline resolves it further to a displayable
3337
- * `data:`/`blob:` URL, written back to {@link backgroundImageFillData}.
3338
- */
3339
- backgroundImageFillPath?: string;
3340
- /**
3341
- * Displayable image data (`data:` or `blob:` URL) for an image cell
3342
- * fill, once resolved by the load pipeline. Renderers should prefer
3343
- * this over {@link backgroundImageFillPath} when both are present.
3344
- */
3345
- backgroundImageFillData?: string;
3346
- /**
3347
- * Cell 3D bevel + lighting from `a:tcPr/a:cell3D` (CT_Cell3D,
3348
- * ECMA-376 §21.1.3.1). Rendered as a CSS bevel treatment.
3349
- */
3350
- cell3D?: PptxTableCell3D;
3351
- /**
3352
- * `a:tcPr/@anchorCtr` - centre the text block in the direction
3353
- * perpendicular to the text flow (horizontal centring for horizontal text).
3354
- */
3355
- anchorCtr?: boolean;
3356
- /**
3357
- * `a:tcPr/@horzOverflow` (ST_TextHorzOverflowType): `clip` clips text at
3358
- * the cell edge, `overflow` (the default) lets it spill.
3359
- */
3360
- horzOverflow?: 'clip' | 'overflow';
3361
- }
3362
- /**
3363
- * Cell 3D bevel + lighting parsed from `a:tcPr/a:cell3D` (CT_Cell3D).
3364
- *
3365
- * Only the fields needed to render a plausible bevel treatment are captured;
3366
- * verbatim round-trip of the full node is handled separately by the save path.
3367
- *
3368
- * @example
3369
- * ```ts
3370
- * const c3d: PptxTableCell3D = {
3371
- * bevelWidth: 8,
3372
- * bevelHeight: 8,
3373
- * bevelPreset: 'circle',
3374
- * material: 'plastic',
3375
- * };
3376
- * // => satisfies PptxTableCell3D
3377
- * ```
3378
- */
3379
- interface PptxTableCell3D {
3380
- /** Bevel width in px (from `a:bevel@w`, EMU converted). */
3381
- bevelWidth?: number;
3382
- /** Bevel height in px (from `a:bevel@h`, EMU converted). */
3383
- bevelHeight?: number;
3384
- /** Bevel preset name (`a:bevel@prst`, e.g. `circle`, `relaxedInset`). */
3385
- bevelPreset?: string;
3386
- /** Preset material (`a:cell3D@prstMaterial`, e.g. `plastic`, `metal`). */
3387
- material?: string;
3388
- /** Light rig type (`a:lightRig@rig`, e.g. `threePt`, `soft`). */
3389
- lightRig?: string;
3390
- /** Light rig direction (`a:lightRig@dir`, e.g. `tl`, `t`, `tr`). */
3391
- lightRigDirection?: string;
3392
- }
3393
- /**
3394
- * One styled text run inside a table cell's `a:txBody`.
3395
- *
3396
- * `PptxTableCell.text` is a flat string and `PptxTableCell.style` describes
3397
- * only the FIRST run, so a cell mixing formats ("Revenue **grew 42%** last
3398
- * year") cannot be represented by those two alone. {@link PptxTableCell.runs}
3399
- * carries the full sequence, with paragraph and line breaks as marker entries
3400
- * so a renderer can walk it linearly.
3401
- *
3402
- * Structurally identical to `pptx-viewer-shared`'s `CellTextRun`, which every
3403
- * binding's table renderer already consumes.
3404
- *
3405
- * @example
3406
- * ```ts
3407
- * const runs: PptxTableCellTextRun[] = [
3408
- * { text: "Revenue " },
3409
- * { text: "grew 42%", bold: true, color: "#C00000" },
3410
- * ];
3411
- * // => satisfies PptxTableCellTextRun[]
3412
- * ```
3413
- */
3414
- interface PptxTableCellTextRun {
3415
- /** Run text. Empty for the break markers below. */
3416
- text: string;
3417
- /** This entry starts a new paragraph (`a:p` boundary) rather than carrying text. */
3418
- isParagraphBreak?: boolean;
3419
- /** This entry is a soft line break (`a:br`) rather than carrying text. */
3420
- isLineBreak?: boolean;
3421
- /** This entry carries an `a:fld` value rather than a literal `a:r`. */
3422
- isField?: true;
3423
- bold?: boolean;
3424
- italic?: boolean;
3425
- underline?: boolean;
3426
- strikethrough?: boolean;
3427
- /** Resolved run colour as a CSS colour string. */
3428
- color?: string;
3429
- /** Run font size in points (`a:rPr@sz` / 100). */
3430
- fontSize?: number;
3431
- /** Run font family from `a:rPr/a:latin@typeface` (or `a:ea` / `a:cs`). */
3432
- fontFamily?: string;
3433
- /** Run language from `a:rPr/@lang`, such as `ko-KR`. */
3434
- language?: string;
3435
- /**
3436
- * Run baseline shift from `a:rPr/@baseline`, in thousandths of a percent
3437
- * (`-25000` is a 25% subscript). Positive raises the run, negative lowers it.
3438
- */
3439
- baseline?: number;
3440
- /** Character spacing from `a:rPr/@spc`, in hundredths of a point. */
3441
- characterSpacing?: number;
3442
- }
3443
- /**
3444
- * One paragraph's own `a:pPr` layout inside a table cell: alignment,
3445
- * direction, left margin and first-line indent, line spacing, and space
3446
- * before and after. For an empty paragraph, also the size of its line from
3447
- * `a:endParaRPr`.
3448
- *
3449
- * The layout fields and units are the ones {@link TextStyle} uses for shape
3450
- * text (px for margins, indent and paragraph spacing; points for exact line
3451
- * spacing), so a renderer resolves both through the same paragraph helpers.
3452
- *
3453
- * @example
3454
- * ```ts
3455
- * const paragraph: PptxTableCellParagraph = {
3456
- * align: "right",
3457
- * paragraphMarginLeft: 12,
3458
- * lineSpacingExactPt: 9.6,
3459
- * };
3460
- * // => satisfies PptxTableCellParagraph
3461
- * ```
3462
- */
3463
- type PptxTableCellParagraph = Pick<TextStyle, 'align' | 'rtl' | 'paragraphMarginLeft' | 'paragraphIndent' | 'lineSpacing' | 'lineSpacingExactPt' | 'paragraphSpacingBefore' | 'paragraphSpacingAfter'> & {
3464
- /**
3465
- * For a paragraph with no run, field or break: the size of its line in
3466
- * points, from `a:endParaRPr@sz` (cell runs give their sizes in points too).
3467
- */
3468
- endParaFontSize?: number;
3469
- };
3470
- /**
3471
- * A single table cell with text content, optional style, and merge info.
3472
- *
3473
- * @example
3474
- * ```ts
3475
- * const cell: PptxTableCell = {
3476
- * text: "$1.5M",
3477
- * style: { bold: true, align: "right" },
3478
- * gridSpan: 1,
3479
- * };
3480
- * // => satisfies PptxTableCell
3481
- * ```
3482
- */
3483
- interface PptxTableCell {
3484
- text: string;
3485
- style?: PptxTableCellStyle;
3486
- /**
3487
- * Per-run formatting for the cell's text, when it has any beyond what
3488
- * {@link style} can express. Present only for cells whose `a:txBody`
3489
- * actually carries runs; renderers fall back to {@link text} when absent.
3490
- *
3491
- * Editing a cell's text invalidates these (the editor produces a plain
3492
- * string), so an edit path must clear them alongside setting `text`.
3493
- */
3494
- textRuns?: PptxTableCellTextRun[];
3495
- /**
3496
- * Each paragraph's own layout, one entry per `a:p` in source order (the
3497
- * paragraphs {@link textRuns} separates with `isParagraphBreak`). An entry
3498
- * is `{}` for a paragraph that sets none of it. Present only when some
3499
- * paragraph sets something. Editing the cell's text keeps only the first
3500
- * entry, as the rewritten `a:txBody` keeps only the first paragraph's
3501
- * `a:pPr`. Aligning the cell gives one entry per line of {@link text}
3502
- * instead; save writes as many as the cell has `a:p`.
3503
- */
3504
- paragraphs?: PptxTableCellParagraph[];
3505
- /** Column span (defaults to 1). */
3506
- gridSpan?: number;
3507
- /** Row span (defaults to 1). */
3508
- rowSpan?: number;
3509
- /** Whether this cell is merged vertically with the cell above. */
3510
- vMerge?: boolean;
3511
- /** Whether this cell is horizontally merged with the cell to the left (gridSpan continuation). */
3512
- hMerge?: boolean;
3513
- /**
3514
- * Opaque round-trip storage for `a:tcPr` attributes that don't yet have
3515
- * typed equivalents on {@link PptxTableCellStyle} (e.g. `horzOverflow`,
3516
- * `anchorCtr`, `headers`, `hideSlicers`, `slicerCacheId`). Keys are the
3517
- * raw XML attribute names without the `@_` prefix used by
3518
- * fast-xml-parser. Re-emitted verbatim by the save writer when present.
3519
- */
3520
- extraAttributes?: Record<string, string>;
3521
- }
3522
- /**
3523
- * A single table row with an optional height and an array of cells.
3524
- *
3525
- * @example
3526
- * ```ts
3527
- * const row: PptxTableRow = {
3528
- * height: 40,
3529
- * cells: [
3530
- * { text: "Name" },
3531
- * { text: "Score" },
3532
- * ],
3533
- * };
3534
- * // => satisfies PptxTableRow
3535
- * ```
3536
- */
3537
- interface PptxTableRow {
3538
- /** Row height in px. */
3539
- height?: number;
3540
- cells: PptxTableCell[];
3541
- }
3542
- /**
3543
- * Complete parsed table data for a {@link TablePptxElement}.
3544
- *
3545
- * Includes row/cell data, column widths, banding flags, and the applied
3546
- * table style ID.
3547
- *
3548
- * @example
3549
- * ```ts
3550
- * const data: PptxTableData = {
3551
- * rows: [
3552
- * { cells: [{ text: "Product" }, { text: "Revenue" }] },
3553
- * { cells: [{ text: "Widget A" }, { text: "$3.4M" }] },
3554
- * ],
3555
- * columnWidths: [0.6, 0.4],
3556
- * firstRowHeader: true,
3557
- * bandedRows: true,
3558
- * };
3559
- * // => satisfies PptxTableData
3560
- * ```
3561
- */
3562
- interface PptxTableData {
3563
- rows: PptxTableRow[];
3564
- /** Column widths as proportion of total (summing to 1). */
3565
- columnWidths: number[];
3566
- /** Whether the table has banded rows. */
3567
- bandedRows?: boolean;
3568
- /** Whether the first row is a header. */
3569
- firstRowHeader?: boolean;
3570
- /** Whether banded columns are enabled. */
3571
- bandedColumns?: boolean;
3572
- /** Whether the last row is styled as a total row. */
3573
- lastRow?: boolean;
3574
- /** Whether the first column is styled as a header column. */
3575
- firstCol?: boolean;
3576
- /** Whether the last column is styled specially. */
3577
- lastCol?: boolean;
3578
- /** Table style ID from `a:tblPr/a:tblStyle@val` or `a:tblPr@tblStyle`. */
3579
- tableStyleId?: string;
3580
- /**
3581
- * Set by a table style pick (which, like PowerPoint's, clears every cell's
3582
- * direct fill and borders): the next save drops the direct `a:tcPr` fills,
3583
- * lines and `a:cell3D` the cells' model styles no longer carry, even when
3584
- * `tableStyleId` ends up equal to the file's (the same style picked again,
3585
- * or a pick of B then back to A). Not read from or written to the file.
3586
- * It stays set after a save, which is harmless: a later save only removes
3587
- * children the model still has no value for.
3588
- */
3589
- clearDirectCellFormatting?: boolean;
3590
- /** Number of rows per banding group (default 1). */
3591
- bandRowCycle?: number;
3592
- /** Number of columns per banding group (default 1). */
3593
- bandColCycle?: number;
3594
- /** Right-to-left table layout from `a:tblPr/@rtl`. */
3595
- rtl?: boolean;
3596
- /**
3597
- * `a:tblPr`'s OWN fill (`CT_TableProperties` §21.1.3.15's
3598
- * `EG_FillProperties`), independent of any `a:tblStyleLst`-referenced style
3599
- * or that style's `a:tblBg`. Applied as the lowest-priority fill layer,
3600
- * beneath the table style's `wholeTbl` fill. Real PowerPoint decks route
3601
- * table appearance through `tableStyleId` instead, so this mainly matters
3602
- * for non-PowerPoint authoring tools (issue G6).
3603
- */
3604
- tableFill?: ParsedTableStyleFill;
3605
- /**
3606
- * `a:tblPr`'s own `a:effectLst` (or `a:effectDag`) effect chain,
3607
- * independent of the referenced table style, decomposed into a typed
3608
- * sequence of {@link ParsedTableStyleEffect} nodes (issue G6). Each node
3609
- * keeps its own XML verbatim for lossless round-trip; empty array is
3610
- * normalised to `undefined` by the parser so `tableEffects` is only ever
3611
- * present when there is at least one effect.
3612
- */
3613
- tableEffects?: ParsedTableStyleEffect[];
3614
- /**
3615
- * Table-cell-context default text size in points, resolved from the
3616
- * slide's master `p:otherStyle` (ECMA-376 §19.3.1.42 CT_TextListStyle,
3617
- * §19.3.1.52 for `p:txStyles`). PowerPoint sizes a table cell's text off
3618
- * this master default (commonly 18pt) whenever neither the run nor the
3619
- * (size-less) table style provides one; without it, cell text without an
3620
- * explicit `a:rPr@sz` fell back to the browser's own default font size
3621
- * (16px / 12pt) instead. A render-only hint: it is not part of any
3622
- * individual cell's parsed style and is never written back on save, so
3623
- * resaving an unstyled cell does not bake in an explicit size that was
3624
- * never authored. `undefined` when no master/otherStyle size resolves
3625
- * (renderers should leave the browser default in place in that case).
3626
- */
3627
- defaultCellFontSize?: number;
3628
- }
3629
- /**
3630
- * A single fill reference within a table style section.
3631
- *
3632
- * @example
3633
- * ```ts
3634
- * const fill: ParsedTableStyleFill = {
3635
- * schemeColor: "accent1",
3636
- * tint: 40000, // 40% tint
3637
- * };
3638
- * // => satisfies ParsedTableStyleFill
3639
- * ```
3640
- */
3641
- interface ParsedTableStyleFill {
3642
- /**
3643
- * Theme colour key (e.g. `accent1`, `dk1`). Empty string when the fill is a
3644
- * non-scheme fill (explicit sRGB, gradient, pattern, or none) that carries
3645
- * no theme colour reference; the renderer then resolves {@link color},
3646
- * {@link gradient}, {@link pattern}, or {@link noFill} instead.
3647
- */
3648
- schemeColor: string;
3649
- /** Tint value (0-100 000). */
3650
- tint?: number;
3651
- /** Shade value (0-100 000). */
3652
- shade?: number;
3653
- /**
3654
- * Alpha (opacity) value (0-100 000, where 100 000 is fully opaque) from an
3655
- * `a:alpha` child of `a:schemeClr`/`a:srgbClr`. Several built-in table
3656
- * styles (e.g. "Light Style 1/3", "Themed Style 1/2") band their rows with
3657
- * a partially transparent tint of the theme colour rather than a tint/shade
3658
- * blend.
3659
- */
3660
- alpha?: number;
3661
- /** Explicit sRGB hex colour (e.g. `#FF8800`) from `a:srgbClr`. */
3662
- color?: string;
3663
- /** The fill was `a:noFill`: renders transparent and clears lower layers. */
3664
- noFill?: boolean;
3665
- /** Gradient fill parsed from `a:gradFill`. */
3666
- gradient?: ParsedTableStyleGradient;
3667
- /** Preset pattern fill parsed from `a:pattFill`. */
3668
- pattern?: ParsedTableStylePattern;
3669
- /** Image texture fill parsed from `a:blipFill`. */
3670
- image?: ParsedTableStyleImage;
3671
- /**
3672
- * Set when the fill was resolved from `a:tcStyle/a:fillRef`: a JSON snapshot
3673
- * of the resolved fill (without this field). The save path compares it to
3674
- * tell an untouched reference from an edited fill.
3675
- */
3676
- fillRefSnapshot?: string;
3677
- }
3678
- /**
3679
- * An image texture fill parsed from a table style section's `a:blipFill`.
3680
- *
3681
- * `ppt/tableStyles.xml` is a presentation-level part parsed once (not
3682
- * per-slide), so this mirrors the per-CELL `a:tcPr/a:blipFill` two-field lazy
3683
- * pattern (`PptxTableCellStyle.backgroundImageFillPath` /
3684
- * `backgroundImageFillData`): `path` starts out as a raw archive-relative
3685
- * path (or an already-external `http(s):`/`data:` URL), and a load pipeline
3686
- * patches it to a displayable URL in `data` once resolved.
3687
- */
3688
- interface ParsedTableStyleImage {
3689
- /** Archive-relative path, or an already-displayable external/data URL. */
3690
- path?: string;
3691
- /** Displayable URL once a load pipeline has resolved `path`. */
3692
- data?: string;
3693
- }
3694
- /** A single colour stop within a {@link ParsedTableStyleGradient}. */
3695
- interface ParsedTableStyleGradientStop {
3696
- /** Stop position as a percentage (0-100). */
3697
- position: number;
3698
- /** Stop colour (scheme or explicit sRGB). */
3699
- fill: ParsedTableStyleFill;
3700
- }
3701
- /** A gradient fill parsed from a table style section's `a:gradFill`. */
3702
- interface ParsedTableStyleGradient {
3703
- /** Ordered colour stops. */
3704
- stops: ParsedTableStyleGradientStop[];
3705
- /** Linear gradient angle in degrees (from `a:lin@ang`, 60000ths -> deg). */
3706
- angle?: number;
3707
- /** Gradient family: linear (`a:lin`) or radial (`a:path`). */
3708
- type: 'linear' | 'radial';
3709
- }
3710
- /** A preset pattern fill parsed from a table style section's `a:pattFill`. */
3711
- interface ParsedTableStylePattern {
3712
- /** OOXML preset name (e.g. `ltDnDiag`) from `a:pattFill@prst`. */
3713
- preset: string;
3714
- /** Foreground colour (`a:fgClr`). */
3715
- foreground?: ParsedTableStyleFill;
3716
- /** Background colour (`a:bgClr`). */
3717
- background?: ParsedTableStyleFill;
3718
- }
3719
- /**
3720
- * A single entry in the parsed table style map.
3721
- *
3722
- * Contains fill colours for whole-table, banded rows/columns, first/last
3723
- * row, and first/last column sections.
3724
- *
3725
- * @example
3726
- * ```ts
3727
- * const entry: ParsedTableStyleEntry = {
3728
- * styleId: "{5C22544A-7EE6-4342-B048-85BDC9FD1C3A}",
3729
- * styleName: "Medium Style 2 - Accent 1",
3730
- * accentKey: "accent1",
3731
- * wholeTblFill: { schemeColor: "accent1", tint: 20000 },
3732
- * band1HFill: { schemeColor: "accent1", tint: 40000 },
3733
- * firstRowFill: { schemeColor: "accent1" },
3734
- * };
3735
- * // => satisfies ParsedTableStyleEntry
3736
- * ```
3737
- */
3738
- /** Text properties from a:tcTxStyle in a table style section. */
3739
- interface ParsedTableStyleText {
3740
- /** Font bold. */
3741
- bold?: boolean;
3742
- /** Font italic. */
3743
- italic?: boolean;
3744
- /** Font underline (from `a:tcTxStyle@u`, any value other than `none`). */
3745
- underline?: boolean;
3746
- /** Font colour as theme scheme key. */
3747
- fontSchemeColor?: string;
3748
- /** Font colour tint (0-100 000). */
3749
- fontTint?: number;
3750
- /** Font colour shade (0-100 000). */
3751
- fontShade?: number;
3752
- /** Explicit sRGB hex font colour (e.g. `#FF0000`) from `a:srgbClr`. */
3753
- fontColor?: string;
3754
- /** Typeface from `a:font@typeface` (latin font). */
3755
- fontFace?: string;
3756
- /** Font-collection index from `a:fontRef@idx` (`minor`, `major`, `none`). */
3757
- fontRefIdx?: string;
3758
- }
3759
- /**
3760
- * A single border side within a table style's `a:tcStyle/a:tcBdr`.
3761
- *
3762
- * Corresponds to one of `a:left`, `a:right`, `a:top`, `a:bottom`,
3763
- * `a:insideH`, `a:insideV`, `a:tl2br`, `a:tr2bl` (each a
3764
- * `CT_ThemeableLineStyle` wrapping an `a:ln`).
3765
- *
3766
- * @example
3767
- * ```ts
3768
- * const side: ParsedTableStyleBorder = {
3769
- * width: 1,
3770
- * dash: 'solid',
3771
- * fill: { schemeColor: 'lt1' },
3772
- * };
3773
- * // => satisfies ParsedTableStyleBorder
3774
- * ```
3775
- */
3776
- interface ParsedTableStyleBorder {
3777
- /** Line width in px (converted from the `a:ln@w` EMU value). */
3778
- width?: number;
3779
- /** OOXML `a:prstDash@val` (e.g. `solid`, `dash`, `sysDot`). */
3780
- dash?: string;
3781
- /** Compound line type from `a:ln@cmpd` (`sng`, `dbl`, `thickThin`, ...). */
3782
- compound?: string;
3783
- /** Border colour as a theme scheme fill (from `a:ln/a:solidFill/a:schemeClr`). */
3784
- fill?: ParsedTableStyleFill;
3785
- /** Explicit hex colour when the line used `a:srgbClr` (e.g. `#808080`). */
3786
- color?: string;
3787
- /** The line was `a:noFill` - an explicit "no border" that clears lower layers. */
3788
- noFill?: boolean;
3789
- /**
3790
- * Theme line-style reference (`<a:lnRef idx="N">`, the choice sibling of
3791
- * `a:ln`), as the "Themed Style" built-ins use. Set alone: the line's
3792
- * width, dash and colour come from the theme's `a:lnStyleLst[idx - 1]`
3793
- * with its `phClr` replaced by the reference's own colour.
3794
- */
3795
- lnRef?: ParsedTableFillRef;
3796
- }
3797
- /**
3798
- * The set of border sides parsed from a table style section's
3799
- * `a:tcStyle/a:tcBdr` element.
3800
- */
3801
- interface ParsedTableStyleBorders {
3802
- left?: ParsedTableStyleBorder;
3803
- right?: ParsedTableStyleBorder;
3804
- top?: ParsedTableStyleBorder;
3805
- bottom?: ParsedTableStyleBorder;
3806
- /** Interior horizontal borders between rows in the region. */
3807
- insideH?: ParsedTableStyleBorder;
3808
- /** Interior vertical borders between columns in the region. */
3809
- insideV?: ParsedTableStyleBorder;
3810
- /** Top-left to bottom-right diagonal. */
3811
- tl2br?: ParsedTableStyleBorder;
3812
- /**
3813
- * Top-right to bottom-left diagonal (`a:tr2bl`, ECMA-376's
3814
- * `CT_TableCellBorderStyle` sequence: left/right/top/bottom/insideH/
3815
- * insideV/tl2br/tr2bl). The field keeps its historical `bl2tr` spelling
3816
- * only in the sense that it names the same geometric anti-diagonal line
3817
- * (top-right-to-bottom-left and bottom-left-to-top-right describe one
3818
- * undirected diagonal); the parser accepts the real `a:tr2bl` element and,
3819
- * leniently, a legacy `a:bl2tr` this app previously wrote (issue G4).
3820
- */
3821
- tr2bl?: ParsedTableStyleBorder;
3822
- }
3823
- /**
3824
- * Table background style (CT_TableBackgroundStyle, ECMA-376 §21.1.3.7).
3825
- *
3826
- * Corresponds to the `<a:tblBg>` child of `<a:tblStyle>`. Captures the
3827
- * resolved scheme-fill colour, an unresolved style-matrix `a:fillRef`, and a
3828
- * presence flag for effects (verbatim XML for the effect list is preserved
3829
- * separately by the save path).
3830
- */
3831
- interface ParsedTableBackground {
3832
- /** Solid fill (resolved from `a:fill > a:solidFill > a:schemeClr`). */
3833
- fill?: ParsedTableStyleFill;
3834
- /**
3835
- * Style-matrix fill reference (`<a:fillRef idx="N">...</a:fillRef>`),
3836
- * mutually exclusive with {@link fill} (`a:fill` is the choice sibling of
3837
- * `a:fillRef` in `CT_TableBackgroundStyle`).
3838
- */
3839
- fillRef?: ParsedTableFillRef;
3840
- /**
3841
- * Style-matrix effect reference (`<a:effectRef idx="N">...</a:effectRef>`,
3842
- * "Themed Style 1/2"): the theme's effect style (usually an outer shadow)
3843
- * drawn under the whole table.
3844
- */
3845
- effectRef?: ParsedTableFillRef;
3846
- /** The outer shadow {@link effectRef} resolves to against a theme (set at render time). */
3847
- shadow?: ParsedTableBackgroundShadow;
3848
- /** Has an `a:effectLst` child that should be round-tripped. */
3849
- hasEffectLst?: boolean;
3850
- }
3851
- /** The outer shadow a table style's `a:tblBg/a:effectRef` resolves to (px, colour as `#RRGGBB`). */
3852
- interface ParsedTableBackgroundShadow {
3853
- color: string;
3854
- /** 0..1. */
3855
- opacity: number;
3856
- blur: number;
3857
- offsetX: number;
3858
- offsetY: number;
3859
- }
3860
- interface ParsedTableStyleEntry {
3861
- styleId: string;
3862
- styleName?: string;
3863
- /** Dominant accent key derived from fills (e.g. `accent1`). */
3864
- accentKey?: string;
3865
- /** Table-level background (`<a:tblBg>`). */
3866
- tableBackground?: ParsedTableBackground;
3867
- wholeTblFill?: ParsedTableStyleFill;
3868
- band1HFill?: ParsedTableStyleFill;
3869
- band2HFill?: ParsedTableStyleFill;
3870
- band1VFill?: ParsedTableStyleFill;
3871
- band2VFill?: ParsedTableStyleFill;
3872
- firstRowFill?: ParsedTableStyleFill;
3873
- lastRowFill?: ParsedTableStyleFill;
3874
- firstColFill?: ParsedTableStyleFill;
3875
- lastColFill?: ParsedTableStyleFill;
3876
- /** Corner cell fills (`<a:seCell>`, `<a:swCell>`, `<a:neCell>`, `<a:nwCell>`). */
3877
- seCellFill?: ParsedTableStyleFill;
3878
- swCellFill?: ParsedTableStyleFill;
3879
- neCellFill?: ParsedTableStyleFill;
3880
- nwCellFill?: ParsedTableStyleFill;
3881
- /**
3882
- * Per-role border styling from `a:tcStyle/a:tcBdr`. These supply the
3883
- * gridlines/edges a styled table inherits from its table style when the
3884
- * cells carry no explicit per-cell `a:lnX` overrides.
3885
- */
3886
- wholeTblBorders?: ParsedTableStyleBorders;
3887
- firstRowBorders?: ParsedTableStyleBorders;
3888
- lastRowBorders?: ParsedTableStyleBorders;
3889
- firstColBorders?: ParsedTableStyleBorders;
3890
- lastColBorders?: ParsedTableStyleBorders;
3891
- band1HBorders?: ParsedTableStyleBorders;
3892
- band2HBorders?: ParsedTableStyleBorders;
3893
- band1VBorders?: ParsedTableStyleBorders;
3894
- band2VBorders?: ParsedTableStyleBorders;
3895
- seCellBorders?: ParsedTableStyleBorders;
3896
- swCellBorders?: ParsedTableStyleBorders;
3897
- neCellBorders?: ParsedTableStyleBorders;
3898
- nwCellBorders?: ParsedTableStyleBorders;
3899
- /** Per-role text styling from a:tcTxStyle. */
3900
- wholeTblText?: ParsedTableStyleText;
3901
- firstRowText?: ParsedTableStyleText;
3902
- lastRowText?: ParsedTableStyleText;
3903
- firstColText?: ParsedTableStyleText;
3904
- lastColText?: ParsedTableStyleText;
3905
- band1HText?: ParsedTableStyleText;
3906
- band2HText?: ParsedTableStyleText;
3907
- band1VText?: ParsedTableStyleText;
3908
- band2VText?: ParsedTableStyleText;
3909
- seCellText?: ParsedTableStyleText;
3910
- swCellText?: ParsedTableStyleText;
3911
- neCellText?: ParsedTableStyleText;
3912
- nwCellText?: ParsedTableStyleText;
3913
- /**
3914
- * Per-role 3D bevel + lighting from `a:tcStyle/a:cell3D` (CT_Cell3D),
3915
- * distinct from the per-cell `a:tcPr/a:cell3D` {@link PptxTableCellStyle}
3916
- * already supports. None of PowerPoint's 74 built-in gallery styles use
3917
- * this (0 hits in the built-in catalogue), so it only matters for a
3918
- * hand-authored or third-party table style.
3919
- */
3920
- wholeTblCell3D?: PptxTableCell3D;
3921
- firstRowCell3D?: PptxTableCell3D;
3922
- lastRowCell3D?: PptxTableCell3D;
3923
- firstColCell3D?: PptxTableCell3D;
3924
- lastColCell3D?: PptxTableCell3D;
3925
- band1HCell3D?: PptxTableCell3D;
3926
- band2HCell3D?: PptxTableCell3D;
3927
- band1VCell3D?: PptxTableCell3D;
3928
- band2VCell3D?: PptxTableCell3D;
3929
- seCellCell3D?: PptxTableCell3D;
3930
- swCellCell3D?: PptxTableCell3D;
3931
- neCellCell3D?: PptxTableCell3D;
3932
- nwCellCell3D?: PptxTableCell3D;
3933
- }
3934
- /**
3935
- * Map of GUID → table style entry.
3936
- *
3937
- * Parsed from `ppt/tableStyles.xml` and indexed by the style GUID
3938
- * referenced in `a:tblPr@tblStyle`.
3939
- *
3940
- * @example
3941
- * ```ts
3942
- * const styles: ParsedTableStyleMap = {
3943
- * "{5C22544A-7EE6-4342-B048-85BDC9FD1C3A}": {
3944
- * styleId: "{5C22544A-7EE6-4342-B048-85BDC9FD1C3A}",
3945
- * styleName: "Medium Style 2 - Accent 1",
3946
- * accentKey: "accent1",
3947
- * },
3948
- * };
3949
- * // => satisfies ParsedTableStyleMap
3950
- * ```
3951
- */
3952
- type ParsedTableStyleMap = Record<string, ParsedTableStyleEntry>;
3953
3083
  /**
3954
3084
  * Discriminator for embedded media element types.
3955
3085
  *
@@ -5332,5 +4462,5 @@ type PptxElementWithText = TextPptxElement | ShapePptxElement | ConnectorPptxEle
5332
4462
  type PptxElementWithShapeStyle = TextPptxElement | ShapePptxElement | ConnectorPptxElement | ImagePptxElement | PicturePptxElement;
5333
4463
  /** Elements that hold raster image data. */
5334
4464
  type PptxImageLikeElement = ImagePptxElement | PicturePptxElement;
5335
- export { ParsedTableStyleEntry as $, PptxBackgroundRemoval as $n, PptxChartScatterStyle as $t, Model3DLightData as A, PptxChartBevelType as An, PptxChartDataLabelPosition as At, ElementAction as B, PptxChartFormatTarget as Bn, PptxChartFilteredSeries as Bt, SmartArtPptxElement as C, PptxChartPageSetup as Cn, PptxChartBandFmt as Ct, UnknownPptxElement as D, PptxChartPivotFormat as Dn, PptxChartData as Dt, TextPptxElement as E, PptxChartPivotSource as En, PptxChartChrome as Et, PlaceholderTextLevelStyle as F, PptxChartElementGlow as Fn, PptxChartDisplayUnitsLabel as Ft, MediaMetadata as G, PptxChartTextFill as Gn, PptxChartLegendTextStyle as Gt, PptxAction as H, PptxChartLineEndType as Hn, PptxChartHistogramOptions as Ht, PptxElementBase as I, PptxChartElementLine as In, PptxChartErrBarDir as It, PptxMediaType as J, parseChartFormatTargetKey as Jn, PptxChartMarker as Jt, PptxAudioCdPosition as K, PptxChartTextOutline as Kn, PptxChartLineStyle as Kt, PptxShapeProperties as L, PptxChartElementShadow as Ln, PptxChartErrBarType as Lt, Model3DTransformData as M, PptxChartElementFill as Mn, PptxChartDataPoint as Mt, Model3DVec3 as N, PptxChartElementFormat as Nn, PptxChartDataTable as Nt, ZoomPptxElement as O, PptxChartPivotFormats as On, PptxChartDataLabel as Ot, PlaceholderDefaults as P, PptxChartElementFormats as Pn, PptxChartDateCategories as Pt, ParsedTableStyleBorders as Q, PptxChartTickMark as Qn, PptxChartRegionMapOptions as Qt, PptxTextProperties as R, PptxChartElementText as Rn, PptxChartErrBars as Rt, ShapePptxElement as S, PptxChartPageMargins as Sn, PptxChartAxisNumFmt as St, TablePptxElement as T, PptxChartPrintSettings as Tn, PptxChartBoxWhiskerOptions as Tt, MediaBookmark as U, PptxChartPatternFill as Un, PptxChartLayouts as Ut, ElementActionType as V, PptxChartFormatTargetKey as Vn, PptxChartGradientFill as Vt, MediaCaptionTrack as W, PptxChartPictureFill as Wn, PptxChartLegendEntry as Wt, ParsedTableBackgroundShadow as X, PptxChartPictureFormat as Xn, PptxChartOfPieOptions as Xt, ParsedTableBackground as Y, PptxChartDataPointPicture as Yn, PptxChartMarkerSymbol as Yt, ParsedTableStyleBorder as Z, PptxChartAxisLabelFormatting as Zn, PptxChartParentLabelLayout as Zt, PptxElementWithText as _, PptxChartUserShapeParagraph as _n, TableStyleSectionPatch as _t, GroupPptxElement as a, PptxChartTrendlineLabel as an, PptxCustomDashSegment as ar, ParsedTableStylePattern as at, PptxNonVisualDescription as b, ResolvedChartStyleEntry as bn, PptxChart3DSurface as bt, MediaPptxElement as c, PptxChartUpDownBars as cn, PptxTableCell3D as ct, OlePptxElement as d, PptxCxValueColorPosition as dn, PptxTableCellTextRun as dt, PptxChartSeries as en, PptxBackgroundRemovalMark as er, ParsedTableStyleFill as et, PicturePptxElement as f, PptxEmbeddedWorkbookData as fn, PptxTableData as ft, PptxElementWithShapeStyle as g, PptxChartUserShapeGroupTransform as gn, ParsedTableStyleEffect as gt, PptxElementType as h, PptxChartUserShapeGroupChild as hn, ParsedTableFillRef as ht, ContentPartPptxElement as i, PptxChartTrendline as in, PptxImageProperties as ir, ParsedTableStyleMap as it, Model3DSceneData as j, PptxChartElementEffects as jn, PptxChartDataLabelsRange as jt, Model3DCamera as k, PptxChartBevel as kn, PptxChartDataLabelOptions as kt, Model3DPptxElement as l, PptxChartView3D as ln, PptxTableCellParagraph as lt, PptxElement as m, PptxChartUserShape as mn, CreateTableStyleOptions as mt, ConnectorPptxElement as n, PptxChartStyle as nn, PptxImageEffects as nr, ParsedTableStyleGradientStop as nt, ImagePptxElement as o, PptxChartTrendlineType as on, ResolvedStyleMatrix as or, ParsedTableStyleText as ot, PptxAccessibilityProperties as p, PptxExternalData as pn, PptxTableRow as pt, PptxMediaReferenceKind as q, chartFormatTargetKey as qn, PptxChartManualLayout as qt, ContentPartInkStroke as r, PptxChartTreemapOptions as rn, PptxImagePrerenderedCorrections as rr, ParsedTableStyleImage as rt, InkPptxElement as s, PptxChartType as sn, ShapeStyle as sr, PptxTableCell as st, ChartPptxElement as t, PptxChartShapeProps as tn, PptxCropShape as tr, ParsedTableStyleGradient as tt, OleObjectType as u, PptxChartWaterfallOptions as un, PptxTableCellStyle as ut, PptxGraphicFrameExtension as v, PptxChartTitleRun as vn, PptxBar3DShape as vt, SummaryZoomTarget as w, PptxChartPrintHeaderFooter as wn, PptxChartBarDirection as wt, PptxPictureNonVisualProperties as x, PptxChartProtection as xn, PptxChartAxisFormatting as xt, PptxImageLikeElement as y, ResolvedChartStyleDefinition as yn, PptxBubbleChartOptions as yt, ActionButtonPreset as z, PptxChartElementThreeD as zn, PptxChartErrValType as zt };
5336
- //# sourceMappingURL=elements-6BMEOo7i.d.ts.map
4465
+ export { PptxChartAxisNumFmt as $, PptxChartPageMargins as $t, Model3DLightData as A, PptxBackgroundRemoval as An, PptxChartScatterStyle as At, ElementAction as B, PptxChartView3D as Bt, SmartArtPptxElement as C, PptxChartTextOutline as Cn, PptxChartLineStyle as Ct, UnknownPptxElement as D, PptxChartPictureFormat as Dn, PptxChartOfPieOptions as Dt, TextPptxElement as E, PptxChartDataPointPicture as En, PptxChartMarkerSymbol as Et, PlaceholderTextLevelStyle as F, PptxImageProperties as Fn, PptxChartTrendline as Ft, MediaMetadata as G, PptxChartUserShape as Gt, PptxAction as H, PptxCxValueColorPosition as Ht, PptxElementBase as I, PptxCustomDashSegment as In, PptxChartTrendlineLabel as It, PptxMediaType as J, PptxChartUserShapeParagraph as Jt, PptxAudioCdPosition as K, PptxChartUserShapeGroupChild as Kt, PptxShapeProperties as L, ResolvedStyleMatrix as Ln, PptxChartTrendlineType as Lt, Model3DTransformData as M, PptxCropShape as Mn, PptxChartShapeProps as Mt, Model3DVec3 as N, PptxImageEffects as Nn, PptxChartStyle as Nt, ZoomPptxElement as O, PptxChartAxisLabelFormatting as On, PptxChartParentLabelLayout as Ot, PlaceholderDefaults as P, PptxImagePrerenderedCorrections as Pn, PptxChartTreemapOptions as Pt, PptxChartAxisFormatting as Q, PptxChartProtection as Qt, PptxTextProperties as R, ShapeStyle as Rn, PptxChartType as Rt, ShapePptxElement as S, PptxChartTextFill as Sn, PptxChartLegendTextStyle as St, TablePptxElement as T, parseChartFormatTargetKey as Tn, PptxChartMarker as Tt, MediaBookmark as U, PptxEmbeddedWorkbookData as Ut, ElementActionType as V, PptxChartWaterfallOptions as Vt, MediaCaptionTrack as W, PptxExternalData as Wt, PptxBubbleChartOptions as X, ResolvedChartStyleDefinition as Xt, PptxBar3DShape as Y, PptxChartTitleRun as Yt, PptxChart3DSurface as Z, ResolvedChartStyleEntry as Zt, PptxElementWithText as _, PptxChartFormatTarget as _n, PptxChartFilteredSeries as _t, GroupPptxElement as a, PptxChartPivotFormats as an, PptxChartDataLabel as at, PptxNonVisualDescription as b, PptxChartPatternFill as bn, PptxChartLayouts as bt, MediaPptxElement as c, PptxChartElementEffects as cn, PptxChartDataLabelsRange as ct, OlePptxElement as d, PptxChartElementFormats as dn, PptxChartDateCategories as dt, PptxChartPageSetup as en, PptxChartBandFmt as et, PicturePptxElement as f, PptxChartElementGlow as fn, PptxChartDisplayUnitsLabel as ft, PptxElementWithShapeStyle as g, PptxChartElementThreeD as gn, PptxChartErrValType as gt, PptxElementType as h, PptxChartElementText as hn, PptxChartErrBars as ht, ContentPartPptxElement as i, PptxChartPivotFormat as in, PptxChartData as it, Model3DSceneData as j, PptxBackgroundRemovalMark as jn, PptxChartSeries as jt, Model3DCamera as k, PptxChartTickMark as kn, PptxChartRegionMapOptions as kt, Model3DPptxElement as l, PptxChartElementFill as ln, PptxChartDataPoint as lt, PptxElement as m, PptxChartElementShadow as mn, PptxChartErrBarType as mt, ConnectorPptxElement as n, PptxChartPrintSettings as nn, PptxChartBoxWhiskerOptions as nt, ImagePptxElement as o, PptxChartBevel as on, PptxChartDataLabelOptions as ot, PptxAccessibilityProperties as p, PptxChartElementLine as pn, PptxChartErrBarDir as pt, PptxMediaReferenceKind as q, PptxChartUserShapeGroupTransform as qt, ContentPartInkStroke as r, PptxChartPivotSource as rn, PptxChartChrome as rt, InkPptxElement as s, PptxChartBevelType as sn, PptxChartDataLabelPosition as st, ChartPptxElement as t, PptxChartPrintHeaderFooter as tn, PptxChartBarDirection as tt, OleObjectType as u, PptxChartElementFormat as un, PptxChartDataTable as ut, PptxGraphicFrameExtension as v, PptxChartFormatTargetKey as vn, PptxChartGradientFill as vt, SummaryZoomTarget as w, chartFormatTargetKey as wn, PptxChartManualLayout as wt, PptxPictureNonVisualProperties as x, PptxChartPictureFill as xn, PptxChartLegendEntry as xt, PptxImageLikeElement as y, PptxChartLineEndType as yn, PptxChartHistogramOptions as yt, ActionButtonPreset as z, PptxChartUpDownBars as zt };
4466
+ //# sourceMappingURL=elements-PBugbKtv.d.ts.map