@appkit/dek-plugin 0.37.0 → 0.46.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,3 +1,46 @@
1
- # Dek Plugin
1
+ # @appkit/dek-plugin
2
2
 
3
- This provides types and hooks for building Dek plugins.
3
+ The plugin SDK for building DEK plugins. Provides type definitions, the `DekApi` implementation, and React hooks for plugin state.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @appkit/dek-plugin
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```typescript
14
+ import { DekApi, DekPlugin, DekPluginComponentItem } from '@appkit/dek-plugin';
15
+
16
+ class Plugin implements DekPlugin {
17
+ constructor(config: Record<string, string>) {
18
+ this.config = config;
19
+ }
20
+
21
+ async load(api: DekApi) {
22
+ api.trace('Plugin loaded');
23
+ }
24
+
25
+ async unload() {}
26
+
27
+ get components(): DekPluginComponentItem[] {
28
+ return [
29
+ {
30
+ key: 'my-card',
31
+ element: (props: any) => <MyCard {...props} />,
32
+ schema: {
33
+ title: { type: 'string', title: 'Title', default: 'Hello' }
34
+ }
35
+ }
36
+ ];
37
+ }
38
+ }
39
+
40
+ export default Plugin;
41
+ ```
42
+
43
+ ## Documentation
44
+
45
+ - [API Reference](docs/api-reference.md) — Full DekPlugin interface, DekApi methods, DekRegistry, schema types
46
+ - [Plugin Development Guide](../../docs/plugin-development.md) — Step-by-step guide to building plugins
@@ -11,7 +11,7 @@ export type DekPluginSchemaItemOption = {
11
11
  };
12
12
  export type DekPluginSchemaType = 'string' | 'number' | 'boolean' | 'list' | 'color' | 'object' | 'styles';
13
13
  export type DekPluginSchemaItem = {
14
- type: string;
14
+ type: DekPluginSchemaType;
15
15
  title?: string;
16
16
  default?: any;
17
17
  options?: DekPluginSchemaItemOption[];
@@ -22,11 +22,13 @@ export type DekPluginSchema = Record<string, DekPluginSchemaItem>;
22
22
  export type DekPluginComponentItem = {
23
23
  key: string;
24
24
  description?: string;
25
+ isCommand?: boolean;
25
26
  element: DekPluginElementFactoryWithProps;
26
27
  schema?: DekPluginSchema;
27
28
  };
28
29
  export type DekPluginScreenItem = {
29
30
  path: string;
31
+ description?: string;
30
32
  element: DekPluginElementFactoryWithProps;
31
33
  };
32
34
  export type DekPluginBoardItem = {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@appkit/dek-plugin",
3
3
  "private": false,
4
- "version": "0.37.0",
4
+ "version": "0.46.0",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",