Skip to Content
Packages

Packages

Stesura is a monorepo. Every public surface lives under the @stesura/* scope.

Core engine

PackagePurpose
@stesura/coreThe React-free ProseMirror engine: schema, plugins, commands, helpers, stores, keymap, transaction guards. No root entry; import from a subpath: /schema, /plugins, /commands, /helpers, /utils, /constants, /types, /stores, /guards, /keymap, /sub-editor, /omml (Word equations → LaTeX), /styles (CSS), /testing. /commands/internal is not public API.
@stesura/editor-reactThe StesuraEditor component, the useLocalEditor mount hook, toolbar, menus, panels, node views, state hooks. Subpaths: . (root), /types, /providers, /toolbar, /hooks, /drop (react-dnd drops), /sub-editor. See the API reference.
@stesura/editor-react-uiLow-level UI primitives (color picker, editor button, toolbar primitives, emoji/symbol pickers, …). Used internally by editor-react.
@stesura/i18nTranslation strings + SupportedLocale and TranslationKeys types.
@stesura/iconsThe editor icon system: IconProvider, the fluent / classic icon sets, createIcon.
@stesura/fontsBundled editor fonts, loadEditorFonts (+ the SSR head-link fast path: EDITOR_FONTS_LINK_ID, editorFontsStylesheetHref — see Getting Started), font-family resolution (findFontFamily, DOCX substitutions).
@stesura/uishadcn-derived design system used by the apps in this repo (button, dropdown, popover, …). Not required to embed the editor.
@stesura/marketing-uiShared marketing-site chrome (navbar, footer, theme toggle) for the apps.

Collaboration

The collab-adapter family is the collaboration transport (Collaboration).

PackagePurpose
@stesura/collab-adaptercomposeCollabPlugins, presence plugin, re-exported Pitter Patter client primitives (CollabClient, collab, …).
@stesura/collab-adapter-reactMount hooks useCollabEditor + useLocalCollabEditor, CollabProvider, RoomProvider/useRoomManifest, presence + connection hooks, comment adapters (createCollabCommentAdapter, noopCommentAdapter, LocalCommentProvider), proofread cache and dictionary factories.
@stesura/collab-adapter-servercreateCollabBackend — the server engine (Postgres + Redis): commits, presence, rooms, threads, server edits, events.onThreadMentionsCreated.
@stesura/collab-adapter-localcreateLocalCollabBackend — IndexedDB-backed local backend powering useLocalCollabEditor, typed errors (DocDeletedError, StaleClientError, …).

Feature packs

Each pair is a runtime plugin (or model package) plus its React UI extension. Mount only what you need.

PackagePurpose
@stesura/paginationpaginationPlugins(), togglePagination, layout engine, line numbering, stores, types.
@stesura/pagination-reactpaginationUiExtension, SectionNodeview, HeaderFooterPanel, and hooks (useOversizedNode, useReportNodeResize, useParagraphBreaks, …).
@stesura/referencesreferencesPlugins() (cross-references + notes + note bindings), notesPlugin, schema additions, commands.
@stesura/references-reactreferenceUiExtensions, toolbar groups, FootnotePanel, EndnotePanel, referenceNodeViews.
@stesura/commentscommentsPlugins(), comment commands, thread helpers, stores. Adapter-driven — see Comments.
@stesura/comments-reactcommentsUiExtension, CommentProvider, ThreadsContainer / AnchoredThreads / FloatingThreads, FloatingComposer.
@stesura/track-changestrackChangesPlugin, trackChangesTransactionModifier, marks, diff engine.
@stesura/track-changes-reacttrackChangesUIExtension, TrackChangesContextMenu, toolbar group.
@stesura/proofreadproofreadPlugin, proofread commands and helpers, IndexedDB cache (/cache-idb).
@stesura/proofread-reactproofreadUIExtension, panel + menu UI.
@stesura/docxdownloadDocx, importDocx, threadsToDocx.
@stesura/docx-reactdocxUIExtension, DocxImportButton, DocxExportButton.
@stesura/markdownMarkdown ↔ ProseMirror blocks: parseMarkdown, serializeBlocks. Never throws; reports losses as warnings. Used by @stesura/ai (see Markdown bridge).
@stesura/pdf-export-clientPdfExportButton, pdfUiExtension; ExportEditorShell for the export capture page lives on the /shell subpath.
@stesura/pdf-export-servercreatePdfExporter, renderDocToPdf — headless-Chromium PDF rendering (Node).
@stesura/pdf-viewer-reactcreatePdfViewer — renders an embedded PDF’s own pages in the document (react-pdf). Without it every PDF file node is a card with a link. Ships a pdf-viewer-assets script for pdf.js’s worker and data files.
@stesura/aiautocompletePlugin, text actions, chat tool system, createHttpGenerateText.
@stesura/ai-reactcreateAiUIExtension, AiTextMenuButton; the chat components (AiChatPanel, AiChatRuntimeHost) live on @stesura/ai-react/chat so their assistant-ui/AI-SDK stack stays out of initial bundles.
@stesura/ai-servercreateChatHandler, createTextActionHandler, createCompletionHandler, withRequestGuard.

Tooling

PackagePurpose
@stesura/profilerOpt-in dev-time performance collector (installProfiler); stripped from production builds.
@stesura/eslint-config, @stesura/typescript-config, @stesura/test-configShared lint / tsconfig / Vitest configuration presets.

Choosing a package set

GoalMinimum packages
In-memory editor@stesura/core, @stesura/editor-react
Offline persistence (IndexedDB)+ @stesura/collab-adapter-react, @stesura/collab-adapter-local
Real-time collaboration+ @stesura/collab-adapter, @stesura/collab-adapter-react, @stesura/collab-adapter-server (your backend)
DOCX export+ @stesura/docx, @stesura/docx-react
Page-aware layout+ @stesura/pagination, @stesura/pagination-react
Footnotes & cross-refs+ @stesura/references, @stesura/references-react
Comments+ @stesura/comments, @stesura/comments-react
Track changes+ @stesura/track-changes, @stesura/track-changes-react
Spell checking+ @stesura/proofread, @stesura/proofread-react
PDF export+ @stesura/pdf-export-client, @stesura/pdf-export-server
Embedded PDFs rendered in the document+ @stesura/pdf-viewer-react
AI (text actions, autocomplete, chat)+ @stesura/ai, @stesura/ai-react, @stesura/ai-server

Detailed references

Last updated on