@melony/react 0.1.49 → 0.1.51
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 +48 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +48 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -691,6 +691,52 @@ var Image = ({
|
|
|
691
691
|
)
|
|
692
692
|
] });
|
|
693
693
|
};
|
|
694
|
+
var Video = ({
|
|
695
|
+
src,
|
|
696
|
+
poster,
|
|
697
|
+
autoPlay = false,
|
|
698
|
+
controls = true,
|
|
699
|
+
loop = false,
|
|
700
|
+
muted = false,
|
|
701
|
+
aspectRatio = "16/9",
|
|
702
|
+
width = "100%",
|
|
703
|
+
className,
|
|
704
|
+
style
|
|
705
|
+
}) => {
|
|
706
|
+
const aspectRatios = {
|
|
707
|
+
"16/9": "aspect-video",
|
|
708
|
+
"4/3": "aspect-[4/3]",
|
|
709
|
+
"1/1": "aspect-square",
|
|
710
|
+
"9/16": "aspect-[9/16]"
|
|
711
|
+
};
|
|
712
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
713
|
+
"div",
|
|
714
|
+
{
|
|
715
|
+
className: cn(
|
|
716
|
+
"relative overflow-hidden rounded-lg bg-black shadow-sm",
|
|
717
|
+
aspectRatios[aspectRatio] || "aspect-video",
|
|
718
|
+
className
|
|
719
|
+
),
|
|
720
|
+
style: {
|
|
721
|
+
width: typeof width === "number" ? `${width}px` : width,
|
|
722
|
+
...style
|
|
723
|
+
},
|
|
724
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
725
|
+
"video",
|
|
726
|
+
{
|
|
727
|
+
src,
|
|
728
|
+
poster,
|
|
729
|
+
autoPlay,
|
|
730
|
+
controls,
|
|
731
|
+
loop,
|
|
732
|
+
muted,
|
|
733
|
+
playsInline: true,
|
|
734
|
+
className: "h-full w-full object-cover"
|
|
735
|
+
}
|
|
736
|
+
)
|
|
737
|
+
}
|
|
738
|
+
);
|
|
739
|
+
};
|
|
694
740
|
var Icon = ({
|
|
695
741
|
name,
|
|
696
742
|
size,
|
|
@@ -2104,6 +2150,7 @@ function UIRenderer({ node }) {
|
|
|
2104
2150
|
divider: Divider,
|
|
2105
2151
|
box: Box,
|
|
2106
2152
|
image: Image,
|
|
2153
|
+
video: Video,
|
|
2107
2154
|
icon: Icon,
|
|
2108
2155
|
list: List,
|
|
2109
2156
|
listItem: ListItem,
|
|
@@ -3967,7 +4014,7 @@ var CreateThreadListItem = ({
|
|
|
3967
4014
|
url: "?"
|
|
3968
4015
|
}
|
|
3969
4016
|
},
|
|
3970
|
-
className: cn(className
|
|
4017
|
+
className: cn(className),
|
|
3971
4018
|
children: [
|
|
3972
4019
|
/* @__PURE__ */ jsxRuntime.jsx(ICONS.IconPlus, { className: "size-4" }),
|
|
3973
4020
|
"New chat"
|