diff --git a/.changeset/weak-timers-think.md b/.changeset/weak-timers-think.md new file mode 100644 index 00000000..c9fd56a7 --- /dev/null +++ b/.changeset/weak-timers-think.md @@ -0,0 +1,5 @@ +--- +"@vue-flow/core": minor +--- + +Make `useKeyPress` public and export it diff --git a/packages/core/src/composables/useKeyPress.ts b/packages/core/src/composables/useKeyPress.ts index 0a55c75f..c1051a7d 100644 --- a/packages/core/src/composables/useKeyPress.ts +++ b/packages/core/src/composables/useKeyPress.ts @@ -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 */ diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index 25cb57e8..371c4dfa 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -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'