Commit Graph
542 Commits
Author SHA1 Message Date
Kamran Ahmed d9f20e9342 Replace dts-bundle-generator with vite-plugin-dts
- 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).
2026-06-23 10:10:02 +01:00
Kamran Ahmed 7ad2db4756 Add np for interactive releases
- `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")
2026-06-23 09:48:04 +01:00
Kamran Ahmed 5e7fcfd0db Remove release workflow
Reverts auto-publish on tag push; releases stay manual.
2026-06-23 09:48:04 +01:00
Kamran Ahmed 805f8ed109 Add release workflow to publish on tag push
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.
2026-06-23 09:48:04 +01:00
Kamran Ahmed dbcda5db19 Add CI workflow to build and test on PRs
Runs `pnpm build` and `pnpm test:run` on pushes and pull requests to
master using pnpm + Node 22. There was no CI previously.
2026-06-23 09:48:04 +01:00
Kamran Ahmed 7d6de08569 Add a jsdom test suite for the public API
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.
2026-06-23 09:48:04 +01:00
Kamran Ahmed 66d71fd269 Style the playground with Tailwind CSS
- 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
2026-06-23 09:48:04 +01:00
Kamran Ahmed 6d3863642b Modernize tooling and add an Astro examples playground
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
2026-06-23 09:48:04 +01:00
André Goulart Nogueira 4e4d07d481 Fix typo in button guide documentation (#594)
`onPreviousClick` is not a valid callback. The correct syntax is `onPrevClick`.
2026-02-27 11:36:55 +00:00
Kamran Ahmed 061fb774fb Bump version 1.4.0 1.4.0 2025-11-18 22:21:52 +00:00
Kamran Ahmed df376f58e2 Adds support for overlayClickBehavior (#600)
* Add overlay click behavior

* Add overlay click behavior
2025-11-18 22:17:00 +00:00
Vadim KonungandJarik Marwede e5baef1274 update: Adds a missing type option in the guide for the configuration (#573)
* 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>
2025-07-11 12:56:56 +01:00
Kamran Ahmed 2c19cd0fca fix: grammar on readme 2025-07-09 13:28:16 +01:00
Kamran Ahmed e90b0d7bf0 Bump version 1.3.6 1.3.6 2025-05-13 09:38:12 +01:00
Jarik Marwede c1123f9f16 Fix children of driver buttons not triggering click events (#560)
* Fix children of driver buttons not triggering click events

* Replace custom function with Element.closest()
2025-05-13 09:36:36 +01:00
6aea0113d8 Add missing option (#562)
* Update configuration.mdx

Adding instructions for the overlayClickBehavior configuration option.

* Update docs/src/content/guides/configuration.mdx

Co-authored-by: Jarik Marwede <account@jarikmarwede.com>

* Update docs/src/content/guides/configuration.mdx

Co-authored-by: Jarik Marwede <account@jarikmarwede.com>

---------

Co-authored-by: Jarik Marwede <account@jarikmarwede.com>
Co-authored-by: Kamran Ahmed <kamranahmed.se@gmail.com>
2025-04-11 14:35:59 +01:00
Kamran Ahmed 1a36d65f98 Add jsdelivr stats 2025-02-06 13:17:14 +00:00
Kamran Ahmed f672f3fe95 Bump version 1.3.5 1.3.5 2025-02-03 17:34:30 +00:00
Ervan Prastyanto 4b9eebe570 Fix: package.json to correct sort default and require (#546) 2025-02-03 17:33:18 +00:00
Jarik Marwede bb08637eb5 Fix onPopoverRender type definition (#548) 2025-02-03 17:32:08 +00:00
Kamran Ahmed e2a780ee3a Improve UI 2025-02-03 01:05:29 +00:00
Kamran Ahmed be9e7e53a3 Update opensource banner border 2025-02-03 01:03:29 +00:00
Kamran Ahmed d0e57d99b7 Update hero section heading 2025-02-03 00:44:25 +00:00
Kamran Ahmed 6bd64db882 Fix CSS not importable in CSS file 1.3.4 2025-02-02 15:53:50 +00:00
Kamran Ahmed 8996e6aa41 Bump version 1.3.3 1.3.3 2025-02-02 15:42:10 +00:00
Kamran Ahmed 19d10fffd2 Improve scroll for taller elements 2025-02-02 15:41:32 +00:00
Kamran Ahmed 34367c9db5 Update npm badge 2025-02-02 13:25:31 +00:00
Kamran Ahmed 871a2103ab Bump version 1.3.2 1.3.2 2025-02-02 04:24:29 +00:00
Kamran Ahmed 04bbfaa33d Add patch for positioning 2025-02-02 04:23:58 +00:00
Jarik Marwede 2dda34a484 Fix custom buttons example (#544) 2025-02-01 22:24:33 +00:00
Kamran Ahmed 9b3243f47f Update installation version 2025-01-31 01:34:59 +00:00
Kamran Ahmed 333d0df15b Add support for driver object in hooks 2025-01-31 01:32:56 +00:00
Kamran Ahmed 55c95d547c Update cdn version in docs 2025-01-31 01:05:52 +00:00
Richard c9713c715d feat: allow element to be type function that returns an element (#463) 2025-01-22 17:19:16 +00:00
Kamran Ahmed fa7aa82a04 Remove old docs link 2025-01-22 17:18:28 +00:00
Mahesh Perera e43c08142a Added 'disableActiveInteraction' per step. (#534) 2025-01-20 00:25:17 +00:00
Kamran Ahmed d921c63893 Update twitter link 2024-10-20 10:12:23 +01:00
Huang Chenghao 80a8e2360b Feature/support click mask to next step (#499)
* feature: Support click mask to next step

* refactor: rename `clickMaskBehavior` to `overlayClickBehavior`
2024-07-30 22:58:06 +01:00
Daniel Turuș 71a1d7763f Removed duplicated semicolons (#494) 2024-05-30 00:30:04 +01:00
Arik Chakma 6bcb82f69e chore: update current year (#488) 2024-05-30 00:29:48 +01:00
Kamran Ahmed 9e6f1a45b3 Replace old documentation link 2024-03-26 02:57:48 +00:00
Charles Chrismann 0889e01c80 Fixing color names in the doc (#448)
* ✏️ fix colors in styling-overlay examples

* ✏️ fix colors in styling-overlay examples
2023-11-28 02:00:23 +00:00
Kamran Ahmed e65eaf383e Bump version 1.3.1 1.3.1 2023-11-10 18:12:28 +00:00
Artur ca680f04e1 Add programmatically destroy to api docs (#438) 2023-11-04 22:54:10 +00:00
Rafael Heard 124a216bee add license to package.json (#432) 2023-09-27 21:35:52 +01:00
Neil Berkman 087934d5d9 Fix grammatical error (#430)
> 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.
2023-09-17 18:56:31 +01:00
protogenesis f84b72b812 fix: type error in the vite configuration file. (#416) 2023-09-04 11:26:00 +01:00
Human Humanov 51ad881cdd docs: Installation CDN example fix (#417) 2023-09-04 11:24:56 +01:00
Kamran Ahmed d9dddec4d7 Upgrade dependencies 2023-09-04 11:21:47 +01:00
Kamran Ahmed b2d54bde0e Bump version of driver.js 1.3.0 2023-09-04 11:17:14 +01:00