ooxml-core 1.31.0 → 1.32.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 (123) hide show
  1. package/dist/{PptxHandler-KKLAYUGQ.mjs → PptxHandler-QY5VL3CY.mjs} +2 -2
  2. package/dist/PptxHandler-SJ5ZUIUX.mjs +4 -0
  3. package/dist/{PptxHandler-DHQPVTUI.cjs → PptxHandler-TESZUH66.cjs} +3 -3
  4. package/dist/{PresentationBuilder-YYZYCKTZ.mjs → PresentationBuilder-3CH5TR4W.mjs} +2 -2
  5. package/dist/{PresentationBuilder-JORMF5CP.cjs → PresentationBuilder-5NFBUP7Y.cjs} +5 -5
  6. package/dist/{PresentationBuilder-Q2Z33LLM.mjs → PresentationBuilder-S6HXHKEJ.mjs} +2 -2
  7. package/dist/automation/index.cjs +862 -389
  8. package/dist/automation/index.mjs +862 -389
  9. package/dist/{chunk-GJDFCP2T.mjs → chunk-3H5UAJB3.mjs} +258 -155
  10. package/dist/{chunk-MKDONWNO.mjs → chunk-4R65YYAD.mjs} +32 -14
  11. package/dist/{chunk-KWJYMAEF.mjs → chunk-IOTGRLJH.mjs} +255 -152
  12. package/dist/{chunk-6FXOAMNL.mjs → chunk-N6424WKA.mjs} +1 -1
  13. package/dist/{chunk-WZJ25K7P.mjs → chunk-NAWLWKOJ.mjs} +1 -1
  14. package/dist/{chunk-DJ3CDTMX.mjs → chunk-O7SVHLD7.mjs} +23 -5
  15. package/dist/{chunk-CZXM4ZJH.cjs → chunk-Q6NM64J2.cjs} +23 -4
  16. package/dist/{chunk-FFJBOR2Y.mjs → chunk-UYMSFJQZ.mjs} +76 -4
  17. package/dist/{chunk-B4LXDHBX.cjs → chunk-X6VNUBES.cjs} +1419 -1316
  18. package/dist/diagram/index.cjs +8 -4
  19. package/dist/diagram/index.mjs +8 -4
  20. package/dist/docx/embedded.cjs +8 -4
  21. package/dist/docx/embedded.mjs +8 -4
  22. package/dist/docx/index.cjs +8 -4
  23. package/dist/docx/index.mjs +8 -4
  24. package/dist/docx/layout/index.cjs +8 -4
  25. package/dist/docx/layout/index.mjs +8 -4
  26. package/dist/docx/load/index.cjs +8 -4
  27. package/dist/docx/load/index.mjs +8 -4
  28. package/dist/docx/ui/index.cjs +8 -4
  29. package/dist/docx/ui/index.mjs +8 -4
  30. package/dist/geometry/index.cjs +16 -12
  31. package/dist/geometry/index.mjs +16 -12
  32. package/dist/geometry/preset-shape-definitions-table.d.ts.map +1 -1
  33. package/dist/index.cjs +16 -12
  34. package/dist/index.mjs +16 -12
  35. package/dist/pptx/automation/index.cjs +294 -157
  36. package/dist/pptx/automation/index.d.ts +3 -3
  37. package/dist/pptx/automation/index.mjs +5 -5
  38. package/dist/pptx/chunks/{index-PdM5zpmu.d.ts → index-D-FdgqrP.d.ts} +102 -3
  39. package/dist/pptx/chunks/index-D-FdgqrP.d.ts.map +1 -0
  40. package/dist/pptx/chunks/{index-BQDcu_0a.d.ts → index-DKybuHPT.d.ts} +51 -3
  41. package/dist/pptx/chunks/{index-BQDcu_0a.d.ts.map → index-DKybuHPT.d.ts.map} +1 -1
  42. package/dist/pptx/chunks/{index-CBV1oHN7.d.ts → index-DnWlmYCy.d.ts} +2 -2
  43. package/dist/pptx/chunks/{index-CBV1oHN7.d.ts.map → index-DnWlmYCy.d.ts.map} +1 -1
  44. package/dist/pptx/cli/index.cjs +294 -157
  45. package/dist/pptx/cli/index.mjs +4 -4
  46. package/dist/pptx/converter/index.cjs +8 -4
  47. package/dist/pptx/converter/index.d.ts +1 -1
  48. package/dist/pptx/converter/index.mjs +2 -2
  49. package/dist/pptx/editor/render/find-replace.cjs +14 -14
  50. package/dist/pptx/editor/render/find-replace.d.ts +1 -1
  51. package/dist/pptx/editor/render/find-replace.mjs +1 -1
  52. package/dist/pptx/editor/render/slide-operations.cjs +8 -8
  53. package/dist/pptx/editor/render/slide-operations.mjs +2 -2
  54. package/dist/pptx/index.cjs +380 -171
  55. package/dist/pptx/index.d.ts +4 -4
  56. package/dist/pptx/index.mjs +5 -5
  57. package/dist/pptx/node/index.d.ts +1 -1
  58. package/dist/teams/chat-view.d.ts +10 -1
  59. package/dist/teams/chat-view.d.ts.map +1 -1
  60. package/dist/teams/index.cjs +805 -144
  61. package/dist/teams/index.d.ts +1 -0
  62. package/dist/teams/index.d.ts.map +1 -1
  63. package/dist/teams/index.mjs +795 -145
  64. package/dist/teams/presence-controller.d.ts +18 -3
  65. package/dist/teams/presence-controller.d.ts.map +1 -1
  66. package/dist/teams/presence-meetings.d.ts +21 -0
  67. package/dist/teams/presence-meetings.d.ts.map +1 -0
  68. package/dist/teams/presence.d.ts +40 -2
  69. package/dist/teams/presence.d.ts.map +1 -1
  70. package/dist/teams/store.d.ts +5 -0
  71. package/dist/teams/store.d.ts.map +1 -1
  72. package/dist/teams/view.d.ts +5 -0
  73. package/dist/teams/view.d.ts.map +1 -1
  74. package/dist/teams/workspace.d.ts +5 -2
  75. package/dist/teams/workspace.d.ts.map +1 -1
  76. package/dist/visio/index.cjs +6 -1
  77. package/dist/visio/index.mjs +6 -1
  78. package/dist/visio/ui/index.cjs +6 -1
  79. package/dist/visio/ui/index.mjs +6 -1
  80. package/dist/xlsx/formula/ets-drift-compare.d.ts +19 -0
  81. package/dist/xlsx/formula/ets-drift-compare.d.ts.map +1 -0
  82. package/dist/xlsx/formula/ets-excel-compare.d.ts +12 -0
  83. package/dist/xlsx/formula/ets-excel-compare.d.ts.map +1 -1
  84. package/dist/xlsx/formula/ets-init-compare.d.ts +24 -0
  85. package/dist/xlsx/formula/ets-init-compare.d.ts.map +1 -0
  86. package/dist/xlsx/formula/ets-init-maps.d.ts +21 -0
  87. package/dist/xlsx/formula/ets-init-maps.d.ts.map +1 -0
  88. package/dist/xlsx/formula/functions/ets-core.d.ts +1 -1
  89. package/dist/xlsx/formula/functions/ets-core.d.ts.map +1 -1
  90. package/dist/xlsx/formula/functions/ets-init-chain.d.ts +11 -0
  91. package/dist/xlsx/formula/functions/ets-init-chain.d.ts.map +1 -0
  92. package/dist/xlsx/formula/functions/ets-init-four.d.ts +3 -0
  93. package/dist/xlsx/formula/functions/ets-init-four.d.ts.map +1 -0
  94. package/dist/xlsx/formula/functions/ets-init-short.d.ts +17 -0
  95. package/dist/xlsx/formula/functions/ets-init-short.d.ts.map +1 -0
  96. package/dist/xlsx/formula/functions/ets-init-states.d.ts +5 -0
  97. package/dist/xlsx/formula/functions/ets-init-states.d.ts.map +1 -0
  98. package/dist/xlsx/formula/functions/ets-init-three.d.ts +23 -0
  99. package/dist/xlsx/formula/functions/ets-init-three.d.ts.map +1 -0
  100. package/dist/xlsx/formula/functions/ets-init-threeplus.d.ts +13 -0
  101. package/dist/xlsx/formula/functions/ets-init-threeplus.d.ts.map +1 -0
  102. package/dist/xlsx/formula/functions/ets-init.d.ts +18 -0
  103. package/dist/xlsx/formula/functions/ets-init.d.ts.map +1 -1
  104. package/dist/xlsx/formula/functions/ets-search-map.d.ts +24 -0
  105. package/dist/xlsx/formula/functions/ets-search-map.d.ts.map +1 -0
  106. package/dist/xlsx/formula/functions/ets-search.d.ts +17 -0
  107. package/dist/xlsx/formula/functions/ets-search.d.ts.map +1 -0
  108. package/dist/xlsx/formula/functions/ets-season.d.ts +2 -2
  109. package/dist/xlsx/formula/functions/ets-season.d.ts.map +1 -1
  110. package/dist/xlsx/formula/functions/ets-validate.d.ts +16 -0
  111. package/dist/xlsx/formula/functions/ets-validate.d.ts.map +1 -0
  112. package/dist/xlsx/index.cjs +755 -282
  113. package/dist/xlsx/index.mjs +755 -282
  114. package/dist/xlsx/layout/form-control-view.d.ts.map +1 -1
  115. package/dist/xlsx/layout/shape-view.d.ts.map +1 -1
  116. package/dist/xlsx/load/index.cjs +599 -126
  117. package/dist/xlsx/load/index.mjs +599 -126
  118. package/dist/xlsx/read/form-control.d.ts.map +1 -1
  119. package/dist/xlsx/ui/index.cjs +756 -283
  120. package/dist/xlsx/ui/index.mjs +756 -283
  121. package/package.json +1 -1
  122. package/dist/PptxHandler-E4DDV3FQ.mjs +0 -4
  123. package/dist/pptx/chunks/index-PdM5zpmu.d.ts.map +0 -1
