@mappedin/mappedin-js 6.0.1-beta.5 → 6.0.1-beta.7

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.
@@ -15,6 +15,7 @@
15
15
  // ../mappedin-js/@packages/internal/quad-tree
16
16
  // ../mappedin-js/@packages/internal/outdoor-context-v4
17
17
  // ../mappedin-js/@packages/internal/geojson-navigator
18
+ // ../mappedin-js/minisearch
18
19
  // ../mappedin-js/three/addons/loaders/GLTFLoader.js
19
20
  // ../mappedin-js/@mapbox/point-geometry
20
21
  // ../mappedin-js/@maplibre/maplibre-gl-style-spec
@@ -310,17 +311,20 @@ declare module '@mappedin/mappedin-js' {
310
311
  export type { Label, Marker, Path, Shape, CameraTransform, Model } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
311
312
  export type { Navigation, TNavigationOptions } from '@mappedin/mappedin-js/mappedin-js/src/navigation';
312
313
  export type { TSpaceType } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
313
- export { Coordinate, Annotation, Connection, Door, Floor, MapObject, PointOfInterest, Space, Image, Hyperlink, } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
314
+ export { Coordinate, Annotation, Connection, Door, Floor, MapObject, PointOfInterest, Space, Image, Hyperlink, EnterpriseLocation, EnterpriseCategory, EnterpriseVenue, type Places, } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
314
315
  export type { Camera, Models, Labels, Markers, Paths, Exporter, Directions, Style, Shapes, Outdoor, } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson';
316
+ export type { SearchResult, SearchResultItem, SearchResultEnterpriseCategory, SearchResultEnterpriseLocations, SearchResultPlaces, SearchOptions, Search, Suggestion, MatchInfo, } from '@mappedin/mappedin-js/mappedin-js/src/search';
315
317
  }
316
318
 
317
319
  declare module '@mappedin/mappedin-js/mappedin-js/src/map-data' {
318
- import { PubSub } from '@packages/internal/common';
319
320
  import { Analytics } from '@mappedin/mappedin-js/mappedin-js/src/analytics';
321
+ import { PubSub } from '@packages/internal/common';
322
+ import type { TSearchOptions } from '@packages/internal/mvf-utils';
320
323
  import type { Connection, Door, Floor, MapDataInternal, Space, MapObject, PointOfInterest, Annotation, Coordinate } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
321
- import type Category from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/category';
322
- import type Location from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/location';
323
- import type Venue from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/venue';
324
+ import type EnterpriseCategory from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/category';
325
+ import type EnterpriseLocation from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/location';
326
+ import type EnterpriseVenue from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/venue';
327
+ import { Search } from '@mappedin/mappedin-js/mappedin-js/src/search';
324
328
  /**
325
329
  * A WeakMap to associate {@link MapData} instances with their internal representation.
326
330
  * We need a way to get the internal data object from the API
@@ -340,12 +344,32 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data' {
340
344
  }> {
341
345
  #private;
342
346
  Analytics: Analytics;
347
+ /**
348
+ * Search API for MapData
349
+ *
350
+ * @example
351
+ * // Enable search
352
+ * const mapData = await getMapData({ search: { enabled: true } });
353
+ * // or
354
+ * await mapData.Search.enable();
355
+ *
356
+ * // Perform a search query
357
+ * const results = await mapData.Search.query('Coffee Shop');
358
+ * console.log(results.locations);
359
+ *
360
+ * // Get search suggestions
361
+ * const suggestions = await mapData.Search.suggest('Coff');
362
+ * console.log(suggestions);
363
+ */
364
+ Search: Search;
343
365
  /**
344
366
  * Constructs a new instance of {@link MapData}.
345
367
  *
346
368
  * @internal
347
369
  */
348
- constructor(internal: MapDataInternal);
370
+ constructor(internal: MapDataInternal, { search }?: {
371
+ search?: TSearchOptions;
372
+ });
349
373
  /**
350
374
  * The name of the map.
351
375
  *
@@ -364,10 +388,6 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data' {
364
388
  * @returns {string} The organization ID of the map.
365
389
  */
366
390
  get organizationId(): string;
367
- /**
368
- * @internal
369
- */
370
- get venue(): Venue | undefined;
371
391
  /**
372
392
  * The token is used to fetch outdoor tiles.
373
393
  *
@@ -426,13 +446,23 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data' {
426
446
  */
427
447
  getByType(type: 'annotation'): Annotation[];
428
448
  /**
429
- * @internal
449
+ * @returns The enterprise locations ({@link EnterpriseLocation}) on the map.
450
+ * @example
451
+ * const enterpriseLocations = mapData.getByType('enterprise-location');
430
452
  */
431
- getByType(type: 'location'): Location[];
453
+ getByType(type: 'enterprise-location'): EnterpriseLocation[];
432
454
  /**
433
- * @internal
455
+ * @returns The enterprise categories ({@link EnterpriseCategory}) on the map.
456
+ * @example
457
+ * const enterpriseCategories = mapData.getByType('enterprise-category');
434
458
  */
435
- getByType(type: 'category'): Category[];
459
+ getByType(type: 'enterprise-category'): EnterpriseCategory[];
460
+ /**
461
+ * @returns The enterprise venue ({@link EnterpriseVenue}) on the map.
462
+ * @example
463
+ * const enterpriseVenue = mapData.getByType('enterprise-venue');
464
+ */
465
+ getByType(type: 'enterprise-venue'): EnterpriseVenue;
436
466
  /**
437
467
  * Retrieves a specific map feature by its type and ID.
438
468
  *
@@ -449,8 +479,8 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data' {
449
479
  getById(type: 'object', id: string): MapObject | undefined;
450
480
  getById(type: 'point-of-interest', id: string): PointOfInterest | undefined;
451
481
  getById(type: 'annotation', id: string): Annotation | undefined;
452
- getById(type: 'location', id: string): Location | undefined;
453
- getById(type: 'category', id: string): Category | undefined;
482
+ getById(type: 'enterprise-location', id: string): EnterpriseLocation | undefined;
483
+ getById(type: 'enterprise-category', id: string): EnterpriseCategory | undefined;
454
484
  getById(type: string, id: string): object | undefined;
455
485
  /**
456
486
  * @internal
@@ -592,13 +622,13 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects' {
592
622
  import Annotation from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/annotation';
593
623
  import Hyperlink from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/hyperlink';
594
624
  import Image from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/image';
595
- import type { AnnotationCollection, ParsedMVF, Connection as MVFConnection, EntranceCollection, NodeCollection, ObstructionCollection, SpaceCollection, Map as MVFMap, EnterpriseLocation, EnterpriseCategory } from '@mappedin/mvf';
596
- import type { MapDataObjects } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/types';
597
- import type Location from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/location';
598
- import type Category from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/category';
599
- import Venue from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/venue';
600
- import { PubSub } from '@packages/internal/common';
625
+ import type { AnnotationCollection, ParsedMVF, Connection as MVFConnection, EntranceCollection, NodeCollection, ObstructionCollection, SpaceCollection, Map as MVFMap, EnterpriseLocation as MVFEnterpriseLocation, EnterpriseCategory as MVFEnterpriseCategory } from '@mappedin/mvf';
601
626
  import { AnalyticsInternal } from '@mappedin/mappedin-js/mappedin-js/src/analytics';
627
+ import EnterpriseLocation from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/location';
628
+ import EnterpriseCategory from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/category';
629
+ import EnterpriseVenue from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/venue';
630
+ import { PubSub } from '@packages/internal/common';
631
+ import type { Places } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/types';
602
632
  /**
603
633
  * Internal class representing detailed map data.
604
634
  *
@@ -632,9 +662,9 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects' {
632
662
  * Represents a map of entrance IDs to obstruction IDs.
633
663
  */
634
664
  readonly obstructionIdByEntranceId: Record<string, string>;
635
- readonly venue?: Venue;
665
+ readonly venue?: EnterpriseVenue;
636
666
  doorsByNodeId: Record<string, Door>;
637
- locationsBySpaceId: Record<string, EnterpriseLocation[]>;
667
+ locationsBySpaceId: Record<string, MVFEnterpriseLocation[]>;
638
668
  /**
639
669
  * @internal
640
670
  */
@@ -697,8 +727,8 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects' {
697
727
  * @returns {Annotation[]} An array of Annotation objects.
698
728
  */
699
729
  get nodes(): Node[];
700
- get locations(): Location[];
701
- get categories(): Category[];
730
+ get locations(): EnterpriseLocation[];
731
+ get categories(): EnterpriseCategory[];
702
732
  /**
703
733
  * Retrieves an object by its type and ID.
704
734
  *
@@ -714,9 +744,9 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects' {
714
744
  getById(type: 'object', id: string): MapObject | undefined;
715
745
  getById(type: 'point-of-interest', id: string): PointOfInterest | undefined;
716
746
  getById(type: 'annotation', id: string): Annotation | undefined;
717
- getById(type: 'location', id: string): Location | undefined;
718
- getById(type: 'category', id: string): Category | undefined;
719
- getMapDataById(id: string): MapDataObjects | undefined;
747
+ getById(type: 'enterprise-location', id: string): EnterpriseLocation | undefined;
748
+ getById(type: 'enterprise-category', id: string): EnterpriseCategory | undefined;
749
+ getMapDataById(id: string): Places | undefined;
720
750
  /**
721
751
  * Retrieves a feature by its type and ID from the Mappedin Venue Format (MVF) data.
722
752
  *
@@ -743,14 +773,14 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects' {
743
773
  languagePacks: {
744
774
  [key: string]: {
745
775
  location: {
746
- [key: string]: Partial<EnterpriseLocation>;
776
+ [key: string]: Partial<MVFEnterpriseLocation>;
747
777
  };
748
778
  category: {
749
- [key: string]: Partial<EnterpriseCategory>;
779
+ [key: string]: Partial<MVFEnterpriseCategory>;
750
780
  };
751
781
  };
752
782
  };
753
- getPropTranslation(type: 'location' | 'category', prop: string, id: string, fallback: EnterpriseLocation[keyof EnterpriseLocation] | EnterpriseCategory[keyof EnterpriseCategory]): unknown;
783
+ getPropTranslation(type: 'enterprise-location' | 'enterprise-category', prop: string, id: string, fallback: MVFEnterpriseLocation[keyof MVFEnterpriseLocation] | MVFEnterpriseCategory[keyof MVFEnterpriseCategory]): unknown;
754
784
  changeLanguage(languageCode: string): Promise<void>;
755
785
  /**
756
786
  * Cleans up resources used by the instance.
@@ -759,9 +789,9 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects' {
759
789
  */
760
790
  destroy(): void;
761
791
  }
