venue-js 1.4.0-next.2 → 1.4.0-next.21

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.ts CHANGED
@@ -1,803 +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, GeometryCollection } from 'geojson';
2
+ import { V as VenueDataClient, R as Route } from './index-CrxL_5B7.js';
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-CrxL_5B7.js';
5
4
  import * as maptalks_dist_core_Class from 'maptalks/dist/core/Class';
6
5
  import * as maptalks$1 from 'maptalks-gl';
7
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';
8
9
  import { BaseObject, ThreeLayer } from 'maptalks.three';
9
10
  import * as maptalks from 'maptalks';
10
- import { Coordinate, Extent, Marker, ui, LineString as LineString$1, Polygon as Polygon$1, MultiPolygon as MultiPolygon$1, MultiLineString } from 'maptalks';
11
+ import { Coordinate, Extent, Marker, ui, LineString as LineString$1, Polygon, MultiPolygon, MultiLineString } from 'maptalks';
11
12
  import { BaseObjectOptionType, BarOptionType, ExtrudePolygonOptionType, ExtrudeLineOptionType } from 'maptalks.three/dist/type';
12
13
  import { PolygonOptionsType } from 'maptalks/dist/geometry/Polygon';
13
14
  import { LineStringOptionsType } from 'maptalks/dist/geometry/LineString';
14
15
  import { MapViewType, MapAnimationOptionsType, MapPaddingType } from 'maptalks/dist/map/Map';
15
16
  import * as THREE from 'three';
16
17
  import { SpriteMaterial } from 'three';
