@mappedin/react-sdk 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.
@@ -16,6 +16,7 @@
16
16
  // ../react/@packages/internal/quad-tree
17
17
  // ../react/@packages/internal/outdoor-context-v4
18
18
  // ../react/@packages/internal/geojson-navigator
19
+ // ../react/minisearch
19
20
  // ../react/three/addons/loaders/GLTFLoader.js
20
21
  // ../react/@mapbox/point-geometry
21
22
  // ../react/@maplibre/maplibre-gl-style-spec
@@ -520,8 +521,9 @@ declare module '@mappedin/react-sdk/mappedin-js/src' {
520
521
  export type { Label, Marker, Path, Shape, CameraTransform, Model } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects';
521
522
  export type { Navigation, TNavigationOptions } from '@mappedin/react-sdk/mappedin-js/src/navigation';
522
523
  export type { TSpaceType } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
523
- export { Coordinate, Annotation, Connection, Door, Floor, MapObject, PointOfInterest, Space, Image, Hyperlink, } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
524
+ export { Coordinate, Annotation, Connection, Door, Floor, MapObject, PointOfInterest, Space, Image, Hyperlink, EnterpriseLocation, EnterpriseCategory, EnterpriseVenue, type Places, } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
524
525
  export type { Camera, Models, Labels, Markers, Paths, Exporter, Directions, Style, Shapes, Outdoor, } from '@mappedin/react-sdk/mappedin-js/src/api-geojson';
526
+ export type { SearchResult, SearchResultItem, SearchResultEnterpriseCategory, SearchResultEnterpriseLocations, SearchResultPlaces, SearchOptions, Search, Suggestion, MatchInfo, } from '@mappedin/react-sdk/mappedin-js/src/search';
525
527
  }
526
528
 
527
529
  declare module '@mappedin/react-sdk/react-sdk/src/type-utils' {
@@ -550,12 +552,14 @@ declare module '@mappedin/react-sdk/react-sdk/src' {
550
552
  }
551
553
 
552
554
  declare module '@mappedin/react-sdk/mappedin-js/src/map-data' {
553
- import { PubSub } from '@packages/internal/common';
554
555
  import { Analytics } from '@mappedin/react-sdk/mappedin-js/src/analytics';
556
+ import { PubSub } from '@packages/internal/common';
557
+ import type { TSearchOptions } from '@packages/internal/mvf-utils';
555
558
  import type { Connection, Door, Floor, MapDataInternal, Space, MapObject, PointOfInterest, Annotation, Coordinate } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
556
- import type Category from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/category';
557
- import type Location from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/location';
558
- import type Venue from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/venue';
559
+ import type EnterpriseCategory from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/category';
560
+ import type EnterpriseLocation from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/location';
561
+ import type EnterpriseVenue from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/venue';
562
+ import { Search } from '@mappedin/react-sdk/mappedin-js/src/search';
559
563
  /**
560
564
  * A WeakMap to associate {@link MapData} instances with their internal representation.
561
565
  * We need a way to get the internal data object from the API
@@ -575,12 +579,32 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data' {
575
579
  }> {
576
580
  #private;
577
581
  Analytics: Analytics;
582
+ /**
583
+ * Search API for MapData
584
+ *
585
+ * @example
586
+ * // Enable search
587
+ * const mapData = await getMapData({ search: { enabled: true } });
588
+ * // or
589
+ * await mapData.Search.enable();
590
+ *
591
+ * // Perform a search query
592
+ * const results = await mapData.Search.query('Coffee Shop');
593
+ * console.log(results.locations);
594
+ *
595
+ * // Get search suggestions
596
+ * const suggestions = await mapData.Search.suggest('Coff');
597
+ * console.log(suggestions);
598
+ */
599
+ Search: Search;
578
600
  /**
579
601
  * Constructs a new instance of {@link MapData}.
580
602
  *
581
603
  * @internal
582
604
  */
583
- constructor(internal: MapDataInternal);
605
+ constructor(internal: MapDataInternal, { search }?: {
606
+ search?: TSearchOptions;
607
+ });
584
608
  /**
585
609
  * The name of the map.
586
610
  *
@@ -599,10 +623,6 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data' {
599
623
  * @returns {string} The organization ID of the map.
600
624
  */
601
625
  get organizationId(): string;
602
- /**
603
- * @internal
604
- */
605
- get venue(): Venue | undefined;
606
626
  /**
607
627
  * The token is used to fetch outdoor tiles.
608
628
  *
@@ -661,13 +681,23 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data' {
661
681
  */
662
682
  getByType(type: 'annotation'): Annotation[];
663
683
  /**
664
- * @internal
684
+ * @returns The enterprise locations ({@link EnterpriseLocation}) on the map.
685
+ * @example
686
+ * const enterpriseLocations = mapData.getByType('enterprise-location');
665
687
  */
666
- getByType(type: 'location'): Location[];
688
+ getByType(type: 'enterprise-location'): EnterpriseLocation[];
667
689
  /**
668
- * @internal
690
+ * @returns The enterprise categories ({@link EnterpriseCategory}) on the map.
691
+ * @example
692
+ * const enterpriseCategories = mapData.getByType('enterprise-category');
669
693
  */
670
- getByType(type: 'category'): Category[];
694
+ getByType(type: 'enterprise-category'): EnterpriseCategory[];
695
+ /**
696
+ * @returns The enterprise venue ({@link EnterpriseVenue}) on the map.
697
+ * @example
698
+ * const enterpriseVenue = mapData.getByType('enterprise-venue');
699
+ */
700
+ getByType(type: 'enterprise-venue'): EnterpriseVenue;
671
701
  /**
672
702
  * Retrieves a specific map feature by its type and ID.
673
703
  *
@@ -684,8 +714,8 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data' {
684
714
  getById(type: 'object', id: string): MapObject | undefined;
685
715
  getById(type: 'point-of-interest', id: string): PointOfInterest | undefined;
686
716
  getById(type: 'annotation', id: string): Annotation | undefined;
687
- getById(type: 'location', id: string): Location | undefined;
688
- getById(type: 'category', id: string): Category | undefined;
717
+ getById(type: 'enterprise-location', id: string): EnterpriseLocation | undefined;
718
+ getById(type: 'enterprise-category', id: string): EnterpriseCategory | undefined;
689
719
  getById(type: string, id: string): object | undefined;
690
720
  /**
691
721
  * @internal
@@ -827,13 +857,13 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects' {
827
857
  import Annotation from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/annotation';
828
858
  import Hyperlink from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/hyperlink';
829
859
  import Image from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/image';
830
- import type { AnnotationCollection, ParsedMVF, Connection as MVFConnection, EntranceCollection, NodeCollection, ObstructionCollection, SpaceCollection, Map as MVFMap, EnterpriseLocation, EnterpriseCategory } from '@mappedin/mvf';
831
- import type { MapDataObjects } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/types';
832
- import type Location from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/location';
833
- import type Category from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/category';
834
- import Venue from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/venue';
835
- import { PubSub } from '@packages/internal/common';
860
+ import type { AnnotationCollection, ParsedMVF, Connection as MVFConnection, EntranceCollection, NodeCollection, ObstructionCollection, SpaceCollection, Map as MVFMap, EnterpriseLocation as MVFEnterpriseLocation, EnterpriseCategory as MVFEnterpriseCategory } from '@mappedin/mvf';
836
861
  import { AnalyticsInternal } from '@mappedin/react-sdk/mappedin-js/src/analytics';
862
+ import EnterpriseLocation from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/location';
863
+ import EnterpriseCategory from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/category';
864
+ import EnterpriseVenue from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/venue';
865
+ import { PubSub } from '@packages/internal/common';
866
+ import type { Places } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/types';
837
867
  /**
838
868
  * Internal class representing detailed map data.
839
869
  *
@@ -867,9 +897,9 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects' {
867
897
  * Represents a map of entrance IDs to obstruction IDs.
868
898
  */
869
899
  readonly obstructionIdByEntranceId: Record<string, string>;
870
- readonly venue?: Venue;
900
+ readonly venue?: EnterpriseVenue;
871
901
  doorsByNodeId: Record<string, Door>;
872
- locationsBySpaceId: Record<string, EnterpriseLocation[]>;
902
+ locationsBySpaceId: Record<string, MVFEnterpriseLocation[]>;
873
903
  /**
874
904
  * @internal
875
905
  */
@@ -932,8 +962,8 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects' {
932
962
  * @returns {Annotation[]} An array of Annotation objects.
933
963
  */
934
964
  get nodes(): Node[];
935
- get locations(): Location[];
936
- get categories(): Category[];
965
+ get locations(): EnterpriseLocation[];
966
+ get categories(): EnterpriseCategory[];
937
967
  /**
938
968
  * Retrieves an object by its type and ID.
939
969
  *
@@ -949,9 +979,9 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects' {
949
979
  getById(type: 'object', id: string): MapObject | undefined;
950
980
  getById(type: 'point-of-interest', id: string): PointOfInterest | undefined;
951
981
  getById(type: 'annotation', id: string): Annotation | undefined;
952
- getById(type: 'location', id: string): Location | undefined;
953
- getById(type: 'category', id: string): Category | undefined;
954
- getMapDataById(id: string): MapDataObjects | undefined;
982
+ getById(type: 'enterprise-location', id: string): EnterpriseLocation | undefined;
983
+ getById(type: 'enterprise-category', id: string): EnterpriseCategory | undefined;
984
+ getMapDataById(id: string): Places | undefined;
955
985
  /**
956
986
  * Retrieves a feature by its type and ID from the Mappedin Venue Format (MVF) data.
957
987
  *
@@ -978,14 +1008,14 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects' {
978
1008
  languagePacks: {
979
1009
  [key: string]: {
980
1010
  location: {
981
- [key: string]: Partial<EnterpriseLocation>;
1011
+ [key: string]: Partial<MVFEnterpriseLocation>;
982
1012
  };
983
1013
  category: {
984
- [key: string]: Partial<EnterpriseCategory>;
1014
+ [key: string]: Partial<MVFEnterpriseCategory>;
985
1015
  };
986
1016
  };
987
1017
  };
988
- getPropTranslation(type: 'location' | 'category', prop: string, id: string, fallback: EnterpriseLocation[keyof EnterpriseLocation] | EnterpriseCategory[keyof EnterpriseCategory]): unknown;
1018
+ getPropTranslation(type: 'enterprise-location' | 'enterprise-category', prop: string, id: string, fallback: MVFEnterpriseLocation[keyof MVFEnterpriseLocation] | MVFEnterpriseCategory[keyof MVFEnterpriseCategory]): unknown;
989
1019
  changeLanguage(languageCode: string): Promise<void>;
990
1020
  /**
991
1021
  * Cleans up resources used by the instance.
@@ -994,9 +1024,9 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects' {
994
1024
  */
995
1025
  destroy(): void;
996
1026
  }
997
- export { MapDataInternal, Space, Floor, Connection, MapObject, Door, Coordinate, PointOfInterest, Annotation, Hyperlink, Image, Location, };
1027
+ export { MapDataInternal, Space, Floor, Connection, MapObject, Door, Coordinate, PointOfInterest, Annotation, Hyperlink, Image, EnterpriseLocation, EnterpriseCategory, EnterpriseVenue, };
998
1028
  export type { TSpaceType } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/space';
999
- export type { MapDataObjects };
1029
+ export type { Places };
1000
1030
  }
