pptx-react-viewer 1.1.5 → 1.1.6

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 (26) hide show
  1. package/dist/index.js +353 -63
  2. package/dist/index.mjs +354 -64
  3. package/dist/viewer/index.js +353 -63
  4. package/dist/viewer/index.mjs +354 -64
  5. package/node_modules/emf-converter/package.json +1 -1
  6. package/node_modules/mtx-decompressor/package.json +1 -1
  7. package/node_modules/pptx-viewer-core/dist/{SvgExporter-BQ4KbRO9.d.mts → SvgExporter-BTkk4oNQ.d.mts} +1 -1
  8. package/node_modules/pptx-viewer-core/dist/{SvgExporter-0TxiiorD.d.ts → SvgExporter-CTDG-t_z.d.ts} +1 -1
  9. package/node_modules/pptx-viewer-core/dist/cli/index.d.mts +2 -2
  10. package/node_modules/pptx-viewer-core/dist/cli/index.d.ts +2 -2
  11. package/node_modules/pptx-viewer-core/dist/cli/index.js +0 -0
  12. package/node_modules/pptx-viewer-core/dist/cli/index.mjs +0 -0
  13. package/node_modules/pptx-viewer-core/dist/converter/index.d.mts +3 -3
  14. package/node_modules/pptx-viewer-core/dist/converter/index.d.ts +3 -3
  15. package/node_modules/pptx-viewer-core/dist/converter/index.js +0 -0
  16. package/node_modules/pptx-viewer-core/dist/converter/index.mjs +0 -0
  17. package/node_modules/pptx-viewer-core/dist/index.d.mts +867 -49
  18. package/node_modules/pptx-viewer-core/dist/index.d.ts +867 -49
  19. package/node_modules/pptx-viewer-core/dist/index.js +29459 -16809
  20. package/node_modules/pptx-viewer-core/dist/index.mjs +29443 -16809
  21. package/node_modules/pptx-viewer-core/dist/{presentation-ArhfImJ5.d.mts → presentation-4fhI3din.d.mts} +835 -26
  22. package/node_modules/pptx-viewer-core/dist/{presentation-ArhfImJ5.d.ts → presentation-4fhI3din.d.ts} +835 -26
  23. package/node_modules/pptx-viewer-core/dist/{text-operations-rhJV-A_W.d.ts → text-operations-B9EwbptL.d.ts} +1 -1
  24. package/node_modules/pptx-viewer-core/dist/{text-operations-CLj-sJyk.d.mts → text-operations-C89Jn6S0.d.mts} +1 -1
  25. package/node_modules/pptx-viewer-core/package.json +1 -1
  26. package/package.json +4 -4
@@ -198,7 +198,7 @@ function generateUUID() {
198
198
  const uuid = _lut[d0 & 255] + _lut[d0 >> 8 & 255] + _lut[d0 >> 16 & 255] + _lut[d0 >> 24 & 255] + "-" + _lut[d1 & 255] + _lut[d1 >> 8 & 255] + "-" + _lut[d1 >> 16 & 15 | 64] + _lut[d1 >> 24 & 255] + "-" + _lut[d2 & 63 | 128] + _lut[d2 >> 8 & 255] + "-" + _lut[d2 >> 16 & 255] + _lut[d2 >> 24 & 255] + _lut[d3 & 255] + _lut[d3 >> 8 & 255] + _lut[d3 >> 16 & 255] + _lut[d3 >> 24 & 255];
199
199
  return uuid.toLowerCase();
200
200
  }
