ooxml-core 1.43.0 → 1.45.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 (69) hide show
  1. package/dist/{PptxHandler-V23RDNEX.cjs → PptxHandler-3RDVJFQV.cjs} +2 -2
  2. package/dist/{PptxHandler-WB3KL2WH.mjs → PptxHandler-EI6DMHPM.mjs} +1 -1
  3. package/dist/{PptxHandler-3VAVJDFB.mjs → PptxHandler-FXLXIOLT.mjs} +2 -2
  4. package/dist/{PresentationBuilder-7LJMTRJ6.mjs → PresentationBuilder-3FKFRSSV.mjs} +2 -2
  5. package/dist/{PresentationBuilder-KHL6GONR.cjs → PresentationBuilder-CSKLG64K.cjs} +4 -4
  6. package/dist/{PresentationBuilder-PY2GB4IG.mjs → PresentationBuilder-DDYHRV26.mjs} +1 -1
  7. package/dist/automation/index.cjs +10 -1
  8. package/dist/automation/index.mjs +10 -1
  9. package/dist/chart/edit/fill.d.ts +6 -2
  10. package/dist/chart/edit/fill.d.ts.map +1 -1
  11. package/dist/chart/index.cjs +12 -3
  12. package/dist/chart/index.mjs +12 -3
  13. package/dist/{chunk-HLYOHD2Z.mjs → chunk-CVJX6NNO.mjs} +438 -108
  14. package/dist/{chunk-243ZYX2B.mjs → chunk-GGJUWJXB.mjs} +1 -1
  15. package/dist/{chunk-KCDLTVUI.mjs → chunk-GXYK3H4O.mjs} +1 -1
  16. package/dist/{chunk-WEAWSXUX.mjs → chunk-LCXBTJXE.mjs} +4 -4
  17. package/dist/{chunk-JHYU7HGG.mjs → chunk-RVYGAYCP.mjs} +1 -1
  18. package/dist/{chunk-4LEVL6ZW.mjs → chunk-U5BXJQZG.mjs} +457 -105
  19. package/dist/{chunk-RNZQ2OU4.cjs → chunk-YBSNMVSN.cjs} +437 -107
  20. package/dist/index.cjs +164 -71
  21. package/dist/index.mjs +165 -72
  22. package/dist/opc/declared-fonts.d.ts +9 -0
  23. package/dist/opc/declared-fonts.d.ts.map +1 -0
  24. package/dist/opc/index.cjs +84 -0
  25. package/dist/opc/index.d.ts +1 -0
  26. package/dist/opc/index.d.ts.map +1 -1
  27. package/dist/opc/index.mjs +85 -2
  28. package/dist/pptx/automation/index.cjs +529 -167
  29. package/dist/pptx/automation/index.d.ts +6 -6
  30. package/dist/pptx/automation/index.mjs +5 -5
  31. package/dist/pptx/chunks/{elements-PBugbKtv.d.ts → elements-B4Z6N-Gz.d.ts} +4 -477
  32. package/dist/pptx/chunks/elements-B4Z6N-Gz.d.ts.map +1 -0
  33. package/dist/pptx/chunks/{index-CCJiD-Bm.d.ts → index-6Ot1b-4U.d.ts} +6 -6
  34. package/dist/pptx/chunks/{index-CCJiD-Bm.d.ts.map → index-6Ot1b-4U.d.ts.map} +1 -1
  35. package/dist/pptx/chunks/{index-CGNb1TV9.d.ts → index-DGKI80Hj.d.ts} +61 -6
  36. package/dist/pptx/chunks/{index-CGNb1TV9.d.ts.map → index-DGKI80Hj.d.ts.map} +1 -1
  37. package/dist/pptx/chunks/{index-Bj-hur0D.d.ts → index-jdZUtLGB.d.ts} +4 -4
  38. package/dist/pptx/chunks/{index-Bj-hur0D.d.ts.map → index-jdZUtLGB.d.ts.map} +1 -1
  39. package/dist/pptx/chunks/{table-C7ITXL3Y.d.ts → table-BfgZfw5R.d.ts} +488 -4
  40. package/dist/pptx/chunks/table-BfgZfw5R.d.ts.map +1 -0
  41. package/dist/pptx/chunks/{text-operations-BNJr7aGa.d.ts → text-operations-Mek86RBL.d.ts} +3 -3
  42. package/dist/pptx/chunks/{text-operations-BNJr7aGa.d.ts.map → text-operations-Mek86RBL.d.ts.map} +1 -1
  43. package/dist/pptx/cli/index.cjs +525 -163
  44. package/dist/pptx/cli/index.d.ts +1 -1
  45. package/dist/pptx/cli/index.mjs +4 -4
  46. package/dist/pptx/converter/index.d.ts +1 -1
  47. package/dist/pptx/converter/index.mjs +2 -2
  48. package/dist/pptx/editor/render/find-replace.d.ts +2 -2
  49. package/dist/pptx/editor/render/slide-operations.cjs +1 -1
  50. package/dist/pptx/editor/render/slide-operations.mjs +1 -1
  51. package/dist/pptx/editor/render/table-layout.d.ts +1 -1
  52. package/dist/pptx/editor/render/text-runs-style-patch.d.ts +1 -1
  53. package/dist/pptx/editor/render/text-style-scope.d.ts +1 -1
  54. package/dist/pptx/index.cjs +558 -168
  55. package/dist/pptx/index.d.ts +7 -7
  56. package/dist/pptx/index.mjs +5 -5
  57. package/dist/pptx/node/index.d.ts +1 -1
  58. package/dist/xlsx/index.cjs +10 -1
  59. package/dist/xlsx/index.mjs +10 -1
  60. package/dist/xlsx/ui/index.cjs +50 -6
  61. package/dist/xlsx/ui/index.mjs +50 -6
  62. package/dist/xlsx/ui/locales/de/options.d.ts.map +1 -1
  63. package/dist/xlsx/ui/locales/en/options.d.ts.map +1 -1
  64. package/dist/xlsx/ui/locales/es/options.d.ts.map +1 -1
  65. package/dist/xlsx/ui/locales/fr/options.d.ts.map +1 -1
  66. package/dist/xlsx/ui/locales/zh-CN/options.d.ts.map +1 -1
  67. package/package.json +1 -1
  68. package/dist/pptx/chunks/elements-PBugbKtv.d.ts.map +0 -1
  69. package/dist/pptx/chunks/table-C7ITXL3Y.d.ts.map +0 -1
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkRNZQ2OU4_cjs = require('./chunk-RNZQ2OU4.cjs');
3
+ var chunkYBSNMVSN_cjs = require('./chunk-YBSNMVSN.cjs');
4
4
  require('./chunk-3J6VIKLP.cjs');
