@appkit/dek-plugin 0.8.1 → 0.10.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/dist/index.es.js CHANGED
@@ -213,7 +213,7 @@ class Api {
213
213
  return this.globals.registry;
214
214
  }
215
215
  get boardKey() {
216
- return this.globals.boardKey;
216
+ return this.globals.navigateParams.boardKey || "#error";
217
217
  }
218
218
  get boards() {
219
219
  return this.globals.boards;
@@ -232,6 +232,9 @@ class Api {
232
232
  navigate(path) {
233
233
  this.globals.setLocation(`/${this.boardKey}${path}`);
234
234
  }
235
+ get navigateParams() {
236
+ return this.globals.navigateParams;
237
+ }
235
238
  navigateBack() {
236
239
  history.back();
237
240
  }
@@ -315,7 +318,7 @@ class Api {
315
318
  if (!component) {
316
319
  return;
317
320
  }
318
- return component.element();
321
+ return component.element({ plugin });
319
322
  }
320
323
  }
321
324
  }
@@ -329,7 +332,7 @@ class Api {
329
332
  if (!component) {
330
333
  return;
331
334
  }
332
- return component.element();
335
+ return component.element({ plugin });
333
336
  }
334
337
  }
335
338
  }
package/dist/index.umd.js CHANGED
@@ -216,7 +216,7 @@
216
216
  return this.globals.registry;
217
217
  }
218
218
  get boardKey() {
219
- return this.globals.boardKey;
219
+ return this.globals.navigateParams.boardKey || "#error";
220
220
  }
221
221
  get boards() {
222
222
  return this.globals.boards;
@@ -235,6 +235,9 @@
235
235
  navigate(path) {
236
236
  this.globals.setLocation(`/${this.boardKey}${path}`);
237
237
  }
238
+ get navigateParams() {
239
+ return this.globals.navigateParams;
240
+ }
238
241
  navigateBack() {
239
242
  history.back();
240
243
  }
@@ -318,7 +321,7 @@
318
321
  if (!component) {
319
322
  return;
320
323
  }
321
- return component.element();
324
+ return component.element({ plugin });
322
325
  }
323
326
  }
324
327
  }
@@ -332,7 +335,7 @@
332
335
  if (!component) {
333
336
  return;
334
337
  }
335
- return component.element();
338
+ return component.element({ plugin });
336
339
  }
337
340
  }
338
341
  }
package/dist/lib/api.d.ts CHANGED
@@ -43,6 +43,7 @@ export type DekApi = {
43
43
  layout: string;
44
44
  commandGroups: Record<string, any>;
45
45
  navigate: (path: string) => void;
46
+ navigateParams: Record<string, string | undefined>;
46
47
  navigateBack: () => void;
47
48
  open: (boardKey: string) => void;
48
49
  plugins: Record<string, DekApiPlugin>;
@@ -60,6 +61,7 @@ export declare class Api implements DekApi {
60
61
  get layout(): string;
61
62
  get commandGroups(): Record<string, any>;
62
63
  navigate(path: string): void;
64
+ get navigateParams(): Record<string, string | undefined>;
63
65
  navigateBack(): void;
64
66
  open(boardKey: string): void;
65
67
  private createPluginWrapper;
@@ -16,11 +16,11 @@ export type DekPluginComponentItem = {
16
16
  };
17
17
  export type DekPluginScreenItem = {
18
18
  path: string;
19
- element: PluginElementFactory;
19
+ element: PluginElementFactoryWithProps;
20
20
  };
21
21
  export type DekPluginBoardItem = {
22
22
  key: string;
23
- element: PluginElementFactory;
23
+ element: PluginElementFactoryWithProps;
24
24
  };
25
25
  export type DekPluginConfig = Record<string, string>;
26
26
  export type DekPlugin = {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@appkit/dek-plugin",
3
3
  "private": false,
4
- "version": "0.8.1",
4
+ "version": "0.10.0",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",