@pstdio/ui 0.24.1 → 0.25.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.
Files changed (65) hide show
  1. package/dist/{MermaidComponent-BTgLnpLA.js → MermaidComponent-BVdDqDRU.js} +2 -2
  2. package/dist/{MermaidComponent-BTgLnpLA.js.map → MermaidComponent-BVdDqDRU.js.map} +1 -1
  3. package/dist/chat-ui.js +1326 -1414
  4. package/dist/chat-ui.js.map +1 -1
  5. package/dist/components/activity/activity-comment.d.ts +10 -2
  6. package/dist/components/activity/index.d.ts +3 -1
  7. package/dist/components/activity/resource-activity-feed.d.ts +58 -0
  8. package/dist/components/chat-ui/components/chat-input.d.ts +1 -1
  9. package/dist/components/chat-ui/components/chat-panel.d.ts +1 -1
  10. package/dist/components/chat-ui/tool-rendering/build-timeline.d.ts +1 -1
  11. package/dist/components/chat-ui/tool-rendering/shared.d.ts +1 -1
  12. package/dist/components/tab-strip/window-tabs.d.ts +1 -0
  13. package/dist/data-table.js +5 -5
  14. package/dist/diff.js +2 -2
  15. package/dist/{edit-mode-data-table-BrydKuMM.js → edit-mode-data-table-B8UpWb7i.js} +4 -4
  16. package/dist/{edit-mode-data-table-BrydKuMM.js.map → edit-mode-data-table-B8UpWb7i.js.map} +1 -1
  17. package/dist/index.d.ts +2 -2
  18. package/dist/index.js +2047 -1735
  19. package/dist/index.js.map +1 -1
  20. package/dist/{kanban-renderer-toolbar-ebqlG13w.js → kanban-renderer-toolbar-DzY6THJY.js} +3 -3
  21. package/dist/{kanban-renderer-toolbar-ebqlG13w.js.map → kanban-renderer-toolbar-DzY6THJY.js.map} +1 -1
  22. package/dist/kanban-renderer.js +5 -5
  23. package/dist/{lazy-markdown-editor-Obb0M8xc.js → lazy-markdown-editor-ClZPZuaU.js} +2 -2
  24. package/dist/{lazy-markdown-editor-Obb0M8xc.js.map → lazy-markdown-editor-ClZPZuaU.js.map} +1 -1
  25. package/dist/{list-row-CRi3Luog.js → list-row-BDoV_iMV.js} +3 -3
  26. package/dist/list-row-BDoV_iMV.js.map +1 -0
  27. package/dist/{markdown-editor-Bj_QX4oN.js → markdown-editor-CAVqJ9yR.js} +2 -2
  28. package/dist/{markdown-editor-Bj_QX4oN.js.map → markdown-editor-CAVqJ9yR.js.map} +1 -1
  29. package/dist/{markdown-kuU19Oh3.js → markdown-gNucAjnF.js} +9 -9
  30. package/dist/{markdown-kuU19Oh3.js.map → markdown-gNucAjnF.js.map} +1 -1
  31. package/dist/{param-editor-DhoxgwGd.js → param-editor-CTx3mDxQ.js} +2 -2
  32. package/dist/{param-editor-DhoxgwGd.js.map → param-editor-CTx3mDxQ.js.map} +1 -1
  33. package/dist/{param-editor-field-DurcyLuw.js → param-editor-field-DteDEyeU.js} +3 -3
  34. package/dist/{param-editor-field-DurcyLuw.js.map → param-editor-field-DteDEyeU.js.map} +1 -1
  35. package/dist/prompt-input-DNpRL5tI.js +564 -0
  36. package/dist/prompt-input-DNpRL5tI.js.map +1 -0
  37. package/dist/rich-message-CuPiKxKX.js +78 -0
  38. package/dist/rich-message-CuPiKxKX.js.map +1 -0
  39. package/dist/rich-text.js +24 -23
  40. package/dist/rich-text.js.map +1 -1
  41. package/dist/theme/primitives/colors.d.ts +0 -23
  42. package/dist/theme/recipes/activity-comment.d.ts +36 -0
  43. package/dist/theme/recipes/alert.d.ts +1 -1
  44. package/dist/theme/recipes/dialog.d.ts +1 -1
  45. package/dist/theme/recipes/drawer.d.ts +1 -1
  46. package/dist/theme/recipes/menu.d.ts +1 -1
  47. package/dist/theme/recipes/popover.d.ts +1 -1
  48. package/dist/theme/recipes/progress-circle.d.ts +3 -3
  49. package/dist/theme/recipes/switch.d.ts +1 -1
  50. package/dist/theme/recipes/timeline.d.ts +1 -1
  51. package/dist/theme/recipes/tooltip.d.ts +1 -1
  52. package/dist/theme/recipes/window-title-bar.d.ts +4 -1
  53. package/dist/{theme-Ca-KyNoi.js → theme-Dc7hVvMC.js} +120 -801
  54. package/dist/theme-Dc7hVvMC.js.map +1 -0
  55. package/dist/theme.js +1 -1
  56. package/dist/{tree-list-DXwHWodb.js → tree-list-CZvcg3_6.js} +2 -2
  57. package/dist/{tree-list-DXwHWodb.js.map → tree-list-CZvcg3_6.js.map} +1 -1
  58. package/package.json +2 -2
  59. package/dist/list-row-CRi3Luog.js.map +0 -1
  60. package/dist/rich-message-dNYvLDd4.js +0 -628
  61. package/dist/rich-message-dNYvLDd4.js.map +0 -1
  62. package/dist/theme/recipes/landing-story.d.ts +0 -10
  63. package/dist/theme/recipes/landing-tool-demo.d.ts +0 -1
  64. package/dist/theme/recipes/landing.d.ts +0 -23
  65. package/dist/theme-Ca-KyNoi.js.map +0 -1
