feat: support cursor editor (#88)

Co-authored-by: Eric Clemmons <eric@smarterspam.com>
This commit is contained in:
Alan.He
2024-11-02 10:59:44 +08:00
committed by GitHub
parent cb0135c510
commit 32bd930dae
4 changed files with 10 additions and 4 deletions

View File

@@ -0,0 +1,5 @@
---
"click-to-react-component": patch
---
feat: support cursor

1
.gitignore vendored
View File

@@ -1,5 +1,6 @@
.DS_Store
.turbo
.idea
# Logs
logs

View File

@@ -18,7 +18,7 @@
[Create React App](https://create-react-app.dev/),
& [Vite](https://github.com/vitejs/vite/tree/main/packages/plugin-react)
that use [@babel/plugin-transform-react-jsx-source](https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-react-jsx-source)
- Supports `vscode` & `vscode-insiders`' [URL handling](https://code.visualstudio.com/docs/editor/command-line#_opening-vs-code-with-urls)
- Supports `vscode` & `vscode-insiders` & `cursor` [URL handling](https://code.visualstudio.com/docs/editor/command-line#_opening-vs-code-with-urls)
- Automatically **tree-shaken** from `production` builds
- Keyboard navigation in context menu (e.g. <kbd>←</kbd>, <kbd>→</kbd>, <kbd>⏎</kbd>)
- More context & faster than using React DevTools:

View File

@@ -1,6 +1,6 @@
export { ClickToComponent } from './ClickToComponent'
export { ClickToComponent } from './ClickToComponent';
export type Editor = 'vscode' | 'vscode-insiders'
export type Editor = 'vscode' | 'vscode-insiders' | 'cursor';
export type PathModifier = (path: string) => string;
@@ -16,4 +16,4 @@ export type Target = HTMLElement
export type ContextMenuProps = {
onClose?: () => void;
pathModifier?: PathModifier;
}
}