@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.mjs CHANGED
@@ -7946,6 +7946,7 @@ function GalleryMapSection({
7946
7946
  const [showVideo, setShowVideo] = useState(false);
7947
7947
  const [autoPlaying, setAutoPlaying] = useState(autoPlay);
7948
7948
  const [showFullMap, setShowFullMap] = useState(false);
7949
+ const [showFullVideo, setShowFullVideo] = useState(false);
7949
7950
  const resolvedMapUrl = mapUrl ?? (tokenName ? `/map/${tokenName}?embed=true&zoom=14&hideOthers=true` : "about:blank");
7950
7951
  useEffect(() => {
7951
7952
  if (!autoPlaying || images.length <= 1) return;
@@ -8004,7 +8005,7 @@ function GalleryMapSection({
8004
8005
  setCarouselIndex(actualIndex);
8005
8006
  }, children: /* @__PURE__ */ jsx("img", { src: img.src, alt: img.title }) }, actualIndex);
8006
8007
  }) }),
8007
- (floorplanIndex !== -1 || videoUrl) && /* @__PURE__ */ jsx(ThumbDivider, {}),
8008
+ /* @__PURE__ */ jsx(ThumbDivider, {}),
8008
8009
  /* @__PURE__ */ jsxs(FixedButtons, { children: [
8009
8010
  floorplanIndex !== -1 && /* @__PURE__ */ jsxs(FixedBtn, { $active: isFloorplan, onClick: () => {
8010
8011
  stopAutoPlay();
@@ -8018,9 +8019,13 @@ function GalleryMapSection({
8018
8019
  ] }),
8019
8020
  "Floor Plan"
8020
8021
  ] }),
8021
- videoUrl && /* @__PURE__ */ jsxs(FixedBtn, { $active: showVideo, onClick: () => setShowVideo((p) => !p), children: [
8022
+ videoUrl && /* @__PURE__ */ jsxs(FixedBtn, { $active: false, onClick: () => setShowFullVideo(true), children: [
8022
8023
  /* @__PURE__ */ jsx(BiVideo, { size: 16 }),
8023
8024
  " Video"
8025
+ ] }),
8026
+ /* @__PURE__ */ jsxs(FixedBtn, { $active: false, onClick: () => setShowFullMap(true), children: [
8027
+ /* @__PURE__ */ jsx(BiMap, { size: 16 }),
8028
+ " Map View"
8024
8029
  ] })
8025
8030
  ] })
8026
8031
  ] }),
@@ -8089,7 +8094,8 @@ function GalleryMapSection({
8089
8094
  /* @__PURE__ */ 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." })
8090
8095
  ] })
8091
8096
  ] }),
8092
- showFullMap && /* @__PURE__ */ jsx(FullMapPopup, { onClose: () => setShowFullMap(false) })
8097
+ showFullMap && /* @__PURE__ */ jsx(FullMapPopup, { onClose: () => setShowFullMap(false) }),
8098
+ showFullVideo && videoUrl && /* @__PURE__ */ jsx(FullVideoPopup, { videoUrl, onClose: () => setShowFullVideo(false) })
8093
8099
  ] });
8094
8100
  }
8095
8101
  function FullMapPopup({ onClose }) {
@@ -8145,6 +8151,25 @@ function FullMapPopup({ onClose }) {
8145
8151
  ) })
8146
8152
  ] }) });
8147
8153
  }
8154
+ function FullVideoPopup({ videoUrl, onClose }) {
8155
+ useEffect(() => {
8156
+ const handleEsc = (e) => {
8157
+ if (e.key === "Escape") onClose();
8158
+ };
8159
+ window.addEventListener("keydown", handleEsc);
8160
+ return () => window.removeEventListener("keydown", handleEsc);
8161
+ }, [onClose]);
8162
+ return /* @__PURE__ */ jsx(FullMapOverlay, { onClick: onClose, children: /* @__PURE__ */ jsxs(FullMapPanel, { onClick: (e) => e.stopPropagation(), style: { maxWidth: 1e3 }, children: [
8163
+ /* @__PURE__ */ jsxs(FullMapHeader, { children: [
8164
+ /* @__PURE__ */ jsxs(FullMapTitle, { children: [
8165
+ /* @__PURE__ */ jsx(BiVideo, {}),
8166
+ " Property Video"
8167
+ ] }),
8168
+ /* @__PURE__ */ jsx(FullMapClose, { onClick: onClose, "aria-label": "Close video", children: "\u2715" })
8169
+ ] }),
8170
+ /* @__PURE__ */ jsx(FullVideoFrame, { children: /* @__PURE__ */ jsx("video", { autoPlay: true, loop: true, playsInline: true, controls: true, style: { width: "100%", height: "100%", objectFit: "contain", background: "#000", borderRadius: 8 }, children: /* @__PURE__ */ jsx("source", { src: videoUrl, type: "video/mp4" }) }) })
8171
+ ] }) });
8172
+ }
8148
8173
  var Row = styled9.div`
8149
8174
  display: grid;
8150
8175
  grid-template-columns: 2fr 1fr;
@@ -8367,6 +8392,14 @@ var FullMapFrame = styled9.div`
8367
8392
  flex: 1;
8368
8393
  min-height: 0;
8369
8394
  `;
8395
+ var FullVideoFrame = styled9.div`
8396
+ flex: 1;
8397
+ min-height: 0;
8398
+ display: flex;
8399
+ align-items: center;
8400
+ justify-content: center;
8401
+ padding: 0 1rem 1rem;
8402
+ `;
8370
8403
  var BedIcon = /* @__PURE__ */ jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", children: [
8371
8404
  /* @__PURE__ */ jsx("path", { d: "M2 4v16" }),
8372
8405
  /* @__PURE__ */ jsx("path", { d: "M2 8h18a2 2 0 0 1 2 2v10" }),