@harshit-wander/component-lib 1.1.9 → 1.1.11
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/LICENSE +21 -21
- package/README.md +154 -154
- package/dist/index.cjs +295 -149
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +36 -0
- package/dist/index.d.ts +36 -0
- package/dist/index.js +295 -149
- package/dist/index.js.map +1 -1
- package/package.json +22 -24
package/dist/index.d.cts
CHANGED
|
@@ -80,6 +80,24 @@ interface EventVideoBannerProps extends HTMLAttributes<HTMLElement> {
|
|
|
80
80
|
videoUrl: string;
|
|
81
81
|
alt: string;
|
|
82
82
|
href?: string | undefined;
|
|
83
|
+
/**
|
|
84
|
+
* Optional mobile-specific video source. When the viewport is <= 767px,
|
|
85
|
+
* EventVideoBanner uses this instead of `videoUrl`. The selection happens
|
|
86
|
+
* in a client-only effect, so no desktop bytes are requested on mobile.
|
|
87
|
+
*/
|
|
88
|
+
mobileVideoUrl?: string | undefined;
|
|
89
|
+
/**
|
|
90
|
+
* Optional mobile-specific poster image. Used in the inactive (poster-only)
|
|
91
|
+
* state via a `<picture>` element with a media-query <source>, so the
|
|
92
|
+
* browser fetches the smallest variant for the active viewport.
|
|
93
|
+
*/
|
|
94
|
+
mobilePosterUrl?: string | undefined;
|
|
95
|
+
/**
|
|
96
|
+
* When false, renders only the poster image (no <video> element, no HLS load).
|
|
97
|
+
* Used by EventCarousel to avoid loading every video in the carousel at once.
|
|
98
|
+
* Defaults to true to preserve standalone usage.
|
|
99
|
+
*/
|
|
100
|
+
isActive?: boolean;
|
|
83
101
|
}
|
|
84
102
|
|
|
85
103
|
declare const EventVideoBanner: react.ForwardRefExoticComponent<EventVideoBannerProps & react.RefAttributes<HTMLDivElement>>;
|
|
@@ -213,6 +231,12 @@ declare const TestimonialCard: react.ForwardRefExoticComponent<TestimonialCardPr
|
|
|
213
231
|
|
|
214
232
|
interface TripCategoryCardProps extends HTMLAttributes<HTMLElement> {
|
|
215
233
|
image: string;
|
|
234
|
+
/**
|
|
235
|
+
* Optional mobile-specific image. When provided, the card emits a
|
|
236
|
+
* `<picture>` with a `(max-width: 767px)` source so narrow viewports
|
|
237
|
+
* fetch the smaller variant. No JS, no hydration mismatch.
|
|
238
|
+
*/
|
|
239
|
+
mobileImage?: string | undefined;
|
|
216
240
|
alt: string;
|
|
217
241
|
destination: string;
|
|
218
242
|
startingPrice: string;
|
|
@@ -355,6 +379,9 @@ interface EventCarouselVideoItem {
|
|
|
355
379
|
videoUrl: string;
|
|
356
380
|
alt: string;
|
|
357
381
|
href?: string | undefined;
|
|
382
|
+
/** Optional viewport-specific overrides used at <= 767px. */
|
|
383
|
+
mobileVideoUrl?: string | undefined;
|
|
384
|
+
mobilePosterUrl?: string | undefined;
|
|
358
385
|
}
|
|
359
386
|
type BaseProps = HTMLAttributes<HTMLElement>;
|
|
360
387
|
type EventCarouselProps = (BaseProps & {
|
|
@@ -486,6 +513,13 @@ interface HomeHeroProps extends HTMLAttributes<HTMLElement> {
|
|
|
486
513
|
videoUrl: string;
|
|
487
514
|
/** Poster image URL shown before the video loads and on browsers that block autoplay. */
|
|
488
515
|
posterUrl: string;
|
|
516
|
+
/**
|
|
517
|
+
* Optional mobile-specific poster. When provided, the component swaps the
|
|
518
|
+
* `<video poster>` attribute to this URL on viewports <= 767px in a
|
|
519
|
+
* client-only effect. Pair with `<link rel="preload" imageSrcSet>` in the
|
|
520
|
+
* page head to actually save bytes on mobile.
|
|
521
|
+
*/
|
|
522
|
+
mobilePosterUrl?: string | undefined;
|
|
489
523
|
/** Static heading. White, bold, large. */
|
|
490
524
|
title: string;
|
|
491
525
|
/**
|
|
@@ -622,6 +656,8 @@ interface TripsCategorySectionCta {
|
|
|
622
656
|
}
|
|
623
657
|
interface TripsCategoryItem {
|
|
624
658
|
image: string;
|
|
659
|
+
/** Optional mobile-specific image for the destination card. */
|
|
660
|
+
mobileImage?: string | undefined;
|
|
625
661
|
alt: string;
|
|
626
662
|
destination: string;
|
|
627
663
|
startingPrice: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -80,6 +80,24 @@ interface EventVideoBannerProps extends HTMLAttributes<HTMLElement> {
|
|
|
80
80
|
videoUrl: string;
|
|
81
81
|
alt: string;
|
|
82
82
|
href?: string | undefined;
|
|
83
|
+
/**
|
|
84
|
+
* Optional mobile-specific video source. When the viewport is <= 767px,
|
|
85
|
+
* EventVideoBanner uses this instead of `videoUrl`. The selection happens
|
|
86
|
+
* in a client-only effect, so no desktop bytes are requested on mobile.
|
|
87
|
+
*/
|
|
88
|
+
mobileVideoUrl?: string | undefined;
|
|
89
|
+
/**
|
|
90
|
+
* Optional mobile-specific poster image. Used in the inactive (poster-only)
|
|
91
|
+
* state via a `<picture>` element with a media-query <source>, so the
|
|
92
|
+
* browser fetches the smallest variant for the active viewport.
|
|
93
|
+
*/
|
|
94
|
+
mobilePosterUrl?: string | undefined;
|
|
95
|
+
/**
|
|
96
|
+
* When false, renders only the poster image (no <video> element, no HLS load).
|
|
97
|
+
* Used by EventCarousel to avoid loading every video in the carousel at once.
|
|
98
|
+
* Defaults to true to preserve standalone usage.
|
|
99
|
+
*/
|
|
100
|
+
isActive?: boolean;
|
|
83
101
|
}
|
|
84
102
|
|
|
85
103
|
declare const EventVideoBanner: react.ForwardRefExoticComponent<EventVideoBannerProps & react.RefAttributes<HTMLDivElement>>;
|
|
@@ -213,6 +231,12 @@ declare const TestimonialCard: react.ForwardRefExoticComponent<TestimonialCardPr
|
|
|
213
231
|
|
|
214
232
|
interface TripCategoryCardProps extends HTMLAttributes<HTMLElement> {
|
|
215
233
|
image: string;
|
|
234
|
+
/**
|
|
235
|
+
* Optional mobile-specific image. When provided, the card emits a
|
|
236
|
+
* `<picture>` with a `(max-width: 767px)` source so narrow viewports
|
|
237
|
+
* fetch the smaller variant. No JS, no hydration mismatch.
|
|
238
|
+
*/
|
|
239
|
+
mobileImage?: string | undefined;
|
|
216
240
|
alt: string;
|
|
217
241
|
destination: string;
|
|
218
242
|
startingPrice: string;
|
|
@@ -355,6 +379,9 @@ interface EventCarouselVideoItem {
|
|
|
355
379
|
videoUrl: string;
|
|
356
380
|
alt: string;
|
|
357
381
|
href?: string | undefined;
|
|
382
|
+
/** Optional viewport-specific overrides used at <= 767px. */
|
|
383
|
+
mobileVideoUrl?: string | undefined;
|
|
384
|
+
mobilePosterUrl?: string | undefined;
|
|
358
385
|
}
|
|
359
386
|
type BaseProps = HTMLAttributes<HTMLElement>;
|
|
360
387
|
type EventCarouselProps = (BaseProps & {
|
|
@@ -486,6 +513,13 @@ interface HomeHeroProps extends HTMLAttributes<HTMLElement> {
|
|
|
486
513
|
videoUrl: string;
|
|
487
514
|
/** Poster image URL shown before the video loads and on browsers that block autoplay. */
|
|
488
515
|
posterUrl: string;
|
|
516
|
+
/**
|
|
517
|
+
* Optional mobile-specific poster. When provided, the component swaps the
|
|
518
|
+
* `<video poster>` attribute to this URL on viewports <= 767px in a
|
|
519
|
+
* client-only effect. Pair with `<link rel="preload" imageSrcSet>` in the
|
|
520
|
+
* page head to actually save bytes on mobile.
|
|
521
|
+
*/
|
|
522
|
+
mobilePosterUrl?: string | undefined;
|
|
489
523
|
/** Static heading. White, bold, large. */
|
|
490
524
|
title: string;
|
|
491
525
|
/**
|
|
@@ -622,6 +656,8 @@ interface TripsCategorySectionCta {
|
|
|
622
656
|
}
|
|
623
657
|
interface TripsCategoryItem {
|
|
624
658
|
image: string;
|
|
659
|
+
/** Optional mobile-specific image for the destination card. */
|
|
660
|
+
mobileImage?: string | undefined;
|
|
625
661
|
alt: string;
|
|
626
662
|
destination: string;
|
|
627
663
|
startingPrice: string;
|