venue-js 1.4.0-next.8 → 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.ts CHANGED
@@ -1,855 +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.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-X4qpYAhF.js';
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 OccupantGeometry = null;
161
- type OccupantProperties = EntityTimestamps & {
162
- anchor_id: Id;
163
- category: string | null;
164
- category_group: string | null;
165
- cover_image: Media | null;
166
- description: TransalatableString;
167
- featured_image: Media | null;
168
- gallery: Media[] | null;
169
- group_ids: Id[];
170
- hours: string;
171
- is_featured: boolean;
172
- is_landmark: boolean;
173
- is_maintenance: boolean;
174
- keywords: string[];
175
- kiosk_id: Id | null;
176
- local_category_ids: Id[];
177
- logo: Media | null;
178
- maintenance_end_date: string | null;
179
- maintenance_start_date: string | null;
180
- name: TransalatableString;
181
- phone: string | null;
182
- privilege_ids: Id[];
183
- promotion_ids: Id[];
184
- render_priority: number;
185
- render_type: string;
186
- room_no: string | null;
187
- short_name: string | null;
188
- start_date: string;
189
- style: SymbolProperties | null;
190
- temp_anchor_id: Id | null;
191
- temp_kiosk_id: Id | null;
192
- temp_unit_id: Id | null;
193
- unit_id: Id | null;
194
- venue_id: Id;
195
- kiosk_ids: Id[];
196
- unit_ids: Id[];
197
- website_link: string | null;
198
- show_name_on_all_units: boolean;
199
- };
200
- type OccupantFeature = ImdfFeature<OccupantGeometry, OccupantProperties> & {
201
- feature_type: "occupant";
202
- };
203
- type OpeningCategories = "automobile" | "bicycle" | "emergencyexit" | "pedestrian" | "pedestrian.principal" | "pedestrian.transit" | "service" | string;
204
- type OpeningGeometry = LineString;
205
- type OpeningProperties = EntityTimestamps & {
206
- alt_name: string;
207
- category: OpeningCategories;
208
- door: {
209
- type: string;
210
- };
211
- level_id: Id;
212
- name: TransalatableString;
213
- style: SymbolProperties;
214
- venue_id: Id;
215
- };
216
- type OpeningFeature = ImdfFeature<OpeningGeometry, OpeningProperties> & {
217
- feature_type: "opening";
218
- };
219
- type RelationshipCategories = "elevator" | "escalator" | "movingwalkway" | "ramp" | "stairs" | "stairs.emergencyexit" | "traversal" | "traversal.path" | string;
220
- type RelationshipDirectionTypes = "directed" | "undirected";
221
- type RelationshipGeometry = Geometry | null;
222
- type RelationshipProperties<T extends RelationshipCategories = RelationshipCategories> = EntityTimestamps & {
223
- category: RelationshipCategories;
224
- destination: {
225
- id: Id;
226
- feature_type: FeatureType;
227
- };
228
- direction: RelationshipDirectionTypes;
229
- hours: string | null;
230
- intermediary: {
231
- id: Id;
232
- feature_type: FeatureType;
233
- }[];
234
- locale: string;
235
- name: TransalatableString;
236
- origin: {
237
- id: Id;
238
- feature_type: FeatureType;
239
- };
240
- };
241
- type RelationshipFeature = ImdfFeature<RelationshipGeometry, RelationshipProperties>;
242
- type SectionGeometry = Polygon | MultiPolygon;
243
- type SectionProperties = EntityTimestamps & {
244
- venue_id: Id;
245
- level_id: Id;
246
- correlation_id: Id | null;
247
- category: string;
248
- ordinal: number;
249
- imdf_category: string;
250
- local_category_ids: string[];
251
- feature_image: Media | null;
252
- cover_image: Media | null;
253
- gallery: Media[] | null;
254
- is_featured: boolean;
255
- hours: string | null;
256
- [k: string]: any;
257
- };
258
- type SectionFeature = ImdfFeature<SectionGeometry, SectionProperties> & {
259
- feature_type: "section";
260
- };
261
- type UnitGeometry = Polygon | MultiPolygon;
262
- type UnitProperties = EntityTimestamps & {
263
- alt_name: string | null;
264
- category: string;
265
- is_landmark: boolean;
266
- level_id: Id;
267
- locale: string;
268
- model3d: Model3d[];
269
- name: TransalatableString;
270
- style: SymbolProperties;
271
- venue_id: Id;
272
- };
273
- type UnitFeature = ImdfFeature<UnitGeometry, UnitProperties> & {
274
- feature_type: "unit";
275
- };
276
- type VenueGeometry = Polygon | MultiPolygon;
277
- type VenueProperties = EntityTimestamps & {
278
- address: string;
279
- address_id: Id | null;
280
- country: string;
281
- display_point: Point;
282
- hours: string;
283
- imdf_category: string;
284
- locale: string;
285
- locality: string;
286
- logo: Media | null;
287
- logo_simple: Media | null;
288
- model3d: Model3d[];
289
- name: TransalatableString;
290
- phone: string;
291
- postal_code: string;
292
- province: string;
293
- reference: string;
294
- style: SymbolProperties | null;
295
- supported_locales: string[];
296
- theme_color: string;
297
- zoom: string | null;
298
- };
299
- type VenueFeature = ImdfFeature<VenueGeometry, VenueProperties> & {
300
- feature_type: "venue";
301
- };
302
- /**
303
- * Non-IMDF
304
- *********************** */
305
- type TaxonomyGeometry = null;
306
- type TaxonomyProperties = EntityTimestamps & {
307
- description: string;
308
- icon_image: string;
309
- icon_path: string;
310
- is_featured: boolean;
311
- local_id: string;
312
- locale: string;
313
- name: TransalatableString;
314
- order: number;
315
- parent_id: Id | null;
316
- reference: string;
317
- taxonomy: string;
318
- venue_id: Id | null;
319
- };
320
- type TaxonomyFeature = ImdfFeature<TaxonomyGeometry, TaxonomyProperties>;
321
- type EventGeometry = Polygon;
322
- type EventProperties = {
323
- name: string;
324
- ordinal: number;
325
- venue_id: Id;
326
- angle: number;
327
- fontSize: number;
328
- };
329
- type EventFeature = ImdfFeature<EventGeometry, EventProperties>;
330
- type PromotionProperties = {
331
- name: TransalatableString;
332
- category: string;
333
- cover_image: Media;
334
- daily_end_time: string;
335
- daily_start_time: string;
336
- description: TransalatableString;
337
- end_date: string;
338
- feature_id: string | null;
339
- gallery: Media[];
340
- is_featured: boolean;
341
- local_category_ids: string[];
342
- locale: string;
343
- publishedAt: string;
344
- start_date: string;
345
- updatedAt: string;
346
- venue_id: Id;
347
- website_link: string | null;
348
- };
349
- type PromotionFeature = ImdfFeature<null, PromotionProperties>;
350
- type PrivilegeGeometry = null;
351
- type PrivilegeProperties = {
352
- createdAt: string;
353
- description: TransalatableString;
354
- locale: string;
355
- occupant_id: Id;
356
- publishedAt: string;
357
- updatedAt: string;
358
- venue_id: Id;
359
- };
360
- type PrivilegeFeature = ImdfFeature<PrivilegeGeometry, PrivilegeProperties>;
361
- type LabelGeometry = Polygon;
362
- type LabelProperties = {
363
- name: string;
364
- ordinal: number;
365
- venue_id: Id;
366
- angle: number;
367
- fontSize: number;
368
- };
369
- type LabelFeature = ImdfFeature<LabelGeometry, LabelProperties>;
370
- type ElementGeometry = null;
371
- type ElementProperties = EntityTimestamps & {
372
- geometries: Array<{
373
- type: string;
374
- id: Id;
375
- geometry: Exclude<Geometry, GeometryCollection>;
376
- options: Record<string, unknown>;
377
- properties: {
378
- additionalField: string;
379
- name: string | null;
380
- image: Media | null;
381
- ordinal: number;
382
- };
383
- }>;
384
- locale: string;
385
- name: TransalatableString;
386
- };
387
- type ElementFeature = ImdfFeature<ElementGeometry, ElementProperties>;
388
- /**
389
- * Sponsored Content
390
- */
391
- type SponsoredContentLegacyType = "HOMEPAGE_SPOTLIGHT" | "SCREENSAVER" | "SUGGESTED_BRAND" | "SEARCH_RESULT" | "POPUP_BANNER" | "FOOTER_BANNER" | "RECOMMENDED_EVENT" | "RECOMMENDED_PROMOTION" | "RECOMMENDED_DIRECTORY";
392
- type SponsoredContentPlacementType = "HOMEPAGE_SPOTLIGHT" | "SEARCH_SUGGESTION" | "SEARCH_RESULT" | "LIST_TOPITEM" | "POPUP_BANNER" | "FOOTER_BANNER";
393
- type SponsoredContentAttributes = {
394
- venue_id: string;
395
- project_id: string;
396
- name: {
397
- en: string;
398
- };
399
- type: SponsoredContentLegacyType;
400
- placement_type: SponsoredContentPlacementType;
401
- start_date: string;
402
- end_date: string;
403
- daily_start_time: string;
404
- daily_end_time: string;
405
- order: number;
406
- url: string | null;
407
- feature_id: string | null;
408
- createdAt: string;
409
- updatedAt: string;
410
- publishedAt: string;
411
- media?: Media;
412
- locale: string;
413
- };
414
- type SponsoredContentStrapiV4ApiResponse = {
415
- id: string;
416
- attributes: SponsoredContentAttributes;
417
- };
418
- /** Parsed for internal use */
419
- type SponsoredContentFeature = SponsoredContentAttributes & {
420
- id: string;
421
- };
422
- type Page = {
423
- id: Id;
424
- attributes: Record<string, unknown>;
425
- };
426
- type Model3dGeometry = null;
427
- type Model3dProperties = {
428
- name: TransalatableString;
429
- model: string;
430
- level_id: Id;
431
- project_id: Id;
432
- rotation_x: number;
433
- rotation_y: number;
434
- rotation_z: number;
435
- center: number[];
436
- scale: number;
437
- bottom_height: number;
438
- translation_x: number;
439
- translation_y: number;
440
- translation_z: number;
441
- createdAt: string;
442
- updatedAt: string;
443
- publishedAt: string;
444
- locale: string;
445
- };
446
- type Model3dFeature = ImdfFeature<Model3dGeometry, Model3dProperties>;
447
- type FeatureResponseMap = {
448
- address: ImdfFeature;
449
- amenity: AmenityFeature;
450
- anchor: AnchorFeature;
451
- building: ImdfFeature;
452
- detail: DetailFeature;
453
- fixture: FixtureFeature;
454
- footprint: ImdfFeature;
455
- geofence: ImdfFeature;
456
- kiosk: KioskFeature;
457
- level: LevelFeature;
458
- occupant: OccupantFeature;
459
- opening: OpeningFeature;
460
- relationship: RelationshipFeature;
461
- section: SectionFeature;
462
- unit: UnitFeature;
463
- venue: VenueFeature;
464
- taxonomy: TaxonomyFeature;
465
- privilege: PrivilegeFeature;
466
- event: EventFeature;
467
- promotion: PromotionFeature;
468
- label: LabelFeature;
469
- element: ElementFeature;
470
- model3d: Model3dFeature;
471
- "sponsored-content": SponsoredContentFeature;
472
- page: Page;
473
- };
474
- type FeatureType = keyof FeatureResponseMap;
475
- type PolygonalFeature = UnitFeature | KioskFeature | LevelFeature | SectionFeature;
476
-
477
- type AmenityFeaturePopulated = AmenityFeature & {
478
- properties: AmenityFeature["properties"] & {
479
- /**
480
- * [IMDF] Unit(s) the Amenity is associated with
481
- */
482
- units: UnitFeaturePopulated[];
483
- /**
484
- * [venue.in.th] Venue that amenity is in
485
- */
486
- venue: VenueFeaturePopulated;
487
- /**
488
- * [IMDF] Level that amenity is on
489
- */
490
- level: LevelFeaturePopulated;
491
- /**
492
- * [Derived] From units[0] --> level's ordinal
493
- * This is added during feature enrichment and not part of the original IMDF dataset.
494
- */
495
- ordinal: number;
496
- /**
497
- * [Derived] From units[0] --> level's name
498
- * This is added during feature enrichment and not part of the original IMDF dataset.
499
- */
500
- level_name: string;
501
- /**
502
- * [Derived] The section this amenity is on.
503
- * This is added during feature enrichment and not part of the original IMDF dataset.
504
- */
505
- section?: SectionFeaturePopulated;
506
- /**
507
- * [Experimental | Derived] The kiosk this amenity is on.
508
- * This is added during feature enrichment and not part of the original IMDF dataset.
509
- */
510
- _experimental_kiosk?: KioskFeaturePopulated;
511
- };
512
- };
513
- type AnchorFeaturePopulated = AnchorFeature & {
514
- properties: AnchorFeature["properties"] & {
515
- /**
516
- * [IMDF] The unit this anchor is on.
517
- */
518
- unit: UnitFeaturePopulated;
519
- /**
520
- * [IMDF] Level that kiosk is on
521
- */
522
- level: LevelFeaturePopulated;
523
- /**
524
- * [venue.in.th] Venue that anchor is in
525
- */
526
- venue: VenueFeaturePopulated;
527
- /**
528
- * [Derived] The section this anchor is on.
529
- * This is added during feature enrichment and not part of the original IMDF dataset.
530
- */
531
- section?: SectionFeaturePopulated;
532
- };
533
- };
534
- type FixtureFeaturePopulated = FixtureFeature & {
535
- properties: FixtureFeature["properties"] & {
536
- /**
537
- * [IMDF] The unit this anchor is on.
538
- */
539
- anchor: AnchorFeaturePopulated;
540
- /**
541
- * [IMDF] Level that kiosk is on
542
- */
543
- level: LevelFeaturePopulated;
544
- /**
545
- * [IMDF] Venue that kiosk is in
546
- */
547
- venue?: VenueFeaturePopulated;
548
- /**
549
- * [Derived] Level's ordinal that fixture is on
550
- */
551
- ordinal: number;
552
- };
553
- };
554
- type KioskFeaturePopulated = KioskFeature & {
555
- properties: KioskFeature["properties"] & {
556
- /**
557
- * [IMDF] An Occupant MUST be positioned (via Anchor) within a Kiosk that models a space that is leased to a business entity
558
- */
559
- anchor: AnchorFeaturePopulated;
560
- /**
561
- * [IMDF] Level that kiosk is on
562
- */
563
- level: LevelFeaturePopulated;
564
- /**
565
- * [venue.in.th] Venue that kiosk is in
566
- */
567
- venue: VenueFeaturePopulated;
568
- /**
569
- * [Derived] The unit this kiosk is on, usually a walkway.
570
- * This is added during feature enrichment and not part of the original IMDF dataset.
571
- */
572
- unit: UnitFeaturePopulated;
573
- /**
574
- * [Derived] The section this kiosk is in
575
- * This is added during feature enrichment and not part of the original IMDF dataset.
576
- */
577
- section?: SectionFeaturePopulated;
578
- /**
579
- * [Derived] Level's ordinal that fixture is on
580
- */
581
- ordinal: number;
582
- };
583
- };
584
- type LevelFeaturePopulated = LevelFeature & {
585
- properties: LevelFeature["properties"] & {
586
- /**
587
- * [venue.in.th] Venue that level is in
588
- */
589
- venue: VenueFeaturePopulated;
590
- };
591
- };
592
- type OccupantFeaturePopulated = OccupantFeature & {
593
- properties: OccupantFeature["properties"] & {
594
- /**
595
- * [IMDF] Occupant's position
596
- */
597
- anchor: AnchorFeaturePopulated;
598
- /**
599
- * [Derived] Level's ordinal that occupant is on
600
- */
601
- ordinal: number;
602
- /**
603
- * [venue.in.th] Occupant's category
604
- */
605
- local_categories: TaxonomyFeaturePopulated[];
606
- unit?: UnitFeaturePopulated;
607
- kiosk?: KioskFeaturePopulated;
608
- /**
609
- * [venue.in.th] Bind correlation between units on an occupant,
610
- * which will be used for highlighting in the floor plan and
611
- * displaying location details later.
612
- */
613
- units: UnitFeaturePopulated[];
614
- /**
615
- * [venue.in.th] Bind correlation between kiosks on an occupant,
616
- * which will be used for highlighting in the floor plan and
617
- * displaying location details later.
618
- */
619
- kiosks: KioskFeaturePopulated[];
620
- /**
621
- * [venue.in.th] Venue that level is in
622
- */
623
- venue: VenueFeaturePopulated;
624
- /**
625
- * [venue.in.th] Occupant's promotions
626
- */
627
- promotions: PromotionFeature[];
628
- /**
629
- * [venue.in.th] Occupant's privileges
630
- */
631
- privileges: PrivilegeFeature[];
632
- };
633
- };
634
- type OpeningFeaturePopulated = OpeningFeature & {
635
- properties: OpeningFeature["properties"] & {
636
- /**
637
- * [IMDF] Level that section is on
638
- */
639
- level: LevelFeaturePopulated;
640
- /**
641
- * [venue.in.th] Venue that level is in
642
- */
643
- venue: VenueFeaturePopulated;
644
- /**
645
- * [Derived] Level's ordinal that unit is on
646
- */
647
- ordinal: number;
648
- };
649
- };
650
- type SectionFeaturePopulated = SectionFeature & {
651
- properties: SectionFeature["properties"] & {
652
- /**
653
- * [IMDF] Level that section is on
654
- */
655
- level: LevelFeaturePopulated;
656
- /**
657
- * [venue.in.th] Venue that level is in
658
- */
659
- venue: VenueFeaturePopulated;
660
- /**
661
- * [Derived] Level's ordinal that unit is on
662
- */
663
- ordinal: number;
664
- };
665
- };
666
- type UnitFeaturePopulated = UnitFeature & {
667
- properties: UnitFeature["properties"] & {
668
- /**
669
- * [IMDF] Level that unit is on
670
- */
671
- level: LevelFeaturePopulated;
672
- /**
673
- * [venue.in.th] Venue that level is in
674
- */
675
- venue: VenueFeaturePopulated;
676
- /**
677
- * [Derived] Level's ordinal that unit is on
678
- */
679
- ordinal: number;
680
- /**
681
- * [Derived] Secion that unit is in
682
- */
683
- section?: SectionFeaturePopulated;
684
- };
685
- };
686
- type VenueFeaturePopulated = VenueFeature;
687
- type TaxonomyFeaturePopulated = TaxonomyFeature & {
688
- properties: TaxonomyFeature["properties"] & {
689
- venue: VenueFeaturePopulated;
690
- };
691
- };
692
- type Model3dPopulated = Model3dFeature & {
693
- properties: Model3dFeature["properties"] & {
694
- /**
695
- * [IMDF] Level that model 3D is on
696
- */
697
- level: LevelFeaturePopulated;
698
- };
699
- };
700
- type FeaturePopulatedResponseMap = {
701
- address: ImdfFeature;
702
- amenity: AmenityFeaturePopulated;
703
- anchor: AnchorFeaturePopulated;
704
- building: ImdfFeature;
705
- detail: DetailFeature;
706
- fixture: FixtureFeaturePopulated;
707
- footprint: ImdfFeature;
708
- geofence: ImdfFeature;
709
- kiosk: KioskFeaturePopulated;
710
- level: LevelFeaturePopulated;
711
- occupant: OccupantFeaturePopulated;
712
- opening: OpeningFeaturePopulated;
713
- relationship: RelationshipFeature;
714
- section: SectionFeaturePopulated;
715
- unit: UnitFeaturePopulated;
716
- venue: VenueFeaturePopulated;
717
- taxonomy: TaxonomyFeaturePopulated;
718
- privilege: PrivilegeFeature;
719
- event: EventFeature;
720
- promotion: PromotionFeature;
721
- label: LabelFeature;
722
- element: ImdfFeature;
723
- model3d: Model3dPopulated;
724
- "sponsored-content": SponsoredContentFeature;
725
- page: Page;
726
- };
727
- type PopulatableFeatureType = keyof FeaturePopulatedResponseMap;
728
-
729
- type Value = string | boolean | number;
730
- type EqFilter = Value;
731
- type InFilter = {
732
- $in: (Value)[];
733
- };
734
- type Filter = EqFilter | InFilter;
735
- type Filters = Record<string, Filter>;
736
-
737
- interface VenueClientOptions {
738
- mode?: "delivery" | "preview";
739
- projectId: string;
740
- apiKey?: string;
741
- previewToken?: string;
742
- baseUrl?: string;
743
- queryClient?: QueryClient;
744
- }
745
- interface FindParams {
746
- populate?: boolean;
747
- }
748
- interface FilterParams {
749
- populate?: boolean;
750
- filters?: Filters;
751
- }
752
- interface PopulatedParams {
753
- populate: true;
754
- }
755
- interface FeatureQueryOptions {
756
- refetchInterval?: number;
757
- staleTime?: number;
758
- cacheTime?: number;
759
- enabled?: boolean;
760
- retry?: boolean | number;
761
- }
762
- type InternalFindById = <T extends FeatureType>(id: Id) => Promise<FeatureResponseMap[T]>;
763
- type InternalFilterByType = <T extends FeatureType>(featureType: T) => Promise<FeatureResponseMap[T][]>;
764
- type SearchClient = {
765
- search: (txt: string) => FuseResult<ImdfFeature>[];
766
- };
767
- interface VenueDataClient {
768
- projectId: string;
769
- queryClient: QueryClient;
770
- registerObserver: (featureType: FeatureType, refetchInterval: number) => QueryObserver;
771
- destroyObserver: (featureType: FeatureType) => void;
772
- destroyObservers: () => void;
773
- createFilterByTypeQueryOptions: <T extends FeatureType = FeatureType>(featureType: T, params: FilterParams, options: FeatureQueryOptions) => EnsureQueryDataOptions<FeatureResponseMap[T][] | FeaturePopulatedResponseMap[T][]>;
774
- createFindByIdQueryOptions: <T extends FeatureType = FeatureType>(featureType: T, id: string, params: FindParams, options: FeatureQueryOptions) => EnsureQueryDataOptions<FeatureResponseMap[T] | FeaturePopulatedResponseMap[T]>;
775
- filterByType: <T extends FeatureType>(featureType: T, params?: FilterParams) => Promise<FeatureResponseMap[T][] | FeaturePopulatedResponseMap[T][]>;
776
- findById: <T extends FeatureType>(featureType: T, id: string, params?: FindParams) => Promise<FeatureResponseMap[T] | FeaturePopulatedResponseMap[T]>;
777
- search: (txt: string) => Promise<FuseResult<ImdfFeature>[]>;
778
- }
779
-
780
- declare const DEFAULT_BASE_URL = "https://service.venue.in.th/api";
781
- declare const IMDF_FEATURE_TYPES: FeatureType[];
782
- declare const NONIMDF_FEATURE_TYPES: FeatureType[];
783
- declare const GEOJSON_FEATURE_TYPES: FeatureType[];
784
- declare const ALL_FEATURE_TYPES: FeatureType[];
785
- declare const defaultFeatureQueryOptionsMap: Record<FeatureType, FeatureQueryOptions>;
786
-
787
- declare function fetchDeliveryApi<T extends FeatureType = FeatureType>(projectId: string, apiKey: string, featureType: FeatureType, baseUrl?: string): Promise<FeatureResponseMap[T][]>;
788
- declare function fetchPreviewApi<T extends FeatureType = FeatureType>(projectId: string, previewToken: string, featureType: FeatureType, baseUrl?: string): Promise<FeatureResponseMap[T][]>;
789
- declare const safeFetchFeature: <T extends FeatureType = FeatureType>(featureType: FeatureType, params: {
790
- mode: "delivery" | "preview";
791
- projectId: string;
792
- apiKey: string;
793
- previewToken?: string;
794
- baseUrl: string;
795
- }) => Promise<FeatureResponseMap[T][]>;
796
-
797
- /**
798
- * Checks if a point is a valid coordinate pair.
799
- *
800
- * @param point - The point to be checked.
801
- * @return True if the point is a valid coordinate pair, false otherwise.
802
- */
803
- declare const isValidCoordinate: (point: Position) => boolean;
804
- /**
805
- * Checks if an input represents a valid polygon, which may include holes.
806
- * The input can be a single array of coordinates for simple polygons, or
807
- * an array of arrays of coordinates for polygons with holes.
808
- *
809
- * @param polygon - The input representing a polygon.
810
- * @return True if the polygon is valid, false otherwise.
811
- */
812
- declare const isValidPolygonCoordinates: (polygon: Position[] | Position[][]) => boolean;
813
- /**
814
- * Checks if an array of polygons forms a valid MultiPolygon.
815
- *
816
- * @param multipolygon - The array of polygons.
817
- * @return True if the multipolygon is valid, false otherwise.
818
- */
819
- declare const isValidMultiPolygonCoordinates: (multipolygon: Position[][][]) => boolean;
820
- /**
821
- * Checks if a set of points forms a valid LineString.
822
- * A valid LineString must have at least two points, each point must be a valid coordinate,
823
- * and it should not form a closed loop.
824
- *
825
- * @param lineString - The array of points representing a LineString.
826
- * @return True if the LineString is valid, false otherwise.
827
- */
828
- declare const isValidLineStringCoordinates: (lineString: Position[]) => boolean;
829
- declare const isValidMultiPolygon: (geometry: Exclude<Geometry, GeometryCollection>) => boolean;
830
- declare const isValidPolygon: (geometry: Exclude<Geometry, GeometryCollection>) => boolean;
831
- declare const isValidLineString: (geometry: Exclude<Geometry, GeometryCollection>) => boolean;
832
- declare const isValidPoint: (geometry: Exclude<Geometry, GeometryCollection>) => boolean;
833
-
834
- declare function matchFilter(value: Value | Value[], filter: Filter): boolean;
835
- declare function matchFilters<T extends Record<string, any>>(item: T, filters: Filters): boolean;
836
-
837
- declare const getOccupantMainLocation: (occupant: OccupantFeaturePopulated) => UnitFeaturePopulated | KioskFeaturePopulated;
838
- declare const getOccupantCorrelatedLocations: (occupant: OccupantFeaturePopulated) => Array<UnitFeaturePopulated | KioskFeaturePopulated>;
839
- type OccupantMarkerPlacementType = 'ONCE_PER_LEVEL' | 'ALL_LOCATIONS';
840
- declare const getOccupantMarkerLocations: (occupant: OccupantFeaturePopulated, options?: {
841
- type: OccupantMarkerPlacementType;
842
- }) => Array<UnitFeaturePopulated | KioskFeaturePopulated>;
843
-
844
- type occupantHelper_OccupantMarkerPlacementType = OccupantMarkerPlacementType;
845
- declare const occupantHelper_getOccupantCorrelatedLocations: typeof getOccupantCorrelatedLocations;
846
- declare const occupantHelper_getOccupantMainLocation: typeof getOccupantMainLocation;
847
- declare const occupantHelper_getOccupantMarkerLocations: typeof getOccupantMarkerLocations;
848
- declare namespace occupantHelper {
849
- export { type occupantHelper_OccupantMarkerPlacementType as OccupantMarkerPlacementType, occupantHelper_getOccupantCorrelatedLocations as getOccupantCorrelatedLocations, occupantHelper_getOccupantMainLocation as getOccupantMainLocation, occupantHelper_getOccupantMarkerLocations as getOccupantMarkerLocations };
850
- }
851
-
852
- declare const getDataClient: (options: VenueClientOptions) => VenueDataClient;
18
+ import 'fuse.js';
853
19
 
