@bothub-chat/ui 2.57.1 → 2.57.5-develop-64d1ac94-7c06-4035-a1a5-8b5ac4278d2f

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.
package/README.md CHANGED
@@ -1,24 +1,24 @@
1
- <p align="center">
2
- <img src="https://bothub.chat/icon-144x144.png" />
3
- </p>
4
- <h1 align="center">Bothub Chat</h1>
5
- <p align="center">UI Components from Bothub.</p>
6
- <p align="center">
7
- <a href="https://bothub-docs.vercel.app/">Documentation</a>
8
- </p>
9
-
10
- <h2>Installing</h2>
11
- <p>Preliminary requirements:</p>
12
- <ul>
13
- <li><a href="https://nodejs.org/">Node.js</a> >= <code>18.12.1</code></li>
14
- <li><a href="https://www.npmjs.com/">npm</a> >= <code>9.1.2</code></li>
15
- <li><a href="https://yarnpkg.com/">yarn</a> >= <code>1.22.19</code></li>
16
- </ul>
17
- <p>Installing peer dependencies:</p>
18
- <pre>yarn add framer-motion@10.16.3 react@18.2.0 react-dom@18.2.0 styled-components@6.0.7 react-helmet@6.1.0 normalize.css@8.0.1 react-slider@2.0.6 react-markdown@8.0.5 highlight.js@11.9.0 react-highlight@0.15.0</pre>
19
- <p>Installing package:</p>
20
- <pre>yarn add @bothub-chat/ui</pre>
21
-
22
-
23
- <h2>License</h2>
1
+ <p align="center">
2
+ <img src="https://bothub.chat/icon-144x144.png" />
3
+ </p>
4
+ <h1 align="center">Bothub Chat</h1>
5
+ <p align="center">UI Components from Bothub.</p>
6
+ <p align="center">
7
+ <a href="https://bothub-docs.vercel.app/">Documentation</a>
8
+ </p>
9
+
10
+ <h2>Installing</h2>
11
+ <p>Preliminary requirements:</p>
12
+ <ul>
13
+ <li><a href="https://nodejs.org/">Node.js</a> >= <code>18.12.1</code></li>
14
+ <li><a href="https://www.npmjs.com/">npm</a> >= <code>9.1.2</code></li>
15
+ <li><a href="https://yarnpkg.com/">yarn</a> >= <code>1.22.19</code></li>
16
+ </ul>
17
+ <p>Installing peer dependencies:</p>
18
+ <pre>yarn add framer-motion@10.16.3 react@18.2.0 react-dom@18.2.0 styled-components@6.0.7 react-helmet@6.1.0 normalize.css@8.0.1 react-slider@2.0.6 react-markdown@8.0.5 highlight.js@11.9.0 react-highlight@0.15.0</pre>
19
+ <p>Installing package:</p>
20
+ <pre>yarn add @bothub-chat/ui</pre>
21
+
22
+
23
+ <h2>License</h2>
24
24
  <p><a href="https://github.com/matbea-dev/bothub/blob/main/LICENSE">MIT</a></p>
