@examplary/ui 1.51.0 → 1.53.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.
|
@@ -37,8 +37,8 @@ export var ChatView = function (_a) {
|
|
|
37
37
|
}, [botAvatar]);
|
|
38
38
|
return (_jsxs("div", __assign({ className: cn("flex flex-col gap-3 items-start", className) }, props, { children: [messages
|
|
39
39
|
.filter(function (_a) {
|
|
40
|
-
var role = _a.role;
|
|
41
|
-
return role !== "system";
|
|
40
|
+
var role = _a.role, hidden = _a.hidden;
|
|
41
|
+
return role !== "system" && !hidden;
|
|
42
42
|
})
|
|
43
43
|
.map(function (item, index) { return (_jsxs(Fragment, { children: [_jsxs("div", { className: "flex gap-3 w-full", children: [item.role === "assistant" && assistantIcon, _jsxs("div", { className: cn("text-sm flex gap-1 group", "max-w-[85%] border rounded-3xl px-4 py-3", "animate-in slide-in-from-top", item.role === "user" &&
|
|
44
44
|
"bg-white border-border ml-auto rounded-tr-sm", item.role !== "user" &&
|
|
@@ -29,7 +29,7 @@ export var Popover = PopoverPrimitive.Root;
|
|
|
29
29
|
export var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
30
30
|
export var PopoverContent = React.forwardRef(function (_a, ref) {
|
|
31
31
|
var className = _a.className, _b = _a.align, align = _b === void 0 ? "center" : _b, _c = _a.sideOffset, sideOffset = _c === void 0 ? 4 : _c, props = __rest(_a, ["className", "align", "sideOffset"]);
|
|
32
|
-
return (_jsx(PopoverPrimitive.Portal, { children: _jsx(PopoverPrimitive.Content, __assign({ ref: ref, align: align, sideOffset: sideOffset, className: cn("z-50 min-w-64 max-w-80 rounded-xl border shadow-xl border-border-accent bg-white p-4 font-base text-text outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", className) }, props)) }));
|
|
32
|
+
return (_jsx(PopoverPrimitive.Portal, { children: _jsx(PopoverPrimitive.Content, __assign({ ref: ref, align: align, sideOffset: sideOffset, collisionPadding: 8, className: cn("z-50 min-w-64 max-w-80 rounded-xl border shadow-xl border-border-accent bg-white p-4 font-base text-text outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", className) }, props)) }));
|
|
33
33
|
});
|
|
34
34
|
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
35
35
|
export var PopoverItem = function (_a) {
|
|
@@ -5,13 +5,20 @@ type Answer = {
|
|
|
5
5
|
completed?: boolean;
|
|
6
6
|
context?: any;
|
|
7
7
|
};
|
|
8
|
-
type
|
|
8
|
+
type SharedApiInstance = AxiosInstance & {
|
|
9
9
|
uploadFile: (accept?: string) => Promise<any>;
|
|
10
|
-
|
|
10
|
+
ai: {
|
|
11
|
+
generate: (
|
|
12
|
+
/** The messages to send to the AI model */
|
|
13
|
+
messages: any[],
|
|
14
|
+
/** An optional JSON schema to validate the AI response against */
|
|
15
|
+
schema?: any) => Promise<any>;
|
|
16
|
+
};
|
|
11
17
|
};
|
|
12
|
-
type
|
|
13
|
-
|
|
18
|
+
type OrgApiInstance = SharedApiInstance & {
|
|
19
|
+
uploadPickedFile: (file: File) => Promise<any>;
|
|
14
20
|
};
|
|
21
|
+
type PublicApiInstance = SharedApiInstance;
|
|
15
22
|
export type FrontendComponentEnvironment = "exam" | "practice-space";
|
|
16
23
|
export type FrontendBaseComponentProps = {
|
|
17
24
|
t: (key: string | string[], options?: any) => string;
|