mouseLeftPage
Reactive state to show whether the mouse leaves the page.
Demo
Mouse has left: No
Usage
<script>
import { mouseLeftPage } from 'svelte-legos';
const hasLeft = mouseLeftPage();
// $hasLeft => true
// if mouse has left the document
// $hasLeft => false
// if mouse is in the document
</script>