@pstdio/ui 0.4.0 → 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 +609 -505
- package/dist/chat-ui.js.map +1 -1
- package/dist/components/chat-ui/components/chat-input-actions.d.ts +10 -0
- 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/menu-item.d.ts +2 -1
- package/dist/components/resource-context-menu.d.ts +20 -0
- package/dist/components/rich-text/prompt-input/plugins/ReferencePlugin/nodes/ReferenceNode/ReferenceNode.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/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/utils/markdown.d.ts +1 -0
- package/dist/components/session-indicator.d.ts +1 -1
- package/dist/components/sidebar-tree/sidebar-tree.types.d.ts +5 -1
- 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 +10 -0
- 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/get-file-type-icon-Bwqf1WXA.js +101 -0
- package/dist/get-file-type-icon-Bwqf1WXA.js.map +1 -0
- package/dist/index.d.ts +4 -2
- package/dist/index.js +1876 -1642
- 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 +414 -255
- package/dist/rich-text.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +3 -1
- package/dist/components/attached-panel.utils.test.d.ts +0 -1
- 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-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.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/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/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/rich-text/shared/transformers/markdown-transformers.test.d.ts +0 -1
- package/dist/components/scroll-area.stories.d.ts +0 -7
- package/dist/components/searchable-menu.stories.d.ts +0 -8
- package/dist/components/session-indicator.stories.d.ts +0 -12
- package/dist/components/sidebar/sidebar.store.test.d.ts +0 -1
- package/dist/components/sidebar/sidebar.stories.d.ts +0 -11
- 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 -23
- 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/components/workspace-badge.stories.d.ts +0 -13
- package/dist/get-file-type-icon-CirIyuE8.js +0 -92
- package/dist/get-file-type-icon-CirIyuE8.js.map +0 -1
- package/dist/rich-message-Bad4GxH2.js +0 -1423
- package/dist/rich-message-Bad4GxH2.js.map +0 -1
|
@@ -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 {};
|
|
@@ -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;
|
|
@@ -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,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 {};
|
|
@@ -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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function CodeHighlightingPlugin(): 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';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Icon } from '@chakra-ui/react';
|
|
2
2
|
import { ComponentProps } from 'react';
|
|
3
|
-
export type SessionCompletionStatus = "in_progress" | "awaiting_input" | "completed" | "failed" | "disconnected";
|
|
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
5
|
export declare const resolveSessionIndicatorColor: (status: SessionCompletionStatus | undefined) => "fg.muted" | "fg.error" | "fg.warning" | "fg.success";
|
|
6
6
|
interface SessionIndicatorProps {
|
|
@@ -12,7 +12,10 @@ export interface SidebarActionMenuItem {
|
|
|
12
12
|
id: string;
|
|
13
13
|
label: string;
|
|
14
14
|
description?: string;
|
|
15
|
-
icon?: ReactNode
|
|
15
|
+
icon?: ReactNode | ComponentType<{
|
|
16
|
+
size?: number | string;
|
|
17
|
+
}>;
|
|
18
|
+
disabled?: boolean;
|
|
16
19
|
onAction?: () => void;
|
|
17
20
|
}
|
|
18
21
|
export interface SidebarAction {
|
|
@@ -40,6 +43,7 @@ export interface SidebarNode {
|
|
|
40
43
|
/** URL for the node. When provided with a linkComponent, the row renders as an anchor for cmd+click support. */
|
|
41
44
|
href?: string;
|
|
42
45
|
navigationIntent?: SidebarNavigationIntent;
|
|
46
|
+
contextMenuItems?: SidebarActionMenuItem[];
|
|
43
47
|
actions?: SidebarAction[];
|
|
44
48
|
children?: SidebarNode[];
|
|
45
49
|
}
|
|
@@ -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 {};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { ComponentProps, ComponentType } from 'react';
|
|
2
|
+
import { ResourceContextAction } from '../resource-context-menu';
|
|
2
3
|
import { TicketCard } from './ticket-card';
|
|
3
4
|
type TicketCardProps = ComponentProps<typeof TicketCard>;
|
|
4
5
|
export interface TicketBoardItem {
|
|
5
6
|
id: string;
|
|
6
7
|
cardProps: Omit<TicketCardProps, "draggable" | "onDragStart" | "onDragEnd" | "isSelected">;
|
|
8
|
+
contextMenuActions?: ResourceContextAction[];
|
|
7
9
|
}
|
|
8
10
|
export interface TicketBoardColumnAction {
|
|
9
11
|
id: string;
|
|
@@ -1,20 +1,30 @@
|
|
|
1
1
|
import { DragEventHandler } from 'react';
|
|
2
2
|
import { WorkspaceBadgeProps } from '../workspace-badge';
|
|
3
|
+
import { WorkspaceTagOption } from './types';
|
|
3
4
|
export interface TicketCardBadge {
|
|
4
5
|
label: string;
|
|
5
6
|
color?: string;
|
|
6
7
|
}
|
|
8
|
+
export interface TicketCardTagBadge {
|
|
9
|
+
tagName: string;
|
|
10
|
+
label: string;
|
|
11
|
+
value: string | null;
|
|
12
|
+
color?: string;
|
|
13
|
+
options: WorkspaceTagOption[];
|
|
14
|
+
}
|
|
7
15
|
interface TicketCardProps {
|
|
8
16
|
ticketId: string;
|
|
9
17
|
parentPath?: string[];
|
|
10
18
|
title: string;
|
|
11
19
|
badges?: TicketCardBadge[];
|
|
20
|
+
tagBadges?: TicketCardTagBadge[];
|
|
12
21
|
workspaceBadge?: WorkspaceBadgeProps;
|
|
13
22
|
isSelected?: boolean;
|
|
14
23
|
draggable?: boolean;
|
|
15
24
|
onDragStart?: DragEventHandler<HTMLDivElement>;
|
|
16
25
|
onDragEnd?: DragEventHandler<HTMLDivElement>;
|
|
17
26
|
onClick?: () => void;
|
|
27
|
+
onTagChange?: (tagName: string, newValue: string) => void;
|
|
18
28
|
}
|
|
19
29
|
export declare const TicketCard: (props: TicketCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
30
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FilterCategory, FilterState, GroupingField, WorkspaceOrdering, WorkspaceTicket } from './types';
|
|
1
|
+
import { FilterCategory, FilterState, GroupingField, WorkspaceOrdering, WorkspaceTagDefinition, WorkspaceTicket } from './types';
|
|
2
2
|
interface GroupingOptions {
|
|
3
3
|
columnGrouping: GroupingField;
|
|
4
4
|
rowGrouping: GroupingField;
|
|
@@ -15,7 +15,7 @@ interface TicketColumnGroup {
|
|
|
15
15
|
tickets: WorkspaceTicket[];
|
|
16
16
|
rows: TicketRowGroup[];
|
|
17
17
|
}
|
|
18
|
-
export declare const orderTickets: (tickets: WorkspaceTicket[], ordering: WorkspaceOrdering) => WorkspaceTicket[];
|
|
18
|
+
export declare const orderTickets: (tickets: WorkspaceTicket[], ordering: WorkspaceOrdering, tagDefinitions?: WorkspaceTagDefinition[]) => WorkspaceTicket[];
|
|
19
19
|
export declare const groupTickets: (tickets: WorkspaceTicket[], options: GroupingOptions) => TicketColumnGroup[];
|
|
20
20
|
export declare const filterTickets: (tickets: WorkspaceTicket[], filters: FilterState) => WorkspaceTicket[];
|
|
21
21
|
export declare const countFilterValues: (tickets: WorkspaceTicket[], category: FilterCategory) => Record<string, number>;
|
|
@@ -1,18 +1,23 @@
|
|
|
1
1
|
import { ComponentType, ReactNode } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { ResourceContextAction } from '../resource-context-menu';
|
|
3
|
+
import { TicketCardBadge, TicketCardTagBadge } from './ticket-card';
|
|
3
4
|
export interface TicketListItem {
|
|
4
5
|
id: string;
|
|
5
6
|
ticketId: string;
|
|
6
7
|
title: string;
|
|
8
|
+
countBadge?: number;
|
|
7
9
|
statusIcon?: ComponentType<{
|
|
8
10
|
size?: number | string;
|
|
9
11
|
}>;
|
|
10
12
|
statusColor?: string;
|
|
11
13
|
badges?: TicketCardBadge[];
|
|
14
|
+
tagBadges?: TicketCardTagBadge[];
|
|
12
15
|
date?: string;
|
|
13
16
|
assigneeIcon?: ReactNode;
|
|
14
17
|
children?: TicketListItem[];
|
|
15
18
|
onClick?: () => void;
|
|
19
|
+
onTagChange?: (tagName: string, newValue: string) => void;
|
|
20
|
+
contextMenuActions?: ResourceContextAction[];
|
|
16
21
|
}
|
|
17
22
|
interface TicketListProps {
|
|
18
23
|
items: TicketListItem[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TicketBoardColumnAction } from './ticket-board';
|
|
2
|
-
import { DisplayProperty, GroupingField, OrderingField, WorkspaceFilterCategory, WorkspaceOption, WorkspaceTicket } from './types';
|
|
2
|
+
import { DisplayProperty, GroupingField, OrderingField, WorkspaceFilterCategory, WorkspaceOption, WorkspaceTagDefinition, WorkspaceTicket } from './types';
|
|
3
3
|
interface BoardColumnConfig {
|
|
4
4
|
color?: string;
|
|
5
5
|
canDragIn?: boolean;
|
|
@@ -10,6 +10,7 @@ interface BoardColumnConfig {
|
|
|
10
10
|
interface TicketsWorkspaceProps<TTicket extends WorkspaceTicket = WorkspaceTicket> {
|
|
11
11
|
tickets: TTicket[];
|
|
12
12
|
storageKey: string;
|
|
13
|
+
tagDefinitions?: WorkspaceTagDefinition[];
|
|
13
14
|
selectedTicketId?: string | null;
|
|
14
15
|
groupingOptions?: WorkspaceOption<GroupingField>[];
|
|
15
16
|
orderingOptions?: WorkspaceOption<OrderingField>[];
|
|
@@ -19,8 +20,13 @@ interface TicketsWorkspaceProps<TTicket extends WorkspaceTicket = WorkspaceTicke
|
|
|
19
20
|
emptyTitle?: string;
|
|
20
21
|
emptyDescription?: string;
|
|
21
22
|
onTicketClick?: (ticket: TTicket) => void;
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
onTagChange?: (ticketId: string, tagName: string, newValue: string) => void;
|
|
24
|
+
onMoveTicket?: (ticketId: string, targetColumnId: string, context?: {
|
|
25
|
+
columnGrouping: GroupingField;
|
|
26
|
+
}) => void;
|
|
27
|
+
onMoveToGroup?: (ticketId: string, targetGroupKey: string, context?: {
|
|
28
|
+
rowGrouping: GroupingField;
|
|
29
|
+
}) => void;
|
|
24
30
|
onCreateTicket?: (columnId: string) => void;
|
|
25
31
|
onColumnAction?: (columnId: string, actionId: string) => Promise<void> | void;
|
|
26
32
|
getBoardColumnConfig?: (groupKey: string) => BoardColumnConfig;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export type ViewMode = "board" | "list";
|
|
2
|
-
export type GroupingField = "status" | "assignee" | "none"
|
|
3
|
-
export type OrderingField = "manual" | "updated" | "title" | "ticketId"
|
|
2
|
+
export type GroupingField = "status" | "assignee" | "none" | `tag:${string}`;
|
|
3
|
+
export type OrderingField = "manual" | "updated" | "title" | "ticketId" | `tag:${string}`;
|
|
4
4
|
export type SortDirection = "asc" | "desc";
|
|
5
|
-
export type DisplayProperty = "id" | "status" | "assignee" | "
|
|
6
|
-
export type FilterCategory = "status" | "assignee" |
|
|
5
|
+
export type DisplayProperty = "id" | "status" | "assignee" | "updated" | `tag:${string}`;
|
|
6
|
+
export type FilterCategory = "status" | "assignee" | `tag:${string}`;
|
|
7
7
|
export interface WorkspaceOrdering {
|
|
8
8
|
field: OrderingField;
|
|
9
9
|
direction: SortDirection;
|
|
@@ -29,6 +29,21 @@ export interface WorkspaceFilterCategory {
|
|
|
29
29
|
label: string;
|
|
30
30
|
options: WorkspaceFilterOption[];
|
|
31
31
|
}
|
|
32
|
+
export interface WorkspaceTagOption {
|
|
33
|
+
value: string;
|
|
34
|
+
label: string;
|
|
35
|
+
color?: string;
|
|
36
|
+
icon?: string | null;
|
|
37
|
+
}
|
|
38
|
+
export interface WorkspaceTagDefinition {
|
|
39
|
+
name: string;
|
|
40
|
+
label: string;
|
|
41
|
+
options: WorkspaceTagOption[];
|
|
42
|
+
}
|
|
43
|
+
export interface WorkspaceTag {
|
|
44
|
+
name: string;
|
|
45
|
+
value: string;
|
|
46
|
+
}
|
|
32
47
|
export interface WorkspaceTicket {
|
|
33
48
|
id: string;
|
|
34
49
|
ticketId: string;
|
|
@@ -36,7 +51,7 @@ export interface WorkspaceTicket {
|
|
|
36
51
|
status?: string | null;
|
|
37
52
|
statusColor?: string;
|
|
38
53
|
assignee?: string | null;
|
|
39
|
-
|
|
54
|
+
tags?: WorkspaceTag[];
|
|
40
55
|
updatedAt?: string | null;
|
|
41
56
|
parentPath?: string[];
|
|
42
57
|
isSubIssue?: boolean;
|
|
@@ -45,3 +60,5 @@ export declare const DEFAULT_WORKSPACE_SETTINGS: WorkspaceSettings;
|
|
|
45
60
|
export declare const DEFAULT_GROUPING_OPTIONS: WorkspaceOption<GroupingField>[];
|
|
46
61
|
export declare const DEFAULT_ORDERING_OPTIONS: WorkspaceOption<OrderingField>[];
|
|
47
62
|
export declare const DEFAULT_DISPLAY_PROPERTY_OPTIONS: WorkspaceOption<DisplayProperty>[];
|
|
63
|
+
export declare const isTagKey: (key: string) => key is `tag:${string}`;
|
|
64
|
+
export declare const toTagName: (key: `tag:${string}`) => string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { TicketCardBadge, TicketCardTagBadge } from './ticket-card';
|
|
2
|
+
import { DisplayProperty, FilterCategory, FilterState, GroupingField, OrderingField, WorkspaceFilterCategory, WorkspaceOption, WorkspaceTagDefinition, WorkspaceTicket } from './types';
|
|
3
|
+
export declare const toTitleCase: (value: string) => string;
|
|
4
|
+
export declare const buildDefaultFilterCategories: (tickets: WorkspaceTicket[], tagDefinitions: WorkspaceTagDefinition[]) => WorkspaceFilterCategory[];
|
|
5
|
+
export declare const toBadges: (ticket: WorkspaceTicket, displayProperties: DisplayProperty[]) => TicketCardBadge[];
|
|
6
|
+
export declare const toTagBadges: (ticket: WorkspaceTicket, displayProperties: DisplayProperty[], tagDefinitions: WorkspaceTagDefinition[]) => TicketCardTagBadge[];
|
|
7
|
+
export declare const buildTagOptions: (tagDefinitions: WorkspaceTagDefinition[]) => {
|
|
8
|
+
grouping: WorkspaceOption<GroupingField>[];
|
|
9
|
+
ordering: WorkspaceOption<OrderingField>[];
|
|
10
|
+
display: WorkspaceOption<DisplayProperty>[];
|
|
11
|
+
};
|
|
12
|
+
export declare const resolveKnownColumnKeys: (columnGrouping: GroupingField, knownColumnKeys: string[] | undefined, categories: WorkspaceFilterCategory[]) => string[] | undefined;
|
|
13
|
+
export declare const omitFilterCategory: (filters: FilterState, category: FilterCategory) => FilterState;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { jsx as m, jsxs as z } from "react/jsx-runtime";
|
|
2
|
+
import { c as $ } from "react/compiler-runtime";
|
|
3
|
+
import { Tooltip as R, Portal as V, ScrollArea as A } from "@chakra-ui/react";
|
|
4
|
+
import * as P from "react";
|
|
5
|
+
import { FileSpreadsheet as q, FileCode as D, FileChartLine as E, FileJson as H, FileText as I, FileCog as L, FileImage as _, FileArchive as k, File as J } from "lucide-react";
|
|
6
|
+
const O = P.forwardRef(function(t, b) {
|
|
7
|
+
const e = $(26);
|
|
8
|
+
let l, r, i, d, n, a, f, u;
|
|
9
|
+
e[0] !== t ? ({
|
|
10
|
+
showArrow: f,
|
|
11
|
+
children: l,
|
|
12
|
+
disabled: d,
|
|
13
|
+
portalled: u,
|
|
14
|
+
content: r,
|
|
15
|
+
contentProps: i,
|
|
16
|
+
portalRef: n,
|
|
17
|
+
...a
|
|
18
|
+
} = t, e[0] = t, e[1] = l, e[2] = r, e[3] = i, e[4] = d, e[5] = n, e[6] = a, e[7] = f, e[8] = u) : (l = e[1], r = e[2], i = e[3], d = e[4], n = e[5], a = e[6], f = e[7], u = e[8]);
|
|
19
|
+
const g = u === void 0 ? !0 : u;
|
|
20
|
+
if (d || B(r))
|
|
21
|
+
return l;
|
|
22
|
+
let s;
|
|
23
|
+
e[9] !== l ? (s = /* @__PURE__ */ m(R.Trigger, { asChild: !0, children: l }), e[9] = l, e[10] = s) : s = e[10];
|
|
24
|
+
const w = !g;
|
|
25
|
+
let o;
|
|
26
|
+
e[11] !== f ? (o = f && /* @__PURE__ */ m(R.Arrow, { children: /* @__PURE__ */ m(R.ArrowTip, {}) }), e[11] = f, e[12] = o) : o = e[12];
|
|
27
|
+
let h;
|
|
28
|
+
e[13] !== r || e[14] !== i || e[15] !== b || e[16] !== o ? (h = /* @__PURE__ */ m(R.Positioner, { children: /* @__PURE__ */ z(R.Content, { ref: b, ...i, children: [
|
|
29
|
+
o,
|
|
30
|
+
r
|
|
31
|
+
] }) }), e[13] = r, e[14] = i, e[15] = b, e[16] = o, e[17] = h) : h = e[17];
|
|
32
|
+
let p;
|
|
33
|
+
e[18] !== n || e[19] !== w || e[20] !== h ? (p = /* @__PURE__ */ m(V, { disabled: w, container: n, children: h }), e[18] = n, e[19] = w, e[20] = h, e[21] = p) : p = e[21];
|
|
34
|
+
let v;
|
|
35
|
+
return e[22] !== a || e[23] !== s || e[24] !== p ? (v = /* @__PURE__ */ z(R.Root, { openDelay: 100, closeDelay: 100, ...a, children: [
|
|
36
|
+
s,
|
|
37
|
+
p
|
|
38
|
+
] }), e[22] = a, e[23] = s, e[24] = p, e[25] = v) : v = e[25], v;
|
|
39
|
+
});
|
|
40
|
+
function W(c) {
|
|
41
|
+
return typeof c == "string" ? c.trim().length === 0 : !1;
|
|
42
|
+
}
|
|
43
|
+
function B(c) {
|
|
44
|
+
if (c == null || c === !1)
|
|
45
|
+
return !0;
|
|
46
|
+
const t = P.Children.toArray(c);
|
|
47
|
+
return t.length === 0 ? !0 : t.every(W);
|
|
48
|
+
}
|
|
49
|
+
const Q = P.forwardRef(function(t, b) {
|
|
50
|
+
const e = $(38);
|
|
51
|
+
let l, r, i, d, n, a, f, u, g, x, s;
|
|
52
|
+
e[0] !== t ? ({
|
|
53
|
+
children: l,
|
|
54
|
+
viewportRef: s,
|
|
55
|
+
contentRef: i,
|
|
56
|
+
viewportProps: x,
|
|
57
|
+
contentProps: r,
|
|
58
|
+
verticalScrollbarProps: g,
|
|
59
|
+
horizontalScrollbarProps: d,
|
|
60
|
+
showVerticalScrollbar: a,
|
|
61
|
+
showHorizontalScrollbar: f,
|
|
62
|
+
showCorner: u,
|
|
63
|
+
...n
|
|
64
|
+
} = t, e[0] = t, e[1] = l, e[2] = r, e[3] = i, e[4] = d, e[5] = n, e[6] = a, e[7] = f, e[8] = u, e[9] = g, e[10] = x, e[11] = s) : (l = e[1], r = e[2], i = e[3], d = e[4], n = e[5], a = e[6], f = e[7], u = e[8], g = e[9], x = e[10], s = e[11]);
|
|
65
|
+
const w = a === void 0 ? !0 : a, o = f === void 0 ? !1 : f, h = u === void 0 ? w && o : u;
|
|
66
|
+
let p;
|
|
67
|
+
e[12] !== r || e[13] !== o ? (p = o ? r : {
|
|
68
|
+
...r,
|
|
69
|
+
style: {
|
|
70
|
+
minWidth: 0,
|
|
71
|
+
...r?.style
|
|
72
|
+
}
|
|
73
|
+
}, e[12] = r, e[13] = o, e[14] = p) : p = e[14];
|
|
74
|
+
const v = p;
|
|
75
|
+
let C;
|
|
76
|
+
e[15] !== l || e[16] !== i || e[17] !== v ? (C = /* @__PURE__ */ m(A.Content, { ...v, ref: i, children: l }), e[15] = l, e[16] = i, e[17] = v, e[18] = C) : C = e[18];
|
|
77
|
+
let S;
|
|
78
|
+
e[19] !== C || e[20] !== x || e[21] !== s ? (S = /* @__PURE__ */ m(A.Viewport, { ...x, ref: s, children: C }), e[19] = C, e[20] = x, e[21] = s, e[22] = S) : S = e[22];
|
|
79
|
+
let y;
|
|
80
|
+
e[23] !== w || e[24] !== g ? (y = w ? /* @__PURE__ */ m(A.Scrollbar, { ...g, borderRadius: "xs" }) : null, e[23] = w, e[24] = g, e[25] = y) : y = e[25];
|
|
81
|
+
let j;
|
|
82
|
+
e[26] !== d || e[27] !== o ? (j = o ? /* @__PURE__ */ m(A.Scrollbar, { orientation: "horizontal", ...d, borderRadius: "xs" }) : null, e[26] = d, e[27] = o, e[28] = j) : j = e[28];
|
|
83
|
+
let F;
|
|
84
|
+
e[29] !== h ? (F = h ? /* @__PURE__ */ m(A.Corner, {}) : null, e[29] = h, e[30] = F) : F = e[30];
|
|
85
|
+
let T;
|
|
86
|
+
return e[31] !== b || e[32] !== n || e[33] !== S || e[34] !== y || e[35] !== j || e[36] !== F ? (T = /* @__PURE__ */ z(A.Root, { ref: b, ...n, children: [
|
|
87
|
+
S,
|
|
88
|
+
y,
|
|
89
|
+
j,
|
|
90
|
+
F
|
|
91
|
+
] }), e[31] = b, e[32] = n, e[33] = S, e[34] = y, e[35] = j, e[36] = F, e[37] = T) : T = e[37], T;
|
|
92
|
+
}), U = (c) => {
|
|
93
|
+
const t = c.split(".").pop()?.toLowerCase() ?? "";
|
|
94
|
+
return ["csv", "tsv", "xlsx", "xls", "parquet"].includes(t) ? q : ["sql", "py", "js", "ts", "jsx", "tsx", "java", "cpp", "c", "h", "css", "scss", "sass", "php", "rb", "go", "rs", "kt", "swift"].includes(t) ? D : ["json", "jsonl", "ndjson"].includes(t) ? c.includes("/visualizations/") ? E : H : ["md", "txt", "rst", "org", "pdf", "doc", "docx", "rtf"].includes(t) ? I : ["yaml", "yml", "toml", "ini", "conf", "config"].includes(t) ? L : ["png", "jpg", "jpeg", "gif", "svg", "webp", "ico"].includes(t) ? _ : ["zip", "tar", "gz", "rar", "7z"].includes(t) ? k : J;
|
|
95
|
+
};
|
|
96
|
+
export {
|
|
97
|
+
Q as S,
|
|
98
|
+
O as T,
|
|
99
|
+
U as g
|
|
100
|
+
};
|
|
101
|
+
//# sourceMappingURL=get-file-type-icon-Bwqf1WXA.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-file-type-icon-Bwqf1WXA.js","sources":["../src/components/tooltip.tsx","../src/components/scroll-area.tsx","../src/utils/get-file-type-icon.ts"],"sourcesContent":["import { Tooltip as ChakraTooltip, Portal } from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nexport interface TooltipProps extends ChakraTooltip.RootProps {\n children?: React.ReactElement;\n showArrow?: boolean;\n portalled?: boolean;\n portalRef?: React.RefObject<HTMLElement>;\n content: React.ReactNode;\n contentProps?: ChakraTooltip.ContentProps;\n disabled?: boolean;\n}\n\nexport const Tooltip = React.forwardRef<HTMLDivElement, TooltipProps>(function Tooltip(props, ref) {\n const { showArrow, children, disabled, portalled = true, content, contentProps, portalRef, ...rest } = props;\n\n const isEmptyContent = (node: React.ReactNode): boolean => {\n if (node === null || node === undefined || node === false) return true;\n const arr = React.Children.toArray(node);\n if (arr.length === 0) return true;\n return arr.every((child) => (typeof child === \"string\" ? child.trim().length === 0 : false));\n };\n\n if (disabled || isEmptyContent(content)) return children;\n\n return (\n <ChakraTooltip.Root openDelay={100} closeDelay={100} {...rest}>\n <ChakraTooltip.Trigger asChild>{children}</ChakraTooltip.Trigger>\n <Portal disabled={!portalled} container={portalRef}>\n <ChakraTooltip.Positioner>\n <ChakraTooltip.Content ref={ref} {...contentProps}>\n {showArrow && (\n <ChakraTooltip.Arrow>\n <ChakraTooltip.ArrowTip />\n </ChakraTooltip.Arrow>\n )}\n {content}\n </ChakraTooltip.Content>\n </ChakraTooltip.Positioner>\n </Portal>\n </ChakraTooltip.Root>\n );\n});\n","import { ScrollArea as ChakraScrollArea } from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\ntype VerticalScrollbarProps = Omit<ChakraScrollArea.ScrollbarProps, \"orientation\">;\ntype HorizontalScrollbarProps = Omit<ChakraScrollArea.ScrollbarProps, \"orientation\">;\n\nexport interface ScrollAreaProps extends ChakraScrollArea.RootProps {\n viewportRef?: React.Ref<HTMLDivElement>;\n contentRef?: React.Ref<HTMLDivElement>;\n viewportProps?: ChakraScrollArea.ViewportProps;\n contentProps?: ChakraScrollArea.ContentProps;\n verticalScrollbarProps?: VerticalScrollbarProps;\n horizontalScrollbarProps?: HorizontalScrollbarProps;\n showVerticalScrollbar?: boolean;\n showHorizontalScrollbar?: boolean;\n showCorner?: boolean;\n}\n\nexport const ScrollArea = React.forwardRef<HTMLDivElement, ScrollAreaProps>(function ScrollArea(props, ref) {\n const {\n children,\n viewportRef,\n contentRef,\n viewportProps,\n contentProps,\n verticalScrollbarProps,\n horizontalScrollbarProps,\n showVerticalScrollbar = true,\n showHorizontalScrollbar = false,\n showCorner = showVerticalScrollbar && showHorizontalScrollbar,\n ...rest\n } = props;\n\n const mergedContentProps = showHorizontalScrollbar\n ? contentProps\n : { ...contentProps, style: { minWidth: 0, ...contentProps?.style } };\n\n return (\n <ChakraScrollArea.Root ref={ref} {...rest}>\n <ChakraScrollArea.Viewport {...viewportProps} ref={viewportRef}>\n <ChakraScrollArea.Content {...mergedContentProps} ref={contentRef}>\n {children}\n </ChakraScrollArea.Content>\n </ChakraScrollArea.Viewport>\n {showVerticalScrollbar ? <ChakraScrollArea.Scrollbar {...verticalScrollbarProps} borderRadius={\"xs\"} /> : null}\n {showHorizontalScrollbar ? (\n <ChakraScrollArea.Scrollbar orientation=\"horizontal\" {...horizontalScrollbarProps} borderRadius={\"xs\"} />\n ) : null}\n {showCorner ? <ChakraScrollArea.Corner /> : null}\n </ChakraScrollArea.Root>\n );\n});\n","import type { LucideIcon } from \"lucide-react\";\nimport {\n File,\n FileArchive,\n FileChartLine,\n FileCode,\n FileCog,\n FileImage,\n FileJson,\n FileSpreadsheet,\n FileText,\n} from \"lucide-react\";\n\nexport const getFileTypeIcon = (filename: string): LucideIcon => {\n const extension = filename.split(\".\").pop()?.toLowerCase() ?? \"\";\n\n if ([\"csv\", \"tsv\", \"xlsx\", \"xls\", \"parquet\"].includes(extension)) return FileSpreadsheet;\n if (\n [\n \"sql\",\n \"py\",\n \"js\",\n \"ts\",\n \"jsx\",\n \"tsx\",\n \"java\",\n \"cpp\",\n \"c\",\n \"h\",\n \"css\",\n \"scss\",\n \"sass\",\n \"php\",\n \"rb\",\n \"go\",\n \"rs\",\n \"kt\",\n \"swift\",\n ].includes(extension)\n ) {\n return FileCode;\n }\n if ([\"json\", \"jsonl\", \"ndjson\"].includes(extension)) {\n if (filename.includes(\"/visualizations/\")) return FileChartLine;\n return FileJson;\n }\n if ([\"md\", \"txt\", \"rst\", \"org\", \"pdf\", \"doc\", \"docx\", \"rtf\"].includes(extension)) return FileText;\n if ([\"yaml\", \"yml\", \"toml\", \"ini\", \"conf\", \"config\"].includes(extension)) return FileCog;\n if ([\"png\", \"jpg\", \"jpeg\", \"gif\", \"svg\", \"webp\", \"ico\"].includes(extension)) return FileImage;\n if ([\"zip\", \"tar\", \"gz\", \"rar\", \"7z\"].includes(extension)) return FileArchive;\n return File;\n};\n"],"names":["Tooltip","React","forwardRef","props","ref","$","_c","children","content","contentProps","disabled","portalRef","rest","showArrow","t0","portalled","undefined","_temp2","t1","ChakraTooltip","t2","t3","jsx","t4","jsxs","t5","Portal","t6","_temp","child","trim","length","node","arr","Children","toArray","every","ScrollArea","contentRef","horizontalScrollbarProps","verticalScrollbarProps","viewportProps","viewportRef","showVerticalScrollbar","showHorizontalScrollbar","showCorner","style","minWidth","mergedContentProps","ChakraScrollArea","t7","t8","t9","getFileTypeIcon","filename","extension","split","pop","toLowerCase","includes","FileSpreadsheet","FileCode","FileChartLine","FileJson","FileText","FileCog","FileImage","FileArchive","File"],"mappings":";;;;;AAaO,MAAMA,IAAUC,EAAMC,WAAyC,SAAAC,GAAAC,GAAA;AAAA,QAAAC,IAAAC,EAAA,EAAA;AAAA,MAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC;AAAA,EAAAT,SAAAF,KACpE;AAAA,IAAAU,WAAAA;AAAAA,IAAAN,UAAAA;AAAAA,IAAAG,UAAAA;AAAAA,IAAAK,WAAAD;AAAAA,IAAAN,SAAAA;AAAAA,IAAAC,cAAAA;AAAAA,IAAAE,WAAAA;AAAAA,IAAA,GAAAC;AAAAA,EAAAA,IAAuGT,GAAME,OAAAF,GAAAE,OAAAE,GAAAF,OAAAG,GAAAH,OAAAI,GAAAJ,OAAAK,GAAAL,OAAAM,GAAAN,OAAAO,GAAAP,OAAAQ,GAAAR,OAAAS,MAAAP,IAAAF,EAAA,CAAA,GAAAG,IAAAH,EAAA,CAAA,GAAAI,IAAAJ,EAAA,CAAA,GAAAK,IAAAL,EAAA,CAAA,GAAAM,IAAAN,EAAA,CAAA,GAAAO,IAAAP,EAAA,CAAA,GAAAQ,IAAAR,EAAA,CAAA,GAAAS,IAAAT,EAAA,CAAA;AAAtE,QAAAU,IAAAD,MAAAE,SAAA,KAAAF;AASvC,MAAIJ,KAPmBO,EAOQT,CAAO;AAAC,WAASD;AAAS,MAAAW;AAAA,EAAA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ACA,MACA,OAAO,EACPD,SAASJ,CAAS,IAEbM,IAEL,CAAC,QAAQ,SAAS,QAAQ,EAAEF,SAASJ,CAAS,IAC5CD,EAASK,SAAS,kBAAkB,IAAUG,IAC3CC,IAEL,CAAC,MAAM,OAAO,OAAO,OAAO,OAAO,OAAO,QAAQ,KAAK,EAAEJ,SAASJ,CAAS,IAAUS,IACrF,CAAC,QAAQ,OAAO,QAAQ,OAAO,QAAQ,QAAQ,EAAEL,SAASJ,CAAS,IAAUU,IAC7E,CAAC,OAAO,OAAO,QAAQ,OAAO,OAAO,QAAQ,KAAK,EAAEN,SAASJ,CAAS,IAAUW,IAChF,CAAC,OAAO,OAAO,MAAM,OAAO,IAAI,EAAEP,SAASJ,CAAS,IAAUY,IAC3DC;AACT;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -28,6 +28,8 @@ export type { OpenSourceNotice, OpenSourceNoticesScreenProps, } from './componen
|
|
|
28
28
|
export { OpenSourceNoticesScreen } from './components/open-source-notices-screen';
|
|
29
29
|
export type { PropertiesProps, PropertyItem } from './components/properties';
|
|
30
30
|
export { Properties } from './components/properties';
|
|
31
|
+
export type { ResourceContextAction } from './components/resource-context-menu';
|
|
32
|
+
export { ResourceContextMenu } from './components/resource-context-menu';
|
|
31
33
|
export { ScrollArea } from './components/scroll-area';
|
|
32
34
|
export type { SearchableMenuItem, SearchableMenuParentList } from './components/searchable-menu';
|
|
33
35
|
export { SearchableMenu } from './components/searchable-menu';
|
|
@@ -45,12 +47,12 @@ export { DisplayMenu } from './components/tickets/display-menu';
|
|
|
45
47
|
export { FilterMenu } from './components/tickets/filter-menu';
|
|
46
48
|
export type { TicketBoardColumn, TicketBoardColumnAction, TicketBoardItem, } from './components/tickets/ticket-board';
|
|
47
49
|
export { TicketBoard } from './components/tickets/ticket-board';
|
|
48
|
-
export type { TicketCardBadge } from './components/tickets/ticket-card';
|
|
50
|
+
export type { TicketCardBadge, TicketCardTagBadge } from './components/tickets/ticket-card';
|
|
49
51
|
export { TicketCard } from './components/tickets/ticket-card';
|
|
50
52
|
export type { TicketListItem } from './components/tickets/ticket-list';
|
|
51
53
|
export { TicketList } from './components/tickets/ticket-list';
|
|
52
54
|
export { TicketsWorkspace } from './components/tickets/tickets-workspace';
|
|
53
|
-
export type { DisplayProperty, FilterCategory, FilterState, GroupingField, OrderingField, SortDirection, ViewMode, WorkspaceFilterCategory, WorkspaceFilterOption, WorkspaceOption, WorkspaceOrdering, WorkspaceSettings, WorkspaceTicket, } from './components/tickets/types';
|
|
55
|
+
export type { DisplayProperty, FilterCategory, FilterState, GroupingField, OrderingField, SortDirection, ViewMode, WorkspaceFilterCategory, WorkspaceFilterOption, WorkspaceOption, WorkspaceOrdering, WorkspaceSettings, WorkspaceTag, WorkspaceTagDefinition, WorkspaceTagOption, WorkspaceTicket, } from './components/tickets/types';
|
|
54
56
|
export { useTicketsWorkspaceStore } from './components/tickets/use-workspace-store';
|
|
55
57
|
export { Toaster, toaster } from './components/toaster';
|
|
56
58
|
export { Tooltip } from './components/tooltip';
|