Skip to content

Commit

Permalink
feat: support cursor editor (#88)
Browse files Browse the repository at this point in the history
Co-authored-by: Eric Clemmons <[email protected]>
  • Loading branch information
alanhe421 and ericclemmons authored Nov 2, 2024
1 parent cb0135c commit 32bd930
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/many-lies-fold.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"click-to-react-component": patch
---

feat: support cursor
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.DS_Store
.turbo
.idea

# Logs
logs
Expand Down
2 changes: 1 addition & 1 deletion packages/click-to-react-component/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions packages/click-to-react-component/src/types.d.ts
Original file line number Diff line number Diff line change
@@ -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;

Expand All @@ -16,4 +16,4 @@ export type Target = HTMLElement
export type ContextMenuProps = {
onClose?: () => void;
pathModifier?: PathModifier;
}
}

0 comments on commit 32bd930

Please sign in to comment.