PORT CONTRACT

Bring your own backend

The static backend is intentionally isolated here to demonstrate the required port contract and graceful capability absence.

Try this

  1. Edit the small roster in memory.
  2. Notice that the standard chrome still works.
  3. Compare this lightweight host backend with the Worker/WASM demos.

How it works

Only three backend methods are required. Optional capability ports enrich the UI when available; absent ports remove their corresponding commands rather than forcing a partial imitation.

View source

/**
 * Seed data for the "basics" demo — a small, honest team roster. Verified
 * against `excel/solid-excel/src-vnext/adapter/static-backend.ts`: the
 * static backend's `matrix` seed does NOT parse leading `=` in strings as a
 * formula (every matrix string lands as literal `valueKind: 'string'` text
 * via `valueToDisplayCell`) — formulas only evaluate when set explicitly on
 * a `DisplayCell.formula` field through the sparse `cells` array. So the
 * roster body comes from `matrix` (plain header/name/number cells) and the
 * three totals-row formulas are layered on top via `cells`, landing on rows
 * the matrix left blank.
 */
import type {
  DisplayCell,
  StaticSeedMatrix,
  StaticSpreadsheetSeed,
} from '@einfach/solid-excel/vnext'

const matrix: StaticSeedMatrix = [
  ['Name', 'Role', 'Hours Logged', 'Tasks Done', 'Rating'],
  ['Mina Cho', 'Product Designer', 34, 9, 4.5],
  ['Diego Alvarez', 'Backend Engineer', 38, 11, 4.2],
  ['Priya Nair', 'Frontend Engineer', 36, 10, 4.8],
  ["Sam O'Connor", 'QA Analyst', 30, 14, 4.1],
  ['Layla Haddad', 'Project Manager', 32, 7, 4.6],