@loafmarkets/ui 0.1.62 → 0.1.64

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.js CHANGED
@@ -2709,6 +2709,11 @@ var ensureAnimationsInjected = () => {
2709
2709
  @keyframes propertyNewsSpin {
2710
2710
  to { transform: rotate(360deg); }
2711
2711
  }
2712
+
2713
+ @keyframes propertyNewsFadeIn {
2714
+ from { opacity: 0; max-height: 0; }
2715
+ to { opacity: 1; max-height: 300px; }
2716
+ }
2712
2717
  `;
2713
2718
  document.head.appendChild(style);
2714
2719
  };
@@ -2741,6 +2746,31 @@ var formatTimeAgo = (timestamp) => {
2741
2746
  if (diff < 3600) return `${Math.floor(diff / 60)}m ago`;
2742
2747
  return `${Math.floor(diff / 3600)}h ago`;
2743
2748
  };
2749
+ function getSentimentInfo(score) {
2750
+ if (score == null) return null;
2751
+ if (score > 0.15) return { arrow: "\u25B2", label: "Bullish", color: "#0ecb81" };
2752
+ if (score < -0.15) return { arrow: "\u25BC", label: "Bearish", color: "#f6465d" };
2753
+ return { arrow: "\u2014", label: "Neutral", color: "#848e9c" };
2754
+ }
2755
+ function ChevronIcon({ isOpen }) {
2756
+ return /* @__PURE__ */ jsxRuntime.jsx(
2757
+ "svg",
2758
+ {
2759
+ xmlns: "http://www.w3.org/2000/svg",
2760
+ width: "14",
2761
+ height: "14",
2762
+ viewBox: "0 0 24 24",
2763
+ fill: "currentColor",
2764
+ style: {
2765
+ color: "rgba(255,255,255,0.4)",
2766
+ transition: "transform 0.2s",
2767
+ transform: isOpen ? "rotate(90deg)" : "rotate(0deg)",
2768
+ flexShrink: 0
2769
+ },
2770
+ children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z" })
2771
+ }
2772
+ );
2773
+ }
2744
2774
  var PropertyNewsUpdates = React5__namespace.forwardRef(
2745
2775
  ({
2746
2776
  className,
@@ -2763,6 +2793,7 @@ var PropertyNewsUpdates = React5__namespace.forwardRef(
2763
2793
  const [homePage, setHomePage] = React5__namespace.useState(0);
2764
2794
  const purchaseItems = purchasesProp ?? [];
2765
2795
  const [page, setPage] = React5__namespace.useState(0);
2796
+ const [expandedId, setExpandedId] = React5__namespace.useState(null);
2766
2797
  React5__namespace.useEffect(() => {
2767
2798
  ensureAnimationsInjected();
2768
2799
  }, []);
@@ -2784,6 +2815,9 @@ var PropertyNewsUpdates = React5__namespace.forwardRef(
2784
2815
  [homeFilteredItems.length]
2785
2816
  );
2786
2817
  const homePaginatedItems = homeFilteredItems.slice(homePage * ITEMS_PER_PAGE, (homePage + 1) * ITEMS_PER_PAGE);
2818
+ const toggleExpand = React5__namespace.useCallback((key) => {
2819
+ setExpandedId((prev) => prev === key ? null : key);
2820
+ }, []);
2787
2821
  return /* @__PURE__ */ jsxRuntime.jsxs(
2788
2822
  "div",
2789
2823
  {
@@ -2901,229 +2935,324 @@ var PropertyNewsUpdates = React5__namespace.forwardRef(
2901
2935
  },
2902
2936
  tab
2903
2937
  )) }),
2904
- /* @__PURE__ */ jsxRuntime.jsx(
2905
- "div",
2906
- {
2907
- className: "mt-4 flex flex-1 flex-col gap-3 overflow-visible",
2908
- style: !isPurchaseVariant && !isHomeVariant ? { minHeight: `${ITEMS_PER_PAGE * 88}px` } : void 0,
2909
- children: isPurchaseVariant ? purchaseItems.length > 0 ? purchaseItems.slice(0, 7).map((purchase, index) => {
2910
- const maxAmount = 6e4;
2911
- const barPercent = Math.min(85, Math.max(15, purchase.amount / maxAmount * 100));
2912
- const isAlternate = index % 2 === 1;
2913
- return /* @__PURE__ */ jsxRuntime.jsxs(
2914
- "div",
2915
- {
2916
- style: {
2917
- display: "flex",
2918
- justifyContent: "space-between",
2919
- alignItems: "center",
2920
- padding: "0.625rem 0.75rem",
2921
- borderBottom: "1px solid rgba(255,255,255,0.05)",
2922
- position: "relative",
2923
- overflow: "hidden",
2924
- backgroundColor: isAlternate ? "rgba(255,255,255,0.03)" : "transparent"
2925
- },
2926
- children: [
2927
- /* @__PURE__ */ jsxRuntime.jsx(
2928
- "div",
2929
- {
2930
- style: {
2931
- position: "absolute",
2932
- top: 0,
2933
- right: 0,
2934
- bottom: 0,
2935
- width: `${barPercent}%`,
2936
- background: "linear-gradient(90deg, transparent 0%, rgba(14,203,129,0.15) 100%)",
2937
- pointerEvents: "none"
2938
- }
2939
- }
2940
- ),
2941
- /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", flexDirection: "column", minWidth: 0, position: "relative" }, children: [
2942
- /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontWeight: 500, fontSize: "0.875rem", color: "#fff", whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }, children: purchase.name }),
2943
- /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: "0.7rem", color: "var(--color-text-secondary, #848e9c)", marginTop: "0.125rem" }, children: formatTimeAgo(purchase.timestamp) })
2944
- ] }),
2945
- /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { fontWeight: 600, fontSize: "0.875rem", color: "#fff", whiteSpace: "nowrap", marginLeft: "1rem", position: "relative" }, children: [
2946
- "$",
2947
- purchase.amount >= 1e6 ? `${(purchase.amount / 1e6).toFixed(2)}M` : Math.round(purchase.amount).toLocaleString()
2948
- ] })
2949
- ]
2950
- },
2951
- purchase.id
2952
- );
2953
- }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", padding: "3rem 0", gap: "0.75rem" }, children: [
2954
- /* @__PURE__ */ jsxRuntime.jsx(
2955
- "div",
2956
- {
2957
- style: {
2958
- width: "28px",
2959
- height: "28px",
2960
- border: "3px solid rgba(255,255,255,0.1)",
2961
- borderTopColor: "var(--color-accent, #f0b90b)",
2962
- borderRadius: "50%",
2963
- animation: "propertyNewsSpin 1s linear infinite"
2938
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-4 flex flex-1 flex-col gap-3 overflow-visible", children: isPurchaseVariant ? purchaseItems.length > 0 ? purchaseItems.slice(0, 7).map((purchase, index) => {
2939
+ const maxAmount = 6e4;
2940
+ const barPercent = Math.min(85, Math.max(15, purchase.amount / maxAmount * 100));
2941
+ const isAlternate = index % 2 === 1;
2942
+ return /* @__PURE__ */ jsxRuntime.jsxs(
2943
+ "div",
2944
+ {
2945
+ style: {
2946
+ display: "flex",
2947
+ justifyContent: "space-between",
2948
+ alignItems: "center",
2949
+ padding: "0.625rem 0.75rem",
2950
+ borderBottom: "1px solid rgba(255,255,255,0.05)",
2951
+ position: "relative",
2952
+ overflow: "hidden",
2953
+ backgroundColor: isAlternate ? "rgba(255,255,255,0.03)" : "transparent"
2954
+ },
2955
+ children: [
2956
+ /* @__PURE__ */ jsxRuntime.jsx(
2957
+ "div",
2958
+ {
2959
+ style: {
2960
+ position: "absolute",
2961
+ top: 0,
2962
+ right: 0,
2963
+ bottom: 0,
2964
+ width: `${barPercent}%`,
2965
+ background: "linear-gradient(90deg, transparent 0%, rgba(14,203,129,0.15) 100%)",
2966
+ pointerEvents: "none"
2967
+ }
2964
2968
  }
2965
- }
2966
- ),
2967
- /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: "0.8rem", color: "rgba(255,255,255,0.4)" }, children: "Awaiting offering..." })
2968
- ] }) : isHomeVariant ? hasItems ? homePaginatedItems.map((item, index) => {
2969
- const key = item.displayId ?? item.id ?? `${item.title}-${index}`;
2970
- const tagType = item.type;
2971
- const isProperty = tagType === "property";
2972
- return /* @__PURE__ */ jsxRuntime.jsxs(
2973
- "a",
2974
- {
2975
- href: item.url ?? "#",
2976
- target: "_blank",
2977
- rel: "noopener noreferrer",
2978
- style: {
2979
- display: "flex",
2980
- justifyContent: "space-between",
2981
- alignItems: "center",
2982
- padding: "0.75rem 0",
2983
- borderBottom: index < homePaginatedItems.length - 1 ? "1px solid rgba(255,255,255,0.05)" : "none",
2984
- cursor: "pointer",
2985
- textDecoration: "none",
2986
- color: "inherit"
2987
- },
2988
- children: [
2989
- /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { flex: 1 }, children: [
2990
- /* @__PURE__ */ jsxRuntime.jsx("h3", { style: { fontSize: "0.85rem", fontWeight: 400, marginBottom: "0.25rem", color: "#f8f9fa", lineHeight: 1.4 }, children: item.title }),
2991
- /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", gap: "0.5rem", alignItems: "center", flexWrap: "wrap" }, children: [
2992
- /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: "#848e9c", fontSize: "0.7rem" }, children: typeof item.date === "string" ? item.date : formatDate(item.date) }),
2993
- item.source && /* @__PURE__ */ jsxRuntime.jsx(
2994
- "span",
2995
- {
2996
- style: {
2997
- padding: "0.1rem 0.4rem",
2998
- borderRadius: "3px",
2999
- fontSize: "0.62rem",
3000
- fontWeight: 500,
3001
- backgroundColor: "rgba(255,255,255,0.07)",
3002
- color: "#848e9c",
3003
- whiteSpace: "nowrap"
3004
- },
3005
- children: item.source
3006
- }
3007
- ),
3008
- /* @__PURE__ */ jsxRuntime.jsx(
3009
- "span",
3010
- {
3011
- style: {
3012
- padding: "0.15rem 0.4rem",
3013
- borderRadius: "2px",
3014
- fontSize: "0.65rem",
3015
- fontWeight: 500,
3016
- backgroundColor: isProperty ? "rgba(14,203,129,0.1)" : "rgba(240,185,11,0.1)",
3017
- color: isProperty ? "#0ecb81" : "#f0b90b"
3018
- },
3019
- children: isProperty ? "Property Update" : "Market News"
3020
- }
3021
- )
3022
- ] })
3023
- ] }),
3024
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "flex", alignItems: "center", color: "#848e9c", marginLeft: "0.5rem" }, children: /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z" }) }) })
3025
- ]
3026
- },
3027
- key
3028
- );
3029
- }) : emptyState ?? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col items-center justify-center py-10 text-center text-sm text-white/60", children: "No property news yet." }) : hasItems ? paginatedItems.map((item, index) => {
3030
- const absoluteIndex = page * ITEMS_PER_PAGE + index;
3031
- const key = item.displayId ?? item.id ?? `${item.title}-${absoluteIndex}`;
3032
- const styles2 = categoryStyles[item.type] ?? categoryStyles.market;
3033
- const dateLabel = item.isNew ?? (highlightFirst && absoluteIndex === 0) ? "Just now" : typeof item.date === "string" && item.date.trim().length > 0 ? item.date : formatDate(item.date);
3034
- const isHighlighted = item.isNew ?? (highlightFirst && absoluteIndex === 0);
3035
- return /* @__PURE__ */ jsxRuntime.jsxs(
3036
- "div",
3037
- {
3038
- style: {
3039
- padding: "0.75rem",
3040
- borderRadius: "6px",
3041
- backgroundColor: isHighlighted ? "rgba(14, 203, 129, 0.1)" : "transparent",
3042
- border: "1px solid transparent",
3043
- transition: "background-color 0.2s",
3044
- animation: item.isNew ? "propertyNewsSlideIn 0.5s ease-out" : void 0
3045
- },
3046
- children: [
3047
- /* @__PURE__ */ jsxRuntime.jsx("p", { style: { fontSize: "0.9375rem", fontWeight: 500, marginBottom: "0.35rem", color: "#fff" }, children: item.url ? /* @__PURE__ */ jsxRuntime.jsx(
3048
- "a",
3049
- {
3050
- href: item.url,
3051
- target: "_blank",
3052
- rel: "noopener noreferrer",
3053
- style: { color: "inherit", textDecoration: "none" },
3054
- onMouseEnter: (e) => {
3055
- e.currentTarget.style.textDecoration = "underline";
3056
- },
3057
- onMouseLeave: (e) => {
3058
- e.currentTarget.style.textDecoration = "none";
3059
- },
3060
- children: item.title
3061
- }
3062
- ) : item.title }),
3063
- /* @__PURE__ */ jsxRuntime.jsxs(
3064
- "div",
3065
- {
3066
- style: {
3067
- display: "flex",
3068
- justifyContent: "space-between",
3069
- alignItems: "center",
3070
- fontSize: "0.75rem",
3071
- color: "#b5b8c5",
3072
- gap: "0.5rem"
3073
- },
3074
- children: [
3075
- /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", gap: "0.5rem", minWidth: 0 }, children: [
3076
- /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: isHighlighted ? "#0ecb81" : "inherit", whiteSpace: "nowrap" }, children: dateLabel }),
3077
- item.source && /* @__PURE__ */ jsxRuntime.jsx(
3078
- "span",
3079
- {
3080
- style: {
3081
- padding: "0.15rem 0.45rem",
3082
- borderRadius: "3px",
3083
- fontSize: "0.65rem",
3084
- fontWeight: 500,
3085
- backgroundColor: "rgba(255,255,255,0.07)",
3086
- color: "#848e9c",
3087
- whiteSpace: "nowrap",
3088
- overflow: "hidden",
3089
- textOverflow: "ellipsis",
3090
- maxWidth: "120px"
3091
- },
3092
- children: item.source
3093
- }
3094
- )
3095
- ] }),
2969
+ ),
2970
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", flexDirection: "column", minWidth: 0, position: "relative" }, children: [
2971
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontWeight: 500, fontSize: "0.875rem", color: "#fff", whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }, children: purchase.name }),
2972
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: "0.7rem", color: "var(--color-text-secondary, #848e9c)", marginTop: "0.125rem" }, children: formatTimeAgo(purchase.timestamp) })
2973
+ ] }),
2974
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { fontWeight: 600, fontSize: "0.875rem", color: "#fff", whiteSpace: "nowrap", marginLeft: "1rem", position: "relative" }, children: [
2975
+ "$",
2976
+ purchase.amount >= 1e6 ? `${(purchase.amount / 1e6).toFixed(2)}M` : Math.round(purchase.amount).toLocaleString()
2977
+ ] })
2978
+ ]
2979
+ },
2980
+ purchase.id
2981
+ );
2982
+ }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", padding: "3rem 0", gap: "0.75rem" }, children: [
2983
+ /* @__PURE__ */ jsxRuntime.jsx(
2984
+ "div",
2985
+ {
2986
+ style: {
2987
+ width: "28px",
2988
+ height: "28px",
2989
+ border: "3px solid rgba(255,255,255,0.1)",
2990
+ borderTopColor: "var(--color-accent, #f0b90b)",
2991
+ borderRadius: "50%",
2992
+ animation: "propertyNewsSpin 1s linear infinite"
2993
+ }
2994
+ }
2995
+ ),
2996
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: "0.8rem", color: "rgba(255,255,255,0.4)" }, children: "Awaiting offering..." })
2997
+ ] }) : isHomeVariant ? hasItems ? homePaginatedItems.map((item, index) => {
2998
+ const key = item.displayId ?? item.id ?? `${item.title}-${index}`;
2999
+ const tagType = item.type;
3000
+ const isProperty = tagType === "property";
3001
+ const sentimentInfo = getSentimentInfo(item.sentimentScore);
3002
+ const isExpanded = expandedId === key;
3003
+ return /* @__PURE__ */ jsxRuntime.jsxs(
3004
+ "div",
3005
+ {
3006
+ style: {
3007
+ padding: "0.75rem 0",
3008
+ borderBottom: index < homePaginatedItems.length - 1 ? "1px solid rgba(255,255,255,0.05)" : "none"
3009
+ },
3010
+ children: [
3011
+ /* @__PURE__ */ jsxRuntime.jsxs(
3012
+ "button",
3013
+ {
3014
+ type: "button",
3015
+ onClick: () => toggleExpand(key),
3016
+ style: {
3017
+ width: "100%",
3018
+ textAlign: "left",
3019
+ background: "transparent",
3020
+ border: "none",
3021
+ cursor: "pointer",
3022
+ padding: 0,
3023
+ display: "flex",
3024
+ justifyContent: "space-between",
3025
+ alignItems: "flex-start",
3026
+ gap: "0.5rem",
3027
+ color: "inherit"
3028
+ },
3029
+ children: [
3030
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { flex: 1 }, children: [
3031
+ /* @__PURE__ */ jsxRuntime.jsx("h3", { style: { fontSize: "0.85rem", fontWeight: 400, marginBottom: "0.25rem", color: "#f8f9fa", lineHeight: 1.4 }, children: item.title }),
3032
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", gap: "0.5rem", alignItems: "center", flexWrap: "wrap" }, children: [
3033
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: "#848e9c", fontSize: "0.7rem" }, children: typeof item.date === "string" ? item.date : formatDate(item.date) }),
3034
+ item.source && /* @__PURE__ */ jsxRuntime.jsx(
3035
+ "span",
3036
+ {
3037
+ style: {
3038
+ padding: "0.1rem 0.4rem",
3039
+ borderRadius: "3px",
3040
+ fontSize: "0.62rem",
3041
+ fontWeight: 500,
3042
+ backgroundColor: "rgba(255,255,255,0.07)",
3043
+ color: "#848e9c",
3044
+ whiteSpace: "nowrap"
3045
+ },
3046
+ children: item.source
3047
+ }
3048
+ ),
3096
3049
  /* @__PURE__ */ jsxRuntime.jsx(
3097
3050
  "span",
3098
3051
  {
3099
3052
  style: {
3100
- padding: "0.25rem 0.6rem",
3101
- borderRadius: "4px",
3102
- border: `1px solid ${styles2.borderColor}`,
3103
- backgroundColor: styles2.backgroundColor,
3104
- color: styles2.color,
3105
- fontSize: "0.68rem",
3053
+ padding: "0.15rem 0.4rem",
3054
+ borderRadius: "2px",
3055
+ fontSize: "0.65rem",
3056
+ fontWeight: 500,
3057
+ backgroundColor: isProperty ? "rgba(14,203,129,0.1)" : "rgba(240,185,11,0.1)",
3058
+ color: isProperty ? "#0ecb81" : "#f0b90b"
3059
+ },
3060
+ children: isProperty ? "Property Update" : "Market News"
3061
+ }
3062
+ ),
3063
+ sentimentInfo && /* @__PURE__ */ jsxRuntime.jsxs(
3064
+ "span",
3065
+ {
3066
+ style: {
3067
+ fontSize: "0.65rem",
3106
3068
  fontWeight: 600,
3107
- textTransform: "uppercase",
3108
- whiteSpace: "nowrap",
3109
- flexShrink: 0
3069
+ color: sentimentInfo.color
3110
3070
  },
3111
- children: item.type === "property" ? styles2.label : "Market News"
3071
+ children: [
3072
+ sentimentInfo.arrow,
3073
+ " ",
3074
+ sentimentInfo.label
3075
+ ]
3112
3076
  }
3113
3077
  )
3114
- ]
3078
+ ] })
3079
+ ] }),
3080
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "flex", alignItems: "center", color: "#848e9c", marginLeft: "0.5rem", paddingTop: "2px" }, children: /* @__PURE__ */ jsxRuntime.jsx(ChevronIcon, { isOpen: isExpanded }) })
3081
+ ]
3082
+ }
3083
+ ),
3084
+ isExpanded && item.summary && /* @__PURE__ */ jsxRuntime.jsx(
3085
+ "div",
3086
+ {
3087
+ style: {
3088
+ marginTop: "0.625rem",
3089
+ padding: "0.75rem",
3090
+ background: "rgba(255,255,255,0.04)",
3091
+ borderRadius: "6px",
3092
+ borderLeft: `3px solid ${sentimentInfo?.color ?? "rgba(255,255,255,0.15)"}`,
3093
+ animation: "propertyNewsSlideIn 0.2s ease-out"
3094
+ },
3095
+ children: /* @__PURE__ */ jsxRuntime.jsx("p", { style: { fontSize: "0.8rem", color: "rgba(255,255,255,0.72)", lineHeight: 1.65, margin: 0 }, children: item.summary })
3096
+ }
3097
+ ),
3098
+ isExpanded && !item.summary && /* @__PURE__ */ jsxRuntime.jsx(
3099
+ "div",
3100
+ {
3101
+ style: {
3102
+ marginTop: "0.625rem",
3103
+ padding: "0.6rem 0.75rem",
3104
+ background: "rgba(255,255,255,0.03)",
3105
+ borderRadius: "6px",
3106
+ animation: "propertyNewsSlideIn 0.2s ease-out"
3107
+ },
3108
+ children: /* @__PURE__ */ jsxRuntime.jsx("p", { style: { fontSize: "0.78rem", color: "rgba(255,255,255,0.35)", fontStyle: "italic", margin: 0 }, children: "Summary not available for this article." })
3109
+ }
3110
+ )
3111
+ ]
3112
+ },
3113
+ key
3114
+ );
3115
+ }) : emptyState ?? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col items-center justify-center py-10 text-center text-sm text-white/60", children: "No property news yet." }) : hasItems ? paginatedItems.map((item, index) => {
3116
+ const absoluteIndex = page * ITEMS_PER_PAGE + index;
3117
+ const key = item.displayId ?? item.id ?? `${item.title}-${absoluteIndex}`;
3118
+ const styles2 = categoryStyles[item.type] ?? categoryStyles.market;
3119
+ const dateLabel = item.isNew ?? (highlightFirst && absoluteIndex === 0) ? "Just now" : typeof item.date === "string" && item.date.trim().length > 0 ? item.date : formatDate(item.date);
3120
+ const isHighlighted = item.isNew ?? (highlightFirst && absoluteIndex === 0);
3121
+ const sentimentInfo = getSentimentInfo(item.sentimentScore);
3122
+ const isExpanded = expandedId === key;
3123
+ return /* @__PURE__ */ jsxRuntime.jsxs(
3124
+ "div",
3125
+ {
3126
+ style: {
3127
+ borderRadius: "6px",
3128
+ backgroundColor: isHighlighted ? "rgba(14, 203, 129, 0.1)" : "transparent",
3129
+ border: "1px solid transparent",
3130
+ transition: "background-color 0.2s",
3131
+ animation: item.isNew ? "propertyNewsSlideIn 0.5s ease-out" : void 0
3132
+ },
3133
+ children: [
3134
+ /* @__PURE__ */ jsxRuntime.jsxs(
3135
+ "button",
3136
+ {
3137
+ type: "button",
3138
+ onClick: () => toggleExpand(key),
3139
+ style: {
3140
+ width: "100%",
3141
+ textAlign: "left",
3142
+ background: "transparent",
3143
+ border: "none",
3144
+ cursor: "pointer",
3145
+ padding: "0.75rem",
3146
+ display: "block",
3147
+ color: "inherit"
3148
+ },
3149
+ children: [
3150
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "flex-start", gap: "0.5rem", marginBottom: "0.35rem" }, children: [
3151
+ /* @__PURE__ */ jsxRuntime.jsx("p", { style: { fontSize: "0.9375rem", fontWeight: 500, color: "#fff", margin: 0, flex: 1, lineHeight: 1.4 }, children: item.title }),
3152
+ /* @__PURE__ */ jsxRuntime.jsx(ChevronIcon, { isOpen: isExpanded })
3153
+ ] }),
3154
+ /* @__PURE__ */ jsxRuntime.jsxs(
3155
+ "div",
3156
+ {
3157
+ style: {
3158
+ display: "flex",
3159
+ justifyContent: "space-between",
3160
+ alignItems: "center",
3161
+ fontSize: "0.75rem",
3162
+ color: "#b5b8c5",
3163
+ gap: "0.5rem"
3164
+ },
3165
+ children: [
3166
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", gap: "0.5rem", minWidth: 0, flexWrap: "wrap" }, children: [
3167
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: isHighlighted ? "#0ecb81" : "inherit", whiteSpace: "nowrap" }, children: dateLabel }),
3168
+ item.source && /* @__PURE__ */ jsxRuntime.jsx(
3169
+ "span",
3170
+ {
3171
+ style: {
3172
+ padding: "0.15rem 0.45rem",
3173
+ borderRadius: "3px",
3174
+ fontSize: "0.65rem",
3175
+ fontWeight: 500,
3176
+ backgroundColor: "rgba(255,255,255,0.07)",
3177
+ color: "#848e9c",
3178
+ whiteSpace: "nowrap",
3179
+ overflow: "hidden",
3180
+ textOverflow: "ellipsis",
3181
+ maxWidth: "120px"
3182
+ },
3183
+ children: item.source
3184
+ }
3185
+ ),
3186
+ sentimentInfo && /* @__PURE__ */ jsxRuntime.jsxs(
3187
+ "span",
3188
+ {
3189
+ style: {
3190
+ fontSize: "0.65rem",
3191
+ fontWeight: 700,
3192
+ color: sentimentInfo.color,
3193
+ whiteSpace: "nowrap"
3194
+ },
3195
+ children: [
3196
+ sentimentInfo.arrow,
3197
+ " ",
3198
+ sentimentInfo.label
3199
+ ]
3200
+ }
3201
+ )
3202
+ ] }),
3203
+ /* @__PURE__ */ jsxRuntime.jsx(
3204
+ "span",
3205
+ {
3206
+ style: {
3207
+ padding: "0.25rem 0.6rem",
3208
+ borderRadius: "4px",
3209
+ border: `1px solid ${styles2.borderColor}`,
3210
+ backgroundColor: styles2.backgroundColor,
3211
+ color: styles2.color,
3212
+ fontSize: "0.68rem",
3213
+ fontWeight: 600,
3214
+ textTransform: "uppercase",
3215
+ whiteSpace: "nowrap",
3216
+ flexShrink: 0
3217
+ },
3218
+ children: item.type === "property" ? styles2.label : "Market News"
3219
+ }
3220
+ )
3221
+ ]
3222
+ }
3223
+ )
3224
+ ]
3225
+ }
3226
+ ),
3227
+ isExpanded && /* @__PURE__ */ jsxRuntime.jsx(
3228
+ "div",
3229
+ {
3230
+ style: {
3231
+ padding: "0 0.75rem 0.75rem",
3232
+ animation: "propertyNewsSlideIn 0.2s ease-out"
3233
+ },
3234
+ children: item.summary ? /* @__PURE__ */ jsxRuntime.jsx(
3235
+ "div",
3236
+ {
3237
+ style: {
3238
+ padding: "0.75rem",
3239
+ background: "rgba(255,255,255,0.04)",
3240
+ borderRadius: "6px",
3241
+ borderLeft: `3px solid ${sentimentInfo?.color ?? "rgba(255,255,255,0.15)"}`
3242
+ },
3243
+ children: /* @__PURE__ */ jsxRuntime.jsx("p", { style: { fontSize: "0.85rem", color: "rgba(255,255,255,0.78)", lineHeight: 1.65, margin: 0 }, children: item.summary })
3115
3244
  }
3116
- )
3117
- ]
3118
- },
3119
- key
3120
- );
3121
- }) : emptyState ?? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center justify-center rounded-2xl border border-dashed border-white/20 px-6 py-10 text-center text-sm text-white/60", children: [
3122
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Newspaper, { className: "mb-3 h-8 w-8 text-white/40" }),
3123
- "No property news yet. Updates will land here as soon as we receive new intelligence."
3124
- ] })
3125
- }
3126
- ),
3245
+ ) : /* @__PURE__ */ jsxRuntime.jsx("p", { style: { fontSize: "0.78rem", color: "rgba(255,255,255,0.3)", fontStyle: "italic", margin: 0 }, children: "Summary not available for this article." })
3246
+ }
3247
+ )
3248
+ ]
3249
+ },
3250
+ key
3251
+ );
3252
+ }) : emptyState ?? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center justify-center rounded-2xl border border-dashed border-white/20 px-6 py-10 text-center text-sm text-white/60", children: [
3253
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Newspaper, { className: "mb-3 h-8 w-8 text-white/40" }),
3254
+ "No property news yet. Updates will land here as soon as we receive new intelligence."
3255
+ ] }) }),
3127
3256
  isHomeVariant && homeTotalPages > 1 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-3 flex items-center justify-between text-xs text-white/60", children: [
3128
3257
  /* @__PURE__ */ jsxRuntime.jsx(
3129
3258
  "button",
@@ -6682,7 +6811,7 @@ var LoginPopup = ({
6682
6811
  /* @__PURE__ */ jsxRuntime.jsx(OnboardingHeading, { style: { textAlign: "center" }, children: "Verify Your Identity" }),
6683
6812
  /* @__PURE__ */ jsxRuntime.jsx(OnboardingSubtext, { style: { textAlign: "center", marginBottom: "1rem" }, children: "Complete identity verification to start investing in properties." }),
6684
6813
  /* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "flex", flexDirection: "column", gap: "0.75rem" }, children: /* @__PURE__ */ jsxRuntime.jsxs(ModalOptionCard, { onClick: handleKycStart, disabled: kycLoading, children: [
6685
- /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: "1.5rem" }, children: "\u{1F6E1}\uFE0F" }),
6814
+ /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "22", height: "22", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round", style: { color: "rgba(255,255,255,0.6)", flexShrink: 0 }, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" }) }),
6686
6815
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { flex: 1 }, children: [
6687
6816
  /* @__PURE__ */ jsxRuntime.jsx("div", { style: { color: "#fff", fontWeight: 600, fontSize: "0.95rem", marginBottom: "0.25rem" }, children: kycLoading ? "Verifying\u2026" : "Start Verification" }),
6688
6817
  /* @__PURE__ */ jsxRuntime.jsx("div", { style: { color: "rgba(255,255,255,0.5)", fontSize: "0.8rem" }, children: "Quick identity check \u2014 takes about 2 minutes" })
@@ -6716,7 +6845,10 @@ var LoginPopup = ({
6716
6845
  /* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "flex", flexDirection: "column", gap: "0.75rem", width: "100%" }, children: /* @__PURE__ */ jsxRuntime.jsxs(ModalOptionCard, { onClick: () => {
6717
6846
  window.open("mailto:help@loafmarkets.com", "_blank");
6718
6847
  }, children: [
6719
- /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: "1.5rem" }, children: "\u2709\uFE0F" }),
6848
+ /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "22", height: "22", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round", style: { color: "rgba(255,255,255,0.6)", flexShrink: 0 }, children: [
6849
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z" }),
6850
+ /* @__PURE__ */ jsxRuntime.jsx("polyline", { points: "22,6 12,13 2,6" })
6851
+ ] }),
6720
6852
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { flex: 1 }, children: [
6721
6853
  /* @__PURE__ */ jsxRuntime.jsx("div", { style: { color: "#fff", fontWeight: 600, fontSize: "0.95rem", marginBottom: "0.25rem" }, children: "Contact Support" }),
6722
6854
  /* @__PURE__ */ jsxRuntime.jsx("div", { style: { color: "rgba(255,255,255,0.5)", fontSize: "0.8rem" }, children: "help@loafmarkets.com" })
@@ -6752,14 +6884,24 @@ var LoginPopup = ({
6752
6884
  /* @__PURE__ */ jsxRuntime.jsx(OnboardingSubtext, { style: { textAlign: "center", marginBottom: "1rem" }, children: "Choose how you'd like to fund your account." }),
6753
6885
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "0.75rem" }, children: [
6754
6886
  /* @__PURE__ */ jsxRuntime.jsxs(ModalOptionCard, { onClick: handleCryptoFund, disabled: cryptoFundingLoading, children: [
6755
- /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: "1.5rem" }, children: "\u{1F4B3}" }),
6887
+ /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "22", height: "22", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round", style: { color: "rgba(255,255,255,0.6)", flexShrink: 0 }, children: [
6888
+ /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "2", y: "6", width: "20", height: "12", rx: "2" }),
6889
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M22 10H18a2 2 0 0 0 0 4h4" })
6890
+ ] }),
6756
6891
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { flex: 1 }, children: [
6757
6892
  /* @__PURE__ */ jsxRuntime.jsx("div", { style: { color: "#fff", fontWeight: 600, fontSize: "0.95rem", marginBottom: "0.25rem" }, children: cryptoFundingLoading ? "Opening Coinbase\u2026" : "Crypto Deposit" }),
6758
6893
  /* @__PURE__ */ jsxRuntime.jsx("div", { style: { color: "rgba(255,255,255,0.5)", fontSize: "0.8rem" }, children: "Transfer USDC from another exchange or wallet" })
6759
6894
  ] })
6760
6895
  ] }),
6761
6896
  /* @__PURE__ */ jsxRuntime.jsxs(ModalOptionCard, { onClick: handleFiatFund, disabled: fiatFundingLoading, children: [
6762
- /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: "1.5rem" }, children: "\u{1F3E6}" }),
6897
+ /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "22", height: "22", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round", style: { color: "rgba(255,255,255,0.6)", flexShrink: 0 }, children: [
6898
+ /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "3", y1: "22", x2: "21", y2: "22" }),
6899
+ /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "6", y1: "18", x2: "6", y2: "11" }),
6900
+ /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "10", y1: "18", x2: "10", y2: "11" }),
6901
+ /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "14", y1: "18", x2: "14", y2: "11" }),
6902
+ /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "18", y1: "18", x2: "18", y2: "11" }),
6903
+ /* @__PURE__ */ jsxRuntime.jsx("polygon", { points: "12 2 20 7 4 7" })
6904
+ ] }),
6763
6905
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { flex: 1 }, children: [
6764
6906
  /* @__PURE__ */ jsxRuntime.jsx("div", { style: { color: "#fff", fontWeight: 600, fontSize: "0.95rem", marginBottom: "0.25rem" }, children: fiatFundingLoading ? "Loading widget\u2026" : "Fiat Onramp" }),
6765
6907
  /* @__PURE__ */ jsxRuntime.jsx("div", { style: { color: "rgba(255,255,255,0.5)", fontSize: "0.8rem" }, children: "Buy USDC instantly with your card or local payment methods" })