@pstdio/ui 0.5.0 → 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.
- package/dist/{MermaidComponent-DwEDwpo2.js → MermaidComponent-DDCxR-Gs.js} +2 -2
- package/dist/{MermaidComponent-DwEDwpo2.js.map → MermaidComponent-DDCxR-Gs.js.map} +1 -1
- package/dist/chat-ui.js +1358 -877
- package/dist/chat-ui.js.map +1 -1
- package/dist/components/app-shell/app-shell.d.ts +1 -0
- package/dist/components/app-shell/command-palette.d.ts +16 -0
- package/dist/components/app-shell/file-tree.d.ts +7 -0
- package/dist/components/app-shell/mock-chat.d.ts +2 -0
- package/dist/components/app-shell/mock-data.d.ts +37 -0
- package/dist/components/app-shell/pages/project-list-page.d.ts +7 -0
- package/dist/components/app-shell/pages/sessions-page.d.ts +6 -0
- package/dist/components/app-shell/pages/settings-page.d.ts +5 -0
- package/dist/components/app-shell/pages/ticket-details-page.d.ts +7 -0
- package/dist/components/app-shell/pages/tickets-page.d.ts +7 -0
- package/dist/components/app-shell/pages/workspace-page.d.ts +1 -0
- package/dist/components/app-shell/resizable-panel.d.ts +13 -0
- package/dist/components/chat-ui/agent-types.d.ts +4 -0
- package/dist/components/chat-ui/components/ai-message.d.ts +7 -5
- package/dist/components/chat-ui/components/chat-input-question-prompt.d.ts +33 -0
- package/dist/components/chat-ui/components/chat-input.d.ts +4 -1
- package/dist/components/chat-ui/components/chat-panel-sticky-user-message.d.ts +9 -0
- package/dist/components/chat-ui/components/chat-panel.d.ts +4 -1
- package/dist/components/chat-ui/components/message-parts-renderer.d.ts +1 -0
- package/dist/components/chat-ui/components/timeline-tool-blocks.d.ts +14 -0
- package/dist/components/chat-ui/components/timeline.d.ts +22 -0
- package/dist/components/chat-ui/components/tool-invocation-timeline.d.ts +2 -1
- package/dist/components/chat-ui/index.d.ts +1 -0
- package/dist/components/chat-ui/mocks/library/index.d.ts +10 -0
- package/dist/components/chat-ui/tool-rendering/build-timeline.d.ts +2 -2
- package/dist/components/chat-ui/tool-rendering/default-renderers.d.ts +2 -0
- package/dist/components/chat-ui/tool-rendering/question-renderer.d.ts +10 -0
- package/dist/components/chat-ui/tool-rendering/shared.d.ts +1 -1
- package/dist/components/chat-ui/tool-rendering/todowrite-renderer.d.ts +10 -0
- package/dist/components/chat-ui/utils/get-icon.d.ts +2 -0
- package/dist/components/chat-ui/utils/tool-name.d.ts +2 -0
- package/dist/components/content-placeholder.d.ts +1 -0
- package/dist/components/header.d.ts +7 -0
- package/dist/components/list-row/list-row-actions.d.ts +10 -0
- package/dist/components/list-row/list-row.d.ts +2 -0
- package/dist/components/list-row/list-row.types.d.ts +85 -0
- package/dist/components/{sidebar-tree → list-row}/searchable-action-menu.d.ts +2 -2
- package/dist/components/panel-header.constants.d.ts +1 -1
- package/dist/components/radio.d.ts +8 -0
- package/dist/components/resource-context-menu.d.ts +1 -2
- package/dist/components/sidebar/sidebar-project-menu.d.ts +0 -3
- package/dist/components/sidebar/sidebar.store.d.ts +2 -0
- package/dist/components/sidebar/sidebar.types.d.ts +10 -4
- package/dist/components/tickets/ticket-board.d.ts +6 -2
- package/dist/components/tickets/ticket-list.d.ts +3 -0
- package/dist/components/tickets/tickets-workspace.d.ts +3 -0
- package/dist/components/tickets/workspace-helpers.d.ts +6 -1
- package/dist/components/tree-list/tree-list.d.ts +18 -0
- package/dist/components/tree-list/tree-list.types.d.ts +29 -0
- package/dist/index.d.ts +10 -5
- package/dist/index.js +2621 -2459
- package/dist/index.js.map +1 -1
- package/dist/radio-C42qncrD.js +236 -0
- package/dist/radio-C42qncrD.js.map +1 -0
- package/dist/{rich-message-BVRk9BSD.js → rich-message-DeJwzVeV.js} +364 -355
- package/dist/rich-message-DeJwzVeV.js.map +1 -0
- package/dist/rich-text.js +2 -2
- package/dist/style.css +1 -1
- package/dist/theme/custom/index.d.ts +3 -0
- package/dist/theme/custom/monokai.json.d.ts +80 -0
- package/dist/theme/index.d.ts +1 -0
- package/dist/theme/primitives/colors.d.ts +6 -0
- package/dist/theme/recipes/button.d.ts +34 -0
- package/dist/theme/recipes/kbd.d.ts +41 -0
- package/dist/theme/tokens/colors.d.ts +18 -6
- package/dist/{theme-D0VvFB1Y.js → theme-Dq4r3aRE.js} +247 -135
- package/dist/theme-Dq4r3aRE.js.map +1 -0
- package/dist/theme.js +4 -2
- package/dist/utils/apply-theme-preference.d.ts +20 -2
- package/dist/utils/theme-preference.d.ts +4 -2
- package/package.json +1 -2
- package/dist/components/chat-ui/tool-rendering/todo-write-renderer.d.ts +0 -2
- package/dist/components/drawer-inline.d.ts +0 -24
- package/dist/components/file-selector.d.ts +0 -12
- package/dist/components/menu-item.d.ts +0 -42
- package/dist/components/pstdio-logo.d.ts +0 -2
- package/dist/components/sidebar-tree/sidebar-node-content.d.ts +0 -9
- package/dist/components/sidebar-tree/sidebar-tree.d.ts +0 -13
- package/dist/components/sidebar-tree/sidebar-tree.types.d.ts +0 -68
- package/dist/empty-state-yGspgiPl.js +0 -185
- package/dist/empty-state-yGspgiPl.js.map +0 -1
- package/dist/rich-message-BVRk9BSD.js.map +0 -1
- package/dist/theme-D0VvFB1Y.js.map +0 -1
|
@@ -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 {
|
|
2
|
+
import { TreeListLinkComponent, TreeListNavigateEvent, TreeListSection } from '../tree-list/tree-list.types';
|
|
3
3
|
export interface SidebarProps {
|
|
4
4
|
storageKey: string;
|
|
5
|
-
sections:
|
|
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?:
|
|
13
|
-
onNavigate?: (event:
|
|
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
|
}
|
|
@@ -33,8 +33,12 @@ export interface TicketBoardColumn {
|
|
|
33
33
|
interface TicketBoardProps {
|
|
34
34
|
columns: TicketBoardColumn[];
|
|
35
35
|
selectedItemId?: string | null;
|
|
36
|
-
onMoveItem?: (itemId: string, targetColumnId: string
|
|
37
|
-
|
|
36
|
+
onMoveItem?: (itemId: string, targetColumnId: string, context?: {
|
|
37
|
+
beforeItemId?: string;
|
|
38
|
+
}) => void;
|
|
39
|
+
onMoveToGroup?: (itemId: string, targetGroupKey: string, context?: {
|
|
40
|
+
beforeItemId?: string;
|
|
41
|
+
}) => void;
|
|
38
42
|
onCreateStart?: (columnId: string) => void;
|
|
39
43
|
onColumnAction?: (columnId: string, actionId: string) => Promise<void> | void;
|
|
40
44
|
}
|
|
@@ -18,11 +18,14 @@ export interface TicketListItem {
|
|
|
18
18
|
onClick?: () => void;
|
|
19
19
|
onTagChange?: (tagName: string, newValue: string) => void;
|
|
20
20
|
contextMenuActions?: ResourceContextAction[];
|
|
21
|
+
draggable?: boolean;
|
|
22
|
+
onDropTicket?: (ticketId: string) => void;
|
|
21
23
|
}
|
|
22
24
|
interface TicketListProps {
|
|
23
25
|
items: TicketListItem[];
|
|
24
26
|
selectedItemId?: string | null;
|
|
25
27
|
onItemClick?: (item: TicketListItem) => void;
|
|
26
28
|
}
|
|
29
|
+
export declare const getTicketListIndentation: (depth: number) => string | undefined;
|
|
27
30
|
export declare const TicketList: (props: TicketListProps) => import("react/jsx-runtime").JSX.Element;
|
|
28
31
|
export {};
|
|
@@ -19,13 +19,16 @@ 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?: {
|
|
25
26
|
columnGrouping: GroupingField;
|
|
27
|
+
beforeTicketId?: string;
|
|
26
28
|
}) => void;
|
|
27
29
|
onMoveToGroup?: (ticketId: string, targetGroupKey: string, context?: {
|
|
28
30
|
rowGrouping: GroupingField;
|
|
31
|
+
beforeTicketId?: string;
|
|
29
32
|
}) => void;
|
|
30
33
|
onCreateTicket?: (columnId: string) => void;
|
|
31
34
|
onColumnAction?: (columnId: string, actionId: string) => Promise<void> | void;
|
|
@@ -9,5 +9,10 @@ export declare const buildTagOptions: (tagDefinitions: WorkspaceTagDefinition[])
|
|
|
9
9
|
ordering: WorkspaceOption<OrderingField>[];
|
|
10
10
|
display: WorkspaceOption<DisplayProperty>[];
|
|
11
11
|
};
|
|
12
|
-
export declare const
|
|
12
|
+
export declare const orderGroupingOptions: <TValue extends string>(options: WorkspaceOption<TValue>[]) => WorkspaceOption<TValue>[];
|
|
13
|
+
export declare const resolveSubGroupingOptions: (options: WorkspaceOption<GroupingField>[], columnGrouping: GroupingField) => WorkspaceOption<GroupingField>[];
|
|
14
|
+
export declare const resolveListDropTargetColumnKey: (columnGrouping: GroupingField, placement?: {
|
|
15
|
+
columnKey?: string;
|
|
16
|
+
}) => string | undefined;
|
|
17
|
+
export declare const resolveKnownColumnKeys: (columnGrouping: GroupingField, knownColumnKeys: string[] | undefined, categories: WorkspaceFilterCategory[], filters?: FilterState) => string[] | undefined;
|
|
13
18
|
export declare const omitFilterCategory: (filters: FilterState, category: FilterCategory) => FilterState;
|
|
@@ -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,15 +19,20 @@ 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 {
|
|
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';
|
|
30
33
|
export { Properties } from './components/properties';
|
|
34
|
+
export type { RadioProps } from './components/radio';
|
|
35
|
+
export { Radio, RadioGroup } from './components/radio';
|
|
31
36
|
export type { ResourceContextAction } from './components/resource-context-menu';
|
|
32
37
|
export { ResourceContextMenu } from './components/resource-context-menu';
|
|
33
38
|
export { ScrollArea } from './components/scroll-area';
|
|
@@ -39,8 +44,6 @@ export { Sidebar } from './components/sidebar/sidebar';
|
|
|
39
44
|
export { useSidebarStore } from './components/sidebar/sidebar.store';
|
|
40
45
|
export type { SidebarProps } from './components/sidebar/sidebar.types';
|
|
41
46
|
export { SidebarProjectMenu } from './components/sidebar/sidebar-project-menu';
|
|
42
|
-
export { SidebarTree } from './components/sidebar-tree/sidebar-tree';
|
|
43
|
-
export type { SidebarAction, SidebarActionContext, SidebarActionMenuItem, SidebarLinkComponent, SidebarNavigateEvent, SidebarNavigationIntent, SidebarNode, SidebarSection, } from './components/sidebar-tree/sidebar-tree.types';
|
|
44
47
|
export type { SwitchProps } from './components/switch';
|
|
45
48
|
export { Switch } from './components/switch';
|
|
46
49
|
export { DisplayMenu } from './components/tickets/display-menu';
|
|
@@ -56,9 +59,11 @@ export type { DisplayProperty, FilterCategory, FilterState, GroupingField, Order
|
|
|
56
59
|
export { useTicketsWorkspaceStore } from './components/tickets/use-workspace-store';
|
|
57
60
|
export { Toaster, toaster } from './components/toaster';
|
|
58
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';
|
|
59
64
|
export type { WorkspaceBadgeProps } from './components/workspace-badge';
|
|
60
65
|
export { WorkspaceBadge } from './components/workspace-badge';
|
|
61
|
-
export { psTheme } from './theme';
|
|
62
|
-
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';
|
|
63
68
|
export { getFileTypeIcon } from './utils/get-file-type-icon';
|
|
64
69
|
export { getInitialThemePreference, ThemePreferenceProvider, useThemePreference, } from './utils/theme-preference';
|