@tomtom-org/maps-sdk 0.36.5 → 0.37.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.
@@ -1838,7 +1838,11 @@ export declare type EVChargingStationPlaceProps = Omit<CommonPlaceProps, 'chargi
1838
1838
  *
1839
1839
  * @group Shared
1840
1840
  */
1841
- export declare interface FeatureCollectionWithProperties<G extends Geometry | null = Geometry, P = GeoJsonProperties, FeatureCollectionProps = unknown> extends FeatureCollection<G, P> {
1841
+ export declare interface FeatureCollectionWithProperties<G extends Geometry | null = Geometry, P = GeoJsonProperties, FeatureCollectionProps = unknown> extends Omit<FeatureCollection<G, P>, 'bbox'> {
1842
+ /**
1843
+ * Optional bounding box that contains all features in the collection, including their bounding boxes, if any.
1844
+ */
1845
+ bbox?: BBox;
1842
1846
  /**
1843
1847
  * Optional properties for the entire feature collection.
1844
1848
  * This allows metadata to be attached at the collection level.
@@ -2179,30 +2183,7 @@ export declare const getPositionStrict: (hasLngLat: HasLngLat, options?: GetPosi
2179
2183
  * @param routePlanningLocation The geographic input to classify. Can be coordinates, GeoJSON geometry, or GeoJSON Feature.
2180
2184
  * @returns The type of the input: 'waypoint' for point locations or 'path' for line geometries.
2181
2185
  *
2182
- * @example
2183
- * ```typescript
2184
- * // Waypoint as coordinate array
2185
- * getRoutePlanningLocationType([4.9, 52.3]); // Returns: 'waypoint'
2186
- *
2187
- * // Path as array of coordinates
2188
- * getRoutePlanningLocationType([[4.9, 52.3], [4.5, 51.9]]); // Returns: 'path'
2189
- *
2190
- * // Waypoint as Point Feature
2191
- * getRoutePlanningLocationType({
2192
- * type: 'Feature',
2193
- * geometry: { type: 'Point', coordinates: [4.9, 52.3] },
2194
- * properties: {}
2195
- * }); // Returns: 'waypoint'
2196
- *
2197
- * // Path as LineString Feature
2198
- * getRoutePlanningLocationType({
2199
- * type: 'Feature',
2200
- * geometry: { type: 'LineString', coordinates: [[4.9, 52.3], [4.5, 51.9]] },
2201
- * properties: {}
2202
- * }); // Returns: 'path'
2203
- * ```
2204
- *
2205
- * @group Route
2186
+ * @ignore
2206
2187
  */
2207
2188
  export declare const getRoutePlanningLocationType: (routePlanningLocation: RoutePlanningLocation) => RoutePlanningLocationType;
2208
2189
 
@@ -2395,7 +2376,7 @@ export declare type HasCount = {
2395
2376
  *
2396
2377
  * @group Shared
2397
2378
  */
2398
- export declare type HasLngLat = Position | Point | Feature<Point>;
2379
+ export declare type HasLngLat = [number, number] | Position | Point | Feature<Point>;
2399
2380
 
2400
2381
  /**
2401
2382
  * Sections with important stretches of road information.
@@ -3196,13 +3177,19 @@ export declare const paymentMethods: readonly ["No_Payment", "Subscription", "Di
3196
3177
  *
3197
3178
  * @group Place
3198
3179
  */
3199
- export declare type Place<P extends CommonPlaceProps = CommonPlaceProps> = Omit<Feature<Point, P>, 'id'> & {
3180
+ export declare type Place<P extends CommonPlaceProps = CommonPlaceProps> = Omit<Feature<Point, P>, 'id' | 'bbox'> & {
3200
3181
  /**
3201
3182
  * Unique identifier for this place.
3202
3183
  *
3203
3184
  * Required string ID (stricter than GeoJSON Feature's optional id).
3204
3185
  */
3205
3186
  id: string;
3187
+ /**
3188
+ * Bounding box that contains the place.
3189
+ *
3190
+ * * Typically significant for places covering wider areas.
3191
+ */
3192
+ bbox?: BBox;
3206
3193
  };
3207
3194
 
3208
3195
  /**
@@ -3745,13 +3732,17 @@ export declare type RoadShieldSectionProps = SectionProps & {
3745
3732
  *
3746
3733
  * @group Route
3747
3734
  */
3748
- export declare type Route<P extends RouteProps = RouteProps> = Omit<Feature<LineString, P>, 'id'> & {
3735
+ export declare type Route<P extends RouteProps = RouteProps> = Omit<Feature<LineString, P>, 'id' | 'bbox'> & {
3749
3736
  /**
3750
3737
  * Unique identifier for this route.
3751
3738
  *
3752
3739
  * Randomly generated to distinguish between multiple route alternatives.
3753
3740
  */
3754
3741
  id: string;
3742
+ /**
3743
+ * Bounding box that contains the entire route or at least its waypoints.
3744
+ */
3745
+ bbox?: BBox;
3755
3746
  };
3756
3747
 
3757
3748
  /**
@@ -3927,11 +3918,15 @@ export declare type RouteProps = {
3927
3918
  *
3928
3919
  * @group Route
3929
3920
  */
3930
- export declare type Routes<P extends RouteProps = RouteProps, FeatureCollectionProps = unknown> = Omit<FeatureCollectionWithProperties<LineString, P, FeatureCollectionProps>, 'features'> & {
3921
+ export declare type Routes<P extends RouteProps = RouteProps, FeatureCollectionProps = unknown> = Omit<FeatureCollectionWithProperties<LineString, P, FeatureCollectionProps>, 'features' | 'bbox'> & {
3931
3922
  /**
3932
3923
  * Array of route features.
3933
3924
  */
3934
3925
  features: Route<P>[];
3926
+ /**
3927
+ * Bounding box that contains all the routes or at least their waypoints.
3928
+ */
3929
+ bbox?: BBox;
3935
3930
  };
3936
3931
 
3937
3932
  /**
@@ -4466,6 +4461,11 @@ export declare type TomTomHeaders = {
4466
4461
  */
4467
4462
  export declare const toPointFeature: (coordinates: Position) => Feature<Point>;
4468
4463
 
4464
+ /**
4465
+ * @ignore
4466
+ */
4467
+ export declare const toPointGeometry: (coordinates: Position) => Point;
4468
+
4469
4469
  /**
4470
4470
  * All possible traffic incident categories.
4471
4471
  * @group Route
package/core/package.json CHANGED
@@ -13,9 +13,9 @@
13
13
  "test": "vitest run",
14
14
  "test:coverage": "vitest run --coverage",
15
15
  "test:dist": "vitest run dist-validation.test.ts",
16
- "build": "vite build && pnpm test:dist",
16
+ "build": "vite build",
17
+ "build:watch": "pnpm build --watch",
17
18
  "build:full": "pnpm type-check && pnpm build",
18
- "build:validate": "pnpm build && pnpm test:dist",
19
19
  "type-check": "tsc --noEmit",
20
20
  "clean:dist": "rimraf ./dist"
21
21
  },