ooxml-core 1.19.1 → 1.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.
Files changed (88) hide show
  1. package/README.md +12 -1
  2. package/dist/{PptxHandler-2V4PQL6O.mjs → PptxHandler-FYD7IYXT.mjs} +2 -2
  3. package/dist/PptxHandler-SITN3K3F.mjs +4 -0
  4. package/dist/{PptxHandler-6TNIQ7S5.cjs → PptxHandler-TEKISCJO.cjs} +3 -3
  5. package/dist/{PresentationBuilder-HQ6C7L4V.mjs → PresentationBuilder-EYI6Z2JP.mjs} +2 -2
  6. package/dist/{PresentationBuilder-G7MPEGXJ.mjs → PresentationBuilder-IMB4DVRN.mjs} +2 -2
  7. package/dist/{PresentationBuilder-RM52LCVN.cjs → PresentationBuilder-NCKASKXU.cjs} +5 -5
  8. package/dist/automation/index.cjs +424 -90
  9. package/dist/automation/index.mjs +423 -91
  10. package/dist/automation/xlsx-read.d.ts +56 -0
  11. package/dist/automation/xlsx-read.d.ts.map +1 -0
  12. package/dist/automation/xlsx.d.ts +105 -4
  13. package/dist/automation/xlsx.d.ts.map +1 -1
  14. package/dist/{chunk-M6GDBVQ7.mjs → chunk-GQYQQ3GA.mjs} +1 -1
  15. package/dist/{chunk-SLNQNVQM.mjs → chunk-LEV2SVMK.mjs} +1 -1
  16. package/dist/{chunk-JUABSM7C.mjs → chunk-LVM3IZJ2.mjs} +1 -1
  17. package/dist/{chunk-TJPUAUWL.mjs → chunk-MN27HKHM.mjs} +8 -194
  18. package/dist/{chunk-4FTUAD2B.mjs → chunk-MNXKRXFB.mjs} +715 -200
  19. package/dist/{chunk-R5FIHHGB.cjs → chunk-NXKATFM5.cjs} +1598 -1204
  20. package/dist/{chunk-ZJ2OKIJN.mjs → chunk-WXY5EDGT.mjs} +592 -198
  21. package/dist/docx/embedded.cjs +4 -1
  22. package/dist/docx/embedded.mjs +4 -1
  23. package/dist/docx/index.cjs +4 -1
  24. package/dist/docx/index.mjs +4 -1
  25. package/dist/docx/load/index.cjs +4 -1
  26. package/dist/docx/load/index.mjs +4 -1
  27. package/dist/docx/write-table.d.ts.map +1 -1
  28. package/dist/index.cjs +25 -0
  29. package/dist/index.mjs +25 -0
  30. package/dist/pptx/automation/index.cjs +887 -453
  31. package/dist/pptx/automation/index.d.ts +2 -2
  32. package/dist/pptx/automation/index.mjs +5 -5
  33. package/dist/pptx/chunks/{index-Bqm-jFG-.d.ts → index-CgFX0T7b.d.ts} +7573 -7508
  34. package/dist/pptx/chunks/index-CgFX0T7b.d.ts.map +1 -0
  35. package/dist/pptx/chunks/{index-B9x557hr.d.ts → index-qwVYoFn6.d.ts} +2 -2
  36. package/dist/pptx/chunks/{index-B9x557hr.d.ts.map → index-qwVYoFn6.d.ts.map} +1 -1
  37. package/dist/pptx/cli/index.cjs +654 -221
  38. package/dist/pptx/cli/index.mjs +4 -4
  39. package/dist/pptx/converter/index.d.ts +1 -1
  40. package/dist/pptx/converter/index.mjs +2 -2
  41. package/dist/pptx/editor/render/find-replace.cjs +14 -14
  42. package/dist/pptx/editor/render/find-replace.d.ts +1 -1
  43. package/dist/pptx/editor/render/find-replace.mjs +1 -1
  44. package/dist/pptx/editor/render/slide-operations.cjs +8 -8
  45. package/dist/pptx/editor/render/slide-operations.mjs +2 -2
  46. package/dist/pptx/index.cjs +991 -619
  47. package/dist/pptx/index.d.ts +3 -3
  48. package/dist/pptx/index.mjs +5 -5
  49. package/dist/visio/index.cjs +61 -7
  50. package/dist/visio/index.mjs +61 -7
  51. package/dist/visio/ui/contract.d.ts +2 -1
  52. package/dist/visio/ui/contract.d.ts.map +1 -1
  53. package/dist/visio/ui/index.cjs +62 -7
  54. package/dist/visio/ui/index.mjs +62 -7
  55. package/dist/xlsx/edit/dimensions.d.ts.map +1 -1
  56. package/dist/xlsx/edit/history-rows.d.ts +7 -0
  57. package/dist/xlsx/edit/history-rows.d.ts.map +1 -0
  58. package/dist/xlsx/edit/history.d.ts +11 -1
  59. package/dist/xlsx/edit/history.d.ts.map +1 -1
  60. package/dist/xlsx/edit/outline.d.ts.map +1 -1
  61. package/dist/xlsx/edit/row-autofit.d.ts.map +1 -1
  62. package/dist/xlsx/index.cjs +235 -54
  63. package/dist/xlsx/index.mjs +235 -54
  64. package/dist/xlsx/layout/merge-sweep.d.ts +36 -0
  65. package/dist/xlsx/layout/merge-sweep.d.ts.map +1 -0
  66. package/dist/xlsx/layout/metrics.d.ts +5 -0
  67. package/dist/xlsx/layout/metrics.d.ts.map +1 -1
  68. package/dist/xlsx/layout/row-autofit.d.ts +6 -0
  69. package/dist/xlsx/layout/row-autofit.d.ts.map +1 -1
  70. package/dist/xlsx/load/index.cjs +61 -7
  71. package/dist/xlsx/load/index.mjs +61 -7
  72. package/dist/xlsx/numfmt/format.d.ts +8 -0
  73. package/dist/xlsx/numfmt/format.d.ts.map +1 -1
  74. package/dist/xlsx/read/sheet-data-source.d.ts.map +1 -1
  75. package/dist/xlsx/ui/index.cjs +281 -55
  76. package/dist/xlsx/ui/index.d.ts +1 -0
  77. package/dist/xlsx/ui/index.d.ts.map +1 -1
  78. package/dist/xlsx/ui/index.mjs +281 -56
  79. package/dist/xlsx/ui/selection-format.d.ts +13 -0
  80. package/dist/xlsx/ui/selection-format.d.ts.map +1 -0
  81. package/dist/xml/index.cjs +25 -0
  82. package/dist/xml/index.mjs +25 -0
  83. package/dist/xml/lite.d.ts.map +1 -1
  84. package/package.json +2 -2
  85. package/dist/PptxHandler-HSPKEP5E.mjs +0 -4
  86. package/dist/pptx/chunks/index-Bqm-jFG-.d.ts.map +0 -1
  87. /package/dist/{chunk-NYTR4UZ5.cjs → chunk-3IENHIFD.cjs} +0 -0
  88. /package/dist/{chunk-XTSHZGSM.mjs → chunk-CC5UNZOO.mjs} +0 -0
