Add the hints module
A standalone hints() factory: a pulsing beacon per element that opens a popover when clicked. Independent of the tour — no overlay, no body class, no shared state — so the page stays interactive and hints can be used without a tour at all. The popover is the primitive extracted in the previous commit, anchored to the beacon rather than the element, which keeps the arrow pointing at the dot without any new positioning code. Closing and dismissing are separate: an outside click, Escape or a second click on the beacon closes the popover and keeps the beacon, while the Got it button dismisses the hint. onDismiss plus stable ids is the persistence hook; storage stays in userland. Tour interplay needs no coupling in either direction. The tour already marks the body while it runs, so CSS hides the beacons and a body-class observer closes an open hint. Nothing to register, and it works with any driver instance. Beacons are real buttons (focus, Enter/Space, ARIA for free), centered on one of the twelve anchor points of the element's box by CSS, sized and coloured through custom properties. An IntersectionObserver hides a beacon whose element scrolls out of view, and scroll is captured so nested containers reposition too.
K
Kamran Ahmed committed
71a70682b9bd439c45ac3d92b57359d80afa27d4
Parent: 1a4484e