@pstdio/ui 0.3.1 → 0.4.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 +12 -11
- package/dist/chat-ui.js.map +1 -1
- package/dist/components/attached-panel.d.ts +9 -0
- package/dist/components/attached-panel.utils.d.ts +6 -0
- package/dist/components/bubble-button.d.ts +10 -0
- package/dist/components/bubble-panel.d.ts +18 -0
- package/dist/components/chat-ui/components/chat-panel-sticky-user-message.d.ts +1 -1
- package/dist/components/diff-card.d.ts +3 -0
- package/dist/components/diff-drawer.d.ts +1 -0
- package/dist/components/layout.d.ts +1 -2
- package/dist/components/layout.stories.d.ts +3 -3
- package/dist/components/panel-header.constants.d.ts +1 -0
- package/dist/components/rich-text/markdown-editor/markdown-editor.d.ts +1 -0
- package/dist/components/rich-text/shared/components/content-editable.d.ts +2 -1
- package/dist/components/rich-text/shared/plugins/FloatingTextFormatToolbarPlugin/resolve-block-type.d.ts +17 -0
- package/dist/components/rich-text/shared/transformers/markdown-transformers.d.ts +1 -0
- package/dist/components/searchable-menu.d.ts +35 -2
- package/dist/components/searchable-menu.stories.d.ts +2 -0
- package/dist/components/session-indicator.d.ts +2 -2
- package/dist/components/session-indicator.stories.d.ts +1 -0
- package/dist/components/sidebar/sidebar-footer.d.ts +6 -0
- package/dist/components/sidebar/sidebar-header.d.ts +7 -0
- package/dist/components/sidebar/sidebar-project-menu.d.ts +10 -0
- package/dist/components/sidebar/sidebar.d.ts +2 -0
- package/dist/components/sidebar/sidebar.store.d.ts +47 -0
- package/dist/components/{sidebar-next/sidebar-next.stories.d.ts → sidebar/sidebar.stories.d.ts} +4 -3
- package/dist/components/{sidebar-next/sidebar-next.types.d.ts → sidebar/sidebar.types.d.ts} +3 -2
- package/dist/components/sidebar-tree/sidebar-node-content.d.ts +9 -0
- package/dist/components/sidebar-tree/sidebar-tree.d.ts +1 -1
- package/dist/components/sidebar-tree/sidebar-tree.types.d.ts +10 -2
- package/dist/components/style-guide.stories.d.ts +6 -11
- package/dist/components/tickets/ticket-card.d.ts +2 -7
- package/dist/components/workspace-badge.d.ts +22 -0
- package/dist/components/workspace-badge.stories.d.ts +13 -0
- package/dist/get-file-type-icon-CirIyuE8.js +92 -0
- package/dist/get-file-type-icon-CirIyuE8.js.map +1 -0
- package/dist/index.d.ts +18 -19
- package/dist/index.js +1849 -1743
- package/dist/index.js.map +1 -1
- package/dist/{rich-message-ZT2CEiwt.js → rich-message-Bad4GxH2.js} +520 -503
- package/dist/rich-message-Bad4GxH2.js.map +1 -0
- package/dist/rich-text.js +276 -272
- package/dist/rich-text.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/test-utils/local-storage.d.ts +1 -0
- package/dist/theme/global.d.ts +3 -0
- package/dist/theme/primitives/colors.d.ts +116 -0
- package/dist/theme/recipes/button.d.ts +13 -13
- package/dist/theme/recipes/dialog.d.ts +1 -1
- package/dist/theme/recipes/drawer.d.ts +1 -1
- package/dist/theme/recipes/menu.d.ts +1 -1
- package/dist/theme/recipes/popover.d.ts +1 -1
- package/dist/theme/recipes/tooltip.d.ts +1 -1
- package/dist/theme/tokens/colors.d.ts +162 -8
- package/dist/{theme-BFV2Q048.js → theme-D0VvFB1Y.js} +292 -154
- package/dist/theme-D0VvFB1Y.js.map +1 -0
- package/dist/theme.js +1 -1
- package/package.json +2 -2
- package/dist/components/documentation/docs-changelog.d.ts +0 -20
- package/dist/components/documentation/docs-changelog.stories.d.ts +0 -15
- package/dist/components/documentation/docs-outline.d.ts +0 -13
- package/dist/components/documentation/docs-outline.stories.d.ts +0 -16
- package/dist/components/documentation/docs-pagination.d.ts +0 -10
- package/dist/components/documentation/docs-pagination.stories.d.ts +0 -14
- package/dist/components/documentation/docs-sidebar.d.ts +0 -14
- package/dist/components/documentation/docs-sidebar.stories.d.ts +0 -7
- package/dist/components/panel-menu.d.ts +0 -9
- package/dist/components/panel-menu.stories.d.ts +0 -8
- package/dist/components/sidebar-next/sidebar-next-footer.d.ts +0 -6
- package/dist/components/sidebar-next/sidebar-next-header.d.ts +0 -7
- package/dist/components/sidebar-next/sidebar-next.d.ts +0 -2
- package/dist/components/sidebar-next/sidebar-next.store.d.ts +0 -47
- package/dist/components/sidebar-next/sidebar-next.store.test.d.ts +0 -1
- package/dist/rich-message-ZT2CEiwt.js.map +0 -1
- package/dist/theme-BFV2Q048.js.map +0 -1
- package/dist/tooltip-Dze4WXVl.js +0 -86
- package/dist/tooltip-Dze4WXVl.js.map +0 -1
- /package/dist/components/{chat-ui/components/ai-conversation.test.d.ts → attached-panel.utils.test.d.ts} +0 -0
- /package/dist/components/{chat-ui/components/chat-panel.sticky-user-message.test.d.ts → rich-text/shared/transformers/markdown-transformers.test.d.ts} +0 -0
- /package/dist/components/{searchable-menu.test.d.ts → sidebar/sidebar.store.test.d.ts} +0 -0
package/dist/chat-ui.js
CHANGED
|
@@ -3,9 +3,9 @@ import { c as y } from "react/compiler-runtime";
|
|
|
3
3
|
import { chakra as Pt, AbsoluteCenter as It, IconButton as lt, defineSlotRecipe as vt, createSlotRecipeContext as At, Text as Y, Code as Qe, Button as Se, HStack as ke, Box as k, Flex as $, Tooltip as Ae, Portal as Bt, Kbd as Dt, Spacer as Mt, Timeline as zt, Span as ye, Avatar as ae, Card as E, Link as at, Stack as Te, Spinner as qe, Skeleton as Et } from "@chakra-ui/react";
|
|
4
4
|
import { ArrowDownIcon as $t, ShieldX as Lt, ShieldCheck as Ft, Square as Ot, ArrowUp as Wt, Move as Ht, FileDown as jt, FileUp as Nt, FileDiff as Ut, Trash2 as Vt, FilePen as qt, FileText as Gt, ListTree as Kt, Terminal as ct, File as Xt, Globe as Yt, Search as Jt, AlertTriangle as dt, DotIcon as Qt, ChevronUpIcon as Zt, MessageCircleIcon as en } from "lucide-react";
|
|
5
5
|
import { StickToBottom as tn, useStickToBottomContext as Ge } from "use-stick-to-bottom";
|
|
6
|
-
import { S as ut } from "./
|
|
6
|
+
import { S as ut } from "./get-file-type-icon-CirIyuE8.js";
|
|
7
7
|
import { useRef as Ne, useEffect as Ue, useState as le } from "react";
|
|
8
|
-
import { f as We, P as nn, g as rn, R as ft, h as on } from "./rich-message-
|
|
8
|
+
import { f as We, P as nn, g as rn, R as ft, h as on } from "./rich-message-Bad4GxH2.js";
|
|
9
9
|
import "@lexical/react/LexicalCollaborationContext";
|
|
10
10
|
import "@lexical/react/LexicalCollaborationPlugin";
|
|
11
11
|
import "@lexical/react/LexicalComposer";
|
|
@@ -26,6 +26,7 @@ import "@lexical/utils";
|
|
|
26
26
|
import "react-dom";
|
|
27
27
|
import "@lexical/markdown";
|
|
28
28
|
import "@lexical/react/LexicalAutoFocusPlugin";
|
|
29
|
+
import "@lexical/react/LexicalCheckListPlugin";
|
|
29
30
|
import "@lexical/react/LexicalHistoryPlugin";
|
|
30
31
|
import "@lexical/react/LexicalOnChangePlugin";
|
|
31
32
|
import "@lexical/react/LexicalTreeView";
|
|
@@ -195,7 +196,7 @@ const an = {
|
|
|
195
196
|
if (t == null) return null;
|
|
196
197
|
const e = typeof t == "string" ? t : JSON.stringify(t, null, 2);
|
|
197
198
|
return e.length === 0 ? null : e.length > 200 ? `${e.slice(0, 200)}...` : e;
|
|
198
|
-
},
|
|
199
|
+
}, Ao = (t) => {
|
|
199
200
|
const e = y(19), {
|
|
200
201
|
toolName: n,
|
|
201
202
|
toolInput: r,
|
|
@@ -415,7 +416,7 @@ function Cn(t) {
|
|
|
415
416
|
function _n(t) {
|
|
416
417
|
return t + 1;
|
|
417
418
|
}
|
|
418
|
-
const Rn = (t = "") => JSON.stringify(rn(t)), Pn = 360, In = "min(
|
|
419
|
+
const Rn = (t = "") => JSON.stringify(rn(t)), Pn = 360, In = "min(10vh, 4rem)", vn = (t) => t.parts.reduce((e, n) => n.type !== "text" ? e : e + n.text.length, 0), An = (t) => t.role !== "user" ? !1 : vn(t) > Pn, Bn = (t) => {
|
|
419
420
|
const e = y(8);
|
|
420
421
|
let n, r;
|
|
421
422
|
e[0] !== t ? ({
|
|
@@ -1300,7 +1301,7 @@ const Ur = (t) => t === "user" || t === "assistant" || t === "developer" ? t : "
|
|
|
1300
1301
|
}, st = (t, e) => {
|
|
1301
1302
|
const n = Ur(t.role);
|
|
1302
1303
|
return /* @__PURE__ */ i(V.Root, { from: n, children: /* @__PURE__ */ i(V.Content, { from: n, children: /* @__PURE__ */ i(_t, { message: t, streaming: e }) }) }, t.id);
|
|
1303
|
-
},
|
|
1304
|
+
}, Bo = (t) => {
|
|
1304
1305
|
const e = y(27), {
|
|
1305
1306
|
messages: n,
|
|
1306
1307
|
streaming: r,
|
|
@@ -1386,7 +1387,7 @@ function Kr(t, e) {
|
|
|
1386
1387
|
function Xr() {
|
|
1387
1388
|
return /* @__PURE__ */ new Set();
|
|
1388
1389
|
}
|
|
1389
|
-
const it = (t) => /* @__PURE__ */ i(Te, { gap: "xs", w: "full", children: t.map((e, n) => /* @__PURE__ */ i(Et, { height: "3", width: e, borderRadius: "xs" }, `${e}-${n}`)) }),
|
|
1390
|
+
const it = (t) => /* @__PURE__ */ i(Te, { gap: "xs", w: "full", children: t.map((e, n) => /* @__PURE__ */ i(Et, { height: "3", width: e, borderRadius: "xs" }, `${e}-${n}`)) }), Do = () => {
|
|
1390
1391
|
const t = y(2);
|
|
1391
1392
|
let e;
|
|
1392
1393
|
t[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ i(V.Root, { from: "user", children: /* @__PURE__ */ i(V.Content, { from: "user", children: it(["72%", "46%"]) }) }), t[0] = e) : e = t[0];
|
|
@@ -1395,7 +1396,7 @@ const it = (t) => /* @__PURE__ */ i(Te, { gap: "xs", w: "full", children: t.map(
|
|
|
1395
1396
|
e,
|
|
1396
1397
|
/* @__PURE__ */ i(V.Root, { from: "assistant", children: /* @__PURE__ */ i(V.Content, { from: "assistant", children: it(["76%", "62%", "40%"]) }) })
|
|
1397
1398
|
] }), t[1] = n) : n = t[1], n;
|
|
1398
|
-
},
|
|
1399
|
+
}, Mo = (t) => {
|
|
1399
1400
|
const e = y(14), {
|
|
1400
1401
|
changesLabel: n,
|
|
1401
1402
|
additions: r,
|
|
@@ -1423,14 +1424,14 @@ const it = (t) => /* @__PURE__ */ i(Te, { gap: "xs", w: "full", children: t.map(
|
|
|
1423
1424
|
] }), e[9] = f, e[10] = u, e[11] = p, e[12] = m, e[13] = h) : h = e[13], h;
|
|
1424
1425
|
};
|
|
1425
1426
|
export {
|
|
1426
|
-
|
|
1427
|
+
Ao as ApprovalPrompt,
|
|
1427
1428
|
Sn as AutoScroll,
|
|
1428
1429
|
Tn as ChatInput,
|
|
1429
1430
|
V as ChatMessage,
|
|
1430
|
-
|
|
1431
|
+
Bo as ChatPanel,
|
|
1431
1432
|
He as ChatPrimitives,
|
|
1432
|
-
|
|
1433
|
-
|
|
1433
|
+
Do as ChatSkeleton,
|
|
1434
|
+
Mo as ChatWorkspaceHub,
|
|
1434
1435
|
kn as SendButton,
|
|
1435
1436
|
Rn as createSerializedPromptState
|
|
1436
1437
|
};
|