ooxml-core 1.45.0 → 1.47.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/dist/PptxHandler-JX62VKU4.cjs +14 -0
  2. package/dist/{PptxHandler-FXLXIOLT.mjs → PptxHandler-NXHZ6ITL.mjs} +2 -2
  3. package/dist/PptxHandler-SUGLNSZI.mjs +5 -0
  4. package/dist/{PresentationBuilder-CSKLG64K.cjs → PresentationBuilder-IK6NIK6T.cjs} +6 -6
  5. package/dist/{PresentationBuilder-DDYHRV26.mjs → PresentationBuilder-LHQ333UL.mjs} +3 -3
  6. package/dist/{PresentationBuilder-3FKFRSSV.mjs → PresentationBuilder-URSPID7L.mjs} +2 -2
  7. package/dist/automation/index.cjs +12 -7
  8. package/dist/automation/index.mjs +12 -7
  9. package/dist/chart/edit/group-options.d.ts +4 -0
  10. package/dist/chart/edit/group-options.d.ts.map +1 -1
  11. package/dist/chart/edit/new-chart-minimal.d.ts +13 -0
  12. package/dist/chart/edit/new-chart-minimal.d.ts.map +1 -0
  13. package/dist/chart/edit/new-chart.d.ts +34 -1
  14. package/dist/chart/edit/new-chart.d.ts.map +1 -1
  15. package/dist/chart/edit/secondary-axis.d.ts +8 -1
  16. package/dist/chart/edit/secondary-axis.d.ts.map +1 -1
  17. package/dist/chart/edit/type.d.ts +2 -0
  18. package/dist/chart/edit/type.d.ts.map +1 -1
  19. package/dist/chart/index.cjs +414 -263
  20. package/dist/chart/index.mjs +412 -264
  21. package/dist/{chunk-YBSNMVSN.cjs → chunk-4GPLQEEC.cjs} +1604 -1324
  22. package/dist/{chunk-U5BXJQZG.mjs → chunk-553WFEHD.mjs} +332 -53
  23. package/dist/{chunk-RVYGAYCP.mjs → chunk-5HNRZOBX.mjs} +1 -1
  24. package/dist/{chunk-VKFKEVHK.mjs → chunk-6MU4WKHS.mjs} +1 -1
  25. package/dist/{chunk-GXYK3H4O.mjs → chunk-7L6ZAA5Y.mjs} +82 -17
  26. package/dist/{chunk-3J6VIKLP.cjs → chunk-APCA7N6Q.cjs} +3 -3
  27. package/dist/{chunk-IPV3J3I5.mjs → chunk-DEDK2J57.mjs} +68 -1
  28. package/dist/{chunk-7T3SJQA6.cjs → chunk-E5TGYYKO.cjs} +1 -0
  29. package/dist/{chunk-R7NS42KQ.mjs → chunk-FKU2Z6ZB.mjs} +1 -1
  30. package/dist/{chunk-GGJUWJXB.mjs → chunk-QHR726W3.mjs} +1 -1
  31. package/dist/{chunk-XTUX5RMG.cjs → chunk-T4BVZTII.cjs} +9 -9
  32. package/dist/{chunk-QZPOPUI5.cjs → chunk-WFN6ZU7N.cjs} +69 -0
  33. package/dist/{chunk-LCXBTJXE.mjs → chunk-XVEJS7HN.mjs} +5 -5
  34. package/dist/{chunk-CVJX6NNO.mjs → chunk-Z734BYYR.mjs} +334 -54
  35. package/dist/{chunk-OORQCSVA.mjs → chunk-ZLUHU2SU.mjs} +1 -0
  36. package/dist/docx/index.cjs +300 -144
  37. package/dist/docx/index.mjs +300 -144
  38. package/dist/index.cjs +484 -333
  39. package/dist/index.mjs +484 -333
  40. package/dist/pptx/automation/index.cjs +2207 -1825
  41. package/dist/pptx/automation/index.d.ts +4 -4
  42. package/dist/pptx/automation/index.mjs +5 -5
  43. package/dist/pptx/chunks/{index-6Ot1b-4U.d.ts → index--HBUyILF.d.ts} +5 -5
  44. package/dist/pptx/chunks/{index-6Ot1b-4U.d.ts.map → index--HBUyILF.d.ts.map} +1 -1
  45. package/dist/pptx/chunks/{index-DGKI80Hj.d.ts → index-BDVzSboe.d.ts} +71 -7
  46. package/dist/pptx/chunks/{index-DGKI80Hj.d.ts.map → index-BDVzSboe.d.ts.map} +1 -1
  47. package/dist/pptx/chunks/{index-jdZUtLGB.d.ts → index-Dr3iIPt9.d.ts} +3 -3
  48. package/dist/pptx/chunks/{index-jdZUtLGB.d.ts.map → index-Dr3iIPt9.d.ts.map} +1 -1
  49. package/dist/pptx/chunks/{text-operations-Mek86RBL.d.ts → text-operations-CVHXOSit.d.ts} +18 -3
  50. package/dist/pptx/chunks/{text-operations-Mek86RBL.d.ts.map → text-operations-CVHXOSit.d.ts.map} +1 -1
  51. package/dist/pptx/cli/index.cjs +608 -226
  52. package/dist/pptx/cli/index.d.ts +1 -1
  53. package/dist/pptx/cli/index.mjs +4 -4
  54. package/dist/pptx/converter/index.cjs +1 -0
  55. package/dist/pptx/converter/index.d.ts +1 -1
  56. package/dist/pptx/converter/index.mjs +2 -2
  57. package/dist/pptx/editor/render/collaboration-live-patch-target.cjs +4 -4
  58. package/dist/pptx/editor/render/collaboration-live-patch-target.mjs +2 -2
  59. package/dist/pptx/editor/render/collaboration-reconcile.cjs +8 -8
  60. package/dist/pptx/editor/render/collaboration-reconcile.mjs +2 -2
  61. package/dist/pptx/editor/render/collaboration-sync.cjs +14 -14
  62. package/dist/pptx/editor/render/collaboration-sync.d.ts.map +1 -1
  63. package/dist/pptx/editor/render/collaboration-sync.mjs +1 -1
  64. package/dist/pptx/editor/render/custom-show-operations.cjs +2 -2
  65. package/dist/pptx/editor/render/custom-show-operations.mjs +1 -1
  66. package/dist/pptx/editor/render/find-replace.cjs +15 -15
  67. package/dist/pptx/editor/render/find-replace.d.ts +2 -2
  68. package/dist/pptx/editor/render/find-replace.mjs +2 -2
  69. package/dist/pptx/editor/render/slide-operations.cjs +9 -9
  70. package/dist/pptx/editor/render/slide-operations.mjs +3 -3
  71. package/dist/pptx/index.cjs +2605 -2226
  72. package/dist/pptx/index.d.ts +5 -5
  73. package/dist/pptx/index.mjs +5 -5
  74. package/dist/pptx/node/index.d.ts +1 -1
  75. package/dist/xlsx/index.cjs +12 -7
  76. package/dist/xlsx/index.mjs +12 -7
  77. package/dist/xlsx/ui/index.cjs +12 -7
  78. package/dist/xlsx/ui/index.mjs +12 -7
  79. package/package.json +1 -1
  80. package/dist/PptxHandler-3RDVJFQV.cjs +0 -14
  81. package/dist/PptxHandler-EI6DMHPM.mjs +0 -5
