@mappedin/mappedin-js 6.0.1-alpha.35 → 6.0.1-alpha.36
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/lib/esm/{GLTFExporter-QNKFLIQG.js → GLTFExporter-R7ENFQC2.js} +1 -1
- package/lib/esm/{GLTFLoader-XXHIST4U.js → GLTFLoader-MV5BOOKA.js} +1 -1
- package/lib/esm/{browser-GW6IOT3A.js → browser-BJ3HKFGZ.js} +1 -1
- package/lib/esm/{chunk-EIKEXEHK.js → chunk-3A3IZSQH.js} +1 -1
- package/lib/esm/{chunk-46QN2SP2.js → chunk-5QDDUDQO.js} +1 -1
- package/lib/esm/{chunk-S7G7ETEN.js → chunk-J3F43M4Z.js} +1 -1
- package/lib/esm/{chunk-X2ZADEKF.js → chunk-N6B6EOQT.js} +23 -23
- package/lib/esm/{chunk-CMHVARHO.js → chunk-N7QS5LVF.js} +1 -1
- package/lib/esm/index.d.ts +37 -8
- package/lib/esm/index.js +1 -1
- package/lib/esm/{inspector-W2DIQK3R.js → inspector-RBV6MS2D.js} +1 -1
- package/lib/esm/{outdoor-context-v4-DXJCYOAT.js → outdoor-context-v4-56ZD4XF4.js} +1 -1
- package/package.json +3 -3
|
@@ -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-alpha.
|
|
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-alpha.36"}}});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
|
@@ -699,7 +699,7 @@ declare module '@mappedin/mappedin-js/maker/src/map-view' {
|
|
|
699
699
|
import type { BlueDot } from '@mappedin/mappedin-js/maker/src/api-geojson/blue-dot/blue-dot';
|
|
700
700
|
import type MapData from '@mappedin/mappedin-js/maker/src/map-data';
|
|
701
701
|
import type { Floor, MapObject, Space } from '@mappedin/mappedin-js/maker/src/map-data-objects';
|
|
702
|
-
import type { TGetDirectionsOptions, TGetState, TNavigationTarget, TUpdateState } from '@mappedin/mappedin-js/maker/src/types';
|
|
702
|
+
import type { TGetDirectionsOptions, TGetState, TNavigationTarget, TUpdateState, TUpdateStates } from '@mappedin/mappedin-js/maker/src/types';
|
|
703
703
|
import type { Label, Marker } from '@mappedin/mappedin-js/maker/src/map-view-objects';
|
|
704
704
|
import type { TEventPayload } from '@mappedin/mappedin-js/maker/src/events';
|
|
705
705
|
import type { CustomGeometries } from '@mappedin/mappedin-js/maker/src/api-geojson/custom-geometries';
|
|
@@ -772,7 +772,8 @@ declare module '@mappedin/mappedin-js/maker/src/map-view' {
|
|
|
772
772
|
* // Update the color of a space to red.
|
|
773
773
|
* map.updateState(space, { color: 'red' });
|
|
774
774
|
*/
|
|
775
|
-
updateState<T extends Space | MapObject | Label | Marker
|
|
775
|
+
updateState<T extends Space | MapObject | Label | Marker>(target: T | string, state: TUpdateState<T>): any;
|
|
776
|
+
updateState<T extends 'walls' | (string & NonNullable<unknown>)>(target: T, state: TUpdateStates): any;
|
|
776
777
|
update: () => void;
|
|
777
778
|
getMapData(): {
|
|
778
779
|
[x: string]: MapData;
|
|
@@ -1065,6 +1066,7 @@ declare module '@mappedin/mappedin-js/maker/src/types' {
|
|
|
1065
1066
|
* The type for updating the state of map elements (colors, texts, etc.).
|
|
1066
1067
|
*/
|
|
1067
1068
|
export type TUpdateState<T> = T extends 'walls' ? Partial<Omit<TGeometryState, 'interactive' | 'hoverColor' | 'type'>> : T extends Marker ? Partial<TMarkerState> : T extends Label ? Partial<TLabelState> : T extends Space | MapObject ? Partial<TGeometryState> : T extends string ? Record<string, any> : never;
|
|
1069
|
+
export type TUpdateStates = Partial<Omit<TGeometryState, 'interactive' | 'hoverColor' | 'type'>> | Partial<TMarkerState> | Partial<TLabelState> | Partial<TGeometryState>;
|
|
1068
1070
|
export type TGetEntityState<T> = T extends Marker ? TMarkerState : T extends Model ? TModelState : T extends Label ? TLabelState : T extends Space | MapObject ? TGeometryState : T extends string ? TLabelState | TGeometryState | TMarkerState | TModelState | undefined : never;
|
|
1069
1071
|
export type TGetState<T> = TGetEntityState<T> | undefined;
|
|
1070
1072
|
/**
|
|
@@ -1185,11 +1187,11 @@ declare module '@mappedin/mappedin-js/maker/src/types' {
|
|
|
1185
1187
|
*/
|
|
1186
1188
|
color?: string;
|
|
1187
1189
|
/**
|
|
1188
|
-
*
|
|
1190
|
+
* Accent color that is applied to the path pulse and path arrows
|
|
1189
1191
|
*
|
|
1190
1192
|
* @defaultValue '#ffffff'
|
|
1191
1193
|
*/
|
|
1192
|
-
|
|
1194
|
+
accentColor?: string;
|
|
1193
1195
|
/**
|
|
1194
1196
|
* Number of iterations to pulse to indicate direction.
|
|
1195
1197
|
*
|
|
@@ -1610,6 +1612,11 @@ declare module '@mappedin/mappedin-js/maker/src/navigation' {
|
|
|
1610
1612
|
* @default '#40A9FF'
|
|
1611
1613
|
*/
|
|
1612
1614
|
color?: string;
|
|
1615
|
+
/**
|
|
1616
|
+
* The accent color of the path. This is applied to arrows if they are displayed
|
|
1617
|
+
* @default 'blue'
|
|
1618
|
+
*/
|
|
1619
|
+
accentColor?: string;
|
|
1613
1620
|
/**
|
|
1614
1621
|
* The radius of the path near the markers.
|
|
1615
1622
|
* @default 0.25
|
|
@@ -1625,6 +1632,11 @@ declare module '@mappedin/mappedin-js/maker/src/navigation' {
|
|
|
1625
1632
|
* @default false
|
|
1626
1633
|
*/
|
|
1627
1634
|
displayArrowsOnPath?: boolean;
|
|
1635
|
+
/**
|
|
1636
|
+
* Controls whether arrows are animated.
|
|
1637
|
+
* @default false
|
|
1638
|
+
*/
|
|
1639
|
+
animateArrowsOnPath?: boolean;
|
|
1628
1640
|
};
|
|
1629
1641
|
/**
|
|
1630
1642
|
* Options for the departure and destination polygons.
|
|
@@ -3835,7 +3847,7 @@ declare module '@mappedin/mappedin-js/maker/src/api-geojson/api' {
|
|
|
3835
3847
|
CustomGeometries: CustomGeometries;
|
|
3836
3848
|
Style: Style;
|
|
3837
3849
|
constructor(rendererCore: RendererCore, mapView: MapView);
|
|
3838
|
-
updateState<T extends Space | MapObject | Label | Marker |
|
|
3850
|
+
updateState<T extends Space | MapObject | Label | Marker | 'walls' | (string & NonNullable<unknown>)>(target: T, state: TUpdateState<T>): void;
|
|
3839
3851
|
update: () => void;
|
|
3840
3852
|
getMapDataInternal(): import("../map-data-objects").MapDataInternal | undefined;
|
|
3841
3853
|
getMapData(): MapData | undefined;
|
|
@@ -3888,7 +3900,7 @@ declare module '@mappedin/mappedin-js/maker/src/api-geojson/camera' {
|
|
|
3888
3900
|
* @param target The target configuration for the camera.
|
|
3889
3901
|
* @param options Optional settings for the camera animation.
|
|
3890
3902
|
* @example
|
|
3891
|
-
* map.Camera.
|
|
3903
|
+
* map.Camera.animateTo({ center: coordinate, zoomLevel: 10 }, { duration: 500 });
|
|
3892
3904
|
*/
|
|
3893
3905
|
animateTo(target: TCameraTarget, options?: TCameraAnimationOptions): Promise<void>;
|
|
3894
3906
|
/**
|
|
@@ -4766,6 +4778,18 @@ declare module '@mappedin/mappedin-js/geojson/src/components/path' {
|
|
|
4766
4778
|
* The color of the path.
|
|
4767
4779
|
*/
|
|
4768
4780
|
color?: string;
|
|
4781
|
+
/**
|
|
4782
|
+
* The accent color of the path. When arrows are visible, it is applied to them
|
|
4783
|
+
*/
|
|
4784
|
+
accentColor?: string;
|
|
4785
|
+
/**
|
|
4786
|
+
* Display Arrows on Path to indicate direction
|
|
4787
|
+
*/
|
|
4788
|
+
displayArrowsOnPath?: boolean;
|
|
4789
|
+
/**
|
|
4790
|
+
* Arrows on path should animate to indicate direction
|
|
4791
|
+
*/
|
|
4792
|
+
animateArrowsOnPath?: boolean;
|
|
4769
4793
|
};
|
|
4770
4794
|
export class PathComponent {
|
|
4771
4795
|
#private;
|
|
@@ -4779,8 +4803,10 @@ declare module '@mappedin/mappedin-js/geojson/src/components/path' {
|
|
|
4779
4803
|
nearRadius: number;
|
|
4780
4804
|
farRadius: number;
|
|
4781
4805
|
color: string;
|
|
4782
|
-
|
|
4806
|
+
accentColor: string;
|
|
4783
4807
|
altitudeAdjustment: number;
|
|
4808
|
+
displayArrowsOnPath: boolean;
|
|
4809
|
+
animateArrowsOnPath: boolean;
|
|
4784
4810
|
dirty: boolean;
|
|
4785
4811
|
constructor(feature: FeatureCollection<Point, any>, options?: AddPathOptions);
|
|
4786
4812
|
setColor(): void;
|
|
@@ -15138,10 +15164,13 @@ declare module '@mappedin/mappedin-js/geojson/src/entities' {
|
|
|
15138
15164
|
declare module '@mappedin/mappedin-js/geojson/src/systems/path/system' {
|
|
15139
15165
|
import type { RendererState } from '@mappedin/mappedin-js/geojson/src/renderer';
|
|
15140
15166
|
import type { RendererCore } from '@mappedin/mappedin-js/geojson/src';
|
|
15167
|
+
import { PubSub } from '@packages/internal/common';
|
|
15141
15168
|
/**
|
|
15142
15169
|
* A system for drawing and controlling the visual state of paths
|
|
15143
15170
|
*/
|
|
15144
|
-
export class PathSystem {
|
|
15171
|
+
export class PathSystem extends PubSub<{
|
|
15172
|
+
'animate:path': undefined;
|
|
15173
|
+
}> {
|
|
15145
15174
|
convertTo3DMapPosition: RendererCore['convertTo3DMapPosition'];
|
|
15146
15175
|
constructor(rendererState: RendererState, convertTo3DMapPosition: RendererCore['convertTo3DMapPosition']);
|
|
15147
15176
|
update(minZoomAltitude: number, maxZoomAltitude: number, currentZoomAltitude: number): void;
|
package/lib/esm/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h,i,j,k,l,m,o as n,p as o,q as p,r as q,s as r}from"./chunk-
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l,m,o as n,p as o,q as p,r as q,s as r}from"./chunk-N6B6EOQT.js";import"./chunk-5QDDUDQO.js";import"./chunk-3A3IZSQH.js";import"./chunk-J3F43M4Z.js";import"./chunk-N7QS5LVF.js";export{l as Annotation,h as Connection,c as Coordinate,e as Door,g as Floor,d as Hyperlink,j as Image,i as MapObject,k as PointOfInterest,f as Space,p as createMapLibreOverlay,m as enableTestMode,o as getMapData,n as hydrateMapDataFromMVF,a as parseMVF,r as show3dMap,q as show3dMapGeojson,b as unzipMVF};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as W,n as R}from"./chunk-X2ZADEKF.js";import"./chunk-46QN2SP2.js";import"./chunk-EIKEXEHK.js";import{J as X}from"./chunk-S7G7ETEN.js";import{a as o,j as y}from"./chunk-CMHVARHO.js";y();y();y();y();var E=class E{constructor(t,e,i,r,s="div"){this.parent=t,this.object=e,this.property=i,this._disabled=!1,this._hidden=!1,this.initialValue=this.getValue(),this.domElement=document.createElement(s),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",a=>a.stopPropagation()),this.domElement.addEventListener("keyup",a=>a.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)}};o(E,"Controller");var _=E,G=class G 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}};o(G,"BooleanController");var M=G;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}o(I,"normalizeColorString");var ht={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)},ct={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)}},ut={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)}},pt=[ht,k,ct,ut];function gt(n){return pt.find(t=>t.match(n))}o(gt,"getColorFormat");var H=class H 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=gt(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 s=I(this.$text.value);s&&this._setValueFromHexString(s)}),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}};o(H,"ColorController");var F=H,V=class V 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}};o(V,"FunctionController");var $=V,T=class T extends _{constructor(t,e,i,r,s,a){super(t,e,i,"number"),this._initInput(),this.min(r),this.max(s);let u=a!==void 0;this.step(u?a:this._getImplicitStep(),u),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=o(()=>{let p=parseFloat(this.$input.value);isNaN(p)||(this._stepExplicit&&(p=this._snap(p)),this.setValue(this._clamp(p)))},"onInput"),i=o(p=>{let C=parseFloat(this.$input.value);isNaN(C)||(this._snapClampSetValue(C+p),this.$input.value=this.getValue())},"increment"),r=o(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"),s=o(p=>{this._inputFocused&&(p.preventDefault(),i(this._step*this._normalizeMouseWheel(p)))},"onWheel"),a=!1,u,g,b,f,c,d=5,l=o(p=>{u=p.clientX,g=b=p.clientY,a=!0,f=this.getValue(),c=0,window.addEventListener("mousemove",h),window.addEventListener("mouseup",v)},"onMouseDown"),h=o(p=>{if(a){let C=p.clientX-u,L=p.clientY-g;Math.abs(L)>d?(p.preventDefault(),this.$input.blur(),a=!1,this._setDraggingStyle(!0,"vertical")):Math.abs(C)>d&&v()}if(!a){let C=p.clientY-b;c-=C*this._step*this._arrowKeyMultiplier(p),f+c>this._max?c=this._max-f:f+c<this._min&&(c=this._min-f),this._snapClampSetValue(f+c)}b=p.clientY},"onMouseMove"),v=o(()=>{this._setDraggingStyle(!1,"vertical"),this._callOnFinishChange(),window.removeEventListener("mousemove",h),window.removeEventListener("mouseup",v)},"onMouseUp"),A=o(()=>{this._inputFocused=!0},"onFocus"),m=o(()=>{this._inputFocused=!1,this.updateDisplay(),this._callOnFinishChange()},"onBlur");this.$input.addEventListener("input",e),this.$input.addEventListener("keydown",r),this.$input.addEventListener("wheel",s,{passive:!1}),this.$input.addEventListener("mousedown",l),this.$input.addEventListener("focus",A),this.$input.addEventListener("blur",m)}_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=o((m,p,C,L,dt)=>(m-p)/(C-p)*(dt-L)+L,"map"),e=o(m=>{let p=this.$slider.getBoundingClientRect(),C=t(m,p.left,p.right,this._min,this._max);this._snapClampSetValue(C)},"setValueFromX"),i=o(m=>{this._setDraggingStyle(!0),e(m.clientX),window.addEventListener("mousemove",r),window.addEventListener("mouseup",s)},"mouseDown"),r=o(m=>{e(m.clientX)},"mouseMove"),s=o(()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("mousemove",r),window.removeEventListener("mouseup",s)},"mouseUp"),a=!1,u,g,b=o(m=>{m.preventDefault(),this._setDraggingStyle(!0),e(m.touches[0].clientX),a=!1},"beginTouchDrag"),f=o(m=>{m.touches.length>1||(this._hasScrollBar?(u=m.touches[0].clientX,g=m.touches[0].clientY,a=!0):b(m),window.addEventListener("touchmove",c,{passive:!1}),window.addEventListener("touchend",d))},"onTouchStart"),c=o(m=>{if(a){let p=m.touches[0].clientX-u,C=m.touches[0].clientY-g;Math.abs(p)>Math.abs(C)?b(m):(window.removeEventListener("touchmove",c),window.removeEventListener("touchend",d))}else m.preventDefault(),e(m.touches[0].clientX)},"onTouchMove"),d=o(()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("touchmove",c),window.removeEventListener("touchend",d)},"onTouchEnd"),l=this._callOnFinishChange.bind(this),h=400,v,A=o(m=>{if(Math.abs(m.deltaX)<Math.abs(m.deltaY)&&this._hasScrollBar)return;m.preventDefault();let C=this._normalizeMouseWheel(m)*this._step;this._snapClampSetValue(this.getValue()+C),this.$input.value=this.getValue(),clearTimeout(v),v=setTimeout(l,h)},"onWheel");this.$slider.addEventListener("mousedown",i),this.$slider.addEventListener("touchstart",f,{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}};o(T,"NumberController");var D=T,U=class U 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}};o(U,"OptionController");var O=U,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}};o(P,"StringController");var z=P,mt=`.lil-gui {
|
|
1
|
+
import{c as W,n as R}from"./chunk-N6B6EOQT.js";import"./chunk-5QDDUDQO.js";import"./chunk-3A3IZSQH.js";import{J as X}from"./chunk-J3F43M4Z.js";import{a as o,j as y}from"./chunk-N7QS5LVF.js";y();y();y();y();var E=class E{constructor(t,e,i,r,s="div"){this.parent=t,this.object=e,this.property=i,this._disabled=!1,this._hidden=!1,this.initialValue=this.getValue(),this.domElement=document.createElement(s),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",a=>a.stopPropagation()),this.domElement.addEventListener("keyup",a=>a.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)}};o(E,"Controller");var _=E,G=class G 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}};o(G,"BooleanController");var M=G;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}o(I,"normalizeColorString");var ht={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)},ct={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)}},ut={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)}},pt=[ht,k,ct,ut];function gt(n){return pt.find(t=>t.match(n))}o(gt,"getColorFormat");var H=class H 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=gt(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 s=I(this.$text.value);s&&this._setValueFromHexString(s)}),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}};o(H,"ColorController");var F=H,V=class V 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}};o(V,"FunctionController");var $=V,T=class T extends _{constructor(t,e,i,r,s,a){super(t,e,i,"number"),this._initInput(),this.min(r),this.max(s);let u=a!==void 0;this.step(u?a:this._getImplicitStep(),u),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=o(()=>{let p=parseFloat(this.$input.value);isNaN(p)||(this._stepExplicit&&(p=this._snap(p)),this.setValue(this._clamp(p)))},"onInput"),i=o(p=>{let C=parseFloat(this.$input.value);isNaN(C)||(this._snapClampSetValue(C+p),this.$input.value=this.getValue())},"increment"),r=o(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"),s=o(p=>{this._inputFocused&&(p.preventDefault(),i(this._step*this._normalizeMouseWheel(p)))},"onWheel"),a=!1,u,g,b,f,c,d=5,l=o(p=>{u=p.clientX,g=b=p.clientY,a=!0,f=this.getValue(),c=0,window.addEventListener("mousemove",h),window.addEventListener("mouseup",v)},"onMouseDown"),h=o(p=>{if(a){let C=p.clientX-u,L=p.clientY-g;Math.abs(L)>d?(p.preventDefault(),this.$input.blur(),a=!1,this._setDraggingStyle(!0,"vertical")):Math.abs(C)>d&&v()}if(!a){let C=p.clientY-b;c-=C*this._step*this._arrowKeyMultiplier(p),f+c>this._max?c=this._max-f:f+c<this._min&&(c=this._min-f),this._snapClampSetValue(f+c)}b=p.clientY},"onMouseMove"),v=o(()=>{this._setDraggingStyle(!1,"vertical"),this._callOnFinishChange(),window.removeEventListener("mousemove",h),window.removeEventListener("mouseup",v)},"onMouseUp"),A=o(()=>{this._inputFocused=!0},"onFocus"),m=o(()=>{this._inputFocused=!1,this.updateDisplay(),this._callOnFinishChange()},"onBlur");this.$input.addEventListener("input",e),this.$input.addEventListener("keydown",r),this.$input.addEventListener("wheel",s,{passive:!1}),this.$input.addEventListener("mousedown",l),this.$input.addEventListener("focus",A),this.$input.addEventListener("blur",m)}_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=o((m,p,C,L,dt)=>(m-p)/(C-p)*(dt-L)+L,"map"),e=o(m=>{let p=this.$slider.getBoundingClientRect(),C=t(m,p.left,p.right,this._min,this._max);this._snapClampSetValue(C)},"setValueFromX"),i=o(m=>{this._setDraggingStyle(!0),e(m.clientX),window.addEventListener("mousemove",r),window.addEventListener("mouseup",s)},"mouseDown"),r=o(m=>{e(m.clientX)},"mouseMove"),s=o(()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("mousemove",r),window.removeEventListener("mouseup",s)},"mouseUp"),a=!1,u,g,b=o(m=>{m.preventDefault(),this._setDraggingStyle(!0),e(m.touches[0].clientX),a=!1},"beginTouchDrag"),f=o(m=>{m.touches.length>1||(this._hasScrollBar?(u=m.touches[0].clientX,g=m.touches[0].clientY,a=!0):b(m),window.addEventListener("touchmove",c,{passive:!1}),window.addEventListener("touchend",d))},"onTouchStart"),c=o(m=>{if(a){let p=m.touches[0].clientX-u,C=m.touches[0].clientY-g;Math.abs(p)>Math.abs(C)?b(m):(window.removeEventListener("touchmove",c),window.removeEventListener("touchend",d))}else m.preventDefault(),e(m.touches[0].clientX)},"onTouchMove"),d=o(()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("touchmove",c),window.removeEventListener("touchend",d)},"onTouchEnd"),l=this._callOnFinishChange.bind(this),h=400,v,A=o(m=>{if(Math.abs(m.deltaX)<Math.abs(m.deltaY)&&this._hasScrollBar)return;m.preventDefault();let C=this._normalizeMouseWheel(m)*this._step;this._snapClampSetValue(this.getValue()+C),this.$input.value=this.getValue(),clearTimeout(v),v=setTimeout(l,h)},"onWheel");this.$slider.addEventListener("mousedown",i),this.$slider.addEventListener("touchstart",f,{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}};o(T,"NumberController");var D=T,U=class U 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}};o(U,"OptionController");var O=U,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}};o(P,"StringController");var z=P,mt=`.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-5QDDUDQO.js";import"./chunk-N7QS5LVF.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-alpha.
|
|
3
|
+
"version": "6.0.1-alpha.36",
|
|
4
4
|
"private": false,
|
|
5
5
|
"main": "lib/esm/index.js",
|
|
6
6
|
"module": "lib/esm/index.js",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"types": "tsc -b ./tsconfig.build.json",
|
|
28
28
|
"test": "NODE_ENV=test jest",
|
|
29
29
|
"test:cov": "NODE_ENV=test jest --coverage",
|
|
30
|
-
"typecheck": "tsc --noEmit",
|
|
30
|
+
"typecheck": "tsc --noEmit --project tsconfig.json",
|
|
31
31
|
"copy-styles": "cp lib/esm/index.css lib/index.css",
|
|
32
32
|
"clean": "rm -rf lib/** && rm -rf examples/dist/**",
|
|
33
33
|
"docs": "yarn build && typedoc"
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"volta": {
|
|
36
36
|
"extends": "../../package.json"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "ff4378fd02176f8514aeb404bc49742383f61e13"
|
|
39
39
|
}
|