Skip to content

Commit 2dff0dd

Browse files
committed
feat(core): make useKeyPress public and export it
1 parent f85ea42 commit 2dff0dd

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

.changeset/weak-timers-think.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@vue-flow/core": minor
3+
---
4+
5+
Make `useKeyPress` public and export it

packages/core/src/composables/useKeyPress.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ const window = useWindow()
7474
/**
7575
* Composable that returns a boolean value if a key is pressed
7676
*
77-
* @internal
77+
* @public
7878
* @param keyFilter - Can be a boolean, a string, an array of strings or a function that returns a boolean. If it's a boolean, it will act as if the key is always pressed. If it's a string, it will return true if a key matching that string is pressed. If it's an array of strings, it will return true if any of the strings match a key being pressed, or a combination (e.g. ['ctrl+a', 'ctrl+b'])
7979
* @param options - Options object
8080
*/

packages/core/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ export { useHandleConnections } from './composables/useHandleConnections'
7373
export { useNodesData } from './composables/useNodesData'
7474
export { useEdgesData } from './composables/useEdgesData'
7575
export { useNodesInitialized } from './composables/useNodesInitialized'
76+
export { useKeyPress } from './composables/useKeyPress'
7677

7778
export { VueFlowError, ErrorCode, isErrorOfType } from './utils/errors'
7879

0 commit comments

Comments
 (0)