@@ -0,0 +1,14 @@
1
+ 'use strict';
2
+
3
+ var chunk4GPLQEEC_cjs = require('./chunk-4GPLQEEC.cjs');
4
+ require('./chunk-APCA7N6Q.cjs');
5
+ require('./chunk-WFN6ZU7N.cjs');
6
+ require('./chunk-XZPZHXV4.cjs');
7
+ require('./chunk-5W2QL4SB.cjs');
8
+
9
+
10
+
11
+ Object.defineProperty(exports, "PptxHandler", {
12
+ enumerable: true,
13
+ get: function () { return chunk4GPLQEEC_cjs.PptxHandler; }
14
+ });
@@ -1,5 +1,5 @@
1
- export { PptxHandler } from './chunk-U5BXJQZG.mjs';
2
- import './chunk-GXYK3H4O.mjs';
1
+ export { PptxHandler } from './chunk-553WFEHD.mjs';
2
+ import './chunk-7L6ZAA5Y.mjs';
3
3
  import './chunk-EYCM7RVL.mjs';
4
4
  import './chunk-2N7RZQLC.mjs';
5
5
  import './chunk-VDUNZTJC.mjs';
@@ -0,0 +1,5 @@
1
+ export { PptxHandler } from './chunk-Z734BYYR.mjs';
2
+ import './chunk-6MU4WKHS.mjs';
3
+ import './chunk-DEDK2J57.mjs';
4
+ import './chunk-GXHKNSZX.mjs';
5
+ import './chunk-CA7KCNL3.mjs';
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var chunkYBSNMVSN_cjs = require('./chunk-YBSNMVSN.cjs');
4
- require('./chunk-3J6VIKLP.cjs');
5
- require('./chunk-QZPOPUI5.cjs');
3
+ var chunk4GPLQEEC_cjs = require('./chunk-4GPLQEEC.cjs');
4
+ require('./chunk-APCA7N6Q.cjs');
5
+ require('./chunk-WFN6ZU7N.cjs');
6
6
  require('./chunk-XZPZHXV4.cjs');