201
- function clamp(value, min2, max2) {
201
+ function clamp2(value, min2, max2) {
202
202
  return Math.max(min2, Math.min(max2, value));
203
203
  }
204
204
  function euclideanModulo(n, m2) {
@@ -573,7 +573,7 @@ function _generateTables() {
573
573
  }
574
574
  function toHalfFloat(val2) {
575
575
  if (Math.abs(val2) > 65504) warn("DataUtils.toHalfFloat(): Value out of range.");
576
- val2 = clamp(val2, -65504, 65504);
576
+ val2 = clamp2(val2, -65504, 65504);
577
577
  _tables.floatView[0] = val2;
578
578
  const f = _tables.uint32View[0];
579
579
  const e2 = f >> 23 & 511;
@@ -2062,7 +2062,7 @@ var init_three_core = __esm({
2062
2062
  * @param {number} max - The max value.
2063
2063
  * @return {number} The clamped value.
2064
2064
  */
2065
- clamp,
2065
+ clamp: clamp2,
2066
2066
  /**
2067
2067
  * Computes the Euclidean modulo of the given parameters that
2068
2068
  * is `( ( n % m ) + m ) % m`.
@@ -2589,8 +2589,8 @@ var init_three_core = __esm({
2589
2589
  * @return {Vector2} A reference to this vector.
2590
2590
  */
2591
2591
  clamp(min2, max2) {
2592
- this.x = clamp(this.x, min2.x, max2.x);
2593
- this.y = clamp(this.y, min2.y, max2.y);
2592
+ this.x = clamp2(this.x, min2.x, max2.x);
2593
+ this.y = clamp2(this.y, min2.y, max2.y);
2594
2594
  return this;
2595
2595
  }
2596
2596
  /**
@@ -2604,8 +2604,8 @@ var init_three_core = __esm({
2604
2604
  * @return {Vector2} A reference to this vector.
2605
2605
  */
2606
2606
  clampScalar(minVal, maxVal) {
2607
- this.x = clamp(this.x, minVal, maxVal);
2608
- this.y = clamp(this.y, minVal, maxVal);
2607
+ this.x = clamp2(this.x, minVal, maxVal);
2608
+ this.y = clamp2(this.y, minVal, maxVal);
2609
2609
  return this;
2610
2610
  }
2611
2611
  /**
@@ -2620,7 +2620,7 @@ var init_three_core = __esm({
2620
2620
  */
2621
2621
  clampLength(min2, max2) {
2622
2622
  const length2 = this.length();
2623
- return this.divideScalar(length2 || 1).multiplyScalar(clamp(length2, min2, max2));
2623
+ return this.divideScalar(length2 || 1).multiplyScalar(clamp2(length2, min2, max2));
2624
2624
  }
2625
2625
  /**
2626
2626
  * The components of this vector are rounded down to the nearest integer value.
@@ -2745,7 +2745,7 @@ var init_three_core = __esm({
2745
2745
  const denominator = Math.sqrt(this.lengthSq() * v.lengthSq());
2746
2746
  if (denominator === 0) return Math.PI / 2;
2747
2747
  const theta = this.dot(v) / denominator;
2748
- return Math.acos(clamp(theta, -1, 1));
2748
+ return Math.acos(clamp2(theta, -1, 1));
2749
2749
  }
2750
2750
  /**
2751
2751
  * Computes the distance from the given vector to this instance.
@@ -3232,7 +3232,7 @@ var init_three_core = __esm({
3232
3232
  * @return {number} The angle in radians.
3233
3233
  */
3234
3234
  angleTo(q) {
3235
- return 2 * Math.acos(Math.abs(clamp(this.dot(q), -1, 1)));
3235
+ return 2 * Math.acos(Math.abs(clamp2(this.dot(q), -1, 1)));
3236
3236
  }
3237
3237
  /**
3238
3238
  * Rotates this quaternion by a given angular step to the given quaternion.
@@ -3938,9 +3938,9 @@ var init_three_core = __esm({
3938
3938
  * @return {Vector3} A reference to this vector.
3939
3939
  */
3940
3940
  clamp(min2, max2) {
3941
- this.x = clamp(this.x, min2.x, max2.x);
3942
- this.y = clamp(this.y, min2.y, max2.y);
3943
- this.z = clamp(this.z, min2.z, max2.z);
3941
+ this.x = clamp2(this.x, min2.x, max2.x);
3942
+ this.y = clamp2(this.y, min2.y, max2.y);
3943
+ this.z = clamp2(this.z, min2.z, max2.z);
3944
3944
  return this;
3945
3945
  }
3946
3946
  /**
@@ -3954,9 +3954,9 @@ var init_three_core = __esm({
3954
3954
  * @return {Vector3} A reference to this vector.
3955
3955
  */
3956
3956
  clampScalar(minVal, maxVal) {
3957
- this.x = clamp(this.x, minVal, maxVal);
3958
- this.y = clamp(this.y, minVal, maxVal);
3959
- this.z = clamp(this.z, minVal, maxVal);
3957
+ this.x = clamp2(this.x, minVal, maxVal);
3958
+ this.y = clamp2(this.y, minVal, maxVal);
3959
+ this.z = clamp2(this.z, minVal, maxVal);
3960
3960
  return this;
3961
3961
  }
3962
3962
  /**
@@ -3971,7 +3971,7 @@ var init_three_core = __esm({
3971
3971
  */
3972
3972
  clampLength(min2, max2) {
3973
3973
  const length2 = this.length();
3974
- return this.divideScalar(length2 || 1).multiplyScalar(clamp(length2, min2, max2));
3974
+ return this.divideScalar(length2 || 1).multiplyScalar(clamp2(length2, min2, max2));
3975
3975
  }
3976
3976
  /**
3977
3977
  * The components of this vector are rounded down to the nearest integer value.
@@ -4181,7 +4181,7 @@ var init_three_core = __esm({
4181
4181
  const denominator = Math.sqrt(this.lengthSq() * v.lengthSq());
4182
4182
  if (denominator === 0) return Math.PI / 2;
4183
4183
  const theta = this.dot(v) / denominator;
4184
- return Math.acos(clamp(theta, -1, 1));
4184
+ return Math.acos(clamp2(theta, -1, 1));
4185
4185
  }
4186
4186
  /**
4187
4187
  * Computes the distance from the given vector to this instance.
@@ -5870,10 +5870,10 @@ var init_three_core = __esm({
5870
5870
  * @return {Vector4} A reference to this vector.
5871
5871
  */
5872
5872
  clamp(min2, max2) {
5873
- this.x = clamp(this.x, min2.x, max2.x);
5874
- this.y = clamp(this.y, min2.y, max2.y);
5875
- this.z = clamp(this.z, min2.z, max2.z);
5876
- this.w = clamp(this.w, min2.w, max2.w);
5873
+ this.x = clamp2(this.x, min2.x, max2.x);
5874
+ this.y = clamp2(this.y, min2.y, max2.y);
5875
+ this.z = clamp2(this.z, min2.z, max2.z);
5876
+ this.w = clamp2(this.w, min2.w, max2.w);
5877
5877
  return this;
5878
5878
  }
5879
5879
  /**
@@ -5887,10 +5887,10 @@ var init_three_core = __esm({
5887
5887
  * @return {Vector4} A reference to this vector.
5888
5888
  */
5889
5889
  clampScalar(minVal, maxVal) {
5890
- this.x = clamp(this.x, minVal, maxVal);
5891
- this.y = clamp(this.y, minVal, maxVal);
5892
- this.z = clamp(this.z, minVal, maxVal);
5893
- this.w = clamp(this.w, minVal, maxVal);
5890
+ this.x = clamp2(this.x, minVal, maxVal);
5891
+ this.y = clamp2(this.y, minVal, maxVal);
5892
+ this.z = clamp2(this.z, minVal, maxVal);
5893
+ this.w = clamp2(this.w, minVal, maxVal);
5894
5894
  return this;
5895
5895
  }
5896
5896
  /**
@@ -5905,7 +5905,7 @@ var init_three_core = __esm({
5905
5905
  */
5906
5906
  clampLength(min2, max2) {
5907
5907
  const length2 = this.length();
5908
- return this.divideScalar(length2 || 1).multiplyScalar(clamp(length2, min2, max2));
5908
+ return this.divideScalar(length2 || 1).multiplyScalar(clamp2(length2, min2, max2));
5909
5909
  }
5910
5910
  /**
5911
5911
  * The components of this vector are rounded down to the nearest integer value.
@@ -7688,7 +7688,7 @@ var init_three_core = __esm({
7688
7688
  const m31 = te[2], m32 = te[6], m33 = te[10];
7689
7689
  switch (order) {
7690
7690
  case "XYZ":
7691
- this._y = Math.asin(clamp(m13, -1, 1));
7691
+ this._y = Math.asin(clamp2(m13, -1, 1));
7692
7692
  if (Math.abs(m13) < 0.9999999) {
7693
7693
  this._x = Math.atan2(-m23, m33);
7694
7694
  this._z = Math.atan2(-m12, m11);
@@ -7698,7 +7698,7 @@ var init_three_core = __esm({
7698
7698
  }
7699
7699
  break;
7700
7700
  case "YXZ":
7701
- this._x = Math.asin(-clamp(m23, -1, 1));
7701
+ this._x = Math.asin(-clamp2(m23, -1, 1));
7702
7702
  if (Math.abs(m23) < 0.9999999) {
7703
7703
  this._y = Math.atan2(m13, m33);
7704
7704
  this._z = Math.atan2(m21, m22);
@@ -7708,7 +7708,7 @@ var init_three_core = __esm({
7708
7708
  }
7709
7709
  break;
7710
7710
  case "ZXY":
7711
- this._x = Math.asin(clamp(m32, -1, 1));
7711
+ this._x = Math.asin(clamp2(m32, -1, 1));
7712
7712
  if (Math.abs(m32) < 0.9999999) {
7713
7713
  this._y = Math.atan2(-m31, m33);
7714
7714
  this._z = Math.atan2(-m12, m22);
@@ -7718,7 +7718,7 @@ var init_three_core = __esm({
7718
7718
  }
7719
7719
  break;
7720
7720
  case "ZYX":
7721
- this._y = Math.asin(-clamp(m31, -1, 1));
7721
+ this._y = Math.asin(-clamp2(m31, -1, 1));
7722
7722
  if (Math.abs(m31) < 0.9999999) {
7723
7723
  this._x = Math.atan2(m32, m33);
7724
7724
  this._z = Math.atan2(m21, m11);
@@ -7728,7 +7728,7 @@ var init_three_core = __esm({
7728
7728
  }
7729
7729
  break;
7730
7730
  case "YZX":
7731
- this._z = Math.asin(clamp(m21, -1, 1));
7731
+ this._z = Math.asin(clamp2(m21, -1, 1));
7732
7732
  if (Math.abs(m21) < 0.9999999) {
7733
7733
  this._x = Math.atan2(-m23, m22);
7734
7734
  this._y = Math.atan2(-m31, m11);
@@ -7738,7 +7738,7 @@ var init_three_core = __esm({
7738
7738
  }
7739
7739
  break;
7740
7740
  case "XZY":
7741
- this._z = Math.asin(-clamp(m12, -1, 1));
7741
+ this._z = Math.asin(-clamp2(m12, -1, 1));
7742
7742
  if (Math.abs(m12) < 0.9999999) {
7743
7743
  this._x = Math.atan2(m32, m22);
7744
7744
  this._y = Math.atan2(m13, m11);
@@ -9362,8 +9362,8 @@ var init_three_core = __esm({
9362
9362
  */
9363
9363
  setHSL(h2, s, l2, colorSpace = ColorManagement.workingColorSpace) {
9364
9364
  h2 = euclideanModulo(h2, 1);
9365
- s = clamp(s, 0, 1);
9366
- l2 = clamp(l2, 0, 1);
9365
+ s = clamp2(s, 0, 1);
9366
+ l2 = clamp2(l2, 0, 1);
9367
9367
  if (s === 0) {
9368
9368
  this.r = this.g = this.b = l2;
9369
9369
  } else {
@@ -9549,7 +9549,7 @@ var init_three_core = __esm({
9549
9549
  */
9550
9550
  getHex(colorSpace = SRGBColorSpace) {
9551
9551
  ColorManagement.workingToColorSpace(_color.copy(this), colorSpace);
9552
- return Math.round(clamp(_color.r * 255, 0, 255)) * 65536 + Math.round(clamp(_color.g * 255, 0, 255)) * 256 + Math.round(clamp(_color.b * 255, 0, 255));
9552
+ return Math.round(clamp2(_color.r * 255, 0, 255)) * 65536 + Math.round(clamp2(_color.g * 255, 0, 255)) * 256 + Math.round(clamp2(_color.b * 255, 0, 255));
9553
9553
  }
9554
9554
  /**
9555
9555
  * Returns the hexadecimal value of this color as a string (for example, 'FFFFFF').
@@ -18480,13 +18480,13 @@ var init_three_core = __esm({
18480
18480
  vec.crossVectors(tangents[i3 - 1], tangents[i3]);
18481
18481
  if (vec.length() > Number.EPSILON) {
18482
18482
  vec.normalize();
18483
- const theta = Math.acos(clamp(tangents[i3 - 1].dot(tangents[i3]), -1, 1));
18483
+ const theta = Math.acos(clamp2(tangents[i3 - 1].dot(tangents[i3]), -1, 1));
18484
18484
  normals[i3].applyMatrix4(mat.makeRotationAxis(vec, theta));
18485
18485
  }
18486
18486
  binormals[i3].crossVectors(tangents[i3], normals[i3]);
18487
18487
  }
18488
18488
  if (closed === true) {
18489
- let theta = Math.acos(clamp(normals[0].dot(normals[segments]), -1, 1));
18489
+ let theta = Math.acos(clamp2(normals[0].dot(normals[segments]), -1, 1));
18490
18490
  theta /= segments;
18491
18491
  if (tangents[0].dot(vec.crossVectors(normals[0], normals[segments])) > 0) {
18492
18492
  theta = -theta;
@@ -20275,7 +20275,7 @@ var init_three_core = __esm({
20275
20275
  phiLength
20276
20276
  };
20277
20277
  segments = Math.floor(segments);
20278
- phiLength = clamp(phiLength, 0, Math.PI * 2);
20278
+ phiLength = clamp2(phiLength, 0, Math.PI * 2);
20279
20279
  const indices = [];
20280
20280
  const vertices = [];
20281
20281
  const uvs = [];
@@ -21491,7 +21491,7 @@ var init_three_core = __esm({
21491
21491
  this.ior = 1.5;
21492
21492
  Object.defineProperty(this, "reflectivity", {
21493
21493
  get: function() {
21494
- return clamp(2.5 * (this.ior - 1) / (this.ior + 1), 0, 1);
21494
+ return clamp2(2.5 * (this.ior - 1) / (this.ior + 1), 0, 1);
21495
21495
  },
21496
21496
  set: function(reflectivity) {
21497
21497
  this.ior = (1 + 0.4 * reflectivity) / (1 - 0.4 * reflectivity);
@@ -29759,7 +29759,7 @@ var init_three_core = __esm({
29759
29759
  */
29760
29760
  makeSafe() {
29761
29761
  const EPS = 1e-6;
29762
- this.phi = clamp(this.phi, EPS, Math.PI - EPS);
29762
+ this.phi = clamp2(this.phi, EPS, Math.PI - EPS);
29763
29763
  return this;
29764
29764
  }
29765
29765
  /**
@@ -29787,7 +29787,7 @@ var init_three_core = __esm({
29787
29787
  this.phi = 0;
29788
29788
  } else {
29789
29789
  this.theta = Math.atan2(x2, z);
29790
- this.phi = Math.acos(clamp(y / this.radius, -1, 1));
29790
+ this.phi = Math.acos(clamp2(y / this.radius, -1, 1));
29791
29791
  }
29792
29792
  return this;
29793
29793
  }
@@ -30302,7 +30302,7 @@ var init_three_core = __esm({
30302
30302
  const startEnd_startP = _startEnd.dot(_startP);
30303
30303
  let t2 = startEnd_startP / startEnd2;
30304
30304
  if (clampToLine) {
30305
- t2 = clamp(t2, 0, 1);
30305
+ t2 = clamp2(t2, 0, 1);
30306
30306
  }
30307
30307
  return t2;
30308
30308
  }
@@ -30348,27 +30348,27 @@ var init_three_core = __esm({
30348
30348
  if (a2 <= EPSILON) {
30349
30349
  s = 0;
30350
30350
  t2 = f / e2;
30351
- t2 = clamp(t2, 0, 1);
30351
+ t2 = clamp2(t2, 0, 1);
30352
30352
  } else {
30353
30353
  const c3 = _d1.dot(_r);
30354
30354
  if (e2 <= EPSILON) {
30355
30355
  t2 = 0;
30356
- s = clamp(-c3 / a2, 0, 1);
30356
+ s = clamp2(-c3 / a2, 0, 1);
30357
30357
  } else {
30358
30358
  const b2 = _d1.dot(_d2);
30359
30359
  const denom = a2 * e2 - b2 * b2;
30360
30360
  if (denom !== 0) {
30361
- s = clamp((b2 * f - c3 * e2) / denom, 0, 1);
30361
+ s = clamp2((b2 * f - c3 * e2) / denom, 0, 1);
30362
30362
  } else {
30363
30363
  s = 0;
30364
30364
  }
30365
30365
  t2 = (b2 * s + f) / e2;
30366
30366
  if (t2 < 0) {
30367
30367
  t2 = 0;
30368
- s = clamp(-c3 / a2, 0, 1);
30368
+ s = clamp2(-c3 / a2, 0, 1);
30369
30369
  } else if (t2 > 1) {
30370
30370
  t2 = 1;
30371
- s = clamp((b2 - c3) / a2, 0, 1);
30371
+ s = clamp2((b2 - c3) / a2, 0, 1);
30372
30372
  }
30373
30373
  }
30374
30374
  }
@@ -70307,6 +70307,55 @@ var ACTION_BUTTON_PRESETS = [
70307
70307
  label: "Return",
70308
70308
  defaultAction: "prevSlide",
70309
70309
  iconPath: "M18 8 L18 14 L6 14 M6 14 L10 10 M6 14 L10 18"
70310
+ },
70311
+ {
70312
+ shapeType: "actionButtonHome",
70313
+ label: "Home",
70314
+ defaultAction: "firstSlide",
70315
+ // House: roof + body
70316
+ iconPath: "M12 4 L20 11 L20 20 L14 20 L14 14 L10 14 L10 20 L4 20 L4 11 Z"
70317
+ },
70318
+ {
70319
+ shapeType: "actionButtonHelp",
70320
+ label: "Help",
70321
+ defaultAction: "none",
70322
+ // Question mark
70323
+ iconPath: "M9 9 a3 3 0 1 1 4 2.8 c-1 0.4 -1 1.2 -1 2 M12 17 v0.5"
70324
+ },
70325
+ {
70326
+ shapeType: "actionButtonInformation",
70327
+ label: "Information",
70328
+ defaultAction: "none",
70329
+ // Lower-case "i": dot + body
70330
+ iconPath: "M12 6 v0.01 M12 10 v8"
70331
+ },
70332
+ {
70333
+ shapeType: "actionButtonDocument",
70334
+ label: "Document",
70335
+ defaultAction: "none",
70336
+ // Document with folded corner
70337
+ iconPath: "M6 4 L14 4 L18 8 L18 20 L6 20 Z M14 4 L14 8 L18 8"
70338
+ },
70339
+ {
70340
+ shapeType: "actionButtonSound",
70341
+ label: "Sound",
70342
+ defaultAction: "none",
70343
+ // Speaker cone + sound waves
70344
+ iconPath: "M4 10 L4 14 L8 14 L12 18 L12 6 L8 10 Z M16 9 a4 4 0 0 1 0 6 M18 7 a7 7 0 0 1 0 10"
70345
+ },
70346
+ {
70347
+ shapeType: "actionButtonMovie",
70348
+ label: "Movie",
70349
+ defaultAction: "none",
70350
+ // Film strip with play triangle
70351
+ iconPath: "M4 6 L20 6 L20 18 L4 18 Z M10 9 L15 12 L10 15 Z"
70352
+ },
70353
+ {
70354
+ shapeType: "actionButtonBlank",
70355
+ label: "Custom",
70356
+ defaultAction: "none",
70357
+ // No glyph — empty path. The button still renders as a rounded rect via clip-path.
70358
+ iconPath: ""
70310
70359
  }
70311
70360
  ];
70312
70361
  Object.fromEntries(ACTION_BUTTON_PRESETS.map((p3) => [p3.shapeType, p3.defaultAction]));
@@ -72586,8 +72635,8 @@ function hexToRgb2(hex) {
72586
72635
  };
72587
72636
  }
72588
72637
  function rgbToHex(r2, g2, b2) {
72589
- const clamp2 = (v) => Math.max(0, Math.min(255, Math.round(v)));
72590
- return `#${clamp2(r2).toString(16).padStart(2, "0")}${clamp2(g2).toString(16).padStart(2, "0")}${clamp2(b2).toString(16).padStart(2, "0")}`;
72638
+ const clamp3 = (v) => Math.max(0, Math.min(255, Math.round(v)));
72639
+ return `#${clamp3(r2).toString(16).padStart(2, "0")}${clamp3(g2).toString(16).padStart(2, "0")}${clamp3(b2).toString(16).padStart(2, "0")}`;
72591
72640
  }
72592
72641
  function rgbToHsl(r2, g2, b2) {
72593
72642
  const rn = r2 / 255;
@@ -74797,6 +74846,11 @@ function getShapeClipPath(shapeType, adjustments, width, height) {
74797
74846
  }
74798
74847
  const normalized = shapeType.toLowerCase();
74799
74848
  if (normalized === "round1rect" || normalized === "round2samerect" || normalized === "round2diagrect" || normalized === "sniproundrect" || normalized === "snip1rect" || normalized === "snip2diagrect") {
74849
+ if (adjustments?.adj !== void 0 && width && height) {
74850
+ const ratio = Math.min(Math.max(adjustments.adj / 1e5, 0), 0.5);
74851
+ const radiusPx = Math.round(Math.min(width, height) * ratio);
74852
+ return `inset(0 round ${radiusPx}px)`;
74853
+ }
74800
74854
  return "inset(0 round 18px)";
74801
74855
  }
74802
74856
  if (normalized === "can" || normalized === "cylinder") {
@@ -75443,6 +75497,128 @@ function mapDagBlendModeToCss(blend) {
75443
75497
  return void 0;
75444
75498
  }
75445
75499
  }
75500
+ function getImageAlphaFilterId(elementId) {
75501
+ return `imgalpha-${elementId}`;
75502
+ }
75503
+ function hasAdvancedImageAlphaEffects(element2) {
75504
+ if (!pptxViewerCore.isImageLikeElement(element2)) {
75505
+ return false;
75506
+ }
75507
+ const e2 = element2.imageEffects;
75508
+ if (!e2) {
75509
+ return false;
75510
+ }
75511
+ return Boolean(
75512
+ typeof e2.alphaModFix === "number" || e2.alphaInv || e2.alphaCeiling || e2.alphaFloor || typeof e2.alphaRepl === "number" || typeof e2.alphaBiLevel === "number" || typeof e2.biLevel === "number" || e2.lum && (typeof e2.lum.bright === "number" || typeof e2.lum.contrast === "number") || e2.hsl && (typeof e2.hsl.sat === "number" || typeof e2.hsl.lum === "number") || e2.tint && typeof e2.tint.amt === "number" || e2.clrRepl
75513
+ );
75514
+ }
75515
+ function renderImageAlphaSvgFilter(element2) {
75516
+ if (!pptxViewerCore.isImageLikeElement(element2)) {
75517
+ return null;
75518
+ }
75519
+ const e2 = element2.imageEffects;
75520
+ if (!e2 || !hasAdvancedImageAlphaEffects(element2)) {
75521
+ return null;
75522
+ }
75523
+ const filterId = getImageAlphaFilterId(element2.id);
75524
+ const primitives = [];
75525
+ let resultIdx = 0;
75526
+ let inputRef = "SourceGraphic";
75527
+ const next = (jsx229) => {
75528
+ const result = `r${resultIdx++}`;
75529
+ primitives.push(jsx229(inputRef, result));
75530
+ inputRef = result;
75531
+ };
75532
+ if (typeof e2.alphaModFix === "number") {
75533
+ const mul = clamp(e2.alphaModFix / 100, 0, 1);
75534
+ next((inp, out) => /* @__PURE__ */ jsxRuntime.jsx(
75535
+ "feColorMatrix",
75536
+ {
75537
+ in: inp,
75538
+ result: out,
75539
+ type: "matrix",
75540
+ values: `1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 ${mul} 0`
75541
+ },
75542
+ out
75543
+ ));
75544
+ }
75545
+ if (e2.alphaInv) {
75546
+ next((inp, out) => /* @__PURE__ */ jsxRuntime.jsx("feComponentTransfer", { in: inp, result: out, children: /* @__PURE__ */ jsxRuntime.jsx("feFuncA", { type: "linear", slope: -1, intercept: 1 }) }, out));
75547
+ }
75548
+ if (e2.alphaCeiling) {
75549
+ next((inp, out) => /* @__PURE__ */ jsxRuntime.jsx("feComponentTransfer", { in: inp, result: out, children: /* @__PURE__ */ jsxRuntime.jsx("feFuncA", { type: "discrete", tableValues: "0 1 1 1 1 1 1 1 1 1" }) }, out));
75550
+ }
75551
+ if (e2.alphaFloor) {
75552
+ next((inp, out) => /* @__PURE__ */ jsxRuntime.jsx("feComponentTransfer", { in: inp, result: out, children: /* @__PURE__ */ jsxRuntime.jsx("feFuncA", { type: "discrete", tableValues: "0 0 0 0 0 0 0 0 0 1" }) }, out));
75553
+ }
75554
+ if (typeof e2.alphaRepl === "number") {
75555
+ const a2 = clamp(e2.alphaRepl / 100, 0, 1);
75556
+ next((inp, out) => /* @__PURE__ */ jsxRuntime.jsx("feComponentTransfer", { in: inp, result: out, children: /* @__PURE__ */ jsxRuntime.jsx("feFuncA", { type: "linear", slope: 0, intercept: a2 }) }, out));
75557
+ }
75558
+ if (typeof e2.alphaBiLevel === "number") {
75559
+ const t2 = clamp(e2.alphaBiLevel / 100, 0, 1);
75560
+ const table = Array.from({ length: 10 }, (_, i3) => i3 / 10 >= t2 ? "1" : "0").join(" ");
75561
+ next((inp, out) => /* @__PURE__ */ jsxRuntime.jsx("feComponentTransfer", { in: inp, result: out, children: /* @__PURE__ */ jsxRuntime.jsx("feFuncA", { type: "discrete", tableValues: table }) }, out));
75562
+ }
75563
+ if (typeof e2.biLevel === "number") {
75564
+ next((inp, out) => /* @__PURE__ */ jsxRuntime.jsx("feColorMatrix", { in: inp, result: out, type: "saturate", values: "0" }, out));
75565
+ const t2 = clamp(e2.biLevel / 100, 0, 1);
75566
+ const tbl = t2 < 0.5 ? "0 1" : "0 1";
75567
+ next((inp, out) => /* @__PURE__ */ jsxRuntime.jsxs("feComponentTransfer", { in: inp, result: out, children: [
75568
+ /* @__PURE__ */ jsxRuntime.jsx("feFuncR", { type: "discrete", tableValues: tbl }),
75569
+ /* @__PURE__ */ jsxRuntime.jsx("feFuncG", { type: "discrete", tableValues: tbl }),
75570
+ /* @__PURE__ */ jsxRuntime.jsx("feFuncB", { type: "discrete", tableValues: tbl })
75571
+ ] }, out));
75572
+ }
75573
+ if (e2.lum && (typeof e2.lum.bright === "number" || typeof e2.lum.contrast === "number")) {
75574
+ const b2 = (e2.lum.bright ?? 0) / 100;
75575
+ const c2 = 1 + (e2.lum.contrast ?? 0) / 100;
75576
+ const slope = c2;
75577
+ const intercept = b2 + (1 - c2) / 2;
75578
+ next((inp, out) => /* @__PURE__ */ jsxRuntime.jsxs("feComponentTransfer", { in: inp, result: out, children: [
75579
+ /* @__PURE__ */ jsxRuntime.jsx("feFuncR", { type: "linear", slope, intercept }),
75580
+ /* @__PURE__ */ jsxRuntime.jsx("feFuncG", { type: "linear", slope, intercept }),
75581
+ /* @__PURE__ */ jsxRuntime.jsx("feFuncB", { type: "linear", slope, intercept })
75582
+ ] }, out));
75583
+ }
75584
+ if (e2.hsl && typeof e2.hsl.sat === "number") {
75585
+ const v = clamp(1 + e2.hsl.sat / 100, 0, 2);
75586
+ next((inp, out) => /* @__PURE__ */ jsxRuntime.jsx("feColorMatrix", { in: inp, result: out, type: "saturate", values: String(v) }, out));
75587
+ }
75588
+ if (e2.tint && typeof e2.tint.amt === "number" && e2.tint.amt < 0) {
75589
+ const v = clamp(1 + e2.tint.amt / 100, 0, 1);
75590
+ next((inp, out) => /* @__PURE__ */ jsxRuntime.jsx("feColorMatrix", { in: inp, result: out, type: "saturate", values: String(v) }, out));
75591
+ }
75592
+ if (e2.clrRepl) {
75593
+ const c2 = hexToRgbUnit(e2.clrRepl.color);
75594
+ next((inp, out) => /* @__PURE__ */ jsxRuntime.jsx(
75595
+ "feColorMatrix",
75596
+ {
75597
+ in: inp,
75598
+ result: out,
75599
+ type: "matrix",
75600
+ values: `0 0 0 0 ${c2.r} 0 0 0 0 ${c2.g} 0 0 0 0 ${c2.b} 0 0 0 1 0`
75601
+ },
75602
+ out
75603
+ ));
75604
+ }
75605
+ if (primitives.length === 0) {
75606
+ return null;
75607
+ }
75608
+ return /* @__PURE__ */ jsxRuntime.jsx(
75609
+ "svg",
75610
+ {
75611
+ width: 0,
75612
+ height: 0,
75613
+ style: { position: "absolute", overflow: "hidden" },
75614
+ "aria-hidden": "true",
75615
+ children: /* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsx("filter", { id: filterId, colorInterpolationFilters: "sRGB", children: primitives }) })
75616
+ }
75617
+ );
75618
+ }
75619
+ function clamp(v, lo, hi) {
75620
+ return v < lo ? lo : v > hi ? hi : v;
75621
+ }
75446
75622
  function getDagDuotoneFilterId(elementId) {
75447
75623
  return `dag-duotone-${elementId}`;
75448
75624
  }
@@ -75526,6 +75702,9 @@ function getImageEffectsFilter(element2, options) {
75526
75702
  const filterId = getDuotoneFilterId(element2.id);
75527
75703
  filters.push(`url(#${filterId})`);
75528
75704
  }
75705
+ if (hasAdvancedImageAlphaEffects(element2)) {
75706
+ filters.push(`url(#${getImageAlphaFilterId(element2.id)})`);
75707
+ }
75529
75708
  if (effects.artisticEffect) {
75530
75709
  const radius = effects.artisticRadius ?? 5;
75531
75710
  if (needsSvgArtisticFilter(effects.artisticEffect)) {
@@ -75699,6 +75878,39 @@ function getEffectDagCssFilter(style, elementId) {
75699
75878
  return filters.length > 0 ? filters.join(" ") : void 0;
75700
75879
  }
75701
75880
  var getEffectDagFilter = getEffectDagCssFilter;
75881
+ function getResolvedShapeClipPathFor(shapeType, width, height, adjustments) {
75882
+ if (!shapeType) {
75883
+ return void 0;
75884
+ }
75885
+ if (!Number.isFinite(width) || !Number.isFinite(height) || width <= 0 || height <= 0) {
75886
+ return getShapeClipPath(shapeType, adjustments, width, height);
75887
+ }
75888
+ if (adjustments && Object.keys(adjustments).length > 0) {
75889
+ const adjusted = pptxViewerCore.getAdjustmentAwareShapeClipPath(shapeType, width, height, adjustments);
75890
+ if (adjusted !== void 0) {
75891
+ return adjusted;
75892
+ }
75893
+ }
75894
+ const fromPreset = pptxViewerCore.getShapeClipPathFromPreset(shapeType, width, height, adjustments);
75895
+ if (fromPreset !== void 0) {
75896
+ return fromPreset;
75897
+ }
75898
+ const cloud = pptxViewerCore.getCloudPathForRendering(shapeType, width, height);
75899
+ if (cloud !== void 0) {
75900
+ return cloud;
75901
+ }
75902
+ return getShapeClipPath(shapeType, adjustments, width, height);
75903
+ }
75904
+ function getResolvedShapeClipPath(element2, width, height) {
75905
+ const shapeType = element2.shapeType;
75906
+ if (!shapeType) {
75907
+ return void 0;
75908
+ }
75909
+ const w = element2.width;
75910
+ const h2 = element2.height;
75911
+ const adjustments = element2.shapeAdjustments;
75912
+ return getResolvedShapeClipPathFor(shapeType, w, h2, adjustments);
75913
+ }
75702
75914
 
75703
75915
  // src/viewer/utils/shape-round-rect.ts
75704
75916
  function localClampAdjustment(value) {
@@ -75770,6 +75982,27 @@ var MATERIAL_MAP = {
75770
75982
  filter: "brightness(1.1) contrast(0.85)",
75771
75983
  // Translucent powder: slight translucent glow
75772
75984
  backgroundImage: "radial-gradient(ellipse at 30% 30%, rgba(255,255,255,0.1) 0%, transparent 60%)"
75985
+ },
75986
+ // Legacy materials (PowerPoint 2007 / earlier). Render as muted variants
75987
+ // of the modern equivalents so legacy decks still resemble the originals.
75988
+ legacyMatte: {
75989
+ filter: "brightness(0.92) saturate(0.85)",
75990
+ backgroundImage: "linear-gradient(180deg, rgba(255,255,255,0.03) 0%, transparent 50%, rgba(0,0,0,0.04) 100%)"
75991
+ },
75992
+ legacyPlastic: {
75993
+ filter: "brightness(1.02) contrast(1.03)",
75994
+ boxShadow: "inset -2px -2px 5px rgba(255,255,255,0.3)",
75995
+ backgroundImage: "radial-gradient(ellipse 35% 25% at 25% 20%, rgba(255,255,255,0.15) 0%, transparent 70%)"
75996
+ },
75997
+ legacyMetal: {
75998
+ filter: "brightness(1.05) contrast(1.1) saturate(1.1)",
75999
+ boxShadow: "inset -2px -2px 6px rgba(255,255,255,0.35), inset 1px 1px 3px rgba(255,255,255,0.15)",
76000
+ backgroundImage: "linear-gradient(135deg, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0.06) 25%, transparent 50%, rgba(0,0,0,0.05) 80%)"
76001
+ },
76002
+ legacyWireframe: {
76003
+ filter: "brightness(1) contrast(1.4) saturate(0.6)",
76004
+ // Wireframe: high contrast outline-emphasising look
76005
+ boxShadow: "inset 0 0 0 1px rgba(0,0,0,0.4)"
75773
76006
  }
75774
76007
  };
75775
76008
  function getMaterialCssOverrides(material) {
@@ -76724,8 +76957,7 @@ function getShapeVisualStyle(element2, hasFill, fillColor, strokeWidth, strokeCo
76724
76957
  return {};
76725
76958
  }
76726
76959
  const normalizedShapeType = getShapeType(element2.shapeType);
76727
- const shapeType = element2.shapeType || normalizedShapeType;
76728
- const clipPath = getShapeClipPath(shapeType);
76960
+ const clipPath = getResolvedShapeClipPath(element2);
76729
76961
  const fillOpacity = element2.shapeStyle?.fillOpacity;
76730
76962
  const strokeOpacity = element2.shapeStyle?.strokeOpacity;
76731
76963
  const strokeDash = normalizeStrokeDashType(element2.shapeStyle?.strokeDash);
@@ -77327,7 +77559,7 @@ function getImageMaskStyle(element2) {
77327
77559
  if (normalized === "can" || normalized === "cylinder") {
77328
77560
  return { borderRadius: "48% / 12%" };
77329
77561
  }
77330
- const clipPath = getShapeClipPath(shapeType);
77562
+ const clipPath = getResolvedShapeClipPath(element2);
77331
77563
  if (!clipPath) {
77332
77564
  return void 0;
77333
77565
  }
@@ -77990,8 +78222,8 @@ function hexToRgb3(hex) {
77990
78222
  };
77991
78223
  }
77992
78224
  function rgbToHex2(r2, g2, b2) {
77993
- const clamp2 = (v) => Math.max(0, Math.min(255, Math.round(v)));
77994
- return `#${clamp2(r2).toString(16).padStart(2, "0").toUpperCase()}${clamp2(g2).toString(16).padStart(2, "0").toUpperCase()}${clamp2(b2).toString(16).padStart(2, "0").toUpperCase()}`;
78225
+ const clamp3 = (v) => Math.max(0, Math.min(255, Math.round(v)));
78226
+ return `#${clamp3(r2).toString(16).padStart(2, "0").toUpperCase()}${clamp3(g2).toString(16).padStart(2, "0").toUpperCase()}${clamp3(b2).toString(16).padStart(2, "0").toUpperCase()}`;
77995
78227
  }
77996
78228
  function tintColor(hex, tintFactor) {
77997
78229
  const { r: r2, g: g2, b: b2 } = hexToRgb3(hex);
@@ -78922,13 +79154,13 @@ function cellStyleToCss(style) {
78922
79154
  }
78923
79155
  if (style.textDirection) {
78924
79156
  switch (style.textDirection) {
78925
- case "vertical":
79157
+ case "vert":
78926
79158
  case "eaVert":
78927
79159
  case "wordArtVert":
78928
79160
  case "wordArtVertRtl":
78929
79161
  css.writingMode = "vertical-rl";
78930
79162
  break;
78931
- case "vertical270":
79163
+ case "vert270":
78932
79164
  case "mongolianVert":
78933
79165
  css.writingMode = "vertical-lr";
78934
79166
  break;
@@ -79455,8 +79687,8 @@ function hexToRgb4(hex) {
79455
79687
  ];
79456
79688
  }
79457
79689
  function rgbToHex3(r2, g2, b2) {
79458
- const clamp2 = (v) => Math.max(0, Math.min(255, Math.round(v)));
79459
- return `#${clamp2(r2).toString(16).padStart(2, "0")}${clamp2(g2).toString(16).padStart(2, "0")}${clamp2(b2).toString(16).padStart(2, "0")}`;
79690
+ const clamp3 = (v) => Math.max(0, Math.min(255, Math.round(v)));
79691
+ return `#${clamp3(r2).toString(16).padStart(2, "0")}${clamp3(g2).toString(16).padStart(2, "0")}${clamp3(b2).toString(16).padStart(2, "0")}`;
79460
79692
  }
79461
79693
  function tint(hex, amount) {
79462
79694
  const [r2, g2, b2] = hexToRgb4(hex);
@@ -81374,7 +81606,7 @@ function resolveRegionCode(label) {
81374
81606
  return REGION_ALIAS_MAP[normalized];
81375
81607
  }
81376
81608
  function lerpColor(a2, b2, t2) {
81377
- const clamp2 = (v) => Math.max(0, Math.min(255, Math.round(v)));
81609
+ const clamp3 = (v) => Math.max(0, Math.min(255, Math.round(v)));
81378
81610
  const parse = (hex) => {
81379
81611
  const h2 = hex.replace("#", "");
81380
81612
  return [
@@ -81385,9 +81617,9 @@ function lerpColor(a2, b2, t2) {
81385
81617
  };
81386
81618
  const [r1, g1, b1] = parse(a2);
81387
81619
  const [r2, g2, b22] = parse(b2);
81388
- const r3 = clamp2(r1 + (r2 - r1) * t2);
81389
- const g3 = clamp2(g1 + (g2 - g1) * t2);
81390
- const bl = clamp2(b1 + (b22 - b1) * t2);
81620
+ const r3 = clamp3(r1 + (r2 - r1) * t2);
81621
+ const g3 = clamp3(g1 + (g2 - g1) * t2);
81622
+ const bl = clamp3(b1 + (b22 - b1) * t2);
81391
81623
  return `#${r3.toString(16).padStart(2, "0")}${g3.toString(16).padStart(2, "0")}${bl.toString(16).padStart(2, "0")}`;
81392
81624
  }
81393
81625
  function sequentialColorScale(t2) {
@@ -88139,6 +88371,59 @@ function WarpedText({
88139
88371
  }
88140
88372
  );
88141
88373
  }
88374
+ var GLYPH_BY_SHAPE = Object.fromEntries(
88375
+ ACTION_BUTTON_PRESETS.map((p3) => [p3.shapeType, p3.iconPath])
88376
+ );
88377
+ GLYPH_BY_SHAPE["actionButtonForwardOrNext"] = GLYPH_BY_SHAPE["actionButtonForwardNext"];
88378
+ GLYPH_BY_SHAPE["actionButtonBackOrPrevious"] = GLYPH_BY_SHAPE["actionButtonBackPrevious"];
88379
+ function isActionButtonShape(shapeType) {
88380
+ return Boolean(shapeType && shapeType in GLYPH_BY_SHAPE);
88381
+ }
88382
+ function getActionButtonGlyphPath(shapeType) {
88383
+ if (!shapeType) {
88384
+ return void 0;
88385
+ }
88386
+ const path = GLYPH_BY_SHAPE[shapeType];
88387
+ return path && path.length > 0 ? path : void 0;
88388
+ }
88389
+ function ActionButtonGlyphOverlay({
88390
+ element: element2,
88391
+ color
88392
+ }) {
88393
+ const shapeType = "shapeType" in element2 ? element2.shapeType : void 0;
88394
+ const path = getActionButtonGlyphPath(shapeType);
88395
+ if (!path) {
88396
+ return null;
88397
+ }
88398
+ const stroke = color ?? ("textStyle" in element2 && element2.textStyle?.color || "#ffffff");
88399
+ return /* @__PURE__ */ jsxRuntime.jsx(
88400
+ "svg",
88401
+ {
88402
+ viewBox: "0 0 24 24",
88403
+ width: "100%",
88404
+ height: "100%",
88405
+ preserveAspectRatio: "xMidYMid meet",
88406
+ style: {
88407
+ position: "absolute",
88408
+ inset: 0,
88409
+ pointerEvents: "none",
88410
+ padding: "20%"
88411
+ },
88412
+ "aria-hidden": "true",
88413
+ children: /* @__PURE__ */ jsxRuntime.jsx(
88414
+ "path",
88415
+ {
88416
+ d: path,
88417
+ fill: "none",
88418
+ stroke,
88419
+ strokeWidth: 2,
88420
+ strokeLinecap: "round",
88421
+ strokeLinejoin: "round"
88422
+ }
88423
+ )
88424
+ }
88425
+ );
88426
+ }
88142
88427
  function ColorChangedImage({
88143
88428
  src,
88144
88429
  clrChange,
@@ -88409,6 +88694,7 @@ function renderImg(el, style, filter, alt, opacity) {
88409
88694
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
88410
88695
  tileDuotoneColors && renderDuotoneSvgFilter(el.id, tileDuotoneColors.color1, tileDuotoneColors.color2),
88411
88696
  renderArtisticEffectSvgFilter(el.id, artisticEffectName, artisticRadius),
88697
+ renderImageAlphaSvgFilter(el),
88412
88698
  /* @__PURE__ */ jsxRuntime.jsx(
88413
88699
  "div",
88414
88700
  {
@@ -88430,6 +88716,7 @@ function renderImg(el, style, filter, alt, opacity) {
88430
88716
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
88431
88717
  duotoneColors && !useDuotoneCanvas && renderDuotoneSvgFilter(el.id, duotoneColors.color1, duotoneColors.color2),
88432
88718
  renderArtisticEffectSvgFilter(el.id, artisticEffectName, artisticRadius),
88719
+ renderImageAlphaSvgFilter(el),
88433
88720
  useDuotoneCanvas && duotoneColors ? /* @__PURE__ */ jsxRuntime.jsx(
88434
88721
  DuotoneImage,
88435
88722
  {
@@ -90938,8 +91225,11 @@ function renderBody(el, isImg, isEditing, editText, spellCheck, txtSE, txtS, vec
90938
91225
  ...scene3dStyle.perspective ? { perspective: scene3dStyle.perspective } : {},
90939
91226
  ...scene3dStyle.transformStyle ? { transformStyle: scene3dStyle.transformStyle } : {}
90940
91227
  } : void 0;
91228
+ const shapeTypeForGlyph = "shapeType" in el ? el.shapeType : void 0;
91229
+ const showActionButtonGlyph = isActionButtonShape(shapeTypeForGlyph);
90941
91230
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
90942
91231
  vecShape,
91232
+ showActionButtonGlyph && /* @__PURE__ */ jsxRuntime.jsx(ActionButtonGlyphOverlay, { element: el }),
90943
91233
  isTxtEl ? useSvgWarp ? /* @__PURE__ */ jsxRuntime.jsx(
90944
91234
  "div",
90945
91235
  {