Skip to content

1.0.1

Choose a tag to compare

@hunvreus hunvreus released this 28 Jun 02:52
· 27 commits to main since this release

Patch release for Basecoat's JavaScript lifecycle and docs-site history restore behavior.

Added

Added explicit force reinitialization support:

window.basecoat.init("select", { force: true })
window.basecoat.initAll({ force: true })

Use this when a framework or navigation library restores previously initialized DOM from a cache, such as HTMX history restore.

Force mode destroys existing component instances before reinitializing them, so it also resets transient state such as open menus, focus state, and active interactions.

Fixed

  • Reinitialized Basecoat components after HTMX history restores in the docs site.
  • Sanitized serialized HTMX history cache entries so restored docs pages do not keep stale Basecoat initialization state.

Notes

Normal initialization remains conservative:

window.basecoat.initAll()

It only initializes components that are not already initialized.