ReadonlystorageThe underlying storage, so companions (the tab strip) can persist beside the index.
Copy a document (body, folder, tags) as "Copy of
Everything, bodies included, as one JSON-serializable bundle.
Every folder path, sorted, including the implicit parents of nested
paths. A document in Work/Q3 means Work exists even if nothing was
ever filed there directly.
A document with its body, or null when the id is unknown.
Merge a bundle in. Documents keep their ids, so re-importing an export updates in place instead of duplicating; anything malformed is skipped. Returns the number of documents imported.
Every document's metadata, most recently updated first.
Metadata for one document, or null. Synchronous: the index is in memory.
Documents that have been opened, most recent first.
Delete a folder. Its documents and subfolders move up to its parent.
Rename (or re-parent) a folder, carrying its documents and subfolders along.
Replace a document's body (and optionally its title), bumping updatedAt.
Documents whose title, folder or tags contain every word of the query, case-insensitively. Bodies are not searched: they are not in memory.
Be told after every committed change. Returns a disposer.
Record that the document was opened, for the recents list.
StaticopenLoad the index from storage. A missing or corrupt index yields an empty workspace rather than a failure. The bodies are still there, so nothing is lost that a later import cannot recover.
The workspace's document store. Metadata lives in memory and is read synchronously; every mutation writes through to storage and notifies subscribers, so the tab strip and the panel re-render from one source.