@pstdio/ui 0.5.1 → 0.5.2

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 (65) hide show
  1. package/dist/{MermaidComponent-x3aKzNXm.js → MermaidComponent-DDCxR-Gs.js} +2 -2
  2. package/dist/{MermaidComponent-x3aKzNXm.js.map → MermaidComponent-DDCxR-Gs.js.map} +1 -1
  3. package/dist/chat-ui.js +742 -726
  4. package/dist/chat-ui.js.map +1 -1
  5. package/dist/components/app-shell/app-shell.d.ts +1 -0
  6. package/dist/components/app-shell/command-palette.d.ts +16 -0
  7. package/dist/components/app-shell/file-tree.d.ts +7 -0
  8. package/dist/components/app-shell/mock-chat.d.ts +2 -0
  9. package/dist/components/app-shell/mock-data.d.ts +37 -0
  10. package/dist/components/app-shell/pages/project-list-page.d.ts +7 -0
  11. package/dist/components/app-shell/pages/sessions-page.d.ts +6 -0
  12. package/dist/components/app-shell/pages/settings-page.d.ts +5 -0
  13. package/dist/components/app-shell/pages/ticket-details-page.d.ts +7 -0
  14. package/dist/components/app-shell/pages/tickets-page.d.ts +7 -0
  15. package/dist/components/app-shell/pages/workspace-page.d.ts +1 -0
  16. package/dist/components/app-shell/resizable-panel.d.ts +13 -0
  17. package/dist/components/chat-ui/components/ai-message.d.ts +7 -5
  18. package/dist/components/chat-ui/components/chat-input.d.ts +1 -0
  19. package/dist/components/chat-ui/components/chat-panel.d.ts +1 -0
  20. package/dist/components/chat-ui/mocks/library/index.d.ts +10 -0
  21. package/dist/components/chat-ui/tool-rendering/build-timeline.d.ts +2 -2
  22. package/dist/components/chat-ui/tool-rendering/shared.d.ts +1 -1
  23. package/dist/components/content-placeholder.d.ts +1 -0
  24. package/dist/components/header.d.ts +7 -0
  25. package/dist/components/list-row/list-row-actions.d.ts +10 -0
  26. package/dist/components/list-row/list-row.d.ts +2 -0
  27. package/dist/components/list-row/list-row.types.d.ts +85 -0
  28. package/dist/components/{sidebar-tree → list-row}/searchable-action-menu.d.ts +2 -2
  29. package/dist/components/panel-header.constants.d.ts +1 -1
  30. package/dist/components/resource-context-menu.d.ts +1 -2
  31. package/dist/components/sidebar/sidebar-project-menu.d.ts +0 -3
  32. package/dist/components/sidebar/sidebar.store.d.ts +2 -0
  33. package/dist/components/sidebar/sidebar.types.d.ts +10 -4
  34. package/dist/components/tickets/tickets-workspace.d.ts +1 -0
  35. package/dist/components/tree-list/tree-list.d.ts +18 -0
  36. package/dist/components/tree-list/tree-list.types.d.ts +29 -0
  37. package/dist/index.d.ts +8 -5
  38. package/dist/index.js +2474 -2381
  39. package/dist/index.js.map +1 -1
  40. package/dist/{rich-message-CoXTd5kw.js → rich-message-DeJwzVeV.js} +3 -3
  41. package/dist/rich-message-DeJwzVeV.js.map +1 -0
  42. package/dist/rich-text.js +2 -2
  43. package/dist/style.css +1 -1
  44. package/dist/theme/custom/index.d.ts +3 -0
  45. package/dist/theme/custom/monokai.json.d.ts +80 -0
  46. package/dist/theme/index.d.ts +1 -0
  47. package/dist/theme/primitives/colors.d.ts +6 -0
  48. package/dist/theme/recipes/button.d.ts +28 -0
  49. package/dist/theme/recipes/kbd.d.ts +41 -0
  50. package/dist/theme/tokens/colors.d.ts +18 -6
  51. package/dist/{theme-BLGUwVOD.js → theme-Dq4r3aRE.js} +241 -135
  52. package/dist/theme-Dq4r3aRE.js.map +1 -0
  53. package/dist/theme.js +4 -2
  54. package/dist/utils/apply-theme-preference.d.ts +20 -2
  55. package/dist/utils/theme-preference.d.ts +4 -2
  56. package/package.json +1 -2
  57. package/dist/components/drawer-inline.d.ts +0 -24
  58. package/dist/components/file-selector.d.ts +0 -12
  59. package/dist/components/menu-item.d.ts +0 -42
  60. package/dist/components/pstdio-logo.d.ts +0 -2
  61. package/dist/components/sidebar-tree/sidebar-node-content.d.ts +0 -9
  62. package/dist/components/sidebar-tree/sidebar-tree.d.ts +0 -13
  63. package/dist/components/sidebar-tree/sidebar-tree.types.d.ts +0 -68
  64. package/dist/rich-message-CoXTd5kw.js.map +0 -1
  65. package/dist/theme-BLGUwVOD.js.map +0 -1
