@mappedin/mappedin-js 6.0.1-alpha.35 → 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-QNKFLIQG.js → GLTFExporter-NKQIJINX.js} +1 -1
- package/lib/esm/{GLTFLoader-XXHIST4U.js → GLTFLoader-GDJUALCQ.js} +1 -1
- package/lib/esm/{browser-GW6IOT3A.js → browser-2CZ5S7PQ.js} +1 -1
- package/lib/esm/{chunk-CMHVARHO.js → chunk-3JQFKFB7.js} +1 -1
- package/lib/esm/{chunk-S7G7ETEN.js → chunk-BDZ2PK2A.js} +1 -1
- package/lib/esm/{chunk-46QN2SP2.js → chunk-H43ODW5U.js} +1 -1
- package/lib/esm/{chunk-EIKEXEHK.js → chunk-K4GII35P.js} +1 -1
- package/lib/esm/chunk-TUEE7MUR.js +950 -0
- package/lib/esm/index.d.ts +93 -23
- package/lib/esm/index.js +1 -1
- package/lib/esm/{inspector-W2DIQK3R.js → inspector-QGUFLX5C.js} +1 -1
- package/lib/esm/{outdoor-context-v4-DXJCYOAT.js → outdoor-context-v4-4QE2XOX2.js} +1 -1
- package/package.json +3 -3
- package/lib/esm/chunk-X2ZADEKF.js +0 -950
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' {
|
|
@@ -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;
|
|
@@ -914,6 +915,7 @@ declare module '@mappedin/mappedin-js/geojson/src/maplibre-overlay' {
|
|
|
914
915
|
}
|
|
915
916
|
|
|
916
917
|
declare module '@mappedin/mappedin-js/maker/src/types' {
|
|
918
|
+
import { Feature, MultiPolygon, Polygon } from 'geojson';
|
|
917
919
|
import type { Coordinate, Floor, Door, Space, MapObject, PointOfInterest, Connection, Annotation } from '@mappedin/mappedin-js/maker/src/map-data-objects';
|
|
918
920
|
import type { Label, Marker, Model } from '@mappedin/mappedin-js/maker/src/map-view-objects';
|
|
919
921
|
import type { EasingCurve } from '@mappedin/core-sdk/src/camera';
|
|
@@ -1065,6 +1067,7 @@ declare module '@mappedin/mappedin-js/maker/src/types' {
|
|
|
1065
1067
|
* The type for updating the state of map elements (colors, texts, etc.).
|
|
1066
1068
|
*/
|
|
1067
1069
|
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;
|
|
1070
|
+
export type TUpdateStates = Partial<Omit<TGeometryState, 'interactive' | 'hoverColor' | 'type'>> | Partial<TMarkerState> | Partial<TLabelState> | Partial<TGeometryState>;
|
|
1068
1071
|
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
1072
|
export type TGetState<T> = TGetEntityState<T> | undefined;
|
|
1070
1073
|
/**
|
|
@@ -1174,6 +1177,27 @@ declare module '@mappedin/mappedin-js/maker/src/types' {
|
|
|
1174
1177
|
* Defines the target for navigation operations.
|
|
1175
1178
|
*/
|
|
1176
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
|
+
};
|
|
1177
1201
|
/**
|
|
1178
1202
|
* Options for controlling the behavior of a {@link Path}.
|
|
1179
1203
|
*/
|
|
@@ -1185,11 +1209,11 @@ declare module '@mappedin/mappedin-js/maker/src/types' {
|
|
|
1185
1209
|
*/
|
|
1186
1210
|
color?: string;
|
|
1187
1211
|
/**
|
|
1188
|
-
*
|
|
1212
|
+
* Accent color that is applied to the path pulse and path arrows
|
|
1189
1213
|
*
|
|
1190
1214
|
* @defaultValue '#ffffff'
|
|
1191
1215
|
*/
|
|
1192
|
-
|
|
1216
|
+
accentColor?: string;
|
|
1193
1217
|
/**
|
|
1194
1218
|
* Number of iterations to pulse to indicate direction.
|
|
1195
1219
|
*
|
|
@@ -1446,9 +1470,9 @@ declare module '@mappedin/mappedin-js/maker/src/types' {
|
|
|
1446
1470
|
* ```ts
|
|
1447
1471
|
* // Enable smoothing with a radius of 3 metres
|
|
1448
1472
|
* mapView.getDirections(firstSpace, secondSpace, {
|
|
1449
|
-
*
|
|
1450
|
-
*
|
|
1451
|
-
*
|
|
1473
|
+
* smoothing: {
|
|
1474
|
+
* radius: 3,
|
|
1475
|
+
* }
|
|
1452
1476
|
* })
|
|
1453
1477
|
* ```
|
|
1454
1478
|
*/
|
|
@@ -1456,6 +1480,28 @@ declare module '@mappedin/mappedin-js/maker/src/types' {
|
|
|
1456
1480
|
enabled?: boolean;
|
|
1457
1481
|
radius: number;
|
|
1458
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[];
|
|
1459
1505
|
};
|
|
1460
1506
|
/**
|
|
1461
1507
|
* The target for the add model operation.
|
|
@@ -1610,6 +1656,11 @@ declare module '@mappedin/mappedin-js/maker/src/navigation' {
|
|
|
1610
1656
|
* @default '#40A9FF'
|
|
1611
1657
|
*/
|
|
1612
1658
|
color?: string;
|
|
1659
|
+
/**
|
|
1660
|
+
* The accent color of the path. This is applied to arrows if they are displayed
|
|
1661
|
+
* @default 'blue'
|
|
1662
|
+
*/
|
|
1663
|
+
accentColor?: string;
|
|
1613
1664
|
/**
|
|
1614
1665
|
* The radius of the path near the markers.
|
|
1615
1666
|
* @default 0.25
|
|
@@ -1625,6 +1676,11 @@ declare module '@mappedin/mappedin-js/maker/src/navigation' {
|
|
|
1625
1676
|
* @default false
|
|
1626
1677
|
*/
|
|
1627
1678
|
displayArrowsOnPath?: boolean;
|
|
1679
|
+
/**
|
|
1680
|
+
* Controls whether arrows are animated.
|
|
1681
|
+
* @default false
|
|
1682
|
+
*/
|
|
1683
|
+
animateArrowsOnPath?: boolean;
|
|
1628
1684
|
};
|
|
1629
1685
|
/**
|
|
1630
1686
|
* Options for the departure and destination polygons.
|
|
@@ -2943,12 +2999,12 @@ declare module '@mappedin/mappedin-js/maker/src' {
|
|
|
2943
2999
|
export { parseMVF, unzipMVF, enableTestMode };
|
|
2944
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, };
|
|
2945
3001
|
export type * from 'geojson';
|
|
2946
|
-
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';
|
|
2947
|
-
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';
|
|
2948
3004
|
export type { Navigation, TNavigationOptions } from '@mappedin/mappedin-js/maker/src/navigation';
|
|
2949
3005
|
export type { TSpaceType } from '@mappedin/mappedin-js/maker/src/map-data-objects';
|
|
2950
3006
|
export { Coordinate, Annotation, Connection, Door, Floor, MapObject, PointOfInterest, Space, Image, Hyperlink, } from '@mappedin/mappedin-js/maker/src/map-data-objects';
|
|
2951
|
-
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';
|
|
2952
3008
|
}
|
|
2953
3009
|
|
|
2954
3010
|
declare module '@mappedin/mappedin-js/maker/src/api-geojson/blue-dot/blue-dot' {
|
|
@@ -3682,10 +3738,6 @@ declare module '@mappedin/mappedin-js/maker/src/map-view-objects/marker' {
|
|
|
3682
3738
|
* The HTML element that represents the marker.
|
|
3683
3739
|
*/
|
|
3684
3740
|
readonly contentEl: HTMLElement;
|
|
3685
|
-
/**
|
|
3686
|
-
* Forces the marker to update its collider.
|
|
3687
|
-
*/
|
|
3688
|
-
readonly update: () => void;
|
|
3689
3741
|
/**
|
|
3690
3742
|
* Checks if the provided instance is of type Marker"
|
|
3691
3743
|
*
|
|
@@ -3696,7 +3748,7 @@ declare module '@mappedin/mappedin-js/maker/src/map-view-objects/marker' {
|
|
|
3696
3748
|
/**
|
|
3697
3749
|
* @internal
|
|
3698
3750
|
*/
|
|
3699
|
-
constructor(id: string, contentEl: HTMLElement
|
|
3751
|
+
constructor(id: string, contentEl: HTMLElement);
|
|
3700
3752
|
}
|
|
3701
3753
|
}
|
|
3702
3754
|
|
|
@@ -3835,7 +3887,7 @@ declare module '@mappedin/mappedin-js/maker/src/api-geojson/api' {
|
|
|
3835
3887
|
CustomGeometries: CustomGeometries;
|
|
3836
3888
|
Style: Style;
|
|
3837
3889
|
constructor(rendererCore: RendererCore, mapView: MapView);
|
|
3838
|
-
updateState<T extends Space | MapObject | Label | Marker |
|
|
3890
|
+
updateState<T extends Space | MapObject | Label | Marker | 'walls' | (string & NonNullable<unknown>)>(target: T, state: TUpdateState<T>): void;
|
|
3839
3891
|
update: () => void;
|
|
3840
3892
|
getMapDataInternal(): import("../map-data-objects").MapDataInternal | undefined;
|
|
3841
3893
|
getMapData(): MapData | undefined;
|
|
@@ -3888,7 +3940,7 @@ declare module '@mappedin/mappedin-js/maker/src/api-geojson/camera' {
|
|
|
3888
3940
|
* @param target The target configuration for the camera.
|
|
3889
3941
|
* @param options Optional settings for the camera animation.
|
|
3890
3942
|
* @example
|
|
3891
|
-
* map.Camera.
|
|
3943
|
+
* map.Camera.animateTo({ center: coordinate, zoomLevel: 10 }, { duration: 500 });
|
|
3892
3944
|
*/
|
|
3893
3945
|
animateTo(target: TCameraTarget, options?: TCameraAnimationOptions): Promise<void>;
|
|
3894
3946
|
/**
|
|
@@ -4229,7 +4281,7 @@ declare module '@mappedin/mappedin-js/maker/src/api-geojson/directions' {
|
|
|
4229
4281
|
import type { DirectionsCollection } from '@packages/internal/geojson-navigator';
|
|
4230
4282
|
import type { MapDataInternal } from '@mappedin/mappedin-js/maker/src/map-data-objects';
|
|
4231
4283
|
import { Coordinate } from '@mappedin/mappedin-js/maker/src/map-data-objects';
|
|
4232
|
-
import type { TDirectionInstruction, TNavigationTarget } from '@mappedin/mappedin-js/maker/src/types';
|
|
4284
|
+
import type { TDirectionInstruction, TDirectionZone, TNavigationTarget } from '@mappedin/mappedin-js/maker/src/types';
|
|
4233
4285
|
/**
|
|
4234
4286
|
* Represents a set of directions between two points.
|
|
4235
4287
|
*
|
|
@@ -4280,6 +4332,7 @@ declare module '@mappedin/mappedin-js/maker/src/api-geojson/directions' {
|
|
|
4280
4332
|
enabled: boolean;
|
|
4281
4333
|
radius: number;
|
|
4282
4334
|
};
|
|
4335
|
+
zones: TDirectionZone[];
|
|
4283
4336
|
}, mapData: MapDataInternal) => Directions | undefined;
|
|
4284
4337
|
/**
|
|
4285
4338
|
* Get the node IDs that should be excluded from the navigation graph.
|
|
@@ -4766,6 +4819,18 @@ declare module '@mappedin/mappedin-js/geojson/src/components/path' {
|
|
|
4766
4819
|
* The color of the path.
|
|
4767
4820
|
*/
|
|
4768
4821
|
color?: string;
|
|
4822
|
+
/**
|
|
4823
|
+
* The accent color of the path. When arrows are visible, it is applied to them
|
|
4824
|
+
*/
|
|
4825
|
+
accentColor?: string;
|
|
4826
|
+
/**
|
|
4827
|
+
* Display Arrows on Path to indicate direction
|
|
4828
|
+
*/
|
|
4829
|
+
displayArrowsOnPath?: boolean;
|
|
4830
|
+
/**
|
|
4831
|
+
* Arrows on path should animate to indicate direction
|
|
4832
|
+
*/
|
|
4833
|
+
animateArrowsOnPath?: boolean;
|
|
4769
4834
|
};
|
|
4770
4835
|
export class PathComponent {
|
|
4771
4836
|
#private;
|
|
@@ -4779,8 +4844,10 @@ declare module '@mappedin/mappedin-js/geojson/src/components/path' {
|
|
|
4779
4844
|
nearRadius: number;
|
|
4780
4845
|
farRadius: number;
|
|
4781
4846
|
color: string;
|
|
4782
|
-
|
|
4847
|
+
accentColor: string;
|
|
4783
4848
|
altitudeAdjustment: number;
|
|
4849
|
+
displayArrowsOnPath: boolean;
|
|
4850
|
+
animateArrowsOnPath: boolean;
|
|
4784
4851
|
dirty: boolean;
|
|
4785
4852
|
constructor(feature: FeatureCollection<Point, any>, options?: AddPathOptions);
|
|
4786
4853
|
setColor(): void;
|
|
@@ -15138,10 +15205,13 @@ declare module '@mappedin/mappedin-js/geojson/src/entities' {
|
|
|
15138
15205
|
declare module '@mappedin/mappedin-js/geojson/src/systems/path/system' {
|
|
15139
15206
|
import type { RendererState } from '@mappedin/mappedin-js/geojson/src/renderer';
|
|
15140
15207
|
import type { RendererCore } from '@mappedin/mappedin-js/geojson/src';
|
|
15208
|
+
import { PubSub } from '@packages/internal/common';
|
|
15141
15209
|
/**
|
|
15142
15210
|
* A system for drawing and controlling the visual state of paths
|
|
15143
15211
|
*/
|
|
15144
|
-
export class PathSystem {
|
|
15212
|
+
export class PathSystem extends PubSub<{
|
|
15213
|
+
'animate:path': undefined;
|
|
15214
|
+
}> {
|
|
15145
15215
|
convertTo3DMapPosition: RendererCore['convertTo3DMapPosition'];
|
|
15146
15216
|
constructor(rendererState: RendererState, convertTo3DMapPosition: RendererCore['convertTo3DMapPosition']);
|
|
15147
15217
|
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-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-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-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",
|
|
@@ -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": "6715e7c6c8a9d3a4d33e711b25474987647c0b5a"
|
|
39
39
|
}
|