@emasoft/svg-matrix 1.0.34 → 1.2.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 (56) hide show
  1. package/README.md +58 -2
  2. package/bin/svg-matrix.js +7 -6
  3. package/bin/svgm.js +109 -40
  4. package/dist/svg-matrix.min.js +7 -7
  5. package/dist/svg-toolbox.min.js +125 -205
  6. package/dist/svgm.min.js +115 -195
  7. package/dist/version.json +5 -5
  8. package/package.json +6 -1
  9. package/scripts/postinstall.js +72 -41
  10. package/scripts/test-postinstall.js +18 -16
  11. package/scripts/version-sync.js +144 -49
  12. package/src/animation-optimization.js +190 -98
  13. package/src/animation-references.js +11 -3
  14. package/src/arc-length.js +23 -20
  15. package/src/bezier-analysis.js +9 -13
  16. package/src/bezier-intersections.js +18 -4
  17. package/src/browser-verify.js +35 -8
  18. package/src/clip-path-resolver.js +285 -114
  19. package/src/convert-path-data.js +20 -8
  20. package/src/css-specificity.js +33 -9
  21. package/src/douglas-peucker.js +272 -141
  22. package/src/geometry-to-path.js +79 -22
  23. package/src/gjk-collision.js +287 -126
  24. package/src/index.js +56 -21
  25. package/src/inkscape-support.js +122 -101
  26. package/src/logger.js +43 -27
  27. package/src/marker-resolver.js +201 -121
  28. package/src/mask-resolver.js +231 -98
  29. package/src/matrix.js +9 -5
  30. package/src/mesh-gradient.js +22 -14
  31. package/src/off-canvas-detection.js +53 -17
  32. package/src/path-optimization.js +356 -171
  33. package/src/path-simplification.js +671 -256
  34. package/src/pattern-resolver.js +1 -3
  35. package/src/polygon-clip.js +396 -78
  36. package/src/svg-boolean-ops.js +90 -23
  37. package/src/svg-collections.js +1546 -667
  38. package/src/svg-flatten.js +152 -38
  39. package/src/svg-matrix-lib.js +6 -4
  40. package/src/svg-parser.js +5 -1
  41. package/src/svg-rendering-context.js +3 -1
  42. package/src/svg-toolbox-lib.js +2 -2
  43. package/src/svg-toolbox.js +99 -457
  44. package/src/svg-validation-data.js +513 -345
  45. package/src/svg2-polyfills.js +177 -87
  46. package/src/svgm-lib.js +10 -6
  47. package/src/transform-optimization.js +168 -51
  48. package/src/transforms2d.js +73 -40
  49. package/src/transforms3d.js +34 -27
  50. package/src/use-symbol-resolver.js +175 -76
  51. package/src/vector.js +80 -44
  52. package/src/vendor/inkscape-hatch-polyfill.js +143 -108
  53. package/src/vendor/inkscape-hatch-polyfill.min.js +291 -1
  54. package/src/vendor/inkscape-mesh-polyfill.js +953 -766
  55. package/src/vendor/inkscape-mesh-polyfill.min.js +896 -1
  56. package/src/verification.js +3 -4
@@ -807,7 +807,8 @@ export function verifyRectToPath(x, y, width, height, pathData) {
807
807
  valid: false,
808
808
  error: new Decimal(Infinity),
809
809
  tolerance,
810
- message: "Rectangle parameters (x, y, width, height) cannot be null or undefined",
810
+ message:
811
+ "Rectangle parameters (x, y, width, height) cannot be null or undefined",
811
812
  };
812
813
  }
813
814
  if (typeof pathData !== "string") {
@@ -1130,9 +1131,7 @@ function isPointOnSegment(point, segStart, segEnd) {
1130
1131
  throw new Error("Invalid point parameter: must have x and y properties");
1131
1132
  }
1132
1133
  if (!segStart || segStart.x == null || segStart.y == null) {
1133
- throw new Error(
1134
- "Invalid segStart parameter: must have x and y properties",
1135
- );
1134
+ throw new Error("Invalid segStart parameter: must have x and y properties");
1136
1135
  }
1137
1136
  if (!segEnd || segEnd.x == null || segEnd.y == null) {
1138
1137
  throw new Error("Invalid segEnd parameter: must have x and y properties");