@mappedin/dynamic-focus 6.17.0-beta.0 → 6.17.1-beta.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 +1 @@
|
|
|
1
|
-
var Qt=Object.defineProperty,ye=Object.defineProperties;var Se=Object.getOwnPropertyDescriptors;var Kt=Object.getOwnPropertySymbols;var Ee=Object.prototype.hasOwnProperty,ve=Object.prototype.propertyIsEnumerable;var Jt=s=>{throw TypeError(s)};var xt=(s,t,o)=>t in s?Qt(s,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):s[t]=o,T=(s,t)=>{for(var o in t||(t={}))Ee.call(t,o)&&xt(s,o,t[o]);if(Kt)for(var o of Kt(t))ve.call(t,o)&&xt(s,o,t[o]);return s},rt=(s,t)=>ye(s,Se(t)),a=(s,t)=>Qt(s,"name",{value:t,configurable:!0});var p=(s,t,o)=>xt(s,typeof t!="symbol"?t+"":t,o),Lt=(s,t,o)=>t.has(s)||Jt("Cannot "+o);var e=(s,t,o)=>(Lt(s,t,"read from private field"),o?o.call(s):t.get(s)),d=(s,t,o)=>t.has(s)?Jt("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(s):t.set(s,o),c=(s,t,o,i)=>(Lt(s,t,"write to private field"),i?i.call(s,o):t.set(s,o),o),E=(s,t,o)=>(Lt(s,t,"access private method"),o);var S={env:{NODE_ENV:"production",npm_package_version:"6.17.0-beta.0"}};import{Floor as Pe,getMultiFloorState as Re}from"@mappedin/mappedin-js";function Xt(s,t){if(s==null||t==null)return s===t;if(s.length!==t.length)return!1;for(let o=0;o<s.length;o++)if(s[o]!==t[o])return!1;return!0}a(Xt,"arraysEqual");var _t=class _t{constructor(){p(this,"_subscribers",{});p(this,"_abortController",new AbortController);p(this,"_cleanupFunctions",[])}get signal(){return this._abortController.signal}publish(t,o){!this._subscribers||!this._subscribers[t]||this.signal.aborted||this._subscribers[t].forEach(function(i){typeof i=="function"&&i(o)})}onAbort(t){this.signal.addEventListener("abort",()=>t(),{once:!0})}on(t,o,i){let r=i==null?void 0:i.signal;if(r!=null&&r.aborted||this._abortController&&this._abortController.signal.aborted)return()=>{};this._subscribers||(this._subscribers={}),this._subscribers[t]=this._subscribers[t]||[],this._subscribers[t].push(o);let n=a(()=>this.off(t,o),"cleanup");return r&&r.addEventListener("abort",n,{once:!0}),this._cleanupFunctions.push(n),n}off(t,o){if(!this._subscribers||this._subscribers[t]==null||this.signal.aborted)return;let i=this._subscribers[t].indexOf(o);i!==-1&&this._subscribers[t].splice(i,1)}destroy(){if(!this.signal.aborted){for(let t of this._cleanupFunctions)t();this._cleanupFunctions=[],this._subscribers={},this._abortController.abort()}}};a(_t,"PubSub");var wt=_t;import{Facade as Be,Floor as Oe,FloorStack as Ie}from"@mappedin/mappedin-js";var A,at,Z,B,v,k,K,Q,Nt=class Nt{constructor(t,o){p(this,"__type","building");d(this,A);d(this,at,new Map);d(this,Z,new Map);d(this,B,[]);d(this,v);d(this,k);p(this,"defaultFloor");p(this,"activeFloor");p(this,"excluded",!1);p(this,"floorsAltitudesMap",new Map);p(this,"aboveGroundFloors",[]);d(this,K);d(this,Q);var r;c(this,A,t),c(this,at,new Map(t.floors.map(n=>[n.id,n]))),c(this,Z,new Map(t.floors.map(n=>[n.elevation,n]))),c(this,B,Array.from(e(this,Z).values()).sort((n,u)=>n.elevation-u.elevation)),this.defaultFloor=t.defaultFloor,this.activeFloor=this.defaultFloor,c(this,v,o),this.aboveGroundFloors=e(this,B).filter(n=>n.elevation>=0);let i=(r=t.facade)==null?void 0:r.spaces.map(n=>e(this,v).getState(n)).sort((n,u)=>n.altitude-u.altitude);if(i&&i.length===this.aboveGroundFloors.length)for(let n in this.aboveGroundFloors){let u=this.aboveGroundFloors[n],f=i[n];this.floorsAltitudesMap.set(u.elevation,{altitude:f.altitude,visualHeight:f.height})}}get id(){return e(this,A).id}get name(){return e(this,A).name}get floors(){return e(this,A).floors}get floorStack(){return e(this,A)}get facade(){return e(this,A).facade}get isCurrentFloorStack(){return this.id===e(this,v).currentFloorStack.id}get isIndoor(){let t=e(this,v).getState(this.facade);return this.isCurrentFloorStack||(t==null?void 0:t.visible)===!1&&(t==null?void 0:t.opacity)===0}get canSetFloor(){return this.isIndoor||!this.excluded}get maxElevation(){return e(this,K)==null&&c(this,K,Math.max(...e(this,Z).keys())),e(this,K)}get minElevation(){return e(this,Q)==null&&c(this,Q,Math.min(...e(this,Z).keys())),e(this,Q)}has(t){return Oe.is(t)?e(this,at).has(t.id):Ie.is(t)?t.id===e(this,A).id:Be.is(t)?t.id===this.facade.id:!1}getFloorByElevation(t){return e(this,Z).get(t)}getNearestFloorByElevation(t){let o=this.getFloorByElevation(t);if(o)return o;if(t>=0){if(t>this.maxElevation)return e(this,B)[e(this,B).length-1];for(let i=e(this,B).length-1;i>=0;i--){let r=e(this,B)[i];if(r.elevation<=t)return r}}else{if(t<this.minElevation)return e(this,B)[0];for(let i of e(this,B))if(i.elevation>=t)return i}}getHighestFloor(){return e(this,B)[e(this,B).length-1]}cancelAnimation(){e(this,k)&&(e(this,k).animation.cancel(),c(this,k,void 0))}async animateFacade(t,o={duration:150}){var u;let i=((u=e(this,k))==null?void 0:u.state)||e(this,v).getState(this.facade);if(!i||!t||(i==null?void 0:i.opacity)===t.opacity&&(i==null?void 0:i.visible)===t.visible)return{result:"completed"};this.cancelAnimation();let{opacity:r,visible:n}=t;if(e(this,v).updateState(this.facade,{visible:!0}),r!==void 0){c(this,k,{animation:e(this,v).animateState(this.facade,{opacity:r},{duration:o.duration}),state:t});let f=await e(this,k).animation;if(c(this,k,void 0),f.result==="cancelled")return f}return n===!1&&e(this,v).updateState(this.facade,{visible:n}),{result:"completed"}}destroy(){this.cancelAnimation(),e(this,A).floors.forEach(t=>{e(this,v).updateState(t,{visible:t.id===e(this,v).currentFloor.id})}),this.has(e(this,v).currentFloor)||e(this,v).updateState(this.facade,{visible:!0,opacity:1})}};A=new WeakMap,at=new WeakMap,Z=new WeakMap,B=new WeakMap,v=new WeakMap,k=new WeakMap,K=new WeakMap,Q=new WeakMap,a(Nt,"Building");var Bt=Nt;function te(s,t,o){return s>=t?"in-range":s<=o?"out-of-range":"transition"}a(te,"getZoomState");function Ot(s,t,o){if(s.__type==="outdoors"&&"floor"in s)return s.floor;let i=s;if(i.excluded)return i.activeFloor;switch(t){case"lock-elevation":return i.getFloorByElevation(o);case"nearest-elevation":return i.getNearestFloorByElevation(o);default:break}return i.isIndoor?i.activeFloor:i.defaultFloor}a(Ot,"getFloorToShow");function Ae(s,t,o,i){return i?{facade:s,state:{type:"facade",visible:!1,opacity:0}}:t?{facade:s,state:{type:"facade",visible:!1,opacity:0}}:o?{facade:s,state:{type:"facade",visible:!0,opacity:.2}}:{facade:s,state:{type:"facade",visible:!0,opacity:1}}}a(Ae,"getFacadeState");function Ve(s,t,o){return{outdoorOpacity:"initial",floorStates:s.floors.map(i=>{let n=i.id===t.id&&o;return{floor:i,state:{type:"floor",visible:n,geometry:{visible:n},labels:{enabled:n},markers:{enabled:n},footprint:{visible:!1},occlusion:{enabled:!1}}}})}}a(Ve,"getSingleBuildingState");function ee(s,t){if(!t.includes("lock-elevation"))return"initial";for(let o of s)if(typeof o.outdoorOpacity=="number"&&o.outdoorOpacity>=0&&o.outdoorOpacity<=1)return o.outdoorOpacity;return"initial"}a(ee,"getOutdoorOpacity");function oe(s,t,o){var i;switch(o){case"in-range":return(i=s[0])!=null&&i.canSetFloor?s[0]:void 0;case"out-of-range":return t;case"transition":default:return}}a(oe,"getSetFloorTargetFromZoomState");function ie(s){var z;let{buildings:t,inViewSet:o,currentFloor:i,zoomState:r,mode:n,elevation:u,floorIdsInNavigation:f,floorStackIdsInNavigation:g,multiFloorView:m,getMultiFloorState:$,dynamicBuildingInteriors:V,isolateBelowGroundView:st,currentElevation:nt,forceInteriorsVisible:St,getFloorStackAltitudeData:I}=s,_=new Map,kt=st&&nt<0&&r==="in-range";for(let b of t){let Et=o.has(b.id),H=kt&&b.minElevation>=0,vt=H?!1:Et,Dt=H?!1:Ct({building:b,currentFloor:i,inRange:r==="in-range",inFocus:Et,mode:n,elevation:u,inNavigation:g.includes(b.id),dynamicBuildingInteriors:V,forceInteriorsVisible:St}),Mt=i.floorStack.id===b.id?b.activeFloor:Ot(b,n,u),ge=m!=null&&m.enabled?$(b.floors,Mt||b.activeFloor,f,(z=I==null?void 0:I(b.id))!=null?z:b.floorsAltitudesMap,{color:m==null?void 0:m.footprintColor,spacesOpenToBelowEnabled:m==null?void 0:m.spacesOpenToBelowEnabled,spacesOpenToBelowVisualEffectEnabled:m==null?void 0:m.spacesOpenToBelowVisualEffectEnabled,spacesOpenToBelowVisualEffectDarkenAmount:m==null?void 0:m.spacesOpenToBelowVisualEffectDarkenAmount,spacesOpenToBelowVisualEffectDarkenUseDepth:m==null?void 0:m.spacesOpenToBelowVisualEffectDarkenUseDepth,spacesOpenToBelowVisualEffectDesaturateAmount:m==null?void 0:m.spacesOpenToBelowVisualEffectDesaturateAmount,spacesOpenToBelowVisualEffectDesaturateUseDepth:m==null?void 0:m.spacesOpenToBelowVisualEffectDesaturateUseDepth,spacesOpenToBelowVisualEffectWashOutAmount:m==null?void 0:m.spacesOpenToBelowVisualEffectWashOutAmount,spacesOpenToBelowVisualEffectWashOutUseDepth:m==null?void 0:m.spacesOpenToBelowVisualEffectWashOutUseDepth,opacity:m==null?void 0:m.footprintOpacity,outline:m==null?void 0:m.footprintOutline}):Ve(b.floorStack,Mt||b.activeFloor,Dt),Fe=st&&nt<0&&r==="in-range",be=Ae(b.facade,Dt,Fe,H);_.set(b.id,{building:b,showIndoor:Dt,floorStackState:ge,facadeState:be,inFocus:vt,floorToShow:Mt,isAboveGroundInIsolation:H})}return _}a(ie,"getBuildingStates");function se(s,t){return s.excluded?"none":t?"indoor":"outdoor"}a(se,"getBuildingAnimationType");function Ct(s){let{building:t,currentFloor:o,inRange:i,inFocus:r,mode:n,elevation:u,inNavigation:f,dynamicBuildingInteriors:g,forceInteriorsVisible:m}=s;if(t.id===o.floorStack.id)return!0;if(t.excluded)return!1;if(m===!0||f===!0)return!0;if(!g)return o.floorStack.type!=="Outdoor";if(!i||!r)return!1;switch(n){case"lock-elevation":return t.getFloorByElevation(u)!=null;default:break}return!0}a(Ct,"shouldShowIndoor");function ne(s,t,o){return s!==t&&!o}a(ne,"shouldDeferSetFloor");var re=["default-floor","lock-elevation","nearest-elevation"];import{Floor as ke,FloorStack as De}from"@mappedin/mappedin-js";var Gt="[MappedinJS]";function Zt(s="",{prefix:t=Gt}={}){let o="".concat(t).concat(s?"-".concat(s):""),i=a((r,n)=>{if(typeof window<"u"&&window.rnDebug){let u=n.map(f=>f instanceof Error&&f.stack?"".concat(f.message,"\n").concat(f.stack):f);window.rnDebug("".concat(s," ").concat(r,": ").concat(u.join(" ")))}},"rnDebug");return{logState:S.env.NODE_ENV==="test"?3:0,log(...r){this.logState<=0&&(console.log(o,...r),i("log",r))},warn(...r){this.logState<=1&&(console.warn(o,...r),i("warn",r))},error(...r){this.logState<=2&&(console.error(o,...r),i("error",r))},assert(...r){console.assert(...r)},time(r){console.time(r)},timeEnd(r){console.timeEnd(r)},setLevel(r){0<=r&&r<=3&&(this.logState=r)}}}a(Zt,"createLogger");var Te=Zt();var J=Te;function ae(s,t,o,i){return(s<t||s>o)&&J.warn(i),Math.min(o,Math.max(t,s))}a(ae,"clampWithWarning");function Pt(s,t){return!ke.is(s)||(s==null?void 0:s.floorStack)==null||!De.is(t)?!1:s.floorStack.id!==t.id?(J.warn("Floor (".concat(s.id,") does not belong to floor stack (").concat(t.id,").")),!1):!0}a(Pt,"validateFloorForStack");function Rt(s,t,o,i){return ae(s,t,o,"".concat(i," must be between ").concat(t," and ").concat(o,"."))}a(Rt,"validateZoomThreshold");var X=Zt("",{prefix:"[DynamicFocus]"});var D,tt,lt,Ut,jt=class jt{constructor(t,o){d(this,lt);p(this,"__type","outdoors");d(this,D);d(this,tt);c(this,D,t),c(this,tt,o)}get id(){return e(this,D).id}get floorStack(){return e(this,D)}get floor(){return e(this,D).defaultFloor}matchesFloorStack(t){return t===e(this,D)||t===e(this,D).id}show(){E(this,lt,Ut).call(this,!0)}hide(){E(this,lt,Ut).call(this,!1)}destroy(){this.matchesFloorStack(e(this,tt).currentFloorStack)||this.hide()}};D=new WeakMap,tt=new WeakMap,lt=new WeakSet,Ut=a(function(t){for(let o of e(this,D).floors)e(this,tt).updateState(o,{visible:t})},"#setVisible"),a(jt,"Outdoors");var It=jt;function le(s,t){let o=s.getByType("floor-stack"),i=o.find(n=>{var u;return((u=n.type)==null?void 0:u.toLowerCase())==="outdoor"});if(i)return i;let r=o.find(n=>n.facade==null&&!t.has(n.id));return r||(X.warn("No good candidate for the outdoor floor stack was found. Using the first floor stack."),o[0])}a(le,"getOutdoorFloorStack");var ue={indoorZoomThreshold:18,outdoorZoomThreshold:17,setFloorOnFocus:!0,autoFocus:!1,indoorAnimationOptions:{duration:150},outdoorAnimationOptions:{duration:150},autoAdjustFacadeHeights:!1,mode:"default-floor",preloadFloors:!0,dynamicBuildingInteriors:!0,dynamicLayers:[],isolateBelowGroundView:!1,forceInteriorsVisible:!1,showLabelsAndMarkersOnAllVisibleFloors:!1},Io=.2,Ao=.4;function Me(s,t){return"".concat(t," ").concat(s)}a(Me,"formatMessage");var $t=class $t extends Error{constructor(t,o=Gt){super(Me(t,o)),this.name="MappedinError"}};a($t,"MappedinError");var At=$t;var xe=a(s=>s,"linearEase"),Le=a(s=>s*s,"quadEaseIn"),_e=a(s=>1-Math.cos(s*Math.PI/2),"easeIn"),Ne=a(s=>1-(1-s)*(1-s),"quadEaseOut"),Ce=a(s=>1-Math.pow(1-s,3),"cubicEaseOut"),Ge={linear:xe,"ease-in":Le,"ease-out":Ne,"ease-in-out":_e,"ease-out-cubic":Ce};function Ze(s,t){let o=0;if(t.length<2)return o;let r=t[0]<t[1]?(n,u)=>n>u:(n,u)=>n<u;for(;o<t.length-1&&r(s,t[o+1]);)o++;return o>t.length-2?Math.max(0,t.length-2):o}a(Ze,"getInterpolationBreakpoint");function ce(s,t,o,i="ease-in"){if(t.length!==o.length)throw new At("Input and output ranges must have the same number of values.");s=Math.max(t[0],Math.min(s,t[t.length-1]));let r=Ze(s,t),n=(s-t[r])/(t[r+1]-t[r]),u=typeof i=="function"?i(n):Ge[i](n);return o[r]+u*(o[r+1]-o[r])}a(ce,"interpolateMulti");var M,ut,ct,N,dt,qt=class qt{constructor(t,o,i){p(this,"layers");p(this,"visible");d(this,M);d(this,ut,[]);d(this,ct,!1);d(this,N,new Map);p(this,"interpolationFn");d(this,dt,1);this.layers=t,this.visible=o,c(this,M,i)}processLayerGroup(t,o,i){if(!e(this,ct)&&(this.layers.forEach(r=>{let n=t[r];n&&e(this,ut).push(...n)}),c(this,ct,!0),this.visible)){let r=[o,i],n=[1,0];this.interpolationFn=u=>ce(u,r,n)}}setOpacity(t){var o,i,r;c(this,dt,t);for(let n of e(this,ut))if(n.startsWith("img_")){let u=e(this,M).Image3D.getById(n);if(u){let f=e(this,M).getState(u.image);e(this,N).has(n)||e(this,N).set(n,(o=f==null?void 0:f.opacity)!=null?o:1);let g=Math.min(e(this,N).get(n),t);e(this,M).updateState(u.image,{opacity:g})}}else{let u=(i=e(this,M).getMapData())==null?void 0:i.getById("space",n);if(!u)continue;let f=e(this,M).getState(u);e(this,N).has(n)||e(this,N).set(n,(r=f==null?void 0:f.opacity)!=null?r:1);let g=Math.min(e(this,N).get(n),t);e(this,M).updateState(u,{opacity:g,visible:g>0})}}get opacity(){return e(this,dt)}};M=new WeakMap,ut=new WeakMap,ct=new WeakMap,N=new WeakMap,dt=new WeakMap,a(qt,"LayerGroup");var Vt=qt;function Yt(s,t){s.forEach(o=>{if(o.interpolationFn!=null){let i=o.interpolationFn(t);i!=null&&(o.setOpacity(i),o.visible=i===1)}})}a(Yt,"runLayerGroupInterpolations");var O,l,P,h,Y,q,y,C,W,G,w,et,ht,ft,mt,x,R,ot,U,j,F,Wt,he,fe,zt,pt,gt,Ft,bt,yt,it,Tt,me,pe,L,Ht=class Ht{constructor(t){d(this,F);d(this,O);d(this,l);d(this,P);d(this,h,ue);d(this,Y,[]);d(this,q,new Set);d(this,y,new Map);d(this,C);d(this,W,!1);d(this,G,!1);d(this,w,0);d(this,et,0);d(this,ht,[]);d(this,ft,{});d(this,mt,{});d(this,x,"transition");d(this,R,"outdoor");d(this,ot,[]);d(this,U,!1);d(this,j,[]);p(this,"sceneUpdateQueue",Promise.resolve());p(this,"on",a((t,o)=>{e(this,O).on(t,o)},"on"));p(this,"off",a((t,o)=>{e(this,O).off(t,o)},"off"));d(this,pt,a(t=>{if(!this.isEnabled)return;let{facades:o}=t;if(Xt(o,this.focusedFacades)&&e(this,R)==="transition"&&!e(this,G))return;c(this,G,!1),c(this,Y,[]),e(this,q).clear();let i=e(this,h).isolateBelowGroundView&&e(this,w)<0;if(o.length>0)for(let r of o){let n=e(this,y).get(r.floorStack.id);if(n){if(i&&n.minElevation>=0)continue;e(this,q).add(n.id),e(this,Y).push(n)}}e(this,h).autoFocus&&this.focus()},"#handleFacadesInViewChange"));d(this,gt,a(async t=>{var f,g,m,$;if(!this.isEnabled)return;let{floor:o}=t,i=e(this,y).get(o.floorStack.id);i&&(i.activeFloor=o);let r=e(this,h).isolateBelowGroundView&&e(this,w)<0;(i==null?void 0:i.excluded)===!1&&!e(this,C).matchesFloorStack(o.floorStack)&&c(this,w,o.elevation);let n=e(this,h).isolateBelowGroundView&&e(this,w)<0,u=r&&!n;if(e(this,l).manualFloorVisibility===!0){t.reason!=="dynamic-focus"&&(u?(c(this,G,!0),e(this,l).Camera.updateFacadesInView(),e(this,h).autoFocus||(await e(this,L).call(this,o),e(this,O).publish("focus",{facades:this.focusedFacades}))):(await e(this,L).call(this,o),e(this,O).publish("focus",{facades:this.focusedFacades})));let V=(g=(f=i==null?void 0:i.floorsAltitudesMap.get(o.elevation))==null?void 0:f.altitude)!=null?g:0;e(this,l).options.multiFloorView!=null&&((m=e(this,l).options.multiFloorView)!=null&&m.enabled)&&(($=e(this,l).options.multiFloorView)!=null&&$.updateCameraElevationOnFloorChange)&&e(this,l).Camera.elevation!==V&&e(this,l).Camera.animateElevation(V,{duration:750,easing:"ease-in-out"})}},"#handleFloorChangeStart"));d(this,Ft,a(()=>{c(this,W,!0)},"#handleUserInteractionStart"));d(this,bt,a(()=>{c(this,W,!1)},"#handleUserInteractionEnd"));d(this,yt,a(()=>{e(this,L).call(this)},"#handleGlobalStateChange"));d(this,it,a(t=>{if(!this.isEnabled)return;let{zoomLevel:o}=t,i=te(o,e(this,h).indoorZoomThreshold,e(this,h).outdoorZoomThreshold);e(this,x)!==i&&(c(this,x,i),i==="in-range"?this.setIndoor():i==="out-of-range"&&this.setOutdoor()),Yt(e(this,j),o)},"#handleCameraChange"));d(this,L,a(async t=>{var g,m,$;if(e(this,l).manualFloorVisibility!==!0||!this.isEnabled)return;let o=t||e(this,l).currentFloor,i=e(this,l).getGlobalState().multiFloorView,r=e(this,l).options.multiFloorView?T(T({},e(this,l).options.multiFloorView),i):e(this,l).options.multiFloorView,n=((m=(g=e(this,l).Navigation)==null?void 0:g.floors)==null?void 0:m.map(V=>V.id))||[],u=(($=e(this,l).Navigation)==null?void 0:$.floorStacks.map(V=>V.id))||[],f=new Promise(async V=>{var St;await this.sceneUpdateQueue;let st=ie({buildings:Array.from(e(this,y).values()),inViewSet:e(this,q),currentFloor:o,zoomState:e(this,x),mode:e(this,h).mode,elevation:e(this,w),floorIdsInNavigation:n,floorStackIdsInNavigation:u,multiFloorView:r,getMultiFloorState:(St=e(this,h).customMultiFloorVisibilityState)!=null?St:Re,dynamicBuildingInteriors:e(this,h).dynamicBuildingInteriors,isolateBelowGroundView:e(this,h).isolateBelowGroundView,currentElevation:e(this,w),forceInteriorsVisible:e(this,h).forceInteriorsVisible,getFloorStackAltitudeData:a(I=>e(this,l).getFloorStackAltitudeData(I),"getFloorStackAltitudeData")}),nt=[];await Promise.all(Array.from(st.values()).map(async I=>{let{building:_,showIndoor:kt,floorStackState:z,facadeState:b,inFocus:Et,isAboveGroundInIsolation:H}=I;nt.push(z);let vt=se(_,kt);if(vt==="indoor")return E(this,F,me).call(this,_,z,b,Et);if(vt==="outdoor")return E(this,F,pe).call(this,_,z,b,u,H)})),e(this,l).Outdoor.setOpacity(ee(nt,e(this,h).mode)),c(this,ot,e(this,Y).filter(I=>{var _;return((_=st.get(I.id))==null?void 0:_.showIndoor)===!0}).map(I=>I.facade)),e(this,O).publish("focus",{facades:e(this,ot)}),V()});return this.sceneUpdateQueue=f,f},"#applyBuildingStates"));c(this,O,new wt),c(this,l,t),X.setLevel(J.logState),c(this,P,e(this,l).getMapData()),c(this,w,e(this,l).currentFloor.elevation),c(this,et,e(this,l).Camera.elevation);for(let o of e(this,P).getByType("facade"))e(this,y).set(o.floorStack.id,new Bt(o.floorStack,e(this,l)));E(this,F,fe).call(this),c(this,C,new It(le(e(this,P),e(this,y)),e(this,l))),e(this,l).on("floor-change-start",e(this,gt)),e(this,l).on("camera-change",e(this,it)),e(this,l).on("facades-in-view-change",e(this,pt)),e(this,l).on("user-interaction-start",e(this,Ft)),e(this,l).on("user-interaction-end",e(this,bt)),e(this,l).on("global-state-change",e(this,yt))}enable(t){if(e(this,U)){X.warn("enable() called on an already enabled Dynamic Focus instance.");return}c(this,U,!0),e(this,l).manualFloorVisibility=!0,e(this,C).show(),this.updateState(T(T({},e(this,h)),t)),E(this,F,he).call(this),e(this,it).call(this,{zoomLevel:e(this,l).Camera.zoomLevel,center:e(this,l).Camera.center,bearing:e(this,l).Camera.bearing,pitch:e(this,l).Camera.pitch}),e(this,l).Camera.updateFacadesInView()}disable(){if(!e(this,U)){X.warn("disable() called on an already disabled Dynamic Focus instance.");return}c(this,U,!1),e(this,l).manualFloorVisibility=!1}get isEnabled(){return e(this,U)}get isIndoor(){return e(this,R)==="indoor"}get isOutdoor(){return e(this,R)==="outdoor"}get outdoorsFloorStack(){return e(this,C).floorStack}get layers(){return e(this,ht)}get layersBySpaceId(){return e(this,ft)}setIndoor(){c(this,R,"indoor"),c(this,x,"in-range"),E(this,F,Wt).call(this)}setOutdoor(){c(this,R,"outdoor"),c(this,x,"out-of-range"),E(this,F,Wt).call(this)}get focusedFacades(){return[...e(this,ot)]}getState(){return T({},e(this,h))}updateState(t){var r,n;let o=!1,i=e(this,h).isolateBelowGroundView&&e(this,w)<0;if(t.indoorZoomThreshold!=null&&(t.indoorZoomThreshold=Rt(t.indoorZoomThreshold,(r=t==null?void 0:t.outdoorZoomThreshold)!=null?r:e(this,h).outdoorZoomThreshold,e(this,l).Camera.maxZoomLevel,"indoorZoomThreshold"),o=!0),t.outdoorZoomThreshold!=null&&(t.outdoorZoomThreshold=Rt(t.outdoorZoomThreshold,e(this,l).Camera.minZoomLevel,(n=t==null?void 0:t.indoorZoomThreshold)!=null?n:e(this,h).indoorZoomThreshold,"outdoorZoomThreshold"),o=!0),t.mode!=null&&(t.mode=re.includes(t.mode)?t.mode:"default-floor"),t.autoAdjustFacadeHeights!=null&&(e(this,h).autoAdjustFacadeHeights=t.autoAdjustFacadeHeights),t.dynamicBuildingInteriors!=null&&t.dynamicBuildingInteriors!==e(this,h).dynamicBuildingInteriors&&(o=!0),t.isolateBelowGroundView!=null&&t.isolateBelowGroundView!==e(this,h).isolateBelowGroundView&&(o=!0),t.forceInteriorsVisible!=null&&t.forceInteriorsVisible!==e(this,h).forceInteriorsVisible&&(o=!0),t.showLabelsAndMarkersOnAllVisibleFloors!=null&&t.showLabelsAndMarkersOnAllVisibleFloors!==e(this,h).showLabelsAndMarkersOnAllVisibleFloors&&(o=!0),c(this,h,Object.assign({},e(this,h),Object.fromEntries(Object.entries(t).filter(([,u])=>u!=null)))),t.mode!=null&&t.preloadFloors&&E(this,F,zt).call(this,t.mode),o){let u=e(this,h).isolateBelowGroundView&&e(this,w)<0;i&&!u?(c(this,G,!0),e(this,l).Camera.updateFacadesInView(),e(this,h).autoFocus||e(this,L).call(this)):e(this,L).call(this)}}destroy(){this.disable(),e(this,l).off("facades-in-view-change",e(this,pt)),e(this,l).off("floor-change-start",e(this,gt)),e(this,l).off("camera-change",e(this,it)),e(this,l).off("user-interaction-start",e(this,Ft)),e(this,l).off("user-interaction-end",e(this,bt)),e(this,l).off("global-state-change",e(this,yt)),e(this,y).forEach(t=>t.destroy()),e(this,C).destroy(),e(this,O).destroy(),c(this,j,[])}async focus(t=e(this,h).setFloorOnFocus){if(t)if(ne(e(this,et),e(this,l).Camera.elevation,e(this,W)))c(this,et,e(this,l).Camera.elevation),c(this,G,!0);else{let o=oe(e(this,Y),e(this,C),e(this,x)),i=o?Ot(o,e(this,h).mode,e(this,w)):void 0;i&&i.id!==e(this,l).currentFloor.id&&e(this,l).setFloor(i,{context:"dynamic-focus"})}await e(this,L).call(this),e(this,O).publish("focus",{facades:this.focusedFacades})}preloadFloors(){E(this,F,zt).call(this,e(this,h).mode)}setDefaultFloorForStack(t,o){if(!Pt(o,t))return;let i=e(this,y).get(t.id);i&&(i.defaultFloor=o)}resetDefaultFloorForStack(t){let o=e(this,y).get(t.id);o&&(o.defaultFloor=t.defaultFloor)}getDefaultFloorForStack(t){var o;return((o=e(this,y).get(t.id))==null?void 0:o.defaultFloor)||t.defaultFloor||t.floors[0]}setCurrentFloorForStack(t,o){if(!Pt(o,t))return;let i=e(this,y).get(t.id);i&&(i.activeFloor=o,e(this,L).call(this))}exclude(t){let o=Array.isArray(t)?t:[t];for(let i of o){let r=e(this,y).get(i.id);r&&(r.excluded=!0)}}include(t){let o=Array.isArray(t)?t:[t];for(let i of o){let r=e(this,y).get(i.id);r&&(r.excluded=!1)}}getCurrentFloorForStack(t){var o;return((o=e(this,y).get(t.id))==null?void 0:o.activeFloor)||this.getDefaultFloorForStack(t)}};O=new WeakMap,l=new WeakMap,P=new WeakMap,h=new WeakMap,Y=new WeakMap,q=new WeakMap,y=new WeakMap,C=new WeakMap,W=new WeakMap,G=new WeakMap,w=new WeakMap,et=new WeakMap,ht=new WeakMap,ft=new WeakMap,mt=new WeakMap,x=new WeakMap,R=new WeakMap,ot=new WeakMap,U=new WeakMap,j=new WeakMap,F=new WeakSet,Wt=a(function(){e(this,h).autoFocus&&(e(this,W)?this.focus():c(this,G,!0)),e(this,O).publish("state-change")},"#handleViewStateChange"),he=a(function(){c(this,j,[]);for(let t of e(this,h).dynamicLayers){let o=new Vt([t],!0,e(this,l));o.processLayerGroup(e(this,mt),e(this,h).outdoorZoomThreshold,e(this,h).indoorZoomThreshold),e(this,j).push(o)}Yt(e(this,j),e(this,l).Camera.zoomLevel)},"#initializeLayerGroups"),fe=a(function(){var r,n,u;let t=(u=(n=(r=e(this,P).internal.mvf)==null?void 0:r.enterprise)==null?void 0:n.layers)!=null?u:[],o={},i={};t.forEach(f=>{o[f.name]||(o[f.name]=[]),o[f.name].push(...f.spaces.map(({spaceId:g})=>g));for(let{spaceId:g}of f.spaces)i[g]==null&&(i[g]=[]),i[g].push(f.name)}),c(this,ht,t.map(({name:f})=>f)),c(this,ft,i),c(this,mt,o)},"#setupLayers"),zt=a(function(t){e(this,l).preloadFloors(e(this,P).getByType("facade").map(o=>Ot(e(this,y).get(o.floorStack.id),t,e(this,w))).filter(o=>o!=null&&Pe.is(o)))},"#preloadFloors"),pt=new WeakMap,gt=new WeakMap,Ft=new WeakMap,bt=new WeakMap,yt=new WeakMap,it=new WeakMap,Tt=a(function(t,o,i,r=!1){t.forEach(n=>{if(n.floor)if(o){let f=i!==void 0&&!r?rt(T({},n.state),{labels:rt(T({},n.state.labels),{enabled:n.state.labels.enabled&&i}),markers:rt(T({},n.state.markers),{enabled:n.state.markers.enabled&&i}),occlusion:rt(T({},n.state.occlusion),{enabled:n.state.occlusion.enabled&&i})}):n.state;e(this,l).updateState(n.floor,f)}else e(this,l).updateState(n.floor,{visible:!1})})},"#updateFloorVisibility"),me=a(async function(t,o,i,r){return E(this,F,Tt).call(this,o.floorStates,!0,r,e(this,h).showLabelsAndMarkersOnAllVisibleFloors),t.animateFacade(i.state,e(this,h).indoorAnimationOptions)},"#animateIndoorSequence"),pe=a(async function(t,o,i,r,n){let u=n;u&&E(this,F,Tt).call(this,o.floorStates,!1,void 0,e(this,h).showLabelsAndMarkersOnAllVisibleFloors);let f=await t.animateFacade(i.state,e(this,h).outdoorAnimationOptions);return f.result==="completed"&&!u&&E(this,F,Tt).call(this,o.floorStates,Ct({building:t,currentFloor:e(this,l).currentFloor,inRange:e(this,x)==="in-range",inFocus:e(this,q).has(t.id),mode:e(this,h).mode,elevation:e(this,w),inNavigation:r.includes(t.floorStack.id),dynamicBuildingInteriors:e(this,h).dynamicBuildingInteriors,forceInteriorsVisible:e(this,h).forceInteriorsVisible}),void 0,e(this,h).showLabelsAndMarkersOnAllVisibleFloors),f},"#animateOutdoorSequence"),L=new WeakMap,a(Ht,"DynamicFocus");var de=Ht;export{a,Io as b,Ao as c,de as d};
|
|
1
|
+
var Qt=Object.defineProperty,ye=Object.defineProperties;var Se=Object.getOwnPropertyDescriptors;var Kt=Object.getOwnPropertySymbols;var Ee=Object.prototype.hasOwnProperty,ve=Object.prototype.propertyIsEnumerable;var Jt=s=>{throw TypeError(s)};var xt=(s,t,o)=>t in s?Qt(s,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):s[t]=o,T=(s,t)=>{for(var o in t||(t={}))Ee.call(t,o)&&xt(s,o,t[o]);if(Kt)for(var o of Kt(t))ve.call(t,o)&&xt(s,o,t[o]);return s},rt=(s,t)=>ye(s,Se(t)),a=(s,t)=>Qt(s,"name",{value:t,configurable:!0});var p=(s,t,o)=>xt(s,typeof t!="symbol"?t+"":t,o),Lt=(s,t,o)=>t.has(s)||Jt("Cannot "+o);var e=(s,t,o)=>(Lt(s,t,"read from private field"),o?o.call(s):t.get(s)),d=(s,t,o)=>t.has(s)?Jt("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(s):t.set(s,o),c=(s,t,o,i)=>(Lt(s,t,"write to private field"),i?i.call(s,o):t.set(s,o),o),E=(s,t,o)=>(Lt(s,t,"access private method"),o);var S={env:{NODE_ENV:"production",npm_package_version:"6.17.1-beta.0"}};import{Floor as Pe,getMultiFloorState as Re}from"@mappedin/mappedin-js";function Xt(s,t){if(s==null||t==null)return s===t;if(s.length!==t.length)return!1;for(let o=0;o<s.length;o++)if(s[o]!==t[o])return!1;return!0}a(Xt,"arraysEqual");var _t=class _t{constructor(){p(this,"_subscribers",{});p(this,"_abortController",new AbortController);p(this,"_cleanupFunctions",[])}get signal(){return this._abortController.signal}publish(t,o){!this._subscribers||!this._subscribers[t]||this.signal.aborted||this._subscribers[t].forEach(function(i){typeof i=="function"&&i(o)})}onAbort(t){this.signal.addEventListener("abort",()=>t(),{once:!0})}on(t,o,i){let r=i==null?void 0:i.signal;if(r!=null&&r.aborted||this._abortController&&this._abortController.signal.aborted)return()=>{};this._subscribers||(this._subscribers={}),this._subscribers[t]=this._subscribers[t]||[],this._subscribers[t].push(o);let n=a(()=>this.off(t,o),"cleanup");return r&&r.addEventListener("abort",n,{once:!0}),this._cleanupFunctions.push(n),n}off(t,o){if(!this._subscribers||this._subscribers[t]==null||this.signal.aborted)return;let i=this._subscribers[t].indexOf(o);i!==-1&&this._subscribers[t].splice(i,1)}destroy(){if(!this.signal.aborted){for(let t of this._cleanupFunctions)t();this._cleanupFunctions=[],this._subscribers={},this._abortController.abort()}}};a(_t,"PubSub");var wt=_t;import{Facade as Be,Floor as Oe,FloorStack as Ie}from"@mappedin/mappedin-js";var A,at,Z,B,v,k,K,Q,Nt=class Nt{constructor(t,o){p(this,"__type","building");d(this,A);d(this,at,new Map);d(this,Z,new Map);d(this,B,[]);d(this,v);d(this,k);p(this,"defaultFloor");p(this,"activeFloor");p(this,"excluded",!1);p(this,"floorsAltitudesMap",new Map);p(this,"aboveGroundFloors",[]);d(this,K);d(this,Q);var r;c(this,A,t),c(this,at,new Map(t.floors.map(n=>[n.id,n]))),c(this,Z,new Map(t.floors.map(n=>[n.elevation,n]))),c(this,B,Array.from(e(this,Z).values()).sort((n,u)=>n.elevation-u.elevation)),this.defaultFloor=t.defaultFloor,this.activeFloor=this.defaultFloor,c(this,v,o),this.aboveGroundFloors=e(this,B).filter(n=>n.elevation>=0);let i=(r=t.facade)==null?void 0:r.spaces.map(n=>e(this,v).getState(n)).sort((n,u)=>n.altitude-u.altitude);if(i&&i.length===this.aboveGroundFloors.length)for(let n in this.aboveGroundFloors){let u=this.aboveGroundFloors[n],f=i[n];this.floorsAltitudesMap.set(u.elevation,{altitude:f.altitude,visualHeight:f.height})}}get id(){return e(this,A).id}get name(){return e(this,A).name}get floors(){return e(this,A).floors}get floorStack(){return e(this,A)}get facade(){return e(this,A).facade}get isCurrentFloorStack(){return this.id===e(this,v).currentFloorStack.id}get isIndoor(){let t=e(this,v).getState(this.facade);return this.isCurrentFloorStack||(t==null?void 0:t.visible)===!1&&(t==null?void 0:t.opacity)===0}get canSetFloor(){return this.isIndoor||!this.excluded}get maxElevation(){return e(this,K)==null&&c(this,K,Math.max(...e(this,Z).keys())),e(this,K)}get minElevation(){return e(this,Q)==null&&c(this,Q,Math.min(...e(this,Z).keys())),e(this,Q)}has(t){return Oe.is(t)?e(this,at).has(t.id):Ie.is(t)?t.id===e(this,A).id:Be.is(t)?t.id===this.facade.id:!1}getFloorByElevation(t){return e(this,Z).get(t)}getNearestFloorByElevation(t){let o=this.getFloorByElevation(t);if(o)return o;if(t>=0){if(t>this.maxElevation)return e(this,B)[e(this,B).length-1];for(let i=e(this,B).length-1;i>=0;i--){let r=e(this,B)[i];if(r.elevation<=t)return r}}else{if(t<this.minElevation)return e(this,B)[0];for(let i of e(this,B))if(i.elevation>=t)return i}}getHighestFloor(){return e(this,B)[e(this,B).length-1]}cancelAnimation(){e(this,k)&&(e(this,k).animation.cancel(),c(this,k,void 0))}async animateFacade(t,o={duration:150}){var u;let i=((u=e(this,k))==null?void 0:u.state)||e(this,v).getState(this.facade);if(!i||!t||(i==null?void 0:i.opacity)===t.opacity&&(i==null?void 0:i.visible)===t.visible)return{result:"completed"};this.cancelAnimation();let{opacity:r,visible:n}=t;if(e(this,v).updateState(this.facade,{visible:!0}),r!==void 0){c(this,k,{animation:e(this,v).animateState(this.facade,{opacity:r},{duration:o.duration}),state:t});let f=await e(this,k).animation;if(c(this,k,void 0),f.result==="cancelled")return f}return n===!1&&e(this,v).updateState(this.facade,{visible:n}),{result:"completed"}}destroy(){this.cancelAnimation(),e(this,A).floors.forEach(t=>{e(this,v).updateState(t,{visible:t.id===e(this,v).currentFloor.id})}),this.has(e(this,v).currentFloor)||e(this,v).updateState(this.facade,{visible:!0,opacity:1})}};A=new WeakMap,at=new WeakMap,Z=new WeakMap,B=new WeakMap,v=new WeakMap,k=new WeakMap,K=new WeakMap,Q=new WeakMap,a(Nt,"Building");var Bt=Nt;function te(s,t,o){return s>=t?"in-range":s<=o?"out-of-range":"transition"}a(te,"getZoomState");function Ot(s,t,o){if(s.__type==="outdoors"&&"floor"in s)return s.floor;let i=s;if(i.excluded)return i.activeFloor;switch(t){case"lock-elevation":return i.getFloorByElevation(o);case"nearest-elevation":return i.getNearestFloorByElevation(o);default:break}return i.isIndoor?i.activeFloor:i.defaultFloor}a(Ot,"getFloorToShow");function Ae(s,t,o,i){return i?{facade:s,state:{type:"facade",visible:!1,opacity:0}}:t?{facade:s,state:{type:"facade",visible:!1,opacity:0}}:o?{facade:s,state:{type:"facade",visible:!0,opacity:.2}}:{facade:s,state:{type:"facade",visible:!0,opacity:1}}}a(Ae,"getFacadeState");function Ve(s,t,o){return{outdoorOpacity:"initial",floorStates:s.floors.map(i=>{let n=i.id===t.id&&o;return{floor:i,state:{type:"floor",visible:n,geometry:{visible:n},labels:{enabled:n},markers:{enabled:n},footprint:{visible:!1},occlusion:{enabled:!1}}}})}}a(Ve,"getSingleBuildingState");function ee(s,t){if(!t.includes("lock-elevation"))return"initial";for(let o of s)if(typeof o.outdoorOpacity=="number"&&o.outdoorOpacity>=0&&o.outdoorOpacity<=1)return o.outdoorOpacity;return"initial"}a(ee,"getOutdoorOpacity");function oe(s,t,o){var i;switch(o){case"in-range":return(i=s[0])!=null&&i.canSetFloor?s[0]:void 0;case"out-of-range":return t;case"transition":default:return}}a(oe,"getSetFloorTargetFromZoomState");function ie(s){var z;let{buildings:t,inViewSet:o,currentFloor:i,zoomState:r,mode:n,elevation:u,floorIdsInNavigation:f,floorStackIdsInNavigation:g,multiFloorView:m,getMultiFloorState:$,dynamicBuildingInteriors:V,isolateBelowGroundView:st,currentElevation:nt,forceInteriorsVisible:St,getFloorStackAltitudeData:I}=s,_=new Map,kt=st&&nt<0&&r==="in-range";for(let b of t){let Et=o.has(b.id),H=kt&&b.minElevation>=0,vt=H?!1:Et,Dt=H?!1:Ct({building:b,currentFloor:i,inRange:r==="in-range",inFocus:Et,mode:n,elevation:u,inNavigation:g.includes(b.id),dynamicBuildingInteriors:V,forceInteriorsVisible:St}),Mt=i.floorStack.id===b.id?b.activeFloor:Ot(b,n,u),ge=m!=null&&m.enabled?$(b.floors,Mt||b.activeFloor,f,(z=I==null?void 0:I(b.id))!=null?z:b.floorsAltitudesMap,{color:m==null?void 0:m.footprintColor,spacesOpenToBelowEnabled:m==null?void 0:m.spacesOpenToBelowEnabled,spacesOpenToBelowVisualEffectEnabled:m==null?void 0:m.spacesOpenToBelowVisualEffectEnabled,spacesOpenToBelowVisualEffectDarkenAmount:m==null?void 0:m.spacesOpenToBelowVisualEffectDarkenAmount,spacesOpenToBelowVisualEffectDarkenUseDepth:m==null?void 0:m.spacesOpenToBelowVisualEffectDarkenUseDepth,spacesOpenToBelowVisualEffectDesaturateAmount:m==null?void 0:m.spacesOpenToBelowVisualEffectDesaturateAmount,spacesOpenToBelowVisualEffectDesaturateUseDepth:m==null?void 0:m.spacesOpenToBelowVisualEffectDesaturateUseDepth,spacesOpenToBelowVisualEffectWashOutAmount:m==null?void 0:m.spacesOpenToBelowVisualEffectWashOutAmount,spacesOpenToBelowVisualEffectWashOutUseDepth:m==null?void 0:m.spacesOpenToBelowVisualEffectWashOutUseDepth,opacity:m==null?void 0:m.footprintOpacity,outline:m==null?void 0:m.footprintOutline}):Ve(b.floorStack,Mt||b.activeFloor,Dt),Fe=st&&nt<0&&r==="in-range",be=Ae(b.facade,Dt,Fe,H);_.set(b.id,{building:b,showIndoor:Dt,floorStackState:ge,facadeState:be,inFocus:vt,floorToShow:Mt,isAboveGroundInIsolation:H})}return _}a(ie,"getBuildingStates");function se(s,t){return s.excluded?"none":t?"indoor":"outdoor"}a(se,"getBuildingAnimationType");function Ct(s){let{building:t,currentFloor:o,inRange:i,inFocus:r,mode:n,elevation:u,inNavigation:f,dynamicBuildingInteriors:g,forceInteriorsVisible:m}=s;if(t.id===o.floorStack.id)return!0;if(t.excluded)return!1;if(m===!0||f===!0)return!0;if(!g)return o.floorStack.type!=="Outdoor";if(!i||!r)return!1;switch(n){case"lock-elevation":return t.getFloorByElevation(u)!=null;default:break}return!0}a(Ct,"shouldShowIndoor");function ne(s,t,o){return s!==t&&!o}a(ne,"shouldDeferSetFloor");var re=["default-floor","lock-elevation","nearest-elevation"];import{Floor as ke,FloorStack as De}from"@mappedin/mappedin-js";var Gt="[MappedinJS]";function Zt(s="",{prefix:t=Gt}={}){let o="".concat(t).concat(s?"-".concat(s):""),i=a((r,n)=>{if(typeof window<"u"&&window.rnDebug){let u=n.map(f=>f instanceof Error&&f.stack?"".concat(f.message,"\n").concat(f.stack):f);window.rnDebug("".concat(s," ").concat(r,": ").concat(u.join(" ")))}},"rnDebug");return{logState:S.env.NODE_ENV==="test"?3:0,log(...r){this.logState<=0&&(console.log(o,...r),i("log",r))},warn(...r){this.logState<=1&&(console.warn(o,...r),i("warn",r))},error(...r){this.logState<=2&&(console.error(o,...r),i("error",r))},assert(...r){console.assert(...r)},time(r){console.time(r)},timeEnd(r){console.timeEnd(r)},setLevel(r){0<=r&&r<=3&&(this.logState=r)}}}a(Zt,"createLogger");var Te=Zt();var J=Te;function ae(s,t,o,i){return(s<t||s>o)&&J.warn(i),Math.min(o,Math.max(t,s))}a(ae,"clampWithWarning");function Pt(s,t){return!ke.is(s)||(s==null?void 0:s.floorStack)==null||!De.is(t)?!1:s.floorStack.id!==t.id?(J.warn("Floor (".concat(s.id,") does not belong to floor stack (").concat(t.id,").")),!1):!0}a(Pt,"validateFloorForStack");function Rt(s,t,o,i){return ae(s,t,o,"".concat(i," must be between ").concat(t," and ").concat(o,"."))}a(Rt,"validateZoomThreshold");var X=Zt("",{prefix:"[DynamicFocus]"});var D,tt,lt,Ut,jt=class jt{constructor(t,o){d(this,lt);p(this,"__type","outdoors");d(this,D);d(this,tt);c(this,D,t),c(this,tt,o)}get id(){return e(this,D).id}get floorStack(){return e(this,D)}get floor(){return e(this,D).defaultFloor}matchesFloorStack(t){return t===e(this,D)||t===e(this,D).id}show(){E(this,lt,Ut).call(this,!0)}hide(){E(this,lt,Ut).call(this,!1)}destroy(){this.matchesFloorStack(e(this,tt).currentFloorStack)||this.hide()}};D=new WeakMap,tt=new WeakMap,lt=new WeakSet,Ut=a(function(t){for(let o of e(this,D).floors)e(this,tt).updateState(o,{visible:t})},"#setVisible"),a(jt,"Outdoors");var It=jt;function le(s,t){let o=s.getByType("floor-stack"),i=o.find(n=>{var u;return((u=n.type)==null?void 0:u.toLowerCase())==="outdoor"});if(i)return i;let r=o.find(n=>n.facade==null&&!t.has(n.id));return r||(X.warn("No good candidate for the outdoor floor stack was found. Using the first floor stack."),o[0])}a(le,"getOutdoorFloorStack");var ue={indoorZoomThreshold:18,outdoorZoomThreshold:17,setFloorOnFocus:!0,autoFocus:!1,indoorAnimationOptions:{duration:150},outdoorAnimationOptions:{duration:150},autoAdjustFacadeHeights:!1,mode:"default-floor",preloadFloors:!0,dynamicBuildingInteriors:!0,dynamicLayers:[],isolateBelowGroundView:!1,forceInteriorsVisible:!1,showLabelsAndMarkersOnAllVisibleFloors:!1},Io=.2,Ao=.4;function Me(s,t){return"".concat(t," ").concat(s)}a(Me,"formatMessage");var $t=class $t extends Error{constructor(t,o=Gt){super(Me(t,o)),this.name="MappedinError"}};a($t,"MappedinError");var At=$t;var xe=a(s=>s,"linearEase"),Le=a(s=>s*s,"quadEaseIn"),_e=a(s=>1-Math.cos(s*Math.PI/2),"easeIn"),Ne=a(s=>1-(1-s)*(1-s),"quadEaseOut"),Ce=a(s=>1-Math.pow(1-s,3),"cubicEaseOut"),Ge={linear:xe,"ease-in":Le,"ease-out":Ne,"ease-in-out":_e,"ease-out-cubic":Ce};function Ze(s,t){let o=0;if(t.length<2)return o;let r=t[0]<t[1]?(n,u)=>n>u:(n,u)=>n<u;for(;o<t.length-1&&r(s,t[o+1]);)o++;return o>t.length-2?Math.max(0,t.length-2):o}a(Ze,"getInterpolationBreakpoint");function ce(s,t,o,i="ease-in"){if(t.length!==o.length)throw new At("Input and output ranges must have the same number of values.");s=Math.max(t[0],Math.min(s,t[t.length-1]));let r=Ze(s,t),n=(s-t[r])/(t[r+1]-t[r]),u=typeof i=="function"?i(n):Ge[i](n);return o[r]+u*(o[r+1]-o[r])}a(ce,"interpolateMulti");var M,ut,ct,N,dt,qt=class qt{constructor(t,o,i){p(this,"layers");p(this,"visible");d(this,M);d(this,ut,[]);d(this,ct,!1);d(this,N,new Map);p(this,"interpolationFn");d(this,dt,1);this.layers=t,this.visible=o,c(this,M,i)}processLayerGroup(t,o,i){if(!e(this,ct)&&(this.layers.forEach(r=>{let n=t[r];n&&e(this,ut).push(...n)}),c(this,ct,!0),this.visible)){let r=[o,i],n=[1,0];this.interpolationFn=u=>ce(u,r,n)}}setOpacity(t){var o,i,r;c(this,dt,t);for(let n of e(this,ut))if(n.startsWith("img_")){let u=e(this,M).Image3D.getById(n);if(u){let f=e(this,M).getState(u.image);e(this,N).has(n)||e(this,N).set(n,(o=f==null?void 0:f.opacity)!=null?o:1);let g=Math.min(e(this,N).get(n),t);e(this,M).updateState(u.image,{opacity:g})}}else{let u=(i=e(this,M).getMapData())==null?void 0:i.getById("space",n);if(!u)continue;let f=e(this,M).getState(u);e(this,N).has(n)||e(this,N).set(n,(r=f==null?void 0:f.opacity)!=null?r:1);let g=Math.min(e(this,N).get(n),t);e(this,M).updateState(u,{opacity:g,visible:g>0})}}get opacity(){return e(this,dt)}};M=new WeakMap,ut=new WeakMap,ct=new WeakMap,N=new WeakMap,dt=new WeakMap,a(qt,"LayerGroup");var Vt=qt;function Yt(s,t){s.forEach(o=>{if(o.interpolationFn!=null){let i=o.interpolationFn(t);i!=null&&(o.setOpacity(i),o.visible=i===1)}})}a(Yt,"runLayerGroupInterpolations");var O,l,P,h,Y,q,y,C,W,G,w,et,ht,ft,mt,x,R,ot,U,j,F,Wt,he,fe,zt,pt,gt,Ft,bt,yt,it,Tt,me,pe,L,Ht=class Ht{constructor(t){d(this,F);d(this,O);d(this,l);d(this,P);d(this,h,ue);d(this,Y,[]);d(this,q,new Set);d(this,y,new Map);d(this,C);d(this,W,!1);d(this,G,!1);d(this,w,0);d(this,et,0);d(this,ht,[]);d(this,ft,{});d(this,mt,{});d(this,x,"transition");d(this,R,"outdoor");d(this,ot,[]);d(this,U,!1);d(this,j,[]);p(this,"sceneUpdateQueue",Promise.resolve());p(this,"on",a((t,o)=>{e(this,O).on(t,o)},"on"));p(this,"off",a((t,o)=>{e(this,O).off(t,o)},"off"));d(this,pt,a(t=>{if(!this.isEnabled)return;let{facades:o}=t;if(Xt(o,this.focusedFacades)&&e(this,R)==="transition"&&!e(this,G))return;c(this,G,!1),c(this,Y,[]),e(this,q).clear();let i=e(this,h).isolateBelowGroundView&&e(this,w)<0;if(o.length>0)for(let r of o){let n=e(this,y).get(r.floorStack.id);if(n){if(i&&n.minElevation>=0)continue;e(this,q).add(n.id),e(this,Y).push(n)}}e(this,h).autoFocus&&this.focus()},"#handleFacadesInViewChange"));d(this,gt,a(async t=>{var f,g,m,$;if(!this.isEnabled)return;let{floor:o}=t,i=e(this,y).get(o.floorStack.id);i&&(i.activeFloor=o);let r=e(this,h).isolateBelowGroundView&&e(this,w)<0;(i==null?void 0:i.excluded)===!1&&!e(this,C).matchesFloorStack(o.floorStack)&&c(this,w,o.elevation);let n=e(this,h).isolateBelowGroundView&&e(this,w)<0,u=r&&!n;if(e(this,l).manualFloorVisibility===!0){t.reason!=="dynamic-focus"&&(u?(c(this,G,!0),e(this,l).Camera.updateFacadesInView(),e(this,h).autoFocus||(await e(this,L).call(this,o),e(this,O).publish("focus",{facades:this.focusedFacades}))):(await e(this,L).call(this,o),e(this,O).publish("focus",{facades:this.focusedFacades})));let V=(g=(f=i==null?void 0:i.floorsAltitudesMap.get(o.elevation))==null?void 0:f.altitude)!=null?g:0;e(this,l).options.multiFloorView!=null&&((m=e(this,l).options.multiFloorView)!=null&&m.enabled)&&(($=e(this,l).options.multiFloorView)!=null&&$.updateCameraElevationOnFloorChange)&&e(this,l).Camera.elevation!==V&&e(this,l).Camera.animateElevation(V,{duration:750,easing:"ease-in-out"})}},"#handleFloorChangeStart"));d(this,Ft,a(()=>{c(this,W,!0)},"#handleUserInteractionStart"));d(this,bt,a(()=>{c(this,W,!1)},"#handleUserInteractionEnd"));d(this,yt,a(()=>{e(this,L).call(this)},"#handleGlobalStateChange"));d(this,it,a(t=>{if(!this.isEnabled)return;let{zoomLevel:o}=t,i=te(o,e(this,h).indoorZoomThreshold,e(this,h).outdoorZoomThreshold);e(this,x)!==i&&(c(this,x,i),i==="in-range"?this.setIndoor():i==="out-of-range"&&this.setOutdoor()),Yt(e(this,j),o)},"#handleCameraChange"));d(this,L,a(async t=>{var g,m,$;if(e(this,l).manualFloorVisibility!==!0||!this.isEnabled)return;let o=t||e(this,l).currentFloor,i=e(this,l).getGlobalState().multiFloorView,r=e(this,l).options.multiFloorView?T(T({},e(this,l).options.multiFloorView),i):e(this,l).options.multiFloorView,n=((m=(g=e(this,l).Navigation)==null?void 0:g.floors)==null?void 0:m.map(V=>V.id))||[],u=(($=e(this,l).Navigation)==null?void 0:$.floorStacks.map(V=>V.id))||[],f=new Promise(async V=>{var St;await this.sceneUpdateQueue;let st=ie({buildings:Array.from(e(this,y).values()),inViewSet:e(this,q),currentFloor:o,zoomState:e(this,x),mode:e(this,h).mode,elevation:e(this,w),floorIdsInNavigation:n,floorStackIdsInNavigation:u,multiFloorView:r,getMultiFloorState:(St=e(this,h).customMultiFloorVisibilityState)!=null?St:Re,dynamicBuildingInteriors:e(this,h).dynamicBuildingInteriors,isolateBelowGroundView:e(this,h).isolateBelowGroundView,currentElevation:e(this,w),forceInteriorsVisible:e(this,h).forceInteriorsVisible,getFloorStackAltitudeData:a(I=>e(this,l).getFloorStackAltitudeData(I),"getFloorStackAltitudeData")}),nt=[];await Promise.all(Array.from(st.values()).map(async I=>{let{building:_,showIndoor:kt,floorStackState:z,facadeState:b,inFocus:Et,isAboveGroundInIsolation:H}=I;nt.push(z);let vt=se(_,kt);if(vt==="indoor")return E(this,F,me).call(this,_,z,b,Et);if(vt==="outdoor")return E(this,F,pe).call(this,_,z,b,u,H)})),e(this,l).Outdoor.setOpacity(ee(nt,e(this,h).mode)),c(this,ot,e(this,Y).filter(I=>{var _;return((_=st.get(I.id))==null?void 0:_.showIndoor)===!0}).map(I=>I.facade)),e(this,O).publish("focus",{facades:e(this,ot)}),V()});return this.sceneUpdateQueue=f,f},"#applyBuildingStates"));c(this,O,new wt),c(this,l,t),X.setLevel(J.logState),c(this,P,e(this,l).getMapData()),c(this,w,e(this,l).currentFloor.elevation),c(this,et,e(this,l).Camera.elevation);for(let o of e(this,P).getByType("facade"))e(this,y).set(o.floorStack.id,new Bt(o.floorStack,e(this,l)));E(this,F,fe).call(this),c(this,C,new It(le(e(this,P),e(this,y)),e(this,l))),e(this,l).on("floor-change-start",e(this,gt)),e(this,l).on("camera-change",e(this,it)),e(this,l).on("facades-in-view-change",e(this,pt)),e(this,l).on("user-interaction-start",e(this,Ft)),e(this,l).on("user-interaction-end",e(this,bt)),e(this,l).on("global-state-change",e(this,yt))}enable(t){if(e(this,U)){X.warn("enable() called on an already enabled Dynamic Focus instance.");return}c(this,U,!0),e(this,l).manualFloorVisibility=!0,e(this,C).show(),this.updateState(T(T({},e(this,h)),t)),E(this,F,he).call(this),e(this,it).call(this,{zoomLevel:e(this,l).Camera.zoomLevel,center:e(this,l).Camera.center,bearing:e(this,l).Camera.bearing,pitch:e(this,l).Camera.pitch}),e(this,l).Camera.updateFacadesInView()}disable(){if(!e(this,U)){X.warn("disable() called on an already disabled Dynamic Focus instance.");return}c(this,U,!1),e(this,l).manualFloorVisibility=!1}get isEnabled(){return e(this,U)}get isIndoor(){return e(this,R)==="indoor"}get isOutdoor(){return e(this,R)==="outdoor"}get outdoorsFloorStack(){return e(this,C).floorStack}get layers(){return e(this,ht)}get layersBySpaceId(){return e(this,ft)}setIndoor(){c(this,R,"indoor"),c(this,x,"in-range"),E(this,F,Wt).call(this)}setOutdoor(){c(this,R,"outdoor"),c(this,x,"out-of-range"),E(this,F,Wt).call(this)}get focusedFacades(){return[...e(this,ot)]}getState(){return T({},e(this,h))}updateState(t){var r,n;let o=!1,i=e(this,h).isolateBelowGroundView&&e(this,w)<0;if(t.indoorZoomThreshold!=null&&(t.indoorZoomThreshold=Rt(t.indoorZoomThreshold,(r=t==null?void 0:t.outdoorZoomThreshold)!=null?r:e(this,h).outdoorZoomThreshold,e(this,l).Camera.maxZoomLevel,"indoorZoomThreshold"),o=!0),t.outdoorZoomThreshold!=null&&(t.outdoorZoomThreshold=Rt(t.outdoorZoomThreshold,e(this,l).Camera.minZoomLevel,(n=t==null?void 0:t.indoorZoomThreshold)!=null?n:e(this,h).indoorZoomThreshold,"outdoorZoomThreshold"),o=!0),t.mode!=null&&(t.mode=re.includes(t.mode)?t.mode:"default-floor"),t.autoAdjustFacadeHeights!=null&&(e(this,h).autoAdjustFacadeHeights=t.autoAdjustFacadeHeights),t.dynamicBuildingInteriors!=null&&t.dynamicBuildingInteriors!==e(this,h).dynamicBuildingInteriors&&(o=!0),t.isolateBelowGroundView!=null&&t.isolateBelowGroundView!==e(this,h).isolateBelowGroundView&&(o=!0),t.forceInteriorsVisible!=null&&t.forceInteriorsVisible!==e(this,h).forceInteriorsVisible&&(o=!0),t.showLabelsAndMarkersOnAllVisibleFloors!=null&&t.showLabelsAndMarkersOnAllVisibleFloors!==e(this,h).showLabelsAndMarkersOnAllVisibleFloors&&(o=!0),c(this,h,Object.assign({},e(this,h),Object.fromEntries(Object.entries(t).filter(([,u])=>u!=null)))),t.mode!=null&&t.preloadFloors&&E(this,F,zt).call(this,t.mode),o){let u=e(this,h).isolateBelowGroundView&&e(this,w)<0;i&&!u?(c(this,G,!0),e(this,l).Camera.updateFacadesInView(),e(this,h).autoFocus||e(this,L).call(this)):e(this,L).call(this)}}destroy(){this.disable(),e(this,l).off("facades-in-view-change",e(this,pt)),e(this,l).off("floor-change-start",e(this,gt)),e(this,l).off("camera-change",e(this,it)),e(this,l).off("user-interaction-start",e(this,Ft)),e(this,l).off("user-interaction-end",e(this,bt)),e(this,l).off("global-state-change",e(this,yt)),e(this,y).forEach(t=>t.destroy()),e(this,C).destroy(),e(this,O).destroy(),c(this,j,[])}async focus(t=e(this,h).setFloorOnFocus){if(t)if(ne(e(this,et),e(this,l).Camera.elevation,e(this,W)))c(this,et,e(this,l).Camera.elevation),c(this,G,!0);else{let o=oe(e(this,Y),e(this,C),e(this,x)),i=o?Ot(o,e(this,h).mode,e(this,w)):void 0;i&&i.id!==e(this,l).currentFloor.id&&e(this,l).setFloor(i,{context:"dynamic-focus"})}await e(this,L).call(this),e(this,O).publish("focus",{facades:this.focusedFacades})}preloadFloors(){E(this,F,zt).call(this,e(this,h).mode)}setDefaultFloorForStack(t,o){if(!Pt(o,t))return;let i=e(this,y).get(t.id);i&&(i.defaultFloor=o)}resetDefaultFloorForStack(t){let o=e(this,y).get(t.id);o&&(o.defaultFloor=t.defaultFloor)}getDefaultFloorForStack(t){var o;return((o=e(this,y).get(t.id))==null?void 0:o.defaultFloor)||t.defaultFloor||t.floors[0]}setCurrentFloorForStack(t,o){if(!Pt(o,t))return;let i=e(this,y).get(t.id);i&&(i.activeFloor=o,e(this,L).call(this))}exclude(t){let o=Array.isArray(t)?t:[t];for(let i of o){let r=e(this,y).get(i.id);r&&(r.excluded=!0)}}include(t){let o=Array.isArray(t)?t:[t];for(let i of o){let r=e(this,y).get(i.id);r&&(r.excluded=!1)}}getCurrentFloorForStack(t){var o;return((o=e(this,y).get(t.id))==null?void 0:o.activeFloor)||this.getDefaultFloorForStack(t)}};O=new WeakMap,l=new WeakMap,P=new WeakMap,h=new WeakMap,Y=new WeakMap,q=new WeakMap,y=new WeakMap,C=new WeakMap,W=new WeakMap,G=new WeakMap,w=new WeakMap,et=new WeakMap,ht=new WeakMap,ft=new WeakMap,mt=new WeakMap,x=new WeakMap,R=new WeakMap,ot=new WeakMap,U=new WeakMap,j=new WeakMap,F=new WeakSet,Wt=a(function(){e(this,h).autoFocus&&(e(this,W)?this.focus():c(this,G,!0)),e(this,O).publish("state-change")},"#handleViewStateChange"),he=a(function(){c(this,j,[]);for(let t of e(this,h).dynamicLayers){let o=new Vt([t],!0,e(this,l));o.processLayerGroup(e(this,mt),e(this,h).outdoorZoomThreshold,e(this,h).indoorZoomThreshold),e(this,j).push(o)}Yt(e(this,j),e(this,l).Camera.zoomLevel)},"#initializeLayerGroups"),fe=a(function(){var r,n,u;let t=(u=(n=(r=e(this,P).internal.mvf)==null?void 0:r.enterprise)==null?void 0:n.layers)!=null?u:[],o={},i={};t.forEach(f=>{o[f.name]||(o[f.name]=[]),o[f.name].push(...f.spaces.map(({spaceId:g})=>g));for(let{spaceId:g}of f.spaces)i[g]==null&&(i[g]=[]),i[g].push(f.name)}),c(this,ht,t.map(({name:f})=>f)),c(this,ft,i),c(this,mt,o)},"#setupLayers"),zt=a(function(t){e(this,l).preloadFloors(e(this,P).getByType("facade").map(o=>Ot(e(this,y).get(o.floorStack.id),t,e(this,w))).filter(o=>o!=null&&Pe.is(o)))},"#preloadFloors"),pt=new WeakMap,gt=new WeakMap,Ft=new WeakMap,bt=new WeakMap,yt=new WeakMap,it=new WeakMap,Tt=a(function(t,o,i,r=!1){t.forEach(n=>{if(n.floor)if(o){let f=i!==void 0&&!r?rt(T({},n.state),{labels:rt(T({},n.state.labels),{enabled:n.state.labels.enabled&&i}),markers:rt(T({},n.state.markers),{enabled:n.state.markers.enabled&&i}),occlusion:rt(T({},n.state.occlusion),{enabled:n.state.occlusion.enabled&&i})}):n.state;e(this,l).updateState(n.floor,f)}else e(this,l).updateState(n.floor,{visible:!1})})},"#updateFloorVisibility"),me=a(async function(t,o,i,r){return E(this,F,Tt).call(this,o.floorStates,!0,r,e(this,h).showLabelsAndMarkersOnAllVisibleFloors),t.animateFacade(i.state,e(this,h).indoorAnimationOptions)},"#animateIndoorSequence"),pe=a(async function(t,o,i,r,n){let u=n;u&&E(this,F,Tt).call(this,o.floorStates,!1,void 0,e(this,h).showLabelsAndMarkersOnAllVisibleFloors);let f=await t.animateFacade(i.state,e(this,h).outdoorAnimationOptions);return f.result==="completed"&&!u&&E(this,F,Tt).call(this,o.floorStates,Ct({building:t,currentFloor:e(this,l).currentFloor,inRange:e(this,x)==="in-range",inFocus:e(this,q).has(t.id),mode:e(this,h).mode,elevation:e(this,w),inNavigation:r.includes(t.floorStack.id),dynamicBuildingInteriors:e(this,h).dynamicBuildingInteriors,forceInteriorsVisible:e(this,h).forceInteriorsVisible}),void 0,e(this,h).showLabelsAndMarkersOnAllVisibleFloors),f},"#animateOutdoorSequence"),L=new WeakMap,a(Ht,"DynamicFocus");var de=Ht;export{a,Io as b,Ao as c,de as d};
|
package/lib/esm/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as f,b as u,c as y,d as F}from"./chunk-
|
|
1
|
+
import{a as f,b as u,c as y,d as F}from"./chunk-FOQKL4S4.js";var O=f((t,e)=>{var n,c,s,o;let l={initialVisibility:(n=e.initialVisibility)!=null?n:"outdoor-first",layersBySpaceId:(c=e.layersBySpaceId)!=null?c:{},focusLayers:(s=e.focusLayers)!=null?s:[],defaultFloor:(o=e.defaultFloor)!=null?o:t.currentFloor},i=T(t,l),r=i+y,a=i+u;return l.initialVisibility==="indoor-first"&&(r=i-u,a=i-y),{indoorZoomThreshold:r,outdoorZoomThreshold:a}},"calculateZoomThresholds");function T(t,e){var a,n;let l=t.getMapData();if(e.focusLayers.length){let s=l.getByType("space").filter(o=>{var d,p;let m=(d=e.layersBySpaceId[o.id])==null?void 0:d[0];return typeof m=="string"&&o.floor.id===((p=e.defaultFloor)==null?void 0:p.id)&&e.focusLayers.indexOf(m)!==-1});if(s.length){let o=t.Camera.getFocusOnTransform(s,{}).zoomLevel;if(o!==void 0)return o}}let i=l.getByType("floor-stack"),r=1/0;for(let c of i)for(let s of c.floors){let o=(a=t.Camera.getFocusOnTransform(s,{}).zoomLevel)!=null?a:1/0;o<r&&(r=o)}return r!==1/0?r:(n=t.Camera.getFocusOnTransform(e.defaultFloor,{}).zoomLevel)!=null?n:0}f(T,"getDefaultZoomLevel");export{F as DynamicFocus,O as calculateZoomThresholds};
|
package/lib/esm/react/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as t,d as a}from"../chunk-
|
|
1
|
+
import{a as t,d as a}from"../chunk-FOQKL4S4.js";import{useCallback as y,useState as p,useMemo as F}from"react";import{useMap as l,useMapViewExtension as D}from"@mappedin/react-sdk";function d(){let[,n]=p({});return y(()=>n({}),[])}t(d,"useForceUpdate");function i(){let{mapView:n}=l(),r=d(),{register:o}=D("dynamic-focus",{onRegister:t(()=>{let e=new a(n);return e.on("state-change",r),e},"onRegister"),onDeregister:t(e=>{e.off("state-change",r),e.destroy()},"onDeregister")}),s=o();if(!s)throw new Error("DynamicFocus is not initialized");return F(()=>{let e=new WeakMap;return new Proxy(s,{get(u,m){let c=u[m];return typeof c=="function"?(e.has(c)||e.set(c,c.bind(u)),e.get(c)):c}})},[s])}t(i,"useDynamicFocus");import{useCallback as w,useEffect as E,useRef as k}from"react";function x(n,r){let o=i(),s=k(r);s.current=r;let e=w(u=>{s.current(u)},[]);E(()=>{if(o!=null)return o.on(n,e),()=>{o!=null&&o.off(n,e)}},[o,n,e])}t(x,"useDynamicFocusEvent");export{i as useDynamicFocus,x as useDynamicFocusEvent};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mappedin/dynamic-focus",
|
|
3
|
-
"version": "6.17.
|
|
3
|
+
"version": "6.17.1-beta.0",
|
|
4
4
|
"homepage": "https://developer.mappedin.com/",
|
|
5
5
|
"private": false,
|
|
6
6
|
"main": "lib/esm/index.js",
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"react": ">=16.8.0",
|
|
40
|
-
"@mappedin/mappedin-js": "^6.17.
|
|
41
|
-
"@mappedin/react-
|
|
42
|
-
"@mappedin/react-sdk": "^6.17.
|
|
40
|
+
"@mappedin/mappedin-js": "^6.17.1",
|
|
41
|
+
"@mappedin/react-sdk": "^6.17.1",
|
|
42
|
+
"@mappedin/react-native-sdk": "^6.17.1"
|
|
43
43
|
},
|
|
44
44
|
"peerDependenciesMeta": {
|
|
45
45
|
"@mappedin/react-sdk": {
|