feat: add CanvasPathEditor and editable path functionality

- Implemented CanvasPathEditor component for editing paths on the canvas.
- Created editablePath module to handle path data manipulation and conversion to SVG.
- Introduced pathPen module for managing path drawing with a pen tool, including anchor management and path data generation.
- Added tests for editablePath and pathPen functionalities to ensure correctness of path editing and drawing behavior.
This commit is contained in:
2026-07-17 11:28:29 +08:00
parent fe4b08f548
commit d424b56076
30 changed files with 3791 additions and 44 deletions
+12
View File
@@ -12,6 +12,9 @@
"preview": "vite preview --host 0.0.0.0"
},
"dependencies": {
"@leafer-in/editor": "2.2.2",
"@leafer-ui/core": "2.2.2",
"@leafer-ui/interface": "2.2.2",
"@node-projects/acad-ts": "2.3.0",
"@radix-ui/react-context-menu": "^2.3.2",
"@radix-ui/react-dropdown-menu": "^2.1.19",
@@ -21,6 +24,7 @@
"@radix-ui/react-tabs": "^1.1.16",
"ag-psd": "31.0.2",
"leafer-ui": "2.2.2",
"leafer-x-path-editor": "^1.1.3",
"lucide-react": "^1.23.0",
"next": "^16.2.10",
"react": "^19.2.7",
@@ -34,5 +38,13 @@
"typescript": "^6.0.3",
"vite": "^8.1.3",
"vite-plugin-compression2": "^2.5.3"
},
"pnpm": {
"overrides": {
"leafer-x-path-editor>@leafer-in/state": "2.2.2"
},
"patchedDependencies": {
"leafer-x-path-editor@1.1.3": "patches/leafer-x-path-editor@1.1.3.patch"
}
}
}