17
-
18
- type Id = string;
19
- type MediaFile = {
20
- ext: string;
21
- hash: string;
22
- height: number;
23
- mime: string;
24
- name: string;
25
- path: string | null;
26
- size: number;
27
- url: string;
28
- width: number;
29
- };
30
- type Media = MediaFile & {
31
- id: Id;
32
- alternativeText: string | null;
33
- caption: string | null;
34
- createdAt: string;
35
- ext: string;
36
- folderPath: string;
37
- formats: Record<string, MediaFile>;
38
- previewUrl: string | null;
39
- provider: string;
40
- provider_metadata: string | null;
41
- updatedAt: string;
42
- };
43
- type Model3d = {
44
- id: Id;
45
- name: string;
46
- properties: {
47
- position: Position;
48
- rotation: {
49
- x: number;
50
- y: number;
51
- z?: number;
52
- };
53
- scale: [number, number, number];
54
- url: string;
55
- };
56
- };
57
- type EntityTimestamps = {
58
- createdAt: string;
59
- updatedAt: string;
60
- publishedAt: string;
61
- };
62
- type SymbolProperties = {
63
- lineColor?: string;
64
- lineWidth?: string;
65
- lineDasharray?: string;
66
- lineOpacity?: string;
67
- lineJoin?: string;
68
- lineCap?: string;
69
- linePatternFile?: string;
70
- lineDx?: string;
71
- lineDy?: string;
72
- polygonFill?: string;
73
- polygonOpacity?: string;
74
- polygonPatternFile?: string;
75
- };
76
- type TransalatableString = Record<string, string>;
77
- type ImdfFeature<G extends Geometry | null = Geometry, P = GeoJsonProperties> = Feature<G, P> & {
78
- id: Id;
79
- feature_type: string;
80
- };
81
- type AnchorGeometry = Point;
82
- type AnchorProperties = EntityTimestamps & {
83
- address_id: Id | null;
84
- unit_id: Id;
85
- locale: string;
86
- };
87
- type AnchorFeature = ImdfFeature<AnchorGeometry, AnchorProperties> & {
88
- feature_type: "anchor";
89
- };
90
- type AmenityGeometry = Point;
91
- type AmenityProperties = EntityTimestamps & {
92
- amenity_logo: Media | null;
93
- category: string;
94
- description: TransalatableString | null;
95
- gallery: Media[];
96
- isNavigatable: boolean;
97
- is_featured: boolean;
98
- level_id: Id;
99
- location_description: string;
100
- logo: Media | null;
101
- name: TransalatableString | null;
102
- style: unknown;
103
- unit_ids: Id[];
104
- venue_id: Id;
105
- };
106
- type AmenityFeature = ImdfFeature<AmenityGeometry, AmenityProperties> & {
107
- feature_type: "amenity";
108
- };
109
- type DetailGeometry = Point;
110
- type DetailProperties = {
111
- level_id: Id;
112
- [k: string]: any;
113
- };
114
- type DetailFeature = ImdfFeature<DetailGeometry, DetailProperties>;
115
- type FixtureGeometry = Point;
116
- type FixtureProperties = EntityTimestamps & {
117
- anchor_id: Id | null;
118
- category: string;
119
- is_landmark: boolean;
120
- level_id: Id;
121
- locale: string;
122
- model3d: Model3d[];
123
- name: string | null;
124
- style: SymbolProperties;
125
- venue_id: Id;
126
- [k: string]: any;
127
- };
128
- type FixtureFeature = ImdfFeature<FixtureGeometry, FixtureProperties>;
129
- type KioskGeometry = Polygon | MultiPolygon;
130
- type KioskProperties = EntityTimestamps & {
131
- alt_name: string;
132
- anchor_id: Id;
133
- is_landmark: boolean;
134
- level_id: Id;
135
- locale: string;
136
- model3d: Model3d[];
137
- name: TransalatableString;
138
- style: SymbolProperties;
139
- venue_id: Id;
140
- };
141
- type KioskFeature = ImdfFeature<KioskGeometry, KioskProperties>;
142
- type LevelGeometry = Polygon | MultiPolygon;
143
- type LevelProperties = EntityTimestamps & {
144
- alt_name: string | null;
145
- display_point: Point;
146
- name: TransalatableString;
147
- ordinal: number;
148
- properties: unknown;
149
- venue_id: Id;
150
- };
151
- type LevelFeature = ImdfFeature<LevelGeometry, LevelProperties>;
152
- type OccupantGeometry = null;
153
- type OccupantProperties = EntityTimestamps & {
154
- anchor_id: Id;
155
- category: string | null;
156
- category_group: string | null;
157
- cover_image: Media | null;
158
- description: TransalatableString;
159
- featured_image: Media | null;
160
- gallery: Media[] | null;
161
- group_ids: Id[];
162
- hours: string;
163
- is_featured: boolean;
164
- is_landmark: boolean;
165
- is_maintenance: boolean;
166
- keywords: string[];
167
- kiosk_id: Id | null;
168
- local_category_ids: Id[];
169
- logo: Media | null;
170
- maintenance_end_date: string | null;
171
- maintenance_start_date: string | null;
172
- name: TransalatableString;
173
- phone: string | null;
174
- privilege_ids: Id[];
175
- promotion_ids: Id[];
176
- render_priority: number;
177
- render_type: string;
178
- room_no: string | null;
179
- short_name: string | null;
180
- start_date: string;
181
- style: SymbolProperties | null;
182
- temp_anchor_id: Id | null;
183
- temp_kiosk_id: Id | null;
184
- temp_unit_id: Id | null;
185
- unit_id: Id | null;
186
- venue_id: Id;
187
- kiosk_ids: Id[];
188
- unit_ids: Id[];
189
- website_link: string | null;
190
- show_name_on_all_units: boolean;
191
- };
192
- type OccupantFeature = ImdfFeature<OccupantGeometry, OccupantProperties>;
193
- type OpeningGeometry = LineString;
194
- type OpeningProperties = EntityTimestamps & {
195
- alt_name: string;
196
- category: string;
197
- door: {
198
- type: string;
199
- };
200
- level_id: Id;
201
- name: TransalatableString;
202
- style: SymbolProperties;
203
- venue_id: Id;
204
- };
205
- type OpeningFeature = ImdfFeature<OpeningGeometry, OpeningProperties>;
206
- type RelationshipGeometry = Geometry | null;
207
- type RelationshipProperties = EntityTimestamps & {
208
- category: string;
209
- destination: {
210
- id: Id;
211
- feature_type: FeatureType;
212
- };
213
- direction: string;
214
- hours: string | null;
215
- intermediary: {
216
- id: Id;
217
- feature_type: FeatureType;
218
- }[];
219
- locale: string;
220
- name: TransalatableString;
221
- origin: {
222
- id: Id;
223
- feature_type: FeatureType;
224
- };
225
- };
226
- type RelationshipFeature = ImdfFeature<RelationshipGeometry, RelationshipProperties>;
227
- type SectionGeometry = Polygon | MultiPolygon;
228
- type SectionProperties = EntityTimestamps & {
229
- venue_id: Id;
230
- level_id: Id;
231
- correlation_id: Id | null;
232
- category: string;
233
- ordinal: number;
234
- imdf_category: string;
235
- [k: string]: any;
236
- };
237
- type SectionFeature = ImdfFeature<SectionGeometry, SectionProperties>;
238
- type UnitGeometry = Polygon | MultiPolygon;
239
- type UnitProperties = EntityTimestamps & {
240
- alt_name: string | null;
241
- category: string;
242
- is_landmark: boolean;
243
- level_id: Id;
244
- locale: string;
245
- model3d: Model3d[];
246
- name: TransalatableString;
247
- style: SymbolProperties;
248
- venue_id: Id;
249
- };
250
- type UnitFeature = ImdfFeature<UnitGeometry, UnitProperties>;
251
- type VenueGeometry = Polygon | MultiPolygon;
252
- type VenueProperties = EntityTimestamps & {
253
- address: string;
254
- address_id: Id | null;
255
- country: string;
256
- display_point: Point;
257
- hours: string;
258
- imdf_category: string;
259
- locale: string;
260
- locality: string;
261
- logo: Media | null;
262
- logo_simple: Media | null;
263
- model3d: Model3d[];
264
- name: TransalatableString;
265
- phone: string;
266
- postal_code: string;
267
- province: string;
268
- reference: string;
269
- style: SymbolProperties | null;
270
- supported_locales: string[];
271
- theme_color: string;
272
- zoom: string | null;
273
- };
274
- type VenueFeature = ImdfFeature<VenueGeometry, VenueProperties>;
275
- /**
276
- * Non-IMDF
277
- *********************** */
278
- type TaxonomyGeometry = null;
279
- type TaxonomyProperties = EntityTimestamps & {
280
- description: string;
281
- icon_image: string;
282
- icon_path: string;
283
- is_featured: boolean;
284
- local_id: string;
285
- locale: string;
286
- name: TransalatableString;
287
- order: number;
288
- parent_id: Id | null;
289
- reference: string;
290
- taxonomy: string;
291
- venue_id: Id | null;
292
- };
293
- type TaxonomyFeature = ImdfFeature<TaxonomyGeometry, TaxonomyProperties>;
294
- type EventGeometry = Polygon;
295
- type EventProperties = {
296
- name: string;
297
- ordinal: number;
298
- venue_id: Id;
299
- angle: number;
300
- fontSize: number;
301
- };
302
- type EventFeature = ImdfFeature<EventGeometry, EventProperties>;
303
- type PromotionProperties = {
304
- name: TransalatableString;
305
- category: string;
306
- cover_image: Media;
307
- daily_end_time: string;
308
- daily_start_time: string;
309
- description: TransalatableString;
310
- end_date: string;
311
- feature_id: string | null;
312
- gallery: Media[];
313
- is_featured: boolean;
314
- local_category_ids: string[];
315
- locale: string;
316
- publishedAt: string;
317
- start_date: string;
318
- updatedAt: string;
319
- venue_id: Id;
320
- website_link: string | null;
321
- };
322
- type PromotionFeature = ImdfFeature<null, PromotionProperties>;
323
- type PrivilegeGeometry = null;
324
- type PrivilegeProperties = {
325
- createdAt: string;
326
- description: TransalatableString;
327
- locale: string;
328
- occupant_id: Id;
329
- publishedAt: string;
330
- updatedAt: string;
331
- venue_id: Id;
332
- };
333
- type PrivilegeFeature = ImdfFeature<PrivilegeGeometry, PrivilegeProperties>;
334
- type LabelGeometry = Polygon;
335
- type LabelProperties = {
336
- name: string;
337
- ordinal: number;
338
- venue_id: Id;
339
- angle: number;
340
- fontSize: number;
341
- };
342
- type LabelFeature = ImdfFeature<LabelGeometry, LabelProperties>;
343
- type ElementGeometry = null;
344
- type ElementProperties = EntityTimestamps & {
345
- geometries: Array<{
346
- type: string;
347
- id: Id;
348
- geometry: Exclude<Geometry, GeometryCollection>;
349
- options: Record<string, unknown>;
350
- properties: {
351
- additionalField: string;
352
- name: string | null;
353
- image: Media | null;
354
- ordinal: number;
355
- };
356
- }>;
357
- locale: string;
358
- name: TransalatableString;
359
- };
360
- type ElementFeature = ImdfFeature<ElementGeometry, ElementProperties>;
361
- /**
362
- * Sponsored Content
363
- */
364
- type SponsoredContentLegacyType = "HOMEPAGE_SPOTLIGHT" | "SCREENSAVER" | "SUGGESTED_BRAND" | "SEARCH_RESULT" | "POPUP_BANNER" | "FOOTER_BANNER" | "RECOMMENDED_EVENT" | "RECOMMENDED_PROMOTION" | "RECOMMENDED_DIRECTORY";
365
- type SponsoredContentPlacementType = "HOMEPAGE_SPOTLIGHT" | "SEARCH_SUGGESTION" | "SEARCH_RESULT" | "LIST_TOPITEM" | "POPUP_BANNER" | "FOOTER_BANNER";
366
- type SponsoredContentAttributes = {
367
- venue_id: string;
368
- project_id: string;
369
- name: {
370
- en: string;
371
- };
372
- type: SponsoredContentLegacyType;
373
- placement_type: SponsoredContentPlacementType;
374
- start_date: string;
375
- end_date: string;
376
- daily_start_time: string;
377
- daily_end_time: string;
378
- order: number;
379
- url: string | null;
380
- feature_id: string | null;
381
- createdAt: string;
382
- updatedAt: string;
383
- publishedAt: string;
384
- media?: Media;
385
- locale: string;
386
- };
387
- type SponsoredContentStrapiV4ApiResponse = {
388
- id: string;
389
- attributes: SponsoredContentAttributes;
390
- };
391
- /** Parsed for internal use */
392
- type SponsoredContentFeature = SponsoredContentAttributes & {
393
- id: string;
394
- };
395
- type Page = {
396
- id: Id;
397
- attributes: Record<string, unknown>;
398
- };
399
- type Model3dGeometry = null;
400
- type Model3dProperties = {
401
- name: {
402
- en: string;
403
- };
404
- model: string;
405
- level_id: null;
406
- project_id: string;
407
- rotation_x: number;
408
- rotation_y: number;
409
- rotation_z: number;
410
- center: number[];
411
- scale: number;
412
- altitude: 0;
413
- translation_x: number;
414
- translation_y: number;
415
- translation_z: number;
416
- createdAt: string;
417
- updatedAt: string;
418
- publishedAt: string;
419
- locale: string;
420
- };
421
- type Model3dFeature = ImdfFeature<Model3dGeometry, Model3dProperties>;
422
- type FeatureResponseMap = {
423
- address: ImdfFeature;
424
- amenity: AmenityFeature;
425
- anchor: AnchorFeature;
426
- building: ImdfFeature;
427
- detail: DetailFeature;
428
- fixture: FixtureFeature;
429
- footprint: ImdfFeature;
430
- geofence: ImdfFeature;
431
- kiosk: KioskFeature;
432
- level: LevelFeature;
433
- occupant: OccupantFeature;
434
- opening: OpeningFeature;
435
- relationship: RelationshipFeature;
436
- section: SectionFeature;
437
- unit: UnitFeature;
438
- venue: VenueFeature;
439
- taxonomy: TaxonomyFeature;
440
- privilege: PrivilegeFeature;
441
- event: EventFeature;
442
- promotion: PromotionFeature;
443
- label: LabelFeature;
444
- element: ElementFeature;
445
- model3d: Model3dFeature;
446
- "sponsored-content": SponsoredContentFeature;
447
- page: Page;
448
- };
449
- type FeatureType = keyof FeatureResponseMap;
450
- type PolygonalFeature = UnitFeature | KioskFeature | LevelFeature | SectionFeature;
451
-
452
- type AmenityFeaturePopulated = AmenityFeature & {
453
- properties: AmenityFeature["properties"] & {
454
- /**
455
- * [IMDF] Unit(s) the Amenity is associated with
456
- */
457
- units: UnitFeaturePopulated[];
458
- /**
459
- * [venue.in.th] Venue that kiosk is in
460
- */
461
- venue: VenueFeaturePopulated;
462
- /**
463
- * [Derived] From units[0] --> level's ordinal
464
- * This is added during feature enrichment and not part of the original IMDF dataset.
465
- */
466
- ordinal: number;
467
- /**
468
- * [Derived] From units[0] --> level's name
469
- * This is added during feature enrichment and not part of the original IMDF dataset.
470
- */
471
- level_name: string;
472
- /**
473
- * [Derived] The section this amenity is on.
474
- * This is added during feature enrichment and not part of the original IMDF dataset.
475
- */
476
- section?: SectionFeaturePopulated;
477
- /**
478
- * [Experimental | Derived] The kiosk this amenity is on.
479
- * This is added during feature enrichment and not part of the original IMDF dataset.
480
- */
481
- _experimental_kiosk?: KioskFeaturePopulated;
482
- };
483
- };
484
- type AnchorFeaturePopulated = AnchorFeature & {
485
- properties: AnchorFeature["properties"] & {
486
- /**
487
- * [IMDF] The unit this anchor is on.
488
- */
489
- unit: UnitFeaturePopulated;
490
- /**
491
- * [IMDF] Level that kiosk is on
492
- */
493
- level: LevelFeaturePopulated;
494
- /**
495
- * [venue.in.th] Venue that anchor is in
496
- */
497
- venue: VenueFeaturePopulated;
498
- /**
499
- * [Derived] The section this anchor is on.
500
- * This is added during feature enrichment and not part of the original IMDF dataset.
501
- */
502
- section?: SectionFeaturePopulated;
503
- };
504
- };
505
- type FixtureFeaturePopulated = FixtureFeature & {
506
- properties: FixtureFeature["properties"] & {
507
- /**
508
- * [IMDF] The unit this anchor is on.
509
- */
510
- anchor: AnchorFeaturePopulated;
511
- /**
512
- * [IMDF] Level that kiosk is on
513
- */
514
- level: LevelFeaturePopulated;
515
- /**
516
- * [IMDF] Venue that kiosk is in
517
- */
518
- venue?: VenueFeaturePopulated;
519
- };
520
- };
521
- type KioskFeaturePopulated = KioskFeature & {
522
- properties: KioskFeature["properties"] & {
523
- /**
524
- * [IMDF] An Occupant MUST be positioned (via Anchor) within a Kiosk that models a space that is leased to a business entity
525
- */
526
- anchor: AnchorFeaturePopulated;
527
- /**
528
- * [IMDF] Level that kiosk is on
529
- */
530
- level: LevelFeaturePopulated;
531
- /**
532
- * [venue.in.th] Venue that kiosk is in
533
- */
534
- venue: VenueFeaturePopulated;
535
- /**
536
- * [Derived] The unit this kiosk is on, usually a walkway.
537
- * This is added during feature enrichment and not part of the original IMDF dataset.
538
- */
539
- unit: UnitFeaturePopulated;
540
- /**
541
- * [Derived] The section this kiosk is in
542
- * This is added during feature enrichment and not part of the original IMDF dataset.
543
- */
544
- section?: SectionFeaturePopulated;
545
- };
546
- };
547
- type LevelFeaturePopulated = LevelFeature & {
548
- properties: LevelFeature["properties"] & {
549
- /**
550
- * [venue.in.th] Venue that level is in
551
- */
552
- venue: VenueFeaturePopulated;
553
- };
554
- };
555
- type OccupantFeaturePopulated = OccupantFeature & {
556
- properties: OccupantFeature["properties"] & {
557
- /**
558
- * [IMDF] Occupant's position
559
- */
560
- anchor: AnchorFeaturePopulated;
561
- ordinal: number;
562
- /**
563
- * [venue.in.th] Occupant's category
564
- */
565
- local_categories: TaxonomyFeaturePopulated[];
566
- unit?: UnitFeaturePopulated;
567
- kiosk?: KioskFeaturePopulated;
568
- /**
569
- * [venue.in.th] Bind correlation between units on an occupant,
570
- * which will be used for highlighting in the floor plan and
571
- * displaying location details later.
572
- */
573
- units: UnitFeaturePopulated[];
574
- /**
575
- * [venue.in.th] Bind correlation between kiosks on an occupant,
576
- * which will be used for highlighting in the floor plan and
577
- * displaying location details later.
578
- */
579
- kiosks: KioskFeaturePopulated[];
580
- /**
581
- * [venue.in.th] Venue that level is in
582
- */
583
- venue: VenueFeaturePopulated;
584
- /**
585
- * [venue.in.th] Occupant's promotions
586
- */
587
- promotions: PromotionFeature[];
588
- /**
589
- * [venue.in.th] Occupant's privileges
590
- */
591
- privileges: PrivilegeFeature[];
592
- };
593
- };
594
- type OpeningFeaturePopulated = OpeningFeature & {
595
- properties: OpeningFeature["properties"] & {
596
- /**
597
- * [IMDF] Level that section is on
598
- */
599
- level: LevelFeaturePopulated;
600
- /**
601
- * [venue.in.th] Venue that level is in
602
- */
603
- venue: VenueFeaturePopulated;
604
- /**
605
- * [Derived] Level's ordinal that unit is on
606
- */
607
- ordinal: number;
608
- };
609
- };
610
- type SectionFeaturePopulated = SectionFeature & {
611
- properties: SectionFeature["properties"] & {
612
- /**
613
- * [IMDF] Level that section is on
614
- */
615
- level: LevelFeaturePopulated;
616
- /**
617
- * [venue.in.th] Venue that level is in
618
- */
619
- venue: VenueFeaturePopulated;
620
- /**
621
- * [Derived] Level's ordinal that unit is on
622
- */
623
- ordinal: number;
624
- };
625
- };
626
- type UnitFeaturePopulated = UnitFeature & {
627
- properties: UnitFeature["properties"] & {
628
- /**
629
- * [IMDF] Level that unit is on
630
- */
631
- level: LevelFeaturePopulated;
632
- /**
633
- * [venue.in.th] Venue that level is in
634
- */
635
- venue: VenueFeaturePopulated;
636
- /**
637
- * [Derived] Level's ordinal that unit is on
638
- */
639
- ordinal: number;
640
- /**
641
- * [Derived] Secion that unit is in
642
- */
643
- section?: SectionFeaturePopulated;
644
- };
645
- };
646
- type VenueFeaturePopulated = VenueFeature;
647
- type TaxonomyFeaturePopulated = TaxonomyFeature & {
648
- properties: TaxonomyFeature["properties"] & {
649
- venue: VenueFeaturePopulated;
650
- };
651
- };
652
- type FeaturePopulatedResponseMap = {
653
- address: ImdfFeature;
654
- amenity: AmenityFeaturePopulated;
655
- anchor: AnchorFeaturePopulated;
656
- building: ImdfFeature;
657
- detail: DetailFeature;
658
- fixture: FixtureFeaturePopulated;
659
- footprint: ImdfFeature;
660
- geofence: ImdfFeature;
661
- kiosk: KioskFeaturePopulated;
662
- level: LevelFeaturePopulated;
663
- occupant: OccupantFeaturePopulated;
664
- opening: OpeningFeaturePopulated;
665
- relationship: RelationshipFeature;
666
- section: SectionFeaturePopulated;
667
- unit: UnitFeaturePopulated;
668
- venue: VenueFeaturePopulated;
669
- taxonomy: TaxonomyFeaturePopulated;
670
- privilege: PrivilegeFeature;
671
- event: EventFeature;
672
- promotion: PromotionFeature;
673
- label: LabelFeature;
674
- element: ImdfFeature;
675
- model3d: Model3dFeature;
676
- "sponsored-content": SponsoredContentFeature;
677
- page: Page;
678
- };
679
- type PopulatableFeatureType = keyof FeaturePopulatedResponseMap;
680
-
681
- type Value = string | boolean | number;
682
- type EqFilter = Value;
683
- type InFilter = {
684
- $in: (Value)[];
685
- };
686
- type Filter = EqFilter | InFilter;
687
- type Filters = Record<string, Filter>;
688
-
689
- interface VenueClientOptions {
690
- mode?: "delivery" | "preview";
691
- projectId: string;
692
- apiKey?: string;
693
- previewToken?: string;
694
- baseUrl?: string;
695
- queryClient?: QueryClient;
696
- }
697
- interface FindParams {
698
- populate?: boolean;
699
- }
700
- interface FilterParams {
701
- populate?: boolean;
702
- filters?: Filters;
703
- }
704
- interface PopulatedParams {
705
- populate: true;
706
- }
707
- interface FeatureQueryOptions {
708
- refetchInterval?: number;
709
- staleTime?: number;
710
- cacheTime?: number;
711
- enabled?: boolean;
712
- retry?: boolean | number;
713
- }
714
- type InternalFindById = <T extends FeatureType>(id: Id) => Promise<FeatureResponseMap[T]>;
715
- type InternalFilterByType = <T extends FeatureType>(featureType: T) => Promise<FeatureResponseMap[T][]>;
716
- interface VenueDataClient {
717
- projectId: string;
718
- queryClient: QueryClient;
719
- registerObserver: (featureType: FeatureType, refetchInterval: number) => QueryObserver;
720
- destroyObserver: (featureType: FeatureType) => void;
721
- destroyObservers: () => void;
722
- createFilterByTypeQueryOptions: <T extends FeatureType = FeatureType>(featureType: T, params: FilterParams, options: FeatureQueryOptions) => EnsureQueryDataOptions<FeatureResponseMap[T][] | FeaturePopulatedResponseMap[T][]>;
723
- createFindByIdQueryOptions: <T extends FeatureType = FeatureType>(featureType: T, id: string, params: FindParams, options: FeatureQueryOptions) => EnsureQueryDataOptions<FeatureResponseMap[T] | FeaturePopulatedResponseMap[T]>;
724
- filterByType: <T extends FeatureType>(featureType: T, params?: FilterParams) => Promise<FeatureResponseMap[T][] | FeaturePopulatedResponseMap[T][]>;
725
- findById: <T extends FeatureType>(featureType: T, id: string, params?: FindParams) => Promise<FeatureResponseMap[T] | FeaturePopulatedResponseMap[T]>;
726
- }
727
-
728
- declare const DEFAULT_BASE_URL = "https://service.venue.in.th/api";
729
- declare const IMDF_FEATURE_TYPES: FeatureType[];
730
- declare const NONIMDF_FEATURE_TYPES: FeatureType[];
731
- declare const GEOJSON_FEATURE_TYPES: FeatureType[];
732
- declare const ALL_FEATURE_TYPES: FeatureType[];
733
- declare const defaultFeatureQueryOptionsMap: Record<FeatureType, FeatureQueryOptions>;
734
-
735
- declare function fetchDeliveryApi<T extends FeatureType = FeatureType>(projectId: string, apiKey: string, featureType: FeatureType, baseUrl?: string): Promise<FeatureResponseMap[T][]>;
736
- declare function fetchPreviewApi<T extends FeatureType = FeatureType>(projectId: string, previewToken: string, featureType: FeatureType, baseUrl?: string): Promise<FeatureResponseMap[T][]>;
737
- declare const safeFetchFeature: <T extends FeatureType = FeatureType>(featureType: FeatureType, params: {
738
- mode: "delivery" | "preview";
739
- projectId: string;
740
- apiKey: string;
741
- previewToken?: string;
742
- baseUrl: string;
743
- }) => Promise<FeatureResponseMap[T][]>;
744
-
745
- /**
746
- * Checks if a point is a valid coordinate pair.
747
- *
748
- * @param point - The point to be checked.
749
- * @return True if the point is a valid coordinate pair, false otherwise.
750
- */
751
- declare const isValidCoordinate: (point: Position) => boolean;
752
- /**
753
- * Checks if an input represents a valid polygon, which may include holes.
754
- * The input can be a single array of coordinates for simple polygons, or
755
- * an array of arrays of coordinates for polygons with holes.
756
- *
757
- * @param polygon - The input representing a polygon.
758
- * @return True if the polygon is valid, false otherwise.
759
- */
760
- declare const isValidPolygonCoordinates: (polygon: Position[] | Position[][]) => boolean;
761
- /**
762
- * Checks if an array of polygons forms a valid MultiPolygon.
763
- *
764
- * @param multipolygon - The array of polygons.
765
- * @return True if the multipolygon is valid, false otherwise.
766
- */
767
- declare const isValidMultiPolygonCoordinates: (multipolygon: Position[][][]) => boolean;
768
- /**
769
- * Checks if a set of points forms a valid LineString.
770
- * A valid LineString must have at least two points, each point must be a valid coordinate,
771
- * and it should not form a closed loop.
772
- *
773
- * @param lineString - The array of points representing a LineString.
774
- * @return True if the LineString is valid, false otherwise.
775
- */
776
- declare const isValidLineStringCoordinates: (lineString: Position[]) => boolean;
777
- declare const isValidMultiPolygon: (geometry: Exclude<Geometry, GeometryCollection>) => boolean;
778
- declare const isValidPolygon: (geometry: Exclude<Geometry, GeometryCollection>) => boolean;
779
- declare const isValidLineString: (geometry: Exclude<Geometry, GeometryCollection>) => boolean;
780
- declare const isValidPoint: (geometry: Exclude<Geometry, GeometryCollection>) => boolean;
781
-
782
- declare function matchFilter(value: Value | Value[], filter: Filter): boolean;
783
- declare function matchFilters<T extends Record<string, any>>(item: T, filters: Filters): boolean;
784
-
785
- declare const getOccupantMainLocation: (occupant: OccupantFeaturePopulated) => UnitFeaturePopulated | KioskFeaturePopulated;
786
- declare const getOccupantCorrelatedLocations: (occupant: OccupantFeaturePopulated) => Array<UnitFeaturePopulated | KioskFeaturePopulated>;
787
- type OccupantMarkerPlacementType = 'ONCE_PER_LEVEL' | 'ALL_LOCATIONS';
788
- declare const getOccupantMarkerLocations: (occupant: OccupantFeaturePopulated, options?: {
789
- type: OccupantMarkerPlacementType;
790
- }) => Array<UnitFeaturePopulated | KioskFeaturePopulated>;
791
-
792
- type occupantHelper_OccupantMarkerPlacementType = OccupantMarkerPlacementType;
793
- declare const occupantHelper_getOccupantCorrelatedLocations: typeof getOccupantCorrelatedLocations;
794
- declare const occupantHelper_getOccupantMainLocation: typeof getOccupantMainLocation;
795
- declare const occupantHelper_getOccupantMarkerLocations: typeof getOccupantMarkerLocations;
796
- declare namespace occupantHelper {
797
- export { type occupantHelper_OccupantMarkerPlacementType as OccupantMarkerPlacementType, occupantHelper_getOccupantCorrelatedLocations as getOccupantCorrelatedLocations, occupantHelper_getOccupantMainLocation as getOccupantMainLocation, occupantHelper_getOccupantMarkerLocations as getOccupantMarkerLocations };
798
- }
799
-
800
- declare const getDataClient: (options: VenueClientOptions) => VenueDataClient;
18
+ import 'fuse.js';
801
19
 
