nexus-shell 0.1.22 → 0.2.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.
Files changed (94) hide show
  1. package/README.md +148 -107
  2. package/dist/components/layout/ShellLayout.d.ts +57 -11
  3. package/dist/components/widgets/ActivityBar.d.ts +48 -1
  4. package/dist/components/widgets/AppTitle.d.ts +30 -0
  5. package/dist/components/widgets/ChatPane.d.ts +63 -1
  6. package/dist/components/widgets/CommandPalette.d.ts +55 -7
  7. package/dist/components/widgets/ContextMenu.d.ts +34 -3
  8. package/dist/components/widgets/DataGrid.d.ts +44 -0
  9. package/dist/components/widgets/MenuBar.d.ts +55 -5
  10. package/dist/components/widgets/Modal.d.ts +58 -0
  11. package/dist/components/widgets/QuickSearch.d.ts +66 -0
  12. package/dist/components/widgets/SearchWidget.d.ts +36 -0
  13. package/dist/components/widgets/SettingsPanel.d.ts +33 -0
  14. package/dist/components/widgets/SidebarPane.d.ts +37 -1
  15. package/dist/components/widgets/StatusBar.d.ts +51 -1
  16. package/dist/components/widgets/TerminalPane.d.ts +43 -1
  17. package/dist/components/widgets/ThemeSwitcher.d.ts +35 -5
  18. package/dist/components/widgets/TreeWidget.d.ts +94 -5
  19. package/dist/components/widgets/UserProfile.d.ts +75 -6
  20. package/dist/connected/ConnectedActivityBar.d.ts +10 -0
  21. package/dist/connected/ConnectedChatPane.d.ts +18 -0
  22. package/dist/connected/ConnectedCommandPalette.d.ts +18 -0
  23. package/dist/connected/ConnectedMenuBar.d.ts +12 -0
  24. package/dist/connected/ConnectedModal.d.ts +15 -0
  25. package/dist/connected/ConnectedSidebarPane.d.ts +12 -0
  26. package/dist/connected/ConnectedStatusBar.d.ts +15 -0
  27. package/dist/connected/ConnectedTerminalPane.d.ts +18 -0
  28. package/dist/connected/ConnectedThemeSwitcher.d.ts +11 -0
  29. package/dist/connected/ConnectedUserProfile.d.ts +14 -0
  30. package/dist/connected/index.d.ts +21 -0
  31. package/dist/core/registry/MenuRegistry.d.ts +22 -9
  32. package/dist/core/services/ChatService.d.ts +23 -7
  33. package/dist/core/services/StatusBarService.d.ts +17 -14
  34. package/dist/index.d.ts +44 -32
  35. package/dist/lib/cn.d.ts +12 -0
  36. package/dist/nexus-shell.es.js +2360 -40
  37. package/dist/nexus-shell.umd.js +1 -3687
  38. package/dist/style.css +1 -1
  39. package/package.json +43 -15
  40. package/dist/App.d.ts +0 -2
  41. package/dist/components/layout/NexusWorkspaceShell.d.ts +0 -9
  42. package/dist/components/widgets/AgentManager.d.ts +0 -18
  43. package/dist/components/widgets/ArgumentInspectorWidget.d.ts +0 -5
  44. package/dist/components/widgets/DialogueMapperInspector.d.ts +0 -5
  45. package/dist/components/widgets/DialogueMapperLibrary.d.ts +0 -11
  46. package/dist/components/widgets/DialogueMapperLibraryWidget.d.ts +0 -3
  47. package/dist/components/widgets/DialogueMappingWidget.d.ts +0 -10
  48. package/dist/components/widgets/FilesSidebar.d.ts +0 -1
  49. package/dist/components/widgets/FlowControlToolbar.d.ts +0 -18
  50. package/dist/components/widgets/GlobalModal.d.ts +0 -3
  51. package/dist/components/widgets/MockupReviewWidget.d.ts +0 -3
  52. package/dist/components/widgets/NexusWorkspaceTitle.d.ts +0 -10
  53. package/dist/components/widgets/ProjectPropertiesWidget.d.ts +0 -8
  54. package/dist/components/widgets/WargameMap.d.ts +0 -31
  55. package/dist/components/widgets/WelcomeTab.d.ts +0 -8
  56. package/dist/components/widgets/dialogue-mapper/IbisNode.d.ts +0 -5
  57. package/dist/components/widgets/mockup-reviewer/ExecutionOverlay.d.ts +0 -10
  58. package/dist/components/widgets/mockup-reviewer/HtmlShadowRenderer.d.ts +0 -9
  59. package/dist/components/widgets/mockup-reviewer/ImplementationPlanWorkspace.d.ts +0 -8
  60. package/dist/components/widgets/mockup-reviewer/MockupReviewWorkspace.d.ts +0 -10
  61. package/dist/components/widgets/mockup-reviewer/ReviewSidebar.d.ts +0 -3
  62. package/dist/components/widgets/mockup-reviewer/ReviewToolbar.d.ts +0 -12
  63. package/dist/components/widgets/mockup-reviewer/WorkflowMapper.d.ts +0 -7
  64. package/dist/core/Boot.d.ts +0 -4
  65. package/dist/core/services/DialogueMappingService.d.ts +0 -59
  66. package/dist/core/services/FileStoreService.d.ts +0 -11
  67. package/dist/core/services/MockupReviewService.d.ts +0 -58
  68. package/dist/index-CldzmX--.js +0 -78241
  69. package/dist/main.d.ts +0 -1
  70. package/dist/maplibre-gl-4rEhwx6Y.js +0 -24588
  71. package/dist/stories/ActivityBar.stories.d.ts +0 -9
  72. package/dist/stories/AgentManager.stories.d.ts +0 -25
  73. package/dist/stories/ChatPane.stories.d.ts +0 -10
  74. package/dist/stories/CommandPalette.stories.d.ts +0 -9
  75. package/dist/stories/DataGrid.stories.d.ts +0 -12
  76. package/dist/stories/DialogueMapperLibrary.stories.d.ts +0 -10
  77. package/dist/stories/DialogueMappingWidget.stories.d.ts +0 -9
  78. package/dist/stories/FlowControlToolbar.stories.d.ts +0 -14
  79. package/dist/stories/GlobalModal.stories.d.ts +0 -7
  80. package/dist/stories/IbisNode.stories.d.ts +0 -10
  81. package/dist/stories/MenuBar.stories.d.ts +0 -10
  82. package/dist/stories/MockupReviewWidget.stories.d.ts +0 -9
  83. package/dist/stories/MockupReviewerLayout.stories.d.ts +0 -8
  84. package/dist/stories/NexusWorkspaceShell.stories.d.ts +0 -9
  85. package/dist/stories/NexusWorkspaceTitle.stories.d.ts +0 -11
  86. package/dist/stories/SearchWidget.stories.d.ts +0 -9
  87. package/dist/stories/ShellLayout.stories.d.ts +0 -13
  88. package/dist/stories/SidebarPane.stories.d.ts +0 -8
  89. package/dist/stories/StatusBar.stories.d.ts +0 -10
  90. package/dist/stories/TerminalPane.stories.d.ts +0 -9
  91. package/dist/stories/ThemeSwitcher.stories.d.ts +0 -10
  92. package/dist/stories/TreeWidget.stories.d.ts +0 -8
  93. package/dist/stories/UserProfile.stories.d.ts +0 -11
  94. package/dist/stories/WargameMap.stories.d.ts +0 -14