5
5
  require('./chunk-QZPOPUI5.cjs');
6
6
  require('./chunk-XZPZHXV4.cjs');
@@ -10,5 +10,5 @@ require('./chunk-5W2QL4SB.cjs');
10
10
 
11
11
  Object.defineProperty(exports, "PptxHandler", {
12
12
  enumerable: true,
13
- get: function () { return chunkRNZQ2OU4_cjs.PptxHandler; }
13
+ get: function () { return chunkYBSNMVSN_cjs.PptxHandler; }
14
14
  });
@@ -1,4 +1,4 @@
1
- export { PptxHandler } from './chunk-HLYOHD2Z.mjs';
1
+ export { PptxHandler } from './chunk-CVJX6NNO.mjs';
2
2
  import './chunk-VKFKEVHK.mjs';
3
3
  import './chunk-IPV3J3I5.mjs';
4
4
  import './chunk-GXHKNSZX.mjs';
@@ -1,5 +1,5 @@
1
- export { PptxHandler } from './chunk-4LEVL6ZW.mjs';
2
- import './chunk-KCDLTVUI.mjs';
1
+ export { PptxHandler } from './chunk-U5BXJQZG.mjs';
2
+ import './chunk-GXYK3H4O.mjs';
3
3
  import './chunk-EYCM7RVL.mjs';
4
4
  import './chunk-2N7RZQLC.mjs';
5
5
  import './chunk-VDUNZTJC.mjs';
