@parallelworks/ui 0.27.0 → 0.29.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/ai/adapter/types.d.ts +5 -0
- package/dist/ai/components/ChatSidebar.js +92 -176
- package/dist/ai/core/parts.js +20 -0
- package/dist/ai/index.d.ts +2 -1
- package/dist/ai/index.js +3 -2
- package/dist/ai/strings.d.ts +2 -0
- package/dist/ai/strings.js +2 -0
- package/dist/ai/ui/ConversationSidebar.d.ts +58 -0
- package/dist/ai/ui/ConversationSidebar.js +162 -0
- package/dist/ai/ui/Notice.d.ts +8 -0
- package/dist/ai/ui/Notice.js +27 -1
- package/dist/ai/ui/sidebar.d.ts +2 -2
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/ai/ui/Notice.js
CHANGED
|
@@ -56,6 +56,32 @@ function NoticeBar({ tone, title, children, action, onAction, testId }) {
|
|
|
56
56
|
]
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
|
+
/** What a command printed, kept verbatim under the command that printed it. */
|
|
60
|
+
function OutputCard({ title, text, onDismiss, dismissLabel, testId }) {
|
|
61
|
+
return /* @__PURE__ */ jsxs("section", {
|
|
62
|
+
"data-testid": testId,
|
|
63
|
+
"aria-label": title,
|
|
64
|
+
className: "relative my-3 rounded-lg border theme-border theme-muted-panel px-3 py-2",
|
|
65
|
+
children: [
|
|
66
|
+
/* @__PURE__ */ jsx("p", {
|
|
67
|
+
className: cx("font-mono text-[11px] theme-muted-text", onDismiss && "pr-6"),
|
|
68
|
+
children: title
|
|
69
|
+
}),
|
|
70
|
+
/* @__PURE__ */ jsx("pre", {
|
|
71
|
+
className: "mt-1 whitespace-pre-wrap break-words font-mono text-xs theme-text",
|
|
72
|
+
children: text
|
|
73
|
+
}),
|
|
74
|
+
onDismiss && /* @__PURE__ */ jsx("button", {
|
|
75
|
+
type: "button",
|
|
76
|
+
onClick: onDismiss,
|
|
77
|
+
"aria-label": dismissLabel,
|
|
78
|
+
title: dismissLabel,
|
|
79
|
+
className: "absolute top-1.5 right-1.5 rounded p-1 theme-muted-text hover:theme-hover",
|
|
80
|
+
children: /* @__PURE__ */ jsx(IoMdClose, { className: "h-3.5 w-3.5" })
|
|
81
|
+
})
|
|
82
|
+
]
|
|
83
|
+
});
|
|
84
|
+
}
|
|
59
85
|
/** An inline notice next to the composer. One with no dismiss states a fact
|
|
60
86
|
* that is still true; one with a dismiss is a message the reader can put away. */
|
|
61
87
|
function NoticeCard({ tone = "neutral", children, onDismiss, dismissLabel, testId }) {
|
|
@@ -76,4 +102,4 @@ function NoticeCard({ tone = "neutral", children, onDismiss, dismissLabel, testI
|
|
|
76
102
|
});
|
|
77
103
|
}
|
|
78
104
|
//#endregion
|
|
79
|
-
export { NoticeBar, NoticeCard };
|
|
105
|
+
export { NoticeBar, NoticeCard, OutputCard };
|
package/dist/ai/ui/sidebar.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export declare function SidebarPanel({ collapsed, width, railWidth, resizing, la
|
|
|
8
8
|
width?: number;
|
|
9
9
|
railWidth?: number;
|
|
10
10
|
resizing?: boolean;
|
|
11
|
-
label?: string;
|
|
11
|
+
label?: string | undefined;
|
|
12
12
|
className?: string;
|
|
13
13
|
style?: CSSProperties;
|
|
14
14
|
children: ReactNode;
|
|
@@ -24,7 +24,7 @@ export declare function SidebarGroupHeading({ children, tone, testId, }: {
|
|
|
24
24
|
children: ReactNode;
|
|
25
25
|
/** 'attention' is for the group the reader is being asked to act on. */
|
|
26
26
|
tone?: 'default' | 'attention';
|
|
27
|
-
testId?: string;
|
|
27
|
+
testId?: string | undefined;
|
|
28
28
|
}): import("react").JSX.Element;
|
|
29
29
|
/** One entry in the list: the row highlights while it is the open one or
|
|
30
30
|
* while its menu is up, and the menu opens from its button or a right-click. */
|