nexus-shell 0.1.23 → 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 (109) 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 -3707
  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/MenuBarSearch.d.ts +0 -11
  52. package/dist/components/widgets/MockupReviewWidget.d.ts +0 -3
  53. package/dist/components/widgets/NexusWorkspaceTitle.d.ts +0 -10
  54. package/dist/components/widgets/ProjectPropertiesWidget.d.ts +0 -8
  55. package/dist/components/widgets/WargameMap.d.ts +0 -31
  56. package/dist/components/widgets/WelcomeTab.d.ts +0 -8
  57. package/dist/components/widgets/dialogue-mapper/IbisNode.d.ts +0 -5
  58. package/dist/components/widgets/mockup-reviewer/ExecutionOverlay.d.ts +0 -10
  59. package/dist/components/widgets/mockup-reviewer/HtmlShadowRenderer.d.ts +0 -9
  60. package/dist/components/widgets/mockup-reviewer/ImplementationPlanWorkspace.d.ts +0 -8
  61. package/dist/components/widgets/mockup-reviewer/MockupReviewWorkspace.d.ts +0 -10
  62. package/dist/components/widgets/mockup-reviewer/ReviewSidebar.d.ts +0 -3
  63. package/dist/components/widgets/mockup-reviewer/ReviewToolbar.d.ts +0 -12
  64. package/dist/components/widgets/mockup-reviewer/WorkflowMapper.d.ts +0 -7
  65. package/dist/components/widgets/wiki/AiCoWriterWorkspace.d.ts +0 -3
  66. package/dist/components/widgets/wiki/SemanticLinkMapper.d.ts +0 -3
  67. package/dist/components/widgets/wiki/WikiChatWidget.d.ts +0 -3
  68. package/dist/components/widgets/wiki/WikiEditor.d.ts +0 -3
  69. package/dist/components/widgets/wiki/WikiHistorySidebar.d.ts +0 -3
  70. package/dist/components/widgets/wiki/WikiNavigator.d.ts +0 -3
  71. package/dist/core/Boot.d.ts +0 -4
  72. package/dist/core/services/DialogueMappingService.d.ts +0 -59
  73. package/dist/core/services/FileStoreService.d.ts +0 -11
  74. package/dist/core/services/MockupReviewService.d.ts +0 -58
  75. package/dist/core/services/dialogue-mapper/DialogueLayoutEngine.d.ts +0 -9
  76. package/dist/core/services/dialogue-mapper/DialogueMapRepository.d.ts +0 -15
  77. package/dist/core/services/mockup-reviewer/MockupFixtures.d.ts +0 -11
  78. package/dist/core/services/useWikiStore.d.ts +0 -33
  79. package/dist/index-4EyxMz0x.js +0 -78516
  80. package/dist/main.d.ts +0 -1
  81. package/dist/maplibre-gl-DJOCpYhv.js +0 -24588
  82. package/dist/plugins/WikiPlugin.d.ts +0 -3
  83. package/dist/stories/ActivityBar.stories.d.ts +0 -9
  84. package/dist/stories/AgentManager.stories.d.ts +0 -25
  85. package/dist/stories/ChatPane.stories.d.ts +0 -10
  86. package/dist/stories/CommandPalette.stories.d.ts +0 -9
  87. package/dist/stories/DataGrid.stories.d.ts +0 -12
  88. package/dist/stories/DialogueMapperLibrary.stories.d.ts +0 -10
  89. package/dist/stories/DialogueMappingWidget.stories.d.ts +0 -9
  90. package/dist/stories/FlowControlToolbar.stories.d.ts +0 -14
  91. package/dist/stories/GlobalModal.stories.d.ts +0 -7
  92. package/dist/stories/IbisNode.stories.d.ts +0 -10
  93. package/dist/stories/MenuBar.stories.d.ts +0 -10
  94. package/dist/stories/MenuBarSearch.stories.d.ts +0 -7
  95. package/dist/stories/MockupReviewWidget.stories.d.ts +0 -9
  96. package/dist/stories/MockupReviewerLayout.stories.d.ts +0 -8
  97. package/dist/stories/NexusWorkspaceShell.stories.d.ts +0 -9
  98. package/dist/stories/NexusWorkspaceTitle.stories.d.ts +0 -11
  99. package/dist/stories/SearchWidget.stories.d.ts +0 -9
  100. package/dist/stories/ShellLayout.stories.d.ts +0 -13
  101. package/dist/stories/SidebarPane.stories.d.ts +0 -8
  102. package/dist/stories/StatusBar.stories.d.ts +0 -10
  103. package/dist/stories/TerminalPane.stories.d.ts +0 -9
  104. package/dist/stories/ThemeSwitcher.stories.d.ts +0 -10
  105. package/dist/stories/TreeWidget.stories.d.ts +0 -8
  106. package/dist/stories/UserProfile.stories.d.ts +0 -11
  107. package/dist/stories/WargameMap.stories.d.ts +0 -14
  108. package/dist/stories/wiki/WikiComposition.stories.d.ts +0 -6
  109. package/dist/stories/wiki/WikiWidgets.stories.d.ts +0 -11