@@ -1,5 +1,5 @@
1
- export { PresentationBuilder, STANDARD_LAYOUTS, buildBlankPresentationArchive } from './chunk-4LEVL6ZW.mjs';
2
- import './chunk-KCDLTVUI.mjs';
1
+ export { PresentationBuilder, STANDARD_LAYOUTS, buildBlankPresentationArchive } from './chunk-U5BXJQZG.mjs';
2
+ import './chunk-GXYK3H4O.mjs';
3
3
  import './chunk-EYCM7RVL.mjs';
4
4
  import './chunk-2N7RZQLC.mjs';
5
5
  import './chunk-VDUNZTJC.mjs';
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkRNZQ2OU4_cjs = require('./chunk-RNZQ2OU4.cjs');
3
+ var chunkYBSNMVSN_cjs = require('./chunk-YBSNMVSN.cjs');
4
4
  require('./chunk-3J6VIKLP.cjs');
5
5
  require('./chunk-QZPOPUI5.cjs');
6
6
  require('./chunk-XZPZHXV4.cjs');
@@ -10,13 +10,13 @@ require('./chunk-5W2QL4SB.cjs');
10
10
 
11
11
  Object.defineProperty(exports, "PresentationBuilder", {
12
12
  enumerable: true,
13
- get: function () { return chunkRNZQ2OU4_cjs.PresentationBuilder; }
13
+ get: function () { return chunkYBSNMVSN_cjs.PresentationBuilder; }
14
14
  });
15
15
  Object.defineProperty(exports, "STANDARD_LAYOUTS", {
16
16
  enumerable: true,
17
- get: function () { return chunkRNZQ2OU4_cjs.STANDARD_LAYOUTS; }
17
+ get: function () { return chunkYBSNMVSN_cjs.STANDARD_LAYOUTS; }
18
18
  });
19
19
  Object.defineProperty(exports, "buildBlankPresentationArchive", {
20
20
  enumerable: true,
21
- get: function () { return chunkRNZQ2OU4_cjs.buildBlankPresentationArchive; }
21
+ get: function () { return chunkYBSNMVSN_cjs.buildBlankPresentationArchive; }
22
22
  });
@@ -1,4 +1,4 @@
1
- export { PresentationBuilder, STANDARD_LAYOUTS, buildBlankPresentationArchive } from './chunk-HLYOHD2Z.mjs';
1
+ export { PresentationBuilder, STANDARD_LAYOUTS, buildBlankPresentationArchive } from './chunk-CVJX6NNO.mjs';
2
2
  import './chunk-VKFKEVHK.mjs';
3
3
  import './chunk-IPV3J3I5.mjs';
4
4
  import './chunk-GXHKNSZX.mjs';
@@ -34364,7 +34364,16 @@ function repaintSeriesForFamily(series, toLine) {
34364
34364
  shape2.fill = structuredClone(shape2.line.fill);
34365
34365
  }
34366
34366
  function clearPointPaint(series, key2) {
34367
- for (const point3 of series.dataPoints) if (point3.spPr) delete point3.spPr[key2];
34367
+ const emptied = (part) => Object.keys(part).every((name4) => name4 === "sourceXml");
34368
+ for (const point3 of series.dataPoints) {
34369
+ if (!point3.spPr) continue;
34370
+ delete point3.spPr[key2];
34371
+ if (point3.spPr.line && emptied(point3.spPr.line)) delete point3.spPr.line;
34372
+ if (emptied(point3.spPr)) delete point3.spPr;
34373
+ }
34374
+ series.dataPoints = series.dataPoints.filter(
34375
+ (point3) => Object.keys(point3).some((name4) => name4 !== "index")
34376
+ );
34368
34377
  }
