Plugin structure
Every plugin exports a manifest with a globally unique ID, the Pascal plugin API version it targets, and its node definitions:company:plugin-name. The current apiVersion is 1;
Pascal rejects plugins that target an incompatible version.
Declare the @pascal-app/* packages used by your plugin as peer dependencies.
The host must provide these packages so your plugin and the editor share one node
registry. Bundling another copy of @pascal-app/core creates a separate registry
and the plugin will not load correctly.
Define a node
The manifest’snodes array contains NodeDefinition objects. Each definition
starts with a schema and defaults, then opts into only the Pascal capabilities it
needs.
Keep renderer and editor modules lazy, as shown above. This lets hosts avoid loading
plugin UI and rendering code until it is needed.
Add an editor panel
The core manifest is independent of any editor UI. Export anEditorHostPanel
separately if your plugin needs a sidebar panel:
registerEditorHostPanel. Pascal uses creator and
pluginUrl on the plugin detail page and loads the panel component inside an error
boundary.
Load the plugin in a host
The host decides where plugins come from. Register discovery before importing the Pascal bootstrap module:The Plugins sidebar controls whether an already loaded plugin is enabled for
the current project. Installing or uninstalling there does not download or
remove an npm package. Uninstalling hides the plugin’s panel, tools,
renderers, systems, and floor-plan output while preserving its nodes in the
scene graph, so no project data is deleted.
Test your plugin
Before integrating a plugin into a host:- Validate every node against its schema and test any geometry or floor-plan functions as pure functions.
- Add a registry test that loads the manifest and confirms each expected node kind is registered.
- Load the plugin in a Pascal host with
setPluginDiscoveryand confirm the development console reports its ID and node count. - Create, save, reload, uninstall, and reinstall its nodes to check the complete project lifecycle.