svg-path-commander 1.0.0 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/README.md +7 -1
  2. package/dist/svg-path-commander.es5.js +355 -432
  3. package/dist/svg-path-commander.es5.min.js +2 -2
  4. package/dist/svg-path-commander.esm.js +344 -428
  5. package/dist/svg-path-commander.esm.min.js +2 -2
  6. package/dist/svg-path-commander.js +344 -428
  7. package/dist/svg-path-commander.min.js +2 -2
  8. package/package.json +9 -11
  9. package/src/convert/pathToAbsolute.js +1 -0
  10. package/src/convert/pathToCurve.js +1 -0
  11. package/src/convert/pathToRelative.js +1 -16
  12. package/src/index.js +2 -0
  13. package/src/parser/finalizeSegment.js +3 -16
  14. package/src/parser/isSpace.js +1 -0
  15. package/src/parser/parsePathString.js +0 -11
  16. package/src/parser/scanFlag.js +5 -5
  17. package/src/parser/scanParam.js +10 -7
  18. package/src/process/fixPath.js +1 -1
  19. package/src/process/getSVGMatrix.js +11 -12
  20. package/src/process/normalizePath.js +1 -8
  21. package/src/process/normalizeSegment.js +5 -10
  22. package/src/process/optimizePath.js +0 -4
  23. package/src/process/projection2d.js +6 -6
  24. package/src/process/reverseCurve.js +0 -1
  25. package/src/process/reversePath.js +3 -13
  26. package/src/process/roundPath.js +0 -1
  27. package/src/process/segmentToCubic.js +0 -5
  28. package/src/process/shortenSegment.js +4 -7
  29. package/src/process/splitCubic.js +0 -4
  30. package/src/process/transformPath.js +18 -39
  31. package/src/svg-path-commander.js +11 -9
  32. package/src/util/getPathArea.js +0 -2
  33. package/src/util/getPropertiesAtLength.js +1 -10
  34. package/src/util/getPropertiesAtPoint.js +2 -3
  35. package/src/util/getSegmentAtLength.js +1 -3
  36. package/src/util/getSegmentOfPoint.js +1 -3
  37. package/src/util/pathLengthFactory.js +7 -16
  38. package/src/util/segmentArcFactory.js +165 -37
  39. package/src/util/segmentCubicFactory.js +7 -8
  40. package/src/util/segmentLineFactory.js +4 -3
  41. package/src/util/segmentQuadFactory.js +10 -10
  42. package/src/util/shapeToPath.js +24 -13
  43. package/src/version.js +0 -1
  44. package/types/index.d.ts +1 -2
  45. package/types/svg-path-commander.d.ts +13 -13
  46. package/src/process/shorthandToCubic.js +0 -16
  47. package/src/process/shorthandToQuad.js +0 -16
  48. package/src/process/transformEllipse.js +0 -73
package/README.md CHANGED
@@ -1,4 +1,8 @@
1
- # SVGPathCommander ![check-code-coverage](https://img.shields.io/badge/code--coverage-100%25-brightgreen) ![cypress version](https://img.shields.io/badge/cypress-9.5.4-brightgreen) ![dommatrix version](https://img.shields.io/badge/dommatrix-0.1.0-brightgreen) [![ci](https://github.com/thednp/svg-path-commander/actions/workflows/ci.yml/badge.svg)](https://github.com/thednp/svg-path-commander/actions/workflows/ci.yml)
1
+ # SVGPathCommander
2
+ [![Coverage Status](https://coveralls.io/repos/github/thednp/svg-path-commander/badge.svg)](https://coveralls.io/github/thednp/svg-path-commander)
3
+ ![cypress version](https://img.shields.io/badge/cypress-9.6.0-brightgreen)
4
+ ![typescript version](https://img.shields.io/badge/typescript-4.5.2-brightgreen)
5
+ [![ci](https://github.com/thednp/svg-path-commander/actions/workflows/ci.yml/badge.svg)](https://github.com/thednp/svg-path-commander/actions/workflows/ci.yml)
2
6
 
3
7
  ![image](./docs/assets/SVGPathCommander.svg)
4
8
 
@@ -184,6 +188,8 @@ For developer guidelines, and a complete list of static methods, head over to th
184
188
  * Nicolas Debeissat for the inspiration on [svg3d](https://github.com/ndebeiss/svg3d)
185
189
  * Mike Bostock for his awesome [closestPoint](https://bl.ocks.org/mbostock/8027637)
186
190
  * James Halliday for his excelent [point-at-length](https://github.com/substack/point-at-length)
191
+ * Eric Eastwood for his excelent [svg-curve-lib](https://github.com/MadLittleMods/svg-curve-lib)
192
+ * PhET Interactive Simulations for their [kite](https://github.com/phetsims/kite)
187
193
 
188
194
  # License
189
195
  **SVGPathCommander** is released under [MIT Licence](https://github.com/thednp/svg-path-commander/blob/master/LICENSE).