ooxml-core 1.24.1 → 1.24.3

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 (62) hide show
  1. package/dist/{PptxHandler-KFEE7O7W.cjs → PptxHandler-2YPMMGOJ.cjs} +3 -3
  2. package/dist/PptxHandler-VXK5EY7J.mjs +4 -0
  3. package/dist/{PptxHandler-5TWAQWPK.mjs → PptxHandler-WQPEYOSS.mjs} +2 -2
  4. package/dist/{PresentationBuilder-SXLRXYDI.cjs → PresentationBuilder-F5U4KEGH.cjs} +5 -5
  5. package/dist/{PresentationBuilder-SVHIKT4C.mjs → PresentationBuilder-FGWHIJV7.mjs} +2 -2
  6. package/dist/{PresentationBuilder-SCT5AQBP.mjs → PresentationBuilder-PS5S52M3.mjs} +2 -2
  7. package/dist/automation/index.cjs +24 -1
  8. package/dist/automation/index.mjs +24 -1
  9. package/dist/{chunk-7N7C5BNM.mjs → chunk-2AFO3HNI.mjs} +2 -2
  10. package/dist/{chunk-CWCDFPKN.mjs → chunk-4IFENOU7.mjs} +1 -1
  11. package/dist/{chunk-XK55DEUD.cjs → chunk-5SE4FGS4.cjs} +1019 -1019
  12. package/dist/{chunk-NE7626A4.mjs → chunk-HKCSJAQD.mjs} +4 -4
  13. package/dist/{chunk-GVP262WE.mjs → chunk-K2XWOVLV.mjs} +3 -3
  14. package/dist/{chunk-6IIMI5RS.mjs → chunk-O6ISWI34.mjs} +1 -1
  15. package/dist/{chunk-KVKTHGIY.mjs → chunk-OJWKGDJF.mjs} +1 -1
  16. package/dist/{chunk-4LZIUJI3.cjs → chunk-QCZX6K67.cjs} +1 -1
  17. package/dist/{chunk-ON7XVRHQ.mjs → chunk-RF2YPEKI.mjs} +3 -3
  18. package/dist/crypto/detect.d.ts +5 -1
  19. package/dist/crypto/detect.d.ts.map +1 -1
  20. package/dist/crypto/index.cjs +1 -1
  21. package/dist/crypto/index.mjs +1 -1
  22. package/dist/docx/embedded.cjs +24 -1
  23. package/dist/docx/embedded.mjs +24 -1
  24. package/dist/docx/index.cjs +24 -1
  25. package/dist/docx/index.mjs +24 -1
  26. package/dist/docx/load/index.cjs +25 -2
  27. package/dist/docx/load/index.mjs +25 -2
  28. package/dist/docx/ui/content-control-commands.d.ts +1 -1
  29. package/dist/docx/ui/content-control-commands.d.ts.map +1 -1
  30. package/dist/docx/ui/content-control-guard.d.ts.map +1 -1
  31. package/dist/docx/ui/content-control-occurrences.d.ts +17 -0
  32. package/dist/docx/ui/content-control-occurrences.d.ts.map +1 -0
  33. package/dist/docx/ui/content-control-temporary.d.ts +1 -4
  34. package/dist/docx/ui/content-control-temporary.d.ts.map +1 -1
  35. package/dist/docx/ui/form-field-guard.d.ts +10 -4
  36. package/dist/docx/ui/form-field-guard.d.ts.map +1 -1
  37. package/dist/docx/ui/form-protection-sections.d.ts +26 -0
  38. package/dist/docx/ui/form-protection-sections.d.ts.map +1 -0
  39. package/dist/docx/ui/form-text-paste.d.ts +35 -0
  40. package/dist/docx/ui/form-text-paste.d.ts.map +1 -0
  41. package/dist/docx/ui/index.cjs +266 -108
  42. package/dist/docx/ui/index.mjs +266 -108
  43. package/dist/docx/write-table-controls.d.ts +2 -1
  44. package/dist/docx/write-table-controls.d.ts.map +1 -1
  45. package/dist/pptx/automation/index.cjs +4 -4
  46. package/dist/pptx/automation/index.d.ts +4 -1
  47. package/dist/pptx/automation/index.d.ts.map +1 -1
  48. package/dist/pptx/automation/index.mjs +6 -6
  49. package/dist/pptx/chunks/index-4FmgJajb.d.ts.map +1 -1
  50. package/dist/pptx/cli/index.cjs +3 -3
  51. package/dist/pptx/cli/index.mjs +4 -4
  52. package/dist/pptx/converter/index.mjs +2 -2
  53. package/dist/pptx/editor/render/find-replace.cjs +14 -14
  54. package/dist/pptx/editor/render/find-replace.mjs +1 -1
  55. package/dist/pptx/editor/render/slide-operations.cjs +8 -8
  56. package/dist/pptx/editor/render/slide-operations.mjs +2 -2
  57. package/dist/pptx/index.cjs +3 -3
  58. package/dist/pptx/index.mjs +5 -5
  59. package/dist/xlsx/load/index.cjs +1 -1
  60. package/dist/xlsx/load/index.mjs +1 -1
  61. package/package.json +1 -1
  62. package/dist/PptxHandler-KBJ4TN3T.mjs +0 -4
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkXK55DEUD_cjs = require('./chunk-XK55DEUD.cjs');
4
- require('./chunk-4LZIUJI3.cjs');
3
+ var chunk5SE4FGS4_cjs = require('./chunk-5SE4FGS4.cjs');
4
+ require('./chunk-QCZX6K67.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 chunkXK55DEUD_cjs.PptxHandler; }
12
+ get: function () { return chunk5SE4FGS4_cjs.PptxHandler; }
13
13
  });
