nexus-shell 0.1.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/LICENSE +21 -0
- package/README.md +223 -0
- package/dist/App.d.ts +2 -0
- package/dist/components/layout/ShellLayout.d.ts +14 -0
- package/dist/components/widgets/ActivityBar.d.ts +1 -0
- package/dist/components/widgets/ChatPane.d.ts +1 -0
- package/dist/components/widgets/CommandPalette.d.ts +8 -0
- package/dist/components/widgets/ContextMenu.d.ts +16 -0
- package/dist/components/widgets/FilesSidebar.d.ts +1 -0
- package/dist/components/widgets/MenuBar.d.ts +5 -0
- package/dist/components/widgets/SearchWidget.d.ts +19 -0
- package/dist/components/widgets/SidebarPane.d.ts +1 -0
- package/dist/components/widgets/StatusBar.d.ts +1 -0
- package/dist/components/widgets/TerminalPane.d.ts +1 -0
- package/dist/components/widgets/TreeWidget.d.ts +19 -0
- package/dist/components/widgets/UserProfile.d.ts +11 -0
- package/dist/core/Boot.d.ts +4 -0
- package/dist/core/registry/CommandRegistry.d.ts +15 -0
- package/dist/core/registry/MenuRegistry.d.ts +15 -0
- package/dist/core/registry/PluginRegistry.d.ts +17 -0
- package/dist/core/services/ChatService.d.ts +12 -0
- package/dist/core/services/KeyboardService.d.ts +1 -0
- package/dist/core/services/LayoutService.d.ts +12 -0
- package/dist/core/services/RightSidebarService.d.ts +7 -0
- package/dist/core/services/SidebarService.d.ts +17 -0
- package/dist/core/services/StatusBarService.d.ts +21 -0
- package/dist/core/services/TerminalService.d.ts +10 -0
- package/dist/core/services/ThemeService.d.ts +7 -0
- package/dist/index.d.ts +23 -0
- package/dist/main.d.ts +1 -0
- package/dist/nexus-shell.es.js +10930 -0
- package/dist/nexus-shell.umd.js +210 -0
- package/dist/stories/ActivityBar.stories.d.ts +9 -0
- package/dist/stories/ChatPane.stories.d.ts +10 -0
- package/dist/stories/CommandPalette.stories.d.ts +9 -0
- package/dist/stories/MenuBar.stories.d.ts +10 -0
- package/dist/stories/SearchWidget.stories.d.ts +9 -0
- package/dist/stories/ShellLayout.stories.d.ts +12 -0
- package/dist/stories/SidebarPane.stories.d.ts +8 -0
- package/dist/stories/StatusBar.stories.d.ts +10 -0
- package/dist/stories/TerminalPane.stories.d.ts +9 -0
- package/dist/stories/TreeWidget.stories.d.ts +8 -0
- package/dist/stories/UserProfile.stories.d.ts +10 -0
- package/dist/style.css +1 -0
- package/package.json +73 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 David
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
# Nexus-Shell Framework
|
|
2
|
+
|
|
3
|
+
Nexus-Shell is a professional-grade, library-first frontend framework for building "Workbench" style applications (like VS Code or JupyterLab). Built with **React 19**, **TypeScript**, and **FlexLayout**, it provides a modular foundation for complex, multi-panel web tools.
|
|
4
|
+
|
|
5
|
+
## ✨ Key Features
|
|
6
|
+
|
|
7
|
+
- **Advanced Tab Docking:** Complete drag-and-drop window management with splits, tabs, and sidebars.
|
|
8
|
+
- **Modular Registry System:** Decouple commands, menus, and plugins from the core UI.
|
|
9
|
+
- **Persistence:** Automatic workspace restoration via `localStorage`.
|
|
10
|
+
- **Command Palette:** `Ctrl+Shift+P` searchable command interface.
|
|
11
|
+
- **Theming:** First-class support for Light, Dark, and custom themes (includes a Georgia Tech theme).
|
|
12
|
+
- **Library Ready:** ESM and UMD bundles with full TypeScript type definitions.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## 🚦 Quick Start
|
|
17
|
+
|
|
18
|
+
### 1. Installation
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npm install nexus-shell
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### 2. Basic Setup
|
|
25
|
+
|
|
26
|
+
In your main entry point (e.g., `App.tsx`):
|
|
27
|
+
|
|
28
|
+
```tsx
|
|
29
|
+
import { ShellLayout, initializeShell } from 'nexus-shell';
|
|
30
|
+
import 'nexus-shell/style.css';
|
|
31
|
+
|
|
32
|
+
// Initialize core shell services
|
|
33
|
+
initializeShell();
|
|
34
|
+
|
|
35
|
+
export default function App() {
|
|
36
|
+
return (
|
|
37
|
+
<div className="h-screen w-screen">
|
|
38
|
+
<ShellLayout />
|
|
39
|
+
</div>
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## 🏗 Core Concepts
|
|
47
|
+
|
|
48
|
+
### 1. Registries (The Brains)
|
|
49
|
+
Nexus-Shell uses registries to manage global state without component coupling.
|
|
50
|
+
|
|
51
|
+
- **`commandRegistry`**: Register global actions with IDs, labels, and optional keybindings.
|
|
52
|
+
- **`menuRegistry`**: Map commands to the top Menu Bar.
|
|
53
|
+
- **`pluginRegistry`**: Manage the lifecycle (`activate`/`deactivate`) of modular features.
|
|
54
|
+
|
|
55
|
+
### 2. Commands & Menus
|
|
56
|
+
```typescript
|
|
57
|
+
import { commandRegistry, menuRegistry } from 'nexus-shell';
|
|
58
|
+
|
|
59
|
+
// Register a command
|
|
60
|
+
commandRegistry.registerCommand({
|
|
61
|
+
id: 'my-app.hello',
|
|
62
|
+
label: 'Say Hello',
|
|
63
|
+
keybinding: 'Control+L',
|
|
64
|
+
execute: () => alert('Hello World!'),
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
// Add it to the Help menu
|
|
68
|
+
menuRegistry.registerMenu('Help', {
|
|
69
|
+
id: 'help.hello',
|
|
70
|
+
label: 'Say Hello',
|
|
71
|
+
commandId: 'my-app.hello',
|
|
72
|
+
});
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### 3. Layout Management
|
|
76
|
+
The layout is powered by `flexlayout-react`. You can dynamically add tabs from anywhere in your app:
|
|
77
|
+
|
|
78
|
+
```typescript
|
|
79
|
+
import { useLayoutStore } from 'nexus-shell';
|
|
80
|
+
|
|
81
|
+
const addMyTab = () => {
|
|
82
|
+
useLayoutStore.getState().addTab('my-component', 'My Tab Title');
|
|
83
|
+
};
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## 🛠 Step-by-Step: Creating a Custom Application
|
|
89
|
+
|
|
90
|
+
Follow these steps to build a feature-rich application using Nexus-Shell:
|
|
91
|
+
|
|
92
|
+
### Step 1: Initialize the Shell
|
|
93
|
+
Call `initializeShell()` before your app renders. This sets up the default "Welcome" tab, core menus, and global keyboard listeners.
|
|
94
|
+
|
|
95
|
+
### Step 2: Define your Components
|
|
96
|
+
Create React components that you want to appear as tabs. You must register these in the `factory` of the `ShellLayout` or provide a custom factory.
|
|
97
|
+
|
|
98
|
+
### Step 3: Register Commands and Menus
|
|
99
|
+
Define the actions your users can take. By using `commandRegistry`, your actions automatically show up in the **Command Palette** (`Ctrl+Shift+P`) and can be triggered by **Keyboard Shortcuts**.
|
|
100
|
+
|
|
101
|
+
### Step 4: Implement Plugins
|
|
102
|
+
For larger apps, encapsulate features into Plugins:
|
|
103
|
+
```typescript
|
|
104
|
+
import { IPlugin, commandRegistry } from 'nexus-shell';
|
|
105
|
+
|
|
106
|
+
export const MyFeaturePlugin: IPlugin = {
|
|
107
|
+
id: 'my-feature',
|
|
108
|
+
name: 'My Feature',
|
|
109
|
+
activate: () => {
|
|
110
|
+
// Register commands, menus, and sidebars here
|
|
111
|
+
},
|
|
112
|
+
deactivate: () => {
|
|
113
|
+
// Cleanup
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### Step 5: Choose a Theme
|
|
119
|
+
Users can switch themes in the Settings sidebar. You can also set the theme programmatically:
|
|
120
|
+
```typescript
|
|
121
|
+
import { useThemeStore } from 'nexus-shell';
|
|
122
|
+
|
|
123
|
+
useThemeStore.getState().setTheme('gt'); // Go Jackets!
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## 🎨 Customization API
|
|
129
|
+
|
|
130
|
+
Nexus-Shell is highly configurable via props on the `ShellLayout` component. This allows you to repurpose the workbench for different application needs.
|
|
131
|
+
|
|
132
|
+
### 1. Menu Bar Configuration (`menuConfig`)
|
|
133
|
+
Define hierarchical menus with nested submenus and commands.
|
|
134
|
+
```tsx
|
|
135
|
+
const myMenus = {
|
|
136
|
+
'File': [
|
|
137
|
+
{ id: 'new', label: 'New File', commandId: 'nexus.new-tab' },
|
|
138
|
+
{ id: 'recent', label: 'Open Recent', submenu: [
|
|
139
|
+
{ id: 'r1', label: 'Project Alpha' },
|
|
140
|
+
{ id: 'r2', label: 'Project Beta' }
|
|
141
|
+
]}
|
|
142
|
+
]
|
|
143
|
+
};
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### 2. Status Bar Widgets (`statusBarConfig`)
|
|
147
|
+
Add info widgets to the bottom bar with specific alignments.
|
|
148
|
+
```tsx
|
|
149
|
+
const myStatusBar = [
|
|
150
|
+
{ id: 'info', label: 'System OK', alignment: 'left', icon: Activity },
|
|
151
|
+
{ id: 'v', label: 'v1.0.0', alignment: 'center' },
|
|
152
|
+
{ id: 'user', label: 'Admin', alignment: 'right', onClick: () => alert('Admin Clicked') }
|
|
153
|
+
];
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
### 3. Sidebar Panels (`panels`)
|
|
157
|
+
Inject custom tools into the left Activity Bar.
|
|
158
|
+
```tsx
|
|
159
|
+
const myPanels = [
|
|
160
|
+
{ id: 'home', label: 'Home', icon: Home, component: MyHomeComponent },
|
|
161
|
+
{ id: 'db', label: 'Database', icon: Database, component: <DbExplorer /> }
|
|
162
|
+
];
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### 4. Chat Slash Commands (`slashCommands`)
|
|
166
|
+
Extend the chat interface with custom functional commands.
|
|
167
|
+
```tsx
|
|
168
|
+
const myChatCommands = [
|
|
169
|
+
{ command: 'ping', description: 'Test latency', execute: () => console.log('Pong!') },
|
|
170
|
+
{ command: 'clear', description: 'Reset chat', execute: (args) => resetLogic() }
|
|
171
|
+
];
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
### 5. Search Integration (`SearchWidget`)
|
|
175
|
+
A reusable component for implementing project-wide search.
|
|
176
|
+
```tsx
|
|
177
|
+
<SearchWidget
|
|
178
|
+
placeholder="Filter objects..."
|
|
179
|
+
onSearch={(query) => doFilter(query)}
|
|
180
|
+
results={filteredResults}
|
|
181
|
+
suggestions={['recent-1.txt', 'recent-2.txt']}
|
|
182
|
+
onSelect={(result) => openItem(result)}
|
|
183
|
+
loading={isSearching}
|
|
184
|
+
/>
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
**Usage Example:**
|
|
188
|
+
```tsx
|
|
189
|
+
<ShellLayout
|
|
190
|
+
menuConfig={myMenus}
|
|
191
|
+
statusBarConfig={myStatusBar}
|
|
192
|
+
panels={myPanels}
|
|
193
|
+
slashCommands={myChatCommands}
|
|
194
|
+
/>
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
---
|
|
198
|
+
|
|
199
|
+
## 📂 Project Structure (Library)
|
|
200
|
+
|
|
201
|
+
```text
|
|
202
|
+
/dist <-- Compiled library artifacts (ESM, UMD, CSS, Types)
|
|
203
|
+
/src
|
|
204
|
+
/components <-- UI Components (Layout, Widgets)
|
|
205
|
+
/core
|
|
206
|
+
/registry <-- Registry logic (Commands, Menus, Plugins)
|
|
207
|
+
/services <-- State Management (Zustand)
|
|
208
|
+
/index.ts <-- Public API Entry Point
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
---
|
|
212
|
+
|
|
213
|
+
## 🧪 Development & Testing
|
|
214
|
+
|
|
215
|
+
- **Run Dev App:** `npm run dev`
|
|
216
|
+
- **Build Library:** `npm run build`
|
|
217
|
+
- **Run Tests:** `npx playwright test`
|
|
218
|
+
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
## 📄 License
|
|
222
|
+
|
|
223
|
+
MIT © [David/TechMuch]
|
package/dist/App.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ISidebarPanel } from '../../core/services/SidebarService';
|
|
2
|
+
import { ISlashCommand } from '../../core/services/ChatService';
|
|
3
|
+
import { IStatusBarWidget } from '../../core/services/StatusBarService';
|
|
4
|
+
import { IMenuItem } from '../../core/registry/MenuRegistry';
|
|
5
|
+
|
|
6
|
+
interface ShellLayoutProps {
|
|
7
|
+
panels?: ISidebarPanel[];
|
|
8
|
+
slashCommands?: ISlashCommand[];
|
|
9
|
+
menuConfig?: Record<string, IMenuItem[]>;
|
|
10
|
+
statusBarConfig?: IStatusBarWidget[];
|
|
11
|
+
rightMenuBarContent?: React.ReactNode;
|
|
12
|
+
}
|
|
13
|
+
export declare const ShellLayout: ({ panels, slashCommands, menuConfig, statusBarConfig, rightMenuBarContent }: ShellLayoutProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ActivityBar: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ChatPane: () => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ICommand } from '../../core/registry/CommandRegistry';
|
|
2
|
+
|
|
3
|
+
interface CommandPaletteProps {
|
|
4
|
+
commands?: ICommand[];
|
|
5
|
+
forcedOpen?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const CommandPalette: ({ commands: customCommands, forcedOpen }: CommandPaletteProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface IContextMenuItem {
|
|
4
|
+
label: string;
|
|
5
|
+
icon?: React.ReactNode;
|
|
6
|
+
onClick: () => void;
|
|
7
|
+
divider?: boolean;
|
|
8
|
+
}
|
|
9
|
+
interface ContextMenuProps {
|
|
10
|
+
x: number;
|
|
11
|
+
y: number;
|
|
12
|
+
items: IContextMenuItem[];
|
|
13
|
+
onClose: () => void;
|
|
14
|
+
}
|
|
15
|
+
export declare const ContextMenu: React.FC<ContextMenuProps>;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const FilesSidebar: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface ISearchResult {
|
|
4
|
+
id: string;
|
|
5
|
+
title: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
icon?: React.ComponentType<any>;
|
|
8
|
+
category?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface SearchWidgetProps {
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
onSearch: (query: string) => void;
|
|
13
|
+
results: ISearchResult[];
|
|
14
|
+
onSelect: (result: ISearchResult) => void;
|
|
15
|
+
suggestions?: string[];
|
|
16
|
+
loading?: boolean;
|
|
17
|
+
className?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare const SearchWidget: React.FC<SearchWidgetProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SidebarPane: () => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const StatusBar: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const TerminalPane: () => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface ITreeNode {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
type: 'file' | 'folder';
|
|
7
|
+
children?: ITreeNode[];
|
|
8
|
+
isOpen?: boolean;
|
|
9
|
+
level?: number;
|
|
10
|
+
}
|
|
11
|
+
export interface TreeWidgetProps {
|
|
12
|
+
data: ITreeNode[];
|
|
13
|
+
onMoveNode?: (draggedId: string, targetId: string) => void;
|
|
14
|
+
onNewFile?: (parentId: string) => void;
|
|
15
|
+
onNewFolder?: (parentId: string) => void;
|
|
16
|
+
onRename?: (nodeId: string) => void;
|
|
17
|
+
onDelete?: (nodeId: string) => void;
|
|
18
|
+
}
|
|
19
|
+
export declare const TreeWidget: React.FC<TreeWidgetProps>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface UserProfileProps {
|
|
4
|
+
name: string;
|
|
5
|
+
avatarUrl?: string;
|
|
6
|
+
role?: string;
|
|
7
|
+
onClick?: () => void;
|
|
8
|
+
className?: string;
|
|
9
|
+
showName?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const UserProfile: React.FC<UserProfileProps>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface ICommand {
|
|
2
|
+
id: string;
|
|
3
|
+
label: string;
|
|
4
|
+
execute: (...args: any[]) => void;
|
|
5
|
+
icon?: string;
|
|
6
|
+
keybinding?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare class CommandRegistry {
|
|
9
|
+
private commands;
|
|
10
|
+
registerCommand(command: ICommand): void;
|
|
11
|
+
executeCommand(id: string, ...args: any[]): void;
|
|
12
|
+
getCommand(id: string): ICommand | undefined;
|
|
13
|
+
getCommands(): ICommand[];
|
|
14
|
+
}
|
|
15
|
+
export declare const commandRegistry: CommandRegistry;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface IMenuItem {
|
|
2
|
+
id: string;
|
|
3
|
+
label: string;
|
|
4
|
+
commandId?: string;
|
|
5
|
+
keybinding?: string;
|
|
6
|
+
submenu?: IMenuItem[];
|
|
7
|
+
}
|
|
8
|
+
export declare class MenuRegistry {
|
|
9
|
+
private menus;
|
|
10
|
+
registerMenu(menuId: string, item: IMenuItem): void;
|
|
11
|
+
setMenus(menuConfig: Record<string, IMenuItem[]>): void;
|
|
12
|
+
getMenu(menuId: string): IMenuItem[];
|
|
13
|
+
getAllMenus(): Record<string, IMenuItem[]>;
|
|
14
|
+
}
|
|
15
|
+
export declare const menuRegistry: MenuRegistry;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface IPlugin {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
activate: () => void;
|
|
5
|
+
deactivate: () => void;
|
|
6
|
+
}
|
|
7
|
+
export type PluginLoader = () => Promise<IPlugin>;
|
|
8
|
+
export declare class PluginRegistry {
|
|
9
|
+
private plugins;
|
|
10
|
+
private loaders;
|
|
11
|
+
registerPlugin(plugin: IPlugin): void;
|
|
12
|
+
registerLazyPlugin(id: string, loader: PluginLoader): void;
|
|
13
|
+
activatePlugin(id: string): Promise<void>;
|
|
14
|
+
getPlugin(id: string): IPlugin | undefined;
|
|
15
|
+
getAllPlugins(): IPlugin[];
|
|
16
|
+
}
|
|
17
|
+
export declare const pluginRegistry: PluginRegistry;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface ISlashCommand {
|
|
2
|
+
command: string;
|
|
3
|
+
description: string;
|
|
4
|
+
execute: (args: string[]) => void;
|
|
5
|
+
}
|
|
6
|
+
interface ChatState {
|
|
7
|
+
slashCommands: ISlashCommand[];
|
|
8
|
+
setSlashCommands: (commands: ISlashCommand[]) => void;
|
|
9
|
+
registerSlashCommand: (command: ISlashCommand) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const useChatStore: import('zustand').UseBoundStore<import('zustand').StoreApi<ChatState>>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useKeyboardShortcuts: () => void;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Model } from 'flexlayout-react';
|
|
2
|
+
|
|
3
|
+
interface LayoutState {
|
|
4
|
+
model: Model;
|
|
5
|
+
dirtyTabs: Set<string>;
|
|
6
|
+
setModel: (model: Model) => void;
|
|
7
|
+
addTab: (componentName: string, title?: string) => void;
|
|
8
|
+
setTabDirty: (tabId: string, dirty: boolean) => void;
|
|
9
|
+
isTabDirty: (tabId: string) => boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const useLayoutStore: import('zustand').UseBoundStore<import('zustand').StoreApi<LayoutState>>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { LucideIcon } from 'lucide-react';
|
|
2
|
+
|
|
3
|
+
export interface ISidebarPanel {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
icon: LucideIcon;
|
|
7
|
+
component: React.ComponentType<any> | React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
interface SidebarState {
|
|
10
|
+
activeSidebar: string | null;
|
|
11
|
+
panels: ISidebarPanel[];
|
|
12
|
+
setActiveSidebar: (id: string | null) => void;
|
|
13
|
+
toggleSidebar: (id: string) => void;
|
|
14
|
+
setPanels: (panels: ISidebarPanel[]) => void;
|
|
15
|
+
}
|
|
16
|
+
export declare const useSidebarStore: import('zustand').UseBoundStore<import('zustand').StoreApi<SidebarState>>;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { LucideIcon } from 'lucide-react';
|
|
2
|
+
|
|
3
|
+
export interface IStatusBarWidget {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
icon?: LucideIcon;
|
|
7
|
+
alignment: 'left' | 'center' | 'right';
|
|
8
|
+
commandId?: string;
|
|
9
|
+
onClick?: () => void;
|
|
10
|
+
className?: string;
|
|
11
|
+
priority?: number;
|
|
12
|
+
}
|
|
13
|
+
interface StatusBarState {
|
|
14
|
+
widgets: IStatusBarWidget[];
|
|
15
|
+
setWidgets: (widgets: IStatusBarWidget[]) => void;
|
|
16
|
+
addWidget: (widget: IStatusBarWidget) => void;
|
|
17
|
+
removeWidget: (id: string) => void;
|
|
18
|
+
updateWidget: (id: string, updates: Partial<IStatusBarWidget>) => void;
|
|
19
|
+
}
|
|
20
|
+
export declare const useStatusBarStore: import('zustand').UseBoundStore<import('zustand').StoreApi<StatusBarState>>;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface TerminalState {
|
|
2
|
+
isOpen: boolean;
|
|
3
|
+
history: string[];
|
|
4
|
+
setOpen: (open: boolean) => void;
|
|
5
|
+
toggle: () => void;
|
|
6
|
+
addHistory: (line: string) => void;
|
|
7
|
+
clearHistory: () => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const useTerminalStore: import('zustand').UseBoundStore<import('zustand').StoreApi<TerminalState>>;
|
|
10
|
+
export {};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export { ShellLayout } from './components/layout/ShellLayout';
|
|
2
|
+
export { MenuBar } from './components/widgets/MenuBar';
|
|
3
|
+
export { StatusBar } from './components/widgets/StatusBar';
|
|
4
|
+
export { ActivityBar } from './components/widgets/ActivityBar';
|
|
5
|
+
export { SidebarPane } from './components/widgets/SidebarPane';
|
|
6
|
+
export { TreeWidget } from './components/widgets/TreeWidget';
|
|
7
|
+
export { SearchWidget, type ISearchResult, type SearchWidgetProps } from './components/widgets/SearchWidget';
|
|
8
|
+
export { CommandPalette } from './components/widgets/CommandPalette';
|
|
9
|
+
export { UserProfile, type UserProfileProps } from './components/widgets/UserProfile';
|
|
10
|
+
export { ChatPane } from './components/widgets/ChatPane';
|
|
11
|
+
export { TerminalPane } from './components/widgets/TerminalPane';
|
|
12
|
+
export { commandRegistry, type ICommand } from './core/registry/CommandRegistry';
|
|
13
|
+
export { menuRegistry, type IMenuItem } from './core/registry/MenuRegistry';
|
|
14
|
+
export { pluginRegistry, type IPlugin } from './core/registry/PluginRegistry';
|
|
15
|
+
export { initializeShell } from './core/Boot';
|
|
16
|
+
export { useLayoutStore } from './core/services/LayoutService';
|
|
17
|
+
export { useThemeStore, type ThemeType } from './core/services/ThemeService';
|
|
18
|
+
export { useSidebarStore, type ISidebarPanel } from './core/services/SidebarService';
|
|
19
|
+
export { useRightSidebarStore } from './core/services/RightSidebarService';
|
|
20
|
+
export { useTerminalStore } from './core/services/TerminalService';
|
|
21
|
+
export { useChatStore, type ISlashCommand } from './core/services/ChatService';
|
|
22
|
+
export { useStatusBarStore, type IStatusBarWidget } from './core/services/StatusBarService';
|
|
23
|
+
export { useKeyboardShortcuts } from './core/services/KeyboardService';
|
package/dist/main.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|