pptx-angular-viewer 3.19.1 → 3.20.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.
@@ -1,5 +1,5 @@
1
1
  import * as pptx_viewer_core from 'pptx-viewer-core';
2
- import { PptxThemePreset, PptxElement, PptxSlide, ShapeStyle, PptxTextWarpPreset, XmlObject, PptxChartSeries, PptxChartLegendTextStyle, PptxChartData, PptxChartDataLabelPosition, PptxChartType, PptxElementAnimation, PptxAnimationPreset, PptxAnimationSequence, PptxAnimationTrigger, PptxAnimationTimingCurve, PptxAnimationRepeatMode, PptxAnimationDirection, PptxAfterAnimationAction, ParsedTableStyleMap, PptxThemeColorScheme, PptxThemeFontScheme, TablePptxElement, PptxSection, OlePptxElement, TextSegment, TextStyle, PptxTransitionType, PptxSlideTransition, SmartArtLayoutType, SmartArtColorScheme, PptxSmartArtChrome, PptxSmartArtDrawingShape, SmartArtStyle, PptxSmartArtData, PptxThemeColorRef, PlaceholderDefaults, PptxEmbeddedFont, SmartArtLayout, AccessibilityIssueSeverity, AccessibilityIssue, AccessibilityIssueType, AccessibilityCheckOptions, ElementActionType, InkPptxElement, PptxComment, PptxChartBarDirection, ImagePptxElement, MasterViewTab, MediaPptxElement, PptxTheme, PptxHandler, PptxData, PptxHandlerSaveOptions, PptxModernCommentAuthor, PptxCommentMention, PptxHeaderFooter, PptxCustomShow, PptxSlideMaster, PptxNotesMaster, PptxHandoutMaster, PptxPresentationProperties, PptxViewProperties, PptxCoreProperties, PptxAppProperties, PptxThemeOption, PptxCustomProperty, PptxTagCollection, ParsedSignature, PptxSaveFormat, PptxTableCell, PptxTableCellStyle, PptxTableRow, PptxTableData, SvgExportOptions, PptxGridSpacing, RenderedNode, RenderedCircleNode, RenderedPolygonNode, RenderedRectNode, SmartArtLayoutResult, Model3DPptxElement, ZoomPptxElement, ChartPptxElement, SmartArtPptxElement, PptxAnimationTimelineAnchor, MaterialPresetType, Text3DStyle, BevelPresetType, PptxBar3DShape, PptxChartDataLabelOptions, PptxChartAxisType, PptxChartAxisFormatting, PptxChartMarker, PptxChartDataPoint, PptxChartTrendline, PptxChartErrBars, PptxTextStyleLevels, SignatureStatus, ElementAction, PptxImageEffects, MediaBookmark, ColorMapAliasKey, ChartAxisEdit, ChartDataPointLabelEdit, PptxChartLegendPosition, PptxChartStyle, ChartAxisTitleStyleEdit, PptxChartMarkerSymbol, ChartGridlineStyleEdit, PptxSmartArtNode, PptxSmartArtNodeStyle, PptxLayoutPreview, MediaCaptionTrack, PptxMediaType } from 'pptx-viewer-core';
2
+ import { PptxThemePreset, PptxElement, PptxSlide, ShapeStyle, PptxTextWarpPreset, XmlObject, PptxChartSeries, PptxChartLegendTextStyle, PptxChartData, PptxChartDataLabelPosition, PptxChartType, PptxElementAnimation, PptxAnimationPreset, PptxAnimationSequence, PptxAnimationTrigger, PptxAnimationTimingCurve, PptxAnimationRepeatMode, PptxAnimationDirection, PptxAfterAnimationAction, ParsedTableStyleMap, PptxThemeColorScheme, PptxThemeFontScheme, TablePptxElement, PptxSection, OlePptxElement, TextSegment, TextStyle, PptxTransitionType, PptxSlideTransition, SmartArtLayoutType, SmartArtColorScheme, PptxSmartArtChrome, PptxSmartArtDrawingShape, SmartArtStyle, PptxSmartArtData, PptxThemeColorRef, PlaceholderDefaults, PptxEmbeddedFont, SmartArtLayout, AccessibilityIssueSeverity, AccessibilityIssue, AccessibilityIssueType, AccessibilityCheckOptions, ElementActionType, InkPptxElement, PptxComment, PptxChartBarDirection, ImagePptxElement, MasterViewTab, MediaPptxElement, PptxTheme, PptxHandler, PptxData, PptxHandlerSaveOptions, PptxModernCommentAuthor, PptxCommentMention, PptxHeaderFooter, PptxCustomShow, PptxSlideMaster, PptxNotesMaster, PptxHandoutMaster, PptxPresentationProperties, PptxViewProperties, PptxCoreProperties, PptxAppProperties, PptxThemeOption, PptxCustomProperty, PptxTagCollection, ParsedSignature, PptxSaveFormat, PptxTableCell, PptxTableCellStyle, PptxTableRow, PptxTableData, SvgExportOptions, PptxGridSpacing, ChartPptxElement, RenderedNode, RenderedCircleNode, RenderedPolygonNode, RenderedRectNode, SmartArtLayoutResult, Model3DPptxElement, ZoomPptxElement, SmartArtPptxElement, PptxAnimationTimelineAnchor, MaterialPresetType, Text3DStyle, BevelPresetType, PptxBar3DShape, PptxChartDataLabelOptions, PptxChartAxisType, PptxChartAxisFormatting, PptxChartMarker, PptxChartDataPoint, PptxChartTrendline, PptxChartErrBars, PptxTextStyleLevels, SignatureStatus, ElementAction, PptxImageEffects, MediaBookmark, ColorMapAliasKey, ChartAxisEdit, ChartDataPointLabelEdit, PptxChartLegendPosition, PptxChartStyle, ChartAxisTitleStyleEdit, PptxChartMarkerSymbol, ChartGridlineStyleEdit, PptxSmartArtNode, PptxSmartArtNodeStyle, PptxLayoutPreview, MediaCaptionTrack, PptxMediaType } from 'pptx-viewer-core';
3
3
  export { GroupResult, SWITCHABLE_LAYOUT_TYPES, UngroupResult, addSmartArtNode, addSmartArtNodeAsChild, chartDataChangeType, chartDataUpdatePoint, demoteSmartArtNode, formatAutoNumberMarker as formatAutoNumber, groupElements, promoteSmartArtNode, removeSmartArtNode, reorderSmartArtNode, switchSmartArtLayout, ungroupElements, updateSmartArtNodeText } from 'pptx-viewer-core';
