@appkit/dek-plugin
v0.57.0
Published
The plugin SDK for building DEK plugins. Provides type definitions, the `DekApi` implementation, and React hooks for plugin state.
Readme
@appkit/dek-plugin
The plugin SDK for building DEK plugins. Provides type definitions, the DekApi implementation, and React hooks for plugin state.
Installation
npm install @appkit/dek-pluginUsage
import { DekApi, DekPlugin, DekPluginComponentItem } from '@appkit/dek-plugin';
class Plugin implements DekPlugin {
constructor(config: Record<string, string>) {
this.config = config;
}
async load(api: DekApi) {
api.trace('Plugin loaded');
}
async unload() {}
get components(): DekPluginComponentItem[] {
return [
{
key: 'my-card',
element: (props: any) => <MyCard {...props} />,
schema: {
title: { type: 'string', title: 'Title', default: 'Hello' }
}
}
];
}
}
export default Plugin;Documentation
- API Reference — Full DekPlugin interface, DekApi methods, DekRegistry, schema types
- Plugin Development Guide — Step-by-step guide to building plugins
