Skip to content

Sheetwrite 0.5.1

Typed shortcuts, busy states and visible command errors, restored column sum performance, redesigned documentation, and the upgrade checklist for Sheetwrite 0.5.1.
On this page

Sheetwrite 0.5.1 adds typed keyboard shortcuts and clear feedback for built-in commands. It makes column sums about twice as fast as in 0.5.0 and redesigns the docs. All seven packages release as 0.5.1. Read the upgrade checklist for the shortcut and export API changes.

Highlights

  • Custom shortcuts. Use typed key combinations with platform-aware labels in context menus and toolbars.
  • Command feedback. Built-in buttons show busy states and visible errors.
  • Faster column sums. About twice as fast as 0.5.0. Literal values use a direct read path; calculated values keep the formula-aware path.
  • Redesigned docs. A task-focused home, grouped navigation, and clearer API pages make guides and examples easier to find.

Changes

Typed shortcuts

A key combination can be a string such as "Mod+Shift+K" or an object such as { key: "k", mod: true, shift: true }. Mod shows as Command on macOS and as Control elsewhere, and accepts either key. Ctrl and Meta always mean those specific keys.

API change: ContextMenuItem.shortcut accepts a bound action name, such as "copy", or a key combination. Replace free-text shortcut hints with one of these forms. Use config.keyboard.bindings to change or disable an action's keys.

A context-menu item with a key combination and an onClick handler now runs that handler when the Grid has focus and the user presses the combination. Combinations with Mod, Ctrl, or Meta also work in the inline editor. Conflicting commands throw SheetwriteError with code shortcut-conflict; malformed combinations throw invalid-shortcut.

Action feedback

Built-in toolbar, context-menu, and find buttons show a busy state while a command runs and show errors when it fails. Repeated starts of a pending command are ignored. Blocked clipboard access shows a recovery message.

GridActions.exportXlsx() now returns a promise that never rejects. Built-in export failures show an alert and emit export-error, whose format can be "csv" or "xlsx". Direct Grid.exportXlsx() calls still reject on failure.

Fixes

  • Column sums are about twice as fast as in 0.5.0: literal values are read directly, and unused count and minimum/maximum work is skipped. In paired runs against 0.4.0, sums are faster at 1,000, 10,000, 500,000 and 1,000,000 rows and 22.7% slower at 100,000 rows. Sorting also avoids unnecessary read overhead. Calculated values keep the formula-aware path.
  • Fix docs search and not-found pages.
  • Wait for npm validation before release publishing continues.

Documentation

  • Docs pages use an open reading layout. Tables scroll inside a frame and keep short values on one line. Links are underlined.
  • A version tag next to the logo opens the latest release notes, and a Releases section in the sidebar lists every version with its date.
  • The Grid methods in the configuration guide are grouped by area and link to the API reference.
  • Each benchmark on the performance page shows its result first. Full tables are in a closed "All measurements" section.
  • API pages show checked examples and related links.

Upgrade checklist

  1. Update all installed @sheetwrite/* packages to 0.5.1 together: core, wasm, formulas, xlsx, react, vue, and svelte as applicable.
  2. Replace free-text ContextMenuItem.shortcut hints with an action name or a typed key combination. Check custom bindings for conflicts.
  3. Await GridActions.exportXlsx() when you need to wait for the built-in command to finish. It handles failures without rejecting; direct Grid.exportXlsx() still requires error handling.
  4. Update export-error handlers to accept both "csv" and "xlsx" formats.
  5. If you upgrade from before 0.5.0, complete the 0.5.0 upgrade checklist too.
Documentation