4
4
  import * as _angular_core from '@angular/core';
5
5
  import { Signal, WritableSignal, OnDestroy, OnInit, AfterViewInit, OnChanges, SimpleChanges, InjectionToken, Provider } from '@angular/core';
@@ -854,6 +854,189 @@ interface ChartTitleTextStyle {
854
854
  fontFamily?: string;
855
855
  }
856
856
 
857
+ /**
858
+ * chart-svg-primitives.ts: the SVG primitive descriptor types a chart
859
+ * view-model's `primitives` array is built from (rect / path / polyline /
860
+ * circle / line / polygon / text / areaGradient). Split out of
861
+ * `chart-view-model-types.ts` to keep it within the repo's ~300-LOC limit;
862
+ * `chart-view-model.ts` re-exports everything here.
863
+ *
864
+ * @module chart-svg-primitives
865
+ */
866
+
867
+ /**
868
+ * Hover tooltip / accessible name, projected as each primitive's SVG `<title>`
869
+ * child. Every primitive kind that can represent a data mark (rect, path,
870
+ * polyline, circle, line, polygon) carries this field so any chart mark, not
871
+ * just the region map's choropleth patches, can surface a tooltip. Projectors
872
+ * that ignore the field simply render no tooltip.
873
+ */
874
+ interface SvgRect {
875
+ kind: 'rect';
876
+ x: number;
877
+ y: number;
878
+ w: number;
879
+ h: number;
880
+ fill: string;
881
+ rx?: number;
882
+ opacity?: number;
883
+ part?: ChartPartRef;
884
+ title?: string;
885
+ }
886
+ interface SvgPath {
887
+ kind: 'path';
888
+ d: string;
889
+ fill: string;
890
+ stroke?: string;
891
+ strokeWidth?: number;
892
+ opacity?: number;
893
+ part?: ChartPartRef;
894
+ /**
895
+ * Hover tooltip / accessible name, projected as an SVG `<title>` child.
896
+ *
897
+ * The region map (chart-waterfall-map.ts) was the first to set it: a
898
+ * choropleth patch carries no label of its own, so without a tooltip the
899
+ * reader cannot tell which region a colour belongs to. Every other primitive
900
+ * kind now carries the same field for the same reason on the mainstream chart
901
+ * kinds (bar / line / area / scatter / bubble / pie / radar). Projectors that
902
+ * ignore the field simply render no tooltip.
903
+ */
904
+ title?: string;
905
+ }
906
+ interface SvgPolyline {
907
+ kind: 'polyline';
908
+ points: string;
909
+ stroke: string;
910
+ strokeWidth: number;
911
+ fill: string;
912
+ opacity?: number;
913
+ part?: ChartPartRef;
914
+ title?: string;
915
+ }
916
+ interface SvgCircle {
917
+ kind: 'circle';
918
+ cx: number;
919
+ cy: number;
920
+ r: number;
921
+ fill: string;
922
+ opacity?: number;
923
+ part?: ChartPartRef;
924
+ title?: string;
925
+ }
926
+ interface SvgLine {
927
+ kind: 'line';
928
+ x1: number;
929
+ y1: number;
930
+ x2: number;
931
+ y2: number;
932
+ stroke: string;
933
+ strokeWidth: number;
934
+ dashArray?: string;
935
+ opacity?: number;
936
+ title?: string;
937
+ /** Optional SVG transform (e.g. a chart-overlay connector's own rotation about its box centre). */
938
+ transform?: string;
939
+ }
940
+ interface SvgText {
941
+ kind: 'text';
942
+ x: number;
943
+ y: number;
944
+ text: string;
945
+ fontSize: number;
946
+ fill: string;
947
+ textAnchor: 'start' | 'middle' | 'end';
948
+ fontWeight?: 'normal' | 'bold';
949
+ fontFamily?: string;
950
+ /** Italic styling, e.g. from a chart data-table or legend-entry `c:txPr` override. */
951
+ fontStyle?: 'normal' | 'italic';
952
+ dominantBaseline?: string;
953
+ opacity?: number;
954
+ /** Optional SVG transform (e.g. `rotate(-90, x, y)` for a vertical axis title). */
955
+ transform?: string;
956
+ }
957
+ interface SvgPolygon {
958
+ kind: 'polygon';
959
+ points: string;
960
+ fill: string;
961
+ stroke: string;
962
+ strokeWidth: number;
963
+ opacity?: number;
964
+ dashArray?: string;
965
+ part?: ChartPartRef;
966
+ title?: string;
967
+ /** Optional SVG transform (e.g. a chart-overlay shape's own rotation/flip about its box centre). */
968
+ transform?: string;
969
+ }
970
+ interface SvgAreaGradient {
971
+ kind: 'areaGradient';
972
+ id: string;
973
+ color: string;
974
+ }
975
+ type SvgPrimitive = SvgRect | SvgPath | SvgPolyline | SvgCircle | SvgLine | SvgPolygon | SvgText | SvgAreaGradient;
976
+
977
+ /**
978
+ * chart-view-model-kinds.ts: the supported chart kinds, their preserveAspectRatio
979
+ * and the chart-type to kind resolver. Split out of `chart-view-model.ts`,
980
+ * which re-exports everything here.
981
+ *
982
+ * @module chart-view-model-kinds
983
+ */
984
+ type SupportedChartKind = 'bar' | 'line' | 'area' | 'pie' | 'doughnut' | 'scatter' | 'bubble' | 'radar' | 'combo' | 'stock' | 'surface' | 'treemap' | 'waterfall' | 'regionMap' | 'funnel' | 'sunburst' | 'histogram' | 'boxWhisker';
985
+ /**
986
+ * The `preserveAspectRatio` a chart kind's `<svg>` must carry.
987
+ *
988
+ * Cartesian charts stretch to fill the element box (`none`); the kinds whose
989
+ * geometry is round or laid out on a fixed-ratio canvas (pie, doughnut, radar,
990
+ * and the region map's 1000x500 world outline) keep their proportions instead.
991
+ *
992
+ * A pure decision function because all five bindings need the same answer and
993
+ * four of them had written their own copy of the `kind === 'pie' || ...` chain;
994
+ * one of the copies (React's) disagreed with the rest.
995
+ */
996
+ declare function chartPreserveAspectRatio(kind: SupportedChartKind | 'unsupported'): 'none' | 'xMidYMid meet';
997
+ declare function resolveChartKind(chartType: string): SupportedChartKind | 'unsupported';
998
+
999
+ /**
1000
+ * chart-legend-swatch.ts: legend swatch shape for line-drawn chart kinds
1001
+ * (line, scatter, and the line series of a bar+line combo).
1002
+ *
1003
+ * PowerPoint draws two different legend swatch shapes depending on how a
1004
+ * series is plotted: a filled rectangle for area-like series (bar, area,
1005
+ * pie, ...), and a short line segment with the series' own point marker for
1006
+ * a line-drawn series (line, scatter). The shared engine used to draw a
1007
+ * plain rect for every chart kind, so a line chart's legend never showed the
1008
+ * line/marker sample PowerPoint does, even though the plotted series itself
1009
+ * rendered correctly.
1010
+ *
1011
+ * This is a pure decision function (CLAUDE.md Rule 2), one step further than
1012
+ * a plain descriptor: `buildLineLegendSwatch` returns ready-to-render
1013
+ * `SvgPrimitive`s (a `line` plus the series' own marker shape, via the same
1014
+ * `buildMarkerPrimitive` the chart's data points use), positioned in a local
1015
+ * 10x10 box matching the existing rect swatch's origin/size. Every binding
1016
+ * already has a generic primitive -> JSX/template mapper for the main chart
1017
+ * primitives, so drawing a line-style swatch is just running these through
1018
+ * that SAME mapper instead of a per-binding reimplementation of line/marker
1019
+ * shape logic. `resolveLegendSwatchKind` is the single place that decides
1020
+ * which chart kinds get a line sample instead of a rect, so a new binding (or
1021
+ * a future chart kind) cannot diverge on the answer.
1022
+ *
1023
+ * @module chart-legend-swatch
1024
+ */
1025
+
1026
+ /** Which shape a binding draws for one legend entry's colour swatch. */
1027
+ type LegendSwatchKind = 'rect' | 'line';
1028
+ /** Ready-to-render primitives for a line-style legend swatch (see module doc). */
1029
+ interface LegendLineSwatch {
1030
+ /**
1031
+ * Positioned in the same local box the rect swatch uses (`x: 0, y: -7,
1032
+ * width: 10, height: 10`): a horizontal line across its vertical centre,
1033
+ * plus the series' own marker shape at the box's centre. Empty only when
1034
+ * the series draws neither (`a:ln/a:noFill` AND `c:symbol="none"`), which
1035
+ * never happens for an un-authored series (the default marker is a circle).
1036
+ */
1037
+ primitives: SvgPrimitive[];
1038
+ }
1039
+
857
1040
  /**
858
1041
  * chart-svg-def-types.ts: `<defs>` descriptor types for the chart engine,
859
1042
  * split out of `chart-view-model-types.ts` to keep it within the repo's
@@ -968,13 +1151,19 @@ interface ValueRange {
968
1151
  /**
969
1152
  * Automatic Y-axis range, on PowerPoint's terms. See `chart-axis-nice.ts`; this
970
1153
  * mirrors `computeValueRange` in `chart-helpers.ts`.
1154
+ *
1155
+ * @param plotHeightPx The chart's plot-area height (`PlotLayout.plotHeight`),
1156
+ * when the caller has it; see `axisTargetIntervals`'s doc comment for why
1157
+ * this changes the gridline count PowerPoint's automatic scale picks.
971
1158
  */
