@tomtom-org/maps-sdk 0.61.0 → 0.62.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.
@@ -2178,6 +2178,128 @@ type RelatedPOI = {
2178
2178
  id: string;
2179
2179
  };
2180
2180
  //#endregion
2181
+ //#region src/types/reachableRange.d.ts
2182
+ /**
2183
+ * Every {@link BudgetType}, to list them in a picker or validate one.
2184
+ *
2185
+ * @group Reachable Range
2186
+ */
2187
+ export declare const budgetTypes: readonly ["timeMinutes", "remainingChargePCT", "spentChargePCT", "spentFuelLiters", "distanceKM"];
2188
+ /**
2189
+ * Type of budget constraint for reachable range calculation.
2190
+ *
2191
+ * @remarks
2192
+ * **Budget Types:**
2193
+ * - `timeMinutes`: Travel time in minutes (isochrone)
2194
+ * - `distanceKM`: Travel distance in kilometers (isodistance)
2195
+ * - `remainingChargePCT`: Remaining battery charge in percentage (EV)
2196
+ * - `spentChargePCT`: Battery charge consumed in percentage (EV)
2197
+ * - `spentFuelLiters`: Fuel consumed in liters (combustion)
2198
+ *
2199
+ * Both charge budgets are converted against the battery capacity, so they need an electric
2200
+ * `vehicle` with `model.engine.charging.maxChargeKWH`; `remainingChargePCT` also needs its current
2201
+ * charge in `vehicle.state`.
2202
+ *
2203
+ * **Common Use Cases:**
2204
+ * - Time: "Where can I reach in 30 minutes?"
2205
+ * - Distance: "What's within 10 km?"
2206
+ * - EV charge: "How far can I go on 50% battery?"
2207
+ * - Fuel: "Range with 20 liters of fuel"
2208
+ *
2209
+ * @example
2210
+ * ```typescript
2211
+ * const timeType: BudgetType = 'timeMinutes';
2212
+ * const distanceType: BudgetType = 'distanceKM';
2213
+ * const evType: BudgetType = 'remainingChargePCT';
2214
+ * ```
2215
+ *
2216
+ * @group Reachable Range
2217
+ */
2218
+ export type BudgetType = (typeof budgetTypes)[number];
2219
+ /**
2220
+ * Budget constraint for reachable range calculation.
2221
+ *
2222
+ * Defines the limit (time, distance, or fuel/charge) for calculating
2223
+ * how far you can travel from a starting point.
2224
+ *
2225
+ * @remarks
2226
+ * **Use Cases:**
2227
+ * - Service area visualization (30-min delivery zone)
2228
+ * - EV range anxiety mitigation (show reachable area)
2229
+ * - Emergency response coverage (10-min response time)
2230
+ * - Delivery zone planning
2231
+ * - Store location analysis
2232
+ *
2233
+ * @example
2234
+ * ```typescript
2235
+ * // 30-minute travel time
2236
+ * const timeBudget: ReachableRangeBudget = {
2237
+ * type: 'timeMinutes',
2238
+ * value: 30
2239
+ * };
2240
+ *
2241
+ * // 50 km distance
2242
+ * const distanceBudget: ReachableRangeBudget = {
2243
+ * type: 'distanceKM',
2244
+ * value: 50
2245
+ * };
2246
+ *
2247
+ * // 50% battery remaining
2248
+ * const evBudget: ReachableRangeBudget = {
2249
+ * type: 'remainingChargePCT',
2250
+ * value: 50
2251
+ * };
2252
+ *
2253
+ * // 20 liters of fuel
2254
+ * const fuelBudget: ReachableRangeBudget = {
2255
+ * type: 'spentFuelLiters',
2256
+ * value: 20
2257
+ * };
2258
+ * ```
2259
+ *
2260
+ * @group Reachable Range
2261
+ */
2262
+ export type ReachableRangeBudget = {
2263
+ /**
2264
+ * The type of budget, including units. See {@link BudgetType}.
2265
+ */
2266
+ type: BudgetType;
2267
+ /**
2268
+ * The value of the budget based on the units mentioned in the type.
2269
+ *
2270
+ * @remarks
2271
+ * **Typical Values:**
2272
+ * - Time: 5-60 minutes
2273
+ * - Distance: 5-100 km
2274
+ * - Charge: 10-100 percentage
2275
+ * - Fuel: 5-50 liters
2276
+ *
2277
+ * @example
2278
+ * ```typescript
2279
+ * value: 30 // 30 minutes/km/percent/liters depending on type
2280
+ * value: 15.5 // Decimal values supported
2281
+ * ```
2282
+ */
2283
+ value: number;
2284
+ };
2285
+ /**
2286
+ * The unit each {@link BudgetType} counts in, to print next to a budget value: `30 min`, `20 % remaining`.
2287
+ *
2288
+ * @example
2289
+ * ```typescript
2290
+ * const label = `${budget.value} ${budgetUnits[budget.type]}`;
2291
+ * ```
2292
+ *
2293
+ * @group Reachable Range
2294
+ */
2295
+ export declare const budgetUnits: {
2296
+ readonly timeMinutes: "min";
2297
+ readonly distanceKM: "km";
2298
+ readonly remainingChargePCT: "% remaining";
2299
+ readonly spentChargePCT: "% spent";
2300
+ readonly spentFuelLiters: "L";
2301
+ };
2302
+ //#endregion
2181
2303
  //#region src/types/route/chargingStop.d.ts
2182
2304
  /**
2183
2305
  * Available plug types for EV charging.