@pstdio/ui 0.3.1 → 0.5.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-DwEDwpo2.js +124 -0
- package/dist/MermaidComponent-DwEDwpo2.js.map +1 -0
- package/dist/chat-ui.js +610 -505
- package/dist/chat-ui.js.map +1 -1
- package/dist/components/attached-panel.d.ts +9 -0
- package/dist/components/attached-panel.utils.d.ts +6 -0
- package/dist/components/bubble-button.d.ts +10 -0
- package/dist/components/bubble-panel.d.ts +18 -0
- package/dist/components/chat-ui/components/chat-input-actions.d.ts +10 -0
- package/dist/components/chat-ui/components/chat-panel-sticky-user-message.d.ts +1 -1
- package/dist/components/chat-ui/components/chat-panel.d.ts +1 -0
- package/dist/components/chat-ui/tool-rendering/apply-patch-renderer.d.ts +2 -0
- package/dist/components/chat-ui/tool-rendering/default-renderers.d.ts +8 -7
- package/dist/components/chat-ui/tool-rendering/edit-renderer.d.ts +2 -0
- package/dist/components/chat-ui/tool-rendering/shared.d.ts +52 -0
- package/dist/components/chat-ui/tool-rendering/standard-renderers.d.ts +6 -0
- package/dist/components/chat-ui/tool-rendering/todo-write-renderer.d.ts +2 -0
- package/dist/components/diff-card.d.ts +3 -0
- package/dist/components/diff-drawer.d.ts +1 -0
- package/dist/components/layout.d.ts +1 -2
- package/dist/components/menu-item.d.ts +2 -1
- package/dist/components/panel-header.constants.d.ts +1 -0
- package/dist/components/resource-context-menu.d.ts +20 -0
- package/dist/components/rich-text/markdown-editor/markdown-editor.d.ts +1 -0
- package/dist/components/rich-text/prompt-input/plugins/ReferencePlugin/nodes/ReferenceNode/ReferenceNode.d.ts +2 -1
- package/dist/components/rich-text/shared/components/content-editable.d.ts +2 -1
- package/dist/components/rich-text/shared/plugins/CodePlugin/CodeBlockActionsPlugin.d.ts +4 -0
- package/dist/components/rich-text/shared/plugins/CodePlugin/CodeBlockPlugin.d.ts +2 -0
- package/dist/components/rich-text/shared/plugins/CodePlugin/CodeHighlightingPlugin.d.ts +1 -0
- package/dist/components/rich-text/shared/plugins/FloatingTextFormatToolbarPlugin/resolve-block-type.d.ts +17 -0
- package/dist/components/rich-text/shared/plugins/FloatingTextFormatToolbarPlugin/should-show-floating-toolbar.d.ts +11 -0
- package/dist/components/rich-text/shared/plugins/MermaidPlugin/MermaidComponent.d.ts +6 -0
- package/dist/components/rich-text/shared/plugins/MermaidPlugin/MermaidNode.d.ts +23 -0
- package/dist/components/rich-text/shared/plugins/MermaidPlugin/index.d.ts +1 -0
- package/dist/components/rich-text/shared/transformers/markdown-transformers.d.ts +1 -0
- package/dist/components/rich-text/utils/markdown.d.ts +1 -0
- package/dist/components/searchable-menu.d.ts +35 -2
- package/dist/components/session-indicator.d.ts +2 -2
- package/dist/components/sidebar/sidebar-footer.d.ts +6 -0
- package/dist/components/sidebar/sidebar-header.d.ts +7 -0
- package/dist/components/sidebar/sidebar-project-menu.d.ts +10 -0
- package/dist/components/sidebar/sidebar.d.ts +2 -0
- package/dist/components/sidebar/sidebar.store.d.ts +47 -0
- package/dist/components/{sidebar-next/sidebar-next.types.d.ts → sidebar/sidebar.types.d.ts} +3 -2
- package/dist/components/sidebar-tree/sidebar-node-content.d.ts +9 -0
- package/dist/components/sidebar-tree/sidebar-tree.d.ts +1 -1
- package/dist/components/sidebar-tree/sidebar-tree.types.d.ts +15 -3
- package/dist/components/tickets/tag-badge.d.ts +10 -0
- package/dist/components/tickets/tag-option-icon.d.ts +2 -0
- package/dist/components/tickets/ticket-board.d.ts +2 -0
- package/dist/components/tickets/ticket-card.d.ts +12 -7
- package/dist/components/tickets/ticket-grouping.d.ts +2 -2
- package/dist/components/tickets/ticket-list.d.ts +6 -1
- package/dist/components/tickets/tickets-workspace.d.ts +9 -3
- package/dist/components/tickets/types.d.ts +22 -5
- package/dist/components/tickets/workspace-helpers.d.ts +13 -0
- package/dist/components/workspace-badge.d.ts +22 -0
- package/dist/get-file-type-icon-Bwqf1WXA.js +101 -0
- package/dist/get-file-type-icon-Bwqf1WXA.js.map +1 -0
- package/dist/index.d.ts +22 -21
- package/dist/index.js +2303 -1963
- package/dist/index.js.map +1 -1
- package/dist/rich-message-BVRk9BSD.js +1503 -0
- package/dist/rich-message-BVRk9BSD.js.map +1 -0
- package/dist/rich-text.js +442 -279
- package/dist/rich-text.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/test-utils/local-storage.d.ts +1 -0
- package/dist/theme/global.d.ts +3 -0
- package/dist/theme/primitives/colors.d.ts +116 -0
- package/dist/theme/recipes/button.d.ts +13 -13
- package/dist/theme/recipes/dialog.d.ts +1 -1
- package/dist/theme/recipes/drawer.d.ts +1 -1
- package/dist/theme/recipes/menu.d.ts +1 -1
- package/dist/theme/recipes/popover.d.ts +1 -1
- package/dist/theme/recipes/tooltip.d.ts +1 -1
- package/dist/theme/tokens/colors.d.ts +162 -8
- package/dist/{theme-BFV2Q048.js → theme-D0VvFB1Y.js} +292 -154
- package/dist/theme-D0VvFB1Y.js.map +1 -0
- package/dist/theme.js +1 -1
- package/package.json +4 -2
- package/dist/components/breadcrumb.stories.d.ts +0 -25
- package/dist/components/button.stories.d.ts +0 -18
- package/dist/components/chat-ui/components/ai-conversation.stories.d.ts +0 -6
- package/dist/components/chat-ui/components/ai-conversation.test.d.ts +0 -1
- package/dist/components/chat-ui/components/ai-message.stories.d.ts +0 -6
- package/dist/components/chat-ui/components/ai-response.stories.d.ts +0 -7
- package/dist/components/chat-ui/components/attachment-list.stories.d.ts +0 -6
- package/dist/components/chat-ui/components/chat-input.stories.d.ts +0 -7
- package/dist/components/chat-ui/components/chat-panel-alerts.stories.d.ts +0 -9
- package/dist/components/chat-ui/components/chat-panel.sticky-user-message.test.d.ts +0 -1
- package/dist/components/chat-ui/components/chat-panel.stories.d.ts +0 -10
- package/dist/components/chat-ui/components/message-parts-renderer.stories.d.ts +0 -9
- package/dist/components/chat-ui/components/model-swap-separator.stories.d.ts +0 -6
- package/dist/components/chat-ui/components/tool-invocation-timeline.stories.d.ts +0 -6
- package/dist/components/chat-ui/components/workspace-hub.stories.d.ts +0 -6
- package/dist/components/checkbox.stories.d.ts +0 -15
- package/dist/components/column-file-browser.stories.d.ts +0 -15
- package/dist/components/data-table/data-table.stories.d.ts +0 -33
- package/dist/components/delete-confirmation-modal.stories.d.ts +0 -11
- package/dist/components/diff-bubble.stories.d.ts +0 -13
- package/dist/components/diff-drawer.stories.d.ts +0 -8
- package/dist/components/diff-view-adapter.test.d.ts +0 -1
- package/dist/components/documentation/docs-changelog.d.ts +0 -20
- package/dist/components/documentation/docs-changelog.stories.d.ts +0 -15
- package/dist/components/documentation/docs-outline.d.ts +0 -13
- package/dist/components/documentation/docs-outline.stories.d.ts +0 -16
- package/dist/components/documentation/docs-pagination.d.ts +0 -10
- package/dist/components/documentation/docs-pagination.stories.d.ts +0 -14
- package/dist/components/documentation/docs-sidebar.d.ts +0 -14
- package/dist/components/documentation/docs-sidebar.stories.d.ts +0 -7
- package/dist/components/drawer-inline.stories.d.ts +0 -8
- package/dist/components/empty-state.stories.d.ts +0 -34
- package/dist/components/file-selector.stories.d.ts +0 -17
- package/dist/components/folder-picker-dialog.stories.d.ts +0 -11
- package/dist/components/info-card.stories.d.ts +0 -41
- package/dist/components/item-section.stories.d.ts +0 -17
- package/dist/components/layout.stories.d.ts +0 -11
- package/dist/components/menu-item.stories.d.ts +0 -72
- package/dist/components/open-source-notices-screen.stories.d.ts +0 -12
- package/dist/components/panel-menu.d.ts +0 -9
- package/dist/components/panel-menu.stories.d.ts +0 -8
- package/dist/components/param-editor-horizontal.stories.d.ts +0 -19
- package/dist/components/param-editor.stories.d.ts +0 -24
- package/dist/components/properties.stories.d.ts +0 -17
- package/dist/components/resource-badge.stories.d.ts +0 -7
- package/dist/components/rich-text/collaborative-markdown-editor/collaborative-markdown-editor.stories.d.ts +0 -9
- package/dist/components/rich-text/markdown-editor/markdown-editor.stories.d.ts +0 -7
- package/dist/components/rich-text/prompt-input/prompt-input.stories.d.ts +0 -8
- package/dist/components/rich-text/rich-message/rich-message.stories.d.ts +0 -6
- package/dist/components/rich-text/shared/nodes/DataTableNode.stories.d.ts +0 -7
- package/dist/components/rich-text/shared/plugins/CodePlugin/CodeNode.d.ts +0 -21
- package/dist/components/rich-text/shared/plugins/CodePlugin/CodeNode.test.d.ts +0 -1
- package/dist/components/scroll-area.stories.d.ts +0 -7
- package/dist/components/searchable-menu.stories.d.ts +0 -6
- package/dist/components/searchable-menu.test.d.ts +0 -1
- package/dist/components/session-indicator.stories.d.ts +0 -11
- package/dist/components/sidebar-next/sidebar-next-footer.d.ts +0 -6
- package/dist/components/sidebar-next/sidebar-next-header.d.ts +0 -7
- package/dist/components/sidebar-next/sidebar-next.d.ts +0 -2
- package/dist/components/sidebar-next/sidebar-next.store.d.ts +0 -47
- package/dist/components/sidebar-next/sidebar-next.store.test.d.ts +0 -1
- package/dist/components/sidebar-next/sidebar-next.stories.d.ts +0 -10
- package/dist/components/sidebar-tree/sidebar-tree-searchable-action-menu.stories.d.ts +0 -6
- package/dist/components/sidebar-tree/sidebar-tree.stories.d.ts +0 -13
- package/dist/components/slider.stories.d.ts +0 -15
- package/dist/components/style-guide.stories.d.ts +0 -28
- package/dist/components/switch.stories.d.ts +0 -16
- package/dist/components/tickets/display-menu.stories.d.ts +0 -6
- package/dist/components/tickets/filter-menu.stories.d.ts +0 -6
- package/dist/components/tickets/ticket-board.stories.d.ts +0 -5
- package/dist/components/tickets/ticket-card.stories.d.ts +0 -18
- package/dist/components/tickets/ticket-grouping.test.d.ts +0 -1
- package/dist/components/tickets/ticket-list.stories.d.ts +0 -10
- package/dist/components/tickets/tickets-workspace.stories.d.ts +0 -10
- package/dist/components/tickets/use-workspace-store.test.d.ts +0 -1
- package/dist/components/toaster.stories.d.ts +0 -11
- package/dist/rich-message-ZT2CEiwt.js +0 -1406
- package/dist/rich-message-ZT2CEiwt.js.map +0 -1
- package/dist/theme-BFV2Q048.js.map +0 -1
- package/dist/tooltip-Dze4WXVl.js +0 -86
- package/dist/tooltip-Dze4WXVl.js.map +0 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FlexProps } from '@chakra-ui/react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
interface AttachedPanelProps extends Omit<FlexProps, "children"> {
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
header?: ReactNode;
|
|
6
|
+
resizable?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const AttachedPanel: (props: AttachedPanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { HTMLChakraProps, IconButtonProps } from '@chakra-ui/react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
type BubbleButtonStyleProps = "boxShadow" | "transition" | "_hover" | "_active" | "borderColor" | "borderWidth";
|
|
4
|
+
export interface BubbleButtonProps extends Omit<IconButtonProps, BubbleButtonStyleProps> {
|
|
5
|
+
containerProps?: HTMLChakraProps<"div">;
|
|
6
|
+
isOpen?: boolean;
|
|
7
|
+
tooltip?: ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export declare const BubbleButton: import('react').ForwardRefExoticComponent<BubbleButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { HTMLChakraProps } from '@chakra-ui/react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
export interface BubblePanelProps {
|
|
4
|
+
isOpen?: boolean;
|
|
5
|
+
title?: string;
|
|
6
|
+
menu?: ReactNode;
|
|
7
|
+
onClose?: () => void;
|
|
8
|
+
closeLabel?: string;
|
|
9
|
+
onPopOut?: (() => void) | null;
|
|
10
|
+
popOutLabel?: string;
|
|
11
|
+
width?: string;
|
|
12
|
+
height?: string;
|
|
13
|
+
containerProps?: HTMLChakraProps<"section">;
|
|
14
|
+
testId?: string;
|
|
15
|
+
"aria-label"?: string;
|
|
16
|
+
children?: ReactNode;
|
|
17
|
+
}
|
|
18
|
+
export declare const BubblePanel: import('react').ForwardRefExoticComponent<BubblePanelProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface ChatInputActionState {
|
|
2
|
+
canInterrupt: boolean;
|
|
3
|
+
isDisabled: boolean;
|
|
4
|
+
streaming: boolean;
|
|
5
|
+
text: string;
|
|
6
|
+
}
|
|
7
|
+
export type ChatInputAction = "interrupt" | "none" | "submit";
|
|
8
|
+
export declare const resolveChatInputKeyboardAction: (state: ChatInputActionState) => ChatInputAction;
|
|
9
|
+
export declare const resolveChatInputButtonAction: (state: ChatInputActionState) => ChatInputAction;
|
|
10
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { SessionMessage } from './message-types';
|
|
2
2
|
export declare const STICKY_USER_MESSAGE_COLLAPSE_TEXT_THRESHOLD = 360;
|
|
3
|
-
export declare const STICKY_USER_MESSAGE_COLLAPSED_MAX_HEIGHT = "min(
|
|
3
|
+
export declare const STICKY_USER_MESSAGE_COLLAPSED_MAX_HEIGHT = "min(10vh, 4rem)";
|
|
4
4
|
export declare const isStickyUserMessageCollapsible: (message: SessionMessage) => boolean;
|
|
@@ -10,6 +10,7 @@ interface ChatPanelProps {
|
|
|
10
10
|
chatInputPlaceholder: string;
|
|
11
11
|
chatInputDefaultValue?: string;
|
|
12
12
|
onSubmitMessage?: (text: string, attachments: string[]) => void;
|
|
13
|
+
onInterrupt?: () => void;
|
|
13
14
|
onChatInputChange?: (text: string) => void;
|
|
14
15
|
actions?: ReactNode;
|
|
15
16
|
repoMenu?: ReactNode;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { ToolRenderer } from './types';
|
|
2
1
|
export declare const createDefaultToolRenderers: () => {
|
|
3
|
-
apply_patch: ToolRenderer;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
apply_patch: import('./types').ToolRenderer;
|
|
3
|
+
bash: import('./types').ToolRenderer;
|
|
4
|
+
edit: import('./types').ToolRenderer;
|
|
5
|
+
glob: import('./types').ToolRenderer;
|
|
6
|
+
grep: import('./types').ToolRenderer;
|
|
7
|
+
read: import('./types').ToolRenderer;
|
|
8
|
+
skill: import('./types').ToolRenderer;
|
|
9
|
+
todowrite: import('./types').ToolRenderer;
|
|
9
10
|
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { ToolPart } from '../agent-types';
|
|
2
|
+
import { Block, TitleSegment } from '../components/timeline';
|
|
3
|
+
export type ApplyPatchMetadataFile = {
|
|
4
|
+
filePath: string;
|
|
5
|
+
additions: number;
|
|
6
|
+
deletions: number;
|
|
7
|
+
diff?: string;
|
|
8
|
+
before?: string;
|
|
9
|
+
after?: string;
|
|
10
|
+
};
|
|
11
|
+
export declare const normalizeToolType: (value: string) => string;
|
|
12
|
+
export declare const getToolType: (invocation: ToolPart) => string;
|
|
13
|
+
export declare const getToolLabel: (value: string) => string;
|
|
14
|
+
export declare const getStateLabel: (invocation: ToolPart) => string | null;
|
|
15
|
+
export declare const isErrorState: (invocation: ToolPart) => boolean;
|
|
16
|
+
export declare const buildIndicator: (invocation: ToolPart) => {
|
|
17
|
+
readonly type: "icon";
|
|
18
|
+
readonly icon: "search" | "dot" | "file" | "shell" | "patch" | "ls" | "read_file" | "write_file" | "delete_file" | "upload_files" | "download_file" | "move_file" | "danger" | "browser" | "terminal";
|
|
19
|
+
};
|
|
20
|
+
export declare const buildBaseTitle: (invocation: ToolPart, detail?: string, labelOverride?: string) => TitleSegment[];
|
|
21
|
+
export declare const getInputObject: (invocation: ToolPart) => Record<string, unknown> | null;
|
|
22
|
+
export declare const getOutputObject: (invocation: ToolPart) => Record<string, unknown> | null;
|
|
23
|
+
export declare const getStringValue: (value: unknown) => string | null;
|
|
24
|
+
export declare const getObjectValue: (value: unknown) => Record<string, unknown> | null;
|
|
25
|
+
export declare const getStateObject: (invocation: ToolPart, key: string) => Record<string, unknown> | null;
|
|
26
|
+
export declare const getApplyPatchMetadataFiles: (invocation: ToolPart) => ApplyPatchMetadataFile[];
|
|
27
|
+
export declare const getApplyPatchDiffText: (invocation: ToolPart) => string | null;
|
|
28
|
+
export declare const buildApplyPatchMetadataTitleSegments: (files: ApplyPatchMetadataFile[]) => TitleSegment[];
|
|
29
|
+
export declare const getApplyPatchMetadataReferences: (files: ApplyPatchMetadataFile[]) => string[];
|
|
30
|
+
export declare const getOutputText: (invocation: ToolPart) => string | null;
|
|
31
|
+
export declare const parseSkillContentBlock: (value: string) => {
|
|
32
|
+
skillName: string | undefined;
|
|
33
|
+
content: string;
|
|
34
|
+
} | null;
|
|
35
|
+
export declare const getSkillName: (invocation: ToolPart) => string | undefined;
|
|
36
|
+
export declare const buildFileLinkSegment: (filePath: string) => TitleSegment;
|
|
37
|
+
export declare const prependErrorBlock: (invocation: ToolPart, blocks: Block[]) => Block[];
|
|
38
|
+
export declare const getDiffBlocks: (diffText?: string | null) => {
|
|
39
|
+
type: "diff";
|
|
40
|
+
language: string;
|
|
41
|
+
original: string;
|
|
42
|
+
modified: string;
|
|
43
|
+
sideBySide: false;
|
|
44
|
+
}[];
|
|
45
|
+
export declare const getDiffTitleSegments: (diffText?: string | null) => {
|
|
46
|
+
kind: "diff";
|
|
47
|
+
fileName: string;
|
|
48
|
+
filePath: string;
|
|
49
|
+
additions: number;
|
|
50
|
+
deletions: number;
|
|
51
|
+
}[];
|
|
52
|
+
export declare const getDiffReferences: (diffText?: string | null) => string[];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ToolRenderer } from './types';
|
|
2
|
+
export declare const renderRead: ToolRenderer;
|
|
3
|
+
export declare const renderBash: ToolRenderer;
|
|
4
|
+
export declare const renderGrep: ToolRenderer;
|
|
5
|
+
export declare const renderGlob: ToolRenderer;
|
|
6
|
+
export declare const renderSkill: ToolRenderer;
|
|
@@ -9,6 +9,9 @@ export interface Diff {
|
|
|
9
9
|
}
|
|
10
10
|
interface DiffCardProps {
|
|
11
11
|
diff: Diff;
|
|
12
|
+
isSelected?: boolean;
|
|
13
|
+
isExpanded?: boolean;
|
|
14
|
+
onToggleExpanded?: () => void;
|
|
12
15
|
}
|
|
13
16
|
export declare const DiffCard: (props: DiffCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
17
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IconProps, Badge, MenuItem as ChakraMenuItem, Icon } from '@chakra-ui/react';
|
|
2
2
|
import { ComponentProps, ReactNode } from 'react';
|
|
3
3
|
type ChakraMenuItemProps = ComponentProps<typeof ChakraMenuItem>;
|
|
4
|
-
type MenuItemIcon = ComponentProps<typeof Icon>["as"];
|
|
4
|
+
type MenuItemIcon = ComponentProps<typeof Icon>["as"] | ReactNode;
|
|
5
5
|
type MenuItemIconColor = IconProps["color"];
|
|
6
6
|
type MenuItemTagColor = ComponentProps<typeof Badge>["colorPalette"];
|
|
7
7
|
type MenuItemTagVariant = ComponentProps<typeof Badge>["variant"];
|
|
@@ -15,6 +15,7 @@ export interface MenuItemProps {
|
|
|
15
15
|
isSelected?: boolean;
|
|
16
16
|
primaryLabel: string;
|
|
17
17
|
secondaryLabel?: string;
|
|
18
|
+
shortcutLabel?: ReactNode;
|
|
18
19
|
tooltipLabel?: ReactNode;
|
|
19
20
|
leftIcon?: MenuItemIcon | null;
|
|
20
21
|
rightIcon?: MenuItemIcon | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const PANEL_HEADER_HEIGHT = "2.5625rem";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Menu } from '@chakra-ui/react';
|
|
2
|
+
import { ComponentProps, ReactNode } from 'react';
|
|
3
|
+
import { MenuItem } from './menu-item';
|
|
4
|
+
type MenuRootProps = ComponentProps<typeof Menu.Root>;
|
|
5
|
+
export interface ResourceContextAction {
|
|
6
|
+
key: string;
|
|
7
|
+
label: string;
|
|
8
|
+
onClick: () => void;
|
|
9
|
+
isDisabled?: boolean;
|
|
10
|
+
icon?: ComponentProps<typeof MenuItem>["leftIcon"];
|
|
11
|
+
}
|
|
12
|
+
interface ResourceContextMenuProps {
|
|
13
|
+
actions: ResourceContextAction[];
|
|
14
|
+
children: ReactNode;
|
|
15
|
+
contentMinWidth?: string;
|
|
16
|
+
contentBackground?: string;
|
|
17
|
+
positioning?: MenuRootProps["positioning"];
|
|
18
|
+
}
|
|
19
|
+
export declare const ResourceContextMenu: (props: ResourceContextMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export {};
|
|
@@ -4,6 +4,7 @@ export interface MarkdownEditorProps {
|
|
|
4
4
|
defaultState: string;
|
|
5
5
|
isEditable?: boolean;
|
|
6
6
|
placeholder?: string;
|
|
7
|
+
scrollable?: boolean;
|
|
7
8
|
onChange?: (value: string) => void;
|
|
8
9
|
}
|
|
9
10
|
export declare function MarkdownEditor(props: MarkdownEditorProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DOMExportOutput, EditorConfig, LexicalEditor, LexicalNode, NodeKey, SerializedTextNode, Spread, TextNode } from 'lexical';
|
|
1
|
+
import { DOMConversionMap, DOMExportOutput, EditorConfig, LexicalEditor, LexicalNode, NodeKey, SerializedTextNode, Spread, TextNode } from 'lexical';
|
|
2
2
|
type SerializedReferenceNode = Spread<{
|
|
3
3
|
referenceId: string;
|
|
4
4
|
name: string;
|
|
@@ -16,6 +16,7 @@ export declare class ReferenceNode extends TextNode {
|
|
|
16
16
|
createDOM(config: EditorConfig): HTMLElement;
|
|
17
17
|
updateDOM(prevNode: ReferenceNode, dom: HTMLElement): boolean;
|
|
18
18
|
exportDOM(_editor: LexicalEditor): DOMExportOutput;
|
|
19
|
+
static importDOM(): DOMConversionMap | null;
|
|
19
20
|
static importJSON(serializedNode: SerializedReferenceNode): ReferenceNode;
|
|
20
21
|
exportJSON(): SerializedReferenceNode;
|
|
21
22
|
getTextContent(): string;
|
|
@@ -3,6 +3,7 @@ interface ContentEditableProps {
|
|
|
3
3
|
fullWidth?: boolean;
|
|
4
4
|
padding?: string;
|
|
5
5
|
isRichMessage?: boolean;
|
|
6
|
+
scrollable?: boolean;
|
|
6
7
|
}
|
|
7
|
-
export declare function ContentEditable({ onRef, fullWidth, padding, isRichMessage }: ContentEditableProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare function ContentEditable({ onRef, fullWidth, padding, isRichMessage, scrollable, }: ContentEditableProps): import("react/jsx-runtime").JSX.Element;
|
|
8
9
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function CodeHighlightingPlugin(): null;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { LexicalNode } from 'lexical';
|
|
2
|
+
export declare const blockTypeToBlockName: {
|
|
3
|
+
bullet: string;
|
|
4
|
+
check: string;
|
|
5
|
+
code: string;
|
|
6
|
+
h1: string;
|
|
7
|
+
h2: string;
|
|
8
|
+
h3: string;
|
|
9
|
+
h4: string;
|
|
10
|
+
h5: string;
|
|
11
|
+
h6: string;
|
|
12
|
+
number: string;
|
|
13
|
+
paragraph: string;
|
|
14
|
+
quote: string;
|
|
15
|
+
};
|
|
16
|
+
export type BlockType = keyof typeof blockTypeToBlockName;
|
|
17
|
+
export declare const resolveBlockTypeFromAnchor: (anchorNode: LexicalNode) => "number" | "code" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "bullet" | "check" | "paragraph" | "quote" | null;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
interface ShouldShowFloatingToolbarParams {
|
|
2
|
+
hasSelection: boolean;
|
|
3
|
+
isRangeSelection: boolean;
|
|
4
|
+
isCollapsed: boolean;
|
|
5
|
+
hasNativeSelection: boolean;
|
|
6
|
+
hasNativeRange: boolean;
|
|
7
|
+
isAnchorInsideEditor: boolean;
|
|
8
|
+
isEditorEditable: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare function shouldShowFloatingToolbar(params: ShouldShowFloatingToolbarParams): boolean;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { LexicalNode, NodeKey, SerializedLexicalNode, DecoratorNode } from 'lexical';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
export interface SerializedMermaidNode extends SerializedLexicalNode {
|
|
4
|
+
type: "mermaid";
|
|
5
|
+
code: string;
|
|
6
|
+
version: 1;
|
|
7
|
+
}
|
|
8
|
+
export declare class MermaidNode extends DecoratorNode<ReactNode> {
|
|
9
|
+
__code: string;
|
|
10
|
+
static getType(): string;
|
|
11
|
+
static clone(node: MermaidNode): MermaidNode;
|
|
12
|
+
constructor(code: string, key?: NodeKey);
|
|
13
|
+
createDOM(): HTMLDivElement;
|
|
14
|
+
updateDOM(): boolean;
|
|
15
|
+
static importJSON(serializedNode: SerializedMermaidNode): MermaidNode;
|
|
16
|
+
exportJSON(): SerializedMermaidNode;
|
|
17
|
+
getTextContent(): string;
|
|
18
|
+
getCode(): string;
|
|
19
|
+
setCode(code: string): void;
|
|
20
|
+
decorate(): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
}
|
|
22
|
+
export declare function $createMermaidNode(code?: string): MermaidNode;
|
|
23
|
+
export declare function $isMermaidNode(node: LexicalNode | null | undefined): node is MermaidNode;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { $createMermaidNode, $isMermaidNode, MermaidNode } from './MermaidNode';
|
|
@@ -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 BARE_URL: TextMatchTransformer;
|
|
6
7
|
export declare const TRANSFORMERS_EXTENDED: (Readonly<{
|
|
7
8
|
dependencies: Array<import('lexical').Klass<import('lexical').LexicalNode>>;
|
|
8
9
|
export?: (node: import('lexical').LexicalNode, exportChildren: (node: import('lexical').ElementNode) => string, exportFormat: (node: TextNode, textContent: string) => string) => string | null;
|
|
@@ -1,19 +1,49 @@
|
|
|
1
1
|
import { Menu } from '@chakra-ui/react';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
2
|
+
import { ElementType, ReactNode } from 'react';
|
|
3
3
|
type MenuRootProps = React.ComponentProps<typeof Menu.Root>;
|
|
4
4
|
type MenuContentProps = React.ComponentProps<typeof Menu.Content>;
|
|
5
5
|
export interface SearchableMenuItem {
|
|
6
6
|
id: string;
|
|
7
7
|
label: string;
|
|
8
8
|
searchText?: string;
|
|
9
|
+
secondaryLabel?: string;
|
|
10
|
+
tooltipLabel?: ReactNode;
|
|
11
|
+
icon?: ElementType;
|
|
12
|
+
variant?: "default" | "compact";
|
|
13
|
+
isDisabled?: boolean;
|
|
14
|
+
isSelected?: boolean;
|
|
15
|
+
onSelect?: () => void;
|
|
16
|
+
}
|
|
17
|
+
export interface SearchableMenuParentList<T extends SearchableMenuItem> {
|
|
18
|
+
items: T[];
|
|
19
|
+
selectedLabel: string;
|
|
20
|
+
selectedIcon?: ElementType;
|
|
21
|
+
ariaLabel?: string;
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
emptyState?: ReactNode;
|
|
24
|
+
filterItems?: (items: T[], query: string) => T[];
|
|
25
|
+
searchPlaceholder?: string;
|
|
26
|
+
showSearch?: boolean;
|
|
27
|
+
contentTestId?: string;
|
|
28
|
+
onSelect?: (item: T) => void;
|
|
29
|
+
}
|
|
30
|
+
interface ListConfig<T extends SearchableMenuItem> {
|
|
31
|
+
items: T[];
|
|
32
|
+
filterItems: (items: T[], query: string) => T[];
|
|
33
|
+
showSearch: boolean;
|
|
34
|
+
searchPlaceholder: string;
|
|
35
|
+
emptyState: ReactNode;
|
|
36
|
+
contentTestId?: string;
|
|
37
|
+
closeOnSelect: boolean;
|
|
38
|
+
listId: string;
|
|
9
39
|
}
|
|
10
40
|
interface SearchableMenuProps<T extends SearchableMenuItem> {
|
|
11
41
|
trigger: ReactNode;
|
|
12
42
|
items: T[];
|
|
13
43
|
searchPlaceholder: string;
|
|
14
44
|
emptyState: ReactNode;
|
|
15
|
-
renderItem: (item: T) => ReactNode;
|
|
16
45
|
filterItems?: (items: T[], query: string) => T[];
|
|
46
|
+
listId?: string;
|
|
17
47
|
header?: ReactNode;
|
|
18
48
|
width?: MenuContentProps["width"];
|
|
19
49
|
maxListHeight?: string;
|
|
@@ -26,7 +56,10 @@ interface SearchableMenuProps<T extends SearchableMenuItem> {
|
|
|
26
56
|
onFocusOutside?: MenuRootProps["onFocusOutside"];
|
|
27
57
|
contentTestId?: string;
|
|
28
58
|
portalled?: boolean;
|
|
59
|
+
parentList?: SearchableMenuParentList<T>;
|
|
29
60
|
}
|
|
30
61
|
export declare const filterSearchableMenuItems: <T extends SearchableMenuItem>(items: T[], query: string) => T[];
|
|
62
|
+
export declare const shouldResetSearchableMenuQuery: (currentListId?: string, nextListId?: string) => boolean;
|
|
63
|
+
export declare const resolveActiveListConfig: <T extends SearchableMenuItem>(isShowingParent: boolean, parentList: SearchableMenuParentList<T> | undefined, childConfig: ListConfig<T>) => ListConfig<T>;
|
|
31
64
|
export declare const SearchableMenu: <T extends SearchableMenuItem>(props: SearchableMenuProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
32
65
|
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Icon } from '@chakra-ui/react';
|
|
2
2
|
import { ComponentProps } from 'react';
|
|
3
|
-
export type SessionCompletionStatus = "in_progress" | "awaiting_input" | "completed" | "failed";
|
|
3
|
+
export type SessionCompletionStatus = "in_progress" | "awaiting_input" | "completed" | "failed" | "cancelled" | "disconnected";
|
|
4
4
|
export declare const resolveSessionIndicatorIcon: (status: SessionCompletionStatus | undefined) => import('react').ForwardRefExoticComponent<Omit<import('lucide-react').LucideProps, "ref"> & import('react').RefAttributes<SVGSVGElement>>;
|
|
5
|
-
export declare const resolveSessionIndicatorColor: (status: SessionCompletionStatus | undefined) => "fg.muted" | "fg.error" | "fg.success";
|
|
5
|
+
export declare const resolveSessionIndicatorColor: (status: SessionCompletionStatus | undefined) => "fg.muted" | "fg.error" | "fg.warning" | "fg.success";
|
|
6
6
|
interface SessionIndicatorProps {
|
|
7
7
|
status?: SessionCompletionStatus;
|
|
8
8
|
boxSize?: ComponentProps<typeof Icon>["boxSize"];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface SidebarProjectMenuProps {
|
|
2
|
+
name: string;
|
|
3
|
+
projectsLabel: string;
|
|
4
|
+
themeModeLabel: string;
|
|
5
|
+
isDarkMode: boolean;
|
|
6
|
+
onSelectProjects: () => void;
|
|
7
|
+
onToggleThemePreference: () => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const SidebarProjectMenu: (props: SidebarProjectMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
interface SidebarSnapshot {
|
|
2
|
+
open: boolean;
|
|
3
|
+
expandedSections: string[];
|
|
4
|
+
expandedNodes: string[];
|
|
5
|
+
}
|
|
6
|
+
interface SidebarState extends SidebarSnapshot {
|
|
7
|
+
openSidebar: () => void;
|
|
8
|
+
closeSidebar: () => void;
|
|
9
|
+
toggleSidebar: () => void;
|
|
10
|
+
toggleSection: (sectionId: string) => void;
|
|
11
|
+
toggleNode: (nodeId: string) => void;
|
|
12
|
+
setSectionExpanded: (sectionId: string, expanded: boolean) => void;
|
|
13
|
+
setNodeExpanded: (nodeId: string, expanded: boolean) => void;
|
|
14
|
+
reset: () => void;
|
|
15
|
+
}
|
|
16
|
+
interface CreateSidebarStoreOptions {
|
|
17
|
+
storageKey: string;
|
|
18
|
+
initialState?: Partial<SidebarSnapshot>;
|
|
19
|
+
}
|
|
20
|
+
export declare const createSidebarStore: (options: CreateSidebarStoreOptions) => Omit<import('zustand').StoreApi<SidebarState>, "setState" | "persist"> & {
|
|
21
|
+
setState(partial: SidebarState | Partial<SidebarState> | ((state: SidebarState) => SidebarState | Partial<SidebarState>), replace?: false | undefined): unknown;
|
|
22
|
+
setState(state: SidebarState | ((state: SidebarState) => SidebarState), replace: true): unknown;
|
|
23
|
+
persist: {
|
|
24
|
+
setOptions: (options: Partial<import('zustand/middleware').PersistOptions<SidebarState, unknown, unknown>>) => void;
|
|
25
|
+
clearStorage: () => void;
|
|
26
|
+
rehydrate: () => Promise<void> | void;
|
|
27
|
+
hasHydrated: () => boolean;
|
|
28
|
+
onHydrate: (fn: (state: SidebarState) => void) => () => void;
|
|
29
|
+
onFinishHydration: (fn: (state: SidebarState) => void) => () => void;
|
|
30
|
+
getOptions: () => Partial<import('zustand/middleware').PersistOptions<SidebarState, unknown, unknown>>;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
export declare const getSidebarStore: (storageKey: string, initialState?: Partial<SidebarSnapshot>) => Omit<import('zustand').StoreApi<SidebarState>, "setState" | "persist"> & {
|
|
34
|
+
setState(partial: SidebarState | Partial<SidebarState> | ((state: SidebarState) => SidebarState | Partial<SidebarState>), replace?: false | undefined): unknown;
|
|
35
|
+
setState(state: SidebarState | ((state: SidebarState) => SidebarState), replace: true): unknown;
|
|
36
|
+
persist: {
|
|
37
|
+
setOptions: (options: Partial<import('zustand/middleware').PersistOptions<SidebarState, unknown, unknown>>) => void;
|
|
38
|
+
clearStorage: () => void;
|
|
39
|
+
rehydrate: () => Promise<void> | void;
|
|
40
|
+
hasHydrated: () => boolean;
|
|
41
|
+
onHydrate: (fn: (state: SidebarState) => void) => () => void;
|
|
42
|
+
onFinishHydration: (fn: (state: SidebarState) => void) => () => void;
|
|
43
|
+
getOptions: () => Partial<import('zustand/middleware').PersistOptions<SidebarState, unknown, unknown>>;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
export declare const useSidebarStore: <T>(storageKey: string, selector: (state: SidebarState) => T, initialState?: Partial<SidebarSnapshot>) => T;
|
|
47
|
+
export {};
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { SidebarLinkComponent, SidebarNavigateEvent, SidebarSection } from '../sidebar-tree/sidebar-tree.types';
|
|
3
|
-
export interface
|
|
3
|
+
export interface SidebarProps {
|
|
4
4
|
storageKey: string;
|
|
5
5
|
sections: SidebarSection[];
|
|
6
|
-
activeNodeId?: string | null;
|
|
6
|
+
activeNodeId?: string | string[] | null;
|
|
7
7
|
header?: ReactNode;
|
|
8
8
|
footer?: ReactNode;
|
|
9
9
|
width?: string | number;
|
|
10
10
|
emptyLabel?: string;
|
|
11
|
+
defaultExpandedSections?: string[];
|
|
11
12
|
linkComponent?: SidebarLinkComponent;
|
|
12
13
|
onNavigate?: (event: SidebarNavigateEvent) => void;
|
|
13
14
|
closable?: boolean;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SidebarNode } from './sidebar-tree.types';
|
|
2
|
+
interface SidebarNodeContentProps {
|
|
3
|
+
node: SidebarNode;
|
|
4
|
+
expanded: boolean;
|
|
5
|
+
hasChildren: boolean;
|
|
6
|
+
isDisabled: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const SidebarNodeContent: (props: SidebarNodeContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -3,7 +3,7 @@ interface SidebarTreeProps {
|
|
|
3
3
|
sections: SidebarSection[];
|
|
4
4
|
expandedSections: string[];
|
|
5
5
|
expandedNodes: string[];
|
|
6
|
-
activeNodeId?: string | null;
|
|
6
|
+
activeNodeId?: string | string[] | null;
|
|
7
7
|
linkComponent?: SidebarLinkComponent;
|
|
8
8
|
onNavigate?: (event: SidebarNavigateEvent) => void;
|
|
9
9
|
onToggleSection: (sectionId: string) => void;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IconProps } from '@chakra-ui/react';
|
|
1
2
|
import { ComponentType, ReactNode } from 'react';
|
|
2
3
|
export interface SidebarNavigationIntent {
|
|
3
4
|
id?: string;
|
|
@@ -11,7 +12,10 @@ export interface SidebarActionMenuItem {
|
|
|
11
12
|
id: string;
|
|
12
13
|
label: string;
|
|
13
14
|
description?: string;
|
|
14
|
-
icon?: ReactNode
|
|
15
|
+
icon?: ReactNode | ComponentType<{
|
|
16
|
+
size?: number | string;
|
|
17
|
+
}>;
|
|
18
|
+
disabled?: boolean;
|
|
15
19
|
onAction?: () => void;
|
|
16
20
|
}
|
|
17
21
|
export interface SidebarAction {
|
|
@@ -25,20 +29,28 @@ export interface SidebarAction {
|
|
|
25
29
|
}
|
|
26
30
|
export interface SidebarNode {
|
|
27
31
|
id: string;
|
|
28
|
-
label:
|
|
29
|
-
description?:
|
|
32
|
+
label: ReactNode;
|
|
33
|
+
description?: ReactNode;
|
|
30
34
|
icon?: ReactNode;
|
|
35
|
+
iconColor?: IconProps["color"];
|
|
36
|
+
indicator?: {
|
|
37
|
+
icon: ReactNode;
|
|
38
|
+
color?: IconProps["color"];
|
|
39
|
+
tooltip?: string | null;
|
|
40
|
+
};
|
|
31
41
|
disabled?: boolean;
|
|
32
42
|
isNavigable?: boolean;
|
|
33
43
|
/** URL for the node. When provided with a linkComponent, the row renders as an anchor for cmd+click support. */
|
|
34
44
|
href?: string;
|
|
35
45
|
navigationIntent?: SidebarNavigationIntent;
|
|
46
|
+
contextMenuItems?: SidebarActionMenuItem[];
|
|
36
47
|
actions?: SidebarAction[];
|
|
37
48
|
children?: SidebarNode[];
|
|
38
49
|
}
|
|
39
50
|
export interface SidebarSection {
|
|
40
51
|
id: string;
|
|
41
52
|
label?: string;
|
|
53
|
+
collapsible?: boolean;
|
|
42
54
|
actions?: SidebarAction[];
|
|
43
55
|
emptyState?: ReactNode;
|
|
44
56
|
nodes: SidebarNode[];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { WorkspaceTagOption } from './types';
|
|
2
|
+
interface TagBadgeProps {
|
|
3
|
+
value: string | null;
|
|
4
|
+
label?: string;
|
|
5
|
+
color?: string;
|
|
6
|
+
options: WorkspaceTagOption[];
|
|
7
|
+
onValueChange?: (newValue: string) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const TagBadge: (props: TagBadgeProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|