972
- declare function computeValueRange(series: ReadonlyArray<PptxChartSeries>): ValueRange;
1159
+ declare function computeValueRange(series: ReadonlyArray<PptxChartSeries>, plotHeightPx?: number): ValueRange;
973
1160
  /**
974
1161
  * Value range for a stacked bar: the per-category sums, then the same automatic
975
1162
  * scale as any other value axis.
1163
+ *
1164
+ * @param plotHeightPx See `computeValueRange`'s parameter of the same name.
976
1165
  */
977
- declare function computeStackedValueRange(series: ReadonlyArray<PptxChartSeries>, catCount: number): ValueRange;
1166
+ declare function computeStackedValueRange(series: ReadonlyArray<PptxChartSeries>, catCount: number, plotHeightPx?: number): ValueRange;
978
1167
  /**
979
1168
  * Map a data value to a Y pixel coordinate (top = max, bottom = min).
980
1169
  * Routes through logarithmic scaling when `range.logScale` is set (the branch is
@@ -1029,6 +1218,8 @@ interface PlotLayout {
1029
1218
  interface PlotLayoutOptions {
1030
1219
  hasSecondaryValueAxis?: boolean;
1031
1220
  hasSecondaryCategoryAxis?: boolean;
1221
+ /** The primary (only, in the common case) category axis sits at the top. */
1222
+ categoryAxisAtTop?: boolean;
1032
1223
  hasDataTable?: boolean;
