@loafmarkets/ui 0.1.58 → 0.1.60
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 +24 -2
- package/dist/index.d.ts +24 -2
- package/dist/index.js +19 -172
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +20 -174
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -9,7 +9,7 @@ import styled25, { keyframes, css } from 'styled-components';
|
|
|
9
9
|
import { Newspaper, BedDouble, Bath, CarFront } from 'lucide-react';
|
|
10
10
|
import * as LightweightCharts from 'lightweight-charts';
|
|
11
11
|
import { BiChevronUp, BiChevronDown, BiX, BiCoin, BiWallet, BiCreditCard, BiCalendar, BiInfoCircle, BiPencil, BiImages, BiVideo, BiMap } from 'react-icons/bi';
|
|
12
|
-
import {
|
|
12
|
+
import { FaChartLine, FaBitcoin } from 'react-icons/fa';
|
|
13
13
|
import { FiExternalLink } from 'react-icons/fi';
|
|
14
14
|
|
|
15
15
|
// src/components/button.tsx
|
|
@@ -9667,7 +9667,9 @@ function OfferingProgressCard({
|
|
|
9667
9667
|
subscriberCount = 0,
|
|
9668
9668
|
raisedAmount,
|
|
9669
9669
|
targetAmount,
|
|
9670
|
-
isPrivateClient = false
|
|
9670
|
+
isPrivateClient = false,
|
|
9671
|
+
style,
|
|
9672
|
+
className
|
|
9671
9673
|
}) {
|
|
9672
9674
|
const [currentTime, setCurrentTime] = useState(/* @__PURE__ */ new Date());
|
|
9673
9675
|
const [countdown, setCountdown] = useState(null);
|
|
@@ -9697,7 +9699,7 @@ function OfferingProgressCard({
|
|
|
9697
9699
|
const interval = setInterval(() => setCountdown(calculateCountdown()), 1e3);
|
|
9698
9700
|
return () => clearInterval(interval);
|
|
9699
9701
|
}, [opensAt]);
|
|
9700
|
-
return /* @__PURE__ */ jsxs(Container, { children: [
|
|
9702
|
+
return /* @__PURE__ */ jsxs(Container, { style, className, children: [
|
|
9701
9703
|
/* @__PURE__ */ jsxs(Header2, { children: [
|
|
9702
9704
|
/* @__PURE__ */ jsxs("h3", { children: [
|
|
9703
9705
|
/* @__PURE__ */ jsx(FaChartLine, {}),
|
|
@@ -12090,31 +12092,16 @@ var CancelConfirmProceed = styled25.button`
|
|
|
12090
12092
|
cursor: not-allowed;
|
|
12091
12093
|
}
|
|
12092
12094
|
`;
|
|
12093
|
-
function NewsOrdersSection({ newsItems, activityData }) {
|
|
12095
|
+
function NewsOrdersSection({ newsItems, newsConnectionStatus, activityData }) {
|
|
12094
12096
|
return /* @__PURE__ */ jsxs(Row2, { children: [
|
|
12095
|
-
/* @__PURE__ */
|
|
12096
|
-
|
|
12097
|
-
|
|
12098
|
-
|
|
12099
|
-
|
|
12100
|
-
|
|
12101
|
-
|
|
12102
|
-
|
|
12103
|
-
/* @__PURE__ */ jsx(TradeNewsList, { children: newsItems.map((newsItem) => /* @__PURE__ */ jsxs(
|
|
12104
|
-
TradeNewsItem,
|
|
12105
|
-
{
|
|
12106
|
-
"data-new": newsItem.isNew,
|
|
12107
|
-
children: [
|
|
12108
|
-
/* @__PURE__ */ jsx(TradeNewsTitle, { children: newsItem.title }),
|
|
12109
|
-
/* @__PURE__ */ jsxs(TradeNewsInfo, { children: [
|
|
12110
|
-
/* @__PURE__ */ jsx(TradeNewsDate, { "data-new": newsItem.isNew, children: newsItem.date }),
|
|
12111
|
-
/* @__PURE__ */ jsx(TradeNewsCategory, { "data-type": newsItem.type, children: newsItem.type === "property" ? "Property Update" : "Market News" })
|
|
12112
|
-
] })
|
|
12113
|
-
]
|
|
12114
|
-
},
|
|
12115
|
-
newsItem.displayId || `${newsItem.id}-fallback`
|
|
12116
|
-
)) })
|
|
12117
|
-
] }),
|
|
12097
|
+
/* @__PURE__ */ jsx(
|
|
12098
|
+
PropertyNewsUpdates,
|
|
12099
|
+
{
|
|
12100
|
+
items: newsItems,
|
|
12101
|
+
heading: "Property News & Updates",
|
|
12102
|
+
connectionStatus: newsConnectionStatus
|
|
12103
|
+
}
|
|
12104
|
+
),
|
|
12118
12105
|
/* @__PURE__ */ jsx(ActivityWrapper, { children: /* @__PURE__ */ jsx(
|
|
12119
12106
|
PortfolioActivityPanel,
|
|
12120
12107
|
{
|
|
@@ -12152,7 +12139,7 @@ var Row2 = styled25.div`
|
|
|
12152
12139
|
overflow: hidden;
|
|
12153
12140
|
}
|
|
12154
12141
|
`;
|
|
12155
|
-
var
|
|
12142
|
+
var ActivityWrapper = styled25.div`
|
|
12156
12143
|
background-color: var(--color-card-darker, #111);
|
|
12157
12144
|
border-radius: 8px;
|
|
12158
12145
|
padding: 1.5rem;
|
|
@@ -12162,107 +12149,11 @@ var TradeNewsPanel = styled25.div`
|
|
|
12162
12149
|
border: 1px solid var(--color-border);
|
|
12163
12150
|
min-height: 280px;
|
|
12164
12151
|
overflow: hidden;
|
|
12165
|
-
@media (max-width: 768px) {
|
|
12166
|
-
max-width: 100%;
|
|
12167
|
-
flex: 0 0 100%;
|
|
12168
|
-
}
|
|
12169
12152
|
@media (max-width: 768px) {
|
|
12170
12153
|
padding: 1rem;
|
|
12171
12154
|
min-height: auto;
|
|
12172
12155
|
}
|
|
12173
12156
|
`;
|
|
12174
|
-
var ActivityWrapper = styled25(TradeNewsPanel)``;
|
|
12175
|
-
var TradeNewsHeader = styled25.div`
|
|
12176
|
-
display: flex;
|
|
12177
|
-
justify-content: space-between;
|
|
12178
|
-
align-items: center;
|
|
12179
|
-
padding-bottom: 0.75rem;
|
|
12180
|
-
margin-bottom: 1rem;
|
|
12181
|
-
border-bottom: 1px solid rgba(255,255,255,0.1);
|
|
12182
|
-
h3 {
|
|
12183
|
-
margin: 0;
|
|
12184
|
-
font-size: 0.9rem;
|
|
12185
|
-
font-weight: 600;
|
|
12186
|
-
color: var(--color-text);
|
|
12187
|
-
}
|
|
12188
|
-
span {
|
|
12189
|
-
font-size: 0.7rem;
|
|
12190
|
-
color: var(--color-text-secondary);
|
|
12191
|
-
display: flex;
|
|
12192
|
-
align-items: center;
|
|
12193
|
-
gap: 0.25rem;
|
|
12194
|
-
font-weight: 500;
|
|
12195
|
-
}
|
|
12196
|
-
.dot {
|
|
12197
|
-
width: 6px;
|
|
12198
|
-
height: 6px;
|
|
12199
|
-
border-radius: 50%;
|
|
12200
|
-
background-color: #0ecb81;
|
|
12201
|
-
animation: pulse 2s infinite;
|
|
12202
|
-
}
|
|
12203
|
-
@keyframes pulse {
|
|
12204
|
-
0% { opacity: 0.4; }
|
|
12205
|
-
50% { opacity: 1; }
|
|
12206
|
-
100% { opacity: 0.4; }
|
|
12207
|
-
}
|
|
12208
|
-
`;
|
|
12209
|
-
var TradeNewsList = styled25.div`
|
|
12210
|
-
display: flex;
|
|
12211
|
-
flex-direction: column;
|
|
12212
|
-
gap: 0.75rem;
|
|
12213
|
-
flex: 1;
|
|
12214
|
-
overflow: visible;
|
|
12215
|
-
max-width: 100%;
|
|
12216
|
-
`;
|
|
12217
|
-
var TradeNewsItem = styled25.div`
|
|
12218
|
-
display: flex;
|
|
12219
|
-
flex-direction: column;
|
|
12220
|
-
padding: 0.75rem;
|
|
12221
|
-
background-color: rgba(255,255,255,0.05);
|
|
12222
|
-
border-radius: 6px;
|
|
12223
|
-
cursor: pointer;
|
|
12224
|
-
transition: all 0.2s;
|
|
12225
|
-
&[data-new='true'] {
|
|
12226
|
-
background-color: rgba(14,203,129,0.1);
|
|
12227
|
-
}
|
|
12228
|
-
&:hover {
|
|
12229
|
-
background-color: rgba(255,255,255,0.08);
|
|
12230
|
-
transform: translateY(-2px);
|
|
12231
|
-
}
|
|
12232
|
-
`;
|
|
12233
|
-
var TradeNewsTitle = styled25.h4`
|
|
12234
|
-
font-size: 0.9375rem;
|
|
12235
|
-
font-weight: 500;
|
|
12236
|
-
margin: 0 0 0.5rem 0;
|
|
12237
|
-
color: var(--color-text);
|
|
12238
|
-
`;
|
|
12239
|
-
var TradeNewsInfo = styled25.div`
|
|
12240
|
-
display: flex;
|
|
12241
|
-
justify-content: space-between;
|
|
12242
|
-
align-items: center;
|
|
12243
|
-
font-size: 0.75rem;
|
|
12244
|
-
color: var(--color-text-secondary);
|
|
12245
|
-
`;
|
|
12246
|
-
var TradeNewsDate = styled25.span`
|
|
12247
|
-
&[data-new='true'] {
|
|
12248
|
-
color: #0ecb81;
|
|
12249
|
-
}
|
|
12250
|
-
`;
|
|
12251
|
-
var TradeNewsCategory = styled25.span`
|
|
12252
|
-
padding: 0.25rem 0.5rem;
|
|
12253
|
-
border-radius: 4px;
|
|
12254
|
-
background-color: rgba(240,185,11,0.1);
|
|
12255
|
-
color: var(--color-accent, #f0b90b);
|
|
12256
|
-
font-weight: 500;
|
|
12257
|
-
white-space: nowrap;
|
|
12258
|
-
overflow: hidden;
|
|
12259
|
-
text-overflow: ellipsis;
|
|
12260
|
-
max-width: 100px;
|
|
12261
|
-
&[data-type='property'] {
|
|
12262
|
-
background-color: rgba(14,203,129,0.1);
|
|
12263
|
-
color: #0ecb81;
|
|
12264
|
-
}
|
|
12265
|
-
`;
|
|
12266
12157
|
function OrderConfirmationModal({
|
|
12267
12158
|
open,
|
|
12268
12159
|
onClose,
|
|
@@ -12517,22 +12408,6 @@ var ButtonRow2 = styled25.div`
|
|
|
12517
12408
|
`;
|
|
12518
12409
|
|
|
12519
12410
|
// src/components/property-buy/constants.ts
|
|
12520
|
-
var allNewsItems = [
|
|
12521
|
-
{ id: 1, title: "RBA signals potential rate cut in Q1 2026 - property stocks rally", type: "market" },
|
|
12522
|
-
{ id: 2, title: "Sydney unemployment drops to 3.1% - Eastern suburbs lead recovery", type: "market" },
|
|
12523
|
-
{ id: 3, title: "Musgrave heritage listing confirmed - protects architectural value", type: "property" },
|
|
12524
|
-
{ id: 4, title: "Mosman Council approves DA for Musgrave restoration works", type: "property" },
|
|
12525
|
-
{ id: 5, title: "Nearby 12 Mcleod St sells for $18.5M - sets new street record", type: "market" },
|
|
12526
|
-
{ id: 6, title: "Eastern suburbs rental yields reach 3.8% - highest in 5 years", type: "market" },
|
|
12527
|
-
{ id: 7, title: "Musgrave pool resurfacing completed - heritage sandstone preserved", type: "property" },
|
|
12528
|
-
{ id: 8, title: "Mosman median house price hits $7.2M - up 9% YoY", type: "market" },
|
|
12529
|
-
{ id: 9, title: "Musgrave gardens featured in Heritage NSW annual report", type: "property" },
|
|
12530
|
-
{ id: 10, title: "Lower North Shore vacancy rates drop to 1.2% - rental demand surges", type: "market" },
|
|
12531
|
-
{ id: 11, title: "Musgrave structural inspection complete - excellent condition confirmed", type: "property" },
|
|
12532
|
-
{ id: 12, title: "Sydney harbour views premium reaches 35% - Mosman leads growth", type: "market" },
|
|
12533
|
-
{ id: 13, title: "New security system installed at Musgrave - smart home integration", type: "property" },
|
|
12534
|
-
{ id: 14, title: "Heritage property demand up 22% - pre-Federation homes most sought", type: "market" }
|
|
12535
|
-
];
|
|
12536
12411
|
var musgraveGalleryImages = [
|
|
12537
12412
|
{ src: "/properties/Musgrave/ExteriorFront_Musgrave_Loafmarkets.jpg", title: "Exterior Front", subtitle: "Grand entrance" },
|
|
12538
12413
|
{ src: "/properties/Musgrave/ExteriorDusk_Musgrave_Loafmarkets.jpg", title: "Exterior Dusk", subtitle: "Evening ambiance" },
|
|
@@ -12587,7 +12462,9 @@ function PropertyBuy({
|
|
|
12587
12462
|
isLoadingActivity = false,
|
|
12588
12463
|
selectorItems,
|
|
12589
12464
|
onSelectorSelect,
|
|
12590
|
-
portfolioActivity
|
|
12465
|
+
portfolioActivity,
|
|
12466
|
+
newsItems = [],
|
|
12467
|
+
newsConnectionStatus
|
|
12591
12468
|
}) {
|
|
12592
12469
|
const [sliderValue, setSliderValue] = useState(0);
|
|
12593
12470
|
const [availableBalance, setAvailableBalance] = useState(walletUsdcBalance ?? 0);
|
|
@@ -12600,15 +12477,6 @@ function PropertyBuy({
|
|
|
12600
12477
|
const [orderPlacedSuccess, setOrderPlacedSuccess] = useState(false);
|
|
12601
12478
|
const [lastOrderDetails, setLastOrderDetails] = useState(null);
|
|
12602
12479
|
const [showOrderConfirmModal, setShowOrderConfirmModal] = useState(false);
|
|
12603
|
-
const [, setLiveNewsIndex] = useState(0);
|
|
12604
|
-
const [newsItems, setNewsItems] = useState(
|
|
12605
|
-
() => allNewsItems.slice(0, 4).map((item, index) => ({
|
|
12606
|
-
...item,
|
|
12607
|
-
displayId: `${item.id}-initial-${index}`,
|
|
12608
|
-
date: index === 0 ? "Just now" : `${(index + 1) * 3} minutes ago`,
|
|
12609
|
-
isNew: false
|
|
12610
|
-
}))
|
|
12611
|
-
);
|
|
12612
12480
|
const tokenPrice = saleData?.tokenPrice ?? 250;
|
|
12613
12481
|
const feeRate = (saleData?.feePercent ?? 0.5) / 100;
|
|
12614
12482
|
const totalSold = saleData?.totalSold ?? 0;
|
|
@@ -12708,29 +12576,6 @@ function PropertyBuy({
|
|
|
12708
12576
|
setSliderValue(0);
|
|
12709
12577
|
setManualOrderAmount(null);
|
|
12710
12578
|
};
|
|
12711
|
-
useEffect(() => {
|
|
12712
|
-
const newsInterval = setInterval(() => {
|
|
12713
|
-
setLiveNewsIndex((prev) => {
|
|
12714
|
-
const nextIndex = (prev + 1) % allNewsItems.length;
|
|
12715
|
-
setNewsItems((current) => {
|
|
12716
|
-
const incoming = allNewsItems[nextIndex];
|
|
12717
|
-
if (current.some((item) => item.id === incoming.id)) {
|
|
12718
|
-
return current;
|
|
12719
|
-
}
|
|
12720
|
-
return [
|
|
12721
|
-
{ ...incoming, displayId: `${incoming.id}-${Date.now()}`, date: "Just now", isNew: true },
|
|
12722
|
-
...current.slice(0, 3).map((item) => ({
|
|
12723
|
-
...item,
|
|
12724
|
-
isNew: false,
|
|
12725
|
-
date: item.date === "Just now" ? "8 seconds ago" : item.date
|
|
12726
|
-
}))
|
|
12727
|
-
];
|
|
12728
|
-
});
|
|
12729
|
-
return nextIndex;
|
|
12730
|
-
});
|
|
12731
|
-
}, 8e3);
|
|
12732
|
-
return () => clearInterval(newsInterval);
|
|
12733
|
-
}, []);
|
|
12734
12579
|
if (saleData?.loading) {
|
|
12735
12580
|
return /* @__PURE__ */ jsx("div", { className: "py-16 px-8 text-[var(--color-text-secondary)] text-center text-[0.9rem]", children: "Loading sale data..." });
|
|
12736
12581
|
}
|
|
@@ -12828,6 +12673,7 @@ function PropertyBuy({
|
|
|
12828
12673
|
NewsOrdersSection,
|
|
12829
12674
|
{
|
|
12830
12675
|
newsItems,
|
|
12676
|
+
newsConnectionStatus,
|
|
12831
12677
|
activityData: portfolioActivity
|
|
12832
12678
|
}
|
|
12833
12679
|
)
|
|
@@ -15260,6 +15106,6 @@ function hasPendingActivity(data) {
|
|
|
15260
15106
|
}) ?? false;
|
|
15261
15107
|
}
|
|
15262
15108
|
|
|
15263
|
-
export { AssetSelectorBar, Badge, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Header, HousePositionSlider, HousePositionSliderMobile, LoafLiquidityBadge, LoafLiquidityLogo, LoginPopup, MobileTradeNav, Orderbook, owner_booking_default as OwnerBooking, PaymentPopup, PortfolioActivityPanel, PortfolioSummary, PriceChart, PropertyBuy, PropertyCompareBar, PropertyDocuments, PropertyHeroHeader, PropertyHistory, PropertyInspectionTimes, PropertyNewsUpdates, PropertyOffers, PropertyOverview, PropertyPhotoGallery, PropertySubheader, PropertyTour, PropertyValuation, Skeleton, ToastProvider, TradeConfirmationModal, TradingSlider, YourOrders, badgeVariants, buttonVariants, hasPendingActivity, useAdaptivePolling, useToast };
|
|
15109
|
+
export { AssetSelectorBar, Badge, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Header, HousePositionSlider, HousePositionSliderMobile, LoafLiquidityBadge, LoafLiquidityLogo, LoginPopup, MobileTradeNav, OfferingProgressCard, Orderbook, owner_booking_default as OwnerBooking, PaymentPopup, PortfolioActivityPanel, PortfolioSummary, PriceChart, PropertyBuy, PropertyCompareBar, PropertyDocuments, PropertyHeroHeader, PropertyHistory, PropertyInspectionTimes, PropertyNewsUpdates, PropertyOffers, PropertyOverview, PropertyPhotoGallery, PropertySubheader, PropertyTour, PropertyValuation, Skeleton, ToastProvider, TradeConfirmationModal, TradingSlider, YourOrders, badgeVariants, buttonVariants, hasPendingActivity, useAdaptivePolling, useToast };
|
|
15264
15110
|
//# sourceMappingURL=index.mjs.map
|
|
15265
15111
|
//# sourceMappingURL=index.mjs.map
|