diff --git a/src/lib/hooks/useHover/index.svelte.ts b/src/lib/hooks/useHover/index.svelte.ts index 8f3f22c0..aa88cdda 100644 --- a/src/lib/hooks/useHover/index.svelte.ts +++ b/src/lib/hooks/useHover/index.svelte.ts @@ -1,4 +1,5 @@ import type { Floating } from '../useFloating/index.svelte.js'; +import type { Interaction } from '../useInteractions/index.svelte.js'; interface DelayOptions { /** @@ -46,7 +47,7 @@ interface HoverOptions { move?: boolean; } -class Hover { +class Hover implements Interaction { readonly #floating: Floating; readonly #options: HoverOptions; readonly #enabled = $derived.by(() => this.#options.enabled ?? true); diff --git a/src/lib/hooks/useInteractions/index.svelte.ts b/src/lib/hooks/useInteractions/index.svelte.ts new file mode 100644 index 00000000..3a5a894b --- /dev/null +++ b/src/lib/hooks/useInteractions/index.svelte.ts @@ -0,0 +1,8 @@ +import type { HTMLAttributes } from 'svelte/elements'; + +interface Interaction { + reference: HTMLAttributes; + floating: HTMLAttributes; +} + +export { type Interaction };