2
0

💄 Better parsing of lists and code in streaming bubbles

This commit is contained in:
Baptiste Arnaud
2023-10-06 19:41:31 +02:00
parent 4746e38cb2
commit 877a58dac2
6 changed files with 21 additions and 8 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "@typebot.io/js", "name": "@typebot.io/js",
"version": "0.2.1", "version": "0.2.2",
"description": "Javascript library to display typebots on your website", "description": "Javascript library to display typebots on your website",
"type": "module", "type": "module",
"main": "dist/index.js", "main": "dist/index.js",

View File

@ -100,10 +100,9 @@ a {
ul, ul,
ol { ol {
list-style-position: inside; margin-inline-start: 0px;
display: flex; margin-inline-end: 0px;
flex-direction: column; padding-inline-start: 40px;
gap: 12px;
} }
ol { ol {
@ -114,6 +113,19 @@ ul {
list-style-type: disc; list-style-type: disc;
} }
li:not(:last-child) {
margin-bottom: 8px;
}
pre {
white-space: pre-wrap;
word-wrap: break-word;
overflow-wrap: break-word;
max-height: 100%;
max-width: 100%;
overflow: auto;
}
.slate-bold { .slate-bold {
font-weight: bold; font-weight: bold;
} }

View File

@ -117,6 +117,7 @@ export const ChatChunk = (props: Props) => {
<div <div
class="flex flex-col flex-1 gap-2" class="flex flex-col flex-1 gap-2"
style={{ style={{
width: isMobile() ? 'calc(100% - 32px)' : 'calc(100% - 48px)',
'margin-right': props.theme.chat.guestAvatar?.isEnabled 'margin-right': props.theme.chat.guestAvatar?.isEnabled
? isMobile() ? isMobile()
? '32px' ? '32px'

View File

@ -28,7 +28,7 @@ export const StreamingBubble = (props: Props) => {
return ( return (
<div class="flex flex-col animate-fade-in"> <div class="flex flex-col animate-fade-in">
<div class="flex w-full items-center"> <div class="flex w-full items-center">
<div class="flex relative items-start typebot-host-bubble"> <div class="flex relative items-start typebot-host-bubble w-full">
<div <div
class="flex items-center absolute px-4 py-2 bubble-typing " class="flex items-center absolute px-4 py-2 bubble-typing "
style={{ style={{

View File

@ -1,6 +1,6 @@
{ {
"name": "@typebot.io/nextjs", "name": "@typebot.io/nextjs",
"version": "0.2.1", "version": "0.2.2",
"description": "Convenient library to display typebots on your Next.js website", "description": "Convenient library to display typebots on your Next.js website",
"main": "dist/index.js", "main": "dist/index.js",
"types": "dist/index.d.ts", "types": "dist/index.d.ts",

View File

@ -1,6 +1,6 @@
{ {
"name": "@typebot.io/react", "name": "@typebot.io/react",
"version": "0.2.1", "version": "0.2.2",
"description": "Convenient library to display typebots on your React app", "description": "Convenient library to display typebots on your React app",
"main": "dist/index.js", "main": "dist/index.js",
"types": "dist/index.d.ts", "types": "dist/index.d.ts",