@mappedin/viewer 0.4.2 → 0.4.3-fca2cfa.0

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.
@@ -1,4 +1,4 @@
1
- import { c as Zn, r as f } from "./index-d713da7a.js";
1
+ import { c as Zn, r as f } from "./index-38ccf2bd.js";
2
2
  Zn();
3
3
  var dn = {}, Nn = f(function(t, n, r, e, i) {
4
4
  var a = new Worker(dn[n] || (dn[n] = URL.createObjectURL(new Blob([t + ';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'], { type: "text/javascript" }))));
@@ -9068,9 +9068,18 @@ const Ume = Bme`
9068
9068
  body {
9069
9069
  margin: 0;
9070
9070
  height: 100%;
9071
+
9072
+ // Disable press-and-hold selection on mobile
9073
+ -webkit-touch-callout:none;
9074
+ -webkit-user-select:none;
9075
+ -khtml-user-select:none;
9076
+ -moz-user-select:none;
9077
+ -ms-user-select:none;
9078
+ user-select:none;
9079
+ -webkit-tap-highlight-color:rgba(0,0,0,0);
9071
9080
  }
9072
9081
 
9073
- div#viewer-app-root {
9082
+ div.viewer-app-root {
9074
9083
  height: 100%;
9075
9084
  width: 100%;
9076
9085
  }
@@ -49286,7 +49295,7 @@ async function Nne(e) {
49286
49295
  throw new Error("Error parsing data! Unzipping failed.");
49287
49296
  if (e[Symbol.toStringTag] !== "Uint8Array")
49288
49297
  throw new Error("Unexpected file type! Unzipping failed.");
49289
- let r = (await import("./browser-JKMZVTUT-079f46dc.js")).unzipSync(e);
49298
+ let r = (await import("./browser-JKMZVTUT-77fbc82a.js")).unzipSync(e);
49290
49299
  if (!One(r))
49291
49300
  throw new Error("MVF is missing some expect static files. Unzipping failed.");
49292
49301
  let i = { "connection.json": r["connection.json"], "manifest.geojson": r["manifest.geojson"], "node.geojson": r["node.geojson"], "map.geojson": r["map.geojson"], "mapstack.geojson": r["mapstack.geojson"], "styles.json": r["styles.json"], space: {}, obstruction: {}, entrance: {} }, o = Object.keys(r);
@@ -57378,7 +57387,7 @@ var r4e = !1, Gie = class {
57378
57387
  async load() {
57379
57388
  try {
57380
57389
  let e = await this.fetchToken(), { access_token: t } = await e.json();
57381
- this.module = await import("./outdoor-context-QN5FBZ37-ea2d7820.js");
57390
+ this.module = await import("./outdoor-context-QN5FBZ37-1981265a.js");
57382
57391
  let { Map: n, Marker: r } = this.module.default, i = document.createElement("div");
57383
57392
  Object.assign(i.style, { position: "absolute", top: "0px", left: "0px", width: "100%", height: "100%", pointerEvents: "none" }), this.core.container.appendChild(i);
57384
57393
  let o = this.core.referenceMap.georeference[0].target.x, l = this.core.referenceMap.georeference[0].target.y, u = this.core.referenceMap.georeference[2].target.x, c = this.core.referenceMap.georeference[2].target.y, p = new Rn(o, l), f = new Rn(u, c), g = p.midpointTo(f), v = -Uf.radToDeg(this.core.controls.getRotation() + this.core.referenceMap.getNorth()), _ = Uf.radToDeg(this.core.controls.getTilt()), S = this.core.controls.getZoomLevel(), P = { canvas: this.core.renderer.domElement(), canvasContainer: i, container: this.core.container, style: this.url, center: [g.lon, g.lat], zoom: S, bearing: v, pitch: _, transformRequest: (I) => ({ url: I, headers: { "x-mappedin-tiles-key": t } }) };
@@ -64245,8 +64254,8 @@ class cCe {
64245
64254
  this.container = t;
64246
64255
  const n = {
64247
64256
  aoEnabled: !0,
64248
- aoQuality: "medium",
64249
- aoResolution: "half",
64257
+ aoQuality: this.rootStore.isAppMobile ? "medium" : "performance",
64258
+ aoResolution: this.rootStore.isAppMobile ? "half" : "full",
64250
64259
  multiBufferRendering: !0,
64251
64260
  outdoorView: {
64252
64261
  enabled: this.rootStore.uiStore.theme.map.streetMapVisible
@@ -67201,7 +67210,7 @@ class j6e {
67201
67210
  this.rootStore = t;
67202
67211
  }
67203
67212
  init() {
67204
- const t = "phc_sRrjUwz9zicl4GeXtSnwcuKMr50SB76ma6NVi6zlPou", n = "https://ph-api.mappedin.com";
67213
+ const t = "phc_vZrwt3z6JmdPnErvTgZoazTAGlCRMiz6c2NqWtBt8qz", n = "https://ph-api.mappedin.com";
67205
67214
  U6e.init(t, { api_host: n });
67206
67215
  }
67207
67216
  }
@@ -67835,7 +67844,14 @@ const dTe = ({
67835
67844
  t.cleanup();
67836
67845
  };
67837
67846
  }, [n]), /* @__PURE__ */ He.jsxs(He.Fragment, { children: [
67838
- /* @__PURE__ */ He.jsx("div", { id: "maker-map", ref: r, style: { height: "100%", width: "100%", position: "absolute" } }),
67847
+ /* @__PURE__ */ He.jsx(
67848
+ "div",
67849
+ {
67850
+ id: "maker-map",
67851
+ ref: r,
67852
+ style: { height: "100%", width: "100%", position: "absolute", userSelect: "none" }
67853
+ }
67854
+ ),
67839
67855
  /* @__PURE__ */ He.jsx("div", { style: { height: "100%", width: "100%", position: "absolute", pointerEvents: "none" }, children: /* @__PURE__ */ He.jsx(
67840
67856
  gTe,
67841
67857
  {
@@ -96269,7 +96285,7 @@ const R9e = Jr.div`
96269
96285
  let t = e;
96270
96286
  if (t == null && (Tw.warn("options.root was not specified. Defaulting to #viewer-app-root."), t = document.getElementById("viewer-app-root")), t == null)
96271
96287
  throw new Error("Could not find #viewer-app-root. Please add it to your HTML file.");
96272
- return t;
96288
+ return t.classList.contains("viewer-app-root") || t.classList.add("viewer-app-root"), t;
96273
96289
  }, LRe = (e) => {
96274
96290
  const t = Mpe(e.root);
96275
96291
  Spe(), Ub.createRoot(t).render(/* @__PURE__ */ He.jsx(Epe, { ...e }));