@loafmarkets/ui 0.1.158 → 0.1.160
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 +40 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +40 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8126,6 +8126,28 @@ function FullMapPopup({ onClose }) {
|
|
|
8126
8126
|
window.addEventListener("keydown", handleEsc);
|
|
8127
8127
|
return () => window.removeEventListener("keydown", handleEsc);
|
|
8128
8128
|
}, [onClose]);
|
|
8129
|
+
React5.useEffect(() => {
|
|
8130
|
+
const handleMessage = (e) => {
|
|
8131
|
+
if (e.data === "loaf:close-embed") onClose();
|
|
8132
|
+
};
|
|
8133
|
+
window.addEventListener("message", handleMessage);
|
|
8134
|
+
return () => window.removeEventListener("message", handleMessage);
|
|
8135
|
+
}, [onClose]);
|
|
8136
|
+
const iframeRef = React5.useCallback((node) => {
|
|
8137
|
+
if (!node) return;
|
|
8138
|
+
const handleLoad = () => {
|
|
8139
|
+
try {
|
|
8140
|
+
const iframeDoc = node.contentDocument || node.contentWindow?.document;
|
|
8141
|
+
if (iframeDoc) {
|
|
8142
|
+
iframeDoc.addEventListener("keydown", (e) => {
|
|
8143
|
+
if (e.key === "Escape") onClose();
|
|
8144
|
+
});
|
|
8145
|
+
}
|
|
8146
|
+
} catch (_) {
|
|
8147
|
+
}
|
|
8148
|
+
};
|
|
8149
|
+
node.addEventListener("load", handleLoad);
|
|
8150
|
+
}, [onClose]);
|
|
8129
8151
|
return /* @__PURE__ */ jsxRuntime.jsx(FullMapOverlay, { onClick: onClose, children: /* @__PURE__ */ jsxRuntime.jsxs(FullMapPanel, { onClick: (e) => e.stopPropagation(), children: [
|
|
8130
8152
|
/* @__PURE__ */ jsxRuntime.jsxs(FullMapHeader, { children: [
|
|
8131
8153
|
/* @__PURE__ */ jsxRuntime.jsxs(FullMapTitle, { children: [
|
|
@@ -8137,7 +8159,8 @@ function FullMapPopup({ onClose }) {
|
|
|
8137
8159
|
/* @__PURE__ */ jsxRuntime.jsx(FullMapFrame, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8138
8160
|
"iframe",
|
|
8139
8161
|
{
|
|
8140
|
-
|
|
8162
|
+
ref: iframeRef,
|
|
8163
|
+
src: "/map?embed=true",
|
|
8141
8164
|
width: "100%",
|
|
8142
8165
|
height: "100%",
|
|
8143
8166
|
style: { border: 0 },
|
|
@@ -8535,8 +8558,13 @@ function PropertyOverview({
|
|
|
8535
8558
|
const loadingSkeleton = /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { width: 90, height: 18 });
|
|
8536
8559
|
const resolvedPropertyType = overviewData?.propertyType ?? propertyTypeLabel ?? null;
|
|
8537
8560
|
const galleryImages = images ?? [];
|
|
8561
|
+
const chainValue = /* @__PURE__ */ jsxRuntime.jsxs(ChainLogos, { children: [
|
|
8562
|
+
/* @__PURE__ */ jsxRuntime.jsx(ChainLogoImg, { src: "/Base-Symbol.png", alt: "Base" }),
|
|
8563
|
+
/* @__PURE__ */ jsxRuntime.jsx(ChainLogoImg, { src: "/Ethereum-Logo.png", alt: "Ethereum", style: { filter: "brightness(0) invert(1)" } }),
|
|
8564
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: chain })
|
|
8565
|
+
] });
|
|
8538
8566
|
const tokenDetailsItems = [
|
|
8539
|
-
{ label: "Chain", value:
|
|
8567
|
+
{ label: "Chain", value: chainValue },
|
|
8540
8568
|
{ label: "Contract Address", value: contractAddress ? truncateAddress(contractAddress) : "\u2014", mono: true, link: contractAddress ? `https://basescan.org/address/${contractAddress}` : void 0 },
|
|
8541
8569
|
{ label: "Token Ticker", value: ticker ?? "\u2014" },
|
|
8542
8570
|
{ label: "Total Tokens", value: isLoading && resolvedTokensIssued == null ? loadingSkeleton : resolvedTokensIssued?.toLocaleString() ?? "\u2014" },
|
|
@@ -9009,6 +9037,16 @@ var TokenDetailValue = styled9__default.default.span`
|
|
|
9009
9037
|
font-weight: 500;
|
|
9010
9038
|
font-family: ${(p) => p.$mono ? "'SF Mono', 'Fira Code', monospace" : "inherit"};
|
|
9011
9039
|
`;
|
|
9040
|
+
var ChainLogos = styled9__default.default.span`
|
|
9041
|
+
display: inline-flex;
|
|
9042
|
+
align-items: center;
|
|
9043
|
+
gap: 6px;
|
|
9044
|
+
`;
|
|
9045
|
+
var ChainLogoImg = styled9__default.default.img`
|
|
9046
|
+
height: 16px;
|
|
9047
|
+
width: auto;
|
|
9048
|
+
vertical-align: middle;
|
|
9049
|
+
`;
|
|
9012
9050
|
var StatsGrid = styled9__default.default.div`
|
|
9013
9051
|
display: grid;
|
|
9014
9052
|
grid-template-columns: 1fr 1fr;
|