@pstdio/ui 0.6.0 → 0.7.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.
Files changed (87) hide show
  1. package/dist/chat-ui.js +1270 -1080
  2. package/dist/chat-ui.js.map +1 -1
  3. package/dist/components/chat-ui/components/ai-message.d.ts +2 -0
  4. package/dist/components/chat-ui/components/chat-message-list.d.ts +12 -0
  5. package/dist/components/chat-ui/components/chat-panel.d.ts +3 -1
  6. package/dist/components/chat-ui/components/message-action-panel.d.ts +10 -0
  7. package/dist/components/chat-ui/performance/chat-mount-metrics.d.ts +37 -0
  8. package/dist/components/chat-ui/performance/chat-panel.perf.d.ts +18 -0
  9. package/dist/components/chat-ui/performance/chat-performance-fixtures.d.ts +29 -0
  10. package/dist/components/chat-ui/performance/chat-performance-panel.d.ts +23 -0
  11. package/dist/components/chat-ui/performance/chat-performance-story-utils.d.ts +30 -0
  12. package/dist/components/code-editor.d.ts +1 -1
  13. package/dist/components/diff-viewer/build-changed-files-tree.d.ts +4 -0
  14. package/dist/components/diff-viewer/diff-card-body.d.ts +34 -0
  15. package/dist/components/diff-viewer/diff-card-content.d.ts +22 -0
  16. package/dist/components/diff-viewer/diff-card-load-state.d.ts +9 -0
  17. package/dist/components/diff-viewer/diff-card.d.ts +43 -0
  18. package/dist/components/diff-viewer/diff-drawer.d.ts +33 -0
  19. package/dist/components/diff-viewer/diff-editor.d.ts +20 -0
  20. package/dist/components/diff-viewer/diff-size.d.ts +14 -0
  21. package/dist/components/diff-viewer/diff-view-adapter.d.ts +27 -0
  22. package/dist/components/diff-viewer/diff-viewer.d.ts +14 -0
  23. package/dist/components/diff-viewer/diff-viewer.store.d.ts +21 -0
  24. package/dist/components/diff-viewer/file-list-panel.d.ts +19 -0
  25. package/dist/components/diff-viewer/index.d.ts +5 -0
  26. package/dist/components/diff-viewer/types.d.ts +13 -0
  27. package/dist/components/integration-card.d.ts +12 -0
  28. package/dist/components/list-row/list-row-menu.d.ts +12 -0
  29. package/dist/components/list-row/list-row.types.d.ts +8 -0
  30. package/dist/components/palette-filter.d.ts +23 -0
  31. package/dist/components/palette-list.d.ts +11 -0
  32. package/dist/components/palette-shortcut.d.ts +4 -0
  33. package/dist/components/palette.d.ts +47 -0
  34. package/dist/components/panel-sidebar-registration-context.d.ts +12 -0
  35. package/dist/components/param-editor-label.d.ts +6 -0
  36. package/dist/components/param-editor.d.ts +2 -2
  37. package/dist/components/param-editor.types.d.ts +6 -1
  38. package/dist/components/performance-panel.d.ts +40 -0
  39. package/dist/components/{folder-picker-dialog.d.ts → repo-picker-dialog.d.ts} +6 -6
  40. package/dist/components/resizable-split-layout.d.ts +20 -0
  41. package/dist/components/resizable-split-layout.handle.d.ts +17 -0
  42. package/dist/components/resource-context-menu.d.ts +1 -0
  43. package/dist/components/session-indicator.d.ts +2 -2
  44. package/dist/components/sidebar/sidebar-header.d.ts +0 -1
  45. package/dist/components/sidebar/sidebar.types.d.ts +7 -1
  46. package/dist/components/simple-card.d.ts +5 -0
  47. package/dist/components/tree-list/tree-list.d.ts +28 -1
  48. package/dist/index.d.ts +18 -8
  49. package/dist/index.js +4356 -2292
  50. package/dist/index.js.map +1 -1
  51. package/dist/radio-DJtQY9po.js +286 -0
  52. package/dist/radio-DJtQY9po.js.map +1 -0
  53. package/dist/style.css +1 -1
  54. package/dist/theme/custom/index.d.ts +2 -0
  55. package/dist/theme/custom/vscode-theme.d.ts +32 -0
  56. package/dist/theme/index.d.ts +2 -1
  57. package/dist/theme/recipes/dialog.d.ts +1 -1
  58. package/dist/theme/recipes/drawer.d.ts +1 -1
  59. package/dist/theme/recipes/menu.d.ts +1 -1
  60. package/dist/theme/recipes/tabs.d.ts +18 -0
  61. package/dist/{theme-0SQvHr1t.js → theme-D-aCJqTf.js} +200 -123
  62. package/dist/theme-D-aCJqTf.js.map +1 -0
  63. package/dist/theme.js +6 -4
  64. package/dist/utils/apply-theme-preference.d.ts +2 -0
  65. package/package.json +5 -2
  66. package/dist/components/app-shell/app-shell.d.ts +0 -1
  67. package/dist/components/app-shell/command-palette.d.ts +0 -16
  68. package/dist/components/app-shell/file-tree.d.ts +0 -7
  69. package/dist/components/app-shell/mock-chat.d.ts +0 -2
  70. package/dist/components/app-shell/mock-data.d.ts +0 -37
  71. package/dist/components/app-shell/pages/project-list-page.d.ts +0 -7
  72. package/dist/components/app-shell/pages/sessions-page.d.ts +0 -6
  73. package/dist/components/app-shell/pages/settings-page.d.ts +0 -5
  74. package/dist/components/app-shell/pages/ticket-details-page.d.ts +0 -7
  75. package/dist/components/app-shell/pages/tickets-page.d.ts +0 -7
  76. package/dist/components/app-shell/pages/workspace-page.d.ts +0 -1
  77. package/dist/components/app-shell/resizable-panel.d.ts +0 -13
  78. package/dist/components/attached-panel.utils.d.ts +0 -6
  79. package/dist/components/diff-card.d.ts +0 -17
  80. package/dist/components/diff-drawer.d.ts +0 -7
  81. package/dist/components/diff-editor.d.ts +0 -11
  82. package/dist/components/diff-view-adapter.d.ts +0 -14
  83. package/dist/components/properties.d.ts +0 -18
  84. package/dist/radio-C42qncrD.js +0 -236
  85. package/dist/radio-C42qncrD.js.map +0 -1
  86. package/dist/theme-0SQvHr1t.js.map +0 -1
  87. /package/dist/components/{diff-bubble.d.ts → diff-viewer/diff-bubble.d.ts} +0 -0
