@loafmarkets/ui 0.1.426 → 0.1.427
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 +18 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +18 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -10822,6 +10822,7 @@ function GalleryMapSection({
|
|
|
10822
10822
|
const [showVideo, setShowVideo] = React9.useState(false);
|
|
10823
10823
|
const [autoPlaying, setAutoPlaying] = React9.useState(autoPlay);
|
|
10824
10824
|
const [showFullMap, setShowFullMap] = React9.useState(false);
|
|
10825
|
+
const [fullMapMountedFor, setFullMapMountedFor] = React9.useState(null);
|
|
10825
10826
|
const [showFullVideo, setShowFullVideo] = React9.useState(false);
|
|
10826
10827
|
const isMobile = useMaxWidth(768);
|
|
10827
10828
|
const resolvedMapUrl = mapUrl ?? (tokenName ? `/map/${tokenName}?embed=true&zoom=14&hideOthers=true` : "about:blank");
|
|
@@ -10939,7 +10940,10 @@ function GalleryMapSection({
|
|
|
10939
10940
|
] }),
|
|
10940
10941
|
/* @__PURE__ */ jsxRuntime.jsxs(MapHeaderRight, { children: [
|
|
10941
10942
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: propertyLocation }),
|
|
10942
|
-
/* @__PURE__ */ jsxRuntime.jsxs("button", { type: "button", onClick: () =>
|
|
10943
|
+
/* @__PURE__ */ jsxRuntime.jsxs("button", { type: "button", onClick: () => {
|
|
10944
|
+
setFullMapMountedFor(resolvedMapUrl);
|
|
10945
|
+
setShowFullMap(true);
|
|
10946
|
+
}, children: [
|
|
10943
10947
|
/* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", style: { width: 14, height: 14 }, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M8 3H5a2 2 0 00-2 2v3m18 0V5a2 2 0 00-2-2h-3m0 18h3a2 2 0 002-2v-3M3 16v3a2 2 0 002 2h3" }) }),
|
|
10944
10948
|
"Full Screen"
|
|
10945
10949
|
] })
|
|
@@ -10988,7 +10992,7 @@ function GalleryMapSection({
|
|
|
10988
10992
|
] }),
|
|
10989
10993
|
/* @__PURE__ */ jsxRuntime.jsx(SuburbDesc, { children: "One of Sydney's most prestigious harbourside suburbs, consistently ranked among Australia's highest-value residential markets. Strong capital growth driven by limited supply, heritage conservation overlays, and international buyer demand." })
|
|
10990
10994
|
] }),
|
|
10991
|
-
|
|
10995
|
+
fullMapMountedFor === resolvedMapUrl && !hideMap && /* @__PURE__ */ jsxRuntime.jsx(FullMapPopup, { hidden: !showFullMap, onClose: () => setShowFullMap(false), mapUrl: resolvedMapUrl }),
|
|
10992
10996
|
showFullVideo && videoUrl && /* @__PURE__ */ jsxRuntime.jsxs(FullVideoOverlay, { onClick: () => setShowFullVideo(false), children: [
|
|
10993
10997
|
/* @__PURE__ */ jsxRuntime.jsx(FullVideoClose, { onClick: () => setShowFullVideo(false), "aria-label": "Close video", children: "\u2715" }),
|
|
10994
10998
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -11118,21 +11122,23 @@ function StackedGallery({ images, onPhotoClick }) {
|
|
|
11118
11122
|
}) })
|
|
11119
11123
|
] });
|
|
11120
11124
|
}
|
|
11121
|
-
function FullMapPopup({ onClose, mapUrl }) {
|
|
11125
|
+
function FullMapPopup({ onClose, mapUrl, hidden = false }) {
|
|
11122
11126
|
React9.useEffect(() => {
|
|
11127
|
+
if (hidden) return;
|
|
11123
11128
|
const handleEsc = (e) => {
|
|
11124
11129
|
if (e.key === "Escape") onClose();
|
|
11125
11130
|
};
|
|
11126
11131
|
window.addEventListener("keydown", handleEsc);
|
|
11127
11132
|
return () => window.removeEventListener("keydown", handleEsc);
|
|
11128
|
-
}, [onClose]);
|
|
11133
|
+
}, [onClose, hidden]);
|
|
11129
11134
|
React9.useEffect(() => {
|
|
11135
|
+
if (hidden) return;
|
|
11130
11136
|
const handleMessage = (e) => {
|
|
11131
11137
|
if (e.data === "loaf:close-embed") onClose();
|
|
11132
11138
|
};
|
|
11133
11139
|
window.addEventListener("message", handleMessage);
|
|
11134
11140
|
return () => window.removeEventListener("message", handleMessage);
|
|
11135
|
-
}, [onClose]);
|
|
11141
|
+
}, [onClose, hidden]);
|
|
11136
11142
|
const iframeRef = React9.useCallback((node) => {
|
|
11137
11143
|
if (!node) return;
|
|
11138
11144
|
const handleLoad = () => {
|
|
@@ -11148,7 +11154,7 @@ function FullMapPopup({ onClose, mapUrl }) {
|
|
|
11148
11154
|
};
|
|
11149
11155
|
node.addEventListener("load", handleLoad);
|
|
11150
11156
|
}, [onClose]);
|
|
11151
|
-
return /* @__PURE__ */ jsxRuntime.jsx(FullMapOverlay, { onClick: onClose, children: /* @__PURE__ */ jsxRuntime.jsxs(FullMapPanel, { onClick: (e) => e.stopPropagation(), children: [
|
|
11157
|
+
return /* @__PURE__ */ jsxRuntime.jsx(FullMapOverlay, { onClick: onClose, hidden, children: /* @__PURE__ */ jsxRuntime.jsxs(FullMapPanel, { onClick: (e) => e.stopPropagation(), children: [
|
|
11152
11158
|
/* @__PURE__ */ jsxRuntime.jsxs(FullMapHeader, { children: [
|
|
11153
11159
|
/* @__PURE__ */ jsxRuntime.jsxs(FullMapTitle, { children: [
|
|
11154
11160
|
/* @__PURE__ */ jsxRuntime.jsx(bi.BiMap, {}),
|
|
@@ -11444,6 +11450,12 @@ var FullMapOverlay = styled10__default.default.div`
|
|
|
11444
11450
|
align-items: center;
|
|
11445
11451
|
justify-content: center;
|
|
11446
11452
|
backdrop-filter: blur(4px);
|
|
11453
|
+
|
|
11454
|
+
/* Kept mounted between opens (see fullMapMountedFor); \`display: flex\` above would
|
|
11455
|
+
otherwise beat the UA's [hidden] rule. */
|
|
11456
|
+
&[hidden] {
|
|
11457
|
+
display: none;
|
|
11458
|
+
}
|
|
11447
11459
|
`;
|
|
11448
11460
|
var FullVideoOverlay = styled10__default.default.div`
|
|
11449
11461
|
position: fixed;
|