@@ -4272,14 +4272,7 @@ var init_chart_layout_operations = __esm({
4272
4272
  }
4273
4273
  });
4274
4274
 
4275
- // pptx/core/builders/sdk/ElementFactory.ts
4276
- function generateId(prefix) {
4277
- idCounter += 1;
4278
- return `${prefix}_${Date.now().toString(36)}_${idCounter}`;
4279
- }
4280
- function resetIdCounter() {
4281
- idCounter = 0;
4282
- }
4275
+ // pptx/core/builders/sdk/shape-style-input.ts
4283
4276
  function mapFillToShapeStyle(fill3) {
4284
4277
  if (!fill3) {
4285
4278
  return {};
@@ -4295,18 +4288,24 @@ function mapFillToShapeStyle(fill3) {
4295
4288
  case "gradient":
4296
4289
  return {
4297
4290
  fillMode: "gradient",
4298
- fillGradientType: fill3.gradientType ?? "linear",
4291
+ fillGradientType: fill3.path ? "radial" : fill3.gradientType ?? "linear",
4299
4292
  fillGradientAngle: fill3.angle ?? 0,
4300
4293
  fillGradientStops: fill3.stops.map((s) => ({
4301
4294
  color: s.color,
4302
4295
  position: s.position,
4303
4296
  opacity: s.opacity
4304
- }))
4297
+ })),
4298
+ ...fill3.path ? { fillGradientPathType: fill3.path } : {},
4299
+ ...fill3.focus ? { fillGradientFillToRect: { ...fill3.focus } } : {},
4300
+ ...fill3.tile ? { fillGradientTileRect: { ...fill3.tile } } : {},
4301
+ ...fill3.scaled !== void 0 ? { fillGradientScaled: fill3.scaled } : {},
4302
+ ...fill3.rotWithShape !== void 0 ? { fillGradientRotWithShape: fill3.rotWithShape } : {}
4305
4303
  };
4306
4304
  case "pattern":
4307
4305
  return {
4308
4306
  fillMode: "pattern",
4309
4307
  fillPatternPreset: fill3.preset,
4308
+ ...fill3.foreground !== void 0 ? { fillColor: fill3.foreground } : {},
4310
4309
  fillPatternBackgroundColor: fill3.background
4311
4310
  };
4312
4311
  case "image":
@@ -4321,18 +4320,64 @@ function mapFillToShapeStyle(fill3) {
4321
4320
  return {};
4322
4321
  }
4323
4322
  }
4323
+ function customDashSegments(lengths, width) {
4324
+ const values = lengths.length % 2 === 1 ? [...lengths, ...lengths] : lengths;
4325
+ const segments = [];
4326
+ for (let i2 = 0; i2 + 1 < values.length; i2 += 2) {
4327
+ segments.push({
4328
+ dash: Math.max(0, Math.round(values[i2] / width * DASH_UNITS_PER_WIDTH)),
4329
+ space: Math.max(0, Math.round(values[i2 + 1] / width * DASH_UNITS_PER_WIDTH))
4330
+ });
4331
+ }
4332
+ return segments;
4333
+ }
4334
+ function mapStrokeDash(stroke) {
4335
+ if (!Array.isArray(stroke.dash)) {
4336
+ return { strokeDash: stroke.dash };
4337
+ }
4338
+ const width = stroke.width !== void 0 && stroke.width > 0 ? stroke.width : 1;
4339
+ return {
4340
+ strokeDash: "custom",
4341
+ customDashSegments: customDashSegments(stroke.dash, width)
4342
+ };
4343
+ }
4324
4344
  function mapStrokeToShapeStyle(stroke) {
4325
4345
  if (!stroke) {
4326
4346
  return {};
4327
4347
  }
4348
+ const lineJoin = stroke.join ?? (stroke.miterLimit !== void 0 ? "miter" : void 0);
4349
+ const miterLimit = lineJoin === "miter" ? stroke.miterLimit : void 0;
4328
4350
  return {
4329
4351
  strokeColor: stroke.color,
4330
4352
  strokeWidth: stroke.width,
4331
- strokeDash: stroke.dash,
4353
+ ...mapStrokeDash(stroke),
4332
4354
  strokeOpacity: stroke.opacity,
4333
- lineJoin: stroke.join,
4355
+ lineJoin,
4334
4356
  lineCap: stroke.cap,
4335
- ...stroke.themeColorRef ? { strokeColorRef: stroke.themeColorRef } : {}
4357
+ ...stroke.themeColorRef ? { strokeColorRef: stroke.themeColorRef } : {},
4358
+ ...miterLimit !== void 0 ? { miterLimit: Math.round(miterLimit * MITER_UNITS_PER_RATIO) } : {},
4359
+ ...stroke.compound ? { compoundLine: stroke.compound } : {},
4360
+ ...stroke.align ? { lineAlignment: stroke.align } : {},
4361
+ ...stroke.headEnd ? {
4362
+ connectorStartArrow: stroke.headEnd.type,
4363
+ connectorStartArrowWidth: stroke.headEnd.width,
4364
+ connectorStartArrowLength: stroke.headEnd.length
4365
+ } : {},
4366
+ ...stroke.tailEnd ? {
4367
+ connectorEndArrow: stroke.tailEnd.type,
4368
+ connectorEndArrowWidth: stroke.tailEnd.width,
4369
+ connectorEndArrowLength: stroke.tailEnd.length
4370
+ } : {}
4371
+ };
4372
+ }
4373
+ function connectorLineEndOverride(end, type) {
4374
+ if (type === void 0) {
4375
+ return {};
4376
+ }
4377
+ return {
4378
+ [`connector${end}Arrow`]: type,
4379
+ [`connector${end}ArrowWidth`]: void 0,
4380
+ [`connector${end}ArrowLength`]: void 0
4336
4381
  };
4337
4382
  }
