@assistant-ui/react 0.7.59 → 0.7.61
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cloud/auiV0.d.ts +2 -2
- package/dist/cloud/auiV0.d.ts.map +1 -1
- package/dist/cloud/auiV0.js.map +1 -1
- package/dist/cloud/auiV0.mjs.map +1 -1
- package/dist/primitives/threadList/ThreadListRoot.d.ts +12 -0
- package/dist/primitives/threadList/ThreadListRoot.d.ts.map +1 -0
- package/dist/primitives/threadList/ThreadListRoot.js +37 -0
- package/dist/primitives/threadList/ThreadListRoot.js.map +1 -0
- package/dist/primitives/threadList/ThreadListRoot.mjs +12 -0
- package/dist/primitives/threadList/ThreadListRoot.mjs.map +1 -0
- package/dist/primitives/threadList/index.d.ts +1 -0
- package/dist/primitives/threadList/index.d.ts.map +1 -1
- package/dist/primitives/threadList/index.js +5 -2
- package/dist/primitives/threadList/index.js.map +1 -1
- package/dist/primitives/threadList/index.mjs +3 -1
- package/dist/primitives/threadList/index.mjs.map +1 -1
- package/dist/runtimes/external-store/ThreadMessageLike.d.ts +11 -10
- package/dist/runtimes/external-store/ThreadMessageLike.d.ts.map +1 -1
- package/dist/runtimes/external-store/ThreadMessageLike.js +8 -6
- package/dist/runtimes/external-store/ThreadMessageLike.js.map +1 -1
- package/dist/runtimes/external-store/ThreadMessageLike.mjs +8 -6
- package/dist/runtimes/external-store/ThreadMessageLike.mjs.map +1 -1
- package/dist/runtimes/external-store/index.d.ts +1 -1
- package/dist/runtimes/external-store/index.d.ts.map +1 -1
- package/dist/runtimes/external-store/index.js +2 -0
- package/dist/runtimes/external-store/index.js.map +1 -1
- package/dist/runtimes/external-store/index.mjs +5 -1
- package/dist/runtimes/external-store/index.mjs.map +1 -1
- package/dist/styles/index.css +12 -12
- package/dist/styles/index.css.map +1 -1
- package/dist/styles/tailwindcss/base-components.css +3 -3
- package/dist/styles/tailwindcss/base-components.css.json +2 -2
- package/dist/styles/tailwindcss/thread.css +1 -1
- package/dist/styles/tailwindcss/thread.css.json +1 -1
- package/dist/tailwindcss/index.d.ts.map +1 -1
- package/dist/tailwindcss/index.js +1 -2
- package/dist/tailwindcss/index.js.map +1 -1
- package/dist/tailwindcss/index.mjs +1 -2
- package/dist/tailwindcss/index.mjs.map +1 -1
- package/dist/ui/thread-list.d.ts +3 -1
- package/dist/ui/thread-list.d.ts.map +1 -1
- package/dist/ui/thread-list.js +1 -1
- package/dist/ui/thread-list.js.map +1 -1
- package/dist/ui/thread-list.mjs +1 -1
- package/dist/ui/thread-list.mjs.map +1 -1
- package/dist/ui/thread-welcome.js +1 -1
- package/dist/ui/thread-welcome.js.map +1 -1
- package/dist/ui/thread-welcome.mjs +1 -1
- package/dist/ui/thread-welcome.mjs.map +1 -1
- package/package.json +2 -2
- package/src/cloud/auiV0.ts +5 -2
- package/src/primitives/threadList/ThreadListRoot.tsx +18 -0
- package/src/primitives/threadList/index.ts +1 -0
- package/src/runtimes/external-store/ThreadMessageLike.tsx +19 -20
- package/src/runtimes/external-store/index.ts +4 -1
- package/src/styles/tailwindcss/base-components.css +3 -3
- package/src/styles/tailwindcss/thread.css +1 -1
- package/src/tailwindcss/index.ts +1 -4
- package/src/ui/thread-list.tsx +1 -1
- package/src/ui/thread-welcome.tsx +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/ui/thread-welcome.tsx"],"sourcesContent":["\"use client\";\n\nimport { ComponentPropsWithoutRef, forwardRef, type FC } from \"react\";\nimport { withDefaults } from \"./utils/withDefaults\";\nimport { Avatar } from \"./base/avatar\";\nimport { SuggestionConfig, useThreadConfig } from \"./thread-config\";\nimport { ThreadPrimitive } from \"../primitives\";\nimport { useThread } from \"../context\";\n\nconst ThreadWelcome: FC = () => {\n return (\n <ThreadWelcomeRoot>\n <ThreadWelcomeCenter>\n <ThreadWelcomeAvatar />\n <ThreadWelcomeMessage />\n </ThreadWelcomeCenter>\n <ThreadWelcomeSuggestions />\n </ThreadWelcomeRoot>\n );\n};\n\nThreadWelcome.displayName = \"ThreadWelcome\";\n\nconst ThreadWelcomeRootStyled = withDefaults(\"div\", {\n className: \"aui-thread-welcome-root\",\n});\n\nconst ThreadWelcomeCenter = withDefaults(\"div\", {\n className: \"aui-thread-welcome-center\",\n});\n\nnamespace ThreadWelcomeRoot {\n export type Element = HTMLDivElement;\n export type Props = ComponentPropsWithoutRef<\"div\">;\n}\n\nconst ThreadWelcomeRoot = forwardRef<\n ThreadWelcomeRoot.Element,\n ThreadWelcomeRoot.Props\n>((props, ref) => {\n return (\n <ThreadPrimitive.Empty>\n <ThreadWelcomeRootStyled {...props} ref={ref} />\n </ThreadPrimitive.Empty>\n );\n});\n\nThreadWelcomeRoot.displayName = \"ThreadWelcomeRoot\";\n\nconst ThreadWelcomeAvatar: FC = () => {\n const { assistantAvatar: avatar = { fallback: \"A\" } } = useThreadConfig();\n return <Avatar {...avatar} />;\n};\n\nconst ThreadWelcomeMessageStyled = withDefaults(\"p\", {\n className: \"aui-thread-welcome-message\",\n});\n\nnamespace ThreadWelcomeMessage {\n export type Element = HTMLParagraphElement;\n export type Props = Omit<\n ComponentPropsWithoutRef<typeof ThreadWelcomeMessageStyled>,\n \"children\"\n > & { message?: string | undefined };\n}\n\nconst ThreadWelcomeMessage = forwardRef<\n ThreadWelcomeMessage.Element,\n ThreadWelcomeMessage.Props\n>(({ message: messageProp, ...rest }, ref) => {\n const {\n welcome: { message } = {},\n strings: {\n welcome: { message: defaultMessage = \"How can I help you today?\" } = {},\n } = {},\n } = useThreadConfig();\n return (\n <ThreadWelcomeMessageStyled {...rest} ref={ref}>\n {messageProp ?? message ?? defaultMessage}\n </ThreadWelcomeMessageStyled>\n );\n});\n\nThreadWelcomeMessage.displayName = \"ThreadWelcomeMessage\";\n\nconst ThreadWelcomeSuggestionContainer = withDefaults(\"div\", {\n className: \"aui-thread-welcome-
|
1
|
+
{"version":3,"sources":["../../src/ui/thread-welcome.tsx"],"sourcesContent":["\"use client\";\n\nimport { ComponentPropsWithoutRef, forwardRef, type FC } from \"react\";\nimport { withDefaults } from \"./utils/withDefaults\";\nimport { Avatar } from \"./base/avatar\";\nimport { SuggestionConfig, useThreadConfig } from \"./thread-config\";\nimport { ThreadPrimitive } from \"../primitives\";\nimport { useThread } from \"../context\";\n\nconst ThreadWelcome: FC = () => {\n return (\n <ThreadWelcomeRoot>\n <ThreadWelcomeCenter>\n <ThreadWelcomeAvatar />\n <ThreadWelcomeMessage />\n </ThreadWelcomeCenter>\n <ThreadWelcomeSuggestions />\n </ThreadWelcomeRoot>\n );\n};\n\nThreadWelcome.displayName = \"ThreadWelcome\";\n\nconst ThreadWelcomeRootStyled = withDefaults(\"div\", {\n className: \"aui-thread-welcome-root\",\n});\n\nconst ThreadWelcomeCenter = withDefaults(\"div\", {\n className: \"aui-thread-welcome-center\",\n});\n\nnamespace ThreadWelcomeRoot {\n export type Element = HTMLDivElement;\n export type Props = ComponentPropsWithoutRef<\"div\">;\n}\n\nconst ThreadWelcomeRoot = forwardRef<\n ThreadWelcomeRoot.Element,\n ThreadWelcomeRoot.Props\n>((props, ref) => {\n return (\n <ThreadPrimitive.Empty>\n <ThreadWelcomeRootStyled {...props} ref={ref} />\n </ThreadPrimitive.Empty>\n );\n});\n\nThreadWelcomeRoot.displayName = \"ThreadWelcomeRoot\";\n\nconst ThreadWelcomeAvatar: FC = () => {\n const { assistantAvatar: avatar = { fallback: \"A\" } } = useThreadConfig();\n return <Avatar {...avatar} />;\n};\n\nconst ThreadWelcomeMessageStyled = withDefaults(\"p\", {\n className: \"aui-thread-welcome-message\",\n});\n\nnamespace ThreadWelcomeMessage {\n export type Element = HTMLParagraphElement;\n export type Props = Omit<\n ComponentPropsWithoutRef<typeof ThreadWelcomeMessageStyled>,\n \"children\"\n > & { message?: string | undefined };\n}\n\nconst ThreadWelcomeMessage = forwardRef<\n ThreadWelcomeMessage.Element,\n ThreadWelcomeMessage.Props\n>(({ message: messageProp, ...rest }, ref) => {\n const {\n welcome: { message } = {},\n strings: {\n welcome: { message: defaultMessage = \"How can I help you today?\" } = {},\n } = {},\n } = useThreadConfig();\n return (\n <ThreadWelcomeMessageStyled {...rest} ref={ref}>\n {messageProp ?? message ?? defaultMessage}\n </ThreadWelcomeMessageStyled>\n );\n});\n\nThreadWelcomeMessage.displayName = \"ThreadWelcomeMessage\";\n\nconst ThreadWelcomeSuggestionContainer = withDefaults(\"div\", {\n className: \"aui-thread-welcome-suggestions\",\n});\n\nconst ThreadWelcomeSuggestionStyled = withDefaults(ThreadPrimitive.Suggestion, {\n className: \"aui-thread-welcome-suggestion\",\n});\n\nexport namespace ThreadWelcomeSuggestion {\n export type Props = {\n suggestion: SuggestionConfig;\n };\n}\n\nconst ThreadWelcomeSuggestion: FC<ThreadWelcomeSuggestion.Props> = ({\n suggestion: { text, prompt },\n}) => {\n return (\n <ThreadWelcomeSuggestionStyled prompt={prompt} method=\"replace\" autoSend>\n <span className=\"aui-thread-welcome-suggestion-text\">\n {text ?? prompt}\n </span>\n </ThreadWelcomeSuggestionStyled>\n );\n};\n\nconst ThreadWelcomeSuggestions: FC = () => {\n const suggestions2 = useThread((t) => t.suggestions);\n const { welcome: { suggestions } = {} } = useThreadConfig();\n\n const finalSuggestions = suggestions2.length ? suggestions2 : suggestions;\n\n return (\n <ThreadWelcomeSuggestionContainer>\n {finalSuggestions?.map((suggestion, idx) => {\n const key = `${suggestion.prompt}-${idx}`;\n return <ThreadWelcomeSuggestion key={key} suggestion={suggestion} />;\n })}\n </ThreadWelcomeSuggestionContainer>\n );\n};\n\nThreadWelcomeSuggestions.displayName = \"ThreadWelcomeSuggestions\";\n\nconst exports = {\n Root: ThreadWelcomeRoot,\n Center: ThreadWelcomeCenter,\n Avatar: ThreadWelcomeAvatar,\n Message: ThreadWelcomeMessage,\n Suggestions: ThreadWelcomeSuggestions,\n Suggestion: ThreadWelcomeSuggestion,\n};\n\nexport default Object.assign(ThreadWelcome, exports) as typeof ThreadWelcome &\n typeof exports;\n"],"mappings":";;;AAEA,SAAmC,kBAA2B;AAC9D,SAAS,oBAAoB;AAC7B,SAAS,cAAc;AACvB,SAA2B,uBAAuB;AAClD,SAAS,uBAAuB;AAChC,SAAS,iBAAiB;AAKpB,SACE,KADF;AAHN,IAAM,gBAAoB,MAAM;AAC9B,SACE,qBAAC,qBACC;AAAA,yBAAC,uBACC;AAAA,0BAAC,uBAAoB;AAAA,MACrB,oBAAC,wBAAqB;AAAA,OACxB;AAAA,IACA,oBAAC,4BAAyB;AAAA,KAC5B;AAEJ;AAEA,cAAc,cAAc;AAE5B,IAAM,0BAA0B,aAAa,OAAO;AAAA,EAClD,WAAW;AACb,CAAC;AAED,IAAM,sBAAsB,aAAa,OAAO;AAAA,EAC9C,WAAW;AACb,CAAC;AAOD,IAAM,oBAAoB,WAGxB,CAAC,OAAO,QAAQ;AAChB,SACE,oBAAC,gBAAgB,OAAhB,EACC,8BAAC,2BAAyB,GAAG,OAAO,KAAU,GAChD;AAEJ,CAAC;AAED,kBAAkB,cAAc;AAEhC,IAAM,sBAA0B,MAAM;AACpC,QAAM,EAAE,iBAAiB,SAAS,EAAE,UAAU,IAAI,EAAE,IAAI,gBAAgB;AACxE,SAAO,oBAAC,UAAQ,GAAG,QAAQ;AAC7B;AAEA,IAAM,6BAA6B,aAAa,KAAK;AAAA,EACnD,WAAW;AACb,CAAC;AAUD,IAAM,uBAAuB,WAG3B,CAAC,EAAE,SAAS,aAAa,GAAG,KAAK,GAAG,QAAQ;AAC5C,QAAM;AAAA,IACJ,SAAS,EAAE,QAAQ,IAAI,CAAC;AAAA,IACxB,SAAS;AAAA,MACP,SAAS,EAAE,SAAS,iBAAiB,4BAA4B,IAAI,CAAC;AAAA,IACxE,IAAI,CAAC;AAAA,EACP,IAAI,gBAAgB;AACpB,SACE,oBAAC,8BAA4B,GAAG,MAAM,KACnC,yBAAe,WAAW,gBAC7B;AAEJ,CAAC;AAED,qBAAqB,cAAc;AAEnC,IAAM,mCAAmC,aAAa,OAAO;AAAA,EAC3D,WAAW;AACb,CAAC;AAED,IAAM,gCAAgC,aAAa,gBAAgB,YAAY;AAAA,EAC7E,WAAW;AACb,CAAC;AAQD,IAAM,0BAA6D,CAAC;AAAA,EAClE,YAAY,EAAE,MAAM,OAAO;AAC7B,MAAM;AACJ,SACE,oBAAC,iCAA8B,QAAgB,QAAO,WAAU,UAAQ,MACtE,8BAAC,UAAK,WAAU,sCACb,kBAAQ,QACX,GACF;AAEJ;AAEA,IAAM,2BAA+B,MAAM;AACzC,QAAM,eAAe,UAAU,CAAC,MAAM,EAAE,WAAW;AACnD,QAAM,EAAE,SAAS,EAAE,YAAY,IAAI,CAAC,EAAE,IAAI,gBAAgB;AAE1D,QAAM,mBAAmB,aAAa,SAAS,eAAe;AAE9D,SACE,oBAAC,oCACE,4BAAkB,IAAI,CAAC,YAAY,QAAQ;AAC1C,UAAM,MAAM,GAAG,WAAW,MAAM,IAAI,GAAG;AACvC,WAAO,oBAAC,2BAAkC,cAAL,GAA6B;AAAA,EACpE,CAAC,GACH;AAEJ;AAEA,yBAAyB,cAAc;AAEvC,IAAM,UAAU;AAAA,EACd,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,aAAa;AAAA,EACb,YAAY;AACd;AAEA,IAAO,yBAAQ,OAAO,OAAO,eAAe,OAAO;","names":[]}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@assistant-ui/react",
|
3
|
-
"description": "React
|
3
|
+
"description": "Typescript/React library for AI Chat",
|
4
4
|
"keywords": [
|
5
5
|
"radix-ui",
|
6
6
|
"nextjs",
|
@@ -29,7 +29,7 @@
|
|
29
29
|
"conversational-ui",
|
30
30
|
"conversational-ai"
|
31
31
|
],
|
32
|
-
"version": "0.7.
|
32
|
+
"version": "0.7.61",
|
33
33
|
"license": "MIT",
|
34
34
|
"exports": {
|
35
35
|
".": {
|
package/src/cloud/auiV0.ts
CHANGED
@@ -4,7 +4,10 @@ import { MessageStatus } from "../types/AssistantTypes";
|
|
4
4
|
import { fromThreadMessageLike } from "../runtimes/external-store/ThreadMessageLike";
|
5
5
|
import { CloudMessage } from "./AssistantCloudThreadMessages";
|
6
6
|
import { isJSONValue } from "../utils/json/is-json";
|
7
|
-
import {
|
7
|
+
import {
|
8
|
+
ReadonlyJSONObject,
|
9
|
+
ReadonlyJSONValue,
|
10
|
+
} from "../utils/json/json-value";
|
8
11
|
import { ExportedMessageRepositoryItem } from "../runtimes/utils/MessageRepository";
|
9
12
|
|
10
13
|
type AuiV0MessageContentPart =
|
@@ -16,7 +19,7 @@ type AuiV0MessageContentPart =
|
|
16
19
|
readonly type: "tool-call";
|
17
20
|
readonly toolCallId: string;
|
18
21
|
readonly toolName: string;
|
19
|
-
readonly args:
|
22
|
+
readonly args: ReadonlyJSONObject;
|
20
23
|
readonly result?: ReadonlyJSONValue;
|
21
24
|
readonly isError?: true;
|
22
25
|
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { Primitive } from "@radix-ui/react-primitive";
|
2
|
+
import { ComponentPropsWithoutRef, ComponentRef, forwardRef } from "react";
|
3
|
+
|
4
|
+
type PrimitiveDivProps = ComponentPropsWithoutRef<typeof Primitive.div>;
|
5
|
+
|
6
|
+
export namespace ThreadListPrimitiveRoot {
|
7
|
+
export type Element = ComponentRef<typeof Primitive.div>;
|
8
|
+
export type Props = PrimitiveDivProps;
|
9
|
+
}
|
10
|
+
|
11
|
+
export const ThreadListPrimitiveRoot = forwardRef<
|
12
|
+
ThreadListPrimitiveRoot.Element,
|
13
|
+
ThreadListPrimitiveRoot.Props
|
14
|
+
>((props, ref) => {
|
15
|
+
return <Primitive.div {...props} ref={ref} />;
|
16
|
+
});
|
17
|
+
|
18
|
+
ThreadListPrimitiveRoot.displayName = "ThreadListPrimitive.Root";
|
@@ -1,8 +1,8 @@
|
|
1
|
+
import { generateId } from "../../internal";
|
1
2
|
import {
|
2
3
|
MessageStatus,
|
3
4
|
TextContentPart,
|
4
5
|
ImageContentPart,
|
5
|
-
ToolCallContentPart,
|
6
6
|
UIContentPart,
|
7
7
|
ThreadMessage,
|
8
8
|
ThreadAssistantContentPart,
|
@@ -14,11 +14,11 @@ import {
|
|
14
14
|
FileContentPart,
|
15
15
|
Unstable_AudioContentPart,
|
16
16
|
} from "../../types";
|
17
|
+
import { ThreadStep } from "../../types/AssistantTypes";
|
17
18
|
import {
|
18
|
-
|
19
|
-
|
20
|
-
} from "../../
|
21
|
-
import { ReadonlyJSONValue } from "../../utils/json/json-value";
|
19
|
+
ReadonlyJSONObject,
|
20
|
+
ReadonlyJSONValue,
|
21
|
+
} from "../../utils/json/json-value";
|
22
22
|
import { parsePartialJson } from "../../utils/json/parse-partial-json";
|
23
23
|
|
24
24
|
export type ThreadMessageLike = {
|
@@ -30,15 +30,14 @@ export type ThreadMessageLike = {
|
|
30
30
|
| ImageContentPart
|
31
31
|
| FileContentPart
|
32
32
|
| Unstable_AudioContentPart
|
33
|
-
| ToolCallContentPart<any, any>
|
34
|
-
| CoreToolCallContentPart<any, any>
|
35
33
|
| {
|
36
|
-
type: "tool-call";
|
37
|
-
toolCallId
|
38
|
-
toolName: string;
|
39
|
-
|
40
|
-
|
41
|
-
|
34
|
+
readonly type: "tool-call";
|
35
|
+
readonly toolCallId?: string;
|
36
|
+
readonly toolName: string;
|
37
|
+
readonly args?: ReadonlyJSONObject;
|
38
|
+
readonly argsText?: string;
|
39
|
+
readonly result?: any | undefined;
|
40
|
+
readonly isError?: boolean | undefined;
|
42
41
|
}
|
43
42
|
| UIContentPart
|
44
43
|
)[];
|
@@ -100,19 +99,19 @@ export const fromThreadMessageLike = (
|
|
100
99
|
return part;
|
101
100
|
|
102
101
|
case "tool-call": {
|
103
|
-
if (
|
104
|
-
if ("args" in part) {
|
105
|
-
return part;
|
106
|
-
}
|
107
|
-
|
102
|
+
if (part.args) {
|
108
103
|
return {
|
109
104
|
...part,
|
110
|
-
|
105
|
+
toolCallId: part.toolCallId ?? "tool-" + generateId(),
|
106
|
+
args: part.args,
|
107
|
+
argsText: JSON.stringify(part.args),
|
111
108
|
};
|
112
109
|
}
|
113
110
|
return {
|
114
111
|
...part,
|
115
|
-
|
112
|
+
toolCallId: part.toolCallId ?? "tool-" + generateId(),
|
113
|
+
args: part.args ?? parsePartialJson(part.argsText ?? ""),
|
114
|
+
argsText: part.argsText ?? "",
|
116
115
|
};
|
117
116
|
}
|
118
117
|
|
@@ -4,7 +4,10 @@ export type {
|
|
4
4
|
} from "./ExternalStoreAdapter";
|
5
5
|
export type { ThreadMessageLike } from "./ThreadMessageLike";
|
6
6
|
export { useExternalStoreRuntime } from "./useExternalStoreRuntime";
|
7
|
-
export {
|
7
|
+
export {
|
8
|
+
getExternalStoreMessage,
|
9
|
+
getExternalStoreMessages,
|
10
|
+
} from "./getExternalStoreMessage";
|
8
11
|
export {
|
9
12
|
useExternalMessageConverter,
|
10
13
|
convertExternalMessages as unstable_convertExternalMessages,
|
@@ -8,7 +8,7 @@
|
|
8
8
|
|
9
9
|
/* shadcn-ui/button */
|
10
10
|
.aui-button {
|
11
|
-
@apply focus-visible:ring-aui-ring inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 disabled:pointer-events-none disabled:opacity-50;
|
11
|
+
@apply focus-visible:ring-aui-ring inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0;
|
12
12
|
}
|
13
13
|
|
14
14
|
.aui-button-primary {
|
@@ -53,7 +53,7 @@
|
|
53
53
|
/* shadcn-ui/tooltip */
|
54
54
|
|
55
55
|
.aui-tooltip-content {
|
56
|
-
@apply bg-aui-
|
56
|
+
@apply bg-aui-primary text-aui-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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 z-50 overflow-hidden rounded-md px-3 py-1.5 text-xs;
|
57
57
|
}
|
58
58
|
|
59
59
|
/* shadcn-ui/dialog */
|
@@ -65,5 +65,5 @@
|
|
65
65
|
.aui-dialog-content {
|
66
66
|
@apply 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] fixed left-[50%] top-[50%] z-50;
|
67
67
|
@apply grid translate-x-[-50%] translate-y-[-50%] shadow-lg duration-200;
|
68
|
-
/* @apply w-full bg-background max-w-lg gap-4 border p-6 sm:rounded-lg; */
|
68
|
+
/* @apply w-full bg-aui-background max-w-lg gap-4 border p-6 sm:rounded-lg; */
|
69
69
|
}
|
package/src/tailwindcss/index.ts
CHANGED
@@ -78,15 +78,12 @@ const auiPlugin = plugin.withOptions<AssisstantTailwindPluginOptions>(
|
|
78
78
|
}
|
79
79
|
},
|
80
80
|
({
|
81
|
-
components = ["assistant-modal", "thread"],
|
82
81
|
colors = {},
|
83
82
|
shadcn = false,
|
84
83
|
} = {}) => {
|
85
84
|
const prefix = !shadcn ? "--aui-" : "--";
|
86
85
|
return {
|
87
|
-
|
88
|
-
? { safelist: [{ pattern: /^aui-/ }] }
|
89
|
-
: undefined),
|
86
|
+
safelist: [{ pattern: /^aui-/ }],
|
90
87
|
theme: {
|
91
88
|
extend: {
|
92
89
|
maxWidth: {
|
package/src/ui/thread-list.tsx
CHANGED
@@ -18,7 +18,7 @@ const ThreadList: FC = () => {
|
|
18
18
|
);
|
19
19
|
};
|
20
20
|
|
21
|
-
const ThreadListRoot = withDefaults(
|
21
|
+
const ThreadListRoot = withDefaults(ThreadListPrimitive.Root, {
|
22
22
|
className: "aui-root aui-thread-list-root",
|
23
23
|
});
|
24
24
|
ThreadListRoot.displayName = "ThreadListRoot";
|
@@ -84,7 +84,7 @@ const ThreadWelcomeMessage = forwardRef<
|
|
84
84
|
ThreadWelcomeMessage.displayName = "ThreadWelcomeMessage";
|
85
85
|
|
86
86
|
const ThreadWelcomeSuggestionContainer = withDefaults("div", {
|
87
|
-
className: "aui-thread-welcome-
|
87
|
+
className: "aui-thread-welcome-suggestions",
|
88
88
|
});
|
89
89
|
|
90
90
|
const ThreadWelcomeSuggestionStyled = withDefaults(ThreadPrimitive.Suggestion, {
|