venue-js 1.4.0-next.9 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1,866 +1,21 @@
1
- import { QueryClient, QueryObserver, EnsureQueryDataOptions } from '@tanstack/query-core';
2
1
  export { QueryObserver } from '@tanstack/query-core';
3
- import * as geojson from 'geojson';
4
- import { Position, Geometry, GeoJsonProperties, Feature, Point, Polygon, MultiPolygon, LineString, MultiLineString, GeometryCollection } from 'geojson';
5
- import { FuseResult } from 'fuse.js';
2
+ import { V as VenueDataClient, R as Route } from './index-X4qpYAhF.mjs';
3
+ export { b5 as ALL_FEATURE_TYPES, h as AmenityFeature, ay as AmenityFeaturePopulated, f as AmenityGeometry, g as AmenityProperties, e as AnchorFeature, az as AnchorFeaturePopulated, A as AnchorGeometry, d as AnchorProperties, Y as AnyRelationshipFeature, B as BaseRelationshipProperties, b0 as DEFAULT_BASE_URL, j as DetailFeature, D as DetailGeometry, i as DetailProperties, am as ElementFeature, ak as ElementGeometry, al as ElementProperties, H as ElevatorRelationshipFeature, aJ as ElevatorRelationshipFeaturePopulated, G as ElevatorRelationshipProperties, X as EscalatorRelationshipFeature, aH as EscalatorRelationshipFeaturePopulated, W as EscalatorRelationshipProperties, ab as EventFeature, a9 as EventGeometry, aa as EventProperties, aQ as FeaturePopulatedResponseMap, aY as FeatureQueryOptions, av as FeatureResponseMap, aw as FeatureType, aW as FilterParams, aV as FindParams, l as FixtureFeature, aA as FixtureFeaturePopulated, F as FixtureGeometry, k as FixtureProperties, b4 as GEOJSON_FEATURE_TYPES, a$ as IMDFUnitCategory, b1 as IMDF_FEATURE_TYPES, b2 as IMDF_UNIT_CATEGORIES, I as Id, c as ImdfFeature, a_ as InternalFilterByType, aZ as InternalFindById, n as KioskFeature, aB as KioskFeaturePopulated, K as KioskGeometry, m as KioskProperties, aj as LabelFeature, ah as LabelGeometry, ai as LabelProperties, p as LevelFeature, aC as LevelFeaturePopulated, L as LevelGeometry, o as LevelProperties, a as Media, M as MediaFile, b as Model3d, au as Model3dFeature, as as Model3dGeometry, aP as Model3dPopulated, at as Model3dProperties, b3 as NONIMDF_FEATURE_TYPES, aU as NavigateClient, r as OccupantFeature, aD as OccupantFeaturePopulated, O as OccupantGeometry, b7 as OccupantHelpers, q as OccupantProperties, u as OpeningFeature, aE as OpeningFeaturePopulated, s as OpeningGeometry, t as OpeningProperties, x as OpeningTypeAndId, ar as Page, ax as PolygonalFeature, aR as PopulatableFeatureType, aX as PopulatedParams, ag as PrivilegeFeature, ae as PrivilegeGeometry, af as PrivilegeProperties, ad as PromotionFeature, ac as PromotionProperties, N as RampRelationshipFeature, aI as RampRelationshipFeaturePopulated, J as RampRelationshipProperties, v as RelationshipCategories, w as RelationshipDirectionTypes, z as RelationshipFeature, aF as RelationshipFeaturePopulated, y as RelationshipGeometry, aT as SearchClient, $ as SectionFeature, aL as SectionFeaturePopulated, Z as SectionGeometry, _ as SectionProperties, S as SingleGeometry, aq as SponsoredContentFeature, an as SponsoredContentLegacyType, ao as SponsoredContentPlacementType, ap as SponsoredContentStrapiV4ApiResponse, aK as StairRelationshipFeaturePopulated, Q as StairsRelationshipFeature, P as StairsRelationshipProperties, a8 as TaxonomyFeature, aO as TaxonomyFeaturePopulated, a6 as TaxonomyGeometry, a7 as TaxonomyProperties, T as TransalatableString, E as TraversalRelationshipFeature, aG as TraversalRelationshipFeaturePopulated, C as TraversalRelationshipProperties, a2 as UnitFeature, aM as UnitFeaturePopulated, a0 as UnitGeometry, a1 as UnitProperties, U as UnitTypeAndId, aS as VenueClientOptions, a5 as VenueFeature, aN as VenueFeaturePopulated, a3 as VenueGeometry, a4 as VenueProperties, b6 as defaultFeatureQueryOptionsMap, bj as fetchDeliveryApi, bk as fetchPreviewApi, bi as getDataClient, bn as getNavigateClient, bm as getSearchClient, b8 as isValidCoordinate, be as isValidLineString, bb as isValidLineStringCoordinates, bc as isValidMultiPolygon, ba as isValidMultiPolygonCoordinates, bf as isValidPoint, bd as isValidPolygon, b9 as isValidPolygonCoordinates, bg as matchFilter, bh as matchFilters, bl as safeFetchFeature } from './index-X4qpYAhF.mjs';
6
4
  import * as maptalks_dist_core_Class from 'maptalks/dist/core/Class';
7
5
  import * as maptalks$1 from 'maptalks-gl';
8
6
  import { Map, Coordinate as Coordinate$1 } from 'maptalks-gl';
7
+ import * as geojson from 'geojson';
8
+ import { Position, Feature, LineString, GeoJsonProperties, Polygon as Polygon$1, MultiPolygon as MultiPolygon$1, Point } from 'geojson';
9
9
  import { BaseObject, ThreeLayer } from 'maptalks.three';
10
10
  import * as maptalks from 'maptalks';
11
- import { Coordinate, Extent, Marker, ui, LineString as LineString$1, Polygon as Polygon$1, MultiPolygon as MultiPolygon$1, MultiLineString as MultiLineString$1 } from 'maptalks';
11
+ import { Coordinate, Extent, Marker, ui, LineString as LineString$1, Polygon, MultiPolygon, MultiLineString } from 'maptalks';
12
12
  import { BaseObjectOptionType, BarOptionType, ExtrudePolygonOptionType, ExtrudeLineOptionType } from 'maptalks.three/dist/type';