@@ -8,7 +8,9 @@ declare const recipe: import('@chakra-ui/react').SlotRecipeDefinition<"content"
8
8
  };
9
9
  content: {
10
10
  borderTopWidth: "1px";
11
+ borderRightWidth: "1px";
11
12
  borderBottomWidth: "1px";
13
+ borderLeftWidth: "1px";
12
14
  borderColor: "border.muted";
13
15
  bg: "bg.subtle";
14
16
  px: "xs";
@@ -0,0 +1,12 @@
1
+ import { MessageGroup, SessionMessage } from './message-types';
2
+ interface ChatMessageListProps {
3
+ leadingResponses: SessionMessage[];
4
+ groups: MessageGroup[];
5
+ streaming: boolean;
6
+ hideActiveQuestionForms: boolean;
7
+ expandedStickyMessageIds: Set<string>;
8
+ onToggleStickyMessage: (messageId: string) => void;
9
+ onReady?: () => void;
10
+ }
11
+ export declare const ChatMessageList: (props: ChatMessageListProps) => import("react/jsx-runtime").JSX.Element;
12
+ export {};
@@ -2,12 +2,14 @@ import { ReactNode } from 'react';
2
2
  import { ChatInputQuestionPrompt, ChatInputQuestionResponse } from './chat-input-question-prompt';
3
3
  import { SessionMessage } from './message-types';
4
4
  interface ChatPanelProps {
5
+ conversationKey?: string;
5
6
  messages: SessionMessage[];
7
+ loading?: boolean;
6
8
  streaming?: boolean;
7
9
  emptyStateTitle: string;
8
10
  emptyStateDescription: string;
9
11
  emptyStateContent?: ReactNode;
10
- loadingContent?: ReactNode;
12
+ loaderComponent?: ReactNode;
11
13
  chatInputPlaceholder: string;
12
14
  chatInputDefaultValue?: string;
13
15
  onSubmitMessage?: (text: string, attachments: string[], questionResponse?: ChatInputQuestionResponse) => void;
@@ -0,0 +1,10 @@
1
+ import { SessionMessage } from './message-types';
2
+ interface MessageActionPanelProps {
3
+ message: SessionMessage;
4
+ alwaysVisible?: boolean;
5
+ copyAlwaysVisible?: boolean;
6
+ }
7
+ export declare const getMessageCopyText: (message: SessionMessage) => string;
8
+ export declare const getMessageTimestampLabel: (message: SessionMessage, locale?: string, timeZone?: string) => string;
9
+ export declare const MessageActionPanel: (props: MessageActionPanelProps) => import("react/jsx-runtime").JSX.Element | null;
10
+ export {};
@@ -0,0 +1,37 @@
1
+ export type ChatMountMetric = {
2
+ id: string;
3
+ scenario: string;
4
+ label: string;
5
+ totalMs: number;
6
+ messageCount: number;
7
+ perMessageMs: number | null;
8
+ startedAtMs: number;
9
+ completedAtMs: number;
10
+ };
11
+ type PendingChatMountMetric = {
12
+ scenario: string;
13
+ label: string;
14
+ messageCount: number;
15
+ startedAtMs: number;
16
+ };
17
+ type StartChatMountMetricInput = {
18
+ scenario: string;
19
+ label: string;
20
+ messageCount: number;
21
+ startMarkName?: string;
22
+ };
23
+ type FinishChatMountMetricInput = {
24
+ id: string;
25
+ messageCount: number;
26
+ readyMarkName?: string;
27
+ };
28
+ declare global {
29
+ interface Window {
30
+ __chatPanelMountMetrics?: ChatMountMetric[];
31
+ __chatPanelPendingMountMetrics?: Record<string, PendingChatMountMetric>;
32
+ }
33
+ }
34
+ export declare const startChatMountMetric: (input: StartChatMountMetricInput) => string;
35
+ export declare const finishChatMountMetricAfterPaint: (input: FinishChatMountMetricInput) => void;
36
+ export declare const readLatestChatMountMetric: (scenario: string) => ChatMountMetric | null;
37
+ export {};
@@ -0,0 +1,18 @@
1
+ import { ChatMountMetric } from './chat-mount-metrics';
2
+ type ProfilerSample = {
3
+ scenario: string;
4
+ phase: string;
5
+ actualDuration: number;
6
+ baseDuration: number;
7
+ commitTime: number;
8
+ };
9
+ declare global {
10
+ interface Window {
11
+ __chatPanelPerf?: ProfilerSample[];
12
+ __chatPanelMountMetrics?: ChatMountMetric[];
13
+ __longTasks?: Array<{
14
+ duration: number;
15
+ }>;
16
+ }
17
+ }
18
+ export {};
@@ -0,0 +1,29 @@
1
+ import { SessionMessage } from '../agent-types';
2
+ export interface LargeChatConversationOptions {
3
+ sessionId: string;
4
+ turns: number;
5
+ textRepeat?: number;
6
+ toolCallsPerTurn?: number;
7
+ }
8
+ export interface ChatPerformanceSession {
9
+ id: string;
10
+ label: string;
11
+ messages: SessionMessage[];
12
+ }
13
+ export declare const CHAT_PERFORMANCE_STRESS_TURNS = 500;
14
+ export declare const CHAT_PERFORMANCE_STRESS_MESSAGE_COUNT: number;
15
+ export declare const buildLargeChatConversation: (options: LargeChatConversationOptions) => SessionMessage[];
16
+ export declare const buildChatSessionSwitchFixture: () => {
17
+ primarySession: {
18
+ id: string;
19
+ label: string;
20
+ messages: SessionMessage[];
21
+ };
22
+ secondarySession: {
23
+ id: string;
24
+ label: string;
25
+ messages: SessionMessage[];
26
+ };
27
+ };
28
+ export declare const seedStreamingMessage: (message: SessionMessage) => SessionMessage;
29
+ export declare const updateStreamingTextPart: (messages: SessionMessage[], messageId: string, partIndex: number, text: string) => SessionMessage[];
@@ -0,0 +1,23 @@
1
+ export type ChatPerfSample = {
2
+ scenario: string;
3
+ phase: string;
4
+ actualDuration: number;
5
+ baseDuration: number;
6
+ commitTime: number;
7
+ };
8
+ declare global {
9
+ interface Window {
10
+ __chatPanelPerf?: ChatPerfSample[];
11
+ }
12
+ }
13
+ export declare const ensureChatPerfBuffer: () => {
14
+ scenario: string;
15
+ phase: string;
16
+ actualDuration: number;
17
+ baseDuration: number;
18
+ commitTime: number;
19
+ }[] | null;
20
+ export declare const ChatPerformancePanel: (props: {
21
+ scenario: string;
22
+ messageCount: number;
23
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,30 @@
1
+ import { ReactNode } from 'react';
2
+ import { SessionMessage } from '../agent-types';
3
+ export declare const defaultChatPanelProps: {
4
+ readonly emptyStateTitle: "No messages";
5
+ readonly emptyStateDescription: "";
6
+ readonly chatInputPlaceholder: "Benchmark prompt";
7
+ };
8
+ export type ActiveMountMeasurement = {
9
+ id: string;
10
+ readyMarkName?: string;
11
+ };
12
+ export declare const markAfterPaint: (markName: string) => void;
13
+ export declare const nextFrame: () => Promise<void>;
14
+ export declare const streamMessages: (input: {
15
+ messages: SessionMessage[];
16
+ isCancelled: () => boolean;
17
+ appendMessage: (message: SessionMessage) => void;
18
+ updateText: (messageId: string, partIndex: number, text: string) => void;
19
+ }) => Promise<void>;
20
+ export declare function ChatMountReadyMarker(props: {
21
+ measurement: ActiveMountMeasurement | null;
22
+ messageCount: number;
23
+ }): null;
24
+ export declare function ChatPerfShell(props: {
25
+ scenario: string;
26
+ activeLabel: string;
27
+ messageCount: number;
28
+ actions?: ReactNode;
29
+ children: ReactNode;
30
+ }): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,6 @@
1
1
  export declare const customTheme: {
2
2
  base: "vs-dark";
3
- inherit: boolean;
3
+ inherit: true;
4
4
  rules: never[];
5
5
  colors: {
6
6
  "editor.background": string;
@@ -0,0 +1,4 @@
1
+ import { ChangedFilesViewMode, ChangedFileTreeNode } from './types';
2
+ export declare const buildChangedFilesTree: (paths: string[], mode: ChangedFilesViewMode) => ChangedFileTreeNode[];
3
+ export declare const collectExpandedFolderIds: (nodes: ChangedFileTreeNode[]) => string[];
4
+ export declare const sortPathsByViewMode: (paths: string[], mode: ChangedFilesViewMode) => string[];
@@ -0,0 +1,34 @@
1
+ import { Diff } from './diff-card';
2
+ import { BuiltDiffViewData, buildDiffViewData } from './diff-view-adapter';
3
+ import { DiffViewMode } from './types';
4
+ interface DiffCardBodyProps {
5
+ diff: Diff;
6
+ filePath: string;
7
+ oldContent: string;
8
+ newContent: string;
9
+ isLargeDiff: boolean;
10
+ hasOptedIntoLargeDiff: boolean;
11
+ onShowFullDiff?: () => void;
12
+ diffViewMode?: DiffViewMode;
13
+ }
14
+ interface DiffCardBodyModelInput extends DiffCardBodyProps {
15
+ buildViewData?: typeof buildDiffViewData;
16
+ }
17
+ export declare const createDiffCardBodyModel: (input: DiffCardBodyModelInput) => {
18
+ kind: "placeholder";
19
+ filePath: string;
20
+ renderedLineCount: number;
21
+ onShowFullDiff: (() => void) | undefined;
22
+ diffViewData?: undefined;
23
+ sideBySide?: undefined;
24
+ } | {
25
+ kind: "editor";
26
+ diffViewData: BuiltDiffViewData;
27
+ sideBySide: boolean;
28
+ filePath?: undefined;
29
+ renderedLineCount?: undefined;
30
+ onShowFullDiff?: undefined;
31
+ };
32
+ export declare const DiffCardBody: (props: DiffCardBodyProps) => import("react/jsx-runtime").JSX.Element;
33
+ export type TestDiffViewData = BuiltDiffViewData;
34
+ export {};
@@ -0,0 +1,22 @@
1
+ import { Diff } from './diff-card';
2
+ import { DiffViewMode } from './types';
3
+ interface DiffCardContentProps {
4
+ diff: Diff;
5
+ filePath: string;
6
+ oldContent: string;
7
+ newContent: string;
8
+ isExpanded: boolean;
9
+ isLargeDiff: boolean;
10
+ isGeneratedDiff: boolean;
11
+ hasDiffContent: boolean;
12
+ canLoadDiff: boolean;
13
+ shouldAutoLoadDiff: boolean;
14
+ loadError: boolean;
15
+ isLoadingDiff: boolean;
16
+ onLoadDiff: () => Promise<void>;
17
+ hasOptedIntoLargeDiff: boolean;
18
+ onShowFullDiff?: () => void;
19
+ diffViewMode?: DiffViewMode;
20
+ }
21
+ export declare const DiffCardContent: (props: DiffCardContentProps) => import("react/jsx-runtime").JSX.Element | null;
22
+ export {};
@@ -0,0 +1,9 @@
1
+ interface DeferredDiffLoadProps {
2
+ title: string;
3
+ actionLabel?: string;
4
+ isLoadingDiff: boolean;
5
+ onAction?: () => void;
6
+ }
7
+ export declare const DeferredDiffLoad: (props: DeferredDiffLoadProps) => import("react/jsx-runtime").JSX.Element;
8
+ export declare const LoadingDiffContent: () => import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1,43 @@
1
+ import { DiffViewMode } from './types';
2
+ export interface Diff {
3
+ change: "added" | "deleted" | "modified" | "renamed" | "copied" | "permissionChange";
4
+ oldPath?: string;
5
+ newPath?: string;
6
+ oldContent?: string;
7
+ newContent?: string;
8
+ additions?: number;
9
+ deletions?: number;
10
+ }
11
+ interface DiffCardProps {
12
+ diff: Diff;
13
+ isSelected?: boolean;
14
+ isExpanded?: boolean;
15
+ onToggleExpanded?: () => void;
16
+ onSelect?: () => void;
17
+ onLoadDiff?: (path: string) => Promise<void>;
18
+ hasOptedIntoLargeDiff?: boolean;
19
+ onShowFullDiff?: () => void;
20
+ diffViewMode?: DiffViewMode;
21
+ }
22
+ interface DiffCardHeaderProps {
23
+ diff: Diff;
24
+ isExpanded?: boolean;
25
+ onToggleExpanded?: () => void;
26
+ }
27
+ export declare const shouldAutoLoadDiffContent: (input: {
28
+ isExpanded: boolean;
29
+ isSelected: boolean;
30
+ hasDiffContent: boolean;
31
+ isLargeDiff: boolean;
32
+ isGeneratedDiff: boolean;
33
+ requestedPath: string | null;
34
+ filePath: string;
35
+ }) => boolean;
36
+ export declare const resolveRequestedDiffPath: (input: {
37
+ requestedPath: string | null;
38
+ filePath: string;
39
+ hasDiffContent: boolean;
40
+ }) => string | null;
41
+ export declare const DiffCard: (props: DiffCardProps) => import("react/jsx-runtime").JSX.Element;
42
+ export declare const DiffCardHeader: (props: DiffCardHeaderProps) => import("react/jsx-runtime").JSX.Element;
43
+ export {};
@@ -0,0 +1,33 @@
1
+ import { Diff } from './diff-card';
2
+ import { DiffViewMode } from './types';
3
+ interface DiffDrawerProps {
4
+ diffs: Diff[];
5
+ selectedDiffPath?: string | null;
6
+ onLoadDiff?: (path: string) => Promise<void>;
7
+ onSelectDiffPath?: (path: string) => void;
8
+ onExpansionStateChange?: (state: DiffDrawerExpansionState) => void;
9
+ expansionCommand?: DiffExpansionCommand | null;
10
+ diffViewMode?: DiffViewMode;
11
+ }
12
+ export interface DiffExpansionCommand {
13
+ action: "expand" | "collapse" | "expand-selected";
14
+ id: number;
15
+ path?: string;
16
+ }
17
+ export interface DiffDrawerExpansionState {
18
+ allExpanded: boolean;
19
+ allCollapsed: boolean;
20
+ }
21
+ export type { Diff };
22
+ interface EstimateDiffCardHeightInput {
23
+ diff: Diff;
24
+ isCollapsed: boolean;
25
+ hasOptedIntoLargeDiff?: boolean;
26
+ diffViewMode?: DiffViewMode;
27
+ }
28
+ export declare const estimateDiffCardHeight: (input: EstimateDiffCardHeightInput) => number;
29
+ export declare const buildInitialCollapsedPaths: (diffs: Diff[]) => Set<string>;
30
+ export declare const buildAllCollapsedPaths: (diffs: Diff[]) => Set<string>;
31
+ export declare const toggleCollapsedPath: (collapsedPaths: Set<string>, path: string) => Set<string>;
32
+ export declare const resolveCollapsedPathsForSelectedDiff: (diffs: Diff[], collapsedPaths: Set<string>, selectedDiffPath: string | null) => Set<string>;
33
+ export declare function DiffDrawer(props: DiffDrawerProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,20 @@
1
+ import { DiffViewData } from './diff-view-adapter';
2
+ export interface DiffEditorInput {
3
+ original: string;
4
+ modified: string;
5
+ language?: string;
6
+ oldPath?: string;
7
+ newPath?: string;
8
+ }
9
+ interface DiffEditorProps extends DiffEditorInput {
10
+ sideBySide?: boolean;
11
+ disableScroll?: boolean;
12
+ data?: DiffViewData;
13
+ }
14
+ export interface DiffEditorDataState {
15
+ input: DiffEditorInput;
16
+ data: DiffViewData;
17
+ }
18
+ export declare const resolveDiffEditorDataState: (current: DiffEditorDataState | null, input: DiffEditorInput, createData: () => DiffViewData) => DiffEditorDataState;
19
+ export declare function DiffEditor(props: DiffEditorProps): import("react/jsx-runtime").JSX.Element;
20
+ export {};
@@ -0,0 +1,14 @@
1
+ export declare const LARGE_DIFF_LINE_THRESHOLD = 1000;
2
+ export declare const getDiffLineCount: (input: {
3
+ additions?: number;
4
+ deletions?: number;
5
+ oldContent?: string;
6
+ newContent?: string;
7
+ }) => number;
8
+ export declare const isLargeDiffContent: (input: {
9
+ additions?: number;
10
+ deletions?: number;
11
+ oldContent?: string;
12
+ newContent?: string;
13
+ }) => boolean;
14
+ export declare const isGeneratedDiffPath: (path: string) => boolean;
@@ -0,0 +1,27 @@
1
+ import { DiffViewProps } from '@git-diff-view/react';
2
+ interface ResolveDiffLanguageInput {
3
+ language?: string;
4
+ oldPath?: string;
5
+ newPath?: string;
6
+ }
7
+ interface BuildDiffViewDataInput extends ResolveDiffLanguageInput {
8
+ original: string;
9
+ modified: string;
10
+ }
11
+ export type DiffViewData = NonNullable<DiffViewProps<unknown>["data"]>;
12
+ /**
13
+ * Diff view data enriched with the row counts the renderer will actually paint. The renderer
14
+ * collapses unchanged context, so only lines inside the hunks are rendered — these counts come
15
+ * from the hunk patch, not the full file length.
16
+ */
17
+ export interface BuiltDiffViewData extends DiffViewData {
18
+ /** Content rows painted in unified layout (one per added/removed/context line). */
19
+ unifiedContentRows: number;
20
+ /** Content rows painted in split layout (paired add/remove lines share a row). */
21
+ splitContentRows: number;
22
+ /** Hunk header rows — one per `@@` section, taller than content rows. */
23
+ hunkRows: number;
24
+ }
25
+ export declare const resolveDiffLanguage: ({ language, oldPath, newPath }: ResolveDiffLanguageInput) => string;
26
+ export declare const buildDiffViewData: (input: BuildDiffViewDataInput) => BuiltDiffViewData;
27
+ export {};
@@ -0,0 +1,14 @@
1
+ import { Diff } from './diff-card';
2
+ import { FileIconInfo } from './types';
3
+ export interface DiffViewerProps {
4
+ diffs: Diff[];
5
+ changedFilePaths?: string[];
6
+ defaultSelectedPath?: string | null;
7
+ loading?: boolean;
8
+ onLoadDiff?: (path: string) => Promise<void>;
9
+ resolveFileIcon?: (path: string, options?: {
10
+ isFolder?: boolean;
11
+ isExpanded?: boolean;
12
+ }) => FileIconInfo | undefined;
13
+ }
14
+ export declare const DiffViewer: (props: DiffViewerProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,21 @@
1
+ import { ChangedFilesViewMode, DiffViewMode } from './types';
2
+ interface DiffViewerState {
3
+ isTreePanelOpen: boolean;
4
+ viewMode: ChangedFilesViewMode;
5
+ diffViewMode: DiffViewMode;
6
+ searchQuery: string;
7
+ selectedPath: string | null;
8
+ expandedFolderIds: Set<string>;
9
+ setTreePanelOpen: (open: boolean) => void;
10
+ toggleTreePanel: () => void;
11
+ setViewMode: (viewMode: ChangedFilesViewMode) => void;
12
+ setDiffViewMode: (diffViewMode: DiffViewMode) => void;
13
+ setSearchQuery: (searchQuery: string) => void;
14
+ setSelectedPath: (selectedPath: string | null) => void;
15
+ setExpandedFolderIds: (folderIds: string[]) => void;
16
+ toggleFolder: (folderId: string) => void;
17
+ expandAll: (folderIds: string[]) => void;
18
+ collapseAll: () => void;
19
+ }
20
+ export declare const useDiffViewerStore: import('zustand').UseBoundStore<import('zustand').StoreApi<DiffViewerState>>;
21
+ export {};
@@ -0,0 +1,19 @@
1
+ import { ChangedFilesViewMode, FileIconInfo } from './types';
2
+ interface FileListPanelProps {
3
+ title: string;
4
+ paths: string[];
5
+ selectedPath: string | null;
6
+ viewMode: ChangedFilesViewMode;
7
+ searchQuery: string;
8
+ expandedFolderIds: Set<string>;
9
+ onSelectPath: (path: string) => void;
10
+ onSearchQueryChange: (value: string) => void;
11
+ onToggleFolder: (id: string) => void;
12
+ resolveFileIcon?: (path: string, options?: {
13
+ isFolder?: boolean;
14
+ isExpanded?: boolean;
15
+ }) => FileIconInfo | undefined;
16
+ changeByPath?: Map<string, string>;
17
+ }
18
+ export declare const FileListPanel: (props: FileListPanelProps) => import("react/jsx-runtime").JSX.Element;
19
+ export {};
@@ -0,0 +1,5 @@
1
+ export type { Diff } from './diff-card';
2
+ export { DiffDrawer } from './diff-drawer';
3
+ export { DiffViewer, type DiffViewerProps } from './diff-viewer';
4
+ export { useDiffViewerStore } from './diff-viewer.store';
5
+ export type { ChangedFilesViewMode, DiffViewMode, FileIconInfo } from './types';
@@ -0,0 +1,13 @@
1
+ import { ReactNode } from 'react';
2
+ export type ChangedFilesViewMode = "nested" | "flat";
3
+ export type DiffViewMode = "unified" | "split";
4
+ export interface ChangedFileTreeNode {
5
+ id: string;
6
+ name: string;
7
+ type: "folder" | "file";
8
+ children?: ChangedFileTreeNode[];
9
+ }
10
+ export interface FileIconInfo {
11
+ icon: ReactNode;
12
+ color: string;
13
+ }
@@ -0,0 +1,12 @@
1
+ import { ReactNode } from 'react';
2
+ export interface IntegrationCardProps {
3
+ icon: ReactNode;
4
+ name: string;
5
+ description: string;
6
+ id: string;
7
+ version?: string;
8
+ category?: string;
9
+ active?: boolean;
10
+ actionLabel?: string;
11
+ }
12
+ export declare const IntegrationCard: (props: IntegrationCardProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,12 @@
1
+ import { ReactElement } from 'react';
2
+ import { ListRowActionMenuItem, ListRowMenuPlacement } from './list-row.types';
3
+ interface ListRowMenuProps {
4
+ items: ListRowActionMenuItem[];
5
+ open: boolean;
6
+ placement?: ListRowMenuPlacement;
7
+ children: ReactElement;
8
+ onOpenChange: (open: boolean) => void;
9
+ onSelect: (item: ListRowActionMenuItem) => void;
10
+ }
11
+ export declare const ListRowMenu: (props: ListRowMenuProps) => import("react/jsx-runtime").JSX.Element;
12
+ export {};
@@ -16,12 +16,16 @@ export interface ListRowActionMenuItem {
16
16
  size?: number | string;
17
17
  }>;
18
18
  disabled?: boolean;
19
+ /** Trailing content rendered after the label. Use for Kbd shortcuts, counts, or badges. */
20
+ endContent?: ReactNode;
19
21
  onAction?: () => void;
20
22
  }
21
23
  export interface ListRowAction {
22
24
  id: string;
23
25
  label: string;
24
26
  icon?: ReactNode;
27
+ /** Tooltip shown when the action button is hovered or focused. Can include label + Kbd hint. */
28
+ tooltip?: ReactNode;
25
29
  searchPlaceholder?: string;
26
30
  emptyMenuLabel?: string;
27
31
  menuItems?: ListRowActionMenuItem[];
@@ -29,6 +33,7 @@ export interface ListRowAction {
29
33
  }
30
34
  export type ListRowVariant = "default" | "compact" | "tree";
31
35
  export type ListRowTone = "default" | "danger";
36
+ export type ListRowMenuPlacement = "top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "right" | "right-start" | "right-end" | "left" | "left-start" | "left-end";
32
37
  export interface ListRowItem {
33
38
  id?: string;
34
39
  label: ReactNode;
@@ -51,6 +56,9 @@ export interface ListRowItem {
51
56
  href?: string;
52
57
  navigationIntent?: ListRowNavigationIntent;
53
58
  onActivate?: () => void;
59
+ /** Left-click menu opened from the row surface. */
60
+ menuItems?: ListRowActionMenuItem[];
61
+ menuPlacement?: ListRowMenuPlacement;
54
62
  contextMenuItems?: ListRowActionMenuItem[];
55
63
  actions?: ListRowAction[];
56
64
  children?: ListRowItem[];
@@ -0,0 +1,23 @@
1
+ import { ReactNode } from 'react';
2
+ export declare const DEFAULT_PALETTE_ASSET_LIMIT = 48;
3
+ export interface PaletteSearchEntry {
4
+ id: string;
5
+ mode?: string;
6
+ label: ReactNode;
7
+ searchText?: string;
8
+ secondaryLabel?: ReactNode;
9
+ assetType?: string;
10
+ }
11
+ export interface PaletteMode {
12
+ id: string;
13
+ inputPrefix?: string;
14
+ }
15
+ export interface FilterPaletteEntriesOptions {
16
+ query: string;
17
+ mode?: string;
18
+ getEffectiveQuery?: (query: string) => string;
19
+ defaultAssetLimit?: number;
20
+ }
21
+ export declare const resolvePaletteMode: (query: string, modes?: readonly PaletteMode[], fallbackMode?: string) => string;
22
+ export declare const getPaletteEffectiveQuery: (query: string, modes?: readonly PaletteMode[], modeId?: string) => string;
23
+ export declare const filterPaletteEntries: <T extends PaletteSearchEntry>(entries: T[], options: FilterPaletteEntriesOptions) => T[];
@@ -0,0 +1,11 @@
1
+ import { RefObject } from 'react';
2
+ import { PaletteEntry } from './palette';
3
+ interface PaletteListProps<T extends PaletteEntry> {
4
+ entries: T[];
5
+ activeIndex: number;
6
+ emptyLabel: string;
7
+ onHover: (index: number) => void;
8
+ scrollRef: RefObject<HTMLDivElement | null>;
9
+ }
10
+ export declare const PaletteList: <T extends PaletteEntry>(props: PaletteListProps<T>) => import("react/jsx-runtime").JSX.Element;
11
+ export {};
@@ -0,0 +1,4 @@
1
+ export type PaletteShortcutBinding = string | string[];
2
+ export declare const PaletteShortcut: (props: {
3
+ binding: PaletteShortcutBinding;
4
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,47 @@
1
+ import { ReactNode, SetStateAction } from 'react';
2
+ import { DEFAULT_PALETTE_ASSET_LIMIT, FilterPaletteEntriesOptions, filterPaletteEntries, PaletteMode, PaletteSearchEntry } from './palette-filter';
3
+ export type { FilterPaletteEntriesOptions, PaletteMode, PaletteSearchEntry };
4
+ export { DEFAULT_PALETTE_ASSET_LIMIT, filterPaletteEntries };
5
+ export interface PaletteEntry extends PaletteSearchEntry {
6
+ description?: ReactNode;
7
+ icon?: ReactNode;
8
+ shortcut?: ReactNode;
9
+ endContent?: ReactNode;
10
+ group?: string;
11
+ isSelected?: boolean;
12
+ onActivate: () => void;
13
+ }
14
+ export interface PaletteState<T extends PaletteEntry> {
15
+ query: string;
16
+ mode?: string;
17
+ activeIndex: number;
18
+ entries: T[];
19
+ }
20
+ export interface PaletteEscapeContext<T extends PaletteEntry> extends PaletteState<T> {
21
+ activeEntry: T | null;
22
+ entryCount: number;
23
+ setQuery: (query: string) => void;
24
+ setActiveIndex: (index: SetStateAction<number>) => void;
25
+ runActiveEntry: () => void;
26
+ closePalette: () => void;
27
+ }
28
+ export type PaletteStateValue<T extends PaletteEntry, TValue> = TValue | ((state: PaletteState<T>) => TValue);
29
+ export interface PaletteProps<T extends PaletteEntry = PaletteEntry> {
30
+ open: boolean;
31
+ entries: T[];
32
+ initialQuery?: string;
33
+ initialActiveIndex?: number;
34
+ mode?: string;
35
+ modes?: PaletteMode[];
36
+ resetKey?: string;
37
+ inputIcon?: PaletteStateValue<T, ReactNode>;
38
+ placeholder?: PaletteStateValue<T, string>;
39
+ emptyLabel?: string;
40
+ footerStart?: ReactNode;
41
+ footerEnd?: ReactNode;
42
+ filterEntries?: (entries: T[], query: string, mode?: string) => T[];
43
+ onActiveEntryChange?: (entry: T | null, index: number) => void;
44
+ onClose: () => void;
45
+ onEscape?: (ctx: PaletteEscapeContext<T>) => boolean | undefined;
46
+ }
47
+ export declare const Palette: <T extends PaletteEntry>(props: PaletteProps<T>) => import("react/jsx-runtime").JSX.Element;