ooxml-core 1.41.0 → 1.42.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 (126) hide show
  1. package/README.md +4 -0
  2. package/dist/PptxHandler-73QIJ6SD.cjs +14 -0
  3. package/dist/{PptxHandler-3AGIITR7.mjs → PptxHandler-A2J4PCOB.mjs} +2 -2
  4. package/dist/PptxHandler-OGLVLX2T.mjs +5 -0
  5. package/dist/{PresentationBuilder-MZBKYOYD.cjs → PresentationBuilder-6S5PJXXF.cjs} +6 -6
  6. package/dist/{PresentationBuilder-JNID4B4Z.mjs → PresentationBuilder-APJKCMVS.mjs} +2 -2
  7. package/dist/{PresentationBuilder-5DPKFUXP.mjs → PresentationBuilder-F3BWDERK.mjs} +3 -3
  8. package/dist/automation/index.cjs +75 -89
  9. package/dist/automation/index.mjs +75 -89
  10. package/dist/chart/index.cjs +5 -5
  11. package/dist/chart/index.mjs +5 -5
  12. package/dist/{chunk-LRBWCRQ3.cjs → chunk-3J6VIKLP.cjs} +3 -3
  13. package/dist/chunk-CODMW5KF.cjs +110 -0
  14. package/dist/{chunk-KKVD3R6O.mjs → chunk-CPSTCCRD.mjs} +4 -4
  15. package/dist/{chunk-P3WAKBVS.mjs → chunk-IPV3J3I5.mjs} +82 -90
  16. package/dist/{chunk-6LGRRQ3K.mjs → chunk-MXA67O7R.mjs} +1 -1
  17. package/dist/{chunk-JXR6YWBW.mjs → chunk-N6X5CJZP.mjs} +125 -126
  18. package/dist/chunk-O3YGBYGZ.mjs +104 -0
  19. package/dist/{chunk-75KBNUKS.cjs → chunk-QZPOPUI5.cjs} +82 -89
  20. package/dist/{chunk-UE23HF2N.mjs → chunk-VKFKEVHK.mjs} +1 -1
  21. package/dist/{chunk-DD7COXWR.mjs → chunk-VV724DWE.mjs} +19 -7
  22. package/dist/{chunk-HTELXT2N.mjs → chunk-XVB3CBNM.mjs} +19 -6
  23. package/dist/{chunk-3BIFRTU4.cjs → chunk-YNQRXFTC.cjs} +1283 -1270
  24. package/dist/{chunk-ZYCBJKAE.mjs → chunk-ZUEN4RQG.mjs} +1 -1
  25. package/dist/diagram/index.cjs +499 -370
  26. package/dist/diagram/index.d.ts +1 -0
  27. package/dist/diagram/index.d.ts.map +1 -1
  28. package/dist/diagram/index.mjs +495 -371
  29. package/dist/docx/embedded.cjs +67 -89
  30. package/dist/docx/embedded.mjs +67 -89
  31. package/dist/docx/index.cjs +118 -106
  32. package/dist/docx/index.mjs +118 -106
  33. package/dist/docx/layout/index.cjs +118 -106
  34. package/dist/docx/layout/index.mjs +118 -106
  35. package/dist/docx/load/index.cjs +67 -89
  36. package/dist/docx/load/index.mjs +67 -89
  37. package/dist/docx/shape-svg.d.ts.map +1 -1
  38. package/dist/docx/ui/index.cjs +72 -94
  39. package/dist/docx/ui/index.mjs +72 -94
  40. package/dist/drawingml/dash-pattern.d.ts +61 -0
  41. package/dist/drawingml/dash-pattern.d.ts.map +1 -0
  42. package/dist/drawingml/index.cjs +249 -43
  43. package/dist/drawingml/index.d.ts +3 -0
  44. package/dist/drawingml/index.d.ts.map +1 -1
  45. package/dist/drawingml/index.mjs +241 -44
  46. package/dist/drawingml/rect-path-gradient.d.ts +5 -0
  47. package/dist/drawingml/rect-path-gradient.d.ts.map +1 -1
  48. package/dist/drawingml/shape-path-gradient.d.ts +57 -0
  49. package/dist/drawingml/shape-path-gradient.d.ts.map +1 -0
  50. package/dist/geometry/index.cjs +68 -90
  51. package/dist/geometry/index.mjs +68 -90
  52. package/dist/geometry/preset-shape-definitions-exact-action-buttons.d.ts +2 -2
  53. package/dist/geometry/preset-shape-definitions-exact-action-buttons.d.ts.map +1 -1
  54. package/dist/geometry/preset-shape-definitions-exact-arrows.d.ts.map +1 -1
  55. package/dist/geometry/preset-shape-definitions-exact-scrolls.d.ts.map +1 -1
  56. package/dist/index.cjs +686 -489
  57. package/dist/index.mjs +686 -489
  58. package/dist/pptx/automation/index.cjs +355 -191
  59. package/dist/pptx/automation/index.d.ts +11 -17
  60. package/dist/pptx/automation/index.d.ts.map +1 -1
  61. package/dist/pptx/automation/index.mjs +156 -71
  62. package/dist/pptx/chunks/{elements-6BMEOo7i.d.ts → elements-PBugbKtv.d.ts} +3 -873
  63. package/dist/pptx/chunks/elements-PBugbKtv.d.ts.map +1 -0
  64. package/dist/pptx/chunks/{index-BbXLv6As.d.ts → index-BJuR8GLL.d.ts} +4 -4
  65. package/dist/pptx/chunks/{index-BbXLv6As.d.ts.map → index-BJuR8GLL.d.ts.map} +1 -1
  66. package/dist/pptx/chunks/{index-DvN0TkJJ.d.ts → index-Rbvl2WaM.d.ts} +14 -10
  67. package/dist/pptx/chunks/index-Rbvl2WaM.d.ts.map +1 -0
  68. package/dist/pptx/chunks/{index-Dija_Wth.d.ts → index-xoJGYTgQ.d.ts} +5 -3
  69. package/dist/pptx/chunks/index-xoJGYTgQ.d.ts.map +1 -0
  70. package/dist/pptx/chunks/table-C7ITXL3Y.d.ts +875 -0
  71. package/dist/pptx/chunks/table-C7ITXL3Y.d.ts.map +1 -0
  72. package/dist/pptx/chunks/{text-operations-DorONr3h.d.ts → text-operations-BNJr7aGa.d.ts} +3 -2
  73. package/dist/pptx/chunks/text-operations-BNJr7aGa.d.ts.map +1 -0
  74. package/dist/pptx/cli/index.cjs +169 -96
  75. package/dist/pptx/cli/index.d.ts +1 -1
  76. package/dist/pptx/cli/index.mjs +4 -4
  77. package/dist/pptx/converter/index.cjs +69 -91
  78. package/dist/pptx/converter/index.d.ts +1 -1
  79. package/dist/pptx/converter/index.mjs +2 -2
  80. package/dist/pptx/editor/render/custom-show-operations.cjs +2 -2
  81. package/dist/pptx/editor/render/custom-show-operations.mjs +1 -1
  82. package/dist/pptx/editor/render/find-replace.cjs +15 -15
  83. package/dist/pptx/editor/render/find-replace.d.ts +2 -2
  84. package/dist/pptx/editor/render/find-replace.mjs +2 -2
  85. package/dist/pptx/editor/render/slide-operations.cjs +9 -9
  86. package/dist/pptx/editor/render/slide-operations.mjs +3 -3
  87. package/dist/pptx/editor/render/table-data-grid-ops.cjs +5 -5
  88. package/dist/pptx/editor/render/table-data-grid-ops.mjs +1 -1
  89. package/dist/pptx/editor/render/table-layout.cjs +6 -6
  90. package/dist/pptx/editor/render/table-layout.d.ts +8 -37
  91. package/dist/pptx/editor/render/table-layout.d.ts.map +1 -1
  92. package/dist/pptx/editor/render/table-layout.mjs +1 -1
  93. package/dist/pptx/editor/render/text-runs-style-patch.d.ts +1 -1
  94. package/dist/pptx/editor/render/text-style-scope.d.ts +1 -1
  95. package/dist/pptx/index.cjs +214 -129
  96. package/dist/pptx/index.d.ts +6 -5
  97. package/dist/pptx/index.mjs +5 -5
  98. package/dist/pptx/node/index.d.ts +1 -1
  99. package/dist/teams/index.cjs +136 -91
  100. package/dist/teams/index.mjs +136 -91
  101. package/dist/text/font-metrics/design-advances.generated.d.ts +3 -1
  102. package/dist/text/font-metrics/design-advances.generated.d.ts.map +1 -1
  103. package/dist/text/index.cjs +8 -0
  104. package/dist/text/index.mjs +8 -0
  105. package/dist/visio/index.cjs +8 -0
  106. package/dist/visio/index.mjs +8 -0
  107. package/dist/visio/ui/index.cjs +8 -0
  108. package/dist/visio/ui/index.mjs +8 -0
  109. package/dist/xlsx/collab/index.cjs +67 -89
  110. package/dist/xlsx/collab/index.mjs +67 -89
  111. package/dist/xlsx/index.cjs +116 -108
  112. package/dist/xlsx/index.mjs +116 -108
  113. package/dist/xlsx/layout/shape-paint.d.ts.map +1 -1
  114. package/dist/xlsx/load/index.cjs +67 -89
  115. package/dist/xlsx/load/index.mjs +67 -89
  116. package/dist/xlsx/ui/index.cjs +72 -94
  117. package/dist/xlsx/ui/index.mjs +72 -94
  118. package/package.json +1 -1
  119. package/dist/PptxHandler-EL4E4SPH.mjs +0 -5
  120. package/dist/PptxHandler-OIZ3R3DJ.cjs +0 -14
  121. package/dist/chunk-3IT6ZD7K.mjs +0 -213
  122. package/dist/chunk-FRUB573B.cjs +0 -219
  123. package/dist/pptx/chunks/elements-6BMEOo7i.d.ts.map +0 -1
  124. package/dist/pptx/chunks/index-Dija_Wth.d.ts.map +0 -1
  125. package/dist/pptx/chunks/index-DvN0TkJJ.d.ts.map +0 -1
  126. package/dist/pptx/chunks/text-operations-DorONr3h.d.ts.map +0 -1