854
20
  type TextMarkerOptions = BaseObjectOptionType & {
855
21
  text?: string;
@@ -973,6 +139,7 @@ declare class RendererManager extends EventTarget {
973
139
  _addMarkersToManager: (id: any, markers: any, ordinal: any) => void;
974
140
  createMarker(type: 'text' | 'image', coordinate: Position, ordinal: number, textOrPath: string, options: AnyMarkerOptions): void;
975
141
  clearMarkers(): void;
142
+ drawNavigation(route: Route): void;
976
143
  }
977
144
 
978
145
  interface CameraManagerOptions {
@@ -1253,7 +420,7 @@ declare function styledFeatureGenerator(mapTheme: any): {
1253
420
  createFixture: (feature: any) => any;
1254
421
  createLineStringFromGeometries: (geometries: any) => LineString$1;
1255
422
  create3DStepPath: (feature: any, threeLayer: any, option?: {}) => NavigationPath;
1256
- createDecoration: (decoration: any, options: any) => LineString$1 | Polygon$1 | MultiPolygon$1 | MultiLineString$1;
423
+ createDecoration: (decoration: any, options: any) => LineString$1 | Polygon | MultiPolygon | MultiLineString;
1257
424
  create3DBillboard: (billboard: any, threeLayer: any) => Billboard;
1258
425
  create3DAmenityMarker: (feature: any, threeLayer: any, config: any) => SpriteMarker;
1259
426
  create3DOccupantAmenityMarker: (feature: any, threeLayer: any, config: any) => SpriteMarker;
@@ -1282,7 +449,7 @@ type GetSuitablyValueBetweenBearings = (newBearing: number, currentBearing: numb
1282
449
  declare const getBearingBetweenPoints: GetBearingBetweenPoints;
1283
450
  declare const getSuitablyValueBetweenBearings: GetSuitablyValueBetweenBearings;
1284
451
 
1285
- declare const getCenterFromGeometry: (geometry?: Polygon | MultiPolygon | Point | LineString) => number[] | null;
452
+ declare const getCenterFromGeometry: (geometry?: Polygon$1 | MultiPolygon$1 | Point | LineString) => number[] | null;
1286
453
  declare const createPolygonFromLineString: (geometry: any) => geojson.Position[][];
1287
454
 
1288
455
  declare const BASE_LAYER_NAME = "base";
@@ -1346,4 +513,4 @@ declare const VENUE_EVENTS: {
1346
513
  VENUE_MOVEINTOVIEW: string;
1347
514
  };
1348
515
 
1349
- 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 };