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

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,7 +212,9 @@ 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
+ };
207
218
  type RelationshipGeometry = Geometry | null;
208
219
  type RelationshipProperties = EntityTimestamps & {
209
220
  category: string;
@@ -521,6 +532,10 @@ type FixtureFeaturePopulated = FixtureFeature & {
521
532
  * [IMDF] Venue that kiosk is in
522
533
  */
523
534
  venue?: VenueFeaturePopulated;
535
+ /**
536
+ * [Derived] Level's ordinal that fixture is on
537
+ */
538
+ ordinal: number;
524
539
  };
525
540
  };
526
541
  type KioskFeaturePopulated = KioskFeature & {
@@ -547,6 +562,10 @@ type KioskFeaturePopulated = KioskFeature & {
547
562
  * This is added during feature enrichment and not part of the original IMDF dataset.
548
563
  */
549
564
  section?: SectionFeaturePopulated;
565
+ /**
566
+ * [Derived] Level's ordinal that fixture is on
567
+ */
568
+ ordinal: number;
550
569
  };
551
570
  };
552
571
  type LevelFeaturePopulated = LevelFeature & {
@@ -563,6 +582,9 @@ type OccupantFeaturePopulated = OccupantFeature & {
563
582
  * [IMDF] Occupant's position
564
583
  */
565
584
  anchor: AnchorFeaturePopulated;
585
+ /**
586
+ * [Derived] Level's ordinal that occupant is on
587
+ */
566
588
  ordinal: number;
567
589
  /**
568
590
  * [venue.in.th] Occupant's category
@@ -1206,7 +1228,7 @@ declare function styledFeatureGenerator(mapTheme: any): {
1206
1228
  createFixture: (feature: any) => any;
1207
1229
  createLineStringFromGeometries: (geometries: any) => LineString$1;
1208
1230
  create3DStepPath: (feature: any, threeLayer: any, option?: {}) => NavigationPath;
1209
- createDecoration: (decoration: any, options: any) => LineString$1 | Polygon$1 | MultiPolygon$1 | MultiLineString;
1231
+ createDecoration: (decoration: any, options: any) => LineString$1 | Polygon$1 | MultiPolygon$1 | MultiLineString$1;
1210
1232
  create3DBillboard: (billboard: any, threeLayer: any) => Billboard;
1211
1233
  create3DAmenityMarker: (feature: any, threeLayer: any, config: any) => SpriteMarker;
1212
1234
  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,7 +212,9 @@ 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
+ };
207
218
  type RelationshipGeometry = Geometry | null;
208
219
  type RelationshipProperties = EntityTimestamps & {
209
220
  category: string;
@@ -521,6 +532,10 @@ type FixtureFeaturePopulated = FixtureFeature & {
521
532
  * [IMDF] Venue that kiosk is in
522
533
  */
523
534
  venue?: VenueFeaturePopulated;
535
+ /**
536
+ * [Derived] Level's ordinal that fixture is on
537
+ */
538
+ ordinal: number;
524
539
  };
525
540
  };
526
541
  type KioskFeaturePopulated = KioskFeature & {
@@ -547,6 +562,10 @@ type KioskFeaturePopulated = KioskFeature & {
547
562
  * This is added during feature enrichment and not part of the original IMDF dataset.
548
563
  */
549
564
  section?: SectionFeaturePopulated;
565
+ /**
566
+ * [Derived] Level's ordinal that fixture is on
567
+ */
568
+ ordinal: number;
550
569
  };
551
570
  };
552
571
  type LevelFeaturePopulated = LevelFeature & {
@@ -563,6 +582,9 @@ type OccupantFeaturePopulated = OccupantFeature & {
563
582
  * [IMDF] Occupant's position
564
583
  */
565
584
  anchor: AnchorFeaturePopulated;
585
+ /**
586
+ * [Derived] Level's ordinal that occupant is on
587
+ */
566
588
  ordinal: number;
567
589
  /**
568
590
  * [venue.in.th] Occupant's category
@@ -1206,7 +1228,7 @@ declare function styledFeatureGenerator(mapTheme: any): {
1206
1228
  createFixture: (feature: any) => any;
1207
1229
  createLineStringFromGeometries: (geometries: any) => LineString$1;
1208
1230
  create3DStepPath: (feature: any, threeLayer: any, option?: {}) => NavigationPath;
1209
- createDecoration: (decoration: any, options: any) => LineString$1 | Polygon$1 | MultiPolygon$1 | MultiLineString;
1231
+ createDecoration: (decoration: any, options: any) => LineString$1 | Polygon$1 | MultiPolygon$1 | MultiLineString$1;
1210
1232
  create3DBillboard: (billboard: any, threeLayer: any) => Billboard;
1211
1233
  create3DAmenityMarker: (feature: any, threeLayer: any, config: any) => SpriteMarker;
1212
1234
  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.4",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",