@tileflow/core 0.1.0-alpha.37 → 0.1.0-alpha.38

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/browser.d.ts CHANGED
@@ -1,3 +1,264 @@
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 TileflowBackgroundStyle, p as TileflowSymbolPlacement, q as TileflowVegetationModuleConfig, r as TileflowTileLayer, s as TileflowMap3DOptions, t as TileflowMap3D, u as TileflowViewMode, v as TileflowSun } from './3d-D9c3i78O.js';
2
+ export { w as TileflowBuildings3D, x as TileflowBuildings3DChange, y as TileflowBuildings3DMap, z as TileflowBuildings3DOptions, A as TileflowBuildings3DThemes, B as TileflowMap3DMap, C as TileflowStreetLights, D as TileflowStreetLightsMap, E as TileflowStreetLightsOptions, F as TileflowSunPreset, G as TileflowTile, H as TileflowTileAddress, I as TileflowTileAreaRequest, J as TileflowTileFeature, K as TileflowTileGeometryType, L as TileflowTileReader, M as TileflowTileReaderOptions, N as TileflowTileRequestTransform, O as TileflowTileSourceMap, P as TileflowTreeFields, Q as TileflowTreeForm, R as TileflowTreeFormMix, S as TileflowTreeFormRange, U as TileflowTreeLayers, V as TileflowTreePlacement, W as TileflowTreePlacementOptions, X as TileflowTreeRange, Y as TileflowTreeRegion, Z as TileflowTrees3D, _ as TileflowTrees3DChange, $ as TileflowTrees3DMap, a0 as TileflowTrees3DOptions, a1 as TileflowTrees3DThemes, a2 as TileflowVectorTileDecodeOptions, a3 as TileflowVegetation3D, a4 as TileflowVegetationController, a5 as TileflowVegetationDisplay, a6 as TileflowVegetationOptions, a7 as TileflowVegetationRepresentation, a8 as createTileflowBuildings3D, a9 as createTileflowMap3D, aa as createTileflowStreetLights, ab as createTileflowTileReader, ac as createTileflowTrees3D, ad as createTileflowVegetation, ae as decodeTileflowVectorTile, af as mixTileflowSunPresets, ag as placeTileflowTrees, ah as readTileflowMapTileSource, ai as readTileflowSunPreset, aj as readTileflowVegetation3D, ak as readTileflowVegetationDisplay, al as resolveTileflowSun, am as resolveTileflowVegetationRepresentation, an as tileflowBuildings3DLayerId, ao as tileflowDefaultSunPreset, ap as tileflowStreetLightsLayerId, aq as tileflowStyleSunPreset, ar as tileflowSunDirection, as as tileflowSunMetadataKey, at as tileflowSunPosition, au as tileflowTilePointToLngLat, av as tileflowTilesForBounds, aw as tileflowTreeBytes, ax as tileflowTreeFormOf, ay as tileflowTreeForms, az as tileflowTrees3DLayerId, aA as tileflowVegetationDisplayMetadataKey, aB as tileflowVegetationMetadataKey } from './3d-D9c3i78O.js';
3
+
4
+ type TileflowColor = `#${string}`;
5
+ type TileflowRoadDetail = 'none' | 'highways' | 'major' | 'streets' | 'all';
6
+ type TileflowRoadClass = 'motorway' | 'trunk' | 'primary' | 'secondary' | 'tertiary' | 'minor' | 'service' | 'track' | 'pathway' | 'footway' | 'cycleway' | 'steps' | 'pedestrian';
7
+ type TileflowRoadHierarchy = 'subtle' | 'clear' | 'strong';
8
+ type TileflowRoadWeight = 'thin' | 'regular' | 'bold';
9
+ type TileflowRoadOutline = 'none' | 'subtle' | 'strong';
10
+ type TileflowRoadStructure = 'bridge' | 'surface' | 'tunnel';
11
+ type TileflowRoadExtras = {
12
+ paths?: boolean;
13
+ };
14
+ type TileflowRoadLayerStyle = TileflowLineStackStyle & {
15
+ hatch?: TileflowLineHatchStyle;
16
+ };
17
+ type TileflowRoadTreatmentLineStyle = Pick<TileflowLinePaint, 'blur' | 'color' | 'dash' | 'gapWidth' | 'offset' | 'opacity' | 'width'>;
18
+ type TileflowRoadTreatmentLayerStyle = {
19
+ casing?: TileflowRoadTreatmentLineStyle;
20
+ fill?: TileflowRoadTreatmentLineStyle;
21
+ shadow?: TileflowRoadTreatmentLineStyle;
22
+ };
23
+ type TileflowRoadTreatmentStyle = Partial<Record<TileflowRoadStructure, TileflowRoadTreatmentLayerStyle>> & {
24
+ enabled?: boolean;
25
+ widthScale?: TileflowThemeNumberValue;
26
+ };
27
+ type TileflowRoadModifier = 'construction' | 'expressway' | 'indoor' | 'official' | 'ramp' | 'unpaved';
28
+ type TileflowRoadRestriction = 'access' | 'bicycle' | 'foot' | 'horse' | 'toll';
29
+ type TileflowMountainBikeScale = '0' | '0+' | '1' | '1+' | '2' | '2+' | '3' | '3+' | '4' | '5' | '6';
30
+ type TileflowRoadServiceType = 'alley' | 'crossover' | 'driveway' | 'parkingAisle' | 'yard';
31
+ type TileflowRoadClassStyle = Partial<Record<TileflowRoadStructure, TileflowRoadLayerStyle>> & {
32
+ enabled?: boolean;
33
+ };
34
+ type TileflowRoadAreaStyle = {
35
+ pedestrian?: TileflowAreaStyle;
36
+ pier?: TileflowAreaStyle;
37
+ road?: TileflowAreaStyle;
38
+ };
39
+ type TileflowRoadCrossingStyle = Omit<TileflowIconStyle, 'image'> & Required<Pick<TileflowIconStyle, 'image'>>;
40
+ type TileflowRoadRoundaboutStyle = {
41
+ /** Extra casing width in pixels, split equally across both edges; defaults to the road border. */
42
+ borderWidth?: TileflowNumberStyleValue;
43
+ casing?: TileflowCircleStyle;
44
+ /** Road width in pixels when metric radii are absent; defaults to the effective surface fill width. */
45
+ fallbackWidth?: TileflowNumberStyleValue;
46
+ fill?: TileflowCircleStyle;
47
+ };
48
+ /**
49
+ * How Core's street lights renderer lights the map's streets at night, from the lamps and lit
50
+ * streets its data holds.
51
+ */
52
+ type TileflowRoadStreetLightStyle = {
53
+ /** The light of lamps whose data gives no colour; a warm white by default. */
54
+ color?: TileflowThemeColorValue;
55
+ /** Whether the map has street lights; defaults to false. Set true to opt in. */
56
+ enabled?: boolean;
57
+ /**
58
+ * Where light is estimated where the data maps no lamps: `lit` (the default) along streets and
59
+ * pavements mapped as lit; `streets` also along streets the data says nothing about, in tiles
60
+ * that map few lamps, which invents light; `none` nowhere.
61
+ */
62
+ estimate?: 'lit' | 'streets' | 'none';
63
+ /** How bright the lights shine, from 0 to 2; defaults to 1. */
64
+ intensity?: TileflowThemeNumberValue;
65
+ };
66
+ type TileflowRoadSidewalkStyle = {
67
+ outline?: TileflowLineStyle;
68
+ pattern?: TileflowFillStyle;
69
+ surface?: TileflowFillStyle;
70
+ };
71
+ type TileflowRoadsModuleConfig = {
72
+ type: 'roads';
73
+ areas?: TileflowRoadAreaStyle;
74
+ classes?: Partial<Record<TileflowRoadClass, TileflowRoadClassStyle>>;
75
+ crossings?: TileflowRoadCrossingStyle;
76
+ detail?: TileflowRoadDetail;
77
+ extras?: TileflowRoadExtras;
78
+ hierarchy?: TileflowRoadHierarchy;
79
+ modifiers?: Partial<Record<TileflowRoadModifier, TileflowRoadTreatmentStyle>>;
80
+ mountainBike?: Partial<Record<TileflowMountainBikeScale, TileflowRoadTreatmentStyle>>;
81
+ oneWayMarkers?: boolean;
82
+ outline?: TileflowRoadOutline;
83
+ /** Draw ramp fills below receiving roads by default; `by-class` keeps their class's order. */
84
+ rampOrder?: 'below-roads' | 'by-class';
85
+ restrictions?: Partial<Record<TileflowRoadRestriction, TileflowRoadTreatmentStyle>>;
86
+ roundabouts?: TileflowRoadRoundaboutStyle;
87
+ serviceTypes?: Partial<Record<TileflowRoadServiceType, TileflowRoadTreatmentStyle>>;
88
+ sidewalks?: TileflowRoadSidewalkStyle;
89
+ streetLights?: TileflowRoadStreetLightStyle;
90
+ structures?: Partial<Record<TileflowRoadStructure, TileflowRoadLayerStyle>>;
91
+ weight?: TileflowRoadWeight;
92
+ widthScale?: Partial<Record<TileflowRoadClass, TileflowThemeNumberValue>>;
93
+ };
94
+ type TileflowLabelDetail = 'none' | 'major' | 'all';
95
+ type TileflowAerodromeCodeDetail = 'none' | 'iata' | 'all';
96
+ type TileflowRoadLabelDetail = TileflowRoadDetail;
97
+ type TileflowLabelLanguage = 'auto' | 'local' | 'en' | (string & {});
98
+ type TileflowPlaceLabelClass = 'city' | 'continent' | 'country' | 'neighborhood' | 'other' | 'state' | 'town' | 'village';
99
+ type TileflowWaterLabelClass = 'line' | 'ocean' | 'other' | 'waterway';
100
+ type TileflowRoadShieldDetail = 'none' | 'major' | 'all';
101
+ type TileflowLabelCollisionPriority = 'balanced' | 'navigation';
102
+ type TileflowRoadShieldStyles = {
103
+ default?: TileflowSymbolStyle;
104
+ detail?: TileflowSymbolStyle;
105
+ kinds?: Record<string, {
106
+ image: TileflowThemeImageValue;
107
+ }>;
108
+ overview?: TileflowSymbolStyle;
109
+ textColors?: Record<string, {
110
+ color: TileflowThemeColorValue;
111
+ }>;
112
+ };
113
+ type TileflowLabelStyles = {
114
+ aerodrome?: TileflowSymbolStyle;
115
+ junctions?: TileflowSymbolStyle;
116
+ places?: Partial<Record<TileflowPlaceLabelClass, TileflowSymbolStyle>>;
117
+ roads?: Partial<Record<TileflowRoadClass, TileflowSymbolStyle>>;
118
+ shields?: TileflowRoadShieldStyles;
119
+ water?: Partial<Record<TileflowWaterLabelClass, TileflowSymbolStyle>>;
120
+ };
121
+ type TileflowLabelsModuleConfig = {
122
+ type: 'labels';
123
+ aerodromeCodes?: TileflowAerodromeCodeDetail;
124
+ collisionPriority?: TileflowLabelCollisionPriority;
125
+ junctions?: boolean;
126
+ language?: TileflowLabelLanguage;
127
+ places?: TileflowLabelDetail;
128
+ roadClasses?: readonly TileflowRoadClass[];
129
+ /**
130
+ * Where street names draw. `foreground` (the default) keeps them above buildings and
131
+ * vegetation. `ground` places them below buildings, with map-aligned text by default.
132
+ * Ground names retain their road-class collision order, but foreground symbols are offered
133
+ * first by the renderer; `collisionPriority` cannot make ground names outrank those symbols.
134
+ * Shields and junction numbers keep their foreground placement.
135
+ */
136
+ roadPlacement?: 'ground' | 'foreground';
137
+ roads?: TileflowRoadLabelDetail;
138
+ shields?: TileflowRoadShieldDetail;
139
+ styles?: TileflowLabelStyles;
140
+ water?: TileflowLabelDetail;
141
+ };
142
+ /** Closed editorial vocabulary emitted by Tileflow World's canonical POI projection. */
143
+ declare const tileflowPoiCategories: readonly ["arts-entertainment", "education", "food-drink", "landmark", "lodging", "medical", "park-nature", "public-services", "religion", "retail", "sport-leisure", "transport", "visitor-amenity"];
144
+ type TileflowPoiCategory = (typeof tileflowPoiCategories)[number];
145
+ type TileflowPoiDensity = 1 | 2 | 3 | 4 | 5;
146
+ type TileflowPoiColorMode = 'uniform' | 'category';
147
+ /**
148
+ * How POI categories are placed against each other. `importance` places every category in one
149
+ * order, by World's ranks. `categories` gives each category its own layer and places the
150
+ * categories in the order they are listed, the first on top; ranks order each category only.
151
+ */
152
+ type TileflowPoiPlacementOrder = 'categories' | 'importance';
153
+ /**
154
+ * The appearance of one POI category. With the default `importance` order every category shares
155
+ * one placement layer, so categories may differ only in properties MapLibre evaluates per feature
156
+ * (image, size, colors, font, offsets); layer-wide properties such as zoom ranges, padding,
157
+ * overlap or `optional` must match, or the module uses `placement.order: 'categories'`.
158
+ */
159
+ type TileflowPoiCategoryStyle = Omit<TileflowMarkerSymbolStyle, 'priority'>;
160
+ type TileflowPoiModuleConfig = {
161
+ type: 'poi';
162
+ categories?: readonly TileflowPoiCategory[];
163
+ color?: TileflowPoiColorMode;
164
+ /** One density for the whole module: World's ranks decide what each category shows. */
165
+ density?: TileflowPoiDensity;
166
+ icons?: boolean;
167
+ labels?: boolean;
168
+ minZoom?: number;
169
+ placement?: {
170
+ /**
171
+ * Places each pictogram with its name as one unit that needs room for both. Defaults to
172
+ * `false`.
173
+ */
174
+ coupleIconAndLabel?: boolean;
175
+ iconPadding?: number;
176
+ /**
177
+ * World POI `type` values whose pictogram explains them. When pictograms and names are both
178
+ * drawn, every other POI needs a name, and these types are drawn as a pictogram alone.
179
+ * Defaults to parking and public toilets.
180
+ */
181
+ iconOnlyTypes?: readonly string[];
182
+ /** Defaults to `importance`. */
183
+ order?: TileflowPoiPlacementOrder;
184
+ /**
185
+ * With the `importance` order, POIs whose World `filter_rank` is at most this value are placed
186
+ * before the map's road and place labels, and the others after them. A map that gives street
187
+ * names priority over POIs (labels `collisionPriority: 'navigation'`) keeps its landmarks this
188
+ * way. Unset, every POI is placed at the module's own position.
189
+ */
190
+ prominentRank?: 0 | 1 | 2 | 3 | 4 | 5;
191
+ textPadding?: number;
192
+ };
193
+ styles?: Partial<Record<TileflowPoiCategory, TileflowPoiCategoryStyle>>;
194
+ };
195
+ type MapLibreSprite = string | Array<{
196
+ id: string;
197
+ url: string;
198
+ }>;
199
+ type TileflowProjection = 'globe' | 'mercator';
200
+ type TileflowLight = {
201
+ anchor?: 'map' | 'viewport';
202
+ color?: TileflowColor;
203
+ intensity?: number;
204
+ position?: readonly [number, number, number];
205
+ };
206
+ type MapLibreStyle = {
207
+ sky?: Record<string, unknown>;
208
+ version: 8;
209
+ name: string;
210
+ glyphs?: string;
211
+ light?: TileflowLight;
212
+ projection?: {
213
+ type: TileflowProjection;
214
+ };
215
+ sprite?: MapLibreSprite;
216
+ sources: Record<string, Record<string, unknown>>;
217
+ layers: Array<Record<string, unknown>>;
218
+ terrain?: Record<string, unknown>;
219
+ metadata?: Record<string, unknown>;
220
+ };
221
+
222
+ type ShadowPoint = readonly number[];
223
+ type ShadowBox = Readonly<{
224
+ min: ShadowPoint;
225
+ max: ShadowPoint;
226
+ }>;
227
+ type ShadowRange = readonly [number, number];
228
+ /** The light-space ranges a light view covers: across and up the shadow map, and along the light. */
229
+ type ShadowFit = Readonly<{
230
+ right: ShadowRange;
231
+ up: ShadowRange;
232
+ depth: ShadowRange;
233
+ }>;
234
+ type ShadowView = Readonly<{
235
+ /** Visible receiver points, in the caster box's metre frame. All casters still draw. */
236
+ receivers?: readonly ShadowPoint[];
237
+ /** Snap to world-aligned texels; omit for an unsnapped mathematical projection. */
238
+ resolution?: number;
239
+ origin?: ShadowPoint;
240
+ /** Metres per fixed world unit; keeps texel quantization independent of latitude scale. */
241
+ gridScale?: number;
242
+ /** A share of the focused span added on each side, so a moving view stays inside the fit. */
243
+ margin?: number;
244
+ /**
245
+ * A fit in the same frame and light, kept on each axis while it covers the view and is at most
246
+ * half again as wide as a new fit would be.
247
+ */
248
+ previous?: ShadowFit;
249
+ }>;
250
+ /**
251
+ * The sun's orthographic view, in metres, with room for each caster's shadow to reach the ground.
252
+ * Optional receivers concentrate XY resolution without dropping offscreen casters along a ray;
253
+ * quantized extents and a world-anchored texel grid keep stationary shadows stable during pans.
254
+ */
255
+ declare function tileflowSunLightMatrix(direction: readonly number[], box: ShadowBox, view?: ShadowView): {
256
+ matrix: Float32Array;
257
+ depth: number;
258
+ extent: number;
259
+ fit: ShadowFit;
260
+ };
261
+
1
262
  /** Inputs to one fixed-size, application-owned RGBA image. */
