@botharness/ui 1.4.1 → 1.5.1

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.
@@ -69,7 +69,7 @@ SOFTWARE.
69
69
  - Package: `lucide` icons (vendored glyph paths; see ADR-0032)
70
70
  - License: ISC
71
71
  - Source: <https://github.com/lucide-icons/lucide>
72
- - Used for: Channel sidebar function/settings/check glyphs (`house`, `files`, `git-branch`, `messages-square`, `inbox`, `folder-key`, `users`, `settings-2`, `settings`, `monitor`, `globe`, `panels-top-left`, `grip-vertical`, `check`, `eye`, `eye-off`, `chevron-right`, from `lucide-react@1.46.0`) in `channel-sidebar-icon.tsx`; the `inbox` Activity Center glyph (`InboxIcon` in `src/client/inbox-icon.tsx`) and the `hash` channel glyph (`HashIcon` in `src/client/hash-icon.tsx`, from `lucide-react@1.46.0`); the `git-commit-vertical` Memory commit glyph (`GitCommitIcon` in `src/client/git-commit-icon.tsx`, from `lucide-react@1.46.0`)
72
+ - Used for: Channel sidebar function/settings/check glyphs (`house`, `files`, `git-branch`, `messages-square`, `inbox`, `folder-key`, `users`, `settings-2`, `settings`, `monitor`, `globe`, `panels-top-left`, `grip-vertical`, `check`, `message-square`, `keyboard`, `smartphone`, `sliders-horizontal`, `info`, `eye`, `eye-off`, `chevron-right`, from `lucide-react@1.46.0`) in `channel-sidebar-icon.tsx`; the `inbox` Activity Center glyph (`InboxIcon` in `src/client/inbox-icon.tsx`) and the `hash` channel glyph (`HashIcon` in `src/client/hash-icon.tsx`, from `lucide-react@1.46.0`); the `git-commit-vertical` Memory commit glyph (`GitCommitIcon` in `src/client/git-commit-icon.tsx`, from `lucide-react@1.46.0`)
73
73
 
74
74
  ```
75
75
  ISC License
@@ -0,0 +1,79 @@
1
+ import { ComponentType } from "react";
2
+ //#region packages/client/src/panel-api.d.ts
3
+ export interface DockPanelChannel {
4
+ readonly id: string;
5
+ readonly type: 'dm' | 'group';
6
+ readonly botSlug: string | undefined;
7
+ }
8
+ export interface DockPanelProps {
9
+ readonly channel: DockPanelChannel | undefined;
10
+ readonly botId?: string | undefined;
11
+ readonly instanceId?: string | undefined;
12
+ }
13
+ export interface DockPanel {
14
+ readonly id: string;
15
+ readonly title: string;
16
+ readonly icon?: string | undefined;
17
+ readonly scope: 'global' | 'channel';
18
+ readonly binding?: 'current-bot' | undefined;
19
+ readonly order?: number | undefined;
20
+ readonly defaultPosition?: {
21
+ readonly zone: 'left' | 'center' | 'right' | 'bottom';
22
+ readonly relativeTo?: string | undefined;
23
+ } | undefined;
24
+ readonly component: ComponentType<DockPanelProps>;
25
+ readonly headerAction?: ComponentType<DockPanelProps> | undefined;
26
+ }
27
+ export interface DockPanelInstance {
28
+ readonly id: string;
29
+ readonly definitionId: string;
30
+ readonly botId: string;
31
+ readonly label: string;
32
+ }
33
+ export interface DockPanelRegistry {
34
+ register(panel: DockPanel): () => void;
35
+ panels(): readonly DockPanel[];
36
+ instances(): readonly DockPanelInstance[];
37
+ createInstance(definitionId: string, botId: string, label: string): string;
38
+ removeInstance(id: string): void;
39
+ openPanels(): readonly string[];
40
+ available(): boolean;
41
+ canOpen?(id: string): boolean;
42
+ isOpen(id: string): boolean;
43
+ open(id: string): void;
44
+ close(id: string): void;
45
+ toggle(id: string): void;
46
+ subscribe(listener: () => void): () => void;
47
+ }
48
+ export interface BotPresentationSnapshot {
49
+ readonly botId: string;
50
+ readonly name: string;
51
+ readonly available: boolean;
52
+ readonly paused: boolean;
53
+ readonly sync: 'connecting' | 'live' | 'stale';
54
+ readonly activity: 'idle' | 'thinking' | 'working' | 'waiting' | 'blocked';
55
+ readonly attention?: string | undefined;
56
+ readonly text: string;
57
+ readonly page: string;
58
+ readonly speaking: boolean;
59
+ readonly conversing: boolean;
60
+ readonly mouth: number;
61
+ readonly inbox: number;
62
+ }
63
+ export interface BotPresentationView {
64
+ getSnapshot(): BotPresentationSnapshot;
65
+ subscribe(listener: () => void | Promise<void>): () => void;
66
+ dispose(): void;
67
+ }
68
+ export interface BotPresentation {
69
+ acquire(botId: string): BotPresentationView;
70
+ bots(): readonly {
71
+ id: string;
72
+ name: string;
73
+ }[];
74
+ }
75
+ export interface PanelServices {
76
+ botPresentation: BotPresentation;
77
+ dockPanels: DockPanelRegistry;
78
+ }
79
+ //#endregion
@@ -0,0 +1 @@
1
+ export {};