reachat 1.5.0 → 1.5.1
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/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +9 -9
- package/dist/index.umd.cjs.map +1 -1
- package/package.json +3 -3
package/dist/index.umd.cjs
CHANGED
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
}
|
|
12
12
|
})();
|
|
13
13
|
(function(global, factory) {
|
|
14
|
-
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("react/jsx-runtime"), require("react"), require("reablocks"), require("@radix-ui/react-slot"), require("
|
|
15
|
-
})(this, function(exports2, jsxRuntime, React, reablocks, reactSlot,
|
|
14
|
+
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("react/jsx-runtime"), require("react"), require("reablocks"), require("@radix-ui/react-slot"), require("motion/react"), require("react-markdown"), require("react-syntax-highlighter"), require("rehype-katex"), require("mdast-util-find-and-replace"), require("reakeys"), require("remark-gfm"), require("remark-youtube"), require("remark-math"), require("date-fns")) : typeof define === "function" && define.amd ? define(["exports", "react/jsx-runtime", "react", "reablocks", "@radix-ui/react-slot", "motion/react", "react-markdown", "react-syntax-highlighter", "rehype-katex", "mdast-util-find-and-replace", "reakeys", "remark-gfm", "remark-youtube", "remark-math", "date-fns"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.reachat = {}, global.jsxRuntime, global.React, global.reablocks, global.reactSlot, global.react, global.ReactMarkdown, global.reactSyntaxHighlighter, global.rehypeKatex, global.mdastUtilFindAndReplace, global.reakeys, global.remarkGfm, global.remarkYoutube, global.remarkMath, global.dateFns));
|
|
15
|
+
})(this, function(exports2, jsxRuntime, React, reablocks, reactSlot, react, ReactMarkdown, reactSyntaxHighlighter, rehypeKatex, mdastUtilFindAndReplace, reakeys, remarkGfm, remarkYoutube, remarkMath, dateFns) {
|
|
16
16
|
"use strict";
|
|
17
17
|
function _interopNamespaceDefault(e) {
|
|
18
18
|
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
@@ -193,7 +193,7 @@
|
|
|
193
193
|
const { activeSessionId, theme, isCompact, selectSession, viewType } = React.useContext(ChatContext);
|
|
194
194
|
const isVisible = isCompact && activeSessionId || viewType === "chat" || !isCompact;
|
|
195
195
|
return isVisible && /* @__PURE__ */ jsxRuntime.jsx(
|
|
196
|
-
|
|
196
|
+
react.motion.div,
|
|
197
197
|
{
|
|
198
198
|
initial: { translateX: "200%" },
|
|
199
199
|
animate: {
|
|
@@ -1473,7 +1473,7 @@
|
|
|
1473
1473
|
children: children || /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1474
1474
|
/* @__PURE__ */ jsxRuntime.jsx(Markdown, { remarkPlugins, children: response }),
|
|
1475
1475
|
isLoading && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1476
|
-
|
|
1476
|
+
react.motion.div,
|
|
1477
1477
|
{
|
|
1478
1478
|
className: reablocks.cn(theme.messages.message.cursor),
|
|
1479
1479
|
animate: { opacity: [1, 0] },
|
|
@@ -1617,7 +1617,7 @@ ${response}`),
|
|
|
1617
1617
|
children
|
|
1618
1618
|
}) => {
|
|
1619
1619
|
const { theme, isLoading } = React.useContext(ChatContext);
|
|
1620
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1620
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(react.motion.div, { variants: messageVariants, children: [
|
|
1621
1621
|
/* @__PURE__ */ jsxRuntime.jsx(reablocks.Card, { className: reablocks.cn(theme.messages.message.base), children: children || /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1622
1622
|
/* @__PURE__ */ jsxRuntime.jsx(MessageQuestion, { question: conversation.question, files: conversation.files }),
|
|
1623
1623
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1692,8 +1692,8 @@ ${response}`),
|
|
|
1692
1692
|
children: showMoreText
|
|
1693
1693
|
}
|
|
1694
1694
|
),
|
|
1695
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1696
|
-
|
|
1695
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.AnimatePresence, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1696
|
+
react.motion.div,
|
|
1697
1697
|
{
|
|
1698
1698
|
variants: containerVariants,
|
|
1699
1699
|
initial: "hidden",
|
|
@@ -1943,7 +1943,7 @@ ${response}`),
|
|
|
1943
1943
|
onFileUpload
|
|
1944
1944
|
]
|
|
1945
1945
|
);
|
|
1946
|
-
return /* @__PURE__ */ jsxRuntime.jsx(ChatContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1946
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ChatContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsx(react.AnimatePresence, { initial: false, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1947
1947
|
"div",
|
|
1948
1948
|
{
|
|
1949
1949
|
ref: observe,
|
|
@@ -1960,7 +1960,7 @@ ${response}`),
|
|
|
1960
1960
|
const { theme, isCompact, activeSessionId } = React.useContext(ChatContext);
|
|
1961
1961
|
const isVisible = isCompact && !activeSessionId;
|
|
1962
1962
|
return (!isCompact || isVisible) && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1963
|
-
|
|
1963
|
+
react.motion.div,
|
|
1964
1964
|
{
|
|
1965
1965
|
initial: { translateX: "-100%" },
|
|
1966
1966
|
animate: {
|