@page-speed/agent-everywhere 0.2.0 → 0.3.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/index.cjs +27 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +27 -1
- package/dist/index.js.map +1 -1
- package/package.json +6 -1
package/dist/index.cjs
CHANGED
|
@@ -6,6 +6,7 @@ var tailwindMerge = require('tailwind-merge');
|
|
|
6
6
|
var React4 = require('react');
|
|
7
7
|
var jsxRuntime = require('react/jsx-runtime');
|
|
8
8
|
var react = require('motion/react');
|
|
9
|
+
var markdownToJsx = require('@page-speed/markdown-to-jsx');
|
|
9
10
|
var lucideReact = require('lucide-react');
|
|
10
11
|
var reactSlot = require('@radix-ui/react-slot');
|
|
11
12
|
var classVarianceAuthority = require('class-variance-authority');
|
|
@@ -1006,7 +1007,32 @@ function MessageBubble({ role, children, className, unstyled }) {
|
|
|
1006
1007
|
}
|
|
1007
1008
|
);
|
|
1008
1009
|
}
|
|
1009
|
-
|
|
1010
|
+
var PROSE_CLASSES = cn(
|
|
1011
|
+
"text-sm leading-relaxed",
|
|
1012
|
+
"[&_p]:my-1.5 first:[&_p]:mt-0 last:[&_p]:mb-0",
|
|
1013
|
+
"[&_ul]:my-1.5 [&_ul]:list-disc [&_ul]:pl-5",
|
|
1014
|
+
"[&_ol]:my-1.5 [&_ol]:list-decimal [&_ol]:pl-5",
|
|
1015
|
+
"[&_li]:my-0.5",
|
|
1016
|
+
"[&_h1]:mt-2 [&_h1]:mb-1 [&_h1]:text-base [&_h1]:font-semibold",
|
|
1017
|
+
"[&_h2]:mt-2 [&_h2]:mb-1 [&_h2]:text-sm [&_h2]:font-semibold",
|
|
1018
|
+
"[&_h3]:mt-2 [&_h3]:mb-1 [&_h3]:text-sm [&_h3]:font-semibold",
|
|
1019
|
+
"[&_strong]:font-semibold",
|
|
1020
|
+
"[&_a]:underline [&_a]:underline-offset-2",
|
|
1021
|
+
"[&_code]:rounded [&_code]:bg-black/10 [&_code]:px-1 [&_code]:py-0.5 [&_code]:text-[0.85em]",
|
|
1022
|
+
"[&_pre]:my-1.5 [&_pre]:overflow-x-auto [&_pre]:rounded-md [&_pre]:bg-black/10 [&_pre]:p-2 [&_pre]:text-xs",
|
|
1023
|
+
"[&_pre_code]:bg-transparent [&_pre_code]:p-0",
|
|
1024
|
+
"[&_blockquote]:border-l-2 [&_blockquote]:border-current/30 [&_blockquote]:pl-3 [&_blockquote]:opacity-90",
|
|
1025
|
+
"[&_hr]:my-2 [&_hr]:border-current/20",
|
|
1026
|
+
"whitespace-normal"
|
|
1027
|
+
);
|
|
1028
|
+
function MessageContent({
|
|
1029
|
+
children,
|
|
1030
|
+
className,
|
|
1031
|
+
markdown = true
|
|
1032
|
+
}) {
|
|
1033
|
+
if (markdown && typeof children === "string") {
|
|
1034
|
+
return /* @__PURE__ */ jsxRuntime.jsx(markdownToJsx.Markdown, { className: cn(PROSE_CLASSES, className), children });
|
|
1035
|
+
}
|
|
1010
1036
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("text-sm leading-relaxed whitespace-pre-wrap", className), children });
|
|
1011
1037
|
}
|
|
1012
1038
|
function MessageContainer({ role, children, className }) {
|