@tomtom-org/maps-sdk-plugin-agent-toolkit 0.8.0 → 0.10.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/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseMapModule, CustomGeoJSONLayerSpec, CustomGeoJSONModule, GeometriesModule,
|
|
1
|
+
import { BaseMapModule, CustomGeoJSONLayerSpec, CustomGeoJSONModule, GeometriesModule, GeometryFillStyle, POIsModule, PlaceConnectionDisplay, PlacesModule, PlanningWaypoint, RoutingModule, StylingModule, TomTomMap, TrafficAreaAnalyticsModule, TrafficAreaAnalyticsModuleConfig, TrafficFlowModule, TrafficIncidentOverlayModule, TrafficIncidentsModule } from "@tomtom-org/maps-sdk/map";
|
|
2
2
|
import { BBox, CommonPlaceProps, GeographyType, POICategory, Place, Places, PolygonFeature, PolygonFeatures, Route, Routes, TrafficAreaAnalytics, TrafficIncident, WaypointLike } from "@tomtom-org/maps-sdk/core";
|
|
3
3
|
import { ChartConfiguration } from "chart.js";
|
|
4
4
|
import { Map as Map$1 } from "maplibre-gl";
|
|
@@ -1211,9 +1211,9 @@ declare class PlacesState implements StateSlice {
|
|
|
1211
1211
|
getEntryPlacesModule(entryId: string, markerType: PlacesMarkerType): Promise<PlacesModule>;
|
|
1212
1212
|
/**
|
|
1213
1213
|
* Lazy-init and return the entry's place-geometries module (for POI footprints, municipality
|
|
1214
|
-
* outlines). Re-applies
|
|
1214
|
+
* outlines). Re-applies the config when the fill style changes. Throws on unknown entry id.
|
|
1215
1215
|
*/
|
|
1216
|
-
getEntryGeometriesModule(entryId: string,
|
|
1216
|
+
getEntryGeometriesModule(entryId: string, fillStyle?: GeometryFillStyle): Promise<GeometriesModule>;
|
|
1217
1217
|
private _requireEntry;
|
|
1218
1218
|
get entries(): readonly PlacesEntry[];
|
|
1219
1219
|
/**
|
|
@@ -1259,7 +1259,7 @@ declare class PlacesState implements StateSlice {
|
|
|
1259
1259
|
* `entryId` defaults to the latest entry that owns geometries — handy when callers only ever
|
|
1260
1260
|
* render the most-recently produced footprints. Pass an explicit id to target an older one.
|
|
1261
1261
|
*/
|
|
1262
|
-
showPlaceGeometries(features: PolygonFeature<CommonPlaceProps>[],
|
|
1262
|
+
showPlaceGeometries(features: PolygonFeature<CommonPlaceProps>[], fillStyle?: GeometryFillStyle, mode?: 'add' | 'replace', entryId?: string): Promise<void>;
|
|
1263
1263
|
private _latestGeometriesEntryId;
|
|
1264
1264
|
private _buildGeometryIndex;
|
|
1265
1265
|
/** IDs of all entries currently shown on the map. */
|
|
@@ -1386,8 +1386,8 @@ type RangesEntry = BaseEntry<ReachableRange[]> & {
|
|
|
1386
1386
|
geometries?: GeometriesModule;
|
|
1387
1387
|
places?: PlacesModule;
|
|
1388
1388
|
};
|
|
1389
|
-
/**
|
|
1390
|
-
|
|
1389
|
+
/** Fill style that the geometries module is currently configured with. */
|
|
1390
|
+
_shownFillStyle?: GeometryFillStyle;
|
|
1391
1391
|
/** True while any of this entry's modules are rendering on the map. */
|
|
1392
1392
|
_shown?: boolean;
|
|
1393
1393
|
};
|
|
@@ -1445,9 +1445,9 @@ declare class RangeState implements ShownEntriesSlice {
|
|
|
1445
1445
|
setEntryMode(mode: EntryMode): Promise<void>;
|
|
1446
1446
|
/**
|
|
1447
1447
|
* Lazy-init the entry's GeometriesModule (for the isochrone/isodistance polygons),
|
|
1448
|
-
* applying the requested
|
|
1448
|
+
* applying the requested fill style. Throws on unknown id.
|
|
1449
1449
|
*/
|
|
1450
|
-
getEntryGeometriesModule(entryId: string,
|
|
1450
|
+
getEntryGeometriesModule(entryId: string, fillStyle?: GeometryFillStyle): Promise<GeometriesModule>;
|
|
1451
1451
|
/**
|
|
1452
1452
|
* Lazy-init the entry's origin-pin PlacesModule. Each entry maintains its own pin module
|
|
1453
1453
|
* so multiple ranges entries can be on the map simultaneously without the pins of one
|
|
@@ -1697,11 +1697,11 @@ declare class RoutingState implements ShownEntriesSlice {
|
|
|
1697
1697
|
private _params;
|
|
1698
1698
|
private _entryMode;
|
|
1699
1699
|
/**
|
|
1700
|
-
* Slice-level
|
|
1700
|
+
* Slice-level route colour applied to every RoutingModule on first show / re-show. Sticky
|
|
1701
1701
|
* across entry swaps so the rendered route always uses the most recently requested color.
|
|
1702
|
-
* Set via {@link
|
|
1702
|
+
* Set via {@link setColor}; persists for the lifetime of the slice (cleared on `reset`).
|
|
1703
1703
|
*/
|
|
1704
|
-
private
|
|
1704
|
+
private _color?;
|
|
1705
1705
|
/**
|
|
1706
1706
|
* The most recently `.showEntry`-ed id. Tracks "who was last brought up" so tools that
|
|
1707
1707
|
* operate on the focused module have a single pointer to read; the authoritative shown
|
|
@@ -1745,15 +1745,15 @@ declare class RoutingState implements ShownEntriesSlice {
|
|
|
1745
1745
|
showWaypoints?: boolean;
|
|
1746
1746
|
showSummaryBubbles?: boolean;
|
|
1747
1747
|
}): Promise<void>;
|
|
1748
|
-
/** Slice-level
|
|
1749
|
-
get
|
|
1748
|
+
/** Slice-level route colour persisted across entry swaps. Undefined when none has been set. */
|
|
1749
|
+
get color(): string | undefined;
|
|
1750
1750
|
/**
|
|
1751
|
-
* Set the slice-level
|
|
1751
|
+
* Set the slice-level route colour. The colour is applied immediately to every currently-shown
|
|
1752
1752
|
* entry's RoutingModule and remembered so that subsequent {@link showEntry} calls apply it
|
|
1753
|
-
* automatically. Pass `undefined` to clear the sticky
|
|
1753
|
+
* automatically. Pass `undefined` to clear the sticky colour — currently-shown modules keep
|
|
1754
1754
|
* their last paint until they're re-shown (MapLibre style restore handles full revert).
|
|
1755
1755
|
*/
|
|
1756
|
-
|
|
1756
|
+
setColor(color: string | undefined): void;
|
|
1757
1757
|
/**
|
|
1758
1758
|
* Hide the entry's routes + waypoints on its module (clear; the module stays cached).
|
|
1759
1759
|
* No-op when the entry is unknown or already hidden.
|
|
@@ -2974,6 +2974,16 @@ export declare const showModeSchema: z.ZodOptional<z.ZodEnum<{
|
|
|
2974
2974
|
add: "add";
|
|
2975
2975
|
replace: "replace";
|
|
2976
2976
|
}>>;
|
|
2977
|
+
/**
|
|
2978
|
+
* How rendered polygons are filled — the SDK's `GeometryFillStyle`.
|
|
2979
|
+
*
|
|
2980
|
+
* @ignore
|
|
2981
|
+
*/
|
|
2982
|
+
export declare const geometryFillStyleSchema: z.ZodEnum<{
|
|
2983
|
+
filled: "filled";
|
|
2984
|
+
outline: "outline";
|
|
2985
|
+
inverted: "inverted";
|
|
2986
|
+
}>;
|
|
2977
2987
|
/**
|
|
2978
2988
|
* Shared schema for the geometry-rendering option on tools that produce a places entry
|
|
2979
2989
|
* (discoverPlaces, locatePlace, ...). When provided, the tool batch-fetches boundary
|
|
@@ -2987,7 +2997,7 @@ export declare const showPlaceGeometriesSchema: z.ZodOptional<z.ZodObject<{
|
|
|
2987
2997
|
add: "add";
|
|
2988
2998
|
replace: "replace";
|
|
2989
2999
|
}>>;
|
|
2990
|
-
|
|
3000
|
+
fillStyle: z.ZodOptional<z.ZodEnum<{
|
|
2991
3001
|
filled: "filled";
|
|
2992
3002
|
outline: "outline";
|
|
2993
3003
|
inverted: "inverted";
|
|
@@ -3002,7 +3012,7 @@ export declare const showPlaceGeometriesSchema: z.ZodOptional<z.ZodObject<{
|
|
|
3002
3012
|
* @ignore
|
|
3003
3013
|
*/
|
|
3004
3014
|
export declare const geometryDisplayConfigSchema: z.ZodObject<{
|
|
3005
|
-
|
|
3015
|
+
fillStyle: z.ZodOptional<z.ZodEnum<{
|
|
3006
3016
|
filled: "filled";
|
|
3007
3017
|
outline: "outline";
|
|
3008
3018
|
inverted: "inverted";
|
|
@@ -3356,12 +3366,12 @@ type CustomGeometriesEntry = BaseEntry<PolygonFeature[]> & {
|
|
|
3356
3366
|
provenance: GeometryProvenance;
|
|
3357
3367
|
/**
|
|
3358
3368
|
* Per-entry GeometriesModule. Each entry owns its own module so display state
|
|
3359
|
-
* (
|
|
3369
|
+
* (fill style, current features) lives on the entry instead of a shared slice-level
|
|
3360
3370
|
* module. Lazy-initialised via CustomGeometriesState helpers.
|
|
3361
3371
|
*/
|
|
3362
3372
|
_module?: GeometriesModule;
|
|
3363
|
-
/**
|
|
3364
|
-
|
|
3373
|
+
/** Fill style that the geometries module is currently configured with. */
|
|
3374
|
+
_shownFillStyle?: GeometryFillStyle;
|
|
3365
3375
|
/** True while this entry's `_module` is rendering on the map. */
|
|
3366
3376
|
_shown?: boolean;
|
|
3367
3377
|
};
|
|
@@ -3422,8 +3432,8 @@ declare class CustomGeometriesState implements ShownEntriesSlice, StateSlice {
|
|
|
3422
3432
|
* Returns the assigned id. Under `single` mode the new entry replaces every older one.
|
|
3423
3433
|
*/
|
|
3424
3434
|
addEntry(features: PolygonFeature<CommonPlaceProps>[], provenance: CustomGeometriesEntry['provenance'], label: string, explicitId?: string): Promise<string>;
|
|
3425
|
-
/** Lazy-init the entry's GeometriesModule, applying / re-applying the requested
|
|
3426
|
-
getEntryGeometriesModule(entryId: string,
|
|
3435
|
+
/** Lazy-init the entry's GeometriesModule, applying / re-applying the requested fill style. */
|
|
3436
|
+
getEntryGeometriesModule(entryId: string, fillStyle?: GeometryFillStyle): Promise<GeometriesModule>;
|
|
3427
3437
|
/**
|
|
3428
3438
|
* Render this entry's polygons. `mode` is scoped to this entry's own layer:
|
|
3429
3439
|
* - `'replace'` (default) — show exactly `entry.data`, clearing whatever the
|
|
@@ -3435,7 +3445,7 @@ declare class CustomGeometriesState implements ShownEntriesSlice, StateSlice {
|
|
|
3435
3445
|
* shown entries are hidden first; otherwise the caller uses `hideEntry` / the
|
|
3436
3446
|
* tools' `hidePreviousEntries` option.
|
|
3437
3447
|
*/
|
|
3438
|
-
showEntry(entryId: string,
|
|
3448
|
+
showEntry(entryId: string, fillStyle?: GeometryFillStyle, mode?: 'add' | 'replace'): Promise<void>;
|
|
3439
3449
|
private _hideOthersUnderSingleMode;
|
|
3440
3450
|
hideEntry(entryId: string): Promise<void>;
|
|
3441
3451
|
/** Drop a single entry from history (clears its module first). No-op when unknown. */
|