7
7
  require('./chunk-5W2QL4SB.cjs');
8
8
 
@@ -10,13 +10,13 @@ require('./chunk-5W2QL4SB.cjs');
10
10
 
11
11
  Object.defineProperty(exports, "PresentationBuilder", {
12
12
  enumerable: true,
13
- get: function () { return chunkYBSNMVSN_cjs.PresentationBuilder; }
13
+ get: function () { return chunk4GPLQEEC_cjs.PresentationBuilder; }
14
14
  });
15
15
  Object.defineProperty(exports, "STANDARD_LAYOUTS", {
16
16
  enumerable: true,
17
- get: function () { return chunkYBSNMVSN_cjs.STANDARD_LAYOUTS; }
17
+ get: function () { return chunk4GPLQEEC_cjs.STANDARD_LAYOUTS; }
18
18
  });
19
19
  Object.defineProperty(exports, "buildBlankPresentationArchive", {
20
20
  enumerable: true,
21
- get: function () { return chunkYBSNMVSN_cjs.buildBlankPresentationArchive; }
21
+ get: function () { return chunk4GPLQEEC_cjs.buildBlankPresentationArchive; }
22
22
  });
@@ -1,5 +1,5 @@
1
- export { PresentationBuilder, STANDARD_LAYOUTS, buildBlankPresentationArchive } from './chunk-CVJX6NNO.mjs';
2
- import './chunk-VKFKEVHK.mjs';
3
- import './chunk-IPV3J3I5.mjs';
1
+ export { PresentationBuilder, STANDARD_LAYOUTS, buildBlankPresentationArchive } from './chunk-Z734BYYR.mjs';
2
+ import './chunk-6MU4WKHS.mjs';
3
+ import './chunk-DEDK2J57.mjs';
4
4
  import './chunk-GXHKNSZX.mjs';
5
5
  import './chunk-CA7KCNL3.mjs';
@@ -1,5 +1,5 @@
1
- export { PresentationBuilder, STANDARD_LAYOUTS, buildBlankPresentationArchive } from './chunk-U5BXJQZG.mjs';
2
- import './chunk-GXYK3H4O.mjs';
1
+ export { PresentationBuilder, STANDARD_LAYOUTS, buildBlankPresentationArchive } from './chunk-553WFEHD.mjs';
2
+ import './chunk-7L6ZAA5Y.mjs';
3
3
  import './chunk-EYCM7RVL.mjs';
4
4
  import './chunk-2N7RZQLC.mjs';
5
5
  import './chunk-VDUNZTJC.mjs';