@@ -1,6 +1,7 @@
1
1
  import{styled as e,css as o}from"styled-components";import{Typography as t}from"../../../typography/index.js";const r=e(t).withConfig({displayName:"styled__MessageParagraphStyled",componentId:"sc-1iz0fdp-0"})(["color:",";"," "," &::selection{","}"],({theme:e,$variant:o,$color:t})=>"user"===o?"custom"===e.scheme?e.colors.custom.message.user.text:"standard"===e.scheme?e.colors.base.white:e.bright?"dark"===e.mode?e.colors.base.black:e.colors.base.white:e.default.colors.base.white:"custom"===e.scheme?e.colors.custom.message.assistant.text:e.colors.base.white,({$disableMargin:e})=>!e&&o`
2
2
  margin: 10px 0px;
3
3
  `,({$wrap:e})=>e&&o`
4
+ word-break: keep-all;
4
5
  white-space: pre-wrap;
5
6
  `,({$variant:e,$color:t})=>{switch(e){case"user":return o`
6
7
  background: ${({theme:e})=>"light"===e.mode?e.colors.accent.primaryLight:e.colors.base.white};
@@ -1 +1 @@
1
- import{jsx as t,jsxs as o,Fragment as e}from"react/jsx-runtime";import{forwardRef as n,useMemo as s}from"react";import r from"react-markdown";import{useMessage as i}from"../context.js";import"tslib";import"styled-components";import"../components/code/inline/styled.js";import"../components/code/multiline/styled.js";import"@react-spring/web";import"react-dom";import"../../portal/styled.js";import"../../tooltip/styled.js";import"../../tooltip/arrow/styled.js";import"../../../theme/index.js";import"../../tooltip/context.js";import"../components/code/multiline/copy/styled.js";import"../../../icons/check-small/index.js";import"../../../icons/copy/index.js";import"../components/code/multiline/content/styled.js";import{MessageParagraph as m}from"../components/paragraph/index.js";import"../components/bold/styled.js";import"../components/italic/styled.js";import"../components/pre/styled.js";import"../components/table/styled.js";import"../components/table/cell/styled.js";import"../components/list/styled.js";import"../components/list/context.js";import"../components/list/item/styled.js";import"../components/title/styled.js";import"../components/link/styled.js";import"../components/image/styled.js";import"../components/image/context.js";import"../components/image/grid/styled.js";import"../components/image/button/styled.js";import"../components/image/button/list/styled.js";import{MessageMarkdownStyled as p,MessageMarkdownLine as l}from"./styled.js";import{markdownComponents as c}from"./markdown-components.js";import{useMarkdownPlugins as d}from"./useMarkdownPlugins.js";const a=n(({children:n,components:a={},componentsOverride:j={},disableTyping:y=!1,forceMarkdown:g=!1},h)=>{const{typing:$,variant:u,color:f}=i(),x=!g&&"user"===u,b=s(()=>"string"!=typeof n||x?n:n.replace(/\\\[((.|[\r\n])*?)\\\]/g,(t,o)=>`$$${o}$$`).replace(/\\\(((.|[\r\n])*?)\\\)/g,(t,o)=>`$$${o}$$`).replace(/<!--.*-->/g,""),[n,x]),{remarkPlugins:k,rehypePlugins:w,singleDollarTextMath:M}=d({children:b}),P=s(()=>{const o=b.split("\n\n"),e=[];let n=!1;for(const t of o)n?e[e.length-1]+=`${t}\n\n`:t.match(/\n*\s*```/g)?(n=!n,n&&e.push(`${t}\n\n`)):e.push(t);return t(p,{ref:h,children:e.map((o,e)=>t(l,{$typing:!y&&$,$color:f,$singleDollarTextMath:M,children:t(r,{remarkPlugins:k,rehypePlugins:w,components:c(a,j),children:o},`${w.length}-${k.length}-${e}`)},`${w.length}-${k.length}-${e}`))})},[$,b,M,k,w,h]);return o(e,{children:[x&&"string"==typeof n&&t(m,{wrap:!0,disableMargin:!0,children:b}),!x&&"string"==typeof n&&P]})});export{a as MessageMarkdown};
1
+ import{jsx as t,jsxs as o,Fragment as e}from"react/jsx-runtime";import{forwardRef as n,useMemo as s}from"react";import r from"react-markdown";import{useMessage as i}from"../context.js";import"tslib";import"styled-components";import"../components/code/inline/styled.js";import"../components/code/multiline/styled.js";import"@react-spring/web";import"react-dom";import"../../portal/styled.js";import"../../tooltip/styled.js";import"../../tooltip/arrow/styled.js";import"../../../theme/index.js";import"../../tooltip/context.js";import"../components/code/multiline/copy/styled.js";import"../../../icons/check-small/index.js";import"../../../icons/copy/index.js";import"../components/code/multiline/content/styled.js";import{MessageParagraph as m}from"../components/paragraph/index.js";import"../components/bold/styled.js";import"../components/italic/styled.js";import"../components/pre/styled.js";import"../components/table/styled.js";import"../components/table/cell/styled.js";import"../components/list/styled.js";import"../components/list/context.js";import"../components/list/item/styled.js";import"../components/title/styled.js";import"../components/link/styled.js";import"../components/image/styled.js";import"../components/image/context.js";import"../components/image/grid/styled.js";import"../components/image/button/styled.js";import"../components/image/button/list/styled.js";import{MessageMarkdownStyled as p,MessageMarkdownLine as l}from"./styled.js";import{markdownComponents as c}from"./markdown-components.js";import{useMarkdownPlugins as d}from"./useMarkdownPlugins.js";const a=n(({children:n,components:a={},componentsOverride:j={},disableTyping:y=!1,forceMarkdown:g=!1},h)=>{const{typing:$,variant:u,color:f}=i(),x=!g&&"user"===u,b=s(()=>"string"!=typeof n||x?n:n.replace(/\\\[((.|[\r\n])*?)\\\]/g,(t,o)=>`$$${o}$$`).replace(/\\\(((.|[\r\n])*?)\\\)/g,(t,o)=>`$$${o}$$`),[n,x]),{remarkPlugins:k,rehypePlugins:w,singleDollarTextMath:M}=d({children:b}),P=s(()=>{const o=b.split("\n\n"),e=[];let n=!1;for(const t of o)n?e[e.length-1]+=`${t}\n\n`:t.match(/\n*\s*```/g)?(n=!n,n&&e.push(`${t}\n\n`)):e.push(t);return t(p,{ref:h,children:e.map((o,e)=>t(l,{$typing:!y&&$,$color:f,$singleDollarTextMath:M,children:t(r,{remarkPlugins:k,rehypePlugins:w,components:c(a,j),children:o},`${w.length}-${k.length}-${e}`)},`${w.length}-${k.length}-${e}`))})},[$,b,M,k,w,h]);return o(e,{children:[x&&"string"==typeof n&&t(m,{wrap:!0,disableMargin:!0,children:b}),!x&&"string"==typeof n&&P]})});export{a as MessageMarkdown};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bothub-chat/ui",
3
- "version": "2.57.1",
3
+ "version": "2.57.5-develop-64d1ac94-7c06-4035-a1a5-8b5ac4278d2f",
4
4
  "description": "Bothub UI Components",
5
5
  "keywords": [
6
6
  "bot",