Skip to content

Commit 569d8cf

Browse files
committed
fix(module-template): replace missing sdk slot type with local contract
1 parent 32d9d35 commit 569d8cf

3 files changed

Lines changed: 23 additions & 2 deletions

File tree

src/slots/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* entity-tree — context menu entry in the entity tree
1010
* dashboard-widget — card in the tenant dashboard
1111
*/
12-
import type { ModuleViewerSlots } from '@nekazari/sdk';
12+
import type { ModuleViewerSlots } from '../types/module-slots';
1313
import { ExampleSlot } from '../components/slots/ExampleSlot';
1414

1515
const MODULE_ID = 'MODULE_NAME';

src/types/global.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Global type declarations for the Nekazari host runtime.
33
* These globals are injected by the host before module bundles execute.
44
*/
5-
import type { ModuleViewerSlots } from '@nekazari/sdk';
5+
import type { ModuleViewerSlots } from './module-slots';
66

77
declare global {
88
interface Window {

src/types/module-slots.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import type React from 'react';
2+
3+
export type SlotType =
4+
| 'entity-tree'
5+
| 'map-layer'
6+
| 'context-panel'
7+
| 'bottom-panel'
8+
| 'layer-toggle'
9+
| 'dashboard-widget'
10+
| 'admin-tab';
11+
12+
export interface SlotWidgetDefinition {
13+
id: string;
14+
moduleId: string;
15+
component: string;
16+
localComponent?: React.ComponentType<any>;
17+
priority?: number;
18+
props?: Record<string, unknown>;
19+
}
20+
21+
export type ModuleViewerSlots = Partial<Record<SlotType, SlotWidgetDefinition[]>>;

0 commit comments

Comments
 (0)