@tomtom-org/maps-sdk 0.48.2 → 0.49.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/CHANGELOG.md +53 -0
- package/core/dist/core.es.js +1 -1
- package/core/dist/core.es.js.map +1 -1
- package/core/dist/index.d.ts +14 -0
- package/map/dist/index.d.ts +31 -2
- package/map/dist/map.es.js +1 -1
- package/map/dist/map.es.js.map +1 -1
- package/package.json +10 -6
- package/services/dist/index.d.ts +351 -107
- package/services/dist/services.es.js +1 -1
- package/services/dist/services.es.js.map +1 -1
package/core/dist/index.d.ts
CHANGED
|
@@ -4633,6 +4633,7 @@ export declare type SectionsProps = {
|
|
|
4633
4633
|
country?: CountrySectionProps[];
|
|
4634
4634
|
ferry?: SectionProps[];
|
|
4635
4635
|
importantRoadStretch?: ImportantRoadStretchProps[];
|
|
4636
|
+
/** Lane configuration sections. Guidance-only: present solely when `guidance` was requested. */
|
|
4636
4637
|
lanes?: LaneSectionProps[];
|
|
4637
4638
|
leg: LegSectionProps[];
|
|
4638
4639
|
lowEmissionZone?: SectionProps[];
|
|
@@ -4943,6 +4944,19 @@ export declare type TollPaymentType = 'CASH_COINS_AND_BILLS' | 'CASH_BILLS_ONLY'
|
|
|
4943
4944
|
*/
|
|
4944
4945
|
export declare const TOMTOM_USER_AGENT_SDK_NAME = "MapsSDKJS";
|
|
4945
4946
|
|
|
4947
|
+
/**
|
|
4948
|
+
* Service-specific TomTom API headers, declared per-request by a service's
|
|
4949
|
+
* request builder (not added globally). Widen this type when a new service
|
|
4950
|
+
* needs a header outside the existing set.
|
|
4951
|
+
* @ignore
|
|
4952
|
+
*/
|
|
4953
|
+
export declare type TomTomAPIHeaders = {
|
|
4954
|
+
'TomTom-Api-Key'?: string;
|
|
4955
|
+
'TomTom-Api-Version'?: string;
|
|
4956
|
+
'Accept-Language'?: string;
|
|
4957
|
+
Attributes?: string;
|
|
4958
|
+
};
|
|
4959
|
+
|
|
4946
4960
|
/**
|
|
4947
4961
|
* Global configuration singleton for the TomTom Maps SDK.
|
|
4948
4962
|
*
|
package/map/dist/index.d.ts
CHANGED
|
@@ -8538,7 +8538,8 @@ export declare type StreetRoadSubCategory = (typeof streetRoadSubCategories)[num
|
|
|
8538
8538
|
* }
|
|
8539
8539
|
* };
|
|
8540
8540
|
*
|
|
8541
|
-
* map.addStyleChangeHandler(styleHandler);
|
|
8541
|
+
* const unsubscribe = map.addStyleChangeHandler(styleHandler);
|
|
8542
|
+
* // Call unsubscribe() when the handler's owner is torn down.
|
|
8542
8543
|
* ```
|
|
8543
8544
|
*
|
|
8544
8545
|
* @see {@link TomTomMap.addStyleChangeHandler}
|
|
@@ -9203,6 +9204,11 @@ export declare class TomTomMap {
|
|
|
9203
9204
|
*
|
|
9204
9205
|
* @param handler - A {@link StyleChangeHandler} object with callbacks for style change events.
|
|
9205
9206
|
*
|
|
9207
|
+
* @returns An unsubscribe function that removes this handler. Call it when the
|
|
9208
|
+
* handler's owner (e.g. a custom overlay) is torn down — otherwise the handler,
|
|
9209
|
+
* and everything it closes over, lives for the lifetime of the map. Mirrors the
|
|
9210
|
+
* disposer returned by module event handlers (`module.events.on(...)`).
|
|
9211
|
+
*
|
|
9206
9212
|
* @remarks
|
|
9207
9213
|
* **When to Use:**
|
|
9208
9214
|
* - You have custom layers or sources that need to be recreated after style changes
|
|
@@ -9242,6 +9248,17 @@ export declare class TomTomMap {
|
|
|
9242
9248
|
* ```
|
|
9243
9249
|
*
|
|
9244
9250
|
* @example
|
|
9251
|
+
* Unsubscribe when the owner is torn down:
|
|
9252
|
+
* ```typescript
|
|
9253
|
+
* const unsubscribe = map.addStyleChangeHandler({
|
|
9254
|
+
* onStyleChanged: () => reattachCustomLayers(),
|
|
9255
|
+
* });
|
|
9256
|
+
*
|
|
9257
|
+
* // Later, when the overlay is removed:
|
|
9258
|
+
* unsubscribe();
|
|
9259
|
+
* ```
|
|
9260
|
+
*
|
|
9261
|
+
* @example
|
|
9245
9262
|
* Preserve custom layers across style changes:
|
|
9246
9263
|
* ```typescript
|
|
9247
9264
|
* let customLayerData = null;
|
|
@@ -9308,7 +9325,7 @@ export declare class TomTomMap {
|
|
|
9308
9325
|
* @see {@link StyleChangeHandler} - Handler interface definition
|
|
9309
9326
|
* @see {@link setStyle} - Method that triggers the handlers
|
|
9310
9327
|
*/
|
|
9311
|
-
addStyleChangeHandler(handler: StyleChangeHandler): void;
|
|
9328
|
+
addStyleChangeHandler(handler: StyleChangeHandler): () => void;
|
|
9312
9329
|
}
|
|
9313
9330
|
|
|
9314
9331
|
/**
|
|
@@ -11427,3 +11444,15 @@ export declare type WaypointsConfig = {
|
|
|
11427
11444
|
};
|
|
11428
11445
|
|
|
11429
11446
|
export { }
|
|
11447
|
+
|
|
11448
|
+
|
|
11449
|
+
declare global {
|
|
11450
|
+
/**
|
|
11451
|
+
* Installed by the demo-BFF sandpack bootstrap. Resolves once the proxy
|
|
11452
|
+
* session cookie is valid and not about to expire, re-minting it first
|
|
11453
|
+
* when needed. See ensureFreshSession in proxyBootstrap.ts. Declared as a
|
|
11454
|
+
* global var (not a Window member) so it can be read off `globalThis`,
|
|
11455
|
+
* which also works on the main thread where window === globalThis.
|
|
11456
|
+
*/
|
|
11457
|
+
var __DEMO_BFF_ENSURE_SESSION__: (() => Promise<void>) | undefined;
|
|
11458
|
+
}
|