4338
4383
  function mapShadowToShapeStyle(shadow) {
@@ -4347,14 +4392,80 @@ function mapShadowToShapeStyle(shadow) {
4347
4392
  shadowOpacity: shadow.opacity ?? 0.4
4348
4393
  };
4349
4394
  }
4395
+ function mapInnerShadowToShapeStyle(shadow) {
4396
+ if (!shadow) {
4397
+ return {};
4398
+ }
4399
+ return {
4400
+ innerShadowColor: shadow.color ?? "#000000",
4401
+ innerShadowBlur: shadow.blur,
4402
+ innerShadowOffsetX: shadow.offsetX,
4403
+ innerShadowOffsetY: shadow.offsetY,
4404
+ innerShadowOpacity: shadow.opacity
4405
+ };
4406
+ }
4407
+ function mapGlowToShapeStyle(glow) {
4408
+ if (!glow) {
4409
+ return {};
4410
+ }
4411
+ return { glowColor: glow.color, glowRadius: glow.radius, glowOpacity: glow.opacity ?? 1 };
4412
+ }
4413
+ function mapReflectionToShapeStyle(reflection) {
4414
+ if (!reflection) {
4415
+ return {};
4416
+ }
4417
+ return {
4418
+ reflectionBlurRadius: reflection.blur,
4419
+ reflectionDistance: reflection.distance,
4420
+ reflectionStartOpacity: reflection.startOpacity ?? 0.5,
4421
+ reflectionEndOpacity: reflection.endOpacity ?? 0,
4422
+ reflectionEndPosition: reflection.endPosition ?? 0.9,
4423
+ // PowerPoint's reflection presets: a mirror image below the shape.
4424
+ reflectionDirection: 90,
4425
+ reflectionScaleY: -1e5,
4426
+ reflectionAlignment: "bl",
4427
+ reflectionRotateWithShape: false
4428
+ };
4429
+ }
4350
4430
  function buildShapeStyle(opts) {
4351
4431
  const parts = {
4352
4432
  ...mapFillToShapeStyle(opts.fill),
4353
4433
  ...mapStrokeToShapeStyle(opts.stroke),
4354
- ...mapShadowToShapeStyle(opts.shadow)
4434
+ ...mapShadowToShapeStyle(opts.shadow),
4435
+ ...mapInnerShadowToShapeStyle(opts.innerShadow),
4436
+ ...mapGlowToShapeStyle(opts.glow),
4437
+ ...opts.softEdge !== void 0 ? { softEdgeRadius: opts.softEdge } : {},
4438
+ ...mapReflectionToShapeStyle(opts.reflection)
4355
4439
  };
4356
4440
  return Object.keys(parts).length > 0 ? parts : void 0;
4357
4441
  }
