@mappedin/viewer 0.46.1 → 0.46.2-ad5d1fb.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.
package/dist/index.js
CHANGED
|
@@ -17561,7 +17561,7 @@ const Rfe = function() {
|
|
|
17561
17561
|
const e = uA(), [r, i] = t;
|
|
17562
17562
|
e.capture(r, i);
|
|
17563
17563
|
}, Nfe = (t = {}) => {
|
|
17564
|
-
const e = "
|
|
17564
|
+
const e = "phc_vZrwt3z6JmdPnErvTgZoazTAGlCRMiz6c2NqWtBt8qz", r = "https://ph-api.mappedin.com";
|
|
17565
17565
|
XPe(t.captureEnabled ?? !0);
|
|
17566
17566
|
const i = uA();
|
|
17567
17567
|
if (!i.__loaded && e != null && r != null) {
|
|
@@ -97194,7 +97194,7 @@ const Hxt = (t, e) => (K9 != null || (fC == null && globalThis.OffscreenCanvas !
|
|
|
97194
97194
|
const i = {
|
|
97195
97195
|
fit: "fit",
|
|
97196
97196
|
...r
|
|
97197
|
-
}, n = "https://image-proxy.mappedin.
|
|
97197
|
+
}, n = "https://image-proxy-staging.mappedin.net", s = Qxt(e, i.fit), o = encodeURIComponent(t);
|
|
97198
97198
|
return `${n}/resize:${i.fit}:${s}:${s}:0/format:webp/max_bytes:5000000/plain/${o}`.replaceAll(/\/+/g, "/").replace("https:/", "https://").replace("http:/", "http://");
|
|
97199
97199
|
}, Gxt = (t, e) => {
|
|
97200
97200
|
if (e == null || e === "")
|
|
@@ -98144,7 +98144,7 @@ class obt {
|
|
|
98144
98144
|
}
|
|
98145
98145
|
updatePathColorWithFloor(e) {
|
|
98146
98146
|
var s, o;
|
|
98147
|
-
if (this.
|
|
98147
|
+
if (this.rootStore.isMultiFloorViewEnabled || this.mapStore.mapView == null || Object.keys(this.pathSegmentsByElevation).length < 1)
|
|
98148
98148
|
return;
|
|
98149
98149
|
const r = e === this.rootStore.outdoorFloor ? 0 : e.elevation, i = this.pathSegmentsByElevation[r];
|
|
98150
98150
|
if (i == null || i.length < 1)
|
|
@@ -98209,7 +98209,7 @@ class obt {
|
|
|
98209
98209
|
return;
|
|
98210
98210
|
let e;
|
|
98211
98211
|
const r = (n = this.directions.coordinates[0]) == null ? void 0 : n.floorId;
|
|
98212
|
-
r != null && (e = this.rootStore.data.getById("floor", r)), e != null && !this.
|
|
98212
|
+
r != null && (e = this.rootStore.data.getById("floor", r)), e != null && !this.rootStore.isMultiFloorViewEnabled && this.rootStore.setCurrentFloor(e);
|
|
98213
98213
|
let i = this.directions;
|
|
98214
98214
|
if (this.isFirstStepApproximate) {
|
|
98215
98215
|
const s = [...i.coordinates].slice(1);
|
|
@@ -100648,7 +100648,7 @@ class DEt {
|
|
|
100648
100648
|
});
|
|
100649
100649
|
}
|
|
100650
100650
|
updateCameraElevation() {
|
|
100651
|
-
if (this.mapStore.mapView != null && this.rootStore.currentFloor != null && this.
|
|
100651
|
+
if (this.mapStore.mapView != null && this.rootStore.currentFloor != null && this.rootStore.isMultiFloorViewEnabled)
|
|
100652
100652
|
return this.mapStore.mapView.Camera.animateElevation(
|
|
100653
100653
|
this.rootStore.currentFloor.elevation * X_e,
|
|
100654
100654
|
rp
|
|
@@ -100687,7 +100687,7 @@ class DEt {
|
|
|
100687
100687
|
}
|
|
100688
100688
|
break;
|
|
100689
100689
|
case si.DIRECTIONS: {
|
|
100690
|
-
if (this.rootStore.currentFloor == null || this.
|
|
100690
|
+
if (this.rootStore.currentFloor == null || this.rootStore.isMultiFloorViewEnabled)
|
|
100691
100691
|
return;
|
|
100692
100692
|
if (this.mapStore.directions.directions == null) {
|
|
100693
100693
|
i();
|
|
@@ -101128,7 +101128,7 @@ class PEt {
|
|
|
101128
101128
|
i.x,
|
|
101129
101129
|
i.y,
|
|
101130
101130
|
// Multi-floor view can determine which floor the pin is on
|
|
101131
|
-
this.
|
|
101131
|
+
this.rootStore.isMultiFloorViewEnabled ? void 0 : e
|
|
101132
101132
|
);
|
|
101133
101133
|
if (n == null) {
|
|
101134
101134
|
Ar.error("Failed to create coordinate from screen coordinate", i);
|
|
@@ -101138,7 +101138,7 @@ class PEt {
|
|
|
101138
101138
|
const s = this.rootStore.isCampus ? this.rootStore.outdoorFloor : this.rootStore.floorClosestToGroundLevel;
|
|
101139
101139
|
s != null && (n = GG(n, s));
|
|
101140
101140
|
}
|
|
101141
|
-
if (!this.
|
|
101141
|
+
if (!this.rootStore.isMultiFloorViewEnabled) {
|
|
101142
101142
|
const s = this.rootStore.getFloorBeneathCoordinate(n);
|
|
101143
101143
|
s != null && (n = GG(n, s));
|
|
101144
101144
|
}
|
|
@@ -101966,15 +101966,12 @@ class qEt {
|
|
|
101966
101966
|
get interactionMode() {
|
|
101967
101967
|
return this.rootStore.state === si.DIRECTIONS && this.rootStore.departureMode === Yr.DROPPED_PIN && this.rootStore.departures == null || this.directions.directions != null ? iy.CAMERA_ONLY : iy.DEFAULT;
|
|
101968
101968
|
}
|
|
101969
|
-
get multiFloorViewEnabled() {
|
|
101970
|
-
return !!this.rootStore.featureFlagStore.flags[_1.MULTI_FLOOR_VIEW].variant;
|
|
101971
|
-
}
|
|
101972
101969
|
get initialized() {
|
|
101973
101970
|
return this.mapView != null && this.labels.initialized && (this.outdoorViewLoaded || this.outdoorViewTimedOut);
|
|
101974
101971
|
}
|
|
101975
101972
|
async init(e) {
|
|
101976
101973
|
this.container = e;
|
|
101977
|
-
const r = this.rootStore.startupOptions.outdoorMapsKey ?? "
|
|
101974
|
+
const r = this.rootStore.startupOptions.outdoorMapsKey ?? "f8fd42d9e1c2751f", i = {
|
|
101978
101975
|
auto: !1,
|
|
101979
101976
|
// In campus mode, we need to load the outdoors first
|
|
101980
101977
|
initialFloor: this.rootStore.isCampus ? this.rootStore.defaultFloor : this.rootStore.currentFloor,
|
|
@@ -101982,7 +101979,7 @@ class qEt {
|
|
|
101982
101979
|
wallTopColor: this.rootStore.uiStore.theme.colors.map.geometry.wallTops,
|
|
101983
101980
|
multiFloorView: {
|
|
101984
101981
|
floorHeight: X_e,
|
|
101985
|
-
enabled: this.
|
|
101982
|
+
enabled: this.rootStore.isMultiFloorViewEnabled,
|
|
101986
101983
|
// We want to manually do this because we have some camera animation scheduling logic
|
|
101987
101984
|
updateCameraElevationOnFloorChange: !1
|
|
101988
101985
|
}
|
|
@@ -101999,13 +101996,12 @@ class qEt {
|
|
|
101999
101996
|
Ar.log("Showing 3d map...", e);
|
|
102000
101997
|
const s = await VCt(e, this.rootStore.data, i);
|
|
102001
101998
|
return this.__mv = s, Ar.log("Initialized 3D map in", performance.now() - n, "ms"), this.rootStore.isCampus && zl(() => {
|
|
102002
|
-
const o = this.rootStore.mapId ? this.rootStore.featureFlagStore.flags[_1.DYNAMIC_FOCUS_BUILDING_CHANGE_MODE].payload[this.rootStore.mapId] : "default-floor";
|
|
102003
101999
|
this.dynamicFocus = new WEt(s, {
|
|
102004
102000
|
indoorZoomThreshold: this.camera.zoomBreakpoints.facadesIndoor,
|
|
102005
102001
|
outdoorZoomThreshold: this.camera.zoomBreakpoints.facadesOutdoor,
|
|
102006
102002
|
autoFocus: !0,
|
|
102007
102003
|
setFloorOnFocus: !0,
|
|
102008
|
-
mode:
|
|
102004
|
+
mode: this.rootStore.dynamicFocusBuildingChangeMode,
|
|
102009
102005
|
autoAdjustFacadeHeights: !0
|
|
102010
102006
|
}), Ar.log(
|
|
102011
102007
|
`Initialized Dynamic Focus with building change mode "${this.dynamicFocus.getState().mode}"`
|
|
@@ -107732,6 +107728,13 @@ class Zle {
|
|
|
107732
107728
|
get isBlueDotEnabled() {
|
|
107733
107729
|
return this.featureFlagStore.flags[_1.BLUE_DOT].variant;
|
|
107734
107730
|
}
|
|
107731
|
+
get isMultiFloorViewEnabled() {
|
|
107732
|
+
return !!(this.routerStore.params.multiFloorView === "true" || this.featureFlagStore.flags[_1.MULTI_FLOOR_VIEW].variant);
|
|
107733
|
+
}
|
|
107734
|
+
get dynamicFocusBuildingChangeMode() {
|
|
107735
|
+
let e;
|
|
107736
|
+
return this.routerStore.params.dynamicFocusMode != null && typeof this.routerStore.params.dynamicFocusMode == "string" ? e = this.routerStore.params.dynamicFocusMode : this.mapId && (e = this.featureFlagStore.flags[_1.DYNAMIC_FOCUS_BUILDING_CHANGE_MODE].payload[this.mapId]), e ?? "default-floor";
|
|
107737
|
+
}
|
|
107735
107738
|
/**
|
|
107736
107739
|
* The initial pitch from the router params. To get the initial pitch with defaults from the theme,
|
|
107737
107740
|
* use {@link UIStore.theme.map.initialPitch}.
|
|
@@ -47,7 +47,6 @@ declare class MapStore {
|
|
|
47
47
|
private syncCameraInteractions;
|
|
48
48
|
get mapView(): Omit<MapView, 'on' | 'off'> | null;
|
|
49
49
|
get interactionMode(): E_MAP_INTERACTION_MODE;
|
|
50
|
-
get multiFloorViewEnabled(): boolean;
|
|
51
50
|
get initialized(): boolean;
|
|
52
51
|
init(container: HTMLElement): Promise<void>;
|
|
53
52
|
onContainerFocus(): void;
|
|
@@ -13,6 +13,7 @@ import AnalyticsStore from '../analytics-store';
|
|
|
13
13
|
import { TTheme } from '../../lib/types/theme';
|
|
14
14
|
import { YOU_ARE_HERE_ROUTER_PARAM, TCameraMode } from '../../lib/utils/url-utils';
|
|
15
15
|
import MessageStore from '../message-store';
|
|
16
|
+
import { DynamicFocusMode } from '@mappedin/dynamic-focus';
|
|
16
17
|
export declare const RootStoreContext: import("react").Context<RootStore>;
|
|
17
18
|
declare class RootStore {
|
|
18
19
|
private reactionDisposers;
|
|
@@ -123,6 +124,8 @@ declare class RootStore {
|
|
|
123
124
|
get isSafetyModeEnabled(): boolean;
|
|
124
125
|
get isOutdoorsVisible(): boolean;
|
|
125
126
|
get isBlueDotEnabled(): string | boolean;
|
|
127
|
+
get isMultiFloorViewEnabled(): boolean;
|
|
128
|
+
get dynamicFocusBuildingChangeMode(): DynamicFocusMode;
|
|
126
129
|
/**
|
|
127
130
|
* The initial pitch from the router params. To get the initial pitch with defaults from the theme,
|
|
128
131
|
* use {@link UIStore.theme.map.initialPitch}.
|