@@ -4,6 +4,11 @@ import { themeColorRefToSolidFillWithOpacity, normalizeHexColor, parseDrawingFra
4
4
  import { XMLBuilder, XMLParser } from 'fast-xml-parser';
5
5
  import { DOMParser, XMLSerializer } from '@xmldom/xmldom';
6
6
 
7
+ // units/constants.ts
8
+ var EMU_PER_PIXEL = 9525;
9
+ var EMU_PER_POINT = 12700;
10
+ var EMU_PER_INCH = 914400;
11
+
7
12
  // pptx/core/types/type-guards.ts
8
13
  function isTextElement(element) {
9
14
  return element.type === "text";
@@ -1533,11 +1538,6 @@ function customGeometryPathsToXml(paths, rawData, extras) {
1533
1538
  return result;
1534
1539
  }
1535
1540
 
1536
- // units/constants.ts
1537
- var EMU_PER_PIXEL = 9525;
1538
- var EMU_PER_POINT = 12700;
1539
- var EMU_PER_INCH = 914400;
1540
-
1541
1541
  // pptx/core/constants-colors.ts
1542
1542
  var PRESET_COLOR_MAP = {
1543
1543
  aliceblue: "#F0F8FF",
@@ -3016,84 +3016,22 @@ var triangle = (g3, dir) => g3.poly([
3016
3016
  [D * dir, 0],
3017
3017
  [-D * dir, D]
3018
3018
  ]);
3019
- var QUESTION = [
3020
- [-4.8, -33.7],
3021
- [-6.3, -31.5],
3022
- [-7.8, -31.5],
3023
- [-12.3, -28.5],
3024
- [-14.5, -28.5],
3025
- [-15.3, -27.7],
3026
- [-15.3, -25.5],
3027
- [-18.3, -21],
3028
- [-19, -17.2],
3029
- [-20.5, -16.5],
3030
- [-20.5, -12.7],
3031
- [-19, -12.7],
3032
- [-18.3, -14.2],
3033
- [-10.8, -14.2],
3034
- [-10, -13.5],
3035
- [-8.5, -13.5],
3036
- [-9.3, -17.2],
3037
- [-7.8, -19.5],
3038
- [-4, -22.5],
3039
- [-3.3, -21.7],
3040
- [-1.8, -21.7],
3041
- [-1, -23.2],
3042
- [0.5, -23.2],
3043
- [1.2, -21.7],
3044
- [2.7, -21.7],
3045
- [3.5, -22.5],
3046
- [8, -18.7],
3047
- [8.7, -17.2],
3048
- [8, -16.5],
3049
- [8, -15],
3050
- [9.5, -14.2],
3051
- [9.5, -13.5],
3052
- [8, -12.7],
3053
- [8.7, -9.7],
3054
- [5, -6],
3055
- [2, -6],
3056
- [-2.5, -2.2],
3057
- [-3.3, 0.8],
3058
- [-5.5, 2.3],
3059
- [-4.8, 6.8],
3060
- [-6.3, 7.5],
3061
- [-6.3, 18],
3062
- [-4.8, 18],
3063
- [-4, 17.3],
3064
- [4.2, 17.3],
3065
- [4.2, 6.8],
3066
- [6.5, 5.3],
3067
- [6.5, 3.8],
3068
- [8, 3],
3069
- [8, 1.5],
3070
- [8.7, 0.8],
3071
- [13.2, 0],
3072
- [17, -4.5],
3073
- [18.5, -4.5],
3074
- [18.5, -6],
3075
- [17.7, -6.7],
3076
- [18.5, -8.2],
3077
- [18.5, -15],
3078
- [20, -15.7],
3079
- [20, -18],
3080
- [17.7, -19.5],
3081
- [17.7, -21],
3082
- [15.5, -24.7],
3083
- [15.5, -27],
3084
- [14, -27],
3085
- [13.2, -27.7],
3086
- [13.2, -29.2],
3087
- [9.5, -30],
3088
- [8.7, -30.7],
3089
- [8.7, -32.2],
3090
- [5.7, -31.5],
3091
- [4.2, -33.7],
3092
- [2.7, -33.7],
3093
- [2, -32.2],
3094
- [-2.5, -32.2],
3095
- [-3.3, -33.7]
3096
- ];
3019
+ var U = 90;
3020
+ var question = (g3) => {
3021
+ const x = (v) => g3.x(v * U);
3022
+ const y = (v) => g3.y(v * U);
3023
+ const r = (v) => g3.len(v * U);
3024
+ return [
3025
+ `M ${x(-0.214)} ${y(-0.162)} A ${r(0.214)} ${r(0.2125)} 10800000 10800000`,
3026
+ `A ${r(0.108)} ${r(0.162)} 0 5400000`,
3027
+ `A ${r(0.053)} ${r(0.085)} 16200000 -5400000`,
3028
+ `L ${x(0.053)} ${y(0.187)} L ${x(-0.053)} ${y(0.187)} L ${x(-0.053)} ${y(0.08)}`,
3029
+ `A ${r(0.108)} ${r(0.16)} 10800000 5400000`,
3030
+ `A ${r(0.052)} ${r(0.082)} 5400000 -5400000`,
3031
+ `A ${r(0.107)} ${r(0.1065)} 0 -10800000`,
3032
+ `L ${x(-0.214)} ${y(-0.162)} Z`
3033
+ ].join(" ");
3034
+ };
3097
3035
  var MOVIE = [
3098
3036
  [-33.75, -16.5],
3099
3037
  [-33.75, -3],
@@ -3200,8 +3138,8 @@ var buttons = {
3200
3138
  )
3201
3139
  ]),
3202
3140
  actionButtonHelp: build("actionButtonHelp", (g3) => [
3203
- darken(g3.poly(QUESTION)),
3204
- darken(g3.circle(-0.2, 27.4, 7))
3141
+ darken(question(g3)),
3142
+ darken(g3.circle(0, 0.295 * U, 0.08 * U))
3205
3143
  ]),
3206
3144
  actionButtonInformation: build("actionButtonInformation", (g3) => [
3207
3145
  darken(g3.circle(0, 0.4, 34)),
@@ -6524,12 +6462,46 @@ var leftRightUpArrow2 = exactDef(
6524
6462
  )
6525
6463
  ]
6526
6464
  );
6465
+ var swooshArrow3 = exactDef(
6466
+ "swooshArrow",
6467
+ { adj1: 25e3, adj2: 16667 },
6468
+ [
6469
+ "a1 pin 1 adj1 75000",
6470
+ "maxAdj2 */ 70000 w ss",
6471
+ "a2 pin 0 adj2 maxAdj2",
6472
+ "ad1 */ h a1 100000",
6473
+ "ad2 */ ss a2 100000",
6474
+ "xB +- r 0 ad2",
6475
+ "yB +- t ssd8 0",
6476
+ "alfa */ cd4 1 14",
6477
+ "dx0 tan ssd8 alfa",
6478
+ "xC +- xB 0 dx0",
6479
+ "dx1 tan ad1 alfa",
6480
+ "yF +- yB ad1 0",
6481
+ "xF +- xB dx1 0",
6482
+ "xE +- xF dx0 0",
6483
+ "yE +- yF ssd8 0",
6484
+ "dy2 +- yE 0 t",
6485
+ "dy22 */ dy2 1 2",
6486
+ "dy3 */ h 1 20",
6487
+ "yD +- dy22 0 dy3",
6488
+ "dy4 */ hd6 1 1",
6489
+ "yP1 +- hd6 dy4 0",
6490
+ "xP1 val wd6",
6491
+ "dy5 */ hd6 1 2",
6492
+ "yP2 +- yF dy5 0",
6493
+ "xP2 val wd4"
6494
+ ],
6495
+ "l t r b",
6496
+ [p("M l b Q xP1 yP1 xB yB L xC t L r yD L xE yE L xF yF Q xP2 yP2 l b Z")]
6497
+ );
6527
6498
  var EXACT_ARROW_PRESET_DEFINITIONS = {
6528
6499
  leftRightArrow: leftRightArrow2,
6529
6500
  upDownArrow: upDownArrow2,
6530
6501
  quadArrow: quadArrow2,
6531
6502
  leftUpArrow: leftUpArrow2,
6532
- leftRightUpArrow: leftRightUpArrow2
6503
+ leftRightUpArrow: leftRightUpArrow2,
6504
+ swooshArrow: swooshArrow3
6533
6505
  };
6534
6506
 
6535
6507
  // geometry/preset-shape-definitions-exact-circular.ts
@@ -7335,10 +7307,13 @@ var verticalScroll = exactDef(
7335
7307
  p(
7336
7308
  "M ch ch2 A ch2 ch2 10800000 5400000 L x6 t A ch2 ch2 16200000 10800000 L x4 ch L x4 y4 A ch2 ch2 0 5400000 L ch2 b A ch2 ch2 5400000 10800000 L ch y3 Z"
7337
7309
  ),
7338
- p("M l y4 A ch2 ch2 10800000 21600000 Z M xsw cy3 A ch4 ch4 0 21600000 Z", {
7339
- fill: "darkenLess",
7340
- stroke: false
7341
- }),
7310
+ p(
7311
+ "M ch y4 A ch2 ch2 0 5400000 A ch2 ch2 5400000 10800000 A ch4 ch4 16200000 10800000 Z M x3b ch2 A ch2 ch2 0 5400000 A ch4 ch4 5400000 10800000 Z",
7312
+ {
7313
+ fill: "darkenLess",
7314
+ stroke: false
7315
+ }
7316
+ ),
7342
7317
  p(
7343
7318
  "M x3 t A ch2 ch2 16200000 10800000 L x4 ch M ch2 y4 L ch y4 M x3b ch2 L x3 ch2 A ch4 ch4 16200000 -10800000",
7344
7319
  { fill: "none" }
@@ -7354,10 +7329,13 @@ var horizontalScroll = exactDef(
7354
7329
  p(
7355
7330
  "M ch2 ch A ch2 ch2 16200000 -5400000 L l x6 A ch2 ch2 10800000 -10800000 L ch x4 L y4 x4 A ch2 ch2 5400000 -5400000 L r ch2 A ch2 ch2 0 -10800000 L y3 ch Z"
7356
7331
  ),
7357
- p("M y4 t A ch2 ch2 16200000 21600000 Z M ch cyw A ch4 ch4 0 21600000 Z", {
7358
- fill: "darkenLess",
7359
- stroke: false
7360
- }),
7332
+ p(
7333
+ "M y4 ch A ch2 ch2 5400000 -5400000 A ch2 ch2 0 -10800000 A ch4 ch4 10800000 -10800000 Z M ch2 x3b A ch2 ch2 5400000 -5400000 A ch4 ch4 0 -10800000 Z",
7334
+ {
7335
+ fill: "darkenLess",
7336
+ stroke: false
7337
+ }
7338
+ ),
7361
7339
  p(
7362
7340
  "M l x3 A ch2 ch2 10800000 -10800000 L ch x4 M y4 ch2 L y4 ch M ch2 x3b L ch2 x3 A ch4 ch4 10800000 10800000",
7363
7341
  { fill: "none" }
@@ -15320,7 +15298,7 @@ var MISC_ARROW_CONNECTION_SITES = {
15320
15298
  gd16("dy2", "+- yE 0 t"),
15321
15299
  gd16("dy22", "*/ dy2 1 2"),
15322
15300
  gd16("dy3", "*/ h 1 20"),
15323
- gd16("yD", "+- t dy22 dy3")
15301
+ gd16("yD", "+- dy22 0 dy3")
15324
15302
  ],
15325
15303
  sites: [
15326
15304
  cxn("cd4", "l", "b"),
@@ -18432,6 +18410,54 @@ function setDashChoice(lineNode, name, value) {
18432
18410
  }
18433
18411
  }
18434
18412
 
18413
+ // drawingml/dash-pattern.ts
18414
+ var PRESET_PATTERNS = {
18415
+ dash: [4, 3],
18416
+ dot: [1, 3],
18417
+ lgDash: [8, 3],
18418
+ dashDot: [4, 3, 1, 3],
18419
+ lgDashDot: [8, 3, 1, 3],
18420
+ lgDashDotDot: [8, 3, 1, 3, 1, 3],
18421
+ sysDash: [3, 1],
18422
+ sysDot: [1, 1],
18423
+ sysDashDot: [3, 1, 1, 1],
18424
+ sysDashDotDot: [3, 1, 1, 1, 1, 1]
18425
+ };
18426
+ var CUSTOM_DASH_UNIT = 1e5;
18427
+ var FALLBACK_CUSTOM_PATTERN = [3, 2];
18428
+ function dashPenWidth(strokeWidth) {
18429
+ if (!Number.isFinite(strokeWidth) || strokeWidth <= 1) return 1;
18430
+ return Math.max(1, Math.ceil(strokeWidth - 0.5));
18431
+ }
18432
+ function dashPatternUnits(dashType, customSegments) {
18433
+ if (!dashType || dashType === "solid") return void 0;
18434
+ if (dashType === "custom") {
18435
+ const pattern = (customSegments ?? []).flatMap((seg) => [
18436
+ Math.max(0, seg.dash) / CUSTOM_DASH_UNIT,
18437
+ Math.max(0, seg.space) / CUSTOM_DASH_UNIT
18438
+ ]);
18439
+ return pattern.some((n) => n > 0) ? pattern : FALLBACK_CUSTOM_PATTERN;
18440
+ }
18441
+ return PRESET_PATTERNS[dashType];
18442
+ }
18443
+ function capCompensatedDashArray(pattern, strokeWidth, lineCap) {
18444
+ const pen = dashPenWidth(strokeWidth);
18445
+ const round2 = lineCap === "rnd";
18446
+ const out = [];
18447
+ for (let i2 = 0; i2 < pattern.length; i2 += 1) {
18448
+ const len = (pattern[i2] ?? 0) * pen;
18449
+ if (!round2) {
18450
+ out.push(len);
18451
+ } else if (i2 % 2 === 0) {
18452
+ out.push(Math.max(0, len - pen));
18453
+ } else {
18454
+ const dash = (pattern[i2 - 1] ?? 0) * pen;
18455
+ out.push(len + (dash - Math.max(0, dash - pen)));
18456
+ }
18457
+ }
18458
+ return out.map((n) => Number(n.toFixed(4))).join(" ");
18459
+ }
18460
+
18435
18461
  // pptx/core/utils/stroke-utils.ts
18436
18462
  function normalizeStrokeDashType(value) {
18437
18463
  const normalized = String(value || "").trim().toLowerCase();
@@ -18463,36 +18489,9 @@ function getCssBorderDashStyle(dashType) {
18463
18489
  }
18464
18490
  return "dashed";
18465
18491
  }
18466
- function getSvgStrokeDasharray(dashType, strokeWidth, customDashSegments) {
18467
- if (!dashType || dashType === "solid") {
18468
- return void 0;
18469
- }
18470
- const stroke = Math.max(strokeWidth, 1);
18471
- if (dashType === "custom" && customDashSegments && customDashSegments.length > 0) {
18472
- return customDashSegments.flatMap((seg) => [seg.dash / 1e3 * stroke, seg.space / 1e3 * stroke]).join(" ");
18473
- }
18474
- switch (dashType) {
18475
- case "dot":
18476
- case "sysDot":
18477
- return `${stroke} ${stroke * 2}`;
18478
- case "dash":
18479
- case "sysDash":
18480
- return `${stroke * 4} ${stroke * 2}`;
18481
- case "lgDash":
18482
- return `${stroke * 7} ${stroke * 2.5}`;
18483
- case "dashDot":
18484
- case "sysDashDot":
18485
- return `${stroke * 4} ${stroke * 2} ${stroke} ${stroke * 2}`;
18486
- case "lgDashDot":
18487
- return `${stroke * 7} ${stroke * 2.5} ${stroke} ${stroke * 2.5}`;
18488
- case "lgDashDotDot":
18489
- case "sysDashDotDot":
18490
- return `${stroke * 7} ${stroke * 2.5} ${stroke} ${stroke * 2} ${stroke} ${stroke * 2}`;
18491
- case "custom":
18492
- return `${stroke * 3} ${stroke * 2}`;
18493
- default:
18494
- return void 0;
18495
- }
18492
+ function getSvgStrokeDasharray(dashType, strokeWidth, customDashSegments, lineCap) {
18493
+ const pattern = dashPatternUnits(dashType, customDashSegments);
18494
+ return pattern ? capCompensatedDashArray(pattern, strokeWidth, lineCap) : void 0;
18496
18495
  }
18497
18496
 
18498
18497
  // pptx/core/utils/element-xml-builders.ts
@@ -24589,7 +24588,7 @@ function findTextBearingElementById(elements3, elementId) {
24589
24588
  }
24590
24589
  async function loadNestedDeck(pptxBytes) {
24591
24590
  try {
24592
- const { PptxHandler } = await import('./PptxHandler-3AGIITR7.mjs');
24591
+ const { PptxHandler } = await import('./PptxHandler-A2J4PCOB.mjs');
24593
24592
  const handler = new PptxHandler();
24594
24593
  const data = await handler.load(pptxBytes.buffer.slice(0));
24595
24594
  return { handler, slides: data.slides };
@@ -0,0 +1,104 @@
1
+ // pptx/editor/render/table-layout.ts
2
+ var DEFAULT_INSERTED_ROW_HEIGHT = 40;
3
+ function createCell(text = "") {
4
+ return { text, style: {} };
5
+ }
6
+ function copyRows(data) {
7
+ return data.rows.map((row) => ({ ...row, cells: [...row.cells] }));
8
+ }
9
+ function updateIntersectingMerges(source, rows, edit) {
10
+ const isRowEdit = edit.axis === "row";
11
+ const inserting = edit.action === "insert";
12
+ const delta = inserting ? 1 : -1;
13
+ for (const [rowIndex, row] of source.rows.entries()) {
14
+ for (const [columnIndex, anchor] of row.cells.entries()) {
15
+ if (anchor.hMerge || anchor.vMerge) continue;
16
+ const rowSpan = anchor.rowSpan ?? 1;
17
+ const gridSpan = anchor.gridSpan ?? 1;
18
+ const start = isRowEdit ? rowIndex : columnIndex;
19
+ const span = isRowEdit ? rowSpan : gridSpan;
20
+ if (edit.index < start || edit.index >= start + span || (inserting ? edit.index === start : span === 1)) {
21
+ continue;
22
+ }
23
+ if (!Number.isInteger(rowSpan) || !Number.isInteger(gridSpan) || rowSpan < 1 || gridSpan < 1 || rowIndex + rowSpan > source.rows.length || columnIndex + gridSpan > source.columnWidths.length) {
24
+ continue;
25
+ }
26
+ const height = isRowEdit ? rowSpan + delta : rowSpan;
27
+ const width = isRowEdit ? gridSpan : gridSpan + delta;
28
+ const anchorRemoved = !inserting && edit.index === start;
29
+ for (let r = rowIndex; r < rowIndex + height; r++) {
30
+ for (let c = columnIndex; c < columnIndex + width; c++) {
31
+ const cell = rows[r]?.cells[c];
32
+ if (!cell) continue;
33
+ const firstRow = r === rowIndex;
34
+ const firstColumn = c === columnIndex;
35
+ const promote = anchorRemoved && firstRow && firstColumn;
36
+ const content = promote && anchor.text ? anchor : cell;
37
+ rows[r].cells[c] = {
38
+ ...cell,
39
+ text: content.text,
40
+ textRuns: content.textRuns,
41
+ paragraphs: content.paragraphs,
42
+ style: promote ? cell.style ?? anchor.style : cell.style,
43
+ rowSpan: firstRow && height > 1 ? height : void 0,
44
+ gridSpan: firstColumn && width > 1 ? width : void 0,
45
+ hMerge: firstColumn ? void 0 : true,
46
+ vMerge: firstRow ? void 0 : true
47
+ };
48
+ }
49
+ }
50
+ }
51
+ }
52
+ }
53
+ function normalizeWidths(widths) {
54
+ const sum = widths.reduce((total, width) => total + width, 0);
55
+ return sum > 0 ? widths.map((width) => width / sum) : widths;
56
+ }
57
+ function insertTableRow(tableData, rowIdx, position, cellTexts) {
58
+ const index = Math.max(0, Math.min(tableData.rows.length, rowIdx + Number(position === "below")));
59
+ const rows = copyRows(tableData);
60
+ rows.splice(index, 0, {
61
+ height: DEFAULT_INSERTED_ROW_HEIGHT,
62
+ cells: tableData.columnWidths.map((_, column) => createCell(cellTexts?.[column]))
63
+ });
64
+ updateIntersectingMerges(tableData, rows, { axis: "row", action: "insert", index });
65
+ return { ...tableData, rows };
66
+ }
67
+ function deleteTableRow(tableData, rowIdx) {
68
+ if (tableData.rows.length <= 1 || rowIdx < 0 || rowIdx >= tableData.rows.length) {
69
+ return tableData;
70
+ }
71
+ const rows = copyRows(tableData);
72
+ rows.splice(rowIdx, 1);
73
+ updateIntersectingMerges(tableData, rows, { axis: "row", action: "delete", index: rowIdx });
74
+ return { ...tableData, rows };
75
+ }
76
+ function insertTableColumn(tableData, colIdx, position, cellTexts) {
77
+ const count = tableData.columnWidths.length;
78
+ const index = Math.max(0, Math.min(count, colIdx + Number(position === "right")));
79
+ const columnWidths = [...tableData.columnWidths];
80
+ if (count === 0) {
81
+ columnWidths.push(1);
82
+ } else {
83
+ const neighbour = Math.min(index, count - 1);
84
+ const half = columnWidths[neighbour] / 2;
85
+ columnWidths[neighbour] = half;
86
+ columnWidths.splice(index, 0, half);
87
+ }
88
+ const rows = copyRows(tableData);
89
+ rows.forEach((row, rowIndex) => row.cells.splice(index, 0, createCell(cellTexts?.[rowIndex])));
90
+ updateIntersectingMerges(tableData, rows, { axis: "column", action: "insert", index });
91
+ return { ...tableData, rows, columnWidths: normalizeWidths(columnWidths) };
92
+ }
93
+ function deleteTableColumn(tableData, colIdx) {
94
+ if (tableData.columnWidths.length <= 1 || colIdx < 0 || colIdx >= tableData.columnWidths.length) {
95
+ return tableData;
96
+ }
97
+ const rows = copyRows(tableData);
98
+ rows.forEach((row) => row.cells.splice(colIdx, 1));
99
+ updateIntersectingMerges(tableData, rows, { axis: "column", action: "delete", index: colIdx });
100
+ const columnWidths = tableData.columnWidths.filter((_, index) => index !== colIdx);
101
+ return { ...tableData, rows, columnWidths: normalizeWidths(columnWidths) };
102
+ }
103
+
104
+ export { DEFAULT_INSERTED_ROW_HEIGHT, deleteTableColumn, deleteTableRow, insertTableColumn, insertTableRow };
@@ -254,6 +254,20 @@ function xmlAttrNumber(node, name) {
254
254
  const parsed = Number(raw);
255
255
  return Number.isFinite(parsed) ? parsed : void 0;
256
256
  }
257
+ function xmlAttrBool(node, name) {
258
+ const raw = xmlAttr(node, name);
259
+ if (raw === void 0) {
260
+ return void 0;
261
+ }
262
+ const normalized = raw.trim().toLowerCase();
263
+ if (normalized === "1" || normalized === "true") {
264
+ return true;
265
+ }
266
+ if (normalized === "0" || normalized === "false") {
267
+ return false;
268
+ }
269
+ return void 0;
270
+ }
257
271
  function xmlText(node) {
258
272
  if (!isXmlObject(node)) {
259
273
  return coerceString(node);
@@ -6371,84 +6385,22 @@ var triangle = (g3, dir) => g3.poly([
6371
6385
  [D * dir, 0],
6372
6386
  [-D * dir, D]
6373
6387
  ]);
6374
- var QUESTION = [
6375
- [-4.8, -33.7],
6376
- [-6.3, -31.5],
6377
- [-7.8, -31.5],
6378
- [-12.3, -28.5],
6379
- [-14.5, -28.5],
6380
- [-15.3, -27.7],
6381
- [-15.3, -25.5],
6382
- [-18.3, -21],
6383
- [-19, -17.2],
6384
- [-20.5, -16.5],
6385
- [-20.5, -12.7],
6386
- [-19, -12.7],
6387
- [-18.3, -14.2],
6388
- [-10.8, -14.2],
6389
- [-10, -13.5],
6390
- [-8.5, -13.5],
6391
- [-9.3, -17.2],
6392
- [-7.8, -19.5],
6393
- [-4, -22.5],
6394
- [-3.3, -21.7],
6395
- [-1.8, -21.7],
6396
- [-1, -23.2],
6397
- [0.5, -23.2],
6398
- [1.2, -21.7],
6399
- [2.7, -21.7],
6400
- [3.5, -22.5],
6401
- [8, -18.7],
6402
- [8.7, -17.2],
6403
- [8, -16.5],
6404
- [8, -15],
6405
- [9.5, -14.2],
6406
- [9.5, -13.5],
6407
- [8, -12.7],
6408
- [8.7, -9.7],
6409
- [5, -6],
6410
- [2, -6],
6411
- [-2.5, -2.2],
6412
- [-3.3, 0.8],
6413
- [-5.5, 2.3],
6414
- [-4.8, 6.8],
6415
- [-6.3, 7.5],
6416
- [-6.3, 18],
6417
- [-4.8, 18],
6418
- [-4, 17.3],
6419
- [4.2, 17.3],
6420
- [4.2, 6.8],
6421
- [6.5, 5.3],
6422
- [6.5, 3.8],
6423
- [8, 3],
6424
- [8, 1.5],
6425
- [8.7, 0.8],
6426
- [13.2, 0],
6427
- [17, -4.5],
6428
- [18.5, -4.5],
6429
- [18.5, -6],
6430
- [17.7, -6.7],
6431
- [18.5, -8.2],
6432
- [18.5, -15],
6433
- [20, -15.7],
6434
- [20, -18],
6435
- [17.7, -19.5],
6436
- [17.7, -21],
6437
- [15.5, -24.7],
6438
- [15.5, -27],
6439
- [14, -27],
6440
- [13.2, -27.7],
6441
- [13.2, -29.2],
6442
- [9.5, -30],
6443
- [8.7, -30.7],
6444
- [8.7, -32.2],
6445
- [5.7, -31.5],
6446
- [4.2, -33.7],
6447
- [2.7, -33.7],
6448
- [2, -32.2],
6449
- [-2.5, -32.2],
6450
- [-3.3, -33.7]
6451
- ];
6388
+ var U = 90;
6389
+ var question = (g3) => {
6390
+ const x = (v) => g3.x(v * U);
6391
+ const y = (v) => g3.y(v * U);
6392
+ const r = (v) => g3.len(v * U);
6393
+ return [
6394
+ `M ${x(-0.214)} ${y(-0.162)} A ${r(0.214)} ${r(0.2125)} 10800000 10800000`,
6395
+ `A ${r(0.108)} ${r(0.162)} 0 5400000`,
6396
+ `A ${r(0.053)} ${r(0.085)} 16200000 -5400000`,
6397
+ `L ${x(0.053)} ${y(0.187)} L ${x(-0.053)} ${y(0.187)} L ${x(-0.053)} ${y(0.08)}`,
6398
+ `A ${r(0.108)} ${r(0.16)} 10800000 5400000`,
6399
+ `A ${r(0.052)} ${r(0.082)} 5400000 -5400000`,
6400
+ `A ${r(0.107)} ${r(0.1065)} 0 -10800000`,
6401
+ `L ${x(-0.214)} ${y(-0.162)} Z`
6402
+ ].join(" ");
6403
+ };
6452
6404
  var MOVIE = [
6453
6405
  [-33.75, -16.5],
6454
6406
  [-33.75, -3],
@@ -6555,8 +6507,8 @@ var buttons = {
6555
6507
  )
6556
6508
  ]),
6557
6509
  actionButtonHelp: build("actionButtonHelp", (g3) => [
6558
- darken(g3.poly(QUESTION)),
6559
- darken(g3.circle(-0.2, 27.4, 7))
6510
+ darken(question(g3)),
6511
+ darken(g3.circle(0, 0.295 * U, 0.08 * U))
6560
6512
  ]),
6561
6513
  actionButtonInformation: build("actionButtonInformation", (g3) => [
6562
6514
  darken(g3.circle(0, 0.4, 34)),
@@ -9879,12 +9831,46 @@ var leftRightUpArrow2 = exactDef(
9879
9831
  )
9880
9832
  ]
9881
9833
  );
9834
+ var swooshArrow3 = exactDef(
9835
+ "swooshArrow",
9836
+ { adj1: 25e3, adj2: 16667 },
9837
+ [
9838
+ "a1 pin 1 adj1 75000",
9839
+ "maxAdj2 */ 70000 w ss",
9840
+ "a2 pin 0 adj2 maxAdj2",
9841
+ "ad1 */ h a1 100000",
9842
+ "ad2 */ ss a2 100000",
9843
+ "xB +- r 0 ad2",
9844
+ "yB +- t ssd8 0",
9845
+ "alfa */ cd4 1 14",
9846
+ "dx0 tan ssd8 alfa",
9847
+ "xC +- xB 0 dx0",
9848
+ "dx1 tan ad1 alfa",
9849
+ "yF +- yB ad1 0",
9850
+ "xF +- xB dx1 0",
9851
+ "xE +- xF dx0 0",
9852
+ "yE +- yF ssd8 0",
9853
+ "dy2 +- yE 0 t",
9854
+ "dy22 */ dy2 1 2",
9855
+ "dy3 */ h 1 20",
9856
+ "yD +- dy22 0 dy3",
9857
+ "dy4 */ hd6 1 1",
9858
+ "yP1 +- hd6 dy4 0",
9859
+ "xP1 val wd6",
9860
+ "dy5 */ hd6 1 2",
9861
+ "yP2 +- yF dy5 0",
9862
+ "xP2 val wd4"
9863
+ ],
9864
+ "l t r b",
9865
+ [p("M l b Q xP1 yP1 xB yB L xC t L r yD L xE yE L xF yF Q xP2 yP2 l b Z")]
9866
+ );
9882
9867
  var EXACT_ARROW_PRESET_DEFINITIONS = {
9883
9868
  leftRightArrow: leftRightArrow2,
9884
9869
  upDownArrow: upDownArrow2,
9885
9870
  quadArrow: quadArrow2,
9886
9871
  leftUpArrow: leftUpArrow2,
9887
- leftRightUpArrow: leftRightUpArrow2
9872
+ leftRightUpArrow: leftRightUpArrow2,
9873
+ swooshArrow: swooshArrow3
9888
9874
  };
9889
9875
 
9890
9876
  // geometry/preset-shape-definitions-exact-circular.ts
@@ -10690,10 +10676,13 @@ var verticalScroll = exactDef(
10690
10676
  p(
10691
10677
  "M ch ch2 A ch2 ch2 10800000 5400000 L x6 t A ch2 ch2 16200000 10800000 L x4 ch L x4 y4 A ch2 ch2 0 5400000 L ch2 b A ch2 ch2 5400000 10800000 L ch y3 Z"
10692
10678
  ),
10693
- p("M l y4 A ch2 ch2 10800000 21600000 Z M xsw cy3 A ch4 ch4 0 21600000 Z", {
10694
- fill: "darkenLess",
10695
- stroke: false
10696
- }),
10679
+ p(
10680
+ "M ch y4 A ch2 ch2 0 5400000 A ch2 ch2 5400000 10800000 A ch4 ch4 16200000 10800000 Z M x3b ch2 A ch2 ch2 0 5400000 A ch4 ch4 5400000 10800000 Z",
10681
+ {
10682
+ fill: "darkenLess",
10683
+ stroke: false
10684
+ }
10685
+ ),
10697
10686
  p(
10698
10687
  "M x3 t A ch2 ch2 16200000 10800000 L x4 ch M ch2 y4 L ch y4 M x3b ch2 L x3 ch2 A ch4 ch4 16200000 -10800000",
10699
10688
  { fill: "none" }
@@ -10709,10 +10698,13 @@ var horizontalScroll = exactDef(
10709
10698
  p(
10710
10699
  "M ch2 ch A ch2 ch2 16200000 -5400000 L l x6 A ch2 ch2 10800000 -10800000 L ch x4 L y4 x4 A ch2 ch2 5400000 -5400000 L r ch2 A ch2 ch2 0 -10800000 L y3 ch Z"
10711
10700
  ),
10712
- p("M y4 t A ch2 ch2 16200000 21600000 Z M ch cyw A ch4 ch4 0 21600000 Z", {
10713
- fill: "darkenLess",
10714
- stroke: false
10715
- }),
10701
+ p(
10702
+ "M y4 ch A ch2 ch2 5400000 -5400000 A ch2 ch2 0 -10800000 A ch4 ch4 10800000 -10800000 Z M ch2 x3b A ch2 ch2 5400000 -5400000 A ch4 ch4 0 -10800000 Z",
10703
+ {
10704
+ fill: "darkenLess",
10705
+ stroke: false
10706
+ }
10707
+ ),
10716
10708
  p(
10717
10709
  "M l x3 A ch2 ch2 10800000 -10800000 L ch x4 M y4 ch2 L y4 ch M ch2 x3b L ch2 x3 A ch4 ch4 10800000 10800000",
10718
10710
  { fill: "none" }
@@ -52059,6 +52051,7 @@ exports.writeChartShapeProps = writeChartShapeProps;
52059
52051
  exports.writeGeneratedDiagramDrawing = writeGeneratedDiagramDrawing;
52060
52052
  exports.writeShapeEffects = writeShapeEffects;
52061
52053
  exports.xmlAttr = xmlAttr;
52054
+ exports.xmlAttrBool = xmlAttrBool;
52062
52055
  exports.xmlAttrNumber = xmlAttrNumber;
52063
52056
  exports.xmlChild = xmlChild;
52064
52057
  exports.xmlChildren = xmlChildren;
@@ -1,4 +1,4 @@
1
- import { xmlText } from './chunk-P3WAKBVS.mjs';
1
+ import { xmlText } from './chunk-IPV3J3I5.mjs';
2
2
  import { EMU_PER_PX } from './chunk-CA7KCNL3.mjs';
3
3
 
4
4
  // pptx/core/core/runtime/table-structural-helpers.ts