@@ -0,0 +1,4 @@
1
+ export { PptxHandler } from './chunk-K2XWOVLV.mjs';
2
+ import './chunk-O6ISWI34.mjs';
3
+ import './chunk-GXHKNSZX.mjs';
4
+ import './chunk-CA7KCNL3.mjs';
@@ -1,5 +1,5 @@
1
- export { PptxHandler } from './chunk-ON7XVRHQ.mjs';
2
- import './chunk-7N7C5BNM.mjs';
1
+ export { PptxHandler } from './chunk-RF2YPEKI.mjs';
2
+ import './chunk-2AFO3HNI.mjs';
3
3
  import './chunk-GBKBR4CX.mjs';
4
4
  import './chunk-3GXV5MPC.mjs';
5
5
  import './chunk-54S5A5PZ.mjs';
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkXK55DEUD_cjs = require('./chunk-XK55DEUD.cjs');
4
- require('./chunk-4LZIUJI3.cjs');
3
+ var chunk5SE4FGS4_cjs = require('./chunk-5SE4FGS4.cjs');
4
+ require('./chunk-QCZX6K67.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 chunkXK55DEUD_cjs.PresentationBuilder; }
12
+ get: function () { return chunk5SE4FGS4_cjs.PresentationBuilder; }
13
13
  });
14
14
  Object.defineProperty(exports, "STANDARD_LAYOUTS", {
15
15
  enumerable: true,
16
- get: function () { return chunkXK55DEUD_cjs.STANDARD_LAYOUTS; }
16
+ get: function () { return chunk5SE4FGS4_cjs.STANDARD_LAYOUTS; }
17
17
  });
18
18
  Object.defineProperty(exports, "buildBlankPresentationArchive", {
19
19
  enumerable: true,
20
- get: function () { return chunkXK55DEUD_cjs.buildBlankPresentationArchive; }
20
+ get: function () { return chunk5SE4FGS4_cjs.buildBlankPresentationArchive; }
21
21
  });