package/README.md CHANGED
@@ -99,11 +99,22 @@ import { PptxHandler } from 'ooxml-core/pptx';
99
99
 
100
100
  const { handler, data, createSlide } = await PptxHandler.create({ title: 'Quarterly Review' });
101
101
  data.slides.push(
102
- createSlide().addText('Hello World', { x: 100, y: 100, width: 600, height: 80 }).build(),
102
+ createSlide('Title Slide')
103
+ .addPlaceholder('ctrTitle', 'Quarterly Review')
104
+ .addPlaceholder('subTitle', 'Results and next steps')
105
+ .build(),
103
106
  );
104
107
  const bytes = await handler.save(data.slides); // a valid .pptx
105
108
  ```
106
109
 
110
+ `addPlaceholder(type, text, { idx? })` binds text to the selected layout and inherits
111
+ its position, size, and text styles. Use `{ idx: 1 }` or `{ idx: 2 }` for repeated
112
+ content slots in Two Content. Optional `x`, `y`, `width`, and `height` override the
113
+ inherited frame. If a template's master frame needs a compatible-role fallback,
114
+ only the newly created placeholder receives an explicit frame. A missing slot
115
+ requires a complete explicit frame; otherwise the builder throws. Standalone `new SlideBuilder(number, layoutPath, name, handler)`
116
+ requires a loaded handler for this method. Use `addText` for a free text box.
117
+
107
118
  **Work at the package level**
108
119
 
109
120
  ```ts