2
263
  type TileflowDynamicImageContext = Readonly<{
3
264
  theme: string;
@@ -75,318 +336,13 @@ declare function registerTileflowWorldRequestBridge(input: {
75
336
  declare function tileflowFairUseNoticeMessage(state: TileflowFairUseNoticeState): string;
76
337
  declare function attachTileflowFairUseNotice(container: HTMLElement): TileflowFairUseNoticeController;
77
338
 
78
- declare const expressionBrand: unique symbol;
79
- declare const themeValueBrand: unique symbol;
80
- declare const zoomBrand: unique symbol;
81
- declare const tileflowThemeTokenCategories: readonly ["color", "font", "image", "number"];
82
- type TileflowThemeTokenCategory = (typeof tileflowThemeTokenCategories)[number];
83
- type TileflowThemeTokenPrimitive = {
84
- color: string;
85
- font: string;
86
- image: string;
87
- number: number;
88
- };
89
- /** A JSON-safe semantic reference. The category is carried at runtime as well as in its type. */
90
- type TileflowThemeTokenReference<TCategory extends TileflowThemeTokenCategory = TileflowThemeTokenCategory> = {
91
- readonly category: TCategory;
92
- readonly kind: 'theme-token';
93
- readonly token: string;
94
- readonly [themeValueBrand]: TileflowThemeTokenPrimitive[TCategory];
95
- };
96
- /** An explicit opt-out from theme substitution. A reason is mandatory for auditability. */
97
- type TileflowFixedValue<T> = {
98
- readonly kind: 'theme-fixed';
99
- readonly reason: string;
100
- readonly value: T;
101
- readonly [themeValueBrand]: T;
102
- };
103
- type TileflowThemeColorMix = {
104
- readonly amount: TileflowThemeNumberValue;
105
- readonly from: TileflowThemeColorValue;
106
- readonly kind: 'theme-color';
107
- readonly operation: 'mix';
108
- readonly space: 'oklch';
109
- readonly to: TileflowThemeColorValue;
110
- readonly [themeValueBrand]: string;
111
- };
112
- type TileflowThemeColorAlpha = {
113
- readonly color: TileflowThemeColorValue;
114
- readonly kind: 'theme-color';
115
- readonly opacity: TileflowThemeNumberValue;
116
- readonly operation: 'alpha';
117
- readonly [themeValueBrand]: string;
118
- };
119
- type TileflowThemeColorOperation = TileflowThemeColorAlpha | TileflowThemeColorMix;
120
- type TileflowThemeNumberValue = number | TileflowFixedValue<number> | TileflowThemeTokenReference<'number'>;
121
- type TileflowThemeColorValue = string | TileflowFixedValue<string> | TileflowThemeColorOperation | TileflowThemeTokenReference<'color'>;
122
- type TileflowThemeFontValue = string | TileflowFixedValue<string> | TileflowThemeTokenReference<'font'>;
123
- type TileflowThemeImageValue = string | TileflowFixedValue<string> | TileflowThemeTokenReference<'image'>;
124
- type TileflowExpression<T> = {
125
- readonly kind: 'expression';
126
- readonly value: readonly unknown[];
127
- /** Opaque result type. Only Tileflow's closed `expr.*` builders expose this brand publicly. */
128
- readonly [expressionBrand]: T;
129
- };
130
- type TileflowZoomValueCommon<T> = {
131
- readonly kind: 'zoom';
132
- readonly stops: readonly (readonly [number, T])[];
133
- readonly [zoomBrand]?: T;
134
- };
135
- type TileflowZoomValue<T> = TileflowZoomValueCommon<T> & ({
136
- readonly base: number;
137
- readonly interpolation: 'exponential';
138
- } | {
139
- readonly base?: never;
140
- readonly interpolation: 'linear' | 'step';
141
- });
142
-
143
- /** A color literal, semantic color token, color operation, expression, or zoom ramp. */
144
- type TileflowColorStyleValue = TileflowExpression<string> | TileflowThemeColorValue | TileflowZoomValue<TileflowThemeColorValue>;
145
- /** An image name, semantic image token, expression, or zoom ramp. */
146
- type TileflowImageStyleValue = TileflowExpression<string> | TileflowThemeImageValue | TileflowZoomValue<TileflowThemeImageValue>;
147
- /** A number, semantic number token, expression, or zoom ramp. */
148
- type TileflowNumberStyleValue = TileflowExpression<number> | TileflowThemeNumberValue | TileflowZoomValue<TileflowThemeNumberValue>;
149
- /** A visual numeric array whose components may be themed, or whose full shape is fixed. */
150
- type TileflowThemeNumberArrayValue = readonly TileflowThemeNumberValue[] | TileflowFixedValue<readonly number[]>;
151
- /** A visual numeric array, expression, or zoom ramp with explicit theme intent. */
152
- type TileflowNumberArrayStyleValue = TileflowExpression<readonly number[]> | TileflowThemeNumberArrayValue | TileflowZoomValue<TileflowThemeNumberArrayValue>;
153
- /** A two-dimensional visual offset with category-safe numeric components. */
154
- type TileflowNumberOffsetStyleValue = readonly [TileflowThemeNumberValue, TileflowThemeNumberValue] | TileflowFixedValue<readonly number[]> | TileflowExpression<readonly number[]> | TileflowZoomValue<readonly [TileflowThemeNumberValue, TileflowThemeNumberValue] | TileflowFixedValue<readonly number[]>>;
155
- /** Top, right, bottom, and left visual insets with category-safe numeric components. */
156
- type TileflowNumberInsetsStyleValue = readonly [
157
- TileflowThemeNumberValue,
158
- TileflowThemeNumberValue,
159
- TileflowThemeNumberValue,
160
- TileflowThemeNumberValue
161
- ] | TileflowFixedValue<readonly [number, number, number, number]> | TileflowExpression<readonly number[]> | TileflowZoomValue<readonly [
162
- TileflowThemeNumberValue,
163
- TileflowThemeNumberValue,
164
- TileflowThemeNumberValue,
165
- TileflowThemeNumberValue
166
- ] | TileflowFixedValue<readonly [number, number, number, number]>>;
167
- /** A structural value that does not participate in semantic theme-token substitution. */
168
- type TileflowStructuralStyleValue<T> = T | TileflowExpression<T> | TileflowZoomValue<T>;
169
- /** Structural text, including expressions and zoom-dependent literal strings. */
170
- type TileflowStringStyleValue = TileflowStructuralStyleValue<string>;
171
- type TileflowLineCap = 'butt' | 'round' | 'square';
172
- type TileflowLineJoin = 'bevel' | 'miter' | 'round';
173
- type TileflowSymbolPlacement = 'line' | 'line-center' | 'point';
174
- type TileflowSymbolZOrder = 'auto' | 'source' | 'viewport-y';
175
- type TileflowPriorityOrder = 'higher-first' | 'lower-first';
176
- type TileflowTextAnchor = 'bottom' | 'bottom-left' | 'bottom-right' | 'center' | 'left' | 'right' | 'top' | 'top-left' | 'top-right';
177
- type TileflowTextJustify = 'auto' | 'center' | 'left' | 'right';
178
- type TileflowIconAnchor = TileflowTextAnchor;
179
- type TileflowAlignment = 'auto' | 'map' | 'viewport';
180
- type TileflowIconTextFit = 'both' | 'height' | 'none' | 'width';
181
- /**
182
- * How a symbol part treats collisions with symbols placed before it. `never` hides it, `always`
183
- * shows it, and `cooperative` shows it unless the earlier symbol was placed with `never`.
184
- */
185
- type TileflowSymbolOverlap = 'always' | 'cooperative' | 'never';
186
- /** Visibility and zoom bounds shared by every visual primitive. */
187
- type TileflowLayerRange = {
188
- maxZoom?: number;
189
- minZoom?: number;
190
- visible?: boolean;
191
- };
192
- type TileflowBackgroundPaint = {
193
- color?: TileflowColorStyleValue;
194
- opacity?: TileflowNumberStyleValue;
195
- pattern?: TileflowImageStyleValue;
196
- };
197
- type TileflowBackgroundStyle = TileflowLayerRange & TileflowBackgroundPaint;
198
- type TileflowFillPaint = {
199
- antialias?: boolean;
200
- color?: TileflowColorStyleValue;
201
- opacity?: TileflowNumberStyleValue;
202
- pattern?: TileflowImageStyleValue;
203
- translate?: TileflowNumberOffsetStyleValue;
204
- translateAnchor?: 'map' | 'viewport';
205
- };
206
- type TileflowFillStyle = TileflowLayerRange & TileflowFillPaint;
207
- type TileflowLinePaint = {
208
- blur?: TileflowNumberStyleValue;
209
- color?: TileflowColorStyleValue;
210
- dash?: TileflowNumberArrayStyleValue;
211
- gapWidth?: TileflowNumberStyleValue;
212
- offset?: TileflowNumberStyleValue;
213
- opacity?: TileflowNumberStyleValue;
214
- pattern?: TileflowImageStyleValue;
215
- translate?: TileflowNumberOffsetStyleValue;
216
- translateAnchor?: 'map' | 'viewport';
217
- width?: TileflowNumberStyleValue;
218
- };
219
- type TileflowLineLayout = {
220
- cap?: TileflowStructuralStyleValue<TileflowLineCap>;
221
- join?: TileflowStructuralStyleValue<TileflowLineJoin>;
222
- miterLimit?: TileflowNumberStyleValue;
223
- roundLimit?: TileflowNumberStyleValue;
224
- };
225
- type TileflowLineStyle = TileflowLayerRange & TileflowLinePaint & TileflowLineLayout;
226
- /** Repeated diagonal marks placed along a stroked geographic feature. */
227
- type TileflowLineHatchStyle = TileflowLayerRange & {
228
- angle?: TileflowNumberStyleValue;
229
- color?: TileflowColorStyleValue;
230
- opacity?: TileflowNumberStyleValue;
231
- /** Sprite pattern clipped to the line deck; when set, it replaces glyph hatching. */
232
- pattern?: TileflowImageStyleValue;
233
- /**
234
- * Intrinsic pixel heights available as `${pattern}-${width}` sprites. Tileflow
235
- * selects the closest height to the rendered line width so marks retain a
236
- * nearly fixed screen-pixel thickness instead of stretching with the road.
237
- * Requires `pattern` to be a literal sprite-name prefix.
238
- */
239
- patternWidths?: TileflowThemeNumberArrayValue;
240
- size?: TileflowNumberStyleValue;
241
- spacing?: TileflowNumberStyleValue;
242
- };
243
- type TileflowTextPaint = {
244
- color?: TileflowColorStyleValue;
245
- haloBlur?: TileflowNumberStyleValue;
246
- haloColor?: TileflowColorStyleValue;
247
- haloWidth?: TileflowNumberStyleValue;
248
- opacity?: TileflowNumberStyleValue;
249
- };
250
- /**
251
- * One opaque strip behind each shaped line of a label. Tileflow lowers it to a derived glyph stack
252
- * whose cells MapLibre's text halo paints, so placement, wrapping and collision stay native.
253
- */
254
- type TileflowTextBackground = {
255
- /** Strip colour. Cells overlap at their joins, so the colour must be opaque. */
256
- color: TileflowColorStyleValue;
257
- /** `lines` fits one strip to each shaped line. */
258
- fit: 'lines';
259
- /** Strip extension beyond the first and last glyph of each line, in ems. Defaults to 0.33. */
260
- padding?: TileflowThemeNumberValue;
261
- };
262
- type TileflowTextLayout = {
263
- allowOverlap?: boolean;
264
- anchor?: TileflowTextAnchor;
265
- /**
266
- * Replaces the text halo with line-fitted strips. Requires a map `glyphs` provider that serves
267
- * derived stacks, one font without fallbacks, and constant `letterSpacing` and `lineHeight`.
268
- */
269
- background?: TileflowTextBackground;
270
- field?: TileflowStringStyleValue;
271
- font?: TileflowThemeFontValue;
272
- fallbacks?: readonly TileflowThemeFontValue[];
273
- ignorePlacement?: boolean;
274
- justify?: TileflowTextJustify;
275
- keepUpright?: boolean;
276
- letterSpacing?: TileflowNumberStyleValue;
277
- lineHeight?: TileflowNumberStyleValue;
278
- maxAngle?: TileflowNumberStyleValue;
279
- maxWidth?: TileflowNumberStyleValue;
280
- offset?: TileflowNumberOffsetStyleValue;
281
- optional?: boolean;
282
- /**
283
- * Overlap mode. Takes precedence over `allowOverlap`, so the compiled layer carries only the mode.
284
- * Native artifacts, whose renderer has no overlap modes, use `allowOverlap: false` for `never`
285
- * and `true` otherwise.
286
- */
287
- overlap?: TileflowSymbolOverlap;
288
- padding?: TileflowNumberStyleValue;
289
- pitchAlignment?: TileflowAlignment;
290
- radialOffset?: TileflowNumberStyleValue;
291
- rotate?: TileflowNumberStyleValue;
292
- rotationAlignment?: TileflowAlignment;
293
- size?: TileflowNumberStyleValue;
294
- transform?: 'lowercase' | 'none' | 'uppercase';
295
- variableAnchors?: readonly TileflowTextAnchor[];
296
- };
297
- type TileflowTextStyle = TileflowLayerRange & TileflowTextPaint & TileflowTextLayout;
298
- type TileflowIconPaint = {
299
- color?: TileflowColorStyleValue;
300
- haloBlur?: TileflowNumberStyleValue;
301
- haloColor?: TileflowColorStyleValue;
302
- haloWidth?: TileflowNumberStyleValue;
303
- opacity?: TileflowNumberStyleValue;
304
- };
305
- type TileflowIconLayout = {
306
- allowOverlap?: boolean;
307
- anchor?: TileflowIconAnchor;
308
- image?: TileflowImageStyleValue;
309
- ignorePlacement?: boolean;
310
- keepUpright?: boolean;
311
- offset?: TileflowNumberOffsetStyleValue;
312
- optional?: boolean;
313
- /**
314
- * Overlap mode. Takes precedence over `allowOverlap`, so the compiled layer carries only the mode.
315
- * Native artifacts, whose renderer has no overlap modes, use `allowOverlap: false` for `never`
316
- * and `true` otherwise.
317
- */
318
- overlap?: TileflowSymbolOverlap;
319
- padding?: TileflowNumberStyleValue;
320
- pitchAlignment?: TileflowAlignment;
321
- rotate?: TileflowNumberStyleValue;
322
- rotationAlignment?: TileflowAlignment;
323
- size?: TileflowNumberStyleValue;
324
- textFit?: TileflowIconTextFit;
325
- textFitPadding?: TileflowNumberInsetsStyleValue;
326
- };
327
- type TileflowIconStyle = TileflowLayerRange & TileflowIconPaint & TileflowIconLayout;
328
- type TileflowSymbolPlacementStyle = TileflowLayerRange & {
329
- placement?: TileflowSymbolPlacement;
330
- priority?: TileflowStructuralStyleValue<number>;
331
- /** Collision order for the semantic priority value. Defaults to `higher-first`. */
332
- priorityOrder?: TileflowPriorityOrder;
333
- spacing?: TileflowNumberStyleValue;
334
- zOrder?: TileflowSymbolZOrder;
335
- };
336
- type TileflowCirclePaint = {
337
- blur?: TileflowNumberStyleValue;
338
- color?: TileflowColorStyleValue;
339
- opacity?: TileflowNumberStyleValue;
340
- pitchAlignment?: 'map' | 'viewport';
341
- pitchScale?: 'map' | 'viewport';
342
- priority?: TileflowStructuralStyleValue<number>;
343
- /** Drawing order for the semantic priority value. Defaults to `higher-first`. */
344
- priorityOrder?: TileflowPriorityOrder;
345
- radius?: TileflowNumberStyleValue;
346
- strokeColor?: TileflowColorStyleValue;
347
- strokeOpacity?: TileflowNumberStyleValue;
348
- strokeWidth?: TileflowNumberStyleValue;
349
- translate?: TileflowNumberOffsetStyleValue;
350
- translateAnchor?: 'map' | 'viewport';
351
- };
352
- type TileflowCircleStyle = TileflowLayerRange & TileflowCirclePaint;
353
- type TileflowExtrusionPaint = {
354
- base?: TileflowNumberStyleValue;
355
- color?: TileflowColorStyleValue;
356
- height?: TileflowNumberStyleValue;
357
- opacity?: TileflowNumberStyleValue;
358
- pattern?: TileflowImageStyleValue;
359
- verticalGradient?: boolean;
360
- };
361
- type TileflowExtrusionStyle = TileflowLayerRange & TileflowExtrusionPaint;
362
- /** A polygon rendered as a fill and, when requested, a separate line layer. */
363
- type TileflowAreaStyle = {
364
- fill?: TileflowFillStyle;
365
- outline?: TileflowLineStyle;
366
- };
367
- /** The canonical ordered phases used for roads, aeroways, and other stroked paths. */
368
- type TileflowLineStackStyle = {
369
- casing?: TileflowLineStyle;
370
- fill?: TileflowLineStyle;
371
- shadow?: TileflowLineStyle;
372
- };
373
- /** A symbol layer composed from one placement policy and optional text/icon parts. */
374
- type TileflowSymbolStyle = TileflowSymbolPlacementStyle & {
375
- icon?: TileflowIconStyle;
376
- text?: TileflowTextStyle;
377
- };
378
- /** A symbol style that may also materialize a separate circle marker layer. */
379
- type TileflowMarkerSymbolStyle = TileflowSymbolStyle & {
380
- marker?: TileflowCircleStyle;
381
- };
382
-
383
- type TileflowAddressesModuleOptions = {
384
- /** Styling for OpenMapTiles point house-number labels. */
385
- labels?: TileflowSymbolStyle;
386
- };
387
- type TileflowAddressesModuleConfig = TileflowAddressesModuleOptions & {
388
- type: 'addresses';
389
- };
339
+ type TileflowAddressesModuleOptions = {
340
+ /** Styling for OpenMapTiles point house-number labels. */
341
+ labels?: TileflowSymbolStyle;
342
+ };
343
+ type TileflowAddressesModuleConfig = TileflowAddressesModuleOptions & {
344
+ type: 'addresses';
345
+ };
390
346
 
391
347
  type TileflowAerowaysModuleOptions = {
392
348
  area?: TileflowAreaStyle;
@@ -489,6 +445,16 @@ type TileflowBuildingsThreeDimensionalStyle = {
489
445
  space?: 'srgb' | 'linear';
490
446
  };
491
447
  }>>;
448
+ /**
449
+ * The zoom bands the city comes in over: zooming in, across each band its part fades in and rises
450
+ * from the ground, and zooming out it sinks and fades again. Defaults to the 0.3 zooms from the
451
+ * renderer's `minzoom` (15) for the buildings, and to the 0.4 zooms from 0.8 before it for the
452
+ * placed models and landmarks, which stand first. With reduced motion they only fade.
453
+ */
454
+ entrance?: {
455
+ buildings?: readonly [number, number];
456
+ models?: readonly [number, number];
457
+ };
492
458
  /** Contact shadow at the foot of the walls and in tight corners; defaults to true. */
493
459
  occlusion?: boolean;
494
460
  /** Prepared model ambient occlusion strength, from 0 to 1; defaults to 0.75. */
@@ -630,532 +596,56 @@ type TileflowNauticalModuleOptions = {
630
596
  wreckAreas?: TileflowAreaStyle;
631
597
  wrecks?: TileflowMarkerSymbolStyle;
632
598
  };
633
- type TileflowNauticalModuleConfig = TileflowNauticalModuleOptions & {
634
- type: 'nautical';
635
- };
636
-
637
- type TileflowTransitModuleOptions = {
638
- cableway?: TileflowLineStyle;
639
- ferry?: TileflowLineStyle;
640
- rail?: TileflowTransitRailStyle;
641
- railHatching?: TileflowTransitRailStyle;
642
- serviceRail?: TileflowTransitRailStyle;
643
- };
644
- type TileflowTransitRailStyle = {
645
- bridge?: TileflowLineStyle;
646
- surface?: TileflowLineStyle;
647
- tunnel?: TileflowLineStyle;
648
- };
649
- type TileflowTransitModuleConfig = TileflowTransitModuleOptions & {
650
- type: 'transit';
651
- };
652
-
653
- /** A prepared model, near and optionally far, as the style's tree description carries it. */
654
- type TileflowTreeModel = Readonly<{
655
- near: string;
656
- far?: string;
657
- }>;
658
-
659
- type TileflowTileGeometryType = 'Point' | 'LineString' | 'Polygon';
660
- type TileflowTileFeature = Readonly<{
661
- /** The feature's id in the tile, when it has one. */
662
- id?: number;
663
- type: TileflowTileGeometryType;
664
- properties: Readonly<Record<string, string | number | boolean>>;
665
- /**
666
- * One flat `[x0, y0, x1, y1, …]` array per point set, line or ring, in tile units from 0 to the
667
- * layer's extent (coordinates in a tile's buffer fall outside that range). Polygon rings follow
668
- * the MVT winding: an exterior ring is clockwise in tile units, a hole anticlockwise.
669
- */
670
- geometry: readonly (readonly number[])[];
671
- }>;
672
- type TileflowTileLayer = Readonly<{
673
- /** Tile units across the tile, usually 4096. */
674
- extent: number;
675
- features: readonly TileflowTileFeature[];
676
- }>;
677
- type TileflowVectorTileDecodeOptions = Readonly<{
678
- /** The layers to decode; others are skipped without decoding. Defaults to every layer. */
679
- layers?: readonly string[];
680
- }>;
681
- /** Decodes a Mapbox Vector Tile's layers. Throws on bytes that are not a vector tile. */
682
- declare function decodeTileflowVectorTile(bytes: Uint8Array, options?: TileflowVectorTileDecodeOptions): Readonly<Record<string, TileflowTileLayer>>;
683
-
684
- /** The forms a 3D tree takes. */
685
- declare const tileflowTreeForms: readonly ["round", "open", "tall", "conifer", "columnar", "palm"];
686
- type TileflowTreeForm = (typeof tileflowTreeForms)[number];
687
- /** How a tree's surfaces take the light: facets, a smooth round shape, or bands as drawn. */
688
- declare const tileflowTreeFinishes: readonly ["faceted", "smooth", "toon"];
689
- type TileflowTreeFinish = (typeof tileflowTreeFinishes)[number];
690
- /** A form's own scales, on top of the map's, and the map's own models it draws. */
691
- type TileflowTreeFormStyle = Readonly<{
692
- heightScale?: number;
693
- crownScale?: number;
694
- /** Ids of the map's own models, one to four; each tree draws one by its stable seed. */
695
- models?: readonly string[];
696
- }>;
697
- /** Relative weights of the forms given to trees whose data gives none. */
698
- type TileflowTreeFormMix = Readonly<Partial<Record<TileflowTreeForm, number>>>;
699
- /** A region whose trees without a form in the data take their own mix. */
700
- type TileflowTreeRegion = Readonly<{
701
- /** `[west, south, east, north]` in degrees. */
702
- bounds: readonly [number, number, number, number];
703
- unknownForms: TileflowTreeFormMix;
704
- }>;
705
- /** The fields of the tree and canopy layers, as World names them. */
706
- type TileflowTreeFields = Readonly<{
707
- height: string;
708
- diameterCrown: string;
709
- circumference: string;
710
- genus: string;
711
- species: string;
712
- leafType: string;
713
- /** The tree's taxon at any rank, such as `Arecaceae` for palms or a genus or species. */
714
- taxon: string;
715
- canopyRank: string;
716
- canopyClearance: string;
717
- canopyCover: string;
718
- /** A canopy point's measured canopy height, in metres. */
719
- canopyHeight: string;
720
- /** The kind of barrier in the hedge layer: hedges are `hedge`. */
721
- subclass: string;
722
- /** A hedge's kind: `hedge_bank` when it stands on an earth bank. */
723
- hedge: string;
724
- }>;
725
- type TileflowTreePlacementOptions = Readonly<{
726
- /** The tile's address, for regions and for a stable look per tree. */
727
- tile: Readonly<{
728
- x: number;
729
- y: number;
730
- z: number;
731
- }>;
732
- /** The tile's width in metres. */
733
- tileMetres: number;
734
- fields?: Partial<TileflowTreeFields>;
735
- unknownForms?: TileflowTreeFormMix;
736
- regions?: readonly TileflowTreeRegion[];
737
- /** Metres between the trees of a row; defaults to 8. */
738
- rowSpacing?: number;
739
- /** How many models each form draws from, 1 to 4; each tree draws one by its seed. */
740
- variants?: Readonly<Partial<Record<TileflowTreeForm, number>>>;
741
- }>;
742
- /** A tile's layers trees come from, as World names them. */
743
- type TileflowTreeLayers = Readonly<{
744
- /**
745
- * World's `tree`: trees mapped one by one as points, and rows of trees as lines, planted every
746
- * `rowSpacing` metres.
747
- */
748
- trees?: TileflowTileLayer;
749
- /** Decorative canopy points in parks and gardens (World's `canopy`). */
750
- canopy?: TileflowTileLayer;
751
- /**
752
- * World's `traffic_control`: its hedges, lines and areas of `subclass=hedge`, stand as clipped
753
- * pieces along each line and round each area. Other barriers are left out.
754
- */
755
- hedges?: TileflowTileLayer;
756
- }>;
757
- /** Where some trees are in a placement, and how many of them have each rank or a lower one. */
758
- type TileflowTreeRange = Readonly<{
759
- start: number;
760
- count: number;
761
- /** `upTo[r]`: trees of the range with a rank of `r` or lower, from 0 to 15. */
762
- upTo: readonly number[];
763
- }>;
764
- /** Where a form's trees are in a placement, and those of each of its models in turn. */
765
- type TileflowTreeFormRange = TileflowTreeRange & Readonly<{
766
- /** One range per model the form draws from, in order; one when it draws Core's own tree. */
767
- variants: readonly TileflowTreeRange[];
768
- }>;
769
- /** One tile's trees, ready to upload. */
770
- type TileflowTreePlacement = Readonly<{
771
- /** `tileflowTreeBytes` bytes per tree, ordered by form, model, then rank; see the layout below. */
772
- trees: Uint8Array;
773
- forms: Readonly<Record<TileflowTreeForm, TileflowTreeFormRange>>;
774
- /**
775
- * `tileflowTreeBytes` bytes per piece of hedge, as a tree's: its middle, its height, its length
776
- * as the crown, and its turn along the hedge.
777
- */
778
- hedges: Uint8Array;
779
- /** The tallest tree or hedge, in metres. */
780
- tallest: number;
781
- /** Trees from the data's trees and rows, and trees from canopy points. */
782
- mapped: number;
783
- canopy: number;
784
- }>;
785
- /**
786
- * Bytes per tree: x and y in tile units of 8192 (uint16 each), height and crown diameter in
787
- * decimetres (uint16 each), then one byte each for its turn (of a full turn), its shade among the
788
- * theme's colours, its form, its rank (0–15, lower shows first), a seed, whether it stands for a
789
- * canopy point (1) or a mapped tree (0), the model of its form it draws, and a byte of padding.
790
- */
791
- declare const tileflowTreeBytes = 16;
792
- /**
793
- * The form a tree's data gives it, or undefined when its data says nothing about its form: a palm
794
- * by `leaf_type` or genus, a column, a conifer by `leaf_type` or genus, or one of the broadleaf
795
- * forms by genus. `broadleaf` means the data says broadleaved without a known genus.
796
- */
797
- declare function tileflowTreeFormOf(properties: Readonly<Record<string, unknown>>, fields?: Partial<TileflowTreeFields>): TileflowTreeForm | 'broadleaf' | undefined;
798
- /** Places a tile's trees. Points in the tile's buffer belong to the neighbouring tile. */
799
- declare function placeTileflowTrees(layers: TileflowTreeLayers, options: TileflowTreePlacementOptions): TileflowTreePlacement;
800
- /** The style metadata key under which a compiled map describes its 3D trees. */
801
- declare const tileflowVegetationMetadataKey = "tileflow:vegetation";
802
- /** How a compiled map's 3D trees look and where their data is, resolved for one theme. */
803
- type TileflowVegetation3D = Readonly<{
804
- /** The vector source and its layers with the trees, the canopy points and the hedges. */
805
- source: string;
806
- layers: Readonly<{
807
- tree: string;
808
- canopy?: string;
809
- hedge?: string;
810
- }>;
811
- fields: TileflowTreeFields;
812
- /**
813
- * Sunlit colours: bark, the leaves of each kind of tree from darkest to lightest, and those of
814
- * hedges.
815
- */
816
- colors: Readonly<{
817
- bark: string;
818
- broadleaf: readonly string[];
819
- conifer: readonly string[];
820
- palm: readonly string[];
821
- hedge: readonly string[];
822
- }>;
823
- heightScale: number;
824
- crownScale: number;
825
- /** Each form's own scales and models. */
826
- forms: Readonly<Partial<Record<TileflowTreeForm, TileflowTreeFormStyle>>>;
827
- /** The map's own models its forms draw, by id, prepared from its `models` directories. */
828
- models: Readonly<Record<string, TileflowTreeModel>>;
829
- finish: TileflowTreeFinish;
830
- /** How strongly an outline rings each tree, from 0 (none) to 1, and its colour. */
831
- edges: number;
832
- edgeColor?: string;
833
- unknownForms: TileflowTreeFormMix;
834
- regions: readonly TileflowTreeRegion[];
835
- /** The style's layers that draw the trees flat, which the 3D trees stand in for while shown. */
836
- flatLayers: readonly string[];
837
- }>;
838
- /**
839
- * Reads the 3D trees a compiled style describes, or undefined when its metadata has none or holds
840
- * a version or shape this Core does not know.
841
- */
842
- declare function readTileflowVegetation3D(metadata: unknown): TileflowVegetation3D | undefined;
843
-
844
- type TileflowVegetationMode = '3d' | 'flat' | 'auto';
845
- type TileflowVegetationThreeDimensionalStyle = {
846
- barkColor?: TileflowThemeColorValue;
847
- /** Sunlit leaf colours of broadleaf trees, from darkest to lightest; up to four are used. */
848
- broadleafColors?: readonly TileflowThemeColorValue[];
849
- /** Sunlit needle colours of conifers and columns, from darkest to lightest. */
850
- coniferColors?: readonly TileflowThemeColorValue[];
851
- /** Sunlit frond colours of palms, from darkest to lightest; the broadleaf colours by default. */
852
- palmColors?: readonly TileflowThemeColorValue[];
853
- /**
854
- * Whether the data's hedges stand as clipped green walls beside the trees, at their height or
855
- * 1.3 m, a metre higher on an earth bank. Defaults to true where the data has hedges.
856
- */
857
- hedges?: boolean;
858
- /** Sunlit colours of hedges, from darkest to lightest; the two darkest broadleaf colours by default. */
859
- hedgeColors?: readonly TileflowThemeColorValue[];
860
- crownScale?: TileflowThemeNumberValue;
861
- heightScale?: TileflowThemeNumberValue;
862
- /**
863
- * How trees take the light: `faceted` (the default), low-poly facets softened towards a round
864
- * crown; `smooth`, round crowns; or `toon`, three bands of light and a crisp shadow, as a drawn
865
- * tree has them.
866
- */
867
- finish?: TileflowTreeFinish;
868
- /** How strongly an outline rings each tree, from 0 (none, the default) to 1. */
869
- edges?: TileflowThemeNumberValue;
870
- /** The outline's colour; the crown's darkest colour, deepened, by default. */
871
- edgeColor?: TileflowThemeColorValue;
872
- /**
873
- * Each form's own scales, on top of `heightScale` and `crownScale`, such as taller palms, and the
874
- * map's own models it draws: ids of `.glb` files in the map's `models` directories, one to four,
875
- * each tree drawing one. A model's materials named `bark`, `leaves`, `fronds` or `stem` take
876
- * those parts' colours.
877
- */
878
- forms?: Partial<Record<TileflowTreeForm, {
879
- heightScale?: TileflowThemeNumberValue;
880
- crownScale?: TileflowThemeNumberValue;
881
- models?: readonly string[];
882
- }>>;
883
- /**
884
- * The forms of trees whose data gives none, as relative weights: `round`, `open` and `tall`
885
- * (broadleaf), `conifer`, `columnar` and `palm`. Each tree draws one from a stable hash, so it
886
- * keeps its form everywhere. Defaults to the three broadleaf forms, evenly. A tree the data calls
887
- * broadleaved keeps to the broadleaf forms of the mix.
888
- */
889
- unknownForms?: TileflowTreeFormMix;
890
- /**
891
- * Regions whose trees without a form in the data take their own mix, such as palms along a
892
- * subtropical coast. Bounds are `[west, south, east, north]` in degrees; the first region holding
893
- * a tree applies. At most 16.
894
- */
895
- regions?: readonly TileflowTreeRegion[];
896
- };
897
- type TileflowVegetationModuleOptions = {
898
- flat?: TileflowCircleStyle;
899
- /** `3d` uses models at every pitch; `auto` follows the runtime's explicit 2D/3D view mode. */
900
- mode?: TileflowVegetationMode;
901
- /** Representation when a renderer cannot draw models. Defaults to `flat`. */
902
- fallback?: 'flat' | 'none';
903
- /** Initial visibility; a runtime control may override it. Defaults to true. */
904
- visible?: boolean;
905
- threeDimensional?: TileflowVegetationThreeDimensionalStyle;
906
- };
907
- type TileflowVegetationModuleConfig = TileflowVegetationModuleOptions & {
908
- type: 'vegetation';
909
- };
910
-
911
- type TileflowWaterwayClass = 'canal' | 'other' | 'river' | 'stream';
912
- /** Explicit placement for every geometry family in a declared Bathymetry name layer. */
913
- type TileflowBathymetryNamePlacement = {
914
- point: 'point';
915
- line: TileflowSymbolPlacement;
916
- polygon: TileflowSymbolPlacement;
917
- };
918
- type TileflowBathymetryNameStyle = TileflowSymbolStyle & {
919
- /** Overrides scalar placement for these names; omission preserves scalar placement. */
920
- placementByGeometry?: TileflowBathymetryNamePlacement;
921
- };
922
- type TileflowWaterModuleOptions = {
923
- bathymetry?: TileflowFillStyle;
924
- /** Contour lines when declared by Bathymetry; otherwise approximate polygon band edges. */
925
- bathymetryContours?: TileflowLineStyle;
926
- /** Contour-depth or legacy band-floor labels, not measured survey soundings. */
927
- bathymetryLabels?: TileflowSymbolStyle;
928
- /** Names from an explicitly declared seafloor_landform layer. */
929
- bathymetryLandforms?: TileflowBathymetryNameStyle;
930
- /** Names from an explicitly declared water_name layer. */
931
- bathymetryWaterNames?: TileflowBathymetryNameStyle;
932
- bodies?: TileflowAreaStyle;
933
- intermittent?: {
934
- bodies?: TileflowAreaStyle;
935
- waterways?: TileflowLineStyle;
936
- };
937
- waterways?: Partial<Record<TileflowWaterwayClass, TileflowLineStyle>>;
938
- };
939
- type TileflowWaterModuleConfig = TileflowWaterModuleOptions & {
940
- type: 'water';
941
- };
942
-
943
- type TileflowColor = `#${string}`;
944
- type TileflowRoadDetail = 'none' | 'highways' | 'major' | 'streets' | 'all';
945
- type TileflowRoadClass = 'motorway' | 'trunk' | 'primary' | 'secondary' | 'tertiary' | 'minor' | 'service' | 'track' | 'pathway' | 'footway' | 'cycleway' | 'steps' | 'pedestrian';
946
- type TileflowRoadHierarchy = 'subtle' | 'clear' | 'strong';
947
- type TileflowRoadWeight = 'thin' | 'regular' | 'bold';
948
- type TileflowRoadOutline = 'none' | 'subtle' | 'strong';
949
- type TileflowRoadStructure = 'bridge' | 'surface' | 'tunnel';
950
- type TileflowRoadExtras = {
951
- paths?: boolean;
952
- };
953
- type TileflowRoadLayerStyle = TileflowLineStackStyle & {
954
- hatch?: TileflowLineHatchStyle;
955
- };
956
- type TileflowRoadTreatmentLineStyle = Pick<TileflowLinePaint, 'blur' | 'color' | 'dash' | 'gapWidth' | 'offset' | 'opacity' | 'width'>;
957
- type TileflowRoadTreatmentLayerStyle = {
958
- casing?: TileflowRoadTreatmentLineStyle;
959
- fill?: TileflowRoadTreatmentLineStyle;
960
- shadow?: TileflowRoadTreatmentLineStyle;
961
- };
962
- type TileflowRoadTreatmentStyle = Partial<Record<TileflowRoadStructure, TileflowRoadTreatmentLayerStyle>> & {
963
- enabled?: boolean;
964
- widthScale?: TileflowThemeNumberValue;
965
- };
966
- type TileflowRoadModifier = 'construction' | 'expressway' | 'indoor' | 'official' | 'ramp' | 'unpaved';
967
- type TileflowRoadRestriction = 'access' | 'bicycle' | 'foot' | 'horse' | 'toll';
968
- type TileflowMountainBikeScale = '0' | '0+' | '1' | '1+' | '2' | '2+' | '3' | '3+' | '4' | '5' | '6';
969
- type TileflowRoadServiceType = 'alley' | 'crossover' | 'driveway' | 'parkingAisle' | 'yard';
970
- type TileflowRoadClassStyle = Partial<Record<TileflowRoadStructure, TileflowRoadLayerStyle>> & {
971
- enabled?: boolean;
972
- };
973
- type TileflowRoadAreaStyle = {
974
- pedestrian?: TileflowAreaStyle;
975
- pier?: TileflowAreaStyle;
976
- road?: TileflowAreaStyle;
977
- };
978
- type TileflowRoadCrossingStyle = Omit<TileflowIconStyle, 'image'> & Required<Pick<TileflowIconStyle, 'image'>>;
979
- type TileflowRoadRoundaboutStyle = {
980
- /** Extra casing width in pixels, split equally across both edges; defaults to the road border. */
981
- borderWidth?: TileflowNumberStyleValue;
982
- casing?: TileflowCircleStyle;
983
- /** Road width in pixels when metric radii are absent; defaults to the effective surface fill width. */
984
- fallbackWidth?: TileflowNumberStyleValue;
985
- fill?: TileflowCircleStyle;
986
- };
987
- /**
988
- * How Core's street lights renderer lights the map's streets at night, from the lamps and lit
989
- * streets its data holds.
990
- */
991
- type TileflowRoadStreetLightStyle = {
992
- /** The light of lamps whose data gives no colour; a warm white by default. */
993
- color?: TileflowThemeColorValue;
994
- /** Whether the map has street lights; defaults to false. Set true to opt in. */
995
- enabled?: boolean;
996
- /**
997
- * Where light is estimated where the data maps no lamps: `lit` (the default) along streets and
998
- * pavements mapped as lit; `streets` also along streets the data says nothing about, in tiles
999
- * that map few lamps, which invents light; `none` nowhere.
1000
- */
1001
- estimate?: 'lit' | 'streets' | 'none';
1002
- /** How bright the lights shine, from 0 to 2; defaults to 1. */
1003
- intensity?: TileflowThemeNumberValue;
1004
- };
1005
- type TileflowRoadSidewalkStyle = {
1006
- outline?: TileflowLineStyle;
1007
- pattern?: TileflowFillStyle;
1008
- surface?: TileflowFillStyle;
1009
- };
1010
- type TileflowRoadsModuleConfig = {
1011
- type: 'roads';
1012
- areas?: TileflowRoadAreaStyle;
1013
- classes?: Partial<Record<TileflowRoadClass, TileflowRoadClassStyle>>;
1014
- crossings?: TileflowRoadCrossingStyle;
1015
- detail?: TileflowRoadDetail;
1016
- extras?: TileflowRoadExtras;
1017
- hierarchy?: TileflowRoadHierarchy;
1018
- modifiers?: Partial<Record<TileflowRoadModifier, TileflowRoadTreatmentStyle>>;
1019
- mountainBike?: Partial<Record<TileflowMountainBikeScale, TileflowRoadTreatmentStyle>>;
1020
- oneWayMarkers?: boolean;
1021
- outline?: TileflowRoadOutline;
1022
- /** Draw ramp fills below receiving roads by default; `by-class` keeps their class's order. */
1023
- rampOrder?: 'below-roads' | 'by-class';
1024
- restrictions?: Partial<Record<TileflowRoadRestriction, TileflowRoadTreatmentStyle>>;
1025
- roundabouts?: TileflowRoadRoundaboutStyle;
1026
- serviceTypes?: Partial<Record<TileflowRoadServiceType, TileflowRoadTreatmentStyle>>;
1027
- sidewalks?: TileflowRoadSidewalkStyle;
1028
- streetLights?: TileflowRoadStreetLightStyle;
1029
- structures?: Partial<Record<TileflowRoadStructure, TileflowRoadLayerStyle>>;
1030
- weight?: TileflowRoadWeight;
1031
- widthScale?: Partial<Record<TileflowRoadClass, TileflowThemeNumberValue>>;
1032
- };
1033
- type TileflowLabelDetail = 'none' | 'major' | 'all';
1034
- type TileflowAerodromeCodeDetail = 'none' | 'iata' | 'all';
1035
- type TileflowRoadLabelDetail = TileflowRoadDetail;
1036
- type TileflowLabelLanguage = 'auto' | 'local' | 'en' | (string & {});
1037
- type TileflowPlaceLabelClass = 'city' | 'continent' | 'country' | 'neighborhood' | 'other' | 'state' | 'town' | 'village';
1038
- type TileflowWaterLabelClass = 'line' | 'ocean' | 'other' | 'waterway';
1039
- type TileflowRoadShieldDetail = 'none' | 'major' | 'all';
1040
- type TileflowLabelCollisionPriority = 'balanced' | 'navigation';
1041
- type TileflowRoadShieldStyles = {
1042
- default?: TileflowSymbolStyle;
1043
- detail?: TileflowSymbolStyle;
1044
- kinds?: Record<string, {
1045
- image: TileflowThemeImageValue;
1046
- }>;
1047
- overview?: TileflowSymbolStyle;
1048
- textColors?: Record<string, {
1049
- color: TileflowThemeColorValue;
1050
- }>;
1051
- };
1052
- type TileflowLabelStyles = {
1053
- aerodrome?: TileflowSymbolStyle;
1054
- junctions?: TileflowSymbolStyle;
1055
- places?: Partial<Record<TileflowPlaceLabelClass, TileflowSymbolStyle>>;
1056
- roads?: Partial<Record<TileflowRoadClass, TileflowSymbolStyle>>;
1057
- shields?: TileflowRoadShieldStyles;
1058
- water?: Partial<Record<TileflowWaterLabelClass, TileflowSymbolStyle>>;
1059
- };
1060
- type TileflowLabelsModuleConfig = {
1061
- type: 'labels';
1062
- aerodromeCodes?: TileflowAerodromeCodeDetail;
1063
- collisionPriority?: TileflowLabelCollisionPriority;
1064
- junctions?: boolean;
1065
- language?: TileflowLabelLanguage;
1066
- places?: TileflowLabelDetail;
1067
- roadClasses?: readonly TileflowRoadClass[];
1068
- /**
1069
- * Where street names draw. `foreground` (the default) keeps them above buildings and
1070
- * vegetation. `ground` places them below buildings, with map-aligned text by default.
1071
- * Ground names retain their road-class collision order, but foreground symbols are offered
1072
- * first by the renderer; `collisionPriority` cannot make ground names outrank those symbols.
1073
- * Shields and junction numbers keep their foreground placement.
1074
- */
1075
- roadPlacement?: 'ground' | 'foreground';
1076
- roads?: TileflowRoadLabelDetail;
1077
- shields?: TileflowRoadShieldDetail;
1078
- styles?: TileflowLabelStyles;
1079
- water?: TileflowLabelDetail;
1080
- };
1081
- /** Closed editorial vocabulary emitted by Tileflow World's canonical POI projection. */
1082
- declare const tileflowPoiCategories: readonly ["arts-entertainment", "education", "food-drink", "landmark", "lodging", "medical", "park-nature", "public-services", "religion", "retail", "sport-leisure", "transport", "visitor-amenity"];
1083
- type TileflowPoiCategory = (typeof tileflowPoiCategories)[number];
1084
- type TileflowPoiDensity = 1 | 2 | 3 | 4 | 5;
1085
- type TileflowPoiColorMode = 'uniform' | 'category';
1086
- /**
1087
- * How POI categories are placed against each other. `importance` places every category in one
1088
- * order, by World's ranks. `categories` gives each category its own layer and places the
1089
- * categories in the order they are listed, the first on top; ranks order each category only.
1090
- */
1091
- type TileflowPoiPlacementOrder = 'categories' | 'importance';
1092
- /**
1093
- * The appearance of one POI category. With the default `importance` order every category shares
1094
- * one placement layer, so categories may differ only in properties MapLibre evaluates per feature
1095
- * (image, size, colors, font, offsets); layer-wide properties such as zoom ranges, padding,
1096
- * overlap or `optional` must match, or the module uses `placement.order: 'categories'`.
1097
- */
1098
- type TileflowPoiCategoryStyle = Omit<TileflowMarkerSymbolStyle, 'priority'>;
1099
- type TileflowPoiModuleConfig = {
1100
- type: 'poi';
1101
- categories?: readonly TileflowPoiCategory[];
1102
- color?: TileflowPoiColorMode;
1103
- /** One density for the whole module: World's ranks decide what each category shows. */
1104
- density?: TileflowPoiDensity;
1105
- icons?: boolean;
1106
- labels?: boolean;
1107
- minZoom?: number;
1108
- placement?: {
1109
- /**
1110
- * Places each pictogram with its name as one unit that needs room for both. Defaults to
1111
- * `false`.
1112
- */
1113
- coupleIconAndLabel?: boolean;
1114
- iconPadding?: number;
1115
- /**
1116
- * World POI `type` values whose pictogram explains them. When pictograms and names are both
1117
- * drawn, every other POI needs a name, and these types are drawn as a pictogram alone.
1118
- * Defaults to parking and public toilets.
1119
- */
1120
- iconOnlyTypes?: readonly string[];
1121
- /** Defaults to `importance`. */
1122
- order?: TileflowPoiPlacementOrder;
1123
- /**
1124
- * With the `importance` order, POIs whose World `filter_rank` is at most this value are placed
1125
- * before the map's road and place labels, and the others after them. A map that gives street
1126
- * names priority over POIs (labels `collisionPriority: 'navigation'`) keeps its landmarks this
1127
- * way. Unset, every POI is placed at the module's own position.
1128
- */
1129
- prominentRank?: 0 | 1 | 2 | 3 | 4 | 5;
1130
- textPadding?: number;
1131
- };
1132
- styles?: Partial<Record<TileflowPoiCategory, TileflowPoiCategoryStyle>>;
1133
- };
1134
- type MapLibreSprite = string | Array<{
1135
- id: string;
1136
- url: string;
1137
- }>;
1138
- type TileflowProjection = 'globe' | 'mercator';
1139
- type TileflowLight = {
1140
- anchor?: 'map' | 'viewport';
1141
- color?: TileflowColor;
1142
- intensity?: number;
1143
- position?: readonly [number, number, number];
599
+ type TileflowNauticalModuleConfig = TileflowNauticalModuleOptions & {
600
+ type: 'nautical';
1144
601
  };
1145
- type MapLibreStyle = {
1146
- sky?: Record<string, unknown>;
1147
- version: 8;
1148
- name: string;
1149
- glyphs?: string;
1150
- light?: TileflowLight;
1151
- projection?: {
1152
- type: TileflowProjection;
602
+
603
+ type TileflowTransitModuleOptions = {
604
+ cableway?: TileflowLineStyle;
605
+ ferry?: TileflowLineStyle;
606
+ rail?: TileflowTransitRailStyle;
607
+ railHatching?: TileflowTransitRailStyle;
608
+ serviceRail?: TileflowTransitRailStyle;
609
+ };
610
+ type TileflowTransitRailStyle = {
611
+ bridge?: TileflowLineStyle;
612
+ surface?: TileflowLineStyle;
613
+ tunnel?: TileflowLineStyle;
614
+ };
615
+ type TileflowTransitModuleConfig = TileflowTransitModuleOptions & {
616
+ type: 'transit';
617
+ };
618
+
619
+ type TileflowWaterwayClass = 'canal' | 'other' | 'river' | 'stream';
620
+ /** Explicit placement for every geometry family in a declared Bathymetry name layer. */
621
+ type TileflowBathymetryNamePlacement = {
622
+ point: 'point';
623
+ line: TileflowSymbolPlacement;
624
+ polygon: TileflowSymbolPlacement;
625
+ };
626
+ type TileflowBathymetryNameStyle = TileflowSymbolStyle & {
627
+ /** Overrides scalar placement for these names; omission preserves scalar placement. */
628
+ placementByGeometry?: TileflowBathymetryNamePlacement;
629
+ };
630
+ type TileflowWaterModuleOptions = {
631
+ bathymetry?: TileflowFillStyle;
632
+ /** Contour lines when declared by Bathymetry; otherwise approximate polygon band edges. */
633
+ bathymetryContours?: TileflowLineStyle;
634
+ /** Contour-depth or legacy band-floor labels, not measured survey soundings. */
635
+ bathymetryLabels?: TileflowSymbolStyle;
636
+ /** Names from an explicitly declared seafloor_landform layer. */
637
+ bathymetryLandforms?: TileflowBathymetryNameStyle;
638
+ /** Names from an explicitly declared water_name layer. */
639
+ bathymetryWaterNames?: TileflowBathymetryNameStyle;
640
+ bodies?: TileflowAreaStyle;
641
+ intermittent?: {
642
+ bodies?: TileflowAreaStyle;
643
+ waterways?: TileflowLineStyle;
1153
644
  };
1154
- sprite?: MapLibreSprite;
1155
- sources: Record<string, Record<string, unknown>>;
1156
- layers: Array<Record<string, unknown>>;
1157
- terrain?: Record<string, unknown>;
1158
- metadata?: Record<string, unknown>;
645
+ waterways?: Partial<Record<TileflowWaterwayClass, TileflowLineStyle>>;
646
+ };
647
+ type TileflowWaterModuleConfig = TileflowWaterModuleOptions & {
648
+ type: 'water';
1159
649
  };
1160
650
 
1161
651
  /**
@@ -1184,97 +674,6 @@ type TileflowSemanticModules = {
1184
674
  };
1185
675
  type TileflowSemanticModuleName = keyof TileflowSemanticModules;
1186
676
 
1187
- declare const tileflowSunMetadataKey = "tileflow:sun";
1188
- /** A theme's sun and sky light with every value resolved; see `TileflowThemeSun`. */
1189
- type TileflowSunPreset = Readonly<{
1190
- /** Degrees clockwise from north, from 0 to 360. */
1191
- azimuth: number;
1192
- /** Degrees above the horizon, from -90 to 90. */
1193
- altitude: number;
1194
- /** The direct light's colour. */
1195
- color: string;
1196
- /** The direct light's strength, from 0 to 1. */
1197
- intensity: number;
1198
- /** How dark the shadows the sun casts fall, from 0 (none) to 1. */
1199
- shadowIntensity: number;
1200
- /** The light from the sky, which reaches every surface and fills the shadows. */
1201
- ambient: Readonly<{
1202
- color: string;
1203
- intensity: number;
1204
- }>;
1205
- }>;
1206
- /** The sun as the map shows it, ready for an application's own layers. */
1207
- type TileflowSun = Readonly<{
1208
- /** Degrees clockwise from north, from 0 to 360. */
1209
- azimuth: number;
1210
- /** Degrees above the horizon, from -90 to 90. */
1211
- altitude: number;
1212
- /** A unit vector towards the sun: x east, y north, z up. */
1213
- direction: readonly [number, number, number];
1214
- /** The direct light's colour, as a CSS colour. */
1215
- color: string;
1216
- /** The direct light's colour as sRGB channels from 0 to 1. */
1217
- rgb: readonly [number, number, number];
1218
- /**
1219
- * The direct light's strength, from 0 to 1. It fades to 0 as the sun sets: a sun below the
1220
- * horizon lights nothing and casts no shadow.
1221
- */
1222
- intensity: number;
1223
- /** How dark the shadows the sun casts fall, from 0 (none) to 1. */
1224
- shadowIntensity: number;
1225
- /** The light from the sky, which reaches every surface and fills the shadows. */
1226
- ambient: Readonly<{
1227
- color: string;
1228
- rgb: readonly [number, number, number];
1229
- intensity: number;
1230
- }>;
1231
- /**
1232
- * How bright flat, open ground is under this light, from 0 (dark) to 1: the sky's light plus the
1233
- * sun's at its height, each weighted by its colour's luminance. Use it to switch lamps or windows
1234
- * on as a scene darkens, whatever theme or sun lights it.
1235
- */
1236
- brightness: number;
1237
- /** Where the direction comes from: the themes, angles, or a date and place. */
1238
- source: 'theme' | 'direction' | 'date';
1239
- }>;
1240
- /** Unset sun values: high in the south-south-west, with soft white daylight and ambient fill. */
1241
- declare const tileflowDefaultSunPreset: TileflowSunPreset;
1242
- /**
1243
- * Where the sun stands for an instant and a place ([longitude, latitude] in degrees): its azimuth
1244
- * in degrees clockwise from north and its apparent altitude above the horizon, with atmospheric
1245
- * refraction. It follows NOAA's solar equations, accurate to about a hundredth of a degree for
1246
- * years 1800 to 2200.
1247
- */
1248
- declare function tileflowSunPosition(date: Date | number, location: readonly [number, number]): Readonly<{
1249
- azimuth: number;
1250
- altitude: number;
1251
- }>;
1252
- /** A unit vector towards a direction in the sky: x east, y north, z up. */
1253
- declare function tileflowSunDirection(azimuth: number, altitude: number): readonly [number, number, number];
1254
- /**
1255
- * The sun as the map shows it: a preset's light from a direction. Direct light fades out over the
1256
- * sun's last degrees above the horizon and is gone below it.
1257
- */
1258
- declare function resolveTileflowSun(preset: TileflowSunPreset, direction?: Readonly<{
1259
- azimuth: number;
1260
- altitude: number;
1261
- }>, source?: TileflowSun['source']): TileflowSun;
1262
- /**
1263
- * A preset `t` of the way from `from` to `to`: the azimuth turns the short way round, colours mix
1264
- * in OKLab, as theme blends mix paint colours, and numbers linearly.
1265
- */
1266
- declare function mixTileflowSunPresets(from: TileflowSunPreset, to: TileflowSunPreset, t: number): TileflowSunPreset;
1267
- /** Reads the sun a compiled style publishes, or undefined when its metadata has none. */
1268
- declare function readTileflowSunPreset(metadata: unknown): TileflowSunPreset | undefined;
1269
- /**
1270
- * The sun of a compiled style: the one it publishes, else one read from its light (a style whose
1271
- * theme describes no sun lights its extrusions from `light.position`), else the default.
1272
- */
1273
- declare function tileflowStyleSunPreset(style: {
1274
- light?: unknown;
1275
- metadata?: unknown;
1276
- } | undefined): TileflowSunPreset;
1277
-
1278
677
  type TileflowThemeColorScheme = 'dark' | 'light';
1279
678
 
1280
679
  declare const tileflowRouteMetadataKey = "tileflow:route";
@@ -1618,213 +1017,6 @@ type TileflowLineProgressController = {
1618
1017
  */
1619
1018
  declare function createTileflowLineProgress(map: TileflowLineProgressMap, options: TileflowLineProgressOptions): TileflowLineProgressController;
1620
1019
 
1621
- /** Bounded, read-only mesh snapshot for developer tooling. Positions are x east, y north, z up. */
1622
- type TileflowModelInspection = Readonly<{
1623
- id: string;
1624
- module: string;
1625
- format: string;
1626
- vertices: number;
1627
- triangles: number;
1628
- bytes: number;
1629
- lods: number;
1630
- instances?: number;
1631
- positions: number[];
1632
- indices: number[];
1633
- colors?: string[];
1634
- }>;
1635
-
1636
- type TileflowTileAddress = Readonly<{
1637
- z: number;
1638
- x: number;
1639
- y: number;
1640
- }>;
1641
- /** A decoded tile: its address and the chosen layers it holds. */
1642
- type TileflowTile = TileflowTileAddress & Readonly<{
1643
- layers: Readonly<Record<string, TileflowTileLayer>>;
1644
- }>;
1645
- /** Rewrites a tile request as a MapLibre map's `transformRequest` does. */
1646
- type TileflowTileRequestTransform = (url: string, resourceType: 'Tile') => Promise<Readonly<{
1647
- url: string;
1648
- headers?: Readonly<Record<string, string>>;
1649
- credentials?: RequestCredentials;
1650
- }> | undefined> | Readonly<{
1651
- url: string;
1652
- headers?: Readonly<Record<string, string>>;
1653
- credentials?: RequestCredentials;
1654
- }> | undefined;
1655
- type TileflowTileReaderOptions = Readonly<{
1656
- /** The tile address with `{z}`, `{x}` and `{y}`, such as a MapLibre vector source's `tiles[0]`. */
1657
- tiles: string;
1658
- /** The lowest zoom the source has tiles for; defaults to 0. */
1659
- minzoom?: number;
1660
- /** The highest zoom the source has tiles for; deeper reads use its tiles. Defaults to 14. */
1661
- maxzoom?: number;
1662
- /** The layers to decode; defaults to every layer. */
1663
- layers?: readonly string[];
1664
- /** Decoded tiles kept for later reads, from 0 to 4096; defaults to 128. */
1665
- cacheSize?: number;
1666
- /** Requests in flight at once, from 1 to 32; defaults to 6. */
1667
- concurrency?: number;
1668
- /** The map's request rules, applied to every tile request. */
1669
- transformRequest?: TileflowTileRequestTransform;
1670
- /**
1671
- * Defaults to the global `fetch`, and to Core's PMTiles protocol for a source served from a
1672
- * Tileflow PMTiles archive (`tileflow-pmtiles://`).
1673
- */
1674
- fetch?: (url: string, init: RequestInit) => Promise<Response>;
1675
- }>;
1676
- type TileflowTileAreaRequest = Readonly<{
1677
- /** `[west, south, east, north]` in degrees. */
1678
- bounds: readonly [number, number, number, number];
1679
- /** The zoom to read at, clamped to the source's zooms. */
1680
- zoom: number;
1681
- /** The most tiles the area may take; a larger area is refused. Defaults to 64. */
1682
- maxTiles?: number;
1683
- signal?: AbortSignal;
1684
- }>;
1685
- type TileflowTileReader = {
1686
- /** A tile's chosen layers, or undefined when the source has no tile there (404 or 204). */
1687
- readTile(address: TileflowTileAddress, options?: {
1688
- signal?: AbortSignal;
1689
- }): Promise<TileflowTile | undefined>;
1690
- /** The tiles covering an area at a zoom, without the absent ones, nearest the centre first. */
1691
- readArea(request: TileflowTileAreaRequest): Promise<TileflowTile[]>;
1692
- /** Forgets every cached tile. */
1693
- clear(): void;
1694
- };
1695
- /** The tiles at `zoom` covering `[west, south, east, north]`, nearest the centre first. */
1696
- declare function tileflowTilesForBounds(bounds: readonly [number, number, number, number], zoom: number): TileflowTileAddress[];
1697
- /** The longitude and latitude of a point in a tile, given in tile units of an `extent`. */
1698
- declare function tileflowTilePointToLngLat(tile: TileflowTileAddress, x: number, y: number, extent?: number): [number, number];
1699
- /**
1700
- * Reads a vector source's tiles in an application: for example a MapLibre map's World source, with
1701
- * `tiles`, `minzoom` and `maxzoom` taken from `map.getSource(id)`, and the map's `transformRequest`.
1702
- */
1703
- declare function createTileflowTileReader(options: TileflowTileReaderOptions): TileflowTileReader;
1704
- /** Structural MapLibre capability; importing this module never loads a renderer. */
1705
- type TileflowTileSourceMap = {
1706
- getSource(id: string): unknown;
1707
- };
1708
- /**
1709
- * The tile address and zooms of a map's vector source once the map has loaded it, ready for
1710
- * `createTileflowTileReader`; undefined while the source is not loaded or has no tile address.
1711
- */
1712
- declare function readTileflowMapTileSource(map: TileflowTileSourceMap, sourceId: string): {
1713
- tiles: string;
1714
- minzoom: number;
1715
- maxzoom: number;
1716
- } | undefined;
1717
-
1718
- type ShadowPoint = readonly number[];
1719
- type ShadowBox = Readonly<{
1720
- min: ShadowPoint;
1721
- max: ShadowPoint;
1722
- }>;
1723
- type ShadowView = Readonly<{
1724
- /** Visible receiver points, in the caster box's metre frame. All casters still draw. */
1725
- receivers?: readonly ShadowPoint[];
1726
- /** Snap to world-aligned texels; omit for an unsnapped mathematical projection. */
1727
- resolution?: number;
1728
- origin?: ShadowPoint;
1729
- /** Metres per fixed world unit; keeps texel quantization independent of latitude scale. */
1730
- gridScale?: number;
1731
- }>;
1732
- /**
1733
- * The sun's orthographic view, in metres, with room for each caster's shadow to reach the ground.
1734
- * Optional receivers concentrate XY resolution without dropping offscreen casters along a ray;
1735
- * quantized extents and a world-anchored texel grid keep stationary shadows stable during pans.
1736
- */
1737
- declare function tileflowSunLightMatrix(direction: readonly number[], box: ShadowBox, view?: ShadowView): {
1738
- matrix: Float32Array;
1739
- depth: number;
1740
- extent: number;
1741
- };
1742
-
1743
- /** The MapLibre GL JS map capabilities the renderer uses. */
1744
- type TileflowBuildings3DMap = {
1745
- addLayer(layer: object, beforeId?: string): unknown;
1746
- getCenter(): {
1747
- lat: number;
1748
- lng: number;
1749
- };
1750
- getBearing(): number;
1751
- getCanvas?(): {
1752
- clientHeight: number;
1753
- };
1754
- getVerticalFieldOfView?(): number;
1755
- getLight?(): unknown;
1756
- getLayer(id: string): unknown;
1757
- getPaintProperty(layer: string, name: string): unknown;
1758
- getPitch(): number;
1759
- getSource(id: string): unknown;
1760
- getStyle(): unknown;
1761
- getZoom(): number;
1762
- isStyleLoaded(): boolean | void;
1763
- off(event: string, listener: () => void): unknown;
1764
- on(event: string, listener: () => void): unknown;
1765
- removeLayer(id: string): unknown;
1766
- triggerRepaint(): unknown;
1767
- };
1768
- /** Where the renderer reads the sun and the map's design: a Tileflow theme controller. */
1769
- type TileflowBuildings3DThemes = {
1770
- getSun?(): TileflowSun;
1771
- getThemeMetadata?(key: string): Readonly<{
1772
- values: readonly unknown[];
1773
- position: number;
1774
- }>;
1775
- };
1776
- type TileflowBuildings3DOptions = Readonly<{
1777
- map: TileflowBuildings3DMap;
1778
- /** The theme controller, for the sun and the buildings' design in every theme. */
1779
- controller?: TileflowBuildings3DThemes;
1780
- /** The zoom where buildings start fading in, reaching full opacity 0.25 zoom later. Defaults to 15. */
1781
- minzoom?: number;
1782
- /** The most tiles raised round the camera, from 1 to 64; defaults to 25. */
1783
- maxTiles?: number;
1784
- /** The layer to draw before; defaults to the style's `above-buildings` placement. */
1785
- beforeId?: string;
1786
- /** The map's request rules, for the tiles the renderer reads. */
1787
- transformRequest?: TileflowTileRequestTransform;
1788
- }>;
1789
- type TileflowBuildings3DChange = Readonly<{
1790
- transition?: Readonly<{
1791
- duration?: number;
1792
- mode?: 'grow' | 'fade';
1793
- }>;
1794
- }>;
1795
- type TileflowBuildings3D = {
1796
- /** Read-only, bounded snapshots of resident prepared model meshes. */
1797
- inspectModels(): TileflowModelInspection[];
1798
- /** Shows buildings immediately; pass a transition duration to animate their rise. */
1799
- show(options?: TileflowBuildings3DChange): Promise<void>;
1800
- /** Hides buildings immediately; pass a transition duration to animate their descent. */
1801
- hide(options?: TileflowBuildings3DChange): Promise<void>;
1802
- /** Sets the height scale, from 0 (flat) to 1; animation requires a transition duration. */
1803
- grow(scale: number, options?: TileflowBuildings3DChange): Promise<void>;
1804
- /** The height scale shown now. */
1805
- readonly scale: number;
1806
- /**
1807
- * Whether the map's style describes its 3D buildings (the buildings module's
1808
- * `threeDimensional`), tiles raised, buildings and vertices, and the placed models standing, for
1809
- * diagnostics.
1810
- */
1811
- readonly stats: Readonly<{
1812
- declared: boolean;
1813
- tiles: number;
1814
- buildings: number;
1815
- vertices: number;
1816
- models: number;
1817
- }>;
1818
- /** Takes the layer off the map and lets go of its buffers. */
1819
- dispose(): void;
1820
- };
1821
- declare const tileflowBuildings3DLayerId = "tileflow-buildings-3d";
1822
- /**
1823
- * Creates the renderer, showing buildings automatically above zoom 15 unless hidden. It reads the source's
1824
- * z15 tiles round the camera, the zoom at which World's buildings carry their heights.
1825
- */
1826
- declare function createTileflowBuildings3D(options: TileflowBuildings3DOptions): TileflowBuildings3D;
1827
-
1828
1020
  /** The renderer's tile units: MapLibre projects custom layers' tiles over 8192. */
1829
1021
  declare const tileflowBuildingExtent = 8192;
1830
1022
  /** Bytes per vertex; see `meshTileflowBuildings` for the layout. */
@@ -1892,76 +1084,6 @@ type TileflowBuildingMesh = Readonly<{
1892
1084
  */
1893
1085
  declare function meshTileflowBuildings(layer: TileflowTileLayer, options: TileflowBuildingMeshOptions): TileflowBuildingMesh | undefined;
1894
1086
 
1895
- /** The MapLibre GL JS map capabilities the street lights use. */
1896
- type TileflowStreetLightsMap = {
1897
- addLayer(layer: object, beforeId?: string): unknown;
1898
- getBearing(): number;
1899
- getCenter(): {
1900
- lat: number;
1901
- lng: number;
1902
- };
1903
- getLayer(id: string): unknown;
1904
- getPitch(): number;
1905
- getSource(id: string): unknown;
1906
- getStyle(): unknown;
1907
- getZoom(): number;
1908
- isStyleLoaded(): boolean | void;
1909
- off(event: string, listener: () => void): unknown;
1910
- on(event: string, listener: () => void): unknown;
1911
- removeLayer(id: string): unknown;
1912
- triggerRepaint(): unknown;
1913
- };
1914
- type TileflowStreetLightsOptions = Readonly<{
1915
- map: TileflowStreetLightsMap;
1916
- /**
1917
- * By default, only a map that enables roads.streetLights supplies lights. Set true to opt in
1918
- * with the fallback design when metadata is absent, or false to keep every theme's lights off.
1919
- */
1920
- enabled?: boolean;
1921
- /**
1922
- * The theme controller, whose sun switches the lights on and off and whose themes hold the map's
1923
- * street lights (the roads module's `streetLights`).
1924
- */
1925
- controller?: {
1926
- getSun?(): TileflowSun;
1927
- getThemeMetadata?(key: string): Readonly<{
1928
- values: readonly unknown[];
1929
- position: number;
1930
- }>;
1931
- };
1932
- /** The zoom from which the lights shine. Defaults to 14. */
1933
- minzoom?: number;
1934
- /** The most tiles lit round the camera, from 1 to 64; defaults to 25. */
1935
- maxTiles?: number;
1936
- /** The layer to draw before; defaults to the style's `above-buildings` placement. */
1937
- beforeId?: string;
1938
- /** The map's request rules, for the tiles the layer reads. */
1939
- transformRequest?: TileflowTileRequestTransform;
1940
- }>;
1941
- type TileflowStreetLights = {
1942
- /** How far the lights have switched on, from 0 by day to 1 at night. */
1943
- readonly on: number;
1944
- /**
1945
- * Whether the map's style describes its street lights, tiles lit, lamps, and how many of them the
1946
- * data maps or the layer estimates.
1947
- */
1948
- readonly stats: Readonly<{
1949
- declared: boolean;
1950
- tiles: number;
1951
- lamps: number;
1952
- mapped: number;
1953
- estimated: number;
1954
- }>;
1955
- /** Takes the layer off the map and lets go of its buffers. */
1956
- dispose(): void;
1957
- };
1958
- declare const tileflowStreetLightsLayerId = "tileflow-street-lights";
1959
- /**
1960
- * Creates the street lights and puts their layer on the map. They read the source's z15 tiles round
1961
- * the camera once the controller's sun darkens the map, and shine from `minzoom`.
1962
- */
1963
- declare function createTileflowStreetLights(options: TileflowStreetLightsOptions): TileflowStreetLights;
1964
-
1965
1087
  /** Begin/end height fractions, begin/end multipliers and the base-10 curve exponent. */
1966
1088
  type TileflowModelEmissionGradient = readonly [number, number, number, number, number];
1967
1089
  type TileflowModelRoleLighting = Readonly<{
@@ -2026,6 +1148,15 @@ type TileflowBuildings3DDesign = Readonly<{
2026
1148
  modelLighting?: Readonly<Partial<Record<TileflowModelLightingRole, TileflowModelRoleLighting>>>;
2027
1149
  /** Invented night windows, lit by rooms: decoration, not data. */
2028
1150
  windows: boolean;
1151
+ /**
1152
+ * The zoom bands, `[from, to]`, the buildings and the placed models and landmarks come in over:
1153
+ * across its band each fades in and rises from the ground. The renderer's defaults stand for a
1154
+ * band left out.
1155
+ */
1156
+ entrance?: Readonly<{
1157
+ buildings?: readonly [number, number];
1158
+ models?: readonly [number, number];
1159
+ }>;
2029
1160
  /** Shadows from the sun, and contact shadow at the foot of the walls. */
2030
1161
  shadows: boolean;
2031
1162
  occlusion: boolean;
@@ -2069,92 +1200,6 @@ declare function tileflowTeamModelUrl(model: string): string;
2069
1200
  /** The Team model a placement's address is the placeholder of, if it is one. */
2070
1201
  declare function readTileflowTeamModelName(url: string): string | undefined;
2071
1202
 
2072
- /** The MapLibre GL JS map capabilities the trees use. */
2073
- type TileflowTrees3DMap = {
2074
- addLayer(layer: object, beforeId?: string): unknown;
2075
- getBearing(): number;
2076
- getCenter(): {
2077
- lat: number;
2078
- lng: number;
2079
- };
2080
- getLayer(id: string): unknown;
2081
- getLayoutProperty?(layer: string, name: string): unknown;
2082
- getPitch(): number;
2083
- getSource(id: string): unknown;
2084
- getStyle(): unknown;
2085
- getZoom(): number;
2086
- isStyleLoaded(): boolean | void;
2087
- off(event: string, listener: () => void): unknown;
2088
- on(event: string, listener: () => void): unknown;
2089
- removeLayer(id: string): unknown;
2090
- setLayoutProperty?(layer: string, name: string, value: unknown): unknown;
2091
- triggerRepaint(): unknown;
2092
- };
2093
- /** Where the trees read the sun and the map's design: a Tileflow theme controller. */
2094
- type TileflowTrees3DThemes = {
2095
- getSun?(): TileflowSun;
2096
- getThemeMetadata?(key: string): Readonly<{
2097
- values: readonly unknown[];
2098
- position: number;
2099
- }>;
2100
- };
2101
- type TileflowTrees3DOptions = Readonly<{
2102
- map: TileflowTrees3DMap;
2103
- /** The theme controller, for the sun and the trees' colours in every theme. */
2104
- controller?: TileflowTrees3DThemes;
2105
- /** The vector source with the canopy points, when not the map's World source. */
2106
- canopySource?: string;
2107
- /** The zoom from which trees stand; they reach full opacity 0.25 zoom later. Defaults to 15. */
2108
- minzoom?: number;
2109
- /** The most tiles of trees round the camera, from 1 to 64; defaults to 25. */
2110
- maxTiles?: number;
2111
- /** The layer to draw before; defaults to the style's `above-buildings` placement. */
2112
- beforeId?: string;
2113
- /** The map's request rules, for the tiles the layer reads. */
2114
- transformRequest?: TileflowTileRequestTransform;
2115
- /** Let a vegetation controller own flat-layer visibility. Defaults to true. */
2116
- manageFlatLayers?: boolean;
2117
- }>;
2118
- type TileflowTrees3DChange = Readonly<{
2119
- transition?: Readonly<{
2120
- duration?: number;
2121
- }>;
2122
- }>;
2123
- type TileflowTrees3D = {
2124
- /** Read-only snapshots of the meshes used by the active vegetation palette. */
2125
- inspectModels(): TileflowModelInspection[];
2126
- /** Grows the trees out of the ground; resolves once they stand. */
2127
- show(options?: TileflowTrees3DChange): Promise<void>;
2128
- /** Sinks the trees back into the ground; resolves once they are gone. */
2129
- hide(options?: TileflowTrees3DChange): Promise<void>;
2130
- /** Eases the trees to `scale` of their size, from 0 (none) to 1. */
2131
- grow(scale: number, options?: TileflowTrees3DChange): Promise<void>;
2132
- /** The size scale shown now. */
2133
- readonly scale: number;
2134
- /**
2135
- * Whether the map's style describes 3D trees (`vegetation({mode: '3d'})`), tiles of trees,
2136
- * trees placed (mapped and from canopy points), pieces of hedge placed and trees drawn in the
2137
- * last frame.
2138
- */
2139
- readonly stats: Readonly<{
2140
- declared: boolean;
2141
- tiles: number;
2142
- trees: number;
2143
- mapped: number;
2144
- canopy: number;
2145
- hedges: number;
2146
- drawn: number;
2147
- }>;
2148
- /** Takes the layer off the map and lets go of its buffers. */
2149
- dispose(): void;
2150
- };
2151
- declare const tileflowTrees3DLayerId = "tileflow-trees-3d";
2152
- /**
2153
- * Creates the trees and puts their layer on the map, sunk in the ground until `show()`. They read
2154
- * the source's z15 tiles round the camera, where World carries its trees and canopy points.
2155
- */
2156
- declare function createTileflowTrees3D(options: TileflowTrees3DOptions): TileflowTrees3D;
2157
-
2158
1203
  /** Bytes per lamp; see `placeTileflowStreetLights` for the layout. */
2159
1204
  declare const tileflowStreetLightBytes = 12;
2160
1205
  /**
@@ -2542,49 +1587,54 @@ declare const tileflowPmtilesProtocol: "tileflow-pmtiles";
2542
1587
  /** Register only Tileflow's managed PMTiles namespace. Third-party `pmtiles://` remains untouched. */
2543
1588
  declare function registerTileflowPmtilesProtocol(registry: TileflowPmtilesProtocolRegistry, options?: TileflowPmtilesProtocolRegistrationOptions): void;
2544
1589
 
2545
- type TileflowViewMode = '2d' | '3d';
2546
- type TileflowVegetationRepresentation = 'none' | 'flat' | '3d';
2547
- declare const tileflowVegetationDisplayMetadataKey = "tileflow:vegetation-display";
2548
- /** Display policy, separate from the models' design and the camera's pitch. */
2549
- type TileflowVegetationDisplay = Readonly<{
2550
- version: 1;
2551
- mode: TileflowVegetationMode;
2552
- fallback: 'flat' | 'none';
2553
- visible: boolean;
2554
- /** Authored visibility before the compiler applies the static fallback. */
2555
- flatLayers: readonly Readonly<{
2556
- id: string;
2557
- visible: boolean;
2558
- }>[];
1590
+ /** The style metadata through which a compiled map declares its 3D scene. */
1591
+ declare const tileflowMap3DMetadataKeys: readonly ["tileflow:buildings", "tileflow:vegetation", "tileflow:vegetation-display", "tileflow:street-lights"];
1592
+ /** Where the 3D scene reads the style: the map, and the theme controller when there is one. */
1593
+ type TileflowMap3DSource = Readonly<{
1594
+ map: {
1595
+ getStyle(): unknown;
1596
+ };
1597
+ controller?: {
1598
+ getThemeMetadata?(key: string): Readonly<{
1599
+ values: readonly unknown[];
1600
+ position: number;
1601
+ }>;
1602
+ };
2559
1603
  }>;
2560
- declare function readTileflowVegetationDisplay(metadata: unknown): TileflowVegetationDisplay | undefined;
2561
- declare function resolveTileflowVegetationRepresentation(policy: TileflowVegetationDisplay | undefined, options: {
2562
- visible?: boolean | undefined;
2563
- viewMode?: TileflowViewMode;
2564
- supports3D: boolean;
2565
- }): TileflowVegetationRepresentation;
2566
-
2567
- type TileflowVegetationOptions = Omit<TileflowTrees3DOptions, 'manageFlatLayers' | 'map'> & {
2568
- map: TileflowTrees3DOptions['map'] & {
2569
- getCanvas?(): HTMLCanvasElement;
1604
+ /**
1605
+ * The parts of a 3D scene the style on screen declares, as their metadata keys; during a theme
1606
+ * blend, those any blended theme declares.
1607
+ */
1608
+ declare function tileflowMap3DDeclarations(source: TileflowMap3DSource): ReadonlySet<string>;
1609
+ /** Whether the style on screen declares any part of a 3D scene: buildings, trees or lights. */
1610
+ declare function tileflowMapDeclares3D(source: TileflowMap3DSource): boolean;
1611
+ /** Loads the 3D renderers: a dynamic import of the `@tileflow/core/3d` entry. */
1612
+ type TileflowMap3DLoader = () => Promise<{
1613
+ createTileflowMap3D(options: TileflowMap3DOptions): TileflowMap3D;
1614
+ }>;
1615
+ type AttachTileflowMap3DOptions = TileflowMap3DOptions & {
1616
+ map: TileflowMap3DOptions['map'] & {
1617
+ getStyle(): unknown;
2570
1618
  };
2571
- /** Overrides the map's visibility. Undefined restores the authored default. */
2572
- visible?: boolean | undefined;
2573
- /** Explicit application view mode, independent of pitch and building visibility. Defaults to 2d. */
2574
- viewMode?: TileflowViewMode;
2575
- };
2576
- type TileflowVegetationController = {
2577
- inspectModels: TileflowTrees3D['inspectModels'];
2578
- setVisible(visible: boolean | undefined): void;
1619
+ /** Loads the renderers the first time the map's style declares 3D. */
1620
+ load: TileflowMap3DLoader;
1621
+ /** Receives a failure to load or mount the renderers; the 2D map keeps working. */
1622
+ onError?: (error: unknown) => void;
1623
+ };
1624
+ type TileflowMap3DAttachment = {
1625
+ /** The mounted scene, once a style that declares 3D has loaded the renderers. */
1626
+ readonly scene: TileflowMap3D | undefined;
1627
+ /** `3d` shows the scene; `2d` hides it and draws `auto` vegetation flat. */
2579
1628
  setViewMode(mode: TileflowViewMode): void;
2580
- /** Reapplies the policy after application layer controls change. */
2581
- refresh(): void;
2582
- readonly representation: TileflowVegetationRepresentation;
2583
- readonly stats: TileflowTrees3D['stats'] | undefined;
1629
+ /** Overrides the map's vegetation visibility; undefined restores the authored default. */
1630
+ setVegetation(visible: boolean | undefined): void;
2584
1631
  dispose(): void;
2585
1632
  };
2586
- /** Mount once per map. OFF hides every representation; mode selects how enabled trees are drawn. */
2587
- declare function createTileflowVegetation(options: TileflowVegetationOptions): TileflowVegetationController;
1633
+ /**
1634
+ * Mounts the map's 3D scene when, and only when, its style declares one. Until then it loads
1635
+ * nothing, so a 2D map does not pay for the 3D renderers. Requested state applies on mount.
1636
+ */
1637
+ declare function attachTileflowMap3D(options: AttachTileflowMap3DOptions): TileflowMap3DAttachment;
2588
1638
 
2589
1639
  type TileflowMapReadinessState = 'error' | 'idle' | 'loading';
2590
1640
  /** Read the browser preference without persisting or mutating user state. */
@@ -2823,4 +1873,4 @@ declare function createTileflowTransformRequest<TRequest extends TileflowTransfo
2823
1873
  worldRequestBridge?: TileflowWorldRequestBridge;
2824
1874
  }): TileflowTransformRequest<TRequest, TResourceType>;
2825
1875
 
2826
- export { type CreateBoundaryFeatureStateOptions, type TileflowAtmosphereMap, type TileflowBoundaryFeatureState, type TileflowBrowserThemeBlendSelection, type TileflowBuildingMesh, type TileflowBuildingMeshOptions, type TileflowBuildingModelPlacement, type TileflowBuildings3D, type TileflowBuildings3DChange, type TileflowBuildings3DDesign, type TileflowBuildings3DMap, type TileflowBuildings3DOptions, type TileflowBuildings3DThemes, 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 TileflowLineProgressAnimation, type TileflowLineProgressController, type TileflowLineProgressGradientOptions, type TileflowLineProgressLayer, type TileflowLineProgressMap, type TileflowLineProgressOptions, type TileflowLineProgressShown, type TileflowLineProgressState, type TileflowMapLifecycleAttachment, type TileflowMapLifecycleEvent, type TileflowMapLifecycleSubscriber, type TileflowMapNotice, type TileflowMapReadinessState, type TileflowNoticeControl, type TileflowNoticeControlPosition, type TileflowNoticesMap, type TileflowNoticesOptions, 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 TileflowStreetLightEstimate, type TileflowStreetLightLayers, type TileflowStreetLightPlacement, type TileflowStreetLightPlacementOptions, type TileflowStreetLights, type TileflowStreetLightsDesign, type TileflowStreetLightsMap, type TileflowStreetLightsOptions, type TileflowStyleFontLoadOptions, type TileflowStyleStateValue, type TileflowStyleSwitchMap, type TileflowSun, type TileflowSunPreset, type TileflowSunRequest, type TileflowThemeBlendRequest, type TileflowThemeBlendState, type TileflowThemeChangeOptions, type TileflowThemeController, type TileflowThemeTransition, type TileflowThemeTransitionOptions, type TileflowThemeTransitionPhase, type TileflowThemeTransitionResult, type TileflowTile, type TileflowTileAddress, type TileflowTileAreaRequest, type TileflowTileFeature, type TileflowTileGeometryType, type TileflowTileLayer, type TileflowTileReader, type TileflowTileReaderOptions, type TileflowTileRequestTransform, type TileflowTileSourceMap, type TileflowTransformRequest, type TileflowTransformRequestParameters, type TileflowTreeFields, type TileflowTreeForm, type TileflowTreeFormMix, type TileflowTreeFormRange, type TileflowTreeLayers, type TileflowTreePlacement, type TileflowTreePlacementOptions, type TileflowTreeRange, type TileflowTreeRegion, type TileflowTrees3D, type TileflowTrees3DChange, type TileflowTrees3DMap, type TileflowTrees3DOptions, type TileflowTrees3DThemes, type TileflowUserTransformRequest, type TileflowVectorTileDecodeOptions, type TileflowVegetation3D, type TileflowVegetationController, type TileflowVegetationDisplay, type TileflowVegetationOptions, type TileflowVegetationRepresentation, type TileflowViewMode, type TileflowWorldProtocolHandler, type TileflowWorldProtocolRequest, type TileflowWorldProtocolResponse, type TileflowWorldRequestBridge, attachTileflowAtmosphere, attachTileflowFairUseNotice, attachTileflowMapLifecycle, attachTileflowNotices, createBoundaryFeatureState, createTileflowBuildings3D, createTileflowDepthMarkers, createTileflowGroundLayers, createTileflowLineProgress, createTileflowSessionStarter, createTileflowStreetLights, createTileflowThemeController, createTileflowTileReader, createTileflowTransformRequest, createTileflowTrees3D, createTileflowVegetation, decodeTileflowVectorTile, getTileflowSystemColorScheme, loadTileflowStyleFonts, meshTileflowBuildings, mixTileflowRouteInks, mixTileflowSunPresets, placeTileflowStreetLights, placeTileflowTrees, playTileflowShot, readTileflowBuildings3D, readTileflowMapTileSource, readTileflowNotices, readTileflowRouteInks, readTileflowStreetLights, readTileflowSunPreset, readTileflowTeamModelName, readTileflowVegetation3D, readTileflowVegetationDisplay, registerTileflowContourProtocol, registerTileflowPmtilesProtocol, registerTileflowWorldRequestBridge, resolveTileflowSun, resolveTileflowVegetationRepresentation, subscribeTileflowSystemColorScheme, tileflowBuildingExtent, tileflowBuildingModelPlacementLimit, tileflowBuildingVertexBytes, tileflowBuildings3DLayerId, tileflowBuildingsMetadataKey, tileflowDefaultRouteInks, tileflowDefaultSunPreset, tileflowDepthMarkerPlacement, tileflowFairUseNoticeMessage, tileflowGroundBeforeId, tileflowLayerDomainMetadataKey, tileflowLineProgressGradient, tileflowMaplibreContourVersion, tileflowNoticeLimits, tileflowNoticesMetadataKey, tileflowPmtilesMaximumDirectoryDepth, tileflowPmtilesProtocol, tileflowRouteMetadataKey, tileflowShotStateAt, tileflowStreetLightBytes, tileflowStreetLightsLayerId, tileflowStreetLightsMetadataKey, tileflowStyleRouteInks, tileflowStyleSunPreset, tileflowSunDirection, tileflowSunLightMatrix, tileflowSunMetadataKey, tileflowSunPosition, tileflowTeamModelUrl, tileflowTilePointToLngLat, tileflowTilesForBounds, tileflowTreeBytes, tileflowTreeFormOf, tileflowTreeForms, tileflowTrees3DLayerId, tileflowVegetationDisplayMetadataKey, tileflowVegetationMetadataKey, validateTileflowBrowserThemeBlendSelection, validateTileflowEmphasis };
1876
+ export { type AttachTileflowMap3DOptions, type CreateBoundaryFeatureStateOptions, type TileflowAtmosphereMap, type TileflowBoundaryFeatureState, type TileflowBrowserThemeBlendSelection, type TileflowBuildingMesh, type TileflowBuildingMeshOptions, type TileflowBuildingModelPlacement, 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 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 TileflowNoticeControl, type TileflowNoticeControlPosition, type TileflowNoticesMap, type TileflowNoticesOptions, 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 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, attachTileflowMap3D, attachTileflowMapLifecycle, attachTileflowNotices, createBoundaryFeatureState, createTileflowDepthMarkers, createTileflowGroundLayers, createTileflowLineProgress, createTileflowSessionStarter, createTileflowThemeController, createTileflowTransformRequest, getTileflowSystemColorScheme, loadTileflowStyleFonts, meshTileflowBuildings, mixTileflowRouteInks, placeTileflowStreetLights, playTileflowShot, readTileflowBuildings3D, readTileflowNotices, readTileflowRouteInks, readTileflowStreetLights, readTileflowTeamModelName, registerTileflowContourProtocol, registerTileflowPmtilesProtocol, registerTileflowWorldRequestBridge, subscribeTileflowSystemColorScheme, tileflowBuildingExtent, tileflowBuildingModelPlacementLimit, tileflowBuildingVertexBytes, tileflowBuildingsMetadataKey, tileflowDefaultRouteInks, tileflowDepthMarkerPlacement, tileflowFairUseNoticeMessage, tileflowGroundBeforeId, tileflowLayerDomainMetadataKey, tileflowLineProgressGradient, tileflowMap3DDeclarations, tileflowMap3DMetadataKeys, tileflowMapDeclares3D, tileflowMaplibreContourVersion, tileflowNoticeLimits, tileflowNoticesMetadataKey, tileflowPmtilesMaximumDirectoryDepth, tileflowPmtilesProtocol, tileflowRouteMetadataKey, tileflowShotStateAt, tileflowStreetLightBytes, tileflowStreetLightsMetadataKey, tileflowStyleRouteInks, tileflowSunLightMatrix, tileflowTeamModelUrl, validateTileflowBrowserThemeBlendSelection, validateTileflowEmphasis };