802
20
  type TextMarkerOptions = BaseObjectOptionType & {
803
21
  text?: string;
@@ -921,6 +139,7 @@ declare class RendererManager extends EventTarget {
921
139
  _addMarkersToManager: (id: any, markers: any, ordinal: any) => void;
922
140
  createMarker(type: 'text' | 'image', coordinate: Position, ordinal: number, textOrPath: string, options: AnyMarkerOptions): void;
923
141
  clearMarkers(): void;
142
+ drawNavigation(route: Route): void;
924
143
  }
925
144
 
926
145
  interface CameraManagerOptions {
@@ -1201,7 +420,7 @@ declare function styledFeatureGenerator(mapTheme: any): {
1201
420
  createFixture: (feature: any) => any;
1202
421
  createLineStringFromGeometries: (geometries: any) => LineString$1;
1203
422
  create3DStepPath: (feature: any, threeLayer: any, option?: {}) => NavigationPath;
1204
- createDecoration: (decoration: any, options: any) => LineString$1 | Polygon$1 | MultiPolygon$1 | MultiLineString;
423
+ createDecoration: (decoration: any, options: any) => LineString$1 | Polygon | MultiPolygon | MultiLineString;
1205
424
  create3DBillboard: (billboard: any, threeLayer: any) => Billboard;
1206
425
  create3DAmenityMarker: (feature: any, threeLayer: any, config: any) => SpriteMarker;
1207
426
  create3DOccupantAmenityMarker: (feature: any, threeLayer: any, config: any) => SpriteMarker;
@@ -1230,7 +449,7 @@ type GetSuitablyValueBetweenBearings = (newBearing: number, currentBearing: numb
1230
449
  declare const getBearingBetweenPoints: GetBearingBetweenPoints;
1231
450
  declare const getSuitablyValueBetweenBearings: GetSuitablyValueBetweenBearings;
1232
451
 
1233
- declare const getCenterFromGeometry: (geometry?: Polygon | MultiPolygon | Point | LineString) => number[] | null;
452
+ declare const getCenterFromGeometry: (geometry?: Polygon$1 | MultiPolygon$1 | Point | LineString) => number[] | null;
1234
453
  declare const createPolygonFromLineString: (geometry: any) => geojson.Position[][];
1235
454
 
1236
455
  declare const BASE_LAYER_NAME = "base";
@@ -1294,4 +513,4 @@ declare const VENUE_EVENTS: {
1294
513
  VENUE_MOVEINTOVIEW: string;
1295
514
  };
1296
515
 
1297
- 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 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 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 };