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: /toolbar (toolbar components, lazy-loaded) and /drop (react-dnd drops). 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/fontsThe editor’s font files and fonts.css, served from your own origin by your bundler (Getting Started). Versioned on its own. Font-family resolution (findFontFamily, DOCX substitutions) is in @stesura/core/constants.
@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, …). /protocol holds what servers share with it (wire constants, presence parsers, reportCollabError) without React.
@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 for mentions, thread lifecycle, commits and rooms.
@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/bibliographybibliographyPlugins(), citation and source commands, the citeproc formatter, bundled CSL styles, validation, BibTeX / RIS / CSL-JSON import.
@stesura/bibliography-reactcreateBibliographyUiExtension, withBundledStyles, the sources panel, the citation picker, useSourceForm.
@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/format-lintformatLintPlugin, collectFormatSuggestions, applyFormatSuggestions: finds and fixes formatting that belongs in styles. See Format cleanup.
@stesura/format-lint-reactformatLintUIExtension: panel, status-bar count, Review-tab button.
@stesura/contract-checkcontractCheckPlugin, buildTermIndex: finds defined terms, their definitions and their uses. See Contract check.
@stesura/contract-check-reactcontractCheckUIExtension: defined-term hover card, visible-range reporter.
@stesura/redactionredactionPlugin, commands, prepareRedactedExport: redactions, redacted DOCX and PDF exports, and a leak check of the exported file. See Redaction.
@stesura/redaction-reactcreateRedactionUIExtension: Redact button, review panel, export dialog.
@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/mermaidThe mermaid node, commands and lazy-loaded rendering, with markdown and DOCX support. See Diagrams.
@stesura/mermaid-reactcreateMermaidUiExtension(): the node view, the source editor, the Insert group and the Diagram tab.
@stesura/automationNodes and mechanics for document automation: hidden and repeating content, fields. It evaluates nothing; your code supplies the values. Subpaths: /schema, /commands, /plugins, /export. See Automation.
@stesura/automation-reactcreateAutomationUIExtension, the field node view, toolbar group and hooks.
@stesura/esignSignature fields and their export to e-signature providers as PDF placements and anchor strings. No credentials, no HTTP. Subpaths: /schema, /commands, /export, /adapters.
@stesura/esign-reactcreateEsignUIExtension, the field node view, insert snippets and toolbar group.
@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.
@stesura/docgenAssembles markdown sources and a template into a document for rendering (assemble), with front matter and variable substitution.
@stesura/docgen-clistesura-docgen: renders a repository’s markdown docs to PDF and Word through Stesura Docgen, from a terminal or CI (also a GitHub Action).

Tooling

PackagePurpose
@stesura/profilerOpt-in dev-time performance collector (installProfiler); stripped from production builds.
@stesura/agentsstesura-agents init: points coding agents in your repo at the AGENTS.md files shipped in each @stesura/* package.
@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
Citations & bibliography+ @stesura/bibliography, @stesura/bibliography-react
Comments+ @stesura/comments, @stesura/comments-react
Track changes+ @stesura/track-changes, @stesura/track-changes-react
Spell checking+ @stesura/proofread, @stesura/proofread-react
Format cleanup+ @stesura/format-lint, @stesura/format-lint-react
Defined terms (contract check)+ @stesura/contract-check, @stesura/contract-check-react
Redaction+ @stesura/redaction, @stesura/redaction-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
Mermaid diagrams+ @stesura/mermaid, @stesura/mermaid-react
Document automation (conditional, repeating, field content)+ @stesura/automation, @stesura/automation-react
E-signature fields+ @stesura/esign, @stesura/esign-react

Detailed references

Last updated on