@usecrow/ui 0.1.31 → 0.1.32
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 +42 -20
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +42 -20
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1632,16 +1632,27 @@ function StreamingText({
|
|
|
1632
1632
|
ol: ({ children }) => /* @__PURE__ */ jsxRuntime.jsx("ol", { className: "crow-list-decimal crow-pl-5 crow-my-1.5", children }),
|
|
1633
1633
|
li: ({ children }) => /* @__PURE__ */ jsxRuntime.jsx("li", { className: "crow-mb-0.5 last:crow-mb-0", children }),
|
|
1634
1634
|
p: ({ children }) => /* @__PURE__ */ jsxRuntime.jsx("p", { className: "crow-mb-1.5 last:crow-mb-0", children }),
|
|
1635
|
-
a: ({ href, children }) =>
|
|
1636
|
-
"
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1635
|
+
a: ({ href, children }) => {
|
|
1636
|
+
const isInternal = href?.startsWith("/");
|
|
1637
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1638
|
+
"a",
|
|
1639
|
+
{
|
|
1640
|
+
href,
|
|
1641
|
+
className: "crow-underline hover:crow-text-blue-300",
|
|
1642
|
+
...!isInternal && { target: "_blank", rel: "noopener noreferrer" },
|
|
1643
|
+
onClick: isInternal ? (e) => {
|
|
1644
|
+
e.preventDefault();
|
|
1645
|
+
const a = document.createElement("a");
|
|
1646
|
+
a.href = href;
|
|
1647
|
+
a.style.display = "none";
|
|
1648
|
+
document.body.appendChild(a);
|
|
1649
|
+
a.click();
|
|
1650
|
+
document.body.removeChild(a);
|
|
1651
|
+
} : void 0,
|
|
1652
|
+
children
|
|
1653
|
+
}
|
|
1654
|
+
);
|
|
1655
|
+
},
|
|
1645
1656
|
code: ({ className, children, ...props }) => {
|
|
1646
1657
|
const isInline = !className;
|
|
1647
1658
|
return isInline ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1969,16 +1980,27 @@ function MessageBubble({
|
|
|
1969
1980
|
ol: ({ children }) => /* @__PURE__ */ jsxRuntime.jsx("ol", { className: "crow-list-decimal crow-pl-5 crow-my-1.5", children }),
|
|
1970
1981
|
li: ({ children }) => /* @__PURE__ */ jsxRuntime.jsx("li", { className: "crow-mb-0.5 last:crow-mb-0", children }),
|
|
1971
1982
|
p: ({ children }) => /* @__PURE__ */ jsxRuntime.jsx("p", { className: "crow-mb-1.5 last:crow-mb-0", children }),
|
|
1972
|
-
a: ({ href, children }) =>
|
|
1973
|
-
"
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1983
|
+
a: ({ href, children }) => {
|
|
1984
|
+
const isInternal = href?.startsWith("/");
|
|
1985
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1986
|
+
"a",
|
|
1987
|
+
{
|
|
1988
|
+
href,
|
|
1989
|
+
className: "crow-underline hover:crow-text-blue-300",
|
|
1990
|
+
...!isInternal && { target: "_blank", rel: "noopener noreferrer" },
|
|
1991
|
+
onClick: isInternal ? (e) => {
|
|
1992
|
+
e.preventDefault();
|
|
1993
|
+
const a = document.createElement("a");
|
|
1994
|
+
a.href = href;
|
|
1995
|
+
a.style.display = "none";
|
|
1996
|
+
document.body.appendChild(a);
|
|
1997
|
+
a.click();
|
|
1998
|
+
document.body.removeChild(a);
|
|
1999
|
+
} : void 0,
|
|
2000
|
+
children
|
|
2001
|
+
}
|
|
2002
|
+
);
|
|
2003
|
+
}
|
|
1982
2004
|
},
|
|
1983
2005
|
children: message.content
|
|
1984
2006
|
}
|