@@ -1,22 +1,66 @@
1
1
  import { default as React } from 'react';
2
2
 
3
+ /** A column definition for {@link DataGrid}. */
3
4
  export interface IDataGridColumn<T = any> {
5
+ /** Property on the row object to read. Also used as the React key. */
4
6
  key: string;
7
+ /** Header text. */
5
8
  header: string;
9
+ /** Fixed column width as a CSS length or px number. Omit to size flexibly. */
6
10
  width?: string | number;
11
+ /** Allow clicking the header to sort by this column. Defaults to `false`. */
7
12
  sortable?: boolean;
13
+ /**
14
+ * Custom cell renderer. Receives the cell value and the whole row, so you can
15
+ * render badges, links or derived values. Defaults to the raw value.
16
+ */
8
17
  render?: (value: any, row: T) => React.ReactNode;
9
18
  }
10
19
  export interface DataGridProps<T = any> {
20
+ /** Columns, in display order. */
11
21
  columns: IDataGridColumn<T>[];
22
+ /** Rows to display. Sorting and filtering are applied on top of this array. */
12
23
  data: T[];
24
+ /** Called with the clicked row. */
13
25
  onRowClick?: (row: T) => void;
26
+ /** Value of `rowKey` on the row to highlight as selected. */
14
27
  selectedRowId?: string | number;
28
+ /** Property used as each row's identity. Defaults to `"id"`. */
15
29
  rowKey?: keyof T;
30
+ /**
31
+ * Virtualise rows with `react-virtuoso`. Leave on for large datasets; turn it
32
+ * off when the grid must print or be fully present in the DOM. Defaults to
33
+ * `true`.
34
+ */
16
35
  virtualized?: boolean;
36
+ /** Show the built-in filter box above the grid. Defaults to `true`. */
17
37
  showFilter?: boolean;
38
+ /** Show a loading indicator in place of rows. Defaults to `false`. */
18
39
  loading?: boolean;
40
+ /** Message shown when there are no rows. */
19
41
  placeholder?: string;
42
+ /** Extra classes merged onto the root element. */
20
43
  className?: string;
21
44
  }
45
+ /**
46
+ * A sortable, filterable data table with optional row virtualisation.
47
+ *
48
+ * Filtering and sorting are handled internally against the `data` you pass — a
49
+ * case-insensitive match across all values, and click-to-sort on columns marked
50
+ * `sortable`. For server-side paging or sorting, filter upstream and set
51
+ * `showFilter={false}`.
52
+ *
53
+ * @example
54
+ * ```tsx
55
+ * <DataGrid
56
+ * columns={[
57
+ * { key: 'name', header: 'Name', sortable: true },
58
+ * { key: 'status', header: 'Status', width: 120,
59
+ * render: (v) => <Badge>{v}</Badge> },
60
+ * ]}
61
+ * data={rows}
62
+ * onRowClick={(row) => select(row.id)}
63
+ * />
64
+ * ```
65
+ */
22
66
  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;
