@loafmarkets/ui 0.1.413 → 0.1.415

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 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.jsxs(
2662
- "video",
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
  ] }) })
@@ -5664,7 +5717,7 @@ var Header = ({
5664
5717
  }
5665
5718
  )
5666
5719
  ] }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center" }, children: [
5667
- /* @__PURE__ */ jsxRuntime.jsx(Button2, { className: "signup", onClick: handleSignIn, children: "Join Competition" }),
5720
+ /* @__PURE__ */ jsxRuntime.jsx(Button2, { className: "signup", onClick: handleSignIn, children: "Access Beta" }),
5668
5721
  /* @__PURE__ */ jsxRuntime.jsx(
5669
5722
  MobileOnlyButton,
5670
5723
  {
@@ -7209,7 +7262,7 @@ var LoginPopup = ({
7209
7262
  /* @__PURE__ */ jsxRuntime.jsxs(Title, { children: [
7210
7263
  /* @__PURE__ */ jsxRuntime.jsxs(LogoContainer3, { children: [
7211
7264
  /* @__PURE__ */ jsxRuntime.jsx(LogoImage, { src: logoSrc, alt: logoAlt }),
7212
- /* @__PURE__ */ jsxRuntime.jsx(LogoBeta, { children: "Private Beta" })
7265
+ /* @__PURE__ */ jsxRuntime.jsx(LogoBeta, { children: "Beta" })
7213
7266
  ] }),
7214
7267
  /* @__PURE__ */ jsxRuntime.jsx(TitleText, { children: "Welcome to Loaf" })
7215
7268
  ] }),
@@ -7304,7 +7357,7 @@ var LoginPopup = ({
7304
7357
  /* @__PURE__ */ jsxRuntime.jsxs(GateBrand, { children: [
7305
7358
  /* @__PURE__ */ jsxRuntime.jsx(GateLogoLink, { href: "https://loafmarkets.com", "aria-label": "Go to loafmarkets.com", children: /* @__PURE__ */ jsxRuntime.jsx(GateLogo, { src: logoSrc, alt: logoAlt }) }),
7306
7359
  /* @__PURE__ */ jsxRuntime.jsx(GateBrandDivider, {}),
7307
- /* @__PURE__ */ jsxRuntime.jsx(GateBetaTag, { children: "Private Beta" })
7360
+ /* @__PURE__ */ jsxRuntime.jsx(GateBetaTag, { children: "Beta" })
7308
7361
  ] }),
7309
7362
  /* @__PURE__ */ jsxRuntime.jsxs(GateOtpText, { children: [
7310
7363
  "We sent a code to",
@@ -7643,6 +7696,16 @@ var LoginPopup = ({
7643
7696
  ),
7644
7697
  /* @__PURE__ */ jsxRuntime.jsx(GateSubmit, { type: "submit", "aria-label": "Continue", disabled: loading || !email, children: loading ? /* @__PURE__ */ jsxRuntime.jsx(GateSpinner, {}) : /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "22", height: "22", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M5 12h14M13 6l6 6-6 6" }) }) })
7645
7698
  ] }),
7699
+ !signInMode && /* @__PURE__ */ jsxRuntime.jsx(GateHandleRow, { children: /* @__PURE__ */ jsxRuntime.jsx(
7700
+ GateEmailInput,
7701
+ {
7702
+ type: "text",
7703
+ autoComplete: "username",
7704
+ placeholder: "Claim your username (Optional)",
7705
+ value: handle,
7706
+ onChange: (event) => setHandle(event.target.value)
7707
+ }
7708
+ ) }),
7646
7709
  error && /* @__PURE__ */ jsxRuntime.jsx(StatusMessage, { $error: true, children: error })
7647
7710
  ] }),
7648
7711
  /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
@@ -7661,7 +7724,7 @@ var LoginPopup = ({
7661
7724
  /* @__PURE__ */ jsxRuntime.jsxs(GateBrand, { children: [
7662
7725
  /* @__PURE__ */ jsxRuntime.jsx(GateLogoLink, { href: "https://loafmarkets.com", "aria-label": "Go to loafmarkets.com", children: /* @__PURE__ */ jsxRuntime.jsx(GateLogo, { src: logoSrc, alt: logoAlt }) }),
7663
7726
  /* @__PURE__ */ jsxRuntime.jsx(GateBrandDivider, {}),
7664
- /* @__PURE__ */ jsxRuntime.jsx(GateBetaTag, { children: "Private Beta" })
7727
+ /* @__PURE__ */ jsxRuntime.jsx(GateBetaTag, { children: "Beta" })
7665
7728
  ] }),
7666
7729
  signInMode ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
7667
7730
  signInStep,
@@ -7713,7 +7776,7 @@ var LoginPopup = ({
7713
7776
  /* @__PURE__ */ jsxRuntime.jsxs(Title, { children: [
7714
7777
  /* @__PURE__ */ jsxRuntime.jsxs(LogoContainer3, { children: [
7715
7778
  /* @__PURE__ */ jsxRuntime.jsx(LogoImage, { src: logoSrc, alt: logoAlt }),
7716
- /* @__PURE__ */ jsxRuntime.jsx(LogoBeta, { children: "Private Beta" })
7779
+ /* @__PURE__ */ jsxRuntime.jsx(LogoBeta, { children: "Beta" })
7717
7780
  ] }),
7718
7781
  /* @__PURE__ */ jsxRuntime.jsx(TitleText, { children: "Enter your access code" })
7719
7782
  ] }),
@@ -8377,6 +8440,9 @@ var GateSubmit = styled10__default.default.button`
8377
8440
  cursor: default;
8378
8441
  }
8379
8442
  `;
8443
+ var GateHandleRow = styled10__default.default(CodeInputWrapper)`
8444
+ margin-top: 0.6rem;
8445
+ `;
8380
8446
  var GateEmailInput = styled10__default.default.input`
8381
8447
  flex: 1;
8382
8448
  min-width: 0;
@@ -9797,8 +9863,9 @@ function GalleryMapSection({
9797
9863
  isMobile ? /* @__PURE__ */ jsxRuntime.jsx(StackedGallery, { images, onPhotoClick }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
9798
9864
  /* @__PURE__ */ jsxRuntime.jsxs(Carousel, { children: [
9799
9865
  showVideo && videoUrl && /* @__PURE__ */ jsxRuntime.jsx(VideoOverlay, { children: /* @__PURE__ */ jsxRuntime.jsx(
9800
- "video",
9866
+ HlsVideo,
9801
9867
  {
9868
+ src: videoUrl,
9802
9869
  autoPlay: true,
9803
9870
  loop: true,
9804
9871
  playsInline: true,
@@ -9807,8 +9874,7 @@ function GalleryMapSection({
9807
9874
  onVolumeChange: (e) => {
9808
9875
  if (!e.currentTarget.muted) e.currentTarget.muted = true;
9809
9876
  },
9810
- style: { width: "100%", height: "100%", objectFit: "cover", borderRadius: 8 },
9811
- children: /* @__PURE__ */ jsxRuntime.jsx("source", { src: videoUrl, type: "video/mp4" })
9877
+ style: { width: "100%", height: "100%", objectFit: "cover", borderRadius: 8 }
9812
9878
  }
9813
9879
  ) }),
9814
9880
  /* @__PURE__ */ jsxRuntime.jsx(Track, { style: { transform: `translateX(-${carouselIndex * 100}%)` }, children: images.map((img, idx) => /* @__PURE__ */ jsxRuntime.jsxs(Slide, { onClick: () => onPhotoClick?.(idx), children: [
@@ -9924,7 +9990,7 @@ function GalleryMapSection({
9924
9990
  showFullVideo && videoUrl && /* @__PURE__ */ jsxRuntime.jsxs(FullVideoOverlay, { onClick: () => setShowFullVideo(false), children: [
9925
9991
  /* @__PURE__ */ jsxRuntime.jsx(FullVideoClose, { onClick: () => setShowFullVideo(false), "aria-label": "Close video", children: "\u2715" }),
9926
9992
  /* @__PURE__ */ jsxRuntime.jsx(
9927
- "video",
9993
+ HlsVideo,
9928
9994
  {
9929
9995
  src: videoUrl,
9930
9996
  autoPlay: true,
@@ -19654,8 +19720,9 @@ function GalleryContent({ galleryImages, startIndex, startWithVideo, title, subt
19654
19720
  }
19655
19721
  ),
19656
19722
  showVideo && videoUrl ? /* @__PURE__ */ jsxRuntime.jsx(GalleryVideoWrap, { children: /* @__PURE__ */ jsxRuntime.jsx(
19657
- "video",
19723
+ HlsVideo,
19658
19724
  {
19725
+ src: videoUrl,
19659
19726
  autoPlay: true,
19660
19727
  loop: true,
19661
19728
  playsInline: true,
@@ -19664,8 +19731,7 @@ function GalleryContent({ galleryImages, startIndex, startWithVideo, title, subt
19664
19731
  onVolumeChange: (e) => {
19665
19732
  if (!e.currentTarget.muted) e.currentTarget.muted = true;
19666
19733
  },
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" })
19734
+ style: { objectFit: "contain", borderRadius: 12, boxShadow: "0 30px 80px rgba(0,0,0,0.55)" }
19669
19735
  }
19670
19736
  ) }) : galleryImages.map((image, idx) => /* @__PURE__ */ jsxRuntime.jsx(MainImage, { src: image.src, alt: image.alt, $visible: idx === currentIndex }, image.alt)),
19671
19737
  galleryImages[currentIndex]?.hotspots?.map((hotspot) => /* @__PURE__ */ jsxRuntime.jsx(
@@ -20686,6 +20752,7 @@ exports.CardHeader = CardHeader;
20686
20752
  exports.CardTitle = CardTitle;
20687
20753
  exports.ContactPopup = ContactPopup;
20688
20754
  exports.Header = Header;
20755
+ exports.HlsVideo = HlsVideo;
20689
20756
  exports.HousePositionSlider = HousePositionSlider;
20690
20757
  exports.HousePositionSliderMobile = HousePositionSliderMobile;
20691
20758
  exports.LoafLiquidityBadge = LoafLiquidityBadge;