@loafmarkets/ui 0.1.59 → 0.1.61
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 +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +15 -171
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +15 -171
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3018,7 +3018,7 @@ var PropertyNewsUpdates = React5.forwardRef(
|
|
|
3018
3018
|
animation: item.isNew ? "propertyNewsSlideIn 0.5s ease-out" : void 0
|
|
3019
3019
|
},
|
|
3020
3020
|
children: [
|
|
3021
|
-
/* @__PURE__ */ jsx("p", { style: { fontSize: "0.9375rem", fontWeight: 500, marginBottom: "0.35rem" }, children: item.url ? /* @__PURE__ */ jsx(
|
|
3021
|
+
/* @__PURE__ */ jsx("p", { style: { fontSize: "0.9375rem", fontWeight: 500, marginBottom: "0.35rem", color: "#fff" }, children: item.url ? /* @__PURE__ */ jsx(
|
|
3022
3022
|
"a",
|
|
3023
3023
|
{
|
|
3024
3024
|
href: item.url,
|
|
@@ -12092,31 +12092,16 @@ var CancelConfirmProceed = styled25.button`
|
|
|
12092
12092
|
cursor: not-allowed;
|
|
12093
12093
|
}
|
|
12094
12094
|
`;
|
|
12095
|
-
function NewsOrdersSection({ newsItems, activityData }) {
|
|
12095
|
+
function NewsOrdersSection({ newsItems, newsConnectionStatus, activityData }) {
|
|
12096
12096
|
return /* @__PURE__ */ jsxs(Row2, { children: [
|
|
12097
|
-
/* @__PURE__ */
|
|
12098
|
-
|
|
12099
|
-
|
|
12100
|
-
|
|
12101
|
-
|
|
12102
|
-
|
|
12103
|
-
|
|
12104
|
-
|
|
12105
|
-
/* @__PURE__ */ jsx(TradeNewsList, { children: newsItems.map((newsItem) => /* @__PURE__ */ jsxs(
|
|
12106
|
-
TradeNewsItem,
|
|
12107
|
-
{
|
|
12108
|
-
"data-new": newsItem.isNew,
|
|
12109
|
-
children: [
|
|
12110
|
-
/* @__PURE__ */ jsx(TradeNewsTitle, { children: newsItem.title }),
|
|
12111
|
-
/* @__PURE__ */ jsxs(TradeNewsInfo, { children: [
|
|
12112
|
-
/* @__PURE__ */ jsx(TradeNewsDate, { "data-new": newsItem.isNew, children: newsItem.date }),
|
|
12113
|
-
/* @__PURE__ */ jsx(TradeNewsCategory, { "data-type": newsItem.type, children: newsItem.type === "property" ? "Property Update" : "Market News" })
|
|
12114
|
-
] })
|
|
12115
|
-
]
|
|
12116
|
-
},
|
|
12117
|
-
newsItem.displayId || `${newsItem.id}-fallback`
|
|
12118
|
-
)) })
|
|
12119
|
-
] }),
|
|
12097
|
+
/* @__PURE__ */ jsx(
|
|
12098
|
+
PropertyNewsUpdates,
|
|
12099
|
+
{
|
|
12100
|
+
items: newsItems,
|
|
12101
|
+
heading: "Property News & Updates",
|
|
12102
|
+
connectionStatus: newsConnectionStatus
|
|
12103
|
+
}
|
|
12104
|
+
),
|
|
12120
12105
|
/* @__PURE__ */ jsx(ActivityWrapper, { children: /* @__PURE__ */ jsx(
|
|
12121
12106
|
PortfolioActivityPanel,
|
|
12122
12107
|
{
|
|
@@ -12154,7 +12139,7 @@ var Row2 = styled25.div`
|
|
|
12154
12139
|
overflow: hidden;
|
|
12155
12140
|
}
|
|
12156
12141
|
`;
|
|
12157
|
-
var
|
|
12142
|
+
var ActivityWrapper = styled25.div`
|
|
12158
12143
|
background-color: var(--color-card-darker, #111);
|
|
12159
12144
|
border-radius: 8px;
|
|
12160
12145
|
padding: 1.5rem;
|
|
@@ -12164,107 +12149,11 @@ var TradeNewsPanel = styled25.div`
|
|
|
12164
12149
|
border: 1px solid var(--color-border);
|
|
12165
12150
|
min-height: 280px;
|
|
12166
12151
|
overflow: hidden;
|
|
12167
|
-
@media (max-width: 768px) {
|
|
12168
|
-
max-width: 100%;
|
|
12169
|
-
flex: 0 0 100%;
|
|
12170
|
-
}
|
|
12171
12152
|
@media (max-width: 768px) {
|
|
12172
12153
|
padding: 1rem;
|
|
12173
12154
|
min-height: auto;
|
|
12174
12155
|
}
|
|
12175
12156
|
`;
|
|
12176
|
-
var ActivityWrapper = styled25(TradeNewsPanel)``;
|
|
12177
|
-
var TradeNewsHeader = styled25.div`
|
|
12178
|
-
display: flex;
|
|
12179
|
-
justify-content: space-between;
|
|
12180
|
-
align-items: center;
|
|
12181
|
-
padding-bottom: 0.75rem;
|
|
12182
|
-
margin-bottom: 1rem;
|
|
12183
|
-
border-bottom: 1px solid rgba(255,255,255,0.1);
|
|
12184
|
-
h3 {
|
|
12185
|
-
margin: 0;
|
|
12186
|
-
font-size: 0.9rem;
|
|
12187
|
-
font-weight: 600;
|
|
12188
|
-
color: var(--color-text);
|
|
12189
|
-
}
|
|
12190
|
-
span {
|
|
12191
|
-
font-size: 0.7rem;
|
|
12192
|
-
color: var(--color-text-secondary);
|
|
12193
|
-
display: flex;
|
|
12194
|
-
align-items: center;
|
|
12195
|
-
gap: 0.25rem;
|
|
12196
|
-
font-weight: 500;
|
|
12197
|
-
}
|
|
12198
|
-
.dot {
|
|
12199
|
-
width: 6px;
|
|
12200
|
-
height: 6px;
|
|
12201
|
-
border-radius: 50%;
|
|
12202
|
-
background-color: #0ecb81;
|
|
12203
|
-
animation: pulse 2s infinite;
|
|
12204
|
-
}
|
|
12205
|
-
@keyframes pulse {
|
|
12206
|
-
0% { opacity: 0.4; }
|
|
12207
|
-
50% { opacity: 1; }
|
|
12208
|
-
100% { opacity: 0.4; }
|
|
12209
|
-
}
|
|
12210
|
-
`;
|
|
12211
|
-
var TradeNewsList = styled25.div`
|
|
12212
|
-
display: flex;
|
|
12213
|
-
flex-direction: column;
|
|
12214
|
-
gap: 0.75rem;
|
|
12215
|
-
flex: 1;
|
|
12216
|
-
overflow: visible;
|
|
12217
|
-
max-width: 100%;
|
|
12218
|
-
`;
|
|
12219
|
-
var TradeNewsItem = styled25.div`
|
|
12220
|
-
display: flex;
|
|
12221
|
-
flex-direction: column;
|
|
12222
|
-
padding: 0.75rem;
|
|
12223
|
-
background-color: rgba(255,255,255,0.05);
|
|
12224
|
-
border-radius: 6px;
|
|
12225
|
-
cursor: pointer;
|
|
12226
|
-
transition: all 0.2s;
|
|
12227
|
-
&[data-new='true'] {
|
|
12228
|
-
background-color: rgba(14,203,129,0.1);
|
|
12229
|
-
}
|
|
12230
|
-
&:hover {
|
|
12231
|
-
background-color: rgba(255,255,255,0.08);
|
|
12232
|
-
transform: translateY(-2px);
|
|
12233
|
-
}
|
|
12234
|
-
`;
|
|
12235
|
-
var TradeNewsTitle = styled25.h4`
|
|
12236
|
-
font-size: 0.9375rem;
|
|
12237
|
-
font-weight: 500;
|
|
12238
|
-
margin: 0 0 0.5rem 0;
|
|
12239
|
-
color: var(--color-text);
|
|
12240
|
-
`;
|
|
12241
|
-
var TradeNewsInfo = styled25.div`
|
|
12242
|
-
display: flex;
|
|
12243
|
-
justify-content: space-between;
|
|
12244
|
-
align-items: center;
|
|
12245
|
-
font-size: 0.75rem;
|
|
12246
|
-
color: var(--color-text-secondary);
|
|
12247
|
-
`;
|
|
12248
|
-
var TradeNewsDate = styled25.span`
|
|
12249
|
-
&[data-new='true'] {
|
|
12250
|
-
color: #0ecb81;
|
|
12251
|
-
}
|
|
12252
|
-
`;
|
|
12253
|
-
var TradeNewsCategory = styled25.span`
|
|
12254
|
-
padding: 0.25rem 0.5rem;
|
|
12255
|
-
border-radius: 4px;
|
|
12256
|
-
background-color: rgba(240,185,11,0.1);
|
|
12257
|
-
color: var(--color-accent, #f0b90b);
|
|
12258
|
-
font-weight: 500;
|
|
12259
|
-
white-space: nowrap;
|
|
12260
|
-
overflow: hidden;
|
|
12261
|
-
text-overflow: ellipsis;
|
|
12262
|
-
max-width: 100px;
|
|
12263
|
-
&[data-type='property'] {
|
|
12264
|
-
background-color: rgba(14,203,129,0.1);
|
|
12265
|
-
color: #0ecb81;
|
|
12266
|
-
}
|
|
12267
|
-
`;
|
|
12268
12157
|
function OrderConfirmationModal({
|
|
12269
12158
|
open,
|
|
12270
12159
|
onClose,
|
|
@@ -12519,22 +12408,6 @@ var ButtonRow2 = styled25.div`
|
|
|
12519
12408
|
`;
|
|
12520
12409
|
|
|
12521
12410
|
// src/components/property-buy/constants.ts
|
|
12522
|
-
var allNewsItems = [
|
|
12523
|
-
{ id: 1, title: "RBA signals potential rate cut in Q1 2026 - property stocks rally", type: "market" },
|
|
12524
|
-
{ id: 2, title: "Sydney unemployment drops to 3.1% - Eastern suburbs lead recovery", type: "market" },
|
|
12525
|
-
{ id: 3, title: "Musgrave heritage listing confirmed - protects architectural value", type: "property" },
|
|
12526
|
-
{ id: 4, title: "Mosman Council approves DA for Musgrave restoration works", type: "property" },
|
|
12527
|
-
{ id: 5, title: "Nearby 12 Mcleod St sells for $18.5M - sets new street record", type: "market" },
|
|
12528
|
-
{ id: 6, title: "Eastern suburbs rental yields reach 3.8% - highest in 5 years", type: "market" },
|
|
12529
|
-
{ id: 7, title: "Musgrave pool resurfacing completed - heritage sandstone preserved", type: "property" },
|
|
12530
|
-
{ id: 8, title: "Mosman median house price hits $7.2M - up 9% YoY", type: "market" },
|
|
12531
|
-
{ id: 9, title: "Musgrave gardens featured in Heritage NSW annual report", type: "property" },
|
|
12532
|
-
{ id: 10, title: "Lower North Shore vacancy rates drop to 1.2% - rental demand surges", type: "market" },
|
|
12533
|
-
{ id: 11, title: "Musgrave structural inspection complete - excellent condition confirmed", type: "property" },
|
|
12534
|
-
{ id: 12, title: "Sydney harbour views premium reaches 35% - Mosman leads growth", type: "market" },
|
|
12535
|
-
{ id: 13, title: "New security system installed at Musgrave - smart home integration", type: "property" },
|
|
12536
|
-
{ id: 14, title: "Heritage property demand up 22% - pre-Federation homes most sought", type: "market" }
|
|
12537
|
-
];
|
|
12538
12411
|
var musgraveGalleryImages = [
|
|
12539
12412
|
{ src: "/properties/Musgrave/ExteriorFront_Musgrave_Loafmarkets.jpg", title: "Exterior Front", subtitle: "Grand entrance" },
|
|
12540
12413
|
{ src: "/properties/Musgrave/ExteriorDusk_Musgrave_Loafmarkets.jpg", title: "Exterior Dusk", subtitle: "Evening ambiance" },
|
|
@@ -12589,7 +12462,9 @@ function PropertyBuy({
|
|
|
12589
12462
|
isLoadingActivity = false,
|
|
12590
12463
|
selectorItems,
|
|
12591
12464
|
onSelectorSelect,
|
|
12592
|
-
portfolioActivity
|
|
12465
|
+
portfolioActivity,
|
|
12466
|
+
newsItems = [],
|
|
12467
|
+
newsConnectionStatus
|
|
12593
12468
|
}) {
|
|
12594
12469
|
const [sliderValue, setSliderValue] = useState(0);
|
|
12595
12470
|
const [availableBalance, setAvailableBalance] = useState(walletUsdcBalance ?? 0);
|
|
@@ -12602,15 +12477,6 @@ function PropertyBuy({
|
|
|
12602
12477
|
const [orderPlacedSuccess, setOrderPlacedSuccess] = useState(false);
|
|
12603
12478
|
const [lastOrderDetails, setLastOrderDetails] = useState(null);
|
|
12604
12479
|
const [showOrderConfirmModal, setShowOrderConfirmModal] = useState(false);
|
|
12605
|
-
const [, setLiveNewsIndex] = useState(0);
|
|
12606
|
-
const [newsItems, setNewsItems] = useState(
|
|
12607
|
-
() => allNewsItems.slice(0, 4).map((item, index) => ({
|
|
12608
|
-
...item,
|
|
12609
|
-
displayId: `${item.id}-initial-${index}`,
|
|
12610
|
-
date: index === 0 ? "Just now" : `${(index + 1) * 3} minutes ago`,
|
|
12611
|
-
isNew: false
|
|
12612
|
-
}))
|
|
12613
|
-
);
|
|
12614
12480
|
const tokenPrice = saleData?.tokenPrice ?? 250;
|
|
12615
12481
|
const feeRate = (saleData?.feePercent ?? 0.5) / 100;
|
|
12616
12482
|
const totalSold = saleData?.totalSold ?? 0;
|
|
@@ -12710,29 +12576,6 @@ function PropertyBuy({
|
|
|
12710
12576
|
setSliderValue(0);
|
|
12711
12577
|
setManualOrderAmount(null);
|
|
12712
12578
|
};
|
|
12713
|
-
useEffect(() => {
|
|
12714
|
-
const newsInterval = setInterval(() => {
|
|
12715
|
-
setLiveNewsIndex((prev) => {
|
|
12716
|
-
const nextIndex = (prev + 1) % allNewsItems.length;
|
|
12717
|
-
setNewsItems((current) => {
|
|
12718
|
-
const incoming = allNewsItems[nextIndex];
|
|
12719
|
-
if (current.some((item) => item.id === incoming.id)) {
|
|
12720
|
-
return current;
|
|
12721
|
-
}
|
|
12722
|
-
return [
|
|
12723
|
-
{ ...incoming, displayId: `${incoming.id}-${Date.now()}`, date: "Just now", isNew: true },
|
|
12724
|
-
...current.slice(0, 3).map((item) => ({
|
|
12725
|
-
...item,
|
|
12726
|
-
isNew: false,
|
|
12727
|
-
date: item.date === "Just now" ? "8 seconds ago" : item.date
|
|
12728
|
-
}))
|
|
12729
|
-
];
|
|
12730
|
-
});
|
|
12731
|
-
return nextIndex;
|
|
12732
|
-
});
|
|
12733
|
-
}, 8e3);
|
|
12734
|
-
return () => clearInterval(newsInterval);
|
|
12735
|
-
}, []);
|
|
12736
12579
|
if (saleData?.loading) {
|
|
12737
12580
|
return /* @__PURE__ */ jsx("div", { className: "py-16 px-8 text-[var(--color-text-secondary)] text-center text-[0.9rem]", children: "Loading sale data..." });
|
|
12738
12581
|
}
|
|
@@ -12830,6 +12673,7 @@ function PropertyBuy({
|
|
|
12830
12673
|
NewsOrdersSection,
|
|
12831
12674
|
{
|
|
12832
12675
|
newsItems,
|
|
12676
|
+
newsConnectionStatus,
|
|
12833
12677
|
activityData: portfolioActivity
|
|
12834
12678
|
}
|
|
12835
12679
|
)
|