@mappedin/viewer 0.15.4-101c7ad.0 → 0.15.4

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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.15.4](https://github.com/MappedIn/viewer/compare/viewer-v0.15.3...viewer-v0.15.4) (2024-02-26)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **MKR-969:** make sure full screen images are contained on mobile ([#138](https://github.com/MappedIn/viewer/issues/138)) ([863e99e](https://github.com/MappedIn/viewer/commit/863e99ea045cc2cea35750907c5ed7b33fb0a575))
9
+
3
10
  ## [0.15.3](https://github.com/MappedIn/viewer/compare/viewer-v0.15.2...viewer-v0.15.3) (2024-02-26)
4
11
 
5
12
 
package/dist/index.js CHANGED
@@ -83419,7 +83419,6 @@ const n8e = Si.div`
83419
83419
  align-items: center;
83420
83420
  width: 100%;
83421
83421
  height: 100%;
83422
- background-color: #eeeeee;
83423
83422
  overflow: hidden;
83424
83423
 
83425
83424
  img {
@@ -83467,7 +83466,9 @@ const n8e = Si.div`
83467
83466
  `, h8e = Si(N1)`
83468
83467
  padding: 16px;
83469
83468
  background-color: transparent;
83470
- `, vat = Si.div.withConfig({ shouldForwardProp: (i) => !["visible"].includes(i) })`
83469
+ `, vat = Si.div.withConfig({
83470
+ shouldForwardProp: (i) => !["visible", "isMobile"].includes(i)
83471
+ })`
83471
83472
  display: flex;
83472
83473
  flex-direction: column;
83473
83474
  justify-content: center;
@@ -83478,7 +83479,7 @@ const n8e = Si.div`
83478
83479
  width: 100%;
83479
83480
  height: 100%;
83480
83481
  opacity: ${(i) => i.visible ? 1 : 0};
83481
- background-color: ${(i) => `#000000${Mm(i.visible ? 0.85 : 0)}`};
83482
+ background-color: ${`#000000${Mm(0.85)}`};
83482
83483
  pointer-events: ${(i) => i.visible ? "all" : "none"};
83483
83484
  transition: opacity ${Zn}ms ease-in-out;
83484
83485
 
@@ -83493,6 +83494,10 @@ const n8e = Si.div`
83493
83494
  position: absolute;
83494
83495
  bottom: 48px;
83495
83496
  }
83497
+
83498
+ img {
83499
+ object-fit: contain;
83500
+ }
83496
83501
  `, _at = ({ imageURLs: i }) => {
83497
83502
  const [e, t] = It.useState(0), n = vr(), [r, a] = It.useState(!1), { fullscreenRoot: o, isMobile: s } = pa(), l = o != null, u = () => {
83498
83503
  t((e + 1) % i.length);
@@ -83508,7 +83513,6 @@ const n8e = Si.div`
83508
83513
  },
83509
83514
  style: {
83510
83515
  display: "block",
83511
- objectFit: "cover",
83512
83516
  borderRadius: "8px 8px 0 0",
83513
83517
  cursor: l ? "pointer" : "auto"
83514
83518
  },
@@ -83517,30 +83521,14 @@ const n8e = Si.div`
83517
83521
  ),
83518
83522
  l ? eA.createPortal(
83519
83523
  /* @__PURE__ */ Ne.jsxs(vat, { visible: r, children: [
83520
- /* @__PURE__ */ Ne.jsx(
83521
- h8e,
83522
- {
83523
- onClick: () => {
83524
- a(!1);
83525
- },
83526
- children: /* @__PURE__ */ Ne.jsx(
83527
- J1,
83528
- {
83529
- icon: "close-16x16",
83530
- width: 24,
83531
- height: 24,
83532
- color: n.colors.background.primary
83533
- }
83534
- )
83535
- }
83536
- ),
83537
83524
  /* @__PURE__ */ Ne.jsx(
83538
83525
  k$,
83539
83526
  {
83540
83527
  src: i[e],
83541
83528
  style: {
83542
83529
  maxWidth: s ? "100%" : "80%",
83543
- maxHeight: s ? "100%" : "80%"
83530
+ maxHeight: "80%"
83531
+ // Always leave room for the close button
83544
83532
  }
83545
83533
  }
83546
83534
  ),
@@ -83562,7 +83550,24 @@ const n8e = Si.div`
83562
83550
  onPrevious: u
83563
83551
  }
83564
83552
  )
83565
- ] }) : null
83553
+ ] }) : null,
83554
+ /* @__PURE__ */ Ne.jsx(
83555
+ h8e,
83556
+ {
83557
+ onClick: () => {
83558
+ a(!1);
83559
+ },
83560
+ children: /* @__PURE__ */ Ne.jsx(
83561
+ J1,
83562
+ {
83563
+ icon: "close-16x16",
83564
+ width: 24,
83565
+ height: 24,
83566
+ color: n.colors.background.primary
83567
+ }
83568
+ )
83569
+ }
83570
+ )
83566
83571
  ] }),
83567
83572
  o
83568
83573
  ) : null,
@@ -84177,7 +84182,7 @@ const Vat = Si.div`
84177
84182
  /* @__PURE__ */ Ne.jsx(xee, { children: /* @__PURE__ */ Ne.jsx(BQ, { ...e }) })
84178
84183
  ), t;
84179
84184
  }, g8e = (i, e = {}) => {
84180
- const t = "phc_vZrwt3z6JmdPnErvTgZoazTAGlCRMiz6c2NqWtBt8qz", n = "https://ph-api.mappedin.com", r = _O();
84185
+ const t = "phc_sRrjUwz9zicl4GeXtSnwcuKMr50SB76ma6NVi6zlPou", n = "https://ph-api.mappedin.com", r = _O();
84181
84186
  if (!r.__loaded && t != null && n != null) {
84182
84187
  r.init(t, {
84183
84188
  api_host: n,
@@ -84192,7 +84197,7 @@ const Vat = Si.div`
84192
84197
  }
84193
84198
  }, d8e = () => {
84194
84199
  const i = document.createElement("meta");
84195
- i.name = "app-version", i.content = "0.15.3", document.head.appendChild(i);
84200
+ i.name = "app-version", i.content = "0.15.4", document.head.appendChild(i);
84196
84201
  let e = document.querySelector("meta[name=viewport]");
84197
84202
  e == null && (e = document.createElement("meta"), e.name = "viewport", document.head.appendChild(e)), e.content = "width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no";
84198
84203
  }, p8e = (i) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mappedin/viewer",
3
- "version": "0.15.4-101c7ad.0",
3
+ "version": "0.15.4",
4
4
  "type": "module",
5
5
  "browser": "./dist/index.js",
6
6
  "license": "UNLICENSED",