├── .github └── workflows │ ├── release.yaml │ └── test.yaml ├── .gitignore ├── .prettierignore ├── .swcrc ├── README.md ├── eslint.config.js ├── examples ├── arc.svg ├── circle.svg ├── cross.svg ├── cubic.svg ├── ellipse.svg ├── isocube.svg ├── kite.svg ├── lens.svg ├── line.svg ├── omino.svg ├── polygon.svg ├── polygram.svg ├── polyline.svg ├── quad.svg ├── radialLines.svg ├── rect.svg ├── regPolygon.svg ├── roundedRect.svg ├── roundedSquare.svg ├── sector.svg ├── segment.svg ├── square.svg ├── star.svg ├── symH.svg ├── symI.svg ├── symV.svg ├── symX.svg └── triangle.svg ├── package.json ├── rollup.config.js ├── scripts ├── makeExamples.mjs └── makeReadMe.mjs ├── setupTests.js ├── src ├── components │ ├── containers │ │ ├── Group.test.tsx │ │ ├── Group.tsx │ │ ├── Svg.test.tsx │ │ └── Svg.tsx │ ├── dimension │ │ ├── Distance.test.tsx │ │ └── Distance.tsx │ ├── markers │ │ ├── Marker.test.tsx │ │ ├── Marker.tsx │ │ ├── MarkerArrow.tsx │ │ ├── MarkerLine.tsx │ │ ├── MarkerSquare.tsx │ │ └── MarkerTriangle.tsx │ ├── path │ │ ├── Path.test.ts │ │ ├── Path.ts │ │ ├── PathMerge.test.tsx │ │ └── PathMerge.tsx │ ├── shapes │ │ ├── basic │ │ │ └── index.tsx │ │ ├── curves │ │ │ └── index.tsx │ │ ├── index.test.tsx │ │ ├── index.tsx │ │ ├── misc │ │ │ └── index.tsx │ │ ├── polygons │ │ │ └── index.tsx │ │ ├── radial │ │ │ └── index.tsx │ │ └── symbols │ │ │ └── index.tsx │ └── text │ │ ├── Text.test.tsx │ │ ├── Text.tsx │ │ ├── TextPath.test.tsx │ │ └── TextPath.tsx ├── docs │ ├── demos.mjs │ └── docs.mjs ├── index.ts ├── types │ ├── distance.ts │ ├── group.ts │ ├── markers.ts │ ├── pathmerge.ts │ ├── shapes │ │ ├── basic.ts │ │ ├── common.ts │ │ ├── curves.ts │ │ ├── misc.ts │ │ ├── polygons.ts │ │ ├── radial.ts │ │ └── symbols.ts │ ├── svg.ts │ └── text.ts └── utils │ ├── attach.test.ts │ ├── attach.ts │ ├── cleanAttributes.ts │ ├── createSimpleComponent.ts │ ├── id.ts │ ├── renderElement.test.ts │ ├── renderElement.ts │ ├── shapeFactory.ts │ ├── shorthand.test.ts │ ├── shorthand.ts │ └── validateProps.ts ├── tsconfig.json └── vitest.config.ts /.github/workflows/release.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/.github/workflows/release.yaml -------------------------------------------------------------------------------- /.github/workflows/test.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/.github/workflows/test.yaml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/.gitignore -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | dist -------------------------------------------------------------------------------- /.swcrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/.swcrc -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/README.md -------------------------------------------------------------------------------- /eslint.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/eslint.config.js -------------------------------------------------------------------------------- /examples/arc.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/examples/arc.svg -------------------------------------------------------------------------------- /examples/circle.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/examples/circle.svg -------------------------------------------------------------------------------- /examples/cross.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/examples/cross.svg -------------------------------------------------------------------------------- /examples/cubic.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/examples/cubic.svg -------------------------------------------------------------------------------- /examples/ellipse.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/examples/ellipse.svg -------------------------------------------------------------------------------- /examples/isocube.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/examples/isocube.svg -------------------------------------------------------------------------------- /examples/kite.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/examples/kite.svg -------------------------------------------------------------------------------- /examples/lens.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/examples/lens.svg -------------------------------------------------------------------------------- /examples/line.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/examples/line.svg -------------------------------------------------------------------------------- /examples/omino.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/examples/omino.svg -------------------------------------------------------------------------------- /examples/polygon.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/examples/polygon.svg -------------------------------------------------------------------------------- /examples/polygram.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/examples/polygram.svg -------------------------------------------------------------------------------- /examples/polyline.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/examples/polyline.svg -------------------------------------------------------------------------------- /examples/quad.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/examples/quad.svg -------------------------------------------------------------------------------- /examples/radialLines.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/examples/radialLines.svg -------------------------------------------------------------------------------- /examples/rect.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/examples/rect.svg -------------------------------------------------------------------------------- /examples/regPolygon.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/examples/regPolygon.svg -------------------------------------------------------------------------------- /examples/roundedRect.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/examples/roundedRect.svg -------------------------------------------------------------------------------- /examples/roundedSquare.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/examples/roundedSquare.svg -------------------------------------------------------------------------------- /examples/sector.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/examples/sector.svg -------------------------------------------------------------------------------- /examples/segment.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/examples/segment.svg -------------------------------------------------------------------------------- /examples/square.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/examples/square.svg -------------------------------------------------------------------------------- /examples/star.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/examples/star.svg -------------------------------------------------------------------------------- /examples/symH.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/examples/symH.svg -------------------------------------------------------------------------------- /examples/symI.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/examples/symI.svg -------------------------------------------------------------------------------- /examples/symV.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/examples/symV.svg -------------------------------------------------------------------------------- /examples/symX.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/examples/symX.svg -------------------------------------------------------------------------------- /examples/triangle.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/examples/triangle.svg -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/package.json -------------------------------------------------------------------------------- /rollup.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/rollup.config.js -------------------------------------------------------------------------------- /scripts/makeExamples.mjs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/scripts/makeExamples.mjs -------------------------------------------------------------------------------- /scripts/makeReadMe.mjs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/scripts/makeReadMe.mjs -------------------------------------------------------------------------------- /setupTests.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/setupTests.js -------------------------------------------------------------------------------- /src/components/containers/Group.test.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/src/components/containers/Group.test.tsx -------------------------------------------------------------------------------- /src/components/containers/Group.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/src/components/containers/Group.tsx -------------------------------------------------------------------------------- /src/components/containers/Svg.test.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/src/components/containers/Svg.test.tsx -------------------------------------------------------------------------------- /src/components/containers/Svg.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/src/components/containers/Svg.tsx -------------------------------------------------------------------------------- /src/components/dimension/Distance.test.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/src/components/dimension/Distance.test.tsx -------------------------------------------------------------------------------- /src/components/dimension/Distance.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/src/components/dimension/Distance.tsx -------------------------------------------------------------------------------- /src/components/markers/Marker.test.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/src/components/markers/Marker.test.tsx -------------------------------------------------------------------------------- /src/components/markers/Marker.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/src/components/markers/Marker.tsx -------------------------------------------------------------------------------- /src/components/markers/MarkerArrow.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/src/components/markers/MarkerArrow.tsx -------------------------------------------------------------------------------- /src/components/markers/MarkerLine.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/src/components/markers/MarkerLine.tsx -------------------------------------------------------------------------------- /src/components/markers/MarkerSquare.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/src/components/markers/MarkerSquare.tsx -------------------------------------------------------------------------------- /src/components/markers/MarkerTriangle.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/src/components/markers/MarkerTriangle.tsx -------------------------------------------------------------------------------- /src/components/path/Path.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/src/components/path/Path.test.ts -------------------------------------------------------------------------------- /src/components/path/Path.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/src/components/path/Path.ts -------------------------------------------------------------------------------- /src/components/path/PathMerge.test.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/src/components/path/PathMerge.test.tsx -------------------------------------------------------------------------------- /src/components/path/PathMerge.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/src/components/path/PathMerge.tsx -------------------------------------------------------------------------------- /src/components/shapes/basic/index.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/src/components/shapes/basic/index.tsx -------------------------------------------------------------------------------- /src/components/shapes/curves/index.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/src/components/shapes/curves/index.tsx -------------------------------------------------------------------------------- /src/components/shapes/index.test.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/src/components/shapes/index.test.tsx -------------------------------------------------------------------------------- /src/components/shapes/index.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/src/components/shapes/index.tsx -------------------------------------------------------------------------------- /src/components/shapes/misc/index.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/src/components/shapes/misc/index.tsx -------------------------------------------------------------------------------- /src/components/shapes/polygons/index.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/src/components/shapes/polygons/index.tsx -------------------------------------------------------------------------------- /src/components/shapes/radial/index.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/src/components/shapes/radial/index.tsx -------------------------------------------------------------------------------- /src/components/shapes/symbols/index.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/src/components/shapes/symbols/index.tsx -------------------------------------------------------------------------------- /src/components/text/Text.test.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/src/components/text/Text.test.tsx -------------------------------------------------------------------------------- /src/components/text/Text.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/src/components/text/Text.tsx -------------------------------------------------------------------------------- /src/components/text/TextPath.test.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/src/components/text/TextPath.test.tsx -------------------------------------------------------------------------------- /src/components/text/TextPath.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/src/components/text/TextPath.tsx -------------------------------------------------------------------------------- /src/docs/demos.mjs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/src/docs/demos.mjs -------------------------------------------------------------------------------- /src/docs/docs.mjs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/src/docs/docs.mjs -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/src/index.ts -------------------------------------------------------------------------------- /src/types/distance.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/src/types/distance.ts -------------------------------------------------------------------------------- /src/types/group.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/src/types/group.ts -------------------------------------------------------------------------------- /src/types/markers.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/src/types/markers.ts -------------------------------------------------------------------------------- /src/types/pathmerge.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/src/types/pathmerge.ts -------------------------------------------------------------------------------- /src/types/shapes/basic.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/src/types/shapes/basic.ts -------------------------------------------------------------------------------- /src/types/shapes/common.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/src/types/shapes/common.ts -------------------------------------------------------------------------------- /src/types/shapes/curves.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/src/types/shapes/curves.ts -------------------------------------------------------------------------------- /src/types/shapes/misc.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/src/types/shapes/misc.ts -------------------------------------------------------------------------------- /src/types/shapes/polygons.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/src/types/shapes/polygons.ts -------------------------------------------------------------------------------- /src/types/shapes/radial.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/src/types/shapes/radial.ts -------------------------------------------------------------------------------- /src/types/shapes/symbols.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/src/types/shapes/symbols.ts -------------------------------------------------------------------------------- /src/types/svg.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/src/types/svg.ts -------------------------------------------------------------------------------- /src/types/text.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/src/types/text.ts -------------------------------------------------------------------------------- /src/utils/attach.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/src/utils/attach.test.ts -------------------------------------------------------------------------------- /src/utils/attach.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/src/utils/attach.ts -------------------------------------------------------------------------------- /src/utils/cleanAttributes.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/src/utils/cleanAttributes.ts -------------------------------------------------------------------------------- /src/utils/createSimpleComponent.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/src/utils/createSimpleComponent.ts -------------------------------------------------------------------------------- /src/utils/id.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/src/utils/id.ts -------------------------------------------------------------------------------- /src/utils/renderElement.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/src/utils/renderElement.test.ts -------------------------------------------------------------------------------- /src/utils/renderElement.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/src/utils/renderElement.ts -------------------------------------------------------------------------------- /src/utils/shapeFactory.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/src/utils/shapeFactory.ts -------------------------------------------------------------------------------- /src/utils/shorthand.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/src/utils/shorthand.test.ts -------------------------------------------------------------------------------- /src/utils/shorthand.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/src/utils/shorthand.ts -------------------------------------------------------------------------------- /src/utils/validateProps.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/src/utils/validateProps.ts -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/tsconfig.json -------------------------------------------------------------------------------- /vitest.config.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joemaddalone/react-svg-path/HEAD/vitest.config.ts --------------------------------------------------------------------------------