@@ -0,0 +1 @@
1
+ export declare const AppShell: () => import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,16 @@
1
+ import { WorkspaceTicket } from '../tickets/types';
2
+ export interface CommandPaletteHandlers {
3
+ onOpenTickets: () => void;
4
+ onOpenSessions: () => void;
5
+ onOpenProjectSettings: () => void;
6
+ onOpenGlobalSettings: () => void;
7
+ onOpenProjects: () => void;
8
+ onSelectTicket: (ticket: WorkspaceTicket) => void;
9
+ onSelectSession: (sessionId: string) => void;
10
+ }
11
+ interface CommandPaletteProps extends CommandPaletteHandlers {
12
+ open: boolean;
13
+ onClose: () => void;
14
+ }
15
+ export declare const CommandPalette: (props: CommandPaletteProps) => import("react/jsx-runtime").JSX.Element;
16
+ export {};
@@ -0,0 +1,7 @@
1
+ interface FileTreeProps {
2
+ paths: string[];
3
+ selectedPath: string | null;
4
+ onSelectPath: (path: string) => void;
5
+ }
6
+ export declare const FileTree: (props: FileTreeProps) => import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,2 @@
1
+ import { SessionMessage } from '../chat-ui/components/message-types';
2
+ export declare const mockChatMessages: SessionMessage[];
@@ -0,0 +1,37 @@
1
+ import { Diff } from '../diff-card';
2
+ import { WorkspaceTagDefinition, WorkspaceTicket } from '../tickets/types';
3
+ export interface MockProject {
4
+ id: string;
5
+ name: string;
6
+ repoPath: string;
7
+ description: string;
8
+ }
9
+ export interface MockSession {
10
+ id: string;
11
+ title: string;
12
+ preview: string;
13
+ status: "in_progress" | "awaiting_input" | "completed" | "failed";
14
+ updatedAt: string;
15
+ }
16
+ export declare const mockProjects: MockProject[];
17
+ export declare const mockTagDefinitions: WorkspaceTagDefinition[];
18
+ export declare const mockTickets: WorkspaceTicket[];
19
+ export declare const mockTicketDescription = "## Goal\n\nMirror the dashboard surface inside Storybook so design and engineering can review whole-page composition without booting the app.\n\n## Notes\n\n- Use mock data only \u2014 no async loading.\n- Sidebar navigation should switch between pages.\n- All pages share the same shell.";
20
+ export declare const mockSessions: MockSession[];
21
+ export interface MockWorkspace {
22
+ id: string;
23
+ shorthand: string;
24
+ ticketId: string;
25
+ branch: string;
26
+ status: "in_progress" | "completed" | "failed";
27
+ }
28
+ export declare const mockWorkspaces: MockWorkspace[];
29
+ export declare const mockDiffs: Diff[];
30
+ export interface MockCheck {
31
+ id: string;
32
+ name: string;
33
+ status: "passed" | "failed" | "running";
34
+ duration: string;
35
+ details: string;
36
+ }
37
+ export declare const mockChecks: MockCheck[];
@@ -0,0 +1,7 @@
1
+ import { MockProject } from '../mock-data';
2
+ interface ProjectListPageProps {
3
+ onSelectProject: (project: MockProject) => void;
4
+ onOpenSettings: () => void;
5
+ }
6
+ export declare const ProjectListPage: (props: ProjectListPageProps) => import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,6 @@
1
+ interface SessionsPageProps {
2
+ selectedSessionId: string | null;
3
+ onSelectSession: (sessionId: string) => void;
4
+ }
5
+ export declare const SessionsPage: (props: SessionsPageProps) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,5 @@
1
+ interface SettingsPageProps {
2
+ scope: "global" | "project";
3
+ }
4
+ export declare const SettingsPage: (props: SettingsPageProps) => import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -0,0 +1,7 @@
1
+ import { WorkspaceTicket } from '../../tickets/types';
2
+ interface TicketDetailsPageProps {
3
+ ticket: WorkspaceTicket;
4
+ onOpenWorkspace: (workspaceShorthand: string) => void;
5
+ }
6
+ export declare const TicketDetailsPage: (props: TicketDetailsPageProps) => import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,7 @@
1
+ import { WorkspaceTicket } from '../../tickets/types';
2
+ export declare const TICKETS_STORAGE_KEY = "app-shell-tickets";
3
+ interface TicketsPageProps {
4
+ onSelectTicket: (ticket: WorkspaceTicket) => void;
5
+ }
6
+ export declare const TicketsPage: (props: TicketsPageProps) => import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1 @@
1
+ export declare const WorkspacePage: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,13 @@
1
+ import { FlexProps } from '@chakra-ui/react';
2
+ import { ReactNode } from 'react';
3
+ interface ResizablePanelProps extends Omit<FlexProps, "children"> {
4
+ children: ReactNode;
5
+ defaultWidth?: number;
6
+ minWidth?: number;
7
+ maxWidth?: number;
8
+ handleSide?: "left" | "right";
9
+ ariaLabel?: string;
10
+ onWidthChange?: (width: number) => void;
11
+ }
12
+ export declare const ResizablePanel: (props: ResizablePanelProps) => import("react/jsx-runtime").JSX.Element;
13
+ export {};
@@ -7,13 +7,14 @@ declare const recipe: import('@chakra-ui/react').SlotRecipeDefinition<"content"
7
7
  flexDirection: "row";
