- Generate the bundled dist/driver.js.d.ts during `vite build` via
vite-plugin-dts (bundleTypes), dropping the separate
dts-bundle-generator step and its config
- Explicitly re-export the public types (Config, Popover, Side, etc.)
from the entry so the bundled .d.ts keeps the same export surface;
api-extractor only exports what the entry exports
Verified: the generated .d.ts has an identical export surface and
semantically identical type bodies to the previous output (12 types).
- `pnpm release` runs np, which prompts for patch/minor/major, then
bumps, tags, pushes and publishes
- Runs the non-watch `test:run` script before publishing
- prepublishOnly builds dist so publishes are never stale
- .npmrc sets an empty tag-version-prefix to keep tags like 1.4.0 (no "v")
Publishes to npm when a version tag (e.g. 1.4.0, no "v" prefix) is
pushed, matching the existing tag convention. Builds and tests before
publishing and authenticates via the NPM_TOKEN repo secret.
Replaces the placeholder test with focused, maintainable suites that
encode the documented API behaviour as a regression net for the
upcoming API migration:
- lifecycle: activate/highlight/destroy, active element, modal popovers
- navigation: drive, moveNext/movePrevious/moveTo, first/last, getters
- popover: buttons, progress text, custom class, onPopoverRender
- interactions: next/prev/close clicks and onNextClick/onPrevClick overrides
- keyboard: escape + arrow keys, allowClose/allowKeyboardControl
- hooks: onHighlightStarted/onHighlighted/onDeselected/onDestroyed
- config: getConfig/setConfig/setSteps/getState/refresh
Shared setup lives in tests/utils.ts. Also add test:run and
test:coverage scripts.
- Add tailwindcss v4 via the @tailwindcss/vite plugin
- Convert the layout, sidebar and stage to utility classes
- Keep driver.js-targeting popover styles in src/styles/global.css
since those elements are rendered by the library, not our markup
Library:
- Update all dev dependencies to latest (vite 4->8, vitest 0.34->4,
typescript 5.2->6, @types/node 26, dts-bundle-generator 9, prettier 3.8)
- Replace deprecated @vitest/coverage-c8 with @vitest/coverage-v8
- Drop unused ts-node; add jsdom and a jsdom test environment
- ESM vite config, modern tsconfig (ES2020, Bundler resolution),
Rollup 4 asset-name handling so the CSS still emits as driver.css
Playground:
- Replace the 1,165-line index.html with playground/, a self-contained
Astro app that imports the library from source with HMR
- Each scenario is its own file under playground/src/examples grouped into
Highlight / Popover & Buttons / Tour / API, listed in a sidebar and run
on its own page; shared demo markup lives in Stage.astro
- All 41 original scenarios ported and type-checked against the library types
- Wire `pnpm dev` to the playground; document local development in the readme
* Update `element` type
This change adds a missing type option to `element` property in the configuration to accept a function that returns an Element.
* adds mention in the comment for the type
* Update docs/src/content/guides/configuration.mdx
Co-authored-by: Jarik Marwede <account@jarikmarwede.com>
---------
Co-authored-by: Jarik Marwede <account@jarikmarwede.com>
> It's is a contraction and should be used where a sentence would normally read "it is." The apostrophe indicates that part of a word has been removed. It's with no apostrophe, on the other hand, is the possessive word, like "his" and "her," for nouns without gender.