@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.mjs CHANGED
@@ -8100,6 +8100,28 @@ function FullMapPopup({ onClose }) {
8100
8100
  window.addEventListener("keydown", handleEsc);
8101
8101
  return () => window.removeEventListener("keydown", handleEsc);
8102
8102
  }, [onClose]);
8103
+ useEffect(() => {
8104
+ const handleMessage = (e) => {
8105
+ if (e.data === "loaf:close-embed") onClose();
8106
+ };
8107
+ window.addEventListener("message", handleMessage);
8108
+ return () => window.removeEventListener("message", handleMessage);
8109
+ }, [onClose]);
8110
+ const iframeRef = useCallback((node) => {
8111
+ if (!node) return;
8112
+ const handleLoad = () => {
8113
+ try {
8114
+ const iframeDoc = node.contentDocument || node.contentWindow?.document;
8115
+ if (iframeDoc) {
8116
+ iframeDoc.addEventListener("keydown", (e) => {
8117
+ if (e.key === "Escape") onClose();
8118
+ });
8119
+ }
8120
+ } catch (_) {
8121
+ }
8122
+ };
8123
+ node.addEventListener("load", handleLoad);
8124
+ }, [onClose]);
8103
8125
  return /* @__PURE__ */ jsx(FullMapOverlay, { onClick: onClose, children: /* @__PURE__ */ jsxs(FullMapPanel, { onClick: (e) => e.stopPropagation(), children: [
8104
8126
  /* @__PURE__ */ jsxs(FullMapHeader, { children: [
8105
8127
  /* @__PURE__ */ jsxs(FullMapTitle, { children: [
@@ -8111,7 +8133,8 @@ function FullMapPopup({ onClose }) {
8111
8133
  /* @__PURE__ */ jsx(FullMapFrame, { children: /* @__PURE__ */ jsx(
8112
8134
  "iframe",
8113
8135
  {
8114
- src: "/map",
8136
+ ref: iframeRef,
8137
+ src: "/map?embed=true",
8115
8138
  width: "100%",
8116
8139
  height: "100%",
8117
8140
  style: { border: 0 },
@@ -8509,8 +8532,13 @@ function PropertyOverview({
8509
8532
  const loadingSkeleton = /* @__PURE__ */ jsx(Skeleton, { width: 90, height: 18 });
8510
8533
  const resolvedPropertyType = overviewData?.propertyType ?? propertyTypeLabel ?? null;
8511
8534
  const galleryImages = images ?? [];
8535
+ const chainValue = /* @__PURE__ */ jsxs(ChainLogos, { children: [
8536
+ /* @__PURE__ */ jsx(ChainLogoImg, { src: "/Base-Symbol.png", alt: "Base" }),
8537
+ /* @__PURE__ */ jsx(ChainLogoImg, { src: "/Ethereum-Logo.png", alt: "Ethereum", style: { filter: "brightness(0) invert(1)" } }),
8538
+ /* @__PURE__ */ jsx("span", { children: chain })
8539
+ ] });
8512
8540
  const tokenDetailsItems = [
8513
- { label: "Chain", value: chain },
8541
+ { label: "Chain", value: chainValue },
8514
8542
  { label: "Contract Address", value: contractAddress ? truncateAddress(contractAddress) : "\u2014", mono: true, link: contractAddress ? `https://basescan.org/address/${contractAddress}` : void 0 },
8515
8543
  { label: "Token Ticker", value: ticker ?? "\u2014" },
8516
8544
  { label: "Total Tokens", value: isLoading && resolvedTokensIssued == null ? loadingSkeleton : resolvedTokensIssued?.toLocaleString() ?? "\u2014" },
@@ -8983,6 +9011,16 @@ var TokenDetailValue = styled9.span`
8983
9011
  font-weight: 500;
8984
9012
  font-family: ${(p) => p.$mono ? "'SF Mono', 'Fira Code', monospace" : "inherit"};
8985
9013
  `;
9014
+ var ChainLogos = styled9.span`
9015
+ display: inline-flex;
9016
+ align-items: center;
9017
+ gap: 6px;
9018
+ `;
9019
+ var ChainLogoImg = styled9.img`
9020
+ height: 16px;
9021
+ width: auto;
9022
+ vertical-align: middle;
9023
+ `;
8986
9024
  var StatsGrid = styled9.div`
8987
9025
  display: grid;
8988
9026
  grid-template-columns: 1fr 1fr;