@loafmarkets/ui 0.1.417 → 0.1.418
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 +12 -1
- package/dist/index.d.ts +12 -1
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -279,11 +279,22 @@ declare const PropertyTour: React$1.ForwardRefExoticComponent<Omit<Omit<CardProp
|
|
|
279
279
|
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
280
280
|
|
|
281
281
|
type PropertyNewsType = "property" | "market" | (string & {});
|
|
282
|
+
/**
|
|
283
|
+
* Which tabs a story belongs in. A story can be both — a refinery outage that also moves
|
|
284
|
+
* the whole market scores on both axes — so read `types` when the row carries it and
|
|
285
|
+
* fall back to the single `type` when it does not.
|
|
286
|
+
*/
|
|
287
|
+
declare function matchesTab(item: {
|
|
288
|
+
type?: PropertyNewsType;
|
|
289
|
+
types?: PropertyNewsType[];
|
|
290
|
+
}, tab: "all" | "property" | "market"): boolean;
|
|
282
291
|
type PropertyNewsItem = {
|
|
283
292
|
id?: string;
|
|
284
293
|
title: string;
|
|
285
294
|
date: string | Date;
|
|
286
295
|
type?: PropertyNewsType;
|
|
296
|
+
/** Every tab this story belongs in. `type` is the one it leads with. */
|
|
297
|
+
types?: PropertyNewsType[];
|
|
287
298
|
displayId?: string;
|
|
288
299
|
isNew?: boolean;
|
|
289
300
|
source?: string;
|
|
@@ -1527,4 +1538,4 @@ declare function extractSparkline(candles: ReadonlyArray<{
|
|
|
1527
1538
|
}>, maxPoints?: number): number[];
|
|
1528
1539
|
declare const SparklineChart: React__default.NamedExoticComponent<SparklineChartProps>;
|
|
1529
1540
|
|
|
1530
|
-
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 NewsBadgeAsset, 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, SentimentBar, 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, __resetDismissedBreaking, badgeVariants, buttonVariants, extractSparkline, formatAge, hasPendingActivity, rowAgeLabel, useAdaptivePolling, useToast };
|
|
1541
|
+
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 NewsBadgeAsset, 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, SentimentBar, 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, __resetDismissedBreaking, badgeVariants, buttonVariants, extractSparkline, formatAge, hasPendingActivity, matchesTab, rowAgeLabel, useAdaptivePolling, useToast };
|
package/dist/index.d.ts
CHANGED
|
@@ -279,11 +279,22 @@ declare const PropertyTour: React$1.ForwardRefExoticComponent<Omit<Omit<CardProp
|
|
|
279
279
|
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
280
280
|
|
|
281
281
|
type PropertyNewsType = "property" | "market" | (string & {});
|
|
282
|
+
/**
|
|
283
|
+
* Which tabs a story belongs in. A story can be both — a refinery outage that also moves
|
|
284
|
+
* the whole market scores on both axes — so read `types` when the row carries it and
|
|
285
|
+
* fall back to the single `type` when it does not.
|
|
286
|
+
*/
|
|
287
|
+
declare function matchesTab(item: {
|
|
288
|
+
type?: PropertyNewsType;
|
|
289
|
+
types?: PropertyNewsType[];
|
|
290
|
+
}, tab: "all" | "property" | "market"): boolean;
|
|
282
291
|
type PropertyNewsItem = {
|
|
283
292
|
id?: string;
|
|
284
293
|
title: string;
|
|
285
294
|
date: string | Date;
|
|
286
295
|
type?: PropertyNewsType;
|
|
296
|
+
/** Every tab this story belongs in. `type` is the one it leads with. */
|
|
297
|
+
types?: PropertyNewsType[];
|
|
287
298
|
displayId?: string;
|
|
288
299
|
isNew?: boolean;
|
|
289
300
|
source?: string;
|
|
@@ -1527,4 +1538,4 @@ declare function extractSparkline(candles: ReadonlyArray<{
|
|
|
1527
1538
|
}>, maxPoints?: number): number[];
|
|
1528
1539
|
declare const SparklineChart: React__default.NamedExoticComponent<SparklineChartProps>;
|
|
1529
1540
|
|
|
1530
|
-
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 NewsBadgeAsset, 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, SentimentBar, 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, __resetDismissedBreaking, badgeVariants, buttonVariants, extractSparkline, formatAge, hasPendingActivity, rowAgeLabel, useAdaptivePolling, useToast };
|
|
1541
|
+
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 NewsBadgeAsset, 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, SentimentBar, 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, __resetDismissedBreaking, badgeVariants, buttonVariants, extractSparkline, formatAge, hasPendingActivity, matchesTab, rowAgeLabel, useAdaptivePolling, useToast };
|
package/dist/index.js
CHANGED
|
@@ -3074,6 +3074,11 @@ function isSafeUrl(url) {
|
|
|
3074
3074
|
return false;
|
|
3075
3075
|
}
|
|
3076
3076
|
}
|
|
3077
|
+
function matchesTab(item, tab) {
|
|
3078
|
+
if (tab === "all") return true;
|
|
3079
|
+
if (item.types && item.types.length > 0) return item.types.includes(tab);
|
|
3080
|
+
return item.type === tab;
|
|
3081
|
+
}
|
|
3077
3082
|
var BREAKING_WINDOW_HOURS = 6;
|
|
3078
3083
|
var MAX_PINNED_BREAKING = 2;
|
|
3079
3084
|
var BREAKING_IMPACT_FLOOR = 8;
|
|
@@ -3584,7 +3589,7 @@ var PropertyNewsUpdates = React9__namespace.forwardRef(
|
|
|
3584
3589
|
const cutoff = breakingNow - BREAKING_WINDOW_HOURS * 36e5;
|
|
3585
3590
|
return breakingCandidates.filter((it) => {
|
|
3586
3591
|
if (new Date(it.publishedAt).getTime() < cutoff) return false;
|
|
3587
|
-
return
|
|
3592
|
+
return matchesTab(it, homeTab);
|
|
3588
3593
|
});
|
|
3589
3594
|
}, [breakingCandidates, breakingNow, homeTab]);
|
|
3590
3595
|
const [dismissedVersion, setDismissedVersion] = React9__namespace.useState(0);
|
|
@@ -3629,7 +3634,7 @@ var PropertyNewsUpdates = React9__namespace.forwardRef(
|
|
|
3629
3634
|
}, [totalPages]);
|
|
3630
3635
|
const paginatedItems = hasItems ? listItems.slice(page * ITEMS_PER_PAGE, page * ITEMS_PER_PAGE + ITEMS_PER_PAGE) : [];
|
|
3631
3636
|
const homeFilteredItems = React9__namespace.useMemo(
|
|
3632
|
-
() => hasItems ? listItems.filter((it) =>
|
|
3637
|
+
() => hasItems ? listItems.filter((it) => matchesTab(it, homeTab)) : [],
|
|
3633
3638
|
[hasItems, listItems, homeTab]
|
|
3634
3639
|
);
|
|
3635
3640
|
const homeTotalPages = React9__namespace.useMemo(
|
|
@@ -22032,6 +22037,7 @@ exports.buttonVariants = buttonVariants;
|
|
|
22032
22037
|
exports.extractSparkline = extractSparkline;
|
|
22033
22038
|
exports.formatAge = formatAge;
|
|
22034
22039
|
exports.hasPendingActivity = hasPendingActivity;
|
|
22040
|
+
exports.matchesTab = matchesTab;
|
|
22035
22041
|
exports.rowAgeLabel = rowAgeLabel;
|
|
22036
22042
|
exports.useAdaptivePolling = useAdaptivePolling;
|
|
22037
22043
|
exports.useToast = useToast;
|