venue-js 1.4.0-next.3 → 1.4.0-next.5

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,13 +1,13 @@
1
1
  import { QueryClient, QueryObserver, EnsureQueryDataOptions } from '@tanstack/query-core';
2
2
  export { QueryObserver } from '@tanstack/query-core';
3
3
  import * as geojson from 'geojson';
4
- import { Position, Geometry, GeoJsonProperties, Feature, Point, Polygon, MultiPolygon, LineString, GeometryCollection } from 'geojson';
4
+ import { Position, Geometry, GeoJsonProperties, Feature, Point, Polygon, MultiPolygon, LineString, MultiLineString, GeometryCollection } from 'geojson';
5
5
  import * as maptalks_dist_core_Class from 'maptalks/dist/core/Class';
6
6
  import * as maptalks$1 from 'maptalks-gl';
7
7
  import { Map, Coordinate as Coordinate$1 } from 'maptalks-gl';
8
8
  import { BaseObject, ThreeLayer } from 'maptalks.three';
9
9
  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';
10
+ import { Coordinate, Extent, Marker, ui, LineString as LineString$1, Polygon as Polygon$1, MultiPolygon as MultiPolygon$1, MultiLineString as MultiLineString$1 } from 'maptalks';
11
11
  import { BaseObjectOptionType, BarOptionType, ExtrudePolygonOptionType, ExtrudeLineOptionType } from 'maptalks.three/dist/type';
12
12
  import { PolygonOptionsType } from 'maptalks/dist/geometry/Polygon';
13
13
  import { LineStringOptionsType } from 'maptalks/dist/geometry/LineString';
@@ -113,7 +113,7 @@ type DetailProperties = {
113
113
  [k: string]: any;
114
114
  };
115
115
  type DetailFeature = ImdfFeature<DetailGeometry, DetailProperties>;