@@ -1,12 +1,81 @@
1
- import { default as React } from 'react';
1
+ import { LucideIcon } from 'lucide-react';
2
2
 
3
- export interface UserProfileProps {
4
- name?: string;
5
- avatarUrl?: string;
3
+ /** The identity rendered by {@link UserProfile}. */
4
+ export interface IUserProfile {
5
+ /** Display name. Shown on the trigger and in the dropdown header. */
6
+ name: string;
7
+ /** Secondary line, e.g. job title. Omit to hide it. */
6
8
  role?: string;
9
+ /** Shown in the dropdown header only. */
7
10
  email?: string;
11
+ /** Image URL or data URL. Falls back to a generic user icon. */
12
+ avatarUrl?: string;
13
+ }
14
+ /** An action in the profile dropdown. */
15
+ export interface IUserProfileAction {
16
+ /** Stable identifier. Used as the React key. */
17
+ id: string;
18
+ /** Label shown for the action. */
19
+ label: string;
20
+ /** `lucide-react` icon rendered at 12px. */
21
+ icon?: LucideIcon;
22
+ /** Runs on click. The dropdown closes afterwards. */
23
+ onSelect: () => void;
24
+ /** Render in the destructive colour, for sign-out and similar. */
25
+ destructive?: boolean;
26
+ /** Draw a separator above this action. */
27
+ divider?: boolean;
28
+ }
29
+ export interface UserProfileProps {
30
+ /** The identity to display. */
31
+ profile: IUserProfile;
32
+ /**
33
+ * Actions listed in the dropdown. Empty by default — the component prescribes
34
+ * no menu, since "Sign Out" and "Account Settings" mean different things in
35
+ * every app.
36
+ */
37
+ actions?: IUserProfileAction[];
38
+ /**
39
+ * Called with the new name and role when the inline editor is saved.
40
+ * Omit it to hide the edit affordance entirely.
41
+ */
42
+ onProfileChange?: (profile: Pick<IUserProfile, 'name' | 'role'>) => void;
43
+ /**
44
+ * Called with a file the user picked for their avatar. Read it and update
45
+ * `profile.avatarUrl` yourself — the component neither reads files nor holds
46
+ * the result. Omit it to hide the upload affordance.
47
+ */
48
+ onAvatarChange?: (file: File) => void;
49
+ /**
50
+ * Bypass the dropdown entirely and just report the click. Useful when the
51
+ * profile should open a full settings tab instead of a menu.
52
+ */
8
53
  onClick?: () => void;
9
- className?: string;
54
+ /** Show the name and role beside the avatar. Defaults to `true`. */
10
55
  showName?: boolean;
56
+ /** Extra classes merged onto the trigger button. */
57
+ className?: string;
11
58
  }
12
- export declare const UserProfile: React.FC<UserProfileProps>;
59
+ /**
60
+ * An avatar and identity widget with a dropdown menu, sized for a menu bar's
61
+ * right slot.
62
+ *
63
+ * Fully controlled — it owns only its open/editing UI state. The identity comes
64
+ * in as `profile`, edits go out through `onProfileChange`, and the menu is
65
+ * whatever you pass as `actions`. It reads no store and prescribes no menu
66
+ * items, so it works the same against a session hook, an auth provider, or
67
+ * static props.
68
+ *
69
+ * @example
70
+ * ```tsx
71
+ * <UserProfile
72
+ * profile={{ name: 'Ada Lovelace', role: 'Engineer', email: 'ada@example.com' }}
73
+ * onProfileChange={(next) => save(next)}
74
+ * actions={[
75
+ * { id: 'settings', label: 'Account Settings', icon: Settings, onSelect: openSettings },
76
+ * { id: 'out', label: 'Sign Out', icon: LogOut, onSelect: signOut, destructive: true, divider: true },
77
+ * ]}
78
+ * />
79
+ * ```
80
+ */
81
+ export declare const UserProfile: ({ profile, actions, onProfileChange, onAvatarChange, onClick, showName, className, }: UserProfileProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,10 @@
1
+ import { ActivityBarProps } from '../components/widgets/ActivityBar';
2
+
3
+ export type ConnectedActivityBarProps = Omit<ActivityBarProps, 'items' | 'activeId' | 'onSelect'>;
4
+ /**
5
+ * {@link ActivityBar} bound to `useSidebarStore`.
6
+ *
7
+ * Derives its items from the registered sidebar panels and toggles the active
8
+ * panel on click — clicking the already-active item closes the sidebar.
9
+ */
10
+ export declare const ConnectedActivityBar: (props: ConnectedActivityBarProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,18 @@
1
+ import { ChatPaneProps } from '../components/widgets/ChatPane';
2
+
3
+ export type ConnectedChatPaneProps = Omit<ChatPaneProps, 'messages' | 'slashCommands' | 'onSend' | 'onClose'> & {
4
+ /**
5
+ * Handle a plain (non-slash) message. Append any reply with
6
+ * `useChatStore.getState().addMessage(...)`. Without this, user messages are
7
+ * recorded but nothing responds.
8
+ */
9
+ onSend?: (text: string) => void;
10
+ };
11
+ /**
12
+ * {@link ChatPane} bound to `useChatStore` and `useRightSidebarStore`.
13
+ *
14
+ * Renders nothing while the right sidebar reports chat closed. Appends each
15
+ * submission to the transcript, then either dispatches a registered slash
16
+ * command's `execute` or hands the text to `onSend`.
17
+ */
18
+ export declare const ConnectedChatPane: ({ onSend, ...props }: ConnectedChatPaneProps) => import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,18 @@
1
+ import { CommandPaletteProps } from '../components/widgets/CommandPalette';
2
+ import { ICommand } from '../core/registry/CommandRegistry';
3
+
4
+ export type ConnectedCommandPaletteProps = Omit<CommandPaletteProps<ICommand>, 'open' | 'commands' | 'onSelect' | 'onClose'> & {
5
+ /**
6
+ * Key that opens the palette when held with Cmd/Ctrl+Shift. Defaults to
7
+ * `"p"`, matching VS Code's `Cmd+Shift+P`. Pass `null` to bind nothing.
8
+ */
9
+ shortcutKey?: string | null;
10
+ };
11
+ /**
12
+ * {@link CommandPalette} bound to the {@link commandRegistry}.
13
+ *
14
+ * Owns its own visibility and binds a global `Cmd/Ctrl+Shift+P` listener to
15
+ * toggle it. Selecting a command runs the registry entry's `execute` and closes
16
+ * the palette.
17
+ */
18
+ export declare const ConnectedCommandPalette: ({ shortcutKey, ...props }: ConnectedCommandPaletteProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,12 @@
1
+ import { MenuBarProps } from '../components/widgets/MenuBar';
2
+
3
+ export type ConnectedMenuBarProps = Omit<MenuBarProps, 'menus' | 'onSelect'>;
4
+ /**
5
+ * {@link MenuBar} bound to the {@link menuRegistry} and {@link commandRegistry}.
6
+ *
7
+ * Reads the menu structure from the registry, backfills keybinding hints from
8
+ * each item's registered command, and dispatches the item's `commandId` on
9
+ * select. Use this inside a shell; use the plain {@link MenuBar} when you want
10
+ * to pass menus as data.
11
+ */
12
+ export declare const ConnectedMenuBar: (props: ConnectedMenuBarProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,15 @@
1
+ import { ModalProps } from '../components/widgets/Modal';
2
+
3
+ export type ConnectedModalProps = Omit<ModalProps, 'open' | 'type' | 'title' | 'message' | 'defaultValue' | 'onConfirm' | 'onCancel'>;
4
+ /**
5
+ * {@link Modal} bound to `useModalStore`.
6
+ *
7
+ * Mount this once near the root of your app. It renders whichever dialog the
8
+ * store has open and resolves the store's pending promise on dismissal, which
9
+ * is what lets any code `await useModalStore.getState().openConfirm(...)`
10
+ * without holding a component reference.
11
+ *
12
+ * Resolution values follow the store's contract: `prompt` resolves to the text
13
+ * or `null`, `confirm` to a boolean, `alert` to `undefined`.
14
+ */
15
+ export declare const ConnectedModal: (props: ConnectedModalProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,12 @@
1
+ import { SidebarPaneProps } from '../components/widgets/SidebarPane';
2
+
3
+ export type ConnectedSidebarPaneProps = Omit<SidebarPaneProps, 'title' | 'children' | 'onClose'>;
4
+ /**
5
+ * {@link SidebarPane} bound to `useSidebarStore`.
6
+ *
7
+ * Renders whichever panel is active, or nothing when the sidebar is closed. The
8
+ * reserved `"settings"` panel id renders the built-in {@link SettingsPanel}
9
+ * wired to `useThemeStore`; every other id resolves against the panels
10
+ * registered in the store.
11
+ */
12
+ export declare const ConnectedSidebarPane: (props: ConnectedSidebarPaneProps) => import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,15 @@
1
+ import { StatusBarProps } from '../components/widgets/StatusBar';
2
+
3
+ export type ConnectedStatusBarProps = Omit<StatusBarProps, 'widgets'>;
4
+ /**
5
+ * {@link StatusBar} bound to `useStatusBarStore`.
6
+ *
7
+ * Reads items from the shell store and resolves each item's `commandId`
8
+ * against the {@link commandRegistry}, so store-registered items can trigger
9
+ * commands without holding a function reference. An explicit `onClick` on the
10
+ * item takes precedence over its `commandId`.
11
+ *
12
+ * Use this inside a shell; use the plain {@link StatusBar} when you want to
13
+ * supply items yourself.
14
+ */
15
+ export declare const ConnectedStatusBar: (props: ConnectedStatusBarProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,18 @@
1
+ import { TerminalPaneProps } from '../components/widgets/TerminalPane';
2
+
3
+ export type ConnectedTerminalPaneProps = Omit<TerminalPaneProps, 'history' | 'onCommand' | 'onClose'> & {
4
+ /**
5
+ * Handle a command the built-ins don't cover. Return `true` if you handled
6
+ * it; return `false` or omit the handler to fall through to
7
+ * "command not found".
8
+ */
9
+ onCommand?: (command: string) => boolean | void;
10
+ };
11
+ /**
12
+ * {@link TerminalPane} bound to `useTerminalStore`.
13
+ *
14
+ * Renders nothing while the store reports the terminal closed. Echoes each
15
+ * command into history and handles `help` and `clear` internally; anything else
16
+ * is offered to `onCommand` before falling back to a not-found message.
17
+ */
18
+ export declare const ConnectedTerminalPane: ({ onCommand, ...props }: ConnectedTerminalPaneProps) => import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,11 @@
1
+ import { ThemeSwitcherProps } from '../components/widgets/ThemeSwitcher';
2
+ import { ThemeType } from '../core/services/ThemeService';
3
+
4
+ export type ConnectedThemeSwitcherProps = Omit<ThemeSwitcherProps<ThemeType>, 'value' | 'onChange'>;
5
+ /**
6
+ * {@link ThemeSwitcher} bound to `useThemeStore`.
7
+ *
8
+ * Selecting a theme writes it to the store, which applies the matching
9
+ * `theme-*` class to `<html>` and persists the choice to `localStorage`.
10
+ */
11
+ export declare const ConnectedThemeSwitcher: (props: ConnectedThemeSwitcherProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,14 @@
1
+ import { UserProfileProps } from '../components/widgets/UserProfile';
2
+
3
+ export type ConnectedUserProfileProps = Omit<UserProfileProps, 'profile' | 'onProfileChange' | 'onAvatarChange'>;
4
+ /**
5
+ * {@link UserProfile} bound to `useUserProfileStore`.
6
+ *
7
+ * Reads the identity from the store, writes inline edits back to it, and reads
8
+ * a picked avatar file as a data URL before storing it.
9
+ *
10
+ * The dropdown's `actions` are deliberately still yours to pass — sign-out and
11
+ * account settings mean different things in every app, so the library declines
12
+ * to guess.
13
+ */
14
+ export declare const ConnectedUserProfile: (props: ConnectedUserProfileProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Store-connected component variants.
3
+ *
4
+ * Every component in `components/` is pure and prop-driven. The wrappers here
5
+ * bind those components to the shell's zustand stores and registries, so
6
+ * `ShellLayout` — and any app that opts into the batteries-included shell — can
7
+ * compose them without prop-drilling.
8
+ *
9
+ * Reach for these when you want the shell's behavior. Reach for the plain
10
+ * components when you want control.
11
+ */
12
+ export { ConnectedActivityBar, type ConnectedActivityBarProps } from './ConnectedActivityBar';
13
+ export { ConnectedChatPane, type ConnectedChatPaneProps } from './ConnectedChatPane';
14
+ export { ConnectedCommandPalette, type ConnectedCommandPaletteProps } from './ConnectedCommandPalette';
15
+ export { ConnectedMenuBar, type ConnectedMenuBarProps } from './ConnectedMenuBar';
16
+ export { ConnectedModal, type ConnectedModalProps } from './ConnectedModal';
17
+ export { ConnectedSidebarPane, type ConnectedSidebarPaneProps } from './ConnectedSidebarPane';
18
+ export { ConnectedStatusBar, type ConnectedStatusBarProps } from './ConnectedStatusBar';
19
+ export { ConnectedTerminalPane, type ConnectedTerminalPaneProps } from './ConnectedTerminalPane';
20
+ export { ConnectedThemeSwitcher, type ConnectedThemeSwitcherProps } from './ConnectedThemeSwitcher';
21
+ export { ConnectedUserProfile, type ConnectedUserProfileProps } from './ConnectedUserProfile';
@@ -1,15 +1,28 @@
1
- export interface IMenuItem {
2
- id: string;
3
- label: string;
1
+ import { IMenuItem } from '../../components/widgets/MenuBar';
2
+
3
+ /**
4
+ * A menu entry as held in the registry. Extends the presentational
5
+ * {@link IMenuItem} with `commandId`, which `ConnectedMenuBar` resolves against
6
+ * the {@link commandRegistry} when the item is chosen.
7
+ */
8
+ export interface IMenuItemConfig extends IMenuItem {
9
+ /** Command to execute when the item is selected. */
4
10
  commandId?: string;
5
- keybinding?: string;
6
- submenu?: IMenuItem[];
11
+ /** Nested entries, which may themselves carry a `commandId`. */
12
+ submenu?: IMenuItemConfig[];
7
13
  }
14
+ /**
15
+ * Holds the application's menu structure, keyed by top-level menu name.
16
+ *
17
+ * This is a shell-level convenience so plugins can contribute menu entries
18
+ * without prop-drilling. The presentational `MenuBar` does not read it.
19
+ */
8
20
  export declare class MenuRegistry {
9
21
  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[]>;
22
+ registerMenu(menuId: string, item: IMenuItemConfig): void;
23
+ setMenus(menuConfig: Record<string, IMenuItemConfig[]>): void;
24
+ getMenu(menuId: string): IMenuItemConfig[];
25
+ getAllMenus(): Record<string, IMenuItemConfig[]>;
14
26
  }
15
27
  export declare const menuRegistry: MenuRegistry;
28
+ export type { IMenuItem };
@@ -1,12 +1,28 @@
1
- export interface ISlashCommand {
2
- command: string;
3
- description: string;
1
+ import { IChatMessage, ISlashCommand } from '../../components/widgets/ChatPane';
2
+
3
+ /**
4
+ * A slash command as held in the shell store. Extends the presentational
5
+ * {@link ISlashCommand} with the handler that runs when it is invoked.
6
+ */
7
+ export interface ISlashCommandConfig extends ISlashCommand {
8
+ /** Runs when the command is submitted. Receives the whitespace-split args. */
4
9
  execute: (args: string[]) => void;
5
10
  }
6
11
  interface ChatState {
7
- slashCommands: ISlashCommand[];
8
- setSlashCommands: (commands: ISlashCommand[]) => void;
9
- registerSlashCommand: (command: ISlashCommand) => void;
12
+ messages: IChatMessage[];
13
+ slashCommands: ISlashCommandConfig[];
14
+ setMessages: (messages: IChatMessage[]) => void;
15
+ addMessage: (message: Omit<IChatMessage, 'id'> & {
16
+ id?: string;
17
+ }) => void;
18
+ clearMessages: () => void;
19
+ setSlashCommands: (commands: ISlashCommandConfig[]) => void;
20
+ registerSlashCommand: (command: ISlashCommandConfig) => void;
10
21
  }
22
+ /**
23
+ * Shell-level store for the chat pane's transcript and slash commands.
24
+ * Consumed by `ConnectedChatPane`; the presentational `ChatPane` does not read
25
+ * it.
26
+ */
11
27
  export declare const useChatStore: import('zustand').UseBoundStore<import('zustand').StoreApi<ChatState>>;
12
- export {};
28
+ export type { IChatMessage, ISlashCommand };
@@ -1,21 +1,24 @@
1
- import { LucideIcon } from 'lucide-react';
1
+ import { IStatusBarWidget } from '../../components/widgets/StatusBar';
2
2
 
3
- export interface IStatusBarWidget {
4
- id: string;
5
- label: string;
6
- icon?: LucideIcon;
7
- alignment: 'left' | 'center' | 'right';
3
+ /**
4
+ * A status bar item as held in the shell store. Extends the presentational
5
+ * {@link IStatusBarWidget} with `commandId`, which the connected wrapper
6
+ * resolves against the {@link commandRegistry} at click time.
7
+ */
8
+ export interface IStatusBarWidgetConfig extends IStatusBarWidget {
9
+ /** Command to execute on click. Ignored if `onClick` is also provided. */
8
10
  commandId?: string;
9
- onClick?: () => void;
10
- className?: string;
11
- priority?: number;
12
11
  }
13
12
  interface StatusBarState {
14
- widgets: IStatusBarWidget[];
15
- setWidgets: (widgets: IStatusBarWidget[]) => void;
16
- addWidget: (widget: IStatusBarWidget) => void;
13
+ widgets: IStatusBarWidgetConfig[];
14
+ setWidgets: (widgets: IStatusBarWidgetConfig[]) => void;
15
+ addWidget: (widget: IStatusBarWidgetConfig) => void;
17
16
  removeWidget: (id: string) => void;
18
- updateWidget: (id: string, updates: Partial<IStatusBarWidget>) => void;
17
+ updateWidget: (id: string, updates: Partial<IStatusBarWidgetConfig>) => void;
19
18
  }
19
+ /**
20
+ * Shell-level store holding the status bar's items. Consumed by
21
+ * `ConnectedStatusBar`; the presentational `StatusBar` does not read it.
22
+ */
20
23
  export declare const useStatusBarStore: import('zustand').UseBoundStore<import('zustand').StoreApi<StatusBarState>>;
21
- export {};
24
+ export type { IStatusBarWidget };
package/dist/index.d.ts CHANGED
@@ -1,39 +1,51 @@
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 { AgentManager, type Agent, type AgentManagerProps } from './components/widgets/AgentManager';
13
- export { WargameMap, type WargameMapProps, type UnitData, type AttackData, type TerrainHexData } from './components/widgets/WargameMap';
1
+ /**
2
+ * Nexus Shell — a React component library for building IDE-style application
3
+ * shells.
4
+ *
5
+ * The surface is deliberately two-tier:
6
+ *
7
+ * 1. **Primitives** — pure, prop-driven components with no global state. Use
8
+ * these to build your own layout. They are the supported public API.
9
+ * 2. **Shell** — `ShellLayout` plus the stores and registries behind it, for
10
+ * when you want the whole assembled application frame.
11
+ *
12
+ * Import the stylesheet once in your app entry:
13
+ * ```ts
14
+ * import 'nexus-shell/style.css';
15
+ * ```
16
+ */
17
+ export { ActivityBar, type ActivityBarProps, type IActivityBarItem } from './components/widgets/ActivityBar';
18
+ export { ChatPane, type ChatPaneProps, type IChatMessage, type ISlashCommand } from './components/widgets/ChatPane';
19
+ export { CommandPalette, type CommandPaletteProps, type ICommandItem } from './components/widgets/CommandPalette';
20
+ export { ContextMenu, type ContextMenuProps, type IContextMenuItem } from './components/widgets/ContextMenu';
14
21
  export { DataGrid, type DataGridProps, type IDataGridColumn } from './components/widgets/DataGrid';
15
- export { MockupReviewWidget } from './components/widgets/MockupReviewWidget';
16
- export { useMockupReviewStore, type IMockupAnnotation, type IMockupVersion, type IMockupView } from './core/services/MockupReviewService';
17
- export { DialogueMappingWidget } from './components/widgets/DialogueMappingWidget';
18
- export { DialogueMapperLibraryWidget } from './components/widgets/DialogueMapperLibraryWidget';
19
- export { ArgumentInspectorWidget } from './components/widgets/ArgumentInspectorWidget';
20
- export { DialogueMapperLibrary, type DialogueMapperLibraryProps } from './components/widgets/DialogueMapperLibrary';
21
- export { FlowControlToolbar, type FlowControlToolbarProps } from './components/widgets/FlowControlToolbar';
22
- export { NexusWorkspaceShell, type NexusWorkspaceShellProps } from './components/layout/NexusWorkspaceShell';
23
- export { ThemeSwitcher, type ThemeSwitcherProps } from './components/widgets/ThemeSwitcher';
24
- export { NexusWorkspaceTitle, type NexusWorkspaceTitleProps } from './components/widgets/NexusWorkspaceTitle';
25
- export { useDialogueMappingStore, type IDialogueNodeData, type IbisNodeType } from './core/services/DialogueMappingService';
26
- export { commandRegistry, type ICommand } from './core/registry/CommandRegistry';
27
- export { menuRegistry, type IMenuItem } from './core/registry/MenuRegistry';
22
+ export { MenuBar, type MenuBarProps, type IMenuItem } from './components/widgets/MenuBar';
23
+ export { Modal, type ModalProps, type ModalType } from './components/widgets/Modal';
24
+ export { QuickSearch, type QuickSearchProps, type IQuickSearchResult } from './components/widgets/QuickSearch';
25
+ export { SearchWidget, type SearchWidgetProps, type ISearchResult } from './components/widgets/SearchWidget';
26
+ export { SettingsPanel, type SettingsPanelProps, type ISettingsThemeOption, DEFAULT_SETTINGS_THEMES } from './components/widgets/SettingsPanel';
27
+ export { SidebarPane, type SidebarPaneProps } from './components/widgets/SidebarPane';
28
+ export { StatusBar, type StatusBarProps, type IStatusBarWidget } from './components/widgets/StatusBar';
29
+ export { TerminalPane, type TerminalPaneProps } from './components/widgets/TerminalPane';
30
+ export { ThemeSwitcher, type ThemeSwitcherProps, type IThemeOption, DEFAULT_THEME_OPTIONS } from './components/widgets/ThemeSwitcher';
31
+ export { TreeWidget, type TreeWidgetProps, type ITreeNode, type ITreeAction, type ITreeContext } from './components/widgets/TreeWidget';
32
+ export { UserProfile, type UserProfileProps, type IUserProfile, type IUserProfileAction } from './components/widgets/UserProfile';
33
+ export { AppTitle, type AppTitleProps } from './components/widgets/AppTitle';
34
+ export { cn } from './lib/cn';
35
+ export { ShellLayout, ShellLayout as NexusWorkspaceShell, type ShellLayoutProps } from './components/layout/ShellLayout';
36
+ export declare const initializeShell: (_config?: unknown) => void;
37
+ export * from './connected';
38
+ export { commandRegistry, CommandRegistry, type ICommand } from './core/registry/CommandRegistry';
39
+ export { menuRegistry, MenuRegistry, type IMenuItemConfig } from './core/registry/MenuRegistry';
28
40
  export { pluginRegistry, type IPlugin, type PluginStatus } from './core/registry/PluginRegistry';
29
41
  export { componentRegistry, type ComponentConstructor } from './core/registry/ComponentRegistry';
30
- export { initializeShell } from './core/Boot';
42
+ export { useChatStore, type ISlashCommandConfig } from './core/services/ChatService';
31
43
  export { useLayoutStore } from './core/services/LayoutService';
32
- export { useThemeStore, type ThemeType } from './core/services/ThemeService';
33
- export { useSidebarStore, type ISidebarPanel } from './core/services/SidebarService';
44
+ export { useModalStore, type ModalType as ModalStoreType } from './core/services/ModalStoreService';
34
45
  export { useRightSidebarStore } from './core/services/RightSidebarService';
46
+ export { useSidebarStore, type ISidebarPanel } from './core/services/SidebarService';
47
+ export { useStatusBarStore, type IStatusBarWidgetConfig } from './core/services/StatusBarService';
35
48
  export { useTerminalStore } from './core/services/TerminalService';
36
- export { useChatStore, type ISlashCommand } from './core/services/ChatService';
37
- export { useStatusBarStore, type IStatusBarWidget } from './core/services/StatusBarService';
38
- export { useKeyboardShortcuts } from './core/services/KeyboardService';
49
+ export { useThemeStore, type ThemeType } from './core/services/ThemeService';
39
50
  export { useUserProfileStore, type UserProfileState } from './core/services/UserProfileService';
51
+ export { useKeyboardShortcuts } from './core/services/KeyboardService';
@@ -0,0 +1,12 @@
1
+ import { ClassValue } from 'clsx';
2
+
3
+ /**
4
+ * Merge Tailwind class names, resolving conflicts so the last-specified
5
+ * utility wins. Use this anywhere a component accepts a `className` prop
6
+ * that should be able to override the component's own defaults.
7
+ *
8
+ * @example
9
+ * cn('px-2 text-sm', isActive && 'text-primary', className)
10
+ */
11
+ export declare function cn(...inputs: ClassValue[]): string;
12
+ export type { ClassValue };