1033
1224
  dataTableRowCount?: number;
1034
1225
  }
@@ -1058,120 +1249,17 @@ interface ChartValueDrag {
1058
1249
  plotTop: number;
1059
1250
  plotBottom: number;
1060
1251
  }
1061
- /**
1062
- * Hover tooltip / accessible name, projected as each primitive's SVG `<title>`
1063
- * child. Every primitive kind that can represent a data mark (rect, path,
1064
- * polyline, circle, line, polygon) carries this field so any chart mark, not
1065
- * just the region map's choropleth patches, can surface a tooltip. Projectors
1066
- * that ignore the field simply render no tooltip.
1067
- */
1068
- interface SvgRect {
1069
- kind: 'rect';
1070
- x: number;
1071
- y: number;
1072
- w: number;
1073
- h: number;
1074
- fill: string;
1075
- rx?: number;
1076
- opacity?: number;
1077
- part?: ChartPartRef;
1078
- title?: string;
1079
- }
1080
- interface SvgPath {
1081
- kind: 'path';
1082
- d: string;
1083
- fill: string;
1084
- stroke?: string;
1085
- strokeWidth?: number;
1086
- opacity?: number;
1087
- part?: ChartPartRef;
1088
- /**
1089
- * Hover tooltip / accessible name, projected as an SVG `<title>` child.
1090
- *
1091
- * The region map (chart-waterfall-map.ts) was the first to set it: a
1092
- * choropleth patch carries no label of its own, so without a tooltip the
1093
- * reader cannot tell which region a colour belongs to. Every other primitive
1094
- * kind now carries the same field for the same reason on the mainstream chart
1095
- * kinds (bar / line / area / scatter / bubble / pie / radar). Projectors that
1096
- * ignore the field simply render no tooltip.
1097
- */
1098
- title?: string;
1099
- }
1100
- interface SvgPolyline {
1101
- kind: 'polyline';
1102
- points: string;
1103
- stroke: string;
1104
- strokeWidth: number;
1105
- fill: string;
1106
- opacity?: number;
1107
- part?: ChartPartRef;
1108
- title?: string;
1109
- }
1110
- interface SvgCircle {
1111
- kind: 'circle';
1112
- cx: number;
1113
- cy: number;
1114
- r: number;
1115
- fill: string;
1116
- opacity?: number;
1117
- part?: ChartPartRef;
1118
- title?: string;
1119
- }
1120
- interface SvgLine {
1121
- kind: 'line';
1122
- x1: number;
1123
- y1: number;
1124
- x2: number;
1125
- y2: number;
1126
- stroke: string;
1127
- strokeWidth: number;
1128
- dashArray?: string;
1129
- opacity?: number;
1130
- title?: string;
1131
- /** Optional SVG transform (e.g. a chart-overlay connector's own rotation about its box centre). */
1132
- transform?: string;
1133
- }
1134
- interface SvgText {
1135
- kind: 'text';
1136
- x: number;
1137
- y: number;
1138
- text: string;
1139
- fontSize: number;
1140
- fill: string;
1141
- textAnchor: 'start' | 'middle' | 'end';
1142
- fontWeight?: 'normal' | 'bold';
1143
- fontFamily?: string;
1144
- /** Italic styling, e.g. from a chart data-table or legend-entry `c:txPr` override. */
1145
- fontStyle?: 'normal' | 'italic';
1146
- dominantBaseline?: string;
1147
- opacity?: number;
1148
- /** Optional SVG transform (e.g. `rotate(-90, x, y)` for a vertical axis title). */
1149
- transform?: string;
1150
- }
1151
- interface SvgPolygon {
1152
- kind: 'polygon';
1153
- points: string;
1154
- fill: string;
1155
- stroke: string;
1156
- strokeWidth: number;
1157
- opacity?: number;
1158
- dashArray?: string;
1159
- part?: ChartPartRef;
1160
- title?: string;
1161
- /** Optional SVG transform (e.g. a chart-overlay shape's own rotation/flip about its box centre). */
1162
- transform?: string;
1163
- }
1164
- interface SvgAreaGradient {
1165
- kind: 'areaGradient';
1166
- id: string;
1167
- color: string;
1168
- }
1169
- type SvgPrimitive = SvgRect | SvgPath | SvgPolyline | SvgCircle | SvgLine | SvgPolygon | SvgText | SvgAreaGradient;
1170
1252
  interface LegendEntry {
1171
1253
  color: string;
1172
1254
  label: string;
1173
1255
  /** Per-entry text override from `c:legendEntry/c:txPr`, applied by `applyLegendEntryOverrides`. */
1174
1256
  textStyle?: PptxChartLegendTextStyle;
1257
+ /**
1258
+ * Present only for a line-drawn series (line / scatter, or a combo chart's
1259
+ * line series): draw a line + marker sample instead of the default filled
1260
+ * rect, matching PowerPoint. See `chart-legend-swatch.ts`.
1261
+ */
1262
+ lineSwatch?: LegendLineSwatch;
1175
1263
  }
