@loafmarkets/ui 0.1.413 → 0.1.414
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.d.mts +59 -7
- package/dist/index.d.ts +59 -7
- package/dist/index.js +72 -18
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +72 -19
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -2
package/dist/index.d.mts
CHANGED
|
@@ -205,9 +205,61 @@ interface HousePositionSliderMobileProps extends React$1.HTMLAttributes<HTMLDivE
|
|
|
205
205
|
}
|
|
206
206
|
declare function HousePositionSliderMobile({ tokenId, tokenSymbol, totalTokens, currentPrice, availableCash, tokensHeld, defaultOrderType, orderbook, ownershipPercentOverride, onConfirmOrder, className, ...props }: HousePositionSliderMobileProps): react_jsx_runtime.JSX.Element;
|
|
207
207
|
|
|
208
|
+
/**
|
|
209
|
+
* A video to play, plus what to play if it fails.
|
|
210
|
+
*
|
|
211
|
+
* Structurally identical to `PropertyVideoSource` in the app repo
|
|
212
|
+
* (loafx-frontend/shared/video/propertyVideoSrc.ts) — duplicated rather than
|
|
213
|
+
* imported because that lives outside this package. Keep the two shapes in step.
|
|
214
|
+
*/
|
|
215
|
+
type HlsVideoSource = {
|
|
216
|
+
src: string;
|
|
217
|
+
/** Played if `src` fails to load. Absent when there is nothing to fall back to. */
|
|
218
|
+
fallbackSrc?: string;
|
|
219
|
+
};
|
|
220
|
+
type HlsVideoProps = Omit<React$1.VideoHTMLAttributes<HTMLVideoElement>, "src"> & {
|
|
221
|
+
/**
|
|
222
|
+
* A URL, or a `{ src, fallbackSrc }` pair. An HLS manifest (`.m3u8`) streams
|
|
223
|
+
* adaptively; a plain file (mp4/webm) is handed straight to the element.
|
|
224
|
+
* Callers do not need to know which they have.
|
|
225
|
+
*/
|
|
226
|
+
src: string | HlsVideoSource;
|
|
227
|
+
/** Cap the chosen rendition to the element's on-screen size. */
|
|
228
|
+
capLevelToPlayerSize?: boolean;
|
|
229
|
+
};
|
|
230
|
+
/**
|
|
231
|
+
* A `<video>` that can also play HLS, with a fallback for a manifest that isn't
|
|
232
|
+
* there.
|
|
233
|
+
*
|
|
234
|
+
* Safari and iOS play HLS natively; Chrome and Firefox do not, so a bare
|
|
235
|
+
* `<video src="…m3u8">` silently fails there and hls.js has to drive the element
|
|
236
|
+
* instead. Every property video renders through this, so a manifest URL works the
|
|
237
|
+
* same everywhere and a plain file URL keeps working unchanged.
|
|
238
|
+
*
|
|
239
|
+
* `fallbackSrc` exists because a property's ladder URL is DERIVED, not confirmed
|
|
240
|
+
* (see propertyVideoSrc) — the transcode may not have run for that property yet.
|
|
241
|
+
* Without the fallback a missing ladder would be a dead black box; with it, the
|
|
242
|
+
* page quietly plays the original master instead.
|
|
243
|
+
*
|
|
244
|
+
* hls.js is imported ON DEMAND rather than at module scope: it is ~200 KB, and
|
|
245
|
+
* this component is re-exported from the package index, so a static import would
|
|
246
|
+
* put the parser in every consuming app's bundle whether or not it plays a
|
|
247
|
+
* manifest. Pages that only ever see a plain file never fetch it.
|
|
248
|
+
*/
|
|
249
|
+
declare const HlsVideo: React$1.ForwardRefExoticComponent<Omit<React$1.VideoHTMLAttributes<HTMLVideoElement>, "src"> & {
|
|
250
|
+
/**
|
|
251
|
+
* A URL, or a `{ src, fallbackSrc }` pair. An HLS manifest (`.m3u8`) streams
|
|
252
|
+
* adaptively; a plain file (mp4/webm) is handed straight to the element.
|
|
253
|
+
* Callers do not need to know which they have.
|
|
254
|
+
*/
|
|
255
|
+
src: string | HlsVideoSource;
|
|
256
|
+
/** Cap the chosen rendition to the element's on-screen size. */
|
|
257
|
+
capLevelToPlayerSize?: boolean;
|
|
258
|
+
} & React$1.RefAttributes<HTMLVideoElement>>;
|
|
259
|
+
|
|
208
260
|
type PropertyTourProps = Omit<React$1.ComponentPropsWithoutRef<typeof Card>, "title"> & {
|
|
209
261
|
title: string;
|
|
210
|
-
src: string;
|
|
262
|
+
src: string | HlsVideoSource;
|
|
211
263
|
poster?: string;
|
|
212
264
|
autoPlay?: boolean;
|
|
213
265
|
muted?: boolean;
|
|
@@ -217,7 +269,7 @@ type PropertyTourProps = Omit<React$1.ComponentPropsWithoutRef<typeof Card>, "ti
|
|
|
217
269
|
};
|
|
218
270
|
declare const PropertyTour: React$1.ForwardRefExoticComponent<Omit<Omit<CardProps & React$1.RefAttributes<HTMLDivElement>, "ref">, "title"> & {
|
|
219
271
|
title: string;
|
|
220
|
-
src: string;
|
|
272
|
+
src: string | HlsVideoSource;
|
|
221
273
|
poster?: string;
|
|
222
274
|
autoPlay?: boolean;
|
|
223
275
|
muted?: boolean;
|
|
@@ -264,7 +316,7 @@ declare const PropertyNewsUpdates: React$1.ForwardRefExoticComponent<PropertyNew
|
|
|
264
316
|
interface PropertyMediaRowProps {
|
|
265
317
|
newsItems: PropertyNewsItem[];
|
|
266
318
|
newsConnectionStatus?: "live" | "connecting";
|
|
267
|
-
videoSrc: string;
|
|
319
|
+
videoSrc: string | HlsVideoSource;
|
|
268
320
|
videoTitle: string;
|
|
269
321
|
className?: string;
|
|
270
322
|
}
|
|
@@ -881,7 +933,7 @@ type PropertyOverviewProps = {
|
|
|
881
933
|
financialItems?: FinancialItem[];
|
|
882
934
|
images?: OverviewImage[];
|
|
883
935
|
galleryCategories?: GalleryCategory[];
|
|
884
|
-
videoUrl?: string;
|
|
936
|
+
videoUrl?: string | HlsVideoSource;
|
|
885
937
|
tokenName?: string;
|
|
886
938
|
landSizeSqm?: number | null;
|
|
887
939
|
buildingSizeSqm?: number | null;
|
|
@@ -1225,7 +1277,7 @@ type PropertyBuyProps = {
|
|
|
1225
1277
|
};
|
|
1226
1278
|
newsItems?: PropertyNewsItem[];
|
|
1227
1279
|
newsConnectionStatus?: 'live' | 'connecting';
|
|
1228
|
-
videoUrl?: string;
|
|
1280
|
+
videoUrl?: string | HlsVideoSource;
|
|
1229
1281
|
toast: ReturnType<typeof useToast>['toast'];
|
|
1230
1282
|
};
|
|
1231
1283
|
declare function PropertyBuy({ propertyName, propertyLocation: _propertyLocationLabel, tokenDisplayName, tokenSymbol, tokenName, isAuthenticated, onSignIn, saleData, walletUsdcBalance, walletPropertyTokenBalance, onPurchase, purchaseStatus, purchaseError, onDeposit, opensAt, isPrivateClient, recentOrders, ordersAllocated, subscribers, isLoadingActivity, selectorItems, onSelectorSelect, onVerifyIdentity, portfolioActivity, newsItems, newsConnectionStatus, videoUrl, toast, }: PropertyBuyProps): react_jsx_runtime.JSX.Element;
|
|
@@ -1317,7 +1369,7 @@ type PropertyPhotoGalleryProps = {
|
|
|
1317
1369
|
images?: PropertyGalleryImage[];
|
|
1318
1370
|
title?: string;
|
|
1319
1371
|
subtitle?: string;
|
|
1320
|
-
videoUrl?: string;
|
|
1372
|
+
videoUrl?: string | HlsVideoSource;
|
|
1321
1373
|
};
|
|
1322
1374
|
declare function PropertyPhotoGallery({ isOpen, onClose, startIndex, startWithVideo, title, subtitle, images, videoUrl, }: PropertyPhotoGalleryProps): react_jsx_runtime.JSX.Element | null;
|
|
1323
1375
|
|
|
@@ -1387,4 +1439,4 @@ declare function extractSparkline(candles: ReadonlyArray<{
|
|
|
1387
1439
|
}>, maxPoints?: number): number[];
|
|
1388
1440
|
declare const SparklineChart: React__default.NamedExoticComponent<SparklineChartProps>;
|
|
1389
1441
|
|
|
1390
|
-
export { type ActivityTabId, AssetSelectorBar, type AssetSelectorBarProps, type AssetSelectorMetric, Badge, type BadgeProps, Button, type ButtonProps, Card, CardContent, type CardContentProps, CardDescription, type CardDescriptionProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, CardTitle, type CardTitleProps, ContactPopup, type ContactPopupProps, type FinancialItem, type FundWalletParams, type FundWalletResult, Header, type HeaderNavItem, type HeaderPortfolioData, type HeaderProps, type HousePositionOrderbook, type HousePositionPendingOrder, HousePositionSlider, HousePositionSliderMobile, type HousePositionSliderMobileOrderPayload, type HousePositionSliderMobileOrderbook, type HousePositionSliderMobileProps, type HousePositionSliderOrderPayload, type HousePositionSliderProps, type InspectionSlot, LoafLiquidityBadge, type LoafLiquidityDotState, LoafLiquidityLogo, type LoafLiquidityLogoProps, LoginPopup, type LoginPopupProps, MobileTradeNav, type MobileTradeNavItem, type MobileTradeNavProps, type OfferStatus, OfferingProgressCard, type OfferingProgressCardProps, OnboardingGuide, type OnboardingGuideProps, Orderbook, type OrderbookLevel, type OrderbookProps, type OrderbookSide, type OrderbookTrade, type OverviewImage, type OverviewResponse, OwnerBooking, type OwnerBookingProps, PaymentPopup, type PaymentPopupProps, PortfolioActivityPanel, type PortfolioActivityPanelProps, type PortfolioPosition, PortfolioSummary, type PortfolioSummaryProps, PriceChart, type PriceChartCandle, type PriceChartProps, type PriceChartRange, type PropertyAddressOption, PropertyBuy, PropertyCompareBar, type PropertyCompareBarProps, PropertyDocuments, type PropertyGalleryHotspot, type PropertyGalleryImage, PropertyHeroHeader, type PropertyHeroHeaderProps, PropertyHistory, type PropertyInfoItem, PropertyInspectionTimes, PropertyMediaRow, type PropertyMediaRowProps, type PropertyNewsItem, type PropertyNewsType, PropertyNewsUpdates, type PropertyNewsUpdatesProps, type PropertyOffer, PropertyOffers, type PropertyOffersProps, PropertyOverview, type PropertyOverviewProps, PropertyPhotoGallery, type PropertyPriceSummary, PropertySubheader, type PropertySubheaderAction, type PropertySubheaderProps, type PropertySubheaderTab, PropertyTour, type PropertyTourProps, PropertyValuation, type PropertyValuationProps, type PropertyValueSummary, type PurchaseFeedItem, type SelectorItem, SiteFooter, Skeleton, type SkeletonProps, SlideDigit, SparklineChart, type SparklineChartProps, type ToastData, ToastProvider, type ToastVariant, TradeConfirmationModal, type TradeConfirmationModalDetails, type TradeConfirmationModalProps, TradingSlider, type TradingSliderProps, type YourOrder, type YourOrderSide, YourOrders, type YourOrdersProps, badgeVariants, buttonVariants, extractSparkline, hasPendingActivity, useAdaptivePolling, useToast };
|
|
1442
|
+
export { type ActivityTabId, AssetSelectorBar, type AssetSelectorBarProps, type AssetSelectorMetric, Badge, type BadgeProps, Button, type ButtonProps, Card, CardContent, type CardContentProps, CardDescription, type CardDescriptionProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, CardTitle, type CardTitleProps, ContactPopup, type ContactPopupProps, type FinancialItem, type FundWalletParams, type FundWalletResult, Header, type HeaderNavItem, type HeaderPortfolioData, type HeaderProps, HlsVideo, type HlsVideoProps, type HlsVideoSource, type HousePositionOrderbook, type HousePositionPendingOrder, HousePositionSlider, HousePositionSliderMobile, type HousePositionSliderMobileOrderPayload, type HousePositionSliderMobileOrderbook, type HousePositionSliderMobileProps, type HousePositionSliderOrderPayload, type HousePositionSliderProps, type InspectionSlot, LoafLiquidityBadge, type LoafLiquidityDotState, LoafLiquidityLogo, type LoafLiquidityLogoProps, LoginPopup, type LoginPopupProps, MobileTradeNav, type MobileTradeNavItem, type MobileTradeNavProps, type OfferStatus, OfferingProgressCard, type OfferingProgressCardProps, OnboardingGuide, type OnboardingGuideProps, Orderbook, type OrderbookLevel, type OrderbookProps, type OrderbookSide, type OrderbookTrade, type OverviewImage, type OverviewResponse, OwnerBooking, type OwnerBookingProps, PaymentPopup, type PaymentPopupProps, PortfolioActivityPanel, type PortfolioActivityPanelProps, type PortfolioPosition, PortfolioSummary, type PortfolioSummaryProps, PriceChart, type PriceChartCandle, type PriceChartProps, type PriceChartRange, type PropertyAddressOption, PropertyBuy, PropertyCompareBar, type PropertyCompareBarProps, PropertyDocuments, type PropertyGalleryHotspot, type PropertyGalleryImage, PropertyHeroHeader, type PropertyHeroHeaderProps, PropertyHistory, type PropertyInfoItem, PropertyInspectionTimes, PropertyMediaRow, type PropertyMediaRowProps, type PropertyNewsItem, type PropertyNewsType, PropertyNewsUpdates, type PropertyNewsUpdatesProps, type PropertyOffer, PropertyOffers, type PropertyOffersProps, PropertyOverview, type PropertyOverviewProps, PropertyPhotoGallery, type PropertyPriceSummary, PropertySubheader, type PropertySubheaderAction, type PropertySubheaderProps, type PropertySubheaderTab, PropertyTour, type PropertyTourProps, PropertyValuation, type PropertyValuationProps, type PropertyValueSummary, type PurchaseFeedItem, type SelectorItem, SiteFooter, Skeleton, type SkeletonProps, SlideDigit, SparklineChart, type SparklineChartProps, type ToastData, ToastProvider, type ToastVariant, TradeConfirmationModal, type TradeConfirmationModalDetails, type TradeConfirmationModalProps, TradingSlider, type TradingSliderProps, type YourOrder, type YourOrderSide, YourOrders, type YourOrdersProps, badgeVariants, buttonVariants, extractSparkline, hasPendingActivity, useAdaptivePolling, useToast };
|
package/dist/index.d.ts
CHANGED
|
@@ -205,9 +205,61 @@ interface HousePositionSliderMobileProps extends React$1.HTMLAttributes<HTMLDivE
|
|
|
205
205
|
}
|
|
206
206
|
declare function HousePositionSliderMobile({ tokenId, tokenSymbol, totalTokens, currentPrice, availableCash, tokensHeld, defaultOrderType, orderbook, ownershipPercentOverride, onConfirmOrder, className, ...props }: HousePositionSliderMobileProps): react_jsx_runtime.JSX.Element;
|
|
207
207
|
|
|
208
|
+
/**
|
|
209
|
+
* A video to play, plus what to play if it fails.
|
|
210
|
+
*
|
|
211
|
+
* Structurally identical to `PropertyVideoSource` in the app repo
|
|
212
|
+
* (loafx-frontend/shared/video/propertyVideoSrc.ts) — duplicated rather than
|
|
213
|
+
* imported because that lives outside this package. Keep the two shapes in step.
|
|
214
|
+
*/
|
|
215
|
+
type HlsVideoSource = {
|
|
216
|
+
src: string;
|
|
217
|
+
/** Played if `src` fails to load. Absent when there is nothing to fall back to. */
|
|
218
|
+
fallbackSrc?: string;
|
|
219
|
+
};
|
|
220
|
+
type HlsVideoProps = Omit<React$1.VideoHTMLAttributes<HTMLVideoElement>, "src"> & {
|
|
221
|
+
/**
|
|
222
|
+
* A URL, or a `{ src, fallbackSrc }` pair. An HLS manifest (`.m3u8`) streams
|
|
223
|
+
* adaptively; a plain file (mp4/webm) is handed straight to the element.
|
|
224
|
+
* Callers do not need to know which they have.
|
|
225
|
+
*/
|
|
226
|
+
src: string | HlsVideoSource;
|
|
227
|
+
/** Cap the chosen rendition to the element's on-screen size. */
|
|
228
|
+
capLevelToPlayerSize?: boolean;
|
|
229
|
+
};
|
|
230
|
+
/**
|
|
231
|
+
* A `<video>` that can also play HLS, with a fallback for a manifest that isn't
|
|
232
|
+
* there.
|
|
233
|
+
*
|
|
234
|
+
* Safari and iOS play HLS natively; Chrome and Firefox do not, so a bare
|
|
235
|
+
* `<video src="…m3u8">` silently fails there and hls.js has to drive the element
|
|
236
|
+
* instead. Every property video renders through this, so a manifest URL works the
|
|
237
|
+
* same everywhere and a plain file URL keeps working unchanged.
|
|
238
|
+
*
|
|
239
|
+
* `fallbackSrc` exists because a property's ladder URL is DERIVED, not confirmed
|
|
240
|
+
* (see propertyVideoSrc) — the transcode may not have run for that property yet.
|
|
241
|
+
* Without the fallback a missing ladder would be a dead black box; with it, the
|
|
242
|
+
* page quietly plays the original master instead.
|
|
243
|
+
*
|
|
244
|
+
* hls.js is imported ON DEMAND rather than at module scope: it is ~200 KB, and
|
|
245
|
+
* this component is re-exported from the package index, so a static import would
|
|
246
|
+
* put the parser in every consuming app's bundle whether or not it plays a
|
|
247
|
+
* manifest. Pages that only ever see a plain file never fetch it.
|
|
248
|
+
*/
|
|
249
|
+
declare const HlsVideo: React$1.ForwardRefExoticComponent<Omit<React$1.VideoHTMLAttributes<HTMLVideoElement>, "src"> & {
|
|
250
|
+
/**
|
|
251
|
+
* A URL, or a `{ src, fallbackSrc }` pair. An HLS manifest (`.m3u8`) streams
|
|
252
|
+
* adaptively; a plain file (mp4/webm) is handed straight to the element.
|
|
253
|
+
* Callers do not need to know which they have.
|
|
254
|
+
*/
|
|
255
|
+
src: string | HlsVideoSource;
|
|
256
|
+
/** Cap the chosen rendition to the element's on-screen size. */
|
|
257
|
+
capLevelToPlayerSize?: boolean;
|
|
258
|
+
} & React$1.RefAttributes<HTMLVideoElement>>;
|
|
259
|
+
|
|
208
260
|
type PropertyTourProps = Omit<React$1.ComponentPropsWithoutRef<typeof Card>, "title"> & {
|
|
209
261
|
title: string;
|
|
210
|
-
src: string;
|
|
262
|
+
src: string | HlsVideoSource;
|
|
211
263
|
poster?: string;
|
|
212
264
|
autoPlay?: boolean;
|
|
213
265
|
muted?: boolean;
|
|
@@ -217,7 +269,7 @@ type PropertyTourProps = Omit<React$1.ComponentPropsWithoutRef<typeof Card>, "ti
|
|
|
217
269
|
};
|
|
218
270
|
declare const PropertyTour: React$1.ForwardRefExoticComponent<Omit<Omit<CardProps & React$1.RefAttributes<HTMLDivElement>, "ref">, "title"> & {
|
|
219
271
|
title: string;
|
|
220
|
-
src: string;
|
|
272
|
+
src: string | HlsVideoSource;
|
|
221
273
|
poster?: string;
|
|
222
274
|
autoPlay?: boolean;
|
|
223
275
|
muted?: boolean;
|
|
@@ -264,7 +316,7 @@ declare const PropertyNewsUpdates: React$1.ForwardRefExoticComponent<PropertyNew
|
|
|
264
316
|
interface PropertyMediaRowProps {
|
|
265
317
|
newsItems: PropertyNewsItem[];
|
|
266
318
|
newsConnectionStatus?: "live" | "connecting";
|
|
267
|
-
videoSrc: string;
|
|
319
|
+
videoSrc: string | HlsVideoSource;
|
|
268
320
|
videoTitle: string;
|
|
269
321
|
className?: string;
|
|
270
322
|
}
|
|
@@ -881,7 +933,7 @@ type PropertyOverviewProps = {
|
|
|
881
933
|
financialItems?: FinancialItem[];
|
|
882
934
|
images?: OverviewImage[];
|
|
883
935
|
galleryCategories?: GalleryCategory[];
|
|
884
|
-
videoUrl?: string;
|
|
936
|
+
videoUrl?: string | HlsVideoSource;
|
|
885
937
|
tokenName?: string;
|
|
886
938
|
landSizeSqm?: number | null;
|
|
887
939
|
buildingSizeSqm?: number | null;
|
|
@@ -1225,7 +1277,7 @@ type PropertyBuyProps = {
|
|
|
1225
1277
|
};
|
|
1226
1278
|
newsItems?: PropertyNewsItem[];
|
|
1227
1279
|
newsConnectionStatus?: 'live' | 'connecting';
|
|
1228
|
-
videoUrl?: string;
|
|
1280
|
+
videoUrl?: string | HlsVideoSource;
|
|
1229
1281
|
toast: ReturnType<typeof useToast>['toast'];
|
|
1230
1282
|
};
|
|
1231
1283
|
declare function PropertyBuy({ propertyName, propertyLocation: _propertyLocationLabel, tokenDisplayName, tokenSymbol, tokenName, isAuthenticated, onSignIn, saleData, walletUsdcBalance, walletPropertyTokenBalance, onPurchase, purchaseStatus, purchaseError, onDeposit, opensAt, isPrivateClient, recentOrders, ordersAllocated, subscribers, isLoadingActivity, selectorItems, onSelectorSelect, onVerifyIdentity, portfolioActivity, newsItems, newsConnectionStatus, videoUrl, toast, }: PropertyBuyProps): react_jsx_runtime.JSX.Element;
|
|
@@ -1317,7 +1369,7 @@ type PropertyPhotoGalleryProps = {
|
|
|
1317
1369
|
images?: PropertyGalleryImage[];
|
|
1318
1370
|
title?: string;
|
|
1319
1371
|
subtitle?: string;
|
|
1320
|
-
videoUrl?: string;
|
|
1372
|
+
videoUrl?: string | HlsVideoSource;
|
|
1321
1373
|
};
|
|
1322
1374
|
declare function PropertyPhotoGallery({ isOpen, onClose, startIndex, startWithVideo, title, subtitle, images, videoUrl, }: PropertyPhotoGalleryProps): react_jsx_runtime.JSX.Element | null;
|
|
1323
1375
|
|
|
@@ -1387,4 +1439,4 @@ declare function extractSparkline(candles: ReadonlyArray<{
|
|
|
1387
1439
|
}>, maxPoints?: number): number[];
|
|
1388
1440
|
declare const SparklineChart: React__default.NamedExoticComponent<SparklineChartProps>;
|
|
1389
1441
|
|
|
1390
|
-
export { type ActivityTabId, AssetSelectorBar, type AssetSelectorBarProps, type AssetSelectorMetric, Badge, type BadgeProps, Button, type ButtonProps, Card, CardContent, type CardContentProps, CardDescription, type CardDescriptionProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, CardTitle, type CardTitleProps, ContactPopup, type ContactPopupProps, type FinancialItem, type FundWalletParams, type FundWalletResult, Header, type HeaderNavItem, type HeaderPortfolioData, type HeaderProps, type HousePositionOrderbook, type HousePositionPendingOrder, HousePositionSlider, HousePositionSliderMobile, type HousePositionSliderMobileOrderPayload, type HousePositionSliderMobileOrderbook, type HousePositionSliderMobileProps, type HousePositionSliderOrderPayload, type HousePositionSliderProps, type InspectionSlot, LoafLiquidityBadge, type LoafLiquidityDotState, LoafLiquidityLogo, type LoafLiquidityLogoProps, LoginPopup, type LoginPopupProps, MobileTradeNav, type MobileTradeNavItem, type MobileTradeNavProps, type OfferStatus, OfferingProgressCard, type OfferingProgressCardProps, OnboardingGuide, type OnboardingGuideProps, Orderbook, type OrderbookLevel, type OrderbookProps, type OrderbookSide, type OrderbookTrade, type OverviewImage, type OverviewResponse, OwnerBooking, type OwnerBookingProps, PaymentPopup, type PaymentPopupProps, PortfolioActivityPanel, type PortfolioActivityPanelProps, type PortfolioPosition, PortfolioSummary, type PortfolioSummaryProps, PriceChart, type PriceChartCandle, type PriceChartProps, type PriceChartRange, type PropertyAddressOption, PropertyBuy, PropertyCompareBar, type PropertyCompareBarProps, PropertyDocuments, type PropertyGalleryHotspot, type PropertyGalleryImage, PropertyHeroHeader, type PropertyHeroHeaderProps, PropertyHistory, type PropertyInfoItem, PropertyInspectionTimes, PropertyMediaRow, type PropertyMediaRowProps, type PropertyNewsItem, type PropertyNewsType, PropertyNewsUpdates, type PropertyNewsUpdatesProps, type PropertyOffer, PropertyOffers, type PropertyOffersProps, PropertyOverview, type PropertyOverviewProps, PropertyPhotoGallery, type PropertyPriceSummary, PropertySubheader, type PropertySubheaderAction, type PropertySubheaderProps, type PropertySubheaderTab, PropertyTour, type PropertyTourProps, PropertyValuation, type PropertyValuationProps, type PropertyValueSummary, type PurchaseFeedItem, type SelectorItem, SiteFooter, Skeleton, type SkeletonProps, SlideDigit, SparklineChart, type SparklineChartProps, type ToastData, ToastProvider, type ToastVariant, TradeConfirmationModal, type TradeConfirmationModalDetails, type TradeConfirmationModalProps, TradingSlider, type TradingSliderProps, type YourOrder, type YourOrderSide, YourOrders, type YourOrdersProps, badgeVariants, buttonVariants, extractSparkline, hasPendingActivity, useAdaptivePolling, useToast };
|
|
1442
|
+
export { type ActivityTabId, AssetSelectorBar, type AssetSelectorBarProps, type AssetSelectorMetric, Badge, type BadgeProps, Button, type ButtonProps, Card, CardContent, type CardContentProps, CardDescription, type CardDescriptionProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, CardTitle, type CardTitleProps, ContactPopup, type ContactPopupProps, type FinancialItem, type FundWalletParams, type FundWalletResult, Header, type HeaderNavItem, type HeaderPortfolioData, type HeaderProps, HlsVideo, type HlsVideoProps, type HlsVideoSource, type HousePositionOrderbook, type HousePositionPendingOrder, HousePositionSlider, HousePositionSliderMobile, type HousePositionSliderMobileOrderPayload, type HousePositionSliderMobileOrderbook, type HousePositionSliderMobileProps, type HousePositionSliderOrderPayload, type HousePositionSliderProps, type InspectionSlot, LoafLiquidityBadge, type LoafLiquidityDotState, LoafLiquidityLogo, type LoafLiquidityLogoProps, LoginPopup, type LoginPopupProps, MobileTradeNav, type MobileTradeNavItem, type MobileTradeNavProps, type OfferStatus, OfferingProgressCard, type OfferingProgressCardProps, OnboardingGuide, type OnboardingGuideProps, Orderbook, type OrderbookLevel, type OrderbookProps, type OrderbookSide, type OrderbookTrade, type OverviewImage, type OverviewResponse, OwnerBooking, type OwnerBookingProps, PaymentPopup, type PaymentPopupProps, PortfolioActivityPanel, type PortfolioActivityPanelProps, type PortfolioPosition, PortfolioSummary, type PortfolioSummaryProps, PriceChart, type PriceChartCandle, type PriceChartProps, type PriceChartRange, type PropertyAddressOption, PropertyBuy, PropertyCompareBar, type PropertyCompareBarProps, PropertyDocuments, type PropertyGalleryHotspot, type PropertyGalleryImage, PropertyHeroHeader, type PropertyHeroHeaderProps, PropertyHistory, type PropertyInfoItem, PropertyInspectionTimes, PropertyMediaRow, type PropertyMediaRowProps, type PropertyNewsItem, type PropertyNewsType, PropertyNewsUpdates, type PropertyNewsUpdatesProps, type PropertyOffer, PropertyOffers, type PropertyOffersProps, PropertyOverview, type PropertyOverviewProps, PropertyPhotoGallery, type PropertyPriceSummary, PropertySubheader, type PropertySubheaderAction, type PropertySubheaderProps, type PropertySubheaderTab, PropertyTour, type PropertyTourProps, PropertyValuation, type PropertyValuationProps, type PropertyValueSummary, type PurchaseFeedItem, type SelectorItem, SiteFooter, Skeleton, type SkeletonProps, SlideDigit, SparklineChart, type SparklineChartProps, type ToastData, ToastProvider, type ToastVariant, TradeConfirmationModal, type TradeConfirmationModalDetails, type TradeConfirmationModalProps, TradingSlider, type TradingSliderProps, type YourOrder, type YourOrderSide, YourOrders, type YourOrdersProps, badgeVariants, buttonVariants, extractSparkline, hasPendingActivity, useAdaptivePolling, useToast };
|
package/dist/index.js
CHANGED
|
@@ -2575,6 +2575,66 @@ function MobileDepthRow({
|
|
|
2575
2575
|
}
|
|
2576
2576
|
);
|
|
2577
2577
|
}
|
|
2578
|
+
var isHlsManifest = (url) => /\.m3u8(\?|$)/i.test(url);
|
|
2579
|
+
var HLS_MIME = "application/vnd.apple.mpegurl";
|
|
2580
|
+
var MANIFEST_FAILURES = /* @__PURE__ */ new Set(["manifestLoadError", "manifestLoadTimeOut", "manifestParsingError"]);
|
|
2581
|
+
var HlsVideo = React5__namespace.forwardRef(
|
|
2582
|
+
({ src, capLevelToPlayerSize = true, onError, ...videoProps }, ref) => {
|
|
2583
|
+
const videoRef = React5__namespace.useRef(null);
|
|
2584
|
+
React5__namespace.useImperativeHandle(ref, () => videoRef.current, []);
|
|
2585
|
+
const primary = typeof src === "string" ? src : src.src;
|
|
2586
|
+
const fallbackSrc = typeof src === "string" ? void 0 : src.fallbackSrc;
|
|
2587
|
+
const [failedSrc, setFailedSrc] = React5__namespace.useState(null);
|
|
2588
|
+
const usingFallback = fallbackSrc != null && failedSrc === primary;
|
|
2589
|
+
const activeSrc = usingFallback ? fallbackSrc : primary;
|
|
2590
|
+
const failPrimary = React5__namespace.useCallback(() => {
|
|
2591
|
+
if (fallbackSrc == null) return;
|
|
2592
|
+
setFailedSrc(primary);
|
|
2593
|
+
}, [fallbackSrc, primary]);
|
|
2594
|
+
React5__namespace.useEffect(() => {
|
|
2595
|
+
const video = videoRef.current;
|
|
2596
|
+
if (!video || !activeSrc) return;
|
|
2597
|
+
if (!isHlsManifest(activeSrc) || video.canPlayType(HLS_MIME)) {
|
|
2598
|
+
video.src = activeSrc;
|
|
2599
|
+
return;
|
|
2600
|
+
}
|
|
2601
|
+
let hls = null;
|
|
2602
|
+
let cancelled = false;
|
|
2603
|
+
void import('hls.js').then(({ default: Hls }) => {
|
|
2604
|
+
if (cancelled) return;
|
|
2605
|
+
if (!Hls.isSupported()) {
|
|
2606
|
+
video.src = activeSrc;
|
|
2607
|
+
return;
|
|
2608
|
+
}
|
|
2609
|
+
const instance = new Hls({
|
|
2610
|
+
capLevelToPlayerSize,
|
|
2611
|
+
startLevel: -1,
|
|
2612
|
+
enableWorker: true,
|
|
2613
|
+
startFragPrefetch: true
|
|
2614
|
+
});
|
|
2615
|
+
hls = instance;
|
|
2616
|
+
instance.on(Hls.Events.ERROR, (_evt, data) => {
|
|
2617
|
+
if (data?.fatal && MANIFEST_FAILURES.has(String(data.details))) failPrimary();
|
|
2618
|
+
});
|
|
2619
|
+
instance.loadSource(activeSrc);
|
|
2620
|
+
instance.attachMedia(video);
|
|
2621
|
+
});
|
|
2622
|
+
return () => {
|
|
2623
|
+
cancelled = true;
|
|
2624
|
+
hls?.destroy();
|
|
2625
|
+
};
|
|
2626
|
+
}, [activeSrc, capLevelToPlayerSize, failPrimary]);
|
|
2627
|
+
const handleError = React5__namespace.useCallback(
|
|
2628
|
+
(e) => {
|
|
2629
|
+
if (!usingFallback) failPrimary();
|
|
2630
|
+
onError?.(e);
|
|
2631
|
+
},
|
|
2632
|
+
[usingFallback, failPrimary, onError]
|
|
2633
|
+
);
|
|
2634
|
+
return /* @__PURE__ */ jsxRuntime.jsx("video", { ref: videoRef, onError: handleError, ...videoProps });
|
|
2635
|
+
}
|
|
2636
|
+
);
|
|
2637
|
+
HlsVideo.displayName = "HlsVideo";
|
|
2578
2638
|
var PropertyTour = React5__namespace.forwardRef(
|
|
2579
2639
|
({
|
|
2580
2640
|
className,
|
|
@@ -2589,11 +2649,6 @@ var PropertyTour = React5__namespace.forwardRef(
|
|
|
2589
2649
|
...props
|
|
2590
2650
|
}, ref) => {
|
|
2591
2651
|
const videoRef = React5__namespace.useRef(null);
|
|
2592
|
-
React5__namespace.useEffect(() => {
|
|
2593
|
-
if (videoRef.current && src) {
|
|
2594
|
-
videoRef.current.load();
|
|
2595
|
-
}
|
|
2596
|
-
}, [src]);
|
|
2597
2652
|
React5__namespace.useEffect(() => {
|
|
2598
2653
|
const video = videoRef.current;
|
|
2599
2654
|
if (!video) return;
|
|
@@ -2658,10 +2713,11 @@ var PropertyTour = React5__namespace.forwardRef(
|
|
|
2658
2713
|
display: none !important;
|
|
2659
2714
|
}
|
|
2660
2715
|
` }),
|
|
2661
|
-
/* @__PURE__ */ jsxRuntime.
|
|
2662
|
-
|
|
2716
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2717
|
+
HlsVideo,
|
|
2663
2718
|
{
|
|
2664
2719
|
ref: videoRef,
|
|
2720
|
+
src,
|
|
2665
2721
|
className: "loaf-muted-video absolute inset-0 h-full w-full object-cover object-center",
|
|
2666
2722
|
controls,
|
|
2667
2723
|
controlsList: "nodownload noplaybackrate",
|
|
@@ -2675,10 +2731,7 @@ var PropertyTour = React5__namespace.forwardRef(
|
|
|
2675
2731
|
muted,
|
|
2676
2732
|
playsInline,
|
|
2677
2733
|
poster,
|
|
2678
|
-
children:
|
|
2679
|
-
/* @__PURE__ */ jsxRuntime.jsx("source", { src }),
|
|
2680
|
-
"Your browser does not support the video tag."
|
|
2681
|
-
]
|
|
2734
|
+
children: "Your browser does not support the video tag."
|
|
2682
2735
|
}
|
|
2683
2736
|
)
|
|
2684
2737
|
] }) })
|
|
@@ -9797,8 +9850,9 @@ function GalleryMapSection({
|
|
|
9797
9850
|
isMobile ? /* @__PURE__ */ jsxRuntime.jsx(StackedGallery, { images, onPhotoClick }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
9798
9851
|
/* @__PURE__ */ jsxRuntime.jsxs(Carousel, { children: [
|
|
9799
9852
|
showVideo && videoUrl && /* @__PURE__ */ jsxRuntime.jsx(VideoOverlay, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
9800
|
-
|
|
9853
|
+
HlsVideo,
|
|
9801
9854
|
{
|
|
9855
|
+
src: videoUrl,
|
|
9802
9856
|
autoPlay: true,
|
|
9803
9857
|
loop: true,
|
|
9804
9858
|
playsInline: true,
|
|
@@ -9807,8 +9861,7 @@ function GalleryMapSection({
|
|
|
9807
9861
|
onVolumeChange: (e) => {
|
|
9808
9862
|
if (!e.currentTarget.muted) e.currentTarget.muted = true;
|
|
9809
9863
|
},
|
|
9810
|
-
style: { width: "100%", height: "100%", objectFit: "cover", borderRadius: 8 }
|
|
9811
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("source", { src: videoUrl, type: "video/mp4" })
|
|
9864
|
+
style: { width: "100%", height: "100%", objectFit: "cover", borderRadius: 8 }
|
|
9812
9865
|
}
|
|
9813
9866
|
) }),
|
|
9814
9867
|
/* @__PURE__ */ jsxRuntime.jsx(Track, { style: { transform: `translateX(-${carouselIndex * 100}%)` }, children: images.map((img, idx) => /* @__PURE__ */ jsxRuntime.jsxs(Slide, { onClick: () => onPhotoClick?.(idx), children: [
|
|
@@ -9924,7 +9977,7 @@ function GalleryMapSection({
|
|
|
9924
9977
|
showFullVideo && videoUrl && /* @__PURE__ */ jsxRuntime.jsxs(FullVideoOverlay, { onClick: () => setShowFullVideo(false), children: [
|
|
9925
9978
|
/* @__PURE__ */ jsxRuntime.jsx(FullVideoClose, { onClick: () => setShowFullVideo(false), "aria-label": "Close video", children: "\u2715" }),
|
|
9926
9979
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9927
|
-
|
|
9980
|
+
HlsVideo,
|
|
9928
9981
|
{
|
|
9929
9982
|
src: videoUrl,
|
|
9930
9983
|
autoPlay: true,
|
|
@@ -19654,8 +19707,9 @@ function GalleryContent({ galleryImages, startIndex, startWithVideo, title, subt
|
|
|
19654
19707
|
}
|
|
19655
19708
|
),
|
|
19656
19709
|
showVideo && videoUrl ? /* @__PURE__ */ jsxRuntime.jsx(GalleryVideoWrap, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
19657
|
-
|
|
19710
|
+
HlsVideo,
|
|
19658
19711
|
{
|
|
19712
|
+
src: videoUrl,
|
|
19659
19713
|
autoPlay: true,
|
|
19660
19714
|
loop: true,
|
|
19661
19715
|
playsInline: true,
|
|
@@ -19664,8 +19718,7 @@ function GalleryContent({ galleryImages, startIndex, startWithVideo, title, subt
|
|
|
19664
19718
|
onVolumeChange: (e) => {
|
|
19665
19719
|
if (!e.currentTarget.muted) e.currentTarget.muted = true;
|
|
19666
19720
|
},
|
|
19667
|
-
style: { objectFit: "contain", borderRadius: 12, boxShadow: "0 30px 80px rgba(0,0,0,0.55)" }
|
|
19668
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("source", { src: videoUrl, type: "video/mp4" })
|
|
19721
|
+
style: { objectFit: "contain", borderRadius: 12, boxShadow: "0 30px 80px rgba(0,0,0,0.55)" }
|
|
19669
19722
|
}
|
|
19670
19723
|
) }) : galleryImages.map((image, idx) => /* @__PURE__ */ jsxRuntime.jsx(MainImage, { src: image.src, alt: image.alt, $visible: idx === currentIndex }, image.alt)),
|
|
19671
19724
|
galleryImages[currentIndex]?.hotspots?.map((hotspot) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -20686,6 +20739,7 @@ exports.CardHeader = CardHeader;
|
|
|
20686
20739
|
exports.CardTitle = CardTitle;
|
|
20687
20740
|
exports.ContactPopup = ContactPopup;
|
|
20688
20741
|
exports.Header = Header;
|
|
20742
|
+
exports.HlsVideo = HlsVideo;
|
|
20689
20743
|
exports.HousePositionSlider = HousePositionSlider;
|
|
20690
20744
|
exports.HousePositionSliderMobile = HousePositionSliderMobile;
|
|
20691
20745
|
exports.LoafLiquidityBadge = LoafLiquidityBadge;
|