@bothub-chat/ui 2.57.1-fix-images-685cbff9-2659-4fb3-9442-eeec31ea60bf → 2.57.1-fix-markdown-48845cd2-3694-41a8-8ef4-7ae8b62125d9
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.
|
@@ -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}$$`)
|
|
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,71 +1,71 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@bothub-chat/ui",
|
|
3
|
-
"version": "2.57.1-fix-
|
|
4
|
-
"description": "Bothub UI Components",
|
|
5
|
-
"keywords": [
|
|
6
|
-
"bot",
|
|
7
|
-
"chat",
|
|
8
|
-
"chatgpt",
|
|
9
|
-
"ai",
|
|
10
|
-
"react"
|
|
11
|
-
],
|
|
12
|
-
"repository": {
|
|
13
|
-
"url": "https://github.com/bothubchat/bothub.git",
|
|
14
|
-
"type": "git",
|
|
15
|
-
"directory": "./packages/ui"
|
|
16
|
-
},
|
|
17
|
-
"publishConfig": {
|
|
18
|
-
"access": "public",
|
|
19
|
-
"registry": "https://registry.npmjs.org/"
|
|
20
|
-
},
|
|
21
|
-
"author": "dev2alert <atmpotn@yandex.ru>",
|
|
22
|
-
"license": "MIT",
|
|
23
|
-
"homepage": "https://bothub.chat",
|
|
24
|
-
"files": [
|
|
25
|
-
"./dist",
|
|
26
|
-
"./fonts"
|
|
27
|
-
],
|
|
28
|
-
"type": "module",
|
|
29
|
-
"main": "./dist/index.js",
|
|
30
|
-
"module": "./dist/index.js",
|
|
31
|
-
"types": "./dist/index.d.ts",
|
|
32
|
-
"exports": {
|
|
33
|
-
".": {
|
|
34
|
-
"types": "./dist/index.d.ts",
|
|
35
|
-
"import": "./dist/index.js",
|
|
36
|
-
"default": "./dist/index.js"
|
|
37
|
-
},
|
|
38
|
-
"./components/*": "./dist/components/*",
|
|
39
|
-
"./fonts/*": "./fonts/*",
|
|
40
|
-
"./utils/*": "./dist/utils/*"
|
|
41
|
-
},
|
|
42
|
-
"sideEffects": false,
|
|
43
|
-
"resolutions": {
|
|
44
|
-
"react-helmet/react": "^19.0.0"
|
|
45
|
-
},
|
|
46
|
-
"peerDependencies": {
|
|
47
|
-
"@uidotdev/usehooks": "^2.4.1",
|
|
48
|
-
"react": "19.1.1",
|
|
49
|
-
"react-dom": "19.1.1",
|
|
50
|
-
"react-helmet": ">=2",
|
|
51
|
-
"styled-components": "^6.0.7"
|
|
52
|
-
},
|
|
53
|
-
"dependencies": {
|
|
54
|
-
"@dnd-kit/core": "^6.1.0",
|
|
55
|
-
"@floating-ui/react": "^0.26.16",
|
|
56
|
-
"@floating-ui/react-dom": "^2.1.0",
|
|
57
|
-
"@react-spring/web": "^10",
|
|
58
|
-
"date-fns": "^3.6.0",
|
|
59
|
-
"highlight.js": "^11.11.0",
|
|
60
|
-
"katex": "^0.16.10",
|
|
61
|
-
"marked": "^16.2.1",
|
|
62
|
-
"normalize.css": "^8.0.1",
|
|
63
|
-
"rc-slider": "^11.1.8",
|
|
64
|
-
"react-markdown": "^10.0.0",
|
|
65
|
-
"rehype-katex": "^7.0.0",
|
|
66
|
-
"remark-gfm": "^4.0.1",
|
|
67
|
-
"remark-math": "^6.0.0",
|
|
68
|
-
"tslib": "^2.6.2",
|
|
69
|
-
"unist-util-visit": "^5.0.0"
|
|
70
|
-
}
|
|
71
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@bothub-chat/ui",
|
|
3
|
+
"version": "2.57.1-fix-markdown-48845cd2-3694-41a8-8ef4-7ae8b62125d9",
|
|
4
|
+
"description": "Bothub UI Components",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"bot",
|
|
7
|
+
"chat",
|
|
8
|
+
"chatgpt",
|
|
9
|
+
"ai",
|
|
10
|
+
"react"
|
|
11
|
+
],
|
|
12
|
+
"repository": {
|
|
13
|
+
"url": "https://github.com/bothubchat/bothub.git",
|
|
14
|
+
"type": "git",
|
|
15
|
+
"directory": "./packages/ui"
|
|
16
|
+
},
|
|
17
|
+
"publishConfig": {
|
|
18
|
+
"access": "public",
|
|
19
|
+
"registry": "https://registry.npmjs.org/"
|
|
20
|
+
},
|
|
21
|
+
"author": "dev2alert <atmpotn@yandex.ru>",
|
|
22
|
+
"license": "MIT",
|
|
23
|
+
"homepage": "https://bothub.chat",
|
|
24
|
+
"files": [
|
|
25
|
+
"./dist",
|
|
26
|
+
"./fonts"
|
|
27
|
+
],
|
|
28
|
+
"type": "module",
|
|
29
|
+
"main": "./dist/index.js",
|
|
30
|
+
"module": "./dist/index.js",
|
|
31
|
+
"types": "./dist/index.d.ts",
|
|
32
|
+
"exports": {
|
|
33
|
+
".": {
|
|
34
|
+
"types": "./dist/index.d.ts",
|
|
35
|
+
"import": "./dist/index.js",
|
|
36
|
+
"default": "./dist/index.js"
|
|
37
|
+
},
|
|
38
|
+
"./components/*": "./dist/components/*",
|
|
39
|
+
"./fonts/*": "./fonts/*",
|
|
40
|
+
"./utils/*": "./dist/utils/*"
|
|
41
|
+
},
|
|
42
|
+
"sideEffects": false,
|
|
43
|
+
"resolutions": {
|
|
44
|
+
"react-helmet/react": "^19.0.0"
|
|
45
|
+
},
|
|
46
|
+
"peerDependencies": {
|
|
47
|
+
"@uidotdev/usehooks": "^2.4.1",
|
|
48
|
+
"react": "19.1.1",
|
|
49
|
+
"react-dom": "19.1.1",
|
|
50
|
+
"react-helmet": ">=2",
|
|
51
|
+
"styled-components": "^6.0.7"
|
|
52
|
+
},
|
|
53
|
+
"dependencies": {
|
|
54
|
+
"@dnd-kit/core": "^6.1.0",
|
|
55
|
+
"@floating-ui/react": "^0.26.16",
|
|
56
|
+
"@floating-ui/react-dom": "^2.1.0",
|
|
57
|
+
"@react-spring/web": "^10",
|
|
58
|
+
"date-fns": "^3.6.0",
|
|
59
|
+
"highlight.js": "^11.11.0",
|
|
60
|
+
"katex": "^0.16.10",
|
|
61
|
+
"marked": "^16.2.1",
|
|
62
|
+
"normalize.css": "^8.0.1",
|
|
63
|
+
"rc-slider": "^11.1.8",
|
|
64
|
+
"react-markdown": "^10.0.0",
|
|
65
|
+
"rehype-katex": "^7.0.0",
|
|
66
|
+
"remark-gfm": "^4.0.1",
|
|
67
|
+
"remark-math": "^6.0.0",
|
|
68
|
+
"tslib": "^2.6.2",
|
|
69
|
+
"unist-util-visit": "^5.0.0"
|
|
70
|
+
}
|
|
71
|
+
}
|