nexus-shell 0.1.2 → 0.1.5

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.
Files changed (27) hide show
  1. package/README.md +24 -0
  2. package/dist/components/widgets/AgentManager.d.ts +18 -0
  3. package/dist/components/widgets/DataGrid.d.ts +22 -0
  4. package/dist/components/widgets/MockupReviewWidget.d.ts +3 -0
  5. package/dist/components/widgets/WargameMap.d.ts +31 -0
  6. package/dist/components/widgets/WelcomeTab.d.ts +8 -0
  7. package/dist/components/widgets/mockup-reviewer/ExecutionOverlay.d.ts +10 -0
  8. package/dist/components/widgets/mockup-reviewer/HtmlShadowRenderer.d.ts +9 -0
  9. package/dist/components/widgets/mockup-reviewer/ImplementationPlanWorkspace.d.ts +8 -0
  10. package/dist/components/widgets/mockup-reviewer/MockupReviewWorkspace.d.ts +10 -0
  11. package/dist/components/widgets/mockup-reviewer/ReviewSidebar.d.ts +3 -0
  12. package/dist/components/widgets/mockup-reviewer/ReviewToolbar.d.ts +12 -0
  13. package/dist/components/widgets/mockup-reviewer/WorkflowMapper.d.ts +7 -0
  14. package/dist/core/registry/PluginRegistry.d.ts +5 -0
  15. package/dist/core/services/MockupReviewService.d.ts +58 -0
  16. package/dist/index-HQz7gZzB.js +75654 -0
  17. package/dist/index.d.ts +6 -1
  18. package/dist/maplibre-gl-Bwi3Dwff.js +24588 -0
  19. package/dist/nexus-shell.es.js +30 -10957
  20. package/dist/nexus-shell.umd.js +3410 -43
  21. package/dist/stories/AgentManager.stories.d.ts +25 -0
  22. package/dist/stories/DataGrid.stories.d.ts +12 -0
  23. package/dist/stories/MockupReviewWidget.stories.d.ts +9 -0
  24. package/dist/stories/MockupReviewerLayout.stories.d.ts +8 -0
  25. package/dist/stories/WargameMap.stories.d.ts +14 -0
  26. package/dist/style.css +1 -1
  27. package/package.json +12 -1
package/README.md CHANGED
@@ -185,6 +185,30 @@ A reusable component for implementing project-wide search.
185
185
  />
186
186
  ```
187
187
 
188
+ ### 6. AI Agent Management (`AgentManager`)
189
+ A visually rich component for defining and orchestrating LLM agents using React Flow.
190
+ ```tsx
191
+ <AgentManager
192
+ agents={agentList}
193
+ onFetchAgents={fetchAgents}
194
+ onSaveAgent={saveAgent}
195
+ onDeleteAgent={deleteAgent}
196
+ title="My Agents"
197
+ subtitle="Manage and visually build your custom AI workflows"
198
+ />
199
+ ```
200
+
201
+ ### 7. Geospatial & Wargaming Analytics (`WargameMap`)
202
+ A high-performance mapping component combining `react-map-gl`, `deck.gl`, and `milsymbol` for interactive wargaming, modeling, and simulation. Features H3 hex grids, attack vectors, and dynamically generated NATO military icons.
203
+ ```tsx
204
+ <WargameMap
205
+ units={mockUnits}
206
+ attacks={mockAttacks}
207
+ terrainHexes={terrainHexes}
208
+ mapStyle="https://basemaps.cartocdn.com/gl/positron-gl-style/style.json"
209
+ />
210
+ ```
211
+
188
212
  **Usage Example:**
189
213
  ```tsx
190
214
  <ShellLayout
