@loafmarkets/ui 0.1.151 → 0.1.152

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
@@ -7945,6 +7945,7 @@ function GalleryMapSection({
7945
7945
  const [carouselIndex, setCarouselIndex] = useState(0);
7946
7946
  const [showVideo, setShowVideo] = useState(false);
7947
7947
  const [autoPlaying, setAutoPlaying] = useState(autoPlay);
7948
+ const [showFullMap, setShowFullMap] = useState(false);
7948
7949
  const resolvedMapUrl = mapUrl ?? (tokenName ? `/map/${tokenName}?embed=true&zoom=14&hideOthers=true` : "about:blank");
7949
7950
  useEffect(() => {
7950
7951
  if (!autoPlaying || images.length <= 1) return;
@@ -8038,7 +8039,13 @@ function GalleryMapSection({
8038
8039
  /* @__PURE__ */ jsx(BiMap, {}),
8039
8040
  " Location"
8040
8041
  ] }),
8041
- /* @__PURE__ */ jsx("span", { children: propertyLocation })
8042
+ /* @__PURE__ */ jsxs(MapHeaderRight, { children: [
8043
+ /* @__PURE__ */ jsx("span", { children: propertyLocation }),
8044
+ /* @__PURE__ */ jsxs("button", { type: "button", onClick: () => setShowFullMap(true), children: [
8045
+ /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", style: { width: 14, height: 14 }, children: /* @__PURE__ */ 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" }) }),
8046
+ "Full Screen"
8047
+ ] })
8048
+ ] })
8042
8049
  ] }),
8043
8050
  /* @__PURE__ */ jsxs(MapFrame, { children: [
8044
8051
  /* @__PURE__ */ jsx(IframeShield, { onClick: (e) => e.currentTarget.style.display = "none" }),
@@ -8056,9 +8063,40 @@ function GalleryMapSection({
8056
8063
  }
8057
8064
  )
8058
8065
  ] })
8059
- ] })
8066
+ ] }),
8067
+ showFullMap && /* @__PURE__ */ jsx(FullMapPopup, { onClose: () => setShowFullMap(false) })
8060
8068
  ] });
8061
8069
  }
8070
+ function FullMapPopup({ onClose }) {
8071
+ useEffect(() => {
8072
+ const handleEsc = (e) => {
8073
+ if (e.key === "Escape") onClose();
8074
+ };
8075
+ window.addEventListener("keydown", handleEsc);
8076
+ return () => window.removeEventListener("keydown", handleEsc);
8077
+ }, [onClose]);
8078
+ return /* @__PURE__ */ jsx(FullMapOverlay, { onClick: onClose, children: /* @__PURE__ */ jsxs(FullMapPanel, { onClick: (e) => e.stopPropagation(), children: [
8079
+ /* @__PURE__ */ jsxs(FullMapHeader, { children: [
8080
+ /* @__PURE__ */ jsxs(FullMapTitle, { children: [
8081
+ /* @__PURE__ */ jsx(BiMap, {}),
8082
+ " Map View"
8083
+ ] }),
8084
+ /* @__PURE__ */ jsx(FullMapClose, { onClick: onClose, "aria-label": "Close map", children: "\u2715" })
8085
+ ] }),
8086
+ /* @__PURE__ */ jsx(FullMapFrame, { children: /* @__PURE__ */ jsx(
8087
+ "iframe",
8088
+ {
8089
+ src: "/map",
8090
+ width: "100%",
8091
+ height: "100%",
8092
+ style: { border: 0 },
8093
+ allow: "autoplay; fullscreen; web-share; xr-spatial-tracking;",
8094
+ title: "Full Screen Map",
8095
+ referrerPolicy: "unsafe-url"
8096
+ }
8097
+ ) })
8098
+ ] }) });
8099
+ }
8062
8100
  var Row = styled9.div`
8063
8101
  display: grid;
8064
8102
  grid-template-columns: 2fr 1fr;
@@ -8181,6 +8219,62 @@ var MapFrame = styled9.div`
8181
8219
  var IframeShield = styled9.div`
8182
8220
  position: absolute; inset: 0; z-index: 1; cursor: pointer;
8183
8221
  `;
8222
+ var MapHeaderRight = styled9.div`
8223
+ display: flex;
8224
+ align-items: center;
8225
+ gap: 0.75rem;
8226
+ `;
8227
+ var FullMapOverlay = styled9.div`
8228
+ position: fixed;
8229
+ inset: 0;
8230
+ background: rgba(0,0,0,0.75);
8231
+ z-index: 9999;
8232
+ display: flex;
8233
+ align-items: center;
8234
+ justify-content: center;
8235
+ backdrop-filter: blur(4px);
8236
+ `;
8237
+ var FullMapPanel = styled9.div`
8238
+ background: #111;
8239
+ border: 1px solid rgba(255,255,255,0.08);
8240
+ border-radius: 14px;
8241
+ width: 94%;
8242
+ height: 90vh;
8243
+ display: flex;
8244
+ flex-direction: column;
8245
+ overflow: hidden;
8246
+ `;
8247
+ var FullMapHeader = styled9.div`
8248
+ display: flex;
8249
+ align-items: center;
8250
+ justify-content: space-between;
8251
+ padding: 1rem 1.5rem;
8252
+ border-bottom: 1px solid rgba(255,255,255,0.06);
8253
+ flex-shrink: 0;
8254
+ `;
8255
+ var FullMapTitle = styled9.h3`
8256
+ margin: 0;
8257
+ font-size: 1.1rem;
8258
+ font-weight: 600;
8259
+ color: #fff;
8260
+ display: flex;
8261
+ align-items: center;
8262
+ gap: 0.5rem;
8263
+ `;
8264
+ var FullMapClose = styled9.button`
8265
+ background: none;
8266
+ border: none;
8267
+ color: rgba(255,255,255,0.4);
8268
+ font-size: 1.1rem;
8269
+ cursor: pointer;
8270
+ padding: 0.25rem;
8271
+ line-height: 1;
8272
+ &:hover { color: #fff; }
8273
+ `;
8274
+ var FullMapFrame = styled9.div`
8275
+ flex: 1;
8276
+ min-height: 0;
8277
+ `;
8184
8278
  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: [
8185
8279
  /* @__PURE__ */ jsx("path", { d: "M2 4v16" }),
8186
8280
  /* @__PURE__ */ jsx("path", { d: "M2 8h18a2 2 0 0 1 2 2v10" }),