1001
1031
 
1002
1032
  declare module '@mappedin/react-sdk/mappedin-js/src/map-view' {
@@ -1305,6 +1335,10 @@ declare module '@mappedin/react-sdk/mappedin-js/src/types' {
1305
1335
  export type DeepRequired<T> = Required<{
1306
1336
  [K in keyof T]: T[K] extends Required<T[K]> ? T[K] : DeepRequired<T[K]>;
1307
1337
  }>;
1338
+ export type CancellablePromise<T> = {
1339
+ promise: Promise<T>;
1340
+ cancel: () => void;
1341
+ };
1308
1342
  /**
1309
1343
  * @hidden
1310
1344
  */
@@ -2114,8 +2148,9 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-view-objects' {
2114
2148
  }
2115
2149
 
2116
2150
  declare module '@mappedin/react-sdk/mappedin-js/src/navigation' {
2117
- import type { MapView } from '@mappedin/react-sdk/mappedin-js/src/map-view';
2118
2151
  import type { Directions } from '@mappedin/react-sdk/mappedin-js/src/api-geojson';
2152
+ import type { GeojsonApiMapObject } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/map-object';
2153
+ import type { RendererCore } from '@mappedin/core-sdk';
2119
2154
  /**
2120
2155
  * Options for navigation.
2121
2156
  */
@@ -2191,18 +2226,24 @@ declare module '@mappedin/react-sdk/mappedin-js/src/navigation' {
2191
2226
  /**
2192
2227
  * @internal
2193
2228
  */
2194
- constructor(mapView: MapView);
2229
+ get currentMap(): GeojsonApiMapObject;
2230
+ /**
2231
+ * @internal
2232
+ */
2233
+ constructor(core: RendererCore, currentMapGetter: CurrentMapGetter);
2195
2234
  /**
2196
2235
  * Draws the specified directions on the map.
2197
2236
  * @param directions The directions to be drawn.
2198
2237
  * @param options Optional additional options for the navigation.
2199
2238
  */
2200
- draw: (directions: Directions, options?: TNavigationOptions) => Promise<void>;
2239
+ draw: (directions: Directions, options?: TNavigationOptions) => Promise<unknown>;
2201
2240
  /**
2202
2241
  * Clears any drawn navigation paths or directions from the map.
2203
2242
  */
2204
2243
  clear: () => void;
2205
2244
  }
2245
+ type CurrentMapGetter = () => GeojsonApiMapObject | undefined;
2246
+ export {};
2206
2247
  }
2207
2248
 
2208
2249
  declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson' {
@@ -2220,30 +2261,35 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson' {
2220
2261
  export { Images } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/images';
2221
2262
  }
2222
2263
 
2264
+ declare module '@mappedin/react-sdk/mappedin-js/src/search' {
2265
+ export type { SearchResult, SearchResultItem, SearchOptions, Suggestion, SearchResultEnterpriseCategory, SearchResultEnterpriseLocations, SearchResultPlaces, MatchInfo, } from '@mappedin/react-sdk/mappedin-js/src/search/internal';
2266
+ export type { SearchState } from '@mappedin/react-sdk/mappedin-js/src/search/external';
2267
+ export { Search } from '@mappedin/react-sdk/mappedin-js/src/search/external';
2268
+ }
2269
+
2223
2270
  declare module '@mappedin/react-sdk/mappedin-js/src/analytics' {
2224
2271
  export { Analytics, AnalyticsInternal } from '@mappedin/react-sdk/mappedin-js/src/analytics/customer';
2225
2272
  export type { AnalyticsUpdateOptions } from '@mappedin/react-sdk/mappedin-js/src/analytics/customer';
2226
2273
  }