762
- export { MapDataInternal, Space, Floor, Connection, MapObject, Door, Coordinate, PointOfInterest, Annotation, Hyperlink, Image, Location, };
792
+ export { MapDataInternal, Space, Floor, Connection, MapObject, Door, Coordinate, PointOfInterest, Annotation, Hyperlink, Image, EnterpriseLocation, EnterpriseCategory, EnterpriseVenue, };
763
793
  export type { TSpaceType } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/space';
764
- export type { MapDataObjects };
794
+ export type { Places };
765
795
  }
766
796
 
767
797
  declare module '@mappedin/mappedin-js/mappedin-js/src/map-view' {
@@ -1070,6 +1100,10 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
1070
1100
  export type DeepRequired<T> = Required<{
1071
1101
  [K in keyof T]: T[K] extends Required<T[K]> ? T[K] : DeepRequired<T[K]>;
1072
1102
  }>;
1103
+ export type CancellablePromise<T> = {
1104
+ promise: Promise<T>;
1105
+ cancel: () => void;
1106
+ };
1073
1107
  /**
1074
1108
  * @hidden
1075
1109
  */
@@ -1879,8 +1913,9 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects' {
1879
1913
  }
1880
1914
 
1881
1915
  declare module '@mappedin/mappedin-js/mappedin-js/src/navigation' {
1882
- import type { MapView } from '@mappedin/mappedin-js/mappedin-js/src/map-view';
1883
1916
  import type { Directions } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson';
1917
+ import type { GeojsonApiMapObject } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object';
1918
+ import type { RendererCore } from '@mappedin/core-sdk';
1884
1919
  /**
1885
1920
  * Options for navigation.
1886
1921
  */
@@ -1956,18 +1991,24 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/navigation' {
1956
1991
  /**
1957
1992
  * @internal
1958
1993
  */
1959
- constructor(mapView: MapView);
1994
+ get currentMap(): GeojsonApiMapObject;
1995
+ /**
1996
+ * @internal
1997
+ */
1998
+ constructor(core: RendererCore, currentMapGetter: CurrentMapGetter);
1960
1999
  /**
1961
2000
  * Draws the specified directions on the map.
1962
2001
  * @param directions The directions to be drawn.
1963
2002
  * @param options Optional additional options for the navigation.
1964
2003
  */
1965
- draw: (directions: Directions, options?: TNavigationOptions) => Promise<void>;
2004
+ draw: (directions: Directions, options?: TNavigationOptions) => Promise<unknown>;
1966
2005
  /**
1967
2006
  * Clears any drawn navigation paths or directions from the map.
1968
2007
  */
1969
2008
  clear: () => void;
1970
2009
  }
2010
+ type CurrentMapGetter = () => GeojsonApiMapObject | undefined;
2011
+ export {};
1971
2012
  }
1972
2013
 
1973
2014
  declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson' {
@@ -1985,30 +2026,35 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson' {
1985
2026
  export { Images } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/images';
1986
2027
  }
1987
2028
 
2029
+ declare module '@mappedin/mappedin-js/mappedin-js/src/search' {
2030
+ export type { SearchResult, SearchResultItem, SearchOptions, Suggestion, SearchResultEnterpriseCategory, SearchResultEnterpriseLocations, SearchResultPlaces, MatchInfo, } from '@mappedin/mappedin-js/mappedin-js/src/search/internal';
2031
+ export type { SearchState } from '@mappedin/mappedin-js/mappedin-js/src/search/external';
2032
+ export { Search } from '@mappedin/mappedin-js/mappedin-js/src/search/external';
2033
+ }
2034
+
1988
2035
  declare module '@mappedin/mappedin-js/mappedin-js/src/analytics' {
1989
2036
  export { Analytics, AnalyticsInternal } from '@mappedin/mappedin-js/mappedin-js/src/analytics/customer';
1990
2037
  export type { AnalyticsUpdateOptions } from '@mappedin/mappedin-js/mappedin-js/src/analytics/customer';
1991
2038
  }
1992
2039
 
1993
2040
  declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/category' {
1994
- import type { EnterpriseCategory } from '@mappedin/mvf';
1995
- import type { MapDataInternal, Location } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
2041
+ import type { EnterpriseCategory as MVFEnterpriseCategory } from '@mappedin/mvf';
2042
+ import type { MapDataInternal, EnterpriseLocation } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
1996
2043
  import BaseMapData from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-object';