1176
1264
  interface ChartViewModel {
1177
1265
  svgWidth: number;
@@ -1262,6 +1350,32 @@ interface ChartViewModel {
1262
1350
  defs?: ChartSvgDef[];
1263
1351
  }
1264
1352
 
1353
+ /**
1354
+ * chart-legend-build.ts: builds the base `LegendEntry[]` (colour + label +
1355
+ * optional line-style swatch) and the legend's anchor position for a chart
1356
+ * view-model. Split out of `chart-view-model-layout.ts` to keep it within the
1357
+ * repo's ~300-LOC limit.
1358
+ *
1359
+ * @module chart-legend-build
1360
+ */
1361
+
1362
+ /**
1363
+ * Build the base legend entries + anchor position for a chart view model.
1364
+ *
1365
+ * @param swatchKind Which legend entries draw a line + marker sample instead
1366
+ * of the default filled rect (see `chart-legend-swatch.ts`). A single value
1367
+ * applies to every entry (the whole-chart line/scatter case); an array
1368
+ * resolves per series index (a bar+line combo, where only the line series
1369
+ * get the line sample). Defaults to `'rect'` for every existing caller that
1370
+ * predates line-aware legends.
1371
+ */
1372
+ declare function buildLegend(series: ReadonlyArray<PptxChartSeries>, colorPalette: readonly string[] | undefined, svgWidth: number, legendPos: string, svgHeight: number, plotTop: number, swatchKind?: LegendSwatchKind | ReadonlyArray<LegendSwatchKind>): {
1373
+ legend: LegendEntry[];
1374
+ legendX: number;
1375
+ legendY: number;
1376
+ legendAnchor: 'start' | 'middle' | 'end';
1377
+ };
1378
+
1265
1379
  /**
1266
1380
  * chart-view-model-bars.ts: bar / column rectangle and line-point geometry of
1267
1381
  * the chart engine. Split out of `chart-view-model.ts`, which re-exports
@@ -1302,36 +1416,15 @@ declare function linePointsToSvgString(points: ReadonlyArray<LinePoint>): string
1302
1416
  declare function buildChartViewModel(element: PptxElement): ChartViewModel;
1303
1417
 
1304
1418
  /**
1305
- * chart-view-model-kinds.ts: the supported chart kinds, their preserveAspectRatio
1306
- * and the chart-type to kind resolver. Split out of `chart-view-model.ts`,
1307
- * which re-exports everything here.
1419
+ * chart-view-model-chrome.ts: chart chrome (value-axis gridlines/labels, zero
1420
+ * line, category labels) shared by the cartesian chart kinds. Split out of
1421
+ * `chart-view-model-layout.ts` to keep that module's plot layout math under
1422
+ * the repo's 300-LOC file guideline; re-exported by `chart-view-model.ts`.
1423
+ * Legend building (`buildLegend`) lives in `chart-legend-build.ts`, not here.
1308
1424
  *
1309
- * @module chart-view-model-kinds
1310
- */
1311
- type SupportedChartKind = 'bar' | 'line' | 'area' | 'pie' | 'doughnut' | 'scatter' | 'bubble' | 'radar' | 'combo' | 'stock' | 'surface' | 'treemap' | 'waterfall' | 'regionMap' | 'funnel' | 'sunburst' | 'histogram' | 'boxWhisker';
1312
- /**
1313
- * The `preserveAspectRatio` a chart kind's `<svg>` must carry.
1314
- *
1315
- * Cartesian charts stretch to fill the element box (`none`); the kinds whose
1316
- * geometry is round or laid out on a fixed-ratio canvas (pie, doughnut, radar,
1317
- * and the region map's 1000x500 world outline) keep their proportions instead.
1318
- *
1319
- * A pure decision function because all five bindings need the same answer and
1320
- * four of them had written their own copy of the `kind === 'pie' || ...` chain;
1321
- * one of the copies (React's) disagreed with the rest.
1322
- */
1323
- declare function chartPreserveAspectRatio(kind: SupportedChartKind | 'unsupported'): 'none' | 'xMidYMid meet';
1324
- declare function resolveChartKind(chartType: string): SupportedChartKind | 'unsupported';
1325
-
1326
- /**
1327
- * chart-view-model-layout.ts: plot-area layout and chart chrome (gridlines,
1328
- * axis / category labels, legend placement) of the chart engine. Split out of
1329
- * `chart-view-model.ts`, which re-exports everything here.
1330
- *
1331
- * @module chart-view-model-layout
1425
+ * @module chart-view-model-chrome
1332
1426
  */
1333
1427
 
1334
- declare function computePlotLayout(elementWidth: number, elementHeight: number, chartData: PptxChartData, hasAxes: boolean, options?: PlotLayoutOptions): PlotLayout;
1335
1428
  declare const GRIDLINE_COLOR = "#e2e8f0";
1336
1429
  declare const AXIS_LABEL_COLOR = "#64748b";
1337
1430
  declare const ZERO_LINE_COLOR = "#94a3b8";
@@ -1353,12 +1446,19 @@ showMajorGridlines?: boolean): {
1353
1446
  };