8
8
  };
9
9
  content: {
10
- border: "1px solid";
10
+ borderTopWidth: "1px";
11
+ borderBottomWidth: "1px";
11
12
  borderColor: "border.muted";
12
13
  bg: "bg.subtle";
13
14
  px: "xs";
14
15
  py: "xs";
15
16
  width: "full";
16
- borderBottomRightRadius: number;
17
+ borderRadius: "0";
17
18
  };
18
19
  };
19
20
  assistant: {
@@ -24,6 +25,7 @@ declare const recipe: import('@chakra-ui/react').SlotRecipeDefinition<"content"
24
25
  };
25
26
  content: {
26
27
  width: "full";
28
+ px: "xs";
27
29
  };
28
30
  };
29
31
  developer: {
@@ -58,17 +60,17 @@ declare const recipe: import('@chakra-ui/react').SlotRecipeDefinition<"content"
58
60
  shape: {
59
61
  rounded: {
60
62
  content: {
61
- rounded: "xs";
63
+ rounded: "0";
62
64
  };
63
65
  };
64
66
  pill: {
65
67
  content: {
66
- rounded: "full";
68
+ rounded: "0";
67
69
  };
68
70
  };
69
71
  square: {
70
72
  content: {
71
- rounded: "none";
73
+ rounded: "0";
72
74
  };
73
75
  };
74
76
  };
@@ -14,6 +14,7 @@ interface ChatInputProps {
14
14
  actions?: ReactNode;
15
15
  attachedToTop?: boolean;
16
16
  questionPrompt?: ChatInputQuestionPrompt;
17
+ autoFocus?: boolean;
17
18
  }
18
19
  export declare const ChatInput: (props: ChatInputProps) => import("react/jsx-runtime").JSX.Element;
19
20
  export {};
@@ -23,6 +23,7 @@ interface ChatPanelProps {
23
23
  workspaceInitializing?: boolean;
24
24
  inputDisabled?: boolean;
25
25
  chatInputQuestionPrompt?: ChatInputQuestionPrompt;
26
+ chatInputAutoFocus?: boolean;
26
27
  }
27
28
  export declare const ChatPanel: (props: ChatPanelProps) => import("react/jsx-runtime").JSX.Element;
28
29
  export {};
@@ -0,0 +1,10 @@
1
+ import { AgentId, SessionMessage } from '../../agent-types';
2
+ export type ConversationFixture = {
3
+ id: string;
4
+ agent: AgentId;
5
+ label: string;
6
+ description: string;
7
+ messages: SessionMessage[];
8
+ };
9
+ export declare const fixtures: ConversationFixture[];
10
+ export declare const fixturesById: Map<string, ConversationFixture>;
@@ -5,7 +5,7 @@ export declare const buildTimelineDocFromInvocations: (invocations: ToolPart[],
5
5
  items: (import('../components/timeline').Item | {
6
6
  indicator: {
7
7
  readonly type: "icon";
8
- readonly icon: "search" | "dot" | "file" | "shell" | "patch" | "ls" | "read_file" | "write_file" | "delete_file" | "upload_files" | "download_file" | "move_file" | "danger" | "browser" | "question" | "todo" | "terminal";
8
+ readonly icon: "search" | "dot" | "file" | "shell" | "danger" | "patch" | "ls" | "read_file" | "write_file" | "delete_file" | "upload_files" | "download_file" | "move_file" | "browser" | "question" | "todo" | "terminal";
9
9
  };
10
10
  title: TitleSegment[];
11
11
  blocks: Block[];
@@ -15,7 +15,7 @@ export declare const createToolTimelineBuilder: (toolRenderers: ToolRenderersMap
15
15
  items: (import('../components/timeline').Item | {
16
16
  indicator: {
17
17
  readonly type: "icon";
18
- readonly icon: "search" | "dot" | "file" | "shell" | "patch" | "ls" | "read_file" | "write_file" | "delete_file" | "upload_files" | "download_file" | "move_file" | "danger" | "browser" | "question" | "todo" | "terminal";
18
+ readonly icon: "search" | "dot" | "file" | "shell" | "danger" | "patch" | "ls" | "read_file" | "write_file" | "delete_file" | "upload_files" | "download_file" | "move_file" | "browser" | "question" | "todo" | "terminal";
19
19
  };
20
20
  title: TitleSegment[];
21
21
  blocks: Block[];
@@ -15,7 +15,7 @@ export declare const getStateLabel: (invocation: ToolPart) => string | null;
15
15
  export declare const isErrorState: (invocation: ToolPart) => boolean;
16
16
  export declare const buildIndicator: (invocation: ToolPart) => {
17
17
  readonly type: "icon";
18
- readonly icon: "search" | "dot" | "file" | "shell" | "patch" | "ls" | "read_file" | "write_file" | "delete_file" | "upload_files" | "download_file" | "move_file" | "danger" | "browser" | "question" | "todo" | "terminal";
18
+ readonly icon: "search" | "dot" | "file" | "shell" | "danger" | "patch" | "ls" | "read_file" | "write_file" | "delete_file" | "upload_files" | "download_file" | "move_file" | "browser" | "question" | "todo" | "terminal";
19
19
  };
20
20
  export declare const buildBaseTitle: (invocation: ToolPart, detail?: string, labelOverride?: string) => TitleSegment[];
21
21
  export declare const getInputObject: (invocation: ToolPart) => Record<string, unknown> | null;
@@ -1,5 +1,6 @@
1
1
  import { BoxProps, TextProps } from '@chakra-ui/react';
2
2
  export interface ContentPlaceholderProps extends BoxProps {
3
3
  }
4
+ export declare const contentPlaceholderBackgroundImage = "url(\"data:image/svg+xml,%3Csvg width='6' height='6' viewBox='0 0 6 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%239C92AC' fill-opacity='0.2' fillRule='evenodd'%3E%3Cpath d='M5 0h1L0 6V5zM6 5v1H5z'/%3E%3C/g%3E%3C/svg%3E\")";
4
5
  export declare const ContentPlaceholder: (props: ContentPlaceholderProps) => import("react/jsx-runtime").JSX.Element;
5
6
  export declare const Label: (props: TextProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { StackProps } from '@chakra-ui/react';
2
+ import * as React from "react";
3
+ export type HeaderVariant = "main" | "narrow" | "input";
4
+ export interface HeaderProps extends Omit<StackProps, "variant"> {
5
+ variant?: HeaderVariant;
6
+ }
7
+ export declare const Header: React.ForwardRefExoticComponent<HeaderProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,10 @@
1
+ import { ListRowAction } from './list-row.types';
2
+ interface RowActionsProps {
3
+ actions: ListRowAction[];
4
+ context: {
5
+ sectionId?: string;
6
+ nodeId?: string;
7
+ };
8
+ }
9
+ export declare const RowActions: (props: RowActionsProps) => import("react/jsx-runtime").JSX.Element | null;
10
+ export {};
@@ -0,0 +1,2 @@
1
+ import { ListRowProps } from './list-row.types';
2
+ export declare const ListRow: import('react').ForwardRefExoticComponent<ListRowProps & import('react').RefAttributes<HTMLElement>>;
@@ -0,0 +1,85 @@
1
+ import { chakra, IconProps } from '@chakra-ui/react';
2
+ import { ComponentPropsWithoutRef, ComponentType, DragEvent as ReactDragEvent, MouseEvent as ReactMouseEvent, ReactNode, PointerEvent as ReactPointerEvent } from 'react';
3
+ export interface ListRowNavigationIntent {
4
+ id?: string;
5
+ payload?: unknown;
6
+ }
7
+ export interface ListRowActionContext {
8
+ sectionId?: string;
9
+ nodeId?: string;
10
+ }
11
+ export interface ListRowActionMenuItem {
12
+ id: string;
13
+ label: string;
14
+ description?: string;
15
+ icon?: ReactNode | ComponentType<{
16
+ size?: number | string;
17
+ }>;
18
+ disabled?: boolean;
19
+ onAction?: () => void;
20
+ }
21
+ export interface ListRowAction {
22
+ id: string;
23
+ label: string;
24
+ icon?: ReactNode;
25
+ searchPlaceholder?: string;
26
+ emptyMenuLabel?: string;
27
+ menuItems?: ListRowActionMenuItem[];
28
+ onAction?: (context: ListRowActionContext) => void;
29
+ }
30
+ export type ListRowVariant = "default" | "compact" | "tree";
31
+ export type ListRowTone = "default" | "danger";
32
+ export interface ListRowItem {
33
+ id?: string;
34
+ label: ReactNode;
35
+ description?: ReactNode;
36
+ icon?: ReactNode;
37
+ iconColor?: IconProps["color"];
38
+ indicator?: {
39
+ icon: ReactNode;
40
+ color?: IconProps["color"];
41
+ tooltip?: string | null;
42
+ };
43
+ /** Custom content rendered on the right, before any hover actions. Use for Kbd shortcuts, counts, or badges. */
44
+ endContent?: ReactNode;
45
+ /** Tooltip shown on hover. Can be a string or ReactNode (e.g. Kbd shortcut hint). */
46
+ tooltip?: ReactNode;
47
+ disabled?: boolean;
48
+ /** Force chevron rendering even when children is empty (e.g. lazy-loaded folders). */
49
+ isContainer?: boolean;
50
+ isNavigable?: boolean;
51
+ href?: string;
52
+ navigationIntent?: ListRowNavigationIntent;
53
+ onActivate?: () => void;
54
+ contextMenuItems?: ListRowActionMenuItem[];
55
+ actions?: ListRowAction[];
56
+ children?: ListRowItem[];
57
+ }
58
+ type ListRowRootProps = ComponentPropsWithoutRef<typeof chakra.div>;
59
+ export interface ListRowProps extends ListRowItem, Omit<ListRowRootProps, "as" | "asChild" | "children" | "draggable" | "onClick" | "onDragEnd" | "onDragOver" | "onDragStart" | "onDrop" | "onPointerMove" | keyof ListRowItem> {
60
+ depth?: number;
61
+ isSelected?: boolean;
62
+ isExpanded?: boolean;
63
+ showExpandToggle?: boolean;
64
+ variant?: ListRowVariant;
65
+ tone?: ListRowTone;
66
+ /** Wrap content into a single child element. Used for `<Menu.Item asChild><ListRow asChild>…</ListRow></Menu.Item>` and link components. */
67
+ asChild?: boolean;
68
+ onToggleExpand?: () => void;
69
+ onClick?: (event: ReactMouseEvent<HTMLElement>) => void;
70
+ onPointerMove?: (event: ReactPointerEvent<HTMLElement>) => void;
71
+ draggable?: boolean;
72
+ onDragStart?: (event: ReactDragEvent<HTMLElement>) => void;
73
+ onDragOver?: (event: ReactDragEvent<HTMLElement>) => void;
74
+ onDragEnd?: (event: ReactDragEvent<HTMLElement>) => void;
75
+ onDrop?: (event: ReactDragEvent<HTMLElement>) => void;
76
+ }
77
+ export interface RowContentProps {
78
+ item: ListRowItem;
79
+ isExpanded: boolean;
80
+ showChevron: boolean;
81
+ isDisabled: boolean;
82
+ variant: ListRowVariant;
83
+ tone: ListRowTone;
84
+ }
85
+ export {};
@@ -1,6 +1,6 @@
1
- import { SidebarAction } from './sidebar-tree.types';
1
+ import { ListRowAction } from './list-row.types';
2
2
  interface SearchableActionMenuProps {
3
- action: SidebarAction;
3
+ action: ListRowAction;
4
4
  }
5
5
  export declare const SearchableActionMenu: (props: SearchableActionMenuProps) => import("react/jsx-runtime").JSX.Element;
6
6
  export {};
@@ -1 +1 @@
1
- export declare const PANEL_HEADER_HEIGHT = "2.5625rem";
1
+ export declare const PANEL_HEADER_HEIGHT = "2.5rem";
@@ -1,13 +1,12 @@
1
1
  import { Menu } from '@chakra-ui/react';
2
2
  import { ComponentProps, ReactNode } from 'react';
3
- import { MenuItem } from './menu-item';
4
3
  type MenuRootProps = ComponentProps<typeof Menu.Root>;
5
4
  export interface ResourceContextAction {
6
5
  key: string;
7
6
  label: string;
8
7
  onClick: () => void;
9
8
  isDisabled?: boolean;
10
- icon?: ComponentProps<typeof MenuItem>["leftIcon"];
9
+ icon?: ReactNode;
11
10
  }
12
11
  interface ResourceContextMenuProps {
13
12
  actions: ResourceContextAction[];
@@ -1,10 +1,7 @@
1
1
  interface SidebarProjectMenuProps {
2
2
  name: string;
3
3
  projectsLabel: string;
4
- themeModeLabel: string;
5
- isDarkMode: boolean;
6
4
  onSelectProjects: () => void;
7
- onToggleThemePreference: () => void;
8
5
  }
9
6
  export declare const SidebarProjectMenu: (props: SidebarProjectMenuProps) => import("react/jsx-runtime").JSX.Element;
10
7
  export {};
@@ -2,6 +2,7 @@ interface SidebarSnapshot {
2
2
  open: boolean;
3
3
  expandedSections: string[];
4
4
  expandedNodes: string[];
5
+ width: number | null;
5
6
  }
6
7
  interface SidebarState extends SidebarSnapshot {
7
8
  openSidebar: () => void;
@@ -11,6 +12,7 @@ interface SidebarState extends SidebarSnapshot {
11
12
  toggleNode: (nodeId: string) => void;
12
13
  setSectionExpanded: (sectionId: string, expanded: boolean) => void;
13
14
  setNodeExpanded: (nodeId: string, expanded: boolean) => void;
15
+ setWidth: (width: number) => void;
14
16
  reset: () => void;
15
17
  }
16
18
  interface CreateSidebarStoreOptions {
@@ -1,16 +1,22 @@
1
1
  import { ReactNode } from 'react';
2
- import { SidebarLinkComponent, SidebarNavigateEvent, SidebarSection } from '../sidebar-tree/sidebar-tree.types';
2
+ import { TreeListLinkComponent, TreeListNavigateEvent, TreeListSection } from '../tree-list/tree-list.types';
3
3
  export interface SidebarProps {
4
4
  storageKey: string;
5
- sections: SidebarSection[];
5
+ sections: TreeListSection[];
6
6
  activeNodeId?: string | string[] | null;
7
7
  header?: ReactNode;
8
8
  footer?: ReactNode;
9
+ /** Initial width when resizable. Set explicitly to override the persisted width. */
9
10
  width?: string | number;
10
11
  emptyLabel?: string;
11
12
  defaultExpandedSections?: string[];
12
- linkComponent?: SidebarLinkComponent;
13
- onNavigate?: (event: SidebarNavigateEvent) => void;
13
+ linkComponent?: TreeListLinkComponent;
14
+ onNavigate?: (event: TreeListNavigateEvent) => void;
14
15
  closable?: boolean;
15
16
  onOpenChange?: (open: boolean) => void;
17
+ /** Allow the user to drag the right edge to resize. Defaults to `true`. */
18
+ resizable?: boolean;
19
+ defaultWidth?: number;
20
+ minWidth?: number;
21
+ maxWidth?: number;
16
22
  }
@@ -19,6 +19,7 @@ interface TicketsWorkspaceProps<TTicket extends WorkspaceTicket = WorkspaceTicke
19
19
  knownColumnKeys?: string[];
20
20
  emptyTitle?: string;
21
21
  emptyDescription?: string;
22
+ hideToolbar?: boolean;
22
23
  onTicketClick?: (ticket: TTicket) => void;
23
24
  onTagChange?: (ticketId: string, tagName: string, newValue: string) => void;
24
25
  onMoveTicket?: (ticketId: string, targetColumnId: string, context?: {
@@ -0,0 +1,18 @@
1
+ import { StackProps } from '@chakra-ui/react';
2
+ import { TreeListLinkComponent, TreeListNavigateEvent, TreeListSection } from './tree-list.types';
3
+ type TreeListRowVariant = "compact" | "tree";
4
+ interface TreeListProps {
5
+ sections: TreeListSection[];
6
+ expandedSectionIds?: string[];
7
+ expandedNodeIds?: string[];
8
+ activeNodeId?: string | string[] | null;
9
+ rowVariant?: TreeListRowVariant;
10
+ sectionGap?: StackProps["gap"];
11
+ nodeGap?: StackProps["gap"];
12
+ linkComponent?: TreeListLinkComponent;
13
+ onNavigate?: (event: TreeListNavigateEvent) => void;
14
+ onToggleSection?: (sectionId: string) => void;
15
+ onToggleNode?: (nodeId: string) => void;
16
+ }
17
+ export declare const TreeList: (props: TreeListProps) => import("react/jsx-runtime").JSX.Element;
18
+ export {};
@@ -0,0 +1,29 @@
1
+ import { ComponentType, ReactNode } from 'react';
2
+ import { ListRowAction, ListRowActionContext, ListRowActionMenuItem, ListRowItem, ListRowNavigationIntent } from '../list-row/list-row.types';
3
+ export type TreeListNavigationIntent = ListRowNavigationIntent;
4
+ export type TreeListActionContext = ListRowActionContext;
5
+ export type TreeListActionMenuItem = ListRowActionMenuItem;
6
+ export type TreeListAction = ListRowAction;
7
+ export type TreeListNode = ListRowItem & {
8
+ id: string;
9
+ children?: TreeListNode[];
10
+ };
11
+ export interface TreeListSection {
12
+ id: string;
13
+ label?: string;
14
+ collapsible?: boolean;
15
+ actions?: TreeListAction[];
16
+ emptyState?: ReactNode;
17
+ nodes: TreeListNode[];
18
+ }
19
+ export interface TreeListNavigateEvent {
20
+ sectionId: string;
21
+ nodeId: string;
22
+ node: TreeListNode;
23
+ intent?: TreeListNavigationIntent;
24
+ }
25
+ export interface TreeListLinkProps {
26
+ to: string;
27
+ children: ReactNode;
28
+ }
29
+ export type TreeListLinkComponent = ComponentType<TreeListLinkProps>;
package/dist/index.d.ts CHANGED
@@ -19,11 +19,14 @@ export { EmptyState } from './components/empty-state';
19
19
  export { ErrorBoundary } from './components/error-boundary';
20
20
  export type { FolderPickerDialogEntry, FolderPickerDialogProps, } from './components/folder-picker-dialog';
21
21
  export { FolderPickerDialog } from './components/folder-picker-dialog';
22
+ export type { HeaderProps, HeaderVariant } from './components/header';
23
+ export { Header } from './components/header';
22
24
  export { HorizontalMenuStack } from './components/horizontal-menu-stack';
23
25
  export type { ItemSectionProps } from './components/item-section';
24
26
  export { ItemSection } from './components/item-section';
25
27
  export { PanelLayout, PanelSectionLayout } from './components/layout';
26
- export { MenuItem } from './components/menu-item';
28
+ export { ListRow } from './components/list-row/list-row';
29
+ export type { ListRowAction, ListRowActionContext, ListRowActionMenuItem, ListRowItem, ListRowNavigationIntent, } from './components/list-row/list-row.types';
27
30
  export type { OpenSourceNotice, OpenSourceNoticesScreenProps, } from './components/open-source-notices-screen';
28
31
  export { OpenSourceNoticesScreen } from './components/open-source-notices-screen';
29
32
  export type { PropertiesProps, PropertyItem } from './components/properties';
@@ -41,8 +44,6 @@ export { Sidebar } from './components/sidebar/sidebar';
41
44
  export { useSidebarStore } from './components/sidebar/sidebar.store';
42
45
  export type { SidebarProps } from './components/sidebar/sidebar.types';
43
46
  export { SidebarProjectMenu } from './components/sidebar/sidebar-project-menu';
44
- export { SidebarTree } from './components/sidebar-tree/sidebar-tree';
45
- export type { SidebarAction, SidebarActionContext, SidebarActionMenuItem, SidebarLinkComponent, SidebarNavigateEvent, SidebarNavigationIntent, SidebarNode, SidebarSection, } from './components/sidebar-tree/sidebar-tree.types';
46
47
  export type { SwitchProps } from './components/switch';
47
48
  export { Switch } from './components/switch';
48
49
  export { DisplayMenu } from './components/tickets/display-menu';
@@ -58,9 +59,11 @@ export type { DisplayProperty, FilterCategory, FilterState, GroupingField, Order
58
59
  export { useTicketsWorkspaceStore } from './components/tickets/use-workspace-store';
59
60
  export { Toaster, toaster } from './components/toaster';
60
61
  export { Tooltip } from './components/tooltip';
62
+ export { TreeList } from './components/tree-list/tree-list';
63
+ export type { TreeListAction, TreeListActionContext, TreeListActionMenuItem, TreeListLinkComponent, TreeListNavigateEvent, TreeListNavigationIntent, TreeListNode, TreeListSection, } from './components/tree-list/tree-list.types';
61
64
  export type { WorkspaceBadgeProps } from './components/workspace-badge';
62
65
  export { WorkspaceBadge } from './components/workspace-badge';
63
- export { psTheme } from './theme';
64
- export { applyThemePreference, type ThemePreference, } from './utils/apply-theme-preference';
66
+ export { customThemePreferences, monokaiThemePreference, psTheme } from './theme';
67
+ export { applyThemePreference, defaultThemePreferences, getThemePreferenceClassName, getThemePreferenceClassNames, getThemePreferenceMode, isThemePreference, type ThemePreference, type ThemePreferenceMode, type ThemePreferenceOption, type ThemePreferenceTokens, } from './utils/apply-theme-preference';
65
68
  export { getFileTypeIcon } from './utils/get-file-type-icon';
66
69
  export { getInitialThemePreference, ThemePreferenceProvider, useThemePreference, } from './utils/theme-preference';