1997
2044
  /**
1998
- * A class representing space data within the map.
2045
+ * An EnterpriseCategory is a collection of similar EnterpriseLocations.
1999
2046
  *
2000
- * Spaces are used to represent different areas within a map, such as rooms, hallways, etc.
2001
2047
  */
2002
- class Category extends BaseMapData implements Omit<EnterpriseCategory, 'children' | 'locations'> {
2048
+ class EnterpriseCategory extends BaseMapData implements Omit<MVFEnterpriseCategory, 'children' | 'locations'> {
2003
2049
  #private;
2004
2050
  /**
2005
2051
  * @internal
2006
2052
  */
2007
- static readonly __type = "category";
2053
+ static readonly __type = "enterprise-category";
2008
2054
  /**
2009
2055
  * @internal
2010
2056
  */
2011
- readonly __type = "category";
2057
+ readonly __type = "enterprise-category";
2012
2058
  name: string;
2013
2059
  color?: string | undefined;
2014
2060
  externalId: string;
@@ -2017,24 +2063,24 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/category'
2017
2063
  iconFromDefaultList?: string | null | undefined;
2018
2064
  sortOrder: number;
2019
2065
  /**
2020
- * Checks if the provided instance is of type Category.
2066
+ * Checks if the provided instance is of type EnterpriseCategory.
2021
2067
  *
2022
2068
  * @param instance The instance to check.
2023
- * @returns {boolean} True if the instance is a Category, false otherwise.
2069
+ * @returns {boolean} True if the instance is a EnterpriseCategory, false otherwise.
2024
2070
  */
2025
- static is(instance: object): instance is Category;
2071
+ static is(instance: object): instance is EnterpriseCategory;
2026
2072
  /**
2027
2073
  * @internal
2028
2074
  */
2029
2075
  constructor(data: MapDataInternal, options: {
2030
- mvfData: EnterpriseCategory;
2076
+ mvfData: MVFEnterpriseCategory;
2031
2077
  });
2032
- get children(): Category[];
2033
- get locations(): Location[];
2078
+ get children(): EnterpriseCategory[];
2079
+ get locations(): EnterpriseLocation[];
2034
2080
  /**
2035
- * Serializes the space data to JSON.
2081
+ * Serializes the EnterpriseCategory data to JSON.
2036
2082
  *
2037
- * @returns An object representing the space.
2083
+ * @returns An object representing the EnterpriseCategory.
2038
2084
  */
2039
2085
  toJSON(): {
2040
2086
  id: string;
@@ -2047,29 +2093,29 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/category'
2047
2093
  */
2048
2094
  destroy(): void;
2049
2095
  }
2050
- export default Category;
2096
+ export default EnterpriseCategory;
2051
2097
  }
2052
2098
 
2053
2099
  declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/location' {
2054
- import type { EnterpriseLocation, LocationState, OperationHours, SiblingGroup } from '@mappedin/mvf';
2100
+ import type { EnterpriseLocation as MVFEnterpriseLocation, LocationState, OperationHours, SiblingGroup } from '@mappedin/mvf';
2055
2101
  import type { Coordinate, MapDataInternal, Space } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
2056
2102
  import BaseMapData from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-object';
2057
2103
  import type Node from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/node';
2058
2104
  /**
2059
- * A class representing space data within the map.
2105
+ * A class representing enterprise location data within the map.
2060
2106
  *
2061
- * Spaces are used to represent different areas within a map, such as rooms, hallways, etc.
2107
+ * An EnterpriseLocation is something like a store, or a washroom on a map.
2062
2108
  */
2063
- class Location extends BaseMapData implements Omit<EnterpriseLocation, 'polygons' | 'nodes' | 'links'> {
2109
+ class EnterpriseLocation extends BaseMapData implements Omit<MVFEnterpriseLocation, 'polygons' | 'nodes' | 'links'> {
2064
2110
  #private;
2065
2111
  /**
2066
2112
  * @internal
2067
2113
  */
2068
- static readonly __type = "location";
2114
+ static readonly __type = "enterprise-location";
2069
2115
  /**
2070
2116
  * @internal
2071
2117
  */
2072
- readonly __type = "location";
2118
+ readonly __type = "enterprise-location";
2073
2119
  description?: string | undefined;
2074
2120
  name: string;
2075
2121
  amenity?: string | undefined;
@@ -2102,25 +2148,25 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/location'
2102
2148
  tags?: string[] | undefined;
2103
2149
  type: string;
2104
2150
  /**
2105
- * Checks if the provided instance is of type Location.
2151
+ * Checks if the provided instance is of type EnterpriseLocation.
2106
2152
  *
2107
2153
  * @param instance The instance to check.
2108
- * @returns {boolean} True if the instance is a Location, false otherwise.
2154
+ * @returns {boolean} True if the instance is a EnterpriseLocation, false otherwise.
2109
2155
  */
2110
- static is(instance: object): instance is Location;
2156
+ static is(instance: object): instance is EnterpriseLocation;
2111
2157
  /**
2112
2158
  * @internal
2113
2159
  */
2114
2160
  constructor(data: MapDataInternal, options: {
2115
- mvfData: EnterpriseLocation;
2161
+ mvfData: MVFEnterpriseLocation;
2116
2162
  });
2117
2163
  get coordinates(): Coordinate[];
2118
2164
  get nodes(): Node[];
2119
2165
  get spaces(): Space[];
2120
2166
  /**
2121
- * Serializes the space data to JSON.
2167
+ * Serializes the EnterpriseLocation data to JSON.
2122
2168
  *
2123
- * @returns An object representing the space.
2169
+ * @returns An object representing the EnterpriseLocation.
2124
2170
  */
2125
2171
  toJSON(): {
2126
2172
  id: string;
@@ -2133,28 +2179,26 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/location'
2133
2179
  */
2134
2180
  destroy(): void;
2135
2181
  }
2136
- export default Location;
2182
+ export default EnterpriseLocation;
2137
2183
  }
2138
2184
 
2139
2185
  declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/venue' {
2140
- import type { EnterpriseVenue, Language } from '@mappedin/mvf';
2186
+ import type { EnterpriseVenue as MVFEnterpriseVenue, Language } from '@mappedin/mvf';
2141
2187
  import type { Hyperlink, MapDataInternal } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
2142
2188
  import BaseMapData from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-object';
2143
2189
  /**
2144
- * A class representing space data within the map.
2145
- *
2146
- * Spaces are used to represent different areas within a map, such as rooms, hallways, etc.
2190
+ * An EnterpriseVenue is a specific place (like a mall, office building, or stadium) with one or more Floors
2147
2191
  */
2148
- class Venue extends BaseMapData implements EnterpriseVenue {
2192
+ class EnterpriseVenue extends BaseMapData implements MVFEnterpriseVenue {
2149
2193
  #private;
2150
2194
  /**
2151
2195
  * @internal
2152
2196
  */
2153
- static readonly __type = "venue";
2197
+ static readonly __type = "enterprise-venue";
2154
2198
  /**
2155
2199
  * @internal
2156
2200
  */
2157
- readonly __type = "venue";
2201
+ readonly __type = "enterprise-venue";
2158
2202
  countrycode?: string | undefined;
2159
2203
  externalId: string;
2160
2204
  defaultLanguage: Language;
@@ -2169,28 +2213,28 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/venue' {
2169
2213
  topLocations?: string[] | undefined;
2170
2214
  tzid?: string | undefined;
2171
2215
  /**
2172
- * Checks if the provided instance is of type Category.
2216
+ * Checks if the provided instance is of type EnterpriseVenue.
2173
2217
  *
2174
2218
  * @param instance The instance to check.
2175
- * @returns {boolean} True if the instance is a Category, false otherwise.
2219
+ * @returns {boolean} True if the instance is a EnterpriseVenue, false otherwise.
2176
2220
  */
2177
- static is(instance: object): instance is Venue;
2221
+ static is(instance: object): instance is EnterpriseVenue;
2178
2222
  /**
2179
2223
  * @internal
2180
2224
  */
2181
2225
  constructor(_data: MapDataInternal, options: {
2182
- mvfData: EnterpriseVenue;
2226
+ mvfData: MVFEnterpriseVenue;
2183
2227
  });
2184
2228
  /**
2185
- * Gets the name of the space.
2229
+ * Gets the name of the EnterpriseVenue.
2186
2230
  *
2187
- * @returns {string} The name of the space.
2231
+ * @returns {string} The name of the EnterpriseVenue.
2188
2232
  */
2189
2233
  get name(): string;
2190
2234
  /**
2191
- * Serializes the space data to JSON.
2235
+ * Serializes the EnterpriseVenue data to JSON.
2192
2236
  *
2193
- * @returns An object representing the space.
2237
+ * @returns An object representing the EnterpriseVenue.
2194
2238
  */
2195
2239
  toJSON(): {
2196
2240
  id: string;
@@ -2203,7 +2247,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/venue' {
2203
2247
  */
2204
2248
  destroy(): void;
2205
2249
  }
2206
- export default Venue;
2250
+ export default EnterpriseVenue;
2207
2251
  }
2208
2252
 
2209
2253
  declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/stacked-maps/stacked-maps' {
@@ -2442,10 +2486,10 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/door' {
2442
2486
  declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/space' {
2443
2487
  import type { Image, SpaceCollection } from '@mappedin/mvf';
2444
2488
  import Coordinate from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/coordinate';
2445
- import type { Location, MapDataInternal } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
2489
+ import type { EnterpriseLocation, MapDataInternal } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
2446
2490
  import type Floor from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/floor';
2447
2491
  import BaseMapData from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-object';
2448
- import Door from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/door';
2492
+ import type Door from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/door';
2449
2493
  /**
2450
2494
  * Represents the various types of spaces that can be defined within a map.
2451
2495
  * - 'room': A standard room or enclosed area.
@@ -2503,7 +2547,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/space' {
2503
2547
  /**
2504
2548
  * @internal
2505
2549
  */
2506
- get locations(): Location[];
2550
+ get locations(): EnterpriseLocation[];
2507
2551
  /**
2508
2552
  * Gets the {@link Floor} object associated with the space.
2509
2553
  *
@@ -3198,13 +3242,15 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/image' {
3198
3242
  declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/types' {
3199
3243
  import type Door from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/door';
3200
3244
  import type Floor from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/floor';
3201
- import type Node from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/node';
3202
3245
  import type Space from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/space';
3203
3246
  import type PointOfInterest from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/poi';
3204
3247
  import type Annotation from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/annotation';
3205
3248
  import type Connection from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/connection';
3206
3249
  import type MapObject from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/object';
3207
- export type MapDataObjects = Space | Floor | Node | Door | Connection | MapObject | PointOfInterest | Annotation;
3250
+ /**
3251
+ * Places are the main objects that can be searched for.
3252
+ */
3253
+ export type Places = Space | Floor | Door | Connection | MapObject | PointOfInterest | Annotation;
3208
3254
  }
3209
3255
 
3210
3256
  declare module '@mappedin/mappedin-js/mappedin-js/src' {
@@ -3490,8 +3536,9 @@ declare module '@mappedin/mappedin-js/mappedin-js/src' {
3490
3536
  export type { Label, Marker, Path, Shape, CameraTransform, Model } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
3491
3537
  export type { Navigation, TNavigationOptions } from '@mappedin/mappedin-js/mappedin-js/src/navigation';
3492
3538
  export type { TSpaceType } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
3493
- export { Coordinate, Annotation, Connection, Door, Floor, MapObject, PointOfInterest, Space, Image, Hyperlink, } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
3539
+ export { Coordinate, Annotation, Connection, Door, Floor, MapObject, PointOfInterest, Space, Image, Hyperlink, EnterpriseLocation, EnterpriseCategory, EnterpriseVenue, type Places, } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
3494
3540
  export type { Camera, Models, Labels, Markers, Paths, Exporter, Directions, Style, Shapes, Outdoor, } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson';
3541
+ export type { SearchResult, SearchResultItem, SearchResultEnterpriseCategory, SearchResultEnterpriseLocations, SearchResultPlaces, SearchOptions, Search, Suggestion, MatchInfo, } from '@mappedin/mappedin-js/mappedin-js/src/search';
3495
3542
  }
3496
3543
 
3497
3544
  declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/blue-dot/blue-dot' {
@@ -3722,10 +3769,18 @@ declare module '@mappedin/mappedin-js/geojson/src/components/marker' {
3722
3769
  }
3723
3770
 
3724
3771
  declare module '@mappedin/mappedin-js/geojson/src/components/path' {
3725
- import { type Mesh, type ShaderMaterial, type BufferGeometry, Vector3 } from 'three';
3726
- import type { Position } from '@mappedin/mappedin-js/geojson/src/types';
3772
+ import { Vector3 } from 'three';
3773
+ import type { Mesh, ShaderMaterial, BufferGeometry } from 'three';
3774
+ import type { EntityId, Position } from '@mappedin/mappedin-js/geojson/src/types';
3727
3775
  import { Geometry3DObject3D } from '@mappedin/mappedin-js/geojson/src/entities/geometry3d';
3728
3776
  import type { FeatureCollection, Point } from 'geojson';
3777
+ import type { GroupContainerState } from '@mappedin/mappedin-js/geojson/src/entities/group-container';
3778
+ export type PathProperties = {
3779
+ /**
3780
+ * The parentId of the point. The point will be anchored to the altitude of this parent group container.
3781
+ */
3782
+ parentId?: EntityId<GroupContainerState> | string | null;
3783
+ };
3729
3784
  /**
3730
3785
  * State representing a Path
3731
3786
  */
@@ -3797,7 +3852,7 @@ declare module '@mappedin/mappedin-js/geojson/src/components/path' {
3797
3852
  material?: ShaderMaterial;
3798
3853
  geometry?: BufferGeometry;
3799
3854
  outline?: Mesh;
3800
- feature: FeatureCollection<Point>;
3855
+ feature: FeatureCollection<Point, PathProperties>;
3801
3856
  options: AddPathOptions;
3802
3857
  nearRadius: number;
3803
3858
  farRadius: number;
@@ -3806,8 +3861,12 @@ declare module '@mappedin/mappedin-js/geojson/src/components/path' {
3806
3861
  altitudeAdjustment: number;
3807
3862
  displayArrowsOnPath: boolean;
3808
3863
  animateArrowsOnPath: boolean;
3864
+ /**
3865
+ * If the path is vertical it will be rebuilt whenever altitudeDirty = true. This will be set during the first render of the path.
3866
+ */
3867
+ isVertical: boolean;
3809
3868
  dirty: boolean;
3810
- constructor(feature: FeatureCollection<Point, any>, options?: AddPathOptions);
3869
+ constructor(feature: FeatureCollection<Point, PathProperties>, options?: AddPathOptions);
3811
3870
  setColor(): void;
3812
3871
  setOpacity(): void;
3813
3872
  set completeFraction(value: number);
@@ -5182,6 +5241,7 @@ declare module '@mappedin/mappedin-js/geojson/src/renderer' {
5182
5241
  import './utils/object-this-polyfill';
5183
5242
  import { Vector3, Raycaster, Camera as ThreeCamera } from 'three';
5184
5243
  import type { GroupContainerState } from '@mappedin/mappedin-js/geojson/src/entities/group-container';
5244
+ import { GroupContainerObject3D } from '@mappedin/mappedin-js/geojson/src/entities/group-container';
5185
5245
  import { PubSub } from '@mappedin/mappedin-js/packages/common/pubsub';
5186
5246
  import { CollisionSystem } from '@mappedin/mappedin-js/geojson/src/systems/collisions/system';
5187
5247
  import { InteractionSystem } from '@mappedin/mappedin-js/geojson/src/systems/interactions';
@@ -5199,7 +5259,7 @@ declare module '@mappedin/mappedin-js/geojson/src/renderer' {
5199
5259
  import { TwoDVisibilitySystem } from '@mappedin/mappedin-js/geojson/src/systems/2d-visibility/system';
5200
5260
  import { RenderSystem } from '@mappedin/mappedin-js/geojson/src/systems/render/system';
5201
5261
  import type { Position as GeoJsonPosition, FeatureCollection, LineString, MultiPolygon, Polygon, Point, Feature } from 'geojson';
5202
- import type { AddPathOptions, PathState } from '@mappedin/mappedin-js/geojson/src/components/path';
5262
+ import type { AddPathOptions, PathProperties, PathState } from '@mappedin/mappedin-js/geojson/src/components/path';
5203
5263
  import { StackSystem } from '@mappedin/mappedin-js/geojson/src/systems/stack/system';
5204
5264
  import { CameraSystem } from '@mappedin/mappedin-js/geojson/src/systems/camera';
5205
5265
  import { DOMDrawSystem } from '@mappedin/mappedin-js/geojson/src/systems/dom-draw/system';
@@ -5312,6 +5372,7 @@ declare module '@mappedin/mappedin-js/geojson/src/renderer' {
5312
5372
  id: string;
5313
5373
  type: string;
5314
5374
  };
5375
+ getParentContainer: (parent?: EntityId<GroupContainerState> | string | number | null, defaultToScene?: boolean) => GroupContainerObject3D | undefined;
5315
5376
  /**
5316
5377
  * Add a custom THREE.js entity to the map. The geometry is placed at the GeoJSON coordinate and includes a `setup` and `update` methods.
5317
5378
  * Setup is called when the first time the geometry visible, and update is called every render frame.
@@ -5340,21 +5401,13 @@ declare module '@mappedin/mappedin-js/geojson/src/renderer' {
5340
5401
  /**
5341
5402
  * Add a Path along a set of GeoJSON coordinates that can be animated.
5342
5403
  */
5343
- addPath(geometry: FeatureCollection<Point, any>, options?: AddPathOptions, parent?: EntityId<GroupContainerState> | string | null): EntityId<PathState>;
5404
+ addPath(geometry: FeatureCollection<Point, PathProperties>, options?: AddPathOptions, parent?: EntityId<GroupContainerState> | string | null): EntityId<PathState>;
5344
5405
  /**
5345
5406
  * Updates the watermark on the map.
5346
5407
  *
5347
5408
  * @param options {WatermarkOptions}
5348
5409
  */
5349
5410
  updateWatermark(options: Omit<WatermarkOptions, 'onClick'>): void;
5350
- /**
5351
- * @deprecated
5352
- * @TODO: remove this method and do this in setstate instead
5353
- */
5354
- updateStackState(container: EntityId<GroupContainerState> | string | number, opts: {
5355
- expandedFactor?: number;
5356
- activeId?: string;
5357
- }): void;
5358
5411
  /**
5359
5412
  * Remove an entity from the renderer and release associated resources.
5360
5413
  */
@@ -6190,6 +6243,86 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/shape' {
6190
6243
  }
6191
6244
  }
6192
6245
 
6246
+ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object' {
6247
+ import type { ParsedMVF } from '@mappedin/mvf';
6248
+ import type { FeatureCollection, LineString, MultiPolygon, Polygon } from 'geojson';
6249
+ import { PubSub } from '@packages/internal/common';
6250
+ import type { Position, AddLabelOptions, RendererCore, PathState, MarkerState, LineStyle, PaintStyle, EntityId } from '@mappedin/core-sdk';
6251
+ import { FloorObject } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/floor-object';
6252
+ import type { Coordinate, TAddMarkerOptions, TAddPathOptions, TShow3DMapOptions } from '@mappedin/mappedin-js/mappedin-js/src';
6253
+ import type { GLTFExportOptions, TAnimationOptions, TAddModelOptions, TAddModel, TAddImageOptions, CancellablePromise } from '@mappedin/mappedin-js/mappedin-js/src/types';
6254
+ import { type AggregatedStyleMap } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/utils';
6255
+ import { StackedMaps } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/stacked-maps/stacked-maps';
6256
+ import type { TFloorChangeReason } from '@mappedin/mappedin-js/mappedin-js/src/events';
6257
+ import type { Shape } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
6258
+ export class GeojsonApiMapObject extends PubSub<{
6259
+ 'floor-change': {
6260
+ reason?: TFloorChangeReason;
6261
+ floorId: string;
6262
+ };
6263
+ 'floor-change-start': {
6264
+ floorId: string;
6265
+ };
6266
+ }> {
6267
+ floors: FloorObject[];
6268
+ currentFloorId: string;
6269
+ id: string;
6270
+ renderer: RendererCore;
6271
+ mvf: ParsedMVF;
6272
+ styleMap: AggregatedStyleMap;
6273
+ StackedMaps: StackedMaps;
6274
+ get currentFloor(): FloorObject;
6275
+ setFloor(floorId: string, reason?: TFloorChangeReason): void;
6276
+ Models: {
6277
+ add: (id: string, targets: TAddModel[], opts: TAddModelOptions & {
6278
+ floorId?: string;
6279
+ }) => (import("@mappedin/core-sdk").GeometryState | import("@mappedin/core-sdk").ModelState)[];
6280
+ remove: (_id: string, _groupId: string) => void;
6281
+ };
6282
+ Images: {
6283
+ add: (target: Position, url: string, opts: TAddImageOptions & {
6284
+ floorId?: string;
6285
+ }) => EntityId<import("@mappedin/core-sdk/src/components/image").ImageState> | undefined;
6286
+ remove: (id: string) => void;
6287
+ removeAll: () => void;
6288
+ };
6289
+ Markers: {
6290
+ add: (coordinate: Coordinate, html: string, opts: TAddMarkerOptions) => EntityId<MarkerState> | undefined;
6291
+ remove: (id: string) => void;
6292
+ getContentEl: (id: string) => HTMLElement | undefined;
6293
+ removeAll: () => void;
6294
+ setPosition: (id: string, coordinate: Position, targetFloorId: string) => void;
6295
+ animateTo: (id: string, coordinate: Position, targetFloorId: string, options?: TAnimationOptions) => Promise<void>;
6296
+ };
6297
+ Exporter: {
6298
+ getCurrentSceneGLTF: (options: GLTFExportOptions) => Promise<Blob>;
6299
+ };
6300
+ Shapes: {
6301
+ add: <T extends FeatureCollection<Polygon | MultiPolygon | LineString, any>>(geometry: T, style: T extends FeatureCollection<LineString, any> ? LineStyle : PaintStyle, opts: {
6302
+ floorId?: string;
6303
+ }) => string;
6304
+ remove: (customGeometry: Shape) => string;
6305
+ };
6306
+ Labels: {
6307
+ all: ({ onCreate }: {
6308
+ onCreate: (labelId: string | number, text: string) => void;
6309
+ }) => void;
6310
+ add: (coordinate: Position, text: string, opts?: AddLabelOptions & {
6311
+ floorId?: string;
6312
+ }) => {
6313
+ id: string | number;
6314
+ };
6315
+ remove: (targetId: string) => void;
6316
+ removeAll: () => void;
6317
+ };
6318
+ Paths: {
6319
+ add: (coordinates: Coordinate[], options?: TAddPathOptions) => CancellablePromise<EntityId<PathState>[]>;
6320
+ remove: (entityIds: string[]) => void;
6321
+ };
6322
+ constructor(id: string, mvf: any, styleMap: AggregatedStyleMap, options: TShow3DMapOptions | undefined, renderer: RendererCore);
6323
+ }
6324
+ }
6325
+
6193
6326
  declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/api' {
6194
6327
  import type { Position, RendererCore, WatermarkOptions } from '@mappedin/core-sdk';
6195
6328
  import { type TShow3DMapOptions } from '@mappedin/mappedin-js/mappedin-js/src';
@@ -6820,6 +6953,339 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/images' {
6820
6953
  export {};
6821
6954
  }
6822
6955
 
6956
+ declare module '@mappedin/mappedin-js/mappedin-js/src/search/internal' {
6957
+ import type { SearchResult as MiniSearchResult, Suggestion, MatchInfo } from 'minisearch';
6958
+ import type { EnterpriseLocation, EnterpriseCategory, Places } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
6959
+ import type MapData from '@mappedin/mappedin-js/mappedin-js/src/map-data';
6960
+ import { z } from 'zod';
6961
+ export class InternalSearch {
6962
+ constructor(mapData: MapData);
6963
+ /**
6964
+ * Populates the search indexes with the map data.
6965
+ * @returns A promise that resolves when the indexes are populated.
6966
+ */
6967
+ populate(): Promise<any[]>;
6968
+ search(term: string, options?: SearchOptions): Promise<SearchResult>;
6969
+ suggest(term: string, options?: SuggestOptions): Promise<Suggestion[]>;
6970
+ }
6971
+ export type SearchResultItem<T extends Places | EnterpriseLocation | EnterpriseCategory> = {
6972
+ type: T['__type'];
6973
+ match: MiniSearchResult['match'];
6974
+ score: number;
6975
+ item: T;
6976
+ };
6977
+ /**
6978
+ * @interface
6979
+ */
6980
+ export type SearchResultEnterpriseCategory = SearchResultItem<EnterpriseCategory>;
6981
+ /**
6982
+ * @interface
6983
+ */
6984
+ export type SearchResultEnterpriseLocations = SearchResultItem<EnterpriseLocation>;
6985
+ /**
6986
+ * @interface
6987
+ */
6988
+ export type SearchResultPlaces = SearchResultItem<Places>;
6989
+ /**
6990
+ * Search results
6991
+ */
6992
+ export type SearchResult = {
6993
+ /**
6994
+ * Places search results
6995
+ */
6996
+ places: SearchResultPlaces[];
6997
+ /**
6998
+ * Enterprise Locations search results
6999
+ */
7000
+ enterpriseLocations?: SearchResultEnterpriseLocations[];
7001
+ /**
7002
+ * Enterprise Categories search results
7003
+ */
7004
+ enterpriseCategories?: SearchResultEnterpriseCategory[];
7005
+ };
7006
+ export function removeAccents(it: string): string;
7007
+ const searchOptionsSchema: z.ZodObject<{
7008
+ /**
7009
+ * Options for searching places.
7010
+ * @property {Object} [fields] - Fields to search in places.
7011
+ * @property {boolean} [name] - Whether to search in the name field of places.
7012
+ * @property {boolean} [description] - Whether to search in the description field of places.
7013
+ * @property {number} [limit] - Maximum number of place results to return.
7014
+ */
7015
+ places: z.ZodOptional<z.ZodObject<{
7016
+ /**
7017
+ * Fields to search in places.
7018
+ * @property {boolean} [name] - Whether to search in the name field of places.
7019
+ * @property {boolean} [description] - Whether to search in the description field of places.
7020
+ */
7021
+ fields: z.ZodOptional<z.ZodObject<{
7022
+ /** Enable searching by place name */
7023
+ name: z.ZodOptional<z.ZodBoolean>;
7024
+ /** Enable searching by place description */
7025
+ description: z.ZodOptional<z.ZodBoolean>;
7026
+ }, "strip", z.ZodTypeAny, {
7027
+ name?: boolean | undefined;
7028
+ description?: boolean | undefined;
7029
+ }, {
7030
+ name?: boolean | undefined;
7031
+ description?: boolean | undefined;
7032
+ }>>;
7033
+ /** Maximum number of place results to return */
7034
+ limit: z.ZodOptional<z.ZodNumber>;
7035
+ }, "strip", z.ZodTypeAny, {
7036
+ limit?: number | undefined;
7037
+ fields?: {
7038
+ name?: boolean | undefined;
7039
+ description?: boolean | undefined;
7040
+ } | undefined;
7041
+ }, {
7042
+ limit?: number | undefined;
7043
+ fields?: {
7044
+ name?: boolean | undefined;
7045
+ description?: boolean | undefined;
7046
+ } | undefined;
7047
+ }>>;
7048
+ /**
7049
+ * Options for searching categories.
7050
+ * @property {Object} [fields] - Fields to search in categories.
7051
+ * @property {boolean} [name] - Whether to search in the name field of categories.
7052
+ * @property {boolean} [description] - Whether to search in the description field of categories.
7053
+ * @property {boolean} ['locations.name'] - Whether to search in the locations' names of categories.
7054
+ * @property {number} [limit] - Maximum number of category results to return.
7055
+ */
7056
+ enterpriseCategories: z.ZodOptional<z.ZodObject<{
7057
+ /**
7058
+ * Fields to search in categories.
7059
+ * @property {boolean} [name] - Whether to search in the name field of categories.
7060
+ * @property {boolean} [description] - Whether to search in the description field of categories.
7061
+ * @property {boolean} ['locations.name'] - Whether to search in the locations' names of categories.
7062
+ */
7063
+ fields: z.ZodOptional<z.ZodObject<{
7064
+ /** Enable searching by category name */
7065
+ name: z.ZodOptional<z.ZodBoolean>;
7066
+ /** Enable searching by category description */
7067
+ description: z.ZodOptional<z.ZodBoolean>;
7068
+ /** Enable searching by names of locations within the category */
7069
+ 'locations.name': z.ZodOptional<z.ZodBoolean>;
7070
+ }, "strip", z.ZodTypeAny, {
7071
+ name?: boolean | undefined;
7072
+ description?: boolean | undefined;
7073
+ 'locations.name'?: boolean | undefined;
7074
+ }, {
7075
+ name?: boolean | undefined;
7076
+ description?: boolean | undefined;
7077
+ 'locations.name'?: boolean | undefined;
7078
+ }>>;
7079
+ /** Maximum number of category results to return */
7080
+ limit: z.ZodOptional<z.ZodNumber>;
7081
+ }, "strip", z.ZodTypeAny, {
7082
+ limit?: number | undefined;
7083
+ fields?: {
7084
+ name?: boolean | undefined;
7085
+ description?: boolean | undefined;
7086
+ 'locations.name'?: boolean | undefined;
7087
+ } | undefined;
7088
+ }, {
7089
+ limit?: number | undefined;
7090
+ fields?: {
7091
+ name?: boolean | undefined;
7092
+ description?: boolean | undefined;
7093
+ 'locations.name'?: boolean | undefined;
7094
+ } | undefined;
7095
+ }>>;
7096
+ /**
7097
+ * Options for searching locations.
7098
+ * @property {Object} [fields] - Fields to search in locations.
7099
+ * @property {boolean} [name] - Whether to search in the name field of locations.
7100
+ * @property {boolean} [tags] - Whether to search in the tags field of locations.
7101
+ * @property {boolean} [description] - Whether to search in the description field of locations.
7102
+ * @property {number} [limit] - Maximum number of location results to return.
7103
+ */
7104
+ enterpriseLocations: z.ZodOptional<z.ZodObject<{
7105
+ /**
7106
+ * Fields to search in locations.
7107
+ * @property {boolean} [name] - Whether to search in the name field of locations.
7108
+ * @property {boolean} [tags] - Whether to search in the tags field of locations.
7109
+ * @property {boolean} [description] - Whether to search in the description field of locations.
7110
+ */
7111
+ fields: z.ZodOptional<z.ZodObject<{
7112
+ /** Enable searching by location name */
7113
+ name: z.ZodOptional<z.ZodBoolean>;
7114
+ /** Enable searching by location tags */
7115
+ tags: z.ZodOptional<z.ZodBoolean>;
7116
+ /** Enable searching by location description */
7117
+ description: z.ZodOptional<z.ZodBoolean>;
7118
+ }, "strip", z.ZodTypeAny, {
7119
+ name?: boolean | undefined;
7120
+ description?: boolean | undefined;
7121
+ tags?: boolean | undefined;
7122
+ }, {
7123
+ name?: boolean | undefined;
7124
+ description?: boolean | undefined;
7125
+ tags?: boolean | undefined;
7126
+ }>>;
7127
+ /** Maximum number of location results to return */
7128
+ limit: z.ZodOptional<z.ZodNumber>;
7129
+ }, "strip", z.ZodTypeAny, {
7130
+ limit?: number | undefined;
7131
+ fields?: {
7132
+ name?: boolean | undefined;
7133
+ description?: boolean | undefined;
7134
+ tags?: boolean | undefined;
7135
+ } | undefined;
7136
+ }, {
7137
+ limit?: number | undefined;
7138
+ fields?: {
7139
+ name?: boolean | undefined;
7140
+ description?: boolean | undefined;
7141
+ tags?: boolean | undefined;
7142
+ } | undefined;
7143
+ }>>;
7144
+ }, "strip", z.ZodTypeAny, {
7145
+ enterpriseLocations?: {
7146
+ limit?: number | undefined;
7147
+ fields?: {
7148
+ name?: boolean | undefined;
7149
+ description?: boolean | undefined;
7150
+ tags?: boolean | undefined;
7151
+ } | undefined;
7152
+ } | undefined;
7153
+ enterpriseCategories?: {
7154
+ limit?: number | undefined;
7155
+ fields?: {
7156
+ name?: boolean | undefined;
7157
+ description?: boolean | undefined;
7158
+ 'locations.name'?: boolean | undefined;
7159
+ } | undefined;
7160
+ } | undefined;
7161
+ places?: {
7162
+ limit?: number | undefined;
7163
+ fields?: {
7164
+ name?: boolean | undefined;
7165
+ description?: boolean | undefined;
7166
+ } | undefined;
7167
+ } | undefined;
7168
+ }, {
7169
+ enterpriseLocations?: {
7170
+ limit?: number | undefined;
7171
+ fields?: {
7172
+ name?: boolean | undefined;
7173
+ description?: boolean | undefined;
7174
+ tags?: boolean | undefined;
7175
+ } | undefined;
7176
+ } | undefined;
7177
+ enterpriseCategories?: {
7178
+ limit?: number | undefined;
7179
+ fields?: {
7180
+ name?: boolean | undefined;
7181
+ description?: boolean | undefined;
7182
+ 'locations.name'?: boolean | undefined;
7183
+ } | undefined;
7184
+ } | undefined;
7185
+ places?: {
7186
+ limit?: number | undefined;
7187
+ fields?: {
7188
+ name?: boolean | undefined;
7189
+ description?: boolean | undefined;
7190
+ } | undefined;
7191
+ } | undefined;
7192
+ }>;
7193
+ const suggestOptionsSchema: z.ZodObject<{
7194
+ /**
7195
+ * Options for searching places.
7196
+ * @property {boolean} [enabled] - Whether to search in places.
7197
+ */
7198
+ places: z.ZodOptional<z.ZodObject<{
7199
+ /** Enable searching by place name */
7200
+ enabled: z.ZodOptional<z.ZodBoolean>;
7201
+ }, "strip", z.ZodTypeAny, {
7202
+ enabled?: boolean | undefined;
7203
+ }, {
7204
+ enabled?: boolean | undefined;
7205
+ }>>;
7206
+ /**
7207
+ * Options for searching locations.
7208
+ * @property {boolean} [enabled] - Whether to search in locations.
7209
+ */
7210
+ enterpriseLocations: z.ZodOptional<z.ZodObject<{
7211
+ /** Enable searching by location name */
7212
+ enabled: z.ZodOptional<z.ZodBoolean>;
7213
+ }, "strip", z.ZodTypeAny, {
7214
+ enabled?: boolean | undefined;
7215
+ }, {
7216
+ enabled?: boolean | undefined;
7217
+ }>>;
7218
+ }, "strip", z.ZodTypeAny, {
7219
+ enterpriseLocations?: {
7220
+ enabled?: boolean | undefined;
7221
+ } | undefined;
7222
+ places?: {
7223
+ enabled?: boolean | undefined;
7224
+ } | undefined;
7225
+ }, {
7226
+ enterpriseLocations?: {
7227
+ enabled?: boolean | undefined;
7228
+ } | undefined;
7229
+ places?: {
7230
+ enabled?: boolean | undefined;
7231
+ } | undefined;
7232
+ }>;
7233
+ export type SearchOptions = z.infer<typeof searchOptionsSchema>;
7234
+ export type SuggestOptions = z.infer<typeof suggestOptionsSchema>;
7235
+ export { Suggestion, MatchInfo };
7236
+ }
7237
+
7238
+ declare module '@mappedin/mappedin-js/mappedin-js/src/search/external' {
7239
+ import type MapData from '@mappedin/mappedin-js/mappedin-js/src/map-data';
7240
+ import type { InternalSearch, SearchOptions, SuggestOptions } from '@mappedin/mappedin-js/mappedin-js/src/search/internal';
7241
+ import type { MapDataInternal } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
7242
+ export class Search {
7243
+ #private;
7244
+ /**
7245
+ * Whether the search is enabled.
7246
+ * @default false
7247
+ */
7248
+ enabled: boolean;
7249
+ constructor(mapData: MapData, mapDataInternal: MapDataInternal, { enabled }?: {
7250
+ enabled?: boolean;
7251
+ });
7252
+ /**
7253
+ * Searches for places, locations, and categories.
7254
+ * @param term - The search term.
7255
+ * @param options - The search options.
7256
+ * @returns The search results.
7257
+ * @example
7258
+ * ```ts
7259
+ * const results = await search.query('Coffee Shop');
7260
+ * console.log(results.locations);
7261
+ * ```
7262
+ */
7263
+ query(term: string, options?: SearchOptions): ReturnType<typeof InternalSearch.prototype.search>;
7264
+ /**
7265
+ * Suggests the names of places, locations, and categories.
7266
+ * @param term - The search term.
7267
+ * @param options - The suggest options.
7268
+ * @returns The search suggestions.
7269
+ * @example
7270
+ * ```ts
7271
+ * const suggestions = await search.suggest('Coffee');
7272
+ * console.log(suggestions);
7273
+ * ```
7274
+ */
7275
+ suggest(term: string, options?: SuggestOptions): Promise<import("minisearch").Suggestion[]>;
7276
+ /**
7277
+ * Enables the search.
7278
+ */
7279
+ enable(): Promise<void>;
7280
+ }
7281
+ export type SearchState = {
7282
+ /**
7283
+ * Whether the search is enabled.
7284
+ */
7285
+ enabled: boolean;
7286
+ };
7287
+ }
7288
+
6823
7289
  declare module '@mappedin/mappedin-js/mappedin-js/src/analytics/customer' {
6824
7290
  /**
6825
7291
  * Valid track-analytics API contexts. These should match the expected values of that endpoint or the requests will fail.
@@ -6996,90 +7462,6 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-obje
6996
7462
  }
6997
7463
  }
6998
7464
 
6999
- declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object' {
7000
- import type { ParsedMVF } from '@mappedin/mvf';
7001
- import type { FeatureCollection, LineString, MultiPolygon, Polygon } from 'geojson';
7002
- import { PubSub } from '@packages/internal/common';
7003
- import type { Position, AddLabelOptions, RendererCore, MarkerState, LineStyle, PaintStyle } from '@mappedin/core-sdk';
7004
- import { FloorObject } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/floor-object';
7005
- import type { Coordinate, TAddMarkerOptions, TAddPathOptions, TShow3DMapOptions } from '@mappedin/mappedin-js/mappedin-js/src';
7006
- import type { GLTFExportOptions, TAnimationOptions, TAddModelOptions, TAddModel, TAddImageOptions } from '@mappedin/mappedin-js/mappedin-js/src/types';
7007
- import { type AggregatedStyleMap } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/utils';
7008
- import { StackedMaps } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/stacked-maps/stacked-maps';
7009
- import type { TFloorChangeReason } from '@mappedin/mappedin-js/mappedin-js/src/events';
7010
- import type { Shape } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
7011
- export class GeojsonApiMapObject extends PubSub<{
7012
- 'floor-change': {
7013
- reason?: TFloorChangeReason;
7014
- floorId: string;
7015
- };
7016
- 'floor-change-start': {
7017
- floorId: string;
7018
- };
7019
- }> {
7020
- floors: FloorObject[];
7021
- currentFloorId: string;
7022
- id: string;
7023
- renderer: RendererCore;
7024
- mvf: ParsedMVF;
7025
- styleMap: AggregatedStyleMap;
7026
- StackedMaps: StackedMaps;
7027
- get currentFloor(): FloorObject;
7028
- setFloor(floorId: string, reason?: TFloorChangeReason): void;
7029
- Models: {
7030
- add: (id: string, targets: TAddModel[], opts: TAddModelOptions & {
7031
- floorId?: string;
7032
- }) => (import("@mappedin/core-sdk").GeometryState | import("@mappedin/core-sdk").ModelState)[];
7033
- remove: (_id: string, _groupId: string) => void;
7034
- };
7035
- Images: {
7036
- add: (target: Position, url: string, opts: TAddImageOptions & {
7037
- floorId?: string;
7038
- }) => import("@mappedin/core-sdk").EntityId<import("@mappedin/core-sdk/src/components/image").ImageState> | undefined;
7039
- remove: (id: string) => void;
7040
- removeAll: () => void;
7041
- };
7042
- Markers: {
7043
- add: (coordinate: Position, html: string, opts?: TAddMarkerOptions & {
7044
- floorId?: string;
7045
- }) => import("@mappedin/core-sdk").EntityId<MarkerState> | undefined;
7046
- remove: (id: string) => void;
7047
- getContentEl: (id: string) => HTMLElement | undefined;
7048
- removeAll: () => void;
7049
- setPosition: (id: string, coordinate: Position, targetFloorId: string) => void;
7050
- animateTo: (id: string, coordinate: Position, targetFloorId: string, options?: TAnimationOptions) => Promise<void>;
7051
- };
7052
- Exporter: {
7053
- getCurrentSceneGLTF: (options: GLTFExportOptions) => Promise<Blob>;
7054
- };
7055
- Shapes: {
7056
- add: <T extends FeatureCollection<Polygon | MultiPolygon | LineString, any>>(geometry: T, style: T extends FeatureCollection<LineString, any> ? LineStyle : PaintStyle, opts: {
7057
- floorId?: string;
7058
- }) => string;
7059
- remove: (customGeometry: Shape) => string;
7060
- };
7061
- Labels: {
7062
- all: ({ onCreate }: {
7063
- onCreate: (labelId: string | number, text: string) => void;
7064
- }) => void;
7065
- add: (coordinate: Position, text: string, opts?: AddLabelOptions & {
7066
- floorId?: string;
7067
- }) => {
7068
- id: string | number;
7069
- };
7070
- remove: (targetId: string) => void;
7071
- removeAll: () => void;
7072
- };
7073
- Paths: {
7074
- add: (coordinates: Coordinate[], options?: TAddPathOptions) => Promise<{
7075
- id: string | number;
7076
- }[]>;
7077
- remove: (entityIds: string[]) => void;
7078
- };
7079
- constructor(id: string, mvf: any, styleMap: AggregatedStyleMap, options: TShow3DMapOptions | undefined, renderer: RendererCore);
7080
- }
7081
- }
7082
-
7083
7465
  declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/floor-object' {
7084
7466
  import type { ParsedMVF } from '@mappedin/mvf';
7085
7467
  import type { RendererCore } from '@mappedin/core-sdk';
@@ -8289,7 +8671,7 @@ declare module '@mappedin/mappedin-js/geojson/src/entities/utils' {
8289
8671
  export function updateGroupTexture(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: Pick<GeometryGroupStyleComponent, 'texture' | 'topTexture'>): void;
8290
8672
  export function updateIndividualGeometryTexture(entity: Geometry3D, update?: Pick<StyleComponent, 'texture' | 'topTexture'>): boolean;
8291
8673
  export function updateIndividualGeometryOpacity(entity: Geometry3D, update?: number): boolean;
8292
- export function updateAltitude(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: number): void;
8674
+ export function updateAltitude(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: number): boolean;
8293
8675
  export function updateOutline(entity: Geometry3DTypes, update?: boolean): boolean;
8294
8676
  }
8295
8677
 
@@ -16872,8 +17254,10 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/path/system' {
16872
17254
  export class PathSystem extends PubSub<{
16873
17255
  'animate:path': undefined;
16874
17256
  }> {
17257
+ altitudeDirty: boolean;
16875
17258
  convertTo3DMapPosition: RendererCore['convertTo3DMapPosition'];
16876
- constructor(rendererState: RendererState, convertTo3DMapPosition: RendererCore['convertTo3DMapPosition']);
17259
+ getParentContainer: RendererCore['getParentContainer'];
17260
+ constructor(rendererState: RendererState, convertTo3DMapPosition: RendererCore['convertTo3DMapPosition'], getParentContainer: RendererCore['getParentContainer']);
16877
17261
  update(minZoomAltitude: number, maxZoomAltitude: number, currentZoomAltitude: number): void;
16878
17262
  }
16879
17263
  }