Releases: knowledgecode/blokr
Releases · knowledgecode/blokr
v0.4.0
What's Changed
- React Hook Support: Add
useBlokrHook for element-scoped or global user interaction blocking in React applications - Enhanced Event Blocking: Expand blocked event types from 6 to 13 events (added: click, dragstart, mouseup, pointerdown, pointermove, pointerup, selectstart)
- Dynamic Listener Management: Optimize performance by activating/deactivating event listeners only when needed
- Improved API: Add comprehensive JSDoc comments and improve type safety with cross-platform timer types
- Multi-Entry Build: Support both
blokr(core) andblokr/reactentry points - Breaking Change: Remove UMD format (ES modules only)
Full Changelog: v0.3.0...v0.4.0
v0.3.0
What's Changed
This release introduces significant API changes to Blokr v0.3.0, moving from a singleton pattern to a factory function pattern with support for element-specific event blocking.
Major Changes
- Factory Function Pattern:
blokr()now returns instances instead of being a singleton - Element-Specific Locks: Lock interactions for specific DOM elements with configurable scope
- Scope Filtering: Block events inside, outside, or on target elements only
- Options-Based API: Timeout and scope are now lock options, not global settings
- Filter-Based Event Blocking: Replaces boolean flag with Set of filter functions
Key Features
- ✅ Factory function with WeakMap-based instance caching
- ✅ Scope filtering (inside, outside, self)
- ✅ Per-lock timeout configuration
- ✅ No reference counting
- ✅ 45 tests passing (24 unit, 21 integration)
Breaking Changes
blokr.lock()→blokr().lock()blokr.unlock()→blokr().unlock()(no abort parameter)blokr.setTimeout(ms)→blokr().lock({ timeout: ms })- UMD global name:
window.Blokr→window.blokr
Migration Guide
See README.md Migration from v0.2.x section for detailed migration instructions.
Full Changelog: v0.2.1...v0.3.0
v0.2.1
v0.2.0
What's Changed
- Add abort parameter to unlock() method by @knowledgecode in #1
New Contributors
- @knowledgecode made their first contribution in #1
Full Changelog: v0.1.0...v0.2.0
v0.1.0
Full Changelog: https://github.com/knowledgecode/blokr/commits/v0.1.0