13
13
  import { PolygonOptionsType } from 'maptalks/dist/geometry/Polygon';
14
14
  import { LineStringOptionsType } from 'maptalks/dist/geometry/LineString';
15
15
  import { MapViewType, MapAnimationOptionsType, MapPaddingType } from 'maptalks/dist/map/Map';
16
16
  import * as THREE from 'three';
17
17
  import { SpriteMaterial } from 'three';
18
-
19
- type Id = string;
20
- type MediaFile = {
21
- ext: string;
22
- hash: string;
23
- height: number;
24
- mime: string;
25
- name: string;
26
- path: string | null;
27
- size: number;
28
- url: string;
29
- width: number;
30
- };
31
- type Media = MediaFile & {
32
- id: Id;
33
- alternativeText: string | null;
34
- caption: string | null;
35
- createdAt: string;
36
- ext: string;
37
- folderPath: string;
38
- formats: Record<string, MediaFile>;
39
- previewUrl: string | null;
40
- provider: string;
41
- provider_metadata: string | null;
42
- updatedAt: string;
43
- };
44
- type Model3d = {
45
- id: Id;
46
- name: string;
47
- properties: {
48
- position: Position;
49
- rotation: {
50
- x: number;
51
- y: number;
52
- z?: number;
53
- };
54
- scale: [number, number, number];
55
- url: string;
56
- };
57
- };
58
- type EntityTimestamps = {
59
- createdAt: string;
60
- updatedAt: string;
61
- publishedAt: string;
62
- };
63
- type SymbolProperties = {
64
- lineColor?: string;
65
- lineWidth?: string;
66
- lineDasharray?: string;
67
- lineOpacity?: string;
68
- lineJoin?: string;
69
- lineCap?: string;
70
- linePatternFile?: string;
71
- lineDx?: string;
72
- lineDy?: string;
73
- polygonFill?: string;
74
- polygonOpacity?: string;
75
- polygonPatternFile?: string;
76
- };
77
- type TransalatableString = Record<string, string>;
78
- type ImdfFeature<G extends Geometry | null = Geometry, P = GeoJsonProperties> = Feature<G, P> & {
79
- id: Id;
80
- feature_type: string;
81
- };
82
- type AnchorGeometry = Point;
83
- type AnchorProperties = EntityTimestamps & {
84
- address_id: Id | null;
85
- unit_id: Id;
86
- locale: string;
87
- };
88
- type AnchorFeature = ImdfFeature<AnchorGeometry, AnchorProperties> & {
89
- feature_type: "anchor";
90
- };
91
- type AmenityGeometry = Point;
92
- type AmenityProperties = EntityTimestamps & {
93
- amenity_logo: Media | null;
94
- category: string;
95
- description: TransalatableString | null;
96
- gallery: Media[];
97
- isNavigatable: boolean;
98
- is_featured: boolean;
99
- level_id: Id;
100
- location_description: string;
101
- logo: Media | null;
102
- name: TransalatableString | null;
103
- style: unknown;
104
- unit_ids: Id[];
105
- venue_id: Id;
106
- hours: string | null;
107
- };
108
- type AmenityFeature = ImdfFeature<AmenityGeometry, AmenityProperties> & {
109
- feature_type: "amenity";
110
- };
111
- type DetailGeometry = Point;
112
- type DetailProperties = {
113
- level_id: Id;
114
- [k: string]: any;
115
- };
116
- type DetailFeature = ImdfFeature<DetailGeometry, DetailProperties>;
117
- type FixtureGeometry = Polygon | MultiPolygon | LineString | MultiLineString;
118
- type FixtureProperties = EntityTimestamps & {
119
- anchor_id: Id | null;
120
- category: string;
121
- is_landmark: boolean;
122
- level_id: Id;
123
- locale: string;
124
- model3d: Model3d[];
125
- name: string | null;
126
- style: SymbolProperties;
127
- venue_id: Id;
128
- [k: string]: any;
129
- };
130
- type FixtureFeature = ImdfFeature<FixtureGeometry, FixtureProperties> & {
131
- feature_type: "fixture";
132
- };
133
- type KioskGeometry = Polygon | MultiPolygon;
134
- type KioskProperties = EntityTimestamps & {
135
- alt_name: string;
136
- anchor_id: Id;
137
- is_landmark: boolean;
138
- level_id: Id;
139
- locale: string;
140
- model3d: Model3d[];
141
- name: TransalatableString;
142
- style: SymbolProperties;
143
- venue_id: Id;
144
- };
145
- type KioskFeature = ImdfFeature<KioskGeometry, KioskProperties> & {
146
- feature_type: "kiosk";
147
- };
148
- type LevelGeometry = Polygon | MultiPolygon;
149
- type LevelProperties = EntityTimestamps & {
150
- alt_name: string | null;
151
- display_point: Point;
152
- name: TransalatableString;
153
- ordinal: number;
154
- properties: unknown;
155
- venue_id: Id;
156
- };
157
- type LevelFeature = ImdfFeature<LevelGeometry, LevelProperties> & {
158
- feature_type: "level";
159
- };
160
- type ExternalLink = {
161
- id: number;
162
- link?: string;
163
- ios_link?: string;
164
- android_link?: string;
165
- };
166
- type OccupantGeometry = null;
167
- type OccupantProperties = EntityTimestamps & {
168
- anchor_id: Id;
169
- category: string | null;
170
- category_group: string | null;
171
- cover_image: Media | null;
172
- description: TransalatableString;
173
- featured_image: Media | null;
174
- gallery: Media[] | null;
175
- group_ids: Id[];
176
- hours: string;
177
- is_featured: boolean;
178
- is_landmark: boolean;
179
- is_maintenance: boolean;
180
- keywords: string[];
181
- kiosk_id: Id | null;
182
- local_category_ids: Id[];
183
- logo: Media | null;
184
- maintenance_end_date: string | null;
185
- maintenance_start_date: string | null;
186
- name: TransalatableString;
187
- phone: string | null;
188
- privilege_ids: Id[];
189
- promotion_ids: Id[];
190
- render_priority: number;
191
- render_type: string;
192
- room_no: string | null;
193
- short_name: string | null;
194
- start_date: string;
195
- style: SymbolProperties | null;
196
- temp_anchor_id: Id | null;
197
- temp_kiosk_id: Id | null;
198
- temp_unit_id: Id | null;
199
- unit_id: Id | null;
200
- venue_id: Id;
201
- kiosk_ids: Id[];
202
- unit_ids: Id[];
203
- website_link: string | null;
204
- show_name_on_all_units: boolean;
205
- reservations?: ExternalLink[];
206
- can_reserve?: boolean;
207
- display_settings?: {
208
- card_style?: string | null;
209
- };
210
- };
211
- type OccupantFeature = ImdfFeature<OccupantGeometry, OccupantProperties> & {
212
- feature_type: "occupant";
213
- };
214
- type OpeningCategories = "automobile" | "bicycle" | "emergencyexit" | "pedestrian" | "pedestrian.principal" | "pedestrian.transit" | "service" | string;
215
- type OpeningGeometry = LineString;
216
- type OpeningProperties = EntityTimestamps & {
217
- alt_name: string;
218
- category: OpeningCategories;
219
- door: {
220
- type: string;
221
- };
222
- level_id: Id;
223
- name: TransalatableString;
224
- style: SymbolProperties;
225
- venue_id: Id;
226
- };
227
- type OpeningFeature = ImdfFeature<OpeningGeometry, OpeningProperties> & {
228
- feature_type: "opening";
229
- };
230
- type RelationshipCategories = "elevator" | "escalator" | "movingwalkway" | "ramp" | "stairs" | "stairs.emergencyexit" | "traversal" | "traversal.path" | string;
231
- type RelationshipDirectionTypes = "directed" | "undirected";
232
- type RelationshipGeometry = Geometry | null;
233
- type RelationshipProperties<T extends RelationshipCategories = RelationshipCategories> = EntityTimestamps & {
234
- category: RelationshipCategories;
235
- destination: {
236
- id: Id;
237
- feature_type: FeatureType;
238
- };
239
- direction: RelationshipDirectionTypes;
240
- hours: string | null;
241
- intermediary: {
242
- id: Id;
243
- feature_type: FeatureType;
244
- }[];
245
- locale: string;
246
- name: TransalatableString;
247
- origin: {
248
- id: Id;
249
- feature_type: FeatureType;
250
- };
251
- };
252
- type RelationshipFeature = ImdfFeature<RelationshipGeometry, RelationshipProperties>;
253
- type SectionGeometry = Polygon | MultiPolygon;
254
- type SectionProperties = EntityTimestamps & {
255
- venue_id: Id;
256
- level_id: Id;
257
- correlation_id: Id | null;
258
- category: string;
259
- ordinal: number;
260
- imdf_category: string;
261
- local_category_ids: string[];
262
- feature_image: Media | null;
263
- cover_image: Media | null;
264
- gallery: Media[] | null;
265
- is_featured: boolean;
266
- hours: string | null;
267
- [k: string]: any;
268
- };
269
- type SectionFeature = ImdfFeature<SectionGeometry, SectionProperties> & {
270
- feature_type: "section";
271
- };
272
- type UnitGeometry = Polygon | MultiPolygon;
273
- type UnitProperties = EntityTimestamps & {
274
- alt_name: string | null;
275
- category: string;
276
- is_landmark: boolean;
277
- level_id: Id;
278
- locale: string;
279
- model3d: Model3d[];
280
- name: TransalatableString;
281
- style: SymbolProperties;
282
- venue_id: Id;
283
- };
284
- type UnitFeature = ImdfFeature<UnitGeometry, UnitProperties> & {
285
- feature_type: "unit";
286
- };
287
- type VenueGeometry = Polygon | MultiPolygon;
288
- type VenueProperties = EntityTimestamps & {
289
- address: string;
290
- address_id: Id | null;
291
- country: string;
292
- display_point: Point;
293
- hours: string;
294
- imdf_category: string;
295
- locale: string;
296
- locality: string;
297
- logo: Media | null;
298
- logo_simple: Media | null;
299
- model3d: Model3d[];
300
- name: TransalatableString;
301
- phone: string;
302
- postal_code: string;
303
- province: string;
304
- reference: string;
305
- style: SymbolProperties | null;
306
- supported_locales: string[];
307
- theme_color: string;
308
- zoom: string | null;
309
- };
310
- type VenueFeature = ImdfFeature<VenueGeometry, VenueProperties> & {
311
- feature_type: "venue";
312
- };
313
- /**
314
- * Non-IMDF
315
- *********************** */
316
- type TaxonomyGeometry = null;
317
- type TaxonomyProperties = EntityTimestamps & {
318
- description: string;
319
- icon_image: string;
320
- icon_path: string;
321
- is_featured: boolean;
322
- local_id: string;
323
- locale: string;
324
- name: TransalatableString;
325
- order: number;
326
- parent_id: Id | null;
327
- reference: string;
328
- taxonomy: string;
329
- venue_id: Id | null;
330
- };
331
- type TaxonomyFeature = ImdfFeature<TaxonomyGeometry, TaxonomyProperties>;
332
- type EventGeometry = Polygon;
333
- type EventProperties = {
334
- name: string;
335
- ordinal: number;
336
- venue_id: Id;
337
- angle: number;
338
- fontSize: number;
339
- };
340
- type EventFeature = ImdfFeature<EventGeometry, EventProperties>;
341
- type PromotionProperties = {
342
- name: TransalatableString;
343
- category: string;
344
- cover_image: Media;
345
- daily_end_time: string;
346
- daily_start_time: string;
347
- description: TransalatableString;
348
- end_date: string;
349
- feature_id: string | null;
350
- gallery: Media[];
351
- is_featured: boolean;
352
- local_category_ids: string[];
353
- locale: string;
354
- publishedAt: string;
355
- start_date: string;
356
- updatedAt: string;
357
- venue_id: Id;
358
- website_link: string | null;
359
- };
360
- type PromotionFeature = ImdfFeature<null, PromotionProperties>;
361
- type PrivilegeGeometry = null;
362
- type PrivilegeProperties = {
363
- createdAt: string;
364
- description: TransalatableString;
365
- locale: string;
366
- occupant_id: Id;
367
- publishedAt: string;
368
- updatedAt: string;
369
- venue_id: Id;
370
- };
371
- type PrivilegeFeature = ImdfFeature<PrivilegeGeometry, PrivilegeProperties>;
372
- type LabelGeometry = Polygon;
373
- type LabelProperties = {
374
- name: string;
375
- ordinal: number;
376
- venue_id: Id;
377
- angle: number;
378
- fontSize: number;
379
- };
380
- type LabelFeature = ImdfFeature<LabelGeometry, LabelProperties>;
381
- type ElementGeometry = null;
382
- type ElementProperties = EntityTimestamps & {
383
- geometries: Array<{
384
- type: string;
385
- id: Id;
386
- geometry: Exclude<Geometry, GeometryCollection>;
387
- options: Record<string, unknown>;
388
- properties: {
389
- additionalField: string;
390
- name: string | null;
391
- image: Media | null;
392
- ordinal: number;
393
- };
394
- }>;
395
- locale: string;
396
- name: TransalatableString;
397
- };
398
- type ElementFeature = ImdfFeature<ElementGeometry, ElementProperties>;
399
- /**
400
- * Sponsored Content
401
- */
402
- type SponsoredContentLegacyType = "HOMEPAGE_SPOTLIGHT" | "SCREENSAVER" | "SUGGESTED_BRAND" | "SEARCH_RESULT" | "POPUP_BANNER" | "FOOTER_BANNER" | "RECOMMENDED_EVENT" | "RECOMMENDED_PROMOTION" | "RECOMMENDED_DIRECTORY";
403
- type SponsoredContentPlacementType = "HOMEPAGE_SPOTLIGHT" | "SEARCH_SUGGESTION" | "SEARCH_RESULT" | "LIST_TOPITEM" | "POPUP_BANNER" | "FOOTER_BANNER";
404
- type SponsoredContentAttributes = {
405
- venue_id: string;
406
- project_id: string;
407
- name: {
408
- en: string;
409
- };
410
- type: SponsoredContentLegacyType;
411
- placement_type: SponsoredContentPlacementType;
412
- start_date: string;
413
- end_date: string;
414
- daily_start_time: string;
415
- daily_end_time: string;
416
- order: number;
417
- url: string | null;
418
- feature_id: string | null;
419
- createdAt: string;
420
- updatedAt: string;
421
- publishedAt: string;
422
- media?: Media;
423
- locale: string;
424
- };
425
- type SponsoredContentStrapiV4ApiResponse = {
426
- id: string;
427
- attributes: SponsoredContentAttributes;
428
- };
429
- /** Parsed for internal use */
430
- type SponsoredContentFeature = SponsoredContentAttributes & {
431
- id: string;
432
- };
433
- type Page = {
434
- id: Id;
435
- attributes: Record<string, unknown>;
436
- };
437
- type Model3dGeometry = null;
438
- type Model3dProperties = {
439
- name: TransalatableString;
440
- model: string;
441
- level_id: Id;
442
- project_id: Id;
443
- rotation_x: number;
444
- rotation_y: number;
445
- rotation_z: number;
446
- center: number[];
447
- scale: number;
448
- bottom_height: number;
449
- translation_x: number;
450
- translation_y: number;
451
- translation_z: number;
452
- createdAt: string;
453
- updatedAt: string;
454
- publishedAt: string;
455
- locale: string;
456
- };
457
- type Model3dFeature = ImdfFeature<Model3dGeometry, Model3dProperties>;
458
- type FeatureResponseMap = {
459
- address: ImdfFeature;
460
- amenity: AmenityFeature;
461
- anchor: AnchorFeature;
462
- building: ImdfFeature;
463
- detail: DetailFeature;
464
- fixture: FixtureFeature;
465
- footprint: ImdfFeature;
466
- geofence: ImdfFeature;
467
- kiosk: KioskFeature;
468
- level: LevelFeature;
469
- occupant: OccupantFeature;
470
- opening: OpeningFeature;
471
- relationship: RelationshipFeature;
472
- section: SectionFeature;
473
- unit: UnitFeature;
474
- venue: VenueFeature;
475
- taxonomy: TaxonomyFeature;
476
- privilege: PrivilegeFeature;
477
- event: EventFeature;
478
- promotion: PromotionFeature;
479
- label: LabelFeature;
480
- element: ElementFeature;
481
- model3d: Model3dFeature;
482
- "sponsored-content": SponsoredContentFeature;
483
- page: Page;
484
- };
485
- type FeatureType = keyof FeatureResponseMap;
486
- type PolygonalFeature = UnitFeature | KioskFeature | LevelFeature | SectionFeature;
487
-
488
- type AmenityFeaturePopulated = AmenityFeature & {
489
- properties: AmenityFeature["properties"] & {
490
- /**
491
- * [IMDF] Unit(s) the Amenity is associated with
492
- */
493
- units: UnitFeaturePopulated[];
494
- /**
495
- * [venue.in.th] Venue that amenity is in
496
- */
497
- venue: VenueFeaturePopulated;
498
- /**
499
- * [IMDF] Level that amenity is on
500
- */
501
- level: LevelFeaturePopulated;
502
- /**
503
- * [Derived] From units[0] --> level's ordinal
504
- * This is added during feature enrichment and not part of the original IMDF dataset.
505
- */
506
- ordinal: number;
507
- /**
508
- * [Derived] From units[0] --> level's name
509
- * This is added during feature enrichment and not part of the original IMDF dataset.
510
- */
511
- level_name: string;
512
- /**
513
- * [Derived] The section this amenity is on.
514
- * This is added during feature enrichment and not part of the original IMDF dataset.
515
- */
516
- section?: SectionFeaturePopulated;
517
- /**
518
- * [Experimental | Derived] The kiosk this amenity is on.
519
- * This is added during feature enrichment and not part of the original IMDF dataset.
520
- */
521
- _experimental_kiosk?: KioskFeaturePopulated;
522
- };
523
- };
524
- type AnchorFeaturePopulated = AnchorFeature & {
525
- properties: AnchorFeature["properties"] & {
526
- /**
527
- * [IMDF] The unit this anchor is on.
528
- */
529
- unit: UnitFeaturePopulated;
530
- /**
531
- * [IMDF] Level that kiosk is on
532
- */
533
- level: LevelFeaturePopulated;
534
- /**
535
- * [venue.in.th] Venue that anchor is in
536
- */
537
- venue: VenueFeaturePopulated;
538
- /**
539
- * [Derived] The section this anchor is on.
540
- * This is added during feature enrichment and not part of the original IMDF dataset.
541
- */
542
- section?: SectionFeaturePopulated;
543
- };
544
- };
545
- type FixtureFeaturePopulated = FixtureFeature & {
546
- properties: FixtureFeature["properties"] & {
547
- /**
548
- * [IMDF] The unit this anchor is on.
549
- */
550
- anchor: AnchorFeaturePopulated;
551
- /**
552
- * [IMDF] Level that kiosk is on
553
- */
554
- level: LevelFeaturePopulated;
555
- /**
556
- * [IMDF] Venue that kiosk is in
557
- */
558
- venue?: VenueFeaturePopulated;
559
- /**
560
- * [Derived] Level's ordinal that fixture is on
561
- */
562
- ordinal: number;
563
- };
564
- };
565
- type KioskFeaturePopulated = KioskFeature & {
566
- properties: KioskFeature["properties"] & {
567
- /**
568
- * [IMDF] An Occupant MUST be positioned (via Anchor) within a Kiosk that models a space that is leased to a business entity
569
- */
570
- anchor: AnchorFeaturePopulated;
571
- /**
572
- * [IMDF] Level that kiosk is on
573
- */
574
- level: LevelFeaturePopulated;
575
- /**
576
- * [venue.in.th] Venue that kiosk is in
577
- */
578
- venue: VenueFeaturePopulated;
579
- /**
580
- * [Derived] The unit this kiosk is on, usually a walkway.
581
- * This is added during feature enrichment and not part of the original IMDF dataset.
582
- */
583
- unit: UnitFeaturePopulated;
584
- /**
585
- * [Derived] The section this kiosk is in
586
- * This is added during feature enrichment and not part of the original IMDF dataset.
587
- */
588
- section?: SectionFeaturePopulated;
589
- /**
590
- * [Derived] Level's ordinal that fixture is on
591
- */
592
- ordinal: number;
593
- };
594
- };
595
- type LevelFeaturePopulated = LevelFeature & {
596
- properties: LevelFeature["properties"] & {
597
- /**
598
- * [venue.in.th] Venue that level is in
599
- */
600
- venue: VenueFeaturePopulated;
601
- };
602
- };
603
- type OccupantFeaturePopulated = OccupantFeature & {
604
- properties: OccupantFeature["properties"] & {
605
- /**
606
- * [IMDF] Occupant's position
607
- */
608
- anchor: AnchorFeaturePopulated;
609
- /**
610
- * [Derived] Level's ordinal that occupant is on
611
- */
612
- ordinal: number;
613
- /**
614
- * [venue.in.th] Occupant's category
615
- */
616
- local_categories: TaxonomyFeaturePopulated[];
617
- unit?: UnitFeaturePopulated;
618
- kiosk?: KioskFeaturePopulated;
619
- /**
620
- * [venue.in.th] Bind correlation between units on an occupant,
621
- * which will be used for highlighting in the floor plan and
622
- * displaying location details later.
623
- */
624
- units: UnitFeaturePopulated[];
625
- /**
626
- * [venue.in.th] Bind correlation between kiosks on an occupant,
627
- * which will be used for highlighting in the floor plan and
628
- * displaying location details later.
629
- */
630
- kiosks: KioskFeaturePopulated[];
631
- /**
632
- * [venue.in.th] Venue that level is in
633
- */
634
- venue: VenueFeaturePopulated;
635
- /**
636
- * [venue.in.th] Occupant's promotions
637
- */
638
- promotions: PromotionFeature[];
639
- /**
640
- * [venue.in.th] Occupant's privileges
641
- */
642
- privileges: PrivilegeFeature[];
643
- };
644
- };
645
- type OpeningFeaturePopulated = OpeningFeature & {
646
- properties: OpeningFeature["properties"] & {
647
- /**
648
- * [IMDF] Level that section is on
649
- */
650
- level: LevelFeaturePopulated;
651
- /**
652
- * [venue.in.th] Venue that level is in
653
- */
654
- venue: VenueFeaturePopulated;
655
- /**
656
- * [Derived] Level's ordinal that unit is on
657
- */
658
- ordinal: number;
659
- };
660
- };
661
- type SectionFeaturePopulated = SectionFeature & {
662
- properties: SectionFeature["properties"] & {
663
- /**
664
- * [IMDF] Level that section is on
665
- */
666
- level: LevelFeaturePopulated;
667
- /**
668
- * [venue.in.th] Venue that level is in
669
- */
670
- venue: VenueFeaturePopulated;
671
- /**
672
- * [Derived] Level's ordinal that unit is on
673
- */
674
- ordinal: number;
675
- };
676
- };
677
- type UnitFeaturePopulated = UnitFeature & {
678
- properties: UnitFeature["properties"] & {
679
- /**
680
- * [IMDF] Level that unit is on
681
- */
682
- level: LevelFeaturePopulated;
683
- /**
684
- * [venue.in.th] Venue that level is in
685
- */
686
- venue: VenueFeaturePopulated;
687
- /**
688
- * [Derived] Level's ordinal that unit is on
689
- */
690
- ordinal: number;
691
- /**
692
- * [Derived] Secion that unit is in
693
- */
694
- section?: SectionFeaturePopulated;
695
- };
696
- };
697
- type VenueFeaturePopulated = VenueFeature;
698
- type TaxonomyFeaturePopulated = TaxonomyFeature & {
699
- properties: TaxonomyFeature["properties"] & {
700
- venue: VenueFeaturePopulated;
701
- };
702
- };
703
- type Model3dPopulated = Model3dFeature & {
704
- properties: Model3dFeature["properties"] & {
705
- /**
706
- * [IMDF] Level that model 3D is on
707
- */
708
- level: LevelFeaturePopulated;
709
- };
710
- };
711
- type FeaturePopulatedResponseMap = {
712
- address: ImdfFeature;
713
- amenity: AmenityFeaturePopulated;
714
- anchor: AnchorFeaturePopulated;
715
- building: ImdfFeature;
716
- detail: DetailFeature;
717
- fixture: FixtureFeaturePopulated;
718
- footprint: ImdfFeature;
719
- geofence: ImdfFeature;
720
- kiosk: KioskFeaturePopulated;
721
- level: LevelFeaturePopulated;
722
- occupant: OccupantFeaturePopulated;
723
- opening: OpeningFeaturePopulated;
724
- relationship: RelationshipFeature;
725
- section: SectionFeaturePopulated;
726
- unit: UnitFeaturePopulated;
727
- venue: VenueFeaturePopulated;
728
- taxonomy: TaxonomyFeaturePopulated;
729
- privilege: PrivilegeFeature;
730
- event: EventFeature;
731
- promotion: PromotionFeature;
732
- label: LabelFeature;
733
- element: ImdfFeature;
734
- model3d: Model3dPopulated;
735
- "sponsored-content": SponsoredContentFeature;
736
- page: Page;
737
- };
738
- type PopulatableFeatureType = keyof FeaturePopulatedResponseMap;
739
-
740
- type Value = string | boolean | number;
741
- type EqFilter = Value;
742
- type InFilter = {
743
- $in: (Value)[];
744
- };
745
- type Filter = EqFilter | InFilter;
746
- type Filters = Record<string, Filter>;
747
-
748
- interface VenueClientOptions {
749
- mode?: "delivery" | "preview";
750
- projectId: string;
751
- apiKey?: string;
752
- previewToken?: string;
753
- baseUrl?: string;
754
- queryClient?: QueryClient;
755
- }
756
- interface FindParams {
757
- populate?: boolean;
758
- }
759
- interface FilterParams {
760
- populate?: boolean;
761
- filters?: Filters;
762
- }
763
- interface PopulatedParams {
764
- populate: true;
765
- }
766
- interface FeatureQueryOptions {
767
- refetchInterval?: number;
768
- staleTime?: number;
769
- cacheTime?: number;
770
- enabled?: boolean;
771
- retry?: boolean | number;
772
- }
773
- type InternalFindById = <T extends FeatureType>(id: Id) => Promise<FeatureResponseMap[T]>;
774
- type InternalFilterByType = <T extends FeatureType>(featureType: T) => Promise<FeatureResponseMap[T][]>;
775
- type SearchClient = {
776
- search: (txt: string) => FuseResult<ImdfFeature>[];
777
- };
778
- interface VenueDataClient {
779
- projectId: string;
780
- queryClient: QueryClient;
781
- registerObserver: (featureType: FeatureType, refetchInterval: number) => QueryObserver;
782
- destroyObserver: (featureType: FeatureType) => void;
783
- destroyObservers: () => void;
784
- createFilterByTypeQueryOptions: <T extends FeatureType = FeatureType>(featureType: T, params: FilterParams, options: FeatureQueryOptions) => EnsureQueryDataOptions<FeatureResponseMap[T][] | FeaturePopulatedResponseMap[T][]>;
785
- createFindByIdQueryOptions: <T extends FeatureType = FeatureType>(featureType: T, id: string, params: FindParams, options: FeatureQueryOptions) => EnsureQueryDataOptions<FeatureResponseMap[T] | FeaturePopulatedResponseMap[T]>;
786
- filterByType: <T extends FeatureType>(featureType: T, params?: FilterParams) => Promise<FeatureResponseMap[T][] | FeaturePopulatedResponseMap[T][]>;
787
- findById: <T extends FeatureType>(featureType: T, id: string, params?: FindParams) => Promise<FeatureResponseMap[T] | FeaturePopulatedResponseMap[T]>;
788
- search: (txt: string) => Promise<FuseResult<ImdfFeature>[]>;
789
- }
790
-
791
- declare const DEFAULT_BASE_URL = "https://service.venue.in.th/api";
792
- declare const IMDF_FEATURE_TYPES: FeatureType[];
793
- declare const NONIMDF_FEATURE_TYPES: FeatureType[];
794
- declare const GEOJSON_FEATURE_TYPES: FeatureType[];
795
- declare const ALL_FEATURE_TYPES: FeatureType[];
796
- declare const defaultFeatureQueryOptionsMap: Record<FeatureType, FeatureQueryOptions>;
797
-
798
- declare function fetchDeliveryApi<T extends FeatureType = FeatureType>(projectId: string, apiKey: string, featureType: FeatureType, baseUrl?: string): Promise<FeatureResponseMap[T][]>;
799
- declare function fetchPreviewApi<T extends FeatureType = FeatureType>(projectId: string, previewToken: string, featureType: FeatureType, baseUrl?: string): Promise<FeatureResponseMap[T][]>;
800
- declare const safeFetchFeature: <T extends FeatureType = FeatureType>(featureType: FeatureType, params: {
801
- mode: "delivery" | "preview";
802
- projectId: string;
803
- apiKey: string;
804
- previewToken?: string;
805
- baseUrl: string;
806
- }) => Promise<FeatureResponseMap[T][]>;
807
-
808
- /**
809
- * Checks if a point is a valid coordinate pair.
810
- *
811
- * @param point - The point to be checked.
812
- * @return True if the point is a valid coordinate pair, false otherwise.
813
- */
814
- declare const isValidCoordinate: (point: Position) => boolean;
815
- /**
816
- * Checks if an input represents a valid polygon, which may include holes.
817
- * The input can be a single array of coordinates for simple polygons, or
818
- * an array of arrays of coordinates for polygons with holes.
819
- *
820
- * @param polygon - The input representing a polygon.
821
- * @return True if the polygon is valid, false otherwise.
822
- */
823
- declare const isValidPolygonCoordinates: (polygon: Position[] | Position[][]) => boolean;
824
- /**
825
- * Checks if an array of polygons forms a valid MultiPolygon.
826
- *
827
- * @param multipolygon - The array of polygons.
828
- * @return True if the multipolygon is valid, false otherwise.
829
- */
830
- declare const isValidMultiPolygonCoordinates: (multipolygon: Position[][][]) => boolean;
831
- /**
832
- * Checks if a set of points forms a valid LineString.
833
- * A valid LineString must have at least two points, each point must be a valid coordinate,
834
- * and it should not form a closed loop.
835
- *
836
- * @param lineString - The array of points representing a LineString.
837
- * @return True if the LineString is valid, false otherwise.
838
- */
839
- declare const isValidLineStringCoordinates: (lineString: Position[]) => boolean;
840
- declare const isValidMultiPolygon: (geometry: Exclude<Geometry, GeometryCollection>) => boolean;
841
- declare const isValidPolygon: (geometry: Exclude<Geometry, GeometryCollection>) => boolean;
842
- declare const isValidLineString: (geometry: Exclude<Geometry, GeometryCollection>) => boolean;
843
- declare const isValidPoint: (geometry: Exclude<Geometry, GeometryCollection>) => boolean;
844
-
845
- declare function matchFilter(value: Value | Value[], filter: Filter): boolean;
846
- declare function matchFilters<T extends Record<string, any>>(item: T, filters: Filters): boolean;
847
-
848
- declare const getOccupantMainLocation: (occupant: OccupantFeaturePopulated) => UnitFeaturePopulated | KioskFeaturePopulated;
849
- declare const getOccupantCorrelatedLocations: (occupant: OccupantFeaturePopulated) => Array<UnitFeaturePopulated | KioskFeaturePopulated>;
850
- type OccupantMarkerPlacementType = 'ONCE_PER_LEVEL' | 'ALL_LOCATIONS';
851
- declare const getOccupantMarkerLocations: (occupant: OccupantFeaturePopulated, options?: {
852
- type: OccupantMarkerPlacementType;
853
- }) => Array<UnitFeaturePopulated | KioskFeaturePopulated>;
854
-
855
- type occupantHelper_OccupantMarkerPlacementType = OccupantMarkerPlacementType;
856
- declare const occupantHelper_getOccupantCorrelatedLocations: typeof getOccupantCorrelatedLocations;
857
- declare const occupantHelper_getOccupantMainLocation: typeof getOccupantMainLocation;
858
- declare const occupantHelper_getOccupantMarkerLocations: typeof getOccupantMarkerLocations;
859
- declare namespace occupantHelper {
860
- export { type occupantHelper_OccupantMarkerPlacementType as OccupantMarkerPlacementType, occupantHelper_getOccupantCorrelatedLocations as getOccupantCorrelatedLocations, occupantHelper_getOccupantMainLocation as getOccupantMainLocation, occupantHelper_getOccupantMarkerLocations as getOccupantMarkerLocations };
861
- }
862
-
863
- declare const getDataClient: (options: VenueClientOptions) => VenueDataClient;
18
+ import 'fuse.js';
864
19
 