1354
1447
  declare function buildZeroLine(range: ValueRange, layout: PlotLayout): SvgLine | undefined;
1355
1448
  declare function buildCategoryLabels(categoryLabels: ReadonlyArray<string>, layout: PlotLayout, catSpacing: 'bar' | 'line'): SvgText[];
1356
- declare function buildLegend(series: ReadonlyArray<PptxChartSeries>, colorPalette: readonly string[] | undefined, svgWidth: number, legendPos: string, svgHeight: number, plotTop: number): {
1357
- legend: LegendEntry[];
1358
- legendX: number;
1359
- legendY: number;
1360
- legendAnchor: 'start' | 'middle' | 'end';
1361
- };
1449
+
1450
+ /**
1451
+ * chart-view-model-layout.ts: plot-area layout math for the chart engine
1452
+ * (the plot inset, legend/title/data-table/secondary-axis reservations, and
1453
+ * `c:plotArea/c:layout/c:manualLayout` overrides). Chart chrome (gridlines,
1454
+ * axis / category labels) lives in `chart-view-model-chrome.ts`; legend
1455
+ * building lives in `chart-legend-build.ts`. All three are re-exported by
1456
+ * `chart-view-model.ts`.
1457
+ *
1458
+ * @module chart-view-model-layout
1459
+ */
1460
+
1461
+ declare function computePlotLayout(elementWidth: number, elementHeight: number, chartData: PptxChartData, hasAxes: boolean, options?: PlotLayoutOptions): PlotLayout;
1362
1462
 