34369
34378
  function setChartSeriesFill(space, index5, fill2) {
34370
34379
  return editChartSpace(space, (draft) => {
@@ -34339,7 +34339,16 @@ function repaintSeriesForFamily(series, toLine) {
34339
34339
  shape2.fill = structuredClone(shape2.line.fill);
34340
34340
  }
34341
34341
  function clearPointPaint(series, key2) {
34342
- for (const point3 of series.dataPoints) if (point3.spPr) delete point3.spPr[key2];
34342
+ const emptied = (part) => Object.keys(part).every((name4) => name4 === "sourceXml");
34343
+ for (const point3 of series.dataPoints) {
34344
+ if (!point3.spPr) continue;
34345
+ delete point3.spPr[key2];
34346
+ if (point3.spPr.line && emptied(point3.spPr.line)) delete point3.spPr.line;
34347
+ if (emptied(point3.spPr)) delete point3.spPr;
34348
+ }
34349
+ series.dataPoints = series.dataPoints.filter(
34350
+ (point3) => Object.keys(point3).some((name4) => name4 !== "index")
34351
+ );
34343
34352
  }
34344
34353
  function setChartSeriesFill(space, index5, fill2) {
34345
34354
  return editChartSpace(space, (draft) => {
@@ -29,9 +29,13 @@ export declare function setChartSeriesLine(space: ChartSpace, index: number, lin
29
29
  /**
30
30
  * Sets the colour of a series as the Format pane's colour picker does: the fill, or the line of a
31
31
  * series drawn as a line, keeping the previous colour's transparency. `null` removes the paint so
32
- * the series takes its automatic colour again.
32
+ * the series takes its automatic colour again. Points lose their own paint of that kind, as in the
33
+ * Format pane, unless `keepPointColors` is set: a caller that states every point override itself
34
+ * (the save planner) keeps them.
33
35
  */
34
- export declare function setChartSeriesColor(space: ChartSpace, index: number, color: DrawingColor | null): ChartSpace;
36
+ export declare function setChartSeriesColor(space: ChartSpace, index: number, color: DrawingColor | null, options?: {
37
+ keepPointColors?: boolean;
38
+ }): ChartSpace;
35
39
  /** Sets a solid series fill's transparency (0..100); other fills are left alone. */
36
40
  export declare function setChartSeriesTransparency(space: ChartSpace, index: number, percent: number): ChartSpace;
37
41
  /** Sets (or removes, with `undefined`) one data point's fill, through its `c:dPt` override. */
@@ -1 +1 @@
1
- {"version":3,"file":"fill.d.ts","sourceRoot":"","sources":["../../../chart/edit/fill.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpF,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3D,OAAO,KAAK,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAE9E,OAAO,E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EAAE,MAAM,EACb,IAAI,EAAE,WAAW,GAAG,IAAI,GACtB,UAAU,CASZ;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAClC,KAAK,EAAE,UAAU,EACjB,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,YAAY,GAAG,IAAI,EAC1B,OAAO,GAAE;IAAE,eAAe,CAAC,EAAE,OAAO,CAAA;CAAO,GACzC,UAAU,CAcZ;AAED,oFAAoF;AACpF,wBAAgB,0BAA0B,CACzC,KAAK,EAAE,UAAU,EACjB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,MAAM,GACb,UAAU,CAUZ;AAED,+FAA+F;AAC/F,wBAAgB,qBAAqB,CACpC,KAAK,EAAE,UAAU,EACjB,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,WAAW,GAAG,SAAS,GAC3B,UAAU,CAkBZ;AAED,+FAA+F;AAC/F,wBAAgB,uBAAuB,CACtC,KAAK,EAAE,UAAU,EACjB,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,qBAAqB,EAC3B,YAAY,EAAE,YAAY,GACxB;IAAE,KAAK,EAAE,UAAU,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAOtD;AAED,oGAAoG;AACpG,wBAAgB,wBAAwB,CACvC,KAAK,EAAE,UAAU,EACjB,IAAI,EAAE,gBAAgB,EACtB,IAAI,EAAE,qBAAqB,GACzB;IAAE,KAAK,EAAE,UAAU,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAQtD"}
@@ -15028,7 +15028,16 @@ function repaintSeriesForFamily(series2, toLine) {
15028
15028
  shape.fill = structuredClone(shape.line.fill);
15029
15029
  }
15030
15030
  function clearPointPaint(series2, key) {
15031
- for (const point of series2.dataPoints) if (point.spPr) delete point.spPr[key];
15031
+ const emptied = (part) => Object.keys(part).every((name) => name === "sourceXml");
15032
+ for (const point of series2.dataPoints) {
15033
+ if (!point.spPr) continue;
15034
+ delete point.spPr[key];
15035
+ if (point.spPr.line && emptied(point.spPr.line)) delete point.spPr.line;
15036
+ if (emptied(point.spPr)) delete point.spPr;
15037
+ }
15038
+ series2.dataPoints = series2.dataPoints.filter(
15039
+ (point) => Object.keys(point).some((name) => name !== "index")
15040
+ );
15032
15041
  }
15033
15042
  function setChartSeriesFill(space, index, fill) {
15034
15043
  return editChartSpace(space, (draft) => {
@@ -15047,7 +15056,7 @@ function setChartSeriesLine(space, index, line3) {
15047
15056
  );
15048
15057
  });
15049
15058
  }
15050
- function setChartSeriesColor(space, index, color2) {
15059
+ function setChartSeriesColor(space, index, color2, options2 = {}) {
15051
15060
  return editChartSpace(space, (draft) => {
15052
15061
  const { series: series2 } = chartSeriesEntryAt(draft, index);
15053
15062
  const shape = series2.spPr ??= {};
@@ -15057,7 +15066,7 @@ function setChartSeriesColor(space, index, color2) {
15057
15066
  const fill = color2 ? { kind: "solid", color: withAlphaOf(color2, previous) } : void 0;
15058
15067
  if (line3) assignOrDelete(shape.line ??= {}, "fill", fill);
15059
15068
  else assignOrDelete(shape, "fill", fill);
15060
- clearPointPaint(series2, line3 ? "line" : "fill");
15069
+ if (!options2.keepPointColors) clearPointPaint(series2, line3 ? "line" : "fill");
15061
15070
  });
15062
15071
  }
15063
15072
  function setChartSeriesTransparency(space, index, percent) {
@@ -15022,7 +15022,16 @@ function repaintSeriesForFamily(series2, toLine) {
15022
15022
  shape.fill = structuredClone(shape.line.fill);
15023
15023
  }
15024
15024
  function clearPointPaint(series2, key) {
15025
- for (const point of series2.dataPoints) if (point.spPr) delete point.spPr[key];
15025
+ const emptied = (part) => Object.keys(part).every((name) => name === "sourceXml");
15026
+ for (const point of series2.dataPoints) {
15027
+ if (!point.spPr) continue;
15028
+ delete point.spPr[key];
15029
+ if (point.spPr.line && emptied(point.spPr.line)) delete point.spPr.line;
15030
+ if (emptied(point.spPr)) delete point.spPr;
15031
+ }
15032
+ series2.dataPoints = series2.dataPoints.filter(
15033
+ (point) => Object.keys(point).some((name) => name !== "index")
15034
+ );
15026
15035
  }
15027
15036
  function setChartSeriesFill(space, index, fill) {
15028
15037
  return editChartSpace(space, (draft) => {
@@ -15041,7 +15050,7 @@ function setChartSeriesLine(space, index, line3) {
15041
15050
  );
15042
15051
  });
15043
15052
  }
15044
- function setChartSeriesColor(space, index, color2) {
15053
+ function setChartSeriesColor(space, index, color2, options2 = {}) {
15045
15054
  return editChartSpace(space, (draft) => {
15046
15055
  const { series: series2 } = chartSeriesEntryAt(draft, index);
15047
15056
  const shape = series2.spPr ??= {};
@@ -15051,7 +15060,7 @@ function setChartSeriesColor(space, index, color2) {
15051
15060
  const fill = color2 ? { kind: "solid", color: withAlphaOf(color2, previous) } : void 0;
15052
15061
  if (line3) assignOrDelete(shape.line ??= {}, "fill", fill);
15053
15062
  else assignOrDelete(shape, "fill", fill);
15054
- clearPointPaint(series2, line3 ? "line" : "fill");
15063
+ if (!options2.keepPointColors) clearPointPaint(series2, line3 ? "line" : "fill");
15055
15064
  });
15056
15065
  }
15057
15066
  function setChartSeriesTransparency(space, index, percent) {