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
@@ -66318,7 +66318,7 @@ function isolateSeries(space, index3) {
66318
66318
  space.plotArea.groups.splice(groupIndex, 1, ...segments);
66319
66319
  return chartSeriesEntryAt(space, index3).group;
66320
66320
  }
66321
- function setChartSeriesSecondaryAxis(space, seriesIndex, secondary) {
66321
+ function setChartSeriesSecondaryAxis(space, seriesIndex, secondary, options2 = {}) {
66322
66322
  if (!chartSeriesSecondaryAxisSupported(space, seriesIndex))
66323
66323
  throw new RangeError(
66324
66324
  "Secondary-axis editing needs a later series in a supported vertical 2D chart"
@@ -66345,7 +66345,9 @@ function setChartSeriesSecondaryAxis(space, seriesIndex, secondary) {
66345
66345
  used.add(id);
66346
66346
  return id;
66347
66347
  };
66348
- const ids = [allocate(), allocate()];
66348
+ const ids = options2.axisIds ? [...options2.axisIds] : [allocate(), allocate()];
66349
+ if (options2.axisIds && (ids[0] === ids[1] || ids.some((id) => used.has(id) || !Number.isSafeInteger(id) || id < 0 || id > 4294967295)))
66350
+ throw new RangeError("Secondary axis ids must be two unused whole numbers");
66349
66351
  const horizontal = primary.barDirection === "bar";
66350
66352
  const axes = defaultChartAxes(horizontal, false, ids);
66351
66353
  axes[0] = { ...structuredClone(axisPair(draft, primary)[0]), id: ids[0], crossAxisId: ids[1] };
@@ -66462,7 +66464,7 @@ var SWITCHABLE = {
66462
66464
  stock: false,
66463
66465
  surface: true
66464
66466
  };
66465
- function elementFor(kind, is3D) {
66467
+ function chartGroupElement(kind, is3D) {
66466
66468
  const match2 = Object.entries(CHART_GROUP_ELEMENTS).find(
66467
66469
  ([, value2]) => value2.kind === kind && value2.is3D === is3D
66468
66470
  );
@@ -66478,7 +66480,7 @@ function groupingFor(element3, grouping) {
66478
66480
  var horizontalBars = (group2) => group2.kind === "bar" && group2.barDirection === "bar";
66479
66481
  function newGroup(base, target, series) {
66480
66482
  const is3D = target.is3D ?? (base.is3D && SWITCHABLE[target.kind] === true);
66481
- const element3 = elementFor(target.kind, is3D);
66483
+ const element3 = chartGroupElement(target.kind, is3D);
66482
66484
  const group2 = { kind: target.kind, element: element3, is3D, series, axisIds: [] };
66483
66485
  const allowed = GROUP_FIELDS[element3] ?? [];
66484
66486
  for (const key of allowed)
@@ -66599,6 +66601,11 @@ var RANGES = {
66599
66601
  firstSliceAngle: [0, 360],
66600
66602
  holeSize: [1, 90]
66601
66603
  };
66604
+ function assertChartGroupOption(key, value2) {
66605
+ const [min, max] = RANGES[key];
66606
+ if (!Number.isInteger(value2) || value2 < min || value2 > max)
66607
+ throw new RangeError(`Chart ${key} must be a whole number from ${min} to ${max}`);
66608
+ }
66602
66609
  function setChartGroupOptions(space, seriesIndex, edit) {
66603
66610
  return editChartSpace(space, (draft) => {
66604
66611
  const { group: group2 } = chartSeriesEntryAt(draft, seriesIndex);
@@ -66611,9 +66618,7 @@ function setChartGroupOptions(space, seriesIndex, edit) {
66611
66618
  delete group2[key];
66612
66619
  continue;
66613
66620
  }
66614
- const [min, max] = RANGES[key];
66615
- if (!Number.isInteger(value2) || value2 < min || value2 > max)
66616
- throw new RangeError(`Chart ${key} must be a whole number from ${min} to ${max}`);
66621
+ assertChartGroupOption(key, value2);
66617
66622
  group2[key] = value2;
66618
66623
  }
66619
66624
  });
@@ -65720,7 +65720,7 @@ function isolateSeries(space, index3) {
65720
65720
  space.plotArea.groups.splice(groupIndex, 1, ...segments);
65721
65721
  return chartSeriesEntryAt(space, index3).group;
65722
65722
  }
65723
- function setChartSeriesSecondaryAxis(space, seriesIndex, secondary) {
65723
+ function setChartSeriesSecondaryAxis(space, seriesIndex, secondary, options7 = {}) {
65724
65724
  if (!chartSeriesSecondaryAxisSupported(space, seriesIndex))
65725
65725
  throw new RangeError(
65726
65726
  "Secondary-axis editing needs a later series in a supported vertical 2D chart"
@@ -65747,7 +65747,9 @@ function setChartSeriesSecondaryAxis(space, seriesIndex, secondary) {
65747
65747
  used.add(id);
65748
65748
  return id;
65749
65749
  };
65750
- const ids = [allocate(), allocate()];
65750
+ const ids = options7.axisIds ? [...options7.axisIds] : [allocate(), allocate()];
65751
+ if (options7.axisIds && (ids[0] === ids[1] || ids.some((id) => used.has(id) || !Number.isSafeInteger(id) || id < 0 || id > 4294967295)))
65752
+ throw new RangeError("Secondary axis ids must be two unused whole numbers");
65751
65753
  const horizontal2 = primary.barDirection === "bar";
65752
65754
  const axes = defaultChartAxes(horizontal2, false, ids);
65753
65755
  axes[0] = { ...structuredClone(axisPair(draft, primary)[0]), id: ids[0], crossAxisId: ids[1] };
@@ -65864,7 +65866,7 @@ var SWITCHABLE = {
65864
65866
  stock: false,
65865
65867
  surface: true
65866
65868
  };
65867
- function elementFor(kind, is3D) {
65869
+ function chartGroupElement(kind, is3D) {
65868
65870
  const match2 = Object.entries(CHART_GROUP_ELEMENTS).find(
65869
65871
  ([, value3]) => value3.kind === kind && value3.is3D === is3D
65870
65872
  );
@@ -65880,7 +65882,7 @@ function groupingFor(element3, grouping) {
65880
65882
  var horizontalBars = (group2) => group2.kind === "bar" && group2.barDirection === "bar";
65881
65883
  function newGroup(base, target2, series) {
65882
65884
  const is3D = target2.is3D ?? (base.is3D && SWITCHABLE[target2.kind] === true);
65883
- const element3 = elementFor(target2.kind, is3D);
65885
+ const element3 = chartGroupElement(target2.kind, is3D);
65884
65886
  const group2 = { kind: target2.kind, element: element3, is3D, series, axisIds: [] };
65885
65887
  const allowed = GROUP_FIELDS[element3] ?? [];
65886
65888
  for (const key of allowed)
@@ -66001,6 +66003,11 @@ var RANGES = {
66001
66003
  firstSliceAngle: [0, 360],
66002
66004
  holeSize: [1, 90]
66003
66005
  };
66006
+ function assertChartGroupOption(key, value3) {
66007
+ const [min, max] = RANGES[key];
66008
+ if (!Number.isInteger(value3) || value3 < min || value3 > max)
66009
+ throw new RangeError(`Chart ${key} must be a whole number from ${min} to ${max}`);
66010
+ }
66004
66011
  function setChartGroupOptions(space, seriesIndex, edit) {
66005
66012
  return editChartSpace(space, (draft) => {
66006
66013
  const { group: group2 } = chartSeriesEntryAt(draft, seriesIndex);
@@ -66013,9 +66020,7 @@ function setChartGroupOptions(space, seriesIndex, edit) {
66013
66020
  delete group2[key];
66014
66021
  continue;
66015
66022
  }
66016
- const [min, max] = RANGES[key];
66017
- if (!Number.isInteger(value3) || value3 < min || value3 > max)
66018
- throw new RangeError(`Chart ${key} must be a whole number from ${min} to ${max}`);
66023
+ assertChartGroupOption(key, value3);
66019
66024
  group2[key] = value3;
66020
66025
  }
66021
66026
  });
@@ -65695,7 +65695,7 @@ function isolateSeries(space, index3) {
65695
65695
  space.plotArea.groups.splice(groupIndex, 1, ...segments);
65696
65696
  return chartSeriesEntryAt(space, index3).group;
65697
65697
  }
65698
- function setChartSeriesSecondaryAxis(space, seriesIndex, secondary) {
65698
+ function setChartSeriesSecondaryAxis(space, seriesIndex, secondary, options7 = {}) {
65699
65699
  if (!chartSeriesSecondaryAxisSupported(space, seriesIndex))
65700
65700
  throw new RangeError(
65701
65701
  "Secondary-axis editing needs a later series in a supported vertical 2D chart"
@@ -65722,7 +65722,9 @@ function setChartSeriesSecondaryAxis(space, seriesIndex, secondary) {
65722
65722
  used.add(id);
65723
65723
  return id;
65724
65724
  };
65725
- const ids = [allocate(), allocate()];
65725
+ const ids = options7.axisIds ? [...options7.axisIds] : [allocate(), allocate()];
65726
+ if (options7.axisIds && (ids[0] === ids[1] || ids.some((id) => used.has(id) || !Number.isSafeInteger(id) || id < 0 || id > 4294967295)))
65727
+ throw new RangeError("Secondary axis ids must be two unused whole numbers");
65726
65728
  const horizontal2 = primary.barDirection === "bar";
65727
65729
  const axes = defaultChartAxes(horizontal2, false, ids);
65728
65730
  axes[0] = { ...structuredClone(axisPair(draft, primary)[0]), id: ids[0], crossAxisId: ids[1] };
@@ -65839,7 +65841,7 @@ var SWITCHABLE = {
65839
65841
  stock: false,
65840
65842
  surface: true
65841
65843
  };
65842
- function elementFor(kind, is3D) {
65844
+ function chartGroupElement(kind, is3D) {
65843
65845
  const match2 = Object.entries(CHART_GROUP_ELEMENTS).find(
65844
65846
  ([, value3]) => value3.kind === kind && value3.is3D === is3D
65845
65847
  );
@@ -65855,7 +65857,7 @@ function groupingFor(element3, grouping) {
65855
65857
  var horizontalBars = (group2) => group2.kind === "bar" && group2.barDirection === "bar";
65856
65858
  function newGroup(base, target2, series) {
65857
65859
  const is3D = target2.is3D ?? (base.is3D && SWITCHABLE[target2.kind] === true);
65858
- const element3 = elementFor(target2.kind, is3D);
65860
+ const element3 = chartGroupElement(target2.kind, is3D);
65859
65861
  const group2 = { kind: target2.kind, element: element3, is3D, series, axisIds: [] };
65860
65862
  const allowed = GROUP_FIELDS[element3] ?? [];
65861
65863
  for (const key of allowed)
@@ -65976,6 +65978,11 @@ var RANGES = {
65976
65978
  firstSliceAngle: [0, 360],
65977
65979
  holeSize: [1, 90]
65978
65980
  };
65981
+ function assertChartGroupOption(key, value3) {
65982
+ const [min, max] = RANGES[key];
65983
+ if (!Number.isInteger(value3) || value3 < min || value3 > max)
65984
+ throw new RangeError(`Chart ${key} must be a whole number from ${min} to ${max}`);
65985
+ }
65979
65986
  function setChartGroupOptions(space, seriesIndex, edit) {
65980
65987
  return editChartSpace(space, (draft) => {
65981
65988
  const { group: group2 } = chartSeriesEntryAt(draft, seriesIndex);
@@ -65988,9 +65995,7 @@ function setChartGroupOptions(space, seriesIndex, edit) {
65988
65995
  delete group2[key];
65989
65996
  continue;
65990
65997
  }
65991
- const [min, max] = RANGES[key];
65992
- if (!Number.isInteger(value3) || value3 < min || value3 > max)
65993
- throw new RangeError(`Chart ${key} must be a whole number from ${min} to ${max}`);
65998
+ assertChartGroupOption(key, value3);
65994
65999
  group2[key] = value3;
65995
66000
  }
65996
66001
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ooxml-core",
3
- "version": "1.45.0",
3
+ "version": "1.47.0",
4
4
  "description": "Shared OOXML logic for the Word, PowerPoint and Excel viewers: everything except the UI",
5
5
  "keywords": [
6
6
  "charts",
@@ -1,14 +0,0 @@
1
- 'use strict';
2
-
3
- var chunkYBSNMVSN_cjs = require('./chunk-YBSNMVSN.cjs');
4
- require('./chunk-3J6VIKLP.cjs');
5
- require('./chunk-QZPOPUI5.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 chunkYBSNMVSN_cjs.PptxHandler; }
14
- });
@@ -1,5 +0,0 @@
1
- export { PptxHandler } from './chunk-CVJX6NNO.mjs';
2
- import './chunk-VKFKEVHK.mjs';
3
- import './chunk-IPV3J3I5.mjs';
4
- import './chunk-GXHKNSZX.mjs';
5
- import './chunk-CA7KCNL3.mjs';