1363
1463
  /**
1364
1464
  * chart-manual-layout.ts: pure conversion of `c:layout/c:manualLayout`
@@ -1549,6 +1649,8 @@ interface ChartLegendLayoutItem {
1549
1649
  fontWeight: 'normal' | 'bold';
1550
1650
  fontStyle: 'normal' | 'italic';
1551
1651
  fontFamily?: string;
1652
+ /** Present for a line-drawn series: draw a line + marker sample instead of the rect swatch. */
1653
+ lineSwatch?: LegendLineSwatch;
1552
1654
  }
1553
1655
 
1554
1656
  /**
@@ -1604,6 +1706,9 @@ interface ChartOption<V> {
1604
1706
  */
1605
1707
  type ChartTypeSelectValue = PptxChartType | 'pareto';
1606
1708
 
1709
+ /** The eight resize handles, named by compass direction. */
1710
+ type ResizeHandleId = 'nw' | 'n' | 'ne' | 'e' | 'se' | 's' | 'sw' | 'w';
1711
+
1607
1712
  /** Build a bar + line combo chart, including independently scaled secondary series. */
1608
1713
  declare function buildComboViewModel(element: PptxElement, chartData: PptxChartData, categoryLabels: ReadonlyArray<string>): ChartViewModel;
1609
1714
 
