Skip to content

Commit

Permalink
fix: unreset tailwind on message content
Browse files Browse the repository at this point in the history
  • Loading branch information
mrevanzak committed Jun 29, 2024
1 parent 980aae7 commit 7c82d6c
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 14 deletions.
Binary file modified bun.lockb
Binary file not shown.
1 change: 1 addition & 0 deletions packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"@nextui-org/scroll-shadow": "^2.1.16",
"@nextui-org/system": "^2.1.2",
"@nextui-org/theme": "^2.2.3",
"@tailwindcss/typography": "^0.5.13",
"ai": "^3.1.12",
"class-variance-authority": "^0.7.0",
"framer-motion": "^11.2.5",
Expand Down
5 changes: 4 additions & 1 deletion packages/ui/src/chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,10 @@ export function Chat({
)}
>
{item.content.includes("</") && item.content.includes(">") ? (
<div dangerouslySetInnerHTML={{ __html: item.content }} />
<div
className="prose"
dangerouslySetInnerHTML={{ __html: item.content }}
/>
) : (
item.content
)}
Expand Down
3 changes: 2 additions & 1 deletion packages/ui/tailwind.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { Config } from "tailwindcss";
import { nextui } from "@nextui-org/theme";
import typography from "@tailwindcss/typography";
import animate from "tailwindcss-animate";

export default {
Expand Down Expand Up @@ -86,5 +87,5 @@ export default {
},
},
},
plugins: [animate, nextui()],
plugins: [animate, nextui(), typography()],
} satisfies Config;
53 changes: 41 additions & 12 deletions yarn.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
# bun ./bun.lockb --hash: A7D2B1DB1E5634E8-d002c3214bb2460c-70CB57C396304ED3-9690181fc19ee3d8
# bun ./bun.lockb --hash: 0D4A343F37377075-f53d2ed627425478-8DB059C59A730498-76627368e8752d06


"@ai-sdk/[email protected]":
Expand Down Expand Up @@ -3911,6 +3911,16 @@
dependencies:
"@t3-oss/env-core" "0.10.1"

"@tailwindcss/typography@^0.5.13":
version "0.5.13"
resolved "https://registry.npmjs.org/@tailwindcss/typography/-/typography-0.5.13.tgz"
integrity sha512-ADGcJ8dX21dVVHIwTRgzrcunY6YY9uSlAHHGVKvkA+vLc5qLwEszvKts40lx7z0qc4clpjclwLeK5rVCV2P/uw==
dependencies:
lodash.merge "^4.6.2"
lodash.castarray "^4.4.0"
lodash.isplainobject "^4.0.6"
postcss-selector-parser "6.0.10"

"@tanstack/[email protected]":
version "5.38.0"
resolved "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.38.0.tgz"
Expand Down Expand Up @@ -3982,6 +3992,7 @@
"@nextui-org/scroll-shadow" "^2.1.16"
"@nextui-org/system" "^2.1.2"
"@nextui-org/theme" "^2.2.3"
"@tailwindcss/typography" "^0.5.13"
ai "^3.1.12"
class-variance-authority "^0.7.0"
framer-motion "^11.2.5"
Expand Down Expand Up @@ -4055,20 +4066,20 @@
resolved "https://registry.npmjs.org/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz"
integrity sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==

"@trpc/[email protected].421+bce4f97e9", "@trpc/client@next":
version "11.0.0-rc.421"
resolved "https://registry.npmjs.org/@trpc/client/-/client-11.0.0-rc.421.tgz"
integrity sha512-Ek9g3EEDtNeU35qgys1M7slyQPjwnAX2hHs8JN2AIXjDyfoT8n+ZdLJlJ8n9aoyGyO2LCFfbfyGhi3MeTMNHtg==
"@trpc/[email protected].433+014d1c839", "@trpc/client@next":
version "11.0.0-rc.433"
resolved "https://registry.npmjs.org/@trpc/client/-/client-11.0.0-rc.433.tgz"
integrity sha512-QEPk14HGP4GK/88v7ORChN2GYbaP+LlCJMQHPRFogaVzapSbiE6C6PN+vNTn8soD28SuPOu+lRzuJszLIuhIPA==

"@trpc/react-query@next":
version "11.0.0-rc.421"
resolved "https://registry.npmjs.org/@trpc/react-query/-/react-query-11.0.0-rc.421.tgz"
integrity sha512-xoArO8tqzDDch4e2aH48bZ0SVHMpstsuhk/S0qTB1WybMV1pjZDnT/9qDQY8WwEkaqdVk/7BXXf94Kg5REAIpA==
version "11.0.0-rc.433"
resolved "https://registry.npmjs.org/@trpc/react-query/-/react-query-11.0.0-rc.433.tgz"
integrity sha512-MXe9C7gq5eId6Uz30M24D11D1zc/As91WVhKZS8i3yb+VERxvRmhfWyGRn7BJvhCApZ/8eKlsKbWq48SrATlhg==

"@trpc/[email protected].421+bce4f97e9", "@trpc/server@next":
version "11.0.0-rc.421"
resolved "https://registry.npmjs.org/@trpc/server/-/server-11.0.0-rc.421.tgz"
integrity sha512-4epaOaNiqvIDuyA7FfjthKcUvFMfFoKwBTUzhu/xLGeSClgLZ0v+1HWRPPWGFLMu1ZKLHMeeySXhnY4yLFlYjw==
"@trpc/[email protected].433+014d1c839", "@trpc/server@next":
version "11.0.0-rc.433"
resolved "https://registry.npmjs.org/@trpc/server/-/server-11.0.0-rc.433.tgz"
integrity sha512-Zfafmbcv9HS/MBhW4O1JSw0b5Dnvm5PkwPviy64hyG9vRoCDPOLYyxRQD7TBdcWecITvjcQjmcdIGjQyNBVNJw==

"@trysound/[email protected]":
version "0.2.0"
Expand Down Expand Up @@ -7548,6 +7559,11 @@ lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.21:
resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz"
integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==

lodash.castarray@^4.4.0:
version "4.4.0"
resolved "https://registry.npmjs.org/lodash.castarray/-/lodash.castarray-4.4.0.tgz"
integrity sha512-aVx8ztPv7/2ULbArGJ2Y42bG1mEQ5mGjpdvrbJcJFU3TbYybe+QlLS4pst9zV52ymy2in1KpFPiZnAOATxD4+Q==

lodash.debounce@^4.0.8:
version "4.0.8"
resolved "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz"
Expand All @@ -7563,6 +7579,11 @@ lodash.get@^4.4.2:
resolved "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz"
integrity sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==

lodash.isplainobject@^4.0.6:
version "4.0.6"
resolved "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz"
integrity sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==

lodash.kebabcase@^4.1.1:
version "4.1.1"
resolved "https://registry.npmjs.org/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz"
Expand Down Expand Up @@ -8424,6 +8445,14 @@ postcss-nested@^6.0.1:
dependencies:
postcss-selector-parser "^6.0.11"

[email protected]:
version "6.0.10"
resolved "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.10.tgz"
integrity sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w==
dependencies:
cssesc "^3.0.0"
util-deprecate "^1.0.2"

postcss-selector-parser@^6.0.11:
version "6.1.0"
resolved "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.0.tgz"
Expand Down

0 comments on commit 7c82d6c

Please sign in to comment.