116
- type FixtureGeometry = Point;
116
+ type FixtureGeometry = Polygon | MultiPolygon | LineString | MultiLineString;
117
117
  type FixtureProperties = EntityTimestamps & {
118
118
  anchor_id: Id | null;
119
119
  category: string;
@@ -126,7 +126,9 @@ type FixtureProperties = EntityTimestamps & {
126
126
  venue_id: Id;
127
127
  [k: string]: any;
128
128
  };
129
- type FixtureFeature = ImdfFeature<FixtureGeometry, FixtureProperties>;
129
+ type FixtureFeature = ImdfFeature<FixtureGeometry, FixtureProperties> & {
130
+ feature_type: "fixture";
131
+ };
130
132
  type KioskGeometry = Polygon | MultiPolygon;
131
133
  type KioskProperties = EntityTimestamps & {
132
134
  alt_name: string;
@@ -139,7 +141,9 @@ type KioskProperties = EntityTimestamps & {
139
141
  style: SymbolProperties;
140
142
  venue_id: Id;
141
143
  };
142
- type KioskFeature = ImdfFeature<KioskGeometry, KioskProperties>;
144
+ type KioskFeature = ImdfFeature<KioskGeometry, KioskProperties> & {
145
+ feature_type: "kiosk";
146
+ };
143
147
  type LevelGeometry = Polygon | MultiPolygon;
144
148
  type LevelProperties = EntityTimestamps & {
145
149
  alt_name: string | null;
@@ -149,7 +153,9 @@ type LevelProperties = EntityTimestamps & {
149
153
  properties: unknown;
150
154
  venue_id: Id;
151
155
  };
152
- type LevelFeature = ImdfFeature<LevelGeometry, LevelProperties>;
156
+ type LevelFeature = ImdfFeature<LevelGeometry, LevelProperties> & {
157
+ feature_type: "level";
158
+ };
153
159
  type OccupantGeometry = null;
154
160
  type OccupantProperties = EntityTimestamps & {
155
161
  anchor_id: Id;
@@ -190,11 +196,14 @@ type OccupantProperties = EntityTimestamps & {
190
196
  website_link: string | null;
191
197
  show_name_on_all_units: boolean;
192
198
  };
193
- type OccupantFeature = ImdfFeature<OccupantGeometry, OccupantProperties>;
199
+ type OccupantFeature = ImdfFeature<OccupantGeometry, OccupantProperties> & {
200
+ feature_type: "occupant";
201
+ };
202
+ type OpeningCategories = "automobile" | "bicycle" | "emergencyexit" | "pedestrian" | "pedestrian.principal" | "pedestrian.transit" | "service" | string;
194
203
  type OpeningGeometry = LineString;
195
204
  type OpeningProperties = EntityTimestamps & {
196
205
  alt_name: string;
197
- category: string;
206
+ category: OpeningCategories;
198
207
  door: {
199
208
  type: string;
200
209
  };
@@ -203,15 +212,19 @@ type OpeningProperties = EntityTimestamps & {
203
212
  style: SymbolProperties;
204
213
  venue_id: Id;
205
214
  };
206
- type OpeningFeature = ImdfFeature<OpeningGeometry, OpeningProperties>;
215
+ type OpeningFeature = ImdfFeature<OpeningGeometry, OpeningProperties> & {
216
+ feature_type: "opening";
217
+ };
218
+ type RelationshipCategories = "elevator" | "escalator" | "movingwalkway" | "ramp" | "stairs" | "stairs.emergencyexit" | "traversal" | "traversal.path" | string;
219
+ type RelationshipDirectionTypes = "directed" | "undirected";
207
220
  type RelationshipGeometry = Geometry | null;
208
- type RelationshipProperties = EntityTimestamps & {
209
- category: string;
221
+ type RelationshipProperties<T extends RelationshipCategories = RelationshipCategories> = EntityTimestamps & {
222
+ category: RelationshipCategories;
210
223
  destination: {
211
224
  id: Id;
212
225
  feature_type: FeatureType;
213
226
  };
214
- direction: string;
227
+ direction: RelationshipDirectionTypes;
215
228
  hours: string | null;
216
229
  intermediary: {
217
230
  id: Id;
@@ -233,9 +246,17 @@ type SectionProperties = EntityTimestamps & {
233
246
  category: string;
234
247
  ordinal: number;
235
248
  imdf_category: string;
249
+ local_category_ids: string[];
250
+ feature_image: Media | null;
251
+ cover_image: Media | null;
252
+ gallery: Media[] | null;
253
+ is_featured: boolean;
254
+ hours: string | null;
236
255
  [k: string]: any;
237
256
  };
238
- type SectionFeature = ImdfFeature<SectionGeometry, SectionProperties>;
257
+ type SectionFeature = ImdfFeature<SectionGeometry, SectionProperties> & {
258
+ feature_type: "section";
259
+ };
239
260
  type UnitGeometry = Polygon | MultiPolygon;
240
261
  type UnitProperties = EntityTimestamps & {
241
262
  alt_name: string | null;
@@ -248,7 +269,9 @@ type UnitProperties = EntityTimestamps & {
248
269
  style: SymbolProperties;
249
270
  venue_id: Id;
250
271
  };
251
- type UnitFeature = ImdfFeature<UnitGeometry, UnitProperties>;
272
+ type UnitFeature = ImdfFeature<UnitGeometry, UnitProperties> & {
273
+ feature_type: "unit";
274
+ };
252
275
  type VenueGeometry = Polygon | MultiPolygon;
253
276
  type VenueProperties = EntityTimestamps & {
254
277
  address: string;
@@ -272,7 +295,9 @@ type VenueProperties = EntityTimestamps & {
272
295
  theme_color: string;
273
296
  zoom: string | null;
274
297
  };
275
- type VenueFeature = ImdfFeature<VenueGeometry, VenueProperties>;
298
+ type VenueFeature = ImdfFeature<VenueGeometry, VenueProperties> & {
299
+ feature_type: "venue";
300
+ };
276
301
  /**
277
302
  * Non-IMDF
278
303
  *********************** */
@@ -521,6 +546,10 @@ type FixtureFeaturePopulated = FixtureFeature & {
521
546
  * [IMDF] Venue that kiosk is in
522
547
  */
523
548
  venue?: VenueFeaturePopulated;
549
+ /**
550
+ * [Derived] Level's ordinal that fixture is on
551
+ */
552
+ ordinal: number;
524
553
  };
525
554
  };
526
555
  type KioskFeaturePopulated = KioskFeature & {
@@ -547,6 +576,10 @@ type KioskFeaturePopulated = KioskFeature & {
547
576
  * This is added during feature enrichment and not part of the original IMDF dataset.
548
577
  */
549
578
  section?: SectionFeaturePopulated;
579
+ /**
580
+ * [Derived] Level's ordinal that fixture is on
581
+ */
582
+ ordinal: number;
550
583
  };
551
584
  };
552
585
  type LevelFeaturePopulated = LevelFeature & {
@@ -563,6 +596,9 @@ type OccupantFeaturePopulated = OccupantFeature & {
563
596
  * [IMDF] Occupant's position
564
597
  */
565
598
  anchor: AnchorFeaturePopulated;
599
+ /**
600
+ * [Derived] Level's ordinal that occupant is on
601
+ */
566
602
  ordinal: number;
567
603
  /**
568
604
  * [venue.in.th] Occupant's category
@@ -1206,7 +1242,7 @@ declare function styledFeatureGenerator(mapTheme: any): {
1206
1242
  createFixture: (feature: any) => any;
1207
1243
  createLineStringFromGeometries: (geometries: any) => LineString$1;
1208
1244
  create3DStepPath: (feature: any, threeLayer: any, option?: {}) => NavigationPath;
1209
- createDecoration: (decoration: any, options: any) => LineString$1 | Polygon$1 | MultiPolygon$1 | MultiLineString;
1245
+ createDecoration: (decoration: any, options: any) => LineString$1 | Polygon$1 | MultiPolygon$1 | MultiLineString$1;
1210
1246
  create3DBillboard: (billboard: any, threeLayer: any) => Billboard;
1211
1247
  create3DAmenityMarker: (feature: any, threeLayer: any, config: any) => SpriteMarker;
1212
1248
  create3DOccupantAmenityMarker: (feature: any, threeLayer: any, config: any) => SpriteMarker;
package/dist/index.d.ts CHANGED
@@ -1,13 +1,13 @@
1
1
  import { QueryClient, QueryObserver, EnsureQueryDataOptions } from '@tanstack/query-core';
2
2
  export { QueryObserver } from '@tanstack/query-core';
3
3
  import * as geojson from 'geojson';
4
- import { Position, Geometry, GeoJsonProperties, Feature, Point, Polygon, MultiPolygon, LineString, GeometryCollection } from 'geojson';
4
+ import { Position, Geometry, GeoJsonProperties, Feature, Point, Polygon, MultiPolygon, LineString, MultiLineString, GeometryCollection } from 'geojson';
5
5
  import * as maptalks_dist_core_Class from 'maptalks/dist/core/Class';
6
6
  import * as maptalks$1 from 'maptalks-gl';
7
7
  import { Map, Coordinate as Coordinate$1 } from 'maptalks-gl';
8
8
  import { BaseObject, ThreeLayer } from 'maptalks.three';
9
9
  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';
10
+ import { Coordinate, Extent, Marker, ui, LineString as LineString$1, Polygon as Polygon$1, MultiPolygon as MultiPolygon$1, MultiLineString as MultiLineString$1 } from 'maptalks';
11
11
  import { BaseObjectOptionType, BarOptionType, ExtrudePolygonOptionType, ExtrudeLineOptionType } from 'maptalks.three/dist/type';
12
12
  import { PolygonOptionsType } from 'maptalks/dist/geometry/Polygon';
13
13
  import { LineStringOptionsType } from 'maptalks/dist/geometry/LineString';
@@ -113,7 +113,7 @@ type DetailProperties = {
113
113
  [k: string]: any;
114
114
  };
115
115
  type DetailFeature = ImdfFeature<DetailGeometry, DetailProperties>;
116
- type FixtureGeometry = Point;
116
+ type FixtureGeometry = Polygon | MultiPolygon | LineString | MultiLineString;
117
117
  type FixtureProperties = EntityTimestamps & {
118
118
  anchor_id: Id | null;
119
119
  category: string;
@@ -126,7 +126,9 @@ type FixtureProperties = EntityTimestamps & {
126
126
  venue_id: Id;
127
127
  [k: string]: any;
128
128
  };
129
- type FixtureFeature = ImdfFeature<FixtureGeometry, FixtureProperties>;
129
+ type FixtureFeature = ImdfFeature<FixtureGeometry, FixtureProperties> & {
130
+ feature_type: "fixture";
131
+ };
130
132
  type KioskGeometry = Polygon | MultiPolygon;
131
133
  type KioskProperties = EntityTimestamps & {
132
134
  alt_name: string;
@@ -139,7 +141,9 @@ type KioskProperties = EntityTimestamps & {
139
141
  style: SymbolProperties;
140
142
  venue_id: Id;
141
143
  };
142
- type KioskFeature = ImdfFeature<KioskGeometry, KioskProperties>;
144
+ type KioskFeature = ImdfFeature<KioskGeometry, KioskProperties> & {
145
+ feature_type: "kiosk";
146
+ };
143
147
  type LevelGeometry = Polygon | MultiPolygon;
144
148
  type LevelProperties = EntityTimestamps & {
145
149
  alt_name: string | null;
@@ -149,7 +153,9 @@ type LevelProperties = EntityTimestamps & {
149
153
  properties: unknown;
150
154
  venue_id: Id;
151
155
  };
152
- type LevelFeature = ImdfFeature<LevelGeometry, LevelProperties>;
156
+ type LevelFeature = ImdfFeature<LevelGeometry, LevelProperties> & {
157
+ feature_type: "level";
158
+ };
153
159
  type OccupantGeometry = null;
154
160
  type OccupantProperties = EntityTimestamps & {
155
161
  anchor_id: Id;
@@ -190,11 +196,14 @@ type OccupantProperties = EntityTimestamps & {
190
196
  website_link: string | null;
191
197
  show_name_on_all_units: boolean;
192
198
  };
193
- type OccupantFeature = ImdfFeature<OccupantGeometry, OccupantProperties>;
199
+ type OccupantFeature = ImdfFeature<OccupantGeometry, OccupantProperties> & {
200
+ feature_type: "occupant";
201
+ };
202
+ type OpeningCategories = "automobile" | "bicycle" | "emergencyexit" | "pedestrian" | "pedestrian.principal" | "pedestrian.transit" | "service" | string;
194
203
  type OpeningGeometry = LineString;
195
204
  type OpeningProperties = EntityTimestamps & {
196
205
  alt_name: string;
197
- category: string;
206
+ category: OpeningCategories;
198
207
  door: {
199
208
  type: string;
200
209
  };
@@ -203,15 +212,19 @@ type OpeningProperties = EntityTimestamps & {
203
212
  style: SymbolProperties;
204
213
  venue_id: Id;
205
214
  };
206
- type OpeningFeature = ImdfFeature<OpeningGeometry, OpeningProperties>;
215
+ type OpeningFeature = ImdfFeature<OpeningGeometry, OpeningProperties> & {
216
+ feature_type: "opening";
217
+ };
218
+ type RelationshipCategories = "elevator" | "escalator" | "movingwalkway" | "ramp" | "stairs" | "stairs.emergencyexit" | "traversal" | "traversal.path" | string;
219
+ type RelationshipDirectionTypes = "directed" | "undirected";
207
220
  type RelationshipGeometry = Geometry | null;
208
- type RelationshipProperties = EntityTimestamps & {
209
- category: string;
221
+ type RelationshipProperties<T extends RelationshipCategories = RelationshipCategories> = EntityTimestamps & {
222
+ category: RelationshipCategories;
210
223
  destination: {
211
224
  id: Id;
212
225
  feature_type: FeatureType;
213
226
  };
214
- direction: string;
227
+ direction: RelationshipDirectionTypes;
215
228
  hours: string | null;
216
229
  intermediary: {
217
230
  id: Id;
@@ -233,9 +246,17 @@ type SectionProperties = EntityTimestamps & {
233
246
  category: string;
234
247
  ordinal: number;
235
248
  imdf_category: string;
249
+ local_category_ids: string[];
250
+ feature_image: Media | null;
251
+ cover_image: Media | null;
252
+ gallery: Media[] | null;
253
+ is_featured: boolean;
254
+ hours: string | null;
236
255
  [k: string]: any;
237
256
  };
238
- type SectionFeature = ImdfFeature<SectionGeometry, SectionProperties>;
257
+ type SectionFeature = ImdfFeature<SectionGeometry, SectionProperties> & {
258
+ feature_type: "section";
259
+ };
239
260
  type UnitGeometry = Polygon | MultiPolygon;
240
261
  type UnitProperties = EntityTimestamps & {
241
262
  alt_name: string | null;
@@ -248,7 +269,9 @@ type UnitProperties = EntityTimestamps & {
248
269
  style: SymbolProperties;
249
270
  venue_id: Id;
250
271
  };
251
- type UnitFeature = ImdfFeature<UnitGeometry, UnitProperties>;
272
+ type UnitFeature = ImdfFeature<UnitGeometry, UnitProperties> & {
273
+ feature_type: "unit";
274
+ };
252
275
  type VenueGeometry = Polygon | MultiPolygon;
253
276
  type VenueProperties = EntityTimestamps & {
254
277
  address: string;
@@ -272,7 +295,9 @@ type VenueProperties = EntityTimestamps & {
272
295
  theme_color: string;
273
296
  zoom: string | null;
274
297
  };
275
- type VenueFeature = ImdfFeature<VenueGeometry, VenueProperties>;
298
+ type VenueFeature = ImdfFeature<VenueGeometry, VenueProperties> & {
299
+ feature_type: "venue";
300
+ };
276
301
  /**
277
302
  * Non-IMDF
278
303
  *********************** */
@@ -521,6 +546,10 @@ type FixtureFeaturePopulated = FixtureFeature & {
521
546
  * [IMDF] Venue that kiosk is in
522
547
  */
523
548
  venue?: VenueFeaturePopulated;
549
+ /**
550
+ * [Derived] Level's ordinal that fixture is on
551
+ */
552
+ ordinal: number;
524
553
  };
525
554
  };
526
555
  type KioskFeaturePopulated = KioskFeature & {
@@ -547,6 +576,10 @@ type KioskFeaturePopulated = KioskFeature & {
547
576
  * This is added during feature enrichment and not part of the original IMDF dataset.
548
577
  */
549
578
  section?: SectionFeaturePopulated;
579
+ /**
580
+ * [Derived] Level's ordinal that fixture is on
581
+ */
582
+ ordinal: number;
550
583
  };
551
584
  };
552
585
  type LevelFeaturePopulated = LevelFeature & {
@@ -563,6 +596,9 @@ type OccupantFeaturePopulated = OccupantFeature & {
563
596
  * [IMDF] Occupant's position
564
597
  */
565
598
  anchor: AnchorFeaturePopulated;
599
+ /**
600
+ * [Derived] Level's ordinal that occupant is on
601
+ */
566
602
  ordinal: number;
567
603
  /**
568
604
  * [venue.in.th] Occupant's category
@@ -1206,7 +1242,7 @@ declare function styledFeatureGenerator(mapTheme: any): {
1206
1242
  createFixture: (feature: any) => any;
1207
1243
  createLineStringFromGeometries: (geometries: any) => LineString$1;
1208
1244
  create3DStepPath: (feature: any, threeLayer: any, option?: {}) => NavigationPath;
1209
- createDecoration: (decoration: any, options: any) => LineString$1 | Polygon$1 | MultiPolygon$1 | MultiLineString;
1245
+ createDecoration: (decoration: any, options: any) => LineString$1 | Polygon$1 | MultiPolygon$1 | MultiLineString$1;
1210
1246
  create3DBillboard: (billboard: any, threeLayer: any) => Billboard;
1211
1247
  create3DAmenityMarker: (feature: any, threeLayer: any, config: any) => SpriteMarker;
1212
1248
  create3DOccupantAmenityMarker: (feature: any, threeLayer: any, config: any) => SpriteMarker;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "venue-js",
3
- "version": "1.4.0-next.3",
3
+ "version": "1.4.0-next.5",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",