How it works

Tumbler separates Office package handling, document models, and the interface that renders them.

From file to view

Data flow
DOCX / XLSX bytes
  → OPC package and XML
  → Word / Sheets artifact
  → Svelte components
  → edit operations
  → updated artifact and file bytes

An 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

PackageResponsibility
@tumblerjs/opcZIP archives, package parts, relationships, and transactions.
@tumblerjs/ooxmlShared Office XML infrastructure.
@tumblerjs/coreSelection, formatting contracts, sparse geometry, and editing history.
@tumblerjs/formulasBounded spreadsheet formula parsing and evaluation.
@tumblerjs/chartsDrawingML chart models shared by document formats.
@tumblerjs/wordWord parsing, page layout, text editing, and formatting.
@tumblerjs/sheetsWorkbook models, calculations, cell edits, and formatting.
@tumblerjs/svelteWord, 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.

Next Compatibility