npm install @sheetwrite/core@0.7.2Sheetwrite 0.7.2 puts every control on one design system, redesigns the dialogs and the find bar, and shows something useful from the first byte to the first frame on a slow device. No API changes break existing code. Two visual changes can affect custom styles: some CSS class names changed, and the default accent colour is now Sheetwrite green. The upgrade checklist lists both. All ten packages release as 0.7.2.
Highlights
- Dialogs on one layout. Every dialog has a scrim, a header with a close button, a body that scrolls and one primary button. Keyboard shortcuts and Format Cells are redesigned.
- A redesigned Find & Replace bar. Icon buttons with tooltips, the match count in the search field, and Find all results in a table.
- No blank screen on slow devices. On a 6× CPU slowdown, the React showcase shows no blank frame instead of about 5.6 s of one, and a 1 MB XLSX import shows about 2 s of blank instead of about 94 s.
- One set of CSS tokens. A few inputs, such as the padding, the font size, the corner radius
and the colours, size and colour every control.
Themehas a newaccent. - Plain-value engine helpers. Write cells and convert formulas with one string per cell or formula, without packing buffers.
Changes
Dialogs
Every dialog shares one modal layout in both themes: a scrim that dims the page, a header with the title and a close button, a body that scrolls, and a row of buttons with one primary action. Controls are 32 px tall, 44 px on touch screens. On a phone, a dialog fills the screen.
- Keyboard shortcuts. The table fills the dialog under a sticky header. Each binding is one chip, and its remove button shows on hover or focus. On a phone, each command is stacked.
- Format Cells. The Number tab is laid out as Excel's: the Category list beside a Sample and the category's settings. The new Special category has Zip Code, Zip Code + 4, Phone Number and Social Security Number. The tabs share one height, so switching tabs doesn't jump.
- Merge warning. It lists the values a merge would discard, one per line, with a Merge button.
- Data validation alert. When a rule has no message of its own, the alert shows Excel's default text, then what the rule allows, with its bounds in the cell's number format.
- Paste Special, Data Validation, and the Insert and Delete choices use the same fields, tabs, lists and button rows.
See Keyboard shortcuts, the Format Cells dialog and the Data Validation dialog.
Find & Replace
The search field shows its match count inside it. Previous, Next, Find all, Replace, Options and
Close are icon buttons with tooltips, and Replace and Options are toggles. The replace field lines
up with the search field and stays hidden until you press Ctrl+H or turn on Replace. Use Ctrl+H
on a Mac too, as Excel for Mac does: Cmd+H hides the browser. Find all results are a table with a
sticky header, without a Formula column when no
match has a formula. The new findPrevious, findNext, findAll, replace and close icons
can be replaced through config.icons.
See Options and Find All in the find bar.
Skeletons and loading states
A slow device no longer shows an empty box between the engine loading and the grid painting:
- The React, Vue and Svelte
fallbackstays over the host until the grid paints its first frame, then fades out (at once underprefers-reduced-motion). - Without a
fallback, the adapters show a built-in skeleton of the column headers, row headers and grid lines at the grid's own sizes. To turn it off, passskeleton={false}in React and Svelte, or:skeleton="false"in Vue. A page without a framework callsrenderGridSkeleton(host, options)beforeinitSheetwrite. - A chart shows a static chart shape until it draws, a panel that loads later shows a skeleton body, and opening a large workbook shows an "Opening workbook…" status.
Measured with the CPU slowed 6×:
| Case | 0.7.1 | 0.7.2 |
|---|---|---|
| React showcase, time with a blank screen | about 5.6 s | none |
| Importing a 1 MB XLSX file, time with a blank screen | about 94 s | about 2 s |
Cells that are still loading paint a static bar in the new --sheetwrite-skeleton colour instead
of #LOADING! text, without animating the canvas. Screen readers read them as "Loading", and the
grid and the adapter host carry aria-busy="true" while they wait. getCell, copy and export are
unchanged. Dense datasource storage shows the same bars. The new loading-change event,
{ sheet, waiting }, tells you when the rows on screen start or stop waiting on getRows: React
onLoadingChange, Vue @loading-change and Svelte onLoadingChange.
See Loading states and skeletons and Show a skeleton while it loads.
CSS tokens and Theme.accent
Every size and colour in the stylesheet now comes from a few inputs in the new
styles/tokens.css: the padding (--sheetwrite-py, --sheetwrite-px), the font size, the corner
radius policy, the smallest touch and mouse targets, and the base colours. Spacing, control
heights, radii, focus rings, hover colours and shadows are derived from them, so one input changes
every control, menu, dialog and panel it reaches. grid.css imports the new files, so your imports
stay the same.
The ribbon, toolbar, formula bar, name box, sheet tabs, menus, dropdowns, pickers, dashboards, charts, notes and input messages are built on the same shared controls. Toolbars and menus use dense rows: 24 px, 44 px on touch screens.
Theme has a new accent field (CSS --sheetwrite-accent) for primary buttons, checked boxes,
pressed toggles, focus rings and the active ribbon tab. It defaults to Sheetwrite green, #00744f
(#3edc9b in the dark theme). Text on the accent is whichever of the theme's text and background
colours contrasts more with it.
.my-app .sheetwrite { --sheetwrite-py: 0.65em; --sheetwrite-px: 1em; --sheetwrite-accent: #1f6fd1;}Engine helpers
The engine and formula packages export functions that take plain values and pack the buffers
the raw CellStore methods and formula functions take: setSparseCells, setBlockCells,
setColumnBlockCells, formulasToXlsx, formulasFromXlsx, arrayFormulaIndices and
packTexts. The raw methods stay.
Before, you joined the formulas, worked out where each one ends in UTF-16 units and passed a
buffer for the results to convertXlsxFormulas. Now you pass the formulas:
// ["=_xlfn.CONCAT(A1, B1)"]export const saved = formulasToXlsx(engine, ["=CONCAT(A1, B1)"]);engine.retire();Docs
The sitemap dates each page by its last real change, and the docs site uses the same tokens as the grid.
Deprecations
--sheetwrite-tab-font, --sheetwrite-tab-hover-bg and --sheetwrite-tab-active-bg are
deprecated and are removed in 0.8.0. They still override when you set them. The tab bar's hover
and selected colours are now derived from --sheetwrite-tab-bg, --sheetwrite-tab-fg,
--sheetwrite-tab-border and --sheetwrite-tab-active-fg, and its text from the widget font.
Upgrade checklist
Update every package together
Install 0.7.2 for each
@sheetwrite/*package that you use. Packages from different versions are not supported together. No API changes break your code; if you style built-in controls by class name or setheaderFg, check the next two steps.corewasmformulasformula-assistqueriesxlsxchartsreactvuesvelteCheck the renamed classes and attributes
.sheetwrite-ribbon-iconand.sheetwrite-tab-iconand.sheetwrite-tab-menu-iconare now.sheetwrite-icon-slot;.sheetwrite-ribbon-labelis.sheetwrite-label;.sheetwrite-ribbon-caretis.sheetwrite-chevron;.sheetwrite-command-toolbar-separatoris.sheetwrite-separator. A selected chart hasdata-selectedinstead of thesheetwrite-object-selectedclass, and a slicer value no row has isdata-emptyinstead ofdata-no-data. Formula help reads--sheetwrite-surface,--sheetwrite-inkand--sheetwrite-lineinstead of--sheetwrite-assist-*. The context menu hooks stay.Set
accentto keep your accent colourPrimary buttons, checked boxes and focus rings used
headerFgbefore and are now Sheetwrite green. Setaccentin your theme to keep the old colour.Complete the 0.7.0 steps first
Read the 0.7.0 upgrade guide.