@hanzo/ui 3.8.27 → 3.8.29

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.
@@ -75,6 +75,7 @@ const ImageBlockComponent: React.FC<BlockComponentProps & {
75
75
  </div>
76
76
  )
77
77
  }
78
+ // TODO use constraint
78
79
  else if (!specified('mobile-no-scale')) {
79
80
  if (props?.style?.width === 'auto' && typeof props.style.height === 'number' ) {
80
81
  props.style.height = props.style.height *.75
@@ -51,7 +51,7 @@ const VideoBlockComponent: React.FC<BlockComponentProps & {
51
51
  }
52
52
 
53
53
  const b = block as VideoBlock
54
- const ar = asNum(b.dim.md.w) / asNum(b.dim.md.h)
54
+ const ar = b.dim.md.w / b.dim.md.h
55
55
  if (agent === 'phone') {
56
56
  if (b.sizing?.mobile?.vw) {
57
57
  // serverside, or at least while the video is loading,
@@ -122,6 +122,10 @@ const VideoBlockComponent: React.FC<BlockComponentProps & {
122
122
  const videoDims = b.dim as TShirtDimensions
123
123
  const dim = ((size && size in videoDims) ? videoDims[size] : videoDims.md) as Dimensions
124
124
  const conDim = (constrainTo ? constrain(dim, constrainTo) : dim)
125
+ if (b.sources?.[0] === '/assets/commerce/silver/product/luxsilver.mp4') {
126
+ console.log("VIDEO BLOCK, dim: ", dim)
127
+ console.log("VIDEO BLOCK, const dim: ", conDim)
128
+ }
125
129
  return usePoster ? (
126
130
  <Image src={b.poster!} alt='image' width={conDim.w} height={conDim.h} className={className}/>
127
131
  ) : (
@@ -14,7 +14,7 @@ interface CardBlock extends Block {
14
14
  byline?: string
15
15
  icon?: Icon // for title area
16
16
  iconAfter?: boolean
17
- media?: ImageBlock | VideoBlock
17
+ media?: ImageBlock | VideoBlock // TODO: Media Stack
18
18
  content?: React.ReactNode
19
19
  cta?: CTABlock
20
20
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hanzo/ui",
3
- "version": "3.8.27",
3
+ "version": "3.8.29",
4
4
  "description": "Library that contains shared UI primitives, support for a common design system, and other boilerplate support.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/",
@@ -67,7 +67,6 @@ const Image: React.FC<{
67
67
  return (fullWidth) ? (
68
68
  <div className='relative flex flex-col items-center justify-center w-full'>
69
69
  <NextImage
70
- data-vaul-no-drag
71
70
  src={src}
72
71
  alt={alt}
73
72
  {...toSpread}
@@ -80,7 +79,6 @@ const Image: React.FC<{
80
79
  <NextImage
81
80
  src={src}
82
81
  alt={alt}
83
- data-vaul-no-drag
84
82
  {...toSpread}
85
83
  priority={preload}
86
84
  loading={preload ? 'eager' : 'lazy'}
@@ -12,7 +12,7 @@ const VideoPlayer = React.forwardRef<HTMLVideoElement, VideoProps>(
12
12
  }, ref) => {
13
13
 
14
14
  return (
15
- <video ref={ref} {...rest} data-vaul-no-drag >
15
+ <video ref={ref} {...rest} >
16
16
  {sources.map((source, index) => (
17
17
  <source key={index} src={source} />
18
18
  ))}
@@ -18,6 +18,11 @@ interface MediaStackDef {
18
18
  video?: VideoDef
19
19
  animation?: AnimationDef
20
20
  mediaTransform?: MediaTransform
21
+ /** prefered order of precedence.
22
+ * If an type is missing, it will not be used.
23
+ * default (inMediaStack component): ['a', 'v', 'i']
24
+ * */
25
+ order?: ('a' | 'v' | 'i')[]
21
26
  }
22
27
 
23
28
  export type {