@nullplatform/ui-plugin-sdk
v0.4.0
Published
SDK for nullplatform UI plugins: catalog components, bridge client and defineUI
Readme
nullplatform UI plugin SDK
Build widgets and pages for nullplatform's UI plugin host.
npm install @nullplatform/ui-plugin-sdk react react-domimport { defineUI, Card, Text } from '@nullplatform/ui-plugin-sdk';
function Summary() {
return <Card title="My plugin"><Text>Hello</Text></Card>;
}
defineUI({ widgets: { summary: Summary } });Build one self-contained classic IIFE (including React and the SDK). The host runs it in an isolated worker and renders its remote components using the host's design system. Declare registered mountpoints, widgets and bridge permissions in your plugin manifest.
The same package provides DOM-free validation for Node tooling and APIs:
import { validateManifest } from '@nullplatform/ui-plugin-sdk/contract';
// CommonJS: require('@nullplatform/ui-plugin-sdk/contract')nullplatform.api accesses allowed nullplatform API paths through the host.
nullplatform.http accesses explicitly declared external hosts using short-lived
plugin tokens. nullplatform.assets.url(path) resolves a file from the installed
bundle; Image displays images/SVG from platform storage.
The SDK carries no API keys. Publish your plugin bundle through the UI API, pin it
as a ui_bundle component of a central nullplatform Package, and install the exact
package revision on the desired NRN. Installing this npm SDK does not publish or
install a plugin in nullplatform.