@@ -0,0 +1,18 @@
1
+ import { default as React } from 'react';
2
+
3
+ export interface Agent {
4
+ id: string;
5
+ name: string;
6
+ description: string;
7
+ schemaJson: string;
8
+ }
9
+ export interface AgentManagerProps {
10
+ agents?: Agent[];
11
+ onFetchAgents?: () => void;
12
+ onSaveAgent?: (agent: Partial<Agent>) => Promise<Agent | void>;
13
+ onDeleteAgent?: (id: string) => Promise<void>;
14
+ title?: string;
15
+ subtitle?: string;
16
+ className?: string;
17
+ }
18
+ export declare const AgentManager: React.FC<AgentManagerProps>;
@@ -0,0 +1,22 @@
1
+ import { default as React } from 'react';
2
+
3
+ export interface IDataGridColumn<T = any> {
4
+ key: string;
5
+ header: string;
6
+ width?: string | number;
7
+ sortable?: boolean;
8
+ render?: (value: any, row: T) => React.ReactNode;
9
+ }
10
+ export interface DataGridProps<T = any> {
11
+ columns: IDataGridColumn<T>[];
12
+ data: T[];
13
+ onRowClick?: (row: T) => void;
14
+ selectedRowId?: string | number;
15
+ rowKey?: keyof T;
16
+ virtualized?: boolean;
17
+ showFilter?: boolean;
18
+ loading?: boolean;
19
+ placeholder?: string;
20
+ className?: string;
21
+ }
22
+ export declare const DataGrid: <T extends Record<string, any>>({ columns, data, onRowClick, selectedRowId, rowKey, virtualized, showFilter, loading, placeholder, className, }: DataGridProps<T>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+
3
+ export declare const MockupReviewWidget: React.FC;
@@ -0,0 +1,31 @@
1
+ import { default as React } from 'react';
2
+
3
+ export interface UnitData {
4
+ id: string;
5
+ sidc: string;
6
+ coordinates: [number, number];
7
+ }
8
+ export interface AttackData {
9
+ id: string;
10
+ origin: [number, number];
11
+ target: [number, number];
12
+ }
13
+ export interface TerrainHexData {
14
+ h3Index: string;
15
+ owner: 'friendly' | 'hostile' | 'neutral';
16
+ }
17
+ export interface WargameMapProps {
18
+ initialViewState?: {
19
+ longitude: number;
20
+ latitude: number;
21
+ zoom: number;
22
+ pitch?: number;
23
+ bearing?: number;
24
+ };
25
+ units?: UnitData[];
26
+ attacks?: AttackData[];
27
+ terrainHexes?: TerrainHexData[];
28
+ mapStyle?: string;
29
+ className?: string;
30
+ }
31
+ export declare const WargameMap: React.FC<WargameMapProps>;
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+ import { TabNode } from 'flexlayout-react';
3
+
4
+ interface WelcomeTabProps {
5
+ node: TabNode;
6
+ }
7
+ export declare const WelcomeTab: React.FC<WelcomeTabProps>;
8
+ export {};
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+
3
+ interface ExecutionOverlayProps {
4
+ isExecuting: boolean;
5
+ setIsExecuting: (val: boolean) => void;
6
+ executionStep: number;
7
+ setExecutionStep: (step: number | ((prev: number) => number)) => void;
8
+ }
9
+ export declare const ExecutionOverlay: React.FC<ExecutionOverlayProps>;
10
+ export {};
@@ -0,0 +1,9 @@
1
+ import { default as React } from 'react';
2
+
3
+ interface HtmlShadowRendererProps {
4
+ htmlContent: string;
5
+ onElementClick?: (selector: string, clientX: number, clientY: number) => void;
6
+ shadowHostRef: React.RefObject<HTMLDivElement | null>;
7
+ }
8
+ export declare const HtmlShadowRenderer: React.FC<HtmlShadowRendererProps>;
9
+ export {};
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+
3
+ interface ImplementationPlanWorkspaceProps {
4
+ setIsExecuting: (val: boolean) => void;
5
+ setExecutionStep: (step: number) => void;
6
+ }
7
+ export declare const ImplementationPlanWorkspace: React.FC<ImplementationPlanWorkspaceProps>;
8
+ export {};
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+
3
+ interface MockupReviewWorkspaceProps {
4
+ tool: 'select' | 'pen' | 'rect' | 'circle' | 'arrow' | 'comment' | 'eraser';
5
+ color: string;
6
+ selectedAnnotationId: string | null;
7
+ setSelectedAnnotationId: (id: string | null) => void;
8
+ }
9
+ export declare const MockupReviewWorkspace: React.FC<MockupReviewWorkspaceProps>;
10
+ export {};
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+
3
+ export declare const ReviewSidebar: React.FC;
@@ -0,0 +1,12 @@
1
+ import { default as React } from 'react';
2
+
3
+ interface ReviewToolbarProps {
4
+ tool: 'select' | 'pen' | 'rect' | 'circle' | 'arrow' | 'comment' | 'eraser';
5
+ setTool: (t: 'select' | 'pen' | 'rect' | 'circle' | 'arrow' | 'comment' | 'eraser') => void;
6
+ color: string;
7
+ setColor: (c: string) => void;
8
+ selectedAnnotationId: string | null;
9
+ setSelectedAnnotationId: (id: string | null) => void;
10
+ }
11
+ export declare const ReviewToolbar: React.FC<ReviewToolbarProps>;
12
+ export {};
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+
3
+ interface WorkflowMapperProps {
4
+ setActiveTab: (tab: 'workflow' | 'review' | 'implementation') => void;
5
+ }
6
+ export declare const WorkflowMapper: React.FC<WorkflowMapperProps>;
7
+ export {};
@@ -5,12 +5,17 @@ export interface IPlugin {
5
5
  deactivate: () => void;
6
6
  }
7
7
  export type PluginLoader = () => Promise<IPlugin>;
8
+ export type PluginStatus = 'registered' | 'inactive' | 'activating' | 'active' | 'failed' | 'deactivated';
8
9
  export declare class PluginRegistry {
9
10
  private plugins;
10
11
  private loaders;
12
+ private statuses;
11
13
  registerPlugin(plugin: IPlugin): void;
12
14
  registerLazyPlugin(id: string, loader: PluginLoader): void;
13
15
  activatePlugin(id: string): Promise<void>;
16
+ deactivatePlugin(id: string): Promise<void>;
17
+ getPluginStatus(id: string): PluginStatus | undefined;
18
+ getPluginStatuses(): Record<string, PluginStatus>;
14
19
  getPlugin(id: string): IPlugin | undefined;
15
20
  getAllPlugins(): IPlugin[];
16
21
  }
@@ -0,0 +1,58 @@
1
+ import { Node, Edge } from 'reactflow';
2
+
3
+ export interface IMockupAnnotation {
4
+ id: string;
5
+ type: 'stroke' | 'rect' | 'circle' | 'arrow' | 'comment';
6
+ color: string;
7
+ points?: {
8
+ x: number;
9
+ y: number;
10
+ }[];
11
+ x?: number;
12
+ y?: number;
13
+ width?: number;
14
+ height?: number;
15
+ text?: string;
16
+ elementSelector?: string;
17
+ versionId: string;
18
+ }
19
+ export interface IMockupVersion {
20
+ id: string;
21
+ label: string;
22
+ timestamp: string;
23
+ htmlContent: string;
24
+ annotations: IMockupAnnotation[];
25
+ }
26
+ export interface IMockupView {
27
+ id: string;
28
+ name: string;
29
+ description?: string;
30
+ activeVersionId: string;
31
+ versions: IMockupVersion[];
32
+ parentId?: string | null;
33
+ }
34
+ interface MockupReviewState {
35
+ views: IMockupView[];
36
+ activeViewId: string | null;
37
+ compareVersionId: string | null;
38
+ nodes: Node[];
39
+ edges: Edge[];
40
+ implementationPlan: string;
41
+ setActiveViewId: (id: string | null) => void;
42
+ setActiveVersionId: (viewId: string, versionId: string) => void;
43
+ setCompareVersionId: (versionId: string | null) => void;
44
+ setViewParentId: (viewId: string, parentId: string | null) => void;
45
+ addAnnotation: (viewId: string, versionId: string, annotation: Omit<IMockupAnnotation, 'versionId'>) => void;
46
+ undoAnnotation: (viewId: string, versionId: string) => void;
47
+ deleteAnnotation: (viewId: string, versionId: string, annotationId: string) => void;
48
+ updateAnnotationText: (viewId: string, versionId: string, annotationId: string, text: string) => void;
49
+ addMockupView: (name: string, description?: string, htmlContent?: string) => string;
50
+ addMockupVersion: (viewId: string, label: string, htmlContent: string) => string;
51
+ updateWorkflow: (nodes: Node[], edges: Edge[]) => void;
52
+ setImplementationPlan: (plan: string) => void;
53
+ generateImplementationPlanAction: () => void;
54
+ refineImplementationPlanAction: (refinementPrompt: string) => void;
55
+ exportHistoryJson: () => string;
56
+ }
57
+ export declare const useMockupReviewStore: import('zustand').UseBoundStore<import('zustand').StoreApi<MockupReviewState>>;
58
+ export {};