@@ -1,8 +1,15 @@
1
- import { HTMLChakraProps } from '@chakra-ui/react';
1
+ import { HTMLChakraProps, RecipeVariantProps } from '@chakra-ui/react';
2
2
  import { ReactNode } from 'react';
3
+ import { activityCommentSlotRecipe as recipe } from '../../theme/recipes/activity-comment';
3
4
  import { ActivityActor } from './activity.types';
4
- export interface ActivityCommentProps extends Omit<HTMLChakraProps<"article">, "title"> {
5
+ type ActivityCommentVariantProps = RecipeVariantProps<typeof recipe>;
6
+ interface ActivityCommentRootProps extends HTMLChakraProps<"article">, ActivityCommentVariantProps {
7
+ }
8
+ export interface ActivityCommentProps extends Omit<ActivityCommentRootProps, "title"> {
5
9
  actor: ActivityActor;
10
+ icon?: ReactNode;
11
+ iconColor?: string;
12
+ iconBackground?: string;
6
13
  timestamp?: ReactNode;
7
14
  actions?: ReactNode;
8
15
  replies?: ReactNode;
@@ -17,3 +24,4 @@ export interface ActivityReplyProps extends Omit<HTMLChakraProps<"div">, "title"
17
24
  }
18
25
  export declare const ActivityReply: (props: ActivityReplyProps) => import("react/jsx-runtime").JSX.Element;
19
26
  export declare const ActivityComment: (props: ActivityCommentProps) => import("react/jsx-runtime").JSX.Element;
27
+ export {};
@@ -4,6 +4,7 @@ import { ActivityComposer } from './activity-composer';
4
4
  import { ActivityEvent } from './activity-event';
5
5
  import { ActivityFeed, ActivityHeader, ActivityRoot } from './activity-root';
6
6
  import { ActivityTimeline } from './activity-timeline';
7
+ import { ResourceActivityFeed } from './resource-activity-feed';
7
8
  export type { ActivityActor } from './activity.types';
8
9
  export type { ActivityAvatarProps } from './activity-avatar';
9
10
  export type { ActivityCommentProps, ActivityReplyProps } from './activity-comment';
@@ -11,7 +12,8 @@ export type { ActivityComposerProps } from './activity-composer';
11
12
  export type { ActivityEventProps } from './activity-event';
12
13
  export type { ActivityFeedProps, ActivityHeaderProps, ActivityRootProps } from './activity-root';
13
14
  export type { ActivityTimelineProps } from './activity-timeline';
14
- export { ActivityAvatar, ActivityComment, ActivityComposer, ActivityEvent, ActivityFeed, ActivityHeader, ActivityReply, ActivityRoot, ActivityTimeline, };
15
+ export type { ResourceActivityFeedAction, ResourceActivityFeedAttention, ResourceActivityFeedEventItem, ResourceActivityFeedItem, ResourceActivityFeedMessageItem, ResourceActivityFeedProps, ResourceActivityFeedSize, ResourceActivityIconName, ResourceActivityRelatedResource, } from './resource-activity-feed';
16
+ export { ActivityAvatar, ActivityComment, ActivityComposer, ActivityEvent, ActivityFeed, ActivityHeader, ActivityReply, ActivityRoot, ActivityTimeline, ResourceActivityFeed, };
15
17
  export declare const Activity: {
16
18
  Root: (props: import('./activity-root').ActivityRootProps) => import("react/jsx-runtime").JSX.Element;
17
19
  Header: (props: import('./activity-root').ActivityHeaderProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,58 @@
1
+ import { StackProps } from '@chakra-ui/react';
2
+ import { ReactNode } from 'react';
3
+ import { ActivityActor } from './activity.types';
4
+ export type ResourceActivityFeedSize = "comfortable" | "compact";
5
+ export type ResourceActivityIconName = "activity" | "bell" | "circle-alert" | "component" | "external-link" | "git-branch" | "info" | "message-circle" | "scan-search" | "sparkles";
6
+ export interface ResourceActivityRelatedResource {
7
+ id: string;
8
+ type: string;
9
+ label: string;
10
+ }
11
+ export interface ResourceActivityFeedAction {
12
+ id: string;
13
+ label: string;
14
+ icon?: ResourceActivityIconName;
15
+ }
16
+ export interface ResourceActivityFeedAttention {
17
+ statusLabel?: string;
18
+ icon?: ResourceActivityIconName;
19
+ actions?: readonly ResourceActivityFeedAction[];
20
+ }
21
+ interface ResourceActivityFeedItemBase {
22
+ id: string;
23
+ createdAt: string;
24
+ timestampLabel?: string;
25
+ actor?: ActivityActor;
26
+ icon?: ResourceActivityIconName;
27
+ relatedResources?: readonly ResourceActivityRelatedResource[];
28
+ }
29
+ export interface ResourceActivityFeedEventItem extends ResourceActivityFeedItemBase {
30
+ kind: "event";
31
+ summary: string;
32
+ }
33
+ export interface ResourceActivityFeedMessageItem extends ResourceActivityFeedItemBase {
34
+ kind: "message";
35
+ markdown: string;
36
+ attention?: ResourceActivityFeedAttention;
37
+ }
38
+ export type ResourceActivityFeedItem = ResourceActivityFeedEventItem | ResourceActivityFeedMessageItem;
39
+ export interface ResourceActivityFeedProps extends Omit<StackProps, "children"> {
40
+ items: readonly ResourceActivityFeedItem[];
41
+ size?: ResourceActivityFeedSize;
42
+ isLoading?: boolean;
43
+ error?: string | null;
44
+ hasMore?: boolean;
45
+ isLoadingMore?: boolean;
46
+ emptyTitle?: string;
47
+ emptyDescription?: string;
48
+ errorTitle?: string;
49
+ loadMoreLabel?: string;
50
+ loadingLabel?: string;
51
+ fallbackActorName?: string;
52
+ formatTimestamp?: (createdAt: string, item: ResourceActivityFeedItem) => ReactNode;
53
+ onActionSelect?: (action: ResourceActivityFeedAction, item: ResourceActivityFeedMessageItem) => void;
54
+ onLoadMore?: () => void;
55
+ onRelatedResourceSelect?: (resource: ResourceActivityRelatedResource, item: ResourceActivityFeedItem) => void;
56
+ }
57
+ export declare const ResourceActivityFeed: (props: ResourceActivityFeedProps) => import("react/jsx-runtime").JSX.Element;
58
+ export {};
@@ -4,7 +4,7 @@ import { ChatInputQuestionPrompt, ChatInputQuestionResponse } from './chat-input
4
4
  export interface ChatInputProps {
5
5
  defaultState: string;
6
6
  placeholder?: string;
7
- onSubmit?: (text: string, attachments: string[], questionResponse?: ChatInputQuestionResponse) => void;
7
+ onSubmit?: (text: string, attachments: string[], questionResponse?: ChatInputQuestionResponse) => void | Promise<void>;
8
8
  onInterrupt?: () => void;
9
9
  onAttachFiles?: (files: File[]) => void;
10
10
  onAttachText?: (text: string) => void;
@@ -16,7 +16,7 @@ export interface ChatPanelProps {
16
16
  loaderComponent?: ReactNode;
17
17
  chatInputPlaceholder: string;
18
18
  chatInputDefaultValue?: string;
19
- onSubmitMessage?: (text: string, attachments: string[], questionResponse?: ChatInputQuestionResponse) => void;
19
+ onSubmitMessage?: (text: string, attachments: string[], questionResponse?: ChatInputQuestionResponse) => void | Promise<void>;
20
20
  onInterrupt?: () => void;
21
21
  onAttachFiles?: (files: File[]) => void;
22
22
  onAttachText?: (text: string) => void;
@@ -5,7 +5,7 @@ export declare const buildTimelineDocFromInvocations: (invocations: ToolPart[],
5
5
  items: (Item | {
6
6
  indicator: {
7
7
  readonly type: "icon";
8
- readonly icon: "search" | "dot" | "danger" | "file" | "terminal" | "shell" | "ls" | "read_file" | "write_file" | "delete_file" | "patch" | "upload_files" | "download_file" | "move_file" | "browser" | "question" | "todo";
8
+ readonly icon: "search" | "dot" | "file" | "danger" | "terminal" | "shell" | "ls" | "read_file" | "write_file" | "delete_file" | "patch" | "upload_files" | "download_file" | "move_file" | "browser" | "question" | "todo";
9
9
  };
10
10
  title: TitleSegment[];
11
11
  blocks: Block[];
@@ -15,7 +15,7 @@ export declare const getStateLabel: (invocation: ToolPart) => string | null;
15
15
  export declare const isErrorState: (invocation: ToolPart) => boolean;
16
16
  export declare const buildIndicator: (invocation: ToolPart) => {
17
17
  readonly type: "icon";
18
- readonly icon: "search" | "dot" | "danger" | "file" | "terminal" | "shell" | "ls" | "read_file" | "write_file" | "delete_file" | "patch" | "upload_files" | "download_file" | "move_file" | "browser" | "question" | "todo";
18
+ readonly icon: "search" | "dot" | "file" | "danger" | "terminal" | "shell" | "ls" | "read_file" | "write_file" | "delete_file" | "patch" | "upload_files" | "download_file" | "move_file" | "browser" | "question" | "todo";
19
19
  };
20
20
  export declare const buildBaseTitle: (invocation: ToolPart, detail?: string, labelOverride?: string, detailStyle?: "monospace") => TitleSegment[];
21
21
  export declare const getInputObject: (invocation: ToolPart) => Record<string, unknown> | null;
@@ -9,6 +9,7 @@ export interface WindowTabsProps {
9
9
  selectedId?: string;
10
10
  onSelect: (id: string) => void;
11
11
  onClose: (id: string) => void;
12
+ onReorder?: (id: string, targetId: string) => void;
12
13
  "aria-label": string;
13
14
  }
14
15
  export declare const WindowTabs: (props: WindowTabsProps) => import("react/jsx-runtime").JSX.Element;
@@ -4,12 +4,12 @@ import { Text as O, Popover as te, HStack as Ee, Portal as ue, Image as dt, Butt
4
4
  import { flexRender as be, useReactTable as mt, getPaginationRowModel as ft, getCoreRowModel as ht, getSortedRowModel as gt } from "@tanstack/react-table";
5
5
  import { isValidElement as Fe, cloneElement as bt, useRef as Te, useState as Q, useEffect as Ke, Fragment as pt } from "react";
6
6
  import { S as xe, T as Je } from "./browser-storage-DPtOQJx0.js";
7
- import { u as St } from "./kanban-renderer-toolbar-ebqlG13w.js";
7
+ import { u as St } from "./kanban-renderer-toolbar-DzY6THJY.js";
8
8
  import { Braces as wt, ChevronRight as xt, CircleHelp as yt, Minus as Ct, Check as ye, ChevronDown as vt, Settings2 as Rt, GripVertical as It, ArrowUpAZ as Xe, ArrowDownAZ as qe, MoreVertical as At } from "lucide-react";
9
- import { C as Ce, S as $t } from "./lazy-markdown-editor-Obb0M8xc.js";
10
- import { L as ce, S as _t, R as kt } from "./list-row-CRi3Luog.js";
11
- import { c as ie, g as zt, i as Ge, f as Tt, D as Dt, E as Vt, r as Mt, a as De, s as Pt, b as Ht, d as Lt, e as Ot, h as Wt, j as Nt, k as jt, l as Et, m as Bt, n as Ft, o as Kt, S as Jt, P as Xt } from "./edit-mode-data-table-BrydKuMM.js";
12
- import { P as qt } from "./param-editor-DhoxgwGd.js";
9
+ import { C as Ce, S as $t } from "./lazy-markdown-editor-ClZPZuaU.js";
10
+ import { L as ce, S as _t, R as kt } from "./list-row-BDoV_iMV.js";
11
+ import { c as ie, g as zt, i as Ge, f as Tt, D as Dt, E as Vt, r as Mt, a as De, s as Pt, b as Ht, d as Lt, e as Ot, h as Wt, j as Nt, k as jt, l as Et, m as Bt, n as Ft, o as Kt, S as Jt, P as Xt } from "./edit-mode-data-table-B8UpWb7i.js";
12
+ import { P as qt } from "./param-editor-CTx3mDxQ.js";
13
13
  import { useSensors as Gt, useSensor as Ut, PointerSensor as Yt, DndContext as Zt, closestCenter as Qt } from "@dnd-kit/core";
14
14
  import { SortableContext as eo, verticalListSortingStrategy as to, useSortable as oo } from "@dnd-kit/sortable";
15
15
  import { CSS as lo } from "@dnd-kit/utilities";
package/dist/diff.js CHANGED
@@ -9,8 +9,8 @@ import { useVirtualizer as Nt, defaultRangeExtractor as Ht } from "@tanstack/rea
9
9
  import { T as Ot, S as qe } from "./browser-storage-DPtOQJx0.js";
10
10
  import { ChevronRight as Ye, ChevronDown as $t, Check as dt, Copy as Vt, Settings2 as jt, ListTree as Gt, List as Wt, PanelLeftClose as Kt, PanelLeftOpen as Qt, Rows2 as qt, SquareSplitHorizontal as Ut, ChevronsUpDown as Yt, ChevronsDownUp as Xt, FileText as Jt, Search as Zt } from "lucide-react";
11
11
  import { E as Se } from "./empty-state-Bo4HVrgr.js";
12
- import { L as en, H as ct } from "./list-row-CRi3Luog.js";
13
- import { T as tn, R as nn } from "./tree-list-DXwHWodb.js";
12
+ import { L as en, H as ct } from "./list-row-BDoV_iMV.js";
13
+ import { T as tn, R as nn } from "./tree-list-CZvcg3_6.js";
14
14
  import { create as ln } from "zustand";
15
15
  const on = (n) => {
16
16
  let e;
@@ -3,11 +3,11 @@ import { c as j } from "react/compiler-runtime";
3
3
  import { Popover as oe, IconButton as Z, Text as ie, Box as ne, Icon as $, Portal as qe, chakra as Ht, Flex as le, Table as L, Button as Ie, Menu as J, Stack as wt } from "@chakra-ui/react";
4
4
  import { isValidElement as Ct, useRef as ft, useEffect as ht, useState as ve } from "react";
5
5
  import { S as St } from "./browser-storage-DPtOQJx0.js";
6
- import { K as Pt, f as Tt, u as Mt } from "./kanban-renderer-toolbar-ebqlG13w.js";
6
+ import { K as Pt, f as Tt, u as Mt } from "./kanban-renderer-toolbar-DzY6THJY.js";
7
7
  import { Settings2 as Ot, CalendarClock as Nt, Type as $t, Hash as Bt, CheckCircle2 as Vt, Check as gt, X as xt, Minus as Lt, Plus as vt, Trash2 as yt, Pencil as jt, ChevronsLeft as Kt, ChevronLeft as Ft, ChevronRight as Xt, ChevronsRight as Gt } from "lucide-react";
8
- import { S as Ut, C as Rt, N as Yt, a as qt } from "./lazy-markdown-editor-Obb0M8xc.js";
8
+ import { S as Ut, C as Rt, N as Yt, a as qt } from "./lazy-markdown-editor-ClZPZuaU.js";
9
9
  import { createColumnHelper as Jt } from "@tanstack/react-table";
10
- import { R as It, L as kt } from "./list-row-CRi3Luog.js";
10
+ import { R as It, L as kt } from "./list-row-BDoV_iMV.js";
11
11
  const Qt = (t) => {
12
12
  const e = j(8), {
13
13
  rows: l,
@@ -843,4 +843,4 @@ export {
843
843
  qn as r,
844
844
  sn as s
845
845
  };
846
- //# sourceMappingURL=edit-mode-data-table-BrydKuMM.js.map
846
+ //# sourceMappingURL=edit-mode-data-table-B8UpWb7i.js.map