@hanzo/ui 3.0.7 → 3.0.9

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.
@@ -13,7 +13,7 @@ import {
13
13
  type TypographySize
14
14
  } from '../../../primitives'
15
15
 
16
- import type { CardBlock } from '../../def'
16
+ import type { CardBlock, VideoBlock } from '../../def'
17
17
 
18
18
  import ImageBlockComponent from '../image-block'
19
19
  import VideoBlockComponent from '../video-block'
@@ -93,8 +93,8 @@ const CardBlockComponent: React.FC<BlockComponentProps & {
93
93
  <CardContent className={'flex flex-row justify-start items-stretch p-0 grow ' + disabledBorder + bgclx + contentclx + className}>
94
94
  {card.media && (
95
95
  <div className={'box-content grow-0 not-typography' + paddingclx} style={{
96
- // If this layout has been specified, assume video, and that the 'sm' variant is there.
97
- width: (card.media.dim as TShirtDimensions).sm!.w
96
+ // If this layout has been specified, assume media is video, and that the 'sm' dim exists.
97
+ width: (card.media as VideoBlock).dim.sm!.w
98
98
  }}>
99
99
  <VideoBlockComponent
100
100
  block={card.media}
@@ -1,26 +1,7 @@
1
- import type { TShirtDimensions } from '../../types'
2
- import type Block from './block'
1
+ import type { VideoDef } from '../../types'
3
2
 
4
- interface VideoBlock extends Block {
3
+ interface VideoBlock extends VideoDef {
5
4
  blockType: 'video'
6
- videoProps?: any // For example,
7
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8
- videoProps: {
9
- autoPlay: true,
10
- loop: true,
11
- muted: true,
12
- playsInline: true
13
- },
14
-
15
- Valueless props are boolean.
16
- NOTE: Must be camalCase as per React conventions! (playsinline => playsInline)
17
- ~~~~~~~~~~~~~~~~~~~~~~~~ */
18
-
19
- poster?: string
20
- sources?: string[]
21
- dim: TShirtDimensions
22
- // These are suppored so far: { vh: 60, mobile: {vw: 70} }
23
- sizing?: any
24
5
  }
25
6
 
26
7
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hanzo/ui",
3
- "version": "3.0.7",
3
+ "version": "3.0.9",
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/",
@@ -1,14 +1,12 @@
1
1
  'use client'
2
2
 
3
3
  import * as React from 'react'
4
- import useEmblaCarousel, {
5
- type UseEmblaCarouselType,
6
- } from 'embla-carousel-react'
7
- import { ArrowLeft, ArrowRight } from 'lucide-react'
4
+ import useEmblaCarousel, { type UseEmblaCarouselType } from 'embla-carousel-react'
8
5
  import Autoplay from "embla-carousel-autoplay"
6
+ import { ArrowLeft, ArrowRight } from 'lucide-react'
9
7
 
10
8
  import { cn } from '../util'
11
- import { Button } from '.'
9
+ import Button from './button'
12
10
 
13
11
  type CarouselApi = UseEmblaCarouselType[1]
14
12
  type UseCarouselParameters = Parameters<typeof useEmblaCarousel>
@@ -1,4 +1,4 @@
1
- import type { Icon } from '.'
1
+ import type Icon from './icon'
2
2
 
3
3
  interface BulletItem {
4
4
  text: string,
package/types/index.ts CHANGED
@@ -16,4 +16,5 @@ export type { default as Icon } from './icon'
16
16
  export type { default as ImageDef } from './image-def'
17
17
  export type { default as LinkDef } from './link-def'
18
18
  export type { default as TShirtSize } from './t-shirt-size'
19
+ export type { default as VideoDef } from './video-def'
19
20
 
package/types/link-def.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { ButtonVariants, ButtonSizes } from '../primitives/button'
2
- import type { Icon } from '.'
2
+ import type Icon from './icon'
3
3
 
4
4
  /**
5
5
  * A Conf object for the LinkElement primitive.
@@ -0,0 +1,25 @@
1
+ import type { TShirtDimensions } from './dimensions'
2
+
3
+ interface VideoDef {
4
+ videoProps?: any // For example,
5
+ /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6
+ videoProps: {
7
+ autoPlay: true,
8
+ loop: true,
9
+ muted: true,
10
+ playsInline: true
11
+ },
12
+
13
+ Valueless props are boolean.
14
+ NOTE: Must be camalCase as per React conventions! (playsinline => playsInline)
15
+ ~~~~~~~~~~~~~~~~~~~~~~~~ */
16
+ poster?: string
17
+ sources?: string[]
18
+ dim: TShirtDimensions
19
+ // These are suppored so far: { vh: 60, mobile: {vw: 70} }
20
+ sizing?: any
21
+ }
22
+
23
+ export {
24
+ type VideoDef as default
25
+ }