865
20
  type TextMarkerOptions = BaseObjectOptionType & {
866
21
  text?: string;
@@ -984,6 +139,7 @@ declare class RendererManager extends EventTarget {
984
139
  _addMarkersToManager: (id: any, markers: any, ordinal: any) => void;
985
140
  createMarker(type: 'text' | 'image', coordinate: Position, ordinal: number, textOrPath: string, options: AnyMarkerOptions): void;
986
141
  clearMarkers(): void;
142
+ drawNavigation(route: Route): void;
987
143
  }
988
144
 
989
145
  interface CameraManagerOptions {
@@ -1264,7 +420,7 @@ declare function styledFeatureGenerator(mapTheme: any): {
1264
420
  createFixture: (feature: any) => any;
1265
421
  createLineStringFromGeometries: (geometries: any) => LineString$1;
1266
422
  create3DStepPath: (feature: any, threeLayer: any, option?: {}) => NavigationPath;
1267
- createDecoration: (decoration: any, options: any) => LineString$1 | Polygon$1 | MultiPolygon$1 | MultiLineString$1;
423
+ createDecoration: (decoration: any, options: any) => LineString$1 | Polygon | MultiPolygon | MultiLineString;
1268
424
  create3DBillboard: (billboard: any, threeLayer: any) => Billboard;
1269
425
  create3DAmenityMarker: (feature: any, threeLayer: any, config: any) => SpriteMarker;
1270
426
  create3DOccupantAmenityMarker: (feature: any, threeLayer: any, config: any) => SpriteMarker;
@@ -1293,7 +449,7 @@ type GetSuitablyValueBetweenBearings = (newBearing: number, currentBearing: numb
1293
449
  declare const getBearingBetweenPoints: GetBearingBetweenPoints;
1294
450
  declare const getSuitablyValueBetweenBearings: GetSuitablyValueBetweenBearings;
1295
451
 
1296
- declare const getCenterFromGeometry: (geometry?: Polygon | MultiPolygon | Point | LineString) => number[] | null;
452
+ declare const getCenterFromGeometry: (geometry?: Polygon$1 | MultiPolygon$1 | Point | LineString) => number[] | null;
1297
453
  declare const createPolygonFromLineString: (geometry: any) => geojson.Position[][];
1298
454
 
1299
455
  declare const BASE_LAYER_NAME = "base";
@@ -1357,4 +513,4 @@ declare const VENUE_EVENTS: {
1357
513
  VENUE_MOVEINTOVIEW: string;
1358
514
  };
1359
515
 
1360
- export { ALL_FEATURE_TYPES, type AmenityFeature, type AmenityFeaturePopulated, type AmenityGeometry, type AmenityProperties, type AnchorFeature, type AnchorFeaturePopulated, type AnchorGeometry, type AnchorProperties, BASE_LAYER_NAME, DEFAULT_BASE_URL, DEFAULT_LOCALE, DESTINATION_MARKER_ID, type DetailFeature, type DetailGeometry, type DetailProperties, type ElementFeature, type ElementGeometry, type ElementProperties, type EventFeature, type EventGeometry, type EventProperties, type FeaturePopulatedResponseMap, type FeatureQueryOptions, type FeatureResponseMap, type FeatureType, type FilterParams, type FindParams, type FixtureFeature, type FixtureFeaturePopulated, type FixtureGeometry, type FixtureProperties, GEOJSON_FEATURE_TYPES, HIGHLIGHT_LAYER_NAME, type IAllVenuesViewConfig, type IExtrudeConfig, type IGraphFeatureOptions, type IGraphOptions, type IHighlightOptions, IMDF_FEATURE_TYPES, type IMapAnimation, type IMapConfig, type IMapExtrudeConfig, type ISetHighlight2DElementIdsOptions, type IUnitDistanceModifier, type IVerticalGraphOptions, type Id, type ImdfFeature, IndoorMap, type IndoorMapOptions, type InternalFilterByType, type InternalFindById, type KioskFeature, type KioskFeaturePopulated, type KioskGeometry, type KioskProperties, LAST_USER_LOCATION_ELEMENT_ID_PREFIX, LAYERS, LAYER_FEATURE_TYPE_OBJ, LAYER_OPTIONS, LOCALE_SYMBOL_KEY, type LabelFeature, type LabelGeometry, type LabelProperties, type LevelFeature, type LevelFeaturePopulated, type LevelGeometry, type LevelProperties, MARKER_LAYER_NAME, type Media, type MediaFile, type Model3d, type Model3dFeature, type Model3dGeometry, type Model3dPopulated, type Model3dProperties, NONIMDF_FEATURE_TYPES, ORIGIN_MARKER_ID, type OccupantFeature, type OccupantFeaturePopulated, type OccupantGeometry, occupantHelper as OccupantHelpers, type OccupantProperties, type OpeningFeature, type OpeningFeaturePopulated, type OpeningGeometry, type OpeningProperties, POI_MARKER_LAYER_NAME, type Page, type PolygonalFeature, type PopulatableFeatureType, type PopulatedParams, type PrivilegeFeature, type PrivilegeGeometry, type PrivilegeProperties, type PromotionFeature, type PromotionProperties, type RelationshipFeature, type RelationshipGeometry, type RelationshipProperties, type SearchClient, type SectionFeature, type SectionFeaturePopulated, type SectionGeometry, type SectionProperties, type SponsoredContentFeature, type SponsoredContentLegacyType, type SponsoredContentPlacementType, type SponsoredContentStrapiV4ApiResponse, type SymbolSet, type TaxonomyFeature, type TaxonomyFeaturePopulated, type TaxonomyGeometry, type TaxonomyProperties, type TextMarkerOptions, TextSpriteMarker, USER_LOCATION_ELEMENT_ID, USER_LOCATION_LAYER_NAME, type UnitFeature, type UnitFeaturePopulated, type UnitGeometry, type UnitProperties, VENUE_EVENTS, type VenueClientOptions, type VenueDataClient, type VenueFeature, type VenueFeaturePopulated, type VenueGeometry, type VenueProperties, createPolygonFromLineString, createSpriteMaterialByLabelSymbol, createStyledUIMarkerElement, defaultFeatureQueryOptionsMap, fetchDeliveryApi, fetchPreviewApi, getBearingBetweenPoints, getCenterFromGeometry, getDataClient, getExtrudeConfigByFeature, getFeatureByLocationId, getLocationByAmenity, getLocationByFeature, getLocationByOccupant, getLocationIdByFeature, getOrdinalByLocationId, getRelatedLocationIdsByFeature, getRelatedLocationsByAmenity, getRelatedLocationsByFeature, getRelatedLocationsByOccupant, getSuitablyValueBetweenBearings, isClickableFeature, isValidCoordinate, isValidLineString, isValidLineStringCoordinates, isValidMultiPolygon, isValidMultiPolygonCoordinates, isValidPoint, isValidPolygon, isValidPolygonCoordinates, matchFilter, matchFilters, safeFetchFeature, styledFeatureGenerator };
516
+ export { BASE_LAYER_NAME, DEFAULT_LOCALE, DESTINATION_MARKER_ID, HIGHLIGHT_LAYER_NAME, type IAllVenuesViewConfig, type IExtrudeConfig, type IGraphFeatureOptions, type IGraphOptions, type IHighlightOptions, type IMapAnimation, type IMapConfig, type IMapExtrudeConfig, type ISetHighlight2DElementIdsOptions, type IUnitDistanceModifier, type IVerticalGraphOptions, IndoorMap, type IndoorMapOptions, LAST_USER_LOCATION_ELEMENT_ID_PREFIX, LAYERS, LAYER_FEATURE_TYPE_OBJ, LAYER_OPTIONS, LOCALE_SYMBOL_KEY, MARKER_LAYER_NAME, ORIGIN_MARKER_ID, POI_MARKER_LAYER_NAME, type SymbolSet, type TextMarkerOptions, TextSpriteMarker, USER_LOCATION_ELEMENT_ID, USER_LOCATION_LAYER_NAME, VENUE_EVENTS, VenueDataClient, createPolygonFromLineString, createSpriteMaterialByLabelSymbol, createStyledUIMarkerElement, getBearingBetweenPoints, getCenterFromGeometry, getExtrudeConfigByFeature, getFeatureByLocationId, getLocationByAmenity, getLocationByFeature, getLocationByOccupant, getLocationIdByFeature, getOrdinalByLocationId, getRelatedLocationIdsByFeature, getRelatedLocationsByAmenity, getRelatedLocationsByFeature, getRelatedLocationsByOccupant, getSuitablyValueBetweenBearings, isClickableFeature, styledFeatureGenerator };