feat(core): make useKeyPress public and export it

This commit is contained in:
braks
2024-06-19 18:21:10 +02:00
committed by Braks
parent e1e5282191
commit e435485b77
3 changed files with 7 additions and 1 deletions

View File

@@ -0,0 +1,5 @@
---
"@vue-flow/core": minor
---
Make `useKeyPress` public and export it

View File

@@ -74,7 +74,7 @@ const window = useWindow()
/**
* Composable that returns a boolean value if a key is pressed
*
* @internal
* @public
* @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'])
* @param options - Options object
*/

View File

@@ -73,6 +73,7 @@ export { useHandleConnections } from './composables/useHandleConnections'
export { useNodesData } from './composables/useNodesData'
export { useEdgesData } from './composables/useEdgesData'
export { useNodesInitialized } from './composables/useNodesInitialized'
export { useKeyPress } from './composables/useKeyPress'
export { VueFlowError, ErrorCode, isErrorOfType } from './utils/errors'