@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.js CHANGED
@@ -671,6 +671,52 @@ var Image = ({
671
671
  )
672
672
  ] });
673
673
  };
674
+ var Video = ({
675
+ src,
676
+ poster,
677
+ autoPlay = false,
678
+ controls = true,
679
+ loop = false,
680
+ muted = false,
681
+ aspectRatio = "16/9",
682
+ width = "100%",
683
+ className,
684
+ style
685
+ }) => {
686
+ const aspectRatios = {
687
+ "16/9": "aspect-video",
688
+ "4/3": "aspect-[4/3]",
689
+ "1/1": "aspect-square",
690
+ "9/16": "aspect-[9/16]"
691
+ };
692
+ return /* @__PURE__ */ jsx(
693
+ "div",
694
+ {
695
+ className: cn(
696
+ "relative overflow-hidden rounded-lg bg-black shadow-sm",
697
+ aspectRatios[aspectRatio] || "aspect-video",
698
+ className
699
+ ),
700
+ style: {
701
+ width: typeof width === "number" ? `${width}px` : width,
702
+ ...style
703
+ },
704
+ children: /* @__PURE__ */ jsx(
705
+ "video",
706
+ {
707
+ src,
708
+ poster,
709
+ autoPlay,
710
+ controls,
711
+ loop,
712
+ muted,
713
+ playsInline: true,
714
+ className: "h-full w-full object-cover"
715
+ }
716
+ )
717
+ }
718
+ );
719
+ };
674
720
  var Icon = ({
675
721
  name,
676
722
  size,
@@ -2084,6 +2130,7 @@ function UIRenderer({ node }) {
2084
2130
  divider: Divider,
2085
2131
  box: Box,
2086
2132
  image: Image,
2133
+ video: Video,
2087
2134
  icon: Icon,
2088
2135
  list: List,
2089
2136
  listItem: ListItem,