Skip to content

v1.0.20

Latest

Choose a tag to compare

@debabin debabin released this 15 Nov 18:02
· 5 commits to main since this release

Add WebMCP tools

This release brings WebMCP support to Reactuse, introduces animated collapsible elements, expands test coverage, and improves the documentation experience.

Features

  • useWebMCP — connects a React component to the browser WebMCP API. A tool can be registered automatically on mount or controlled manually through register and unregister, while registration state and errors remain available to the UI. The latest execute callback is always used without recreating the tool.
  • createWebMCP — provides a standalone registry for exposing WebMCP tools outside the React lifecycle. Multiple named tools can coexist, duplicate registrations are safely replaced, and tools can be removed individually or cleared together.
  • useCollapse — handles the DOM measurements and height transitions needed for expandable content. It works with either an existing target or a returned ref and provides open, close, and toggle controls alongside configurable duration, easing, and transition callbacks.

Changes

  • Published a WebMCP guide with API documentation and interactive examples.
  • Added dedicated test suites for useWebMCP, createWebMCP, and useCollapse.
  • Covered additional edge cases in useClipboard, useContextMenu, useControllableState, and useDeviceList.
  • Refined hook demos and regenerated the function documentation.
  • Updated development dependencies and supporting tooling.