@pstdio/ui 0.13.0 → 0.15.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.
- package/dist/MermaidComponent-DBJsTOmj.js +60 -0
- package/dist/MermaidComponent-DBJsTOmj.js.map +1 -0
- package/dist/chat-ui.js +1222 -1147
- package/dist/chat-ui.js.map +1 -1
- package/dist/components/bubble-button.d.ts +1 -1
- package/dist/components/chat-ui/components/chat-input-attachments.d.ts +12 -0
- package/dist/components/chat-ui/components/chat-input.d.ts +3 -0
- package/dist/components/chat-ui/components/chat-panel.d.ts +2 -0
- package/dist/components/chat-ui/components/message-parts-renderer.d.ts +1 -1
- package/dist/components/chat-ui/components/message-types.d.ts +90 -3
- package/dist/components/chat-ui/index.d.ts +2 -2
- package/dist/components/chat-ui/mocks/library/index.d.ts +2 -2
- package/dist/components/chat-ui/performance/chat-performance-fixtures.d.ts +1 -1
- package/dist/components/chat-ui/performance/chat-performance-story-utils.d.ts +1 -1
- package/dist/components/chat-ui/tool-rendering/build-timeline.d.ts +3 -3
- package/dist/components/chat-ui/tool-rendering/question-renderer.d.ts +1 -1
- package/dist/components/chat-ui/tool-rendering/shared.d.ts +2 -2
- package/dist/components/chat-ui/tool-rendering/todowrite-renderer.d.ts +1 -1
- package/dist/components/chat-ui/tool-rendering/types.d.ts +1 -1
- package/dist/components/data-renderer/data-renderer-board-column-header.d.ts +8 -0
- package/dist/components/data-renderer/data-renderer-board-group-section.d.ts +17 -0
- package/dist/components/data-renderer/data-renderer-board-move.d.ts +21 -0
- package/dist/components/data-renderer/data-renderer-board.d.ts +3 -2
- package/dist/components/data-renderer/data-renderer-content.d.ts +7 -2
- package/dist/components/data-renderer/data-renderer-enum-helpers.d.ts +3 -3
- package/dist/components/data-renderer/data-renderer-helpers.d.ts +2 -0
- package/dist/components/data-renderer/data-renderer.d.ts +2 -2
- package/dist/components/diff-viewer/diff-card-body.d.ts +16 -0
- package/dist/components/diff-viewer/diff-card.d.ts +1 -0
- package/dist/components/diff-viewer/diff-size.d.ts +1 -1
- package/dist/components/diff-viewer/diff-viewer-options-menu.d.ts +16 -0
- package/dist/components/icon-color-picker.d.ts +2 -6
- package/dist/components/list-row/list-row.types.d.ts +1 -1
- package/dist/components/mermaid-renderer/download-png.d.ts +7 -0
- package/dist/components/mermaid-renderer/index.d.ts +2 -0
- package/dist/components/mermaid-renderer/mermaid-error-state.d.ts +6 -0
- package/dist/components/mermaid-renderer/mermaid-fixtures.d.ts +9 -0
- package/dist/components/mermaid-renderer/mermaid-fullscreen.d.ts +10 -0
- package/dist/components/mermaid-renderer/mermaid-renderer.d.ts +8 -0
- package/dist/components/mermaid-renderer/mermaid-svg-view.d.ts +12 -0
- package/dist/components/mermaid-renderer/mermaid-toolbar.d.ts +12 -0
- package/dist/components/mermaid-renderer/mermaid-zoom.d.ts +6 -0
- package/dist/components/mermaid-renderer/svg-data-url.d.ts +6 -0
- package/dist/components/mermaid-renderer/use-mermaid-render.d.ts +5 -0
- package/dist/components/notification-center/index.d.ts +2 -0
- package/dist/components/notification-center/notification-center.d.ts +2 -0
- package/dist/components/notification-center/notification-center.types.d.ts +37 -0
- package/dist/components/palette-shortcut.d.ts +8 -0
- package/dist/components/search-modal-content.d.ts +20 -0
- package/dist/components/style-guide-data.d.ts +0 -6
- package/dist/components/tab-strip/tab-visibility-filter.d.ts +4 -2
- package/dist/components/tree-list/tree-list-visibility-filter.d.ts +11 -3
- package/dist/components/tree-list/tree-list.types.d.ts +7 -2
- package/dist/index.d.ts +9 -2
- package/dist/index.js +4641 -4326
- package/dist/index.js.map +1 -1
- package/dist/mermaid-renderer-CPGj6vsb.js +570 -0
- package/dist/mermaid-renderer-CPGj6vsb.js.map +1 -0
- package/dist/resource-badge-CeJTOn8F.js +188 -0
- package/dist/resource-badge-CeJTOn8F.js.map +1 -0
- package/dist/{rich-message-CEOSsdR2.js → rich-message-DNSEhxXh.js} +431 -519
- package/dist/rich-message-DNSEhxXh.js.map +1 -0
- package/dist/rich-text.js +405 -399
- package/dist/rich-text.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/theme/shadowless-default-config.d.ts +2 -0
- package/dist/{theme-D2LYEa0j.js → theme-25P7ij4C.js} +211 -241
- package/dist/theme-25P7ij4C.js.map +1 -0
- package/dist/theme.js +1 -1
- package/package.json +3 -2
- package/dist/MermaidComponent-Cz_Iob5U.js +0 -127
- package/dist/MermaidComponent-Cz_Iob5U.js.map +0 -1
- package/dist/components/chat-ui/agent-types.d.ts +0 -220
- package/dist/components/sidebar/sidebar-project-menu.d.ts +0 -7
- package/dist/get-file-type-icon-ufFb0IkR.js +0 -102
- package/dist/get-file-type-icon-ufFb0IkR.js.map +0 -1
- package/dist/rich-message-CEOSsdR2.js.map +0 -1
- package/dist/theme/tokens/shadows.d.ts +0 -64
- package/dist/theme-D2LYEa0j.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HTMLChakraProps, IconButtonProps } from '@chakra-ui/react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
type BubbleButtonStyleProps = "
|
|
3
|
+
type BubbleButtonStyleProps = "transition" | "_hover" | "_active" | "borderColor" | "borderWidth";
|
|
4
4
|
export interface BubbleButtonProps extends Omit<IconButtonProps, BubbleButtonStyleProps> {
|
|
5
5
|
containerProps?: HTMLChakraProps<"div">;
|
|
6
6
|
isOpen?: boolean;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ClipboardEvent, DragEvent } from 'react';
|
|
2
|
+
export declare const DEFAULT_TEXT_ATTACHMENT_PASTE_LINE_THRESHOLD = 200;
|
|
3
|
+
export declare const shouldAttachPastedText: (text: string, lineThreshold?: number) => boolean;
|
|
4
|
+
export declare const createAttachmentEventHandlers: (input: {
|
|
5
|
+
onAttachFiles?: (files: File[]) => void;
|
|
6
|
+
onAttachText?: (text: string) => void;
|
|
7
|
+
textAttachmentPasteLineThreshold: number;
|
|
8
|
+
}) => {
|
|
9
|
+
onDragOver: (event: DragEvent<HTMLDivElement>) => void;
|
|
10
|
+
onDropCapture: (event: DragEvent<HTMLDivElement>) => void;
|
|
11
|
+
onPasteCapture: (event: ClipboardEvent<HTMLDivElement>) => void;
|
|
12
|
+
};
|
|
@@ -5,6 +5,9 @@ interface ChatInputProps {
|
|
|
5
5
|
placeholder?: string;
|
|
6
6
|
onSubmit?: (text: string, attachments: string[], questionResponse?: ChatInputQuestionResponse) => void;
|
|
7
7
|
onInterrupt?: () => void;
|
|
8
|
+
onAttachFiles?: (files: File[]) => void;
|
|
9
|
+
onAttachText?: (text: string) => void;
|
|
10
|
+
textAttachmentPasteLineThreshold?: number;
|
|
8
11
|
streaming?: boolean;
|
|
9
12
|
attachedResources?: string[];
|
|
10
13
|
onClearAttachments?: () => void;
|
|
@@ -16,6 +16,8 @@ interface ChatPanelProps {
|
|
|
16
16
|
chatInputDefaultValue?: string;
|
|
17
17
|
onSubmitMessage?: (text: string, attachments: string[], questionResponse?: ChatInputQuestionResponse) => void;
|
|
18
18
|
onInterrupt?: () => void;
|
|
19
|
+
onAttachFiles?: (files: File[]) => void;
|
|
20
|
+
onAttachText?: (text: string) => void;
|
|
19
21
|
onChatInputChange?: (text: string) => void;
|
|
20
22
|
/** Extra controls rendered near the chat input. */
|
|
21
23
|
actions?: ReactNode;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { SessionMessage } from '
|
|
2
|
+
import { SessionMessage } from './message-types';
|
|
3
3
|
import { ToolInvocationTimelineProps } from './tool-invocation-timeline';
|
|
4
4
|
type ToolInvocationTimelineComponent = (props: ToolInvocationTimelineProps) => ReactNode;
|
|
5
5
|
export interface MessagePartsProps {
|
|
@@ -1,8 +1,95 @@
|
|
|
1
|
-
|
|
2
|
-
export type
|
|
1
|
+
export type SessionMessageRole = "user" | "assistant" | "tool" | "system" | "developer";
|
|
2
|
+
export type TextPart = {
|
|
3
|
+
type: "text";
|
|
4
|
+
text: string;
|
|
5
|
+
};
|
|
6
|
+
export type ReasoningPart = {
|
|
7
|
+
type: "reasoning";
|
|
8
|
+
text: string;
|
|
9
|
+
};
|
|
10
|
+
export type ToolPartActionType = "read" | "write" | "execute" | "network" | "other";
|
|
11
|
+
export type ToolPartStatus = "pending" | "running" | "completed" | "failed" | "denied";
|
|
12
|
+
export type ToolPart = {
|
|
13
|
+
type: "tool";
|
|
14
|
+
tool: string;
|
|
15
|
+
callId?: string;
|
|
16
|
+
actionType?: ToolPartActionType;
|
|
17
|
+
status?: ToolPartStatus;
|
|
18
|
+
state?: {
|
|
19
|
+
status?: string;
|
|
20
|
+
input?: unknown;
|
|
21
|
+
output?: unknown;
|
|
22
|
+
errorText?: string;
|
|
23
|
+
metadata?: unknown;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
export type StepStartPart = {
|
|
27
|
+
type: "step-start";
|
|
28
|
+
snapshot?: string;
|
|
29
|
+
};
|
|
30
|
+
export type StepFinishPart = {
|
|
31
|
+
type: "step-finish";
|
|
32
|
+
reason?: string;
|
|
33
|
+
snapshot?: string;
|
|
34
|
+
cost?: number;
|
|
35
|
+
tokens?: unknown;
|
|
36
|
+
};
|
|
37
|
+
export type PatchPart = {
|
|
38
|
+
type: "patch";
|
|
39
|
+
hash?: string;
|
|
40
|
+
files?: unknown;
|
|
41
|
+
};
|
|
42
|
+
export type FilePart = {
|
|
43
|
+
type: "file";
|
|
44
|
+
fileId?: string;
|
|
45
|
+
mediaType?: string;
|
|
46
|
+
filename?: string;
|
|
47
|
+
size?: number;
|
|
48
|
+
url: string;
|
|
49
|
+
};
|
|
50
|
+
export type LoadingPart = {
|
|
51
|
+
type: "loading";
|
|
52
|
+
};
|
|
53
|
+
export type ErrorPart = {
|
|
54
|
+
type: "error";
|
|
55
|
+
errorType: "timeout" | "crash" | "permission" | "other";
|
|
56
|
+
message?: string;
|
|
57
|
+
};
|
|
58
|
+
export type TokenUsagePart = {
|
|
59
|
+
type: "token_usage";
|
|
60
|
+
inputTokens: number;
|
|
61
|
+
outputTokens: number;
|
|
62
|
+
cacheReadTokens?: number;
|
|
63
|
+
cacheWriteTokens?: number;
|
|
64
|
+
};
|
|
65
|
+
export type AlertPart = {
|
|
66
|
+
type: "alert";
|
|
67
|
+
status: "info" | "warning" | "error" | "success" | "loading";
|
|
68
|
+
title: string;
|
|
69
|
+
message?: string;
|
|
70
|
+
};
|
|
71
|
+
export type SessionMessagePart = TextPart | ReasoningPart | ToolPart | StepStartPart | StepFinishPart | PatchPart | FilePart | LoadingPart | ErrorPart | TokenUsagePart;
|
|
72
|
+
export type ChatMessagePart = SessionMessagePart | AlertPart;
|
|
73
|
+
export type SessionMessage = {
|
|
74
|
+
id: string;
|
|
75
|
+
role: SessionMessageRole;
|
|
76
|
+
parts: ChatMessagePart[];
|
|
77
|
+
index?: number;
|
|
78
|
+
createdAt?: number;
|
|
79
|
+
modelId?: string;
|
|
80
|
+
providerId?: string;
|
|
81
|
+
tokens?: {
|
|
82
|
+
input?: number;
|
|
83
|
+
output?: number;
|
|
84
|
+
reasoning?: number;
|
|
85
|
+
cache?: {
|
|
86
|
+
read?: number;
|
|
87
|
+
write?: number;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
};
|
|
3
91
|
export type MessageOrigin = "user" | "assistant" | "developer";
|
|
4
92
|
export declare const getMessageOrigin: (role: string) => MessageOrigin;
|
|
5
|
-
export declare const isReasoningToolOnlyMessage: (message: SessionMessage) => boolean;
|
|
6
93
|
export declare const mergeReasoningToolOnlyMessages: (messages: SessionMessage[]) => SessionMessage[];
|
|
7
94
|
export interface MessageGroup {
|
|
8
95
|
userMessage: SessionMessage;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
export type { AlertPart } from '../chat-ui/agent-types';
|
|
2
1
|
export type { ConversationContentProps, ConversationRootProps, ConversationScrollButtonProps, } from './components/ai-conversation';
|
|
3
2
|
export { ChatPrimitives } from './components/ai-conversation';
|
|
4
3
|
export type { MessageContentProps, MessageRootProps } from './components/ai-message';
|
|
5
4
|
export { ChatMessage } from './components/ai-message';
|
|
6
5
|
export { ApprovalPrompt } from './components/approval-prompt';
|
|
6
|
+
export { AttachmentList } from './components/attachment-list';
|
|
7
7
|
export type { AutoScrollProps } from './components/auto-scroll';
|
|
8
8
|
export { AutoScroll } from './components/auto-scroll';
|
|
9
9
|
export { ChatInput } from './components/chat-input';
|
|
10
10
|
export type { ChatInputQuestionPrompt, ChatInputQuestionResponse } from './components/chat-input-question-prompt';
|
|
11
11
|
export { ChatPanel } from './components/chat-panel';
|
|
12
12
|
export { ChatSkeleton } from './components/chat-skeleton';
|
|
13
|
-
export type { SessionMessage, SessionMessagePart } from './components/message-types';
|
|
13
|
+
export type { AlertPart, ChatMessagePart, SessionMessage, SessionMessagePart, ToolPart, } from './components/message-types';
|
|
14
14
|
export type { SendButtonProps } from './components/send-button';
|
|
15
15
|
export { SendButton } from './components/send-button';
|
|
16
16
|
export { ChatWorkspaceHub } from './components/workspace-hub';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SessionMessage } from '../../components/message-types';
|
|
2
2
|
export type ConversationFixture = {
|
|
3
3
|
id: string;
|
|
4
|
-
agent:
|
|
4
|
+
agent: string;
|
|
5
5
|
label: string;
|
|
6
6
|
description: string;
|
|
7
7
|
messages: SessionMessage[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { SessionMessage } from '../
|
|
2
|
+
import { SessionMessage } from '../components/message-types';
|
|
3
3
|
export declare const defaultChatPanelProps: {
|
|
4
4
|
readonly emptyStateTitle: "No messages";
|
|
5
5
|
readonly emptyStateDescription: "";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ToolPart } from '../
|
|
1
|
+
import { ToolPart } from '../components/message-types';
|
|
2
2
|
import { Block, TitleSegment } from '../components/timeline';
|
|
3
3
|
import { ToolRenderersMap, ToolTimelineBuilderOptions } from './types';
|
|
4
4
|
export declare const buildTimelineDocFromInvocations: (invocations: ToolPart[], options?: ToolTimelineBuilderOptions) => {
|
|
5
5
|
items: (import('../components/timeline').Item | {
|
|
6
6
|
indicator: {
|
|
7
7
|
readonly type: "icon";
|
|
8
|
-
readonly icon: "search" | "dot" | "danger" | "file" | "shell" | "
|
|
8
|
+
readonly icon: "search" | "dot" | "danger" | "file" | "shell" | "ls" | "read_file" | "write_file" | "delete_file" | "patch" | "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" | "danger" | "file" | "shell" | "
|
|
18
|
+
readonly icon: "search" | "dot" | "danger" | "file" | "shell" | "ls" | "read_file" | "write_file" | "delete_file" | "patch" | "upload_files" | "download_file" | "move_file" | "browser" | "question" | "todo" | "terminal";
|
|
19
19
|
};
|
|
20
20
|
title: TitleSegment[];
|
|
21
21
|
blocks: Block[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ToolPart } from '../
|
|
1
|
+
import { ToolPart } from '../components/message-types';
|
|
2
2
|
import { Block, TitleSegment } from '../components/timeline';
|
|
3
3
|
export type ApplyPatchMetadataFile = {
|
|
4
4
|
filePath: string;
|
|
@@ -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" | "danger" | "file" | "shell" | "
|
|
18
|
+
readonly icon: "search" | "dot" | "danger" | "file" | "shell" | "ls" | "read_file" | "write_file" | "delete_file" | "patch" | "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;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DataRendererBoardColumn } from './data-renderer-board';
|
|
2
|
+
interface ColumnHeaderProps {
|
|
3
|
+
column: DataRendererBoardColumn;
|
|
4
|
+
onCreateStart?: (columnId: string) => void;
|
|
5
|
+
onColumnAction?: (columnId: string, actionId: string) => Promise<void> | void;
|
|
6
|
+
}
|
|
7
|
+
export declare const ColumnHeader: (props: ColumnHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { DragEvent } from 'react';
|
|
2
|
+
import { DataRendererBoardGroup } from './data-renderer-board';
|
|
3
|
+
interface GroupSectionProps {
|
|
4
|
+
columnId: string;
|
|
5
|
+
group: DataRendererBoardGroup;
|
|
6
|
+
selectedItemId: string | null;
|
|
7
|
+
canDragIn: boolean;
|
|
8
|
+
canDragOut: boolean;
|
|
9
|
+
isDropTarget: boolean;
|
|
10
|
+
onDragStart: (itemId: string) => (event: DragEvent<HTMLDivElement>) => void;
|
|
11
|
+
onDragEnd: () => void;
|
|
12
|
+
onGroupDragOver: (event: DragEvent<HTMLDivElement>) => void;
|
|
13
|
+
onGroupDragLeave: (event: DragEvent<HTMLDivElement>) => void;
|
|
14
|
+
onGroupDrop: (event: DragEvent<HTMLDivElement>, beforeItemId?: string) => void;
|
|
15
|
+
}
|
|
16
|
+
export declare const GroupSection: (props: GroupSectionProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { DataRendererSettings } from './types';
|
|
2
|
+
interface ApplyBoardMoveItemInput {
|
|
3
|
+
settings: Pick<DataRendererSettings, "columnGrouping" | "ordering" | "rowGrouping">;
|
|
4
|
+
rowId: string;
|
|
5
|
+
targetColumnId: string;
|
|
6
|
+
targetGroupKey?: string;
|
|
7
|
+
beforeItemId?: string;
|
|
8
|
+
onAttributeChange?: (rowId: string, attributeId: string, value: unknown) => Promise<void> | void;
|
|
9
|
+
onReorder?: (rowId: string, beforeRowId?: string) => Promise<void> | void;
|
|
10
|
+
}
|
|
11
|
+
interface ApplyBoardMoveToGroupInput {
|
|
12
|
+
settings: Pick<DataRendererSettings, "ordering" | "rowGrouping">;
|
|
13
|
+
rowId: string;
|
|
14
|
+
targetGroupKey: string;
|
|
15
|
+
beforeItemId?: string;
|
|
16
|
+
onAttributeChange?: (rowId: string, attributeId: string, value: unknown) => Promise<void> | void;
|
|
17
|
+
onReorder?: (rowId: string, beforeRowId?: string) => Promise<void> | void;
|
|
18
|
+
}
|
|
19
|
+
export declare const applyBoardMoveItem: (input: ApplyBoardMoveItemInput) => Promise<void>;
|
|
20
|
+
export declare const applyBoardMoveToGroup: (input: ApplyBoardMoveToGroupInput) => Promise<void>;
|
|
21
|
+
export {};
|
|
@@ -36,10 +36,11 @@ interface DataRendererBoardProps {
|
|
|
36
36
|
selectedItemId?: string | null;
|
|
37
37
|
onMoveItem?: (itemId: string, targetColumnId: string, context?: {
|
|
38
38
|
beforeItemId?: string;
|
|
39
|
-
|
|
39
|
+
targetGroupKey?: string;
|
|
40
|
+
}) => Promise<void> | void;
|
|
40
41
|
onMoveToGroup?: (itemId: string, targetGroupKey: string, context?: {
|
|
41
42
|
beforeItemId?: string;
|
|
42
|
-
}) => void;
|
|
43
|
+
}) => Promise<void> | void;
|
|
43
44
|
onCreateStart?: (columnId: string) => void;
|
|
44
45
|
onColumnAction?: (columnId: string, actionId: string) => Promise<void> | void;
|
|
45
46
|
}
|
|
@@ -11,8 +11,13 @@ interface DataRendererContentProps {
|
|
|
11
11
|
emptyState?: ReactNode;
|
|
12
12
|
emptyTitle: string;
|
|
13
13
|
emptyDescription?: string;
|
|
14
|
-
onBoardMoveItem: (rowId: string, targetColumnId: string
|
|
15
|
-
|
|
14
|
+
onBoardMoveItem: (rowId: string, targetColumnId: string, context?: {
|
|
15
|
+
beforeItemId?: string;
|
|
16
|
+
targetGroupKey?: string;
|
|
17
|
+
}) => Promise<void> | void;
|
|
18
|
+
onBoardMoveToGroup: (rowId: string, targetGroupKey: string, context?: {
|
|
19
|
+
beforeItemId?: string;
|
|
20
|
+
}) => Promise<void> | void;
|
|
16
21
|
onCreateRow?: (columnId: string) => void;
|
|
17
22
|
onColumnAction?: (columnId: string, actionId: string) => Promise<void> | void;
|
|
18
23
|
onListExpandedGroupChange: (rowId: string, isExpanded: boolean) => void;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { AttributeType } from './types';
|
|
1
|
+
import { AttributeType, EnumOption } from './types';
|
|
2
2
|
/**
|
|
3
3
|
* Normalize an enum / enum-multi attribute's `options` to a plain option list.
|
|
4
4
|
* Sources resolve via `getSnapshot()` on every call, so callers naturally see
|
|
5
5
|
* the latest values.
|
|
6
6
|
*/
|
|
7
|
-
export declare const getEnumOptions: (type: AttributeType) =>
|
|
7
|
+
export declare const getEnumOptions: (type: AttributeType) => EnumOption[];
|
|
8
8
|
export declare const toTitleCase: (value: string) => string;
|
|
9
|
-
export declare const findEnumOption: (type: AttributeType, value: string) =>
|
|
9
|
+
export declare const findEnumOption: (type: AttributeType, value: string) => EnumOption | undefined;
|
|
10
10
|
export declare const enumOptionLabel: (type: AttributeType, value: string) => string;
|
|
@@ -20,6 +20,7 @@ export declare const collectDisplayCustomSlots: (row: DataRendererRow, attribute
|
|
|
20
20
|
export interface FilterCategoryView {
|
|
21
21
|
id: string;
|
|
22
22
|
label: string;
|
|
23
|
+
selectionMode: "multiple";
|
|
23
24
|
options: {
|
|
24
25
|
value: string;
|
|
25
26
|
label: string;
|
|
@@ -45,6 +46,7 @@ export declare const resolveListDropTargetColumnKey: (columnGrouping: string, pl
|
|
|
45
46
|
columnKey?: string;
|
|
46
47
|
}) => string | undefined;
|
|
47
48
|
export declare const resolveKnownColumnKeys: (columnGrouping: string, attributes: AttributeDescriptor[], filters?: DataRendererFilterState) => string[] | undefined;
|
|
49
|
+
export declare const normalizeFilterValues: (_descriptor: AttributeDescriptor, values: string[]) => string[];
|
|
48
50
|
export declare const omitFilterCategory: (filters: DataRendererFilterState, id: string) => DataRendererFilterState;
|
|
49
51
|
/**
|
|
50
52
|
* Drop persisted settings entries that reference attribute ids no longer
|
|
@@ -29,9 +29,9 @@ export interface DataRendererProps<TRow extends DataRendererRow = DataRendererRo
|
|
|
29
29
|
toolbarLeading?: ReactNode;
|
|
30
30
|
onRowClick?: (row: TRow) => void;
|
|
31
31
|
/** Called when a row attribute changes through drag/drop, board movement, or inline controls. */
|
|
32
|
-
onAttributeChange?: (rowId: string, attributeId: string, value: unknown) => void;
|
|
32
|
+
onAttributeChange?: (rowId: string, attributeId: string, value: unknown) => Promise<void> | void;
|
|
33
33
|
/** Called for manual row ordering when a dragged row is dropped before another row. */
|
|
34
|
-
onReorder?: (rowId: string, beforeRowId?: string) => void;
|
|
34
|
+
onReorder?: (rowId: string, beforeRowId?: string) => Promise<void> | void;
|
|
35
35
|
onCreateRow?: (columnId: string) => void;
|
|
36
36
|
onColumnAction?: (columnId: string, actionId: string) => Promise<void> | void;
|
|
37
37
|
getBoardColumnConfig?: (groupKey: string) => BoardColumnConfig;
|
|
@@ -15,9 +15,21 @@ interface DiffCardBodyModelInput extends DiffCardBodyProps {
|
|
|
15
15
|
buildViewData?: typeof buildDiffViewData;
|
|
16
16
|
}
|
|
17
17
|
export declare const createDiffCardBodyModel: (input: DiffCardBodyModelInput) => {
|
|
18
|
+
kind: "image";
|
|
19
|
+
filePath: string;
|
|
20
|
+
oldSrc: string;
|
|
21
|
+
newSrc: string;
|
|
22
|
+
isImage?: undefined;
|
|
23
|
+
renderedLineCount?: undefined;
|
|
24
|
+
onShowFullDiff?: undefined;
|
|
25
|
+
diffViewData?: undefined;
|
|
26
|
+
sideBySide?: undefined;
|
|
27
|
+
} | {
|
|
18
28
|
kind: "binary";
|
|
19
29
|
filePath: string;
|
|
20
30
|
isImage: boolean;
|
|
31
|
+
oldSrc?: undefined;
|
|
32
|
+
newSrc?: undefined;
|
|
21
33
|
renderedLineCount?: undefined;
|
|
22
34
|
onShowFullDiff?: undefined;
|
|
23
35
|
diffViewData?: undefined;
|
|
@@ -27,6 +39,8 @@ export declare const createDiffCardBodyModel: (input: DiffCardBodyModelInput) =>
|
|
|
27
39
|
filePath: string;
|
|
28
40
|
renderedLineCount: number;
|
|
29
41
|
onShowFullDiff: (() => void) | undefined;
|
|
42
|
+
oldSrc?: undefined;
|
|
43
|
+
newSrc?: undefined;
|
|
30
44
|
isImage?: undefined;
|
|
31
45
|
diffViewData?: undefined;
|
|
32
46
|
sideBySide?: undefined;
|
|
@@ -35,6 +49,8 @@ export declare const createDiffCardBodyModel: (input: DiffCardBodyModelInput) =>
|
|
|
35
49
|
diffViewData: BuiltDiffViewData;
|
|
36
50
|
sideBySide: boolean;
|
|
37
51
|
filePath?: undefined;
|
|
52
|
+
oldSrc?: undefined;
|
|
53
|
+
newSrc?: undefined;
|
|
38
54
|
isImage?: undefined;
|
|
39
55
|
renderedLineCount?: undefined;
|
|
40
56
|
onShowFullDiff?: undefined;
|
|
@@ -39,6 +39,7 @@ export declare const resolveRequestedDiffPath: (input: {
|
|
|
39
39
|
filePath: string;
|
|
40
40
|
hasDiffContent: boolean;
|
|
41
41
|
}) => string | null;
|
|
42
|
+
export declare const shouldShowDiffStats: (filePath: string) => boolean;
|
|
42
43
|
export declare const DiffCard: (props: DiffCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
43
44
|
export declare const DiffCardHeader: (props: DiffCardHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
44
45
|
export {};
|
|
@@ -13,4 +13,4 @@ export declare const isLargeDiffContent: (input: {
|
|
|
13
13
|
}) => boolean;
|
|
14
14
|
export declare const isGeneratedDiffPath: (path: string) => boolean;
|
|
15
15
|
export declare const isBinaryDiffPath: (path: string) => boolean;
|
|
16
|
-
export declare const isImageDiffPath: (
|
|
16
|
+
export declare const isImageDiffPath: (filePath: string) => boolean;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ChangedFilesViewMode, DiffViewMode } from './types';
|
|
2
|
+
interface DiffViewerOptionsMenuProps {
|
|
3
|
+
isTreePanelOpen: boolean;
|
|
4
|
+
hasFilePaths: boolean;
|
|
5
|
+
viewMode: ChangedFilesViewMode;
|
|
6
|
+
diffViewMode: DiffViewMode;
|
|
7
|
+
isExpandAllDisabled: boolean;
|
|
8
|
+
isCollapseAllDisabled: boolean;
|
|
9
|
+
onToggleTreePanel: () => void;
|
|
10
|
+
onViewModeChange: (viewMode: ChangedFilesViewMode) => void;
|
|
11
|
+
onDiffViewModeChange: (diffViewMode: DiffViewMode) => void;
|
|
12
|
+
onExpandAll: () => void;
|
|
13
|
+
onCollapseAll: () => void;
|
|
14
|
+
}
|
|
15
|
+
export declare const DiffViewerOptionsMenu: (props: DiffViewerOptionsMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -5,15 +5,11 @@ export interface IconColorPickerIconOption {
|
|
|
5
5
|
icon: ComponentType;
|
|
6
6
|
}
|
|
7
7
|
export declare const optionColors: readonly ["gray", "red", "orange", "yellow", "green", "teal", "blue", "cyan", "purple", "pink"];
|
|
8
|
-
export declare const optionIcons:
|
|
9
|
-
value: null;
|
|
10
|
-
label: string;
|
|
11
|
-
icon: import('react').ForwardRefExoticComponent<Omit<import('lucide-react').LucideProps, "ref"> & import('react').RefAttributes<SVGSVGElement>>;
|
|
12
|
-
} | {
|
|
8
|
+
export declare const optionIcons: {
|
|
13
9
|
value: string;
|
|
14
10
|
label: string;
|
|
15
11
|
icon: import('react').ForwardRefExoticComponent<Omit<import('lucide-react').LucideProps, "ref"> & import('react').RefAttributes<SVGSVGElement>>;
|
|
16
|
-
}
|
|
12
|
+
}[];
|
|
17
13
|
export declare const getIconComponent: (name: string | null | undefined, iconOptions?: readonly IconColorPickerIconOption[]) => ComponentType;
|
|
18
14
|
export interface IconColorPickerProps {
|
|
19
15
|
color: string;
|
|
@@ -37,7 +37,7 @@ export interface ListRowAction {
|
|
|
37
37
|
menuItems?: ListRowActionMenuItem[];
|
|
38
38
|
onAction?: (context: ListRowActionContext) => void;
|
|
39
39
|
}
|
|
40
|
-
export type ListRowVariant = "default" | "compact" | "tree";
|
|
40
|
+
export type ListRowVariant = "default" | "compact" | "tree" | "empty-state";
|
|
41
41
|
export type ListRowTone = "default" | "danger";
|
|
42
42
|
export type ListRowMenuPlacement = "top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "right" | "right-start" | "right-end" | "left" | "left-start" | "left-end";
|
|
43
43
|
/** Data model for one reusable row, including labels, icons, menus, actions, and children. */
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const mermaidFixtures: {
|
|
2
|
+
readonly ps81Flowchart: "flowchart LR\n Editor[\"Markdown document<br/>editor\"] -->|\"fenced mermaid block\"| Node[\"MermaidNode\"]\n Node -->|\"source code\"| Renderer[\"MermaidRenderer\"]\n Renderer -->|\"stable SVG preview\"| Preview[\"Readable inline preview\"]\n Preview -->|\"zoomed past 100 percent\"| Pan[\"Pannable viewport\"]\n Renderer -->|\"fullscreen inspect\"| Fullscreen[\"Fullscreen preview\"]\n Fullscreen -->|\"Download as PNG\"| Export[\"Raster export\"]";
|
|
3
|
+
readonly sequence: "sequenceDiagram\n participant User\n participant Editor\n participant Renderer\n User->>Editor: Open document\n Editor->>Renderer: Render mermaid source\n Renderer-->>Editor: SVG preview\n User->>Renderer: Zoom and inspect";
|
|
4
|
+
readonly state: "stateDiagram-v2\n [*] --> Preview\n Preview --> Editing: Edit\n Editing --> Preview: Preview\n Preview --> Fullscreen: Fullscreen\n Fullscreen --> Preview: Close";
|
|
5
|
+
readonly er: "erDiagram\n DOCUMENT ||--o{ MERMAID_BLOCK : contains\n MERMAID_BLOCK ||--|| SVG_PREVIEW : renders\n SVG_PREVIEW ||--o{ PNG_EXPORT : creates\n DOCUMENT {\n string id\n string title\n }\n MERMAID_BLOCK {\n string source\n }";
|
|
6
|
+
readonly class: "classDiagram\n class MermaidRenderer {\n +code\n +zoom()\n +fullscreen()\n }\n class MermaidNode {\n +getCode()\n +setCode()\n }\n MermaidNode --> MermaidRenderer";
|
|
7
|
+
readonly gantt: "gantt\n title Mermaid rendering workflow\n dateFormat YYYY-MM-DD\n section Preview\n Render SVG :done, render, 2026-06-01, 2d\n Inspect fullscreen :active, inspect, after render, 3d\n section Export\n Download PNG :export, after inspect, 1d";
|
|
8
|
+
readonly invalid: "flowchart TD\n A -->";
|
|
9
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
interface MermaidFullscreenProps {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
canDownload: boolean;
|
|
5
|
+
open: boolean;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
onDownload: () => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const MermaidFullscreen: (props: MermaidFullscreenProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface MermaidRendererProps {
|
|
2
|
+
code: string;
|
|
3
|
+
initialFullscreenOpen?: boolean;
|
|
4
|
+
initialZoom?: number;
|
|
5
|
+
isEditable?: boolean;
|
|
6
|
+
onRequestEdit?: () => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const MermaidRenderer: (props: MermaidRendererProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
interface MermaidSvgViewProps {
|
|
3
|
+
svg: string;
|
|
4
|
+
zoom: number;
|
|
5
|
+
allowPanAtDefaultZoom?: boolean;
|
|
6
|
+
maxHeight?: string;
|
|
7
|
+
minHeight?: string;
|
|
8
|
+
overlayActions?: ReactNode;
|
|
9
|
+
onZoomChange: (zoom: number) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const MermaidSvgView: (props: MermaidSvgViewProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
interface MermaidInlineToolbarProps {
|
|
2
|
+
isEditable: boolean;
|
|
3
|
+
onRequestEdit?: () => void;
|
|
4
|
+
onOpenFullscreen: () => void;
|
|
5
|
+
}
|
|
6
|
+
interface MermaidZoomControlsProps {
|
|
7
|
+
zoom: number;
|
|
8
|
+
onZoomChange: (zoom: number) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const MermaidInlineToolbar: (props: MermaidInlineToolbarProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare const MermaidZoomControls: (props: MermaidZoomControlsProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const MERMAID_MIN_ZOOM = 0.5;
|
|
2
|
+
export declare const MERMAID_MAX_ZOOM = 3;
|
|
3
|
+
export declare const MERMAID_ZOOM_STEP = 0.25;
|
|
4
|
+
export declare const clampMermaidZoom: (value: number) => number;
|
|
5
|
+
export declare const zoomIn: (zoom: number) => number;
|
|
6
|
+
export declare const zoomOut: (zoom: number) => number;
|