4442
+ var DASH_UNITS_PER_WIDTH, MITER_UNITS_PER_RATIO;
4443
+ var init_shape_style_input = __esm({
4444
+ "pptx/core/builders/sdk/shape-style-input.ts"() {
4445
+ DASH_UNITS_PER_WIDTH = 1e5;
4446
+ MITER_UNITS_PER_RATIO = 1e5;
4447
+ }
4448
+ });
4449
+
4450
+ // pptx/core/builders/sdk/ElementFactory.ts
4451
+ function generateId(prefix) {
4452
+ idCounter += 1;
4453
+ return `${prefix}_${Date.now().toString(36)}_${idCounter}`;
4454
+ }
4455
+ function resetIdCounter() {
4456
+ idCounter = 0;
4457
+ }
4458
+ function effectInputs(options2, fill3) {
4459
+ return {
4460
+ fill: fill3,
4461
+ stroke: options2?.stroke,
4462
+ shadow: options2?.shadow,
4463
+ innerShadow: options2?.innerShadow,
4464
+ glow: options2?.glow,
4465
+ softEdge: options2?.softEdge,
4466
+ reflection: options2?.reflection
4467
+ };
4468
+ }
4358
4469
  function mapTextStyleInput(opts) {
4359
4470
  if (!opts) {
4360
4471
  return {};
@@ -4456,11 +4567,7 @@ function createTextElement(text2, options2) {
4456
4567
  text: plainText,
4457
4568
  textStyle: mapTextStyleInput(textStyleBase),
4458
4569
  textSegments: buildTextSegments(text2, textStyleBase),
4459
- shapeStyle: buildShapeStyle({
4460
- fill: options2?.fill,
4461
- stroke: options2?.stroke,
4462
- shadow: options2?.shadow
4463
- })
4570
+ shapeStyle: buildShapeStyle(effectInputs(options2, options2?.fill))
4464
4571
  };
4465
4572
  }
4466
4573
  function createShapeElement(shapeType, options2) {
@@ -4473,11 +4580,9 @@ function createShapeElement(shapeType, options2) {
4473
4580
  opacity: options2?.opacity,
4474
4581
  shapeType,
4475
4582
  shapeAdjustments: options2?.adjustments,
4476
- shapeStyle: buildShapeStyle({
4477
- fill: options2?.fill ?? { type: "solid", color: "#4472C4" },
4478
- stroke: options2?.stroke,
4479
- shadow: options2?.shadow
4480
- })
4583
+ shapeStyle: buildShapeStyle(
4584
+ effectInputs(options2, options2?.fill ?? { type: "solid", color: "#4472C4" })
4585
+ )
4481
4586
  };
4482
4587
  if (options2?.text) {
4483
4588
  el.text = options2.text;
@@ -4489,11 +4594,19 @@ function createShapeElement(shapeType, options2) {
4489
4594
  function createConnectorElement(options2) {
4490
4595
  const p = pos("connector", options2);
4491
4596
  const connType = options2?.type === "bent" ? "bentConnector3" : options2?.type === "curved" ? "curvedConnector3" : "straightConnector1";
4597
+ const strokeInput = options2?.stroke;
4598
+ const stroke = mapStrokeToShapeStyle({
4599
+ ...strokeInput,
4600
+ color: strokeInput?.color ?? "#000000",
4601
+ width: strokeInput?.width ?? 1
4602
+ });
4492
4603
  const style = {
4493
- ...mapStrokeToShapeStyle(options2?.stroke ?? { color: "#000000", width: 1 }),
4494
- connectorStartArrow: options2?.startArrow ?? "none",
4495
- connectorEndArrow: options2?.endArrow ?? "none"
4604
+ ...stroke,
4605
+ ...connectorLineEndOverride("Start", options2?.startArrow),
4606
+ ...connectorLineEndOverride("End", options2?.endArrow)
4496
4607
  };
4608
+ style.connectorStartArrow ??= "none";
4609
+ style.connectorEndArrow ??= "none";
4497
4610
  if (options2?.from) {
4498
4611
  style.connectorStartConnection = {
4499
4612
  shapeId: options2.from.elementId,
@@ -4673,9 +4786,8 @@ function createFreeformElement(pathData, options2) {
4673
4786
  pathHeight,
4674
4787
  customGeometryPaths,
4675
4788
  shapeStyle: buildShapeStyle({
4676
- fill: options2?.fill ?? { type: "none" },
4677
- stroke: options2?.stroke ?? { color: "#000000", width: 2 },
4678
- shadow: options2?.shadow
4789
+ ...effectInputs(options2, options2?.fill ?? { type: "none" }),
4790
+ stroke: options2?.stroke ?? { color: "#000000", width: 2 }
4679
4791
  })
4680
4792
  };
4681
4793
  if (options2?.text) {
@@ -4692,6 +4804,7 @@ var init_ElementFactory = __esm({
4692
4804
  init_custom_geometry();
4693
4805
  init_chart_gradient_input();
4694
4806
  init_chart_layout_operations();
4807
+ init_shape_style_input();
4695
4808
  idCounter = 0;
4696
4809
  DEFAULTS = {
4697
4810
  text: { x: 100, y: 100, width: 600, height: 50 },
@@ -14274,7 +14387,8 @@ var init_preset_shape_definitions_table = __esm({
14274
14387
  gd16("stAng", "pin 0 adj1 21599999"),
14275
14388
  gd16("endAng", "pin 0 adj2 21599999"),
14276
14389
  gd16("swAng", "+- endAng 0 stAng"),
14277
- gd16("swAng2", "?: swAng swAng +- 21600000 swAng 0"),
14390
+ gd16("swAngWrap", "+- swAng 21600000 0"),
14391
+ gd16("swAng2", "?: swAng swAng swAngWrap"),
14278
14392
  gd16("stx", "cos wd2 stAng"),
14279
14393
  gd16("sty", "sin hd2 stAng"),
14280
14394
  gd16("x1", "+- hc stx 0"),
@@ -14319,7 +14433,8 @@ var init_preset_shape_definitions_table = __esm({
14319
14433
  gd16("stAng", "pin 0 adj1 21599999"),
14320
14434
  gd16("endAng", "pin 0 adj2 21599999"),
14321
14435
  gd16("swAng", "+- endAng 0 stAng"),
14322
- gd16("swAng2", "?: swAng swAng +- 21600000 swAng 0"),
14436
+ gd16("swAngWrap", "+- swAng 21600000 0"),
14437
+ gd16("swAng2", "?: swAng swAng swAngWrap"),
14323
14438
  gd16("stx", "cos wd2 stAng"),
14324
14439
  gd16("sty", "sin hd2 stAng"),
14325
14440
  gd16("x1", "+- hc stx 0"),
@@ -14343,7 +14458,8 @@ var init_preset_shape_definitions_table = __esm({
14343
14458
  gd16("stAng", "pin 0 adj1 21599999"),
14344
14459
  gd16("endAng", "pin 0 adj2 21599999"),
14345
14460
  gd16("swAng", "+- endAng 0 stAng"),
14346
- gd16("swAng2", "?: swAng swAng +- 21600000 swAng 0"),
14461
+ gd16("swAngWrap", "+- swAng 21600000 0"),
14462
+ gd16("swAng2", "?: swAng swAng swAngWrap"),
14347
14463
  gd16("stx", "cos wd2 stAng"),
14348
14464
  gd16("sty", "sin hd2 stAng"),
14349
14465
  gd16("x1", "+- hc stx 0"),
@@ -14438,7 +14554,8 @@ var init_preset_shape_definitions_table = __esm({
14438
14554
  gd16("iwd2", "+- wd2 0 thw"),
14439
14555
  gd16("ihd2", "+- hd2 0 thh2"),
14440
14556
  gd16("swAng", "+- endAng 0 stAng"),
14441
- gd16("swAng2", "?: swAng swAng +- 21600000 swAng 0"),
14557
+ gd16("swAngWrap", "+- swAng 21600000 0"),
14558
+ gd16("swAng2", "?: swAng swAng swAngWrap"),
14442
14559
  gd16("mswAng", "+- 0 0 swAng2"),
14443
14560
  gd16("stx", "cos wd2 stAng"),
14444
14561
  gd16("sty", "sin hd2 stAng"),
@@ -18933,8 +19050,8 @@ var init_preset_connection_sites_circular_arrow = __esm({
18933
19050
  gd17("yG", "+- yH dyG 0"),
18934
19051
  gd17("dxB", "cos thh ptAng"),
18935
19052
  gd17("dyB", "sin thh ptAng"),
18936
- gd17("xB", "+- xH 0 dxB 0"),
18937
- gd17("yB", "+- yH 0 dyB 0"),
19053
+ gd17("xB", "+- xH 0 dxB"),
19054
+ gd17("yB", "+- yH 0 dyB"),
18938
19055
  gd17("sx1", "+- xB 0 hc"),
18939
19056
  gd17("sy1", "+- yB 0 vc"),
18940
19057
  gd17("sx2", "+- xG 0 hc"),
@@ -19487,8 +19604,8 @@ var init_preset_connection_sites_left_circular_arrow = __esm({
19487
19604
  gd17("yG", "+- yH dyG 0"),
19488
19605
  gd17("dxB", "cos thh ptAng"),
19489
19606
  gd17("dyB", "sin thh ptAng"),
19490
- gd17("xB", "+- xH 0 dxB 0"),
19491
- gd17("yB", "+- yH 0 dyB 0"),
19607
+ gd17("xB", "+- xH 0 dxB"),
19608
+ gd17("yB", "+- yH 0 dyB"),
19492
19609
  gd17("sx1", "+- xB 0 hc"),
19493
19610
  gd17("sy1", "+- yB 0 vc"),
19494
19611
  gd17("sx2", "+- xG 0 hc"),
@@ -19673,8 +19790,8 @@ var init_preset_connection_sites_left_right_circular_arrow = __esm({
19673
19790
  gd17("yG", "+- yH dyG 0"),
19674
19791
  gd17("dxB", "cos thh ptAng"),
19675
19792
  gd17("dyB", "sin thh ptAng"),
19676
- gd17("xB", "+- xH 0 dxB 0"),
19677
- gd17("yB", "+- yH 0 dyB 0"),
19793
+ gd17("xB", "+- xH 0 dxB"),
19794
+ gd17("yB", "+- yH 0 dyB"),
19678
19795
  gd17("sx1", "+- xB 0 hc"),
19679
19796
  gd17("sy1", "+- yB 0 vc"),
19680
19797
  gd17("sx2", "+- xG 0 hc"),
@@ -19785,8 +19902,8 @@ var init_preset_connection_sites_left_right_circular_arrow = __esm({
19785
19902
  gd17("yK", "+- yI dyK 0"),
19786
19903
  gd17("dxJ", "cos thh lptAng"),
19787
19904
  gd17("dyJ", "sin thh lptAng"),
19788
- gd17("xJ", "+- xI 0 dxJ 0"),
19789
- gd17("yJ", "+- yI 0 dyJ 0"),
19905
+ gd17("xJ", "+- xI 0 dxJ"),
19906
+ gd17("yJ", "+- yI 0 dyJ"),
19790
19907
  gd17("p1", "+- xF 0 xC"),
19791
19908
  gd17("p2", "+- yF 0 yC"),
19792
19909
  gd17("p3", "mod p1 p2 0"),
@@ -21443,13 +21560,13 @@ function getCssBorderDashStyle(dashType) {
21443
21560
  }
21444
21561
  return "dashed";
21445
21562
  }
21446
- function getSvgStrokeDasharray(dashType, strokeWidth, customDashSegments) {
21563
+ function getSvgStrokeDasharray(dashType, strokeWidth, customDashSegments2) {
21447
21564
  if (!dashType || dashType === "solid") {
21448
21565
  return void 0;
21449
21566
  }
21450
21567
  const stroke = Math.max(strokeWidth, 1);
21451
- if (dashType === "custom" && customDashSegments && customDashSegments.length > 0) {
21452
- return customDashSegments.flatMap((seg) => [seg.dash / 1e3 * stroke, seg.space / 1e3 * stroke]).join(" ");
21568
+ if (dashType === "custom" && customDashSegments2 && customDashSegments2.length > 0) {
21569
+ return customDashSegments2.flatMap((seg) => [seg.dash / 1e3 * stroke, seg.space / 1e3 * stroke]).join(" ");
21453
21570
  }
21454
21571
  switch (dashType) {
21455
21572
  case "dot":
@@ -67833,9 +67950,23 @@ function reorderObjectKeysByLocalName(obj, schemaOrder) {
67833
67950
  }
67834
67951
  return result;
67835
67952
  }
67836
- exports.EFFECT_LST_ORDER = void 0; exports.SP_PR_ORDER = void 0; exports.TC_PR_BORDERS_ORDER = void 0; exports.BLIP_FILL_ORDER = void 0; exports.PRESENTATION_CHILD_ORDER = void 0; var SHAPE_STYLE_ORDER;
67953
+ var LN_CHILD_ORDER; exports.EFFECT_LST_ORDER = void 0; exports.SP_PR_ORDER = void 0; exports.TC_PR_BORDERS_ORDER = void 0; exports.BLIP_FILL_ORDER = void 0; exports.PRESENTATION_CHILD_ORDER = void 0; var SHAPE_STYLE_ORDER;
67837
67954
  var init_xml_reorder = __esm({
67838
67955
  "pptx/core/utils/xml-reorder.ts"() {
67956
+ LN_CHILD_ORDER = [
67957
+ "a:noFill",
67958
+ "a:solidFill",
67959
+ "a:gradFill",
67960
+ "a:pattFill",
67961
+ "a:prstDash",
67962
+ "a:custDash",
67963
+ "a:round",
67964
+ "a:bevel",
67965
+ "a:miter",
67966
+ "a:headEnd",
67967
+ "a:tailEnd",
67968
+ "a:extLst"
67969
+ ];
67839
67970
  exports.EFFECT_LST_ORDER = [
67840
67971
  "a:blur",
67841
67972
  "a:fillOverlay",
@@ -74883,7 +75014,8 @@ var init_ConnectorXmlFactory = __esm({
74883
75014
  const { element: element2 } = init;
74884
75015
  const geometry = element2.shapeType && element2.shapeType !== "line" ? this.context.normalizePresetGeometry(element2.shapeType) : "straightConnector1";
74885
75016
  const strokeColor = element2.shapeStyle?.strokeColor || "#1F2937";
74886
- const strokeWidth = Math.max(1, element2.shapeStyle?.strokeWidth || 1);
75017
+ const requestedWidth = element2.shapeStyle?.strokeWidth;
75018
+ const strokeWidth = requestedWidth !== void 0 && requestedWidth > 0 ? requestedWidth : 1;
74887
75019
  const lineNode = {
74888
75020
  "@_w": String(Math.round(strokeWidth * this.context.emuPerPx))
74889
75021
  };
@@ -79253,6 +79385,7 @@ function buildReflectionXml(style, context) {
79253
79385
  const numericValues = [
79254
79386
  style.reflectionBlurRadius,
79255
79387
  style.reflectionStartOpacity,
79388
+ style.reflectionEndOpacity,
79256
79389
  style.reflectionDistance
79257
79390
  ];
79258
79391
  if (!numericValues.some((value) => typeof value === "number" && Number.isFinite(value) && value > 0)) {
@@ -133514,6 +133647,56 @@ var init_pptx_show_properties = __esm({
133514
133647
  }
133515
133648
  });
133516
133649
 
133650
+ // pptx/core/utils/cust-data-list-dom.ts
133651
+ function custDataContainer(doc) {
133652
+ const root = doc.documentElement;
133653
+ if (!root || root.namespaceURI !== NS.p) {
133654
+ return void 0;
133655
+ }
133656
+ if (root.localName === "presentation") {
133657
+ return root;
133658
+ }
133659
+ return CSLD_ROOTS.has(root.localName) ? first(root, "cSld", NS.p) : void 0;
133660
+ }
133661
+ function createPresentationElement(doc, container2, local) {
133662
+ return doc.createElementNS(NS.p, container2.prefix ? `${container2.prefix}:${local}` : local);
133663
+ }
133664
+ function ensureCustDataList(doc, container2) {
133665
+ const existing = first(container2, "custDataLst", NS.p);
133666
+ if (existing) {
133667
+ return existing;
133668
+ }
133669
+ const insertBefore4 = container2.localName === "presentation" ? PRESENTATION_INSERT_BEFORE : CSLD_INSERT_BEFORE;
133670
+ const list3 = createPresentationElement(doc, container2, "custDataLst");
133671
+ const before = elements(container2).find(
133672
+ (child33) => child33.namespaceURI === NS.p && insertBefore4.has(child33.localName)
133673
+ );
133674
+ container2.insertBefore(list3, before ?? null);
133675
+ return list3;
133676
+ }
133677
+ function listChildren(list3, local) {
133678
+ return elements(list3).filter((child33) => child33.namespaceURI === NS.p && child33.localName === local);
133679
+ }
133680
+ function removeIfEmpty(list3) {
133681
+ if (elements(list3).length === 0) {
133682
+ list3.parentNode?.removeChild(list3);
133683
+ }
133684
+ }
133685
+ var CSLD_ROOTS, PRESENTATION_INSERT_BEFORE, CSLD_INSERT_BEFORE;
133686
+ var init_cust_data_list_dom = __esm({
133687
+ "pptx/core/utils/cust-data-list-dom.ts"() {
133688
+ init_xml2();
133689
+ CSLD_ROOTS = /* @__PURE__ */ new Set(["sld", "notes", "sldLayout", "sldMaster", "handoutMaster"]);
133690
+ PRESENTATION_INSERT_BEFORE = /* @__PURE__ */ new Set([
133691
+ "kinsoku",
133692
+ "defaultTextStyle",
133693
+ "modifyVerifier",
133694
+ "extLst"
133695
+ ]);
133696
+ CSLD_INSERT_BEFORE = /* @__PURE__ */ new Set(["controls", "extLst"]);
133697
+ }
133698
+ });
133699
+
133517
133700
  // pptx/core/utils/customer-data-package.ts
133518
133701
  async function writeCustomerDataScopes(zip, scopes, codec) {
133519
133702
  let nextIndex = maxCustomXmlIndex(zip) + 1;
@@ -133523,9 +133706,9 @@ async function writeCustomerDataScopes(zip, scopes, codec) {
133523
133706
  if (!sourceXml) {
133524
133707
  continue;
133525
133708
  }
133526
- const sourceData = codec.parse(sourceXml);
133527
- const container2 = getContainer(sourceData, scope.location);
133528
- if (!container2) {
133709
+ const sourceDoc = parseXml(sourceXml, { label: scope.sourcePartPath });
133710
+ const container2 = custDataContainer(sourceDoc);
133711
+ if (!container2 || !matchesLocation(container2, scope.location)) {
133529
133712
  continue;
133530
133713
  }
133531
133714
  const relsPath2 = relsForSourcePart(scope.sourcePartPath);
@@ -133560,12 +133743,10 @@ async function writeCustomerDataScopes(zip, scopes, codec) {
133560
133743
  authoredEntries.push(rawEntry);
133561
133744
  contentTypes2.set(path3, entry2.contentType);
133562
133745
  }
133563
- const existingList = container2["p:custDataLst"] ?? {};
133564
- existingList["p:custData"] = authoredEntries;
133565
- placeCustomerDataList(container2, existingList, scope.location);
133746
+ replaceCustomerDataEntries(sourceDoc, container2, authoredEntries, codec);
133566
133747
  relsRoot["Relationship"] = relationships3;
133567
133748
  zip.file(relsPath2, codec.build(relsData));
133568
- zip.file(scope.sourcePartPath, codec.build(sourceData));
133749
+ zip.file(scope.sourcePartPath, buildXml(sourceDoc));
133569
133750
  }
133570
133751
  await upsertContentTypes(zip, codec, contentTypes2);
133571
133752
  }
@@ -133587,12 +133768,9 @@ async function resolveContentType(zip, codec, path3) {
133587
133768
  );
133588
133769
  return fallback?.["@_ContentType"] ? String(fallback["@_ContentType"]) : void 0;
133589
133770
  }
133590
- function getContainer(data, location) {
133591
- if (location === "presentation") {
133592
- return data["p:presentation"];
133593
- }
133594
- const slide = data["p:sld"];
133595
- return slide?.["p:cSld"];
133771
+ function matchesLocation(container2, location) {
133772
+ const rootName = container2.ownerDocument?.documentElement?.localName;
133773
+ return rootName === (location === "presentation" ? "presentation" : "sld");
133596
133774
  }
133597
133775
  function upsertRelationship(relationships3, entry2, target) {
133598
133776
  let relationship2 = relationships3.find(
@@ -133612,27 +133790,27 @@ function upsertRelationship(relationships3, entry2, target) {
133612
133790
  function isCustomXmlRelationship(value) {
133613
133791
  return String(value ?? "").endsWith("/relationships/customXml");
133614
133792
  }
133615
- function placeCustomerDataList(container2, list3, location) {
133616
- const insertBefore4 = location === "presentation" ? /* @__PURE__ */ new Set(["p:kinsoku", "p:defaultTextStyle", "p:modifyVerifier", "p:extLst"]) : /* @__PURE__ */ new Set(["p:controls", "p:extLst"]);
133617
- const rebuilt = {};
133618
- let inserted = false;
133619
- for (const [key2, value] of Object.entries(container2)) {
133620
- if (key2 === "p:custDataLst") {
133621
- continue;
133622
- }
133623
- if (!inserted && insertBefore4.has(key2)) {
133624
- rebuilt["p:custDataLst"] = list3;
133625
- inserted = true;
133626
- }
133627
- rebuilt[key2] = value;
133793
+ function replaceCustomerDataEntries(doc, container2, entries, codec) {
133794
+ const list3 = ensureCustDataList(doc, container2);
133795
+ for (const stale of listChildren(list3, "custData")) {
133796
+ list3.removeChild(stale);
133628
133797
  }
133629
- if (!inserted) {
133630
- rebuilt["p:custDataLst"] = list3;
133631
- }
133632
- for (const key2 of Object.keys(container2)) {
133633
- delete container2[key2];
133798
+ const anchor = listChildren(list3, "tags")[0] ?? null;
133799
+ for (const entry2 of entries) {
133800
+ list3.insertBefore(customerDataElement(doc, entry2, codec), anchor);
133634
133801
  }
133635
- Object.assign(container2, rebuilt);
133802
+ removeIfEmpty(list3);
133803
+ }
133804
+ function customerDataElement(doc, entry2, codec) {
133805
+ const root = doc.documentElement;
133806
+ const declarations = Array.from(root.attributes).filter((attribute7) => attribute7.name === "xmlns" || attribute7.name.startsWith("xmlns:")).map((attribute7) => `${attribute7.name}="${attribute7.value}"`).join(" ");
133807
+ const fragment2 = parseXml(
133808
+ `<wrap ${declarations}>${codec.build({ "p:custData": entry2 })}</wrap>`,
133809
+ {
133810
+ label: "p:custData"
133811
+ }
133812
+ );
133813
+ return doc.importNode(fragment2.documentElement.firstChild, true);
133636
133814
  }
133637
133815
  async function upsertContentTypes(zip, codec, contentTypes2) {
133638
133816
  const xml = await zip.file("[Content_Types].xml")?.async("string");
@@ -133687,6 +133865,8 @@ function ensureArray16(value) {
133687
133865
  var CUSTOM_XML_RELATIONSHIP_TYPE, DEFAULT_CONTENT_TYPE;
133688
133866
  var init_customer_data_package = __esm({
133689
133867
  "pptx/core/utils/customer-data-package.ts"() {
133868
+ init_xml2();
133869
+ init_cust_data_list_dom();
133690
133870
  init_safe_path();
133691
133871
  CUSTOM_XML_RELATIONSHIP_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml";
133692
133872
  DEFAULT_CONTENT_TYPE = "application/xml";
@@ -133694,88 +133874,60 @@ var init_customer_data_package = __esm({
133694
133874
  });
133695
133875
 
133696
133876
  // pptx/core/utils/tag-package-owning-element.ts
133697
- function resolveTagsContainer(data) {
133698
- const presentation = data["p:presentation"];
133699
- if (presentation) {
133700
- return { container: presentation, insertBefore: PRESENTATION_INSERT_BEFORE };
133701
- }
133702
- for (const rootKey of CSLD_ROOTS) {
133703
- const root = data[rootKey];
133704
- if (root) {
133705
- const cSld = root["p:cSld"] ??= {};
133706
- return { container: cSld, insertBefore: CSLD_INSERT_BEFORE };
133707
- }
133708
- }
133709
- return void 0;
133877
+ function tagsElements(doc) {
133878
+ return Array.from(doc.getElementsByTagNameNS(NS.p, "tags"));
133710
133879
  }
133711
- function placeAtKey(container2, key2, value, insertBefore4) {
133712
- const rebuilt = {};
133713
- let inserted = false;
133714
- for (const [childKey3, childValue] of Object.entries(container2)) {
133715
- if (childKey3 === key2) {
133716
- continue;
133717
- }
133718
- if (!inserted && insertBefore4.has(childKey3)) {
133719
- rebuilt[key2] = value;
133720
- inserted = true;
133721
- }
133722
- rebuilt[childKey3] = childValue;
133723
- }
133724
- if (!inserted) {
133725
- rebuilt[key2] = value;
133726
- }
133727
- for (const existingKey of Object.keys(container2)) {
133728
- delete container2[existingKey];
133729
- }
133730
- Object.assign(container2, rebuilt);
133880
+ function mentionsTagsId(xml, relationshipId2) {
133881
+ return xml.includes("tags") && xml.includes(`"${relationshipId2}"`);
133731
133882
  }
133732
- async function upsertTagsOwningElement(zip, codec, sourcePartPath, relationshipId2) {
133883
+ async function upsertTagsOwningElement(zip, sourcePartPath, relationshipId2) {
133733
133884
  const xml = await zip.file(sourcePartPath)?.async("string");
133734
133885
  if (!xml) {
133735
133886
  return;
133736
133887
  }
133737
- const data = codec.parse(xml);
133738
- const resolved = resolveTagsContainer(data);
133739
- if (!resolved) {
133888
+ const doc = parseXml(xml, { label: sourcePartPath });
133889
+ if (mentionsTagsId(xml, relationshipId2) && tagsElements(doc).some((tags2) => relAttr(tags2, "id") === relationshipId2)) {
133740
133890
  return;
133741
133891
  }
133742
- const { container: container2, insertBefore: insertBefore4 } = resolved;
133743
- const list3 = { ...container2["p:custDataLst"] ?? {} };
133744
- list3["p:tags"] = { "@_r:id": relationshipId2 };
133745
- placeAtKey(container2, "p:custDataLst", list3, insertBefore4);
133746
- zip.file(sourcePartPath, codec.build(data));
133747
- }
133748
- async function removeTagsOwningElement(zip, codec, sourcePartPath) {
133749
- const xml = await zip.file(sourcePartPath)?.async("string");
133750
- if (!xml) {
133892
+ const container2 = custDataContainer(doc);
133893
+ if (!container2) {
133751
133894
  return;
133752
133895
  }
133753
- const data = codec.parse(xml);
133754
- const resolved = resolveTagsContainer(data);
133755
- if (!resolved) {
133896
+ const list3 = ensureCustDataList(doc, container2);
133897
+ for (const stale of listChildren(list3, "tags")) {
133898
+ list3.removeChild(stale);
133899
+ }
133900
+ const tags = createPresentationElement(doc, container2, "tags");
133901
+ tags.setAttributeNS(NS.r, "r:id", relationshipId2);
133902
+ list3.appendChild(tags);
133903
+ zip.file(sourcePartPath, buildXml(doc));
133904
+ }
133905
+ async function removeTagsOwningElement(zip, sourcePartPath, relationshipId2) {
133906
+ const xml = await zip.file(sourcePartPath)?.async("string");
133907
+ if (!xml || relationshipId2 !== void 0 && !mentionsTagsId(xml, relationshipId2)) {
133756
133908
  return;
133757
133909
  }
133758
- const list3 = resolved.container["p:custDataLst"];
133759
- if (!list3 || list3["p:tags"] === void 0) {
133910
+ const doc = parseXml(xml, { label: sourcePartPath });
133911
+ const container2 = custDataContainer(doc);
133912
+ const owned = tagsElements(doc).filter(
133913
+ (tags) => relationshipId2 === void 0 ? tags.parentNode?.parentNode === container2 : relAttr(tags, "id") === relationshipId2
133914
+ );
133915
+ if (owned.length === 0) {
133760
133916
  return;
133761
133917
  }
133762
- delete list3["p:tags"];
133763
- if (Object.keys(list3).length === 0) {
133764
- delete resolved.container["p:custDataLst"];
133918
+ for (const tags of owned) {
133919
+ const list3 = tags.parentNode;
133920
+ list3?.removeChild(tags);
133921
+ if (list3) {
133922
+ removeIfEmpty(list3);
133923
+ }
133765
133924
  }
133766
- zip.file(sourcePartPath, codec.build(data));
133925
+ zip.file(sourcePartPath, buildXml(doc));
133767
133926
  }
133768
- var CSLD_ROOTS, PRESENTATION_INSERT_BEFORE, CSLD_INSERT_BEFORE;
133769
133927
  var init_tag_package_owning_element = __esm({
133770
133928
  "pptx/core/utils/tag-package-owning-element.ts"() {
133771
- CSLD_ROOTS = ["p:sld", "p:notes", "p:sldLayout", "p:sldMaster", "p:handoutMaster"];
133772
- PRESENTATION_INSERT_BEFORE = /* @__PURE__ */ new Set([
133773
- "p:kinsoku",
133774
- "p:defaultTextStyle",
133775
- "p:modifyVerifier",
133776
- "p:extLst"
133777
- ]);
133778
- CSLD_INSERT_BEFORE = /* @__PURE__ */ new Set(["p:controls", "p:extLst"]);
133929
+ init_xml2();
133930
+ init_cust_data_list_dom();
133779
133931
  }
133780
133932
  });
133781
133933
 
@@ -133846,12 +133998,7 @@ async function writeTagCollections(zip, collections, codec) {
133846
133998
  collection.rawXml = { ...collection.rawXml ?? {}, "p:tagLst": root };
133847
133999
  zip.file(collection.path, codec.build(collection.rawXml));
133848
134000
  await upsertTagRelationship(zip, codec, collection);
133849
- await upsertTagsOwningElement(
133850
- zip,
133851
- codec,
133852
- collection.sourcePartPath,
133853
- collection.relationshipId
133854
- );
134001
+ await upsertTagsOwningElement(zip, collection.sourcePartPath, collection.relationshipId);
133855
134002
  writtenPaths.add(collection.path);
133856
134003
  }
133857
134004
  await upsertTagContentTypes(zip, codec, writtenPaths);
@@ -133860,7 +134007,7 @@ async function removeTagCollection(zip, codec, collection) {
133860
134007
  if (!collection.path || !collection.sourcePartPath) {
133861
134008
  return;
133862
134009
  }
133863
- await removeTagsOwningElement(zip, codec, collection.sourcePartPath);
134010
+ await removeTagsOwningElement(zip, collection.sourcePartPath, collection.relationshipId);
133864
134011
  await removeTagRelationship(zip, codec, collection);
133865
134012
  zip.remove(collection.path);
133866
134013
  await removeTagContentTypeOverride(zip, codec, collection.path);
@@ -153336,14 +153483,13 @@ function writeLineJoin(spPr, shapeStyle, owns) {
153336
153483
  }
153337
153484
  function writeShapeStroke(spPr, shapeStyle, ctx) {
153338
153485
  const owns = createLineStyleGate(shapeStyle);
153339
- if ((shapeStyle.strokeColor !== void 0 || shapeStyle.strokeFillMode === "gradient" || shapeStyle.strokeFillMode === "pattern") && // The width travels with the paint: `writeLineFill` turns a zero width
153486
+ if (typeof shapeStyle.strokeWidth === "number" && shapeStyle.strokeWidth > 0 && owns("strokeWidth")) {
153487
+ ensureLineNode(spPr)["@_w"] = String(Math.round(shapeStyle.strokeWidth * ctx.emuPerPx));
153488
+ }
153489
+ if ((shapeStyle.strokeColor !== void 0 || shapeStyle.strokeFillMode === "gradient" || shapeStyle.strokeFillMode === "pattern") && // The paint still waits on the width: `writeLineFill` turns a zero width
153340
153490
  // into `a:noFill`, so the two cannot be decided apart.
153341
153491
  owns("strokeColor", "strokeOpacity", "strokeFillMode", "strokeWidth")) {
153342
- const lineNode = ensureLineNode(spPr);
153343
- if (typeof shapeStyle.strokeWidth === "number" && shapeStyle.strokeWidth > 0 && owns("strokeWidth")) {
153344
- lineNode["@_w"] = String(Math.round(shapeStyle.strokeWidth * ctx.emuPerPx));
153345
- }
153346
- writeLineFill(lineNode, shapeStyle, ctx.parseColor);
153492
+ writeLineFill(ensureLineNode(spPr), shapeStyle, ctx.parseColor);
153347
153493
  }
153348
153494
  if (shapeStyle.strokeDash !== void 0 && owns("strokeDash")) {
153349
153495
  applyDrawingLineDash(ensureLineNode(spPr), shapeStyle);
@@ -153362,6 +153508,10 @@ function writeShapeStroke(spPr, shapeStyle, ctx) {
153362
153508
  if (ctx.lineEffectListXml && spPr["a:ln"]) {
153363
153509
  spPr["a:ln"]["a:effectLst"] = ctx.lineEffectListXml;
153364
153510
  }
153511
+ const lineNode = spPr["a:ln"];
153512
+ if (lineNode && typeof lineNode === "object" && !Array.isArray(lineNode)) {
153513
+ spPr["a:ln"] = reorderObjectKeysByLocalName(lineNode, LN_CHILD_ORDER);
153514
+ }
153365
153515
  }
153366
153516
  function writeShapeFillAndStroke(spPr, shapeStyle, ctx) {
153367
153517
  resetSpPrFormattingForStyleMatrix(spPr, shapeStyle);
@@ -153372,6 +153522,7 @@ var init_save_shape_fill_stroke = __esm({
153372
153522
  "pptx/core/core/runtime/save-shape-fill-stroke.ts"() {
153373
153523
  init_color_xml_preservation();
153374
153524
  init_drawing_line_dash();
153525
+ init_xml_reorder();
153375
153526
  init_drawing_fill_xml();
153376
153527
  init_authored_shape_style();
153377
153528
  init_fill_choice_group();
@@ -158496,7 +158647,7 @@ function writeTableStyleSectionCell3D(section, cell3D) {
158496
158647
  }
158497
158648
  tcStyle["a:cell3D"] = node;
158498
158649
  }
158499
- var EMU_PER_PIXEL4, BORDER_SIDE_ORDER, LN_CHILD_ORDER, LN_FILL_KEYS;
158650
+ var EMU_PER_PIXEL4, BORDER_SIDE_ORDER, LN_FILL_KEYS;
158500
158651
  var init_table_style_border_write = __esm({
158501
158652
  "pptx/core/core/runtime/table-style-border-write.ts"() {
158502
158653
  init_xml_reorder();
@@ -158512,20 +158663,6 @@ var init_table_style_border_write = __esm({
158512
158663
  "a:tl2br",
158513
158664
  "a:tr2bl"
158514
158665
  ];
158515
- LN_CHILD_ORDER = [
158516
- "a:noFill",
158517
- "a:solidFill",
158518
- "a:gradFill",
158519
- "a:pattFill",
158520
- "a:prstDash",
158521
- "a:custDash",
158522
- "a:round",
158523
- "a:bevel",
158524
- "a:miter",
158525
- "a:headEnd",
158526
- "a:tailEnd",
158527
- "a:extLst"
158528
- ];
158529
158666
  LN_FILL_KEYS = ["a:noFill", "a:solidFill", "a:gradFill", "a:pattFill"];
158530
158667
  }
158531
158668
  });
@@ -179961,6 +180098,42 @@ var TextBuilder = class _TextBuilder {
179961
180098
  this._options.shadow = input;
179962
180099
  return this;
179963
180100
  }
180101
+ /**
180102
+ * Add an inner shadow to the text box.
180103
+ *
180104
+ * @param input - An {@link InnerShadowInput} descriptor.
180105
+ */
180106
+ innerShadow(input) {
180107
+ this._options.innerShadow = input;
180108
+ return this;
180109
+ }
180110
+ /**
180111
+ * Add a glow around the text box.
180112
+ *
180113
+ * @param input - A {@link GlowInput} descriptor.
180114
+ */
180115
+ glow(input) {
180116
+ this._options.glow = input;
180117
+ return this;
180118
+ }
180119
+ /**
180120
+ * Soften the text box's edges.
180121
+ *
180122
+ * @param radius - Soft-edge radius in px.
180123
+ */
180124
+ softEdge(radius) {
180125
+ this._options.softEdge = radius;
180126
+ return this;
180127
+ }
180128
+ /**
180129
+ * Add a reflection below the text box.
180130
+ *
180131
+ * @param input - A {@link ReflectionInput} descriptor.
180132
+ */
180133
+ reflection(input) {
180134
+ this._options.reflection = input;
180135
+ return this;
180136
+ }
179964
180137
  // -- Build --------------------------------------------------------------
179965
180138
  /**
179966
180139
  * Build the final {@link TextPptxElement}.
@@ -180134,6 +180307,42 @@ var ShapeBuilder = class _ShapeBuilder {
180134
180307
  this._options.shadow = input;
180135
180308
  return this;
180136
180309
  }
180310
+ /**
180311
+ * Add an inner shadow to the shape.
180312
+ *
180313
+ * @param input - An {@link InnerShadowInput} descriptor.
180314
+ */
180315
+ innerShadow(input) {
180316
+ this._options.innerShadow = input;
180317
+ return this;
180318
+ }
180319
+ /**
180320
+ * Add a glow around the shape.
180321
+ *
180322
+ * @param input - A {@link GlowInput} descriptor.
180323
+ */
180324
+ glow(input) {
180325
+ this._options.glow = input;
180326
+ return this;
180327
+ }
180328
+ /**
180329
+ * Soften the shape's edges.
180330
+ *
180331
+ * @param radius - Soft-edge radius in px.
180332
+ */
180333
+ softEdge(radius) {
180334
+ this._options.softEdge = radius;
180335
+ return this;
180336
+ }
180337
+ /**
180338
+ * Add a reflection below the shape.
180339
+ *
180340
+ * @param input - A {@link ReflectionInput} descriptor.
180341
+ */
180342
+ reflection(input) {
180343
+ this._options.reflection = input;
180344
+ return this;
180345
+ }
180137
180346
  // -- Shape-specific -----------------------------------------------------
180138
180347
  /**
180139
180348
  * Set text content inside the shape.