@mappedin/mappedin-js 6.0.1-alpha.36 → 6.0.1-alpha.37
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-R7ENFQC2.js → GLTFExporter-NKQIJINX.js} +1 -1
- package/lib/esm/{GLTFLoader-MV5BOOKA.js → GLTFLoader-GDJUALCQ.js} +1 -1
- package/lib/esm/{browser-BJ3HKFGZ.js → browser-2CZ5S7PQ.js} +1 -1
- package/lib/esm/{chunk-N7QS5LVF.js → chunk-3JQFKFB7.js} +1 -1
- package/lib/esm/{chunk-J3F43M4Z.js → chunk-BDZ2PK2A.js} +1 -1
- package/lib/esm/{chunk-5QDDUDQO.js → chunk-H43ODW5U.js} +1 -1
- package/lib/esm/{chunk-3A3IZSQH.js → chunk-K4GII35P.js} +1 -1
- package/lib/esm/{chunk-N6B6EOQT.js → chunk-TUEE7MUR.js} +23 -23
- package/lib/esm/index.d.ts +56 -15
- package/lib/esm/index.js +1 -1
- package/lib/esm/{inspector-RBV6MS2D.js → inspector-QGUFLX5C.js} +1 -1
- package/lib/esm/{outdoor-context-v4-56ZD4XF4.js → outdoor-context-v4-4QE2XOX2.js} +1 -1
- package/package.json +2 -2
package/lib/esm/index.d.ts
CHANGED
|
@@ -309,12 +309,12 @@ declare module '@mappedin/mappedin-js' {
|
|
|
309
309
|
export { parseMVF, unzipMVF, enableTestMode };
|
|
310
310
|
export type { MapView, MapData, MappedinMapLibreOverlay, TEvents, TEventPayload, TClickPayload, THoverPayload, TShow3DMapOptions, TGetMapDataOptions, TGetMapDataWithAccessTokenOptions, TGetMapDataWithCredentialsOptions, TGetMapDataSharedOptions, TAmbientOcclusionOptions, TAntialiasingOptions, TMVF, PaintStyle, LineStyle, Shading, TMVFStyleCollection, TMVFStyle, TMVFLineStringStyle, TMVFPolygonStyle, TMVFPointStyle, };
|
|
311
311
|
export type * from 'geojson';
|
|
312
|
-
export type { TUpdateState, TLabelState, TGeometryState, TCameraAnimationOptions, TAnimationOptions, TFocusOnOptions, TEasingFunction, TCameraTarget, TNavigationTarget, TCameraFocusOnTarget, TAddMarkerOptions, TAddPathOptions, TLabelAppearance, TAddLabelOptions, TGetDirectionsOptions, TCollisionRankingTier, TMarkerAnchor, TDirectionInstruction, TDirectionInstructionAction, TGetState, TMarkerState, } from '@mappedin/mappedin-js/maker/src/types';
|
|
313
|
-
export type { Label, Marker, Path, CameraTransform } from '@mappedin/mappedin-js/maker/src/map-view-objects';
|
|
312
|
+
export type { TUpdateState, TLabelState, TGeometryState, TCameraAnimationOptions, TAnimationOptions, TFocusOnOptions, TEasingFunction, TCameraTarget, TNavigationTarget, TDirectionZone, TCameraFocusOnTarget, TAddMarkerOptions, TAddPathOptions, TLabelAppearance, TAddLabelOptions, TAddModelOptions, TAddModel, TGetDirectionsOptions, TCollisionRankingTier, TMarkerAnchor, TDirectionInstruction, TDirectionInstructionAction, TGetState, TMarkerState, } from '@mappedin/mappedin-js/maker/src/types';
|
|
313
|
+
export type { Label, Marker, Path, CustomGeometry, CameraTransform, Model } from '@mappedin/mappedin-js/maker/src/map-view-objects';
|
|
314
314
|
export type { Navigation, TNavigationOptions } from '@mappedin/mappedin-js/maker/src/navigation';
|
|
315
315
|
export type { TSpaceType } from '@mappedin/mappedin-js/maker/src/map-data-objects';
|
|
316
316
|
export { Coordinate, Annotation, Connection, Door, Floor, MapObject, PointOfInterest, Space, Image, Hyperlink, } from '@mappedin/mappedin-js/maker/src/map-data-objects';
|
|
317
|
-
export type { Camera, Labels, Markers, Paths, Exporter, Directions, Style, Outdoor } from '@mappedin/mappedin-js/maker/src/api-geojson';
|
|
317
|
+
export type { Camera, Models, Labels, Markers, Paths, Exporter, Directions, Style, Outdoor } from '@mappedin/mappedin-js/maker/src/api-geojson';
|
|
318
318
|
}
|
|
319
319
|
|
|
320
320
|
declare module '@mappedin/mappedin-js/maker/src/map-data' {
|
|
@@ -915,6 +915,7 @@ declare module '@mappedin/mappedin-js/geojson/src/maplibre-overlay' {
|
|
|
915
915
|
}
|
|
916
916
|
|
|
917
917
|
declare module '@mappedin/mappedin-js/maker/src/types' {
|
|
918
|
+
import { Feature, MultiPolygon, Polygon } from 'geojson';
|
|
918
919
|
import type { Coordinate, Floor, Door, Space, MapObject, PointOfInterest, Connection, Annotation } from '@mappedin/mappedin-js/maker/src/map-data-objects';
|
|
919
920
|
import type { Label, Marker, Model } from '@mappedin/mappedin-js/maker/src/map-view-objects';
|
|
920
921
|
import type { EasingCurve } from '@mappedin/core-sdk/src/camera';
|
|
@@ -1176,6 +1177,27 @@ declare module '@mappedin/mappedin-js/maker/src/types' {
|
|
|
1176
1177
|
* Defines the target for navigation operations.
|
|
1177
1178
|
*/
|
|
1178
1179
|
export type TNavigationTarget = Space | MapObject | Coordinate | Door | PointOfInterest | Connection;
|
|
1180
|
+
/**
|
|
1181
|
+
* Defines the special zone for navigation operations.
|
|
1182
|
+
*/
|
|
1183
|
+
export type TDirectionZone = {
|
|
1184
|
+
/**
|
|
1185
|
+
* The zone geometry.
|
|
1186
|
+
*/
|
|
1187
|
+
geometry: Feature<MultiPolygon | Polygon>;
|
|
1188
|
+
/**
|
|
1189
|
+
* The additional cost for navigation through the zone, from 0 to Infinity.
|
|
1190
|
+
* The final cost is calculated as the sum of basic cost that comes from the {@MapData}
|
|
1191
|
+
* and the additional zone cost.
|
|
1192
|
+
* A additional zone cost of 0 will make the zone free to navigate through
|
|
1193
|
+
* A additional zone cost of Infinity will make the zone impossible to navigate through
|
|
1194
|
+
*/
|
|
1195
|
+
cost: number;
|
|
1196
|
+
/**
|
|
1197
|
+
* The zone's floor, defaults to the all floors if not provided.
|
|
1198
|
+
*/
|
|
1199
|
+
floor?: Floor;
|
|
1200
|
+
};
|
|
1179
1201
|
/**
|
|
1180
1202
|
* Options for controlling the behavior of a {@link Path}.
|
|
1181
1203
|
*/
|
|
@@ -1448,9 +1470,9 @@ declare module '@mappedin/mappedin-js/maker/src/types' {
|
|
|
1448
1470
|
* ```ts
|
|
1449
1471
|
* // Enable smoothing with a radius of 3 metres
|
|
1450
1472
|
* mapView.getDirections(firstSpace, secondSpace, {
|
|
1451
|
-
*
|
|
1452
|
-
*
|
|
1453
|
-
*
|
|
1473
|
+
* smoothing: {
|
|
1474
|
+
* radius: 3,
|
|
1475
|
+
* }
|
|
1454
1476
|
* })
|
|
1455
1477
|
* ```
|
|
1456
1478
|
*/
|
|
@@ -1458,6 +1480,28 @@ declare module '@mappedin/mappedin-js/maker/src/types' {
|
|
|
1458
1480
|
enabled?: boolean;
|
|
1459
1481
|
radius: number;
|
|
1460
1482
|
};
|
|
1483
|
+
/**
|
|
1484
|
+
* Defines the special zones for navigation operations.
|
|
1485
|
+
*
|
|
1486
|
+
* @example
|
|
1487
|
+
* ```ts
|
|
1488
|
+
* mapView.getDirections(firstSpace, secondSpace, {
|
|
1489
|
+
* zones: [
|
|
1490
|
+
* {
|
|
1491
|
+
* geometry: polygon as Feature<Polygon>,
|
|
1492
|
+
* // The additional cost for navigation through the zone, from 0 to Infinity.
|
|
1493
|
+
* // The final cost is calculated as the sum of basic cost that comes from the {@MapData}
|
|
1494
|
+
* // and the additional zone cost.
|
|
1495
|
+
* // A additional cost of 0 will make the zone free to navigate through
|
|
1496
|
+
* // A additional cost of Infinity will make the zone impossible to navigate through
|
|
1497
|
+
* cost: Infinity,
|
|
1498
|
+
* floor: mapView.currentFloor,
|
|
1499
|
+
* },
|
|
1500
|
+
* ],
|
|
1501
|
+
* });
|
|
1502
|
+
* ```
|
|
1503
|
+
*/
|
|
1504
|
+
zones?: TDirectionZone[];
|
|
1461
1505
|
};
|
|
1462
1506
|
/**
|
|
1463
1507
|
* The target for the add model operation.
|
|
@@ -2955,12 +2999,12 @@ declare module '@mappedin/mappedin-js/maker/src' {
|
|
|
2955
2999
|
export { parseMVF, unzipMVF, enableTestMode };
|
|
2956
3000
|
export type { MapView, MapData, MappedinMapLibreOverlay, TEvents, TEventPayload, TClickPayload, THoverPayload, TShow3DMapOptions, TGetMapDataOptions, TGetMapDataWithAccessTokenOptions, TGetMapDataWithCredentialsOptions, TGetMapDataSharedOptions, TAmbientOcclusionOptions, TAntialiasingOptions, TMVF, PaintStyle, LineStyle, Shading, TMVFStyleCollection, TMVFStyle, TMVFLineStringStyle, TMVFPolygonStyle, TMVFPointStyle, };
|
|
2957
3001
|
export type * from 'geojson';
|
|
2958
|
-
export type { TUpdateState, TLabelState, TGeometryState, TCameraAnimationOptions, TAnimationOptions, TFocusOnOptions, TEasingFunction, TCameraTarget, TNavigationTarget, TCameraFocusOnTarget, TAddMarkerOptions, TAddPathOptions, TLabelAppearance, TAddLabelOptions, TGetDirectionsOptions, TCollisionRankingTier, TMarkerAnchor, TDirectionInstruction, TDirectionInstructionAction, TGetState, TMarkerState, } from '@mappedin/mappedin-js/maker/src/types';
|
|
2959
|
-
export type { Label, Marker, Path, CameraTransform } from '@mappedin/mappedin-js/maker/src/map-view-objects';
|
|
3002
|
+
export type { TUpdateState, TLabelState, TGeometryState, TCameraAnimationOptions, TAnimationOptions, TFocusOnOptions, TEasingFunction, TCameraTarget, TNavigationTarget, TDirectionZone, TCameraFocusOnTarget, TAddMarkerOptions, TAddPathOptions, TLabelAppearance, TAddLabelOptions, TAddModelOptions, TAddModel, TGetDirectionsOptions, TCollisionRankingTier, TMarkerAnchor, TDirectionInstruction, TDirectionInstructionAction, TGetState, TMarkerState, } from '@mappedin/mappedin-js/maker/src/types';
|
|
3003
|
+
export type { Label, Marker, Path, CustomGeometry, CameraTransform, Model } from '@mappedin/mappedin-js/maker/src/map-view-objects';
|
|
2960
3004
|
export type { Navigation, TNavigationOptions } from '@mappedin/mappedin-js/maker/src/navigation';
|
|
2961
3005
|
export type { TSpaceType } from '@mappedin/mappedin-js/maker/src/map-data-objects';
|
|
2962
3006
|
export { Coordinate, Annotation, Connection, Door, Floor, MapObject, PointOfInterest, Space, Image, Hyperlink, } from '@mappedin/mappedin-js/maker/src/map-data-objects';
|
|
2963
|
-
export type { Camera, Labels, Markers, Paths, Exporter, Directions, Style, Outdoor } from '@mappedin/mappedin-js/maker/src/api-geojson';
|
|
3007
|
+
export type { Camera, Models, Labels, Markers, Paths, Exporter, Directions, Style, Outdoor } from '@mappedin/mappedin-js/maker/src/api-geojson';
|
|
2964
3008
|
}
|
|
2965
3009
|
|
|
2966
3010
|
declare module '@mappedin/mappedin-js/maker/src/api-geojson/blue-dot/blue-dot' {
|
|
@@ -3694,10 +3738,6 @@ declare module '@mappedin/mappedin-js/maker/src/map-view-objects/marker' {
|
|
|
3694
3738
|
* The HTML element that represents the marker.
|
|
3695
3739
|
*/
|
|
3696
3740
|
readonly contentEl: HTMLElement;
|
|
3697
|
-
/**
|
|
3698
|
-
* Forces the marker to update its collider.
|
|
3699
|
-
*/
|
|
3700
|
-
readonly update: () => void;
|
|
3701
3741
|
/**
|
|
3702
3742
|
* Checks if the provided instance is of type Marker"
|
|
3703
3743
|
*
|
|
@@ -3708,7 +3748,7 @@ declare module '@mappedin/mappedin-js/maker/src/map-view-objects/marker' {
|
|
|
3708
3748
|
/**
|
|
3709
3749
|
* @internal
|
|
3710
3750
|
*/
|
|
3711
|
-
constructor(id: string, contentEl: HTMLElement
|
|
3751
|
+
constructor(id: string, contentEl: HTMLElement);
|
|
3712
3752
|
}
|
|
3713
3753
|
}
|
|
3714
3754
|
|
|
@@ -4241,7 +4281,7 @@ declare module '@mappedin/mappedin-js/maker/src/api-geojson/directions' {
|
|
|
4241
4281
|
import type { DirectionsCollection } from '@packages/internal/geojson-navigator';
|
|
4242
4282
|
import type { MapDataInternal } from '@mappedin/mappedin-js/maker/src/map-data-objects';
|
|
4243
4283
|
import { Coordinate } from '@mappedin/mappedin-js/maker/src/map-data-objects';
|
|
4244
|
-
import type { TDirectionInstruction, TNavigationTarget } from '@mappedin/mappedin-js/maker/src/types';
|
|
4284
|
+
import type { TDirectionInstruction, TDirectionZone, TNavigationTarget } from '@mappedin/mappedin-js/maker/src/types';
|
|
4245
4285
|
/**
|
|
4246
4286
|
* Represents a set of directions between two points.
|
|
4247
4287
|
*
|
|
@@ -4292,6 +4332,7 @@ declare module '@mappedin/mappedin-js/maker/src/api-geojson/directions' {
|
|
|
4292
4332
|
enabled: boolean;
|
|
4293
4333
|
radius: number;
|
|
4294
4334
|
};
|
|
4335
|
+
zones: TDirectionZone[];
|
|
4295
4336
|
}, mapData: MapDataInternal) => Directions | undefined;
|
|
4296
4337
|
/**
|
|
4297
4338
|
* Get the node IDs that should be excluded from the navigation graph.
|
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-TUEE7MUR.js";import"./chunk-H43ODW5U.js";import"./chunk-K4GII35P.js";import"./chunk-BDZ2PK2A.js";import"./chunk-3JQFKFB7.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-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 {
|
|
1
|
+
import{c as W,n as R}from"./chunk-TUEE7MUR.js";import"./chunk-H43ODW5U.js";import"./chunk-K4GII35P.js";import{J as X}from"./chunk-BDZ2PK2A.js";import{a as o,j as y}from"./chunk-3JQFKFB7.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-H43ODW5U.js";import"./chunk-3JQFKFB7.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.37",
|
|
4
4
|
"private": false,
|
|
5
5
|
"main": "lib/esm/index.js",
|
|
6
6
|
"module": "lib/esm/index.js",
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"volta": {
|
|
36
36
|
"extends": "../../package.json"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "6715e7c6c8a9d3a4d33e711b25474987647c0b5a"
|
|
39
39
|
}
|