@tileflow/core 0.1.0-alpha.44 → 0.1.0-alpha.46
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/README.md +103 -61
- package/dist/{3d-CW5Ls0An.d.ts → 3d-EHN80Dhw.d.ts} +16 -1
- package/dist/3d.d.ts +1 -1
- package/dist/3d.js +312 -152
- package/dist/browser.d.ts +180 -9
- package/dist/browser.js +4209 -801
- package/dist/build.d.ts +15 -5
- package/dist/build.js +1161 -167
- package/dist/config-reference.json +93 -44
- package/dist/{icon-composition-Bbw9umUA.d.ts → icon-composition-Dph-24oC.d.ts} +11 -2
- package/dist/index.d.ts +7 -7
- package/dist/index.js +1022 -487
- package/dist/{manifest-types-CwjHd4qc.d.ts → manifest-types-GeYn0SQM.d.ts} +102 -2
- package/dist/manifest.d.ts +2 -2
- package/dist/manifest.js +13 -1
- package/dist/native-profile.d.ts +4 -0
- package/dist/native.d.ts +8 -1
- package/dist/native.js +66 -7
- package/dist/runtime.d.ts +1 -1
- package/dist/runtime.js +3081 -28
- package/dist/worker/camera-tile-worker.global.js +2 -2
- package/package.json +1 -1
package/dist/browser.d.ts
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
import { T as TileflowSymbolStyle, a as TileflowThemeImageValue, b as TileflowThemeColorValue, c as TileflowMarkerSymbolStyle, d as TileflowAreaStyle, e as TileflowLineStackStyle, f as TileflowLineHatchStyle, g as TileflowIconStyle, h as TileflowLinePaint, i as TileflowThemeNumberValue, j as TileflowNumberStyleValue, k as TileflowCircleStyle, l as TileflowLineStyle, m as TileflowFillStyle, n as TileflowExtrusionStyle, o as TileflowThemeValue, p as TileflowBackgroundStyle, q as TileflowSymbolPlacement, r as TileflowVegetationModuleConfig, s as TileflowTileLayer, t as TileflowMap3DOptions, u as TileflowMap3D, v as TileflowViewMode, w as TileflowBuildings3DChange, x as TileflowSun } from './3d-
|
|
2
|
-
export { y as TileflowBuildings3D, z as TileflowBuildings3DMap, A as TileflowBuildings3DOptions, B as TileflowBuildings3DThemes, C as TileflowCameraOptions, D as TileflowMap3DMap, E as TileflowStreetLights, F as TileflowStreetLightsMap, G as TileflowStreetLightsOptions, H as TileflowSunPreset, I as TileflowTile, J as TileflowTileAddress, K as TileflowTileAreaRequest, L as TileflowTileFeature, M as TileflowTileGeometryType, N as TileflowTileReader, O as TileflowTileReaderOptions, P as TileflowTileRequestTransform, Q as TileflowTileSourceMap, R as TileflowTreeFields, S as TileflowTreeForm, U as TileflowTreeFormMix, V as TileflowTreeFormRange, W as TileflowTreeLayers, X as TileflowTreePlacement, Y as TileflowTreePlacementOptions, Z as TileflowTreeRange, _ as TileflowTreeRegion, $ as TileflowTrees3D, a0 as TileflowTrees3DChange, a1 as TileflowTrees3DMap, a2 as TileflowTrees3DOptions, a3 as TileflowTrees3DThemes, a4 as TileflowVectorTileDecodeOptions, a5 as TileflowVegetation3D, a6 as TileflowVegetationController, a7 as TileflowVegetationDisplay, a8 as TileflowVegetationOptions, a9 as TileflowVegetationRepresentation, aa as createTileflowBuildings3D, ab as createTileflowMap3D, ac as createTileflowStreetLights, ad as createTileflowTileReader, ae as createTileflowTrees3D, af as createTileflowVegetation, ag as decodeTileflowVectorTile, ah as mixTileflowSunPresets, ai as placeTileflowTrees, aj as readTileflowMapTileSource, ak as readTileflowSunPreset, al as readTileflowVegetation3D, am as readTileflowVegetationDisplay, an as resolveTileflowSun, ao as resolveTileflowVegetationRepresentation, ap as tileflowBuildings3DLayerId, aq as tileflowDefaultSunPreset, ar as tileflowStreetLightsLayerId, as as tileflowStyleSunPreset, at as tileflowSunDirection, au as tileflowSunMetadataKey, av as tileflowSunPosition, aw as tileflowTilePointToLngLat, ax as tileflowTilesForBounds, ay as tileflowTreeBytes, az as tileflowTreeFormOf, aA as tileflowTreeForms, aB as tileflowTrees3DLayerId, aC as tileflowVegetationDisplayMetadataKey, aD as tileflowVegetationMetadataKey } from './3d-
|
|
1
|
+
import { T as TileflowSymbolStyle, a as TileflowThemeImageValue, b as TileflowThemeColorValue, c as TileflowMarkerSymbolStyle, d as TileflowAreaStyle, e as TileflowLineStackStyle, f as TileflowLineHatchStyle, g as TileflowIconStyle, h as TileflowLinePaint, i as TileflowThemeNumberValue, j as TileflowNumberStyleValue, k as TileflowCircleStyle, l as TileflowLineStyle, m as TileflowFillStyle, n as TileflowExtrusionStyle, o as TileflowThemeValue, p as TileflowBackgroundStyle, q as TileflowSymbolPlacement, r as TileflowVegetationModuleConfig, s as TileflowTileLayer, t as TileflowMap3DOptions, u as TileflowMap3D, v as TileflowViewMode, w as TileflowBuildings3DChange, x as TileflowSun } from './3d-EHN80Dhw.js';
|
|
2
|
+
export { y as TileflowBuildings3D, z as TileflowBuildings3DMap, A as TileflowBuildings3DOptions, B as TileflowBuildings3DThemes, C as TileflowCameraOptions, D as TileflowMap3DMap, E as TileflowStreetLights, F as TileflowStreetLightsMap, G as TileflowStreetLightsOptions, H as TileflowSunPreset, I as TileflowTile, J as TileflowTileAddress, K as TileflowTileAreaRequest, L as TileflowTileFeature, M as TileflowTileGeometryType, N as TileflowTileReader, O as TileflowTileReaderOptions, P as TileflowTileRequestTransform, Q as TileflowTileSourceMap, R as TileflowTreeFields, S as TileflowTreeForm, U as TileflowTreeFormMix, V as TileflowTreeFormRange, W as TileflowTreeLayers, X as TileflowTreePlacement, Y as TileflowTreePlacementOptions, Z as TileflowTreeRange, _ as TileflowTreeRegion, $ as TileflowTrees3D, a0 as TileflowTrees3DChange, a1 as TileflowTrees3DMap, a2 as TileflowTrees3DOptions, a3 as TileflowTrees3DThemes, a4 as TileflowVectorTileDecodeOptions, a5 as TileflowVegetation3D, a6 as TileflowVegetationController, a7 as TileflowVegetationDisplay, a8 as TileflowVegetationOptions, a9 as TileflowVegetationRepresentation, aa as createTileflowBuildings3D, ab as createTileflowMap3D, ac as createTileflowStreetLights, ad as createTileflowTileReader, ae as createTileflowTrees3D, af as createTileflowVegetation, ag as decodeTileflowVectorTile, ah as mixTileflowSunPresets, ai as placeTileflowTrees, aj as readTileflowMapTileSource, ak as readTileflowSunPreset, al as readTileflowVegetation3D, am as readTileflowVegetationDisplay, an as resolveTileflowSun, ao as resolveTileflowVegetationRepresentation, ap as tileflowBuildings3DLayerId, aq as tileflowDefaultSunPreset, ar as tileflowStreetLightsLayerId, as as tileflowStyleSunPreset, at as tileflowSunDirection, au as tileflowSunMetadataKey, av as tileflowSunPosition, aw as tileflowTilePointToLngLat, ax as tileflowTilesForBounds, ay as tileflowTreeBytes, az as tileflowTreeFormOf, aA as tileflowTreeForms, aB as tileflowTrees3DLayerId, aC as tileflowVegetationDisplayMetadataKey, aD as tileflowVegetationMetadataKey } from './3d-EHN80Dhw.js';
|
|
3
3
|
|
|
4
4
|
type TileflowColor = `#${string}`;
|
|
5
|
+
type TileflowViewConfig = {
|
|
6
|
+
bearing?: number;
|
|
7
|
+
center?: readonly [number, number];
|
|
8
|
+
pitch?: number;
|
|
9
|
+
zoom?: number;
|
|
10
|
+
};
|
|
5
11
|
type TileflowRoadDetail = 'none' | 'highways' | 'major' | 'streets' | 'all';
|
|
6
12
|
type TileflowRoadClass = 'motorway' | 'trunk' | 'primary' | 'secondary' | 'tertiary' | 'minor' | 'service' | 'track' | 'pathway' | 'footway' | 'cycleway' | 'steps' | 'pedestrian';
|
|
7
13
|
type TileflowRoadHierarchy = 'subtle' | 'clear' | 'strong';
|
|
@@ -229,6 +235,10 @@ type MapLibreStyle = {
|
|
|
229
235
|
version: 8;
|
|
230
236
|
name: string;
|
|
231
237
|
glyphs?: string;
|
|
238
|
+
'font-faces'?: Record<string, string | {
|
|
239
|
+
url: string;
|
|
240
|
+
'unicode-range'?: string[];
|
|
241
|
+
}>;
|
|
232
242
|
light?: TileflowLight;
|
|
233
243
|
projection?: {
|
|
234
244
|
type: TileflowProjection;
|
|
@@ -280,6 +290,8 @@ declare function tileflowSunLightMatrix(direction: readonly number[], box: Shado
|
|
|
280
290
|
fit: ShadowFit;
|
|
281
291
|
};
|
|
282
292
|
|
|
293
|
+
type TileflowColorOverrides = Readonly<Record<string, string>>;
|
|
294
|
+
|
|
283
295
|
/** Inputs to one fixed-size, application-owned RGBA image. */
|
|
284
296
|
type TileflowDynamicImageContext = Readonly<{
|
|
285
297
|
theme: string;
|
|
@@ -514,8 +526,10 @@ type TileflowBuildingsThreeDimensionalStyle = {
|
|
|
514
526
|
* from the ground, and zooming out it sinks and fades again. Defaults to the 0.3 zooms from the
|
|
515
527
|
* renderer's `minzoom` (15) for the buildings, and to the 0.4 zooms from 0.8 before it for the
|
|
516
528
|
* placed models and landmarks, which stand first. With reduced motion they only fade.
|
|
529
|
+
* False shows each part at full height and opacity as soon as its default entrance zoom is reached.
|
|
530
|
+
* Equal band endpoints show that part immediately at the chosen zoom.
|
|
517
531
|
*/
|
|
518
|
-
entrance?: {
|
|
532
|
+
entrance?: false | {
|
|
519
533
|
buildings?: readonly [number, number];
|
|
520
534
|
models?: readonly [number, number];
|
|
521
535
|
};
|
|
@@ -796,6 +810,12 @@ type TileflowSemanticModules = {
|
|
|
796
810
|
};
|
|
797
811
|
type TileflowSemanticModuleName = keyof TileflowSemanticModules;
|
|
798
812
|
|
|
813
|
+
/** Artistic presets; selecting one never starts a clock or moves the real sun. */
|
|
814
|
+
declare const tileflowTimesOfDay: readonly ["day", "dawn", "dusk", "night"];
|
|
815
|
+
type TileflowTimeOfDay = (typeof tileflowTimesOfDay)[number];
|
|
816
|
+
/** A named theme family points to complete, already compiled themes. */
|
|
817
|
+
type TileflowTimeOfDayVariants = Readonly<Record<string, Readonly<Partial<Record<TileflowTimeOfDay, string>>>>>;
|
|
818
|
+
|
|
799
819
|
type TileflowThemeColorScheme = 'dark' | 'light';
|
|
800
820
|
|
|
801
821
|
declare const tileflowRouteMetadataKey = "tileflow:route";
|
|
@@ -837,6 +857,79 @@ declare function tileflowStyleRouteInks(style: {
|
|
|
837
857
|
declare function mixTileflowRouteInks(from: TileflowRouteInks, to: TileflowRouteInks, t: number): TileflowRouteInks;
|
|
838
858
|
|
|
839
859
|
type TileflowRuntimeColorScheme = 'dark' | 'light';
|
|
860
|
+
type TileflowRuntimeManifestTheme = {
|
|
861
|
+
colorScheme: TileflowRuntimeColorScheme;
|
|
862
|
+
/** Complete font closure for this compiled theme. */
|
|
863
|
+
fontFaces?: TileflowStyleFontFace[];
|
|
864
|
+
/** Content or deployment revision used for cache identity and receipts. */
|
|
865
|
+
revision?: string;
|
|
866
|
+
/** Hosted style identity, when different from the logical map identity. */
|
|
867
|
+
styleId?: string;
|
|
868
|
+
styleUrl: string;
|
|
869
|
+
};
|
|
870
|
+
type TileflowRuntimeSystemThemes = {
|
|
871
|
+
dark: string;
|
|
872
|
+
light: string;
|
|
873
|
+
};
|
|
874
|
+
type TileflowRuntimeManifestMapEntry = {
|
|
875
|
+
/** One shared document for every appearance; styleUrl remains the flat export. */
|
|
876
|
+
familyUrl?: string;
|
|
877
|
+
apiUrl?: string;
|
|
878
|
+
defaultTheme: string;
|
|
879
|
+
environment?: string;
|
|
880
|
+
mapId?: string;
|
|
881
|
+
systemThemes?: TileflowRuntimeSystemThemes;
|
|
882
|
+
themes: Record<string, TileflowRuntimeManifestTheme>;
|
|
883
|
+
timeOfDay?: TileflowTimeOfDayVariants;
|
|
884
|
+
usageMode?: 'session';
|
|
885
|
+
view?: TileflowViewConfig;
|
|
886
|
+
worldGeneration?: 'v1';
|
|
887
|
+
};
|
|
888
|
+
|
|
889
|
+
type Json = null | boolean | number | string | Json[] | {
|
|
890
|
+
[key: string]: Json;
|
|
891
|
+
};
|
|
892
|
+
type TileflowFamilyUpdate = readonly [layer: number, property: string];
|
|
893
|
+
/** A shared cartography document. Parameter columns are storage identities, not color tokens. */
|
|
894
|
+
type TileflowStyleFamily = Readonly<{
|
|
895
|
+
kind: 'tileflow-style-family';
|
|
896
|
+
version: 1;
|
|
897
|
+
themes: readonly string[];
|
|
898
|
+
template: Json;
|
|
899
|
+
parameters: readonly (readonly Json[])[];
|
|
900
|
+
/** Literal shared subtrees. Entries are never interpreted as references. */
|
|
901
|
+
constants: readonly Json[];
|
|
902
|
+
updates: Readonly<{
|
|
903
|
+
/** False means that this family contains structural alternatives requiring a style change. */
|
|
904
|
+
appearanceOnly: boolean;
|
|
905
|
+
paint: readonly TileflowFamilyUpdate[];
|
|
906
|
+
roots: readonly ('light' | 'sky')[];
|
|
907
|
+
}>;
|
|
908
|
+
}>;
|
|
909
|
+
|
|
910
|
+
/** Prepare the initial appearance before constructing MapLibre; subsequent changes reuse this family. */
|
|
911
|
+
declare function loadTileflowRuntimeAppearance(style: TileflowRuntimeStyle, options?: {
|
|
912
|
+
fetch?: typeof fetch;
|
|
913
|
+
signal?: AbortSignal;
|
|
914
|
+
}): Promise<TileflowRuntimeStyle>;
|
|
915
|
+
|
|
916
|
+
type TileflowAppearanceSelection = Readonly<{
|
|
917
|
+
palette?: string;
|
|
918
|
+
} & ({
|
|
919
|
+
mode: 'fixed';
|
|
920
|
+
moment?: TileflowTimeOfDay;
|
|
921
|
+
} | {
|
|
922
|
+
mode: 'system';
|
|
923
|
+
light: TileflowTimeOfDay;
|
|
924
|
+
dark: TileflowTimeOfDay;
|
|
925
|
+
} | {
|
|
926
|
+
mode: 'clock';
|
|
927
|
+
schedule: readonly Readonly<{
|
|
928
|
+
hour: number;
|
|
929
|
+
moment: TileflowTimeOfDay;
|
|
930
|
+
}>[];
|
|
931
|
+
blend?: boolean;
|
|
932
|
+
})>;
|
|
840
933
|
|
|
841
934
|
type TileflowAnalytics = {
|
|
842
935
|
apiUrl?: string;
|
|
@@ -854,7 +947,15 @@ type TileflowSessionController = {
|
|
|
854
947
|
readonly sessionId: string;
|
|
855
948
|
resolveRequestUrl(url: string, analytics: TileflowAnalytics | undefined): Promise<string | undefined>;
|
|
856
949
|
};
|
|
950
|
+
/** Runtime-ready logical map with all relative theme resources already resolved. */
|
|
951
|
+
type TileflowRuntimeManifestMap = TileflowRuntimeManifestMapEntry & {
|
|
952
|
+
apiUrl?: string;
|
|
953
|
+
name: string;
|
|
954
|
+
};
|
|
857
955
|
type TileflowRuntimeStyle = {
|
|
956
|
+
/** Shared validated family used for appearance updates without replacing the style. */
|
|
957
|
+
family?: TileflowStyleFamily;
|
|
958
|
+
familyUrl?: string;
|
|
858
959
|
analytics?: TileflowAnalytics;
|
|
859
960
|
colorScheme?: TileflowRuntimeColorScheme;
|
|
860
961
|
/** An explicit empty array means the manifest declares that no web fonts are required. */
|
|
@@ -881,6 +982,33 @@ type TileflowThemeBlendSelection = Readonly<{
|
|
|
881
982
|
themes: readonly string[];
|
|
882
983
|
}>;
|
|
883
984
|
|
|
985
|
+
/** Request options understood by both fetch and MapLibre's transformRequest. */
|
|
986
|
+
type StyleResourceRequest = {
|
|
987
|
+
url: string;
|
|
988
|
+
headers?: Record<string, string>;
|
|
989
|
+
credentials?: RequestCredentials;
|
|
990
|
+
method?: string;
|
|
991
|
+
body?: string;
|
|
992
|
+
cache?: RequestCache;
|
|
993
|
+
};
|
|
994
|
+
type TileflowRuntimeStyleLoadOptions = {
|
|
995
|
+
/** The declaring document URL for an inline style; otherwise defaults to document.baseURI. */
|
|
996
|
+
baseUrl?: string;
|
|
997
|
+
fetch?: typeof globalThis.fetch;
|
|
998
|
+
signal?: AbortSignal;
|
|
999
|
+
/** Use the same authentication and URL rewrite rules as the map. */
|
|
1000
|
+
transformRequest?: (url: string, resourceType: 'Style' | 'Source') => StyleResourceRequest | undefined | Promise<StyleResourceRequest | undefined>;
|
|
1001
|
+
};
|
|
1002
|
+
type TileflowLoadedRuntimeStyle = TileflowRuntimeStyle & {
|
|
1003
|
+
style: MapLibreStyle;
|
|
1004
|
+
};
|
|
1005
|
+
/**
|
|
1006
|
+
* Loads a portable style before passing it to MapLibre. Each resource is resolved against the
|
|
1007
|
+
* document that declares it, including tiles in HTTP TileJSON documents. Inputs are not mutated.
|
|
1008
|
+
* Custom source protocols stay with the map's registered protocol handler.
|
|
1009
|
+
*/
|
|
1010
|
+
declare function loadTileflowRuntimeStyle(runtime: TileflowRuntimeStyle, options?: TileflowRuntimeStyleLoadOptions): Promise<TileflowLoadedRuntimeStyle>;
|
|
1011
|
+
|
|
884
1012
|
/**
|
|
885
1013
|
* Map emphasis lets an application's own content read first: chosen modules of the map recede
|
|
886
1014
|
* towards the map's ground colour, and the map's labels and icons fade, except inside an area the
|
|
@@ -1462,9 +1590,9 @@ type TileflowBuildings3DDesign = Readonly<{
|
|
|
1462
1590
|
/**
|
|
1463
1591
|
* The zoom bands, `[from, to]`, the buildings and the placed models and landmarks come in over:
|
|
1464
1592
|
* across its band each fades in and rises from the ground. The renderer's defaults stand for a
|
|
1465
|
-
* band left out.
|
|
1593
|
+
* band left out. False disables zoom-driven growth and fading; equal endpoints choose an instant entrance.
|
|
1466
1594
|
*/
|
|
1467
|
-
entrance?: Readonly<{
|
|
1595
|
+
entrance?: false | Readonly<{
|
|
1468
1596
|
buildings?: readonly [number, number];
|
|
1469
1597
|
models?: readonly [number, number];
|
|
1470
1598
|
}>;
|
|
@@ -1493,7 +1621,7 @@ type TileflowBuildings3DDesign = Readonly<{
|
|
|
1493
1621
|
type TileflowBuildingModelPlacement = Readonly<{
|
|
1494
1622
|
/** The model's id, its file's name in the map's `models` directories. */
|
|
1495
1623
|
model: string;
|
|
1496
|
-
/** Where the prepared model file is served
|
|
1624
|
+
/** Where the prepared model file is served; the web style loader resolves it against the style. */
|
|
1497
1625
|
url: string;
|
|
1498
1626
|
/** Longitude and latitude of the model's origin, where it stands on the ground. */
|
|
1499
1627
|
at: readonly [number, number];
|
|
@@ -2039,6 +2167,38 @@ declare function tileflowLightRhythm(light: TileflowLightCharacteristic): Tilefl
|
|
|
2039
2167
|
/** What `rhythm` shows `seconds` after the shared epoch of every rhythm. */
|
|
2040
2168
|
declare function tileflowLightStateAt(rhythm: TileflowLightRhythm, seconds: number): TileflowLightState;
|
|
2041
2169
|
|
|
2170
|
+
/** Optional application-owned automation. No controls, geolocation, or persistent preferences. */
|
|
2171
|
+
declare function createTileflowAppearanceController(options: {
|
|
2172
|
+
map: TileflowRuntimeManifestMap;
|
|
2173
|
+
controller: Pick<TileflowThemeController, 'setTheme' | 'setBlend'>;
|
|
2174
|
+
initial: TileflowAppearanceSelection;
|
|
2175
|
+
resolve(theme: string): TileflowRuntimeStyle;
|
|
2176
|
+
now?: () => Date;
|
|
2177
|
+
onResult?: (result: TileflowThemeTransitionResult) => void;
|
|
2178
|
+
}): {
|
|
2179
|
+
ready: Promise<Readonly<{
|
|
2180
|
+
error?: Error;
|
|
2181
|
+
status: "applied" | "failed" | "superseded";
|
|
2182
|
+
theme?: string;
|
|
2183
|
+
}>>;
|
|
2184
|
+
refresh: () => Promise<Readonly<{
|
|
2185
|
+
error?: Error;
|
|
2186
|
+
status: "applied" | "failed" | "superseded";
|
|
2187
|
+
theme?: string;
|
|
2188
|
+
}>>;
|
|
2189
|
+
set(next: TileflowAppearanceSelection): Promise<Readonly<{
|
|
2190
|
+
error?: Error;
|
|
2191
|
+
status: "applied" | "failed" | "superseded";
|
|
2192
|
+
theme?: string;
|
|
2193
|
+
}>> | Promise<{
|
|
2194
|
+
readonly status: "superseded";
|
|
2195
|
+
}> | Promise<{
|
|
2196
|
+
readonly status: "failed";
|
|
2197
|
+
readonly error: Error;
|
|
2198
|
+
}>;
|
|
2199
|
+
dispose(): void;
|
|
2200
|
+
};
|
|
2201
|
+
|
|
2042
2202
|
type Handler = (request: {
|
|
2043
2203
|
url: string;
|
|
2044
2204
|
}, abort: AbortController) => Promise<{
|
|
@@ -2179,6 +2339,8 @@ type TileflowThemeTransitionOptions = Readonly<{
|
|
|
2179
2339
|
duration?: number;
|
|
2180
2340
|
}>;
|
|
2181
2341
|
type TileflowThemeChangeOptions = Readonly<{
|
|
2342
|
+
/** Rebuild the style to retry failed renderer resources, bypassing appearance-only updates. */
|
|
2343
|
+
rebuild?: boolean;
|
|
2182
2344
|
transition?: TileflowThemeTransitionOptions;
|
|
2183
2345
|
}>;
|
|
2184
2346
|
/**
|
|
@@ -2243,6 +2405,9 @@ type TileflowSunRequest = Readonly<{
|
|
|
2243
2405
|
location?: readonly [number, number];
|
|
2244
2406
|
}>;
|
|
2245
2407
|
type TileflowThemeController = {
|
|
2408
|
+
/** Replace named colour overrides; an empty record restores the map author's colours. */
|
|
2409
|
+
setColors(colors: TileflowColorOverrides, options?: TileflowThemeChangeOptions): Promise<TileflowThemeTransitionResult>;
|
|
2410
|
+
getColors(): TileflowColorOverrides;
|
|
2246
2411
|
dispose(): void;
|
|
2247
2412
|
/** Own a fixed-size RGBA image with a stable name across themes, restored after style reloads. */
|
|
2248
2413
|
registerImage(name: string, image: TileflowDynamicImage): TileflowDynamicImageHandle;
|
|
@@ -2310,13 +2475,19 @@ type TileflowThemeController = {
|
|
|
2310
2475
|
};
|
|
2311
2476
|
/**
|
|
2312
2477
|
* Transactionally changes a MapLibre style while preserving the map instance and camera.
|
|
2313
|
-
*
|
|
2478
|
+
* Themes preload their documents and fonts independently; style application is serialized and
|
|
2479
|
+
* the last request wins.
|
|
2314
2480
|
*/
|
|
2315
2481
|
declare function createTileflowThemeController(options: {
|
|
2316
2482
|
initial: TileflowRuntimeStyle;
|
|
2483
|
+
/** The prepared initial document already given to the map, when initial.style is a URL. */
|
|
2484
|
+
initialStyle?: MapLibreStyle;
|
|
2317
2485
|
loadFonts?: (style: TileflowRuntimeStyle) => Promise<void>;
|
|
2318
|
-
/**
|
|
2486
|
+
/** Override document preparation, for example for a native resource transport. */
|
|
2319
2487
|
loadStyle?: (url: string) => Promise<MapLibreStyle>;
|
|
2488
|
+
/** Request policy used for style and TileJSON preparation, including theme changes and blends. */
|
|
2489
|
+
styleLoadOptions?: TileflowRuntimeStyleLoadOptions;
|
|
2490
|
+
loadFamily?: (url: string) => Promise<TileflowStyleFamily>;
|
|
2320
2491
|
map: TileflowStyleSwitchMap;
|
|
2321
2492
|
onTransition?: (transition: TileflowThemeTransition) => void;
|
|
2322
2493
|
timeoutMs?: number;
|
|
@@ -2387,4 +2558,4 @@ declare function createTileflowTransformRequest<TRequest extends TileflowTransfo
|
|
|
2387
2558
|
worldRequestBridge?: TileflowWorldRequestBridge;
|
|
2388
2559
|
}): TileflowTransformRequest<TRequest, TResourceType>;
|
|
2389
2560
|
|
|
2390
|
-
export { type AttachTileflowMap3DOptions, type CreateBoundaryFeatureStateOptions, type TileflowAtmosphereMap, type TileflowAtmosphereRuntimeOptions, type TileflowBoundaryFeatureState, type TileflowBrowserThemeBlendSelection, type TileflowBuildingMesh, type TileflowBuildingMeshOptions, type TileflowBuildingModelPlacement, TileflowBuildings3DChange, type TileflowBuildings3DDesign, type TileflowComposedRequest, type TileflowContourProtocolHandler, type TileflowContourProtocolRegistrationOptions, type TileflowContourProtocolRegistry, type TileflowContourProtocolRequest, type TileflowContourProtocolResponse, type TileflowDepthMarker, type TileflowDepthMarkerHandle, type TileflowDepthMarkerMap, type TileflowDepthMarkers, type TileflowDepthMarkersOptions, type TileflowDynamicImage, type TileflowDynamicImageContext, type TileflowDynamicImageHandle, type TileflowEmphasis, type TileflowEmphasisArea, type TileflowEmphasisModule, type TileflowFairUseNotice, type TileflowFairUseNoticeController, type TileflowFairUseNoticeState, type TileflowFeatureStateMap, type TileflowFrameScheduler, type TileflowGroundLayer, type TileflowGroundLayers, type TileflowGroundLayersMap, type TileflowGroundLayersOptions, type TileflowGroundOrderMap, type TileflowHorizonQueryMap, type TileflowLabelPlacementMap, type TileflowLightCharacteristic, type TileflowLightPhase, type TileflowLightRhythm, type TileflowLightState, type TileflowLineProgressAnimation, type TileflowLineProgressController, type TileflowLineProgressGradientOptions, type TileflowLineProgressLayer, type TileflowLineProgressMap, type TileflowLineProgressOptions, type TileflowLineProgressShown, type TileflowLineProgressState, TileflowMap3D, type TileflowMap3DAttachment, type TileflowMap3DLoader, TileflowMap3DOptions, type TileflowMap3DSource, type TileflowMapLifecycleAttachment, type TileflowMapLifecycleEvent, type TileflowMapLifecycleSubscriber, type TileflowMapNotice, type TileflowMapReadinessState, type TileflowNauticalLights, type TileflowNauticalLightsMap, type TileflowNoticeControl, type TileflowNoticeControlPosition, type TileflowNoticesMap, type TileflowNoticesOptions, type TileflowPathGroundRegistry, type TileflowPmtilesProtocolHandler, type TileflowPmtilesProtocolRegistrationOptions, type TileflowPmtilesProtocolRegistry, type TileflowRouteInks, type TileflowSessionSender, type TileflowSessionStarter, type TileflowShotCamera, type TileflowShotCue, type TileflowShotKeyframe, type TileflowShotMotion, type TileflowShotPlayback, type TileflowShotPlaybackOptions, type TileflowShotPlayerMap, type TileflowShotState, type TileflowSkyColours, type TileflowSkyHazeMap, type TileflowSkyMap, type TileflowSkyMetadata, type TileflowSkyTimesOfDay, type TileflowStreetLightEstimate, type TileflowStreetLightLayers, type TileflowStreetLightPlacement, type TileflowStreetLightPlacementOptions, type TileflowStreetLightsDesign, type TileflowStyleFontLoadOptions, type TileflowStyleStateValue, type TileflowStyleSwitchMap, TileflowSun, type TileflowSunRequest, type TileflowThemeBlendRequest, type TileflowThemeBlendState, type TileflowThemeChangeOptions, type TileflowThemeController, type TileflowThemeTransition, type TileflowThemeTransitionOptions, type TileflowThemeTransitionPhase, type TileflowThemeTransitionResult, TileflowTileLayer, type TileflowTransformRequest, type TileflowTransformRequestParameters, type TileflowUserTransformRequest, TileflowViewMode, type TileflowWorldProtocolHandler, type TileflowWorldProtocolRequest, type TileflowWorldProtocolResponse, type TileflowWorldRequestBridge, attachTileflowAtmosphere, attachTileflowFairUseNotice, attachTileflowHorizonQueries, attachTileflowLabelPlacement, attachTileflowMap3D, attachTileflowMapLifecycle, attachTileflowNauticalLights, attachTileflowNotices, attachTileflowSky, attachTileflowSkyHaze, createBoundaryFeatureState, createTileflowDepthMarkers, createTileflowGroundLayers, createTileflowLineProgress, createTileflowSessionStarter, createTileflowThemeController, createTileflowTransformRequest, getTileflowSystemColorScheme, loadTileflowStyleFonts, meshTileflowBuildings, mixTileflowRouteInks, placeTileflowStreetLights, playTileflowShot, readTileflowBuildings3D, readTileflowNauticalLights, readTileflowNotices, readTileflowRouteInks, readTileflowSky, readTileflowStreetLights, readTileflowTeamModelName, registerTileflowContourProtocol, registerTileflowPathGroundProtocol, registerTileflowPmtilesProtocol, registerTileflowWorldRequestBridge, subscribeTileflowSystemColorScheme, tileflowBuildingExtent, tileflowBuildingModelPlacementLimit, tileflowBuildingVertexBytes, tileflowBuildingsMetadataKey, tileflowCanvasContextAttributes, tileflowDefaultRouteInks, tileflowDepthMarkerPlacement, tileflowFairUseNoticeMessage, tileflowGroundBeforeId, tileflowHorizonScaleFactor, tileflowLayerDomainMetadataKey, tileflowLightRhythm, tileflowLightRhythmConventions, tileflowLightStateAt, tileflowLineProgressGradient, tileflowMap3DDeclarations, tileflowMap3DMetadataKeys, tileflowMapDeclares3D, tileflowMaplibreContourVersion, tileflowMaxPitch, tileflowNauticalLightStates, tileflowNauticalLightsMetadataKey, tileflowNoticeLimits, tileflowNoticesMetadataKey, tileflowPmtilesMaximumDirectoryDepth, tileflowPmtilesProtocol, tileflowRouteMetadataKey, tileflowShotStateAt, tileflowSkyAtSun, tileflowSkyHazeLayerId, tileflowSkyLayerId, tileflowSkyMetadataKey, tileflowStreetLightBytes, tileflowStreetLightsMetadataKey, tileflowStyleRouteInks, tileflowSunLightMatrix, tileflowTeamModelUrl, validateTileflowBrowserThemeBlendSelection, validateTileflowEmphasis };
|
|
2561
|
+
export { type AttachTileflowMap3DOptions, type CreateBoundaryFeatureStateOptions, type TileflowAppearanceSelection, type TileflowAtmosphereMap, type TileflowAtmosphereRuntimeOptions, type TileflowBoundaryFeatureState, type TileflowBrowserThemeBlendSelection, type TileflowBuildingMesh, type TileflowBuildingMeshOptions, type TileflowBuildingModelPlacement, TileflowBuildings3DChange, type TileflowBuildings3DDesign, type TileflowColorOverrides, type TileflowComposedRequest, type TileflowContourProtocolHandler, type TileflowContourProtocolRegistrationOptions, type TileflowContourProtocolRegistry, type TileflowContourProtocolRequest, type TileflowContourProtocolResponse, type TileflowDepthMarker, type TileflowDepthMarkerHandle, type TileflowDepthMarkerMap, type TileflowDepthMarkers, type TileflowDepthMarkersOptions, type TileflowDynamicImage, type TileflowDynamicImageContext, type TileflowDynamicImageHandle, type TileflowEmphasis, type TileflowEmphasisArea, type TileflowEmphasisModule, type TileflowFairUseNotice, type TileflowFairUseNoticeController, type TileflowFairUseNoticeState, type TileflowFeatureStateMap, type TileflowFrameScheduler, type TileflowGroundLayer, type TileflowGroundLayers, type TileflowGroundLayersMap, type TileflowGroundLayersOptions, type TileflowGroundOrderMap, type TileflowHorizonQueryMap, type TileflowLabelPlacementMap, type TileflowLightCharacteristic, type TileflowLightPhase, type TileflowLightRhythm, type TileflowLightState, type TileflowLineProgressAnimation, type TileflowLineProgressController, type TileflowLineProgressGradientOptions, type TileflowLineProgressLayer, type TileflowLineProgressMap, type TileflowLineProgressOptions, type TileflowLineProgressShown, type TileflowLineProgressState, type TileflowLoadedRuntimeStyle, TileflowMap3D, type TileflowMap3DAttachment, type TileflowMap3DLoader, TileflowMap3DOptions, type TileflowMap3DSource, type TileflowMapLifecycleAttachment, type TileflowMapLifecycleEvent, type TileflowMapLifecycleSubscriber, type TileflowMapNotice, type TileflowMapReadinessState, type TileflowNauticalLights, type TileflowNauticalLightsMap, type TileflowNoticeControl, type TileflowNoticeControlPosition, type TileflowNoticesMap, type TileflowNoticesOptions, type TileflowPathGroundRegistry, type TileflowPmtilesProtocolHandler, type TileflowPmtilesProtocolRegistrationOptions, type TileflowPmtilesProtocolRegistry, type TileflowRouteInks, type TileflowRuntimeStyleLoadOptions, type TileflowSessionSender, type TileflowSessionStarter, type TileflowShotCamera, type TileflowShotCue, type TileflowShotKeyframe, type TileflowShotMotion, type TileflowShotPlayback, type TileflowShotPlaybackOptions, type TileflowShotPlayerMap, type TileflowShotState, type TileflowSkyColours, type TileflowSkyHazeMap, type TileflowSkyMap, type TileflowSkyMetadata, type TileflowSkyTimesOfDay, type TileflowStreetLightEstimate, type TileflowStreetLightLayers, type TileflowStreetLightPlacement, type TileflowStreetLightPlacementOptions, type TileflowStreetLightsDesign, type TileflowStyleFontLoadOptions, type TileflowStyleStateValue, type TileflowStyleSwitchMap, TileflowSun, type TileflowSunRequest, type TileflowThemeBlendRequest, type TileflowThemeBlendState, type TileflowThemeChangeOptions, type TileflowThemeController, type TileflowThemeTransition, type TileflowThemeTransitionOptions, type TileflowThemeTransitionPhase, type TileflowThemeTransitionResult, TileflowTileLayer, type TileflowTransformRequest, type TileflowTransformRequestParameters, type TileflowUserTransformRequest, TileflowViewMode, type TileflowWorldProtocolHandler, type TileflowWorldProtocolRequest, type TileflowWorldProtocolResponse, type TileflowWorldRequestBridge, attachTileflowAtmosphere, attachTileflowFairUseNotice, attachTileflowHorizonQueries, attachTileflowLabelPlacement, attachTileflowMap3D, attachTileflowMapLifecycle, attachTileflowNauticalLights, attachTileflowNotices, attachTileflowSky, attachTileflowSkyHaze, createBoundaryFeatureState, createTileflowAppearanceController, createTileflowDepthMarkers, createTileflowGroundLayers, createTileflowLineProgress, createTileflowSessionStarter, createTileflowThemeController, createTileflowTransformRequest, getTileflowSystemColorScheme, loadTileflowRuntimeAppearance, loadTileflowRuntimeStyle, loadTileflowStyleFonts, meshTileflowBuildings, mixTileflowRouteInks, placeTileflowStreetLights, playTileflowShot, readTileflowBuildings3D, readTileflowNauticalLights, readTileflowNotices, readTileflowRouteInks, readTileflowSky, readTileflowStreetLights, readTileflowTeamModelName, registerTileflowContourProtocol, registerTileflowPathGroundProtocol, registerTileflowPmtilesProtocol, registerTileflowWorldRequestBridge, subscribeTileflowSystemColorScheme, tileflowBuildingExtent, tileflowBuildingModelPlacementLimit, tileflowBuildingVertexBytes, tileflowBuildingsMetadataKey, tileflowCanvasContextAttributes, tileflowDefaultRouteInks, tileflowDepthMarkerPlacement, tileflowFairUseNoticeMessage, tileflowGroundBeforeId, tileflowHorizonScaleFactor, tileflowLayerDomainMetadataKey, tileflowLightRhythm, tileflowLightRhythmConventions, tileflowLightStateAt, tileflowLineProgressGradient, tileflowMap3DDeclarations, tileflowMap3DMetadataKeys, tileflowMapDeclares3D, tileflowMaplibreContourVersion, tileflowMaxPitch, tileflowNauticalLightStates, tileflowNauticalLightsMetadataKey, tileflowNoticeLimits, tileflowNoticesMetadataKey, tileflowPmtilesMaximumDirectoryDepth, tileflowPmtilesProtocol, tileflowRouteMetadataKey, tileflowShotStateAt, tileflowSkyAtSun, tileflowSkyHazeLayerId, tileflowSkyLayerId, tileflowSkyMetadataKey, tileflowStreetLightBytes, tileflowStreetLightsMetadataKey, tileflowStyleRouteInks, tileflowSunLightMatrix, tileflowTeamModelUrl, validateTileflowBrowserThemeBlendSelection, validateTileflowEmphasis };
|