@@ -1,5 +1,5 @@
1
- export { PresentationBuilder, STANDARD_LAYOUTS, buildBlankPresentationArchive } from './chunk-ON7XVRHQ.mjs';
2
- import './chunk-7N7C5BNM.mjs';
1
+ export { PresentationBuilder, STANDARD_LAYOUTS, buildBlankPresentationArchive } from './chunk-RF2YPEKI.mjs';
2
+ import './chunk-2AFO3HNI.mjs';
3
3
  import './chunk-GBKBR4CX.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-GVP262WE.mjs';
2
- import './chunk-6IIMI5RS.mjs';
1
+ export { PresentationBuilder, STANDARD_LAYOUTS, buildBlankPresentationArchive } from './chunk-K2XWOVLV.mjs';
2
+ import './chunk-O6ISWI34.mjs';
3
3
  import './chunk-GXHKNSZX.mjs';
4
4
  import './chunk-CA7KCNL3.mjs';
@@ -3772,7 +3772,24 @@ function controlIds(doc) {
3772
3772
  }
3773
3773
  var unusedControlId = (doc) => freshControlId(controlIds(doc));
3774
3774
  var holdsRowsOrCells = (node4) => node4?.nodeType === 1 && ["tr", "tc", "sdt", "customXml"].some((name3) => named2(node4, name3));
