svg-path-commander 1.0.0 → 1.0.1

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 +3 -1
  2. package/dist/svg-path-commander.es5.js +361 -403
  3. package/dist/svg-path-commander.es5.min.js +2 -2
  4. package/dist/svg-path-commander.esm.js +352 -400
  5. package/dist/svg-path-commander.esm.min.js +2 -2
  6. package/dist/svg-path-commander.js +352 -400
  7. package/dist/svg-path-commander.min.js +2 -2
  8. package/package.json +10 -11
  9. package/src/convert/pathToAbsolute.js +1 -0
  10. package/src/convert/pathToCurve.js +1 -0
  11. package/src/convert/pathToRelative.js +7 -5
  12. package/src/parser/finalizeSegment.js +3 -16
  13. package/src/parser/isSpace.js +1 -0
  14. package/src/parser/parsePathString.js +8 -8
  15. package/src/parser/scanFlag.js +5 -5
  16. package/src/parser/scanParam.js +10 -7
  17. package/src/process/fixPath.js +1 -1
  18. package/src/process/getSVGMatrix.js +11 -12
  19. package/src/process/normalizePath.js +1 -8
  20. package/src/process/normalizeSegment.js +5 -10
  21. package/src/process/optimizePath.js +0 -4
  22. package/src/process/projection2d.js +6 -6
  23. package/src/process/reverseCurve.js +0 -1
  24. package/src/process/reversePath.js +0 -10
  25. package/src/process/roundPath.js +0 -1
  26. package/src/process/segmentToCubic.js +0 -5
  27. package/src/process/shortenSegment.js +4 -7
  28. package/src/process/splitCubic.js +0 -4
  29. package/src/process/transformPath.js +18 -39
  30. package/src/svg-path-commander.js +4 -5
  31. package/src/util/getPathArea.js +0 -2
  32. package/src/util/getPropertiesAtLength.js +1 -10
  33. package/src/util/getPropertiesAtPoint.js +3 -2
  34. package/src/util/getSegmentAtLength.js +4 -3
  35. package/src/util/getSegmentOfPoint.js +4 -3
  36. package/src/util/pathLengthFactory.js +5 -13
  37. package/src/util/segmentArcFactory.js +165 -37
  38. package/src/util/segmentCubicFactory.js +7 -8
  39. package/src/util/segmentLineFactory.js +4 -3
  40. package/src/util/segmentQuadFactory.js +10 -10
  41. package/src/util/shapeToPath.js +24 -13
  42. package/src/util/util.js +6 -0
  43. package/src/version.js +0 -1
  44. package/types/index.d.ts +1 -1
  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,4 @@
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 [![Coverage Status](https://coveralls.io/repos/github/thednp/svg-path-commander/badge.svg?branch=master)](https://coveralls.io/github/thednp/svg-path-commander?branch=master) ![cypress version](https://img.shields.io/badge/cypress-9.6.0-brightgreen) ![typescript version](https://img.shields.io/badge/typescript-4.5.2-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)
2
2
 
3
3
  ![image](./docs/assets/SVGPathCommander.svg)
4
4
 
@@ -184,6 +184,8 @@ For developer guidelines, and a complete list of static methods, head over to th
184
184
  * Nicolas Debeissat for the inspiration on [svg3d](https://github.com/ndebeiss/svg3d)
185
185
  * Mike Bostock for his awesome [closestPoint](https://bl.ocks.org/mbostock/8027637)
186
186
  * James Halliday for his excelent [point-at-length](https://github.com/substack/point-at-length)
187
+ * Eric Eastwood for his excelent [svg-curve-lib](https://github.com/MadLittleMods/svg-curve-lib)
188
+ * PhET Interactive Simulations for their [kite](https://github.com/phetsims/kite)
187
189
 
188
190
  # License
189
191
  **SVGPathCommander** is released under [MIT Licence](https://github.com/thednp/svg-path-commander/blob/master/LICENSE).