@pstdio/ui 0.0.4 → 0.1.1
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 +1162 -193
- package/dist/chat-ui.js.map +1 -1
- package/dist/components/chat-ui/index.d.ts +8 -5
- package/dist/components/chat-ui/tool-rendering/build-timeline.d.ts +2 -2
- package/dist/components/checkbox.d.ts +8 -0
- package/dist/components/checkbox.stories.d.ts +15 -0
- package/dist/components/documentation/docs-changelog.d.ts +20 -0
- package/dist/components/documentation/docs-changelog.stories.d.ts +15 -0
- package/dist/components/documentation/docs-outline.d.ts +13 -0
- package/dist/components/documentation/docs-outline.stories.d.ts +16 -0
- package/dist/components/documentation/docs-pagination.d.ts +10 -0
- package/dist/components/documentation/docs-pagination.stories.d.ts +14 -0
- package/dist/components/documentation/docs-sidebar.d.ts +14 -0
- package/dist/components/documentation/docs-sidebar.stories.d.ts +7 -0
- package/dist/components/folder-picker-dialog.d.ts +25 -0
- package/dist/components/folder-picker-dialog.stories.d.ts +11 -0
- package/dist/components/item-section.d.ts +1 -1
- package/dist/components/panel-menu.d.ts +2 -0
- package/dist/components/panel-menu.stories.d.ts +1 -0
- package/dist/components/properties.d.ts +4 -4
- package/dist/components/rich-text/markdown-editor/markdown-editor.d.ts +1 -0
- package/dist/components/rich-text/markdown-editor/markdown-editor.stories.d.ts +1 -0
- package/dist/components/rich-text/utils/inferResourceType.d.ts +1 -1
- package/dist/components/scroll-area.d.ts +16 -0
- package/dist/components/scroll-area.stories.d.ts +7 -0
- package/dist/components/session-indicator.d.ts +1 -1
- package/dist/components/switch.d.ts +15 -0
- package/dist/components/switch.stories.d.ts +16 -0
- package/dist/components/{ticket-card.d.ts → tickets/ticket-card.d.ts} +2 -1
- package/dist/components/tickets/ticket-list.d.ts +23 -0
- package/dist/components/tickets/ticket-list.stories.d.ts +10 -0
- package/dist/empty-state-B8mbv7ZH.js +128 -0
- package/dist/empty-state-B8mbv7ZH.js.map +1 -0
- package/dist/index.d.ts +33 -0
- package/dist/index.js +1330 -321
- package/dist/index.js.map +1 -1
- package/dist/{rich-message-CiA3ripk.js → rich-message-CNDoACE7.js} +8 -7
- package/dist/{rich-message-CiA3ripk.js.map → rich-message-CNDoACE7.js.map} +1 -1
- package/dist/rich-text.js +267 -262
- package/dist/rich-text.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/theme/primitives/colors.d.ts +12 -28
- package/dist/theme/recipes/menu.d.ts +1 -1
- package/dist/theme/recipes/progress-circle.d.ts +3 -3
- package/dist/theme/tokens/borders.d.ts +6 -6
- package/dist/theme/tokens/colors.d.ts +180 -0
- package/dist/{theme-9E0MRtZk.js → theme-C7CIuIPZ.js} +197 -115
- package/dist/theme-C7CIuIPZ.js.map +1 -0
- package/dist/theme.js +1 -1
- package/package.json +10 -8
- package/dist/theme-9E0MRtZk.js.map +0 -1
- /package/dist/components/{ticket-board.d.ts → tickets/ticket-board.d.ts} +0 -0
- /package/dist/components/{ticket-board.stories.d.ts → tickets/ticket-board.stories.d.ts} +0 -0
- /package/dist/components/{ticket-card.stories.d.ts → tickets/ticket-card.stories.d.ts} +0 -0
|
@@ -6,6 +6,6 @@ export interface ItemSectionProps {
|
|
|
6
6
|
action?: ReactNode;
|
|
7
7
|
}
|
|
8
8
|
/**
|
|
9
|
-
* A collapsible
|
|
9
|
+
* A collapsible section wrapper with a title trigger and optional action.
|
|
10
10
|
*/
|
|
11
11
|
export declare const ItemSection: (props: ItemSectionProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
type PanelMenuVariant = "default" | "compact";
|
|
2
3
|
interface PanelMenuProps {
|
|
3
4
|
title: string;
|
|
4
5
|
children?: ReactNode;
|
|
6
|
+
variant?: PanelMenuVariant;
|
|
5
7
|
}
|
|
6
8
|
export declare function PanelMenu(props: PanelMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
7
9
|
export {};
|
|
@@ -6,13 +6,13 @@ export interface PropertyItem {
|
|
|
6
6
|
}
|
|
7
7
|
export interface PropertiesProps {
|
|
8
8
|
items: PropertyItem[];
|
|
9
|
-
title?: string;
|
|
10
|
-
defaultOpen?: boolean;
|
|
11
9
|
}
|
|
12
10
|
/**
|
|
13
|
-
*
|
|
11
|
+
* Displays a list of label–value property rows.
|
|
14
12
|
*
|
|
15
13
|
* Each property has a label, an optional description (shown as a tooltip), and a value (ReactNode).
|
|
16
|
-
* All labels
|
|
14
|
+
* All labels share a fixed width for alignment.
|
|
15
|
+
*
|
|
16
|
+
* Wrap with `<ItemSection>` when collapsible behavior is needed.
|
|
17
17
|
*/
|
|
18
18
|
export declare const Properties: (props: PropertiesProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function inferResourceTypeFromMediaType(mediaType: string): "text" | "table" | "
|
|
1
|
+
export declare function inferResourceTypeFromMediaType(mediaType: string): "text" | "table" | "image" | "json" | "markdown" | "pdf";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ScrollArea as ChakraScrollArea } from '@chakra-ui/react';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
type VerticalScrollbarProps = Omit<ChakraScrollArea.ScrollbarProps, "orientation">;
|
|
4
|
+
type HorizontalScrollbarProps = Omit<ChakraScrollArea.ScrollbarProps, "orientation">;
|
|
5
|
+
export interface ScrollAreaProps extends ChakraScrollArea.RootProps {
|
|
6
|
+
viewportRef?: React.Ref<HTMLDivElement>;
|
|
7
|
+
viewportProps?: ChakraScrollArea.ViewportProps;
|
|
8
|
+
contentProps?: ChakraScrollArea.ContentProps;
|
|
9
|
+
verticalScrollbarProps?: VerticalScrollbarProps;
|
|
10
|
+
horizontalScrollbarProps?: HorizontalScrollbarProps;
|
|
11
|
+
showVerticalScrollbar?: boolean;
|
|
12
|
+
showHorizontalScrollbar?: boolean;
|
|
13
|
+
showCorner?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare const ScrollArea: React.ForwardRefExoticComponent<ScrollAreaProps & React.RefAttributes<HTMLDivElement>>;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { ScrollArea } from './scroll-area';
|
|
3
|
+
declare const meta: Meta<typeof ScrollArea>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof ScrollArea>;
|
|
6
|
+
export declare const Vertical: Story;
|
|
7
|
+
export declare const BothDirections: Story;
|
|
@@ -2,7 +2,7 @@ import { Icon } from '@chakra-ui/react';
|
|
|
2
2
|
import { ComponentProps } from 'react';
|
|
3
3
|
export type SessionCompletionStatus = "in_progress" | "awaiting_input" | "completed" | "failed";
|
|
4
4
|
export declare const resolveSessionIndicatorIcon: (status: SessionCompletionStatus | undefined) => import('react').ForwardRefExoticComponent<Omit<import('lucide-react').LucideProps, "ref"> & import('react').RefAttributes<SVGSVGElement>>;
|
|
5
|
-
export declare const resolveSessionIndicatorColor: (status: SessionCompletionStatus | undefined) => "
|
|
5
|
+
export declare const resolveSessionIndicatorColor: (status: SessionCompletionStatus | undefined) => "fg.muted" | "fg.error" | "fg.success";
|
|
6
6
|
interface SessionIndicatorProps {
|
|
7
7
|
status?: SessionCompletionStatus;
|
|
8
8
|
boxSize?: ComponentProps<typeof Icon>["boxSize"];
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Switch as ChakraSwitch } from '@chakra-ui/react';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
export interface SwitchProps extends ChakraSwitch.RootProps {
|
|
4
|
+
inputProps?: React.InputHTMLAttributes<HTMLInputElement>;
|
|
5
|
+
rootRef?: React.RefObject<HTMLLabelElement | null>;
|
|
6
|
+
trackLabel?: {
|
|
7
|
+
on: React.ReactNode;
|
|
8
|
+
off: React.ReactNode;
|
|
9
|
+
};
|
|
10
|
+
thumbLabel?: {
|
|
11
|
+
on: React.ReactNode;
|
|
12
|
+
off: React.ReactNode;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
export declare const Switch: React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: import('react').ForwardRefExoticComponent<import('./switch').SwitchProps & import('react').RefAttributes<HTMLInputElement>>;
|
|
6
|
+
decorators: ((Story: () => ReactNode) => import("react/jsx-runtime").JSX.Element)[];
|
|
7
|
+
};
|
|
8
|
+
export default meta;
|
|
9
|
+
type Story = StoryObj<typeof meta>;
|
|
10
|
+
export declare const Default: Story;
|
|
11
|
+
export declare const DefaultChecked: Story;
|
|
12
|
+
export declare const WithLabel: Story;
|
|
13
|
+
export declare const Disabled: Story;
|
|
14
|
+
export declare const DisabledChecked: Story;
|
|
15
|
+
export declare const Sizes: Story;
|
|
16
|
+
export declare const WithTrackLabel: Story;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { DragEventHandler } from 'react';
|
|
2
|
-
import { SessionCompletionStatus } from '
|
|
2
|
+
import { SessionCompletionStatus } from '../session-indicator';
|
|
3
3
|
export interface TicketCardBadge {
|
|
4
4
|
label: string;
|
|
5
5
|
color?: string;
|
|
6
6
|
}
|
|
7
7
|
interface TicketCardProps {
|
|
8
8
|
ticketId: string;
|
|
9
|
+
parentPath?: string[];
|
|
9
10
|
sessionIndicatorLabel?: string;
|
|
10
11
|
sessionIndicatorStatus?: SessionCompletionStatus;
|
|
11
12
|
title: string;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComponentType, ReactNode } from 'react';
|
|
2
|
+
import { TicketCardBadge } from './ticket-card';
|
|
3
|
+
export interface TicketListItem {
|
|
4
|
+
id: string;
|
|
5
|
+
ticketId: string;
|
|
6
|
+
title: string;
|
|
7
|
+
statusIcon?: ComponentType<{
|
|
8
|
+
size?: number | string;
|
|
9
|
+
}>;
|
|
10
|
+
statusColor?: string;
|
|
11
|
+
badges?: TicketCardBadge[];
|
|
12
|
+
date?: string;
|
|
13
|
+
assigneeIcon?: ReactNode;
|
|
14
|
+
children?: TicketListItem[];
|
|
15
|
+
onClick?: () => void;
|
|
16
|
+
}
|
|
17
|
+
interface TicketListProps {
|
|
18
|
+
items: TicketListItem[];
|
|
19
|
+
selectedItemId?: string | null;
|
|
20
|
+
onItemClick?: (item: TicketListItem) => void;
|
|
21
|
+
}
|
|
22
|
+
export declare const TicketList: (props: TicketListProps) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { TicketList } from './ticket-list';
|
|
3
|
+
declare const meta: Meta<typeof TicketList>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof TicketList>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const Interactive: Story;
|
|
8
|
+
export declare const WithBadges: Story;
|
|
9
|
+
export declare const Empty: Story;
|
|
10
|
+
export declare const DeepNesting: Story;
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { jsx as u, jsxs as D } from "react/jsx-runtime";
|
|
2
|
+
import { c as $ } from "react/compiler-runtime";
|
|
3
|
+
import { Span as k, EmptyState as x, VStack as W } from "@chakra-ui/react";
|
|
4
|
+
import { DiffEditor as z } from "@monaco-editor/react";
|
|
5
|
+
import * as R from "react";
|
|
6
|
+
const F = (h) => {
|
|
7
|
+
const e = $(18), {
|
|
8
|
+
fileName: s,
|
|
9
|
+
additions: t,
|
|
10
|
+
deletions: f,
|
|
11
|
+
label: n,
|
|
12
|
+
variant: d,
|
|
13
|
+
size: a,
|
|
14
|
+
onClick: i,
|
|
15
|
+
onClickFileLink: o
|
|
16
|
+
} = h, l = d === void 0 ? "outline" : d, c = (a === void 0 ? "default" : a) === "small", g = l === "outline" ? "1px solid" : "none", m = l === "outline" ? c ? "3xs" : "2xs" : "2px", B = c ? "label/S/regular" : void 0, _ = i ? "pointer" : "default";
|
|
17
|
+
let v;
|
|
18
|
+
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (v = {
|
|
19
|
+
background: "bg.muted"
|
|
20
|
+
}, e[0] = v) : v = e[0];
|
|
21
|
+
let p;
|
|
22
|
+
e[1] !== s || e[2] !== o ? (p = s && /* @__PURE__ */ u(k, { display: "inline-block", maxW: "24ch", truncate: !0, mr: "xs", title: s, onClick: (w) => {
|
|
23
|
+
w.stopPropagation(), o?.();
|
|
24
|
+
}, cursor: o ? "pointer" : "default", _hover: {
|
|
25
|
+
textDecoration: o ? "underline" : "none",
|
|
26
|
+
color: o ? "fg.blue-dark" : "fg.muted"
|
|
27
|
+
}, children: s }), e[1] = s, e[2] = o, e[3] = p) : p = e[3];
|
|
28
|
+
const C = `+${t}`;
|
|
29
|
+
let b;
|
|
30
|
+
e[4] !== C ? (b = /* @__PURE__ */ u(k, { color: "fg.success", children: C }), e[4] = C, e[5] = b) : b = e[5];
|
|
31
|
+
const E = `-${f}`;
|
|
32
|
+
let S;
|
|
33
|
+
e[6] !== E ? (S = /* @__PURE__ */ u(k, { color: "fg.error", children: E }), e[6] = E, e[7] = S) : S = e[7];
|
|
34
|
+
let y;
|
|
35
|
+
return e[8] !== n || e[9] !== i || e[10] !== S || e[11] !== g || e[12] !== m || e[13] !== B || e[14] !== _ || e[15] !== p || e[16] !== b ? (y = /* @__PURE__ */ D(k, { display: "inline-flex", alignItems: "center", gap: "2xs", border: g, borderColor: "border.muted", color: "fg.muted", paddingX: m, paddingY: "1px", borderRadius: "xs", textStyle: B, cursor: _, onClick: i, _hover: v, children: [
|
|
36
|
+
n,
|
|
37
|
+
p,
|
|
38
|
+
b,
|
|
39
|
+
S
|
|
40
|
+
] }), e[8] = n, e[9] = i, e[10] = S, e[11] = g, e[12] = m, e[13] = B, e[14] = _, e[15] = p, e[16] = b, e[17] = y) : y = e[17], y;
|
|
41
|
+
}, T = {
|
|
42
|
+
base: "vs-dark",
|
|
43
|
+
inherit: !0,
|
|
44
|
+
rules: [],
|
|
45
|
+
colors: {
|
|
46
|
+
"editor.background": "#0a0d15",
|
|
47
|
+
"editor.foreground": "#f5f5f5",
|
|
48
|
+
"editor.lineHighlightBackground": "#22252C",
|
|
49
|
+
"editorCursor.foreground": "#A7A7A7",
|
|
50
|
+
"editorWhitespace.foreground": "#3B3B3B",
|
|
51
|
+
"editorIndentGuide.background": "#404040",
|
|
52
|
+
"editorIndentGuide.activeBackground": "#707070"
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
function H(h) {
|
|
56
|
+
const e = $(11), {
|
|
57
|
+
original: s,
|
|
58
|
+
modified: t,
|
|
59
|
+
language: f,
|
|
60
|
+
sideBySide: n,
|
|
61
|
+
disableScroll: d
|
|
62
|
+
} = h, a = f === void 0 ? "plaintext" : f, i = n === void 0 ? !1 : n, o = d === void 0 ? !0 : d;
|
|
63
|
+
let l;
|
|
64
|
+
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (l = {
|
|
65
|
+
enabled: !1
|
|
66
|
+
}, e[0] = l) : l = e[0];
|
|
67
|
+
let r;
|
|
68
|
+
e[1] !== o ? (r = o ? {
|
|
69
|
+
scrollbar: {
|
|
70
|
+
vertical: "hidden",
|
|
71
|
+
horizontal: "hidden",
|
|
72
|
+
useShadows: !1,
|
|
73
|
+
alwaysConsumeMouseWheel: !1
|
|
74
|
+
},
|
|
75
|
+
overviewRulerLanes: 0
|
|
76
|
+
} : {}, e[1] = o, e[2] = r) : r = e[2];
|
|
77
|
+
let c;
|
|
78
|
+
e[3] !== i || e[4] !== r ? (c = {
|
|
79
|
+
renderSideBySide: i,
|
|
80
|
+
readOnly: !0,
|
|
81
|
+
fontSize: 11,
|
|
82
|
+
minimap: l,
|
|
83
|
+
wordWrap: "on",
|
|
84
|
+
scrollBeyondLastLine: !1,
|
|
85
|
+
...r
|
|
86
|
+
}, e[3] = i, e[4] = r, e[5] = c) : c = e[5];
|
|
87
|
+
const g = c;
|
|
88
|
+
let m;
|
|
89
|
+
return e[6] !== a || e[7] !== t || e[8] !== g || e[9] !== s ? (m = /* @__PURE__ */ u(z, { width: "100%", height: "100%", original: s, modified: t, language: a, theme: "ps-theme", options: g, beforeMount: I, onMount: A }), e[6] = a, e[7] = t, e[8] = g, e[9] = s, e[10] = m) : m = e[10], m;
|
|
90
|
+
}
|
|
91
|
+
function A(h, e) {
|
|
92
|
+
e.editor.setTheme("ps-theme");
|
|
93
|
+
}
|
|
94
|
+
function I(h) {
|
|
95
|
+
h.editor.defineTheme("ps-theme", T);
|
|
96
|
+
}
|
|
97
|
+
const N = R.forwardRef(function(e, s) {
|
|
98
|
+
const t = $(19);
|
|
99
|
+
let f, n, d, a, i;
|
|
100
|
+
t[0] !== e ? ({
|
|
101
|
+
title: i,
|
|
102
|
+
description: n,
|
|
103
|
+
icon: d,
|
|
104
|
+
children: f,
|
|
105
|
+
...a
|
|
106
|
+
} = e, t[0] = e, t[1] = f, t[2] = n, t[3] = d, t[4] = a, t[5] = i) : (f = t[1], n = t[2], d = t[3], a = t[4], i = t[5]);
|
|
107
|
+
let o;
|
|
108
|
+
t[6] !== d ? (o = d && /* @__PURE__ */ u(x.Indicator, { children: d }), t[6] = d, t[7] = o) : o = t[7];
|
|
109
|
+
let l;
|
|
110
|
+
t[8] !== n || t[9] !== i ? (l = n ? /* @__PURE__ */ D(W, { textAlign: "center", children: [
|
|
111
|
+
/* @__PURE__ */ u(x.Title, { fontWeight: "normal", children: i }),
|
|
112
|
+
/* @__PURE__ */ u(x.Description, { children: n })
|
|
113
|
+
] }) : /* @__PURE__ */ u(x.Title, { fontWeight: "normal", children: i }), t[8] = n, t[9] = i, t[10] = l) : l = t[10];
|
|
114
|
+
let r;
|
|
115
|
+
t[11] !== f || t[12] !== o || t[13] !== l ? (r = /* @__PURE__ */ D(x.Content, { children: [
|
|
116
|
+
o,
|
|
117
|
+
l,
|
|
118
|
+
f
|
|
119
|
+
] }), t[11] = f, t[12] = o, t[13] = l, t[14] = r) : r = t[14];
|
|
120
|
+
let c;
|
|
121
|
+
return t[15] !== s || t[16] !== a || t[17] !== r ? (c = /* @__PURE__ */ u(x.Root, { ref: s, ...a, children: r }), t[15] = s, t[16] = a, t[17] = r, t[18] = c) : c = t[18], c;
|
|
122
|
+
});
|
|
123
|
+
export {
|
|
124
|
+
H as D,
|
|
125
|
+
N as E,
|
|
126
|
+
F as a
|
|
127
|
+
};
|
|
128
|
+
//# sourceMappingURL=empty-state-B8mbv7ZH.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"empty-state-B8mbv7ZH.js","sources":["../src/components/diff-bubble.tsx","../src/components/code-editor.tsx","../src/components/diff-editor.tsx","../src/components/empty-state.tsx"],"sourcesContent":["import { Span } from \"@chakra-ui/react\";\nimport type React from \"react\";\nimport type { ComponentProps, MouseEvent } from \"react\";\n\ninterface DiffBubbleProps extends Omit<ComponentProps<typeof Span>, \"onClick\"> {\n fileName?: string;\n additions: number;\n deletions: number;\n label?: React.ReactNode;\n variant?: \"outline\" | \"ghost\";\n size?: \"default\" | \"small\";\n onClick?: (event: MouseEvent<HTMLSpanElement>) => void;\n onClickFileLink?: () => void;\n}\n\nexport const DiffBubble = (props: DiffBubbleProps) => {\n const {\n fileName,\n additions,\n deletions,\n label,\n variant = \"outline\",\n size = \"default\",\n onClick,\n onClickFileLink,\n } = props;\n\n const isSmall = size === \"small\";\n\n return (\n <Span\n display=\"inline-flex\"\n alignItems=\"center\"\n gap={\"2xs\"}\n border={variant === \"outline\" ? \"1px solid\" : \"none\"}\n borderColor=\"border.muted\"\n color=\"fg.muted\"\n paddingX={variant === \"outline\" ? (isSmall ? \"3xs\" : \"2xs\") : \"2px\"}\n paddingY=\"1px\"\n borderRadius=\"xs\"\n textStyle={isSmall ? \"label/S/regular\" : undefined}\n cursor={onClick ? \"pointer\" : \"default\"}\n onClick={onClick}\n _hover={{\n background: \"bg.muted\",\n }}\n >\n {label}\n {fileName && (\n <Span\n display=\"inline-block\"\n maxW=\"24ch\"\n truncate\n mr=\"xs\"\n title={fileName}\n onClick={(e) => {\n e.stopPropagation();\n onClickFileLink?.();\n }}\n cursor={onClickFileLink ? \"pointer\" : \"default\"}\n _hover={{\n textDecoration: onClickFileLink ? \"underline\" : \"none\",\n color: onClickFileLink ? \"fg.blue-dark\" : \"fg.muted\",\n }}\n >\n {fileName}\n </Span>\n )}\n <Span color=\"fg.success\">{`+${additions}`}</Span>\n <Span color=\"fg.error\">{`-${deletions}`}</Span>\n </Span>\n );\n};\n","import { DiffEditor, Editor } from \"@monaco-editor/react\";\n\nexport const customTheme = {\n base: \"vs-dark\" as const,\n inherit: true,\n rules: [],\n colors: {\n \"editor.background\": \"#0a0d15\",\n \"editor.foreground\": \"#f5f5f5\",\n \"editor.lineHighlightBackground\": \"#22252C\",\n \"editorCursor.foreground\": \"#A7A7A7\",\n \"editorWhitespace.foreground\": \"#3B3B3B\",\n \"editorIndentGuide.background\": \"#404040\",\n \"editorIndentGuide.activeBackground\": \"#707070\",\n },\n};\n\ninterface CodeEditorProps {\n language: string;\n defaultCode?: string;\n code?: string;\n isEditable: boolean;\n showLineNumbers?: boolean;\n onChange?: (code: string) => void;\n disableScroll?: boolean;\n}\n\nexport const CodeEditor = (props: CodeEditorProps) => {\n const { defaultCode, code, showLineNumbers, isEditable, language = \"javascript\", onChange, disableScroll } = props;\n\n const options = {\n tabSize: 2,\n minimap: {\n enabled: false,\n },\n fontSize: 12,\n readOnly: !isEditable,\n lineNumbers: showLineNumbers ? \"on\" : \"off\",\n ...(disableScroll\n ? {\n scrollbar: {\n vertical: \"hidden\" as const,\n horizontal: \"hidden\" as const,\n useShadows: false,\n alwaysConsumeMouseWheel: false,\n },\n scrollBeyondLastLine: false,\n mouseWheelScrollSensitivity: 0,\n overviewRulerLanes: 0,\n }\n : {}),\n } as const;\n\n return (\n <Editor\n width=\"100%\"\n height=\"100%\"\n language={language}\n defaultValue={defaultCode}\n value={code}\n theme={\"ps-theme\"}\n options={options}\n onChange={(value) => {\n onChange?.(value || \"\");\n }}\n beforeMount={(monaco) => {\n monaco.editor.defineTheme(\"ps-theme\", customTheme);\n }}\n onMount={async (editor, monaco) => {\n monaco.editor.setTheme(\"ps-theme\");\n\n // Add JSX support\n monaco.languages.typescript.typescriptDefaults.setCompilerOptions({\n jsx: monaco.languages.typescript.JsxEmit.React,\n });\n\n // Format on cmd+s\n editor.addCommand(monaco.KeyMod.CtrlCmd | monaco.KeyCode.KeyS, async () => {\n await editor.getAction(\"editor.action.formatDocument\")?.run();\n });\n\n // Run format on the initial value\n await editor.getAction(\"editor.action.formatDocument\")?.run();\n }}\n />\n );\n};\n\ninterface CodeDiffEditorProps {\n language: string;\n original: string;\n modified: string;\n showLineNumbers?: boolean;\n disableScroll?: boolean;\n}\n\nexport const CodeDiffEditor = (props: CodeDiffEditorProps) => {\n const { original, modified, showLineNumbers, language = \"javascript\", disableScroll } = props;\n\n const options = {\n tabSize: 2,\n minimap: {\n enabled: false,\n },\n fontSize: 12,\n readOnly: true,\n originalEditable: false,\n renderSideBySide: true,\n useInlineViewWhenSpaceIsTooSmall: true,\n lineNumbers: showLineNumbers ? \"on\" : \"off\",\n ...(disableScroll\n ? {\n scrollbar: {\n vertical: \"hidden\" as const,\n horizontal: \"hidden\" as const,\n useShadows: false,\n alwaysConsumeMouseWheel: false,\n },\n scrollBeyondLastLine: false,\n mouseWheelScrollSensitivity: 0,\n overviewRulerLanes: 0,\n }\n : {}),\n } as const;\n\n return (\n <DiffEditor\n width=\"100%\"\n height=\"100%\"\n language={language}\n original={original}\n modified={modified}\n theme={\"ps-theme\"}\n options={options}\n beforeMount={(monaco) => {\n monaco.editor.defineTheme(\"ps-theme\", customTheme);\n }}\n onMount={(_, monaco) => {\n monaco.editor.setTheme(\"ps-theme\");\n\n monaco.languages.typescript.typescriptDefaults.setCompilerOptions({\n jsx: monaco.languages.typescript.JsxEmit.React,\n });\n }}\n />\n );\n};\n","import { DiffEditor as MonacoDiffEditor } from \"@monaco-editor/react\";\nimport { useMemo } from \"react\";\nimport { customTheme } from \"./code-editor\";\n\ninterface DiffEditorProps {\n original: string;\n modified: string;\n language?: string;\n sideBySide?: boolean;\n disableScroll?: boolean;\n}\n\nexport function DiffEditor(props: DiffEditorProps) {\n const { original, modified, language = \"plaintext\", sideBySide = false, disableScroll = true } = props;\n\n const options = useMemo(() => {\n return {\n renderSideBySide: sideBySide,\n readOnly: true,\n fontSize: 11,\n minimap: { enabled: false },\n wordWrap: \"on\" as const,\n scrollBeyondLastLine: false,\n ...(disableScroll\n ? {\n scrollbar: {\n vertical: \"hidden\" as const,\n horizontal: \"hidden\" as const,\n useShadows: false,\n alwaysConsumeMouseWheel: false,\n },\n overviewRulerLanes: 0,\n }\n : {}),\n } as const;\n }, [sideBySide, disableScroll]);\n\n return (\n <MonacoDiffEditor\n width=\"100%\"\n height=\"100%\"\n original={original}\n modified={modified}\n language={language}\n theme=\"ps-theme\"\n options={options}\n beforeMount={(monaco) => {\n monaco.editor.defineTheme(\"ps-theme\", customTheme);\n }}\n onMount={(_editor, monaco) => {\n monaco.editor.setTheme(\"ps-theme\");\n }}\n />\n );\n}\n","import { EmptyState as ChakraEmptyState, VStack } from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nexport interface EmptyStateProps extends ChakraEmptyState.RootProps {\n title: string;\n description?: string;\n icon?: React.ReactNode;\n}\n\nexport const EmptyState = React.forwardRef<HTMLDivElement, EmptyStateProps>(function EmptyState(props, ref) {\n const { title, description, icon, children, ...rest } = props;\n return (\n <ChakraEmptyState.Root ref={ref} {...rest}>\n <ChakraEmptyState.Content>\n {icon && <ChakraEmptyState.Indicator>{icon}</ChakraEmptyState.Indicator>}\n {description ? (\n <VStack textAlign=\"center\">\n <ChakraEmptyState.Title fontWeight=\"normal\">{title}</ChakraEmptyState.Title>\n <ChakraEmptyState.Description>{description}</ChakraEmptyState.Description>\n </VStack>\n ) : (\n <ChakraEmptyState.Title fontWeight=\"normal\">{title}</ChakraEmptyState.Title>\n )}\n {children}\n </ChakraEmptyState.Content>\n </ChakraEmptyState.Root>\n );\n});\n"],"names":["DiffBubble","props","$","_c","fileName","additions","deletions","label","variant","t0","size","t1","onClick","onClickFileLink","undefined","isSmall","t2","t3","t4","t5","t6","Symbol","for","background","t7","jsx","Span","e","stopPropagation","textDecoration","color","t8","t9","t10","t11","t12","customTheme","base","inherit","rules","colors","DiffEditor","original","modified","language","sideBySide","disableScroll","enabled","scrollbar","vertical","horizontal","useShadows","alwaysConsumeMouseWheel","overviewRulerLanes","renderSideBySide","readOnly","fontSize","minimap","wordWrap","scrollBeyondLastLine","options","MonacoDiffEditor","_temp","_temp2","_editor","monaco_0","monaco","editor","setTheme","defineTheme","EmptyState","React","forwardRef","ref","children","description","icon","rest","title","ChakraEmptyState","jsxs","VStack"],"mappings":";;;;;AAeO,MAAMA,IAAaC,CAAAA,MAAA;AAAA,QAAAC,IAAAC,EAAA,EAAA,GACxB;AAAA,IAAAC,UAAAA;AAAAA,IAAAC,WAAAA;AAAAA,IAAAC,WAAAA;AAAAA,IAAAC,OAAAA;AAAAA,IAAAC,SAAAC;AAAAA,IAAAC,MAAAC;AAAAA,IAAAC,SAAAA;AAAAA,IAAAC,iBAAAA;AAAAA,EAAAA,IASIZ,GAJFO,IAAAC,MAAAK,SAAA,YAAAL,GAMFM,KALEJ,MAAAG,SAAA,YAAAH,OAKuB,SAObK,IAAAR,MAAY,YAAZ,cAAA,QAGES,IAAAT,MAAY,YAAaO,IAAA,QAAA,QAAzB,OAGCG,IAAAH,IAAA,oBAAAD,QACHK,IAAAP,IAAA,YAAA;AAA+B,MAAAQ;AAAA,EAAAlB,EAAA,CAAA,MAAAmB,uBAAAC,IAAA,2BAAA,KAE/BF,IAAA;AAAA,IAAAG,YACM;AAAA,EAAA,GACbrB,OAAAkB,KAAAA,IAA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AS,GAAAT,QAAAc,KAAAA,IAAAd,EAAA,EAAA;AAAA,MAAAe;AAAA,SAAAf,EAAA,EAAA,MAAAuE,KAAAvE,UAAA2E,KAAA3E,EAAA,EAAA,MAAAc,KAZ7BC,sBAAA8D,EAAA,MAAA,EAA4BN,KAAAA,GAAG,GAAMI,GACnC7D,UAAAA,GAYF,GAAwBd,QAAAuE,GAAAvE,QAAA2E,GAAA3E,QAAAc,GAAAd,QAAAe,KAAAA,IAAAf,EAAA,EAAA,GAbxBe;AAawB,CAE3B;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,14 +1,47 @@
|
|
|
1
1
|
export { ChakraProvider } from '@chakra-ui/react';
|
|
2
2
|
export type { AlertProps } from './components/alert';
|
|
3
3
|
export { AlertMessage } from './components/alert';
|
|
4
|
+
export { Breadcrumb } from './components/breadcrumb';
|
|
5
|
+
export type { CheckboxProps } from './components/checkbox';
|
|
6
|
+
export { Checkbox } from './components/checkbox';
|
|
4
7
|
export { ContentPlaceholder, Label as ContentPlaceholderLabel } from './components/content-placeholder';
|
|
5
8
|
export { DeleteConfirmationModal } from './components/delete-confirmation-modal';
|
|
9
|
+
export { DiffBubble } from './components/diff-bubble';
|
|
10
|
+
export type { Diff } from './components/diff-card';
|
|
11
|
+
export { DiffDrawer } from './components/diff-drawer';
|
|
12
|
+
export type { DocsChangelogEntry, DocsChangelogProps } from './components/documentation/docs-changelog';
|
|
13
|
+
export { DocsChangelog } from './components/documentation/docs-changelog';
|
|
14
|
+
export type { DocsOutlineProps } from './components/documentation/docs-outline';
|
|
15
|
+
export { DocsOutline } from './components/documentation/docs-outline';
|
|
16
|
+
export type { DocsPaginationItem, DocsPaginationProps } from './components/documentation/docs-pagination';
|
|
17
|
+
export { DocsPagination } from './components/documentation/docs-pagination';
|
|
18
|
+
export type { DocsSidebarItem, DocsSidebarProps } from './components/documentation/docs-sidebar';
|
|
19
|
+
export { DocsSidebar } from './components/documentation/docs-sidebar';
|
|
6
20
|
export type { EmptyStateProps } from './components/empty-state';
|
|
7
21
|
export { EmptyState } from './components/empty-state';
|
|
8
22
|
export { ErrorBoundary } from './components/error-boundary';
|
|
23
|
+
export type { FolderPickerDialogEntry, FolderPickerDialogProps } from './components/folder-picker-dialog';
|
|
24
|
+
export { FolderPickerDialog } from './components/folder-picker-dialog';
|
|
25
|
+
export { HorizontalMenuStack } from './components/horizontal-menu-stack';
|
|
26
|
+
export type { ItemSectionProps } from './components/item-section';
|
|
27
|
+
export { ItemSection } from './components/item-section';
|
|
9
28
|
export { MenuItem } from './components/menu-item';
|
|
10
29
|
export type { OpenSourceNotice, OpenSourceNoticesScreenProps } from './components/open-source-notices-screen';
|
|
11
30
|
export { OpenSourceNoticesScreen } from './components/open-source-notices-screen';
|
|
31
|
+
export { PanelMenu } from './components/panel-menu';
|
|
32
|
+
export type { PropertiesProps, PropertyItem } from './components/properties';
|
|
33
|
+
export { Properties } from './components/properties';
|
|
34
|
+
export { ScrollArea } from './components/scroll-area';
|
|
35
|
+
export type { SessionCompletionStatus } from './components/session-indicator';
|
|
36
|
+
export { SessionIndicator } from './components/session-indicator';
|
|
37
|
+
export type { SwitchProps } from './components/switch';
|
|
38
|
+
export { Switch } from './components/switch';
|
|
39
|
+
export type { TicketBoardColumn, TicketBoardColumnAction, TicketBoardItem } from './components/tickets/ticket-board';
|
|
40
|
+
export { TicketBoard } from './components/tickets/ticket-board';
|
|
41
|
+
export type { TicketCardBadge } from './components/tickets/ticket-card';
|
|
42
|
+
export { TicketCard } from './components/tickets/ticket-card';
|
|
43
|
+
export type { TicketListItem } from './components/tickets/ticket-list';
|
|
44
|
+
export { TicketList } from './components/tickets/ticket-list';
|
|
12
45
|
export { Toaster, toaster } from './components/toaster';
|
|
13
46
|
export { Tooltip } from './components/tooltip';
|
|
14
47
|
export { psTheme } from './theme';
|