@@ -2954,9 +3059,6 @@ declare function computeAlign(boxes: readonly AlignBox[], mode: AlignMode, optio
2954
3059
  */
2955
3060
  declare function computeDistribute(boxes: readonly AlignBox[], mode: DistributeMode, options?: AlignOptions): Map<string, PositionUpdate>;
2956
3061
 
2957
- /** The eight resize handles, named by compass direction. */
2958
- type ResizeHandleId = 'nw' | 'n' | 'ne' | 'e' | 'se' | 's' | 'sw' | 'w';
2959
-
2960
3062
  type HitAreaStyle = Partial<Record<'top' | 'right' | 'bottom' | 'left', string>> & {
2961
3063
  position: 'absolute';
2962
3064
  pointerEvents: 'auto';
@@ -15380,6 +15482,12 @@ declare class SlideCanvasComponent implements SlideContext {
15380
15482
  private elementById;
15381
15483
  /** The single selected element itself (not just its box), or null. */
15382
15484
  private readonly singleSelectedElement;
15485
+ /**
15486
+ * The single selected element when (and only when) it is a chart: gates
15487
+ * the "Chart Elements"/"Chart Styles"/"Chart Filters" quick-action overlay,
15488
+ * which only makes sense for exactly one selected chart.
15489
+ */
15490
+ readonly quickActionsChartElement: _angular_core.Signal<ChartPptxElement | null>;
15383
15491
  /**
15384
15492
  * Resize-handle render boxes (stage coords) for the single selection. Empty
15385
15493
  * for an element whose authored `a:spLocks/@noResize` pins its size.
@@ -21431,7 +21539,7 @@ declare class AccountPageComponent {
21431
21539
  readonly accountAuth: _angular_core.InputSignal<AccountAuthConfig | undefined>;
21432
21540
  private readonly translate;
21433
21541
  protected readonly swatches: readonly string[];
21434
- protected readonly version = "3.19.0";
21542
+ protected readonly version = "3.19.2";
21435
21543
  protected readonly profile: _angular_core.WritableSignal<ViewerProfile>;
21436
21544
  protected readonly initial: _angular_core.Signal<string>;
21437
21545
  protected readonly usage: _angular_core.WritableSignal<LocalStorageUsageSummary | null>;