Subscribes to page visibility via useSyncExternalStore so polling, timers and video pause when the tab is hidden, with onVisible/onHidden callbacks and the away duration.
npx shadcn@latest add @zyeon/use-page-visibilityZyeon UI limits how often it can be asked, and usePageVisibility hasn't had its turn. Its source will show here once it has.