@@ -35406,7 +35406,7 @@ var SWITCHABLE = {
35406
35406
  stock: false,
35407
35407
  surface: true
35408
35408
  };
35409
- function elementFor(kind, is3D) {
35409
+ function chartGroupElement(kind, is3D) {
35410
35410
  const match2 = Object.entries(CHART_GROUP_ELEMENTS).find(
35411
35411
  ([, value3]) => value3.kind === kind && value3.is3D === is3D
35412
35412
  );
@@ -35422,7 +35422,7 @@ function groupingFor(element5, grouping) {
35422
35422
  var horizontalBars = (group3) => group3.kind === "bar" && group3.barDirection === "bar";
35423
35423
  function newGroup(base3, target3, series) {
35424
35424
  const is3D = target3.is3D ?? (base3.is3D && SWITCHABLE[target3.kind] === true);
35425
- const element5 = elementFor(target3.kind, is3D);
35425
+ const element5 = chartGroupElement(target3.kind, is3D);
35426
35426
  const group3 = { kind: target3.kind, element: element5, is3D, series, axisIds: [] };
35427
35427
  const allowed = GROUP_FIELDS[element5] ?? [];
35428
35428
  for (const key2 of allowed)
@@ -35712,6 +35712,11 @@ var RANGES = {
35712
35712
  firstSliceAngle: [0, 360],
35713
35713
  holeSize: [1, 90]
35714
35714
  };
35715
+ function assertChartGroupOption(key2, value3) {
35716
+ const [min, max] = RANGES[key2];
35717
+ if (!Number.isInteger(value3) || value3 < min || value3 > max)
35718
+ throw new RangeError(`Chart ${key2} must be a whole number from ${min} to ${max}`);
35719
+ }
35715
35720
  function setChartGroupOptions(space, seriesIndex, edit2) {
35716
35721
  return editChartSpace(space, (draft) => {
35717
35722
  const { group: group3 } = chartSeriesEntryAt(draft, seriesIndex);
@@ -35724,9 +35729,7 @@ function setChartGroupOptions(space, seriesIndex, edit2) {
35724
35729
  delete group3[key2];
35725
35730
  continue;
35726
35731
  }
35727
- const [min, max] = RANGES[key2];
35728
- if (!Number.isInteger(value3) || value3 < min || value3 > max)
35729
- throw new RangeError(`Chart ${key2} must be a whole number from ${min} to ${max}`);
35732
+ assertChartGroupOption(key2, value3);
35730
35733
  group3[key2] = value3;
35731
35734
  }
35732
35735
  });
@@ -36050,7 +36053,7 @@ function isolateSeries(space, index5) {
36050
36053
  space.plotArea.groups.splice(groupIndex, 1, ...segments);
36051
36054
  return chartSeriesEntryAt(space, index5).group;
36052
36055
  }
36053
- function setChartSeriesSecondaryAxis(space, seriesIndex, secondary) {
36056
+ function setChartSeriesSecondaryAxis(space, seriesIndex, secondary, options2 = {}) {
36054
36057
  if (!chartSeriesSecondaryAxisSupported(space, seriesIndex))
36055
36058
  throw new RangeError(
36056
36059
  "Secondary-axis editing needs a later series in a supported vertical 2D chart"
@@ -36077,7 +36080,9 @@ function setChartSeriesSecondaryAxis(space, seriesIndex, secondary) {
36077
36080
  used.add(id5);
36078
36081
  return id5;
36079
36082
  };
36080
- const ids = [allocate(), allocate()];
36083
+ const ids = options2.axisIds ? [...options2.axisIds] : [allocate(), allocate()];
36084
+ if (options2.axisIds && (ids[0] === ids[1] || ids.some((id5) => used.has(id5) || !Number.isSafeInteger(id5) || id5 < 0 || id5 > 4294967295)))
36085
+ throw new RangeError("Secondary axis ids must be two unused whole numbers");
36081
36086
  const horizontal2 = primary.barDirection === "bar";
36082
36087
  const axes = defaultChartAxes(horizontal2, false, ids);
36083
36088
  axes[0] = { ...structuredClone(axisPair(draft, primary)[0]), id: ids[0], crossAxisId: ids[1] };
@@ -35381,7 +35381,7 @@ var SWITCHABLE = {
35381
35381
  stock: false,
35382
35382
  surface: true
35383
35383
  };
35384
- function elementFor(kind, is3D) {
35384
+ function chartGroupElement(kind, is3D) {
35385
35385
  const match2 = Object.entries(CHART_GROUP_ELEMENTS).find(
35386
35386
  ([, value3]) => value3.kind === kind && value3.is3D === is3D
35387
35387
  );
@@ -35397,7 +35397,7 @@ function groupingFor(element5, grouping) {
35397
35397
  var horizontalBars = (group3) => group3.kind === "bar" && group3.barDirection === "bar";
35398
35398
  function newGroup(base3, target3, series) {
35399
35399
  const is3D = target3.is3D ?? (base3.is3D && SWITCHABLE[target3.kind] === true);
35400
- const element5 = elementFor(target3.kind, is3D);
35400
+ const element5 = chartGroupElement(target3.kind, is3D);
35401
35401
  const group3 = { kind: target3.kind, element: element5, is3D, series, axisIds: [] };
35402
35402
  const allowed = GROUP_FIELDS[element5] ?? [];
35403
35403
  for (const key2 of allowed)
@@ -35687,6 +35687,11 @@ var RANGES = {
35687
35687
  firstSliceAngle: [0, 360],
35688
35688
  holeSize: [1, 90]
35689
35689
  };
35690
+ function assertChartGroupOption(key2, value3) {
35691
+ const [min, max] = RANGES[key2];
35692
+ if (!Number.isInteger(value3) || value3 < min || value3 > max)
35693
+ throw new RangeError(`Chart ${key2} must be a whole number from ${min} to ${max}`);
35694
+ }
35690
35695
  function setChartGroupOptions(space, seriesIndex, edit2) {
35691
35696
  return editChartSpace(space, (draft) => {
35692
35697
  const { group: group3 } = chartSeriesEntryAt(draft, seriesIndex);
@@ -35699,9 +35704,7 @@ function setChartGroupOptions(space, seriesIndex, edit2) {
35699
35704
  delete group3[key2];
35700
35705
  continue;
35701
35706
  }
35702
- const [min, max] = RANGES[key2];
35703
- if (!Number.isInteger(value3) || value3 < min || value3 > max)
35704
- throw new RangeError(`Chart ${key2} must be a whole number from ${min} to ${max}`);
35707
+ assertChartGroupOption(key2, value3);
35705
35708
  group3[key2] = value3;
35706
35709
  }
35707
35710
  });
@@ -36025,7 +36028,7 @@ function isolateSeries(space, index5) {
36025
36028
  space.plotArea.groups.splice(groupIndex, 1, ...segments);
36026
36029
  return chartSeriesEntryAt(space, index5).group;
36027
36030
  }
36028
- function setChartSeriesSecondaryAxis(space, seriesIndex, secondary) {
36031
+ function setChartSeriesSecondaryAxis(space, seriesIndex, secondary, options2 = {}) {
36029
36032
  if (!chartSeriesSecondaryAxisSupported(space, seriesIndex))
36030
36033
  throw new RangeError(
36031
36034
  "Secondary-axis editing needs a later series in a supported vertical 2D chart"
@@ -36052,7 +36055,9 @@ function setChartSeriesSecondaryAxis(space, seriesIndex, secondary) {
36052
36055
  used.add(id5);
36053
36056
  return id5;
36054
36057
  };
36055
- const ids = [allocate(), allocate()];
36058
+ const ids = options2.axisIds ? [...options2.axisIds] : [allocate(), allocate()];
36059
+ if (options2.axisIds && (ids[0] === ids[1] || ids.some((id5) => used.has(id5) || !Number.isSafeInteger(id5) || id5 < 0 || id5 > 4294967295)))
36060
+ throw new RangeError("Secondary axis ids must be two unused whole numbers");
36056
36061
  const horizontal2 = primary.barDirection === "bar";
36057
36062
  const axes = defaultChartAxes(horizontal2, false, ids);
36058
36063
  axes[0] = { ...structuredClone(axisPair(draft, primary)[0]), id: ids[0], crossAxisId: ids[1] };
@@ -9,6 +9,10 @@ export interface ChartGroupOptionsEdit {
9
9
  /** Doughnut hole size, percent of the diameter. */
10
10
  holeSize?: number | null;
11
11
  }
12
+ /** Whether `key` is one of the ranged group options. */
13
+ export declare const isChartGroupOption: (key: string) => key is keyof ChartGroupOptionsEdit;
14
+ /** Throws unless `value` is a whole number in the schema range of group option `key`. */
15
+ export declare function assertChartGroupOption(key: keyof ChartGroupOptionsEdit, value: number): void;
12
16
  /** Edits the options of the group holding series `seriesIndex`. */
13
17
  export declare function setChartGroupOptions(space: ChartSpace, seriesIndex: number, edit: ChartGroupOptionsEdit): ChartSpace;
14
18
  //# sourceMappingURL=group-options.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"group-options.d.ts","sourceRoot":"","sources":["../../../chart/edit/group-options.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAI3C,MAAM,WAAW,qBAAqB;IACrC,mFAAmF;IACnF,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,uDAAuD;IACvD,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,yDAAyD;IACzD,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,mDAAmD;IACnD,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AASD,mEAAmE;AACnE,wBAAgB,oBAAoB,CACnC,KAAK,EAAE,UAAU,EACjB,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,qBAAqB,GACzB,UAAU,CAkBZ"}
1
+ {"version":3,"file":"group-options.d.ts","sourceRoot":"","sources":["../../../chart/edit/group-options.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAI3C,MAAM,WAAW,qBAAqB;IACrC,mFAAmF;IACnF,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,uDAAuD;IACvD,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,yDAAyD;IACzD,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,mDAAmD;IACnD,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AASD,wDAAwD;AACxD,eAAO,MAAM,kBAAkB,QAAS,MAAM,KAAG,GAAG,IAAI,MAAM,qBACnC,CAAC;AAE5B,yFAAyF;AACzF,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,MAAM,qBAAqB,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAI5F;AAED,mEAAmE;AACnE,wBAAgB,oBAAoB,CACnC,KAAK,EAAE,UAAU,EACjB,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,qBAAqB,GACzB,UAAU,CAgBZ"}
@@ -0,0 +1,13 @@
1
+ import type { ChartAxis, ChartPlotGroup } from '../model.js';
2
+ import type { ChartSpaceSeries, ChartTitle } from '../model-series.js';
3
+ import { type ChartTypeTarget } from './type.js';
4
+ /** The chart group of a `minimal` new chart showing `series` as `target`. */
5
+ export declare function minimalChartGroup(target: ChartTypeTarget, series: ChartSpaceSeries[]): ChartPlotGroup;
6
+ /**
7
+ * The axes of a `minimal` new chart `group`, with `ids` for the category (or X value), value (or
8
+ * Y value) and series axes: none for the pie family, a series axis for a 3-D line or a surface.
9
+ */
10
+ export declare function minimalChartAxes(group: ChartPlotGroup, ids: readonly [number, number, number]): ChartAxis[];
11
+ /** A one-run title with no paragraph or run properties (`a:bodyPr`, `a:lstStyle`, `a:p/a:r`). */
12
+ export declare function minimalChartTitle(text: string): ChartTitle;
13
+ //# sourceMappingURL=new-chart-minimal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"new-chart-minimal.d.ts","sourceRoot":"","sources":["../../../chart/edit/new-chart-minimal.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,SAAS,EAAiB,cAAc,EAAE,MAAM,UAAU,CAAC;AACzE,OAAO,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAIpE,OAAO,EAAqB,KAAK,eAAe,EAAE,MAAM,QAAQ,CAAC;AAYjE,6EAA6E;AAC7E,wBAAgB,iBAAiB,CAChC,MAAM,EAAE,eAAe,EACvB,MAAM,EAAE,gBAAgB,EAAE,GACxB,cAAc,CAgBhB;AAeD;;;GAGG;AACH,wBAAgB,gBAAgB,CAC/B,KAAK,EAAE,cAAc,EACrB,GAAG,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GACpC,SAAS,EAAE,CAWb;AAED,iGAAiG;AACjG,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,CAK1D"}
@@ -1,13 +1,46 @@
1
1
  import type { ChartDataSheet } from '../data-sheet.js';
2
- import type { ChartSpace } from '../model.js';
2
+ import type { ChartPlotGroup, ChartSpace } from '../model.js';
3
+ import { type ChartLegendPosition } from './legend-labels.js';
3
4
  import { type ChartTypeTarget } from './type.js';
4
5
  /** The sample data Word and PowerPoint put behind a new chart. */
5
6
  export declare const DEFAULT_CHART_DATA_SHEET: ChartDataSheet;
7
+ /** Group settings a new chart can start with (the type, direction and grouping are the target's). */
8
+ export type NewChartGroupSettings = Partial<Omit<ChartPlotGroup, 'kind' | 'element' | 'is3D' | 'series' | 'axisIds' | 'barDirection' | 'grouping'>>;
6
9
  export interface NewChartOptions {
7
10
  /** The chart title; absent for no title (`c:autoTitleDeleted`). */
8
11
  title?: string;
9
12
  /** The worksheet the formulas name; Office's `Sheet1` by default. */
10
13
  sheetName?: string;
14
+ /**
15
+ * Where the series read their data. `workbook` (the default): the cells of the embedded
16
+ * workbook's standard layout, with cached values. `literal`: the values are written into the
17
+ * part (`c:v` series names, `c:strLit` or `c:numLit` data), for a chart with no workbook.
18
+ */
19
+ data?: 'workbook' | 'literal';
20
+ /** Where the legend sits, `null` for no legend; Office's `b` by default. */
21
+ legendPosition?: ChartLegendPosition | null;
22
+ /**
23
+ * `office` (the default): what Word and PowerPoint write for a new chart (square corners,
24
+ * Excel's axes with value gridlines and tick marks, a 219% gap and -27% overlap, a title under
25
+ * Excel's paragraph properties). `minimal`: only what the schema requires for the type, plus
26
+ * `c:varyColors` and `c:delete`, and a title of one bare run.
27
+ */
28
+ profile?: 'office' | 'minimal';
29
+ /**
30
+ * Settings of the new group, which its element must allow (`type-schema.ts`); the gap width,
31
+ * overlap, first slice angle and hole size must be whole numbers in their schema ranges.
32
+ */
33
+ group?: NewChartGroupSettings;
34
+ /**
35
+ * The ids of the category (or X value), value (or Y value) and series axes, in that order;
36
+ * Excel's `500000001` and `500000002` by default (and `500000003` for a series axis).
37
+ */
38
+ axisIds?: readonly number[];
39
+ /**
40
+ * Whether the category axis is a date axis (`c:dateAx`), for categories that are dates; a type
41
+ * whose first axis is not a category axis (scatter, bubble, the pie family) ignores it.
42
+ */
43
+ dateAxis?: boolean;
11
44
  }
12
45
  /** A new chart part showing `sheet` as `target` (a column chart when `target` is absent). */
13
46
  export declare function newChartSpace(sheet?: ChartDataSheet, target?: ChartTypeTarget, options?: NewChartOptions): ChartSpace;
@@ -1 +1 @@
1
- {"version":3,"file":"new-chart.d.ts","sourceRoot":"","sources":["../../../chart/edit/new-chart.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,KAAK,EAAkB,UAAU,EAAE,MAAM,UAAU,CAAC;AAM3D,OAAO,EAAgB,KAAK,eAAe,EAAE,MAAM,QAAQ,CAAC;AAG5D,kEAAkE;AAClE,eAAO,MAAM,wBAAwB,EAAE,cAOtC,CAAC;AAEF,MAAM,WAAW,eAAe;IAC/B,mEAAmE;IACnE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qEAAqE;IACrE,SAAS,CAAC,EAAE,MAAM,CA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gB,aAAa,CAC5B,KAAK,GAAE,cAAyC,EAChD,MAAM,CAAC,EAAE,eAAe,EACxB,OAAO,GAAE,eAAoB,GAC3B,UAAU,CAiBZ"}
@@ -2,6 +2,13 @@ import type { ChartSpace } from '../model.js';
2
2
  /** The first series anchors the renderer's primary scale; later series can be split in place. */
3
3
  export declare function chartSeriesSecondaryAxisSupported(space: ChartSpace, seriesIndex: number): boolean;
4
4
  export declare function chartSeriesOnSecondaryAxis(space: ChartSpace, seriesIndex: number): boolean;
5
+ export interface ChartSecondaryAxisOptions {
6
+ /**
7
+ * The ids of a new secondary category and value axis, which must be unused; free ids from
8
+ * `500000003` by default. Ignored when the series joins axes that exist.
9
+ */
10
+ axisIds?: readonly [number, number];
11
+ }
5
12
  /** Moves one series, preserving document-order targets and every source data reference. */
6
- export declare function setChartSeriesSecondaryAxis(space: ChartSpace, seriesIndex: number, secondary: boolean): ChartSpace;
13
+ export declare function setChartSeriesSecondaryAxis(space: ChartSpace, seriesIndex: number, secondary: boolean, options?: ChartSecondaryAxisOptions): ChartSpace;
7
14
  //# sourceMappingURL=secondary-axis.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"secondary-axis.d.ts","sourceRoot":"","sources":["../../../chart/edit/secondary-axis.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAA6B,UAAU,EAAE,MAAM,UAAU,CAAC;AAqBtE,iGAAiG;AACjG,wBAAgB,iCAAiC,CAAC,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAcjG;AAED,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAG1F;AAiBD,2FAA2F;AAC3F,wBAAgB,2BAA2B,CAC1C,KAAK,EAAE,UAAU,EACjB,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,OAAO,GAChB,UAAU,CA0CZ"}
1
+ {"version":3,"file":"secondary-axis.d.ts","sourceRoot":"","sources":["../../../chart/edit/secondary-axis.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAA6B,UAAU,EAAE,MAAM,UAAU,CAAC;AAqBtE,iGAAiG;AACjG,wBAAgB,iCAAiC,CAAC,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAcjG;AAED,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAG1F;AAiBD,MAAM,WAAW,yBAAyB;IACzC;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACpC;AAED,2FAA2F;AAC3F,wBAAgB,2BAA2B,CAC1C,KAAK,EAAE,UAAU,EACjB,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,OAAO,EAClB,OAAO,GAAE,yBAA8B,GACrC,UAAU,CAgDZ"}
@@ -9,6 +9,8 @@ export interface ChartTypeTarget {
9
9
  barDirection?: 'bar' | 'col';
10
10
  grouping?: ChartGrouping;
11
11
  }
12
+ /** The group element of a `kind` chart (`barChart`, `bar3DChart`...); throws when there is none. */
13
+ export declare function chartGroupElement(kind: ChartGroupKind, is3D: boolean): string;
12
14
  /** Changes the type of the whole chart; series keep their data, names and formatting. */
13
15
  export declare function setChartType(space: ChartSpace, target: ChartTypeTarget): ChartSpace;
14
16
  /** Sets the grouping of every bar, line and area group (PowerPoint's `setChartGrouping`). */
@@ -1 +1 @@
1
- {"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../chart/edit/type.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAa,cAAc,EAAkB,UAAU,EAAE,MAAM,UAAU,CAAC;AAatF,6CAA6C;AAC7C,MAAM,MAAM,aAAa,GAAG,WAAW,GAAG,SAAS,GAAG,gBAAgB,GAAG,UAAU,CAAC;AAEpF,MAAM,WAAW,eAAe;IAC/B,IAAI,EAAE,cAAc,CAAC;IACrB,wFAAwF;IACxF,IAAI,CAAC,EAA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