tscircuit / snippets

https://snippets.tscircuit.com
MIT License
4 stars 16 forks source link

Allow Dragging and Dropping Components #132

Open seveibar opened 2 days ago

seveibar commented 2 days ago

This is one of the key enablers to make snippets the best way to make keyboards

Image

Image

seveibar commented 2 days ago

The manual edits file can be imported into the code and provided to <board as shown in this file: https://github.com/tscircuit/cli/blob/main/example-project/examples/macrokeypad.tsx

We probably also want to accept manualEdits directly

seveibar commented 2 days ago

Note: The CLI already does this, but the code isn't super reusable imo. The main thing is we get an event from PcbViewer and need to edit the manual-edits.ts file based on the event.

seveibar commented 2 days ago

Example of manual edits file: https://github.com/tscircuit/cli/blob/main/example-project/src/manual-edits.ts