This repository is a monorepo for `driver.js`, a lightweight, zero-dependency JavaScript library for creating product tours, feature highlights, and contextual hints on web pages. The core library is in `packages/driver/` and exports two main factories: `driver()` for guided tours with an overlay cutout and popover, and `hints()` for persistent beacon-style hints. The architecture follows an instance-based pattern where each driver or hints instance owns its configuration, state, and event emitter, avoiding global state. Key modules include a pure-geometry positioning system (`position.ts`), an SVG overlay with animated stage transitions (`overlay.ts`, `stage.ts`), a popover renderer shared between tours and hints (`popover.ts`), and capture-phase click handling with `WeakMap`-based listeners (`click.ts`). The library has no runtime dependencies, comprehensive test coverage (vitest + jsdom), and supports keyboard navigation, animation, theming via CSS custom properties, and lifecycle hooks. The monorepo also includes two Astro-based applications: `apps/docs` (documentation site with live code samples) and `apps/playground` (interactive examples). The codebase demonstrates strong engineering practices with clean abstractions, instance isolation, and reusable primitives.
Intro.js is a mature, client-side JavaScript library for creating step-by-step product tours and persistent hints on web pages. It operates entirely in the browser with no server dependencies, using a custom reactive DOM library (similar to VanJS) for state-driven UI rendering. The library exposes two main products: `introJs.tour()` for guided walkthroughs and `introJs.hint()` for annotation tooltips. Tours support dynamic step fetching, keyboard navigation, scroll-to behavior, callback hooks, and a 'don't show again' cookie feature. Hints auto-refresh on scroll/resize and can be triggered via data attributes or programmatic options. The codebase is modular, with separate packages for tour, hint, tooltip, and DOM utilities, and includes comprehensive unit tests (Jest) and visual regression tests (Cypress). While the core architecture is clean and well-tested, the library carries some legacy API surface (deprecated `introJs()` function) and outdated example integrations (Bootstrap v3, jQuery), indicating moderate technical drift. It is actively maintained with recent commits and GitHub Actions CI/CD.