@melony/react 0.1.49 → 0.1.50

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 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,