@@ -1,6 +1,56 @@
1
- interface MenuBarProps {
2
- title?: React.ReactNode;
3
- rightContent?: React.ReactNode;
1
+ import { ReactNode } from 'react';
2
+
3
+ /** An entry in a {@link MenuBar} dropdown. */
4
+ export interface IMenuItem {
5
+ /** Stable identifier reported to `onSelect`. */
6
+ id: string;
7
+ /** Label shown in the dropdown. */
8
+ label: string;
9
+ /** Keybinding hint shown right-aligned, e.g. `"⌘S"`. */
10
+ keybinding?: string;
11
+ /** Nested items. An item with a submenu is not itself selectable. */
12
+ submenu?: IMenuItem[];
4
13
  }
5
- export declare const MenuBar: ({ title, rightContent }: MenuBarProps) => import("react/jsx-runtime").JSX.Element;
6
- export {};
14
+ export interface MenuBarProps {
15
+ /**
16
+ * Menus keyed by top-level label, e.g. `{ File: [...], Edit: [...] }`.
17
+ * Insertion order determines display order.
18
+ */
19
+ menus?: Record<string, IMenuItem[]>;
20
+ /** Called with the chosen leaf item. Items with a `submenu` never fire this. */
21
+ onSelect?: (item: IMenuItem) => void;
22
+ /**
23
+ * Branding shown at the far left. Pass a string, a logo element, or omit it
24
+ * for the default wordmark. Providing a `title` switches the bar to its
25
+ * taller, translucent variant.
26
+ */
27
+ title?: ReactNode;
28
+ /**
29
+ * Slot between the menus and the right edge, sized for a search input. The
30
+ * bar renders whatever you pass — it does not embed a search component.
31
+ */
32
+ center?: ReactNode;
33
+ /** Slot at the far right, for a theme switcher, avatar, or actions. */
34
+ right?: ReactNode;
35
+ /** Extra classes merged onto the root `<header>`. */
36
+ className?: string;
37
+ }
38
+ /**
39
+ * The application menu bar: a row of hover-activated dropdowns with optional
40
+ * one-level submenus, plus slots for branding, a centre widget and right-hand
41
+ * actions.
42
+ *
43
+ * Presentational and fully controlled — menus come in as data and selections go
44
+ * out through `onSelect`. It reads no registry. For the variant wired to the
45
+ * {@link menuRegistry} and {@link commandRegistry}, see `ConnectedMenuBar`.
46
+ *
47
+ * @example
48
+ * ```tsx
49
+ * <MenuBar
50
+ * menus={{ File: [{ id: 'save', label: 'Save', keybinding: '⌘S' }] }}
51
+ * onSelect={(item) => run(item.id)}
52
+ * right={<ThemeSwitcher value={theme} onChange={setTheme} />}
53
+ * />
54
+ * ```
55
+ */
56
+ export declare const MenuBar: ({ menus, onSelect, title, center, right, className, }: MenuBarProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,58 @@
1
+ /**
2
+ * Which of the three dialog shapes to render.
3
+ *
4
+ * - `alert` — a single OK button.
5
+ * - `confirm` — Cancel and Confirm.
6
+ * - `prompt` — Cancel and Confirm, plus a text input.
7
+ */
8
+ export type ModalType = 'alert' | 'confirm' | 'prompt';
9
+ export interface ModalProps {
10
+ /** Whether the dialog is mounted. Nothing renders when `false`. */
11
+ open: boolean;
12
+ /** Dialog shape. Defaults to `"alert"`. */
13
+ type?: ModalType;
14
+ /** Heading text. */
15
+ title: string;
16
+ /** Body text. Newlines are preserved. */
17
+ message?: string;
18
+ /** Initial value of the input when `type` is `"prompt"`. */
19
+ defaultValue?: string;
20
+ /**
21
+ * Called on Confirm/OK and on Enter. Receives the input text for `prompt`,
22
+ * and `undefined` for `alert` and `confirm`.
23
+ */
24
+ onConfirm?: (value?: string) => void;
25
+ /** Called on Cancel, on the close button, on Escape, and on backdrop click. */
26
+ onCancel?: () => void;
27
+ /** Label for the confirm button. Defaults to `"OK"` / `"Confirm"` by `type`. */
28
+ confirmLabel?: string;
29
+ /** Label for the cancel button. Defaults to `"Cancel"`. */
30
+ cancelLabel?: string;
31
+ /** Placeholder for the prompt input. */
32
+ placeholder?: string;
33
+ /** Extra classes merged onto the dialog surface. */
34
+ className?: string;
35
+ }
36
+ /**
37
+ * A centered modal dialog covering the three common blocking interactions:
38
+ * alert, confirm and prompt.
39
+ *
40
+ * Fully controlled — it owns only the prompt's draft text. Escape, backdrop
41
+ * click and the close button all route to `onCancel`; Enter routes to
42
+ * `onConfirm`. For the promise-based variant driven by `useModalStore` (so you
43
+ * can `await openConfirm(...)` from anywhere), see `ConnectedModal`.
44
+ *
45
+ * @example
46
+ * ```tsx
47
+ * <Modal
48
+ * open={open}
49
+ * type="prompt"
50
+ * title="Rename file"
51
+ * message="Enter a new name."
52
+ * defaultValue="untitled.ts"
53
+ * onConfirm={(name) => rename(name)}
54
+ * onCancel={() => setOpen(false)}
55
+ * />
56
+ * ```
57
+ */
58
+ export declare const Modal: ({ open, type, title, message, defaultValue, onConfirm, onCancel, confirmLabel, cancelLabel, placeholder, className, }: ModalProps) => import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,66 @@
1
+ import { default as React } from 'react';
2
+
3
+ /** A single row in the {@link QuickSearch} dropdown. */
4
+ export interface IQuickSearchResult {
5
+ /** Identifier, unique within its category. */
6
+ id: string;
7
+ /** Primary line. */
8
+ title: string;
9
+ /** Secondary line, truncated to one line. Often a path or shortcut hint. */
10
+ description?: string;
11
+ /**
12
+ * Group heading this result appears under. Groups render in the order given
13
+ * by the `categories` prop, or in first-seen order when that is omitted.
14
+ */
15
+ category: string;
16
+ /** Icon component rendered at 12px in the row's leading badge. */
17
+ icon?: React.ComponentType<{
18
+ size?: number;
19
+ className?: string;
20
+ }>;
21
+ }
22
+ export interface QuickSearchProps<T extends IQuickSearchResult = IQuickSearchResult> {
23
+ /**
24
+ * Results for the current query. `QuickSearch` does no filtering — it renders
25
+ * exactly what you give it, so you control matching, ranking and async
26
+ * loading.
27
+ */
28
+ results: T[];
29
+ /** Called on every keystroke, debounced by `debounceMs`. */
30
+ onQueryChange?: (query: string) => void;
31
+ /** Called when a row is clicked or chosen with Enter. */
32
+ onSelect: (result: T) => void;
33
+ /**
34
+ * Explicit category order. Categories absent from this list are dropped, so
35
+ * it doubles as a whitelist. Defaults to first-seen order.
36
+ */
37
+ categories?: string[];
38
+ /** Placeholder for the input. Defaults to `"Search…"`. */
39
+ placeholder?: string;
40
+ /** Delay before `onQueryChange` fires, in ms. Defaults to `200`. */
41
+ debounceMs?: number;
42
+ /** Extra classes merged onto the root element. */
43
+ className?: string;
44
+ }
45
+ /**
46
+ * A compact search field with a grouped results dropdown, sized to sit inside a
47
+ * {@link MenuBar}.
48
+ *
49
+ * Presentational and fully controlled — it owns the query text, the open state
50
+ * and the keyboard highlight, and nothing else. Searching is entirely yours:
51
+ * results are pushed in via `results`, so the same component backs a local
52
+ * array, a registry lookup, or a remote index.
53
+ *
54
+ * Arrow keys move the highlight across groups, Enter selects, Escape closes.
55
+ *
56
+ * @example
57
+ * ```tsx
58
+ * <QuickSearch
59
+ * results={hits}
60
+ * categories={['Actions', 'Files']}
61
+ * onQueryChange={setQuery}
62
+ * onSelect={(hit) => open(hit.id)}
63
+ * />
64
+ * ```
65
+ */
66
+ export declare const QuickSearch: <T extends IQuickSearchResult = IQuickSearchResult>({ results, onQueryChange, onSelect, categories, placeholder, debounceMs, className, }: QuickSearchProps<T>) => import("react/jsx-runtime").JSX.Element;
@@ -1,19 +1,55 @@
1
1
  import { default as React } from 'react';
2
2
 
3
+ /** A result row in {@link SearchWidget}. */
3
4
  export interface ISearchResult {
5
+ /** Stable identifier. Used as the React key. */
4
6
  id: string;
7
+ /** Primary line. */
5
8
  title: string;
9
+ /** Secondary line, truncated to one line. */
6
10
  description?: string;
11
+ /** Icon component rendered at 14px in the leading badge. */
7
12
  icon?: React.ComponentType<any>;
13
+ /** Short tag rendered right-aligned on the title row, e.g. `"FILE"`. */
8
14
  category?: string;
9
15
  }
10
16
  export interface SearchWidgetProps {
17
+ /** Placeholder for the input. Defaults to `"Search..."`. */
11
18
  placeholder?: string;
19
+ /**
20
+ * Called with the current query, debounced by 300ms. Do your matching here
21
+ * and feed the outcome back through `results`.
22
+ */
12
23
  onSearch: (query: string) => void;
24
+ /** Results for the current query. The widget renders them as given. */
13
25
  results: ISearchResult[];
26
+ /** Called with the clicked result. */
14
27
  onSelect: (result: ISearchResult) => void;
28
+ /** Past or suggested queries offered as autocomplete below the input. */
15
29
  suggestions?: string[];
30
+ /** Swap the search icon for a spinner while a query is in flight. */
16
31
  loading?: boolean;
32
+ /** Extra classes merged onto the root element. */
17
33
  className?: string;
18
34
  }
35
+ /**
36
+ * A full-height search panel: an input with autocomplete over a scrolling
37
+ * result list. Sized for the sidebar, unlike the compact {@link QuickSearch}
38
+ * that sits in the menu bar.
39
+ *
40
+ * Controlled with respect to results — it owns the query text and debounces it
41
+ * to `onSearch`, but never filters `results` itself. That keeps async and
42
+ * remote search straightforward.
43
+ *
44
+ * @example
45
+ * ```tsx
46
+ * <SearchWidget
47
+ * onSearch={setQuery}
48
+ * results={hits}
49
+ * loading={isFetching}
50
+ * suggestions={recentQueries}
51
+ * onSelect={(hit) => open(hit.id)}
52
+ * />
53
+ * ```
54
+ */
19
55
  export declare const SearchWidget: React.FC<SearchWidgetProps>;
@@ -0,0 +1,33 @@
1
+ import { LucideIcon } from 'lucide-react';
2
+
3
+ /** A theme choice offered by {@link SettingsPanel}. */
4
+ export interface ISettingsThemeOption<T extends string = string> {
5
+ id: T;
6
+ label: string;
7
+ icon: LucideIcon;
8
+ }
9
+ export declare const DEFAULT_SETTINGS_THEMES: ISettingsThemeOption[];
10
+ export interface SettingsPanelProps<T extends string = string> {
11
+ /** Currently selected theme id. */
12
+ theme: T;
13
+ /** Called with the newly selected theme id. */
14
+ onThemeChange: (theme: T) => void;
15
+ /** Theme choices to offer. Defaults to the three bundled themes. */
16
+ themes?: ISettingsThemeOption<T>[];
17
+ /** Extra classes merged onto the root element. */
18
+ className?: string;
19
+ }
20
+ /**
21
+ * Sidebar body for the Settings panel: a vertical list of theme choices.
22
+ *
23
+ * Split out of {@link SidebarPane} so the pane stays a generic container. Pass
24
+ * this (or your own component) as the sidebar's `children`.
25
+ *
26
+ * @example
27
+ * ```tsx
28
+ * <SidebarPane title="Settings" onClose={close}>
29
+ * <SettingsPanel theme={theme} onThemeChange={setTheme} />
30
+ * </SidebarPane>
31
+ * ```
32
+ */
33
+ export declare const SettingsPanel: <T extends string = string>({ theme, onThemeChange, themes, className, }: SettingsPanelProps<T>) => import("react/jsx-runtime").JSX.Element;
@@ -1 +1,37 @@
1
- export declare const SidebarPane: () => import("react/jsx-runtime").JSX.Element | null;
1
+ import { ReactNode } from 'react';
2
+
3
+ export interface SidebarPaneProps {
4
+ /**
5
+ * Heading text. Rendered uppercase with letter-spacing; pass it in natural
6
+ * case and let the component style it.
7
+ */
8
+ title: string;
9
+ /** Panel body. Scrolls independently of the header. */
10
+ children?: ReactNode;
11
+ /**
12
+ * Called when the close button is pressed. Omit it to hide the close button
13
+ * entirely — useful when the pane is always visible.
14
+ */
15
+ onClose?: () => void;
16
+ /** Fixed pane width, as a CSS length. Defaults to `"300px"`. */
17
+ width?: string;
18
+ /** Extra classes merged onto the root `<aside>`. */
19
+ className?: string;
20
+ }
21
+ /**
22
+ * The collapsible panel beside the {@link ActivityBar}: a titled header with an
23
+ * optional close button, over a scrolling body.
24
+ *
25
+ * A pure container — it decides nothing about which panel is showing and holds
26
+ * no state. Render whatever you like as `children`. For the store-backed
27
+ * variant that resolves the active panel from `useSidebarStore`, see
28
+ * `ConnectedSidebarPane`.
29
+ *
30
+ * @example
31
+ * ```tsx
32
+ * <SidebarPane title="Explorer" onClose={() => setActive(null)}>
33
+ * <TreeWidget data={files} />
34
+ * </SidebarPane>
35
+ * ```
36
+ */
37
+ export declare const SidebarPane: ({ title, children, onClose, width, className, }: SidebarPaneProps) => import("react/jsx-runtime").JSX.Element;
@@ -1 +1,51 @@
1
- export declare const StatusBar: () => import("react/jsx-runtime").JSX.Element;
1
+ import { LucideIcon } from 'lucide-react';
2
+
3
+ /**
4
+ * A single item rendered into one of the status bar's three alignment groups.
5
+ */
6
+ export interface IStatusBarWidget {
7
+ /** Stable unique identifier. Used as the React key. */
8
+ id: string;
9
+ /** Text shown next to the icon. Pass an empty string for an icon-only item. */
10
+ label: string;
11
+ /** Optional `lucide-react` icon rendered before the label at 12px. */
12
+ icon?: LucideIcon;
13
+ /** Which of the three groups the item belongs to. */
14
+ alignment: 'left' | 'center' | 'right';
15
+ /** Invoked on click and on Enter/Space. Providing it makes the item interactive. */
16
+ onClick?: () => void;
17
+ /** Extra classes merged onto the item, e.g. `"text-green-500"`. */
18
+ className?: string;
19
+ /** Higher values sort earlier within the group. Defaults to `0`. */
20
+ priority?: number;
21
+ }
22
+ export interface StatusBarProps {
23
+ /**
24
+ * Items to display. They are grouped by `alignment` and sorted by descending
25
+ * `priority` within each group.
26
+ */
27
+ widgets?: IStatusBarWidget[];
28
+ /** Accessible label for the landmark. Defaults to `"Status Bar"`. */
29
+ 'aria-label'?: string;
30
+ /** Extra classes merged onto the root `<footer>`. */
31
+ className?: string;
32
+ }
33
+ /**
34
+ * A VS Code-style status bar: a fixed-height footer with left, center and right
35
+ * item groups. Items may be static labels or interactive buttons.
36
+ *
37
+ * This component is fully controlled — it holds no state and reads no global
38
+ * store. For the store-backed variant used by `ShellLayout`, see
39
+ * {@link ConnectedStatusBar}.
40
+ *
41
+ * @example
42
+ * ```tsx
43
+ * <StatusBar
44
+ * widgets={[
45
+ * { id: 'branch', label: 'main', icon: GitBranch, alignment: 'left', onClick: openBranches },
46
+ * { id: 'ln', label: 'Ln 12, Col 4', alignment: 'right' },
47
+ * ]}
48
+ * />
49
+ * ```
50
+ */
51
+ export declare const StatusBar: ({ widgets, className, "aria-label": ariaLabel, }: StatusBarProps) => import("react/jsx-runtime").JSX.Element;
@@ -1 +1,43 @@
1
- export declare const TerminalPane: () => import("react/jsx-runtime").JSX.Element | null;
1
+ export interface TerminalPaneProps {
2
+ /** Lines already written to the terminal, oldest first. */
3
+ history?: string[];
4
+ /**
5
+ * Called with the trimmed command text when the user presses Enter. Empty
6
+ * input is swallowed and never reaches this handler.
7
+ *
8
+ * The component does not echo the command or interpret it — append the echo
9
+ * and any output to `history` yourself. This keeps command semantics
10
+ * (`clear`, `help`, anything app-specific) entirely in your hands.
11
+ */
12
+ onCommand?: (command: string) => void;
13
+ /** Called when the collapse or close button is pressed. */
14
+ onClose?: () => void;
15
+ /** Height of the pane, as a CSS length. Defaults to `"250px"`. */
16
+ height?: string;
17
+ /** Prompt string shown before the input. Defaults to `"$"`. */
18
+ prompt?: string;
19
+ /** Title shown in the pane header. Defaults to `"Terminal"`. */
20
+ title?: string;
21
+ /** Extra classes merged onto the root element. */
22
+ className?: string;
23
+ }
24
+ /**
25
+ * A bottom-docked terminal pane: a scrolling output log over a single-line
26
+ * input.
27
+ *
28
+ * Presentational and fully controlled — it owns only the in-progress input
29
+ * text. Visibility, history and command execution all belong to the caller.
30
+ * For the store-backed variant with built-in `clear`/`help` handling, see
31
+ * `ConnectedTerminalPane`.
32
+ *
33
+ * @example
34
+ * ```tsx
35
+ * const [history, setHistory] = useState<string[]>([]);
36
+ * <TerminalPane
37
+ * history={history}
38
+ * onCommand={(cmd) => setHistory((h) => [...h, `$ ${cmd}`, run(cmd)])}
39
+ * onClose={() => setOpen(false)}
40
+ * />
41
+ * ```
42
+ */
43
+ export declare const TerminalPane: ({ history, onCommand, onClose, height, prompt, title, className, }: TerminalPaneProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,37 @@
1
- import { default as React } from 'react';
2
-
3
- export interface ThemeSwitcherProps {
1
+ /** An option in the {@link ThemeSwitcher} segmented control. */
2
+ export interface IThemeOption<T extends string = string> {
3
+ /** Value reported to `onChange`. Also used as the React key. */
4
+ id: T;
5
+ /** Short label shown on the segment. Kept terse — segments are compact. */
6
+ label: string;
7
+ }
8
+ export declare const DEFAULT_THEME_OPTIONS: IThemeOption[];
9
+ export interface ThemeSwitcherProps<T extends string = string> {
10
+ /** Currently selected theme id. */
11
+ value: T;
12
+ /** Called with the newly selected theme id. */
13
+ onChange: (theme: T) => void;
14
+ /**
15
+ * Selectable themes. Defaults to Light / Dark / Georgia Tech, matching the
16
+ * themes shipped in the library's stylesheet.
17
+ */
18
+ options?: IThemeOption<T>[];
19
+ /** Extra classes merged onto the root element. */
4
20
  className?: string;
21
+ /** Accessible label for the group. Defaults to `"Theme"`. */
22
+ 'aria-label'?: string;
5
23
  }
6
- export declare const ThemeSwitcher: React.FC<ThemeSwitcherProps>;
7
- export default ThemeSwitcher;
24
+ /**
25
+ * A compact segmented control for switching themes.
26
+ *
27
+ * Controlled — it renders `value` and reports changes through `onChange`, and
28
+ * applies no classes to the document itself. For the store-backed variant that
29
+ * also sets the theme class on `<html>`, see `ConnectedThemeSwitcher`.
30
+ *
31
+ * @example
32
+ * ```tsx
33
+ * const [theme, setTheme] = useState('light');
34
+ * <ThemeSwitcher value={theme} onChange={setTheme} />
35
+ * ```
36
+ */
37
+ export declare const ThemeSwitcher: <T extends string = string>({ value, onChange, options, className, "aria-label": ariaLabel, }: ThemeSwitcherProps<T>) => import("react/jsx-runtime").JSX.Element;
@@ -1,21 +1,110 @@
1
1
  import { default as React } from 'react';
2
2
 
3
+ /** A node in the {@link TreeWidget} hierarchy. */
3
4
  export interface ITreeNode {
5
+ /** Stable identifier, unique across the whole tree. */
4
6
  id: string;
7
+ /** Text shown for the node. */
5
8
  label: string;
9
+ /** `folder` nodes expand on click; `file` nodes do not. */
6
10
  type: 'file' | 'folder';
11
+ /** Child nodes. Only rendered while `isOpen` is `true`. */
7
12
  children?: ITreeNode[];
13
+ /** Whether a folder is expanded. Controlled by you — see `onToggle`. */
8
14
  isOpen?: boolean;
9
- level?: number;
15
+ }
16
+ /**
17
+ * Where a context-menu action applies.
18
+ *
19
+ * `nodeId` is `null` when the menu was opened on empty background, which is how
20
+ * you distinguish "new file here" from "new file at the root".
21
+ */
22
+ export interface ITreeContext {
23
+ /** The right-clicked node's id, or `null` for the background. */
24
+ nodeId: string | null;
25
+ /** The right-clicked node, or `null` for the background. */
26
+ node: ITreeNode | null;
27
+ }
28
+ /** A custom entry in the tree's right-click menu. */
29
+ export interface ITreeAction {
30
+ /** Stable identifier. Used as the React key. */
31
+ id: string;
32
+ /** Label shown in the menu. */
33
+ label: string;
34
+ /** Optional icon element, rendered before the label. */
35
+ icon?: React.ReactNode;
36
+ /** Runs with the right-clicked target. */
37
+ onSelect: (context: ITreeContext) => void;
38
+ /** Draw a separator above this entry. */
39
+ divider?: boolean;
40
+ /**
41
+ * Restrict where the entry appears. Defaults to everywhere. Use this for
42
+ * actions that only make sense on a folder, or only on the background.
43
+ */
44
+ showFor?: ('file' | 'folder' | 'background')[];
10
45
  }
11
46
  export interface TreeWidgetProps {
47
+ /** Root nodes. Expansion state lives on the nodes themselves via `isOpen`. */
12
48
  data: ITreeNode[];
13
- onMoveNode?: (draggedId: string, targetId: string) => void;
49
+ /**
50
+ * Called when a folder is clicked. Flip that node's `isOpen` in your own
51
+ * state — the tree renders expansion but does not own it.
52
+ */
53
+ onToggle?: (node: ITreeNode) => void;
54
+ /** Called when a node is double-clicked. Typically opens the item. */
55
+ onActivate?: (node: ITreeNode) => void;
56
+ /** Called after a node is dragged onto a folder. */
57
+ onMoveNode?: (draggedId: string, targetFolderId: string) => void;
58
+ /**
59
+ * Entries for the right-click menu. Defaults to New File, New Folder, Rename
60
+ * and Delete, which map to the `onNew*` / `onRename` / `onDelete` props.
61
+ *
62
+ * Pass your own array to replace that set entirely — this is the extension
63
+ * point for app-specific commands, so the tree itself stays generic.
64
+ */
65
+ actions?: ITreeAction[];
66
+ /** Handler for the built-in "New File" action. */
14
67
  onNewFile?: (parentId: string | null) => void;
68
+ /** Handler for the built-in "New Folder" action. */
15
69
  onNewFolder?: (parentId: string | null) => void;
16
- onNewDialogueMap?: (parentId: string | null) => void;
70
+ /** Handler for the built-in "Rename" action. */
17
71
  onRename?: (nodeId: string) => void;
72
+ /** Handler for the built-in "Delete" action. */
18
73
  onDelete?: (nodeId: string) => void;
19
- onDoubleClick?: (node: ITreeNode) => void;
74
+ /** Indentation added per depth level, in px. Defaults to `12`. */
75
+ indent?: number;
76
+ /**
77
+ * Virtualise rows with `react-virtuoso`. Leave on for large trees; turn it
78
+ * off when every row must be present in the DOM — printing, full-text browser
79
+ * search, or a test environment that can't measure layout. Defaults to `true`.
80
+ */
81
+ virtualized?: boolean;
82
+ /** Extra classes merged onto the root element. */
83
+ className?: string;
20
84
  }
21
- export declare const TreeWidget: React.FC<TreeWidgetProps>;
85
+ /**
86
+ * A virtualised file-explorer tree with drag-to-move and a right-click menu.
87
+ *
88
+ * Rows are virtualised via `react-virtuoso`, so very large trees stay
89
+ * responsive. The component is controlled: expansion lives on your nodes as
90
+ * `isOpen` and changes are reported through `onToggle`, so the tree never holds
91
+ * a second copy of your data.
92
+ *
93
+ * The context menu is data-driven. The defaults cover the usual file
94
+ * operations; pass `actions` to replace them with your own commands rather than
95
+ * adding one-off props.
96
+ *
97
+ * @example
98
+ * ```tsx
99
+ * <TreeWidget
100
+ * data={nodes}
101
+ * onToggle={(n) => setNodes(toggle(nodes, n.id))}
102
+ * onActivate={(n) => open(n.id)}
103
+ * actions={[
104
+ * { id: 'new-map', label: 'New Map', icon: <Map size={14} />,
105
+ * showFor: ['folder', 'background'], onSelect: (ctx) => createMap(ctx.nodeId) },
106
+ * ]}
107
+ * />
108
+ * ```
109
+ */
110
+ export declare const TreeWidget: ({ data, onToggle, onActivate, onMoveNode, actions, onNewFile, onNewFolder, onRename, onDelete, indent, virtualized, className, }: TreeWidgetProps) => import("react/jsx-runtime").JSX.Element;