@mappedin/mappedin-js 6.0.1-beta.1 → 6.0.1-beta.2
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/THIRD_PARTY_LICENSES.txt +58 -602
- package/lib/esm/{GLTFExporter-KPPZ5BWT.js → GLTFExporter-KPBXVK2J.js} +1 -1
- package/lib/esm/{GLTFLoader-YATT2FR2.js → GLTFLoader-WY3JJZTH.js} +1 -1
- package/lib/esm/{browser-MBHO2IHH.js → browser-YJRMCITR.js} +1 -1
- package/lib/esm/{chunk-AD5XTQM2.js → chunk-4GHXJDEX.js} +1 -1
- package/lib/esm/{chunk-FFDKE6ZN.js → chunk-BC5TNRJZ.js} +1 -1
- package/lib/esm/{chunk-V5JUBEEV.js → chunk-FOZIXWBX.js} +9 -9
- package/lib/esm/{chunk-QYKF4M6W.js → chunk-GQMFEIP3.js} +1 -1
- package/lib/esm/{chunk-ICAZ6TUF.js → chunk-HGQSHE2E.js} +1 -1
- package/lib/esm/index.d.ts +8 -0
- package/lib/esm/index.js +1 -1
- package/lib/esm/{inspector-6LWH2QCH.js → inspector-HU2N2RIA.js} +1 -1
- package/lib/esm/{outdoor-context-v4-HOWB3AEV.js → outdoor-context-v4-2EO5ZD2B.js} +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
var h=Object.create;var f=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var j=Object.getOwnPropertyNames;var k=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty;var m=(b,a,c)=>a in b?f(b,a,{enumerable:!0,configurable:!0,writable:!0,value:c}):b[a]=c;var r=(b,a)=>f(b,"name",{value:a,configurable:!0});var n=(b,a)=>()=>(b&&(a=b(b=0)),a);var s=(b,a)=>()=>(a||b((a={exports:{}}).exports,a),a.exports),t=(b,a)=>{for(var c in a)f(b,c,{get:a[c],enumerable:!0})},o=(b,a,c,d)=>{if(a&&typeof a=="object"||typeof a=="function")for(let e of j(a))!l.call(b,e)&&e!==c&&f(b,e,{get:()=>a[e],enumerable:!(d=i(a,e))||d.enumerable});return b};var u=(b,a,c)=>(c=b!=null?h(k(b)):{},o(a||!b||!b.__esModule?f(c,"default",{value:b,enumerable:!0}):c,b));var v=(b,a,c)=>(m(b,typeof a!="symbol"?a+"":a,c),c),g=(b,a,c)=>{if(!a.has(b))throw TypeError("Cannot "+c)};var w=(b,a,c)=>(g(b,a,"read from private field"),c?c.call(b):a.get(b)),x=(b,a,c)=>{if(a.has(b))throw TypeError("Cannot add the same private member more than once");a instanceof WeakSet?a.add(b):a.set(b,c)},y=(b,a,c,d)=>(g(b,a,"write to private field"),d?d.call(b,c):a.set(b,c),c);var z=(b,a,c)=>(g(b,a,"access private method"),c);var C,q=n(()=>{C={env:{NODE_ENV:"production",npm_package_version:"6.0.1-beta.
|
|
1
|
+
var h=Object.create;var f=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var j=Object.getOwnPropertyNames;var k=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty;var m=(b,a,c)=>a in b?f(b,a,{enumerable:!0,configurable:!0,writable:!0,value:c}):b[a]=c;var r=(b,a)=>f(b,"name",{value:a,configurable:!0});var n=(b,a)=>()=>(b&&(a=b(b=0)),a);var s=(b,a)=>()=>(a||b((a={exports:{}}).exports,a),a.exports),t=(b,a)=>{for(var c in a)f(b,c,{get:a[c],enumerable:!0})},o=(b,a,c,d)=>{if(a&&typeof a=="object"||typeof a=="function")for(let e of j(a))!l.call(b,e)&&e!==c&&f(b,e,{get:()=>a[e],enumerable:!(d=i(a,e))||d.enumerable});return b};var u=(b,a,c)=>(c=b!=null?h(k(b)):{},o(a||!b||!b.__esModule?f(c,"default",{value:b,enumerable:!0}):c,b));var v=(b,a,c)=>(m(b,typeof a!="symbol"?a+"":a,c),c),g=(b,a,c)=>{if(!a.has(b))throw TypeError("Cannot "+c)};var w=(b,a,c)=>(g(b,a,"read from private field"),c?c.call(b):a.get(b)),x=(b,a,c)=>{if(a.has(b))throw TypeError("Cannot add the same private member more than once");a instanceof WeakSet?a.add(b):a.set(b,c)},y=(b,a,c,d)=>(g(b,a,"write to private field"),d?d.call(b,c):a.set(b,c),c);var z=(b,a,c)=>(g(b,a,"access private method"),c);var C,q=n(()=>{C={env:{NODE_ENV:"production",npm_package_version:"6.0.1-beta.2"}}});export{r as a,s as b,t as c,u as d,v as e,w as f,x as g,y as h,z as i,q as j,C as k};
|
package/lib/esm/index.d.ts
CHANGED
|
@@ -593,6 +593,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects' {
|
|
|
593
593
|
* Represents a map of entrance IDs to obstruction IDs.
|
|
594
594
|
*/
|
|
595
595
|
readonly obstructionIdByEntranceId: Record<string, string>;
|
|
596
|
+
doorsByNodeId: Record<string, Door>;
|
|
596
597
|
/**
|
|
597
598
|
* @internal
|
|
598
599
|
*/
|
|
@@ -2020,6 +2021,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/space' {
|
|
|
2020
2021
|
import type { MapDataInternal } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
2021
2022
|
import type Floor from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/floor';
|
|
2022
2023
|
import BaseMapData from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-object';
|
|
2024
|
+
import Door from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/door';
|
|
2023
2025
|
/**
|
|
2024
2026
|
* Represents the various types of spaces that can be defined within a map.
|
|
2025
2027
|
* - 'room': A standard room or enclosed area.
|
|
@@ -2081,6 +2083,12 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/space' {
|
|
|
2081
2083
|
* @throws Will throw an error if the floor is not found.
|
|
2082
2084
|
*/
|
|
2083
2085
|
get floor(): Floor;
|
|
2086
|
+
/**
|
|
2087
|
+
* Gets the array of {@link Door}s associated with the space.
|
|
2088
|
+
*
|
|
2089
|
+
* @returns {Door[]} The doors array.
|
|
2090
|
+
*/
|
|
2091
|
+
get doors(): Door[];
|
|
2084
2092
|
/**
|
|
2085
2093
|
* Gets the center {@link Coordinate} of the space.
|
|
2086
2094
|
*
|
package/lib/esm/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,r as p,s as q,t as r,u as s,v as t,w as u,x as v,y as w}from"./chunk-
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,r as p,s as q,t as r,u as s,v as t,w as u,x as v,y as w}from"./chunk-FOZIXWBX.js";import"./chunk-4GHXJDEX.js";import"./chunk-BC5TNRJZ.js";import"./chunk-GQMFEIP3.js";import"./chunk-HGQSHE2E.js";export{n as Annotation,j as Connection,e as Coordinate,g as Door,a as E_SDK_LOG_LEVEL,i as Floor,f as Hyperlink,l as Image,k as MapObject,m as PointOfInterest,h as Space,p as analytics,u as createMapLibreOverlay,o as enableTestMode,t as getMapData,r as getMapDataEnterprise,q as hydrateMapDataFromMVF,c as parseMVF,b as setLoggerLevel,s as setUseEnterpriseAPI,w as show3dMap,v as show3dMapGeojson,d as unzipMVF};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{e as R,p as Z,q as Q,r as q}from"./chunk-V5JUBEEV.js";import"./chunk-AD5XTQM2.js";import"./chunk-FFDKE6ZN.js";import{J as K}from"./chunk-QYKF4M6W.js";import{a as s,j as y}from"./chunk-ICAZ6TUF.js";y();y();y();y();var E=class E{constructor(t,e,i,r,a="div"){this.parent=t,this.object=e,this.property=i,this._disabled=!1,this._hidden=!1,this.initialValue=this.getValue(),this.domElement=document.createElement(a),this.domElement.classList.add("controller"),this.domElement.classList.add(r),this.$name=document.createElement("div"),this.$name.classList.add("name"),E.nextNameID=E.nextNameID||0,this.$name.id=`lil-gui-name-${++E.nextNameID}`,this.$widget=document.createElement("div"),this.$widget.classList.add("widget"),this.$disable=this.$widget,this.domElement.appendChild(this.$name),this.domElement.appendChild(this.$widget),this.domElement.addEventListener("keydown",o=>o.stopPropagation()),this.domElement.addEventListener("keyup",o=>o.stopPropagation()),this.parent.children.push(this),this.parent.controllers.push(this),this.parent.$children.appendChild(this.domElement),this._listenCallback=this._listenCallback.bind(this),this.name(i)}name(t){return this._name=t,this.$name.textContent=t,this}onChange(t){return this._onChange=t,this}_callOnChange(){this.parent._callOnChange(this),this._onChange!==void 0&&this._onChange.call(this,this.getValue()),this._changed=!0}onFinishChange(t){return this._onFinishChange=t,this}_callOnFinishChange(){this._changed&&(this.parent._callOnFinishChange(this),this._onFinishChange!==void 0&&this._onFinishChange.call(this,this.getValue())),this._changed=!1}reset(){return this.setValue(this.initialValue),this._callOnFinishChange(),this}enable(t=!0){return this.disable(!t)}disable(t=!0){return t===this._disabled?this:(this._disabled=t,this.domElement.classList.toggle("disabled",t),this.$disable.toggleAttribute("disabled",t),this)}show(t=!0){return this._hidden=!t,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}options(t){let e=this.parent.add(this.object,this.property,t);return e.name(this._name),this.destroy(),e}min(t){return this}max(t){return this}step(t){return this}decimals(t){return this}listen(t=!0){return this._listening=t,this._listenCallbackID!==void 0&&(cancelAnimationFrame(this._listenCallbackID),this._listenCallbackID=void 0),this._listening&&this._listenCallback(),this}_listenCallback(){this._listenCallbackID=requestAnimationFrame(this._listenCallback);let t=this.save();t!==this._listenPrevValue&&this.updateDisplay(),this._listenPrevValue=t}getValue(){return this.object[this.property]}setValue(t){return this.getValue()!==t&&(this.object[this.property]=t,this._callOnChange(),this.updateDisplay()),this}updateDisplay(){return this}load(t){return this.setValue(t),this._callOnFinishChange(),this}save(){return this.getValue()}destroy(){this.listen(!1),this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.controllers.splice(this.parent.controllers.indexOf(this),1),this.parent.$children.removeChild(this.domElement)}};s(E,"Controller");var _=E,H=class H extends _{constructor(t,e,i){super(t,e,i,"boolean","label"),this.$input=document.createElement("input"),this.$input.setAttribute("type","checkbox"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$widget.appendChild(this.$input),this.$input.addEventListener("change",()=>{this.setValue(this.$input.checked),this._callOnFinishChange()}),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.checked=this.getValue(),this}};s(H,"BooleanController");var M=H;function I(n){let t,e;return(t=n.match(/(#|0x)?([a-f0-9]{6})/i))?e=t[2]:(t=n.match(/rgb\(\s*(\d*)\s*,\s*(\d*)\s*,\s*(\d*)\s*\)/))?e=parseInt(t[1]).toString(16).padStart(2,0)+parseInt(t[2]).toString(16).padStart(2,0)+parseInt(t[3]).toString(16).padStart(2,0):(t=n.match(/^#?([a-f0-9])([a-f0-9])([a-f0-9])$/i))&&(e=t[1]+t[1]+t[2]+t[2]+t[3]+t[3]),e?"#"+e:!1}s(I,"normalizeColorString");var pt={isPrimitive:!0,match:n=>typeof n=="string",fromHexString:I,toHexString:I},k={isPrimitive:!0,match:n=>typeof n=="number",fromHexString:n=>parseInt(n.substring(1),16),toHexString:n=>"#"+n.toString(16).padStart(6,0)},gt={isPrimitive:!1,match:n=>Array.isArray(n),fromHexString(n,t,e=1){let i=k.fromHexString(n);t[0]=(i>>16&255)/255*e,t[1]=(i>>8&255)/255*e,t[2]=(i&255)/255*e},toHexString([n,t,e],i=1){i=255/i;let r=n*i<<16^t*i<<8^e*i<<0;return k.toHexString(r)}},mt={isPrimitive:!1,match:n=>Object(n)===n,fromHexString(n,t,e=1){let i=k.fromHexString(n);t.r=(i>>16&255)/255*e,t.g=(i>>8&255)/255*e,t.b=(i&255)/255*e},toHexString({r:n,g:t,b:e},i=1){i=255/i;let r=n*i<<16^t*i<<8^e*i<<0;return k.toHexString(r)}},ft=[pt,k,gt,mt];function vt(n){return ft.find(t=>t.match(n))}s(vt,"getColorFormat");var G=class G extends _{constructor(t,e,i,r){super(t,e,i,"color"),this.$input=document.createElement("input"),this.$input.setAttribute("type","color"),this.$input.setAttribute("tabindex",-1),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$text=document.createElement("input"),this.$text.setAttribute("type","text"),this.$text.setAttribute("spellcheck","false"),this.$text.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this.$display.appendChild(this.$input),this.$widget.appendChild(this.$display),this.$widget.appendChild(this.$text),this._format=vt(this.initialValue),this._rgbScale=r,this._initialValueHexString=this.save(),this._textFocused=!1,this.$input.addEventListener("input",()=>{this._setValueFromHexString(this.$input.value)}),this.$input.addEventListener("blur",()=>{this._callOnFinishChange()}),this.$text.addEventListener("input",()=>{let a=I(this.$text.value);a&&this._setValueFromHexString(a)}),this.$text.addEventListener("focus",()=>{this._textFocused=!0,this.$text.select()}),this.$text.addEventListener("blur",()=>{this._textFocused=!1,this.updateDisplay(),this._callOnFinishChange()}),this.$disable=this.$text,this.updateDisplay()}reset(){return this._setValueFromHexString(this._initialValueHexString),this}_setValueFromHexString(t){if(this._format.isPrimitive){let e=this._format.fromHexString(t);this.setValue(e)}else this._format.fromHexString(t,this.getValue(),this._rgbScale),this._callOnChange(),this.updateDisplay()}save(){return this._format.toHexString(this.getValue(),this._rgbScale)}load(t){return this._setValueFromHexString(t),this._callOnFinishChange(),this}updateDisplay(){return this.$input.value=this._format.toHexString(this.getValue(),this._rgbScale),this._textFocused||(this.$text.value=this.$input.value.substring(1)),this.$display.style.backgroundColor=this.$input.value,this}};s(G,"ColorController");var F=G,T=class T extends _{constructor(t,e,i){super(t,e,i,"function"),this.$button=document.createElement("button"),this.$button.appendChild(this.$name),this.$widget.appendChild(this.$button),this.$button.addEventListener("click",r=>{r.preventDefault(),this.getValue().call(this.object),this._callOnChange()}),this.$button.addEventListener("touchstart",()=>{},{passive:!0}),this.$disable=this.$button}};s(T,"FunctionController");var $=T,U=class U extends _{constructor(t,e,i,r,a,o){super(t,e,i,"number"),this._initInput(),this.min(r),this.max(a);let h=o!==void 0;this.step(h?o:this._getImplicitStep(),h),this.updateDisplay()}decimals(t){return this._decimals=t,this.updateDisplay(),this}min(t){return this._min=t,this._onUpdateMinMax(),this}max(t){return this._max=t,this._onUpdateMinMax(),this}step(t,e=!0){return this._step=t,this._stepExplicit=e,this}updateDisplay(){let t=this.getValue();if(this._hasSlider){let e=(t-this._min)/(this._max-this._min);e=Math.max(0,Math.min(e,1)),this.$fill.style.width=e*100+"%"}return this._inputFocused||(this.$input.value=this._decimals===void 0?t:t.toFixed(this._decimals)),this}_initInput(){this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("aria-labelledby",this.$name.id),window.matchMedia("(pointer: coarse)").matches&&(this.$input.setAttribute("type","number"),this.$input.setAttribute("step","any")),this.$widget.appendChild(this.$input),this.$disable=this.$input;let e=s(()=>{let p=parseFloat(this.$input.value);isNaN(p)||(this._stepExplicit&&(p=this._snap(p)),this.setValue(this._clamp(p)))},"onInput"),i=s(p=>{let C=parseFloat(this.$input.value);isNaN(C)||(this._snapClampSetValue(C+p),this.$input.value=this.getValue())},"increment"),r=s(p=>{p.key==="Enter"&&this.$input.blur(),p.code==="ArrowUp"&&(p.preventDefault(),i(this._step*this._arrowKeyMultiplier(p))),p.code==="ArrowDown"&&(p.preventDefault(),i(this._step*this._arrowKeyMultiplier(p)*-1))},"onKeyDown"),a=s(p=>{this._inputFocused&&(p.preventDefault(),i(this._step*this._normalizeMouseWheel(p)))},"onWheel"),o=!1,h,g,b,m,v,l=5,u=s(p=>{h=p.clientX,g=b=p.clientY,o=!0,m=this.getValue(),v=0,window.addEventListener("mousemove",c),window.addEventListener("mouseup",d)},"onMouseDown"),c=s(p=>{if(o){let C=p.clientX-h,L=p.clientY-g;Math.abs(L)>l?(p.preventDefault(),this.$input.blur(),o=!1,this._setDraggingStyle(!0,"vertical")):Math.abs(C)>l&&d()}if(!o){let C=p.clientY-b;v-=C*this._step*this._arrowKeyMultiplier(p),m+v>this._max?v=this._max-m:m+v<this._min&&(v=this._min-m),this._snapClampSetValue(m+v)}b=p.clientY},"onMouseMove"),d=s(()=>{this._setDraggingStyle(!1,"vertical"),this._callOnFinishChange(),window.removeEventListener("mousemove",c),window.removeEventListener("mouseup",d)},"onMouseUp"),A=s(()=>{this._inputFocused=!0},"onFocus"),f=s(()=>{this._inputFocused=!1,this.updateDisplay(),this._callOnFinishChange()},"onBlur");this.$input.addEventListener("input",e),this.$input.addEventListener("keydown",r),this.$input.addEventListener("wheel",a,{passive:!1}),this.$input.addEventListener("mousedown",u),this.$input.addEventListener("focus",A),this.$input.addEventListener("blur",f)}_initSlider(){this._hasSlider=!0,this.$slider=document.createElement("div"),this.$slider.classList.add("slider"),this.$fill=document.createElement("div"),this.$fill.classList.add("fill"),this.$slider.appendChild(this.$fill),this.$widget.insertBefore(this.$slider,this.$input),this.domElement.classList.add("hasSlider");let t=s((f,p,C,L,ut)=>(f-p)/(C-p)*(ut-L)+L,"map"),e=s(f=>{let p=this.$slider.getBoundingClientRect(),C=t(f,p.left,p.right,this._min,this._max);this._snapClampSetValue(C)},"setValueFromX"),i=s(f=>{this._setDraggingStyle(!0),e(f.clientX),window.addEventListener("mousemove",r),window.addEventListener("mouseup",a)},"mouseDown"),r=s(f=>{e(f.clientX)},"mouseMove"),a=s(()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("mousemove",r),window.removeEventListener("mouseup",a)},"mouseUp"),o=!1,h,g,b=s(f=>{f.preventDefault(),this._setDraggingStyle(!0),e(f.touches[0].clientX),o=!1},"beginTouchDrag"),m=s(f=>{f.touches.length>1||(this._hasScrollBar?(h=f.touches[0].clientX,g=f.touches[0].clientY,o=!0):b(f),window.addEventListener("touchmove",v,{passive:!1}),window.addEventListener("touchend",l))},"onTouchStart"),v=s(f=>{if(o){let p=f.touches[0].clientX-h,C=f.touches[0].clientY-g;Math.abs(p)>Math.abs(C)?b(f):(window.removeEventListener("touchmove",v),window.removeEventListener("touchend",l))}else f.preventDefault(),e(f.touches[0].clientX)},"onTouchMove"),l=s(()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("touchmove",v),window.removeEventListener("touchend",l)},"onTouchEnd"),u=this._callOnFinishChange.bind(this),c=400,d,A=s(f=>{if(Math.abs(f.deltaX)<Math.abs(f.deltaY)&&this._hasScrollBar)return;f.preventDefault();let C=this._normalizeMouseWheel(f)*this._step;this._snapClampSetValue(this.getValue()+C),this.$input.value=this.getValue(),clearTimeout(d),d=setTimeout(u,c)},"onWheel");this.$slider.addEventListener("mousedown",i),this.$slider.addEventListener("touchstart",m,{passive:!1}),this.$slider.addEventListener("wheel",A,{passive:!1})}_setDraggingStyle(t,e="horizontal"){this.$slider&&this.$slider.classList.toggle("active",t),document.body.classList.toggle("lil-gui-dragging",t),document.body.classList.toggle(`lil-gui-${e}`,t)}_getImplicitStep(){return this._hasMin&&this._hasMax?(this._max-this._min)/1e3:.1}_onUpdateMinMax(){!this._hasSlider&&this._hasMin&&this._hasMax&&(this._stepExplicit||this.step(this._getImplicitStep(),!1),this._initSlider(),this.updateDisplay())}_normalizeMouseWheel(t){let{deltaX:e,deltaY:i}=t;return Math.floor(t.deltaY)!==t.deltaY&&t.wheelDelta&&(e=0,i=-t.wheelDelta/120,i*=this._stepExplicit?1:10),e+-i}_arrowKeyMultiplier(t){let e=this._stepExplicit?1:10;return t.shiftKey?e*=10:t.altKey&&(e/=10),e}_snap(t){let e=Math.round(t/this._step)*this._step;return parseFloat(e.toPrecision(15))}_clamp(t){return t<this._min&&(t=this._min),t>this._max&&(t=this._max),t}_snapClampSetValue(t){this.setValue(this._clamp(this._snap(t)))}get _hasScrollBar(){let t=this.parent.root.$children;return t.scrollHeight>t.clientHeight}get _hasMin(){return this._min!==void 0}get _hasMax(){return this._max!==void 0}};s(U,"NumberController");var D=U,V=class V extends _{constructor(t,e,i,r){super(t,e,i,"option"),this.$select=document.createElement("select"),this.$select.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this.$select.addEventListener("change",()=>{this.setValue(this._values[this.$select.selectedIndex]),this._callOnFinishChange()}),this.$select.addEventListener("focus",()=>{this.$display.classList.add("focus")}),this.$select.addEventListener("blur",()=>{this.$display.classList.remove("focus")}),this.$widget.appendChild(this.$select),this.$widget.appendChild(this.$display),this.$disable=this.$select,this.options(r)}options(t){return this._values=Array.isArray(t)?t:Object.values(t),this._names=Array.isArray(t)?t:Object.keys(t),this.$select.replaceChildren(),this._names.forEach(e=>{let i=document.createElement("option");i.textContent=e,this.$select.appendChild(i)}),this.updateDisplay(),this}updateDisplay(){let t=this.getValue(),e=this._values.indexOf(t);return this.$select.selectedIndex=e,this.$display.textContent=e===-1?t:this._names[e],this}};s(V,"OptionController");var O=V,P=class P extends _{constructor(t,e,i){super(t,e,i,"string"),this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("spellcheck","false"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$input.addEventListener("input",()=>{this.setValue(this.$input.value)}),this.$input.addEventListener("keydown",r=>{r.code==="Enter"&&this.$input.blur()}),this.$input.addEventListener("blur",()=>{this._callOnFinishChange()}),this.$widget.appendChild(this.$input),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.value=this.getValue(),this}};s(P,"StringController");var z=P,bt=`.lil-gui {
|
|
1
|
+
import{e as R,p as Z,q as Q,r as q}from"./chunk-FOZIXWBX.js";import"./chunk-4GHXJDEX.js";import"./chunk-BC5TNRJZ.js";import{J as K}from"./chunk-GQMFEIP3.js";import{a as s,j as y}from"./chunk-HGQSHE2E.js";y();y();y();y();var E=class E{constructor(t,e,i,r,a="div"){this.parent=t,this.object=e,this.property=i,this._disabled=!1,this._hidden=!1,this.initialValue=this.getValue(),this.domElement=document.createElement(a),this.domElement.classList.add("controller"),this.domElement.classList.add(r),this.$name=document.createElement("div"),this.$name.classList.add("name"),E.nextNameID=E.nextNameID||0,this.$name.id=`lil-gui-name-${++E.nextNameID}`,this.$widget=document.createElement("div"),this.$widget.classList.add("widget"),this.$disable=this.$widget,this.domElement.appendChild(this.$name),this.domElement.appendChild(this.$widget),this.domElement.addEventListener("keydown",o=>o.stopPropagation()),this.domElement.addEventListener("keyup",o=>o.stopPropagation()),this.parent.children.push(this),this.parent.controllers.push(this),this.parent.$children.appendChild(this.domElement),this._listenCallback=this._listenCallback.bind(this),this.name(i)}name(t){return this._name=t,this.$name.textContent=t,this}onChange(t){return this._onChange=t,this}_callOnChange(){this.parent._callOnChange(this),this._onChange!==void 0&&this._onChange.call(this,this.getValue()),this._changed=!0}onFinishChange(t){return this._onFinishChange=t,this}_callOnFinishChange(){this._changed&&(this.parent._callOnFinishChange(this),this._onFinishChange!==void 0&&this._onFinishChange.call(this,this.getValue())),this._changed=!1}reset(){return this.setValue(this.initialValue),this._callOnFinishChange(),this}enable(t=!0){return this.disable(!t)}disable(t=!0){return t===this._disabled?this:(this._disabled=t,this.domElement.classList.toggle("disabled",t),this.$disable.toggleAttribute("disabled",t),this)}show(t=!0){return this._hidden=!t,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}options(t){let e=this.parent.add(this.object,this.property,t);return e.name(this._name),this.destroy(),e}min(t){return this}max(t){return this}step(t){return this}decimals(t){return this}listen(t=!0){return this._listening=t,this._listenCallbackID!==void 0&&(cancelAnimationFrame(this._listenCallbackID),this._listenCallbackID=void 0),this._listening&&this._listenCallback(),this}_listenCallback(){this._listenCallbackID=requestAnimationFrame(this._listenCallback);let t=this.save();t!==this._listenPrevValue&&this.updateDisplay(),this._listenPrevValue=t}getValue(){return this.object[this.property]}setValue(t){return this.getValue()!==t&&(this.object[this.property]=t,this._callOnChange(),this.updateDisplay()),this}updateDisplay(){return this}load(t){return this.setValue(t),this._callOnFinishChange(),this}save(){return this.getValue()}destroy(){this.listen(!1),this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.controllers.splice(this.parent.controllers.indexOf(this),1),this.parent.$children.removeChild(this.domElement)}};s(E,"Controller");var _=E,H=class H extends _{constructor(t,e,i){super(t,e,i,"boolean","label"),this.$input=document.createElement("input"),this.$input.setAttribute("type","checkbox"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$widget.appendChild(this.$input),this.$input.addEventListener("change",()=>{this.setValue(this.$input.checked),this._callOnFinishChange()}),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.checked=this.getValue(),this}};s(H,"BooleanController");var M=H;function I(n){let t,e;return(t=n.match(/(#|0x)?([a-f0-9]{6})/i))?e=t[2]:(t=n.match(/rgb\(\s*(\d*)\s*,\s*(\d*)\s*,\s*(\d*)\s*\)/))?e=parseInt(t[1]).toString(16).padStart(2,0)+parseInt(t[2]).toString(16).padStart(2,0)+parseInt(t[3]).toString(16).padStart(2,0):(t=n.match(/^#?([a-f0-9])([a-f0-9])([a-f0-9])$/i))&&(e=t[1]+t[1]+t[2]+t[2]+t[3]+t[3]),e?"#"+e:!1}s(I,"normalizeColorString");var pt={isPrimitive:!0,match:n=>typeof n=="string",fromHexString:I,toHexString:I},k={isPrimitive:!0,match:n=>typeof n=="number",fromHexString:n=>parseInt(n.substring(1),16),toHexString:n=>"#"+n.toString(16).padStart(6,0)},gt={isPrimitive:!1,match:n=>Array.isArray(n),fromHexString(n,t,e=1){let i=k.fromHexString(n);t[0]=(i>>16&255)/255*e,t[1]=(i>>8&255)/255*e,t[2]=(i&255)/255*e},toHexString([n,t,e],i=1){i=255/i;let r=n*i<<16^t*i<<8^e*i<<0;return k.toHexString(r)}},mt={isPrimitive:!1,match:n=>Object(n)===n,fromHexString(n,t,e=1){let i=k.fromHexString(n);t.r=(i>>16&255)/255*e,t.g=(i>>8&255)/255*e,t.b=(i&255)/255*e},toHexString({r:n,g:t,b:e},i=1){i=255/i;let r=n*i<<16^t*i<<8^e*i<<0;return k.toHexString(r)}},ft=[pt,k,gt,mt];function vt(n){return ft.find(t=>t.match(n))}s(vt,"getColorFormat");var G=class G extends _{constructor(t,e,i,r){super(t,e,i,"color"),this.$input=document.createElement("input"),this.$input.setAttribute("type","color"),this.$input.setAttribute("tabindex",-1),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$text=document.createElement("input"),this.$text.setAttribute("type","text"),this.$text.setAttribute("spellcheck","false"),this.$text.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this.$display.appendChild(this.$input),this.$widget.appendChild(this.$display),this.$widget.appendChild(this.$text),this._format=vt(this.initialValue),this._rgbScale=r,this._initialValueHexString=this.save(),this._textFocused=!1,this.$input.addEventListener("input",()=>{this._setValueFromHexString(this.$input.value)}),this.$input.addEventListener("blur",()=>{this._callOnFinishChange()}),this.$text.addEventListener("input",()=>{let a=I(this.$text.value);a&&this._setValueFromHexString(a)}),this.$text.addEventListener("focus",()=>{this._textFocused=!0,this.$text.select()}),this.$text.addEventListener("blur",()=>{this._textFocused=!1,this.updateDisplay(),this._callOnFinishChange()}),this.$disable=this.$text,this.updateDisplay()}reset(){return this._setValueFromHexString(this._initialValueHexString),this}_setValueFromHexString(t){if(this._format.isPrimitive){let e=this._format.fromHexString(t);this.setValue(e)}else this._format.fromHexString(t,this.getValue(),this._rgbScale),this._callOnChange(),this.updateDisplay()}save(){return this._format.toHexString(this.getValue(),this._rgbScale)}load(t){return this._setValueFromHexString(t),this._callOnFinishChange(),this}updateDisplay(){return this.$input.value=this._format.toHexString(this.getValue(),this._rgbScale),this._textFocused||(this.$text.value=this.$input.value.substring(1)),this.$display.style.backgroundColor=this.$input.value,this}};s(G,"ColorController");var F=G,T=class T extends _{constructor(t,e,i){super(t,e,i,"function"),this.$button=document.createElement("button"),this.$button.appendChild(this.$name),this.$widget.appendChild(this.$button),this.$button.addEventListener("click",r=>{r.preventDefault(),this.getValue().call(this.object),this._callOnChange()}),this.$button.addEventListener("touchstart",()=>{},{passive:!0}),this.$disable=this.$button}};s(T,"FunctionController");var $=T,U=class U extends _{constructor(t,e,i,r,a,o){super(t,e,i,"number"),this._initInput(),this.min(r),this.max(a);let h=o!==void 0;this.step(h?o:this._getImplicitStep(),h),this.updateDisplay()}decimals(t){return this._decimals=t,this.updateDisplay(),this}min(t){return this._min=t,this._onUpdateMinMax(),this}max(t){return this._max=t,this._onUpdateMinMax(),this}step(t,e=!0){return this._step=t,this._stepExplicit=e,this}updateDisplay(){let t=this.getValue();if(this._hasSlider){let e=(t-this._min)/(this._max-this._min);e=Math.max(0,Math.min(e,1)),this.$fill.style.width=e*100+"%"}return this._inputFocused||(this.$input.value=this._decimals===void 0?t:t.toFixed(this._decimals)),this}_initInput(){this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("aria-labelledby",this.$name.id),window.matchMedia("(pointer: coarse)").matches&&(this.$input.setAttribute("type","number"),this.$input.setAttribute("step","any")),this.$widget.appendChild(this.$input),this.$disable=this.$input;let e=s(()=>{let p=parseFloat(this.$input.value);isNaN(p)||(this._stepExplicit&&(p=this._snap(p)),this.setValue(this._clamp(p)))},"onInput"),i=s(p=>{let C=parseFloat(this.$input.value);isNaN(C)||(this._snapClampSetValue(C+p),this.$input.value=this.getValue())},"increment"),r=s(p=>{p.key==="Enter"&&this.$input.blur(),p.code==="ArrowUp"&&(p.preventDefault(),i(this._step*this._arrowKeyMultiplier(p))),p.code==="ArrowDown"&&(p.preventDefault(),i(this._step*this._arrowKeyMultiplier(p)*-1))},"onKeyDown"),a=s(p=>{this._inputFocused&&(p.preventDefault(),i(this._step*this._normalizeMouseWheel(p)))},"onWheel"),o=!1,h,g,b,m,v,l=5,u=s(p=>{h=p.clientX,g=b=p.clientY,o=!0,m=this.getValue(),v=0,window.addEventListener("mousemove",c),window.addEventListener("mouseup",d)},"onMouseDown"),c=s(p=>{if(o){let C=p.clientX-h,L=p.clientY-g;Math.abs(L)>l?(p.preventDefault(),this.$input.blur(),o=!1,this._setDraggingStyle(!0,"vertical")):Math.abs(C)>l&&d()}if(!o){let C=p.clientY-b;v-=C*this._step*this._arrowKeyMultiplier(p),m+v>this._max?v=this._max-m:m+v<this._min&&(v=this._min-m),this._snapClampSetValue(m+v)}b=p.clientY},"onMouseMove"),d=s(()=>{this._setDraggingStyle(!1,"vertical"),this._callOnFinishChange(),window.removeEventListener("mousemove",c),window.removeEventListener("mouseup",d)},"onMouseUp"),A=s(()=>{this._inputFocused=!0},"onFocus"),f=s(()=>{this._inputFocused=!1,this.updateDisplay(),this._callOnFinishChange()},"onBlur");this.$input.addEventListener("input",e),this.$input.addEventListener("keydown",r),this.$input.addEventListener("wheel",a,{passive:!1}),this.$input.addEventListener("mousedown",u),this.$input.addEventListener("focus",A),this.$input.addEventListener("blur",f)}_initSlider(){this._hasSlider=!0,this.$slider=document.createElement("div"),this.$slider.classList.add("slider"),this.$fill=document.createElement("div"),this.$fill.classList.add("fill"),this.$slider.appendChild(this.$fill),this.$widget.insertBefore(this.$slider,this.$input),this.domElement.classList.add("hasSlider");let t=s((f,p,C,L,ut)=>(f-p)/(C-p)*(ut-L)+L,"map"),e=s(f=>{let p=this.$slider.getBoundingClientRect(),C=t(f,p.left,p.right,this._min,this._max);this._snapClampSetValue(C)},"setValueFromX"),i=s(f=>{this._setDraggingStyle(!0),e(f.clientX),window.addEventListener("mousemove",r),window.addEventListener("mouseup",a)},"mouseDown"),r=s(f=>{e(f.clientX)},"mouseMove"),a=s(()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("mousemove",r),window.removeEventListener("mouseup",a)},"mouseUp"),o=!1,h,g,b=s(f=>{f.preventDefault(),this._setDraggingStyle(!0),e(f.touches[0].clientX),o=!1},"beginTouchDrag"),m=s(f=>{f.touches.length>1||(this._hasScrollBar?(h=f.touches[0].clientX,g=f.touches[0].clientY,o=!0):b(f),window.addEventListener("touchmove",v,{passive:!1}),window.addEventListener("touchend",l))},"onTouchStart"),v=s(f=>{if(o){let p=f.touches[0].clientX-h,C=f.touches[0].clientY-g;Math.abs(p)>Math.abs(C)?b(f):(window.removeEventListener("touchmove",v),window.removeEventListener("touchend",l))}else f.preventDefault(),e(f.touches[0].clientX)},"onTouchMove"),l=s(()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("touchmove",v),window.removeEventListener("touchend",l)},"onTouchEnd"),u=this._callOnFinishChange.bind(this),c=400,d,A=s(f=>{if(Math.abs(f.deltaX)<Math.abs(f.deltaY)&&this._hasScrollBar)return;f.preventDefault();let C=this._normalizeMouseWheel(f)*this._step;this._snapClampSetValue(this.getValue()+C),this.$input.value=this.getValue(),clearTimeout(d),d=setTimeout(u,c)},"onWheel");this.$slider.addEventListener("mousedown",i),this.$slider.addEventListener("touchstart",m,{passive:!1}),this.$slider.addEventListener("wheel",A,{passive:!1})}_setDraggingStyle(t,e="horizontal"){this.$slider&&this.$slider.classList.toggle("active",t),document.body.classList.toggle("lil-gui-dragging",t),document.body.classList.toggle(`lil-gui-${e}`,t)}_getImplicitStep(){return this._hasMin&&this._hasMax?(this._max-this._min)/1e3:.1}_onUpdateMinMax(){!this._hasSlider&&this._hasMin&&this._hasMax&&(this._stepExplicit||this.step(this._getImplicitStep(),!1),this._initSlider(),this.updateDisplay())}_normalizeMouseWheel(t){let{deltaX:e,deltaY:i}=t;return Math.floor(t.deltaY)!==t.deltaY&&t.wheelDelta&&(e=0,i=-t.wheelDelta/120,i*=this._stepExplicit?1:10),e+-i}_arrowKeyMultiplier(t){let e=this._stepExplicit?1:10;return t.shiftKey?e*=10:t.altKey&&(e/=10),e}_snap(t){let e=Math.round(t/this._step)*this._step;return parseFloat(e.toPrecision(15))}_clamp(t){return t<this._min&&(t=this._min),t>this._max&&(t=this._max),t}_snapClampSetValue(t){this.setValue(this._clamp(this._snap(t)))}get _hasScrollBar(){let t=this.parent.root.$children;return t.scrollHeight>t.clientHeight}get _hasMin(){return this._min!==void 0}get _hasMax(){return this._max!==void 0}};s(U,"NumberController");var D=U,V=class V extends _{constructor(t,e,i,r){super(t,e,i,"option"),this.$select=document.createElement("select"),this.$select.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this.$select.addEventListener("change",()=>{this.setValue(this._values[this.$select.selectedIndex]),this._callOnFinishChange()}),this.$select.addEventListener("focus",()=>{this.$display.classList.add("focus")}),this.$select.addEventListener("blur",()=>{this.$display.classList.remove("focus")}),this.$widget.appendChild(this.$select),this.$widget.appendChild(this.$display),this.$disable=this.$select,this.options(r)}options(t){return this._values=Array.isArray(t)?t:Object.values(t),this._names=Array.isArray(t)?t:Object.keys(t),this.$select.replaceChildren(),this._names.forEach(e=>{let i=document.createElement("option");i.textContent=e,this.$select.appendChild(i)}),this.updateDisplay(),this}updateDisplay(){let t=this.getValue(),e=this._values.indexOf(t);return this.$select.selectedIndex=e,this.$display.textContent=e===-1?t:this._names[e],this}};s(V,"OptionController");var O=V,P=class P extends _{constructor(t,e,i){super(t,e,i,"string"),this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("spellcheck","false"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$input.addEventListener("input",()=>{this.setValue(this.$input.value)}),this.$input.addEventListener("keydown",r=>{r.code==="Enter"&&this.$input.blur()}),this.$input.addEventListener("blur",()=>{this._callOnFinishChange()}),this.$widget.appendChild(this.$input),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.value=this.getValue(),this}};s(P,"StringController");var z=P,bt=`.lil-gui {
|
|
2
2
|
font-family: var(--font-family);
|
|
3
3
|
font-size: var(--font-size);
|
|
4
4
|
line-height: 1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,a,aa,b,ba,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"./chunk-
|
|
1
|
+
import{$,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,a,aa,b,ba,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"./chunk-4GHXJDEX.js";import"./chunk-HGQSHE2E.js";var export_Point=T.default;export{d as AJAXError,J as AttributionControl,y as BoxZoomHandler,q as CanvasSource,I as CooperativeGesturesHandler,E as DoubleClickZoomHandler,F as DragPanHandler,G as DragRotateHandler,t as EdgeInsets,e as Evented,Q as FullscreenControl,n as GeoJSONSource,O as GeolocateControl,u as Hash,o as ImageSource,C as KeyboardHandler,h as LngLat,i as LngLatBounds,K as LogoControl,L as Map,v as MapMouseEvent,w as MapTouchEvent,x as MapWheelEvent,N as Marker,j as MercatorCoordinate,M as NavigationControl,export_Point as Point,S as Popup,m as RasterDEMTileSource,l as RasterTileSource,P as ScaleControl,D as ScrollZoomHandler,s as Style,R as TerrainControl,B as TwoFingersTouchPitchHandler,A as TwoFingersTouchRotateHandler,z as TwoFingersTouchZoomHandler,H as TwoFingersTouchZoomRotateHandler,k as VectorTileSource,p as VideoSource,b as addProtocol,r as addSourceType,g as clearPrewarmedResources,a as config,Z as getMaxParallelImageRequests,V as getRTLTextPluginStatus,W as getVersion,X as getWorkerCount,$ as getWorkerUrl,ba as importScriptInWorkers,f as prewarm,c as removeProtocol,_ as setMaxParallelImageRequests,U as setRTLTextPlugin,Y as setWorkerCount,aa as setWorkerUrl};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mappedin/mappedin-js",
|
|
3
|
-
"version": "6.0.1-beta.
|
|
3
|
+
"version": "6.0.1-beta.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"main": "lib/esm/index.js",
|
|
6
6
|
"module": "lib/esm/index.js",
|
|
@@ -38,5 +38,5 @@
|
|
|
38
38
|
"volta": {
|
|
39
39
|
"extends": "../../package.json"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "818a377c646752f942120b79ff088af971c7368b"
|
|
42
42
|
}
|