@pstdio/ui 0.9.0 → 0.11.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/chat-ui.js.map +1 -1
- package/dist/components/chat-ui/components/chat-panel.d.ts +4 -0
- package/dist/components/data-renderer/data-renderer-content.d.ts +22 -0
- package/dist/components/data-renderer/data-renderer-helpers.d.ts +2 -0
- package/dist/components/data-renderer/data-renderer-list.d.ts +11 -1
- package/dist/components/data-renderer/data-renderer-story-fixtures.d.ts +13 -0
- package/dist/components/data-renderer/data-renderer.d.ts +11 -0
- package/dist/components/data-renderer/use-data-renderer-store.d.ts +3 -0
- package/dist/components/diff-viewer/diff-drawer-empty-state.d.ts +1 -0
- package/dist/components/diff-viewer/diff-drawer-height.d.ts +10 -0
- package/dist/components/diff-viewer/diff-drawer-scroll.d.ts +47 -0
- package/dist/components/diff-viewer/diff-drawer.d.ts +2 -7
- package/dist/components/diff-viewer/use-selected-diff-scroll.d.ts +19 -0
- package/dist/components/empty-state.d.ts +4 -0
- package/dist/components/icon-color-picker.d.ts +17 -1
- package/dist/components/list-row/list-row.types.d.ts +10 -0
- package/dist/components/palette.d.ts +1 -0
- package/dist/components/param-editor/index.d.ts +2 -0
- package/dist/components/param-editor/param-editor-read-only-value.d.ts +8 -0
- package/dist/components/resource-context-menu.d.ts +2 -0
- package/dist/components/sidebar/sidebar.types.d.ts +3 -0
- package/dist/components/tag-editor/index.d.ts +4 -0
- package/dist/components/tag-editor/tag-editor-row.d.ts +19 -0
- package/dist/components/tag-editor/tag-editor.d.ts +2 -0
- package/dist/components/{status-option-editor/status-option-editor.types.d.ts → tag-editor/tag-editor.types.d.ts} +14 -9
- package/dist/components/tag-editor/tag-settings-panel.d.ts +28 -0
- package/dist/components/tree-list/tree-list.d.ts +11 -0
- package/dist/components/tree-list/tree-list.types.d.ts +6 -0
- package/dist/index.d.ts +4 -5
- package/dist/index.js +4643 -4184
- package/dist/index.js.map +1 -1
- package/dist/radio-DJtQY9po.js.map +1 -1
- package/dist/theme/recipes/button.d.ts +1 -0
- package/dist/theme/recipes/editable.d.ts +46 -1
- package/dist/{theme-qP4YOZ2R.js → theme-BnpFnY9v.js} +65 -18
- package/dist/theme-BnpFnY9v.js.map +1 -0
- package/dist/theme.js +1 -1
- package/package.json +4 -4
- package/dist/components/layout.d.ts +0 -13
- package/dist/components/panel-sidebar-registration-context.d.ts +0 -12
- package/dist/components/status-option-editor/index.d.ts +0 -2
- package/dist/components/status-option-editor/status-option-editor.d.ts +0 -2
- package/dist/components/status-option-editor/status-option-row.d.ts +0 -16
- package/dist/theme-qP4YOZ2R.js.map +0 -1
- /package/dist/components/{param-editor-color-input.d.ts → param-editor/color-input.d.ts} +0 -0
- /package/dist/components/{param-editor-date-input.d.ts → param-editor/date-input.d.ts} +0 -0
- /package/dist/components/{param-editor-horizontal-text-input.d.ts → param-editor/horizontal-text-input.d.ts} +0 -0
- /package/dist/components/{param-editor-input-group.d.ts → param-editor/input-group.d.ts} +0 -0
- /package/dist/components/{param-editor-number-input.d.ts → param-editor/number-input.d.ts} +0 -0
- /package/dist/components/{param-editor-horizontal.d.ts → param-editor/param-editor-horizontal.d.ts} +0 -0
- /package/dist/components/{param-editor-label.d.ts → param-editor/param-editor-label.d.ts} +0 -0
- /package/dist/components/{param-editor.d.ts → param-editor/param-editor.d.ts} +0 -0
- /package/dist/components/{param-editor.types.d.ts → param-editor/param-editor.types.d.ts} +0 -0
- /package/dist/components/{param-editor-selection-input.d.ts → param-editor/selection-input.d.ts} +0 -0
- /package/dist/components/{param-editor-text-input.d.ts → param-editor/text-input.d.ts} +0 -0
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { ChatInputQuestionPrompt, ChatInputQuestionResponse } from './chat-input-question-prompt';
|
|
3
3
|
import { SessionMessage } from './message-types';
|
|
4
|
+
/** Full conversation shell for agent sessions, including messages, input, attachments, and host-provided slots. */
|
|
4
5
|
interface ChatPanelProps {
|
|
6
|
+
/** Stable conversation identity used to reset ready state when switching sessions. */
|
|
5
7
|
conversationKey?: string;
|
|
6
8
|
messages: SessionMessage[];
|
|
7
9
|
loading?: boolean;
|
|
@@ -15,12 +17,14 @@ interface ChatPanelProps {
|
|
|
15
17
|
onSubmitMessage?: (text: string, attachments: string[], questionResponse?: ChatInputQuestionResponse) => void;
|
|
16
18
|
onInterrupt?: () => void;
|
|
17
19
|
onChatInputChange?: (text: string) => void;
|
|
20
|
+
/** Extra controls rendered near the chat input. */
|
|
18
21
|
actions?: ReactNode;
|
|
19
22
|
repoMenu?: ReactNode;
|
|
20
23
|
attachedResources?: string[];
|
|
21
24
|
onClearAttachments?: () => void;
|
|
22
25
|
attachmentList?: ReactNode;
|
|
23
26
|
approvalPrompt?: ReactNode;
|
|
27
|
+
/** Optional workspace status/control surface rendered above the conversation viewport. */
|
|
24
28
|
workspaceHub?: ReactNode;
|
|
25
29
|
workspaceInitializing?: boolean;
|
|
26
30
|
inputDisabled?: boolean;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { DataRendererBoardColumn } from './data-renderer-board';
|
|
3
|
+
import { DataRendererListItem } from './data-renderer-list';
|
|
4
|
+
import { DataRendererSettings } from './types';
|
|
5
|
+
interface DataRendererContentProps {
|
|
6
|
+
viewMode: DataRendererSettings["viewMode"];
|
|
7
|
+
boardColumns: DataRendererBoardColumn[];
|
|
8
|
+
listItems: DataRendererListItem[];
|
|
9
|
+
listExpandedGroups: Record<string, boolean>;
|
|
10
|
+
selectedRowId: string | null;
|
|
11
|
+
emptyState?: ReactNode;
|
|
12
|
+
emptyTitle: string;
|
|
13
|
+
emptyDescription?: string;
|
|
14
|
+
onBoardMoveItem: (rowId: string, targetColumnId: string) => void;
|
|
15
|
+
onBoardMoveToGroup: (rowId: string, targetGroupKey: string) => void;
|
|
16
|
+
onCreateRow?: (columnId: string) => void;
|
|
17
|
+
onColumnAction?: (columnId: string, actionId: string) => Promise<void> | void;
|
|
18
|
+
onListExpandedGroupChange: (rowId: string, isExpanded: boolean) => void;
|
|
19
|
+
listKey: string;
|
|
20
|
+
}
|
|
21
|
+
export declare const DataRendererContent: (props: DataRendererContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export {};
|
|
@@ -20,7 +20,9 @@ export interface AttributeBadge {
|
|
|
20
20
|
attributeId: string;
|
|
21
21
|
label: string;
|
|
22
22
|
color?: string;
|
|
23
|
+
icon?: string | null;
|
|
23
24
|
}
|
|
25
|
+
export declare const getAttributeBadgeColorPalette: (_badge: AttributeBadge) => string;
|
|
24
26
|
/**
|
|
25
27
|
* Per-type default cell summary used by the card / list end-content. Returns
|
|
26
28
|
* null when the attribute has no displayable value.
|
|
@@ -18,11 +18,21 @@ export interface DataRendererListItem {
|
|
|
18
18
|
draggable?: boolean;
|
|
19
19
|
onDropRow?: (rowId: string) => void;
|
|
20
20
|
}
|
|
21
|
-
|
|
21
|
+
export type DataRendererListExpandedState = Record<string, boolean>;
|
|
22
|
+
export interface DataRendererListProps {
|
|
22
23
|
items: DataRendererListItem[];
|
|
23
24
|
selectedItemId?: string | null;
|
|
25
|
+
expandedGroups?: DataRendererListExpandedState;
|
|
24
26
|
onItemClick?: (item: DataRendererListItem) => void;
|
|
27
|
+
onExpandedGroupChange?: (rowId: string, isExpanded: boolean) => void;
|
|
28
|
+
}
|
|
29
|
+
interface FlattenedDataRendererListItem {
|
|
30
|
+
id: string;
|
|
31
|
+
item: DataRendererListItem;
|
|
32
|
+
depth: number;
|
|
33
|
+
canExpand: boolean;
|
|
25
34
|
}
|
|
26
35
|
export declare const getDataRendererListIndentation: (depth: number) => string | undefined;
|
|
36
|
+
export declare const flattenDataRendererListItems: (items: DataRendererListItem[], expanded: DataRendererListExpandedState, depth?: number) => FlattenedDataRendererListItem[];
|
|
27
37
|
export declare const DataRendererList: (props: DataRendererListProps) => import("react/jsx-runtime").JSX.Element;
|
|
28
38
|
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AttributeDescriptor, DataRendererRow } from './types';
|
|
2
|
+
export declare const attributes: AttributeDescriptor[];
|
|
3
|
+
export interface StoryRow extends DataRendererRow {
|
|
4
|
+
attributes: {
|
|
5
|
+
status: string;
|
|
6
|
+
assignee: string;
|
|
7
|
+
component: string;
|
|
8
|
+
priority?: string;
|
|
9
|
+
updated: string;
|
|
10
|
+
labels?: string[];
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export declare const initialRows: StoryRow[];
|
|
@@ -1,18 +1,26 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
import { ResourceContextAction } from '../resource-context-menu';
|
|
2
3
|
import { DataRendererBoardColumnAction } from './data-renderer-board';
|
|
3
4
|
import { AttributeDescriptor, DataRendererFilterState, DataRendererRow, DataRendererSettings } from './types';
|
|
5
|
+
/** Board-column behavior and menu configuration for a resolved column group. */
|
|
4
6
|
export interface BoardColumnConfig {
|
|
7
|
+
/** Chakra color palette used for the column header and group badges. */
|
|
5
8
|
color?: string;
|
|
6
9
|
canDragIn?: boolean;
|
|
7
10
|
canDragOut?: boolean;
|
|
8
11
|
canCreate?: boolean;
|
|
9
12
|
actions?: DataRendererBoardColumnAction[];
|
|
10
13
|
}
|
|
14
|
+
/** Switchable list/board renderer for rows with typed attributes, filtering, grouping, and ordering. */
|
|
11
15
|
export interface DataRendererProps<TRow extends DataRendererRow = DataRendererRow> {
|
|
16
|
+
/** Stable rows to render. Each row must have an id, title, and attributes map. */
|
|
12
17
|
rows: TRow[];
|
|
18
|
+
/** Persistent key used by the renderer store for view, filter, grouping, ordering, and list expansion settings. */
|
|
13
19
|
storageKey: string;
|
|
20
|
+
/** Attribute descriptors that define display, filtering, grouping, ordering, and board columns. */
|
|
14
21
|
attributes: AttributeDescriptor[];
|
|
15
22
|
selectedRowId?: string | null;
|
|
23
|
+
emptyState?: ReactNode;
|
|
16
24
|
emptyTitle?: string;
|
|
17
25
|
emptyDescription?: string;
|
|
18
26
|
defaultSettings?: Partial<DataRendererSettings>;
|
|
@@ -20,10 +28,13 @@ export interface DataRendererProps<TRow extends DataRendererRow = DataRendererRo
|
|
|
20
28
|
hideToolbar?: boolean;
|
|
21
29
|
toolbarLeading?: ReactNode;
|
|
22
30
|
onRowClick?: (row: TRow) => void;
|
|
31
|
+
/** Called when a row attribute changes through drag/drop, board movement, or inline controls. */
|
|
23
32
|
onAttributeChange?: (rowId: string, attributeId: string, value: unknown) => void;
|
|
33
|
+
/** Called for manual row ordering when a dragged row is dropped before another row. */
|
|
24
34
|
onReorder?: (rowId: string, beforeRowId?: string) => void;
|
|
25
35
|
onCreateRow?: (columnId: string) => void;
|
|
26
36
|
onColumnAction?: (columnId: string, actionId: string) => Promise<void> | void;
|
|
27
37
|
getBoardColumnConfig?: (groupKey: string) => BoardColumnConfig;
|
|
38
|
+
getRowContextMenuActions?: (row: TRow) => ResourceContextAction[];
|
|
28
39
|
}
|
|
29
40
|
export declare const DataRenderer: <TRow extends DataRendererRow>(props: DataRendererProps<TRow>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,10 +2,12 @@ import { DataRendererFilterState, DataRendererSettings } from './types';
|
|
|
2
2
|
interface DataRendererSnapshot {
|
|
3
3
|
settings: DataRendererSettings;
|
|
4
4
|
filters: DataRendererFilterState;
|
|
5
|
+
expandedGroups: Record<string, boolean>;
|
|
5
6
|
}
|
|
6
7
|
interface DataRendererStoreInitialState {
|
|
7
8
|
settings?: Partial<DataRendererSettings>;
|
|
8
9
|
filters?: DataRendererFilterState;
|
|
10
|
+
expandedGroups?: Record<string, boolean>;
|
|
9
11
|
}
|
|
10
12
|
interface DataRendererState extends DataRendererSnapshot {
|
|
11
13
|
setViewMode: (viewMode: DataRendererSettings["viewMode"]) => void;
|
|
@@ -20,6 +22,7 @@ interface DataRendererState extends DataRendererSnapshot {
|
|
|
20
22
|
toggleFilterValue: (attributeId: string, value: string) => void;
|
|
21
23
|
clearFilter: (attributeId: string) => void;
|
|
22
24
|
clearAllFilters: () => void;
|
|
25
|
+
setExpandedGroup: (groupId: string, isExpanded: boolean) => void;
|
|
23
26
|
reset: () => void;
|
|
24
27
|
}
|
|
25
28
|
interface CreateDataRendererStoreOptions {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const DiffDrawerEmptyState: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Diff } from './diff-card';
|
|
2
|
+
import { DiffViewMode } from './types';
|
|
3
|
+
interface EstimateDiffCardHeightInput {
|
|
4
|
+
diff: Diff;
|
|
5
|
+
isCollapsed: boolean;
|
|
6
|
+
hasOptedIntoLargeDiff?: boolean;
|
|
7
|
+
diffViewMode?: DiffViewMode;
|
|
8
|
+
}
|
|
9
|
+
export declare const estimateDiffCardHeight: (input: EstimateDiffCardHeightInput) => number;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Diff } from './diff-card';
|
|
2
|
+
import { DiffViewMode } from './types';
|
|
3
|
+
interface EstimateDiffRangeHeightInput {
|
|
4
|
+
diffs: Diff[];
|
|
5
|
+
collapsedPaths: Set<string>;
|
|
6
|
+
largeDiffOptInPaths: Set<string>;
|
|
7
|
+
diffViewMode: DiffViewMode;
|
|
8
|
+
startIndex: number;
|
|
9
|
+
endIndex: number;
|
|
10
|
+
}
|
|
11
|
+
interface SelectedExpansionCommand {
|
|
12
|
+
action: string;
|
|
13
|
+
id: number;
|
|
14
|
+
path?: string;
|
|
15
|
+
direction?: "up" | "down";
|
|
16
|
+
}
|
|
17
|
+
interface ResolveSelectedScrollStateInput {
|
|
18
|
+
diffs: Diff[];
|
|
19
|
+
selectedDiffPath: string | null;
|
|
20
|
+
collapsedPaths: Set<string>;
|
|
21
|
+
expansionCommand: SelectedExpansionCommand | null;
|
|
22
|
+
completedScrollCommandId: number | null;
|
|
23
|
+
}
|
|
24
|
+
export interface RenderedDiffItem {
|
|
25
|
+
element: HTMLElement;
|
|
26
|
+
index: number;
|
|
27
|
+
}
|
|
28
|
+
export declare const estimateDiffRangeHeight: (input: EstimateDiffRangeHeightInput) => number;
|
|
29
|
+
export declare const resolveSelectedScrollState: (input: ResolveSelectedScrollStateInput) => {
|
|
30
|
+
selectedScrollPath: string | null;
|
|
31
|
+
selectedScrollKey: string | null;
|
|
32
|
+
selectedScrollCommandId: number | null;
|
|
33
|
+
selectedScrollIndex: number;
|
|
34
|
+
shouldPinSelectedScrollIndex: boolean;
|
|
35
|
+
hasCompletedSelectedScroll: boolean;
|
|
36
|
+
};
|
|
37
|
+
export declare const includePinnedDiffIndexes: (input: {
|
|
38
|
+
indexes: number[];
|
|
39
|
+
selectedScrollIndex: number;
|
|
40
|
+
shouldPinSelectedScrollIndex: boolean;
|
|
41
|
+
}) => number[];
|
|
42
|
+
export declare const getRenderedDiffItems: (scrollElement: HTMLElement | null) => RenderedDiffItem[];
|
|
43
|
+
export declare const getElementScrollOffset: (input: {
|
|
44
|
+
element: HTMLElement;
|
|
45
|
+
scrollElement: HTMLElement | null;
|
|
46
|
+
}) => number;
|
|
47
|
+
export {};
|
|
@@ -13,19 +13,14 @@ export interface DiffExpansionCommand {
|
|
|
13
13
|
action: "expand" | "collapse" | "expand-selected";
|
|
14
14
|
id: number;
|
|
15
15
|
path?: string;
|
|
16
|
+
direction?: "up" | "down";
|
|
16
17
|
}
|
|
17
18
|
export interface DiffDrawerExpansionState {
|
|
18
19
|
allExpanded: boolean;
|
|
19
20
|
allCollapsed: boolean;
|
|
20
21
|
}
|
|
22
|
+
export { estimateDiffCardHeight } from './diff-drawer-height';
|
|
21
23
|
export type { Diff };
|
|
22
|
-
interface EstimateDiffCardHeightInput {
|
|
23
|
-
diff: Diff;
|
|
24
|
-
isCollapsed: boolean;
|
|
25
|
-
hasOptedIntoLargeDiff?: boolean;
|
|
26
|
-
diffViewMode?: DiffViewMode;
|
|
27
|
-
}
|
|
28
|
-
export declare const estimateDiffCardHeight: (input: EstimateDiffCardHeightInput) => number;
|
|
29
24
|
export declare const buildInitialCollapsedPaths: (diffs: Diff[]) => Set<string>;
|
|
30
25
|
export declare const buildAllCollapsedPaths: (diffs: Diff[]) => Set<string>;
|
|
31
26
|
export declare const toggleCollapsedPath: (collapsedPaths: Set<string>, path: string) => Set<string>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Diff } from './diff-card';
|
|
2
|
+
import { DiffExpansionCommand } from './diff-drawer';
|
|
3
|
+
import { DiffViewMode } from './types';
|
|
4
|
+
interface UseSelectedDiffScrollInput {
|
|
5
|
+
diffs: Diff[];
|
|
6
|
+
selectedDiffPath: string | null;
|
|
7
|
+
collapsedPaths: Set<string>;
|
|
8
|
+
largeDiffOptInPaths: Set<string>;
|
|
9
|
+
expansionCommand: DiffExpansionCommand | null;
|
|
10
|
+
diffViewMode: DiffViewMode;
|
|
11
|
+
scrollRef: {
|
|
12
|
+
current: HTMLDivElement | null;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
export declare const useSelectedDiffScroll: (input: UseSelectedDiffScrollInput) => {
|
|
16
|
+
selectedScrollIndex: number;
|
|
17
|
+
shouldPinSelectedScrollIndex: boolean;
|
|
18
|
+
};
|
|
19
|
+
export {};
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { EmptyState as ChakraEmptyState } from '@chakra-ui/react';
|
|
2
2
|
import * as React from "react";
|
|
3
|
+
/** Centered empty-state message with optional icon, description, and follow-up actions. */
|
|
3
4
|
export interface EmptyStateProps extends ChakraEmptyState.RootProps {
|
|
5
|
+
/** Primary empty-state message. */
|
|
4
6
|
title: string;
|
|
7
|
+
/** Supporting explanation shown below the title. */
|
|
5
8
|
description?: string;
|
|
9
|
+
/** Decorative or semantic icon shown above the message. */
|
|
6
10
|
icon?: React.ReactNode;
|
|
7
11
|
}
|
|
8
12
|
export declare const EmptyState: React.ForwardRefExoticComponent<EmptyStateProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,9 +1,25 @@
|
|
|
1
1
|
import { ComponentType } from 'react';
|
|
2
|
+
export interface IconColorPickerIconOption {
|
|
3
|
+
value: string | null;
|
|
4
|
+
label: string;
|
|
5
|
+
icon: ComponentType;
|
|
6
|
+
}
|
|
2
7
|
export declare const optionColors: readonly ["gray", "red", "orange", "yellow", "green", "teal", "blue", "cyan", "purple", "pink"];
|
|
3
|
-
export declare const
|
|
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
|
+
} | {
|
|
13
|
+
value: string;
|
|
14
|
+
label: string;
|
|
15
|
+
icon: import('react').ForwardRefExoticComponent<Omit<import('lucide-react').LucideProps, "ref"> & import('react').RefAttributes<SVGSVGElement>>;
|
|
16
|
+
})[];
|
|
17
|
+
export declare const getIconComponent: (name: string | null | undefined, iconOptions?: readonly IconColorPickerIconOption[]) => ComponentType;
|
|
4
18
|
export interface IconColorPickerProps {
|
|
5
19
|
color: string;
|
|
20
|
+
colorOptions?: readonly string[];
|
|
6
21
|
icon?: string | null;
|
|
22
|
+
iconOptions?: readonly IconColorPickerIconOption[];
|
|
7
23
|
onColorChange: (color: string) => void;
|
|
8
24
|
onIconChange?: (icon: string | null) => void;
|
|
9
25
|
disabled?: boolean;
|
|
@@ -4,10 +4,12 @@ export interface ListRowNavigationIntent {
|
|
|
4
4
|
id?: string;
|
|
5
5
|
payload?: unknown;
|
|
6
6
|
}
|
|
7
|
+
/** Context passed to row-level actions so hosts know which section or node triggered the action. */
|
|
7
8
|
export interface ListRowActionContext {
|
|
8
9
|
sectionId?: string;
|
|
9
10
|
nodeId?: string;
|
|
10
11
|
}
|
|
12
|
+
/** Menu item used by row overflow menus and context menus. */
|
|
11
13
|
export interface ListRowActionMenuItem {
|
|
12
14
|
id: string;
|
|
13
15
|
label: string;
|
|
@@ -21,6 +23,7 @@ export interface ListRowActionMenuItem {
|
|
|
21
23
|
endContent?: ReactNode;
|
|
22
24
|
onAction?: () => void;
|
|
23
25
|
}
|
|
26
|
+
/** Inline action rendered on a row, optionally backed by a menu. */
|
|
24
27
|
export interface ListRowAction {
|
|
25
28
|
id: string;
|
|
26
29
|
label: string;
|
|
@@ -35,6 +38,7 @@ export interface ListRowAction {
|
|
|
35
38
|
export type ListRowVariant = "default" | "compact" | "tree";
|
|
36
39
|
export type ListRowTone = "default" | "danger";
|
|
37
40
|
export type ListRowMenuPlacement = "top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "right" | "right-start" | "right-end" | "left" | "left-start" | "left-end";
|
|
41
|
+
/** Data model for one reusable row, including labels, icons, menus, actions, and children. */
|
|
38
42
|
export interface ListRowItem {
|
|
39
43
|
id?: string;
|
|
40
44
|
label: ReactNode;
|
|
@@ -65,13 +69,19 @@ export interface ListRowItem {
|
|
|
65
69
|
children?: ListRowItem[];
|
|
66
70
|
}
|
|
67
71
|
type ListRowRootProps = ComponentPropsWithoutRef<typeof chakra.div>;
|
|
72
|
+
/** Props for the row surface used by lists, trees, menus, and dense navigation UIs. */
|
|
68
73
|
export interface ListRowProps extends ListRowItem, Omit<ListRowRootProps, "as" | "asChild" | "children" | "draggable" | "onClick" | "onDragEnd" | "onDragOver" | "onDragStart" | "onDrop" | "onPointerMove" | keyof ListRowItem> {
|
|
69
74
|
depth?: number;
|
|
75
|
+
/** Applies selected styling without owning selection state. */
|
|
70
76
|
isSelected?: boolean;
|
|
77
|
+
/** Controls child expansion styling and chevron state. */
|
|
71
78
|
isExpanded?: boolean;
|
|
79
|
+
/** Forces the expand affordance when children are lazy-loaded or externally controlled. */
|
|
72
80
|
showExpandToggle?: boolean;
|
|
73
81
|
variant?: ListRowVariant;
|
|
74
82
|
tone?: ListRowTone;
|
|
83
|
+
selectedBg?: ListRowRootProps["bg"];
|
|
84
|
+
hoverBg?: ListRowRootProps["bg"];
|
|
75
85
|
/** Wrap content into a single child element. Used for `<Menu.Item asChild><ListRow asChild>…</ListRow></Menu.Item>` and link components. */
|
|
76
86
|
asChild?: boolean;
|
|
77
87
|
onToggleExpand?: () => void;
|
|
@@ -41,6 +41,7 @@ export interface PaletteProps<T extends PaletteEntry = PaletteEntry> {
|
|
|
41
41
|
footerEnd?: ReactNode;
|
|
42
42
|
filterEntries?: (entries: T[], query: string, mode?: string) => T[];
|
|
43
43
|
onActiveEntryChange?: (entry: T | null, index: number) => void;
|
|
44
|
+
onQueryChange?: (query: string) => void;
|
|
44
45
|
onClose: () => void;
|
|
45
46
|
onEscape?: (ctx: PaletteEscapeContext<T>) => boolean | undefined;
|
|
46
47
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BoxProps } from '@chakra-ui/react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
interface ParamEditorReadOnlyValueProps extends Omit<BoxProps, "children"> {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
preserveWhitespace?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const ParamEditorReadOnlyValue: (props: ParamEditorReadOnlyValueProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -15,6 +15,8 @@ interface ResourceContextMenuProps {
|
|
|
15
15
|
contentMinWidth?: string;
|
|
16
16
|
contentBackground?: string;
|
|
17
17
|
positioning?: MenuRootProps["positioning"];
|
|
18
|
+
/** Keep the menu open after selecting an item — useful for menus that toggle several entries in one pass. */
|
|
19
|
+
closeOnSelect?: MenuRootProps["closeOnSelect"];
|
|
18
20
|
}
|
|
19
21
|
export declare const ResourceContextMenu: (props: ResourceContextMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
22
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
import { ResourceContextAction } from '../resource-context-menu';
|
|
2
3
|
import { TreeListLinkComponent, TreeListNavigateEvent, TreeListSection } from '../tree-list/tree-list.types';
|
|
3
4
|
export interface SidebarProps {
|
|
4
5
|
storageKey: string;
|
|
@@ -6,6 +7,8 @@ export interface SidebarProps {
|
|
|
6
7
|
activeNodeId?: string | string[] | null;
|
|
7
8
|
header?: ReactNode;
|
|
8
9
|
footer?: ReactNode;
|
|
10
|
+
/** Right-click menu for the empty back area of the tree. Passed straight through to the internal TreeList. */
|
|
11
|
+
backgroundContextActions?: ResourceContextAction[];
|
|
9
12
|
/** Initial width when resizable. Set explicitly to override the persisted width. */
|
|
10
13
|
width?: string | number;
|
|
11
14
|
emptyLabel?: string;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { TagEditor } from './tag-editor';
|
|
2
|
+
export type { TagEditorAction, TagEditorProps, TagEditorValue } from './tag-editor.types';
|
|
3
|
+
export type { SaveTagSettingsInput, TagSettingsPanelProps } from './tag-settings-panel';
|
|
4
|
+
export { TagSettingsPanel } from './tag-settings-panel';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { IconColorPickerIconOption } from '../icon-color-picker';
|
|
2
|
+
import { TagEditorAction, TagEditorValue } from './tag-editor.types';
|
|
3
|
+
interface TagEditorRowProps {
|
|
4
|
+
actionOptions?: TagEditorAction[];
|
|
5
|
+
colorOptions?: readonly string[];
|
|
6
|
+
iconOptions?: readonly IconColorPickerIconOption[];
|
|
7
|
+
value: TagEditorValue;
|
|
8
|
+
isSaving?: boolean;
|
|
9
|
+
showDefault?: boolean;
|
|
10
|
+
showIcons?: boolean;
|
|
11
|
+
onActionsChange: (actions: string[]) => void;
|
|
12
|
+
onColorChange: (color: string) => void;
|
|
13
|
+
onDelete: () => void;
|
|
14
|
+
onIconChange: (icon: string | null) => void;
|
|
15
|
+
onNameChange: (name: string) => void;
|
|
16
|
+
onSetDefault: () => void;
|
|
17
|
+
}
|
|
18
|
+
export declare const TagEditorRow: (props: TagEditorRowProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { IconColorPickerIconOption } from '../icon-color-picker';
|
|
2
|
+
export interface TagEditorValue {
|
|
2
3
|
id: string;
|
|
3
4
|
name: string;
|
|
4
5
|
color: string;
|
|
@@ -8,32 +9,36 @@ export interface StatusOptionEditorItem {
|
|
|
8
9
|
isDefault?: boolean;
|
|
9
10
|
isNew?: boolean;
|
|
10
11
|
}
|
|
11
|
-
export interface
|
|
12
|
+
export interface TagEditorAction {
|
|
12
13
|
value: string;
|
|
13
14
|
label: string;
|
|
14
15
|
}
|
|
15
|
-
export interface
|
|
16
|
+
export interface TagEditorProps {
|
|
16
17
|
title: string;
|
|
17
18
|
description?: string;
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
values: TagEditorValue[];
|
|
20
|
+
onValuesChange: (values: TagEditorValue[]) => void;
|
|
20
21
|
onSave: () => void | Promise<void>;
|
|
21
22
|
onCancel: () => void;
|
|
22
|
-
|
|
23
|
-
onSetDefault?: (
|
|
23
|
+
onDeleteValue?: (value: TagEditorValue) => void;
|
|
24
|
+
onSetDefault?: (value: TagEditorValue) => void;
|
|
24
25
|
hasChanges?: boolean;
|
|
25
26
|
isSaving?: boolean;
|
|
26
27
|
addLabel?: string;
|
|
27
28
|
addPlaceholder?: string;
|
|
28
|
-
actionOptions?:
|
|
29
|
+
actionOptions?: TagEditorAction[];
|
|
29
30
|
actionsColumnLabel?: string;
|
|
30
31
|
cancelLabel?: string;
|
|
31
32
|
defaultAddColor?: string;
|
|
33
|
+
defaultAddIcon?: string | null;
|
|
32
34
|
defaultColumnLabel?: string;
|
|
33
35
|
deleteButtonText?: string;
|
|
34
36
|
deleteHeadline?: string;
|
|
35
|
-
deleteNotificationText?: (
|
|
37
|
+
deleteNotificationText?: (value: TagEditorValue) => string;
|
|
38
|
+
colorOptions?: readonly string[];
|
|
39
|
+
iconOptions?: readonly IconColorPickerIconOption[];
|
|
36
40
|
saveLabel?: string;
|
|
37
41
|
showDefault?: boolean;
|
|
38
42
|
showIcons?: boolean;
|
|
43
|
+
valueColumnLabel?: string;
|
|
39
44
|
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { TagEditorProps, TagEditorValue } from './tag-editor.types';
|
|
2
|
+
export interface SaveTagSettingsInput<TValue> {
|
|
3
|
+
deletedIds: Set<string>;
|
|
4
|
+
drafts: TagEditorValue[];
|
|
5
|
+
values: TValue[];
|
|
6
|
+
}
|
|
7
|
+
type EditorLabels = Pick<TagEditorProps, "actionOptions" | "actionsColumnLabel" | "addLabel" | "addPlaceholder" | "colorOptions" | "deleteButtonText" | "deleteHeadline" | "deleteNotificationText" | "description" | "iconOptions" | "showIcons" | "title" | "valueColumnLabel">;
|
|
8
|
+
type SortableValue = {
|
|
9
|
+
id: string;
|
|
10
|
+
sortOrder: number;
|
|
11
|
+
};
|
|
12
|
+
export interface TagSettingsPanelProps<TValue extends SortableValue> extends EditorLabels {
|
|
13
|
+
errorTitle: string;
|
|
14
|
+
loadingText?: string;
|
|
15
|
+
/** Loaded values; pass undefined while the initial load is pending. */
|
|
16
|
+
values: TValue[] | undefined;
|
|
17
|
+
/** Load/save error surfaced by the host's data layer. */
|
|
18
|
+
loadError?: unknown;
|
|
19
|
+
/**
|
|
20
|
+
* Persists the pending edits. The host owns fetching and cache invalidation;
|
|
21
|
+
* the panel resets its delete tracking once the returned promise resolves.
|
|
22
|
+
*/
|
|
23
|
+
onSave: (input: SaveTagSettingsInput<TValue>) => Promise<void>;
|
|
24
|
+
toEditorValue: (value: TValue) => TagEditorValue;
|
|
25
|
+
valueNeedsUpdate: (original: TValue, draft: TagEditorValue) => boolean;
|
|
26
|
+
}
|
|
27
|
+
export declare const TagSettingsPanel: <TValue extends SortableValue>(props: TagSettingsPanelProps<TValue>) => import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export {};
|
|
@@ -1,25 +1,36 @@
|
|
|
1
1
|
import { StackProps } from '@chakra-ui/react';
|
|
2
2
|
import { MouseEvent as ReactMouseEvent, RefObject } from 'react';
|
|
3
|
+
import { ResourceContextAction } from '../resource-context-menu';
|
|
3
4
|
import { TreeListLinkComponent, TreeListNavigateEvent, TreeListSection } from './tree-list.types';
|
|
4
5
|
export { buildVirtualRows } from './tree-list-model';
|
|
5
6
|
type TreeListRowVariant = "compact" | "tree";
|
|
7
|
+
/** Sectioned hierarchical list for files, resources, navigation, and customizable sidebars. */
|
|
6
8
|
interface TreeListProps {
|
|
9
|
+
/** Ordered sections to render, each containing nested tree nodes. */
|
|
7
10
|
sections: TreeListSection[];
|
|
11
|
+
/** Controlled section ids that are currently expanded. */
|
|
8
12
|
expandedSectionIds?: string[];
|
|
13
|
+
/** Controlled node ids that are currently expanded. */
|
|
9
14
|
expandedNodeIds?: string[];
|
|
15
|
+
/** Active node id, or ids, used for selection styling. */
|
|
10
16
|
activeNodeId?: string | string[] | null;
|
|
17
|
+
/** Compact rows suit app navigation; tree rows suit file/resource hierarchies. */
|
|
11
18
|
rowVariant?: TreeListRowVariant;
|
|
12
19
|
sectionGap?: StackProps["gap"];
|
|
13
20
|
nodeGap?: StackProps["gap"];
|
|
21
|
+
/** Link renderer used when nodes provide `href`. */
|
|
14
22
|
linkComponent?: TreeListLinkComponent;
|
|
23
|
+
/** Called when a navigable node is activated. */
|
|
15
24
|
onNavigate?: (event: TreeListNavigateEvent) => void;
|
|
16
25
|
onToggleSection?: (sectionId: string) => void;
|
|
17
26
|
onToggleNode?: (nodeId: string) => void;
|
|
18
27
|
onSectionContextMenu?: (event: ReactMouseEvent<HTMLElement>, sectionId: string) => void;
|
|
28
|
+
/** Render large trees with virtual rows. Disable when using drag ordering. */
|
|
19
29
|
virtualize?: boolean;
|
|
20
30
|
scrollRef?: RefObject<HTMLDivElement | null>;
|
|
21
31
|
draggable?: boolean;
|
|
22
32
|
onReorderSections?: (nextSectionIds: string[]) => void;
|
|
23
33
|
onReorderNodes?: (sectionId: string, nextNodeIds: string[]) => void;
|
|
34
|
+
backgroundContextActions?: ResourceContextAction[];
|
|
24
35
|
}
|
|
25
36
|
export declare const TreeList: (props: TreeListProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -4,11 +4,15 @@ export type TreeListNavigationIntent = ListRowNavigationIntent;
|
|
|
4
4
|
export type TreeListActionContext = ListRowActionContext;
|
|
5
5
|
export type TreeListActionMenuItem = ListRowActionMenuItem;
|
|
6
6
|
export type TreeListAction = ListRowAction;
|
|
7
|
+
/** Tree node data rendered by `TreeList`; extends the row API used by `ListRow`. */
|
|
7
8
|
export type TreeListNode = ListRowItem & {
|
|
8
9
|
id: string;
|
|
9
10
|
children?: TreeListNode[];
|
|
10
11
|
hiddenByDefault?: boolean;
|
|
12
|
+
/** When false, the node cannot be hidden from a tree-customization menu (rendered as a disabled, checked row). */
|
|
13
|
+
canHide?: boolean;
|
|
11
14
|
};
|
|
15
|
+
/** Top-level tree section with optional header, actions, empty state, and child nodes. */
|
|
12
16
|
export interface TreeListSection {
|
|
13
17
|
id: string;
|
|
14
18
|
label?: string;
|
|
@@ -18,12 +22,14 @@ export interface TreeListSection {
|
|
|
18
22
|
nodes: TreeListNode[];
|
|
19
23
|
hiddenByDefault?: boolean;
|
|
20
24
|
}
|
|
25
|
+
/** Navigation payload emitted when a navigable tree node is activated. */
|
|
21
26
|
export interface TreeListNavigateEvent {
|
|
22
27
|
sectionId: string;
|
|
23
28
|
nodeId: string;
|
|
24
29
|
node: TreeListNode;
|
|
25
30
|
intent?: TreeListNavigationIntent;
|
|
26
31
|
}
|
|
32
|
+
/** Props passed to the host-provided tree link component. */
|
|
27
33
|
export interface TreeListLinkProps {
|
|
28
34
|
to: string;
|
|
29
35
|
children: ReactNode;
|
package/dist/index.d.ts
CHANGED
|
@@ -40,13 +40,12 @@ export { ErrorBoundary } from './components/error-boundary';
|
|
|
40
40
|
export type { HeaderProps, HeaderVariant } from './components/header';
|
|
41
41
|
export { Header } from './components/header';
|
|
42
42
|
export { HorizontalMenuStack } from './components/horizontal-menu-stack';
|
|
43
|
-
export type { IconColorPickerProps } from './components/icon-color-picker';
|
|
44
|
-
export { getIconComponent, IconColorPicker, optionColors } from './components/icon-color-picker';
|
|
43
|
+
export type { IconColorPickerIconOption, IconColorPickerProps } from './components/icon-color-picker';
|
|
44
|
+
export { getIconComponent, IconColorPicker, optionColors, optionIcons } from './components/icon-color-picker';
|
|
45
45
|
export type { IntegrationCardProps } from './components/integration-card';
|
|
46
46
|
export { IntegrationCard } from './components/integration-card';
|
|
47
47
|
export type { ItemSectionProps } from './components/item-section';
|
|
48
48
|
export { ItemSection } from './components/item-section';
|
|
49
|
-
export { PanelLayout, PanelSectionLayout } from './components/layout';
|
|
50
49
|
export { ListRow } from './components/list-row/list-row';
|
|
51
50
|
export type { ListRowAction, ListRowActionContext, ListRowActionMenuItem, ListRowItem, ListRowNavigationIntent, } from './components/list-row/list-row.types';
|
|
52
51
|
export type { OpenSourceNotice, OpenSourceNoticesScreenProps, } from './components/open-source-notices-screen';
|
|
@@ -75,13 +74,13 @@ export type { SidebarProps } from './components/sidebar/sidebar.types';
|
|
|
75
74
|
export { SidebarProjectMenu } from './components/sidebar/sidebar-project-menu';
|
|
76
75
|
export type { SimpleCardBodyProps, SimpleCardProps } from './components/simple-card';
|
|
77
76
|
export { SimpleCard, SimpleCardBody } from './components/simple-card';
|
|
78
|
-
export type { StatusOptionEditorItem, StatusOptionEditorProps } from './components/status-option-editor';
|
|
79
|
-
export { StatusOptionEditor } from './components/status-option-editor';
|
|
80
77
|
export type { SwitchProps } from './components/switch';
|
|
81
78
|
export { Switch } from './components/switch';
|
|
82
79
|
export { getTabVisibilityStore, useTabVisibilityStore, } from './components/tab-strip/tab-visibility.store';
|
|
83
80
|
export type { TabVisibilityPlacement } from './components/tab-strip/tab-visibility-filter';
|
|
84
81
|
export { buildTabVisibilityMenuActions, filterVisibleTabs, } from './components/tab-strip/tab-visibility-filter';
|
|
82
|
+
export type { SaveTagSettingsInput, TagEditorAction, TagEditorProps, TagEditorValue, TagSettingsPanelProps, } from './components/tag-editor';
|
|
83
|
+
export { TagEditor, TagSettingsPanel } from './components/tag-editor';
|
|
85
84
|
export { Toaster, toaster } from './components/toaster';
|
|
86
85
|
export { Tooltip } from './components/tooltip';
|
|
87
86
|
export { TreeList } from './components/tree-list/tree-list';
|