reachat 3.1.0 → 3.2.0
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/dist/{CSVFileRenderer-C2E4Xnkz.js → CSVFileRenderer-Darm68BZ.js} +2 -2
- package/dist/{CSVFileRenderer-C2E4Xnkz.js.map → CSVFileRenderer-Darm68BZ.js.map} +1 -1
- package/dist/ChatContext.d.ts +1 -1
- package/dist/ChatInput/ChatInput.d.ts +4 -0
- package/dist/ChatInput/FileInput.d.ts +4 -0
- package/dist/{DefaultFileRenderer-Day12qYs.js → DefaultFileRenderer-BrFdb4JQ.js} +2 -2
- package/dist/{DefaultFileRenderer-Day12qYs.js.map → DefaultFileRenderer-BrFdb4JQ.js.map} +1 -1
- package/dist/Markdown/CodeHighlighter.d.ts +4 -0
- package/dist/Markdown/Markdown.d.ts +5 -0
- package/dist/SessionMessages/SessionMessage/SessionMessage.d.ts +4 -0
- package/dist/SessionMessages/SessionMessages.d.ts +26 -1
- package/dist/docs.json +217 -4
- package/dist/{index-CZSBRZbI.js → index-iuJAmrEE.js} +75 -49
- package/dist/index-iuJAmrEE.js.map +1 -0
- package/dist/index.css +35 -8
- package/dist/index.d.ts +2 -0
- package/dist/index.js +9 -8
- package/dist/index.umd.cjs +66 -40
- package/dist/index.umd.cjs.map +1 -1
- package/dist/theme.d.ts +10 -0
- package/dist/utils/index.d.ts +1 -0
- package/package.json +2 -2
- package/dist/index-CZSBRZbI.js.map +0 -1
|
@@ -2,7 +2,7 @@ import { jsxs, jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { useState, useRef, useEffect } from "react";
|
|
4
4
|
import { AnimatePresence, motion } from "motion/react";
|
|
5
|
-
import { a as SvgCopy } from "./index-
|
|
5
|
+
import { a as SvgCopy } from "./index-iuJAmrEE.js";
|
|
6
6
|
import { IconButton } from "reablocks";
|
|
7
7
|
const sanitizeSVGCell = (cell) => {
|
|
8
8
|
const trimmed = cell.trim();
|
|
@@ -138,4 +138,4 @@ const CSVFileRenderer = ({ name, url, fileIcon }) => {
|
|
|
138
138
|
export {
|
|
139
139
|
CSVFileRenderer as default
|
|
140
140
|
};
|
|
141
|
-
//# sourceMappingURL=CSVFileRenderer-
|
|
141
|
+
//# sourceMappingURL=CSVFileRenderer-Darm68BZ.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CSVFileRenderer-C2E4Xnkz.js","sources":["../src/utils/sanitize.ts","../src/utils/parseCSV.ts","../src/assets/download.svg?react","../src/SessionMessages/SessionMessage/MessageFile/renderers/CSVFileRenderer.tsx"],"sourcesContent":["\n/**\n * Sanitizes cell content to prevent CSV injection and other potential vulnerabilities.\n * Based on the documentation of OWASP for CSV Injection\n * https://owasp.org/www-community/attacks/CSV_Injection\n * @param cell The cell content to sanitize.\n * @returns The sanitized cell content.\n */\nexport const sanitizeSVGCell = (cell: string): string => {\n const trimmed = cell.trim();\n // Escape double quotes by doubling them\n const escaped = trimmed.replace(/\"/g, '\"\"');\n // Add single quote prefix only for potentially dangerous content\n const prefix = /^[=+\\-@]/.test(trimmed) ? '\\'' : '';\n // Only wrap in quotes if the content contains special characters\n const needsQuotes = /[\",\\n\\r]/.test(escaped) || prefix;\n\n return needsQuotes ? `\"${prefix}${escaped}\"` : escaped;\n};\n","import { sanitizeSVGCell } from './sanitize';\n\n/**\n * Parses a CSV string from a local file and returns an array of rows.\n * Sanitizes cell data to prevent injection attacks.\n * @param csvString The raw CSV string content to parse.\n * @returns The parsed CSV data as a 2D array of strings.\n */\nexport const parseCSV = (csvString: string): string[][] => {\n try {\n const rows = csvString.split('\\n');\n return rows.map((row) => row.split(',').map((cell) => sanitizeSVGCell(cell)));\n } catch (error) {\n console.error('Error parsing CSV:', error);\n throw new Error('Failed to parse CSV file.');\n }\n};\n","import * as React from \"react\";\nconst SvgDownload = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: 24, height: 24, viewBox: \"0 0 24 24\", fill: \"none\", stroke: \"currentColor\", strokeWidth: 1, strokeLinecap: \"round\", strokeLinejoin: \"round\", className: \"lucide lucide-cloud-download\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242\" }), /* @__PURE__ */ React.createElement(\"path\", { d: \"M12 12v9\" }), /* @__PURE__ */ React.createElement(\"path\", { d: \"m8 17 4 4 4-4\" }));\nexport default SvgDownload;\n","import { FC, useEffect, useState, ReactElement, useRef } from 'react';\nimport { motion, AnimatePresence } from 'motion/react';\nimport { parseCSV } from '@/utils/parseCSV';\nimport DownloadIcon from '@/assets/download.svg?react';\nimport PlaceholderIcon from '@/assets/copy.svg?react';\nimport { IconButton } from 'reablocks';\n\ninterface CSVFileRendererProps {\n /**\n * Name of the file.\n */\n name?: string;\n\n /**\n * URL of the file.\n */\n url: string;\n\n /**\n * Icon to for file type.\n */\n fileIcon?: ReactElement;\n}\n\n/**\n * Renderer for CSV files that fetches and displays a snippet of the file data.\n */\nconst CSVFileRenderer: FC<CSVFileRendererProps> = ({ name, url, fileIcon }) => {\n const [isLoading, setIsLoading] = useState<boolean>(true);\n const [csvData, setCsvData] = useState<string[][]>([]);\n const [error, setError] = useState<string | null>(null);\n const [isModalOpen, setIsModalOpen] = useState(false);\n const modalRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const fetchCsvData = async () => {\n try {\n setIsLoading(true);\n const response = await fetch(url);\n const data = parseCSV(await response.text());\n setCsvData(data);\n } catch {\n setError('Failed to load CSV file.');\n } finally {\n setIsLoading(false);\n }\n };\n\n fetchCsvData();\n }, [url]);\n\n const toggleModal = () => {\n setIsModalOpen(prev => !prev);\n };\n\n const handleClickOutside = (event: MouseEvent) => {\n if (modalRef.current && !modalRef.current.contains(event.target as Node)) {\n setIsModalOpen(false);\n }\n };\n\n useEffect(() => {\n if (isModalOpen) {\n document.addEventListener('mousedown', handleClickOutside);\n } else {\n document.removeEventListener('mousedown', handleClickOutside);\n }\n return () => {\n document.removeEventListener('mousedown', handleClickOutside);\n };\n }, [isModalOpen]);\n\n const downloadCSV = () => {\n if (csvData.length === 0) return;\n\n const csvContent = csvData.map(row => row.join(',')).join('\\n');\n const blob = new Blob([csvContent], { type: 'text/csv;charset=utf-8;' });\n const url = URL.createObjectURL(blob);\n const link = document.createElement('a');\n link.href = url;\n link.setAttribute('download', `${name || 'data'}`);\n document.body.appendChild(link);\n link.click();\n document.body.removeChild(link);\n };\n\n const renderTable = (data: string[][], maxRows?: number) => (\n <motion.table\n layout\n className=\"w-full\"\n transition={{ type: 'spring', stiffness: 100, damping: 20 }}\n >\n <thead className=\"sticky top-0 bg-gray-200 dark:bg-gray-800 z-10\">\n <tr>\n <th className=\"py-4 px-6\">#</th>\n {data[0].map((header, index) => (\n <th key={`header-${index}`} className=\"py-4 px-6\">\n {header}\n </th>\n ))}\n </tr>\n </thead>\n <tbody>\n {data.slice(1, maxRows).map((row, rowIndex) => (\n <tr\n key={`row-${rowIndex}`}\n className=\"border-b border-panel-accent light:border-gray-700 hover:bg-panel-accent hover:light:bg-gray-700/40 transition-colors text-base\"\n >\n <td className=\"py-4 px-6\">{rowIndex + 1}</td>\n {row.map((cell, cellIndex) => (\n <td key={`cell-${rowIndex}-${cellIndex}`} className=\"py-4 px-6\">\n {cell}\n </td>\n ))}\n </tr>\n ))}\n </tbody>\n </motion.table>\n );\n\n return (\n <div className=\"flex flex-col gap-2\">\n <div className=\"flex justify-between items-center gap-4\">\n <div className=\"csv-icon flex items-center\">\n {fileIcon}\n {name && <figcaption className=\"ml-1\">{name}</figcaption>}\n </div>\n <div className=\"csv-icon flex items-center gap-6\">\n <IconButton size=\"small\" variant=\"text\" onClick={downloadCSV}>\n <DownloadIcon />\n </IconButton>\n <IconButton size=\"small\" variant=\"text\" onClick={toggleModal}>\n <PlaceholderIcon />\n </IconButton>\n </div>\n </div>\n\n {error && <div className=\"error-message\">{error}</div>}\n\n {isLoading && !csvData && (\n <div className=\"text-text-secondary\">Loading...</div>\n )}\n\n <div className=\"flex justify-between\">\n {!error && csvData.length > 0 && renderTable(csvData, 6)}\n </div>\n\n <AnimatePresence>\n {isModalOpen && (\n <motion.div\n className=\"fixed inset-0 bg-black/70 flex justify-center items-center z-50\"\n initial={{ opacity: 0 }}\n animate={{ opacity: 1 }}\n exit={{ opacity: 0 }}\n transition={{ duration: 0.3 }}\n >\n <motion.div\n ref={modalRef}\n className=\"bg-white dark:bg-gray-900 rounded-md w-11/12 h-5/6 overflow-auto\"\n initial={{ scale: 0.8 }}\n animate={{ scale: 1 }}\n exit={{ scale: 0.8 }}\n transition={{ duration: 0.3 }}\n >\n {!error && csvData.length > 0 && renderTable(csvData)}\n </motion.div>\n </motion.div>\n )}\n </AnimatePresence>\n </div>\n );\n};\n\nexport default CSVFileRenderer;\n"],"names":["url","DownloadIcon","PlaceholderIcon"],"mappings":";;;;;;AAQO,MAAM,kBAAkB,CAAC,SAAyB;AACvD,QAAM,UAAU,KAAK,KAAA;AAErB,QAAM,UAAU,QAAQ,QAAQ,MAAM,IAAI;AAE1C,QAAM,SAAS,WAAW,KAAK,OAAO,IAAI,MAAO;AAEjD,QAAM,cAAc,WAAW,KAAK,OAAO,KAAK;AAEhD,SAAO,cAAc,IAAI,MAAM,GAAG,OAAO,MAAM;AACjD;ACVO,MAAM,WAAW,CAAC,cAAkC;AACzD,MAAI;AACF,UAAM,OAAO,UAAU,MAAM,IAAI;AACjC,WAAO,KAAK,IAAI,CAAC,QAAQ,IAAI,MAAM,GAAG,EAAE,IAAI,CAAC,SAAS,gBAAgB,IAAI,CAAC,CAAC;AAAA,EAC9E,SAAS,OAAO;AACd,YAAQ,MAAM,sBAAsB,KAAK;AACzC,UAAM,IAAI,MAAM,2BAA2B;AAAA,EAC7C;AACF;ACfA,MAAM,cAAc,CAAC,UAA0B,sBAAM,cAAc,OAAO,EAAE,OAAO,8BAA8B,OAAO,IAAI,QAAQ,IAA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;AAAA,QACjB,YAAY,EAAE,UAAU,IAAA;AAAA,QAExB,UAAA;AAAA,UAAC,OAAO;AAAA,UAAP;AAAA,YACC,KAAK;AAAA,YACL,WAAU;AAAA,YACV,SAAS,EAAE,OAAO,IAAA;AAAA,YAClB,SAAS,EAAE,OAAO,EAAA;AAAA,YAClB,MAAM,EAAE,OAAO,IAAA;AAAA,YACf,YAAY,EAAE,UAAU,IAAA;AAAA,YAEvB,WAAC,SAAS,QAAQ,SAAS,KAAK,YAAY,OAAO;AAAA,UAAA;AAAA,QAAA;AAAA,MACtD;AAAA,IAAA,EACF,CAEJ;AAAA,EAAA,GACF;AAEJ;"}
|
|
1
|
+
{"version":3,"file":"CSVFileRenderer-Darm68BZ.js","sources":["../src/utils/sanitize.ts","../src/utils/parseCSV.ts","../src/assets/download.svg?react","../src/SessionMessages/SessionMessage/MessageFile/renderers/CSVFileRenderer.tsx"],"sourcesContent":["\n/**\n * Sanitizes cell content to prevent CSV injection and other potential vulnerabilities.\n * Based on the documentation of OWASP for CSV Injection\n * https://owasp.org/www-community/attacks/CSV_Injection\n * @param cell The cell content to sanitize.\n * @returns The sanitized cell content.\n */\nexport const sanitizeSVGCell = (cell: string): string => {\n const trimmed = cell.trim();\n // Escape double quotes by doubling them\n const escaped = trimmed.replace(/\"/g, '\"\"');\n // Add single quote prefix only for potentially dangerous content\n const prefix = /^[=+\\-@]/.test(trimmed) ? '\\'' : '';\n // Only wrap in quotes if the content contains special characters\n const needsQuotes = /[\",\\n\\r]/.test(escaped) || prefix;\n\n return needsQuotes ? `\"${prefix}${escaped}\"` : escaped;\n};\n","import { sanitizeSVGCell } from './sanitize';\n\n/**\n * Parses a CSV string from a local file and returns an array of rows.\n * Sanitizes cell data to prevent injection attacks.\n * @param csvString The raw CSV string content to parse.\n * @returns The parsed CSV data as a 2D array of strings.\n */\nexport const parseCSV = (csvString: string): string[][] => {\n try {\n const rows = csvString.split('\\n');\n return rows.map((row) => row.split(',').map((cell) => sanitizeSVGCell(cell)));\n } catch (error) {\n console.error('Error parsing CSV:', error);\n throw new Error('Failed to parse CSV file.');\n }\n};\n","import * as React from \"react\";\nconst SvgDownload = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: 24, height: 24, viewBox: \"0 0 24 24\", fill: \"none\", stroke: \"currentColor\", strokeWidth: 1, strokeLinecap: \"round\", strokeLinejoin: \"round\", className: \"lucide lucide-cloud-download\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242\" }), /* @__PURE__ */ React.createElement(\"path\", { d: \"M12 12v9\" }), /* @__PURE__ */ React.createElement(\"path\", { d: \"m8 17 4 4 4-4\" }));\nexport default SvgDownload;\n","import { FC, useEffect, useState, ReactElement, useRef } from 'react';\nimport { motion, AnimatePresence } from 'motion/react';\nimport { parseCSV } from '@/utils/parseCSV';\nimport DownloadIcon from '@/assets/download.svg?react';\nimport PlaceholderIcon from '@/assets/copy.svg?react';\nimport { IconButton } from 'reablocks';\n\ninterface CSVFileRendererProps {\n /**\n * Name of the file.\n */\n name?: string;\n\n /**\n * URL of the file.\n */\n url: string;\n\n /**\n * Icon to for file type.\n */\n fileIcon?: ReactElement;\n}\n\n/**\n * Renderer for CSV files that fetches and displays a snippet of the file data.\n */\nconst CSVFileRenderer: FC<CSVFileRendererProps> = ({ name, url, fileIcon }) => {\n const [isLoading, setIsLoading] = useState<boolean>(true);\n const [csvData, setCsvData] = useState<string[][]>([]);\n const [error, setError] = useState<string | null>(null);\n const [isModalOpen, setIsModalOpen] = useState(false);\n const modalRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const fetchCsvData = async () => {\n try {\n setIsLoading(true);\n const response = await fetch(url);\n const data = parseCSV(await response.text());\n setCsvData(data);\n } catch {\n setError('Failed to load CSV file.');\n } finally {\n setIsLoading(false);\n }\n };\n\n fetchCsvData();\n }, [url]);\n\n const toggleModal = () => {\n setIsModalOpen(prev => !prev);\n };\n\n const handleClickOutside = (event: MouseEvent) => {\n if (modalRef.current && !modalRef.current.contains(event.target as Node)) {\n setIsModalOpen(false);\n }\n };\n\n useEffect(() => {\n if (isModalOpen) {\n document.addEventListener('mousedown', handleClickOutside);\n } else {\n document.removeEventListener('mousedown', handleClickOutside);\n }\n return () => {\n document.removeEventListener('mousedown', handleClickOutside);\n };\n }, [isModalOpen]);\n\n const downloadCSV = () => {\n if (csvData.length === 0) return;\n\n const csvContent = csvData.map(row => row.join(',')).join('\\n');\n const blob = new Blob([csvContent], { type: 'text/csv;charset=utf-8;' });\n const url = URL.createObjectURL(blob);\n const link = document.createElement('a');\n link.href = url;\n link.setAttribute('download', `${name || 'data'}`);\n document.body.appendChild(link);\n link.click();\n document.body.removeChild(link);\n };\n\n const renderTable = (data: string[][], maxRows?: number) => (\n <motion.table\n layout\n className=\"w-full\"\n transition={{ type: 'spring', stiffness: 100, damping: 20 }}\n >\n <thead className=\"sticky top-0 bg-gray-200 dark:bg-gray-800 z-10\">\n <tr>\n <th className=\"py-4 px-6\">#</th>\n {data[0].map((header, index) => (\n <th key={`header-${index}`} className=\"py-4 px-6\">\n {header}\n </th>\n ))}\n </tr>\n </thead>\n <tbody>\n {data.slice(1, maxRows).map((row, rowIndex) => (\n <tr\n key={`row-${rowIndex}`}\n className=\"border-b border-panel-accent light:border-gray-700 hover:bg-panel-accent hover:light:bg-gray-700/40 transition-colors text-base\"\n >\n <td className=\"py-4 px-6\">{rowIndex + 1}</td>\n {row.map((cell, cellIndex) => (\n <td key={`cell-${rowIndex}-${cellIndex}`} className=\"py-4 px-6\">\n {cell}\n </td>\n ))}\n </tr>\n ))}\n </tbody>\n </motion.table>\n );\n\n return (\n <div className=\"flex flex-col gap-2\">\n <div className=\"flex justify-between items-center gap-4\">\n <div className=\"csv-icon flex items-center\">\n {fileIcon}\n {name && <figcaption className=\"ml-1\">{name}</figcaption>}\n </div>\n <div className=\"csv-icon flex items-center gap-6\">\n <IconButton size=\"small\" variant=\"text\" onClick={downloadCSV}>\n <DownloadIcon />\n </IconButton>\n <IconButton size=\"small\" variant=\"text\" onClick={toggleModal}>\n <PlaceholderIcon />\n </IconButton>\n </div>\n </div>\n\n {error && <div className=\"error-message\">{error}</div>}\n\n {isLoading && !csvData && (\n <div className=\"text-text-secondary\">Loading...</div>\n )}\n\n <div className=\"flex justify-between\">\n {!error && csvData.length > 0 && renderTable(csvData, 6)}\n </div>\n\n <AnimatePresence>\n {isModalOpen && (\n <motion.div\n className=\"fixed inset-0 bg-black/70 flex justify-center items-center z-50\"\n initial={{ opacity: 0 }}\n animate={{ opacity: 1 }}\n exit={{ opacity: 0 }}\n transition={{ duration: 0.3 }}\n >\n <motion.div\n ref={modalRef}\n className=\"bg-white dark:bg-gray-900 rounded-md w-11/12 h-5/6 overflow-auto\"\n initial={{ scale: 0.8 }}\n animate={{ scale: 1 }}\n exit={{ scale: 0.8 }}\n transition={{ duration: 0.3 }}\n >\n {!error && csvData.length > 0 && renderTable(csvData)}\n </motion.div>\n </motion.div>\n )}\n </AnimatePresence>\n </div>\n );\n};\n\nexport default CSVFileRenderer;\n"],"names":["url","DownloadIcon","PlaceholderIcon"],"mappings":";;;;;;AAQO,MAAM,kBAAkB,CAAC,SAAyB;AACvD,QAAM,UAAU,KAAK,KAAA;AAErB,QAAM,UAAU,QAAQ,QAAQ,MAAM,IAAI;AAE1C,QAAM,SAAS,WAAW,KAAK,OAAO,IAAI,MAAO;AAEjD,QAAM,cAAc,WAAW,KAAK,OAAO,KAAK;AAEhD,SAAO,cAAc,IAAI,MAAM,GAAG,OAAO,MAAM;AACjD;ACVO,MAAM,WAAW,CAAC,cAAkC;AACzD,MAAI;AACF,UAAM,OAAO,UAAU,MAAM,IAAI;AACjC,WAAO,KAAK,IAAI,CAAC,QAAQ,IAAI,MAAM,GAAG,EAAE,IAAI,CAAC,SAAS,gBAAgB,IAAI,CAAC,CAAC;AAAA,EAC9E,SAAS,OAAO;AACd,YAAQ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E,UAAA,eACC;AAAA,MAAC,OAAO;AAAA,MAAP;AAAA,QACC,WAAU;AAAA,QACV,SAAS,EAAE,SAAS,EAAA;AAAA,QACpB,SAAS,EAAE,SAAS,EAAA;AAAA,QACpB,MAAM,EAAE,SAAS,EAAA;AAAA,QACjB,YAAY,EAAE,UAAU,IAAA;AAAA,QAExB,UAAA;AAAA,UAAC,OAAO;AAAA,UAAP;AAAA,YACC,KAAK;AAAA,YACL,WAAU;AAAA,YACV,SAAS,EAAE,OAAO,IAAA;AAAA,YAClB,SAAS,EAAE,OAAO,EAAA;AAAA,YAClB,MAAM,EAAE,OAAO,IAAA;AAAA,YACf,YAAY,EAAE,UAAU,IAAA;AAAA,YAEvB,WAAC,SAAS,QAAQ,SAAS,KAAK,YAAY,OAAO;AAAA,UAAA;AAAA,QAAA;AAAA,MACtD;AAAA,IAAA,EACF,CAEJ;AAAA,EAAA,GACF;AAEJ;"}
|
package/dist/ChatContext.d.ts
CHANGED
|
@@ -19,6 +19,6 @@ export interface ChatContextProps {
|
|
|
19
19
|
createSession?: () => void;
|
|
20
20
|
sendMessage?: (message: string) => void;
|
|
21
21
|
stopMessage?: () => void;
|
|
22
|
-
fileUpload?: (file: File) => void;
|
|
22
|
+
fileUpload?: (file: File | File[]) => void;
|
|
23
23
|
}
|
|
24
24
|
export declare const ChatContext: import('react').Context<ChatContextProps>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { S as SvgFile } from "./index-
|
|
2
|
+
import { S as SvgFile } from "./index-iuJAmrEE.js";
|
|
3
3
|
import { Ellipsis, cn } from "reablocks";
|
|
4
4
|
const DefaultFileRenderer = ({
|
|
5
5
|
name,
|
|
@@ -12,4 +12,4 @@ const DefaultFileRenderer = ({
|
|
|
12
12
|
export {
|
|
13
13
|
DefaultFileRenderer as default
|
|
14
14
|
};
|
|
15
|
-
//# sourceMappingURL=DefaultFileRenderer-
|
|
15
|
+
//# sourceMappingURL=DefaultFileRenderer-BrFdb4JQ.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultFileRenderer-
|
|
1
|
+
{"version":3,"file":"DefaultFileRenderer-BrFdb4JQ.js","sources":["../src/SessionMessages/SessionMessage/MessageFile/renderers/DefaultFileRenderer.tsx"],"sourcesContent":["import { FC, ReactElement } from 'react';\nimport FileIcon from '@/assets/file.svg?react';\nimport { Ellipsis, cn } from 'reablocks';\n\ninterface DefaultFileRendererProps {\n /**\n * Limit for the name.\n */\n limit?: number;\n\n /**\n * Name of the file.\n */\n name?: string;\n\n /**\n * URL of the file.\n */\n url: string;\n\n /**\n * Icon to for file type.\n */\n fileIcon?: ReactElement;\n}\n\n/**\n * Default renderer for unspecified file types.\n */\nconst DefaultFileRenderer: FC<DefaultFileRendererProps> = ({\n name,\n limit = 100,\n fileIcon = <FileIcon />,\n}) => (\n <figure className=\"flex items-center gap-2\">\n {fileIcon}\n {name && (\n <figcaption className={cn('file-name-class')}>\n <Ellipsis value={name} limit={limit} />\n </figcaption>\n )}\n </figure>\n);\n\nexport default DefaultFileRenderer;\n"],"names":["FileIcon"],"mappings":";;;AA6BA,MAAM,sBAAoD,CAAC;AAAA,EACzD;AAAA,EACA,QAAQ;AAAA,EACR,+BAAYA,SAAA,CAAA,CAAS;AACvB,MACE,qBAAC,UAAA,EAAO,WAAU,2BACf,UAAA;AAAA,EAAA;AAAA,EACA,QACC,oBAAC,cAAA,EAAW,WAAW,GAAG,iBAAiB,GACzC,UAAA,oBAAC,UAAA,EAAS,OAAO,MAAM,MAAA,CAAc,EAAA,CACvC;AAAA,EAAA,CAEJ;"}
|
|
@@ -4,6 +4,10 @@ export interface CodeHighlighterProps extends PropsWithChildren {
|
|
|
4
4
|
* The class name to apply to the code block.
|
|
5
5
|
*/
|
|
6
6
|
className?: string;
|
|
7
|
+
/**
|
|
8
|
+
* The class name to apply to the inline code.
|
|
9
|
+
*/
|
|
10
|
+
inlineClassName?: string;
|
|
7
11
|
/**
|
|
8
12
|
* The language of the code block.
|
|
9
13
|
*/
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { FC, PropsWithChildren } from 'react';
|
|
2
2
|
import { Components } from 'react-markdown';
|
|
3
3
|
import { Plugin } from 'unified';
|
|
4
|
+
import { ChatTheme } from '../theme';
|
|
4
5
|
interface MarkdownWrapperProps extends PropsWithChildren {
|
|
5
6
|
/**
|
|
6
7
|
* Remark plugins to apply to the markdown content.
|
|
@@ -10,6 +11,10 @@ interface MarkdownWrapperProps extends PropsWithChildren {
|
|
|
10
11
|
* Rehype plugins to apply to the markdown content.
|
|
11
12
|
*/
|
|
12
13
|
rehypePlugins?: Plugin[];
|
|
14
|
+
/**
|
|
15
|
+
* Theme to apply to the markdown content.
|
|
16
|
+
*/
|
|
17
|
+
theme?: ChatTheme;
|
|
13
18
|
/**
|
|
14
19
|
* Custom components to override default markdown rendering.
|
|
15
20
|
* These will be merged with the default components.
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
2
|
import { Conversation } from '../../types';
|
|
3
3
|
interface SessionMessageProps extends PropsWithChildren {
|
|
4
|
+
/**
|
|
5
|
+
* Class name to apply to the root element.
|
|
6
|
+
*/
|
|
7
|
+
className?: string;
|
|
4
8
|
/**
|
|
5
9
|
* Conversation to render.
|
|
6
10
|
*/
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import { default as React
|
|
1
|
+
import { ReactNode, UIEventHandler, default as React } from 'react';
|
|
2
2
|
import { Conversation } from '../types';
|
|
3
3
|
interface SessionMessagesProps {
|
|
4
|
+
/**
|
|
5
|
+
* Class name to apply to the root element.
|
|
6
|
+
*/
|
|
7
|
+
className?: string;
|
|
4
8
|
/**
|
|
5
9
|
* Content to display when there are no sessions selected or a new session is started.
|
|
6
10
|
*/
|
|
@@ -13,6 +17,10 @@ interface SessionMessagesProps {
|
|
|
13
17
|
* Text to display for the show more button.
|
|
14
18
|
*/
|
|
15
19
|
showMoreText?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Whether to automatically scroll to the bottom of the content.
|
|
22
|
+
*/
|
|
23
|
+
autoScroll?: boolean;
|
|
16
24
|
/**
|
|
17
25
|
* Whether to display the scroll to bottom button.
|
|
18
26
|
*/
|
|
@@ -21,6 +29,23 @@ interface SessionMessagesProps {
|
|
|
21
29
|
* Render function for the session messages.
|
|
22
30
|
*/
|
|
23
31
|
children?: (conversations: Conversation[]) => ReactNode;
|
|
32
|
+
/**
|
|
33
|
+
* Whether to show the load more button.
|
|
34
|
+
*/
|
|
35
|
+
showLoadMoreButton?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Whether to disable the load more button.
|
|
38
|
+
*/
|
|
39
|
+
loadMoreButtonDisabled?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Scroll event handler.
|
|
42
|
+
* @param e
|
|
43
|
+
*/
|
|
44
|
+
onScroll?: UIEventHandler<HTMLDivElement>;
|
|
45
|
+
/**
|
|
46
|
+
* Load more event handler.
|
|
47
|
+
*/
|
|
48
|
+
onLoadMore?: () => void;
|
|
24
49
|
}
|
|
25
50
|
export declare const SessionMessages: React.FC<SessionMessagesProps>;
|
|
26
51
|
export {};
|
package/dist/docs.json
CHANGED
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
},
|
|
106
106
|
"theme": {
|
|
107
107
|
"defaultValue": {
|
|
108
|
-
"value": "{\n base: 'dark:text-white text-gray-500',\n console: 'flex w-full gap-4 h-full',\n companion: 'w-full h-full overflow-hidden',\n empty: 'text-center flex-1',\n appbar: 'flex p-5',\n status: {\n base: 'py-2 px-3 rounded-lg bg-gray-100/50 dark:bg-gray-800/30',\n header: 'flex items-center gap-2',\n icon: {\n base: 'flex-shrink-0 w-4 h-4',\n loading: 'text-blue-500 dark:text-blue-400',\n complete: 'text-green-500 dark:text-green-400',\n error: 'text-red-500 dark:text-red-400'\n },\n text: {\n base: 'text-sm',\n loading: 'text-gray-600 dark:text-gray-400',\n complete: 'text-gray-600 dark:text-gray-400',\n error: 'text-red-600 dark:text-red-400'\n },\n steps: {\n base: 'mt-1 ml-6 space-y-0.5',\n step: {\n base: 'flex items-center gap-2',\n icon: 'flex-shrink-0 w-3.5 h-3.5',\n text: 'text-sm',\n loading: 'text-gray-500 dark:text-gray-500',\n complete: 'text-gray-500 dark:text-gray-500',\n error: 'text-red-500 dark:text-red-400'\n }\n }\n },\n sessions: {\n base: 'overflow-auto',\n console:\n 'min-w-[150px] w-[30%] max-w-[300px] dark:bg-[#11111F] bg-[#F2F3F7] p-5 rounded-3xl',\n companion: 'w-full h-full',\n group:\n 'text-xs dart:text-gray-400 text-gray-700 mt-4 hover:bg-transparent mb-1',\n create: 'relative mb-4 rounded-[10px] text-white',\n session: {\n base: [\n 'group my-1 rounded-[10px] p-2 text-gray-500 border border-transparent hover:bg-gray-300 hover:border-gray-400 [&_svg]:text-gray-500',\n 'dark:text-typography dark:text-gray-400 dark:hover:bg-gray-800/50 dark:hover:border-gray-700/50 dark:[&_svg]:text-gray-200'\n ].join(' '),\n active: [\n 'border border-gray-300 hover:border-gray-400 text-gray-700 bg-gray-200 hover:bg-gray-300 ',\n 'dark:text-gray-500 dark:bg-gray-800/70 dark:border-gray-700/50 dark:text-white dark:border-gray-700/70 dark:hover:bg-gray-800/50',\n '[&_button]:opacity-100!'\n ].join(' '),\n delete: '[&>svg]:w-4 [&>svg]:h-4 opacity-0 group-hover:opacity-50!'\n }\n },\n messages: {\n base: '',\n console: 'flex flex-col mx-5 flex-1 min-h-0',\n companion: 'flex w-full h-full',\n back: 'self-start p-0 my-2',\n inner: 'flex-1 h-full flex flex-col',\n title: ['text-base font-bold text-gray-500', 'dark:text-gray-200'].join(\n ' '\n ),\n date: 'text-xs whitespace-nowrap text-gray-400',\n content: [\n 'mt-2 flex-1 overflow-auto [&_hr]:bg-gray-200',\n 'dark:[&_hr]:bg-gray-800/60'\n ].join(' '),\n header: 'flex justify-between items-center gap-2',\n showMore: 'mb-4',\n message: {\n base: 'mt-4 mb-4 flex flex-col p-0 rounded-sm border-none bg-transparent',\n question: [\n 'relative font-semibold mb-4 px-4 py-4 pb-2 rounded-3xl rounded-br-none text-typography border bg-gray-200 border-gray-300 text-gray-900',\n 'dark:bg-gray-900/60 dark:border-gray-700/50 dark:text-gray-100'\n ].join(' '),\n response: [\n 'relative data-[compact=false]:px-4 text-gray-900',\n 'dark:text-gray-100'\n ].join(' '),\n overlay:\n \"overflow-y-hidden max-h-[350px] after:content-[''] after:absolute after:inset-x-0 after:bottom-0 after:h-16 after:bg-linear-to-b after:from-transparent dark:after:to-gray-900 after:to-gray-200\",\n cursor: 'inline-block w-1 h-4 bg-current',\n expand: 'absolute bottom-1 right-1 z-10',\n scrollToBottom: {\n container: 'absolute bottom-2 left-1/2 transform -translate-x-1/2 z-10',\n button: 'rounded-full p-2 shadow-lg'\n },\n files: {\n base: 'mb-2 flex flex-wrap gap-3 ',\n file: {\n base: [\n 'flex items-center gap-2 border border-gray-300 px-3 py-2 rounded-lg cursor-pointer',\n 'dark:border-gray-700'\n ].join(' '),\n name: ['text-sm text-gray-500', 'dark:text-gray-200'].join(' ')\n }\n },\n sources: {\n base: 'my-4 flex flex-wrap gap-3',\n source: {\n base: [\n 'flex gap-2 border border-gray-200 px-4 py-2 rounded-lg cursor-pointer',\n 'dark:border-gray-700'\n ].join(' '),\n companion: 'flex-1 px-3 py-1.5',\n image: 'max-w-10 max-h-10 rounded-md w-full h-fit self-center',\n title: 'text-md block',\n url: 'text-sm text-blue-400 underline'\n }\n },\n markdown: {\n copy: 'sticky py-1 [&>svg]:w-4 [&>svg]:h-4 opacity-50',\n p: 'mb-2',\n a: 'text-blue-400 underline',\n table: 'table-auto w-full m-2',\n th: 'px-4 py-2 text-left font-bold border-b border-gray-500',\n td: 'px-4 py-2',\n code: 'm-2 rounded-b relative',\n toolbar:\n 'text-xs dark:bg-gray-700/50 flex items-center justify-between px-2 py-1 rounded-t sticky top-0 backdrop-blur-md bg-gray-200 ',\n li: 'mb-2 ml-6',\n ul: 'mb-4 list-disc',\n ol: 'mb-4 list-decimal'\n },\n footer: {\n base: 'mt-3 flex gap-1.5',\n copy: [\n 'p-3 rounded-[10px] [&>svg]:w-4 [&>svg]:h-4 opacity-50 hover:opacity-100! hover:bg-gray-200 hover:text-gray-500',\n 'dark:hover:bg-gray-800 dark:hover:text-white text-gray-400'\n ].join(' '),\n upvote:\n 'p-3 rounded-[10px] [&>svg]:w-4 [&>svg]:h-4 opacity-50 hover:opacity-100! hover:bg-gray-700/40 hover:text-white text-gray-400',\n downvote:\n 'p-3 rounded-[10px] [&>svg]:w-4 [&>svg]:h-4 opacity-50 hover:opacity-100! hover:bg-gray-700/40 hover:text-white text-gray-400',\n refresh:\n 'p-3 rounded-[10px] [&>svg]:w-4 [&>svg]:h-4 opacity-50 hover:opacity-100! hover:bg-gray-700/40 hover:text-white text-gray-400'\n }\n }\n },\n input: {\n base: 'flex mt-4 relative',\n upload: ['px-5 py-2 text-gray-400 size-10', 'dark:gray-500'].join(' '),\n input: [\n 'w-full border rounded-3xl px-3 py-2 pr-16 text-gray-500 border-gray-200 hover:bg-blue-100 hover:border-blue-500 after:hidden after:mx-10! bg-white [&>textarea]:w-full [&>textarea]:flex-none',\n 'dark:border-gray-700/50 dark:text-gray-200 dark:bg-gray-950 dark:hover:bg-blue-950/40'\n ].join(' '),\n actions: {\n base: 'absolute flex gap-2 items-center right-5 inset-y-1/2 -translate-y-1/2 z-10',\n send: [\n 'px-3 py-3 hover:bg-primary-hover rounded-full bg-gray-200 hover:bg-gray-300 text-gray-500',\n 'dark:text-white light:text-gray-500 dark:bg-gray-800 dark:hover:bg-gray-700'\n ].join(' '),\n stop: 'px-2 py-2 bg-red-500 text-white rounded-full hover:bg-red-700 '\n },\n popup: {\n base: [\n 'bg-white border border-gray-200 rounded-lg shadow-lg overflow-hidden min-w-[200px] max-w-[300px]',\n 'dark:bg-gray-900 dark:border-gray-700'\n ].join(' '),\n content: 'overflow-y-auto max-h-[250px]',\n item: [\n 'flex items-center gap-2 px-3 py-2 cursor-pointer transition-colors',\n 'hover:bg-gray-100 dark:hover:bg-gray-800'\n ].join(' '),\n itemHighlighted: 'bg-gray-100 dark:bg-gray-800',\n itemIcon: [\n 'flex-shrink-0 w-5 h-5 text-gray-500 [&>svg]:w-full [&>svg]:h-full',\n 'dark:text-gray-400'\n ].join(' '),\n itemContent: 'flex flex-col min-w-0 flex-1',\n itemLabel: [\n 'text-sm font-medium text-gray-900 truncate',\n 'dark:text-gray-100'\n ].join(' '),\n itemDescription: 'text-xs text-gray-500 dark:text-gray-400 truncate',\n itemShortcut: 'text-xs text-gray-400 dark:text-gray-500 ml-auto',\n empty: 'px-3 py-4 text-sm text-center text-gray-500 dark:text-gray-400',\n loading: [\n 'flex items-center justify-center gap-2 px-3 py-4 text-gray-500',\n 'dark:text-gray-400'\n ].join(' ')\n },\n tag: {\n base: [\n 'inline-flex items-center px-1.5 py-0.5 mx-0.5 rounded',\n 'font-medium text-sm leading-[1.2] relative top-[1px]'\n ].join(' '),\n mention: [\n 'bg-blue-100 dark:bg-blue-900/30',\n 'text-blue-700 dark:text-blue-300'\n ].join(' '),\n command: [\n 'bg-purple-100 dark:bg-purple-900/30',\n 'text-purple-700 dark:text-purple-300'\n ].join(' ')\n },\n editor: {\n base: [\n 'outline-none w-full overflow-y-auto',\n 'text-inherit font-inherit',\n '[&_.tiptap-paragraph]:m-0'\n ].join(' '),\n container: 'px-3 py-2 pr-16',\n placeholder: [\n '[&_.is-editor-empty]:before:content-[attr(data-placeholder)]',\n '[&_.is-editor-empty]:before:text-gray-400',\n '[&_.is-editor-empty]:before:dark:text-gray-500',\n '[&_.is-editor-empty]:before:float-left',\n '[&_.is-editor-empty]:before:h-0',\n '[&_.is-editor-empty]:before:pointer-events-none'\n ].join(' ')\n }\n },\n suggestions: {\n base: 'flex flex-wrap gap-2 mt-4',\n item: {\n base: [\n 'rounded-full! max-w-full py-2 px-4',\n 'bg-gray-100 border-gray-200 hover:bg-gray-200 hover:border-gray-300 text-gray-700',\n 'dark:bg-gray-800/50 dark:border-gray-700 dark:hover:bg-gray-700/70 dark:hover:border-gray-600 dark:text-gray-200',\n '[&>svg]:w-4 [&>svg]:h-4 [&>svg]:text-blue-500 [&>svg]:dark:text-blue-400 [&>svg]:flex-shrink-0'\n ].join(' '),\n icon: 'w-4 h-4 text-blue-500 dark:text-blue-400 flex-shrink-0',\n text: 'text-sm truncate'\n }\n },\n chart: {\n base: 'my-6',\n title: 'text-sm font-medium mb-2 text-gray-600 dark:text-gray-400',\n content: 'flex items-center justify-center',\n error: {\n base: [\n 'my-4 p-4 border rounded',\n 'border-red-300 bg-red-50 text-red-500',\n 'dark:border-red-700 dark:bg-red-900/20'\n ].join(' '),\n title: 'text-red-600 dark:text-red-400 text-sm font-medium mb-2',\n code: 'text-xs overflow-auto'\n },\n warning: {\n base: [\n 'my-4 p-4 border rounded',\n 'border-yellow-300 bg-yellow-50 text-yellow-600',\n 'dark:border-yellow-700 dark:bg-yellow-900/20 dark:text-yellow-400'\n ].join(' '),\n title: 'text-yellow-600 dark:text-yellow-400 text-sm font-medium mb-2'\n }\n },\n component: {\n base: 'my-4'\n }\n}"
|
|
108
|
+
"value": "{\n base: 'dark:text-white text-gray-500',\n console: 'flex w-full gap-4 h-full',\n companion: 'w-full h-full overflow-hidden',\n empty: 'text-center flex-1',\n appbar: 'flex p-5',\n status: {\n base: 'py-2 px-3 rounded-lg bg-gray-100/50 dark:bg-gray-800/30',\n header: 'flex items-center gap-2',\n icon: {\n base: 'flex-shrink-0 w-4 h-4',\n loading: 'text-blue-500 dark:text-blue-400',\n complete: 'text-green-500 dark:text-green-400',\n error: 'text-red-500 dark:text-red-400'\n },\n text: {\n base: 'text-sm',\n loading: 'text-gray-600 dark:text-gray-400',\n complete: 'text-gray-600 dark:text-gray-400',\n error: 'text-red-600 dark:text-red-400'\n },\n steps: {\n base: 'mt-1 ml-6 space-y-0.5',\n step: {\n base: 'flex items-center gap-2',\n icon: 'flex-shrink-0 w-3.5 h-3.5',\n text: 'text-sm',\n loading: 'text-gray-500 dark:text-gray-500',\n complete: 'text-gray-500 dark:text-gray-500',\n error: 'text-red-500 dark:text-red-400'\n }\n }\n },\n sessions: {\n base: 'overflow-auto',\n console:\n 'min-w-[150px] w-[30%] max-w-[300px] dark:bg-[#11111F] bg-[#F2F3F7] p-5 rounded-3xl',\n companion: 'w-full h-full',\n group:\n 'text-xs dart:text-gray-400 text-gray-700 mt-4 hover:bg-transparent mb-1',\n create: 'relative mb-4 rounded-[10px] text-white',\n session: {\n base: [\n 'group my-1 rounded-[10px] p-2 text-gray-500 border border-transparent hover:bg-gray-300 hover:border-gray-400 [&_svg]:text-gray-500',\n 'dark:text-typography dark:text-gray-400 dark:hover:bg-gray-800/50 dark:hover:border-gray-700/50 dark:[&_svg]:text-gray-200'\n ].join(' '),\n active: [\n 'border border-gray-300 hover:border-gray-400 text-gray-700 bg-gray-200 hover:bg-gray-300 ',\n 'dark:text-gray-500 dark:bg-gray-800/70 dark:border-gray-700/50 dark:text-white dark:border-gray-700/70 dark:hover:bg-gray-800/50',\n '[&_button]:opacity-100!'\n ].join(' '),\n delete: '[&>svg]:w-4 [&>svg]:h-4 opacity-0 group-hover:opacity-50!'\n }\n },\n messages: {\n base: '',\n console: 'flex flex-col mx-5 flex-1 min-h-0',\n companion: 'flex w-full h-full',\n back: 'self-start p-0 my-2',\n inner: 'flex-1 h-full flex flex-col',\n title: ['text-base font-bold text-gray-500', 'dark:text-gray-200'].join(\n ' '\n ),\n date: 'text-xs whitespace-nowrap text-gray-400',\n content: [\n 'mt-2 flex-1 overflow-auto [&_hr]:bg-gray-200',\n 'dark:[&_hr]:bg-gray-800/60'\n ].join(' '),\n header: 'flex justify-between items-center gap-2',\n showMore: 'mb-4',\n message: {\n base: 'mt-4 mb-4 flex flex-col p-0 rounded-sm border-none bg-transparent',\n question: [\n 'relative font-semibold mb-4 px-4 py-4 pb-2 rounded-3xl rounded-br-none text-typography border bg-gray-200 border-gray-300 text-gray-900',\n 'dark:bg-gray-900/60 dark:border-gray-700/50 dark:text-gray-100'\n ].join(' '),\n response: [\n 'relative data-[compact=false]:px-4 text-gray-900',\n 'dark:text-gray-100'\n ].join(' '),\n overlay:\n \"overflow-y-hidden max-h-[350px] after:content-[''] after:absolute after:inset-x-0 after:bottom-0 after:h-16 after:bg-linear-to-b after:from-transparent dark:after:to-gray-900 after:to-gray-200\",\n cursor: 'inline-block w-1 h-4 bg-current',\n expand: 'absolute bottom-1 right-1 z-10',\n scrollToBottom: {\n container: 'absolute bottom-2 left-1/2 transform -translate-x-1/2 z-10',\n button: 'rounded-full p-2 shadow-lg'\n },\n files: {\n base: 'mb-2 flex flex-wrap gap-3 ',\n file: {\n base: [\n 'flex items-center gap-2 border border-gray-300 px-3 py-2 rounded-lg cursor-pointer',\n 'dark:border-gray-700'\n ].join(' '),\n name: ['text-sm text-gray-500', 'dark:text-gray-200'].join(' ')\n }\n },\n sources: {\n base: 'my-4 flex flex-wrap gap-3',\n source: {\n base: [\n 'flex gap-2 border border-gray-200 px-4 py-2 rounded-lg cursor-pointer',\n 'dark:border-gray-700'\n ].join(' '),\n companion: 'flex-1 px-3 py-1.5',\n image: 'max-w-10 max-h-10 rounded-md w-full h-fit self-center',\n title: 'text-md block',\n url: 'text-sm text-blue-400 underline'\n }\n },\n markdown: {\n hr: 'my-4 border-t border-stroke-neutral-4',\n copy: 'sticky py-1 [&>svg]:w-4 [&>svg]:h-4 opacity-50',\n p: 'mb-2',\n a: 'text-buttons-colors-link-primary-text-resting underline',\n table: 'table-auto w-full m-2',\n th: 'px-4 py-2 text-left font-bold border-b border-stroke-neutral-4',\n td: 'px-4 py-2',\n code: 'm-2 rounded-b relative',\n inlineCode: 'bg-gradient-neutral-200 p-1 rounded',\n toolbar:\n 'text-xs flex items-center justify-between px-2 py-1 rounded-t sticky top-0 backdrop-blur-md bg-gradient-neutral-500/50',\n li: 'mb-2 ml-6',\n ul: 'mb-4 list-disc',\n ol: 'mb-4 list-decimal',\n h1: 'text-4xl font-bold mb-4 mt-6',\n h2: 'text-3xl font-bold mb-3 mt-5',\n h3: 'text-2xl font-bold mb-3 mt-4',\n h4: 'text-xl font-bold mb-2 mt-3',\n h5: 'text-lg font-bold mb-2 mt-2',\n h6: 'text-base font-bold mb-2 mt-2'\n },\n footer: {\n base: 'mt-3 flex gap-1.5',\n copy: [\n 'p-3 rounded-[10px] [&>svg]:w-4 [&>svg]:h-4 opacity-50 hover:opacity-100! hover:bg-gray-200 hover:text-gray-500',\n 'dark:hover:bg-gray-800 dark:hover:text-white text-gray-400'\n ].join(' '),\n upvote:\n 'p-3 rounded-[10px] [&>svg]:w-4 [&>svg]:h-4 opacity-50 hover:opacity-100! hover:bg-gray-700/40 hover:text-white text-gray-400',\n downvote:\n 'p-3 rounded-[10px] [&>svg]:w-4 [&>svg]:h-4 opacity-50 hover:opacity-100! hover:bg-gray-700/40 hover:text-white text-gray-400',\n refresh:\n 'p-3 rounded-[10px] [&>svg]:w-4 [&>svg]:h-4 opacity-50 hover:opacity-100! hover:bg-gray-700/40 hover:text-white text-gray-400'\n }\n }\n },\n input: {\n base: 'flex mt-4 relative',\n upload: ['px-5 py-2 text-gray-400 size-10', 'dark:gray-500'].join(' '),\n input: [\n 'w-full border rounded-3xl px-3 py-2 pr-16 text-gray-500 border-gray-200 hover:bg-blue-100 hover:border-blue-500 after:hidden after:mx-10! bg-white [&>textarea]:w-full [&>textarea]:flex-none',\n 'dark:border-gray-700/50 dark:text-gray-200 dark:bg-gray-950 dark:hover:bg-blue-950/40'\n ].join(' '),\n actions: {\n base: 'absolute flex gap-2 items-center right-5 inset-y-1/2 -translate-y-1/2 z-10',\n send: [\n 'px-3 py-3 hover:bg-primary-hover rounded-full bg-gray-200 hover:bg-gray-300 text-gray-500',\n 'dark:text-white light:text-gray-500 dark:bg-gray-800 dark:hover:bg-gray-700'\n ].join(' '),\n stop: 'px-2 py-2 bg-red-500 text-white rounded-full hover:bg-red-700 '\n },\n popup: {\n base: [\n 'bg-white border border-gray-200 rounded-lg shadow-lg overflow-hidden min-w-[200px] max-w-[300px]',\n 'dark:bg-gray-900 dark:border-gray-700'\n ].join(' '),\n content: 'overflow-y-auto max-h-[250px]',\n item: [\n 'flex items-center gap-2 px-3 py-2 cursor-pointer transition-colors',\n 'hover:bg-gray-100 dark:hover:bg-gray-800'\n ].join(' '),\n itemHighlighted: 'bg-gray-100 dark:bg-gray-800',\n itemIcon: [\n 'flex-shrink-0 w-5 h-5 text-gray-500 [&>svg]:w-full [&>svg]:h-full',\n 'dark:text-gray-400'\n ].join(' '),\n itemContent: 'flex flex-col min-w-0 flex-1',\n itemLabel: [\n 'text-sm font-medium text-gray-900 truncate',\n 'dark:text-gray-100'\n ].join(' '),\n itemDescription: 'text-xs text-gray-500 dark:text-gray-400 truncate',\n itemShortcut: 'text-xs text-gray-400 dark:text-gray-500 ml-auto',\n empty: 'px-3 py-4 text-sm text-center text-gray-500 dark:text-gray-400',\n loading: [\n 'flex items-center justify-center gap-2 px-3 py-4 text-gray-500',\n 'dark:text-gray-400'\n ].join(' ')\n },\n tag: {\n base: [\n 'inline-flex items-center px-1.5 py-0.5 mx-0.5 rounded',\n 'font-medium text-sm leading-[1.2] relative top-[1px]'\n ].join(' '),\n mention: [\n 'bg-blue-100 dark:bg-blue-900/30',\n 'text-blue-700 dark:text-blue-300'\n ].join(' '),\n command: [\n 'bg-purple-100 dark:bg-purple-900/30',\n 'text-purple-700 dark:text-purple-300'\n ].join(' ')\n },\n editor: {\n base: [\n 'outline-none w-full overflow-y-auto',\n 'text-inherit font-inherit',\n '[&_.tiptap-paragraph]:m-0'\n ].join(' '),\n container: 'px-3 py-2 pr-16',\n placeholder: [\n '[&_.is-editor-empty]:before:content-[attr(data-placeholder)]',\n '[&_.is-editor-empty]:before:text-gray-400',\n '[&_.is-editor-empty]:before:dark:text-gray-500',\n '[&_.is-editor-empty]:before:float-left',\n '[&_.is-editor-empty]:before:h-0',\n '[&_.is-editor-empty]:before:pointer-events-none'\n ].join(' ')\n }\n },\n suggestions: {\n base: 'flex flex-wrap gap-2 mt-4',\n item: {\n base: [\n 'rounded-full! max-w-full py-2 px-4',\n 'bg-gray-100 border-gray-200 hover:bg-gray-200 hover:border-gray-300 text-gray-700',\n 'dark:bg-gray-800/50 dark:border-gray-700 dark:hover:bg-gray-700/70 dark:hover:border-gray-600 dark:text-gray-200',\n '[&>svg]:w-4 [&>svg]:h-4 [&>svg]:text-blue-500 [&>svg]:dark:text-blue-400 [&>svg]:flex-shrink-0'\n ].join(' '),\n icon: 'w-4 h-4 text-blue-500 dark:text-blue-400 flex-shrink-0',\n text: 'text-sm truncate'\n }\n },\n chart: {\n base: 'my-6',\n title: 'text-sm font-medium mb-2 text-gray-600 dark:text-gray-400',\n content: 'flex items-center justify-center',\n error: {\n base: [\n 'my-4 p-4 border rounded',\n 'border-red-300 bg-red-50 text-red-500',\n 'dark:border-red-700 dark:bg-red-900/20'\n ].join(' '),\n title: 'text-red-600 dark:text-red-400 text-sm font-medium mb-2',\n code: 'text-xs overflow-auto'\n },\n warning: {\n base: [\n 'my-4 p-4 border rounded',\n 'border-yellow-300 bg-yellow-50 text-yellow-600',\n 'dark:border-yellow-700 dark:bg-yellow-900/20 dark:text-yellow-400'\n ].join(' '),\n title: 'text-yellow-600 dark:text-yellow-400 text-sm font-medium mb-2'\n }\n },\n component: {\n base: 'my-4'\n }\n}"
|
|
109
109
|
},
|
|
110
110
|
"description": "Custom theme for the chat.",
|
|
111
111
|
"name": "theme",
|
|
@@ -365,7 +365,7 @@
|
|
|
365
365
|
},
|
|
366
366
|
"theme": {
|
|
367
367
|
"defaultValue": {
|
|
368
|
-
"value": "{\n base: 'dark:text-white text-gray-500',\n console: 'flex w-full gap-4 h-full',\n companion: 'w-full h-full overflow-hidden',\n empty: 'text-center flex-1',\n appbar: 'flex p-5',\n status: {\n base: 'py-2 px-3 rounded-lg bg-gray-100/50 dark:bg-gray-800/30',\n header: 'flex items-center gap-2',\n icon: {\n base: 'flex-shrink-0 w-4 h-4',\n loading: 'text-blue-500 dark:text-blue-400',\n complete: 'text-green-500 dark:text-green-400',\n error: 'text-red-500 dark:text-red-400'\n },\n text: {\n base: 'text-sm',\n loading: 'text-gray-600 dark:text-gray-400',\n complete: 'text-gray-600 dark:text-gray-400',\n error: 'text-red-600 dark:text-red-400'\n },\n steps: {\n base: 'mt-1 ml-6 space-y-0.5',\n step: {\n base: 'flex items-center gap-2',\n icon: 'flex-shrink-0 w-3.5 h-3.5',\n text: 'text-sm',\n loading: 'text-gray-500 dark:text-gray-500',\n complete: 'text-gray-500 dark:text-gray-500',\n error: 'text-red-500 dark:text-red-400'\n }\n }\n },\n sessions: {\n base: 'overflow-auto',\n console:\n 'min-w-[150px] w-[30%] max-w-[300px] dark:bg-[#11111F] bg-[#F2F3F7] p-5 rounded-3xl',\n companion: 'w-full h-full',\n group:\n 'text-xs dart:text-gray-400 text-gray-700 mt-4 hover:bg-transparent mb-1',\n create: 'relative mb-4 rounded-[10px] text-white',\n session: {\n base: [\n 'group my-1 rounded-[10px] p-2 text-gray-500 border border-transparent hover:bg-gray-300 hover:border-gray-400 [&_svg]:text-gray-500',\n 'dark:text-typography dark:text-gray-400 dark:hover:bg-gray-800/50 dark:hover:border-gray-700/50 dark:[&_svg]:text-gray-200'\n ].join(' '),\n active: [\n 'border border-gray-300 hover:border-gray-400 text-gray-700 bg-gray-200 hover:bg-gray-300 ',\n 'dark:text-gray-500 dark:bg-gray-800/70 dark:border-gray-700/50 dark:text-white dark:border-gray-700/70 dark:hover:bg-gray-800/50',\n '[&_button]:opacity-100!'\n ].join(' '),\n delete: '[&>svg]:w-4 [&>svg]:h-4 opacity-0 group-hover:opacity-50!'\n }\n },\n messages: {\n base: '',\n console: 'flex flex-col mx-5 flex-1 min-h-0',\n companion: 'flex w-full h-full',\n back: 'self-start p-0 my-2',\n inner: 'flex-1 h-full flex flex-col',\n title: ['text-base font-bold text-gray-500', 'dark:text-gray-200'].join(\n ' '\n ),\n date: 'text-xs whitespace-nowrap text-gray-400',\n content: [\n 'mt-2 flex-1 overflow-auto [&_hr]:bg-gray-200',\n 'dark:[&_hr]:bg-gray-800/60'\n ].join(' '),\n header: 'flex justify-between items-center gap-2',\n showMore: 'mb-4',\n message: {\n base: 'mt-4 mb-4 flex flex-col p-0 rounded-sm border-none bg-transparent',\n question: [\n 'relative font-semibold mb-4 px-4 py-4 pb-2 rounded-3xl rounded-br-none text-typography border bg-gray-200 border-gray-300 text-gray-900',\n 'dark:bg-gray-900/60 dark:border-gray-700/50 dark:text-gray-100'\n ].join(' '),\n response: [\n 'relative data-[compact=false]:px-4 text-gray-900',\n 'dark:text-gray-100'\n ].join(' '),\n overlay:\n \"overflow-y-hidden max-h-[350px] after:content-[''] after:absolute after:inset-x-0 after:bottom-0 after:h-16 after:bg-linear-to-b after:from-transparent dark:after:to-gray-900 after:to-gray-200\",\n cursor: 'inline-block w-1 h-4 bg-current',\n expand: 'absolute bottom-1 right-1 z-10',\n scrollToBottom: {\n container: 'absolute bottom-2 left-1/2 transform -translate-x-1/2 z-10',\n button: 'rounded-full p-2 shadow-lg'\n },\n files: {\n base: 'mb-2 flex flex-wrap gap-3 ',\n file: {\n base: [\n 'flex items-center gap-2 border border-gray-300 px-3 py-2 rounded-lg cursor-pointer',\n 'dark:border-gray-700'\n ].join(' '),\n name: ['text-sm text-gray-500', 'dark:text-gray-200'].join(' ')\n }\n },\n sources: {\n base: 'my-4 flex flex-wrap gap-3',\n source: {\n base: [\n 'flex gap-2 border border-gray-200 px-4 py-2 rounded-lg cursor-pointer',\n 'dark:border-gray-700'\n ].join(' '),\n companion: 'flex-1 px-3 py-1.5',\n image: 'max-w-10 max-h-10 rounded-md w-full h-fit self-center',\n title: 'text-md block',\n url: 'text-sm text-blue-400 underline'\n }\n },\n markdown: {\n copy: 'sticky py-1 [&>svg]:w-4 [&>svg]:h-4 opacity-50',\n p: 'mb-2',\n a: 'text-blue-400 underline',\n table: 'table-auto w-full m-2',\n th: 'px-4 py-2 text-left font-bold border-b border-gray-500',\n td: 'px-4 py-2',\n code: 'm-2 rounded-b relative',\n toolbar:\n 'text-xs dark:bg-gray-700/50 flex items-center justify-between px-2 py-1 rounded-t sticky top-0 backdrop-blur-md bg-gray-200 ',\n li: 'mb-2 ml-6',\n ul: 'mb-4 list-disc',\n ol: 'mb-4 list-decimal'\n },\n footer: {\n base: 'mt-3 flex gap-1.5',\n copy: [\n 'p-3 rounded-[10px] [&>svg]:w-4 [&>svg]:h-4 opacity-50 hover:opacity-100! hover:bg-gray-200 hover:text-gray-500',\n 'dark:hover:bg-gray-800 dark:hover:text-white text-gray-400'\n ].join(' '),\n upvote:\n 'p-3 rounded-[10px] [&>svg]:w-4 [&>svg]:h-4 opacity-50 hover:opacity-100! hover:bg-gray-700/40 hover:text-white text-gray-400',\n downvote:\n 'p-3 rounded-[10px] [&>svg]:w-4 [&>svg]:h-4 opacity-50 hover:opacity-100! hover:bg-gray-700/40 hover:text-white text-gray-400',\n refresh:\n 'p-3 rounded-[10px] [&>svg]:w-4 [&>svg]:h-4 opacity-50 hover:opacity-100! hover:bg-gray-700/40 hover:text-white text-gray-400'\n }\n }\n },\n input: {\n base: 'flex mt-4 relative',\n upload: ['px-5 py-2 text-gray-400 size-10', 'dark:gray-500'].join(' '),\n input: [\n 'w-full border rounded-3xl px-3 py-2 pr-16 text-gray-500 border-gray-200 hover:bg-blue-100 hover:border-blue-500 after:hidden after:mx-10! bg-white [&>textarea]:w-full [&>textarea]:flex-none',\n 'dark:border-gray-700/50 dark:text-gray-200 dark:bg-gray-950 dark:hover:bg-blue-950/40'\n ].join(' '),\n actions: {\n base: 'absolute flex gap-2 items-center right-5 inset-y-1/2 -translate-y-1/2 z-10',\n send: [\n 'px-3 py-3 hover:bg-primary-hover rounded-full bg-gray-200 hover:bg-gray-300 text-gray-500',\n 'dark:text-white light:text-gray-500 dark:bg-gray-800 dark:hover:bg-gray-700'\n ].join(' '),\n stop: 'px-2 py-2 bg-red-500 text-white rounded-full hover:bg-red-700 '\n },\n popup: {\n base: [\n 'bg-white border border-gray-200 rounded-lg shadow-lg overflow-hidden min-w-[200px] max-w-[300px]',\n 'dark:bg-gray-900 dark:border-gray-700'\n ].join(' '),\n content: 'overflow-y-auto max-h-[250px]',\n item: [\n 'flex items-center gap-2 px-3 py-2 cursor-pointer transition-colors',\n 'hover:bg-gray-100 dark:hover:bg-gray-800'\n ].join(' '),\n itemHighlighted: 'bg-gray-100 dark:bg-gray-800',\n itemIcon: [\n 'flex-shrink-0 w-5 h-5 text-gray-500 [&>svg]:w-full [&>svg]:h-full',\n 'dark:text-gray-400'\n ].join(' '),\n itemContent: 'flex flex-col min-w-0 flex-1',\n itemLabel: [\n 'text-sm font-medium text-gray-900 truncate',\n 'dark:text-gray-100'\n ].join(' '),\n itemDescription: 'text-xs text-gray-500 dark:text-gray-400 truncate',\n itemShortcut: 'text-xs text-gray-400 dark:text-gray-500 ml-auto',\n empty: 'px-3 py-4 text-sm text-center text-gray-500 dark:text-gray-400',\n loading: [\n 'flex items-center justify-center gap-2 px-3 py-4 text-gray-500',\n 'dark:text-gray-400'\n ].join(' ')\n },\n tag: {\n base: [\n 'inline-flex items-center px-1.5 py-0.5 mx-0.5 rounded',\n 'font-medium text-sm leading-[1.2] relative top-[1px]'\n ].join(' '),\n mention: [\n 'bg-blue-100 dark:bg-blue-900/30',\n 'text-blue-700 dark:text-blue-300'\n ].join(' '),\n command: [\n 'bg-purple-100 dark:bg-purple-900/30',\n 'text-purple-700 dark:text-purple-300'\n ].join(' ')\n },\n editor: {\n base: [\n 'outline-none w-full overflow-y-auto',\n 'text-inherit font-inherit',\n '[&_.tiptap-paragraph]:m-0'\n ].join(' '),\n container: 'px-3 py-2 pr-16',\n placeholder: [\n '[&_.is-editor-empty]:before:content-[attr(data-placeholder)]',\n '[&_.is-editor-empty]:before:text-gray-400',\n '[&_.is-editor-empty]:before:dark:text-gray-500',\n '[&_.is-editor-empty]:before:float-left',\n '[&_.is-editor-empty]:before:h-0',\n '[&_.is-editor-empty]:before:pointer-events-none'\n ].join(' ')\n }\n },\n suggestions: {\n base: 'flex flex-wrap gap-2 mt-4',\n item: {\n base: [\n 'rounded-full! max-w-full py-2 px-4',\n 'bg-gray-100 border-gray-200 hover:bg-gray-200 hover:border-gray-300 text-gray-700',\n 'dark:bg-gray-800/50 dark:border-gray-700 dark:hover:bg-gray-700/70 dark:hover:border-gray-600 dark:text-gray-200',\n '[&>svg]:w-4 [&>svg]:h-4 [&>svg]:text-blue-500 [&>svg]:dark:text-blue-400 [&>svg]:flex-shrink-0'\n ].join(' '),\n icon: 'w-4 h-4 text-blue-500 dark:text-blue-400 flex-shrink-0',\n text: 'text-sm truncate'\n }\n },\n chart: {\n base: 'my-6',\n title: 'text-sm font-medium mb-2 text-gray-600 dark:text-gray-400',\n content: 'flex items-center justify-center',\n error: {\n base: [\n 'my-4 p-4 border rounded',\n 'border-red-300 bg-red-50 text-red-500',\n 'dark:border-red-700 dark:bg-red-900/20'\n ].join(' '),\n title: 'text-red-600 dark:text-red-400 text-sm font-medium mb-2',\n code: 'text-xs overflow-auto'\n },\n warning: {\n base: [\n 'my-4 p-4 border rounded',\n 'border-yellow-300 bg-yellow-50 text-yellow-600',\n 'dark:border-yellow-700 dark:bg-yellow-900/20 dark:text-yellow-400'\n ].join(' '),\n title: 'text-yellow-600 dark:text-yellow-400 text-sm font-medium mb-2'\n }\n },\n component: {\n base: 'my-4'\n }\n}"
|
|
368
|
+
"value": "{\n base: 'dark:text-white text-gray-500',\n console: 'flex w-full gap-4 h-full',\n companion: 'w-full h-full overflow-hidden',\n empty: 'text-center flex-1',\n appbar: 'flex p-5',\n status: {\n base: 'py-2 px-3 rounded-lg bg-gray-100/50 dark:bg-gray-800/30',\n header: 'flex items-center gap-2',\n icon: {\n base: 'flex-shrink-0 w-4 h-4',\n loading: 'text-blue-500 dark:text-blue-400',\n complete: 'text-green-500 dark:text-green-400',\n error: 'text-red-500 dark:text-red-400'\n },\n text: {\n base: 'text-sm',\n loading: 'text-gray-600 dark:text-gray-400',\n complete: 'text-gray-600 dark:text-gray-400',\n error: 'text-red-600 dark:text-red-400'\n },\n steps: {\n base: 'mt-1 ml-6 space-y-0.5',\n step: {\n base: 'flex items-center gap-2',\n icon: 'flex-shrink-0 w-3.5 h-3.5',\n text: 'text-sm',\n loading: 'text-gray-500 dark:text-gray-500',\n complete: 'text-gray-500 dark:text-gray-500',\n error: 'text-red-500 dark:text-red-400'\n }\n }\n },\n sessions: {\n base: 'overflow-auto',\n console:\n 'min-w-[150px] w-[30%] max-w-[300px] dark:bg-[#11111F] bg-[#F2F3F7] p-5 rounded-3xl',\n companion: 'w-full h-full',\n group:\n 'text-xs dart:text-gray-400 text-gray-700 mt-4 hover:bg-transparent mb-1',\n create: 'relative mb-4 rounded-[10px] text-white',\n session: {\n base: [\n 'group my-1 rounded-[10px] p-2 text-gray-500 border border-transparent hover:bg-gray-300 hover:border-gray-400 [&_svg]:text-gray-500',\n 'dark:text-typography dark:text-gray-400 dark:hover:bg-gray-800/50 dark:hover:border-gray-700/50 dark:[&_svg]:text-gray-200'\n ].join(' '),\n active: [\n 'border border-gray-300 hover:border-gray-400 text-gray-700 bg-gray-200 hover:bg-gray-300 ',\n 'dark:text-gray-500 dark:bg-gray-800/70 dark:border-gray-700/50 dark:text-white dark:border-gray-700/70 dark:hover:bg-gray-800/50',\n '[&_button]:opacity-100!'\n ].join(' '),\n delete: '[&>svg]:w-4 [&>svg]:h-4 opacity-0 group-hover:opacity-50!'\n }\n },\n messages: {\n base: '',\n console: 'flex flex-col mx-5 flex-1 min-h-0',\n companion: 'flex w-full h-full',\n back: 'self-start p-0 my-2',\n inner: 'flex-1 h-full flex flex-col',\n title: ['text-base font-bold text-gray-500', 'dark:text-gray-200'].join(\n ' '\n ),\n date: 'text-xs whitespace-nowrap text-gray-400',\n content: [\n 'mt-2 flex-1 overflow-auto [&_hr]:bg-gray-200',\n 'dark:[&_hr]:bg-gray-800/60'\n ].join(' '),\n header: 'flex justify-between items-center gap-2',\n showMore: 'mb-4',\n message: {\n base: 'mt-4 mb-4 flex flex-col p-0 rounded-sm border-none bg-transparent',\n question: [\n 'relative font-semibold mb-4 px-4 py-4 pb-2 rounded-3xl rounded-br-none text-typography border bg-gray-200 border-gray-300 text-gray-900',\n 'dark:bg-gray-900/60 dark:border-gray-700/50 dark:text-gray-100'\n ].join(' '),\n response: [\n 'relative data-[compact=false]:px-4 text-gray-900',\n 'dark:text-gray-100'\n ].join(' '),\n overlay:\n \"overflow-y-hidden max-h-[350px] after:content-[''] after:absolute after:inset-x-0 after:bottom-0 after:h-16 after:bg-linear-to-b after:from-transparent dark:after:to-gray-900 after:to-gray-200\",\n cursor: 'inline-block w-1 h-4 bg-current',\n expand: 'absolute bottom-1 right-1 z-10',\n scrollToBottom: {\n container: 'absolute bottom-2 left-1/2 transform -translate-x-1/2 z-10',\n button: 'rounded-full p-2 shadow-lg'\n },\n files: {\n base: 'mb-2 flex flex-wrap gap-3 ',\n file: {\n base: [\n 'flex items-center gap-2 border border-gray-300 px-3 py-2 rounded-lg cursor-pointer',\n 'dark:border-gray-700'\n ].join(' '),\n name: ['text-sm text-gray-500', 'dark:text-gray-200'].join(' ')\n }\n },\n sources: {\n base: 'my-4 flex flex-wrap gap-3',\n source: {\n base: [\n 'flex gap-2 border border-gray-200 px-4 py-2 rounded-lg cursor-pointer',\n 'dark:border-gray-700'\n ].join(' '),\n companion: 'flex-1 px-3 py-1.5',\n image: 'max-w-10 max-h-10 rounded-md w-full h-fit self-center',\n title: 'text-md block',\n url: 'text-sm text-blue-400 underline'\n }\n },\n markdown: {\n hr: 'my-4 border-t border-stroke-neutral-4',\n copy: 'sticky py-1 [&>svg]:w-4 [&>svg]:h-4 opacity-50',\n p: 'mb-2',\n a: 'text-buttons-colors-link-primary-text-resting underline',\n table: 'table-auto w-full m-2',\n th: 'px-4 py-2 text-left font-bold border-b border-stroke-neutral-4',\n td: 'px-4 py-2',\n code: 'm-2 rounded-b relative',\n inlineCode: 'bg-gradient-neutral-200 p-1 rounded',\n toolbar:\n 'text-xs flex items-center justify-between px-2 py-1 rounded-t sticky top-0 backdrop-blur-md bg-gradient-neutral-500/50',\n li: 'mb-2 ml-6',\n ul: 'mb-4 list-disc',\n ol: 'mb-4 list-decimal',\n h1: 'text-4xl font-bold mb-4 mt-6',\n h2: 'text-3xl font-bold mb-3 mt-5',\n h3: 'text-2xl font-bold mb-3 mt-4',\n h4: 'text-xl font-bold mb-2 mt-3',\n h5: 'text-lg font-bold mb-2 mt-2',\n h6: 'text-base font-bold mb-2 mt-2'\n },\n footer: {\n base: 'mt-3 flex gap-1.5',\n copy: [\n 'p-3 rounded-[10px] [&>svg]:w-4 [&>svg]:h-4 opacity-50 hover:opacity-100! hover:bg-gray-200 hover:text-gray-500',\n 'dark:hover:bg-gray-800 dark:hover:text-white text-gray-400'\n ].join(' '),\n upvote:\n 'p-3 rounded-[10px] [&>svg]:w-4 [&>svg]:h-4 opacity-50 hover:opacity-100! hover:bg-gray-700/40 hover:text-white text-gray-400',\n downvote:\n 'p-3 rounded-[10px] [&>svg]:w-4 [&>svg]:h-4 opacity-50 hover:opacity-100! hover:bg-gray-700/40 hover:text-white text-gray-400',\n refresh:\n 'p-3 rounded-[10px] [&>svg]:w-4 [&>svg]:h-4 opacity-50 hover:opacity-100! hover:bg-gray-700/40 hover:text-white text-gray-400'\n }\n }\n },\n input: {\n base: 'flex mt-4 relative',\n upload: ['px-5 py-2 text-gray-400 size-10', 'dark:gray-500'].join(' '),\n input: [\n 'w-full border rounded-3xl px-3 py-2 pr-16 text-gray-500 border-gray-200 hover:bg-blue-100 hover:border-blue-500 after:hidden after:mx-10! bg-white [&>textarea]:w-full [&>textarea]:flex-none',\n 'dark:border-gray-700/50 dark:text-gray-200 dark:bg-gray-950 dark:hover:bg-blue-950/40'\n ].join(' '),\n actions: {\n base: 'absolute flex gap-2 items-center right-5 inset-y-1/2 -translate-y-1/2 z-10',\n send: [\n 'px-3 py-3 hover:bg-primary-hover rounded-full bg-gray-200 hover:bg-gray-300 text-gray-500',\n 'dark:text-white light:text-gray-500 dark:bg-gray-800 dark:hover:bg-gray-700'\n ].join(' '),\n stop: 'px-2 py-2 bg-red-500 text-white rounded-full hover:bg-red-700 '\n },\n popup: {\n base: [\n 'bg-white border border-gray-200 rounded-lg shadow-lg overflow-hidden min-w-[200px] max-w-[300px]',\n 'dark:bg-gray-900 dark:border-gray-700'\n ].join(' '),\n content: 'overflow-y-auto max-h-[250px]',\n item: [\n 'flex items-center gap-2 px-3 py-2 cursor-pointer transition-colors',\n 'hover:bg-gray-100 dark:hover:bg-gray-800'\n ].join(' '),\n itemHighlighted: 'bg-gray-100 dark:bg-gray-800',\n itemIcon: [\n 'flex-shrink-0 w-5 h-5 text-gray-500 [&>svg]:w-full [&>svg]:h-full',\n 'dark:text-gray-400'\n ].join(' '),\n itemContent: 'flex flex-col min-w-0 flex-1',\n itemLabel: [\n 'text-sm font-medium text-gray-900 truncate',\n 'dark:text-gray-100'\n ].join(' '),\n itemDescription: 'text-xs text-gray-500 dark:text-gray-400 truncate',\n itemShortcut: 'text-xs text-gray-400 dark:text-gray-500 ml-auto',\n empty: 'px-3 py-4 text-sm text-center text-gray-500 dark:text-gray-400',\n loading: [\n 'flex items-center justify-center gap-2 px-3 py-4 text-gray-500',\n 'dark:text-gray-400'\n ].join(' ')\n },\n tag: {\n base: [\n 'inline-flex items-center px-1.5 py-0.5 mx-0.5 rounded',\n 'font-medium text-sm leading-[1.2] relative top-[1px]'\n ].join(' '),\n mention: [\n 'bg-blue-100 dark:bg-blue-900/30',\n 'text-blue-700 dark:text-blue-300'\n ].join(' '),\n command: [\n 'bg-purple-100 dark:bg-purple-900/30',\n 'text-purple-700 dark:text-purple-300'\n ].join(' ')\n },\n editor: {\n base: [\n 'outline-none w-full overflow-y-auto',\n 'text-inherit font-inherit',\n '[&_.tiptap-paragraph]:m-0'\n ].join(' '),\n container: 'px-3 py-2 pr-16',\n placeholder: [\n '[&_.is-editor-empty]:before:content-[attr(data-placeholder)]',\n '[&_.is-editor-empty]:before:text-gray-400',\n '[&_.is-editor-empty]:before:dark:text-gray-500',\n '[&_.is-editor-empty]:before:float-left',\n '[&_.is-editor-empty]:before:h-0',\n '[&_.is-editor-empty]:before:pointer-events-none'\n ].join(' ')\n }\n },\n suggestions: {\n base: 'flex flex-wrap gap-2 mt-4',\n item: {\n base: [\n 'rounded-full! max-w-full py-2 px-4',\n 'bg-gray-100 border-gray-200 hover:bg-gray-200 hover:border-gray-300 text-gray-700',\n 'dark:bg-gray-800/50 dark:border-gray-700 dark:hover:bg-gray-700/70 dark:hover:border-gray-600 dark:text-gray-200',\n '[&>svg]:w-4 [&>svg]:h-4 [&>svg]:text-blue-500 [&>svg]:dark:text-blue-400 [&>svg]:flex-shrink-0'\n ].join(' '),\n icon: 'w-4 h-4 text-blue-500 dark:text-blue-400 flex-shrink-0',\n text: 'text-sm truncate'\n }\n },\n chart: {\n base: 'my-6',\n title: 'text-sm font-medium mb-2 text-gray-600 dark:text-gray-400',\n content: 'flex items-center justify-center',\n error: {\n base: [\n 'my-4 p-4 border rounded',\n 'border-red-300 bg-red-50 text-red-500',\n 'dark:border-red-700 dark:bg-red-900/20'\n ].join(' '),\n title: 'text-red-600 dark:text-red-400 text-sm font-medium mb-2',\n code: 'text-xs overflow-auto'\n },\n warning: {\n base: [\n 'my-4 p-4 border rounded',\n 'border-yellow-300 bg-yellow-50 text-yellow-600',\n 'dark:border-yellow-700 dark:bg-yellow-900/20 dark:text-yellow-400'\n ].join(' '),\n title: 'text-yellow-600 dark:text-yellow-400 text-sm font-medium mb-2'\n }\n },\n component: {\n base: 'my-4'\n }\n}"
|
|
369
369
|
},
|
|
370
370
|
"description": "Custom theme for the appbar",
|
|
371
371
|
"name": "theme",
|
|
@@ -539,6 +539,27 @@
|
|
|
539
539
|
"name": "string[]"
|
|
540
540
|
}
|
|
541
541
|
},
|
|
542
|
+
"allowMultipleFiles": {
|
|
543
|
+
"defaultValue": {
|
|
544
|
+
"value": "false"
|
|
545
|
+
},
|
|
546
|
+
"description": "Allow multiple file uploads.",
|
|
547
|
+
"name": "allowMultipleFiles",
|
|
548
|
+
"parent": {
|
|
549
|
+
"fileName": "src/ChatInput/ChatInput.tsx",
|
|
550
|
+
"name": "ChatInputProps"
|
|
551
|
+
},
|
|
552
|
+
"declarations": [
|
|
553
|
+
{
|
|
554
|
+
"fileName": "src/ChatInput/ChatInput.tsx",
|
|
555
|
+
"name": "ChatInputProps"
|
|
556
|
+
}
|
|
557
|
+
],
|
|
558
|
+
"required": false,
|
|
559
|
+
"type": {
|
|
560
|
+
"name": "boolean"
|
|
561
|
+
}
|
|
562
|
+
},
|
|
542
563
|
"placeholder": {
|
|
543
564
|
"defaultValue": {
|
|
544
565
|
"value": "Type a message..."
|
|
@@ -750,6 +771,25 @@
|
|
|
750
771
|
"name": "string[]"
|
|
751
772
|
}
|
|
752
773
|
},
|
|
774
|
+
"multiple": {
|
|
775
|
+
"defaultValue": null,
|
|
776
|
+
"description": "Allow multiple file uploads.",
|
|
777
|
+
"name": "multiple",
|
|
778
|
+
"parent": {
|
|
779
|
+
"fileName": "src/ChatInput/FileInput.tsx",
|
|
780
|
+
"name": "FileInputProps"
|
|
781
|
+
},
|
|
782
|
+
"declarations": [
|
|
783
|
+
{
|
|
784
|
+
"fileName": "src/ChatInput/FileInput.tsx",
|
|
785
|
+
"name": "FileInputProps"
|
|
786
|
+
}
|
|
787
|
+
],
|
|
788
|
+
"required": true,
|
|
789
|
+
"type": {
|
|
790
|
+
"name": "boolean"
|
|
791
|
+
}
|
|
792
|
+
},
|
|
753
793
|
"isLoading": {
|
|
754
794
|
"defaultValue": null,
|
|
755
795
|
"description": "Indicates whether a file upload is in progress.",
|
|
@@ -1512,6 +1552,25 @@
|
|
|
1512
1552
|
"name": "string"
|
|
1513
1553
|
}
|
|
1514
1554
|
},
|
|
1555
|
+
"inlineClassName": {
|
|
1556
|
+
"defaultValue": null,
|
|
1557
|
+
"description": "The class name to apply to the inline code.",
|
|
1558
|
+
"name": "inlineClassName",
|
|
1559
|
+
"parent": {
|
|
1560
|
+
"fileName": "src/Markdown/CodeHighlighter.tsx",
|
|
1561
|
+
"name": "CodeHighlighterProps"
|
|
1562
|
+
},
|
|
1563
|
+
"declarations": [
|
|
1564
|
+
{
|
|
1565
|
+
"fileName": "src/Markdown/CodeHighlighter.tsx",
|
|
1566
|
+
"name": "CodeHighlighterProps"
|
|
1567
|
+
}
|
|
1568
|
+
],
|
|
1569
|
+
"required": false,
|
|
1570
|
+
"type": {
|
|
1571
|
+
"name": "string"
|
|
1572
|
+
}
|
|
1573
|
+
},
|
|
1515
1574
|
"language": {
|
|
1516
1575
|
"defaultValue": null,
|
|
1517
1576
|
"description": "The language of the code block.",
|
|
@@ -1660,6 +1719,25 @@
|
|
|
1660
1719
|
"name": "Plugin[]"
|
|
1661
1720
|
}
|
|
1662
1721
|
},
|
|
1722
|
+
"theme": {
|
|
1723
|
+
"defaultValue": null,
|
|
1724
|
+
"description": "Theme to apply to the markdown content.",
|
|
1725
|
+
"name": "theme",
|
|
1726
|
+
"parent": {
|
|
1727
|
+
"fileName": "src/Markdown/Markdown.tsx",
|
|
1728
|
+
"name": "MarkdownWrapperProps"
|
|
1729
|
+
},
|
|
1730
|
+
"declarations": [
|
|
1731
|
+
{
|
|
1732
|
+
"fileName": "src/Markdown/Markdown.tsx",
|
|
1733
|
+
"name": "MarkdownWrapperProps"
|
|
1734
|
+
}
|
|
1735
|
+
],
|
|
1736
|
+
"required": false,
|
|
1737
|
+
"type": {
|
|
1738
|
+
"name": "ChatTheme"
|
|
1739
|
+
}
|
|
1740
|
+
},
|
|
1663
1741
|
"customComponents": {
|
|
1664
1742
|
"defaultValue": null,
|
|
1665
1743
|
"description": "Custom components to override default markdown rendering.\nThese will be merged with the default components.",
|
|
@@ -1950,6 +2028,25 @@
|
|
|
1950
2028
|
"displayName": "SessionMessages",
|
|
1951
2029
|
"methods": [],
|
|
1952
2030
|
"props": {
|
|
2031
|
+
"className": {
|
|
2032
|
+
"defaultValue": null,
|
|
2033
|
+
"description": "Class name to apply to the root element.",
|
|
2034
|
+
"name": "className",
|
|
2035
|
+
"parent": {
|
|
2036
|
+
"fileName": "src/SessionMessages/SessionMessages.tsx",
|
|
2037
|
+
"name": "SessionMessagesProps"
|
|
2038
|
+
},
|
|
2039
|
+
"declarations": [
|
|
2040
|
+
{
|
|
2041
|
+
"fileName": "src/SessionMessages/SessionMessages.tsx",
|
|
2042
|
+
"name": "SessionMessagesProps"
|
|
2043
|
+
}
|
|
2044
|
+
],
|
|
2045
|
+
"required": false,
|
|
2046
|
+
"type": {
|
|
2047
|
+
"name": "string"
|
|
2048
|
+
}
|
|
2049
|
+
},
|
|
1953
2050
|
"newSessionContent": {
|
|
1954
2051
|
"defaultValue": null,
|
|
1955
2052
|
"description": "Content to display when there are no sessions selected or a new session is started.",
|
|
@@ -2011,10 +2108,29 @@
|
|
|
2011
2108
|
"name": "string"
|
|
2012
2109
|
}
|
|
2013
2110
|
},
|
|
2014
|
-
"
|
|
2111
|
+
"autoScroll": {
|
|
2015
2112
|
"defaultValue": {
|
|
2016
|
-
"value": "
|
|
2113
|
+
"value": "true"
|
|
2017
2114
|
},
|
|
2115
|
+
"description": "Whether to automatically scroll to the bottom of the content.",
|
|
2116
|
+
"name": "autoScroll",
|
|
2117
|
+
"parent": {
|
|
2118
|
+
"fileName": "src/SessionMessages/SessionMessages.tsx",
|
|
2119
|
+
"name": "SessionMessagesProps"
|
|
2120
|
+
},
|
|
2121
|
+
"declarations": [
|
|
2122
|
+
{
|
|
2123
|
+
"fileName": "src/SessionMessages/SessionMessages.tsx",
|
|
2124
|
+
"name": "SessionMessagesProps"
|
|
2125
|
+
}
|
|
2126
|
+
],
|
|
2127
|
+
"required": false,
|
|
2128
|
+
"type": {
|
|
2129
|
+
"name": "boolean"
|
|
2130
|
+
}
|
|
2131
|
+
},
|
|
2132
|
+
"showScrollBottomButton": {
|
|
2133
|
+
"defaultValue": null,
|
|
2018
2134
|
"description": "Whether to display the scroll to bottom button.",
|
|
2019
2135
|
"name": "showScrollBottomButton",
|
|
2020
2136
|
"parent": {
|
|
@@ -2050,6 +2166,84 @@
|
|
|
2050
2166
|
"type": {
|
|
2051
2167
|
"name": "(conversations: Conversation[]) => ReactNode"
|
|
2052
2168
|
}
|
|
2169
|
+
},
|
|
2170
|
+
"showLoadMoreButton": {
|
|
2171
|
+
"defaultValue": {
|
|
2172
|
+
"value": "false"
|
|
2173
|
+
},
|
|
2174
|
+
"description": "Whether to show the load more button.",
|
|
2175
|
+
"name": "showLoadMoreButton",
|
|
2176
|
+
"parent": {
|
|
2177
|
+
"fileName": "src/SessionMessages/SessionMessages.tsx",
|
|
2178
|
+
"name": "SessionMessagesProps"
|
|
2179
|
+
},
|
|
2180
|
+
"declarations": [
|
|
2181
|
+
{
|
|
2182
|
+
"fileName": "src/SessionMessages/SessionMessages.tsx",
|
|
2183
|
+
"name": "SessionMessagesProps"
|
|
2184
|
+
}
|
|
2185
|
+
],
|
|
2186
|
+
"required": false,
|
|
2187
|
+
"type": {
|
|
2188
|
+
"name": "boolean"
|
|
2189
|
+
}
|
|
2190
|
+
},
|
|
2191
|
+
"loadMoreButtonDisabled": {
|
|
2192
|
+
"defaultValue": null,
|
|
2193
|
+
"description": "Whether to disable the load more button.",
|
|
2194
|
+
"name": "loadMoreButtonDisabled",
|
|
2195
|
+
"parent": {
|
|
2196
|
+
"fileName": "src/SessionMessages/SessionMessages.tsx",
|
|
2197
|
+
"name": "SessionMessagesProps"
|
|
2198
|
+
},
|
|
2199
|
+
"declarations": [
|
|
2200
|
+
{
|
|
2201
|
+
"fileName": "src/SessionMessages/SessionMessages.tsx",
|
|
2202
|
+
"name": "SessionMessagesProps"
|
|
2203
|
+
}
|
|
2204
|
+
],
|
|
2205
|
+
"required": false,
|
|
2206
|
+
"type": {
|
|
2207
|
+
"name": "boolean"
|
|
2208
|
+
}
|
|
2209
|
+
},
|
|
2210
|
+
"onScroll": {
|
|
2211
|
+
"defaultValue": null,
|
|
2212
|
+
"description": "Scroll event handler.\n@param e",
|
|
2213
|
+
"name": "onScroll",
|
|
2214
|
+
"parent": {
|
|
2215
|
+
"fileName": "src/SessionMessages/SessionMessages.tsx",
|
|
2216
|
+
"name": "SessionMessagesProps"
|
|
2217
|
+
},
|
|
2218
|
+
"declarations": [
|
|
2219
|
+
{
|
|
2220
|
+
"fileName": "src/SessionMessages/SessionMessages.tsx",
|
|
2221
|
+
"name": "SessionMessagesProps"
|
|
2222
|
+
}
|
|
2223
|
+
],
|
|
2224
|
+
"required": false,
|
|
2225
|
+
"type": {
|
|
2226
|
+
"name": "UIEventHandler<HTMLDivElement>"
|
|
2227
|
+
}
|
|
2228
|
+
},
|
|
2229
|
+
"onLoadMore": {
|
|
2230
|
+
"defaultValue": null,
|
|
2231
|
+
"description": "Load more event handler.",
|
|
2232
|
+
"name": "onLoadMore",
|
|
2233
|
+
"parent": {
|
|
2234
|
+
"fileName": "src/SessionMessages/SessionMessages.tsx",
|
|
2235
|
+
"name": "SessionMessagesProps"
|
|
2236
|
+
},
|
|
2237
|
+
"declarations": [
|
|
2238
|
+
{
|
|
2239
|
+
"fileName": "src/SessionMessages/SessionMessages.tsx",
|
|
2240
|
+
"name": "SessionMessagesProps"
|
|
2241
|
+
}
|
|
2242
|
+
],
|
|
2243
|
+
"required": false,
|
|
2244
|
+
"type": {
|
|
2245
|
+
"name": "() => void"
|
|
2246
|
+
}
|
|
2053
2247
|
}
|
|
2054
2248
|
}
|
|
2055
2249
|
},
|
|
@@ -2856,6 +3050,25 @@
|
|
|
2856
3050
|
"displayName": "SessionMessage",
|
|
2857
3051
|
"methods": [],
|
|
2858
3052
|
"props": {
|
|
3053
|
+
"className": {
|
|
3054
|
+
"defaultValue": null,
|
|
3055
|
+
"description": "Class name to apply to the root element.",
|
|
3056
|
+
"name": "className",
|
|
3057
|
+
"parent": {
|
|
3058
|
+
"fileName": "src/SessionMessages/SessionMessage/SessionMessage.tsx",
|
|
3059
|
+
"name": "SessionMessageProps"
|
|
3060
|
+
},
|
|
3061
|
+
"declarations": [
|
|
3062
|
+
{
|
|
3063
|
+
"fileName": "src/SessionMessages/SessionMessage/SessionMessage.tsx",
|
|
3064
|
+
"name": "SessionMessageProps"
|
|
3065
|
+
}
|
|
3066
|
+
],
|
|
3067
|
+
"required": false,
|
|
3068
|
+
"type": {
|
|
3069
|
+
"name": "string"
|
|
3070
|
+
}
|
|
3071
|
+
},
|
|
2859
3072
|
"conversation": {
|
|
2860
3073
|
"defaultValue": null,
|
|
2861
3074
|
"description": "Conversation to render.",
|