๐ Spreadsheet
Collaborative spreadsheet with SQLite persistence, virtual scrolling, and multi-user cursors.
ResizeObserver dispatches a throttled event; the browser computes how many rows and columns fit, writes them into signals, and posts to a resize action that re-renders exactly the right number of cells.AB2000 into the toolbar input and press Enter. The server parses column letters and row number, centers the viewport, and moves the cursor in one round-trip.example:spreadsheet scope.data-on:keydown__window handler covers arrows, Tab, Enter, Escape, F2, Delete, Ctrl+C, and printable-character-to-edit, with an explicit guard so the jump input is never intercepted.example:spreadsheet scope, so every connected user sees live updates without leaking private state.| A | B | C | D | E | F | G | H | I | J | |
|---|---|---|---|---|---|---|---|---|---|---|
| 1 | hmm | abcdef | ooohga boohga | |||||||
| 2 | = | asdasdas | 8 | |||||||
| 3 | testing | :)jj | asdasd | = | =h4 | 5 | ||||
| 4 | hmmmmmmm ok | :) | asdas | ๐ | AB2000 | =H3 | ๐ด | |||
| 5 | test | override 2 | =I1 | f | ||||||
| 6 | adasda | 187 | k | Hellow world | <-- | who | farted? | 2df | ๐ฅ | |
| 7 | 187!!!! | ccc | ๐ | ๐ | ๐ | ๐ | ๐ | ๐ | ๐ฅ | |
| 8 | test | Qe | test | ๐ | ๐ | ๐ | ๐ | ๐ | ๐ | |
| 9 | woot | GYATT | ๐ | ๐ | ๐ | ๐ | ๐ | ๐ | Eeerr | |
| 10 | great | ddsasd | ๐ | Brotli | rocking | the | stream | ๐ | ||
| 11 | kjkj | v | gghghg | compressing | 11 MB | of | data | ๐ | 44 | |
| 12 | Test | Hi | ๐ | to | only | 10 KB | ! | ๐ | cool | |
| 13 | Hello World | ๐ | ๐ | ๐ | ๐ | ๐ | ๐ | We were here | ||
| 14 | Datastar rules | ๐ | ๐ | ๐ | ๐ | ๐ | ๐ | |||
| 15 | ๐ | ๐ | ๐ | ๐ | ๐ | ๐ | ๐ | |||
| 16 | ๐ | ๐ | ๐ | ๐ | ๐ | ๐ | ||||
| 17 | asdasd | Xxdss | hi | hello | z | Dedd | we're so back | |||
| 18 | ๐ | Wudi | ๐uuu | 88 | t | Yo | ||||
| 19 | what is this | hi guys! | hello mate | hi m8 :o) | ||||||
| 20 | Test | z |
โก Signals
viewRow / viewCol
int TAB 0 Top-left corner of the visible viewport. Private per tab.
focusRow / focusCol
int TAB 0 Currently focused cell coordinates.
editing
bool TAB false Whether the focused cell is in edit mode.
editValue
string TAB \"\" Current cell editor input value.
Navigation params
mixed TAB tr, tc, key, shift, dr, dc, pasted โ client-writable action parameters for keyboard and mouse events.
vrows / vcols
int TAB 20ร10 Dynamic viewport dimensions written by a client-side ResizeObserver.
version
int Custom Shared scope version counter. Bumped on every cursor/edit change to trigger broadcasts.
๐ฏ Actions
focusCell
Moves cursor to a cell. Commits pending edits, updates selection, broadcasts cursor position.
navigate
Keyboard navigation โ arrows, Tab, Enter, Escape, PageUp/Down, Home. Auto-scrolls viewport.
startEdit
Enters edit mode on the focused cell. Prefills with typed character or current value.
commitEdit
Writes the edit value to SQLite and broadcasts the change.
scroll
Mouse wheel scrolling โ moves viewport by delta rows/columns.
scrollTo
Absolute viewport positioning โ used by scrollbar drag and track clicks.
clearCells
Deletes the selected range of cells.
paste
Pastes TSV clipboard data starting at the focused cell. Compatible with Excel/Sheets.
jumpTo
Parses a cell reference like AB2000, centers viewport, and moves cursor.
๐ Views
spreadsheet.html.twig
Virtual viewport rendering with collaborative multi-user cursors. Keyboard-first UX with a single data-on:keydown handler. Only visible cells are rendered.