@pstdio/ui 0.5.1 → 0.6.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 (92) hide show
  1. package/dist/{MermaidComponent-x3aKzNXm.js → MermaidComponent-D7Baqkwx.js} +2 -2
  2. package/dist/{MermaidComponent-x3aKzNXm.js.map → MermaidComponent-D7Baqkwx.js.map} +1 -1
  3. package/dist/chat-ui.js +744 -726
  4. package/dist/chat-ui.js.map +1 -1
  5. package/dist/components/activity/activity-avatar.d.ts +9 -0
  6. package/dist/components/activity/activity-comment.d.ts +19 -0
  7. package/dist/components/activity/activity-composer.d.ts +18 -0
  8. package/dist/components/activity/activity-event.d.ts +12 -0
  9. package/dist/components/activity/activity-root.d.ts +15 -0
  10. package/dist/components/activity/activity-timeline.d.ts +6 -0
  11. package/dist/components/activity/activity.types.d.ts +5 -0
  12. package/dist/components/activity/index.d.ts +25 -0
  13. package/dist/components/app-shell/app-shell.d.ts +1 -0
  14. package/dist/components/app-shell/command-palette.d.ts +16 -0
  15. package/dist/components/app-shell/file-tree.d.ts +7 -0
  16. package/dist/components/app-shell/mock-chat.d.ts +2 -0
  17. package/dist/components/app-shell/mock-data.d.ts +37 -0
  18. package/dist/components/app-shell/pages/project-list-page.d.ts +7 -0
  19. package/dist/components/app-shell/pages/sessions-page.d.ts +6 -0
  20. package/dist/components/app-shell/pages/settings-page.d.ts +5 -0
  21. package/dist/components/app-shell/pages/ticket-details-page.d.ts +7 -0
  22. package/dist/components/app-shell/pages/tickets-page.d.ts +7 -0
  23. package/dist/components/app-shell/pages/workspace-page.d.ts +1 -0
  24. package/dist/components/app-shell/resizable-panel.d.ts +13 -0
  25. package/dist/components/chat-ui/components/ai-conversation.d.ts +4 -4
  26. package/dist/components/chat-ui/components/ai-message.d.ts +7 -5
  27. package/dist/components/chat-ui/components/chat-input.d.ts +1 -0
  28. package/dist/components/chat-ui/components/chat-panel.d.ts +1 -0
  29. package/dist/components/chat-ui/mocks/library/index.d.ts +10 -0
  30. package/dist/components/chat-ui/tool-rendering/build-timeline.d.ts +2 -2
  31. package/dist/components/chat-ui/tool-rendering/shared.d.ts +1 -1
  32. package/dist/components/content-placeholder.d.ts +1 -0
  33. package/dist/components/header.d.ts +7 -0
  34. package/dist/components/list-row/list-row-actions.d.ts +10 -0
  35. package/dist/components/list-row/list-row.d.ts +2 -0
  36. package/dist/components/list-row/list-row.types.d.ts +85 -0
  37. package/dist/components/{sidebar-tree → list-row}/searchable-action-menu.d.ts +2 -2
  38. package/dist/components/panel-header.constants.d.ts +1 -1
  39. package/dist/components/resource-context-menu.d.ts +1 -2
  40. package/dist/components/rich-text/shared/editor-config.d.ts +1 -0
  41. package/dist/components/rich-text/shared/plugins/FloatingTextFormatToolbarPlugin/floating-toolbar-buttons.d.ts +16 -0
  42. package/dist/components/rich-text/shared/plugins/LinkEditorPlugin/commands.d.ts +2 -0
  43. package/dist/components/rich-text/shared/plugins/LinkEditorPlugin/index.d.ts +3 -0
  44. package/dist/components/rich-text/shared/plugins/LinkEditorPlugin/link-editor-content.d.ts +18 -0
  45. package/dist/components/rich-text/shared/plugins/LinkEditorPlugin/utils/link-edit-state.d.ts +1 -0
  46. package/dist/components/rich-text/shared/plugins/LinkEditorPlugin/utils/selection-link-url.d.ts +2 -0
  47. package/dist/components/rich-text/shared/plugins/LinkEditorPlugin/utils/setFloatingElemPos.d.ts +1 -1
  48. package/dist/components/rich-text/shared/transformers/markdown-transformers-test-utils.d.ts +3 -0
  49. package/dist/components/rich-text/shared/transformers/markdown-transformers.d.ts +1 -0
  50. package/dist/components/sidebar/sidebar-project-menu.d.ts +0 -3
  51. package/dist/components/sidebar/sidebar.store.d.ts +2 -0
  52. package/dist/components/sidebar/sidebar.types.d.ts +10 -4
  53. package/dist/components/tickets/tickets-workspace.d.ts +1 -0
  54. package/dist/components/tree-list/tree-list.d.ts +18 -0
  55. package/dist/components/tree-list/tree-list.types.d.ts +29 -0
  56. package/dist/index.d.ts +10 -5
  57. package/dist/index.js +2697 -2343
  58. package/dist/index.js.map +1 -1
  59. package/dist/{rich-message-CoXTd5kw.js → rich-message-33DPxuWJ.js} +502 -464
  60. package/dist/rich-message-33DPxuWJ.js.map +1 -0
  61. package/dist/rich-text.js +738 -414
  62. package/dist/rich-text.js.map +1 -1
  63. package/dist/style.css +1 -1
  64. package/dist/theme/custom/index.d.ts +3 -0
  65. package/dist/theme/custom/monokai.json.d.ts +80 -0
  66. package/dist/theme/index.d.ts +1 -0
  67. package/dist/theme/primitives/colors.d.ts +6 -0
  68. package/dist/theme/recipes/alert.d.ts +1 -1
  69. package/dist/theme/recipes/button.d.ts +28 -0
  70. package/dist/theme/recipes/dialog.d.ts +1 -1
  71. package/dist/theme/recipes/drawer.d.ts +1 -1
  72. package/dist/theme/recipes/kbd.d.ts +41 -0
  73. package/dist/theme/recipes/menu.d.ts +1 -1
  74. package/dist/theme/recipes/popover.d.ts +1 -1
  75. package/dist/theme/tokens/borders.d.ts +6 -24
  76. package/dist/theme/tokens/colors.d.ts +180 -168
  77. package/dist/theme/tokens/shadows.d.ts +5 -5
  78. package/dist/{theme-BLGUwVOD.js → theme-0SQvHr1t.js} +331 -243
  79. package/dist/theme-0SQvHr1t.js.map +1 -0
  80. package/dist/theme.js +4 -2
  81. package/dist/utils/apply-theme-preference.d.ts +20 -2
  82. package/dist/utils/theme-preference.d.ts +4 -2
  83. package/package.json +1 -2
  84. package/dist/components/drawer-inline.d.ts +0 -24
  85. package/dist/components/file-selector.d.ts +0 -12
  86. package/dist/components/menu-item.d.ts +0 -42
  87. package/dist/components/pstdio-logo.d.ts +0 -2
  88. package/dist/components/sidebar-tree/sidebar-node-content.d.ts +0 -9
  89. package/dist/components/sidebar-tree/sidebar-tree.d.ts +0 -13
  90. package/dist/components/sidebar-tree/sidebar-tree.types.d.ts +0 -68
  91. package/dist/rich-message-CoXTd5kw.js.map +0 -1
  92. package/dist/theme-BLGUwVOD.js.map +0 -1
