@loafmarkets/ui 0.1.165 → 0.1.166
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 +36 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +36 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7972,6 +7972,7 @@ function GalleryMapSection({
|
|
|
7972
7972
|
const [showVideo, setShowVideo] = React5.useState(false);
|
|
7973
7973
|
const [autoPlaying, setAutoPlaying] = React5.useState(autoPlay);
|
|
7974
7974
|
const [showFullMap, setShowFullMap] = React5.useState(false);
|
|
7975
|
+
const [showFullVideo, setShowFullVideo] = React5.useState(false);
|
|
7975
7976
|
const resolvedMapUrl = mapUrl ?? (tokenName ? `/map/${tokenName}?embed=true&zoom=14&hideOthers=true` : "about:blank");
|
|
7976
7977
|
React5.useEffect(() => {
|
|
7977
7978
|
if (!autoPlaying || images.length <= 1) return;
|
|
@@ -8030,7 +8031,7 @@ function GalleryMapSection({
|
|
|
8030
8031
|
setCarouselIndex(actualIndex);
|
|
8031
8032
|
}, children: /* @__PURE__ */ jsxRuntime.jsx("img", { src: img.src, alt: img.title }) }, actualIndex);
|
|
8032
8033
|
}) }),
|
|
8033
|
-
|
|
8034
|
+
/* @__PURE__ */ jsxRuntime.jsx(ThumbDivider, {}),
|
|
8034
8035
|
/* @__PURE__ */ jsxRuntime.jsxs(FixedButtons, { children: [
|
|
8035
8036
|
floorplanIndex !== -1 && /* @__PURE__ */ jsxRuntime.jsxs(FixedBtn, { $active: isFloorplan, onClick: () => {
|
|
8036
8037
|
stopAutoPlay();
|
|
@@ -8044,9 +8045,13 @@ function GalleryMapSection({
|
|
|
8044
8045
|
] }),
|
|
8045
8046
|
"Floor Plan"
|
|
8046
8047
|
] }),
|
|
8047
|
-
videoUrl && /* @__PURE__ */ jsxRuntime.jsxs(FixedBtn, { $active:
|
|
8048
|
+
videoUrl && /* @__PURE__ */ jsxRuntime.jsxs(FixedBtn, { $active: false, onClick: () => setShowFullVideo(true), children: [
|
|
8048
8049
|
/* @__PURE__ */ jsxRuntime.jsx(bi.BiVideo, { size: 16 }),
|
|
8049
8050
|
" Video"
|
|
8051
|
+
] }),
|
|
8052
|
+
/* @__PURE__ */ jsxRuntime.jsxs(FixedBtn, { $active: false, onClick: () => setShowFullMap(true), children: [
|
|
8053
|
+
/* @__PURE__ */ jsxRuntime.jsx(bi.BiMap, { size: 16 }),
|
|
8054
|
+
" Map View"
|
|
8050
8055
|
] })
|
|
8051
8056
|
] })
|
|
8052
8057
|
] }),
|
|
@@ -8115,7 +8120,8 @@ function GalleryMapSection({
|
|
|
8115
8120
|
/* @__PURE__ */ jsxRuntime.jsx(SuburbDesc, { children: "Premium harbourside suburb on Sydney's Lower North Shore. Known for heritage homes, village atmosphere, and proximity to Taronga Zoo and Balmoral Beach." })
|
|
8116
8121
|
] })
|
|
8117
8122
|
] }),
|
|
8118
|
-
showFullMap && /* @__PURE__ */ jsxRuntime.jsx(FullMapPopup, { onClose: () => setShowFullMap(false) })
|
|
8123
|
+
showFullMap && /* @__PURE__ */ jsxRuntime.jsx(FullMapPopup, { onClose: () => setShowFullMap(false) }),
|
|
8124
|
+
showFullVideo && videoUrl && /* @__PURE__ */ jsxRuntime.jsx(FullVideoPopup, { videoUrl, onClose: () => setShowFullVideo(false) })
|
|
8119
8125
|
] });
|
|
8120
8126
|
}
|
|
8121
8127
|
function FullMapPopup({ onClose }) {
|
|
@@ -8171,6 +8177,25 @@ function FullMapPopup({ onClose }) {
|
|
|
8171
8177
|
) })
|
|
8172
8178
|
] }) });
|
|
8173
8179
|
}
|
|
8180
|
+
function FullVideoPopup({ videoUrl, onClose }) {
|
|
8181
|
+
React5.useEffect(() => {
|
|
8182
|
+
const handleEsc = (e) => {
|
|
8183
|
+
if (e.key === "Escape") onClose();
|
|
8184
|
+
};
|
|
8185
|
+
window.addEventListener("keydown", handleEsc);
|
|
8186
|
+
return () => window.removeEventListener("keydown", handleEsc);
|
|
8187
|
+
}, [onClose]);
|
|
8188
|
+
return /* @__PURE__ */ jsxRuntime.jsx(FullMapOverlay, { onClick: onClose, children: /* @__PURE__ */ jsxRuntime.jsxs(FullMapPanel, { onClick: (e) => e.stopPropagation(), style: { maxWidth: 1e3 }, children: [
|
|
8189
|
+
/* @__PURE__ */ jsxRuntime.jsxs(FullMapHeader, { children: [
|
|
8190
|
+
/* @__PURE__ */ jsxRuntime.jsxs(FullMapTitle, { children: [
|
|
8191
|
+
/* @__PURE__ */ jsxRuntime.jsx(bi.BiVideo, {}),
|
|
8192
|
+
" Property Video"
|
|
8193
|
+
] }),
|
|
8194
|
+
/* @__PURE__ */ jsxRuntime.jsx(FullMapClose, { onClick: onClose, "aria-label": "Close video", children: "\u2715" })
|
|
8195
|
+
] }),
|
|
8196
|
+
/* @__PURE__ */ jsxRuntime.jsx(FullVideoFrame, { children: /* @__PURE__ */ jsxRuntime.jsx("video", { autoPlay: true, loop: true, playsInline: true, controls: true, style: { width: "100%", height: "100%", objectFit: "contain", background: "#000", borderRadius: 8 }, children: /* @__PURE__ */ jsxRuntime.jsx("source", { src: videoUrl, type: "video/mp4" }) }) })
|
|
8197
|
+
] }) });
|
|
8198
|
+
}
|
|
8174
8199
|
var Row = styled9__default.default.div`
|
|
8175
8200
|
display: grid;
|
|
8176
8201
|
grid-template-columns: 2fr 1fr;
|
|
@@ -8393,6 +8418,14 @@ var FullMapFrame = styled9__default.default.div`
|
|
|
8393
8418
|
flex: 1;
|
|
8394
8419
|
min-height: 0;
|
|
8395
8420
|
`;
|
|
8421
|
+
var FullVideoFrame = styled9__default.default.div`
|
|
8422
|
+
flex: 1;
|
|
8423
|
+
min-height: 0;
|
|
8424
|
+
display: flex;
|
|
8425
|
+
align-items: center;
|
|
8426
|
+
justify-content: center;
|
|
8427
|
+
padding: 0 1rem 1rem;
|
|
8428
|
+
`;
|
|
8396
8429
|
var BedIcon = /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
8397
8430
|
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M2 4v16" }),
|
|
8398
8431
|
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M2 8h18a2 2 0 0 1 2 2v10" }),
|