nilbuild/driver.js ? reverse-engineered prompt
Reverse engineered prompt
Build me a small, dependency free JavaScript library for guiding a user’s attention around a web page. I want it to be good for product tours, feature callouts, onboarding, and simple spotlight style overlays. It should be able to highlight any element on the page, dim everything else, and show an optional popover with a title, description, and next or previous controls. It should also work for one off focus moments, not just full tours.
Please make it lightweight, written in TypeScript, easy to customize, and usable across major browsers. Keyboard support matters, so people should be able to move through steps and close it without a mouse. I also want a clean API with hooks or callbacks so developers can react before an element is highlighted, while it is active, and when it is dismissed.
If possible, include a simple docs or demo site with examples for highlighting, popovers, tours, and API usage. Look up current docs patterns online if you need to.
Are you gonna build this?
make sure you review the code using coderabbit