ooxml-core 1.47.0 → 1.48.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/PptxHandler-6UQWMUVU.cjs +14 -0
- package/dist/{PptxHandler-NXHZ6ITL.mjs → PptxHandler-PLSH2BAS.mjs} +2 -2
- package/dist/PptxHandler-QLKZVYCG.mjs +5 -0
- package/dist/{PresentationBuilder-URSPID7L.mjs → PresentationBuilder-3QXOJNRO.mjs} +2 -2
- package/dist/{PresentationBuilder-IK6NIK6T.cjs → PresentationBuilder-CRBFFHNW.cjs} +6 -6
- package/dist/{PresentationBuilder-LHQ333UL.mjs → PresentationBuilder-DQ3XFU4R.mjs} +3 -3
- package/dist/{chunk-QHR726W3.mjs → chunk-32K7JG2Z.mjs} +1 -1
- package/dist/{chunk-APCA7N6Q.cjs → chunk-7RCBSNXT.cjs} +3 -3
- package/dist/{chunk-6MU4WKHS.mjs → chunk-CXIDPUT6.mjs} +1 -1
- package/dist/{chunk-553WFEHD.mjs → chunk-EKEE6BTU.mjs} +638 -50
- package/dist/{chunk-XVEJS7HN.mjs → chunk-IKFTITJ7.mjs} +4 -4
- package/dist/{chunk-7L6ZAA5Y.mjs → chunk-K5G6MV37.mjs} +2 -2
- package/dist/{chunk-4GPLQEEC.cjs → chunk-RRA262A6.cjs} +1926 -1326
- package/dist/{chunk-5HNRZOBX.mjs → chunk-WAYEYX4G.mjs} +1 -1
- package/dist/{chunk-Z734BYYR.mjs → chunk-WLKOLTBH.mjs} +653 -53
- package/dist/pptx/automation/index.cjs +45094 -44442
- package/dist/pptx/automation/index.d.ts +5 -12
- package/dist/pptx/automation/index.d.ts.map +1 -1
- package/dist/pptx/automation/index.mjs +5 -5
- package/dist/pptx/automation/schemas/chart-formatting-schemas.d.ts +1 -1
- package/dist/pptx/automation/schemas/chart-formatting-schemas.d.ts.map +1 -1
- package/dist/pptx/automation/schemas/chart-schemas.d.ts +1 -1
- package/dist/pptx/automation/schemas/chart-schemas.d.ts.map +1 -1
- package/dist/pptx/automation/schemas/chart-user-shape-schemas.d.ts +1 -1
- package/dist/pptx/automation/schemas/chart-user-shape-schemas.d.ts.map +1 -1
- package/dist/pptx/automation/schemas/element-schemas.d.ts +1 -1
- package/dist/pptx/automation/schemas/element-schemas.d.ts.map +1 -1
- package/dist/pptx/automation/schemas/export-schemas.d.ts +1 -1
- package/dist/pptx/automation/schemas/export-schemas.d.ts.map +1 -1
- package/dist/pptx/automation/schemas/geometry-schemas.d.ts +1 -1
- package/dist/pptx/automation/schemas/geometry-schemas.d.ts.map +1 -1
- package/dist/pptx/automation/schemas/hyperlink-schemas.d.ts +1 -1
- package/dist/pptx/automation/schemas/hyperlink-schemas.d.ts.map +1 -1
- package/dist/pptx/automation/schemas/index.d.ts +8 -8
- package/dist/pptx/automation/schemas/index.d.ts.map +1 -1
- package/dist/pptx/automation/schemas/json-schemas.d.ts +1 -1
- package/dist/pptx/automation/schemas/json-schemas.d.ts.map +1 -1
- package/dist/pptx/automation/schemas/layout-schemas.d.ts +1 -1
- package/dist/pptx/automation/schemas/layout-schemas.d.ts.map +1 -1
- package/dist/pptx/automation/schemas/lock-schemas.d.ts +1 -1
- package/dist/pptx/automation/schemas/lock-schemas.d.ts.map +1 -1
- package/dist/pptx/automation/schemas/metadata-schemas.d.ts +1 -1
- package/dist/pptx/automation/schemas/metadata-schemas.d.ts.map +1 -1
- package/dist/pptx/automation/schemas/ole-schemas.d.ts +1 -1
- package/dist/pptx/automation/schemas/ole-schemas.d.ts.map +1 -1
- package/dist/pptx/automation/schemas/presentation-schemas.d.ts +1 -1
- package/dist/pptx/automation/schemas/presentation-schemas.d.ts.map +1 -1
- package/dist/pptx/automation/schemas/section-schemas.d.ts +1 -1
- package/dist/pptx/automation/schemas/section-schemas.d.ts.map +1 -1
- package/dist/pptx/automation/schemas/slide-schemas.d.ts +1 -1
- package/dist/pptx/automation/schemas/slide-schemas.d.ts.map +1 -1
- package/dist/pptx/automation/schemas/smartart-schemas.d.ts +1 -1
- package/dist/pptx/automation/schemas/smartart-schemas.d.ts.map +1 -1
- package/dist/pptx/automation/schemas/table-style-schemas.d.ts +1 -1
- package/dist/pptx/automation/schemas/table-style-schemas.d.ts.map +1 -1
- package/dist/pptx/automation/schemas/template-schemas.d.ts +1 -1
- package/dist/pptx/automation/schemas/template-schemas.d.ts.map +1 -1
- package/dist/pptx/automation/schemas/theme-schemas.d.ts +1 -1
- package/dist/pptx/automation/schemas/theme-schemas.d.ts.map +1 -1
- package/dist/pptx/automation/schemas/validation-schemas.d.ts +1 -1
- package/dist/pptx/automation/schemas/validation-schemas.d.ts.map +1 -1
- package/dist/pptx/chunks/color-primitives-DHyz14D9.d.ts +151 -0
- package/dist/pptx/chunks/color-primitives-DHyz14D9.d.ts.map +1 -0
- package/dist/pptx/chunks/{index--HBUyILF.d.ts → index-7tA9HqRL.d.ts} +10060 -1223
- package/dist/pptx/chunks/index-7tA9HqRL.d.ts.map +1 -0
- package/dist/pptx/chunks/{index-Dr3iIPt9.d.ts → index-CAzt1jbx.d.ts} +4 -5
- package/dist/pptx/chunks/index-CAzt1jbx.d.ts.map +1 -0
- package/dist/pptx/chunks/{schemas-LHsDbVOw.d.ts → index-CyAgQ2zG.d.ts} +6 -2
- package/dist/pptx/chunks/index-CyAgQ2zG.d.ts.map +1 -0
- package/dist/pptx/chunks/index-cJSPBkU1.d.ts +185 -0
- package/dist/pptx/chunks/index-cJSPBkU1.d.ts.map +1 -0
- package/dist/pptx/chunks/index-cr_sgz1w.d.ts +94 -0
- package/dist/pptx/chunks/index-cr_sgz1w.d.ts.map +1 -0
- package/dist/pptx/chunks/presentation-Be108jrz.d.ts +12521 -0
- package/dist/pptx/chunks/presentation-Be108jrz.d.ts.map +1 -0
- package/dist/pptx/chunks/{inspection-status-TKac7eqb.d.ts → signature-inspection-status-TKac7eqb.d.ts} +1 -1
- package/dist/pptx/chunks/signature-inspection-status-TKac7eqb.d.ts.map +1 -0
- package/dist/pptx/chunks/text-operations-a1cqBYk9.d.ts +111 -0
- package/dist/pptx/chunks/text-operations-a1cqBYk9.d.ts.map +1 -0
- package/dist/pptx/cli/index.cjs +746 -94
- package/dist/pptx/cli/index.d.ts +17 -1
- package/dist/pptx/cli/index.d.ts.map +1 -1
- package/dist/pptx/cli/index.mjs +4 -4
- package/dist/pptx/converter/index.d.ts +1 -1
- package/dist/pptx/converter/index.mjs +2 -2
- package/dist/pptx/editor/ai/table-merge.d.ts +16 -0
- package/dist/pptx/editor/ai/table-merge.d.ts.map +1 -1
- package/dist/pptx/editor/loader/element-patch-walker.d.ts +15 -0
- package/dist/pptx/editor/loader/element-patch-walker.d.ts.map +1 -1
- package/dist/pptx/editor/loader/lazy-image-resolution.d.ts +15 -0
- package/dist/pptx/editor/loader/lazy-image-resolution.d.ts.map +1 -1
- package/dist/pptx/editor/loader/load-content-helpers.d.ts +7 -0
- package/dist/pptx/editor/loader/load-content-helpers.d.ts.map +1 -1
- package/dist/pptx/editor/loader/table-style-image-paths.d.ts +20 -0
- package/dist/pptx/editor/loader/table-style-image-paths.d.ts.map +1 -1
- package/dist/pptx/editor/loader/text-fill-image-paths.d.ts +19 -0
- package/dist/pptx/editor/loader/text-fill-image-paths.d.ts.map +1 -1
- package/dist/pptx/editor/render/bullet-autonum.d.ts +14 -0
- package/dist/pptx/editor/render/bullet-list.d.ts +8 -0
- package/dist/pptx/editor/render/bullet-list.d.ts.map +1 -1
- package/dist/pptx/editor/render/bullet-toggle.d.ts +4 -0
- package/dist/pptx/editor/render/bullet-toggle.d.ts.map +1 -1
- package/dist/pptx/editor/render/chart-user-shape-edit.d.ts +12 -0
- package/dist/pptx/editor/render/chart-user-shape-edit.d.ts.map +1 -1
- package/dist/pptx/editor/render/clone.d.ts +20 -0
- package/dist/pptx/editor/render/clone.d.ts.map +1 -1
- package/dist/pptx/editor/render/collaboration-assets.d.ts +17 -0
- package/dist/pptx/editor/render/collaboration-live-patch-target.d.ts +9 -0
- package/dist/pptx/editor/render/collaboration-live-patch-target.d.ts.map +1 -1
- package/dist/pptx/editor/render/collaboration-reconcile.d.ts +21 -0
- package/dist/pptx/editor/render/collaboration-reconcile.d.ts.map +1 -1
- package/dist/pptx/editor/render/collaboration-sync.d.ts +32 -4
- package/dist/pptx/editor/render/collaboration-sync.d.ts.map +1 -1
- package/dist/pptx/editor/render/collaboration-text-codec.d.ts +33 -2
- package/dist/pptx/editor/render/collaboration-text-codec.d.ts.map +1 -0
- package/dist/pptx/editor/render/collaboration-text-merge.d.ts +36 -2
- package/dist/pptx/editor/render/collaboration-text-merge.d.ts.map +1 -0
- package/dist/pptx/editor/render/collaboration-text-native-edit.d.ts +2 -2
- package/dist/pptx/editor/render/collaboration-text-positions.d.ts +34 -2
- package/dist/pptx/editor/render/collaboration-text-positions.d.ts.map +1 -0
- package/dist/pptx/editor/render/collaboration-text-projection.d.ts +1 -1
- package/dist/pptx/editor/render/collaboration-text-session-apply.d.ts +3 -3
- package/dist/pptx/editor/render/collaboration-text-session-delta.d.ts +36 -2
- package/dist/pptx/editor/render/collaboration-text-session-delta.d.ts.map +1 -0
- package/dist/pptx/editor/render/collaboration-text-session-paragraph.d.ts +1 -1
- package/dist/pptx/editor/render/collaboration-text-session.d.ts +40 -2
- package/dist/pptx/editor/render/collaboration-text-session.d.ts.map +1 -0
- package/dist/pptx/editor/render/collaboration-text-snapshot-positions.d.ts +2 -2
- package/dist/pptx/editor/render/custom-show-operations.cjs +2 -2
- package/dist/pptx/editor/render/custom-show-operations.d.ts +14 -0
- package/dist/pptx/editor/render/custom-show-operations.d.ts.map +1 -1
- package/dist/pptx/editor/render/custom-show-operations.mjs +1 -1
- package/dist/pptx/editor/render/deck-save-encryption.d.ts +24 -0
- package/dist/pptx/editor/render/deck-save-encryption.d.ts.map +1 -1
- package/dist/pptx/editor/render/element-locks.d.ts +25 -0
- package/dist/pptx/editor/render/element-locks.d.ts.map +1 -1
- package/dist/pptx/editor/render/element-operations.d.ts +11 -0
- package/dist/pptx/editor/render/element-operations.d.ts.map +1 -1
- package/dist/pptx/editor/render/element.d.ts +12 -0
- package/dist/pptx/editor/render/element.d.ts.map +1 -1
- package/dist/pptx/editor/render/find-replace.cjs +15 -15
- package/dist/pptx/editor/render/find-replace.d.ts +8 -2
- package/dist/pptx/editor/render/find-replace.d.ts.map +1 -1
- package/dist/pptx/editor/render/find-replace.mjs +2 -2
- package/dist/pptx/editor/render/font-family-update.d.ts +32 -1
- package/dist/pptx/editor/render/font-family-update.d.ts.map +1 -1
- package/dist/pptx/editor/render/group-drill.d.ts +26 -0
- package/dist/pptx/editor/render/group-drill.d.ts.map +1 -1
- package/dist/pptx/editor/render/group-ops.d.ts +24 -0
- package/dist/pptx/editor/render/paragraph-geometry-overrides.d.ts +21 -1
- package/dist/pptx/editor/render/paragraph-geometry-overrides.d.ts.map +1 -1
- package/dist/pptx/editor/render/remap-text.d.ts +5 -0
- package/dist/pptx/editor/render/remap-text.d.ts.map +1 -1
- package/dist/pptx/editor/render/section-operations.d.ts +14 -0
- package/dist/pptx/editor/render/section-operations.d.ts.map +1 -1
- package/dist/pptx/editor/render/slide-background-patch.d.ts +15 -0
- package/dist/pptx/editor/render/slide-background-patch.d.ts.map +1 -1
- package/dist/pptx/editor/render/slide-operations.cjs +9 -9
- package/dist/pptx/editor/render/slide-operations.d.ts +12 -0
- package/dist/pptx/editor/render/slide-operations.d.ts.map +1 -1
- package/dist/pptx/editor/render/slide-operations.mjs +3 -3
- package/dist/pptx/editor/render/slide-search.d.ts +6 -0
- package/dist/pptx/editor/render/slide-search.d.ts.map +1 -1
- package/dist/pptx/editor/render/slide-size-rescale.d.ts +18 -0
- package/dist/pptx/editor/render/slide-size-rescale.d.ts.map +1 -1
- package/dist/pptx/editor/render/slide-transition-edits.d.ts +15 -0
- package/dist/pptx/editor/render/slide-transition-edits.d.ts.map +1 -1
- package/dist/pptx/editor/render/table-cell-edit.d.ts +8 -0
- package/dist/pptx/editor/render/table-cell-edit.d.ts.map +1 -1
- package/dist/pptx/editor/render/table-cell-merge.d.ts +15 -0
- package/dist/pptx/editor/render/table-cell-merge.d.ts.map +1 -1
- package/dist/pptx/editor/render/table-data-grid-ops.d.ts +26 -0
- package/dist/pptx/editor/render/table-data-grid-ops.d.ts.map +1 -1
- package/dist/pptx/editor/render/table-layout.d.ts +3 -1
- package/dist/pptx/editor/render/table-layout.d.ts.map +1 -1
- package/dist/pptx/editor/render/table-merge.d.ts +16 -0
- package/dist/pptx/editor/render/table-merge.d.ts.map +1 -1
- package/dist/pptx/editor/render/table-style-editor-descriptor.d.ts +13 -0
- package/dist/pptx/editor/render/table-style-editor-descriptor.d.ts.map +1 -1
- package/dist/pptx/editor/render/table-style-editor-edit.d.ts +13 -0
- package/dist/pptx/editor/render/table-style-editor-edit.d.ts.map +1 -1
- package/dist/pptx/editor/render/table-style-editor-parts.d.ts +10 -0
- package/dist/pptx/editor/render/table-style-editor-parts.d.ts.map +1 -1
- package/dist/pptx/editor/render/table-style-map-edits.d.ts +20 -0
- package/dist/pptx/editor/render/table-style-map-edits.d.ts.map +1 -1
- package/dist/pptx/editor/render/text-content-style.d.ts +2 -1
- package/dist/pptx/editor/render/text-content-style.d.ts.map +1 -1
- package/dist/pptx/editor/render/text-runs-style-patch.d.ts +2 -2
- package/dist/pptx/editor/render/text-segment-paragraph-break.d.ts +23 -0
- package/dist/pptx/editor/render/text-segment-paragraph-break.d.ts.map +1 -1
- package/dist/pptx/editor/render/text-style-scope.d.ts +20 -2
- package/dist/pptx/editor/render/text-style-scope.d.ts.map +1 -1
- package/dist/pptx/editor/render/text-theme.d.ts +11 -0
- package/dist/pptx/editor/render/text-theme.d.ts.map +1 -1
- package/dist/pptx/editor/render/theme-editor-presets.d.ts +9 -0
- package/dist/pptx/editor/render/theme-editor-presets.d.ts.map +1 -1
- package/dist/pptx/editor/render/update-text-segment-style.d.ts +2 -1
- package/dist/pptx/editor/render/update-text-segment-style.d.ts.map +1 -1
- package/dist/pptx/index.cjs +34610 -33974
- package/dist/pptx/index.d.ts +24 -10
- package/dist/pptx/index.mjs +5 -5
- package/dist/pptx/node/index.d.ts +17 -1
- package/dist/pptx/node/index.d.ts.map +1 -1
- package/dist/pptx/signature-node/index.d.ts +8 -1
- package/dist/pptx/signature-node/index.d.ts.map +1 -1
- package/dist/pptx/smartart-layouts/index.d.ts +8 -1
- package/dist/pptx/smartart-layouts/index.d.ts.map +1 -1
- package/dist/pptx/ui/index.d.ts +2 -0
- package/dist/pptx/ui/index.d.ts.map +1 -1
- package/package.json +8 -8
- package/dist/PptxHandler-JX62VKU4.cjs +0 -14
- package/dist/PptxHandler-SUGLNSZI.mjs +0 -5
- package/dist/pptx/chunks/collaboration-text-codec-1VmwD3yq.d.ts +0 -34
- package/dist/pptx/chunks/collaboration-text-codec-1VmwD3yq.d.ts.map +0 -1
- package/dist/pptx/chunks/collaboration-text-merge-B-tth-0W.d.ts +0 -19
- package/dist/pptx/chunks/collaboration-text-merge-B-tth-0W.d.ts.map +0 -1
- package/dist/pptx/chunks/collaboration-text-positions-D-1Jo1Fz.d.ts +0 -34
- package/dist/pptx/chunks/collaboration-text-positions-D-1Jo1Fz.d.ts.map +0 -1
- package/dist/pptx/chunks/collaboration-text-session-CWHTaWF4.d.ts +0 -41
- package/dist/pptx/chunks/collaboration-text-session-CWHTaWF4.d.ts.map +0 -1
- package/dist/pptx/chunks/collaboration-text-session-delta-Dxzybssp.d.ts +0 -37
- package/dist/pptx/chunks/collaboration-text-session-delta-Dxzybssp.d.ts.map +0 -1
- package/dist/pptx/chunks/elements-B4Z6N-Gz.d.ts +0 -3993
- package/dist/pptx/chunks/elements-B4Z6N-Gz.d.ts.map +0 -1
- package/dist/pptx/chunks/index--HBUyILF.d.ts.map +0 -1
- package/dist/pptx/chunks/index-BDVzSboe.d.ts +0 -9746
- package/dist/pptx/chunks/index-BDVzSboe.d.ts.map +0 -1
- package/dist/pptx/chunks/index-Dr3iIPt9.d.ts.map +0 -1
- package/dist/pptx/chunks/inspection-status-TKac7eqb.d.ts.map +0 -1
- package/dist/pptx/chunks/schemas-LHsDbVOw.d.ts.map +0 -1
- package/dist/pptx/chunks/smart-art-DB37AsFP.d.ts +0 -1817
- package/dist/pptx/chunks/smart-art-DB37AsFP.d.ts.map +0 -1
- package/dist/pptx/chunks/table-BfgZfw5R.d.ts +0 -1359
- package/dist/pptx/chunks/table-BfgZfw5R.d.ts.map +0 -1
- package/dist/pptx/chunks/text-operations-CVHXOSit.d.ts +0 -3363
- package/dist/pptx/chunks/text-operations-CVHXOSit.d.ts.map +0 -1
- package/dist/pptx/chunks/text-t_wJ2OwM.d.ts +0 -1452
- package/dist/pptx/chunks/text-t_wJ2OwM.d.ts.map +0 -1
- /package/dist/{chunk-WFN6ZU7N.cjs → chunk-HBQBS7PO.cjs} +0 -0
- /package/dist/{chunk-DEDK2J57.mjs → chunk-I5REMIZR.mjs} +0 -0
|
@@ -1,1359 +0,0 @@
|
|
|
1
|
-
import { C as ConnectorConnectionPoint, D as StrokeDashType, E as ShadowEffect, S as ConnectorArrowType, i as TextStyle, k as XmlObject, l as EffectDagContainer, v as Pptx3DShape, x as DrawingScene3D } from "./text-t_wJ2OwM.js";
|
|
2
|
-
import { t as PptxThemeColorRef } from "./color-ref-CwUQoKPJ.js";
|
|
3
|
-
interface PptxCustomDashSegment {
|
|
4
|
-
/** Dash length as a non-negative percentage in thousandths of one percent. */
|
|
5
|
-
dash: number;
|
|
6
|
-
/** Space length as a non-negative percentage in thousandths of one percent. */
|
|
7
|
-
space: number;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Comprehensive visual style for a shape, connector, or image element.
|
|
11
|
-
*
|
|
12
|
-
* All fields are optional. When absent, the element inherits from theme
|
|
13
|
-
* or layout defaults. The interface models both simple styling (solid fill +
|
|
14
|
-
* basic stroke) and advanced effects (multiple shadow layers, gradient
|
|
15
|
-
* fills, 3-D extrusion).
|
|
16
|
-
*
|
|
17
|
-
* @example
|
|
18
|
-
* ```ts
|
|
19
|
-
* // Simple blue filled shape with a thin black outline:
|
|
20
|
-
* const simple: ShapeStyle = {
|
|
21
|
-
* fillColor: "#0055AA",
|
|
22
|
-
* fillMode: "solid",
|
|
23
|
-
* strokeColor: "#000000",
|
|
24
|
-
* strokeWidth: 1,
|
|
25
|
-
* };
|
|
26
|
-
*
|
|
27
|
-
* // Gradient fill with a soft shadow:
|
|
28
|
-
* const fancy: ShapeStyle = {
|
|
29
|
-
* fillMode: "gradient",
|
|
30
|
-
* fillGradientType: "linear",
|
|
31
|
-
* fillGradientAngle: 135,
|
|
32
|
-
* fillGradientStops: [
|
|
33
|
-
* { color: "#FF6B6B", position: 0 },
|
|
34
|
-
* { color: "#556270", position: 1 },
|
|
35
|
-
* ],
|
|
36
|
-
* shadowColor: "#000000",
|
|
37
|
-
* shadowBlur: 10,
|
|
38
|
-
* shadowOffsetX: 4,
|
|
39
|
-
* shadowOffsetY: 4,
|
|
40
|
-
* shadowOpacity: 0.3,
|
|
41
|
-
* };
|
|
42
|
-
* // => both satisfy the ShapeStyle interface
|
|
43
|
-
* ```
|
|
44
|
-
*/
|
|
45
|
-
interface ShapeStyle {
|
|
46
|
-
fillColor?: string;
|
|
47
|
-
/**
|
|
48
|
-
* Raw XML colour-choice node preserved from `a:solidFill` for round-trip
|
|
49
|
-
* serialisation. Captures `a:schemeClr` / `a:sysClr` / `a:prstClr` /
|
|
50
|
-
* `a:srgbClr` plus colour transforms (`lumMod`, `lumOff`, `tint`,
|
|
51
|
-
* `shade`, `satMod`, `alpha`, …). On save we re-emit verbatim when the
|
|
52
|
-
* resolved {@link fillColor} still matches this node, otherwise we fall
|
|
53
|
-
* back to canonical `<a:srgbClr>`.
|
|
54
|
-
*/
|
|
55
|
-
fillColorXml?: XmlObject;
|
|
56
|
-
/**
|
|
57
|
-
* Typed theme colour reference for the fill, set when {@link fillColorXml}
|
|
58
|
-
* is a plain `a:schemeClr` (see `themeColorRefFromColorChoice`). When
|
|
59
|
-
* present it WINS on save: the writer emits `<a:schemeClr>` from this ref
|
|
60
|
-
* instead of the resolved {@link fillColor}, so the fill keeps following
|
|
61
|
-
* the theme palette after a later theme change. `undefined` means the fill
|
|
62
|
-
* is a plain hex (or a colour kind a ref cannot express).
|
|
63
|
-
*/
|
|
64
|
-
fillColorRef?: PptxThemeColorRef;
|
|
65
|
-
fillGradient?: string;
|
|
66
|
-
/** Original `gradFill` XML retained for unknown-child and extension round-tripping. */
|
|
67
|
-
fillGradientXml?: XmlObject;
|
|
68
|
-
fillMode?: 'solid' | 'gradient' | 'pattern' | 'none' | 'image' | 'theme' | 'group';
|
|
69
|
-
/**
|
|
70
|
-
* `<p:sp useBgFill="1">`: the shape paints with the SLIDE BACKGROUND's fill
|
|
71
|
-
* rather than its own or its theme style's.
|
|
72
|
-
*
|
|
73
|
-
* PowerPoint's designer emits full-bleed rectangles this way, and they also
|
|
74
|
-
* carry an `a:fillRef` pointing at `accent1`. Ignoring the attribute painted
|
|
75
|
-
* those panels in the accent colour, so a black-and-white title slide came out
|
|
76
|
-
* black-and-blue. The load pipeline copies the resolved slide background onto
|
|
77
|
-
* the fill fields; the flag stays for round-trip and for renderers that want
|
|
78
|
-
* to re-resolve against a changed background.
|
|
79
|
-
*/
|
|
80
|
-
useBackgroundFill?: boolean;
|
|
81
|
-
fillPatternPreset?: string;
|
|
82
|
-
fillPatternBackgroundColor?: string;
|
|
83
|
-
/** Original `pattFill` XML retained for unknown-child round-tripping. */
|
|
84
|
-
fillPatternXml?: XmlObject;
|
|
85
|
-
/** Raw XML node for pattern fill foreground colour (preserves color transforms). */
|
|
86
|
-
fillPatternFgClrXml?: XmlObject;
|
|
87
|
-
/** Raw XML node for pattern fill background colour (preserves color transforms). */
|
|
88
|
-
fillPatternBgClrXml?: XmlObject;
|
|
89
|
-
/** Data-URI or URL for image fill (when fillMode === "image"). */
|
|
90
|
-
fillImageUrl?: string;
|
|
91
|
-
/** How the image is sized within the shape: stretch to fill, or tile/repeat. */
|
|
92
|
-
fillImageMode?: 'stretch' | 'tile';
|
|
93
|
-
/** Whether the image fill rotates/flips with the shape (`a:blipFill/@rotWithShape`).
|
|
94
|
-
* Defaults to true per the schema; preserved for round-trip when the source
|
|
95
|
-
* authored the attribute explicitly. When false, the shape's own geometry
|
|
96
|
-
* (clip-path/outline) still carries the shape's rotation/flip, but the
|
|
97
|
-
* picture content inside stays fixed to the page frame (upright), matching
|
|
98
|
-
* PowerPoint. See `pptx-viewer-shared`'s `getImageFillCounterTransform`. */
|
|
99
|
-
fillImageRotWithShape?: boolean;
|
|
100
|
-
fillGradientStops?: Array<{
|
|
101
|
-
color: string;
|
|
102
|
-
position: number;
|
|
103
|
-
opacity?: number;
|
|
104
|
-
/** Raw XML colour node preserved for round-trip (e.g. a:schemeClr with transforms). */
|
|
105
|
-
originalColorXml?: XmlObject;
|
|
106
|
-
/**
|
|
107
|
-
* Typed theme colour reference for this stop, set when
|
|
108
|
-
* {@link originalColorXml} is a plain `a:schemeClr`. Wins on save, same
|
|
109
|
-
* as {@link ShapeStyle.fillColorRef}.
|
|
110
|
-
*/
|
|
111
|
-
colorRef?: PptxThemeColorRef;
|
|
112
|
-
}>;
|
|
113
|
-
fillGradientAngle?: number;
|
|
114
|
-
fillGradientType?: 'linear' | 'radial';
|
|
115
|
-
/** Path gradient sub-type from `a:path/@path` (e.g. "circle", "rect", "shape"). */
|
|
116
|
-
fillGradientPathType?: 'circle' | 'rect' | 'shape';
|
|
117
|
-
/** Focal point for path (radial) gradients, derived from `a:fillToRect`.
|
|
118
|
-
* Values are 0..1 fractions relative to shape bounds. */
|
|
119
|
-
fillGradientFocalPoint?: {
|
|
120
|
-
x: number;
|
|
121
|
-
y: number;
|
|
122
|
-
};
|
|
123
|
-
/** Raw fillToRect LTRB values (0..1 fractions) from `a:fillToRect`.
|
|
124
|
-
* Defines the inner rectangle where the gradient reaches its final stop.
|
|
125
|
-
* l/t are insets from left/top edges; r/b are insets from right/bottom edges. */
|
|
126
|
-
fillGradientFillToRect?: {
|
|
127
|
-
l: number;
|
|
128
|
-
t: number;
|
|
129
|
-
r: number;
|
|
130
|
-
b: number;
|
|
131
|
-
};
|
|
132
|
-
/** Raw tileRect LTRB values (0..1 fractions, may be negative) from
|
|
133
|
-
* `a:gradFill/a:tileRect`. Defines the rectangle the gradient tile occupies
|
|
134
|
-
* before any flip/tiling is applied. */
|
|
135
|
-
fillGradientTileRect?: {
|
|
136
|
-
l: number;
|
|
137
|
-
t: number;
|
|
138
|
-
r: number;
|
|
139
|
-
b: number;
|
|
140
|
-
};
|
|
141
|
-
/** Gradient tile flip mode (`a:gradFill/@flip`).
|
|
142
|
-
* `none` = no tiling flip (default), `x|y|xy` = mirror in the named axis. */
|
|
143
|
-
fillGradientFlip?: 'none' | 'x' | 'y' | 'xy';
|
|
144
|
-
/** Whether the gradient rotates with the shape (`a:gradFill/@rotWithShape`).
|
|
145
|
-
* Defaults to true per the schema; preserved for round-trip when the source
|
|
146
|
-
* authored the attribute explicitly. */
|
|
147
|
-
fillGradientRotWithShape?: boolean;
|
|
148
|
-
/** Whether the linear gradient is scaled to the shape (`a:lin/@scaled`).
|
|
149
|
-
* Defaults to true per the schema; preserved for round-trip. */
|
|
150
|
-
fillGradientScaled?: boolean;
|
|
151
|
-
fillOpacity?: number;
|
|
152
|
-
strokeColor?: string;
|
|
153
|
-
/**
|
|
154
|
-
* Raw XML colour-choice node preserved from `a:ln/a:solidFill` for
|
|
155
|
-
* round-trip serialisation. See {@link fillColorXml} for the rationale.
|
|
156
|
-
*/
|
|
157
|
-
strokeColorXml?: XmlObject;
|
|
158
|
-
/**
|
|
159
|
-
* Typed theme colour reference for the outline, mirroring
|
|
160
|
-
* {@link fillColorRef}: set when {@link strokeColorXml} is a plain
|
|
161
|
-
* `a:schemeClr`, and wins on save.
|
|
162
|
-
*/
|
|
163
|
-
strokeColorRef?: PptxThemeColorRef;
|
|
164
|
-
/**
|
|
165
|
-
* Kind of fill painted on the outline (`a:ln` child). Distinguishes a solid
|
|
166
|
-
* outline from a gradient/pattern/none outline so save can emit the correct
|
|
167
|
-
* single line fill instead of collapsing every outline to `a:solidFill`
|
|
168
|
-
* (which, alongside a preserved `a:gradFill`/`a:pattFill`, produces an
|
|
169
|
-
* invalid dual-fill `<a:ln>`).
|
|
170
|
-
*/
|
|
171
|
-
strokeFillMode?: 'solid' | 'gradient' | 'pattern' | 'none';
|
|
172
|
-
/** Raw `a:ln/a:gradFill` XML preserved for round-trip when the outline is
|
|
173
|
-
* gradient-filled. Re-emitted verbatim as the line's single fill on save. */
|
|
174
|
-
strokeGradientXml?: XmlObject;
|
|
175
|
-
/** Raw `a:ln/a:pattFill` XML preserved for round-trip when the outline is
|
|
176
|
-
* pattern-filled. Re-emitted verbatim as the line's single fill on save. */
|
|
177
|
-
strokePatternXml?: XmlObject;
|
|
178
|
-
/**
|
|
179
|
-
* Structured stops of a gradient outline (`a:ln/a:gradFill/a:gsLst`), in the
|
|
180
|
-
* same shape as {@link fillGradientStops}.
|
|
181
|
-
*
|
|
182
|
-
* The raw XML above round-trips a gradient outline on save, but a renderer
|
|
183
|
-
* cannot paint from it: it needs resolved colours and positions. Without
|
|
184
|
-
* these, every binding fell back to {@link strokeColor} - a single averaged
|
|
185
|
-
* colour - so a two-tone outline painted flat and a fade-to-transparent
|
|
186
|
-
* outline painted fully opaque.
|
|
187
|
-
*/
|
|
188
|
-
strokeGradientStops?: ShapeStyle['fillGradientStops'];
|
|
189
|
-
/** Gradient outline angle in OOXML degrees (`a:lin/@ang`), 0 = left to right. */
|
|
190
|
-
strokeGradientAngle?: number;
|
|
191
|
-
/** Gradient outline kind: `linear` (`a:lin`) or `radial` (`a:path`). */
|
|
192
|
-
strokeGradientType?: ShapeStyle['fillGradientType'];
|
|
193
|
-
/** Path-gradient shape for a radial outline (`a:path/@path`). */
|
|
194
|
-
strokeGradientPathType?: ShapeStyle['fillGradientPathType'];
|
|
195
|
-
/** Preset name of a pattern outline (`a:ln/a:pattFill/@prst`). */
|
|
196
|
-
strokePatternPreset?: string;
|
|
197
|
-
/** Background colour of a pattern outline (`a:ln/a:pattFill/a:bgClr`). */
|
|
198
|
-
strokePatternBackgroundColor?: string;
|
|
199
|
-
strokeWidth?: number;
|
|
200
|
-
strokeOpacity?: number;
|
|
201
|
-
strokeDash?: StrokeDashType;
|
|
202
|
-
/** Line join style (`a:ln/@join`): round, bevel, or miter. */
|
|
203
|
-
lineJoin?: 'round' | 'bevel' | 'miter';
|
|
204
|
-
/** Miter limit (`a:miter/@lim`) in EMU-percent units (default 800000 = 8.0). Only meaningful when lineJoin is 'miter'. */
|
|
205
|
-
miterLimit?: number;
|
|
206
|
-
/** Line cap style (`a:ln/@cap`): flat, rnd, or sq. */
|
|
207
|
-
lineCap?: 'flat' | 'rnd' | 'sq';
|
|
208
|
-
/** Compound line type (`a:ln/@cmpd`). */
|
|
209
|
-
compoundLine?: 'sng' | 'dbl' | 'thickThin' | 'thinThick' | 'tri';
|
|
210
|
-
/** Pen line alignment (`a:ln/@algn`): `ctr` (centre, default) or `in` (inside). */
|
|
211
|
-
lineAlignment?: 'ctr' | 'in';
|
|
212
|
-
shadowColor?: string;
|
|
213
|
-
/** Preserved source `a:effectLst`, including unknown effects and extensions. */
|
|
214
|
-
effectListXml?: XmlObject;
|
|
215
|
-
/** Original outer-shadow node used for lossless surgical updates. */
|
|
216
|
-
outerShadowXml?: XmlObject;
|
|
217
|
-
/** Resolved source shadow colour used to detect colour edits. */
|
|
218
|
-
outerShadowOriginalColor?: string;
|
|
219
|
-
/** Source shadow opacity used to detect alpha edits. */
|
|
220
|
-
outerShadowOriginalOpacity?: number;
|
|
221
|
-
shadowBlur?: number;
|
|
222
|
-
shadowOffsetX?: number;
|
|
223
|
-
shadowOffsetY?: number;
|
|
224
|
-
shadowOpacity?: number;
|
|
225
|
-
/** Preset shadow name from `a:prstShdw/@prst` (e.g. "shdw1"..."shdw20"). */
|
|
226
|
-
presetShadowName?: string;
|
|
227
|
-
/** Shadow angle in degrees (0-360). Parsed from `@_dir` (60000ths of a degree). */
|
|
228
|
-
shadowAngle?: number;
|
|
229
|
-
/** Shadow distance in pixels. Parsed from `@_dist` (EMUs). */
|
|
230
|
-
shadowDistance?: number;
|
|
231
|
-
/** Whether shadow rotates with shape. Parsed from `@_rotWithShape`. */
|
|
232
|
-
shadowRotateWithShape?: boolean;
|
|
233
|
-
/** Outer-shadow horizontal scaling (`a:outerShdw/@sx`) in 1000ths of a percent (default 100000 = 100%). */
|
|
234
|
-
shadowScaleX?: number;
|
|
235
|
-
/** Outer-shadow vertical scaling (`a:outerShdw/@sy`). */
|
|
236
|
-
shadowScaleY?: number;
|
|
237
|
-
/** Outer-shadow horizontal skew (`a:outerShdw/@kx`) in 60000ths of a degree. */
|
|
238
|
-
shadowSkewX?: number;
|
|
239
|
-
/** Outer-shadow vertical skew (`a:outerShdw/@ky`). */
|
|
240
|
-
shadowSkewY?: number;
|
|
241
|
-
/** Outer-shadow alignment (`a:outerShdw/@algn`). */
|
|
242
|
-
shadowAlignment?: 'tl' | 't' | 'tr' | 'l' | 'ctr' | 'r' | 'bl' | 'b' | 'br';
|
|
243
|
-
/** Inner-shadow rotateWithShape (`a:innerShdw/@rotWithShape`). */
|
|
244
|
-
innerShadowRotateWithShape?: boolean;
|
|
245
|
-
/** Reflection fade direction (`a:reflection/@fadeDir`) in 60000ths of a degree. */
|
|
246
|
-
reflectionFadeDirection?: number;
|
|
247
|
-
/** Reflection horizontal scaling (`a:reflection/@sx`). */
|
|
248
|
-
reflectionScaleX?: number;
|
|
249
|
-
/** Reflection vertical scaling (`a:reflection/@sy`). */
|
|
250
|
-
reflectionScaleY?: number;
|
|
251
|
-
/** Reflection horizontal skew (`a:reflection/@kx`). */
|
|
252
|
-
reflectionSkewX?: number;
|
|
253
|
-
/** Reflection vertical skew (`a:reflection/@ky`). */
|
|
254
|
-
reflectionSkewY?: number;
|
|
255
|
-
/** Reflection alignment (`a:reflection/@algn`). */
|
|
256
|
-
reflectionAlignment?: 'tl' | 't' | 'tr' | 'l' | 'ctr' | 'r' | 'bl' | 'b' | 'br';
|
|
257
|
-
/** Reflection rotateWithShape (`a:reflection/@rotWithShape`). */
|
|
258
|
-
reflectionRotateWithShape?: boolean;
|
|
259
|
-
/** Reflection start position (`a:reflection/@stPos`) as 0-1 fraction. */
|
|
260
|
-
reflectionStartPosition?: number;
|
|
261
|
-
/** Multiple shadow layers (for advanced effects). */
|
|
262
|
-
shadows?: ShadowEffect[];
|
|
263
|
-
glowColor?: string;
|
|
264
|
-
/** Original glow node used for lossless surgical updates. */
|
|
265
|
-
glowXml?: XmlObject;
|
|
266
|
-
/** Resolved source glow colour used to detect colour edits. */
|
|
267
|
-
glowOriginalColor?: string;
|
|
268
|
-
/** Source glow opacity used to detect alpha edits. */
|
|
269
|
-
glowOriginalOpacity?: number;
|
|
270
|
-
glowRadius?: number;
|
|
271
|
-
glowOpacity?: number;
|
|
272
|
-
softEdgeRadius?: number;
|
|
273
|
-
/** Inner shadow colour (`a:innerShdw`). */
|
|
274
|
-
innerShadowColor?: string;
|
|
275
|
-
/** Original inner-shadow node used for lossless surgical updates. */
|
|
276
|
-
innerShadowXml?: XmlObject;
|
|
277
|
-
/** Resolved source inner-shadow colour used to detect colour edits. */
|
|
278
|
-
innerShadowOriginalColor?: string;
|
|
279
|
-
/** Source inner-shadow opacity used to detect alpha edits. */
|
|
280
|
-
innerShadowOriginalOpacity?: number;
|
|
281
|
-
/** Inner shadow opacity (0-1). */
|
|
282
|
-
innerShadowOpacity?: number;
|
|
283
|
-
/** Inner shadow blur radius in px. */
|
|
284
|
-
innerShadowBlur?: number;
|
|
285
|
-
/** Inner shadow horizontal offset in px. */
|
|
286
|
-
innerShadowOffsetX?: number;
|
|
287
|
-
/** Inner shadow vertical offset in px. */
|
|
288
|
-
innerShadowOffsetY?: number;
|
|
289
|
-
/** Original soft-edge node, including vendor attributes and extensions. */
|
|
290
|
-
softEdgeXml?: XmlObject;
|
|
291
|
-
/** Reflection effect — distance from shape bottom in px. */
|
|
292
|
-
reflectionBlurRadius?: number;
|
|
293
|
-
/** Original reflection node, including vendor attributes and extensions. */
|
|
294
|
-
reflectionXml?: XmlObject;
|
|
295
|
-
/** Reflection start opacity (0-1). */
|
|
296
|
-
reflectionStartOpacity?: number;
|
|
297
|
-
/** Reflection end opacity (0-1). */
|
|
298
|
-
reflectionEndOpacity?: number;
|
|
299
|
-
/** Reflection end position (0-1 fraction of shape height). */
|
|
300
|
-
reflectionEndPosition?: number;
|
|
301
|
-
/** Reflection direction in degrees. */
|
|
302
|
-
reflectionDirection?: number;
|
|
303
|
-
/** Reflection rotation in degrees (`a:reflection/@rot` in 60000ths). */
|
|
304
|
-
reflectionRotation?: number;
|
|
305
|
-
/** Reflection distance in px. */
|
|
306
|
-
reflectionDistance?: number;
|
|
307
|
-
/** Standalone blur effect radius in px (`a:effectLst > a:blur`). */
|
|
308
|
-
blurRadius?: number;
|
|
309
|
-
/** Whether the blur effect grows the bounds of the shape (`a:blur/@grow`). */
|
|
310
|
-
blurGrow?: boolean;
|
|
311
|
-
connectorStartArrow?: ConnectorArrowType;
|
|
312
|
-
/** Start arrow width size ('sm' | 'med' | 'lg'). */
|
|
313
|
-
connectorStartArrowWidth?: 'sm' | 'med' | 'lg';
|
|
314
|
-
/** Start arrow length size ('sm' | 'med' | 'lg'). */
|
|
315
|
-
connectorStartArrowLength?: 'sm' | 'med' | 'lg';
|
|
316
|
-
connectorEndArrow?: ConnectorArrowType;
|
|
317
|
-
/** End arrow width size ('sm' | 'med' | 'lg'). */
|
|
318
|
-
connectorEndArrowWidth?: 'sm' | 'med' | 'lg';
|
|
319
|
-
/** End arrow length size ('sm' | 'med' | 'lg'). */
|
|
320
|
-
connectorEndArrowLength?: 'sm' | 'med' | 'lg';
|
|
321
|
-
/** Connection point for the start of a connector. */
|
|
322
|
-
connectorStartConnection?: ConnectorConnectionPoint;
|
|
323
|
-
/** Connection point for the end of a connector. */
|
|
324
|
-
connectorEndConnection?: ConnectorConnectionPoint;
|
|
325
|
-
/** Custom dash pattern, measured relative to line width in thousandths of one percent. */
|
|
326
|
-
customDashSegments?: PptxCustomDashSegment[];
|
|
327
|
-
/** Original `a:ds` payloads retained by index for lossless edits. */
|
|
328
|
-
customDashSegmentXml?: XmlObject[];
|
|
329
|
-
/** Original `a:custDash` payload retained for lossless edits. */
|
|
330
|
-
customDashXml?: XmlObject;
|
|
331
|
-
/** 3D scene/camera settings from `a:scene3d`. */
|
|
332
|
-
scene3d?: DrawingScene3D;
|
|
333
|
-
/** 3D shape extrusion/bevel from `a:sp3d`. */
|
|
334
|
-
shape3d?: Pptx3DShape;
|
|
335
|
-
/** Line-level shadow colour from `a:ln/a:effectLst/a:outerShdw`. */
|
|
336
|
-
lineShadowColor?: string;
|
|
337
|
-
/** Line-level shadow opacity (0-1). */
|
|
338
|
-
lineShadowOpacity?: number;
|
|
339
|
-
/** Line-level shadow blur radius in px. */
|
|
340
|
-
lineShadowBlur?: number;
|
|
341
|
-
/** Line-level shadow horizontal offset in px. */
|
|
342
|
-
lineShadowOffsetX?: number;
|
|
343
|
-
/** Line-level shadow vertical offset in px. */
|
|
344
|
-
lineShadowOffsetY?: number;
|
|
345
|
-
/** Line-level glow colour from `a:ln/a:effectLst/a:glow`. */
|
|
346
|
-
lineGlowColor?: string;
|
|
347
|
-
/** Line-level glow radius in px. */
|
|
348
|
-
lineGlowRadius?: number;
|
|
349
|
-
/** Line-level glow opacity (0-1). */
|
|
350
|
-
lineGlowOpacity?: number;
|
|
351
|
-
/** Raw `a:effectDag` XML node preserved for round-trip serialisation. */
|
|
352
|
-
effectDagXml?: XmlObject;
|
|
353
|
-
/**
|
|
354
|
-
* Typed effect graph parsed from {@link ShapeStyle.effectDagXml}. The four
|
|
355
|
-
* structural container nodes (`a:cont`, `a:blend`, `a:xfrmEffect`,
|
|
356
|
-
* `a:relOff`) are fully typed; any other leaf effect (e.g. `a:outerShdw`,
|
|
357
|
-
* `a:glow`, `a:alphaInv`) is captured as
|
|
358
|
-
* {@link import('./effect-dag').EffectDagRawLeaf} so we never have to
|
|
359
|
-
* recurse into the full effect taxonomy.
|
|
360
|
-
*/
|
|
361
|
-
effectDagTree?: EffectDagContainer;
|
|
362
|
-
/** Grayscale flag from effectDag `a:grayscl`. */
|
|
363
|
-
dagGrayscale?: boolean;
|
|
364
|
-
/** Bi-level threshold (0-100) from effectDag `a:biLevel`. */
|
|
365
|
-
dagBiLevel?: number;
|
|
366
|
-
/** Brightness adjustment (-100 to 100) from effectDag `a:lum/@bright`. */
|
|
367
|
-
dagLumBrightness?: number;
|
|
368
|
-
/** Contrast adjustment (-100 to 100) from effectDag `a:lum/@contrast`. */
|
|
369
|
-
dagLumContrast?: number;
|
|
370
|
-
/** Hue rotation in degrees (0-360) from effectDag `a:hsl/@hue`. */
|
|
371
|
-
dagHslHue?: number;
|
|
372
|
-
/** Saturation adjustment from effectDag `a:hsl/@sat`. */
|
|
373
|
-
dagHslSaturation?: number;
|
|
374
|
-
/** Luminance adjustment from effectDag `a:hsl/@lum`. */
|
|
375
|
-
dagHslLuminance?: number;
|
|
376
|
-
/** Alpha modulation fixed (0-100) from effectDag `a:alphaModFix`. */
|
|
377
|
-
dagAlphaModFix?: number;
|
|
378
|
-
/** Tint hue in degrees from effectDag `a:tint/@hue`. */
|
|
379
|
-
dagTintHue?: number;
|
|
380
|
-
/** Tint amount (0-100) from effectDag `a:tint/@amt`. */
|
|
381
|
-
dagTintAmount?: number;
|
|
382
|
-
/** Duotone colour pair from effectDag `a:duotone`. */
|
|
383
|
-
dagDuotone?: {
|
|
384
|
-
color1: string;
|
|
385
|
-
color2: string;
|
|
386
|
-
};
|
|
387
|
-
/** Fill overlay blend mode from effectDag `a:fillOverlay/@blend`. */
|
|
388
|
-
dagFillOverlayBlend?: 'over' | 'mult' | 'screen' | 'darken' | 'lighten';
|
|
389
|
-
/**
|
|
390
|
-
* Fill overlay tint colour (hex `#RRGGBB`) from effectDag `a:fillOverlay`'s
|
|
391
|
-
* `a:solidFill`/`a:gradFill`. Painted as a blended overlay layer over the
|
|
392
|
-
* element; the blend mode comes from {@link dagFillOverlayBlend}.
|
|
393
|
-
*/
|
|
394
|
-
dagFillOverlayColor?: string;
|
|
395
|
-
/** Fill overlay tint opacity (0-1), from the overlay fill colour's alpha. */
|
|
396
|
-
dagFillOverlayOpacity?: number;
|
|
397
|
-
/** Fill overlay blend mode from a direct `a:effectLst/a:fillOverlay/@blend`. */
|
|
398
|
-
shapeFillOverlayBlend?: 'over' | 'mult' | 'screen' | 'darken' | 'lighten';
|
|
399
|
-
/**
|
|
400
|
-
* Fill overlay tint colour (hex `#RRGGBB`) from a direct
|
|
401
|
-
* `a:effectLst/a:fillOverlay`'s `a:solidFill`/`a:gradFill`.
|
|
402
|
-
*/
|
|
403
|
-
shapeFillOverlayColor?: string;
|
|
404
|
-
/** Fill overlay tint opacity (0-1), from the overlay fill colour's alpha. */
|
|
405
|
-
shapeFillOverlayOpacity?: number;
|
|
406
|
-
/** Original source `a:fillOverlay` node, preserved for lossless surgical updates. */
|
|
407
|
-
fillOverlayXml?: XmlObject;
|
|
408
|
-
/** Resolved source fill-overlay colour used to detect colour edits. */
|
|
409
|
-
shapeFillOverlayOriginalColor?: string;
|
|
410
|
-
/** Source fill-overlay opacity used to detect alpha edits. */
|
|
411
|
-
shapeFillOverlayOriginalOpacity?: number;
|
|
412
|
-
/** `<a:lnRef @idx>` — 1-based index into the theme's lnStyleLst. */
|
|
413
|
-
lnRefIdx?: number;
|
|
414
|
-
/** Raw XML colour child of `<a:lnRef>` (e.g. `<a:schemeClr>` with transforms). */
|
|
415
|
-
lnRefColorXml?: XmlObject;
|
|
416
|
-
/** `<a:fillRef @idx>` — 1-based index into fillStyleLst (1-3) or bgFillStyleLst (1001-1003). */
|
|
417
|
-
fillRefIdx?: number;
|
|
418
|
-
/** Raw XML colour child of `<a:fillRef>`. */
|
|
419
|
-
fillRefColorXml?: XmlObject;
|
|
420
|
-
/** `<a:effectRef @idx>` — 1-based index into the theme's effectStyleLst. */
|
|
421
|
-
effectRefIdx?: number;
|
|
422
|
-
/** Raw XML colour child of `<a:effectRef>`. */
|
|
423
|
-
effectRefColorXml?: XmlObject;
|
|
424
|
-
/** `<a:fontRef @idx>` — typically `major`, `minor`, or `none`. */
|
|
425
|
-
fontRefIdx?: string;
|
|
426
|
-
/** Raw XML colour child of `<a:fontRef>`. */
|
|
427
|
-
fontRefColorXml?: XmlObject;
|
|
428
|
-
/**
|
|
429
|
-
* The fill `<a:fillRef>` resolved to, recorded ONLY when the shape's own
|
|
430
|
-
* `spPr` authored no fill at all, so the reference is what paints it.
|
|
431
|
-
*
|
|
432
|
-
* Its absence therefore means "the fill is the shape's own", and its
|
|
433
|
-
* presence plus an unchanged flat fill means "still purely inherited": see
|
|
434
|
-
* `authored-shape-style.ts`, the shape-scope twin of `TextStyle`'s
|
|
435
|
-
* `inheritedRunStyle`.
|
|
436
|
-
*/
|
|
437
|
-
inheritedFillStyle?: ShapeStyle;
|
|
438
|
-
/**
|
|
439
|
-
* The outline `<a:lnRef>` resolved to, recorded before `spPr/a:ln` was
|
|
440
|
-
* layered on top. A property that still equals this baseline was never
|
|
441
|
-
* authored on the shape and must not be written back as if it were.
|
|
442
|
-
*/
|
|
443
|
-
inheritedLineStyle?: ShapeStyle;
|
|
444
|
-
/**
|
|
445
|
-
* The shadow/glow/reflection/soft-edge/3D properties `<a:effectRef>`
|
|
446
|
-
* resolved from the theme's `effectStyleLst`, recorded ONLY for the
|
|
447
|
-
* properties the shape had not already authored itself. A shape whose
|
|
448
|
-
* effects still match this baseline was never given its own effects and
|
|
449
|
-
* must not have them written back as a literal `spPr/a:effectLst`; see
|
|
450
|
-
* `authored-shape-style.ts`'s `effectIsPurelyStyleMatrix`.
|
|
451
|
-
*/
|
|
452
|
-
inheritedEffectStyle?: ShapeStyle;
|
|
453
|
-
/**
|
|
454
|
-
* Set by a style-matrix pick (the Shape Styles gallery): the shape's own
|
|
455
|
-
* `spPr` fill, outline and effects were replaced by `<p:style>`, so the
|
|
456
|
-
* writer clears whatever the retained `spPr` still authored before it
|
|
457
|
-
* writes the (now reference-owned) style. Never parsed; editor state only.
|
|
458
|
-
*/
|
|
459
|
-
styleMatrixReset?: boolean;
|
|
460
|
-
}
|
|
461
|
-
/**
|
|
462
|
-
* The result of resolving a `<p:style>` block against the loaded theme.
|
|
463
|
-
*
|
|
464
|
-
* `shapeStyle` is exactly what the load pipeline would have produced for a
|
|
465
|
-
* shape whose `spPr` authors nothing and whose `<p:style>` is `styleXml`:
|
|
466
|
-
* the flat fill/outline/effect values a renderer needs, the reference indices
|
|
467
|
-
* and colours the writer re-emits, and the inheritance baselines that tell the
|
|
468
|
-
* writer to leave `spPr` empty while the flat values still agree with them.
|
|
469
|
-
*/
|
|
470
|
-
interface ResolvedStyleMatrix {
|
|
471
|
-
shapeStyle: ShapeStyle;
|
|
472
|
-
/** The text colour `<a:fontRef>` names, resolved to hex. */
|
|
473
|
-
fontColor?: string;
|
|
474
|
-
}
|
|
475
|
-
/**
|
|
476
|
-
* A `a:fillRef`/`a:lnRef`/`a:effectRef`-style style-matrix reference: an
|
|
477
|
-
* index into the theme's format scheme (`a:fmtScheme/a:fillStyleLst`, 1-based
|
|
478
|
-
* per ECMA-376 §20.1.4.1.12) plus an optional colour transform child.
|
|
479
|
-
*
|
|
480
|
-
* Distinct from an already-resolved {@link ParsedTableStyleFill}: a fill ref
|
|
481
|
-
* points AT a theme style-matrix entry rather than carrying a colour choice
|
|
482
|
-
* directly, though the two commonly appear together (`<a:fillRef idx="2">
|
|
483
|
-
* <a:schemeClr val="accent1"/></a:fillRef>`).
|
|
484
|
-
*
|
|
485
|
-
* @example
|
|
486
|
-
* ```ts
|
|
487
|
-
* const ref: ParsedTableFillRef = { idx: 2, color: { schemeColor: 'accent1' } };
|
|
488
|
-
* // => satisfies ParsedTableFillRef
|
|
489
|
-
* ```
|
|
490
|
-
*/
|
|
491
|
-
interface ParsedTableFillRef {
|
|
492
|
-
/** 1-based index into the theme format scheme's fill style list. */
|
|
493
|
-
idx: number;
|
|
494
|
-
/** Colour transform child (`a:schemeClr`/`a:srgbClr`) applied to the referenced style. */
|
|
495
|
-
color?: ParsedTableStyleFill;
|
|
496
|
-
}
|
|
497
|
-
/**
|
|
498
|
-
* One leaf (or `effectDag`-wrapped) node of an `a:effectLst`/`a:effectDag`
|
|
499
|
-
* effect chain, kept mostly opaque: {@link kind} names the OOXML element so a
|
|
500
|
-
* consumer can recognise common effects (`outerShdw`, `glow`, `softEdge`,
|
|
501
|
-
* `reflection`, `blur`, `innerShdw`, `prstShdw`, `fillOverlay`, `alphaModFix`,
|
|
502
|
-
* `alphaInv`, `grayscl`, `biLevel`, `duotone`, `hsl`, `lum`, `tint`) without
|
|
503
|
-
* this module re-deriving the full shape-effect taxonomy already modelled on
|
|
504
|
-
* `ShapeStyle`; {@link xml} preserves the node verbatim for lossless re-emit.
|
|
505
|
-
*
|
|
506
|
-
* @example
|
|
507
|
-
* ```ts
|
|
508
|
-
* const effect: ParsedTableStyleEffect = {
|
|
509
|
-
* kind: 'outerShdw',
|
|
510
|
-
* xml: { '@_blurRad': '40000', '@_dist': '20000', '@_dir': '5400000' },
|
|
511
|
-
* };
|
|
512
|
-
* // => satisfies ParsedTableStyleEffect
|
|
513
|
-
* ```
|
|
514
|
-
*/
|
|
515
|
-
interface ParsedTableStyleEffect {
|
|
516
|
-
/** The OOXML element's local name, e.g. `outerShdw`, `glow`, `softEdge`. */
|
|
517
|
-
kind: string;
|
|
518
|
-
/** Verbatim XML node (attributes + children) for lossless round-trip. */
|
|
519
|
-
xml: XmlObject;
|
|
520
|
-
}
|
|
521
|
-
/**
|
|
522
|
-
* A patch to apply to ONE `CT_TableStyle` section (`a:wholeTbl`, `a:band1H`,
|
|
523
|
-
* `a:firstRow`, a corner cell, ...) when editing an existing table style.
|
|
524
|
-
* Every field is independently optional: an absent field leaves that facet
|
|
525
|
-
* of the section untouched, `null` (currently only supported for
|
|
526
|
-
* {@link fill}/{@link text}/{@link borders}/{@link cell3D} at the top level)
|
|
527
|
-
* is not accepted here (delete a whole style with
|
|
528
|
-
* `deleteTableStyleFromMap` / `tableStylesToDelete` instead of clearing every
|
|
529
|
-
* facet of every section).
|
|
530
|
-
*
|
|
531
|
-
* @example
|
|
532
|
-
* ```ts
|
|
533
|
-
* const patch: TableStyleSectionPatch = {
|
|
534
|
-
* fill: { schemeColor: 'accent2', tint: 40000 },
|
|
535
|
-
* text: { bold: true },
|
|
536
|
-
* };
|
|
537
|
-
* // => satisfies TableStyleSectionPatch
|
|
538
|
-
* ```
|
|
539
|
-
*/
|
|
540
|
-
interface TableStyleSectionPatch {
|
|
541
|
-
fill?: ParsedTableStyleFill;
|
|
542
|
-
text?: ParsedTableStyleText;
|
|
543
|
-
borders?: ParsedTableStyleBorders;
|
|
544
|
-
cell3D?: PptxTableCell3D;
|
|
545
|
-
}
|
|
546
|
-
/**
|
|
547
|
-
* Options for creating a brand-new `a:tblStyle` entry with
|
|
548
|
-
* `createTableStyleEntry` (`packages/core/.../table-style-editor.ts`).
|
|
549
|
-
*
|
|
550
|
-
* @example
|
|
551
|
-
* ```ts
|
|
552
|
-
* const opts: CreateTableStyleOptions = { styleName: 'My Custom Style' };
|
|
553
|
-
* // => satisfies CreateTableStyleOptions
|
|
554
|
-
* ```
|
|
555
|
-
*/
|
|
556
|
-
interface CreateTableStyleOptions {
|
|
557
|
-
/** Display name for the new style (`a:tblStyle/@styleName`). */
|
|
558
|
-
styleName: string;
|
|
559
|
-
/**
|
|
560
|
-
* An existing entry to deep-clone section-by-section as the starting
|
|
561
|
-
* point (all fill/text/border/cell3D/background sections), with a fresh
|
|
562
|
-
* `styleId` substituted in. Omit for a blank style with no sections.
|
|
563
|
-
*/
|
|
564
|
-
basedOn?: ParsedTableStyleEntry;
|
|
565
|
-
/**
|
|
566
|
-
* Explicit style GUID (braced, e.g. `{...}`). When omitted a new GUID is
|
|
567
|
-
* generated (`globalThis.crypto.randomUUID()` when available).
|
|
568
|
-
*/
|
|
569
|
-
styleId?: string;
|
|
570
|
-
}
|
|
571
|
-
/**
|
|
572
|
-
* Per-cell visual style for a table cell.
|
|
573
|
-
*
|
|
574
|
-
* All fields are optional - unset values inherit from the table style.
|
|
575
|
-
*
|
|
576
|
-
* @example
|
|
577
|
-
* ```ts
|
|
578
|
-
* const header: PptxTableCellStyle = {
|
|
579
|
-
* bold: true,
|
|
580
|
-
* fontSize: 14,
|
|
581
|
-
* color: "#FFFFFF",
|
|
582
|
-
* backgroundColor: "#0055AA",
|
|
583
|
-
* align: "center",
|
|
584
|
-
* };
|
|
585
|
-
* // => satisfies PptxTableCellStyle
|
|
586
|
-
* ```
|
|
587
|
-
*/
|
|
588
|
-
interface PptxTableCellStyle {
|
|
589
|
-
/** Font size in points (`a:rPr@sz / 100`). */
|
|
590
|
-
fontSize?: number;
|
|
591
|
-
bold?: boolean;
|
|
592
|
-
italic?: boolean;
|
|
593
|
-
underline?: boolean;
|
|
594
|
-
color?: string;
|
|
595
|
-
/**
|
|
596
|
-
* Font family from the first run's `a:rPr/a:latin@typeface` (falling back to
|
|
597
|
-
* `a:ea` / `a:cs`). Per-run families live on {@link PptxTableCellTextRun}.
|
|
598
|
-
*/
|
|
599
|
-
fontFamily?: string;
|
|
600
|
-
/**
|
|
601
|
-
* Raw XML colour-choice node preserved from `a:tc/a:txBody/.../a:rPr/a:solidFill`
|
|
602
|
-
* for round-trip serialisation. Currently unused by the cell-level writer
|
|
603
|
-
* (cell text colour falls through `writeCellTextFormatting`), reserved for
|
|
604
|
-
* future expansion alongside the run-properties round-trip path.
|
|
605
|
-
*/
|
|
606
|
-
colorXml?: XmlObject;
|
|
607
|
-
/**
|
|
608
|
-
* Typed theme colour reference for the cell text colour, set when
|
|
609
|
-
* {@link colorXml} is a plain `a:schemeClr`. Wins on save, mirroring
|
|
610
|
-
* `TextStyle.colorRef`. Distinct from {@link ParsedTableStyleFill.schemeColor},
|
|
611
|
-
* which describes a `ppt/tableStyles.xml` section fill rather than an
|
|
612
|
-
* individual cell override.
|
|
613
|
-
*/
|
|
614
|
-
colorRef?: PptxThemeColorRef;
|
|
615
|
-
backgroundColor?: string;
|
|
616
|
-
/**
|
|
617
|
-
* Raw XML colour-choice node preserved from cell `a:tcPr/a:solidFill` for
|
|
618
|
-
* round-trip serialisation. Re-emitted verbatim when the resolved
|
|
619
|
-
* {@link backgroundColor} still matches the original colour.
|
|
620
|
-
*/
|
|
621
|
-
backgroundColorXml?: XmlObject;
|
|
622
|
-
/**
|
|
623
|
-
* Typed theme colour reference for the cell fill, set when
|
|
624
|
-
* {@link backgroundColorXml} is a plain `a:schemeClr`. Wins on save,
|
|
625
|
-
* mirroring `ShapeStyle.fillColorRef`.
|
|
626
|
-
*/
|
|
627
|
-
backgroundColorRef?: PptxThemeColorRef;
|
|
628
|
-
borderColor?: string;
|
|
629
|
-
/** Top border width in px. */
|
|
630
|
-
borderTopWidth?: number;
|
|
631
|
-
/** Bottom border width in px. */
|
|
632
|
-
borderBottomWidth?: number;
|
|
633
|
-
/** Left border width in px. */
|
|
634
|
-
borderLeftWidth?: number;
|
|
635
|
-
/** Right border width in px. */
|
|
636
|
-
borderRightWidth?: number;
|
|
637
|
-
/** Top border color as hex. */
|
|
638
|
-
borderTopColor?: string;
|
|
639
|
-
/** Bottom border color as hex. */
|
|
640
|
-
borderBottomColor?: string;
|
|
641
|
-
/** Left border color as hex. */
|
|
642
|
-
borderLeftColor?: string;
|
|
643
|
-
/** Right border color as hex. */
|
|
644
|
-
borderRightColor?: string;
|
|
645
|
-
align?: TextStyle['align'];
|
|
646
|
-
vAlign?: 'top' | 'middle' | 'bottom';
|
|
647
|
-
/** Text direction from `a:tcPr/@vert` (spec values from CT_TextVerticalType). */
|
|
648
|
-
textDirection?: 'vert' | 'vert270' | 'eaVert' | 'wordArtVert' | 'wordArtVertRtl' | 'mongolianVert';
|
|
649
|
-
/** Cell left margin in px (from a:tcPr > a:tcMar > a:marL). */
|
|
650
|
-
marginLeft?: number;
|
|
651
|
-
/** Cell right margin in px. */
|
|
652
|
-
marginRight?: number;
|
|
653
|
-
/** Cell top margin in px. */
|
|
654
|
-
marginTop?: number;
|
|
655
|
-
/** Cell bottom margin in px. */
|
|
656
|
-
marginBottom?: number;
|
|
657
|
-
/** Diagonal border top-left to bottom-right color. */
|
|
658
|
-
borderDiagDownColor?: string;
|
|
659
|
-
/** Diagonal border top-left to bottom-right width in px. */
|
|
660
|
-
borderDiagDownWidth?: number;
|
|
661
|
-
/** Diagonal border bottom-left to top-right color. */
|
|
662
|
-
borderDiagUpColor?: string;
|
|
663
|
-
/** Diagonal border bottom-left to top-right width in px. */
|
|
664
|
-
borderDiagUpWidth?: number;
|
|
665
|
-
/** Table cell border dash style (legacy single value). */
|
|
666
|
-
borderDash?: string;
|
|
667
|
-
/**
|
|
668
|
-
* Per-edge border dash styles: an `a:prstDash` value, or `'custom'` for an
|
|
669
|
-
* `a:custDash`, whose pattern is in the edge's `...DashSegments`.
|
|
670
|
-
*/
|
|
671
|
-
borderTopDash?: string;
|
|
672
|
-
borderBottomDash?: string;
|
|
673
|
-
borderLeftDash?: string;
|
|
674
|
-
borderRightDash?: string;
|
|
675
|
-
/**
|
|
676
|
-
* Per-edge custom dash patterns (`a:custDash/a:ds`), read and written when
|
|
677
|
-
* the edge's dash is `'custom'`: lengths relative to the line width, in
|
|
678
|
-
* thousandths of one percent (100000 is one line width).
|
|
679
|
-
*/
|
|
680
|
-
borderTopDashSegments?: PptxCustomDashSegment[];
|
|
681
|
-
borderBottomDashSegments?: PptxCustomDashSegment[];
|
|
682
|
-
borderLeftDashSegments?: PptxCustomDashSegment[];
|
|
683
|
-
borderRightDashSegments?: PptxCustomDashSegment[];
|
|
684
|
-
/** Cell text shadow colour. */
|
|
685
|
-
textShadowColor?: string;
|
|
686
|
-
/** Cell text shadow blur radius in px. */
|
|
687
|
-
textShadowBlur?: number;
|
|
688
|
-
/** Cell text shadow horizontal offset in px. */
|
|
689
|
-
textShadowOffsetX?: number;
|
|
690
|
-
/** Cell text shadow vertical offset in px. */
|
|
691
|
-
textShadowOffsetY?: number;
|
|
692
|
-
/** Cell text shadow opacity (0-1). */
|
|
693
|
-
textShadowOpacity?: number;
|
|
694
|
-
/** Cell text glow colour. */
|
|
695
|
-
textGlowColor?: string;
|
|
696
|
-
/** Cell text glow radius in px. */
|
|
697
|
-
textGlowRadius?: number;
|
|
698
|
-
/** Cell text glow opacity (0-1). */
|
|
699
|
-
textGlowOpacity?: number;
|
|
700
|
-
/** Cell fill mode: solid, gradient, pattern, image, or none. */
|
|
701
|
-
fillMode?: 'solid' | 'gradient' | 'pattern' | 'image' | 'none';
|
|
702
|
-
/** Gradient fill stops (colours with positions). */
|
|
703
|
-
gradientFillStops?: Array<{
|
|
704
|
-
color: string;
|
|
705
|
-
position: number;
|
|
706
|
-
opacity?: number;
|
|
707
|
-
}>;
|
|
708
|
-
/** Gradient angle in degrees. */
|
|
709
|
-
gradientFillAngle?: number;
|
|
710
|
-
/** Gradient type: linear or radial. */
|
|
711
|
-
gradientFillType?: 'linear' | 'radial';
|
|
712
|
-
/** Path gradient sub-type. */
|
|
713
|
-
gradientFillPathType?: 'circle' | 'rect' | 'shape';
|
|
714
|
-
/** Focal point for radial gradients (0–1 fractions). */
|
|
715
|
-
gradientFillFocalPoint?: {
|
|
716
|
-
x: number;
|
|
717
|
-
y: number;
|
|
718
|
-
};
|
|
719
|
-
/** Raw fillToRect LTRB values (0–1 fractions) for gradient sizing. */
|
|
720
|
-
gradientFillFillToRect?: {
|
|
721
|
-
l: number;
|
|
722
|
-
t: number;
|
|
723
|
-
r: number;
|
|
724
|
-
b: number;
|
|
725
|
-
};
|
|
726
|
-
/** Pre-computed CSS gradient string for rendering. */
|
|
727
|
-
gradientFillCss?: string;
|
|
728
|
-
/** Pattern fill preset name (e.g. "ltDnDiag"). */
|
|
729
|
-
patternFillPreset?: string;
|
|
730
|
-
/** Pattern fill foreground colour. */
|
|
731
|
-
patternFillForeground?: string;
|
|
732
|
-
/** Pattern fill background colour. */
|
|
733
|
-
patternFillBackground?: string;
|
|
734
|
-
/**
|
|
735
|
-
* Image fill (`a:tcPr/a:blipFill`, CT_TableCellProperties). Resolved
|
|
736
|
-
* archive-relative path (or external `http(s):`/`data:` URL) for the
|
|
737
|
-
* cell's background image, from `a:blipFill/a:blip/@r:embed` (or
|
|
738
|
-
* `@r:link`). Present when `fillMode` is `'image'`.
|
|
739
|
-
*
|
|
740
|
-
* The parser resolves this synchronously (path only, no binary read);
|
|
741
|
-
* a viewer's load pipeline resolves it further to a displayable
|
|
742
|
-
* `data:`/`blob:` URL, written back to {@link backgroundImageFillData}.
|
|
743
|
-
*/
|
|
744
|
-
backgroundImageFillPath?: string;
|
|
745
|
-
/**
|
|
746
|
-
* Displayable image data (`data:` or `blob:` URL) for an image cell
|
|
747
|
-
* fill, once resolved by the load pipeline. Renderers should prefer
|
|
748
|
-
* this over {@link backgroundImageFillPath} when both are present.
|
|
749
|
-
*/
|
|
750
|
-
backgroundImageFillData?: string;
|
|
751
|
-
/**
|
|
752
|
-
* Cell 3D bevel + lighting from `a:tcPr/a:cell3D` (CT_Cell3D,
|
|
753
|
-
* ECMA-376 §21.1.3.1). Rendered as a CSS bevel treatment.
|
|
754
|
-
*/
|
|
755
|
-
cell3D?: PptxTableCell3D;
|
|
756
|
-
/**
|
|
757
|
-
* `a:tcPr/@anchorCtr` - centre the text block in the direction
|
|
758
|
-
* perpendicular to the text flow (horizontal centring for horizontal text).
|
|
759
|
-
*/
|
|
760
|
-
anchorCtr?: boolean;
|
|
761
|
-
/**
|
|
762
|
-
* `a:tcPr/@horzOverflow` (ST_TextHorzOverflowType): `clip` clips text at
|
|
763
|
-
* the cell edge, `overflow` (the default) lets it spill.
|
|
764
|
-
*/
|
|
765
|
-
horzOverflow?: 'clip' | 'overflow';
|
|
766
|
-
}
|
|
767
|
-
/**
|
|
768
|
-
* Cell 3D bevel + lighting parsed from `a:tcPr/a:cell3D` (CT_Cell3D).
|
|
769
|
-
*
|
|
770
|
-
* Only the fields needed to render a plausible bevel treatment are captured;
|
|
771
|
-
* verbatim round-trip of the full node is handled separately by the save path.
|
|
772
|
-
*
|
|
773
|
-
* @example
|
|
774
|
-
* ```ts
|
|
775
|
-
* const c3d: PptxTableCell3D = {
|
|
776
|
-
* bevelWidth: 8,
|
|
777
|
-
* bevelHeight: 8,
|
|
778
|
-
* bevelPreset: 'circle',
|
|
779
|
-
* material: 'plastic',
|
|
780
|
-
* };
|
|
781
|
-
* // => satisfies PptxTableCell3D
|
|
782
|
-
* ```
|
|
783
|
-
*/
|
|
784
|
-
interface PptxTableCell3D {
|
|
785
|
-
/** Bevel width in px (from `a:bevel@w`, EMU converted). */
|
|
786
|
-
bevelWidth?: number;
|
|
787
|
-
/** Bevel height in px (from `a:bevel@h`, EMU converted). */
|
|
788
|
-
bevelHeight?: number;
|
|
789
|
-
/** Bevel preset name (`a:bevel@prst`, e.g. `circle`, `relaxedInset`). */
|
|
790
|
-
bevelPreset?: string;
|
|
791
|
-
/** Preset material (`a:cell3D@prstMaterial`, e.g. `plastic`, `metal`). */
|
|
792
|
-
material?: string;
|
|
793
|
-
/** Light rig type (`a:lightRig@rig`, e.g. `threePt`, `soft`). */
|
|
794
|
-
lightRig?: string;
|
|
795
|
-
/** Light rig direction (`a:lightRig@dir`, e.g. `tl`, `t`, `tr`). */
|
|
796
|
-
lightRigDirection?: string;
|
|
797
|
-
}
|
|
798
|
-
/**
|
|
799
|
-
* One styled text run inside a table cell's `a:txBody`.
|
|
800
|
-
*
|
|
801
|
-
* `PptxTableCell.text` is a flat string and `PptxTableCell.style` describes
|
|
802
|
-
* only the FIRST run, so a cell mixing formats ("Revenue **grew 42%** last
|
|
803
|
-
* year") cannot be represented by those two alone. {@link PptxTableCell.runs}
|
|
804
|
-
* carries the full sequence, with paragraph and line breaks as marker entries
|
|
805
|
-
* so a renderer can walk it linearly.
|
|
806
|
-
*
|
|
807
|
-
* Structurally identical to `pptx-viewer-shared`'s `CellTextRun`, which every
|
|
808
|
-
* binding's table renderer already consumes.
|
|
809
|
-
*
|
|
810
|
-
* @example
|
|
811
|
-
* ```ts
|
|
812
|
-
* const runs: PptxTableCellTextRun[] = [
|
|
813
|
-
* { text: "Revenue " },
|
|
814
|
-
* { text: "grew 42%", bold: true, color: "#C00000" },
|
|
815
|
-
* ];
|
|
816
|
-
* // => satisfies PptxTableCellTextRun[]
|
|
817
|
-
* ```
|
|
818
|
-
*/
|
|
819
|
-
interface PptxTableCellTextRun {
|
|
820
|
-
/** Run text. Empty for the break markers below. */
|
|
821
|
-
text: string;
|
|
822
|
-
/** This entry starts a new paragraph (`a:p` boundary) rather than carrying text. */
|
|
823
|
-
isParagraphBreak?: boolean;
|
|
824
|
-
/** This entry is a soft line break (`a:br`) rather than carrying text. */
|
|
825
|
-
isLineBreak?: boolean;
|
|
826
|
-
/** This entry carries an `a:fld` value rather than a literal `a:r`. */
|
|
827
|
-
isField?: true;
|
|
828
|
-
bold?: boolean;
|
|
829
|
-
italic?: boolean;
|
|
830
|
-
underline?: boolean;
|
|
831
|
-
strikethrough?: boolean;
|
|
832
|
-
/** Resolved run colour as a CSS colour string. */
|
|
833
|
-
color?: string;
|
|
834
|
-
/** Run font size in points (`a:rPr@sz` / 100). */
|
|
835
|
-
fontSize?: number;
|
|
836
|
-
/** Run font family from `a:rPr/a:latin@typeface` (or `a:ea` / `a:cs`). */
|
|
837
|
-
fontFamily?: string;
|
|
838
|
-
/** Run language from `a:rPr/@lang`, such as `ko-KR`. */
|
|
839
|
-
language?: string;
|
|
840
|
-
/**
|
|
841
|
-
* Run baseline shift from `a:rPr/@baseline`, in thousandths of a percent
|
|
842
|
-
* (`-25000` is a 25% subscript). Positive raises the run, negative lowers it.
|
|
843
|
-
*/
|
|
844
|
-
baseline?: number;
|
|
845
|
-
/** Character spacing from `a:rPr/@spc`, in hundredths of a point. */
|
|
846
|
-
characterSpacing?: number;
|
|
847
|
-
}
|
|
848
|
-
/**
|
|
849
|
-
* One paragraph's own `a:pPr` layout inside a table cell: alignment,
|
|
850
|
-
* direction, left margin and first-line indent, line spacing, and space
|
|
851
|
-
* before and after. For an empty paragraph, also the size of its line from
|
|
852
|
-
* `a:endParaRPr`.
|
|
853
|
-
*
|
|
854
|
-
* The layout fields and units are the ones {@link TextStyle} uses for shape
|
|
855
|
-
* text (px for margins, indent and paragraph spacing; points for exact line
|
|
856
|
-
* spacing), so a renderer resolves both through the same paragraph helpers.
|
|
857
|
-
*
|
|
858
|
-
* @example
|
|
859
|
-
* ```ts
|
|
860
|
-
* const paragraph: PptxTableCellParagraph = {
|
|
861
|
-
* align: "right",
|
|
862
|
-
* paragraphMarginLeft: 12,
|
|
863
|
-
* lineSpacingExactPt: 9.6,
|
|
864
|
-
* };
|
|
865
|
-
* // => satisfies PptxTableCellParagraph
|
|
866
|
-
* ```
|
|
867
|
-
*/
|
|
868
|
-
type PptxTableCellParagraph = Pick<TextStyle, 'align' | 'rtl' | 'paragraphMarginLeft' | 'paragraphIndent' | 'lineSpacing' | 'lineSpacingExactPt' | 'paragraphSpacingBefore' | 'paragraphSpacingAfter'> & {
|
|
869
|
-
/**
|
|
870
|
-
* For a paragraph with no run, field or break: the size of its line in
|
|
871
|
-
* points, from `a:endParaRPr@sz` (cell runs give their sizes in points too).
|
|
872
|
-
*/
|
|
873
|
-
endParaFontSize?: number;
|
|
874
|
-
};
|
|
875
|
-
/**
|
|
876
|
-
* A single table cell with text content, optional style, and merge info.
|
|
877
|
-
*
|
|
878
|
-
* @example
|
|
879
|
-
* ```ts
|
|
880
|
-
* const cell: PptxTableCell = {
|
|
881
|
-
* text: "$1.5M",
|
|
882
|
-
* style: { bold: true, align: "right" },
|
|
883
|
-
* gridSpan: 1,
|
|
884
|
-
* };
|
|
885
|
-
* // => satisfies PptxTableCell
|
|
886
|
-
* ```
|
|
887
|
-
*/
|
|
888
|
-
interface PptxTableCell {
|
|
889
|
-
text: string;
|
|
890
|
-
style?: PptxTableCellStyle;
|
|
891
|
-
/**
|
|
892
|
-
* Per-run formatting for the cell's text, when it has any beyond what
|
|
893
|
-
* {@link style} can express. Present only for cells whose `a:txBody`
|
|
894
|
-
* actually carries runs; renderers fall back to {@link text} when absent.
|
|
895
|
-
*
|
|
896
|
-
* Editing a cell's text invalidates these (the editor produces a plain
|
|
897
|
-
* string), so an edit path must clear them alongside setting `text`.
|
|
898
|
-
*/
|
|
899
|
-
textRuns?: PptxTableCellTextRun[];
|
|
900
|
-
/**
|
|
901
|
-
* Each paragraph's own layout, one entry per `a:p` in source order (the
|
|
902
|
-
* paragraphs {@link textRuns} separates with `isParagraphBreak`). An entry
|
|
903
|
-
* is `{}` for a paragraph that sets none of it. Present only when some
|
|
904
|
-
* paragraph sets something. Editing the cell's text keeps only the first
|
|
905
|
-
* entry, as the rewritten `a:txBody` keeps only the first paragraph's
|
|
906
|
-
* `a:pPr`. Aligning the cell gives one entry per line of {@link text}
|
|
907
|
-
* instead; save writes as many as the cell has `a:p`.
|
|
908
|
-
*/
|
|
909
|
-
paragraphs?: PptxTableCellParagraph[];
|
|
910
|
-
/** Column span (defaults to 1). */
|
|
911
|
-
gridSpan?: number;
|
|
912
|
-
/** Row span (defaults to 1). */
|
|
913
|
-
rowSpan?: number;
|
|
914
|
-
/** Whether this cell is merged vertically with the cell above. */
|
|
915
|
-
vMerge?: boolean;
|
|
916
|
-
/** Whether this cell is horizontally merged with the cell to the left (gridSpan continuation). */
|
|
917
|
-
hMerge?: boolean;
|
|
918
|
-
/**
|
|
919
|
-
* Opaque round-trip storage for `a:tcPr` attributes that don't yet have
|
|
920
|
-
* typed equivalents on {@link PptxTableCellStyle} (e.g. `horzOverflow`,
|
|
921
|
-
* `anchorCtr`, `headers`, `hideSlicers`, `slicerCacheId`). Keys are the
|
|
922
|
-
* raw XML attribute names without the `@_` prefix used by
|
|
923
|
-
* fast-xml-parser. Re-emitted verbatim by the save writer when present.
|
|
924
|
-
*/
|
|
925
|
-
extraAttributes?: Record<string, string>;
|
|
926
|
-
}
|
|
927
|
-
/**
|
|
928
|
-
* A single table row with an optional height and an array of cells.
|
|
929
|
-
*
|
|
930
|
-
* @example
|
|
931
|
-
* ```ts
|
|
932
|
-
* const row: PptxTableRow = {
|
|
933
|
-
* height: 40,
|
|
934
|
-
* cells: [
|
|
935
|
-
* { text: "Name" },
|
|
936
|
-
* { text: "Score" },
|
|
937
|
-
* ],
|
|
938
|
-
* };
|
|
939
|
-
* // => satisfies PptxTableRow
|
|
940
|
-
* ```
|
|
941
|
-
*/
|
|
942
|
-
interface PptxTableRow {
|
|
943
|
-
/** Row height in px. */
|
|
944
|
-
height?: number;
|
|
945
|
-
cells: PptxTableCell[];
|
|
946
|
-
}
|
|
947
|
-
/**
|
|
948
|
-
* Complete parsed table data for a {@link TablePptxElement}.
|
|
949
|
-
*
|
|
950
|
-
* Includes row/cell data, column widths, banding flags, and the applied
|
|
951
|
-
* table style ID.
|
|
952
|
-
*
|
|
953
|
-
* @example
|
|
954
|
-
* ```ts
|
|
955
|
-
* const data: PptxTableData = {
|
|
956
|
-
* rows: [
|
|
957
|
-
* { cells: [{ text: "Product" }, { text: "Revenue" }] },
|
|
958
|
-
* { cells: [{ text: "Widget A" }, { text: "$3.4M" }] },
|
|
959
|
-
* ],
|
|
960
|
-
* columnWidths: [0.6, 0.4],
|
|
961
|
-
* firstRowHeader: true,
|
|
962
|
-
* bandedRows: true,
|
|
963
|
-
* };
|
|
964
|
-
* // => satisfies PptxTableData
|
|
965
|
-
* ```
|
|
966
|
-
*/
|
|
967
|
-
interface PptxTableData {
|
|
968
|
-
rows: PptxTableRow[];
|
|
969
|
-
/** Column widths as proportion of total (summing to 1). */
|
|
970
|
-
columnWidths: number[];
|
|
971
|
-
/** Whether the table has banded rows. */
|
|
972
|
-
bandedRows?: boolean;
|
|
973
|
-
/** Whether the first row is a header. */
|
|
974
|
-
firstRowHeader?: boolean;
|
|
975
|
-
/** Whether banded columns are enabled. */
|
|
976
|
-
bandedColumns?: boolean;
|
|
977
|
-
/** Whether the last row is styled as a total row. */
|
|
978
|
-
lastRow?: boolean;
|
|
979
|
-
/** Whether the first column is styled as a header column. */
|
|
980
|
-
firstCol?: boolean;
|
|
981
|
-
/** Whether the last column is styled specially. */
|
|
982
|
-
lastCol?: boolean;
|
|
983
|
-
/** Table style ID from `a:tblPr/a:tblStyle@val` or `a:tblPr@tblStyle`. */
|
|
984
|
-
tableStyleId?: string;
|
|
985
|
-
/**
|
|
986
|
-
* Set by a table style pick (which, like PowerPoint's, clears every cell's
|
|
987
|
-
* direct fill and borders): the next save drops the direct `a:tcPr` fills,
|
|
988
|
-
* lines and `a:cell3D` the cells' model styles no longer carry, even when
|
|
989
|
-
* `tableStyleId` ends up equal to the file's (the same style picked again,
|
|
990
|
-
* or a pick of B then back to A). Not read from or written to the file.
|
|
991
|
-
* It stays set after a save, which is harmless: a later save only removes
|
|
992
|
-
* children the model still has no value for.
|
|
993
|
-
*/
|
|
994
|
-
clearDirectCellFormatting?: boolean;
|
|
995
|
-
/** Number of rows per banding group (default 1). */
|
|
996
|
-
bandRowCycle?: number;
|
|
997
|
-
/** Number of columns per banding group (default 1). */
|
|
998
|
-
bandColCycle?: number;
|
|
999
|
-
/** Right-to-left table layout from `a:tblPr/@rtl`. */
|
|
1000
|
-
rtl?: boolean;
|
|
1001
|
-
/**
|
|
1002
|
-
* `a:tblPr`'s OWN fill (`CT_TableProperties` §21.1.3.15's
|
|
1003
|
-
* `EG_FillProperties`), independent of any `a:tblStyleLst`-referenced style
|
|
1004
|
-
* or that style's `a:tblBg`. Applied as the lowest-priority fill layer,
|
|
1005
|
-
* beneath the table style's `wholeTbl` fill. Real PowerPoint decks route
|
|
1006
|
-
* table appearance through `tableStyleId` instead, so this mainly matters
|
|
1007
|
-
* for non-PowerPoint authoring tools (issue G6).
|
|
1008
|
-
*/
|
|
1009
|
-
tableFill?: ParsedTableStyleFill;
|
|
1010
|
-
/**
|
|
1011
|
-
* `a:tblPr`'s own `a:effectLst` (or `a:effectDag`) effect chain,
|
|
1012
|
-
* independent of the referenced table style, decomposed into a typed
|
|
1013
|
-
* sequence of {@link ParsedTableStyleEffect} nodes (issue G6). Each node
|
|
1014
|
-
* keeps its own XML verbatim for lossless round-trip; empty array is
|
|
1015
|
-
* normalised to `undefined` by the parser so `tableEffects` is only ever
|
|
1016
|
-
* present when there is at least one effect.
|
|
1017
|
-
*/
|
|
1018
|
-
tableEffects?: ParsedTableStyleEffect[];
|
|
1019
|
-
/**
|
|
1020
|
-
* Table-cell-context default text size in points, resolved from the
|
|
1021
|
-
* slide's master `p:otherStyle` (ECMA-376 §19.3.1.42 CT_TextListStyle,
|
|
1022
|
-
* §19.3.1.52 for `p:txStyles`). PowerPoint sizes a table cell's text off
|
|
1023
|
-
* this master default (commonly 18pt) whenever neither the run nor the
|
|
1024
|
-
* (size-less) table style provides one; without it, cell text without an
|
|
1025
|
-
* explicit `a:rPr@sz` fell back to the browser's own default font size
|
|
1026
|
-
* (16px / 12pt) instead. A render-only hint: it is not part of any
|
|
1027
|
-
* individual cell's parsed style and is never written back on save, so
|
|
1028
|
-
* resaving an unstyled cell does not bake in an explicit size that was
|
|
1029
|
-
* never authored. `undefined` when no master/otherStyle size resolves
|
|
1030
|
-
* (renderers should leave the browser default in place in that case).
|
|
1031
|
-
*/
|
|
1032
|
-
defaultCellFontSize?: number;
|
|
1033
|
-
}
|
|
1034
|
-
/**
|
|
1035
|
-
* A single fill reference within a table style section.
|
|
1036
|
-
*
|
|
1037
|
-
* @example
|
|
1038
|
-
* ```ts
|
|
1039
|
-
* const fill: ParsedTableStyleFill = {
|
|
1040
|
-
* schemeColor: "accent1",
|
|
1041
|
-
* tint: 40000, // 40% tint
|
|
1042
|
-
* };
|
|
1043
|
-
* // => satisfies ParsedTableStyleFill
|
|
1044
|
-
* ```
|
|
1045
|
-
*/
|
|
1046
|
-
interface ParsedTableStyleFill {
|
|
1047
|
-
/**
|
|
1048
|
-
* Theme colour key (e.g. `accent1`, `dk1`). Empty string when the fill is a
|
|
1049
|
-
* non-scheme fill (explicit sRGB, gradient, pattern, or none) that carries
|
|
1050
|
-
* no theme colour reference; the renderer then resolves {@link color},
|
|
1051
|
-
* {@link gradient}, {@link pattern}, or {@link noFill} instead.
|
|
1052
|
-
*/
|
|
1053
|
-
schemeColor: string;
|
|
1054
|
-
/** Tint value (0-100 000). */
|
|
1055
|
-
tint?: number;
|
|
1056
|
-
/** Shade value (0-100 000). */
|
|
1057
|
-
shade?: number;
|
|
1058
|
-
/**
|
|
1059
|
-
* Alpha (opacity) value (0-100 000, where 100 000 is fully opaque) from an
|
|
1060
|
-
* `a:alpha` child of `a:schemeClr`/`a:srgbClr`. Several built-in table
|
|
1061
|
-
* styles (e.g. "Light Style 1/3", "Themed Style 1/2") band their rows with
|
|
1062
|
-
* a partially transparent tint of the theme colour rather than a tint/shade
|
|
1063
|
-
* blend.
|
|
1064
|
-
*/
|
|
1065
|
-
alpha?: number;
|
|
1066
|
-
/** Explicit sRGB hex colour (e.g. `#FF8800`) from `a:srgbClr`. */
|
|
1067
|
-
color?: string;
|
|
1068
|
-
/** The fill was `a:noFill`: renders transparent and clears lower layers. */
|
|
1069
|
-
noFill?: boolean;
|
|
1070
|
-
/** Gradient fill parsed from `a:gradFill`. */
|
|
1071
|
-
gradient?: ParsedTableStyleGradient;
|
|
1072
|
-
/** Preset pattern fill parsed from `a:pattFill`. */
|
|
1073
|
-
pattern?: ParsedTableStylePattern;
|
|
1074
|
-
/** Image texture fill parsed from `a:blipFill`. */
|
|
1075
|
-
image?: ParsedTableStyleImage;
|
|
1076
|
-
/**
|
|
1077
|
-
* Set when the fill was resolved from `a:tcStyle/a:fillRef`: a JSON snapshot
|
|
1078
|
-
* of the resolved fill (without this field). The save path compares it to
|
|
1079
|
-
* tell an untouched reference from an edited fill.
|
|
1080
|
-
*/
|
|
1081
|
-
fillRefSnapshot?: string;
|
|
1082
|
-
}
|
|
1083
|
-
/**
|
|
1084
|
-
* An image texture fill parsed from a table style section's `a:blipFill`.
|
|
1085
|
-
*
|
|
1086
|
-
* `ppt/tableStyles.xml` is a presentation-level part parsed once (not
|
|
1087
|
-
* per-slide), so this mirrors the per-CELL `a:tcPr/a:blipFill` two-field lazy
|
|
1088
|
-
* pattern (`PptxTableCellStyle.backgroundImageFillPath` /
|
|
1089
|
-
* `backgroundImageFillData`): `path` starts out as a raw archive-relative
|
|
1090
|
-
* path (or an already-external `http(s):`/`data:` URL), and a load pipeline
|
|
1091
|
-
* patches it to a displayable URL in `data` once resolved.
|
|
1092
|
-
*/
|
|
1093
|
-
interface ParsedTableStyleImage {
|
|
1094
|
-
/** Archive-relative path, or an already-displayable external/data URL. */
|
|
1095
|
-
path?: string;
|
|
1096
|
-
/** Displayable URL once a load pipeline has resolved `path`. */
|
|
1097
|
-
data?: string;
|
|
1098
|
-
}
|
|
1099
|
-
/** A single colour stop within a {@link ParsedTableStyleGradient}. */
|
|
1100
|
-
interface ParsedTableStyleGradientStop {
|
|
1101
|
-
/** Stop position as a percentage (0-100). */
|
|
1102
|
-
position: number;
|
|
1103
|
-
/** Stop colour (scheme or explicit sRGB). */
|
|
1104
|
-
fill: ParsedTableStyleFill;
|
|
1105
|
-
}
|
|
1106
|
-
/** A gradient fill parsed from a table style section's `a:gradFill`. */
|
|
1107
|
-
interface ParsedTableStyleGradient {
|
|
1108
|
-
/** Ordered colour stops. */
|
|
1109
|
-
stops: ParsedTableStyleGradientStop[];
|
|
1110
|
-
/** Linear gradient angle in degrees (from `a:lin@ang`, 60000ths -> deg). */
|
|
1111
|
-
angle?: number;
|
|
1112
|
-
/** Gradient family: linear (`a:lin`) or radial (`a:path`). */
|
|
1113
|
-
type: 'linear' | 'radial';
|
|
1114
|
-
}
|
|
1115
|
-
/** A preset pattern fill parsed from a table style section's `a:pattFill`. */
|
|
1116
|
-
interface ParsedTableStylePattern {
|
|
1117
|
-
/** OOXML preset name (e.g. `ltDnDiag`) from `a:pattFill@prst`. */
|
|
1118
|
-
preset: string;
|
|
1119
|
-
/** Foreground colour (`a:fgClr`). */
|
|
1120
|
-
foreground?: ParsedTableStyleFill;
|
|
1121
|
-
/** Background colour (`a:bgClr`). */
|
|
1122
|
-
background?: ParsedTableStyleFill;
|
|
1123
|
-
}
|
|
1124
|
-
/**
|
|
1125
|
-
* A single entry in the parsed table style map.
|
|
1126
|
-
*
|
|
1127
|
-
* Contains fill colours for whole-table, banded rows/columns, first/last
|
|
1128
|
-
* row, and first/last column sections.
|
|
1129
|
-
*
|
|
1130
|
-
* @example
|
|
1131
|
-
* ```ts
|
|
1132
|
-
* const entry: ParsedTableStyleEntry = {
|
|
1133
|
-
* styleId: "{5C22544A-7EE6-4342-B048-85BDC9FD1C3A}",
|
|
1134
|
-
* styleName: "Medium Style 2 - Accent 1",
|
|
1135
|
-
* accentKey: "accent1",
|
|
1136
|
-
* wholeTblFill: { schemeColor: "accent1", tint: 20000 },
|
|
1137
|
-
* band1HFill: { schemeColor: "accent1", tint: 40000 },
|
|
1138
|
-
* firstRowFill: { schemeColor: "accent1" },
|
|
1139
|
-
* };
|
|
1140
|
-
* // => satisfies ParsedTableStyleEntry
|
|
1141
|
-
* ```
|
|
1142
|
-
*/
|
|
1143
|
-
/** Text properties from a:tcTxStyle in a table style section. */
|
|
1144
|
-
interface ParsedTableStyleText {
|
|
1145
|
-
/** Font bold. */
|
|
1146
|
-
bold?: boolean;
|
|
1147
|
-
/** Font italic. */
|
|
1148
|
-
italic?: boolean;
|
|
1149
|
-
/** Font underline (from `a:tcTxStyle@u`, any value other than `none`). */
|
|
1150
|
-
underline?: boolean;
|
|
1151
|
-
/** Font colour as theme scheme key. */
|
|
1152
|
-
fontSchemeColor?: string;
|
|
1153
|
-
/** Font colour tint (0-100 000). */
|
|
1154
|
-
fontTint?: number;
|
|
1155
|
-
/** Font colour shade (0-100 000). */
|
|
1156
|
-
fontShade?: number;
|
|
1157
|
-
/** Explicit sRGB hex font colour (e.g. `#FF0000`) from `a:srgbClr`. */
|
|
1158
|
-
fontColor?: string;
|
|
1159
|
-
/** Typeface from `a:font@typeface` (latin font). */
|
|
1160
|
-
fontFace?: string;
|
|
1161
|
-
/** Font-collection index from `a:fontRef@idx` (`minor`, `major`, `none`). */
|
|
1162
|
-
fontRefIdx?: string;
|
|
1163
|
-
}
|
|
1164
|
-
/**
|
|
1165
|
-
* A single border side within a table style's `a:tcStyle/a:tcBdr`.
|
|
1166
|
-
*
|
|
1167
|
-
* Corresponds to one of `a:left`, `a:right`, `a:top`, `a:bottom`,
|
|
1168
|
-
* `a:insideH`, `a:insideV`, `a:tl2br`, `a:tr2bl` (each a
|
|
1169
|
-
* `CT_ThemeableLineStyle` wrapping an `a:ln`).
|
|
1170
|
-
*
|
|
1171
|
-
* @example
|
|
1172
|
-
* ```ts
|
|
1173
|
-
* const side: ParsedTableStyleBorder = {
|
|
1174
|
-
* width: 1,
|
|
1175
|
-
* dash: 'solid',
|
|
1176
|
-
* fill: { schemeColor: 'lt1' },
|
|
1177
|
-
* };
|
|
1178
|
-
* // => satisfies ParsedTableStyleBorder
|
|
1179
|
-
* ```
|
|
1180
|
-
*/
|
|
1181
|
-
interface ParsedTableStyleBorder {
|
|
1182
|
-
/** Line width in px (converted from the `a:ln@w` EMU value). */
|
|
1183
|
-
width?: number;
|
|
1184
|
-
/** OOXML `a:prstDash@val` (e.g. `solid`, `dash`, `sysDot`). */
|
|
1185
|
-
dash?: string;
|
|
1186
|
-
/** Compound line type from `a:ln@cmpd` (`sng`, `dbl`, `thickThin`, ...). */
|
|
1187
|
-
compound?: string;
|
|
1188
|
-
/** Border colour as a theme scheme fill (from `a:ln/a:solidFill/a:schemeClr`). */
|
|
1189
|
-
fill?: ParsedTableStyleFill;
|
|
1190
|
-
/** Explicit hex colour when the line used `a:srgbClr` (e.g. `#808080`). */
|
|
1191
|
-
color?: string;
|
|
1192
|
-
/** The line was `a:noFill` - an explicit "no border" that clears lower layers. */
|
|
1193
|
-
noFill?: boolean;
|
|
1194
|
-
/**
|
|
1195
|
-
* Theme line-style reference (`<a:lnRef idx="N">`, the choice sibling of
|
|
1196
|
-
* `a:ln`), as the "Themed Style" built-ins use. Set alone: the line's
|
|
1197
|
-
* width, dash and colour come from the theme's `a:lnStyleLst[idx - 1]`
|
|
1198
|
-
* with its `phClr` replaced by the reference's own colour.
|
|
1199
|
-
*/
|
|
1200
|
-
lnRef?: ParsedTableFillRef;
|
|
1201
|
-
}
|
|
1202
|
-
/**
|
|
1203
|
-
* The set of border sides parsed from a table style section's
|
|
1204
|
-
* `a:tcStyle/a:tcBdr` element.
|
|
1205
|
-
*/
|
|
1206
|
-
interface ParsedTableStyleBorders {
|
|
1207
|
-
left?: ParsedTableStyleBorder;
|
|
1208
|
-
right?: ParsedTableStyleBorder;
|
|
1209
|
-
top?: ParsedTableStyleBorder;
|
|
1210
|
-
bottom?: ParsedTableStyleBorder;
|
|
1211
|
-
/** Interior horizontal borders between rows in the region. */
|
|
1212
|
-
insideH?: ParsedTableStyleBorder;
|
|
1213
|
-
/** Interior vertical borders between columns in the region. */
|
|
1214
|
-
insideV?: ParsedTableStyleBorder;
|
|
1215
|
-
/** Top-left to bottom-right diagonal. */
|
|
1216
|
-
tl2br?: ParsedTableStyleBorder;
|
|
1217
|
-
/**
|
|
1218
|
-
* Top-right to bottom-left diagonal (`a:tr2bl`, ECMA-376's
|
|
1219
|
-
* `CT_TableCellBorderStyle` sequence: left/right/top/bottom/insideH/
|
|
1220
|
-
* insideV/tl2br/tr2bl). The field keeps its historical `bl2tr` spelling
|
|
1221
|
-
* only in the sense that it names the same geometric anti-diagonal line
|
|
1222
|
-
* (top-right-to-bottom-left and bottom-left-to-top-right describe one
|
|
1223
|
-
* undirected diagonal); the parser accepts the real `a:tr2bl` element and,
|
|
1224
|
-
* leniently, a legacy `a:bl2tr` this app previously wrote (issue G4).
|
|
1225
|
-
*/
|
|
1226
|
-
tr2bl?: ParsedTableStyleBorder;
|
|
1227
|
-
}
|
|
1228
|
-
/**
|
|
1229
|
-
* Table background style (CT_TableBackgroundStyle, ECMA-376 §21.1.3.7).
|
|
1230
|
-
*
|
|
1231
|
-
* Corresponds to the `<a:tblBg>` child of `<a:tblStyle>`. Captures the
|
|
1232
|
-
* resolved scheme-fill colour, an unresolved style-matrix `a:fillRef`, and a
|
|
1233
|
-
* presence flag for effects (verbatim XML for the effect list is preserved
|
|
1234
|
-
* separately by the save path).
|
|
1235
|
-
*/
|
|
1236
|
-
interface ParsedTableBackground {
|
|
1237
|
-
/** Solid fill (resolved from `a:fill > a:solidFill > a:schemeClr`). */
|
|
1238
|
-
fill?: ParsedTableStyleFill;
|
|
1239
|
-
/**
|
|
1240
|
-
* Style-matrix fill reference (`<a:fillRef idx="N">...</a:fillRef>`),
|
|
1241
|
-
* mutually exclusive with {@link fill} (`a:fill` is the choice sibling of
|
|
1242
|
-
* `a:fillRef` in `CT_TableBackgroundStyle`).
|
|
1243
|
-
*/
|
|
1244
|
-
fillRef?: ParsedTableFillRef;
|
|
1245
|
-
/**
|
|
1246
|
-
* Style-matrix effect reference (`<a:effectRef idx="N">...</a:effectRef>`,
|
|
1247
|
-
* "Themed Style 1/2"): the theme's effect style (usually an outer shadow)
|
|
1248
|
-
* drawn under the whole table.
|
|
1249
|
-
*/
|
|
1250
|
-
effectRef?: ParsedTableFillRef;
|
|
1251
|
-
/** The outer shadow {@link effectRef} resolves to against a theme (set at render time). */
|
|
1252
|
-
shadow?: ParsedTableBackgroundShadow;
|
|
1253
|
-
/** Has an `a:effectLst` child that should be round-tripped. */
|
|
1254
|
-
hasEffectLst?: boolean;
|
|
1255
|
-
}
|
|
1256
|
-
/** The outer shadow a table style's `a:tblBg/a:effectRef` resolves to (px, colour as `#RRGGBB`). */
|
|
1257
|
-
interface ParsedTableBackgroundShadow {
|
|
1258
|
-
color: string;
|
|
1259
|
-
/** 0..1. */
|
|
1260
|
-
opacity: number;
|
|
1261
|
-
blur: number;
|
|
1262
|
-
offsetX: number;
|
|
1263
|
-
offsetY: number;
|
|
1264
|
-
}
|
|
1265
|
-
interface ParsedTableStyleEntry {
|
|
1266
|
-
styleId: string;
|
|
1267
|
-
styleName?: string;
|
|
1268
|
-
/** Dominant accent key derived from fills (e.g. `accent1`). */
|
|
1269
|
-
accentKey?: string;
|
|
1270
|
-
/** Table-level background (`<a:tblBg>`). */
|
|
1271
|
-
tableBackground?: ParsedTableBackground;
|
|
1272
|
-
wholeTblFill?: ParsedTableStyleFill;
|
|
1273
|
-
band1HFill?: ParsedTableStyleFill;
|
|
1274
|
-
band2HFill?: ParsedTableStyleFill;
|
|
1275
|
-
band1VFill?: ParsedTableStyleFill;
|
|
1276
|
-
band2VFill?: ParsedTableStyleFill;
|
|
1277
|
-
firstRowFill?: ParsedTableStyleFill;
|
|
1278
|
-
lastRowFill?: ParsedTableStyleFill;
|
|
1279
|
-
firstColFill?: ParsedTableStyleFill;
|
|
1280
|
-
lastColFill?: ParsedTableStyleFill;
|
|
1281
|
-
/** Corner cell fills (`<a:seCell>`, `<a:swCell>`, `<a:neCell>`, `<a:nwCell>`). */
|
|
1282
|
-
seCellFill?: ParsedTableStyleFill;
|
|
1283
|
-
swCellFill?: ParsedTableStyleFill;
|
|
1284
|
-
neCellFill?: ParsedTableStyleFill;
|
|
1285
|
-
nwCellFill?: ParsedTableStyleFill;
|
|
1286
|
-
/**
|
|
1287
|
-
* Per-role border styling from `a:tcStyle/a:tcBdr`. These supply the
|
|
1288
|
-
* gridlines/edges a styled table inherits from its table style when the
|
|
1289
|
-
* cells carry no explicit per-cell `a:lnX` overrides.
|
|
1290
|
-
*/
|
|
1291
|
-
wholeTblBorders?: ParsedTableStyleBorders;
|
|
1292
|
-
firstRowBorders?: ParsedTableStyleBorders;
|
|
1293
|
-
lastRowBorders?: ParsedTableStyleBorders;
|
|
1294
|
-
firstColBorders?: ParsedTableStyleBorders;
|
|
1295
|
-
lastColBorders?: ParsedTableStyleBorders;
|
|
1296
|
-
band1HBorders?: ParsedTableStyleBorders;
|
|
1297
|
-
band2HBorders?: ParsedTableStyleBorders;
|
|
1298
|
-
band1VBorders?: ParsedTableStyleBorders;
|
|
1299
|
-
band2VBorders?: ParsedTableStyleBorders;
|
|
1300
|
-
seCellBorders?: ParsedTableStyleBorders;
|
|
1301
|
-
swCellBorders?: ParsedTableStyleBorders;
|
|
1302
|
-
neCellBorders?: ParsedTableStyleBorders;
|
|
1303
|
-
nwCellBorders?: ParsedTableStyleBorders;
|
|
1304
|
-
/** Per-role text styling from a:tcTxStyle. */
|
|
1305
|
-
wholeTblText?: ParsedTableStyleText;
|
|
1306
|
-
firstRowText?: ParsedTableStyleText;
|
|
1307
|
-
lastRowText?: ParsedTableStyleText;
|
|
1308
|
-
firstColText?: ParsedTableStyleText;
|
|
1309
|
-
lastColText?: ParsedTableStyleText;
|
|
1310
|
-
band1HText?: ParsedTableStyleText;
|
|
1311
|
-
band2HText?: ParsedTableStyleText;
|
|
1312
|
-
band1VText?: ParsedTableStyleText;
|
|
1313
|
-
band2VText?: ParsedTableStyleText;
|
|
1314
|
-
seCellText?: ParsedTableStyleText;
|
|
1315
|
-
swCellText?: ParsedTableStyleText;
|
|
1316
|
-
neCellText?: ParsedTableStyleText;
|
|
1317
|
-
nwCellText?: ParsedTableStyleText;
|
|
1318
|
-
/**
|
|
1319
|
-
* Per-role 3D bevel + lighting from `a:tcStyle/a:cell3D` (CT_Cell3D),
|
|
1320
|
-
* distinct from the per-cell `a:tcPr/a:cell3D` {@link PptxTableCellStyle}
|
|
1321
|
-
* already supports. None of PowerPoint's 74 built-in gallery styles use
|
|
1322
|
-
* this (0 hits in the built-in catalogue), so it only matters for a
|
|
1323
|
-
* hand-authored or third-party table style.
|
|
1324
|
-
*/
|
|
1325
|
-
wholeTblCell3D?: PptxTableCell3D;
|
|
1326
|
-
firstRowCell3D?: PptxTableCell3D;
|
|
1327
|
-
lastRowCell3D?: PptxTableCell3D;
|
|
1328
|
-
firstColCell3D?: PptxTableCell3D;
|
|
1329
|
-
lastColCell3D?: PptxTableCell3D;
|
|
1330
|
-
band1HCell3D?: PptxTableCell3D;
|
|
1331
|
-
band2HCell3D?: PptxTableCell3D;
|
|
1332
|
-
band1VCell3D?: PptxTableCell3D;
|
|
1333
|
-
band2VCell3D?: PptxTableCell3D;
|
|
1334
|
-
seCellCell3D?: PptxTableCell3D;
|
|
1335
|
-
swCellCell3D?: PptxTableCell3D;
|
|
1336
|
-
neCellCell3D?: PptxTableCell3D;
|
|
1337
|
-
nwCellCell3D?: PptxTableCell3D;
|
|
1338
|
-
}
|
|
1339
|
-
/**
|
|
1340
|
-
* Map of GUID → table style entry.
|
|
1341
|
-
*
|
|
1342
|
-
* Parsed from `ppt/tableStyles.xml` and indexed by the style GUID
|
|
1343
|
-
* referenced in `a:tblPr@tblStyle`.
|
|
1344
|
-
*
|
|
1345
|
-
* @example
|
|
1346
|
-
* ```ts
|
|
1347
|
-
* const styles: ParsedTableStyleMap = {
|
|
1348
|
-
* "{5C22544A-7EE6-4342-B048-85BDC9FD1C3A}": {
|
|
1349
|
-
* styleId: "{5C22544A-7EE6-4342-B048-85BDC9FD1C3A}",
|
|
1350
|
-
* styleName: "Medium Style 2 - Accent 1",
|
|
1351
|
-
* accentKey: "accent1",
|
|
1352
|
-
* },
|
|
1353
|
-
* };
|
|
1354
|
-
* // => satisfies ParsedTableStyleMap
|
|
1355
|
-
* ```
|
|
1356
|
-
*/
|
|
1357
|
-
type ParsedTableStyleMap = Record<string, ParsedTableStyleEntry>;
|
|
1358
|
-
export { TableStyleSectionPatch as C, ShapeStyle as E, ParsedTableStyleEffect as S, ResolvedStyleMatrix as T, PptxTableCellTextRun as _, ParsedTableStyleEntry as a, CreateTableStyleOptions as b, ParsedTableStyleGradientStop as c, ParsedTableStylePattern as d, ParsedTableStyleText as f, PptxTableCellStyle as g, PptxTableCellParagraph as h, ParsedTableStyleBorders as i, ParsedTableStyleImage as l, PptxTableCell3D as m, ParsedTableBackgroundShadow as n, ParsedTableStyleFill as o, PptxTableCell as p, ParsedTableStyleBorder as r, ParsedTableStyleGradient as s, ParsedTableBackground as t, ParsedTableStyleMap as u, PptxTableData as v, PptxCustomDashSegment as w, ParsedTableFillRef as x, PptxTableRow as y };
|
|
1359
|
-
//# sourceMappingURL=table-BfgZfw5R.d.ts.map
|