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.
npm install @sheetwrite/core@0.5.1
Update each adapter and add-on you use to 0.5.1 too: all packages release together.
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

macOS

⌘⇧K

Windows / Linux

CtrlShiftK

Mod+Shift+K
Binding rules and API changes

The same binding can use an object:

const shortcut = {
key: "k",
mod: true,
shift: true
};
  • Mod accepts Command or Control. Ctrl and Meta mean those specific keys.
  • ContextMenuItem.shortcut accepts a bound action name, such as "copy", or a key combination. Replace free-text hints with one of these forms.
  • Use config.keyboard.bindings to change or disable an action's keys.
  • With Grid focus, a context-menu item's key combination runs its onClick handler. Combinations with Mod, Ctrl, or Meta also work in the inline editor.
  • Conflicts throw SheetwriteError with code shortcut-conflict. Malformed combinations throw invalid-shortcut.

Action feedback

  1. ReadyExport XLSX

    Start the command.

  2. Running Exporting…

    Busy state. Repeated starts are ignored.

  3. FailedExport failed

    A visible error explains the failure.

Built-in toolbar, context-menu, and find buttons show these states. Blocked clipboard access shows a recovery message.

Export completion and error handling

GridActions.exportXlsx() returns a promise that never rejects. Await it to wait for the command to finish, including after a failure. Built-in export failures show an alert and emit export-error, with format "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. EveryoneRequired

    Update every package together

    Install 0.5.1 for each @sheetwrite/* package that you use. Packages from different versions are not supported together.

    corewasmformulasxlsxreactvuesvelte

  2. If you set ContextMenuItem.shortcutAPI change

    Replace free-text shortcut hints

    Use a bound action name or a typed key combination. The Grid now runs the item when the user presses the keys, and a conflict throws shortcut-conflict.

    Beforeshortcut: "⌘⇧O"

    Aftershortcut: "Mod+Shift+O" or shortcut: "copy"

  3. If you call grid.actions.exportXlsx()Behavior change

    Await the action, but do not catch it

    The action returns a promise that resolves when the command finishes, also after a failure. Failures show an alert and emit export-error. Direct grid.exportXlsx() calls still reject.

  4. If you listen to export-errorBehavior change

    Handle CSV and XLSX failures

    The event format is now "csv" or "xlsx".

  5. If you upgrade from before 0.5.0Also do

    Complete the 0.5.0 steps first

    Read the 0.5.0 upgrade checklist. It covers initSheetwrite(), the server restoreBlock operation, and the breaking CellStore.setBlock change.

Documentation