@@ -1,5 +1,5 @@
1
- export { PptxHandler } from './chunk-4FTUAD2B.mjs';
2
- import './chunk-SLNQNVQM.mjs';
1
+ export { PptxHandler } from './chunk-MNXKRXFB.mjs';
2
+ import './chunk-LEV2SVMK.mjs';
3
3
  import './chunk-M4XLF4R7.mjs';
4
4
  import './chunk-3GXV5MPC.mjs';
5
5
  import './chunk-54S5A5PZ.mjs';
@@ -0,0 +1,4 @@
1
+ export { PptxHandler } from './chunk-WXY5EDGT.mjs';
2
+ import './chunk-CC5UNZOO.mjs';
3
+ import './chunk-GXHKNSZX.mjs';
4
+ import './chunk-CA7KCNL3.mjs';
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkR5FIHHGB_cjs = require('./chunk-R5FIHHGB.cjs');
4
- require('./chunk-NYTR4UZ5.cjs');
3
+ var chunkNXKATFM5_cjs = require('./chunk-NXKATFM5.cjs');
4
+ require('./chunk-3IENHIFD.cjs');
5
5
  require('./chunk-XZPZHXV4.cjs');
6
6
  require('./chunk-5W2QL4SB.cjs');
7
7
 
@@ -9,5 +9,5 @@ require('./chunk-5W2QL4SB.cjs');
9
9
 
10
10
  Object.defineProperty(exports, "PptxHandler", {
11
11
  enumerable: true,
12
- get: function () { return chunkR5FIHHGB_cjs.PptxHandler; }
12
+ get: function () { return chunkNXKATFM5_cjs.PptxHandler; }
13
13
  });
@@ -1,5 +1,5 @@
1
- export { PresentationBuilder, STANDARD_LAYOUTS, buildBlankPresentationArchive } from './chunk-4FTUAD2B.mjs';
2
- import './chunk-SLNQNVQM.mjs';
1
+ export { PresentationBuilder, STANDARD_LAYOUTS, buildBlankPresentationArchive } from './chunk-MNXKRXFB.mjs';
2
+ import './chunk-LEV2SVMK.mjs';
3
3
  import './chunk-M4XLF4R7.mjs';
4
4
  import './chunk-3GXV5MPC.mjs';
5
5
  import './chunk-54S5A5PZ.mjs';
@@ -1,4 +1,4 @@
1
- export { PresentationBuilder, STANDARD_LAYOUTS, buildBlankPresentationArchive } from './chunk-ZJ2OKIJN.mjs';
2
- import './chunk-XTSHZGSM.mjs';
1
+ export { PresentationBuilder, STANDARD_LAYOUTS, buildBlankPresentationArchive } from './chunk-WXY5EDGT.mjs';
2
+ import './chunk-CC5UNZOO.mjs';
3
3
  import './chunk-GXHKNSZX.mjs';
4
4
  import './chunk-CA7KCNL3.mjs';
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkR5FIHHGB_cjs = require('./chunk-R5FIHHGB.cjs');
4
- require('./chunk-NYTR4UZ5.cjs');
3
+ var chunkNXKATFM5_cjs = require('./chunk-NXKATFM5.cjs');
4
+ require('./chunk-3IENHIFD.cjs');
5
5
  require('./chunk-XZPZHXV4.cjs');
6
6
  require('./chunk-5W2QL4SB.cjs');
7
7
 
@@ -9,13 +9,13 @@ require('./chunk-5W2QL4SB.cjs');
9
9
 
10
10
  Object.defineProperty(exports, "PresentationBuilder", {
11
11
  enumerable: true,
12
- get: function () { return chunkR5FIHHGB_cjs.PresentationBuilder; }
12
+ get: function () { return chunkNXKATFM5_cjs.PresentationBuilder; }
13
13
  });
14
14
  Object.defineProperty(exports, "STANDARD_LAYOUTS", {
15
15
  enumerable: true,
16
- get: function () { return chunkR5FIHHGB_cjs.STANDARD_LAYOUTS; }
16
+ get: function () { return chunkNXKATFM5_cjs.STANDARD_LAYOUTS; }
17
17
  });
18
18
  Object.defineProperty(exports, "buildBlankPresentationArchive", {
19
19
  enumerable: true,
20
- get: function () { return chunkR5FIHHGB_cjs.buildBlankPresentationArchive; }
20
+ get: function () { return chunkNXKATFM5_cjs.buildBlankPresentationArchive; }
21
21
  });