Plugin Packages
Plugins are a first-class architectural unit. They provide both bundled product features and community-style extensions.
Package Groups
| Group | Source path | Boot relationship |
|---|---|---|
| First-party plugin packages | packages/plugins/plugin-* packages that depend on @lapis-notes/api | Either registered by the workspace shell as bundled/core plugins or distributed as official registry-installable plugins |
| Obsidian-targeted packages | Colocated packages that still depend on upstream obsidian | Not part of the current workspace boot sequence unless a host loads them as community-style plugins |
| Workspace-local features | packages/workspace/src/lib/feature/ | Behave like core plugins but are owned by the workspace package |
First-Party Plugins
| Package | Responsibility |
|---|---|
| Markdown | Markdown, media, properties, outline, metadata, and editor behavior |
| Markdown Lint | Official installable markdown diagnostics registration across browser workers and Electron |
| Search | Sidebar search, indexing controls, semantic-search status, and search UI |
| Tasks | Browser-first task capture, filtering, and bundled task persistence |
| Bases | .bases and .base structured data views |
| Canvas | JSON Canvas editing over .canvas files |
| CSV | CSV/TSV source and editable table preview |
| Docs | Univer-backed native document and sheet editing |
| Fmode | Hint-based keyboard navigation for opted-in workspace chrome |
| Graph | Global and local note graph visualization |
| History | Planned persisted text-file revision history, history view, and restore flow |
| Notifications | Required in-app notification center, toasts, and progress status |
| Notebook | Notebook files, markdown cells, and runtime-facing notebook views |
EmbedPDF-backed .pdf file views and markdown PDF embeds | |
| Slides | Reveal.js-backed presentation views over markdown notes |
| Telemetry | Diagnostics leaf, telemetry settings, and persisted trace buffers |
Canvas, Graph, Markdown Lint, Notebook, PDF, Slides, Telemetry, and Docs are
external official plugins. Their packages remain in the monorepo for building
and publishing official artifacts, but the workspace does not register them in
the bundled core list. Installed official records with provenance: "official"
still appear under Core plugins and activate through optional-core Safe Mode
policy. Bases remains bundled and non-installable for this phase.
Obsidian-Targeted Packages
| Package | Responsibility |
|---|---|
| Spellchecker | Harper-backed grammar and spelling diagnostics |
The spellchecker package keeps its own permissive package metadata because it is an Obsidian-targeted compatibility package rather than a bundled Lapis core plugin in the current app boot sequence.
Styling Ownership
First-party plugin UI should follow the shared Plugin CSS Contract. The contract owns the current CSS artifact rules and rollout tracker so individual plugin pages can describe package-specific selectors without duplicating global policy.
Workspace-Local Built-in Features
The workspace package also contains features that behave like plugins but are not distributed as separate packages:
| Feature | Purpose |
|---|---|
AppPlugin | Core commands, ribbon actions, icon pack |
FileExplorerPlugin | File tree view and reveal-path command |
WordCount | Status bar word/character/sentence count |
LangCode | Text views and language extensions for JS, JSON, YAML, CSS, plain text |
These are documented in detail on the Workspace App page.
Community Plugin Loading
Plugin Runtime owns the common runtime contract for bundled and community plugins. The workspace shell now creates a CommonJS dependency resolver from generated host-module metadata and generated provider values, while deps.ts is limited to explicit legacy/private overrides and browser fallbacks, so plugins can still require() common packages such as obsidian, selected @lapis-notes/api/* exports, @codemirror/*, luxon, zod, clsx, and bits-ui.
This allows community plugins written for the Obsidian API to run with minimal or no modification when the active host supports the required APIs.
Architecture Patterns
| Pattern | Plugins Using |
|---|---|
| CodeMirror extensions | markdown, spellchecker |
| Svelte view components | markdown, search, bases |
| Web Workers | markdown metadata, markdown-lint, spellchecker linting |
| External engines | search, bases, spellchecker |
| Custom parsers | markdown, bases |
| HTML post-processing | markdown (list callouts) |
| Metadata processors | markdown |
| Type widgets | markdown |