Skip to content

Releases: haaarshsingh/kmenu

2.0.3

15 Aug 07:44
6f9368a

Choose a tag to compare

Based on the context and the major rewrite to v2, here's a comprehensive changelog for the v2.0.3 release:

kmenu v2.0.3

Major Rewrite: Welcome to kmenu v2

This release represents a complete architectural overhaul of kmenu with a focus on performance, developer experience, and maintainability.

Breaking Changes

This is a major version with breaking changes. If you're upgrading from v1.x, please follow our comprehensive Migration Guide to update your implementation.

New Architecture

  • Monorepo Structure: Split into separate @kmenu/core and @kmenu/react packages
  • Headless Core: Framework-agnostic command palette logic
  • React Components: Composable, accessible React components
  • TypeScript First: Complete TypeScript rewrite with improved type safety

New Features

Composable API

Replace the old MenuProvider/CommandWrapper pattern with a more flexible component-based approach:

// v2 API
import { Command, CommandInput, CommandList, CommandOption } from '@kmenu/react'

<Command>
  <CommandInput placeholder="Search..." />
  <CommandList>
    <CommandOption>Option 1</CommandOption>
    <CommandOption>Option 2</CommandOption>
  </CommandList>
</Command>

Performance Improvements

  • Faster Filtering: Improved fuzzy search algorithm
  • Better SSR: Enhanced server-side rendering support
  • Reduced Bundle Size: Optimized package splitting

Enhanced Styling

  • CSS Variables: Easy theming with CSS custom properties
  • Better Accessibility: Improved ARIA support and keyboard navigation
  • Responsive Design: Better mobile experience

Bug Fixes (v2.0.3)

  • Fixed: Build errors when importing from @kmenu/core and @kmenu/react packages
  • Fixed: SSR compatibility issues with React 19
  • Fixed: React Hook dependency warnings in development
  • Fixed: Icon rendering issues during server-side prerendering
  • Fixed: Model viewer component hydration mismatches
  • Fixed: Import path resolution in monorepo structure

Improvements

  • Enhanced: TypeScript definitions for better IDE support
  • Enhanced: Error messages and debugging experience
  • Enhanced: Documentation and examples
  • Enhanced: Package.json exports for better module resolution

Package Structure

  • kmenu: Core headless logic (framework-agnostic)
  • @kmenu/react: React components and hooks

Migration Required

Important: This release requires code changes to upgrade from v1.x. The API has been completely redesigned for better developer experience and performance.

Follow the Migration Guide for step-by-step instructions.

Updated Documentation

  • New examples showcasing v2 capabilities
  • Complete API reference
  • Migration guide with before/after comparisons
  • TypeScript usage patterns

Installation

npm install kmenu @kmenu/react
# or
pnpm add kmenu @kmenu/react
# or
yarn add kmenu @kmenu/react
# or
bun add kmenu @kmenu/react

Full Changelog: v1.4.32...v2.0.3

v1.0.1

18 Jun 06:06

Choose a tag to compare

Fixes

  • Dynamic commands not loading in when fetched
  • Animation issues on Firefox

Enhancements

  • New Documentation website
  • Monorepo with Turborepo
  • Checkboxes
  • New types for menu dimensions
  • Anchor property
  • Export useShortcut hook

Breaking Changes

  • Removed config option to menu. Use CSS variables instead.
  • Remove main keyword. Defaults to menu with an index of 1.

v1.0.0-beta-git

14 Aug 05:31

Choose a tag to compare

v1.0.0-beta-git Pre-release
Pre-release

This release contains some minor additions along with some fixes from the kmenu v1 beta.

Enhancements

  • Make class names easier to style.
  • Fix bug with default background blur.
  • Added transitions for the command colours.
  • Removed default styling for non-module scoped SVGs.
  • Fix bug with children on the MenuProvider component.
  • Fix issues with UI elements not being interactive after closing/opening the menu in dev.

If you're on the beta, I would highly recommend that you upgrade onto this today.

v1.0.0-beta

06 Aug 07:25

Choose a tag to compare

v1.0.0-beta Pre-release
Pre-release

The official beta for kmenu v1! I had officially released this on Product Hunt a while ago, and I saw a lot of crucial features lacking. This launch adds more enhanced functionality to the menu and improves DX.

Enhancements

  • useCommands hook for sorting and dynamically updating commands
  • useKmenu hook for getting useful information such as states out the component
  • The MenuProvider component
  • Added default shortcuts for commands on the menu
  • Improved menu styling
  • Added new and useful types to define commands
  • Palette height dynamically adjusts for the commands, reducing unnecessary scroll
  • Better screen reader accessibility
  • Changed defaults of the menu theme configuration

Breaking changes

  • Commands have a completely different type now. They're organised into an array of categories, and each individual category has it's own array of commands. Check the documentation for more insight.
  • You do not need to define hooks anymore to handle the state of your component
  • Categories are no longer passed into the palettes. The new command type takes care of that automatically.
  • Individual config files are no longer passable onto the components. Pass them into the MenuProvider directly.
  • The PaletteConfig type has been renamed to MenuConfig
  • The main Palette has been renamed to CommandMenu

This is still a beta release! I would like to recieve some community feedback and fix some bugs before I release this 🎊