@loafmarkets/ui 0.1.412 → 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 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
  ] }) })
@@ -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
- "video",
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
- "video",
9980
+ HlsVideo,
9928
9981
  {
9929
9982
  src: videoUrl,
9930
9983
  autoPlay: true,
@@ -15122,6 +15175,9 @@ var STATUS_COLOR2 = {
15122
15175
  CLOSED: "#848e9c",
15123
15176
  CANCELLED: "#f6465d"
15124
15177
  };
15178
+ var STUCK_SETTLING_MS = 7e3;
15179
+ var SETTLING_MESSAGE = "Trade settling on-chain";
15180
+ var STUCK_SETTLING_MESSAGE = "Attention: Trade taking longer than usual to settle on chain. Please wait up to 10 seconds before trading. This is reflected in your locked balance.";
15125
15181
  var settlingSpin = styled10.keyframes`
15126
15182
  to { transform: rotate(360deg); }
15127
15183
  `;
@@ -15135,41 +15191,55 @@ var SettlingSpinner = styled10__default.default.span`
15135
15191
  animation: ${settlingSpin} 0.7s linear infinite;
15136
15192
  flex-shrink: 0;
15137
15193
  `;
15194
+ var StuckSettlingGlyph = styled10__default.default.span`
15195
+ display: inline-block;
15196
+ font-size: 11px;
15197
+ line-height: 1;
15198
+ flex-shrink: 0;
15199
+ `;
15138
15200
  var SettlingTip = styled10__default.default.span`
15139
15201
  position: relative;
15140
15202
  display: inline-flex;
15141
15203
  align-items: center;
15142
15204
  cursor: help;
15143
- &::after {
15144
- content: 'Trade settling on-chain';
15145
- position: absolute;
15146
- left: 50%;
15147
- bottom: calc(100% + 8px);
15148
- transform: translateX(-50%) translateY(3px);
15149
- padding: 6px 8px;
15150
- background: rgba(20, 22, 28, 0.97);
15151
- border: 1px solid rgba(255, 255, 255, 0.1);
15152
- border-radius: 6px;
15153
- color: rgba(255, 255, 255, 0.78);
15154
- font-size: 0.66rem;
15155
- font-weight: 400;
15156
- line-height: 1.3;
15157
- letter-spacing: normal;
15158
- text-transform: none;
15159
- white-space: nowrap;
15160
- box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
15161
- opacity: 0;
15162
- visibility: hidden;
15163
- transition: opacity 0.15s ease, transform 0.15s ease;
15164
- pointer-events: none;
15165
- z-index: 2000;
15166
- }
15167
- &:hover::after {
15205
+ `;
15206
+ var SettlingTipBubble = styled10__default.default.span`
15207
+ position: absolute;
15208
+ bottom: calc(100% + 8px);
15209
+ /* Stuck copy is a paragraph, so it anchors to the icon's left edge instead of
15210
+ centring centred it would hang off the left of the row. */
15211
+ left: ${(p) => p.$stuck ? "0" : "50%"};
15212
+ transform: ${(p) => p.$stuck ? "translateX(0)" : "translateX(-50%)"} translateY(3px);
15213
+ width: ${(p) => p.$stuck ? "224px" : "auto"};
15214
+ white-space: ${(p) => p.$stuck ? "normal" : "nowrap"};
15215
+ padding: 6px 8px;
15216
+ background: rgba(20, 22, 28, 0.97);
15217
+ border: 1px solid rgba(255, 255, 255, 0.1);
15218
+ border-radius: 6px;
15219
+ color: rgba(255, 255, 255, 0.78);
15220
+ font-size: 0.66rem;
15221
+ font-weight: 400;
15222
+ line-height: 1.35;
15223
+ letter-spacing: normal;
15224
+ text-transform: none;
15225
+ text-align: left;
15226
+ box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
15227
+ opacity: 0;
15228
+ visibility: hidden;
15229
+ transition: opacity 0.15s ease, transform 0.15s ease;
15230
+ pointer-events: none;
15231
+ z-index: 2000;
15232
+
15233
+ ${SettlingTip}:hover & {
15168
15234
  opacity: 1;
15169
15235
  visibility: visible;
15170
- transform: translateX(-50%) translateY(0);
15236
+ transform: ${(p) => p.$stuck ? "translateX(0)" : "translateX(-50%)"} translateY(0);
15171
15237
  }
15172
15238
  `;
15239
+ var SettlingIndicator = ({ stuck, style }) => /* @__PURE__ */ jsxRuntime.jsxs(SettlingTip, { role: "img", "aria-label": stuck ? "Settlement delayed" : SETTLING_MESSAGE, style, children: [
15240
+ stuck ? /* @__PURE__ */ jsxRuntime.jsx(StuckSettlingGlyph, { "aria-hidden": "true", children: "\u26A0\uFE0F" }) : /* @__PURE__ */ jsxRuntime.jsx(SettlingSpinner, { "aria-hidden": "true" }),
15241
+ /* @__PURE__ */ jsxRuntime.jsx(SettlingTipBubble, { $stuck: stuck, children: stuck ? STUCK_SETTLING_MESSAGE : SETTLING_MESSAGE })
15242
+ ] });
15173
15243
  var ACTIVITY_PAGE_SIZE_DEFAULT = 8;
15174
15244
  var formatCurrency4 = (value, opts) => {
15175
15245
  const min = opts?.minimumFractionDigits ?? 2;
@@ -15177,14 +15247,21 @@ var formatCurrency4 = (value, opts) => {
15177
15247
  return `$${value.toLocaleString("en-US", { minimumFractionDigits: min, maximumFractionDigits: max })}`;
15178
15248
  };
15179
15249
  var formatNumber2 = (value, maximumFractionDigits = 2) => value.toLocaleString("en-US", { minimumFractionDigits: 0, maximumFractionDigits });
15250
+ var toMillis = (unix) => {
15251
+ if (unix > 1e18) return Math.floor(unix / 1e6);
15252
+ if (unix > 1e14) return Math.floor(unix / 1e3);
15253
+ if (unix > 1e12) return unix;
15254
+ return unix * 1e3;
15255
+ };
15256
+ var SETTLED_TRADE_STATUSES = ["SETTLED", "CONFIRMED", "FILLED", "ALLOCATED"];
15257
+ var FAILED_TRADE_STATUSES = ["SETTLEMENT_FAILED", "REJECTED", "CANCELLED", "CANCELED"];
15258
+ var tradeIsSettling = (status) => {
15259
+ const s = status?.toUpperCase();
15260
+ return !!s && !SETTLED_TRADE_STATUSES.includes(s) && !FAILED_TRADE_STATUSES.includes(s);
15261
+ };
15180
15262
  var formatTimestamp = (unix) => {
15181
15263
  if (!unix) return "\u2014";
15182
- let sec;
15183
- if (unix > 1e18) sec = Math.floor(unix / 1e9);
15184
- else if (unix > 1e14) sec = Math.floor(unix / 1e6);
15185
- else if (unix > 1e12) sec = Math.floor(unix / 1e3);
15186
- else sec = unix;
15187
- return new Date(sec * 1e3).toLocaleString("en-AU", {
15264
+ return new Date(toMillis(unix)).toLocaleString("en-AU", {
15188
15265
  day: "2-digit",
15189
15266
  month: "short",
15190
15267
  hour: "2-digit",
@@ -15248,6 +15325,40 @@ function PortfolioActivityPanel({
15248
15325
  const [closeAllOpen, setCloseAllOpen] = React5.useState(false);
15249
15326
  const [closeAllType, setCloseAllType] = React5.useState("market");
15250
15327
  const [closingAll, setClosingAll] = React5.useState(false);
15328
+ const settlingPositionIds = positions.filter((p) => p.settling).map((p) => p.propertyId);
15329
+ const settlingKey = settlingPositionIds.join(",");
15330
+ const settlingTradeStartByProperty = /* @__PURE__ */ new Map();
15331
+ const settlingTradeDeadlines = [];
15332
+ for (const trade of tradeHistory) {
15333
+ if (!tradeIsSettling(trade.status)) continue;
15334
+ const startedAt = toMillis(trade.executedAt);
15335
+ settlingTradeDeadlines.push(startedAt + STUCK_SETTLING_MS);
15336
+ const earliest = settlingTradeStartByProperty.get(trade.propertyId);
15337
+ if (earliest === void 0 || startedAt < earliest) settlingTradeStartByProperty.set(trade.propertyId, startedAt);
15338
+ }
15339
+ const tradeDeadlineKey = settlingTradeDeadlines.join(",");
15340
+ const settlingSinceRef = React5.useRef(/* @__PURE__ */ new Map());
15341
+ const [now, setNow] = React5.useState(() => Date.now());
15342
+ React5.useEffect(() => {
15343
+ const since = settlingSinceRef.current;
15344
+ const seenAt = Date.now();
15345
+ for (const id of settlingPositionIds) if (!since.has(id)) since.set(id, seenAt);
15346
+ for (const id of [...since.keys()]) if (!settlingPositionIds.includes(id)) since.delete(id);
15347
+ setNow(seenAt);
15348
+ }, [settlingKey]);
15349
+ const positionSettlingStart = (propertyId) => settlingTradeStartByProperty.get(propertyId) ?? settlingSinceRef.current.get(propertyId) ?? now;
15350
+ React5.useEffect(() => {
15351
+ const pending = [
15352
+ ...settlingPositionIds.map((id) => positionSettlingStart(id) + STUCK_SETTLING_MS),
15353
+ ...settlingTradeDeadlines
15354
+ ].filter((deadline) => deadline > now);
15355
+ if (pending.length === 0) return;
15356
+ const delay = Math.min(Math.min(...pending) - now + 50, 2147483647);
15357
+ const timer = setTimeout(() => setNow(Date.now()), delay);
15358
+ return () => clearTimeout(timer);
15359
+ }, [settlingKey, tradeDeadlineKey, now]);
15360
+ const isPositionStuck = (pos) => !!pos.settling && now - positionSettlingStart(pos.propertyId) >= STUCK_SETTLING_MS;
15361
+ const isTradeStuck = (trade) => now - toMillis(trade.executedAt) >= STUCK_SETTLING_MS;
15251
15362
  const hasPositionActions = !!(onClosePosition || onSharePosition || onCloseAllPositions);
15252
15363
  const [posSortKey, setPosSortKey] = React5.useState("asset");
15253
15364
  const [posSortAsc, setPosSortAsc] = React5.useState(true);
@@ -15502,7 +15613,7 @@ function PortfolioActivityPanel({
15502
15613
  /* @__PURE__ */ jsxRuntime.jsx(CCellLabel, { children: "Asset" }),
15503
15614
  /* @__PURE__ */ jsxRuntime.jsxs(CAssetName, { children: [
15504
15615
  pos.tokenName,
15505
- pos.settling && /* @__PURE__ */ jsxRuntime.jsx(SettlingTip, { style: { marginLeft: 6 }, children: /* @__PURE__ */ jsxRuntime.jsx(SettlingSpinner, {}) })
15616
+ pos.settling && /* @__PURE__ */ jsxRuntime.jsx(SettlingIndicator, { stuck: isPositionStuck(pos), style: { marginLeft: 6 } })
15506
15617
  ] })
15507
15618
  ] }),
15508
15619
  /* @__PURE__ */ jsxRuntime.jsxs(CUnitsCell, { children: [
@@ -15594,7 +15705,7 @@ function PortfolioActivityPanel({
15594
15705
  return /* @__PURE__ */ jsxRuntime.jsxs(PositionsRow, { $hasClose: hasPositionActions, children: [
15595
15706
  /* @__PURE__ */ jsxRuntime.jsx(PositionsCell, { children: /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
15596
15707
  /* @__PURE__ */ jsxRuntime.jsx(HoldingsPropertyLink, { onClick: () => onPositionClick?.(pos.tokenName, pos.isIpoAllocation), children: pos.tokenName }),
15597
- pos.settling && /* @__PURE__ */ jsxRuntime.jsx(SettlingTip, { children: /* @__PURE__ */ jsxRuntime.jsx(SettlingSpinner, {}) })
15708
+ pos.settling && /* @__PURE__ */ jsxRuntime.jsx(SettlingIndicator, { stuck: isPositionStuck(pos) })
15598
15709
  ] }) }),
15599
15710
  /* @__PURE__ */ jsxRuntime.jsx(PositionsCell, { children: /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { color: "#fff", fontSize: "0.8rem" }, children: [
15600
15711
  formatNumber2(pos.totalQuantity),
@@ -15975,7 +16086,8 @@ function PortfolioActivityPanel({
15975
16086
  const s = trade.status?.toUpperCase();
15976
16087
  const isSettled = s === "SETTLED" || s === "CONFIRMED" || s === "FILLED" || s === "ALLOCATED";
15977
16088
  const isFailed = s === "SETTLEMENT_FAILED" || s === "REJECTED" || s === "CANCELLED" || s === "CANCELED";
15978
- const isSettling = !isSettled && !isFailed && !!trade.status;
16089
+ const isSettling = tradeIsSettling(trade.status);
16090
+ const stuckSettling = isSettling && isTradeStuck(trade);
15979
16091
  const settlementLabel = isSettled ? "Settled" : isFailed ? "Settlement Failed" : isSettling ? prettyLabel(trade.status) : "\u2014";
15980
16092
  const settlementMeta = isSettled ? { color: "#0ecb81", bg: "rgba(14,203,129,0.1)" } : isFailed ? { color: "#f6465d", bg: "rgba(246,70,93,0.12)" } : isSettling ? { color: "#E6C87E", bg: "rgba(240,185,11,0.15)" } : null;
15981
16093
  const sideColor = sideLabel(trade.side) === "Buy" ? "#0ecb81" : "#f6465d";
@@ -16018,7 +16130,10 @@ function PortfolioActivityPanel({
16018
16130
  ] }),
16019
16131
  /* @__PURE__ */ jsxRuntime.jsxs(CDetailItem, { children: [
16020
16132
  /* @__PURE__ */ jsxRuntime.jsx(CDLabel, { children: "Settlement" }),
16021
- /* @__PURE__ */ jsxRuntime.jsx(CDValue, { children: settlementMeta ? /* @__PURE__ */ jsxRuntime.jsx(ActivityTag, { $color: settlementMeta.color, $bg: settlementMeta.bg, children: settlementLabel }) : "\u2014" })
16133
+ /* @__PURE__ */ jsxRuntime.jsxs(CDValue, { children: [
16134
+ settlementMeta ? /* @__PURE__ */ jsxRuntime.jsx(ActivityTag, { $color: settlementMeta.color, $bg: settlementMeta.bg, children: settlementLabel }) : "\u2014",
16135
+ stuckSettling && /* @__PURE__ */ jsxRuntime.jsx(SettlingIndicator, { stuck: true, style: { marginLeft: 6 } })
16136
+ ] })
16022
16137
  ] }),
16023
16138
  /* @__PURE__ */ jsxRuntime.jsxs(CDetailItem, { children: [
16024
16139
  /* @__PURE__ */ jsxRuntime.jsx(CDLabel, { children: "Date" }),
@@ -16043,7 +16158,8 @@ function PortfolioActivityPanel({
16043
16158
  const s = trade.status?.toUpperCase();
16044
16159
  const isSettled = s === "SETTLED" || s === "CONFIRMED" || s === "FILLED" || s === "ALLOCATED";
16045
16160
  const isFailed = s === "SETTLEMENT_FAILED" || s === "REJECTED" || s === "CANCELLED" || s === "CANCELED";
16046
- const isSettling = !isSettled && !isFailed && !!trade.status;
16161
+ const isSettling = tradeIsSettling(trade.status);
16162
+ const stuckSettling = isSettling && isTradeStuck(trade);
16047
16163
  const settlementLabel = isSettled ? "Settled" : isFailed ? "Settlement Failed" : isSettling ? prettyLabel(trade.status) : "\u2014";
16048
16164
  const settlementMeta = isSettled ? { color: "#0ecb81", bg: "rgba(14,203,129,0.1)" } : isFailed ? { color: "#f6465d", bg: "rgba(246,70,93,0.12)" } : isSettling ? { color: "#E6C87E", bg: "rgba(240,185,11,0.15)" } : null;
16049
16165
  const sideColor = sideLabel(trade.side) === "Buy" ? "#0ecb81" : "#f6465d";
@@ -16060,7 +16176,10 @@ function PortfolioActivityPanel({
16060
16176
  ] }) }),
16061
16177
  /* @__PURE__ */ jsxRuntime.jsx(GridCell, { children: /* @__PURE__ */ jsxRuntime.jsx(CellText, { children: formatCurrency4(trade.price) }) }),
16062
16178
  /* @__PURE__ */ jsxRuntime.jsx(GridCell, { children: /* @__PURE__ */ jsxRuntime.jsx(CellText, { children: formatCurrency4(trade.price * trade.quantity) }) }),
16063
- /* @__PURE__ */ jsxRuntime.jsx(GridCell, { children: settlementMeta ? /* @__PURE__ */ jsxRuntime.jsx(ActivityTag, { $color: settlementMeta.color, $bg: settlementMeta.bg, children: settlementLabel }) : /* @__PURE__ */ jsxRuntime.jsx(CellText, { $muted: true, children: "\u2014" }) }),
16179
+ /* @__PURE__ */ jsxRuntime.jsx(GridCell, { children: /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { display: "inline-flex", alignItems: "center", gap: "0.35rem" }, children: [
16180
+ settlementMeta ? /* @__PURE__ */ jsxRuntime.jsx(ActivityTag, { $color: settlementMeta.color, $bg: settlementMeta.bg, children: settlementLabel }) : /* @__PURE__ */ jsxRuntime.jsx(CellText, { $muted: true, children: "\u2014" }),
16181
+ stuckSettling && /* @__PURE__ */ jsxRuntime.jsx(SettlingIndicator, { stuck: true })
16182
+ ] }) }),
16064
16183
  /* @__PURE__ */ jsxRuntime.jsx(GridCell, { children: /* @__PURE__ */ jsxRuntime.jsx(CellText, { $muted: true, children: formatTimestamp(trade.executedAt) }) }),
16065
16184
  /* @__PURE__ */ jsxRuntime.jsx(GridCell, { children: trade.txHash && /* @__PURE__ */ jsxRuntime.jsx(TxLink, { href: `${_blockExplorerBaseUrl}/${trade.txHash}`, target: "_blank", rel: "noopener noreferrer", title: "View on Arbiscan", children: /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "15", height: "15", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
16066
16185
  /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }),
@@ -19588,8 +19707,9 @@ function GalleryContent({ galleryImages, startIndex, startWithVideo, title, subt
19588
19707
  }
19589
19708
  ),
19590
19709
  showVideo && videoUrl ? /* @__PURE__ */ jsxRuntime.jsx(GalleryVideoWrap, { children: /* @__PURE__ */ jsxRuntime.jsx(
19591
- "video",
19710
+ HlsVideo,
19592
19711
  {
19712
+ src: videoUrl,
19593
19713
  autoPlay: true,
19594
19714
  loop: true,
19595
19715
  playsInline: true,
@@ -19598,8 +19718,7 @@ function GalleryContent({ galleryImages, startIndex, startWithVideo, title, subt
19598
19718
  onVolumeChange: (e) => {
19599
19719
  if (!e.currentTarget.muted) e.currentTarget.muted = true;
19600
19720
  },
19601
- style: { objectFit: "contain", borderRadius: 12, boxShadow: "0 30px 80px rgba(0,0,0,0.55)" },
19602
- 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)" }
19603
19722
  }
19604
19723
  ) }) : galleryImages.map((image, idx) => /* @__PURE__ */ jsxRuntime.jsx(MainImage, { src: image.src, alt: image.alt, $visible: idx === currentIndex }, image.alt)),
19605
19724
  galleryImages[currentIndex]?.hotspots?.map((hotspot) => /* @__PURE__ */ jsxRuntime.jsx(
@@ -20620,6 +20739,7 @@ exports.CardHeader = CardHeader;
20620
20739
  exports.CardTitle = CardTitle;
20621
20740
  exports.ContactPopup = ContactPopup;
20622
20741
  exports.Header = Header;
20742
+ exports.HlsVideo = HlsVideo;
20623
20743
  exports.HousePositionSlider = HousePositionSlider;
20624
20744
  exports.HousePositionSliderMobile = HousePositionSliderMobile;
20625
20745
  exports.LoafLiquidityBadge = LoafLiquidityBadge;