2227
2274
 
2228
2275
  declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/category' {
2229
- import type { EnterpriseCategory } from '@mappedin/mvf';
2230
- import type { MapDataInternal, Location } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
2276
+ import type { EnterpriseCategory as MVFEnterpriseCategory } from '@mappedin/mvf';
2277
+ import type { MapDataInternal, EnterpriseLocation } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
2231
2278
  import BaseMapData from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/base-object';
2232
2279
  /**
2233
- * A class representing space data within the map.
2280
+ * An EnterpriseCategory is a collection of similar EnterpriseLocations.
2234
2281
  *
2235
- * Spaces are used to represent different areas within a map, such as rooms, hallways, etc.
2236
2282
  */
2237
- class Category extends BaseMapData implements Omit<EnterpriseCategory, 'children' | 'locations'> {
2283
+ class EnterpriseCategory extends BaseMapData implements Omit<MVFEnterpriseCategory, 'children' | 'locations'> {
2238
2284
  #private;
2239
2285
  /**
2240
2286
  * @internal
2241
2287
  */
2242
- static readonly __type = "category";
2288
+ static readonly __type = "enterprise-category";
2243
2289
  /**
2244
2290
  * @internal
2245
2291
  */
2246
- readonly __type = "category";
2292
+ readonly __type = "enterprise-category";
2247
2293
  name: string;
2248
2294
  color?: string | undefined;
2249
2295
  externalId: string;
@@ -2252,24 +2298,24 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/category' {
2252
2298
  iconFromDefaultList?: string | null | undefined;
2253
2299
  sortOrder: number;
2254
2300
  /**
2255
- * Checks if the provided instance is of type Category.
2301
+ * Checks if the provided instance is of type EnterpriseCategory.
2256
2302
  *
2257
2303
  * @param instance The instance to check.
2258
- * @returns {boolean} True if the instance is a Category, false otherwise.
2304
+ * @returns {boolean} True if the instance is a EnterpriseCategory, false otherwise.
2259
2305
  */
2260
- static is(instance: object): instance is Category;
2306
+ static is(instance: object): instance is EnterpriseCategory;
2261
2307
  /**
2262
2308
  * @internal
2263
2309
  */
2264
2310
  constructor(data: MapDataInternal, options: {
2265
- mvfData: EnterpriseCategory;
2311
+ mvfData: MVFEnterpriseCategory;
2266
2312
  });
2267
- get children(): Category[];
2268
- get locations(): Location[];
2313
+ get children(): EnterpriseCategory[];
2314
+ get locations(): EnterpriseLocation[];
2269
2315
  /**
2270
- * Serializes the space data to JSON.
2316
+ * Serializes the EnterpriseCategory data to JSON.
2271
2317
  *
2272
- * @returns An object representing the space.
2318
+ * @returns An object representing the EnterpriseCategory.
2273
2319
  */
2274
2320
  toJSON(): {
2275
2321
  id: string;
@@ -2282,29 +2328,29 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/category' {
2282
2328
  */
2283
2329
  destroy(): void;
2284
2330
  }
2285
- export default Category;
2331
+ export default EnterpriseCategory;
2286
2332
  }
2287
2333
 
2288
2334
  declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/location' {
2289
- import type { EnterpriseLocation, LocationState, OperationHours, SiblingGroup } from '@mappedin/mvf';
2335
+ import type { EnterpriseLocation as MVFEnterpriseLocation, LocationState, OperationHours, SiblingGroup } from '@mappedin/mvf';
2290
2336
  import type { Coordinate, MapDataInternal, Space } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
2291
2337
  import BaseMapData from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/base-object';
2292
2338
  import type Node from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/node';
2293
2339
  /**
2294
- * A class representing space data within the map.
2340
+ * A class representing enterprise location data within the map.
2295
2341
  *
2296
- * Spaces are used to represent different areas within a map, such as rooms, hallways, etc.
2342
+ * An EnterpriseLocation is something like a store, or a washroom on a map.
2297
2343
  */
2298
- class Location extends BaseMapData implements Omit<EnterpriseLocation, 'polygons' | 'nodes' | 'links'> {
2344
+ class EnterpriseLocation extends BaseMapData implements Omit<MVFEnterpriseLocation, 'polygons' | 'nodes' | 'links'> {
2299
2345
  #private;
2300
2346
  /**
2301
2347
  * @internal
2302
2348
  */
2303
- static readonly __type = "location";
2349
+ static readonly __type = "enterprise-location";
2304
2350
  /**
2305
2351
  * @internal
2306
2352
  */
2307
- readonly __type = "location";
2353
+ readonly __type = "enterprise-location";
2308
2354
  description?: string | undefined;
2309
2355
  name: string;
2310
2356
  amenity?: string | undefined;
@@ -2337,25 +2383,25 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/location' {
2337
2383
  tags?: string[] | undefined;
2338
2384
  type: string;
2339
2385
  /**
2340
- * Checks if the provided instance is of type Location.
2386
+ * Checks if the provided instance is of type EnterpriseLocation.
2341
2387
  *
2342
2388
  * @param instance The instance to check.
2343
- * @returns {boolean} True if the instance is a Location, false otherwise.
2389
+ * @returns {boolean} True if the instance is a EnterpriseLocation, false otherwise.
2344
2390
  */
2345
- static is(instance: object): instance is Location;
2391
+ static is(instance: object): instance is EnterpriseLocation;
2346
2392
  /**
2347
2393
  * @internal
2348
2394
  */
2349
2395
  constructor(data: MapDataInternal, options: {
2350
- mvfData: EnterpriseLocation;
2396
+ mvfData: MVFEnterpriseLocation;
2351
2397
  });
2352
2398
  get coordinates(): Coordinate[];
2353
2399
  get nodes(): Node[];
2354
2400
  get spaces(): Space[];
2355
2401
  /**
2356
- * Serializes the space data to JSON.
2402
+ * Serializes the EnterpriseLocation data to JSON.
2357
2403
  *
2358
- * @returns An object representing the space.
2404
+ * @returns An object representing the EnterpriseLocation.
2359
2405
  */
2360
2406
  toJSON(): {
2361
2407
  id: string;
@@ -2368,28 +2414,26 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/location' {
2368
2414
  */
2369
2415
  destroy(): void;
2370
2416
  }
2371
- export default Location;
2417
+ export default EnterpriseLocation;
2372
2418
  }
2373
2419
 
2374
2420
  declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/venue' {
2375
- import type { EnterpriseVenue, Language } from '@mappedin/mvf';
2421
+ import type { EnterpriseVenue as MVFEnterpriseVenue, Language } from '@mappedin/mvf';
2376
2422
  import type { Hyperlink, MapDataInternal } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
2377
2423
  import BaseMapData from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/base-object';
2378
2424
  /**
2379
- * A class representing space data within the map.
2380
- *
2381
- * Spaces are used to represent different areas within a map, such as rooms, hallways, etc.
2425
+ * An EnterpriseVenue is a specific place (like a mall, office building, or stadium) with one or more Floors
2382
2426
  */
2383
- class Venue extends BaseMapData implements EnterpriseVenue {
2427
+ class EnterpriseVenue extends BaseMapData implements MVFEnterpriseVenue {
2384
2428
  #private;
2385
2429
  /**
2386
2430
  * @internal
2387
2431
  */
2388
- static readonly __type = "venue";
2432
+ static readonly __type = "enterprise-venue";
2389
2433
  /**
2390
2434
  * @internal
2391
2435
  */
2392
- readonly __type = "venue";
2436
+ readonly __type = "enterprise-venue";
2393
2437
  countrycode?: string | undefined;
2394
2438
  externalId: string;
2395
2439
  defaultLanguage: Language;
@@ -2404,28 +2448,28 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/venue' {
2404
2448
  topLocations?: string[] | undefined;
2405
2449
  tzid?: string | undefined;
2406
2450
  /**
2407
- * Checks if the provided instance is of type Category.
2451
+ * Checks if the provided instance is of type EnterpriseVenue.
2408
2452
  *
2409
2453
  * @param instance The instance to check.
2410
- * @returns {boolean} True if the instance is a Category, false otherwise.
2454
+ * @returns {boolean} True if the instance is a EnterpriseVenue, false otherwise.
2411
2455
  */
2412
- static is(instance: object): instance is Venue;
2456
+ static is(instance: object): instance is EnterpriseVenue;
2413
2457
  /**
2414
2458
  * @internal
2415
2459
  */
2416
2460
  constructor(_data: MapDataInternal, options: {
2417
- mvfData: EnterpriseVenue;
2461
+ mvfData: MVFEnterpriseVenue;
2418
2462
  });
2419
2463
  /**
2420
- * Gets the name of the space.
2464
+ * Gets the name of the EnterpriseVenue.
2421
2465
  *
2422
- * @returns {string} The name of the space.
2466
+ * @returns {string} The name of the EnterpriseVenue.
2423
2467
  */
2424
2468
  get name(): string;
2425
2469
  /**
2426
- * Serializes the space data to JSON.
2470
+ * Serializes the EnterpriseVenue data to JSON.
2427
2471
  *
2428
- * @returns An object representing the space.
2472
+ * @returns An object representing the EnterpriseVenue.
2429
2473
  */
2430
2474
  toJSON(): {
2431
2475
  id: string;
@@ -2438,7 +2482,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/venue' {
2438
2482
  */
2439
2483
  destroy(): void;
2440
2484
  }
2441
- export default Venue;
2485
+ export default EnterpriseVenue;
2442
2486
  }
2443
2487
 
2444
2488
  declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/stacked-maps/stacked-maps' {
@@ -2677,10 +2721,10 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/door' {
2677
2721
  declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/space' {
2678
2722
  import type { Image, SpaceCollection } from '@mappedin/mvf';
2679
2723
  import Coordinate from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/coordinate';
2680
- import type { Location, MapDataInternal } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
2724
+ import type { EnterpriseLocation, MapDataInternal } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
2681
2725
  import type Floor from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/floor';
2682
2726
  import BaseMapData from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/base-object';
2683
- import Door from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/door';
2727
+ import type Door from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/door';
2684
2728
  /**
2685
2729
  * Represents the various types of spaces that can be defined within a map.
2686
2730
  * - 'room': A standard room or enclosed area.
@@ -2738,7 +2782,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/space' {
2738
2782
  /**
2739
2783
  * @internal
2740
2784
  */
2741
- get locations(): Location[];
2785
+ get locations(): EnterpriseLocation[];
2742
2786
  /**
2743
2787
  * Gets the {@link Floor} object associated with the space.
2744
2788
  *
@@ -3433,13 +3477,15 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/image' {
3433
3477
  declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/types' {
3434
3478
  import type Door from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/door';
3435
3479
  import type Floor from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/floor';
3436
- import type Node from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/node';
3437
3480
  import type Space from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/space';
3438
3481
  import type PointOfInterest from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/poi';
3439
3482
  import type Annotation from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/annotation';
3440
3483
  import type Connection from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/connection';
3441
3484
  import type MapObject from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/object';
3442
- export type MapDataObjects = Space | Floor | Node | Door | Connection | MapObject | PointOfInterest | Annotation;
3485
+ /**
3486
+ * Places are the main objects that can be searched for.
3487
+ */
3488
+ export type Places = Space | Floor | Door | Connection | MapObject | PointOfInterest | Annotation;
3443
3489
  }
3444
3490
 
3445
3491
  declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/blue-dot/blue-dot' {
@@ -3670,10 +3716,18 @@ declare module '@mappedin/react-sdk/geojson/src/components/marker' {
3670
3716
  }
3671
3717
 
3672
3718
  declare module '@mappedin/react-sdk/geojson/src/components/path' {
3673
- import { type Mesh, type ShaderMaterial, type BufferGeometry, Vector3 } from 'three';
3674
- import type { Position } from '@mappedin/react-sdk/geojson/src/types';
3719
+ import { Vector3 } from 'three';
3720
+ import type { Mesh, ShaderMaterial, BufferGeometry } from 'three';
3721
+ import type { EntityId, Position } from '@mappedin/react-sdk/geojson/src/types';
3675
3722
  import { Geometry3DObject3D } from '@mappedin/react-sdk/geojson/src/entities/geometry3d';
3676
3723
  import type { FeatureCollection, Point } from 'geojson';
3724
+ import type { GroupContainerState } from '@mappedin/react-sdk/geojson/src/entities/group-container';
3725
+ export type PathProperties = {
3726
+ /**
3727
+ * The parentId of the point. The point will be anchored to the altitude of this parent group container.
3728
+ */
3729
+ parentId?: EntityId<GroupContainerState> | string | null;
3730
+ };
3677
3731
  /**
3678
3732
  * State representing a Path
3679
3733
  */
@@ -3745,7 +3799,7 @@ declare module '@mappedin/react-sdk/geojson/src/components/path' {
3745
3799
  material?: ShaderMaterial;
3746
3800
  geometry?: BufferGeometry;
3747
3801
  outline?: Mesh;
3748
- feature: FeatureCollection<Point>;
3802
+ feature: FeatureCollection<Point, PathProperties>;
3749
3803
  options: AddPathOptions;
3750
3804
  nearRadius: number;
3751
3805
  farRadius: number;
@@ -3754,8 +3808,12 @@ declare module '@mappedin/react-sdk/geojson/src/components/path' {
3754
3808
  altitudeAdjustment: number;
3755
3809
  displayArrowsOnPath: boolean;
3756
3810
  animateArrowsOnPath: boolean;
3811
+ /**
3812
+ * If the path is vertical it will be rebuilt whenever altitudeDirty = true. This will be set during the first render of the path.
3813
+ */
3814
+ isVertical: boolean;
3757
3815
  dirty: boolean;
3758
- constructor(feature: FeatureCollection<Point, any>, options?: AddPathOptions);
3816
+ constructor(feature: FeatureCollection<Point, PathProperties>, options?: AddPathOptions);
3759
3817
  setColor(): void;
3760
3818
  setOpacity(): void;
3761
3819
  set completeFraction(value: number);
@@ -5130,6 +5188,7 @@ declare module '@mappedin/react-sdk/geojson/src/renderer' {
5130
5188
  import './utils/object-this-polyfill';
5131
5189
  import { Vector3, Raycaster, Camera as ThreeCamera } from 'three';
5132
5190
  import type { GroupContainerState } from '@mappedin/react-sdk/geojson/src/entities/group-container';
5191
+ import { GroupContainerObject3D } from '@mappedin/react-sdk/geojson/src/entities/group-container';
5133
5192
  import { PubSub } from '@mappedin/react-sdk/packages/common/pubsub';
5134
5193
  import { CollisionSystem } from '@mappedin/react-sdk/geojson/src/systems/collisions/system';
5135
5194
  import { InteractionSystem } from '@mappedin/react-sdk/geojson/src/systems/interactions';
@@ -5147,7 +5206,7 @@ declare module '@mappedin/react-sdk/geojson/src/renderer' {
5147
5206
  import { TwoDVisibilitySystem } from '@mappedin/react-sdk/geojson/src/systems/2d-visibility/system';
5148
5207
  import { RenderSystem } from '@mappedin/react-sdk/geojson/src/systems/render/system';
5149
5208
  import type { Position as GeoJsonPosition, FeatureCollection, LineString, MultiPolygon, Polygon, Point, Feature } from 'geojson';
5150
- import type { AddPathOptions, PathState } from '@mappedin/react-sdk/geojson/src/components/path';
5209
+ import type { AddPathOptions, PathProperties, PathState } from '@mappedin/react-sdk/geojson/src/components/path';
5151
5210
  import { StackSystem } from '@mappedin/react-sdk/geojson/src/systems/stack/system';
5152
5211
  import { CameraSystem } from '@mappedin/react-sdk/geojson/src/systems/camera';
5153
5212
  import { DOMDrawSystem } from '@mappedin/react-sdk/geojson/src/systems/dom-draw/system';
@@ -5260,6 +5319,7 @@ declare module '@mappedin/react-sdk/geojson/src/renderer' {
5260
5319
  id: string;
5261
5320
  type: string;
5262
5321
  };
5322
+ getParentContainer: (parent?: EntityId<GroupContainerState> | string | number | null, defaultToScene?: boolean) => GroupContainerObject3D | undefined;
5263
5323
  /**
5264
5324
  * Add a custom THREE.js entity to the map. The geometry is placed at the GeoJSON coordinate and includes a `setup` and `update` methods.
5265
5325
  * Setup is called when the first time the geometry visible, and update is called every render frame.
@@ -5288,21 +5348,13 @@ declare module '@mappedin/react-sdk/geojson/src/renderer' {
5288
5348
  /**
5289
5349
  * Add a Path along a set of GeoJSON coordinates that can be animated.
5290
5350
  */
5291
- addPath(geometry: FeatureCollection<Point, any>, options?: AddPathOptions, parent?: EntityId<GroupContainerState> | string | null): EntityId<PathState>;
5351
+ addPath(geometry: FeatureCollection<Point, PathProperties>, options?: AddPathOptions, parent?: EntityId<GroupContainerState> | string | null): EntityId<PathState>;
5292
5352
  /**
5293
5353
  * Updates the watermark on the map.
5294
5354
  *
5295
5355
  * @param options {WatermarkOptions}
5296
5356
  */
5297
5357
  updateWatermark(options: Omit<WatermarkOptions, 'onClick'>): void;
5298
- /**
5299
- * @deprecated
5300
- * @TODO: remove this method and do this in setstate instead
5301
- */
5302
- updateStackState(container: EntityId<GroupContainerState> | string | number, opts: {
5303
- expandedFactor?: number;
5304
- activeId?: string;
5305
- }): void;
5306
5358
  /**
5307
5359
  * Remove an entity from the renderer and release associated resources.
5308
5360
  */
@@ -6138,6 +6190,86 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-view-objects/shape' {
6138
6190
  }
6139
6191
  }
6140
6192
 
6193
+ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/map-object' {
6194
+ import type { ParsedMVF } from '@mappedin/mvf';
6195
+ import type { FeatureCollection, LineString, MultiPolygon, Polygon } from 'geojson';
6196
+ import { PubSub } from '@packages/internal/common';
6197
+ import type { Position, AddLabelOptions, RendererCore, PathState, MarkerState, LineStyle, PaintStyle, EntityId } from '@mappedin/core-sdk';
6198
+ import { FloorObject } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/floor-object';
6199
+ import type { Coordinate, TAddMarkerOptions, TAddPathOptions, TShow3DMapOptions } from '@mappedin/react-sdk/mappedin-js/src';
6200
+ import type { GLTFExportOptions, TAnimationOptions, TAddModelOptions, TAddModel, TAddImageOptions, CancellablePromise } from '@mappedin/react-sdk/mappedin-js/src/types';
6201
+ import { type AggregatedStyleMap } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/utils';
6202
+ import { StackedMaps } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/stacked-maps/stacked-maps';
6203
+ import type { TFloorChangeReason } from '@mappedin/react-sdk/mappedin-js/src/events';
6204
+ import type { Shape } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects';
6205
+ export class GeojsonApiMapObject extends PubSub<{
6206
+ 'floor-change': {
6207
+ reason?: TFloorChangeReason;
6208
+ floorId: string;
6209
+ };
6210
+ 'floor-change-start': {
6211
+ floorId: string;
6212
+ };
6213
+ }> {
6214
+ floors: FloorObject[];
6215
+ currentFloorId: string;
6216
+ id: string;
6217
+ renderer: RendererCore;
6218
+ mvf: ParsedMVF;
6219
+ styleMap: AggregatedStyleMap;
6220
+ StackedMaps: StackedMaps;
6221
+ get currentFloor(): FloorObject;
6222
+ setFloor(floorId: string, reason?: TFloorChangeReason): void;
6223
+ Models: {
6224
+ add: (id: string, targets: TAddModel[], opts: TAddModelOptions & {
6225
+ floorId?: string;
6226
+ }) => (import("@mappedin/core-sdk").GeometryState | import("@mappedin/core-sdk").ModelState)[];
6227
+ remove: (_id: string, _groupId: string) => void;
6228
+ };
6229
+ Images: {
6230
+ add: (target: Position, url: string, opts: TAddImageOptions & {
6231
+ floorId?: string;
6232
+ }) => EntityId<import("@mappedin/core-sdk/src/components/image").ImageState> | undefined;
6233
+ remove: (id: string) => void;
6234
+ removeAll: () => void;
6235
+ };
6236
+ Markers: {
6237
+ add: (coordinate: Coordinate, html: string, opts: TAddMarkerOptions) => EntityId<MarkerState> | undefined;
6238
+ remove: (id: string) => void;
6239
+ getContentEl: (id: string) => HTMLElement | undefined;
6240
+ removeAll: () => void;
6241
+ setPosition: (id: string, coordinate: Position, targetFloorId: string) => void;
6242
+ animateTo: (id: string, coordinate: Position, targetFloorId: string, options?: TAnimationOptions) => Promise<void>;
6243
+ };
6244
+ Exporter: {
6245
+ getCurrentSceneGLTF: (options: GLTFExportOptions) => Promise<Blob>;
6246
+ };
6247
+ Shapes: {
6248
+ add: <T extends FeatureCollection<Polygon | MultiPolygon | LineString, any>>(geometry: T, style: T extends FeatureCollection<LineString, any> ? LineStyle : PaintStyle, opts: {
6249
+ floorId?: string;
6250
+ }) => string;
6251
+ remove: (customGeometry: Shape) => string;
6252
+ };
6253
+ Labels: {
6254
+ all: ({ onCreate }: {
6255
+ onCreate: (labelId: string | number, text: string) => void;
6256
+ }) => void;
6257
+ add: (coordinate: Position, text: string, opts?: AddLabelOptions & {
6258
+ floorId?: string;
6259
+ }) => {
6260
+ id: string | number;
6261
+ };
6262
+ remove: (targetId: string) => void;
6263
+ removeAll: () => void;
6264
+ };
6265
+ Paths: {
6266
+ add: (coordinates: Coordinate[], options?: TAddPathOptions) => CancellablePromise<EntityId<PathState>[]>;
6267
+ remove: (entityIds: string[]) => void;
6268
+ };
6269
+ constructor(id: string, mvf: any, styleMap: AggregatedStyleMap, options: TShow3DMapOptions | undefined, renderer: RendererCore);
6270
+ }
6271
+ }
6272
+
6141
6273
  declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/api' {
6142
6274
  import type { Position, RendererCore, WatermarkOptions } from '@mappedin/core-sdk';
6143
6275
  import { type TShow3DMapOptions } from '@mappedin/react-sdk/mappedin-js/src';
@@ -6768,6 +6900,339 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/images' {
6768
6900
  export {};
6769
6901
  }
6770
6902
 
6903
+ declare module '@mappedin/react-sdk/mappedin-js/src/search/internal' {
6904
+ import type { SearchResult as MiniSearchResult, Suggestion, MatchInfo } from 'minisearch';
6905
+ import type { EnterpriseLocation, EnterpriseCategory, Places } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
6906
+ import type MapData from '@mappedin/react-sdk/mappedin-js/src/map-data';
6907
+ import { z } from 'zod';
6908
+ export class InternalSearch {
6909
+ constructor(mapData: MapData);
6910
+ /**
6911
+ * Populates the search indexes with the map data.
6912
+ * @returns A promise that resolves when the indexes are populated.
6913
+ */
6914
+ populate(): Promise<any[]>;
6915
+ search(term: string, options?: SearchOptions): Promise<SearchResult>;
6916
+ suggest(term: string, options?: SuggestOptions): Promise<Suggestion[]>;
6917
+ }
6918
+ export type SearchResultItem<T extends Places | EnterpriseLocation | EnterpriseCategory> = {
6919
+ type: T['__type'];
6920
+ match: MiniSearchResult['match'];
6921
+ score: number;
6922
+ item: T;
6923
+ };
6924
+ /**
6925
+ * @interface
6926
+ */
6927
+ export type SearchResultEnterpriseCategory = SearchResultItem<EnterpriseCategory>;
6928
+ /**
6929
+ * @interface
6930
+ */
6931
+ export type SearchResultEnterpriseLocations = SearchResultItem<EnterpriseLocation>;
6932
+ /**
6933
+ * @interface
6934
+ */
6935
+ export type SearchResultPlaces = SearchResultItem<Places>;
6936
+ /**
6937
+ * Search results
6938
+ */
6939
+ export type SearchResult = {
6940
+ /**
6941
+ * Places search results
6942
+ */
6943
+ places: SearchResultPlaces[];
6944
+ /**
6945
+ * Enterprise Locations search results
6946
+ */
6947
+ enterpriseLocations?: SearchResultEnterpriseLocations[];
6948
+ /**
6949
+ * Enterprise Categories search results
6950
+ */
6951
+ enterpriseCategories?: SearchResultEnterpriseCategory[];
6952
+ };
6953
+ export function removeAccents(it: string): string;
6954
+ const searchOptionsSchema: z.ZodObject<{
6955
+ /**
6956
+ * Options for searching places.
6957
+ * @property {Object} [fields] - Fields to search in places.
6958
+ * @property {boolean} [name] - Whether to search in the name field of places.
6959
+ * @property {boolean} [description] - Whether to search in the description field of places.
6960
+ * @property {number} [limit] - Maximum number of place results to return.
6961
+ */
6962
+ places: z.ZodOptional<z.ZodObject<{
6963
+ /**
6964
+ * Fields to search in places.
6965
+ * @property {boolean} [name] - Whether to search in the name field of places.
6966
+ * @property {boolean} [description] - Whether to search in the description field of places.
6967
+ */
6968
+ fields: z.ZodOptional<z.ZodObject<{
6969
+ /** Enable searching by place name */
6970
+ name: z.ZodOptional<z.ZodBoolean>;
6971
+ /** Enable searching by place description */
6972
+ description: z.ZodOptional<z.ZodBoolean>;
6973
+ }, "strip", z.ZodTypeAny, {
6974
+ name?: boolean | undefined;
6975
+ description?: boolean | undefined;
6976
+ }, {
6977
+ name?: boolean | undefined;
6978
+ description?: boolean | undefined;
6979
+ }>>;
6980
+ /** Maximum number of place results to return */
6981
+ limit: z.ZodOptional<z.ZodNumber>;
6982
+ }, "strip", z.ZodTypeAny, {
6983
+ limit?: number | undefined;
6984
+ fields?: {
6985
+ name?: boolean | undefined;
6986
+ description?: boolean | undefined;
6987
+ } | undefined;
6988
+ }, {
6989
+ limit?: number | undefined;
6990
+ fields?: {
6991
+ name?: boolean | undefined;
6992
+ description?: boolean | undefined;
6993
+ } | undefined;
6994
+ }>>;
6995
+ /**
6996
+ * Options for searching categories.
6997
+ * @property {Object} [fields] - Fields to search in categories.
6998
+ * @property {boolean} [name] - Whether to search in the name field of categories.
6999
+ * @property {boolean} [description] - Whether to search in the description field of categories.
7000
+ * @property {boolean} ['locations.name'] - Whether to search in the locations' names of categories.
7001
+ * @property {number} [limit] - Maximum number of category results to return.
7002
+ */
7003
+ enterpriseCategories: z.ZodOptional<z.ZodObject<{
7004
+ /**
7005
+ * Fields to search in categories.
7006
+ * @property {boolean} [name] - Whether to search in the name field of categories.
7007
+ * @property {boolean} [description] - Whether to search in the description field of categories.
7008
+ * @property {boolean} ['locations.name'] - Whether to search in the locations' names of categories.
7009
+ */
7010
+ fields: z.ZodOptional<z.ZodObject<{
7011
+ /** Enable searching by category name */
7012
+ name: z.ZodOptional<z.ZodBoolean>;
7013
+ /** Enable searching by category description */
7014
+ description: z.ZodOptional<z.ZodBoolean>;
7015
+ /** Enable searching by names of locations within the category */
7016
+ 'locations.name': z.ZodOptional<z.ZodBoolean>;
7017
+ }, "strip", z.ZodTypeAny, {
7018
+ name?: boolean | undefined;
7019
+ description?: boolean | undefined;
7020
+ 'locations.name'?: boolean | undefined;
7021
+ }, {
7022
+ name?: boolean | undefined;
7023
+ description?: boolean | undefined;
7024
+ 'locations.name'?: boolean | undefined;
7025
+ }>>;
7026
+ /** Maximum number of category results to return */
7027
+ limit: z.ZodOptional<z.ZodNumber>;
7028
+ }, "strip", z.ZodTypeAny, {
7029
+ limit?: number | undefined;
7030
+ fields?: {
7031
+ name?: boolean | undefined;
7032
+ description?: boolean | undefined;
7033
+ 'locations.name'?: boolean | undefined;
7034
+ } | undefined;
7035
+ }, {
7036
+ limit?: number | undefined;
7037
+ fields?: {
7038
+ name?: boolean | undefined;
7039
+ description?: boolean | undefined;
7040
+ 'locations.name'?: boolean | undefined;
7041
+ } | undefined;
7042
+ }>>;
7043
+ /**
7044
+ * Options for searching locations.
7045
+ * @property {Object} [fields] - Fields to search in locations.
7046
+ * @property {boolean} [name] - Whether to search in the name field of locations.
7047
+ * @property {boolean} [tags] - Whether to search in the tags field of locations.
7048
+ * @property {boolean} [description] - Whether to search in the description field of locations.
7049
+ * @property {number} [limit] - Maximum number of location results to return.
7050
+ */
7051
+ enterpriseLocations: z.ZodOptional<z.ZodObject<{
7052
+ /**
7053
+ * Fields to search in locations.
7054
+ * @property {boolean} [name] - Whether to search in the name field of locations.
7055
+ * @property {boolean} [tags] - Whether to search in the tags field of locations.
7056
+ * @property {boolean} [description] - Whether to search in the description field of locations.
7057
+ */
7058
+ fields: z.ZodOptional<z.ZodObject<{
7059
+ /** Enable searching by location name */
7060
+ name: z.ZodOptional<z.ZodBoolean>;
7061
+ /** Enable searching by location tags */
7062
+ tags: z.ZodOptional<z.ZodBoolean>;
7063
+ /** Enable searching by location description */
7064
+ description: z.ZodOptional<z.ZodBoolean>;
7065
+ }, "strip", z.ZodTypeAny, {
7066
+ name?: boolean | undefined;
7067
+ description?: boolean | undefined;
7068
+ tags?: boolean | undefined;
7069
+ }, {
7070
+ name?: boolean | undefined;
7071
+ description?: boolean | undefined;
7072
+ tags?: boolean | undefined;
7073
+ }>>;
7074
+ /** Maximum number of location results to return */
7075
+ limit: z.ZodOptional<z.ZodNumber>;
7076
+ }, "strip", z.ZodTypeAny, {
7077
+ limit?: number | undefined;
7078
+ fields?: {
7079
+ name?: boolean | undefined;
7080
+ description?: boolean | undefined;
7081
+ tags?: boolean | undefined;
7082
+ } | undefined;
7083
+ }, {
7084
+ limit?: number | undefined;
7085
+ fields?: {
7086
+ name?: boolean | undefined;
7087
+ description?: boolean | undefined;
7088
+ tags?: boolean | undefined;
7089
+ } | undefined;
7090
+ }>>;
7091
+ }, "strip", z.ZodTypeAny, {
7092
+ enterpriseLocations?: {
7093
+ limit?: number | undefined;
7094
+ fields?: {
7095
+ name?: boolean | undefined;
7096
+ description?: boolean | undefined;
7097
+ tags?: boolean | undefined;
7098
+ } | undefined;
7099
+ } | undefined;
7100
+ enterpriseCategories?: {
7101
+ limit?: number | undefined;
7102
+ fields?: {
7103
+ name?: boolean | undefined;
7104
+ description?: boolean | undefined;
7105
+ 'locations.name'?: boolean | undefined;
7106
+ } | undefined;
7107
+ } | undefined;
7108
+ places?: {
7109
+ limit?: number | undefined;
7110
+ fields?: {
7111
+ name?: boolean | undefined;
7112
+ description?: boolean | undefined;
7113
+ } | undefined;
7114
+ } | undefined;
7115
+ }, {
7116
+ enterpriseLocations?: {
7117
+ limit?: number | undefined;
7118
+ fields?: {
7119
+ name?: boolean | undefined;
7120
+ description?: boolean | undefined;
7121
+ tags?: boolean | undefined;
7122
+ } | undefined;
7123
+ } | undefined;
7124
+ enterpriseCategories?: {
7125
+ limit?: number | undefined;
7126
+ fields?: {
7127
+ name?: boolean | undefined;
7128
+ description?: boolean | undefined;
7129
+ 'locations.name'?: boolean | undefined;
7130
+ } | undefined;
7131
+ } | undefined;
7132
+ places?: {
7133
+ limit?: number | undefined;
7134
+ fields?: {
7135
+ name?: boolean | undefined;
7136
+ description?: boolean | undefined;
7137
+ } | undefined;
7138
+ } | undefined;
7139
+ }>;
7140
+ const suggestOptionsSchema: z.ZodObject<{
7141
+ /**
7142
+ * Options for searching places.
7143
+ * @property {boolean} [enabled] - Whether to search in places.
7144
+ */
7145
+ places: z.ZodOptional<z.ZodObject<{
7146
+ /** Enable searching by place name */
7147
+ enabled: z.ZodOptional<z.ZodBoolean>;
7148
+ }, "strip", z.ZodTypeAny, {
7149
+ enabled?: boolean | undefined;
7150
+ }, {
7151
+ enabled?: boolean | undefined;
7152
+ }>>;
7153
+ /**
7154
+ * Options for searching locations.
7155
+ * @property {boolean} [enabled] - Whether to search in locations.
7156
+ */
7157
+ enterpriseLocations: z.ZodOptional<z.ZodObject<{
7158
+ /** Enable searching by location name */
7159
+ enabled: z.ZodOptional<z.ZodBoolean>;
7160
+ }, "strip", z.ZodTypeAny, {
7161
+ enabled?: boolean | undefined;
7162
+ }, {
7163
+ enabled?: boolean | undefined;
7164
+ }>>;
7165
+ }, "strip", z.ZodTypeAny, {
7166
+ enterpriseLocations?: {
7167
+ enabled?: boolean | undefined;
7168
+ } | undefined;
7169
+ places?: {
7170
+ enabled?: boolean | undefined;
7171
+ } | undefined;
7172
+ }, {
7173
+ enterpriseLocations?: {
7174
+ enabled?: boolean | undefined;
7175
+ } | undefined;
7176
+ places?: {
7177
+ enabled?: boolean | undefined;
7178
+ } | undefined;
7179
+ }>;
7180
+ export type SearchOptions = z.infer<typeof searchOptionsSchema>;
7181
+ export type SuggestOptions = z.infer<typeof suggestOptionsSchema>;
7182
+ export { Suggestion, MatchInfo };
7183
+ }
7184
+
7185
+ declare module '@mappedin/react-sdk/mappedin-js/src/search/external' {
7186
+ import type MapData from '@mappedin/react-sdk/mappedin-js/src/map-data';
7187
+ import type { InternalSearch, SearchOptions, SuggestOptions } from '@mappedin/react-sdk/mappedin-js/src/search/internal';
7188
+ import type { MapDataInternal } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
7189
+ export class Search {
7190
+ #private;
7191
+ /**
7192
+ * Whether the search is enabled.
7193
+ * @default false
7194
+ */
7195
+ enabled: boolean;
7196
+ constructor(mapData: MapData, mapDataInternal: MapDataInternal, { enabled }?: {
7197
+ enabled?: boolean;
7198
+ });
7199
+ /**
7200
+ * Searches for places, locations, and categories.
7201
+ * @param term - The search term.
7202
+ * @param options - The search options.
7203
+ * @returns The search results.
7204
+ * @example
7205
+ * ```ts
7206
+ * const results = await search.query('Coffee Shop');
7207
+ * console.log(results.locations);
7208
+ * ```
7209
+ */
7210
+ query(term: string, options?: SearchOptions): ReturnType<typeof InternalSearch.prototype.search>;
7211
+ /**
7212
+ * Suggests the names of places, locations, and categories.
7213
+ * @param term - The search term.
7214
+ * @param options - The suggest options.
7215
+ * @returns The search suggestions.
7216
+ * @example
7217
+ * ```ts
7218
+ * const suggestions = await search.suggest('Coffee');
7219
+ * console.log(suggestions);
7220
+ * ```
7221
+ */
7222
+ suggest(term: string, options?: SuggestOptions): Promise<import("minisearch").Suggestion[]>;
7223
+ /**
7224
+ * Enables the search.
7225
+ */
7226
+ enable(): Promise<void>;
7227
+ }
7228
+ export type SearchState = {
7229
+ /**
7230
+ * Whether the search is enabled.
7231
+ */
7232
+ enabled: boolean;
7233
+ };
7234
+ }
7235
+
6771
7236
  declare module '@mappedin/react-sdk/mappedin-js/src/analytics/customer' {
6772
7237
  /**
6773
7238
  * Valid track-analytics API contexts. These should match the expected values of that endpoint or the requests will fail.
@@ -6944,90 +7409,6 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/base-object
6944
7409
  }
6945
7410
  }
6946
7411
 
6947
- declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/map-object' {
6948
- import type { ParsedMVF } from '@mappedin/mvf';
6949
- import type { FeatureCollection, LineString, MultiPolygon, Polygon } from 'geojson';
6950
- import { PubSub } from '@packages/internal/common';
6951
- import type { Position, AddLabelOptions, RendererCore, MarkerState, LineStyle, PaintStyle } from '@mappedin/core-sdk';
6952
- import { FloorObject } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/floor-object';
6953
- import type { Coordinate, TAddMarkerOptions, TAddPathOptions, TShow3DMapOptions } from '@mappedin/react-sdk/mappedin-js/src';
6954
- import type { GLTFExportOptions, TAnimationOptions, TAddModelOptions, TAddModel, TAddImageOptions } from '@mappedin/react-sdk/mappedin-js/src/types';
6955
- import { type AggregatedStyleMap } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/utils';
6956
- import { StackedMaps } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/stacked-maps/stacked-maps';
6957
- import type { TFloorChangeReason } from '@mappedin/react-sdk/mappedin-js/src/events';
6958
- import type { Shape } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects';
6959
- export class GeojsonApiMapObject extends PubSub<{
6960
- 'floor-change': {
6961
- reason?: TFloorChangeReason;
6962
- floorId: string;
6963
- };
6964
- 'floor-change-start': {
6965
- floorId: string;
6966
- };
6967
- }> {
6968
- floors: FloorObject[];
6969
- currentFloorId: string;
6970
- id: string;
6971
- renderer: RendererCore;
6972
- mvf: ParsedMVF;
6973
- styleMap: AggregatedStyleMap;
6974
- StackedMaps: StackedMaps;
6975
- get currentFloor(): FloorObject;
6976
- setFloor(floorId: string, reason?: TFloorChangeReason): void;
6977
- Models: {
6978
- add: (id: string, targets: TAddModel[], opts: TAddModelOptions & {
6979
- floorId?: string;
6980
- }) => (import("@mappedin/core-sdk").GeometryState | import("@mappedin/core-sdk").ModelState)[];
6981
- remove: (_id: string, _groupId: string) => void;
6982
- };
6983
- Images: {
6984
- add: (target: Position, url: string, opts: TAddImageOptions & {
6985
- floorId?: string;
6986
- }) => import("@mappedin/core-sdk").EntityId<import("@mappedin/core-sdk/src/components/image").ImageState> | undefined;
6987
- remove: (id: string) => void;
6988
- removeAll: () => void;
6989
- };
6990
- Markers: {
6991
- add: (coordinate: Position, html: string, opts?: TAddMarkerOptions & {
6992
- floorId?: string;
6993
- }) => import("@mappedin/core-sdk").EntityId<MarkerState> | undefined;
6994
- remove: (id: string) => void;
6995
- getContentEl: (id: string) => HTMLElement | undefined;
6996
- removeAll: () => void;
6997
- setPosition: (id: string, coordinate: Position, targetFloorId: string) => void;
6998
- animateTo: (id: string, coordinate: Position, targetFloorId: string, options?: TAnimationOptions) => Promise<void>;
6999
- };
7000
- Exporter: {
7001
- getCurrentSceneGLTF: (options: GLTFExportOptions) => Promise<Blob>;
7002
- };
7003
- Shapes: {
7004
- add: <T extends FeatureCollection<Polygon | MultiPolygon | LineString, any>>(geometry: T, style: T extends FeatureCollection<LineString, any> ? LineStyle : PaintStyle, opts: {
7005
- floorId?: string;
7006
- }) => string;
7007
- remove: (customGeometry: Shape) => string;
7008
- };
7009
- Labels: {
7010
- all: ({ onCreate }: {
7011
- onCreate: (labelId: string | number, text: string) => void;
7012
- }) => void;
7013
- add: (coordinate: Position, text: string, opts?: AddLabelOptions & {
7014
- floorId?: string;
7015
- }) => {
7016
- id: string | number;
7017
- };
7018
- remove: (targetId: string) => void;
7019
- removeAll: () => void;
7020
- };
7021
- Paths: {
7022
- add: (coordinates: Coordinate[], options?: TAddPathOptions) => Promise<{
7023
- id: string | number;
7024
- }[]>;
7025
- remove: (entityIds: string[]) => void;
7026
- };
7027
- constructor(id: string, mvf: any, styleMap: AggregatedStyleMap, options: TShow3DMapOptions | undefined, renderer: RendererCore);
7028
- }
7029
- }
7030
-
7031
7412
  declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/floor-object' {
7032
7413
  import type { ParsedMVF } from '@mappedin/mvf';
7033
7414
  import type { RendererCore } from '@mappedin/core-sdk';
@@ -8237,7 +8618,7 @@ declare module '@mappedin/react-sdk/geojson/src/entities/utils' {
8237
8618
  export function updateGroupTexture(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: Pick<GeometryGroupStyleComponent, 'texture' | 'topTexture'>): void;
8238
8619
  export function updateIndividualGeometryTexture(entity: Geometry3D, update?: Pick<StyleComponent, 'texture' | 'topTexture'>): boolean;
8239
8620
  export function updateIndividualGeometryOpacity(entity: Geometry3D, update?: number): boolean;
8240
- export function updateAltitude(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: number): void;
8621
+ export function updateAltitude(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: number): boolean;
8241
8622
  export function updateOutline(entity: Geometry3DTypes, update?: boolean): boolean;
8242
8623
  }
8243
8624
 
@@ -16820,8 +17201,10 @@ declare module '@mappedin/react-sdk/geojson/src/systems/path/system' {
16820
17201
  export class PathSystem extends PubSub<{
16821
17202
  'animate:path': undefined;
16822
17203
  }> {
17204
+ altitudeDirty: boolean;
16823
17205
  convertTo3DMapPosition: RendererCore['convertTo3DMapPosition'];
16824
- constructor(rendererState: RendererState, convertTo3DMapPosition: RendererCore['convertTo3DMapPosition']);
17206
+ getParentContainer: RendererCore['getParentContainer'];
17207
+ constructor(rendererState: RendererState, convertTo3DMapPosition: RendererCore['convertTo3DMapPosition'], getParentContainer: RendererCore['getParentContainer']);
16825
17208
  update(minZoomAltitude: number, maxZoomAltitude: number, currentZoomAltitude: number): void;
16826
17209
  }
16827
17210
  }