@appkit/dek-plugin 0.36.0 → 0.43.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
package/dist/index.es.js CHANGED
@@ -249,12 +249,7 @@ class Api {
249
249
  class ApiInternal {
250
250
  trace(integrationKey, message, ...data) {
251
251
  console.log(`DEK-TRACE[${integrationKey}]: ${message}`, ...data);
252
- this.globals.messages.push({
253
- type: "trace",
254
- body: message,
255
- data,
256
- at: Date.now()
257
- });
252
+ return;
258
253
  }
259
254
  warn(integrationKey, message, ...data) {
260
255
  console.warn(`DEK-WARN[${integrationKey}]: ${message}`, ...data);
package/dist/index.umd.js CHANGED
@@ -252,12 +252,7 @@ var __publicField = (obj, key, value) => {
252
252
  class ApiInternal {
253
253
  trace(integrationKey, message, ...data) {
254
254
  console.log(`DEK-TRACE[${integrationKey}]: ${message}`, ...data);
255
- this.globals.messages.push({
256
- type: "trace",
257
- body: message,
258
- data,
259
- at: Date.now()
260
- });
255
+ return;
261
256
  }
262
257
  warn(integrationKey, message, ...data) {
263
258
  console.warn(`DEK-WARN[${integrationKey}]: ${message}`, ...data);
@@ -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[];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@appkit/dek-plugin",
3
3
  "private": false,
4
- "version": "0.36.0",
4
+ "version": "0.43.0",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",