How it works
Tumbler separates Office package handling, document models, and the interface that renders them.
From file to view
DOCX / XLSX bytes
→ OPC package and XML
→ Word / Sheets artifact
→ Svelte components
→ edit operations
→ updated artifact and file bytesAn artifact is the application boundary. It contains the document model and exposes operations for editing, formatting, and exporting. Svelte components display that model and report user actions back to your application.
Package responsibilities
| Package | Responsibility |
|---|---|
| @tumblerjs/opc | ZIP archives, package parts, relationships, and transactions. |
| @tumblerjs/ooxml | Shared Office XML infrastructure. |
| @tumblerjs/core | Selection, formatting contracts, sparse geometry, and editing history. |
| @tumblerjs/formulas | Bounded spreadsheet formula parsing and evaluation. |
| @tumblerjs/charts | DrawingML chart models shared by document formats. |
| @tumblerjs/word | Word parsing, page layout, text editing, and formatting. |
| @tumblerjs/sheets | Workbook models, calculations, cell edits, and formatting. |
| @tumblerjs/svelte | Word, spreadsheet, chart, and formatting components. |
What the application owns
- Loading files and reporting failures.
- Saving exported bytes, downloads, and remote persistence.
- Authentication and access to documents.
- Navigation, surrounding controls, and external-link policy.
- Selection and history, using Tumbler helpers where appropriate.
This playground supplies those controls without a backend. The document bytes stay in browser memory and are discarded when the page is reloaded.
Edits and preservation
Spreadsheet edits return new artifacts. Word can use an editing session that tracks artifact revisions and bounded undo history. Export writes the updated Office package; the rendered DOM is never the saved document.
Preservation is a design goal, not a blanket compatibility guarantee. Unsupported content may not survive every edit. Keep the original file and verify important exports in their target Office application.