@@ -3,6 +3,7 @@ import { TextNode } from 'lexical';
3
3
  export declare const TABLE: ElementTransformer;
4
4
  export declare const UNDERLINE_INS_TAG: TextMatchTransformer;
5
5
  export declare const UNDERLINE_U_TAG: TextMatchTransformer;
6
+ export declare const LINK: TextMatchTransformer;
6
7
  export declare const BARE_URL: TextMatchTransformer;
7
8
  export declare const TRANSFORMERS_EXTENDED: (Readonly<{
8
9
  dependencies: Array<import('lexical').Klass<import('lexical').LexicalNode>>;
@@ -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
@@ -1,4 +1,6 @@
1
1
  export { ChakraProvider } from '@chakra-ui/react';
2
+ export type { ActivityActor, ActivityAvatarProps, ActivityCommentProps, ActivityComposerProps, ActivityEventProps, ActivityFeedProps, ActivityHeaderProps, ActivityReplyProps, ActivityRootProps, ActivityTimelineProps, } from './components/activity';
3
+ export { Activity, ActivityAvatar, ActivityComment, ActivityComposer, ActivityEvent, ActivityFeed, ActivityHeader, ActivityReply, ActivityRoot, ActivityTimeline, } from './components/activity';
2
4
  export type { AlertProps } from './components/alert';
3
5
  export { AlertMessage } from './components/alert';
4
6
  export { AttachedPanel } from './components/attached-panel';
@@ -19,11 +21,14 @@ export { EmptyState } from './components/empty-state';
19
21
  export { ErrorBoundary } from './components/error-boundary';
20
22
  export type { FolderPickerDialogEntry, FolderPickerDialogProps, } from './components/folder-picker-dialog';
21
23
  export { FolderPickerDialog } from './components/folder-picker-dialog';
24
+ export type { HeaderProps, HeaderVariant } from './components/header';
25
+ export { Header } from './components/header';
22
26
  export { HorizontalMenuStack } from './components/horizontal-menu-stack';
23
27
  export type { ItemSectionProps } from './components/item-section';
24
28
  export { ItemSection } from './components/item-section';
25
29
  export { PanelLayout, PanelSectionLayout } from './components/layout';
26
- export { MenuItem } from './components/menu-item';
30
+ export { ListRow } from './components/list-row/list-row';
31
+ export type { ListRowAction, ListRowActionContext, ListRowActionMenuItem, ListRowItem, ListRowNavigationIntent, } from './components/list-row/list-row.types';
27
32
  export type { OpenSourceNotice, OpenSourceNoticesScreenProps, } from './components/open-source-notices-screen';
28
33
  export { OpenSourceNoticesScreen } from './components/open-source-notices-screen';
29
34
  export type { PropertiesProps, PropertyItem } from './components/properties';
@@ -41,8 +46,6 @@ export { Sidebar } from './components/sidebar/sidebar';
41
46
  export { useSidebarStore } from './components/sidebar/sidebar.store';
42
47
  export type { SidebarProps } from './components/sidebar/sidebar.types';
43
48
  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
49
  export type { SwitchProps } from './components/switch';
47
50
  export { Switch } from './components/switch';
48
51
  export { DisplayMenu } from './components/tickets/display-menu';
@@ -58,9 +61,11 @@ export type { DisplayProperty, FilterCategory, FilterState, GroupingField, Order
58
61
  export { useTicketsWorkspaceStore } from './components/tickets/use-workspace-store';
59
62
  export { Toaster, toaster } from './components/toaster';
60
63
  export { Tooltip } from './components/tooltip';
64
+ export { TreeList } from './components/tree-list/tree-list';
65
+ export type { TreeListAction, TreeListActionContext, TreeListActionMenuItem, TreeListLinkComponent, TreeListNavigateEvent, TreeListNavigationIntent, TreeListNode, TreeListSection, } from './components/tree-list/tree-list.types';
61
66
  export type { WorkspaceBadgeProps } from './components/workspace-badge';
62
67
  export { WorkspaceBadge } from './components/workspace-badge';
63
- export { psTheme } from './theme';
64
- export { applyThemePreference, type ThemePreference, } from './utils/apply-theme-preference';
68
+ export { customThemePreferences, monokaiThemePreference, psTheme } from './theme';
69
+ export { applyThemePreference, defaultThemePreferences, getThemePreferenceClassName, getThemePreferenceClassNames, getThemePreferenceMode, isThemePreference, type ThemePreference, type ThemePreferenceMode, type ThemePreferenceOption, type ThemePreferenceTokens, } from './utils/apply-theme-preference';
65
70
  export { getFileTypeIcon } from './utils/get-file-type-icon';
66
71
  export { getInitialThemePreference, ThemePreferenceProvider, useThemePreference, } from './utils/theme-preference';