@tileflow/core 0.1.0-alpha.4 → 0.1.0-alpha.41
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/LICENSE +201 -0
- package/README.md +318 -26
- package/THIRD_PARTY_NOTICES.md +444 -0
- package/dist/3d-CzLTD0RK.d.ts +1092 -0
- package/dist/3d.d.ts +1 -0
- package/dist/3d.js +12660 -0
- package/dist/browser.d.ts +2278 -0
- package/dist/browser.js +21826 -0
- package/dist/build.d.ts +595 -0
- package/dist/build.js +29737 -0
- package/dist/capture-shot-ChPQvPyi.d.ts +291 -0
- package/dist/capture.d.ts +9 -0
- package/dist/capture.js +510 -0
- package/dist/config-reference.json +40527 -0
- package/dist/icon-composition-HUh_Lj8Z.d.ts +2516 -0
- package/dist/index.d.ts +1805 -162
- package/dist/index.js +26400 -3488
- package/dist/manifest-types-DnhSJjCM.d.ts +902 -0
- package/dist/manifest.d.ts +9 -0
- package/dist/manifest.js +449 -0
- package/dist/native-profile.d.ts +206 -0
- package/dist/native-profile.js +9339 -0
- package/dist/native.d.ts +365 -0
- package/dist/native.js +5970 -0
- package/dist/runtime.d.ts +1 -0
- package/dist/runtime.js +1445 -0
- package/dist/worker/camera-tile-worker.global.js +20 -0
- package/docs/application-tile-reading.md +86 -0
- package/docs/authoring-model.md +269 -0
- package/docs/boundary-areas-and-choropleths.md +217 -0
- package/docs/buildings-3d.md +608 -0
- package/docs/camera-moves-and-tile-cache.md +112 -0
- package/docs/capture-scenes.md +40 -0
- package/docs/capture-shots.md +173 -0
- package/docs/cartographic-defaults.md +210 -0
- package/docs/compiled-style-performance.md +286 -0
- package/docs/data-is-separate-from-design.md +610 -0
- package/docs/depth-markers.md +65 -0
- package/docs/dynamic-style-images.md +100 -0
- package/docs/globe-atmosphere.md +113 -0
- package/docs/hosted-session-authorization.md +106 -0
- package/docs/map-and-terrain-examples.md +156 -0
- package/docs/map-emphasis.md +89 -0
- package/docs/native-artifact-profile.md +152 -0
- package/docs/native-resource-urls.md +369 -0
- package/docs/nautical-marks.md +308 -0
- package/docs/public-api-and-browser-subpath.md +101 -0
- package/docs/route-drawing.md +191 -0
- package/docs/shared-visual-primitives.md +101 -0
- package/docs/street-lights.md +127 -0
- package/docs/street-sky.md +156 -0
- package/docs/style-states.md +73 -0
- package/docs/sun-and-light.md +167 -0
- package/docs/theme-transitions-and-blends.md +317 -0
- package/docs/themes-and-module-styles.md +156 -0
- package/docs/trees-3d.md +295 -0
- package/package.json +67 -8
|
@@ -0,0 +1,2516 @@
|
|
|
1
|
+
import { bd as TileflowThemeColorValue, r as TileflowSymbolStyle, D as TileflowAreaStyle, a1 as TileflowLineStackStyle, q as TileflowLineStyle, o as TileflowExtrusionStyle, bg as TileflowThemeNumberValue, bj as TileflowThemeValue, m as TileflowBackgroundStyle, p as TileflowFillStyle, a6 as TileflowMarkerSymbolStyle, n as TileflowCircleStyle, aU as TileflowSymbolPlacement, b1 as TileflowTerrainHillshadeStyle, b0 as TileflowTerrainEncoding, be as TileflowThemeFontValue, bf as TileflowThemeImageValue, c0 as TileflowTypographyStyle, X as TileflowLight, c1 as ResolvedTileflowTypography, f as TileflowTimeOfDayVariants, e as TileflowTimeOfDay, w as TileflowLabelsModuleConfig, y as TileflowPoiModuleConfig, u as TileflowRoadsModuleConfig, ah as TileflowProjection, aX as TileflowTerrain, bk as TileflowViewConfig, M as MapLibreStyle, bo as ValidationResult } from './manifest-types-DnhSJjCM.js';
|
|
2
|
+
import * as zod from 'zod';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import { T as TileflowCaptureScene, a as TileflowCaptureShot } from './capture-shot-ChPQvPyi.js';
|
|
5
|
+
|
|
6
|
+
/** Optional globe atmosphere. Colors use theme tokens or explicit fixed values and must resolve to opaque colors. */
|
|
7
|
+
type TileflowAtmosphereOptions = {
|
|
8
|
+
skyColor?: TileflowThemeColorValue;
|
|
9
|
+
horizonColor?: TileflowThemeColorValue;
|
|
10
|
+
fogColor?: TileflowThemeColorValue;
|
|
11
|
+
spaceColor?: TileflowThemeColorValue;
|
|
12
|
+
/** Star color. Default: #e0ebff. */
|
|
13
|
+
starColor?: TileflowThemeColorValue;
|
|
14
|
+
/** Stars per repeating 1600 × 1000 CSS-pixel area, integer 0–4096. Default: 1100. */
|
|
15
|
+
starCount?: number;
|
|
16
|
+
/** Star radius multiplier from 0 (hidden) to 4. Default: 1. */
|
|
17
|
+
starSize?: number;
|
|
18
|
+
/** Star brightness from 0 (hidden) to 1. Default: 0.6. */
|
|
19
|
+
starIntensity?: number;
|
|
20
|
+
/** Camera-relative star movement from 0 (still) to 1. Default: 0.4. */
|
|
21
|
+
starParallax?: number;
|
|
22
|
+
};
|
|
23
|
+
type TileflowAtmosphere = boolean | TileflowAtmosphereOptions;
|
|
24
|
+
|
|
25
|
+
declare const tileflowOverlayPlacements: readonly ["above-water", "below-roads", "above-roads", "above-buildings", "below-labels", "above-labels"];
|
|
26
|
+
declare const tileflowHostedSourceLimit: 16;
|
|
27
|
+
type TileflowOverlayPlacement = (typeof tileflowOverlayPlacements)[number];
|
|
28
|
+
type TileflowHostedTilesetType = 'raster' | 'vector';
|
|
29
|
+
type TileflowHostedTilesetSource = Readonly<{
|
|
30
|
+
attribution: string;
|
|
31
|
+
kind: 'hosted-tileset';
|
|
32
|
+
local: string;
|
|
33
|
+
tileset: string;
|
|
34
|
+
tileSize?: 256 | 512;
|
|
35
|
+
type: TileflowHostedTilesetType;
|
|
36
|
+
}>;
|
|
37
|
+
type TileflowMapLibreOverlayLayer = Readonly<Record<string, unknown> & {
|
|
38
|
+
id: string;
|
|
39
|
+
source?: never;
|
|
40
|
+
type: string;
|
|
41
|
+
}>;
|
|
42
|
+
type TileflowMapLibreOverlay = Readonly<{
|
|
43
|
+
kind: 'maplibre-overlay';
|
|
44
|
+
layers: readonly TileflowMapLibreOverlayLayer[];
|
|
45
|
+
placement: TileflowOverlayPlacement;
|
|
46
|
+
source: string;
|
|
47
|
+
}>;
|
|
48
|
+
type TileflowRemoveOperation = Readonly<{
|
|
49
|
+
op: 'remove';
|
|
50
|
+
}>;
|
|
51
|
+
type TileflowHostedSourceCollection = Readonly<Record<string, TileflowHostedTilesetSource | TileflowRemoveOperation>>;
|
|
52
|
+
type TileflowOverlayCollection = Readonly<Record<string, TileflowMapLibreOverlay | TileflowRemoveOperation>>;
|
|
53
|
+
/** Bind one logical Team tileset to an explicit account-free local PMTiles archive. */
|
|
54
|
+
declare function hostedTileset(options: {
|
|
55
|
+
attribution: string;
|
|
56
|
+
local: string;
|
|
57
|
+
tileset: string;
|
|
58
|
+
tileSize?: 256 | 512;
|
|
59
|
+
type?: TileflowHostedTilesetType;
|
|
60
|
+
}): TileflowHostedTilesetSource;
|
|
61
|
+
/** Group one or more ordinary MapLibre layers around one named Tileflow source. */
|
|
62
|
+
declare function maplibreOverlay(options: {
|
|
63
|
+
layers: readonly TileflowMapLibreOverlayLayer[];
|
|
64
|
+
placement: TileflowOverlayPlacement;
|
|
65
|
+
source: string;
|
|
66
|
+
}): TileflowMapLibreOverlay;
|
|
67
|
+
/** Remove one inherited keyed source or overlay. */
|
|
68
|
+
declare function remove(): TileflowRemoveOperation;
|
|
69
|
+
declare function isSafeLocalPmtilesPath(value: unknown): value is string;
|
|
70
|
+
|
|
71
|
+
/** Administrative and neighbourhood classes of the Boundaries tileset, from the largest. */
|
|
72
|
+
declare const tileflowBoundaryClasses: readonly ["country", "dependency", "region", "province_or_county", "municipality", "district", "neighbourhood"];
|
|
73
|
+
type TileflowBoundaryClass = (typeof tileflowBoundaryClasses)[number];
|
|
74
|
+
/** `primary` is the level that covers a country with its class; `secondary` is any other. */
|
|
75
|
+
declare const tileflowBoundaryClassTiers: readonly ["primary", "secondary"];
|
|
76
|
+
type TileflowBoundaryClassTier = (typeof tileflowBoundaryClassTiers)[number];
|
|
77
|
+
/**
|
|
78
|
+
* Version 1 of the Boundaries tile schema. Polygons carry only the properties needed to filter and
|
|
79
|
+
* join them; labels and the lookup table carry the rest.
|
|
80
|
+
*/
|
|
81
|
+
declare const tileflowBoundaryAreasV1Schema: Readonly<{
|
|
82
|
+
classes: readonly ["country", "dependency", "region", "province_or_county", "municipality", "district", "neighbourhood"];
|
|
83
|
+
/** First zoom at which each class appears, by tier. */
|
|
84
|
+
classMinzoom: Readonly<{
|
|
85
|
+
country: Readonly<{
|
|
86
|
+
primary: 0;
|
|
87
|
+
secondary: 0;
|
|
88
|
+
}>;
|
|
89
|
+
dependency: Readonly<{
|
|
90
|
+
primary: 0;
|
|
91
|
+
secondary: 0;
|
|
92
|
+
}>;
|
|
93
|
+
region: Readonly<{
|
|
94
|
+
primary: 3;
|
|
95
|
+
secondary: 3;
|
|
96
|
+
}>;
|
|
97
|
+
province_or_county: Readonly<{
|
|
98
|
+
primary: 6;
|
|
99
|
+
secondary: 7;
|
|
100
|
+
}>;
|
|
101
|
+
municipality: Readonly<{
|
|
102
|
+
primary: 8;
|
|
103
|
+
secondary: 8;
|
|
104
|
+
}>;
|
|
105
|
+
district: Readonly<{
|
|
106
|
+
primary: 10;
|
|
107
|
+
secondary: 10;
|
|
108
|
+
}>;
|
|
109
|
+
neighbourhood: Readonly<{
|
|
110
|
+
primary: 11;
|
|
111
|
+
secondary: 11;
|
|
112
|
+
}>;
|
|
113
|
+
}>;
|
|
114
|
+
fields: Readonly<{
|
|
115
|
+
adminDepth: "admin_depth";
|
|
116
|
+
adminLevel: "admin_level";
|
|
117
|
+
class: "class";
|
|
118
|
+
classTier: "class_tier";
|
|
119
|
+
iso31661: "iso_3166_1";
|
|
120
|
+
iso31662: "iso_3166_2";
|
|
121
|
+
name: "name";
|
|
122
|
+
nuts: "nuts";
|
|
123
|
+
ref: "ref";
|
|
124
|
+
wikidata: "wikidata";
|
|
125
|
+
}>;
|
|
126
|
+
layers: Readonly<{
|
|
127
|
+
areas: "boundary_area";
|
|
128
|
+
labels: "boundary_label";
|
|
129
|
+
}>;
|
|
130
|
+
/** Properties present on `boundary_area` polygons. */
|
|
131
|
+
areaProperties: readonly ["class", "class_tier", "admin_level", "admin_depth", "ref", "iso_3166_1"];
|
|
132
|
+
maxzoom: 12;
|
|
133
|
+
minzoom: 0;
|
|
134
|
+
product: "boundaries-v1";
|
|
135
|
+
schemaVersion: 1;
|
|
136
|
+
tiers: readonly ["primary", "secondary"];
|
|
137
|
+
}>;
|
|
138
|
+
/**
|
|
139
|
+
* Boundaries families. Each one has its own license, attribution, TileJSON path and style source
|
|
140
|
+
* ID; families are never merged.
|
|
141
|
+
*/
|
|
142
|
+
declare const tileflowBoundaryFamilies: Readonly<{
|
|
143
|
+
boundaries: Readonly<{
|
|
144
|
+
attribution: "© OpenStreetMap contributors";
|
|
145
|
+
license: "ODbL-1.0";
|
|
146
|
+
path: "/tiles/boundaries/tiles.json";
|
|
147
|
+
sourceId: "tileflow-boundaries";
|
|
148
|
+
}>;
|
|
149
|
+
}>;
|
|
150
|
+
type TileflowBoundaryFamily = keyof typeof tileflowBoundaryFamilies;
|
|
151
|
+
declare function isTileflowBoundaryFamily(value: unknown): value is TileflowBoundaryFamily;
|
|
152
|
+
declare function isTileflowBoundaryClass(value: unknown): value is TileflowBoundaryClass;
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Tileflow's Boundaries tileset as a map source. It is a separate product from World: World's
|
|
156
|
+
* border lines belong to the `boundaries` module, while this source holds the areas themselves.
|
|
157
|
+
*/
|
|
158
|
+
type TileflowBoundaryAreasConfig = Readonly<{
|
|
159
|
+
/** The licensed family to draw. Its attribution is always shown with its layers. */
|
|
160
|
+
family: TileflowBoundaryFamily;
|
|
161
|
+
/**
|
|
162
|
+
* The property MapLibre uses as feature ID for feature-state. By default it is the registry ID,
|
|
163
|
+
* which survives releases; `ref` keys feature-state by official code instead.
|
|
164
|
+
*/
|
|
165
|
+
promoteId?: 'ref';
|
|
166
|
+
/**
|
|
167
|
+
* A schema-compatible vector TileJSON or `pmtiles://` archive, such as a local copy for offline
|
|
168
|
+
* development. Defaults to the family's TileJSON under the Tileflow API.
|
|
169
|
+
*/
|
|
170
|
+
url?: string;
|
|
171
|
+
}>;
|
|
172
|
+
/** `false` removes Boundaries inherited from a parent map. */
|
|
173
|
+
type TileflowBoundaryAreas = false | TileflowBoundaryAreasConfig;
|
|
174
|
+
type TileflowBoundaryAreasSourceIdentity = Readonly<{
|
|
175
|
+
family: TileflowBoundaryFamily;
|
|
176
|
+
kind: 'tileflow-boundaries';
|
|
177
|
+
product: typeof tileflowBoundaryAreasV1Schema.product;
|
|
178
|
+
promoteId?: 'ref';
|
|
179
|
+
schemaVersion: typeof tileflowBoundaryAreasV1Schema.schemaVersion;
|
|
180
|
+
sourceId: string;
|
|
181
|
+
url: string;
|
|
182
|
+
}>;
|
|
183
|
+
type ResolvedBoundaryAreas = Readonly<{
|
|
184
|
+
identity: TileflowBoundaryAreasSourceIdentity;
|
|
185
|
+
source: Readonly<{
|
|
186
|
+
attribution: string;
|
|
187
|
+
promoteId?: Readonly<Record<string, string>>;
|
|
188
|
+
type: 'vector';
|
|
189
|
+
url: string;
|
|
190
|
+
}>;
|
|
191
|
+
sourceId: string;
|
|
192
|
+
}>;
|
|
193
|
+
/** Resolve a map's Boundaries declaration into its style source without fetching its TileJSON. */
|
|
194
|
+
declare function resolveBoundaryAreas(config: TileflowBoundaryAreas | undefined, apiBaseUrl?: string): ResolvedBoundaryAreas | undefined;
|
|
195
|
+
|
|
196
|
+
type TileflowAddressesModuleOptions = {
|
|
197
|
+
/** Styling for OpenMapTiles point house-number labels. */
|
|
198
|
+
labels?: TileflowSymbolStyle;
|
|
199
|
+
};
|
|
200
|
+
type TileflowAddressesModuleConfig = TileflowAddressesModuleOptions & {
|
|
201
|
+
type: 'addresses';
|
|
202
|
+
};
|
|
203
|
+
declare function addresses(options?: TileflowAddressesModuleOptions): TileflowAddressesModuleConfig;
|
|
204
|
+
|
|
205
|
+
type TileflowAerowaysModuleOptions = {
|
|
206
|
+
area?: TileflowAreaStyle;
|
|
207
|
+
runway?: TileflowLineStackStyle;
|
|
208
|
+
runwayRef?: TileflowSymbolStyle;
|
|
209
|
+
taxiway?: TileflowLineStackStyle;
|
|
210
|
+
};
|
|
211
|
+
type TileflowAerowaysModuleConfig = TileflowAerowaysModuleOptions & {
|
|
212
|
+
type: 'aeroways';
|
|
213
|
+
};
|
|
214
|
+
declare function aeroways(options?: TileflowAerowaysModuleOptions): TileflowAerowaysModuleConfig;
|
|
215
|
+
|
|
216
|
+
type TileflowBoundariesModuleOptions = {
|
|
217
|
+
admin2?: TileflowLineStyle;
|
|
218
|
+
admin4?: TileflowLineStyle;
|
|
219
|
+
disputed?: TileflowLineStyle;
|
|
220
|
+
maritime?: TileflowLineStyle;
|
|
221
|
+
};
|
|
222
|
+
type TileflowBoundariesModuleConfig = TileflowBoundariesModuleOptions & {
|
|
223
|
+
type: 'boundaries';
|
|
224
|
+
};
|
|
225
|
+
declare function boundaries(options?: TileflowBoundariesModuleOptions): TileflowBoundariesModuleConfig;
|
|
226
|
+
|
|
227
|
+
/** Decorative finishes for ordinary extruded buildings; they do not describe surveyed materials. */
|
|
228
|
+
type TileflowBuildingSurfaces<Numeric = number, Size = readonly [number, number]> = {
|
|
229
|
+
walls?: {
|
|
230
|
+
kind: 'brick';
|
|
231
|
+
/** Brick width and course height in metres; defaults to [6, 3]. */
|
|
232
|
+
size?: Size;
|
|
233
|
+
/** Recessed joint width in metres; defaults to 0.12. */
|
|
234
|
+
jointWidth?: Numeric;
|
|
235
|
+
/** Strength of the shaded joints, from 0 to 1; defaults to 0.2. */
|
|
236
|
+
contrast?: Numeric;
|
|
237
|
+
};
|
|
238
|
+
roof?: {
|
|
239
|
+
kind: 'tiles';
|
|
240
|
+
/** Square size in projected Mercator metres; defaults to 8. */
|
|
241
|
+
size?: Numeric;
|
|
242
|
+
/** Joint width in projected Mercator metres; defaults to 0.12. */
|
|
243
|
+
jointWidth?: Numeric;
|
|
244
|
+
contrast?: Numeric;
|
|
245
|
+
};
|
|
246
|
+
/** A painted light band and seam at the roof edge, without adding geometry. */
|
|
247
|
+
cornice?: {
|
|
248
|
+
height?: Numeric;
|
|
249
|
+
contrast?: Numeric;
|
|
250
|
+
};
|
|
251
|
+
};
|
|
252
|
+
type TileflowBuildingSurfaceDesign = {
|
|
253
|
+
walls?: Required<NonNullable<TileflowBuildingSurfaces['walls']>>;
|
|
254
|
+
roof?: Required<NonNullable<TileflowBuildingSurfaces['roof']>>;
|
|
255
|
+
cornice?: Required<NonNullable<TileflowBuildingSurfaces['cornice']>>;
|
|
256
|
+
};
|
|
257
|
+
|
|
258
|
+
/** An embedded glTF image and its sampler. Colour space belongs to its material channel. */
|
|
259
|
+
type TileflowModelTexture = Readonly<{
|
|
260
|
+
mimeType: 'image/png' | 'image/jpeg';
|
|
261
|
+
bytes: Uint8Array;
|
|
262
|
+
width: number;
|
|
263
|
+
height: number;
|
|
264
|
+
wrapS?: 33071 | 33648 | 10497;
|
|
265
|
+
wrapT?: 33071 | 33648 | 10497;
|
|
266
|
+
minFilter?: 9728 | 9729 | 9984 | 9985 | 9986 | 9987;
|
|
267
|
+
magFilter?: 9728 | 9729;
|
|
268
|
+
}>;
|
|
269
|
+
/** A texture channel, including KHR_texture_transform and channel-specific strength. */
|
|
270
|
+
type TileflowModelTextureReference = Readonly<{
|
|
271
|
+
texture: number;
|
|
272
|
+
texCoord?: 0 | 1;
|
|
273
|
+
offset?: readonly [number, number];
|
|
274
|
+
scale?: readonly [number, number];
|
|
275
|
+
rotation?: number;
|
|
276
|
+
strength?: number;
|
|
277
|
+
}>;
|
|
278
|
+
/** Metallic/roughness material values use glTF's linear factors and channel conventions. */
|
|
279
|
+
type TileflowModelMaterial = Readonly<{
|
|
280
|
+
baseColorFactor?: readonly [number, number, number, number];
|
|
281
|
+
metallicFactor?: number;
|
|
282
|
+
roughnessFactor?: number;
|
|
283
|
+
emissiveFactor?: readonly [number, number, number];
|
|
284
|
+
emissiveStrength?: number;
|
|
285
|
+
baseColorTexture?: TileflowModelTextureReference;
|
|
286
|
+
metallicRoughnessTexture?: TileflowModelTextureReference;
|
|
287
|
+
normalTexture?: TileflowModelTextureReference;
|
|
288
|
+
occlusionTexture?: TileflowModelTextureReference;
|
|
289
|
+
emissiveTexture?: TileflowModelTextureReference;
|
|
290
|
+
alphaMode?: 'OPAQUE' | 'MASK' | 'BLEND';
|
|
291
|
+
alphaCutoff?: number;
|
|
292
|
+
doubleSided?: boolean;
|
|
293
|
+
unlit?: boolean;
|
|
294
|
+
}>;
|
|
295
|
+
/** An explicitly authored area emitter. Endpoints are its lower edge, in model metres, Z up. */
|
|
296
|
+
type TileflowModelEmitter = Readonly<{
|
|
297
|
+
start: readonly [number, number, number];
|
|
298
|
+
end: readonly [number, number, number];
|
|
299
|
+
height: number;
|
|
300
|
+
depth?: number;
|
|
301
|
+
role: TileflowModelLightingRole;
|
|
302
|
+
/** The part whose colour it takes, by name. */
|
|
303
|
+
part: string;
|
|
304
|
+
}>;
|
|
305
|
+
type TileflowModelMaterialRange = Readonly<{
|
|
306
|
+
/** First index, and number of indices. */
|
|
307
|
+
from: number;
|
|
308
|
+
count: number;
|
|
309
|
+
material: number;
|
|
310
|
+
/** The source mesh's vertical extent in model metres, for its role emission gradient. */
|
|
311
|
+
emissiveBounds?: readonly [number, number];
|
|
312
|
+
}>;
|
|
313
|
+
/** Optional physical surface data, independent of the vertex's part, role and occlusion. */
|
|
314
|
+
type TileflowModelSurface = Readonly<{
|
|
315
|
+
/** Eight floats per vertex: UV0, UV1 (zero to one), linear vertex RGBA. */
|
|
316
|
+
attributes: readonly number[] | Float32Array;
|
|
317
|
+
materials: readonly TileflowModelMaterial[];
|
|
318
|
+
textures: readonly TileflowModelTexture[];
|
|
319
|
+
ranges: readonly TileflowModelMaterialRange[];
|
|
320
|
+
emitters?: readonly TileflowModelEmitter[];
|
|
321
|
+
}>;
|
|
322
|
+
declare const tileflowModelSurfaceLimits: Readonly<{
|
|
323
|
+
materials: 256;
|
|
324
|
+
textures: 32;
|
|
325
|
+
textureDimension: 4096;
|
|
326
|
+
texturePixels: 16777216;
|
|
327
|
+
emitters: 128;
|
|
328
|
+
}>;
|
|
329
|
+
declare const tileflowModelTextureChannels: readonly ["baseColorTexture", "metallicRoughnessTexture", "normalTexture", "occlusionTexture", "emissiveTexture"];
|
|
330
|
+
/** Validate before preparation, encoding, or browser allocation. */
|
|
331
|
+
declare function checkTileflowModelSurface(surface: TileflowModelSurface, vertices: number, indices: number): void;
|
|
332
|
+
/** Read bounded image dimensions without a DOM or image decoder. */
|
|
333
|
+
declare function tileflowModelImageSize(bytes: Uint8Array, mimeType: 'image/png' | 'image/jpeg'): readonly [number, number] | undefined;
|
|
334
|
+
|
|
335
|
+
/**
|
|
336
|
+
* The architectural parts of a model. A map that gives one no colour of its own colours it from the
|
|
337
|
+
* buildings' colour, and a mesh that names no parts of its own numbers its vertices' parts in this
|
|
338
|
+
* order.
|
|
339
|
+
*/
|
|
340
|
+
declare const tileflowModelParts: Readonly<{
|
|
341
|
+
surface: 0;
|
|
342
|
+
secondary: 1;
|
|
343
|
+
glass: 2;
|
|
344
|
+
accent: 3;
|
|
345
|
+
roof: 4;
|
|
346
|
+
}>;
|
|
347
|
+
type TileflowModelPart = keyof typeof tileflowModelParts;
|
|
348
|
+
/** The names of a mesh's parts when it names none of its own. */
|
|
349
|
+
declare const tileflowModelArchitecturalPartNames: readonly ("accent" | "glass" | "roof" | "secondary" | "surface")[];
|
|
350
|
+
/**
|
|
351
|
+
* Whether a value names a part of a model, as its material does: lower-case letters and digits,
|
|
352
|
+
* words joined by hyphens or underscores, at most 32 characters, such as `glass` or `water`.
|
|
353
|
+
*/
|
|
354
|
+
declare function isTileflowModelPartName(value: unknown): value is string;
|
|
355
|
+
/** Architectural roles control lighting independently of the model's parts. */
|
|
356
|
+
declare const tileflowModelLightingRoles: Readonly<{
|
|
357
|
+
unclassified: 0;
|
|
358
|
+
wall: 1;
|
|
359
|
+
door: 2;
|
|
360
|
+
roof: 3;
|
|
361
|
+
window: 4;
|
|
362
|
+
lamp: 5;
|
|
363
|
+
logo: 6;
|
|
364
|
+
}>;
|
|
365
|
+
type TileflowModelLightingRole = keyof typeof tileflowModelLightingRoles;
|
|
366
|
+
/**
|
|
367
|
+
* The lighting role of a part whose material sets none: architectural parts are walls, a window
|
|
368
|
+
* and a roof; every other part is unclassified, so it never takes a window's light.
|
|
369
|
+
*/
|
|
370
|
+
declare function tileflowModelDefaultLightingRole(part: string): number;
|
|
371
|
+
/** What a model may hold. */
|
|
372
|
+
declare const tileflowModelLimits: Readonly<{
|
|
373
|
+
/** Levels of detail, nearest first. */
|
|
374
|
+
levels: 3;
|
|
375
|
+
/** Vertices of one level. */
|
|
376
|
+
vertices: 200000;
|
|
377
|
+
/** Triangles of one level. */
|
|
378
|
+
triangles: 200000;
|
|
379
|
+
/** Points of the footprint's rings, together. */
|
|
380
|
+
footprintPoints: 4096;
|
|
381
|
+
/** Half the model's widest extent, in metres. */
|
|
382
|
+
radius: 2000;
|
|
383
|
+
/** The model's height, in metres. */
|
|
384
|
+
height: 1000;
|
|
385
|
+
/** Models in one prepared file, as a landmark tile holds them. */
|
|
386
|
+
models: 512;
|
|
387
|
+
/** Bytes of one prepared file. */
|
|
388
|
+
bytes: number;
|
|
389
|
+
/** Differently named parts of one level. */
|
|
390
|
+
parts: 16;
|
|
391
|
+
}>;
|
|
392
|
+
/** One level of detail, as indexed triangles. */
|
|
393
|
+
type TileflowModelMesh = Readonly<{
|
|
394
|
+
/** x, y and z of each vertex in metres: x east and y north of the origin, z up from the ground. */
|
|
395
|
+
positions: readonly number[];
|
|
396
|
+
/** The vertex normals, x, y and z. */
|
|
397
|
+
normals: readonly number[];
|
|
398
|
+
/** Each vertex's part, an index into `partNames`. */
|
|
399
|
+
parts: readonly number[];
|
|
400
|
+
/**
|
|
401
|
+
* The names of the level's parts, as its materials name them, such as `surface`, `glass` or
|
|
402
|
+
* `water`; without them, `tileflowModelArchitecturalPartNames`.
|
|
403
|
+
*/
|
|
404
|
+
partNames?: readonly string[];
|
|
405
|
+
/** Optional architectural role per vertex; absent roles follow `tileflowModelDefaultLightingRole`. */
|
|
406
|
+
lightingRoles?: readonly number[];
|
|
407
|
+
/** Each vertex's shade within its part's colour, from -1 (darkest) to 1 (lightest). */
|
|
408
|
+
shades: readonly number[];
|
|
409
|
+
/** Each vertex's light, from 0 (fully occluded) to 1. */
|
|
410
|
+
occlusion: readonly number[];
|
|
411
|
+
/** Three vertex indices per triangle. */
|
|
412
|
+
indices: readonly number[];
|
|
413
|
+
/** Optional physical materials and their independent texture coordinates. */
|
|
414
|
+
surface?: TileflowModelSurface;
|
|
415
|
+
}>;
|
|
416
|
+
/** A prepared model: its levels, nearest first, and the footprint it replaces on the ground. */
|
|
417
|
+
type TileflowModel = Readonly<{
|
|
418
|
+
levels: readonly TileflowModelMesh[];
|
|
419
|
+
/**
|
|
420
|
+
* Closed rings on the ground, in metres round the origin as `[x, y, x, y, …]`: the outline of
|
|
421
|
+
* what the model stands in for. The map's own buildings that reach into it are not raised while
|
|
422
|
+
* the model stands.
|
|
423
|
+
*/
|
|
424
|
+
footprint: readonly (readonly number[])[];
|
|
425
|
+
}>;
|
|
426
|
+
/** A decoded level, ready for the GPU: its vertex bytes as the file holds them. */
|
|
427
|
+
type TileflowModelLevelBytes = Readonly<{
|
|
428
|
+
/**
|
|
429
|
+
* 16 bytes a vertex, in glTF's axes (x east, y up, z south): its position as whole steps from
|
|
430
|
+
* `centre` (int16 ×3, then two bytes of padding), its normal (int8 ×3, then one), and its part,
|
|
431
|
+
* shade and light (uint8 ×3), then its lighting role (uint8).
|
|
432
|
+
*/
|
|
433
|
+
vertices: Uint8Array;
|
|
434
|
+
/** The names of the parts the vertices' part indices count through. */
|
|
435
|
+
partNames: readonly string[];
|
|
436
|
+
indices: Uint16Array | Uint32Array;
|
|
437
|
+
/** The point the positions count from, in glTF's axes, in metres. */
|
|
438
|
+
centre: readonly [number, number, number];
|
|
439
|
+
/** Metres in one step of a position. */
|
|
440
|
+
step: number;
|
|
441
|
+
/** Optional physical data; absent data retains the legacy palette lighting. */
|
|
442
|
+
surface?: TileflowModelSurfaceBytes;
|
|
443
|
+
}>;
|
|
444
|
+
/**
|
|
445
|
+
* A decoded level's physical data. Its vertex attributes are split in two, each four floats a vertex
|
|
446
|
+
* or, when every vertex shares them, just four, so a value that never changes is not uploaded.
|
|
447
|
+
*/
|
|
448
|
+
type TileflowModelSurfaceBytes = Omit<TileflowModelSurface, 'attributes'> & Readonly<{
|
|
449
|
+
/** UV0 and UV1. */
|
|
450
|
+
uv: Float32Array;
|
|
451
|
+
/** Linear vertex RGBA. */
|
|
452
|
+
rgba: Float32Array;
|
|
453
|
+
}>;
|
|
454
|
+
/** A decoded model, as the renderer draws it. */
|
|
455
|
+
type TileflowModelBytes = Readonly<{
|
|
456
|
+
/** The model's id. */
|
|
457
|
+
id: string;
|
|
458
|
+
/** Its bounds in metres round its origin, `[minX, minY, minZ, maxX, maxY, maxZ]` (x east, y north, z up). */
|
|
459
|
+
bounds: readonly [number, number, number, number, number, number];
|
|
460
|
+
levels: readonly TileflowModelLevelBytes[];
|
|
461
|
+
footprint: readonly (readonly number[])[];
|
|
462
|
+
/** Where it stands, longitude and latitude, when the file says so, as a landmark tile does. */
|
|
463
|
+
at?: readonly [number, number];
|
|
464
|
+
/** Degrees clockwise from north its own north is turned to, when the file says so. */
|
|
465
|
+
heading?: number;
|
|
466
|
+
}>;
|
|
467
|
+
/** Bytes per vertex in a model file and on the GPU. */
|
|
468
|
+
declare const tileflowModelVertexBytes = 16;
|
|
469
|
+
/** Whether a point lies inside any of the rings (even-odd), as `[x, y, x, y, …]`. */
|
|
470
|
+
declare function tileflowInsideRings(rings: readonly (readonly number[])[], px: number, py: number): boolean;
|
|
471
|
+
/**
|
|
472
|
+
* Whether the rings `outline` (a building's) reach more than `margin` into any of the rings
|
|
473
|
+
* `footprints` (the models'), all as `[x, y, x, y, …]` in the same units: a corner of one deep
|
|
474
|
+
* inside the other, or an edge passing through it. A building that only touches a footprint, as a
|
|
475
|
+
* neighbour sharing a wall does, does not.
|
|
476
|
+
*/
|
|
477
|
+
declare function tileflowRingsOverlap(outline: readonly (readonly number[])[], footprints: readonly (readonly number[])[], margin: number): boolean;
|
|
478
|
+
|
|
479
|
+
type TileflowBuildingMode = '3d' | 'flat';
|
|
480
|
+
/**
|
|
481
|
+
* How Core's 3D buildings renderer draws the map's buildings. Their colour is the map's own 3D
|
|
482
|
+
* building colour (its extrusion), else its roofs'.
|
|
483
|
+
*/
|
|
484
|
+
type TileflowBuildingsThreeDimensionalStyle = {
|
|
485
|
+
/** Use the scene sun (default), or the style's native extrusion light. */
|
|
486
|
+
lighting?: 'style' | 'sun';
|
|
487
|
+
/** Per-building brightness variation, from 0 to 1; defaults to 0 (authored colour). */
|
|
488
|
+
colorVariation?: TileflowThemeNumberValue;
|
|
489
|
+
/** How strongly roof outlines and outer corners catch the light, from 0 (default) to 1. */
|
|
490
|
+
edges?: TileflowThemeNumberValue;
|
|
491
|
+
/** Radius in metres for softened exterior corners and roof lighting, from 0 to 1; defaults to 0.8. */
|
|
492
|
+
edgeRadius?: number;
|
|
493
|
+
/** Their own colour, drawn unlit; without it they take the building's colour, lightened. */
|
|
494
|
+
edgeColor?: TileflowThemeColorValue;
|
|
495
|
+
/** How bright the buildings light the street at night, from 0 (none) to 2; defaults to 0. */
|
|
496
|
+
nightLight?: TileflowThemeNumberValue;
|
|
497
|
+
/** Height-selected architectural flood lighting. Off by default; follows scene darkness. */
|
|
498
|
+
floodLight?: {
|
|
499
|
+
intensity?: TileflowThemeNumberValue;
|
|
500
|
+
/** Compensates authored light-colour transforms during darkness evaluation; defaults to 1. */
|
|
501
|
+
brightnessScale?: TileflowThemeNumberValue;
|
|
502
|
+
color?: TileflowThemeColorValue;
|
|
503
|
+
/** Stable per-building ground radius range in metres; defaults to [30, 100]. */
|
|
504
|
+
groundRadius?: readonly [number, number];
|
|
505
|
+
/** Ground light starts at this height in metres; defaults to 30. */
|
|
506
|
+
minGroundHeight?: number;
|
|
507
|
+
/** Wall light starts above this height in metres; defaults to 200. */
|
|
508
|
+
minWallHeight?: number;
|
|
509
|
+
/** Wall radius as a fraction of building height; defaults to 1/3. */
|
|
510
|
+
wallHeightRatio?: number;
|
|
511
|
+
};
|
|
512
|
+
/** Per-role physical materials and emission, separate from model parts and occlusion. */
|
|
513
|
+
modelLighting?: Partial<Record<TileflowModelLightingRole, {
|
|
514
|
+
emissiveStrength?: TileflowThemeNumberValue;
|
|
515
|
+
/** Stable per-model addition to emission, from zero to this amount. */
|
|
516
|
+
emissiveVariation?: TileflowThemeNumberValue;
|
|
517
|
+
emissiveColor?: TileflowThemeColorValue;
|
|
518
|
+
/** Height fractions, multipliers and curve exponent; defaults to a constant multiplier of one. */
|
|
519
|
+
emissiveHeight?: readonly [
|
|
520
|
+
TileflowThemeNumberValue,
|
|
521
|
+
TileflowThemeNumberValue,
|
|
522
|
+
TileflowThemeNumberValue,
|
|
523
|
+
TileflowThemeNumberValue,
|
|
524
|
+
TileflowThemeNumberValue
|
|
525
|
+
];
|
|
526
|
+
/** Physical-material tint. Explicit modelColors take precedence. */
|
|
527
|
+
color?: TileflowThemeColorValue;
|
|
528
|
+
colorMix?: TileflowThemeNumberValue;
|
|
529
|
+
metallic?: TileflowThemeNumberValue;
|
|
530
|
+
roughness?: TileflowThemeNumberValue;
|
|
531
|
+
/** Independent HSL ranges, seeded by model identity; no window geometry is invented. */
|
|
532
|
+
colorVariation?: {
|
|
533
|
+
hue: readonly [TileflowThemeNumberValue, TileflowThemeNumberValue];
|
|
534
|
+
saturation: readonly [TileflowThemeNumberValue, TileflowThemeNumberValue];
|
|
535
|
+
lightness: readonly [TileflowThemeNumberValue, TileflowThemeNumberValue];
|
|
536
|
+
space?: 'srgb' | 'linear';
|
|
537
|
+
};
|
|
538
|
+
}>>;
|
|
539
|
+
/**
|
|
540
|
+
* The zoom bands the city comes in over: zooming in, across each band its part fades in and rises
|
|
541
|
+
* from the ground, and zooming out it sinks and fades again. Defaults to the 0.3 zooms from the
|
|
542
|
+
* renderer's `minzoom` (15) for the buildings, and to the 0.4 zooms from 0.8 before it for the
|
|
543
|
+
* placed models and landmarks, which stand first. With reduced motion they only fade.
|
|
544
|
+
*/
|
|
545
|
+
entrance?: {
|
|
546
|
+
buildings?: readonly [number, number];
|
|
547
|
+
models?: readonly [number, number];
|
|
548
|
+
};
|
|
549
|
+
/** Contact shadow at the foot of the walls and in tight corners; defaults to true. */
|
|
550
|
+
occlusion?: boolean;
|
|
551
|
+
/** Prepared model ambient occlusion strength, from 0 to 1; defaults to 0.75. */
|
|
552
|
+
modelOcclusion?: TileflowThemeNumberValue;
|
|
553
|
+
/** Shadows from the sun, on the buildings and the flat map; defaults to true. */
|
|
554
|
+
shadows?: boolean;
|
|
555
|
+
/**
|
|
556
|
+
* Invented night windows, lit by rooms: decoration, not data. With World's `class`, none on sheds,
|
|
557
|
+
* barns, factories and churches, and homes lit apart from offices. Defaults to false.
|
|
558
|
+
*/
|
|
559
|
+
windows?: boolean;
|
|
560
|
+
/** Decorative wall joints, roof tiles and painted cornices. Off by default; ordinary buildings only. */
|
|
561
|
+
surfaces?: TileflowBuildingSurfaces<TileflowThemeNumberValue, TileflowThemeValue<readonly [number, number]>>;
|
|
562
|
+
/**
|
|
563
|
+
* Building models the map places in its city, from the glTF binaries in its `models`
|
|
564
|
+
* directories. Each stands in for the buildings under its footprint.
|
|
565
|
+
*/
|
|
566
|
+
models?: readonly TileflowBuildingModelPlacementConfig[];
|
|
567
|
+
/**
|
|
568
|
+
* The colours of the models' parts, by the names their materials give them, such as `glass` or
|
|
569
|
+
* `water`. A part the map gives no colour keeps its material's own.
|
|
570
|
+
*/
|
|
571
|
+
modelColors?: Partial<Record<TileflowBuildingModelPart, TileflowThemeColorValue>>;
|
|
572
|
+
/**
|
|
573
|
+
* Tileflow's landmarks, such as the Eiffel Tower, drawn as models in place of the buildings
|
|
574
|
+
* under them. On by default with Tileflow World data; `false` switches them off, and `url` names
|
|
575
|
+
* the TileJSON of another landmarks tileset. The map's own `models` come first: a landmark with
|
|
576
|
+
* the same id as one, or whose footprint meets one's, is not drawn.
|
|
577
|
+
*/
|
|
578
|
+
landmarks?: boolean | {
|
|
579
|
+
url: string;
|
|
580
|
+
};
|
|
581
|
+
};
|
|
582
|
+
/**
|
|
583
|
+
* A part of a building model, as its materials name it: lower-case words joined by hyphens or
|
|
584
|
+
* underscores, such as `surface`, `glass`, `roof` or `water`.
|
|
585
|
+
*/
|
|
586
|
+
type TileflowBuildingModelPart = string;
|
|
587
|
+
/** Where a building model stands. */
|
|
588
|
+
type TileflowBuildingModelPlacementConfig = {
|
|
589
|
+
/** The model's id: the name of its `.glb` file in the map's `models` directories. */
|
|
590
|
+
model: string;
|
|
591
|
+
/**
|
|
592
|
+
* The HTTPS address of the model's prepared file when it is served elsewhere, such as a model
|
|
593
|
+
* Tileflow hosts for its own maps; the map then needs no `.glb` of its own for it.
|
|
594
|
+
*/
|
|
595
|
+
url?: string;
|
|
596
|
+
/** Longitude and latitude of the model's origin, where it stands on the ground. */
|
|
597
|
+
at: readonly [number, number];
|
|
598
|
+
/** Degrees clockwise from north that the model's own north (its +y) is turned to; defaults to 0. */
|
|
599
|
+
heading?: number;
|
|
600
|
+
};
|
|
601
|
+
type TileflowBuildingsModuleOptions = {
|
|
602
|
+
businessCorridor?: TileflowAreaStyle;
|
|
603
|
+
extrusion?: TileflowExtrusionStyle;
|
|
604
|
+
flat?: TileflowAreaStyle;
|
|
605
|
+
mode?: TileflowBuildingMode;
|
|
606
|
+
threeDimensional?: TileflowBuildingsThreeDimensionalStyle;
|
|
607
|
+
};
|
|
608
|
+
type TileflowBuildingsModuleConfig = TileflowBuildingsModuleOptions & {
|
|
609
|
+
type: 'buildings';
|
|
610
|
+
};
|
|
611
|
+
declare function buildings(options?: TileflowBuildingsModuleOptions): TileflowBuildingsModuleConfig;
|
|
612
|
+
|
|
613
|
+
type TileflowLanduseClass = 'cemetery' | 'civic' | 'commercial' | 'education' | 'government' | 'industrial' | 'medical' | 'military' | 'parking' | 'railway' | 'recreation' | 'residential';
|
|
614
|
+
type TileflowLandcoverClass = 'farmland' | 'flowerbed' | 'grass' | 'ice' | 'meadow' | 'protected' | 'recreationGround' | 'rock' | 'sand' | 'scrub' | 'urbanPark' | 'villageGreen' | 'wetland' | 'wood';
|
|
615
|
+
/** The barriers of the data's barrier layer (World's `traffic_control`) the land module draws. */
|
|
616
|
+
type TileflowBarrierClass = 'fence' | 'hedge' | 'wall';
|
|
617
|
+
/**
|
|
618
|
+
* A barrier's line, a shadow line drawn under it (usually offset with `translate`), and the fill of
|
|
619
|
+
* those mapped as areas, such as broad hedges.
|
|
620
|
+
*/
|
|
621
|
+
type TileflowBarrierStyle = {
|
|
622
|
+
area?: TileflowFillStyle;
|
|
623
|
+
shadow?: TileflowLineStyle;
|
|
624
|
+
line?: TileflowLineStyle;
|
|
625
|
+
};
|
|
626
|
+
type TileflowLandModuleOptions = {
|
|
627
|
+
background?: TileflowBackgroundStyle;
|
|
628
|
+
/**
|
|
629
|
+
* Hedges, fences and walls, drawn at the top of the land band with hedges uppermost. A barrier
|
|
630
|
+
* without a style is not drawn, and neither is any when the data has no barrier layer.
|
|
631
|
+
*/
|
|
632
|
+
barriers?: Partial<Record<TileflowBarrierClass, TileflowBarrierStyle>>;
|
|
633
|
+
globalLandcover?: TileflowFillStyle;
|
|
634
|
+
landcover?: Partial<Record<TileflowLandcoverClass, TileflowAreaStyle>>;
|
|
635
|
+
landuse?: Partial<Record<TileflowLanduseClass, TileflowAreaStyle>>;
|
|
636
|
+
};
|
|
637
|
+
type TileflowLandModuleConfig = TileflowLandModuleOptions & {
|
|
638
|
+
type: 'land';
|
|
639
|
+
};
|
|
640
|
+
declare function land(options?: TileflowLandModuleOptions): TileflowLandModuleConfig;
|
|
641
|
+
|
|
642
|
+
declare const tileflowLandformClasses: readonly ["peak", "volcano", "saddle", "ridge", "cliff", "arete"];
|
|
643
|
+
type TileflowLandformClass = (typeof tileflowLandformClasses)[number];
|
|
644
|
+
type TileflowLandformsModuleOptions = {
|
|
645
|
+
classes?: Partial<Record<TileflowLandformClass, TileflowSymbolStyle>>;
|
|
646
|
+
/** Append source elevation in metres when the feature provides it. */
|
|
647
|
+
elevation?: boolean;
|
|
648
|
+
};
|
|
649
|
+
type TileflowLandformsModuleConfig = TileflowLandformsModuleOptions & {
|
|
650
|
+
type: 'landforms';
|
|
651
|
+
};
|
|
652
|
+
declare function landforms(options?: TileflowLandformsModuleOptions): TileflowLandformsModuleConfig;
|
|
653
|
+
|
|
654
|
+
/**
|
|
655
|
+
* Labels anchored inside polygon features, and the clearance labels of bridges and overhead cables;
|
|
656
|
+
* other point-feature labels remain on their feature style.
|
|
657
|
+
*/
|
|
658
|
+
type TileflowNauticalAreaLabelStyles = {
|
|
659
|
+
/**
|
|
660
|
+
* Vertical clearance of bridges, or their clearance closed and open, at bridge points and inside
|
|
661
|
+
* bridge polygons; bridge lines carry it at their centre.
|
|
662
|
+
*/
|
|
663
|
+
bridges?: TileflowSymbolStyle;
|
|
664
|
+
/** Provider coverage cells; hidden unless a map makes this style visible. */
|
|
665
|
+
coverage?: TileflowSymbolStyle;
|
|
666
|
+
hazards?: TileflowSymbolStyle;
|
|
667
|
+
navigationAreas?: TileflowSymbolStyle;
|
|
668
|
+
/** Safe vertical clearance of overhead cables, at cable points and along cable lines. */
|
|
669
|
+
overheadCables?: TileflowSymbolStyle;
|
|
670
|
+
reefs?: TileflowSymbolStyle;
|
|
671
|
+
wrecks?: TileflowSymbolStyle;
|
|
672
|
+
};
|
|
673
|
+
/**
|
|
674
|
+
* One style per semantic group of `nautical-v1` objects. Point groups draw a circle `marker`, an
|
|
675
|
+
* `icon` from the theme's nautical image tokens, and `text`; area groups draw a `fill` and an
|
|
676
|
+
* `outline`; line groups draw one stroke. Every group respects each feature's `min_zoom`, and
|
|
677
|
+
* point groups place more important features (lower `rank`) first.
|
|
678
|
+
*/
|
|
679
|
+
type TileflowNauticalModuleOptions = {
|
|
680
|
+
/** Other aids: moorings, fog signals, racons, radio and signal stations, and virtual aids. */
|
|
681
|
+
aids?: TileflowMarkerSymbolStyle;
|
|
682
|
+
/**
|
|
683
|
+
* Flash each light in its rhythm where a browser runtime animates the map. Defaults to `true`.
|
|
684
|
+
* `false` keeps every light steady, as do reduced motion, capture, and native renderers.
|
|
685
|
+
*/
|
|
686
|
+
animateLights?: boolean;
|
|
687
|
+
/** Fixed beacons and daymarks, coloured by their first colour. */
|
|
688
|
+
beacons?: TileflowMarkerSymbolStyle;
|
|
689
|
+
/** Berth polygons; the outline also strokes berth lines and emphasises guest berths. */
|
|
690
|
+
berths?: TileflowAreaStyle;
|
|
691
|
+
/** Bridge polygons; the outline also strokes bridge lines. */
|
|
692
|
+
bridges?: TileflowAreaStyle;
|
|
693
|
+
/** Buoys, light floats, and light vessels, coloured by their first colour. */
|
|
694
|
+
buoys?: TileflowMarkerSymbolStyle;
|
|
695
|
+
/** Submarine cable and pipeline lines. */
|
|
696
|
+
cables?: TileflowLineStyle;
|
|
697
|
+
/** Restrained indication of where a provider publishes marks. */
|
|
698
|
+
coverage?: TileflowAreaStyle;
|
|
699
|
+
/** Waterway distance marks with their distance and unit. */
|
|
700
|
+
distanceMarks?: TileflowMarkerSymbolStyle;
|
|
701
|
+
/**
|
|
702
|
+
* Small-craft facilities such as fuel, water, slipways, pump-out, visitor berths, boat hoists,
|
|
703
|
+
* and boatyards, at facility points, inside facility polygons, and at the centre of their lines.
|
|
704
|
+
*/
|
|
705
|
+
facilities?: TileflowMarkerSymbolStyle;
|
|
706
|
+
/** Harbour and marina polygons. */
|
|
707
|
+
harbourAreas?: TileflowAreaStyle;
|
|
708
|
+
/** Harbour and marina points, and their symbol and name inside harbour polygons. */
|
|
709
|
+
harbours?: TileflowMarkerSymbolStyle;
|
|
710
|
+
/** Hazard areas; the outline also strokes linear hazards such as booms. */
|
|
711
|
+
hazardAreas?: TileflowAreaStyle;
|
|
712
|
+
/** Rocks by water level, obstructions, and offshore platforms. */
|
|
713
|
+
hazards?: TileflowMarkerSymbolStyle;
|
|
714
|
+
labels?: TileflowNauticalAreaLabelStyles;
|
|
715
|
+
lighthouses?: TileflowMarkerSymbolStyle;
|
|
716
|
+
/** Light flares coloured by the light's first colour, with the chart light label. */
|
|
717
|
+
lights?: TileflowMarkerSymbolStyle;
|
|
718
|
+
/** Restricted, military, anchorage, traffic-separation, and other navigation areas. */
|
|
719
|
+
navigationAreas?: TileflowAreaStyle;
|
|
720
|
+
/** Inland notice boards coloured by function, with the information they show. */
|
|
721
|
+
notices?: TileflowMarkerSymbolStyle;
|
|
722
|
+
/** Overhead cable lines. */
|
|
723
|
+
overheadCables?: TileflowLineStyle;
|
|
724
|
+
/** Ports, sized by `size` and placed by `rank` from low zooms. */
|
|
725
|
+
ports?: TileflowMarkerSymbolStyle;
|
|
726
|
+
reefs?: TileflowAreaStyle;
|
|
727
|
+
/** Traffic-separation lines and recommended routes, tracks, and ferry routes. */
|
|
728
|
+
routes?: TileflowLineStyle;
|
|
729
|
+
soundings?: TileflowMarkerSymbolStyle;
|
|
730
|
+
wreckAreas?: TileflowAreaStyle;
|
|
731
|
+
wrecks?: TileflowMarkerSymbolStyle;
|
|
732
|
+
};
|
|
733
|
+
type TileflowNauticalModuleConfig = TileflowNauticalModuleOptions & {
|
|
734
|
+
type: 'nautical';
|
|
735
|
+
};
|
|
736
|
+
/**
|
|
737
|
+
* Theme image tokens for nautical point symbols. When the selected theme declares a group's token,
|
|
738
|
+
* that group draws the image as its icon instead of the default circle marker. Buoy variants fall
|
|
739
|
+
* back to `nautical.buoy`. Declare every token of one group with the same icon representation; SDF
|
|
740
|
+
* icons take the mark's colour.
|
|
741
|
+
*/
|
|
742
|
+
declare const tileflowNauticalImageRoles: Readonly<{
|
|
743
|
+
aids: Readonly<{
|
|
744
|
+
default: "nautical.aid";
|
|
745
|
+
}>;
|
|
746
|
+
beacons: Readonly<{
|
|
747
|
+
default: "nautical.beacon";
|
|
748
|
+
}>;
|
|
749
|
+
buoys: Readonly<{
|
|
750
|
+
cardinal: "nautical.buoy.cardinal";
|
|
751
|
+
default: "nautical.buoy";
|
|
752
|
+
port: "nautical.buoy.port";
|
|
753
|
+
starboard: "nautical.buoy.starboard";
|
|
754
|
+
}>;
|
|
755
|
+
distanceMarks: Readonly<{
|
|
756
|
+
default: "nautical.distance-mark";
|
|
757
|
+
}>;
|
|
758
|
+
/**
|
|
759
|
+
* A facility that lists several categories shows the first of `tileflowNauticalFacilityIcons`
|
|
760
|
+
* it lists; facilities without a variant token fall back to `nautical.facility`.
|
|
761
|
+
*/
|
|
762
|
+
facilities: Readonly<{
|
|
763
|
+
'boat-hoist': "nautical.facility.boat-hoist";
|
|
764
|
+
boatyard: "nautical.facility.boatyard";
|
|
765
|
+
default: "nautical.facility";
|
|
766
|
+
'fuel-station': "nautical.facility.fuel-station";
|
|
767
|
+
'pump-out': "nautical.facility.pump-out";
|
|
768
|
+
slipway: "nautical.facility.slipway";
|
|
769
|
+
'visitor-berth': "nautical.facility.visitor-berth";
|
|
770
|
+
'water-tap': "nautical.facility.water-tap";
|
|
771
|
+
}>;
|
|
772
|
+
/** Harbours whose `subclass` lists a marina use `nautical.marina` when the theme declares it. */
|
|
773
|
+
harbours: Readonly<{
|
|
774
|
+
default: "nautical.harbour";
|
|
775
|
+
marina: "nautical.marina";
|
|
776
|
+
}>;
|
|
777
|
+
lighthouses: Readonly<{
|
|
778
|
+
default: "nautical.lighthouse";
|
|
779
|
+
}>;
|
|
780
|
+
lights: Readonly<{
|
|
781
|
+
default: "nautical.light";
|
|
782
|
+
}>;
|
|
783
|
+
/** Notice boards by function; a board without a variant token uses `nautical.notice`. */
|
|
784
|
+
notices: Readonly<{
|
|
785
|
+
default: "nautical.notice";
|
|
786
|
+
information: "nautical.notice.information";
|
|
787
|
+
prohibition: "nautical.notice.prohibition";
|
|
788
|
+
recommendation: "nautical.notice.recommendation";
|
|
789
|
+
regulation: "nautical.notice.regulation";
|
|
790
|
+
restriction: "nautical.notice.restriction";
|
|
791
|
+
}>;
|
|
792
|
+
ports: Readonly<{
|
|
793
|
+
default: "nautical.port";
|
|
794
|
+
}>;
|
|
795
|
+
wrecks: Readonly<{
|
|
796
|
+
default: "nautical.wreck";
|
|
797
|
+
}>;
|
|
798
|
+
}>;
|
|
799
|
+
/**
|
|
800
|
+
* Facility categories with their own icon, in the order that picks one for a facility listing
|
|
801
|
+
* several. `visitors-mooring` shares the visitor-berth icon.
|
|
802
|
+
*/
|
|
803
|
+
declare const tileflowNauticalFacilityIcons: readonly ["fuel-station", "slipway", "boat-hoist", "pump-out", "water-tap", "visitor-berth", "boatyard"];
|
|
804
|
+
/** The fixed notice every map that draws `nautical-v1` objects declares in its style. */
|
|
805
|
+
declare const tileflowNauticalNotice: Readonly<{
|
|
806
|
+
id: "nautical-not-for-navigation";
|
|
807
|
+
text: "Not for navigation";
|
|
808
|
+
}>;
|
|
809
|
+
/** Style the semantic objects published by the `nautical-v1` sidecar. */
|
|
810
|
+
declare function nautical(options?: TileflowNauticalModuleOptions): TileflowNauticalModuleConfig;
|
|
811
|
+
|
|
812
|
+
/** Compiler-only state produced by semantic module operations during map resolution. */
|
|
813
|
+
type TileflowResolvedModuleConfig<TModule extends {
|
|
814
|
+
type: string;
|
|
815
|
+
}> = TModule & {
|
|
816
|
+
readonly enabled?: boolean;
|
|
817
|
+
};
|
|
818
|
+
|
|
819
|
+
type TileflowTransitModuleOptions = {
|
|
820
|
+
cableway?: TileflowLineStyle;
|
|
821
|
+
ferry?: TileflowLineStyle;
|
|
822
|
+
rail?: TileflowTransitRailStyle;
|
|
823
|
+
railHatching?: TileflowTransitRailStyle;
|
|
824
|
+
serviceRail?: TileflowTransitRailStyle;
|
|
825
|
+
};
|
|
826
|
+
type TileflowTransitRailStyle = {
|
|
827
|
+
bridge?: TileflowLineStyle;
|
|
828
|
+
surface?: TileflowLineStyle;
|
|
829
|
+
tunnel?: TileflowLineStyle;
|
|
830
|
+
};
|
|
831
|
+
type TileflowTransitModuleConfig = TileflowTransitModuleOptions & {
|
|
832
|
+
type: 'transit';
|
|
833
|
+
};
|
|
834
|
+
declare function transit(options?: TileflowTransitModuleOptions): TileflowTransitModuleConfig;
|
|
835
|
+
|
|
836
|
+
/** What a map's tree models may hold. */
|
|
837
|
+
declare const tileflowTreeModelLimits: Readonly<{
|
|
838
|
+
/** Triangles of a near model, the one drawn close to the camera. */
|
|
839
|
+
nearTriangles: 1000;
|
|
840
|
+
/** Triangles of a far model, drawn beyond the nearest tiles. */
|
|
841
|
+
farTriangles: 120;
|
|
842
|
+
/** Vertices of one model. */
|
|
843
|
+
vertices: 4096;
|
|
844
|
+
/** Models one map carries. */
|
|
845
|
+
models: 16;
|
|
846
|
+
/** Models one form draws from. */
|
|
847
|
+
perForm: 4;
|
|
848
|
+
}>;
|
|
849
|
+
/** A model as indexed triangles of a unit tree, before it is encoded. */
|
|
850
|
+
type TileflowTreeModelMesh = Readonly<{
|
|
851
|
+
/** The model's crown width over its height, as its author drew it, from 0.1 to 3. */
|
|
852
|
+
proportion: number;
|
|
853
|
+
/** x, y and z of each vertex: x and y from about -0.5 to 0.5, z from 0 to 1. */
|
|
854
|
+
positions: readonly number[];
|
|
855
|
+
/** The vertex normals, x, y and z. */
|
|
856
|
+
normals: readonly number[];
|
|
857
|
+
/** Each vertex's part, a value of `tileflowTreeParts`. */
|
|
858
|
+
parts: readonly number[];
|
|
859
|
+
/** Each vertex's shade among its part's colours, from -1 (darkest) to 1. */
|
|
860
|
+
shades: readonly number[];
|
|
861
|
+
/** Each vertex's light, from 0 (fully occluded) to 1. */
|
|
862
|
+
occlusion: readonly number[];
|
|
863
|
+
/** Three vertex indices per triangle. */
|
|
864
|
+
indices: readonly number[];
|
|
865
|
+
}>;
|
|
866
|
+
/** A prepared model, near and optionally far, as the style's tree description carries it. */
|
|
867
|
+
type TileflowTreeModel = Readonly<{
|
|
868
|
+
near: string;
|
|
869
|
+
far?: string;
|
|
870
|
+
}>;
|
|
871
|
+
/** Encodes a model as base64 text. Throws when it breaks `tileflowTreeModelLimits`. */
|
|
872
|
+
declare function encodeTileflowTreeModel(mesh: TileflowTreeModelMesh, level: 'near' | 'far'): string;
|
|
873
|
+
/**
|
|
874
|
+
* Decodes a model's base64 text, or undefined when it is not a tree model of this version or
|
|
875
|
+
* breaks `tileflowTreeModelLimits`.
|
|
876
|
+
*/
|
|
877
|
+
declare function decodeTileflowTreeModel(text: unknown, level: 'near' | 'far'): TileflowTreeModelMesh | undefined;
|
|
878
|
+
|
|
879
|
+
/** The forms a 3D tree takes. */
|
|
880
|
+
declare const tileflowTreeForms: readonly ["round", "open", "tall", "conifer", "columnar", "palm"];
|
|
881
|
+
type TileflowTreeForm = (typeof tileflowTreeForms)[number];
|
|
882
|
+
/** How a tree's surfaces take the light: facets, a smooth round shape, or bands as drawn. */
|
|
883
|
+
declare const tileflowTreeFinishes: readonly ["faceted", "smooth", "toon"];
|
|
884
|
+
type TileflowTreeFinish = (typeof tileflowTreeFinishes)[number];
|
|
885
|
+
/** A form's own scales, on top of the map's, and the map's own models it draws. */
|
|
886
|
+
type TileflowTreeFormStyle = Readonly<{
|
|
887
|
+
heightScale?: number;
|
|
888
|
+
crownScale?: number;
|
|
889
|
+
/** Ids of the map's own models, one to four; each tree draws one by its stable seed. */
|
|
890
|
+
models?: readonly string[];
|
|
891
|
+
}>;
|
|
892
|
+
/** Relative weights of the forms given to trees whose data gives none. */
|
|
893
|
+
type TileflowTreeFormMix = Readonly<Partial<Record<TileflowTreeForm, number>>>;
|
|
894
|
+
/** A region whose trees without a form in the data take their own mix. */
|
|
895
|
+
type TileflowTreeRegion = Readonly<{
|
|
896
|
+
/** `[west, south, east, north]` in degrees. */
|
|
897
|
+
bounds: readonly [number, number, number, number];
|
|
898
|
+
unknownForms: TileflowTreeFormMix;
|
|
899
|
+
}>;
|
|
900
|
+
/** The fields of the tree and canopy layers, as World names them. */
|
|
901
|
+
type TileflowTreeFields = Readonly<{
|
|
902
|
+
height: string;
|
|
903
|
+
diameterCrown: string;
|
|
904
|
+
circumference: string;
|
|
905
|
+
genus: string;
|
|
906
|
+
species: string;
|
|
907
|
+
leafType: string;
|
|
908
|
+
/** The tree's taxon at any rank, such as `Arecaceae` for palms or a genus or species. */
|
|
909
|
+
taxon: string;
|
|
910
|
+
canopyRank: string;
|
|
911
|
+
canopyClearance: string;
|
|
912
|
+
canopyCover: string;
|
|
913
|
+
/** A canopy point's measured canopy height, in metres. */
|
|
914
|
+
canopyHeight: string;
|
|
915
|
+
/** The kind of barrier in the hedge layer: hedges are `hedge`. */
|
|
916
|
+
subclass: string;
|
|
917
|
+
/** A hedge's kind: `hedge_bank` when it stands on an earth bank. */
|
|
918
|
+
hedge: string;
|
|
919
|
+
}>;
|
|
920
|
+
/** A model's id: its file's name, in lowercase letters, digits and hyphens. */
|
|
921
|
+
declare const tileflowTreeModelIdPattern: RegExp;
|
|
922
|
+
/** The style metadata key under which a compiled map describes its 3D trees. */
|
|
923
|
+
declare const tileflowVegetationMetadataKey = "tileflow:vegetation";
|
|
924
|
+
/** How a compiled map's 3D trees look and where their data is, resolved for one theme. */
|
|
925
|
+
type TileflowVegetation3D = Readonly<{
|
|
926
|
+
/** The vector source and its layers with the trees, the canopy points and the hedges. */
|
|
927
|
+
source: string;
|
|
928
|
+
layers: Readonly<{
|
|
929
|
+
tree: string;
|
|
930
|
+
canopy?: string;
|
|
931
|
+
hedge?: string;
|
|
932
|
+
}>;
|
|
933
|
+
fields: TileflowTreeFields;
|
|
934
|
+
/**
|
|
935
|
+
* Sunlit colours: bark, the leaves of each kind of tree from darkest to lightest, and those of
|
|
936
|
+
* hedges.
|
|
937
|
+
*/
|
|
938
|
+
colors: Readonly<{
|
|
939
|
+
bark: string;
|
|
940
|
+
broadleaf: readonly string[];
|
|
941
|
+
conifer: readonly string[];
|
|
942
|
+
palm: readonly string[];
|
|
943
|
+
hedge: readonly string[];
|
|
944
|
+
}>;
|
|
945
|
+
heightScale: number;
|
|
946
|
+
crownScale: number;
|
|
947
|
+
/** Visual size floor in metres, after scaling; crowns keep their proportions. */
|
|
948
|
+
minimumHeight?: number;
|
|
949
|
+
/** Stable variation across trunks and within the theme's foliage palette. */
|
|
950
|
+
materialVariation?: number;
|
|
951
|
+
/** Each form's own scales and models. */
|
|
952
|
+
forms: Readonly<Partial<Record<TileflowTreeForm, TileflowTreeFormStyle>>>;
|
|
953
|
+
/** The map's own models its forms draw, by id, prepared from its `models` directories. */
|
|
954
|
+
models: Readonly<Record<string, TileflowTreeModel>>;
|
|
955
|
+
finish: TileflowTreeFinish;
|
|
956
|
+
/** How strongly an outline rings each tree, from 0 (none) to 1, and its colour. */
|
|
957
|
+
edges: number;
|
|
958
|
+
edgeColor?: string;
|
|
959
|
+
unknownForms: TileflowTreeFormMix;
|
|
960
|
+
regions: readonly TileflowTreeRegion[];
|
|
961
|
+
/** The style's layers that draw the trees flat, which the 3D trees stand in for while shown. */
|
|
962
|
+
flatLayers: readonly string[];
|
|
963
|
+
}>;
|
|
964
|
+
/**
|
|
965
|
+
* Reads the 3D trees a compiled style describes, or undefined when its metadata has none or holds
|
|
966
|
+
* a version or shape this Core does not know.
|
|
967
|
+
*/
|
|
968
|
+
declare function readTileflowVegetation3D(metadata: unknown): TileflowVegetation3D | undefined;
|
|
969
|
+
|
|
970
|
+
type TileflowVegetationMode = '3d' | 'flat' | 'auto';
|
|
971
|
+
type TileflowVegetationThreeDimensionalStyle = {
|
|
972
|
+
barkColor?: TileflowThemeColorValue;
|
|
973
|
+
/** Sunlit leaf colours of broadleaf trees, from darkest to lightest; up to four are used. */
|
|
974
|
+
broadleafColors?: readonly TileflowThemeColorValue[];
|
|
975
|
+
/** Sunlit needle colours of conifers and columns, from darkest to lightest. */
|
|
976
|
+
coniferColors?: readonly TileflowThemeColorValue[];
|
|
977
|
+
/** Sunlit frond colours of palms, from darkest to lightest; the broadleaf colours by default. */
|
|
978
|
+
palmColors?: readonly TileflowThemeColorValue[];
|
|
979
|
+
/**
|
|
980
|
+
* Whether the data's hedges stand as clipped green walls beside the trees, at their height or
|
|
981
|
+
* 1.3 m, a metre higher on an earth bank. Defaults to true where the data has hedges.
|
|
982
|
+
*/
|
|
983
|
+
hedges?: boolean;
|
|
984
|
+
/** Sunlit colours of hedges, from darkest to lightest; the two darkest broadleaf colours by default. */
|
|
985
|
+
hedgeColors?: readonly TileflowThemeColorValue[];
|
|
986
|
+
crownScale?: TileflowThemeNumberValue;
|
|
987
|
+
heightScale?: TileflowThemeNumberValue;
|
|
988
|
+
/** Visual minimum height in metres (0–20); smaller trees grow proportionally, including crowns. Default 0 preserves measured sizes. */
|
|
989
|
+
minimumHeight?: TileflowThemeNumberValue;
|
|
990
|
+
/** Variation within the authored foliage palette and between trunks, from 0 (default) to 1. */
|
|
991
|
+
materialVariation?: TileflowThemeNumberValue;
|
|
992
|
+
/**
|
|
993
|
+
* How trees take the light: `faceted` (the default), low-poly facets softened towards a round
|
|
994
|
+
* crown; `smooth`, round crowns; or `toon`, three bands of light and a crisp shadow, as a drawn
|
|
995
|
+
* tree has them.
|
|
996
|
+
*/
|
|
997
|
+
finish?: TileflowTreeFinish;
|
|
998
|
+
/** How strongly an outline rings each tree, from 0 (none, the default) to 1. */
|
|
999
|
+
edges?: TileflowThemeNumberValue;
|
|
1000
|
+
/** The outline's colour; the crown's darkest colour, deepened, by default. */
|
|
1001
|
+
edgeColor?: TileflowThemeColorValue;
|
|
1002
|
+
/**
|
|
1003
|
+
* Each form's own scales, on top of `heightScale` and `crownScale`, such as taller palms, and the
|
|
1004
|
+
* map's own models it draws: ids of `.glb` files in the map's `models` directories, one to four,
|
|
1005
|
+
* each tree drawing one. A model's materials named `bark`, `leaves`, `fronds` or `stem` take
|
|
1006
|
+
* those parts' colours.
|
|
1007
|
+
*/
|
|
1008
|
+
forms?: Partial<Record<TileflowTreeForm, {
|
|
1009
|
+
heightScale?: TileflowThemeNumberValue;
|
|
1010
|
+
crownScale?: TileflowThemeNumberValue;
|
|
1011
|
+
models?: readonly string[];
|
|
1012
|
+
}>>;
|
|
1013
|
+
/**
|
|
1014
|
+
* The forms of trees whose data gives none, as relative weights: `round`, `open` and `tall`
|
|
1015
|
+
* (broadleaf), `conifer`, `columnar` and `palm`. Each tree draws one from a stable hash, so it
|
|
1016
|
+
* keeps its form everywhere. Defaults to the three broadleaf forms, evenly. A tree the data calls
|
|
1017
|
+
* broadleaved keeps to the broadleaf forms of the mix.
|
|
1018
|
+
*/
|
|
1019
|
+
unknownForms?: TileflowTreeFormMix;
|
|
1020
|
+
/**
|
|
1021
|
+
* Regions whose trees without a form in the data take their own mix, such as palms along a
|
|
1022
|
+
* subtropical coast. Bounds are `[west, south, east, north]` in degrees; the first region holding
|
|
1023
|
+
* a tree applies. At most 16.
|
|
1024
|
+
*/
|
|
1025
|
+
regions?: readonly TileflowTreeRegion[];
|
|
1026
|
+
};
|
|
1027
|
+
type TileflowVegetationModuleOptions = {
|
|
1028
|
+
flat?: TileflowCircleStyle;
|
|
1029
|
+
/** `3d` uses models at every pitch; `auto` follows the runtime's explicit 2D/3D view mode. */
|
|
1030
|
+
mode?: TileflowVegetationMode;
|
|
1031
|
+
/** Representation when a renderer cannot draw models. Defaults to `flat`. */
|
|
1032
|
+
fallback?: 'flat' | 'none';
|
|
1033
|
+
/** Initial visibility; a runtime control may override it. Defaults to true. */
|
|
1034
|
+
visible?: boolean;
|
|
1035
|
+
threeDimensional?: TileflowVegetationThreeDimensionalStyle;
|
|
1036
|
+
};
|
|
1037
|
+
type TileflowVegetationModuleConfig = TileflowVegetationModuleOptions & {
|
|
1038
|
+
type: 'vegetation';
|
|
1039
|
+
};
|
|
1040
|
+
declare function vegetation(options?: TileflowVegetationModuleOptions): TileflowVegetationModuleConfig;
|
|
1041
|
+
|
|
1042
|
+
type TileflowWaterwayClass = 'canal' | 'other' | 'river' | 'stream';
|
|
1043
|
+
/** Explicit placement for every geometry family in a declared Bathymetry name layer. */
|
|
1044
|
+
type TileflowBathymetryNamePlacement = {
|
|
1045
|
+
point: 'point';
|
|
1046
|
+
line: TileflowSymbolPlacement;
|
|
1047
|
+
polygon: TileflowSymbolPlacement;
|
|
1048
|
+
};
|
|
1049
|
+
type TileflowBathymetryNameStyle = TileflowSymbolStyle & {
|
|
1050
|
+
/** Overrides scalar placement for these names; omission preserves scalar placement. */
|
|
1051
|
+
placementByGeometry?: TileflowBathymetryNamePlacement;
|
|
1052
|
+
};
|
|
1053
|
+
type TileflowWaterModuleOptions = {
|
|
1054
|
+
bathymetry?: TileflowFillStyle;
|
|
1055
|
+
/** Contour lines when declared by Bathymetry; otherwise approximate polygon band edges. */
|
|
1056
|
+
bathymetryContours?: TileflowLineStyle;
|
|
1057
|
+
/** Contour-depth or legacy band-floor labels, not measured survey soundings. */
|
|
1058
|
+
bathymetryLabels?: TileflowSymbolStyle;
|
|
1059
|
+
/** Names from an explicitly declared seafloor_landform layer. */
|
|
1060
|
+
bathymetryLandforms?: TileflowBathymetryNameStyle;
|
|
1061
|
+
/** Names from an explicitly declared water_name layer. */
|
|
1062
|
+
bathymetryWaterNames?: TileflowBathymetryNameStyle;
|
|
1063
|
+
bodies?: TileflowAreaStyle;
|
|
1064
|
+
intermittent?: {
|
|
1065
|
+
bodies?: TileflowAreaStyle;
|
|
1066
|
+
waterways?: TileflowLineStyle;
|
|
1067
|
+
};
|
|
1068
|
+
waterways?: Partial<Record<TileflowWaterwayClass, TileflowLineStyle>>;
|
|
1069
|
+
};
|
|
1070
|
+
type TileflowWaterModuleConfig = TileflowWaterModuleOptions & {
|
|
1071
|
+
type: 'water';
|
|
1072
|
+
};
|
|
1073
|
+
declare function water(options?: TileflowWaterModuleOptions): TileflowWaterModuleConfig;
|
|
1074
|
+
|
|
1075
|
+
declare const tileflowWorldGeneration: "v1";
|
|
1076
|
+
/** Mutable discovery selector. The server resolves it once to an immutable release in TileJSON. */
|
|
1077
|
+
declare const tileflowWorldTileJsonUrl: "https://api.tileflow.dev/tiles/world/tiles.json";
|
|
1078
|
+
|
|
1079
|
+
declare const tileflowPrimarySourceId = "tileflow";
|
|
1080
|
+
declare const openMapTilesContractVersion = 1;
|
|
1081
|
+
type ParkLayerSemantics = 'mixed' | 'protected-only';
|
|
1082
|
+
type OpenMapTilesLayerBindings = {
|
|
1083
|
+
aerodromeLabel: string;
|
|
1084
|
+
aeroway: string;
|
|
1085
|
+
boundary: string;
|
|
1086
|
+
building: string;
|
|
1087
|
+
/** Required low-zoom GEBCO extension in the Tileflow World V1 schema. */
|
|
1088
|
+
bathymetry?: string;
|
|
1089
|
+
/** Optional derived commercial-activity polygons rendered below buildings. */
|
|
1090
|
+
businessCorridor?: string;
|
|
1091
|
+
/**
|
|
1092
|
+
* Optional decorative points inside parks and gardens, where measured tree canopy covers the
|
|
1093
|
+
* ground. Each point tells how much room a drawn grove of tree crowns has. The points are not
|
|
1094
|
+
* surveyed trees and are unrelated to `tree`.
|
|
1095
|
+
*/
|
|
1096
|
+
canopy?: string;
|
|
1097
|
+
/** Optional generated circle centers used for detailed roundabout rendering. */
|
|
1098
|
+
circularFeature?: string;
|
|
1099
|
+
/** Optional low-zoom global land-cover extension. Defaults to `globallandcover`. */
|
|
1100
|
+
globalLandcover?: string;
|
|
1101
|
+
houseNumber: string;
|
|
1102
|
+
landcover: string;
|
|
1103
|
+
landuse: string;
|
|
1104
|
+
mountainPeak: string;
|
|
1105
|
+
park: string;
|
|
1106
|
+
place: string;
|
|
1107
|
+
poi: string;
|
|
1108
|
+
road: string;
|
|
1109
|
+
roadName: string;
|
|
1110
|
+
/** Optional generalized low-zoom route-shield points. Required by Tileflow World V1. */
|
|
1111
|
+
roadShield?: string;
|
|
1112
|
+
/** Optional detailed pedestrian-surface polygons. */
|
|
1113
|
+
sidewalk?: string;
|
|
1114
|
+
/** Optional point features such as pedestrian crossings. */
|
|
1115
|
+
streetFurniture?: string;
|
|
1116
|
+
/**
|
|
1117
|
+
* Optional barriers and traffic calming at native zoom 15: hedges, fences, walls, kerbs and
|
|
1118
|
+
* guard rails as lines, and hedges mapped as areas of their own as polygons.
|
|
1119
|
+
*/
|
|
1120
|
+
trafficControl?: string;
|
|
1121
|
+
/** Optional individual-tree point extension used by the vegetation module. */
|
|
1122
|
+
tree?: string;
|
|
1123
|
+
/**
|
|
1124
|
+
* Optional outer boundaries of `road` areas, as lines. When bound, area outlines are drawn from
|
|
1125
|
+
* it, so the holes of an area (tree pits, planting beds) are never stroked.
|
|
1126
|
+
*/
|
|
1127
|
+
transportationOutline?: string;
|
|
1128
|
+
water: string;
|
|
1129
|
+
waterName: string;
|
|
1130
|
+
waterway: string;
|
|
1131
|
+
};
|
|
1132
|
+
type OpenMapTilesFieldBindings = {
|
|
1133
|
+
access: string;
|
|
1134
|
+
activityScore: string;
|
|
1135
|
+
adminLevel: string;
|
|
1136
|
+
bicycle: string;
|
|
1137
|
+
/** GEBCO depth-band upper boundary in metres. */
|
|
1138
|
+
bathymetryMinDepth?: string;
|
|
1139
|
+
/** Stable shallow-to-deep ordering for GEBCO bands. */
|
|
1140
|
+
bathymetrySortKey?: string;
|
|
1141
|
+
brunnel: string;
|
|
1142
|
+
buildingTone: string;
|
|
1143
|
+
/**
|
|
1144
|
+
* Lower bound of the distance from a canopy point to the nearest edge a crown must not cover,
|
|
1145
|
+
* in pixels of a 512-pixel tile at zoom 15: one of 4, 6, 8, 12, 16, or 24. A grove fits at zoom
|
|
1146
|
+
* `z` when its reach in screen pixels is at most this value × 2^(z − 15).
|
|
1147
|
+
*/
|
|
1148
|
+
canopyClearanceAtZoom15: string;
|
|
1149
|
+
/**
|
|
1150
|
+
* Lower bound, in percent, of canopy taller than 3 m within 10 m of a canopy point: 3, 30, or
|
|
1151
|
+
* 60. Absent where no measurement exists; treat absence as a middle density.
|
|
1152
|
+
*/
|
|
1153
|
+
canopyCoverPercent: string;
|
|
1154
|
+
/** Stable integer from 0 through 15 per canopy point. Lower ranks appear first by zoom. */
|
|
1155
|
+
canopyRank: string;
|
|
1156
|
+
capital: string;
|
|
1157
|
+
/** Roundabout geometry kind in the optional circular-feature layer. */
|
|
1158
|
+
circularKind: string;
|
|
1159
|
+
/** Precomputed roundabout radius in pixels at zoom 15. */
|
|
1160
|
+
circularRadiusAtZoom15: string;
|
|
1161
|
+
/** Extra precomputed clearance on road approaches to a circular road at zoom 15. */
|
|
1162
|
+
circularClearanceExtraAtZoom15: string;
|
|
1163
|
+
/** Roundabout radius in metres. */
|
|
1164
|
+
circularRadiusMeters: string;
|
|
1165
|
+
/** Roundabout inner radius in metres. */
|
|
1166
|
+
circularInnerRadiusMeters: string;
|
|
1167
|
+
/** Roundabout outer radius in metres. */
|
|
1168
|
+
circularOuterRadiusMeters: string;
|
|
1169
|
+
class: string;
|
|
1170
|
+
/** Crossing control classification on street-furniture points. */
|
|
1171
|
+
crossing: string;
|
|
1172
|
+
circumference: string;
|
|
1173
|
+
confidence: string;
|
|
1174
|
+
diameterCrown: string;
|
|
1175
|
+
disputed: string;
|
|
1176
|
+
/** Direction in degrees for oriented street-furniture symbols. */
|
|
1177
|
+
direction: string;
|
|
1178
|
+
elevation: string;
|
|
1179
|
+
elevationFeet: string;
|
|
1180
|
+
expressway: string;
|
|
1181
|
+
foot: string;
|
|
1182
|
+
/** Optional kind of a barrier hedge: `hedge_bank` when it stands on an earth bank. */
|
|
1183
|
+
hedge?: string;
|
|
1184
|
+
height: string;
|
|
1185
|
+
hide3d: string;
|
|
1186
|
+
/** Whether a building footprint owns separately materialized building parts. */
|
|
1187
|
+
hasParts: string;
|
|
1188
|
+
horse: string;
|
|
1189
|
+
houseNumber: string;
|
|
1190
|
+
/** Sparse 1–4 semantic and locally normalized urban-importance tier. */
|
|
1191
|
+
importanceTier: string;
|
|
1192
|
+
iata: string;
|
|
1193
|
+
icao: string;
|
|
1194
|
+
indoor: string;
|
|
1195
|
+
intermittent: string;
|
|
1196
|
+
genus: string;
|
|
1197
|
+
layer: string;
|
|
1198
|
+
leafCycle: string;
|
|
1199
|
+
leafType: string;
|
|
1200
|
+
level: string;
|
|
1201
|
+
maritime: string;
|
|
1202
|
+
/** Physical crossing-marking classification on street-furniture points. */
|
|
1203
|
+
markings: string;
|
|
1204
|
+
minHeight: string;
|
|
1205
|
+
minZoom: string;
|
|
1206
|
+
/**
|
|
1207
|
+
* Transport mode of World transit POIs and lines: `subway`, `train`, `light_rail`, `tram`,
|
|
1208
|
+
* `monorail`, `funicular`, `bus`, `ferry` or `aerialway`.
|
|
1209
|
+
*/
|
|
1210
|
+
mode: string;
|
|
1211
|
+
mtbScale: string;
|
|
1212
|
+
name: string;
|
|
1213
|
+
nameEnglish: string;
|
|
1214
|
+
nameLatin: string;
|
|
1215
|
+
network: string;
|
|
1216
|
+
official: string;
|
|
1217
|
+
oneway: string;
|
|
1218
|
+
/** Canonical editorial POI category. Never aliases OpenMapTiles `class`. */
|
|
1219
|
+
poiCategory: string;
|
|
1220
|
+
/** Per-zoom POI density tier from 0 (most selective) through 5. */
|
|
1221
|
+
poiFilterRank: string;
|
|
1222
|
+
/** Producer-selected POI icon key. */
|
|
1223
|
+
poiIcon: string;
|
|
1224
|
+
/** Physical-size tier from 0 (largest) through 16 (point-sized). */
|
|
1225
|
+
poiSizeRank: string;
|
|
1226
|
+
/** Canonical specific POI type. Never aliases OpenMapTiles `subclass`. */
|
|
1227
|
+
poiType: string;
|
|
1228
|
+
ramp: string;
|
|
1229
|
+
rank: string;
|
|
1230
|
+
ref: string;
|
|
1231
|
+
refLength: string;
|
|
1232
|
+
renderHeight: string;
|
|
1233
|
+
renderMinHeight: string;
|
|
1234
|
+
/** Optional producer-normalized route-shield family. Required by Tileflow World V1. */
|
|
1235
|
+
shieldKind?: string;
|
|
1236
|
+
/** Optional merged line length used to bound detailed route-shield repetition. */
|
|
1237
|
+
shieldLineLengthMeters?: string;
|
|
1238
|
+
/** Optional producer-normalized route network identifier. */
|
|
1239
|
+
shieldNetwork?: string;
|
|
1240
|
+
/** Optional producer-normalized route-shield collision rank. */
|
|
1241
|
+
shieldRank?: string;
|
|
1242
|
+
/** Optional producer-normalized route-shield text. */
|
|
1243
|
+
shieldText?: string;
|
|
1244
|
+
/** Optional producer-normalized route-shield ink role. Required by Tileflow World V1. */
|
|
1245
|
+
shieldTextColor?: string;
|
|
1246
|
+
service: string;
|
|
1247
|
+
species: string;
|
|
1248
|
+
speciesWikidata: string;
|
|
1249
|
+
subclass: string;
|
|
1250
|
+
surface: string;
|
|
1251
|
+
toll: string;
|
|
1252
|
+
};
|
|
1253
|
+
type OpenMapTilesSchemaOptions = {
|
|
1254
|
+
capabilities?: {
|
|
1255
|
+
businessCorridor?: boolean;
|
|
1256
|
+
bathymetry?: boolean;
|
|
1257
|
+
canopy?: boolean;
|
|
1258
|
+
globalLandcover?: boolean;
|
|
1259
|
+
tree?: boolean;
|
|
1260
|
+
};
|
|
1261
|
+
fields?: Partial<OpenMapTilesFieldBindings>;
|
|
1262
|
+
layers?: Partial<OpenMapTilesLayerBindings>;
|
|
1263
|
+
semantics?: {
|
|
1264
|
+
/** Whether the bound park layer mixes ordinary parks with protected areas. */
|
|
1265
|
+
parkLayer?: ParkLayerSemantics;
|
|
1266
|
+
};
|
|
1267
|
+
};
|
|
1268
|
+
type OpenMapTilesSchema = {
|
|
1269
|
+
type: 'openmaptiles';
|
|
1270
|
+
contractVersion: typeof openMapTilesContractVersion;
|
|
1271
|
+
fields: OpenMapTilesFieldBindings;
|
|
1272
|
+
layers: OpenMapTilesLayerBindings;
|
|
1273
|
+
semantics: {
|
|
1274
|
+
parkLayer: ParkLayerSemantics;
|
|
1275
|
+
};
|
|
1276
|
+
};
|
|
1277
|
+
type TileflowWorldV1Schema = Omit<OpenMapTilesSchema, 'fields' | 'layers'> & {
|
|
1278
|
+
fields: OpenMapTilesFieldBindings & {
|
|
1279
|
+
bathymetryMinDepth: string;
|
|
1280
|
+
bathymetrySortKey: string;
|
|
1281
|
+
hedge: string;
|
|
1282
|
+
shieldKind: string;
|
|
1283
|
+
shieldLineLengthMeters: string;
|
|
1284
|
+
shieldNetwork: string;
|
|
1285
|
+
shieldRank: string;
|
|
1286
|
+
shieldText: string;
|
|
1287
|
+
shieldTextColor: string;
|
|
1288
|
+
};
|
|
1289
|
+
layers: OpenMapTilesLayerBindings & {
|
|
1290
|
+
bathymetry: string;
|
|
1291
|
+
circularFeature: string;
|
|
1292
|
+
globalLandcover: string;
|
|
1293
|
+
sidewalk: string;
|
|
1294
|
+
streetFurniture: string;
|
|
1295
|
+
roadShield: string;
|
|
1296
|
+
trafficControl: string;
|
|
1297
|
+
transportationOutline: string;
|
|
1298
|
+
};
|
|
1299
|
+
};
|
|
1300
|
+
type TileflowWorldReleaseReference = Readonly<{
|
|
1301
|
+
descriptorSha256: string;
|
|
1302
|
+
releaseId: string;
|
|
1303
|
+
}>;
|
|
1304
|
+
type TileflowWorldSelection = Readonly<{
|
|
1305
|
+
kind: 'current';
|
|
1306
|
+
product: 'world-v1';
|
|
1307
|
+
}> | Readonly<{
|
|
1308
|
+
kind: 'release';
|
|
1309
|
+
product: 'world-v1';
|
|
1310
|
+
release: TileflowWorldReleaseReference;
|
|
1311
|
+
}>;
|
|
1312
|
+
type TileflowWorldData = {
|
|
1313
|
+
generation: typeof tileflowWorldGeneration;
|
|
1314
|
+
selection: TileflowWorldSelection;
|
|
1315
|
+
type: 'tileflow-world';
|
|
1316
|
+
};
|
|
1317
|
+
type VectorTilesDataCommon = {
|
|
1318
|
+
type: 'vector-tiles';
|
|
1319
|
+
attribution: string;
|
|
1320
|
+
revision?: string;
|
|
1321
|
+
schema: OpenMapTilesSchema;
|
|
1322
|
+
};
|
|
1323
|
+
type VectorTilesData = VectorTilesDataCommon & ({
|
|
1324
|
+
bounds?: never;
|
|
1325
|
+
maxzoom?: never;
|
|
1326
|
+
minzoom?: never;
|
|
1327
|
+
tiles?: never;
|
|
1328
|
+
url: string;
|
|
1329
|
+
} | {
|
|
1330
|
+
bounds?: [number, number, number, number];
|
|
1331
|
+
maxzoom?: number;
|
|
1332
|
+
minzoom?: number;
|
|
1333
|
+
tiles: [string, ...string[]];
|
|
1334
|
+
url?: never;
|
|
1335
|
+
});
|
|
1336
|
+
type TileflowDataConfig = TileflowWorldData | VectorTilesData;
|
|
1337
|
+
type TileflowDataIdentity = {
|
|
1338
|
+
bindings?: {
|
|
1339
|
+
fields: OpenMapTilesFieldBindings;
|
|
1340
|
+
layers: OpenMapTilesLayerBindings;
|
|
1341
|
+
};
|
|
1342
|
+
capabilities?: {
|
|
1343
|
+
businessCorridor: boolean;
|
|
1344
|
+
bathymetry: boolean;
|
|
1345
|
+
canopy: boolean;
|
|
1346
|
+
globalLandcover: boolean;
|
|
1347
|
+
tree: boolean;
|
|
1348
|
+
};
|
|
1349
|
+
generation?: typeof tileflowWorldGeneration;
|
|
1350
|
+
kind: TileflowDataConfig['type'];
|
|
1351
|
+
/** External fixture identity. */
|
|
1352
|
+
revision?: string;
|
|
1353
|
+
schema: OpenMapTilesSchema['type'];
|
|
1354
|
+
schemaVersion: number;
|
|
1355
|
+
semantics: OpenMapTilesSchema['semantics'];
|
|
1356
|
+
sourceId: typeof tileflowPrimarySourceId;
|
|
1357
|
+
url?: string;
|
|
1358
|
+
worldSelection?: TileflowWorldSelection;
|
|
1359
|
+
};
|
|
1360
|
+
type ResolvedTileflowData = {
|
|
1361
|
+
attribution: string;
|
|
1362
|
+
bounds?: [number, number, number, number];
|
|
1363
|
+
generation?: typeof tileflowWorldGeneration;
|
|
1364
|
+
identity: TileflowDataIdentity;
|
|
1365
|
+
kind: TileflowDataConfig['type'];
|
|
1366
|
+
maxzoom?: number;
|
|
1367
|
+
minzoom?: number;
|
|
1368
|
+
revision?: string;
|
|
1369
|
+
schema: OpenMapTilesSchema;
|
|
1370
|
+
sourceId: typeof tileflowPrimarySourceId;
|
|
1371
|
+
tiles?: string[];
|
|
1372
|
+
url?: string;
|
|
1373
|
+
};
|
|
1374
|
+
declare function openMapTiles(options?: OpenMapTilesSchemaOptions): OpenMapTilesSchema;
|
|
1375
|
+
/** OpenMapTiles plus the required typed extensions emitted by Tileflow World V1. */
|
|
1376
|
+
declare function tileflowWorldV1Schema(options?: OpenMapTilesSchemaOptions): TileflowWorldV1Schema;
|
|
1377
|
+
declare function validateTileflowWorldV1Tilejson(tilejson: {
|
|
1378
|
+
vector_layers?: readonly unknown[];
|
|
1379
|
+
} | null | undefined, schema?: TileflowWorldV1Schema): string[];
|
|
1380
|
+
declare function tileflowWorld(options?: {
|
|
1381
|
+
release?: TileflowWorldReleaseReference;
|
|
1382
|
+
}): TileflowWorldData;
|
|
1383
|
+
declare function vectorTiles(options: {
|
|
1384
|
+
attribution: string;
|
|
1385
|
+
bounds?: [number, number, number, number];
|
|
1386
|
+
maxzoom?: number;
|
|
1387
|
+
minzoom?: number;
|
|
1388
|
+
revision?: string;
|
|
1389
|
+
schema: OpenMapTilesSchema;
|
|
1390
|
+
tiles?: readonly [string, ...string[]];
|
|
1391
|
+
url?: string;
|
|
1392
|
+
}): VectorTilesData;
|
|
1393
|
+
declare function resolveTileflowData(data: TileflowDataConfig | undefined, options?: {
|
|
1394
|
+
apiBaseUrl?: string;
|
|
1395
|
+
}): ResolvedTileflowData;
|
|
1396
|
+
declare function isCanonicalOpenMapTilesSchema(schema: OpenMapTilesSchema): boolean;
|
|
1397
|
+
|
|
1398
|
+
declare const tileflowBathymetrySourceId: "tileflow-bathymetry";
|
|
1399
|
+
declare const tileflowBathymetryDemSourceId: "tileflow-bathymetry-dem";
|
|
1400
|
+
declare const tileflowNauticalSourceId: "tileflow-nautical";
|
|
1401
|
+
declare const tileflowBathymetryV1Schema: Readonly<{
|
|
1402
|
+
fields: Readonly<{
|
|
1403
|
+
class: "class";
|
|
1404
|
+
depth: "depth";
|
|
1405
|
+
id: "id";
|
|
1406
|
+
maxZoom: "max_zoom";
|
|
1407
|
+
minDepth: "min_depth";
|
|
1408
|
+
minZoom: "min_zoom";
|
|
1409
|
+
name: "name";
|
|
1410
|
+
sortKey: "sort_key";
|
|
1411
|
+
}>;
|
|
1412
|
+
layer: "bathymetry";
|
|
1413
|
+
layers: Readonly<{
|
|
1414
|
+
bands: "bathymetry";
|
|
1415
|
+
contours: "bathymetry_contour";
|
|
1416
|
+
coverage: "bathymetry_coverage";
|
|
1417
|
+
landforms: "seafloor_landform";
|
|
1418
|
+
waterNames: "water_name";
|
|
1419
|
+
}>;
|
|
1420
|
+
optionalLayers: readonly ["contours", "coverage", "landforms", "waterNames"];
|
|
1421
|
+
product: "bathymetry-v1";
|
|
1422
|
+
requiredLayers: readonly ["bands"];
|
|
1423
|
+
schemaVersion: 1;
|
|
1424
|
+
sources: Readonly<{
|
|
1425
|
+
dem: Readonly<{
|
|
1426
|
+
encoding: "terrarium";
|
|
1427
|
+
sourceId: "tileflow-bathymetry-dem";
|
|
1428
|
+
tileSize: 512;
|
|
1429
|
+
}>;
|
|
1430
|
+
vector: Readonly<{
|
|
1431
|
+
sourceId: "tileflow-bathymetry";
|
|
1432
|
+
}>;
|
|
1433
|
+
}>;
|
|
1434
|
+
}>;
|
|
1435
|
+
/**
|
|
1436
|
+
* The `nautical-v1` vector contract styled by the `nautical` module. Every feature carries the
|
|
1437
|
+
* provenance fields (`provider`, `provenance`, `edition`, `coverage`, `licence`) and `min_zoom`,
|
|
1438
|
+
* the first zoom at which it appears; `rank` (1 is most important within its layer) and `name`
|
|
1439
|
+
* are optional. Colours are S-57 colour names, and multi-valued colours and categories are
|
|
1440
|
+
* comma-separated in source order, for example `black,yellow`. A light's `sequence` lists its
|
|
1441
|
+
* phases in seconds, eclipses in parentheses, for example `0.5+(1.5)+0.5+(4.5)`. Clearances,
|
|
1442
|
+
* depths, and heights are in metres.
|
|
1443
|
+
*/
|
|
1444
|
+
declare const tileflowNauticalV1Schema: Readonly<{
|
|
1445
|
+
fields: Readonly<{
|
|
1446
|
+
category: "category";
|
|
1447
|
+
cell: "cell";
|
|
1448
|
+
character: "character";
|
|
1449
|
+
class: "class";
|
|
1450
|
+
color: "color";
|
|
1451
|
+
colorPattern: "color_pattern";
|
|
1452
|
+
country: "country";
|
|
1453
|
+
coverage: "coverage";
|
|
1454
|
+
depth: "depth";
|
|
1455
|
+
distance: "distance";
|
|
1456
|
+
distanceUnit: "distance_unit";
|
|
1457
|
+
edition: "edition";
|
|
1458
|
+
families: "families";
|
|
1459
|
+
group: "group";
|
|
1460
|
+
heightM: "height_m";
|
|
1461
|
+
horizontalClearance: "horizontal_clearance";
|
|
1462
|
+
impact: "impact";
|
|
1463
|
+
information: "information";
|
|
1464
|
+
label: "label";
|
|
1465
|
+
licence: "licence";
|
|
1466
|
+
lit: "lit";
|
|
1467
|
+
minZoom: "min_zoom";
|
|
1468
|
+
name: "name";
|
|
1469
|
+
orientation: "orientation";
|
|
1470
|
+
periodS: "period_s";
|
|
1471
|
+
position: "position";
|
|
1472
|
+
provenance: "provenance";
|
|
1473
|
+
provider: "provider";
|
|
1474
|
+
rangeNm: "range_nm";
|
|
1475
|
+
rank: "rank";
|
|
1476
|
+
reference: "reference";
|
|
1477
|
+
restriction: "restriction";
|
|
1478
|
+
scale: "scale";
|
|
1479
|
+
sectorEnd: "sector_end";
|
|
1480
|
+
sectorStart: "sector_start";
|
|
1481
|
+
sequence: "sequence";
|
|
1482
|
+
shape: "shape";
|
|
1483
|
+
size: "size";
|
|
1484
|
+
subclass: "subclass";
|
|
1485
|
+
system: "system";
|
|
1486
|
+
topmark: "topmark";
|
|
1487
|
+
unlocode: "unlocode";
|
|
1488
|
+
update: "update";
|
|
1489
|
+
verticalClearance: "vertical_clearance";
|
|
1490
|
+
verticalClearanceClosed: "vertical_clearance_closed";
|
|
1491
|
+
verticalClearanceOpen: "vertical_clearance_open";
|
|
1492
|
+
verticalClearanceSafe: "vertical_clearance_safe";
|
|
1493
|
+
waterLevel: "water_level";
|
|
1494
|
+
}>;
|
|
1495
|
+
geometryTypes: Readonly<{
|
|
1496
|
+
aids: readonly ["Point"];
|
|
1497
|
+
coverage: readonly ["Polygon"];
|
|
1498
|
+
hazards: readonly ["Point", "LineString", "Polygon"];
|
|
1499
|
+
lights: readonly ["Point"];
|
|
1500
|
+
navigationAreas: readonly ["Point", "LineString", "Polygon"];
|
|
1501
|
+
reefs: readonly ["Polygon"];
|
|
1502
|
+
soundings: readonly ["Point"];
|
|
1503
|
+
wrecks: readonly ["Point", "Polygon"];
|
|
1504
|
+
}>;
|
|
1505
|
+
layers: Readonly<{
|
|
1506
|
+
aids: "aid";
|
|
1507
|
+
coverage: "coverage";
|
|
1508
|
+
hazards: "hazard";
|
|
1509
|
+
lights: "light";
|
|
1510
|
+
navigationAreas: "navigation_area";
|
|
1511
|
+
reefs: "reef";
|
|
1512
|
+
soundings: "sounding";
|
|
1513
|
+
wrecks: "wreck";
|
|
1514
|
+
}>;
|
|
1515
|
+
product: "nautical-v1";
|
|
1516
|
+
/**
|
|
1517
|
+
* Known `provider` values and the `class` of their `coverage` cells. The source's TileJSON owns
|
|
1518
|
+
* each provider's credit; the module never adds attribution.
|
|
1519
|
+
*/
|
|
1520
|
+
providers: Readonly<{
|
|
1521
|
+
'nga-list-of-lights': "list";
|
|
1522
|
+
'noaa-office-of-coast-survey': "chart";
|
|
1523
|
+
openstreetmap: "community";
|
|
1524
|
+
'usace-ienc': "chart";
|
|
1525
|
+
}>;
|
|
1526
|
+
schemaVersion: 1;
|
|
1527
|
+
}>;
|
|
1528
|
+
type TileflowMarineMode = 'none' | 'bathymetry' | 'nautical' | 'chart';
|
|
1529
|
+
/** One schema-compatible vector TileJSON source used by a marine sidecar. */
|
|
1530
|
+
type TileflowMarineSourceConfig = {
|
|
1531
|
+
attribution?: string;
|
|
1532
|
+
sourceId?: string;
|
|
1533
|
+
url?: string;
|
|
1534
|
+
};
|
|
1535
|
+
type TileflowBathymetryDisplay = 'bands' | 'relief' | 'hybrid';
|
|
1536
|
+
declare const tileflowBathymetryNameLayerLimits: Readonly<{
|
|
1537
|
+
maxZoomRanges: 128;
|
|
1538
|
+
}>;
|
|
1539
|
+
/** One exact, inclusive minimum and exclusive maximum nominal source range. */
|
|
1540
|
+
type TileflowBathymetryNameZoomRange = Readonly<{
|
|
1541
|
+
minZoom: number;
|
|
1542
|
+
maxZoom: number;
|
|
1543
|
+
}>;
|
|
1544
|
+
/** Exhaustive source range inventory; unmatched pairs are omitted from rendering. */
|
|
1545
|
+
type TileflowBathymetryNameLayer = boolean | {
|
|
1546
|
+
zoomRanges: readonly TileflowBathymetryNameZoomRange[];
|
|
1547
|
+
};
|
|
1548
|
+
/** Explicit availability of compatible optional vector layers; compilation never probes TileJSON. */
|
|
1549
|
+
type TileflowBathymetryVectorLayers = {
|
|
1550
|
+
contours?: boolean;
|
|
1551
|
+
landforms?: TileflowBathymetryNameLayer;
|
|
1552
|
+
waterNames?: TileflowBathymetryNameLayer;
|
|
1553
|
+
};
|
|
1554
|
+
/**
|
|
1555
|
+
* Styling and physical-source overrides for the optional Bathymetry DEM.
|
|
1556
|
+
* Terrarium and 512 px tiles are the hosted defaults; advanced compatible sources may override
|
|
1557
|
+
* either. `opacity` applies to both the continuous color relief and the hillshade tint.
|
|
1558
|
+
*/
|
|
1559
|
+
type TileflowBathymetryReliefConfig = TileflowTerrainHillshadeStyle & {
|
|
1560
|
+
attribution?: string;
|
|
1561
|
+
encoding?: TileflowTerrainEncoding;
|
|
1562
|
+
illuminationAltitude?: TileflowThemeNumberValue;
|
|
1563
|
+
multidirectional?: boolean;
|
|
1564
|
+
opacity?: TileflowThemeNumberValue;
|
|
1565
|
+
sourceId?: string;
|
|
1566
|
+
tileSize?: 256 | 512;
|
|
1567
|
+
url?: string;
|
|
1568
|
+
};
|
|
1569
|
+
/** One logical Bathymetry product backed by vector bands and, when requested, a DEM. */
|
|
1570
|
+
type TileflowBathymetryConfig = TileflowMarineSourceConfig & {
|
|
1571
|
+
bands?: false | TileflowFillStyle;
|
|
1572
|
+
contours?: false | TileflowLineStyle;
|
|
1573
|
+
display?: TileflowBathymetryDisplay;
|
|
1574
|
+
labels?: false | TileflowSymbolStyle;
|
|
1575
|
+
relief?: false | TileflowBathymetryReliefConfig;
|
|
1576
|
+
type: 'bathymetry';
|
|
1577
|
+
vectorLayers?: TileflowBathymetryVectorLayers;
|
|
1578
|
+
};
|
|
1579
|
+
type TileflowBathymetryOptions = Omit<TileflowBathymetryConfig, 'type'>;
|
|
1580
|
+
/** Configure Bathymetry as one product while loading only the physical sources its display needs. */
|
|
1581
|
+
declare function bathymetry(options?: TileflowBathymetryOptions): TileflowBathymetryConfig;
|
|
1582
|
+
/**
|
|
1583
|
+
* Advanced marine selection. An omitted member selects Tileflow's current product; `false`
|
|
1584
|
+
* disables only that member. Therefore `{}` is equivalent to `"chart"`.
|
|
1585
|
+
*/
|
|
1586
|
+
type TileflowMarineConfig = {
|
|
1587
|
+
bathymetry?: false | TileflowBathymetryConfig | TileflowMarineSourceConfig;
|
|
1588
|
+
nautical?: false | TileflowMarineSourceConfig;
|
|
1589
|
+
};
|
|
1590
|
+
type TileflowMarine = TileflowMarineMode | TileflowMarineConfig;
|
|
1591
|
+
type TileflowMarineSourceIdentity = Readonly<{
|
|
1592
|
+
kind: 'tileflow-bathymetry' | 'tileflow-nautical';
|
|
1593
|
+
product: 'bathymetry-v1' | 'nautical-v1';
|
|
1594
|
+
schemaVersion: 1;
|
|
1595
|
+
sourceId: string;
|
|
1596
|
+
url: string;
|
|
1597
|
+
}>;
|
|
1598
|
+
type TileflowBathymetryDemSourceIdentity = Readonly<{
|
|
1599
|
+
encoding: TileflowTerrainEncoding;
|
|
1600
|
+
kind: 'tileflow-bathymetry-dem';
|
|
1601
|
+
product: 'bathymetry-v1';
|
|
1602
|
+
schemaVersion: 1;
|
|
1603
|
+
sourceId: string;
|
|
1604
|
+
tileSize: 256 | 512;
|
|
1605
|
+
url: string;
|
|
1606
|
+
}>;
|
|
1607
|
+
type ResolvedMarineSource = Readonly<{
|
|
1608
|
+
identity: TileflowMarineSourceIdentity;
|
|
1609
|
+
source: Readonly<Record<string, unknown> & {
|
|
1610
|
+
type: 'vector';
|
|
1611
|
+
url: string;
|
|
1612
|
+
}>;
|
|
1613
|
+
sourceId: string;
|
|
1614
|
+
}>;
|
|
1615
|
+
type ResolvedBathymetryRelief = Readonly<{
|
|
1616
|
+
identity: TileflowBathymetryDemSourceIdentity;
|
|
1617
|
+
source: Readonly<Record<string, unknown> & {
|
|
1618
|
+
encoding: TileflowTerrainEncoding;
|
|
1619
|
+
tileSize: 256 | 512;
|
|
1620
|
+
type: 'raster-dem';
|
|
1621
|
+
url: string;
|
|
1622
|
+
}>;
|
|
1623
|
+
sourceId: string;
|
|
1624
|
+
style: TileflowBathymetryReliefConfig;
|
|
1625
|
+
}>;
|
|
1626
|
+
type ResolvedBathymetry = Readonly<{
|
|
1627
|
+
bands?: false | TileflowFillStyle;
|
|
1628
|
+
contours?: false | TileflowLineStyle;
|
|
1629
|
+
display: TileflowBathymetryDisplay;
|
|
1630
|
+
labels?: false | TileflowSymbolStyle;
|
|
1631
|
+
relief?: ResolvedBathymetryRelief;
|
|
1632
|
+
vector?: ResolvedMarineSource;
|
|
1633
|
+
vectorLayers?: TileflowBathymetryVectorLayers;
|
|
1634
|
+
}>;
|
|
1635
|
+
type ResolvedMarine = Readonly<{
|
|
1636
|
+
bathymetry?: ResolvedBathymetry;
|
|
1637
|
+
nautical?: ResolvedMarineSource;
|
|
1638
|
+
}>;
|
|
1639
|
+
/** Resolve the optional marine sidecars without fetching their TileJSON documents. */
|
|
1640
|
+
declare function resolveMarine(marine: TileflowMarine | undefined, apiBaseUrl?: string): ResolvedMarine | undefined;
|
|
1641
|
+
/**
|
|
1642
|
+
* Feature IDs the Nautical source promotes for MapLibre feature state: each light's unique
|
|
1643
|
+
* `provenance`, which is what animated lights are keyed by.
|
|
1644
|
+
*/
|
|
1645
|
+
declare const tileflowNauticalPromoteId: Readonly<{
|
|
1646
|
+
light: "provenance";
|
|
1647
|
+
}>;
|
|
1648
|
+
|
|
1649
|
+
declare const tileflowResetBrand: unique symbol;
|
|
1650
|
+
/** Removes an inherited override in `refine()` or lighting in `defineTheme()`. */
|
|
1651
|
+
type TileflowReset = Readonly<{
|
|
1652
|
+
readonly $tileflow: 'reset';
|
|
1653
|
+
readonly [tileflowResetBrand]: true;
|
|
1654
|
+
}>;
|
|
1655
|
+
type TileflowPatchValue<TValue> = TileflowReset | (TValue extends readonly unknown[] ? TValue : TValue extends object ? TileflowNestedPatch<TValue> : TValue);
|
|
1656
|
+
type TileflowNestedPatch<TValue extends object> = {
|
|
1657
|
+
readonly [TKey in keyof TValue]?: TileflowPatchValue<TValue[TKey]>;
|
|
1658
|
+
};
|
|
1659
|
+
/**
|
|
1660
|
+
* A recursive semantic patch. Records merge; arrays and scalar values replace.
|
|
1661
|
+
* Module ownership and compiler visibility are immutable only at the patch root;
|
|
1662
|
+
* nested domain options named `type` or `enabled` retain their ordinary meaning.
|
|
1663
|
+
*/
|
|
1664
|
+
type TileflowModulePatch<TModule extends object> = {
|
|
1665
|
+
readonly [TKey in Exclude<keyof TModule, 'enabled' | 'type'>]?: TileflowPatchValue<TModule[TKey]>;
|
|
1666
|
+
};
|
|
1667
|
+
type TileflowRefineOperation<TPatch extends object = object> = Readonly<{
|
|
1668
|
+
readonly op: 'refine';
|
|
1669
|
+
readonly patches: readonly TPatch[];
|
|
1670
|
+
}>;
|
|
1671
|
+
type TileflowDisableOperation = Readonly<{
|
|
1672
|
+
readonly op: 'disable';
|
|
1673
|
+
}>;
|
|
1674
|
+
type TileflowModuleOperation<TModule extends object> = TileflowDisableOperation | TileflowRefineOperation<TileflowModulePatch<TModule>>;
|
|
1675
|
+
type TileflowAuthoringModules = {
|
|
1676
|
+
readonly [TName in keyof TileflowSemanticModules]?: NonNullable<TileflowSemanticModules[TName]> | TileflowModuleOperation<NonNullable<TileflowSemanticModules[TName]>>;
|
|
1677
|
+
};
|
|
1678
|
+
/** Deeply refine an inherited module; arrays and scalar values replace atomically. */
|
|
1679
|
+
declare function refine<const TPatch extends object>(...patches: readonly [TPatch, ...TPatch[]]): TileflowRefineOperation<TPatch>;
|
|
1680
|
+
/** Disable a complete semantic module while retaining an explicit compiler decision. */
|
|
1681
|
+
declare function disable(): TileflowDisableOperation;
|
|
1682
|
+
/** Remove an inherited module override or theme lighting value, restoring the SDK fallback. */
|
|
1683
|
+
declare function reset(): TileflowReset;
|
|
1684
|
+
|
|
1685
|
+
declare const tileflowSunMetadataKey = "tileflow:sun";
|
|
1686
|
+
/** A theme's sun and sky light with every value resolved; see `TileflowThemeSun`. */
|
|
1687
|
+
type TileflowSunPreset = Readonly<{
|
|
1688
|
+
/** Degrees clockwise from north, from 0 to 360. */
|
|
1689
|
+
azimuth: number;
|
|
1690
|
+
/** Degrees above the horizon, from -90 to 90. */
|
|
1691
|
+
altitude: number;
|
|
1692
|
+
/** The direct light's colour. */
|
|
1693
|
+
color: string;
|
|
1694
|
+
/** The direct light's strength, from 0 to 1. */
|
|
1695
|
+
intensity: number;
|
|
1696
|
+
/** How dark the shadows the sun casts fall, from 0 (none) to 1. */
|
|
1697
|
+
shadowIntensity: number;
|
|
1698
|
+
/** The light from the sky, which reaches every surface and fills the shadows. */
|
|
1699
|
+
ambient: Readonly<{
|
|
1700
|
+
color: string;
|
|
1701
|
+
intensity: number;
|
|
1702
|
+
}>;
|
|
1703
|
+
}>;
|
|
1704
|
+
/** The sun as the map shows it, ready for an application's own layers. */
|
|
1705
|
+
type TileflowSun = Readonly<{
|
|
1706
|
+
/** Degrees clockwise from north, from 0 to 360. */
|
|
1707
|
+
azimuth: number;
|
|
1708
|
+
/** Degrees above the horizon, from -90 to 90. */
|
|
1709
|
+
altitude: number;
|
|
1710
|
+
/** A unit vector towards the sun: x east, y north, z up. */
|
|
1711
|
+
direction: readonly [number, number, number];
|
|
1712
|
+
/** The direct light's colour, as a CSS colour. */
|
|
1713
|
+
color: string;
|
|
1714
|
+
/** The direct light's colour as sRGB channels from 0 to 1. */
|
|
1715
|
+
rgb: readonly [number, number, number];
|
|
1716
|
+
/**
|
|
1717
|
+
* The direct light's strength, from 0 to 1. It fades to 0 as the sun sets: a sun below the
|
|
1718
|
+
* horizon lights nothing and casts no shadow.
|
|
1719
|
+
*/
|
|
1720
|
+
intensity: number;
|
|
1721
|
+
/** How dark the shadows the sun casts fall, from 0 (none) to 1. */
|
|
1722
|
+
shadowIntensity: number;
|
|
1723
|
+
/** The light from the sky, which reaches every surface and fills the shadows. */
|
|
1724
|
+
ambient: Readonly<{
|
|
1725
|
+
color: string;
|
|
1726
|
+
rgb: readonly [number, number, number];
|
|
1727
|
+
intensity: number;
|
|
1728
|
+
}>;
|
|
1729
|
+
/**
|
|
1730
|
+
* How bright flat, open ground is under this light, from 0 (dark) to 1: the sky's light plus the
|
|
1731
|
+
* sun's at its height, each weighted by its colour's luminance. Use it to switch lamps or windows
|
|
1732
|
+
* on as a scene darkens, whatever theme or sun lights it.
|
|
1733
|
+
*/
|
|
1734
|
+
brightness: number;
|
|
1735
|
+
/** Where the direction comes from: the themes, angles, or a date and place. */
|
|
1736
|
+
source: 'theme' | 'direction' | 'date';
|
|
1737
|
+
}>;
|
|
1738
|
+
/** Unset sun values: high in the south-south-west, with soft white daylight and ambient fill. */
|
|
1739
|
+
declare const tileflowDefaultSunPreset: TileflowSunPreset;
|
|
1740
|
+
/**
|
|
1741
|
+
* Where the sun stands for an instant and a place ([longitude, latitude] in degrees): its azimuth
|
|
1742
|
+
* in degrees clockwise from north and its apparent altitude above the horizon, with atmospheric
|
|
1743
|
+
* refraction. It follows NOAA's solar equations, accurate to about a hundredth of a degree for
|
|
1744
|
+
* years 1800 to 2200.
|
|
1745
|
+
*/
|
|
1746
|
+
declare function tileflowSunPosition(date: Date | number, location: readonly [number, number]): Readonly<{
|
|
1747
|
+
azimuth: number;
|
|
1748
|
+
altitude: number;
|
|
1749
|
+
}>;
|
|
1750
|
+
/** A unit vector towards a direction in the sky: x east, y north, z up. */
|
|
1751
|
+
declare function tileflowSunDirection(azimuth: number, altitude: number): readonly [number, number, number];
|
|
1752
|
+
/**
|
|
1753
|
+
* The sun as the map shows it: a preset's light from a direction. Direct light fades out over the
|
|
1754
|
+
* sun's last degrees above the horizon and is gone below it.
|
|
1755
|
+
*/
|
|
1756
|
+
declare function resolveTileflowSun(preset: TileflowSunPreset, direction?: Readonly<{
|
|
1757
|
+
azimuth: number;
|
|
1758
|
+
altitude: number;
|
|
1759
|
+
}>, source?: TileflowSun['source']): TileflowSun;
|
|
1760
|
+
/**
|
|
1761
|
+
* A preset `t` of the way from `from` to `to`: the azimuth turns the short way round, colours mix
|
|
1762
|
+
* in OKLab, as theme blends mix paint colours, and numbers linearly.
|
|
1763
|
+
*/
|
|
1764
|
+
declare function mixTileflowSunPresets(from: TileflowSunPreset, to: TileflowSunPreset, t: number): TileflowSunPreset;
|
|
1765
|
+
/** Reads the sun a compiled style publishes, or undefined when its metadata has none. */
|
|
1766
|
+
declare function readTileflowSunPreset(metadata: unknown): TileflowSunPreset | undefined;
|
|
1767
|
+
/**
|
|
1768
|
+
* The sun of a compiled style: the one it publishes, else one read from its light (a style whose
|
|
1769
|
+
* theme describes no sun lights its extrusions from `light.position`), else the default.
|
|
1770
|
+
*/
|
|
1771
|
+
declare function tileflowStyleSunPreset(style: {
|
|
1772
|
+
light?: unknown;
|
|
1773
|
+
metadata?: unknown;
|
|
1774
|
+
} | undefined): TileflowSunPreset;
|
|
1775
|
+
|
|
1776
|
+
type TileflowVisualValueCategory = 'color' | 'font' | 'image' | 'number';
|
|
1777
|
+
/** Return the semantic theme category for one visual property, or undefined for structure/data. */
|
|
1778
|
+
declare function classifyTileflowVisualProperty(property: string, _value?: unknown): TileflowVisualValueCategory | undefined;
|
|
1779
|
+
|
|
1780
|
+
type TileflowThemeColorScheme = 'dark' | 'light';
|
|
1781
|
+
type TileflowThemeName = string;
|
|
1782
|
+
declare const tileflowThemeLimits: Readonly<{
|
|
1783
|
+
readonly maxThemes: 64;
|
|
1784
|
+
}>;
|
|
1785
|
+
type TileflowThemeTokens = {
|
|
1786
|
+
color: Readonly<Record<string, TileflowThemeColorValue>>;
|
|
1787
|
+
font: Readonly<Record<string, TileflowThemeFontValue>>;
|
|
1788
|
+
image: Readonly<Record<string, TileflowThemeImageValue>>;
|
|
1789
|
+
number: Readonly<Record<string, TileflowThemeNumberValue>>;
|
|
1790
|
+
};
|
|
1791
|
+
type TileflowThemeTypographyStyle = {
|
|
1792
|
+
fallbacks?: readonly TileflowThemeFontValue[];
|
|
1793
|
+
font?: TileflowThemeFontValue;
|
|
1794
|
+
letterSpacing?: TileflowThemeNumberValue;
|
|
1795
|
+
transform?: TileflowTypographyStyle['transform'];
|
|
1796
|
+
};
|
|
1797
|
+
type TileflowThemeTypography = TileflowThemeTypographyStyle & {
|
|
1798
|
+
places?: TileflowThemeTypographyStyle;
|
|
1799
|
+
poi?: TileflowThemeTypographyStyle;
|
|
1800
|
+
roads?: TileflowThemeTypographyStyle;
|
|
1801
|
+
water?: TileflowThemeTypographyStyle;
|
|
1802
|
+
};
|
|
1803
|
+
/**
|
|
1804
|
+
* The theme's sun: where it stands and the light it gives, as a light preset for the theme. A
|
|
1805
|
+
* theme for the evening sets a low sun in the west in warm light; one for the night, a moon with
|
|
1806
|
+
* faint shadows. Unset values take the defaults in `tileflowDefaultSunPreset`.
|
|
1807
|
+
*/
|
|
1808
|
+
type TileflowThemeSun = {
|
|
1809
|
+
/** Degrees clockwise from north. */
|
|
1810
|
+
azimuth?: TileflowThemeNumberValue;
|
|
1811
|
+
/** Degrees above the horizon, from -90 to 90; a sun below the horizon lights nothing. */
|
|
1812
|
+
altitude?: TileflowThemeNumberValue;
|
|
1813
|
+
/** The direct light's colour. */
|
|
1814
|
+
color?: TileflowThemeColorValue;
|
|
1815
|
+
/** The direct light's strength, from 0 to 1. */
|
|
1816
|
+
intensity?: TileflowThemeNumberValue;
|
|
1817
|
+
/** How dark the shadows the sun casts fall, from 0 (none) to 1. */
|
|
1818
|
+
shadowIntensity?: TileflowThemeNumberValue;
|
|
1819
|
+
};
|
|
1820
|
+
/** The light from the sky, which reaches every surface and fills the shadows. */
|
|
1821
|
+
type TileflowThemeAmbient = {
|
|
1822
|
+
color?: TileflowThemeColorValue;
|
|
1823
|
+
/** From 0 to 1. */
|
|
1824
|
+
intensity?: TileflowThemeNumberValue;
|
|
1825
|
+
};
|
|
1826
|
+
/**
|
|
1827
|
+
* How the theme lights the map. `anchor`, `color`, `intensity`, and `position` are MapLibre's light,
|
|
1828
|
+
* which shades 3D extrusions. `sun` and `ambient` describe the theme's sun and sky light for 3D
|
|
1829
|
+
* scenes (`themeController.getSun()`); with a `sun`, the map's light is anchored to the map and
|
|
1830
|
+
* points from the sun, and `anchor` and the direction in `position` no longer apply.
|
|
1831
|
+
*/
|
|
1832
|
+
type TileflowThemeLighting = {
|
|
1833
|
+
anchor?: 'map' | 'viewport';
|
|
1834
|
+
ambient?: TileflowThemeAmbient;
|
|
1835
|
+
color?: TileflowThemeColorValue;
|
|
1836
|
+
intensity?: TileflowThemeNumberValue;
|
|
1837
|
+
position?: readonly [
|
|
1838
|
+
TileflowThemeNumberValue,
|
|
1839
|
+
TileflowThemeNumberValue,
|
|
1840
|
+
TileflowThemeNumberValue
|
|
1841
|
+
];
|
|
1842
|
+
sun?: TileflowThemeSun;
|
|
1843
|
+
};
|
|
1844
|
+
/** A complete, inheritance-free appearance document. */
|
|
1845
|
+
type TileflowTheme = {
|
|
1846
|
+
colorScheme: TileflowThemeColorScheme;
|
|
1847
|
+
id: string;
|
|
1848
|
+
lighting: TileflowThemeLighting;
|
|
1849
|
+
tokens: TileflowThemeTokens;
|
|
1850
|
+
typography: TileflowThemeTypography;
|
|
1851
|
+
version: number;
|
|
1852
|
+
};
|
|
1853
|
+
type TileflowThemeTokenOverrides = {
|
|
1854
|
+
[TCategory in keyof TileflowThemeTokens]?: Readonly<Partial<TileflowThemeTokens[TCategory]>>;
|
|
1855
|
+
};
|
|
1856
|
+
type TileflowThemeLightingOverrides = {
|
|
1857
|
+
[TKey in keyof TileflowThemeLighting]?: TileflowThemeLighting[TKey] | TileflowReset;
|
|
1858
|
+
};
|
|
1859
|
+
/** Input accepted by defineTheme. The returned theme is always fully materialized. */
|
|
1860
|
+
type TileflowThemeDefinition = Pick<TileflowTheme, 'colorScheme' | 'id' | 'version'> & {
|
|
1861
|
+
/** Refine inherited light, or use reset() to remove all or one direct lighting property. */
|
|
1862
|
+
lighting?: TileflowThemeLightingOverrides | TileflowReset;
|
|
1863
|
+
tokens?: TileflowThemeTokenOverrides;
|
|
1864
|
+
typography?: TileflowThemeTypography;
|
|
1865
|
+
};
|
|
1866
|
+
type ResolvedTileflowThemeTokens = {
|
|
1867
|
+
color: Readonly<Record<string, string>>;
|
|
1868
|
+
font: Readonly<Record<string, string>>;
|
|
1869
|
+
image: Readonly<Record<string, string>>;
|
|
1870
|
+
number: Readonly<Record<string, number>>;
|
|
1871
|
+
};
|
|
1872
|
+
type ResolvedTileflowTheme = Omit<TileflowTheme, 'lighting' | 'tokens' | 'typography'> & {
|
|
1873
|
+
/** MapLibre's light; with a sun, anchored to the map and pointing from it. */
|
|
1874
|
+
lighting: TileflowLight;
|
|
1875
|
+
/** The theme's sun and sky light, when the theme describes either. */
|
|
1876
|
+
sun?: TileflowSunPreset;
|
|
1877
|
+
tokens: ResolvedTileflowThemeTokens;
|
|
1878
|
+
typography: ResolvedTileflowTypography;
|
|
1879
|
+
};
|
|
1880
|
+
type TileflowResolvedThemeSelection = {
|
|
1881
|
+
name: TileflowThemeName;
|
|
1882
|
+
theme: TileflowTheme;
|
|
1883
|
+
};
|
|
1884
|
+
type TileflowThemeAuditScope = 'module' | 'terrain' | 'value';
|
|
1885
|
+
type TileflowThemeAuditContext = {
|
|
1886
|
+
owner?: string;
|
|
1887
|
+
scope: TileflowThemeAuditScope;
|
|
1888
|
+
target?: string;
|
|
1889
|
+
};
|
|
1890
|
+
type TileflowThemeAuditDiagnostic = {
|
|
1891
|
+
category: TileflowVisualValueCategory;
|
|
1892
|
+
code: 'THEME_IMPLICIT_FIXED';
|
|
1893
|
+
message: string;
|
|
1894
|
+
owner?: string;
|
|
1895
|
+
path: string;
|
|
1896
|
+
phase: 'theme-audit';
|
|
1897
|
+
scope: TileflowThemeAuditScope;
|
|
1898
|
+
severity: 'error' | 'warning';
|
|
1899
|
+
suggestion: string;
|
|
1900
|
+
target?: string;
|
|
1901
|
+
value: number | string;
|
|
1902
|
+
};
|
|
1903
|
+
/** A deterministic, machine-readable failure for blocking theme-audit diagnostics. */
|
|
1904
|
+
declare class TileflowThemeAuditError extends Error {
|
|
1905
|
+
readonly diagnostics: readonly TileflowThemeAuditDiagnostic[];
|
|
1906
|
+
constructor(diagnostics: readonly TileflowThemeAuditDiagnostic[]);
|
|
1907
|
+
}
|
|
1908
|
+
declare function defineTheme(definition: TileflowThemeDefinition): TileflowTheme;
|
|
1909
|
+
declare function defineTheme(base: TileflowTheme, definition: TileflowThemeDefinition): TileflowTheme;
|
|
1910
|
+
declare function resolveTileflowTheme(theme: TileflowTheme): ResolvedTileflowTheme;
|
|
1911
|
+
/** Resolve every theme node in modules, terrain, zoom values and expression arrays. */
|
|
1912
|
+
declare function resolveThemeValues<T>(value: T, theme: TileflowTheme, path?: string): T;
|
|
1913
|
+
/** Select an explicit theme or the map's deterministic default. Browser "system" is external. */
|
|
1914
|
+
declare function resolveThemeSelection(map: {
|
|
1915
|
+
defaultTheme: string;
|
|
1916
|
+
themes: Readonly<Record<string, TileflowTheme>>;
|
|
1917
|
+
timeOfDay?: TileflowTimeOfDayVariants;
|
|
1918
|
+
}, requested?: string, timeOfDay?: TileflowTimeOfDay): TileflowResolvedThemeSelection;
|
|
1919
|
+
/** Find visual literals whose permanence is otherwise invisible to an agent. */
|
|
1920
|
+
declare function auditTileflowThemeValues(value: unknown, path?: string, context?: TileflowThemeAuditContext): TileflowThemeAuditDiagnostic[];
|
|
1921
|
+
/** Audit every appearance-bearing branch of a resolved map. */
|
|
1922
|
+
declare function auditTileflowMapThemeValues(map: {
|
|
1923
|
+
modules?: unknown;
|
|
1924
|
+
terrain?: unknown;
|
|
1925
|
+
}): TileflowThemeAuditDiagnostic[];
|
|
1926
|
+
/** Fail closed when a map contains implicit chromatic, font, or image literals. */
|
|
1927
|
+
declare function assertTileflowMapThemeValues(map: {
|
|
1928
|
+
modules?: unknown;
|
|
1929
|
+
terrain?: unknown;
|
|
1930
|
+
}): void;
|
|
1931
|
+
|
|
1932
|
+
type TileflowLayerDomain = TileflowSemanticModuleName | 'terrain';
|
|
1933
|
+
|
|
1934
|
+
declare const tileflowLayerSlots: readonly ["background", "land", "terrain", "hydro", "building-areas", "transport-areas", "transport-tunnel-shadow", "transport-tunnel-casing", "transport-tunnel-fill", "transport-pedestrian-areas", "aeroways", "transport-surface-shadow", "transport-surface-casing", "transport-surface-fill", "transport-bridge-shadow", "transport-bridge-casing", "transport-bridge-fill", "transport-symbols", "boundaries", "buildings", "vegetation", "symbols"];
|
|
1935
|
+
type TileflowLayerSlot = (typeof tileflowLayerSlots)[number];
|
|
1936
|
+
/**
|
|
1937
|
+
* Public paint bands: stable names for consecutive compiler slots. Render passes, target
|
|
1938
|
+
* placements and overlays address band edges instead of physical slots.
|
|
1939
|
+
*/
|
|
1940
|
+
declare const tileflowLayerBands: readonly ["land", "relief", "water", "roads", "boundaries", "buildings", "vegetation", "labels"];
|
|
1941
|
+
type TileflowLayerBand = (typeof tileflowLayerBands)[number];
|
|
1942
|
+
/** A band edge: `below-roads` is the start of the roads band, `above-roads` its end. */
|
|
1943
|
+
type TileflowBandPlacement = `${'above' | 'below'}-${TileflowLayerBand}`;
|
|
1944
|
+
declare const tileflowBandPlacements: readonly TileflowBandPlacement[];
|
|
1945
|
+
|
|
1946
|
+
type TileflowSemanticModules = {
|
|
1947
|
+
addresses?: TileflowAddressesModuleConfig;
|
|
1948
|
+
aeroways?: TileflowAerowaysModuleConfig;
|
|
1949
|
+
boundaries?: TileflowBoundariesModuleConfig;
|
|
1950
|
+
buildings?: TileflowBuildingsModuleConfig;
|
|
1951
|
+
labels?: TileflowLabelsModuleConfig;
|
|
1952
|
+
land?: TileflowLandModuleConfig;
|
|
1953
|
+
landforms?: TileflowLandformsModuleConfig;
|
|
1954
|
+
nautical?: TileflowNauticalModuleConfig;
|
|
1955
|
+
poi?: TileflowPoiModuleConfig;
|
|
1956
|
+
roads?: TileflowRoadsModuleConfig;
|
|
1957
|
+
transit?: TileflowTransitModuleConfig;
|
|
1958
|
+
vegetation?: TileflowVegetationModuleConfig;
|
|
1959
|
+
water?: TileflowWaterModuleConfig;
|
|
1960
|
+
};
|
|
1961
|
+
type TileflowSemanticModuleName = keyof TileflowSemanticModules;
|
|
1962
|
+
type TileflowResolvedSemanticModuleOverrides = {
|
|
1963
|
+
readonly [TName in TileflowSemanticModuleName]?: TileflowResolvedModuleConfig<NonNullable<TileflowSemanticModules[TName]>>;
|
|
1964
|
+
};
|
|
1965
|
+
|
|
1966
|
+
/** A directory resolved relative to the selected executable tileflow.config.ts. */
|
|
1967
|
+
type TileflowLocalDirectory = `./${string}` | `../${string}`;
|
|
1968
|
+
declare const tileflowLocalDirectoryMaximumLength = 512;
|
|
1969
|
+
declare const tileflowLocalDirectoryMessage = "Expected a canonical relative directory beginning with ./ or ../; only leading .. segments are allowed and segments must be non-empty, without backslashes or controls";
|
|
1970
|
+
/** Exact portable syntax shared by config validation and Node filesystem resolution. */
|
|
1971
|
+
declare function isTileflowLocalDirectory(value: unknown): value is TileflowLocalDirectory;
|
|
1972
|
+
/**
|
|
1973
|
+
* A package-owned asset directory. Applications normally import one of these
|
|
1974
|
+
* descriptors from the package that owns the assets instead of constructing it.
|
|
1975
|
+
*/
|
|
1976
|
+
type TileflowPackageDirectory = Readonly<{
|
|
1977
|
+
kind: 'package-directory';
|
|
1978
|
+
package: string;
|
|
1979
|
+
path: string;
|
|
1980
|
+
}>;
|
|
1981
|
+
/** One icon directory in the ordered map icon search path. */
|
|
1982
|
+
type TileflowIconDirectory = TileflowLocalDirectory | TileflowPackageDirectory;
|
|
1983
|
+
/** One font directory in the ordered map font search path. */
|
|
1984
|
+
type TileflowFontDirectory = TileflowLocalDirectory | TileflowPackageDirectory;
|
|
1985
|
+
/** One directory of 3D models in the ordered map model search path. */
|
|
1986
|
+
type TileflowModelDirectory = TileflowLocalDirectory | TileflowPackageDirectory;
|
|
1987
|
+
/**
|
|
1988
|
+
* An explicit MapLibre glyph provider. `fontStacks` lists the exact comma-joined request keys
|
|
1989
|
+
* produced by each compiled `text-font` array. The map owns the URL; World never supplies fonts.
|
|
1990
|
+
*/
|
|
1991
|
+
type TileflowGlyphs = Readonly<{
|
|
1992
|
+
fontStacks: readonly string[];
|
|
1993
|
+
kind: 'url';
|
|
1994
|
+
url: string;
|
|
1995
|
+
}>;
|
|
1996
|
+
|
|
1997
|
+
declare const tileflowIconSourceLimit = 32;
|
|
1998
|
+
type TileflowIconSetReference = `@${string}/${string}`;
|
|
1999
|
+
declare const tileflowIconSetReferenceSchema: z.ZodString;
|
|
2000
|
+
declare const tileflowIconSetSourceSchema: z.ZodObject<{
|
|
2001
|
+
kind: z.ZodLiteral<"icon-set">;
|
|
2002
|
+
reference: z.ZodString;
|
|
2003
|
+
}, z.core.$strict>;
|
|
2004
|
+
type TileflowIconSetSource = Readonly<{
|
|
2005
|
+
kind: 'icon-set';
|
|
2006
|
+
reference: TileflowIconSetReference;
|
|
2007
|
+
}>;
|
|
2008
|
+
type TileflowIconSource = TileflowIconDirectory | TileflowIconSetSource;
|
|
2009
|
+
/** Declare a dependency. This function never resolves a version or performs I/O. */
|
|
2010
|
+
declare function iconSet(reference: TileflowIconSetReference): TileflowIconSetSource;
|
|
2011
|
+
declare function isTileflowIconSetSource(value: unknown): value is TileflowIconSetSource;
|
|
2012
|
+
declare const tileflowIconSetIdSchema: z.ZodString;
|
|
2013
|
+
declare const tileflowIconSetVersionIdSchema: z.ZodString;
|
|
2014
|
+
declare const tileflowIconSetPackageIdSchema: z.ZodString;
|
|
2015
|
+
declare const tileflowIconSetTeamIdSchema: z.ZodString;
|
|
2016
|
+
type TileflowIconSetErrorCode = 'ICON_SET_INVALID' | 'ICON_LOCK_INVALID' | 'ICON_LOCK_MISSING' | 'ICON_LOCK_CONFLICT' | 'ICON_CACHE_MISS' | 'ICON_CACHE_UNSAFE' | 'ICON_DOWNLOAD_FAILED' | 'ICON_PACKAGE_INTEGRITY' | 'ICON_COMPOSITION_INVALID';
|
|
2017
|
+
declare class TileflowIconSetError extends Error {
|
|
2018
|
+
readonly code: TileflowIconSetErrorCode;
|
|
2019
|
+
readonly phase: "icon-resolution";
|
|
2020
|
+
constructor(code: TileflowIconSetErrorCode, message: string, options?: ErrorOptions);
|
|
2021
|
+
}
|
|
2022
|
+
/** Validate the dependency sequence without consulting a lock or registry. */
|
|
2023
|
+
declare function collectTileflowIconSetReferences(sources: readonly TileflowIconSource[]): TileflowIconSetReference[];
|
|
2024
|
+
|
|
2025
|
+
/**
|
|
2026
|
+
* The sky above the horizon when the camera tilts up towards it, in either projection. Colours and
|
|
2027
|
+
* numbers take theme tokens, so each theme paints its own sky: blue by day, warm at dusk, dark with
|
|
2028
|
+
* stars at night. Colours must resolve to opaque colours.
|
|
2029
|
+
*/
|
|
2030
|
+
type TileflowSkyOptions = {
|
|
2031
|
+
/** The sky overhead. Default: `#5c9ce6`. */
|
|
2032
|
+
color?: TileflowThemeColorValue;
|
|
2033
|
+
/** The pale band along the horizon, which also colours 3D terrain's distance fog. Default: `#dcebf7`. */
|
|
2034
|
+
horizonColor?: TileflowThemeColorValue;
|
|
2035
|
+
/** How far up the horizon band reaches, as a share of half the view's height, from 0 to 1. Default: 0.6. */
|
|
2036
|
+
horizonBlend?: TileflowThemeNumberValue;
|
|
2037
|
+
/** The light round a low sun, which glows on the horizon towards it. Default: `#ffc68a`. */
|
|
2038
|
+
glowColor?: TileflowThemeColorValue;
|
|
2039
|
+
/** The brightest the stars shine, from 0 (none) to 1, reached where the sky is dark. Default: 0.6. */
|
|
2040
|
+
starIntensity?: TileflowThemeNumberValue;
|
|
2041
|
+
};
|
|
2042
|
+
type TileflowSky = boolean | TileflowSkyOptions;
|
|
2043
|
+
declare const tileflowSkyMetadataKey = "tileflow:sky";
|
|
2044
|
+
/** One theme's sky colours, as a time of day lends them to a sky that follows the sun. */
|
|
2045
|
+
type TileflowSkyColours = Readonly<{
|
|
2046
|
+
color: string;
|
|
2047
|
+
horizonColor: string;
|
|
2048
|
+
horizonBlend: number;
|
|
2049
|
+
glowColor: string;
|
|
2050
|
+
}>;
|
|
2051
|
+
/** The skies of a theme's time-of-day family, from which a sky that follows the sun is mixed. */
|
|
2052
|
+
type TileflowSkyTimesOfDay = Readonly<Record<'day' | 'dawn' | 'dusk' | 'night', TileflowSkyColours>>;
|
|
2053
|
+
/**
|
|
2054
|
+
* The versioned runtime payload: what the browser needs to draw the stars and the glow round the
|
|
2055
|
+
* sun, and, for a theme in a time-of-day family, the family's skies, so that a sun an application
|
|
2056
|
+
* places brings the sky of its hour.
|
|
2057
|
+
*/
|
|
2058
|
+
type TileflowSkyMetadata = Readonly<{
|
|
2059
|
+
version: 1;
|
|
2060
|
+
starIntensity: number;
|
|
2061
|
+
glowColor: string;
|
|
2062
|
+
timesOfDay?: TileflowSkyTimesOfDay;
|
|
2063
|
+
}>;
|
|
2064
|
+
/** Validate the runtime payload without loading authoring schemas. */
|
|
2065
|
+
declare function readTileflowSky(value: unknown): TileflowSkyMetadata | undefined;
|
|
2066
|
+
/**
|
|
2067
|
+
* The sky of a sun at this height and direction, mixed from a time-of-day family's skies: the day
|
|
2068
|
+
* sky above the golden hour, the dawn or dusk sky within two degrees of sunrise or sunset (dawn while the sun is in
|
|
2069
|
+
* the eastern half of the sky), and the night sky once twilight ends. Every colour comes from the
|
|
2070
|
+
* family's themes, so a monochrome or a client's own family keeps its palette.
|
|
2071
|
+
*/
|
|
2072
|
+
declare function tileflowSkyAtSun(times: TileflowSkyTimesOfDay, sun: Readonly<{
|
|
2073
|
+
altitude: number;
|
|
2074
|
+
azimuth: number;
|
|
2075
|
+
}>): TileflowSkyColours;
|
|
2076
|
+
|
|
2077
|
+
/** Portable, filesystem-safe identity shared by maps and their leaf-owned scenes. */
|
|
2078
|
+
declare const tileflowMapIdSchema: zod.ZodString;
|
|
2079
|
+
/** Identity is always owned by the map being resolved and never inherited. */
|
|
2080
|
+
type TileflowMapIdentity = {
|
|
2081
|
+
id: string;
|
|
2082
|
+
name?: string;
|
|
2083
|
+
/** Editorial version of this map. */
|
|
2084
|
+
version: number;
|
|
2085
|
+
};
|
|
2086
|
+
/** A capture scene owned by one singular map; its map id is implicit. */
|
|
2087
|
+
type TileflowMapScene = Omit<TileflowCaptureScene, 'map'>;
|
|
2088
|
+
/** A timed capture shot owned by one singular map; its map id is implicit. */
|
|
2089
|
+
type TileflowMapShot = Omit<TileflowCaptureShot, 'map'>;
|
|
2090
|
+
/** Tooling metadata belongs to the leaf definition and is never inherited. */
|
|
2091
|
+
type TileflowMapTooling = {
|
|
2092
|
+
scenes?: Record<string, TileflowMapScene>;
|
|
2093
|
+
shots?: Record<string, TileflowMapShot>;
|
|
2094
|
+
};
|
|
2095
|
+
type TileflowMapTextAssets = {
|
|
2096
|
+
fonts?: never;
|
|
2097
|
+
glyphs?: never;
|
|
2098
|
+
} | {
|
|
2099
|
+
fonts: readonly TileflowFontDirectory[];
|
|
2100
|
+
glyphs?: never;
|
|
2101
|
+
} | {
|
|
2102
|
+
fonts?: never;
|
|
2103
|
+
glyphs: TileflowGlyphs;
|
|
2104
|
+
};
|
|
2105
|
+
/** Cartographic fields supported by the V1 semantic compiler. */
|
|
2106
|
+
type TileflowMapDesign = TileflowMapTextAssets & {
|
|
2107
|
+
/** Optional atmosphere for globe projection. False disables an inherited atmosphere. */
|
|
2108
|
+
atmosphere?: TileflowAtmosphere;
|
|
2109
|
+
/**
|
|
2110
|
+
* Tileflow's Boundaries tileset: administrative and neighbourhood areas for choropleths and
|
|
2111
|
+
* selections. World's border lines remain the `boundaries` module. False removes inherited areas.
|
|
2112
|
+
*/
|
|
2113
|
+
boundaryAreas?: TileflowBoundaryAreas;
|
|
2114
|
+
data?: TileflowDataConfig;
|
|
2115
|
+
/** Name used whenever a concrete theme is not explicitly requested. */
|
|
2116
|
+
defaultTheme?: TileflowThemeName;
|
|
2117
|
+
/** Ordered icon contributors. Omission inherits; declaration replaces; [] means no icons. */
|
|
2118
|
+
icons?: readonly TileflowIconSource[];
|
|
2119
|
+
/** Independent Bathymetry and Nautical products composed by the compiler. */
|
|
2120
|
+
marine?: TileflowMarine;
|
|
2121
|
+
/**
|
|
2122
|
+
* Directories of the map's own 3D models, glTF binaries (`.glb`) named by id, such as the trees a
|
|
2123
|
+
* vegetation form draws. Omission inherits; declaration replaces; [] means no models.
|
|
2124
|
+
*/
|
|
2125
|
+
models?: readonly TileflowModelDirectory[];
|
|
2126
|
+
/** Semantic domains, expressed directly or with explicit refine/disable operations. */
|
|
2127
|
+
modules?: TileflowAuthoringModules;
|
|
2128
|
+
/** Keyed MapLibre overlay units. Omission inherits; entries replace atomically. */
|
|
2129
|
+
overlays?: TileflowOverlayCollection;
|
|
2130
|
+
projection?: TileflowProjection;
|
|
2131
|
+
/**
|
|
2132
|
+
* The sky above the horizon when the camera tilts up, in either projection, with stars where it
|
|
2133
|
+
* is dark. Colours take theme tokens. False disables an inherited sky.
|
|
2134
|
+
*/
|
|
2135
|
+
sky?: TileflowSky;
|
|
2136
|
+
/** Keyed logical hosted sources. Omission inherits; entries replace atomically. */
|
|
2137
|
+
sources?: TileflowHostedSourceCollection;
|
|
2138
|
+
/** Browser color-scheme mapping. Runtime resolves "system" to one of these concrete names. */
|
|
2139
|
+
systemThemes?: {
|
|
2140
|
+
dark: TileflowThemeName;
|
|
2141
|
+
light: TileflowThemeName;
|
|
2142
|
+
};
|
|
2143
|
+
terrain?: TileflowTerrain;
|
|
2144
|
+
/** Complete named appearances. Omission inherits; declaration replaces the collection. */
|
|
2145
|
+
themes?: Readonly<Record<TileflowThemeName, TileflowTheme>>;
|
|
2146
|
+
/** Optional artistic moments per theme family. Omission inherits; {} disables inheritance. */
|
|
2147
|
+
timeOfDay?: TileflowTimeOfDayVariants;
|
|
2148
|
+
view?: TileflowViewConfig;
|
|
2149
|
+
};
|
|
2150
|
+
/** Complete semantic map at the base of a lineage. The compiler is implicit. */
|
|
2151
|
+
type TileflowStandaloneMap = TileflowMapIdentity & TileflowMapTooling & TileflowMapDesign & {
|
|
2152
|
+
defaultTheme: TileflowThemeName;
|
|
2153
|
+
extends?: never;
|
|
2154
|
+
themes: Readonly<Record<TileflowThemeName, TileflowTheme>>;
|
|
2155
|
+
};
|
|
2156
|
+
type TileflowDerivedMap = TileflowMapIdentity & TileflowMapTooling & TileflowMapDesign & {
|
|
2157
|
+
extends: TileflowMap;
|
|
2158
|
+
};
|
|
2159
|
+
/** Executable authoring definition using the one implicit semantic compiler. */
|
|
2160
|
+
type TileflowMap = TileflowDerivedMap | TileflowStandaloneMap;
|
|
2161
|
+
type ResolvedTileflowMapDesign<TDesign extends TileflowMapDesign = TileflowMapDesign> = TDesign extends TileflowMapDesign ? Omit<TDesign, 'defaultTheme' | 'modules' | 'overlays' | 'sources' | 'themes'> : never;
|
|
2162
|
+
/** A standalone map definition with inheritance removed. */
|
|
2163
|
+
type ResolvedTileflowMap = Omit<TileflowMapIdentity, 'name'> & ResolvedTileflowMapDesign & {
|
|
2164
|
+
defaultTheme: TileflowThemeName;
|
|
2165
|
+
extends?: never;
|
|
2166
|
+
modules?: TileflowResolvedSemanticModuleOverrides;
|
|
2167
|
+
name: string;
|
|
2168
|
+
overlays?: Readonly<Record<string, TileflowMapLibreOverlay>>;
|
|
2169
|
+
sources?: Readonly<Record<string, TileflowHostedTilesetSource>>;
|
|
2170
|
+
themes: Readonly<Record<TileflowThemeName, TileflowTheme>>;
|
|
2171
|
+
};
|
|
2172
|
+
type ResolveMapOptions = {
|
|
2173
|
+
/** Maximum number of map definitions in a lineage, including its standalone base. */
|
|
2174
|
+
maxDepth?: number;
|
|
2175
|
+
};
|
|
2176
|
+
|
|
2177
|
+
type TileflowDataFieldType = 'Boolean' | 'Number' | 'String';
|
|
2178
|
+
type TileflowDataFieldRequirement = Readonly<{
|
|
2179
|
+
name: string;
|
|
2180
|
+
type?: TileflowDataFieldType;
|
|
2181
|
+
}>;
|
|
2182
|
+
type TileflowDataLayerRequirement = Readonly<{
|
|
2183
|
+
fields: readonly TileflowDataFieldRequirement[];
|
|
2184
|
+
id: string;
|
|
2185
|
+
}>;
|
|
2186
|
+
type TileflowDataRequirementsV1 = Readonly<{
|
|
2187
|
+
complete: boolean;
|
|
2188
|
+
dynamicAccesses: readonly string[];
|
|
2189
|
+
schemaVersion: 1;
|
|
2190
|
+
sourceId: string;
|
|
2191
|
+
sourceLayers: readonly TileflowDataLayerRequirement[];
|
|
2192
|
+
}>;
|
|
2193
|
+
/** Per-source requirements for styles that compose independent vector and DEM products. */
|
|
2194
|
+
type TileflowSourceRequirementsV1 = Readonly<{
|
|
2195
|
+
rasterDemSources?: Readonly<Record<string, TileflowRasterDemSourceRequirementV1>>;
|
|
2196
|
+
schemaVersion: 1;
|
|
2197
|
+
sources: Readonly<Record<string, TileflowDataRequirementsV1>>;
|
|
2198
|
+
}>;
|
|
2199
|
+
type TileflowRasterDemSourceRequirementV1 = Readonly<{
|
|
2200
|
+
encoding: 'mapbox' | 'terrarium';
|
|
2201
|
+
sourceId: string;
|
|
2202
|
+
tileSize: 256 | 512;
|
|
2203
|
+
type: 'raster-dem';
|
|
2204
|
+
}>;
|
|
2205
|
+
type TileflowObservedDataContractV1 = Readonly<{
|
|
2206
|
+
sourceLayers: readonly Readonly<{
|
|
2207
|
+
fields: readonly Readonly<{
|
|
2208
|
+
name: string;
|
|
2209
|
+
type: TileflowDataFieldType;
|
|
2210
|
+
}>[];
|
|
2211
|
+
id: string;
|
|
2212
|
+
}>[];
|
|
2213
|
+
}>;
|
|
2214
|
+
type TileflowDataCompatibilityIssue = Readonly<{
|
|
2215
|
+
code: 'dynamic-field-access' | 'field-missing' | 'field-type-mismatch' | 'source-layer-missing';
|
|
2216
|
+
field?: string;
|
|
2217
|
+
message: string;
|
|
2218
|
+
sourceLayer?: string;
|
|
2219
|
+
}>;
|
|
2220
|
+
/**
|
|
2221
|
+
* Infer the effective data surface from finalized MapLibre layers. Disabled modules contribute no
|
|
2222
|
+
* requirements, and fields hidden by map inheritance never reach this compiler output.
|
|
2223
|
+
*/
|
|
2224
|
+
declare function inferTileflowDataRequirements(style: MapLibreStyle, options?: {
|
|
2225
|
+
additional?: readonly TileflowDataLayerRequirement[];
|
|
2226
|
+
sourceId?: string;
|
|
2227
|
+
}): TileflowDataRequirementsV1;
|
|
2228
|
+
/**
|
|
2229
|
+
* Infer the V1 layer/field contract for every referenced vector source and the physical contract
|
|
2230
|
+
* for each included raster DEM. The singular helper remains unchanged for World-only consumers.
|
|
2231
|
+
*/
|
|
2232
|
+
declare function inferTileflowSourceRequirements(style: MapLibreStyle): TileflowSourceRequirementsV1;
|
|
2233
|
+
/** Compare inferred use with producer-observed layers and fields; no editorial allowlist exists. */
|
|
2234
|
+
declare function validateTileflowDataCompatibility(requirements: TileflowDataRequirementsV1, contract: TileflowObservedDataContractV1): readonly TileflowDataCompatibilityIssue[];
|
|
2235
|
+
|
|
2236
|
+
/** Version of the opt-in, read-only physical-output inspection sidecar. */
|
|
2237
|
+
declare const tileflowStyleInspectionSchemaVersion: 1;
|
|
2238
|
+
type TileflowStyleInspectionRenderOperation = {
|
|
2239
|
+
readonly kind: 'pass' | 'refinement';
|
|
2240
|
+
readonly owner: TileflowLayerDomain;
|
|
2241
|
+
readonly target: string;
|
|
2242
|
+
};
|
|
2243
|
+
/** One semantic contribution represented by a compiled physical style layer. */
|
|
2244
|
+
type TileflowStyleInspectionContribution = {
|
|
2245
|
+
readonly owner: TileflowLayerDomain;
|
|
2246
|
+
readonly slot: TileflowLayerSlot;
|
|
2247
|
+
readonly target: string;
|
|
2248
|
+
/** Ordered semantic render operations represented by this contribution. */
|
|
2249
|
+
readonly operations: readonly TileflowStyleInspectionRenderOperation[];
|
|
2250
|
+
};
|
|
2251
|
+
type TileflowStyleInspectionLayer = {
|
|
2252
|
+
/** Opaque physical output identity for diagnostics; never a public authoring target. */
|
|
2253
|
+
readonly id: string;
|
|
2254
|
+
readonly index: number;
|
|
2255
|
+
readonly type: string;
|
|
2256
|
+
/** Multiple entries are expected when the physical planner combines semantic layers. */
|
|
2257
|
+
readonly contributions: readonly TileflowStyleInspectionContribution[];
|
|
2258
|
+
};
|
|
2259
|
+
/**
|
|
2260
|
+
* Opt-in, read-only cartographic provenance for diagnostics and build tooling.
|
|
2261
|
+
* Physical IDs are output observations, not stable or addressable authoring APIs.
|
|
2262
|
+
* This object is never embedded in Style JSON.
|
|
2263
|
+
*/
|
|
2264
|
+
type TileflowStyleInspection = {
|
|
2265
|
+
readonly schemaVersion: typeof tileflowStyleInspectionSchemaVersion;
|
|
2266
|
+
readonly map: string;
|
|
2267
|
+
readonly theme: string;
|
|
2268
|
+
readonly layers: readonly TileflowStyleInspectionLayer[];
|
|
2269
|
+
};
|
|
2270
|
+
type TileflowInspectedStyle = {
|
|
2271
|
+
readonly style: MapLibreStyle;
|
|
2272
|
+
readonly inspection: TileflowStyleInspection;
|
|
2273
|
+
};
|
|
2274
|
+
|
|
2275
|
+
declare const tileflowCompilationReportSchemaVersion: 1;
|
|
2276
|
+
declare const tileflowCompilationPhases: readonly ["assembly", "assets", "config-validation", "data", "domain-ir", "domains", "finalization", "input", "lowering", "physical-planner", "render-stack", "theme", "theme-audit", "validation"];
|
|
2277
|
+
declare const tileflowCompilationPlannerStages: readonly ["domain-ir", "assembly", "render-stack", "physical-planner", "lowering"];
|
|
2278
|
+
type TileflowCompilationPhase = (typeof tileflowCompilationPhases)[number];
|
|
2279
|
+
type TileflowCompilationPlannerStage = (typeof tileflowCompilationPlannerStages)[number];
|
|
2280
|
+
type TileflowCompilationDiagnostic = Readonly<{
|
|
2281
|
+
code: string;
|
|
2282
|
+
domain?: TileflowSemanticModuleName;
|
|
2283
|
+
message: string;
|
|
2284
|
+
path?: string;
|
|
2285
|
+
phase: TileflowCompilationPhase;
|
|
2286
|
+
severity: 'error' | 'warning';
|
|
2287
|
+
suggestion?: string;
|
|
2288
|
+
target?: string;
|
|
2289
|
+
}>;
|
|
2290
|
+
type TileflowCompilationDomainReport = Readonly<{
|
|
2291
|
+
contributionCount: number;
|
|
2292
|
+
name: TileflowSemanticModuleName;
|
|
2293
|
+
renderOperationCount: number;
|
|
2294
|
+
status: 'emitted' | 'suppressed';
|
|
2295
|
+
suppressionReason?: 'disabled' | 'no-contributions';
|
|
2296
|
+
targets: readonly string[];
|
|
2297
|
+
}>;
|
|
2298
|
+
type TileflowCompilationPlannerDecision = Readonly<{
|
|
2299
|
+
candidateCount?: number;
|
|
2300
|
+
inputCount: number;
|
|
2301
|
+
outputCount: number;
|
|
2302
|
+
selectedCount?: number;
|
|
2303
|
+
stage: TileflowCompilationPlannerStage;
|
|
2304
|
+
}>;
|
|
2305
|
+
/** A resolved semantic choice, with an authoring path rather than a physical layer ID. */
|
|
2306
|
+
type TileflowCompilationDesignDecision = Readonly<{
|
|
2307
|
+
/** Dot path in the resolved map; a theme token's complete role is its final key. */
|
|
2308
|
+
path: string;
|
|
2309
|
+
source: 'default' | 'map' | 'theme' | 'derived';
|
|
2310
|
+
value: unknown;
|
|
2311
|
+
reason: string;
|
|
2312
|
+
override: string;
|
|
2313
|
+
}>;
|
|
2314
|
+
type TileflowCompilationReport = Readonly<{
|
|
2315
|
+
/** Color roles and selected module policies, not a trace of every paint/layout property. */
|
|
2316
|
+
decisions?: readonly TileflowCompilationDesignDecision[];
|
|
2317
|
+
domains: readonly TileflowCompilationDomainReport[];
|
|
2318
|
+
map: string;
|
|
2319
|
+
planner: readonly TileflowCompilationPlannerDecision[];
|
|
2320
|
+
/** Opt-in read-only physical diagnostics; its IDs are not addressable authoring targets. */
|
|
2321
|
+
provenance?: TileflowStyleInspection;
|
|
2322
|
+
requirements?: TileflowSourceRequirementsV1;
|
|
2323
|
+
schemaVersion: typeof tileflowCompilationReportSchemaVersion;
|
|
2324
|
+
targets: readonly string[];
|
|
2325
|
+
theme?: string;
|
|
2326
|
+
}>;
|
|
2327
|
+
type TileflowCompilationSuccess = Readonly<{
|
|
2328
|
+
diagnostics: readonly TileflowCompilationDiagnostic[];
|
|
2329
|
+
ok: true;
|
|
2330
|
+
report: TileflowCompilationReport;
|
|
2331
|
+
style: MapLibreStyle;
|
|
2332
|
+
}>;
|
|
2333
|
+
type TileflowCompilationFailure = Readonly<{
|
|
2334
|
+
diagnostics: readonly TileflowCompilationDiagnostic[];
|
|
2335
|
+
ok: false;
|
|
2336
|
+
report: TileflowCompilationReport;
|
|
2337
|
+
style?: never;
|
|
2338
|
+
}>;
|
|
2339
|
+
type TileflowCompilationResult = TileflowCompilationFailure | TileflowCompilationSuccess;
|
|
2340
|
+
declare function isTileflowCompilationPhase(value: unknown): value is TileflowCompilationPhase;
|
|
2341
|
+
|
|
2342
|
+
declare const tileflowIconAppearanceSchema: z.ZodObject<{
|
|
2343
|
+
representation: z.ZodLiteral<"sdf">;
|
|
2344
|
+
defaults: z.ZodObject<{
|
|
2345
|
+
color: z.ZodString;
|
|
2346
|
+
haloColor: z.ZodString;
|
|
2347
|
+
haloWidth: z.ZodNumber;
|
|
2348
|
+
haloBlur: z.ZodNumber;
|
|
2349
|
+
}, z.core.$strict>;
|
|
2350
|
+
}, z.core.$strict>;
|
|
2351
|
+
/** Absent metadata denotes unchanged fixed-color RGBA artwork. */
|
|
2352
|
+
type TileflowIconAppearance = z.infer<typeof tileflowIconAppearanceSchema>;
|
|
2353
|
+
/** Verify the generated representation from decoded pixels, independently of its declaration. */
|
|
2354
|
+
declare function assertTileflowSdfPixels(input: {
|
|
2355
|
+
rgba: Uint8Array;
|
|
2356
|
+
width: number;
|
|
2357
|
+
height: number;
|
|
2358
|
+
pixelRatio: 1 | 2;
|
|
2359
|
+
}): void;
|
|
2360
|
+
declare const tileflowIconMetadataFileName = "tileflow.icons.json";
|
|
2361
|
+
declare const tileflowIconAuthorMetadataSchema: z.ZodObject<{
|
|
2362
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
2363
|
+
icons: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
2364
|
+
representation: z.ZodLiteral<"rgba">;
|
|
2365
|
+
layout: z.ZodOptional<z.ZodObject<{
|
|
2366
|
+
stretchX: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
2367
|
+
stretchY: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
2368
|
+
content: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
2369
|
+
}, z.core.$strict>>;
|
|
2370
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
2371
|
+
representation: z.ZodLiteral<"sdf">;
|
|
2372
|
+
layout: z.ZodOptional<z.ZodObject<{
|
|
2373
|
+
stretchX: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
2374
|
+
stretchY: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
2375
|
+
content: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
2376
|
+
}, z.core.$strict>>;
|
|
2377
|
+
defaults: z.ZodObject<{
|
|
2378
|
+
color: z.ZodString;
|
|
2379
|
+
haloColor: z.ZodDefault<z.ZodString>;
|
|
2380
|
+
haloWidth: z.ZodDefault<z.ZodNumber>;
|
|
2381
|
+
haloBlur: z.ZodDefault<z.ZodNumber>;
|
|
2382
|
+
}, z.core.$strict>;
|
|
2383
|
+
}, z.core.$strict>]>>;
|
|
2384
|
+
}, z.core.$strict>;
|
|
2385
|
+
|
|
2386
|
+
type TileflowPreparedIconCapabilities = {
|
|
2387
|
+
ids: readonly string[];
|
|
2388
|
+
appearances?: Readonly<Record<string, TileflowIconAppearance>>;
|
|
2389
|
+
};
|
|
2390
|
+
/** Admit a compiled style without repairing or changing its signed paint. */
|
|
2391
|
+
declare function validateTileflowCompiledIconCapabilities(style: MapLibreStyle, icons: TileflowPreparedIconCapabilities): void;
|
|
2392
|
+
|
|
2393
|
+
type TileflowPreparedMapAssets = {
|
|
2394
|
+
icons?: TileflowPreparedIconCapabilities & {
|
|
2395
|
+
ids: readonly string[];
|
|
2396
|
+
sprite: string;
|
|
2397
|
+
};
|
|
2398
|
+
/** The map's own 3D tree models by id, prepared from its `models` directories. */
|
|
2399
|
+
models?: Readonly<Record<string, TileflowTreeModel>>;
|
|
2400
|
+
/** Where each of the map's own building models is served, by id. */
|
|
2401
|
+
buildingModels?: Readonly<Record<string, string>>;
|
|
2402
|
+
};
|
|
2403
|
+
type TileflowSemanticCompileOptions = {
|
|
2404
|
+
apiBaseUrl?: string;
|
|
2405
|
+
/** Resolved authoring identity. Internal build orchestration supplies this. */
|
|
2406
|
+
map?: {
|
|
2407
|
+
id: string;
|
|
2408
|
+
lineage?: readonly string[];
|
|
2409
|
+
version: number;
|
|
2410
|
+
};
|
|
2411
|
+
/** Build-owned assets prepared from the authoring directories. */
|
|
2412
|
+
preparedAssets?: TileflowPreparedMapAssets;
|
|
2413
|
+
/** Concrete named theme. Omission deterministically selects map.defaultTheme. */
|
|
2414
|
+
theme?: string;
|
|
2415
|
+
/** Optional artistic preset declared by the map. */
|
|
2416
|
+
timeOfDay?: TileflowTimeOfDay;
|
|
2417
|
+
};
|
|
2418
|
+
type TileflowSemanticCompilationOptions = TileflowSemanticCompileOptions & {
|
|
2419
|
+
/** Include opt-in read-only physical diagnostics; emitted IDs are not authoring targets. */
|
|
2420
|
+
inspection?: boolean;
|
|
2421
|
+
};
|
|
2422
|
+
|
|
2423
|
+
type TileflowStyleOptions = TileflowSemanticCompileOptions;
|
|
2424
|
+
type TileflowCompilationOptions = TileflowSemanticCompilationOptions;
|
|
2425
|
+
declare function createStyle(config: TileflowMap, options?: TileflowStyleOptions): MapLibreStyle;
|
|
2426
|
+
/** Resolve and compile one map without throwing, returning deterministic compiler diagnostics. */
|
|
2427
|
+
declare function createStyleResult(config: TileflowMap, options?: TileflowCompilationOptions): TileflowCompilationResult;
|
|
2428
|
+
declare function collectMapLineage(map: TileflowMap): string[];
|
|
2429
|
+
/** Resolve and validate one public authoring map before asset preparation or compilation. */
|
|
2430
|
+
declare function parseTileflowMap(map: TileflowMap): ResolvedTileflowMap;
|
|
2431
|
+
/** Validate one singular authoring map, including its complete extends lineage. */
|
|
2432
|
+
declare function validateTileflowMap(input: unknown): ValidationResult;
|
|
2433
|
+
|
|
2434
|
+
declare const tileflowIconCompositionMaximumBytes: number;
|
|
2435
|
+
declare const tileflowRenderedIconIdentitySchema: z.ZodObject<{
|
|
2436
|
+
kind: z.ZodLiteral<"rendered-icon">;
|
|
2437
|
+
id: z.ZodString;
|
|
2438
|
+
appearance: z.ZodOptional<z.ZodObject<{
|
|
2439
|
+
representation: z.ZodLiteral<"sdf">;
|
|
2440
|
+
defaults: z.ZodObject<{
|
|
2441
|
+
color: z.ZodString;
|
|
2442
|
+
haloColor: z.ZodString;
|
|
2443
|
+
haloWidth: z.ZodNumber;
|
|
2444
|
+
haloBlur: z.ZodNumber;
|
|
2445
|
+
}, z.core.$strict>;
|
|
2446
|
+
}, z.core.$strict>>;
|
|
2447
|
+
layout: z.ZodOptional<z.ZodObject<{
|
|
2448
|
+
stretchX: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
2449
|
+
stretchY: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
2450
|
+
content: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
2451
|
+
}, z.core.$strict>>;
|
|
2452
|
+
width: z.ZodNumber;
|
|
2453
|
+
height: z.ZodNumber;
|
|
2454
|
+
pixelSha256: z.ZodObject<{
|
|
2455
|
+
oneX: z.ZodString;
|
|
2456
|
+
twoX: z.ZodString;
|
|
2457
|
+
}, z.core.$strict>;
|
|
2458
|
+
}, z.core.$strict>;
|
|
2459
|
+
type TileflowRenderedIconIdentity = z.infer<typeof tileflowRenderedIconIdentitySchema>;
|
|
2460
|
+
declare const tileflowIconCompositionSchema: z.ZodObject<{
|
|
2461
|
+
format: z.ZodEnum<{
|
|
2462
|
+
'tileflow-icon-composition-v1': "tileflow-icon-composition-v1";
|
|
2463
|
+
'tileflow-icon-composition-v2': "tileflow-icon-composition-v2";
|
|
2464
|
+
}>;
|
|
2465
|
+
compositionVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
|
|
2466
|
+
packageHash: z.ZodString;
|
|
2467
|
+
contributors: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2468
|
+
kind: z.ZodLiteral<"local">;
|
|
2469
|
+
iconIds: z.ZodArray<z.ZodString>;
|
|
2470
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
2471
|
+
kind: z.ZodLiteral<"package">;
|
|
2472
|
+
package: z.ZodString;
|
|
2473
|
+
iconIds: z.ZodArray<z.ZodString>;
|
|
2474
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
2475
|
+
kind: z.ZodLiteral<"icon-set">;
|
|
2476
|
+
reference: z.ZodString;
|
|
2477
|
+
teamId: z.ZodString;
|
|
2478
|
+
setId: z.ZodString;
|
|
2479
|
+
versionId: z.ZodString;
|
|
2480
|
+
version: z.ZodNumber;
|
|
2481
|
+
packageId: z.ZodString;
|
|
2482
|
+
contentHash: z.ZodString;
|
|
2483
|
+
iconIds: z.ZodArray<z.ZodString>;
|
|
2484
|
+
}, z.core.$strict>], "kind">>;
|
|
2485
|
+
winners: z.ZodArray<z.ZodObject<{
|
|
2486
|
+
id: z.ZodString;
|
|
2487
|
+
appearance: z.ZodOptional<z.ZodObject<{
|
|
2488
|
+
representation: z.ZodLiteral<"sdf">;
|
|
2489
|
+
defaults: z.ZodObject<{
|
|
2490
|
+
color: z.ZodString;
|
|
2491
|
+
haloColor: z.ZodString;
|
|
2492
|
+
haloWidth: z.ZodNumber;
|
|
2493
|
+
haloBlur: z.ZodNumber;
|
|
2494
|
+
}, z.core.$strict>;
|
|
2495
|
+
}, z.core.$strict>>;
|
|
2496
|
+
layout: z.ZodOptional<z.ZodObject<{
|
|
2497
|
+
stretchX: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
2498
|
+
stretchY: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
2499
|
+
content: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
2500
|
+
}, z.core.$strict>>;
|
|
2501
|
+
width: z.ZodNumber;
|
|
2502
|
+
height: z.ZodNumber;
|
|
2503
|
+
pixelSha256: z.ZodObject<{
|
|
2504
|
+
oneX: z.ZodString;
|
|
2505
|
+
twoX: z.ZodString;
|
|
2506
|
+
}, z.core.$strict>;
|
|
2507
|
+
contributor: z.ZodNumber;
|
|
2508
|
+
}, z.core.$strict>>;
|
|
2509
|
+
}, z.core.$strict>;
|
|
2510
|
+
type TileflowIconCompositionV1 = z.infer<typeof tileflowIconCompositionSchema>;
|
|
2511
|
+
type TileflowIconContributorIdentity = TileflowIconCompositionV1['contributors'][number];
|
|
2512
|
+
declare function parseTileflowIconComposition(input: unknown): TileflowIconCompositionV1;
|
|
2513
|
+
/** Dependency identity is separate from the generated artifact's content hash. */
|
|
2514
|
+
declare function hashTileflowIconComposition(input: TileflowIconCompositionV1): Promise<string>;
|
|
2515
|
+
|
|
2516
|
+
export { type ResolvedBathymetry as $, type TileflowMapScene as A, type TileflowMapShot as B, type ResolveMapOptions as C, type TileflowIconAppearance as D, type TileflowLayerDomain as E, type TileflowBandPlacement as F, type OpenMapTilesLayerBindings as G, tileflowCompilationPhases as H, tileflowCompilationPlannerStages as I, tileflowCompilationReportSchemaVersion as J, type TileflowSemanticModuleName as K, tileflowHostedSourceLimit as L, tileflowOverlayPlacements as M, type ResolvedTileflowTheme as N, type OpenMapTilesFieldBindings as O, type TileflowThemeColorScheme as P, type TileflowIconSource as Q, type ResolvedTileflowMap as R, type TileflowModelLightingRole as S, type TileflowRenderedIconIdentity as T, type TileflowBuildingSurfaceDesign as U, type TileflowModel as V, type TileflowModelBytes as W, type TileflowVegetationMode as X, type OpenMapTilesSchema as Y, type OpenMapTilesSchemaOptions as Z, type ParkLayerSemantics as _, type TileflowIconCompositionV1 as a, type TileflowLandModuleConfig as a$, type ResolvedBathymetryRelief as a0, type ResolvedBoundaryAreas as a1, type ResolvedMarine as a2, type ResolvedMarineSource as a3, type ResolvedTileflowData as a4, type ResolvedTileflowThemeTokens as a5, type TileflowAddressesModuleConfig as a6, type TileflowAddressesModuleOptions as a7, type TileflowAerowaysModuleConfig as a8, type TileflowAerowaysModuleOptions as a9, type TileflowBuildingsThreeDimensionalStyle as aA, type TileflowCompilationDesignDecision as aB, type TileflowCompilationDiagnostic as aC, type TileflowCompilationDomainReport as aD, type TileflowCompilationFailure as aE, type TileflowCompilationOptions as aF, type TileflowCompilationPhase as aG, type TileflowCompilationPlannerDecision as aH, type TileflowCompilationPlannerStage as aI, type TileflowCompilationReport as aJ, type TileflowCompilationResult as aK, type TileflowCompilationSuccess as aL, type TileflowDataConfig as aM, type TileflowDataIdentity as aN, type TileflowDerivedMap as aO, type TileflowDisableOperation as aP, type TileflowFontDirectory as aQ, type TileflowGlyphs as aR, type TileflowHostedSourceCollection as aS, type TileflowHostedTilesetSource as aT, type TileflowHostedTilesetType as aU, type TileflowIconContributorIdentity as aV, type TileflowIconDirectory as aW, TileflowIconSetError as aX, type TileflowIconSetErrorCode as aY, type TileflowIconSetReference as aZ, type TileflowIconSetSource as a_, type TileflowAtmosphere as aa, type TileflowAtmosphereOptions as ab, type TileflowAuthoringModules as ac, type TileflowBarrierClass as ad, type TileflowBarrierStyle as ae, type TileflowBathymetryConfig as af, type TileflowBathymetryDemSourceIdentity as ag, type TileflowBathymetryDisplay as ah, type TileflowBathymetryNameLayer as ai, type TileflowBathymetryNamePlacement as aj, type TileflowBathymetryNameStyle as ak, type TileflowBathymetryNameZoomRange as al, type TileflowBathymetryOptions as am, type TileflowBathymetryReliefConfig as an, type TileflowBathymetryVectorLayers as ao, type TileflowBoundariesModuleConfig as ap, type TileflowBoundariesModuleOptions as aq, type TileflowBoundaryAreas as ar, type TileflowBoundaryAreasConfig as as, type TileflowBoundaryAreasSourceIdentity as at, type TileflowBuildingMode as au, type TileflowBuildingModelPart as av, type TileflowBuildingModelPlacementConfig as aw, type TileflowBuildingSurfaces as ax, type TileflowBuildingsModuleConfig as ay, type TileflowBuildingsModuleOptions as az, type TileflowDataRequirementsV1 as b, type TileflowTransitModuleConfig as b$, type TileflowLandModuleOptions as b0, type TileflowLandcoverClass as b1, type TileflowLandformClass as b2, type TileflowLandformsModuleConfig as b3, type TileflowLandformsModuleOptions as b4, type TileflowLanduseClass as b5, type TileflowLayerBand as b6, type TileflowLocalDirectory as b7, type TileflowMapDesign as b8, type TileflowMapIdentity as b9, type TileflowRasterDemSourceRequirementV1 as bA, type TileflowRefineOperation as bB, type TileflowRemoveOperation as bC, type TileflowReset as bD, type TileflowResolvedThemeSelection as bE, type TileflowSemanticModules as bF, type TileflowSky as bG, type TileflowSkyColours as bH, type TileflowSkyMetadata as bI, type TileflowSkyOptions as bJ, type TileflowSkyTimesOfDay as bK, type TileflowStandaloneMap as bL, type TileflowSun as bM, type TileflowSunPreset as bN, type TileflowTheme as bO, type TileflowThemeAmbient as bP, type TileflowThemeAuditContext as bQ, type TileflowThemeAuditDiagnostic as bR, TileflowThemeAuditError as bS, type TileflowThemeAuditScope as bT, type TileflowThemeDefinition as bU, type TileflowThemeLighting as bV, type TileflowThemeName as bW, type TileflowThemeSun as bX, type TileflowThemeTokens as bY, type TileflowThemeTypography as bZ, type TileflowThemeTypographyStyle as b_, type TileflowMapLibreOverlayLayer as ba, type TileflowMapTooling as bb, type TileflowMarine as bc, type TileflowMarineConfig as bd, type TileflowMarineMode as be, type TileflowMarineSourceConfig as bf, type TileflowMarineSourceIdentity as bg, type TileflowModelDirectory as bh, type TileflowModelEmitter as bi, type TileflowModelLevelBytes as bj, type TileflowModelMaterial as bk, type TileflowModelMaterialRange as bl, type TileflowModelMesh as bm, type TileflowModelPart as bn, type TileflowModelSurface as bo, type TileflowModelSurfaceBytes as bp, type TileflowModelTexture as bq, type TileflowModelTextureReference as br, type TileflowModuleOperation as bs, type TileflowModulePatch as bt, type TileflowNauticalAreaLabelStyles as bu, type TileflowNauticalModuleConfig as bv, type TileflowNauticalModuleOptions as bw, type TileflowOverlayCollection as bx, type TileflowPackageDirectory as by, type TileflowPreparedIconCapabilities as bz, type TileflowSourceRequirementsV1 as c, reset as c$, type TileflowTransitModuleOptions as c0, type TileflowTransitRailStyle as c1, type TileflowTreeForm as c2, type TileflowTreeFormMix as c3, type TileflowTreeModel as c4, type TileflowTreeModelMesh as c5, type TileflowTreeRegion as c6, type TileflowVegetation3D as c7, type TileflowVegetationModuleConfig as c8, type TileflowVegetationModuleOptions as c9, disable as cA, encodeTileflowTreeModel as cB, hashTileflowIconComposition as cC, hostedTileset as cD, iconSet as cE, isCanonicalOpenMapTilesSchema as cF, isSafeLocalPmtilesPath as cG, isTileflowBoundaryClass as cH, isTileflowBoundaryFamily as cI, isTileflowCompilationPhase as cJ, isTileflowIconSetSource as cK, isTileflowLocalDirectory as cL, isTileflowModelPartName as cM, land as cN, landforms as cO, maplibreOverlay as cP, mixTileflowSunPresets as cQ, nautical as cR, openMapTiles as cS, openMapTilesContractVersion as cT, parseTileflowIconComposition as cU, parseTileflowMap as cV, readTileflowSky as cW, readTileflowSunPreset as cX, readTileflowVegetation3D as cY, refine as cZ, remove as c_, type TileflowVegetationThreeDimensionalStyle as ca, type TileflowVisualValueCategory as cb, type TileflowWaterModuleConfig as cc, type TileflowWaterModuleOptions as cd, type TileflowWaterwayClass as ce, type TileflowWorldData as cf, type TileflowWorldReleaseReference as cg, type TileflowWorldSelection as ch, type TileflowWorldV1Schema as ci, type VectorTilesData as cj, addresses as ck, aeroways as cl, assertTileflowMapThemeValues as cm, assertTileflowSdfPixels as cn, auditTileflowMapThemeValues as co, auditTileflowThemeValues as cp, bathymetry as cq, boundaries as cr, buildings as cs, checkTileflowModelSurface as ct, classifyTileflowVisualProperty as cu, collectTileflowIconSetReferences as cv, createStyle as cw, createStyleResult as cx, decodeTileflowTreeModel as cy, defineTheme as cz, type TileflowMap as d, tileflowTreeModelLimits as d$, resolveBoundaryAreas as d0, resolveMarine as d1, resolveThemeSelection as d2, resolveThemeValues as d3, resolveTileflowData as d4, resolveTileflowSun as d5, resolveTileflowTheme as d6, tileflowBandPlacements as d7, tileflowBathymetryDemSourceId as d8, tileflowBathymetryNameLayerLimits as d9, tileflowModelArchitecturalPartNames as dA, tileflowModelDefaultLightingRole as dB, tileflowModelImageSize as dC, tileflowModelLightingRoles as dD, tileflowModelLimits as dE, tileflowModelParts as dF, tileflowModelSurfaceLimits as dG, tileflowModelTextureChannels as dH, tileflowModelVertexBytes as dI, tileflowNauticalFacilityIcons as dJ, tileflowNauticalImageRoles as dK, tileflowNauticalNotice as dL, tileflowNauticalPromoteId as dM, tileflowNauticalSourceId as dN, tileflowNauticalV1Schema as dO, tileflowPrimarySourceId as dP, tileflowRenderedIconIdentitySchema as dQ, tileflowRingsOverlap as dR, tileflowSkyAtSun as dS, tileflowSkyMetadataKey as dT, tileflowStyleSunPreset as dU, tileflowSunDirection as dV, tileflowSunMetadataKey as dW, tileflowSunPosition as dX, tileflowThemeLimits as dY, tileflowTreeForms as dZ, tileflowTreeModelIdPattern as d_, tileflowBathymetrySourceId as da, tileflowBathymetryV1Schema as db, tileflowBoundaryAreasV1Schema as dc, tileflowBoundaryClassTiers as dd, tileflowBoundaryClasses as de, tileflowBoundaryFamilies as df, tileflowDefaultSunPreset as dg, tileflowIconAppearanceSchema as dh, tileflowIconAuthorMetadataSchema as di, tileflowIconCompositionMaximumBytes as dj, tileflowIconCompositionSchema as dk, tileflowIconMetadataFileName as dl, tileflowIconSetIdSchema as dm, tileflowIconSetPackageIdSchema as dn, tileflowIconSetReferenceSchema as dp, tileflowIconSetSourceSchema as dq, tileflowIconSetTeamIdSchema as dr, tileflowIconSetVersionIdSchema as ds, tileflowIconSourceLimit as dt, tileflowInsideRings as du, tileflowLandformClasses as dv, tileflowLayerBands as dw, tileflowLocalDirectoryMaximumLength as dx, tileflowLocalDirectoryMessage as dy, tileflowMapIdSchema as dz, type TileflowStyleOptions as e, tileflowVegetationMetadataKey as e0, tileflowWorld as e1, tileflowWorldGeneration as e2, tileflowWorldTileJsonUrl as e3, tileflowWorldV1Schema as e4, transit as e5, validateTileflowCompiledIconCapabilities as e6, validateTileflowMap as e7, validateTileflowWorldV1Tilejson as e8, vectorTiles as e9, vegetation as ea, water as eb, type TileflowInspectedStyle as f, type TileflowPreparedMapAssets as g, type TileflowDataCompatibilityIssue as h, type TileflowDataFieldRequirement as i, type TileflowDataFieldType as j, type TileflowDataLayerRequirement as k, type TileflowObservedDataContractV1 as l, type TileflowStyleInspection as m, type TileflowStyleInspectionContribution as n, type TileflowStyleInspectionLayer as o, type TileflowStyleInspectionRenderOperation as p, collectMapLineage as q, inferTileflowDataRequirements as r, inferTileflowSourceRequirements as s, tileflowStyleInspectionSchemaVersion as t, type TileflowBoundaryClass as u, validateTileflowDataCompatibility as v, type TileflowBoundaryClassTier as w, type TileflowBoundaryFamily as x, type TileflowOverlayPlacement as y, type TileflowMapLibreOverlay as z };
|