3775
+ function markersIntoContent(sdt) {
3776
+ const content2 = sdtContent(sdt);
3777
+ if (!content2) return;
3778
+ const anchor2 = content2.firstChild;
3779
+ let after = false;
3780
+ for (const child7 of Array.from(sdt.childNodes)) {
3781
+ if (child7 === content2) {
3782
+ after = true;
3783
+ continue;
3784
+ }
3785
+ const element3 = child7;
3786
+ if (child7.nodeType !== 1 || named2(element3, "sdtPr") || named2(element3, "sdtEndPr")) continue;
3787
+ if (after) content2.appendChild(child7);
3788
+ else content2.insertBefore(child7, anchor2);
3789
+ }
3790
+ }
3775
3791
  function takeOut(doc, element3, sdt) {
3792
+ markersIntoContent(sdt);
3776
3793
  const content2 = element3.parentNode;
3777
3794
  const parent = sdt.parentNode;
3778
3795
  const siblings = (from, step2) => {
@@ -3827,7 +3844,9 @@ function placeTableControl(doc, element3, next, base3) {
3827
3844
  }
3828
3845
  const shared = isSdt(before) && sdtContent(before);
3829
3846
  const { id: id4 } = next;
3830
- if (shared && typeof id4 === "string" && (createdFor.get(before) ?? idOf(before)) === id4) {
3847
+ const joins = shared && typeof id4 === "string" && (createdFor.get(before) ?? idOf(before)) === id4;
3848
+ if (joins) {
3849
+ markersIntoContent(before);
3831
3850
  for (const node4 of [...between, element3]) shared.appendChild(node4);
3832
3851
  return;
3833
3852
  }
@@ -3844,6 +3863,10 @@ function unwrapDroppedControls(elements2, next) {
3844
3863
  if (sdt) kept.set(sdt, Boolean(kept.get(sdt)) || next[index4] !== void 0);
3845
3864
  });
3846
3865
  for (const [sdt, keep2] of kept) if (!keep2) unwrapContentControl(sdt);
3866
+ elements2.forEach((element3, index4) => {
3867
+ const sdt = next[index4] === void 0 ? enclosingSdt(element3) : void 0;
3868
+ if (sdt) takeOut(element3.ownerDocument, element3, sdt);
3869
+ });
3847
3870
  }
3848
3871
 
3849
3872
  // docx/write-table.ts
@@ -3766,7 +3766,24 @@ function controlIds(doc) {
3766
3766
  }
3767
3767
  var unusedControlId = (doc) => freshControlId(controlIds(doc));
3768
3768
  var holdsRowsOrCells = (node4) => node4?.nodeType === 1 && ["tr", "tc", "sdt", "customXml"].some((name3) => named2(node4, name3));
3769
+ function markersIntoContent(sdt) {
3770
+ const content2 = sdtContent(sdt);
3771
+ if (!content2) return;
3772
+ const anchor2 = content2.firstChild;
3773
+ let after = false;
3774
+ for (const child7 of Array.from(sdt.childNodes)) {
3775
+ if (child7 === content2) {
3776
+ after = true;
3777
+ continue;
3778
+ }
3779
+ const element3 = child7;
3780
+ if (child7.nodeType !== 1 || named2(element3, "sdtPr") || named2(element3, "sdtEndPr")) continue;
3781
+ if (after) content2.appendChild(child7);
3782
+ else content2.insertBefore(child7, anchor2);
3783
+ }
3784
+ }
3769
3785
  function takeOut(doc, element3, sdt) {
3786
+ markersIntoContent(sdt);
3770
3787
  const content2 = element3.parentNode;
3771
3788
  const parent = sdt.parentNode;
3772
3789
  const siblings = (from, step2) => {
@@ -3821,7 +3838,9 @@ function placeTableControl(doc, element3, next, base3) {
3821
3838
  }
3822
3839
  const shared = isSdt(before) && sdtContent(before);
3823
3840
  const { id: id4 } = next;
3824
- if (shared && typeof id4 === "string" && (createdFor.get(before) ?? idOf(before)) === id4) {
3841
+ const joins = shared && typeof id4 === "string" && (createdFor.get(before) ?? idOf(before)) === id4;
3842
+ if (joins) {
3843
+ markersIntoContent(before);
3825
3844
  for (const node4 of [...between, element3]) shared.appendChild(node4);
3826
3845
  return;
3827
3846
  }
@@ -3838,6 +3857,10 @@ function unwrapDroppedControls(elements2, next) {
3838
3857
  if (sdt) kept.set(sdt, Boolean(kept.get(sdt)) || next[index4] !== void 0);
3839
3858
  });
3840
3859
  for (const [sdt, keep2] of kept) if (!keep2) unwrapContentControl(sdt);
3860
+ elements2.forEach((element3, index4) => {
3861
+ const sdt = next[index4] === void 0 ? enclosingSdt(element3) : void 0;
3862
+ if (sdt) takeOut(element3.ownerDocument, element3, sdt);
3863
+ });
3841
3864
  }
3842
3865
 
3843
3866
  // docx/write-table.ts
@@ -21818,7 +21818,7 @@ function findTextBearingElementById(elements3, elementId) {
21818
21818
  }
21819
21819
  async function loadNestedDeck(pptxBytes) {
21820
21820
  try {
21821
- const { PptxHandler } = await import('./PptxHandler-5TWAQWPK.mjs');
21821
+ const { PptxHandler } = await import('./PptxHandler-WQPEYOSS.mjs');
21822
21822
  const handler = new PptxHandler();
21823
21823
  const data = await handler.load(pptxBytes.buffer.slice(0));
21824
21824
  return { handler, slides: data.slides };
@@ -40443,7 +40443,7 @@ function toArrayBuffer(bytes) {
40443
40443
  if (bytes.byteOffset === 0 && bytes.byteLength === bytes.buffer.byteLength) {
40444
40444
  return bytes.buffer;
40445
40445
  }
40446
- return bytes.slice().buffer;
40446
+ return new Uint8Array(bytes).buffer;
40447
40447
  }
40448
40448
  function isCompoundFile(input) {
40449
40449
  const bytes = toBytes(input);
@@ -1,4 +1,4 @@
1
- import { hasTextProperties } from './chunk-7N7C5BNM.mjs';
1
+ import { hasTextProperties } from './chunk-2AFO3HNI.mjs';
2
2
  import { cloneSlide } from './chunk-54S5A5PZ.mjs';
3
3
 
4
4
  // pptx/core/builders/sdk/merge-operations.ts