-
Notifications
You must be signed in to change notification settings - Fork 309
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: core react library styles (#443)
- Loading branch information
Showing
77 changed files
with
762 additions
and
1,028 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@assistant-ui/react": minor | ||
--- | ||
|
||
refactor!: Rename AssistantMessage to ThreadAssistantMessage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@assistant-ui/react": minor | ||
--- | ||
|
||
refactor!: Rename UserMessage to ThreadUserMessage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"@assistant-ui/react-markdown": patch | ||
"@assistant-ui/react": patch | ||
--- | ||
|
||
feat: add styled UI components |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
--- | ||
"@assistant-ui/react-ai-sdk": minor | ||
"@assistant-ui/react-ui": minor | ||
"@assistant-ui/react": minor | ||
--- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
title: Migration to v0.4 | ||
--- | ||
|
||
## ThreadAssistantMessage / ThreadUserMessage | ||
|
||
The type `AssistantMessage` has been renamed to `ThreadAssistantMessage`. | ||
|
||
```diff | ||
- import { AssistantMessage } from "@assistant-ui/react"; | ||
+ import { ThreadAssistantMessage } from "@assistant-ui/react"; | ||
``` | ||
|
||
The type `UserMessage` has been renamed to `ThreadUserMessage`. | ||
|
||
```diff | ||
- import { UserMessage } from "@assistant-ui/react"; | ||
+ import { ThreadUserMessage } from "@assistant-ui/react"; | ||
``` | ||
|
||
The type `AssistantContentPart` has been renamed to `ThreadAssistantContentPart`. | ||
|
||
```diff | ||
- import { AssistantContentPart } from "@assistant-ui/react"; | ||
+ import { ThreadAssistantContentPart } from "@assistant-ui/react"; | ||
``` | ||
|
||
The type `UserContentPart` has been renamed to `ThreadUserContentPart`. | ||
|
||
```diff | ||
- import { UserContentPart } from "@assistant-ui/react"; | ||
+ import { ThreadUserContentPart } from "@assistant-ui/react"; | ||
``` | ||
|
||
## `@assistant-ui/react-ui` is now `@assistant-ui/react` | ||
|
||
```diff | ||
- import { Thread } from "@assistant-ui/react-ui"; | ||
+ import { Thread } from "@assistant-ui/react"; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { build } from "tsup"; | ||
import { copyFileSync, mkdirSync } from "node:fs"; | ||
|
||
// JS | ||
await build({ | ||
entry: ["src/index.ts"], | ||
format: ["cjs", "esm"], | ||
dts: true, | ||
sourcemap: true, | ||
clean: true, | ||
esbuildOptions: (options) => { | ||
options.banner = { | ||
js: '"use client";', | ||
}; | ||
}, | ||
}); | ||
|
||
await build({ | ||
entry: ["src/tailwindcss/index.ts"], | ||
outDir: "dist/tailwindcss", | ||
format: ["cjs", "esm"], | ||
dts: true, | ||
sourcemap: true, | ||
}); | ||
|
||
|
||
// css | ||
|
||
await build({ | ||
entry: ["src/styles/tailwindcss/markdown.css"], | ||
outDir: "dist/styles", | ||
}); | ||
|
||
mkdirSync("dist/styles/tailwindcss", { recursive: true }); | ||
copyFileSync( | ||
"src/styles/tailwindcss/markdown.css", | ||
"dist/styles/tailwindcss/markdown.css", | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,16 @@ | ||
export { | ||
MarkdownTextPrimitive, | ||
type MarkdownTextPrimitiveProps, | ||
} from "./MarkdownText"; | ||
} from "./primitives/MarkdownText"; | ||
|
||
export type { CodeHeaderProps, SyntaxHighlighterProps } from "./types"; | ||
export type { | ||
CodeHeaderProps, | ||
SyntaxHighlighterProps, | ||
} from "./overrides/types"; | ||
|
||
export { | ||
makeMarkdownText, | ||
type MakeMarkdownTextProps, | ||
} from "./ui/markdown-text"; | ||
|
||
export { CodeHeader } from "./ui/code-header"; |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 1 addition & 3 deletions
4
packages/react-markdown/src/withDefaults.tsx → ...t-markdown/src/overrides/withDefaults.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
packages/react-markdown/src/MarkdownText.tsx → ...-markdown/src/primitives/MarkdownText.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import plugin from "tailwindcss/plugin"; | ||
|
||
const auiPlugin = plugin.withOptions<{}>(() => ({ addComponents }) => { | ||
addComponents({ | ||
'@import "@assistant-ui/react-markdown/styles/tailwindcss/markdown.css"': | ||
"", | ||
}); | ||
}); | ||
|
||
export default auiPlugin; |
10 changes: 6 additions & 4 deletions
10
...s/react-ui/src/components/code-header.tsx → ...ges/react-markdown/src/ui/code-header.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 7 additions & 5 deletions
12
...react-ui/src/components/markdown-text.tsx → ...s/react-markdown/src/ui/markdown-text.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.