@tileflow/core 0.1.0-alpha.20 → 0.1.0-alpha.21

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.
@@ -0,0 +1,525 @@
1
+ declare const expressionBrand: unique symbol;
2
+ declare const filterBrand: unique symbol;
3
+ declare const themeValueBrand: unique symbol;
4
+ declare const zoomBrand: unique symbol;
5
+ type TileflowThemeTokenCategory = 'color' | 'font' | 'image' | 'number';
6
+ type TileflowThemeTokenPrimitive = {
7
+ color: string;
8
+ font: string;
9
+ image: string;
10
+ number: number;
11
+ };
12
+ /** A JSON-safe semantic reference. The category is carried at runtime as well as in its type. */
13
+ type TileflowThemeTokenReference<TCategory extends TileflowThemeTokenCategory = TileflowThemeTokenCategory> = {
14
+ readonly category: TCategory;
15
+ readonly kind: 'theme-token';
16
+ readonly token: string;
17
+ readonly [themeValueBrand]: TileflowThemeTokenPrimitive[TCategory];
18
+ };
19
+ /** An explicit opt-out from theme substitution. A reason is mandatory for auditability. */
20
+ type TileflowFixedValue<T> = {
21
+ readonly kind: 'theme-fixed';
22
+ readonly reason: string;
23
+ readonly value: T;
24
+ readonly [themeValueBrand]: T;
25
+ };
26
+ type TileflowThemeColorMix = {
27
+ readonly amount: TileflowThemeNumberValue;
28
+ readonly from: TileflowThemeColorValue;
29
+ readonly kind: 'theme-color';
30
+ readonly operation: 'mix';
31
+ readonly space: 'oklch';
32
+ readonly to: TileflowThemeColorValue;
33
+ readonly [themeValueBrand]: string;
34
+ };
35
+ type TileflowThemeColorAlpha = {
36
+ readonly color: TileflowThemeColorValue;
37
+ readonly kind: 'theme-color';
38
+ readonly opacity: TileflowThemeNumberValue;
39
+ readonly operation: 'alpha';
40
+ readonly [themeValueBrand]: string;
41
+ };
42
+ type TileflowThemeColorOperation = TileflowThemeColorAlpha | TileflowThemeColorMix;
43
+ type TileflowThemeNumberValue = number | TileflowFixedValue<number> | TileflowThemeTokenReference<'number'>;
44
+ type TileflowThemeColorValue = string | TileflowFixedValue<string> | TileflowThemeColorOperation | TileflowThemeTokenReference<'color'>;
45
+ type TileflowThemeFontValue = string | TileflowFixedValue<string> | TileflowThemeTokenReference<'font'>;
46
+ type TileflowThemeImageValue = string | TileflowFixedValue<string> | TileflowThemeTokenReference<'image'>;
47
+ type TileflowThemeValue<T> = T | TileflowFixedValue<T> | (T extends number ? TileflowThemeTokenReference<'number'> : T extends string ? TileflowThemeTokenReference<'color' | 'font' | 'image'> | TileflowThemeColorOperation : never);
48
+ declare const token: {
49
+ color(name: string): TileflowThemeTokenReference<"color">;
50
+ font(name: string): TileflowThemeTokenReference<"font">;
51
+ image(name: string): TileflowThemeTokenReference<"image">;
52
+ number(name: string): TileflowThemeTokenReference<"number">;
53
+ };
54
+ declare function fixed<T>(value: T, options: {
55
+ reason: string;
56
+ }): TileflowFixedValue<T>;
57
+ declare const color: {
58
+ alpha(value: TileflowThemeColorValue, opacity: TileflowThemeNumberValue): TileflowThemeColorAlpha;
59
+ mix(from: TileflowThemeColorValue, to: TileflowThemeColorValue, options: {
60
+ amount: TileflowThemeNumberValue;
61
+ space?: "oklch";
62
+ }): TileflowThemeColorMix;
63
+ };
64
+ type TileflowExpression<T> = {
65
+ readonly kind: 'expression';
66
+ readonly value: readonly unknown[];
67
+ readonly [expressionBrand]?: T;
68
+ };
69
+ type TileflowFilterExpression = {
70
+ readonly kind: 'filter';
71
+ readonly value: readonly unknown[];
72
+ readonly [filterBrand]?: true;
73
+ };
74
+ type TileflowZoomInterpolation = 'linear' | 'exponential';
75
+ type TileflowZoomValue<T> = {
76
+ readonly base?: number;
77
+ readonly interpolation: TileflowZoomInterpolation | 'step';
78
+ readonly kind: 'zoom';
79
+ readonly stops: readonly (readonly [number, T])[];
80
+ readonly [zoomBrand]?: T;
81
+ };
82
+ type TileflowStyleValue<T> = TileflowExpression<T> | TileflowThemeValue<T> | TileflowZoomValue<TileflowThemeValue<T>>;
83
+ declare const zoom: {
84
+ exponential<T>(base: number, stops: readonly (readonly [number, T])[]): TileflowZoomValue<T>;
85
+ linear<T>(stops: readonly (readonly [number, T])[]): TileflowZoomValue<T>;
86
+ step<T>(stops: readonly (readonly [number, T])[]): TileflowZoomValue<T>;
87
+ };
88
+ declare function expression<T>(value: readonly unknown[]): TileflowExpression<T>;
89
+ declare function filter(value: readonly unknown[]): TileflowFilterExpression;
90
+ declare function toMapLibreStyleValue<T>(value: TileflowStyleValue<T>): T | unknown[];
91
+
92
+ /** A color literal, semantic color token, color operation, expression, or zoom ramp. */
93
+ type TileflowColorStyleValue = TileflowExpression<string> | TileflowThemeColorValue | TileflowZoomValue<TileflowThemeColorValue>;
94
+ /** An image name, semantic image token, expression, or zoom ramp. */
95
+ type TileflowImageStyleValue = TileflowExpression<string> | TileflowThemeImageValue | TileflowZoomValue<TileflowThemeImageValue>;
96
+ /** A number, semantic number token, expression, or zoom ramp. */
97
+ type TileflowNumberStyleValue = TileflowExpression<number> | TileflowThemeNumberValue | TileflowZoomValue<TileflowThemeNumberValue>;
98
+ /** A visual numeric array whose components may be themed, or whose full shape is fixed. */
99
+ type TileflowThemeNumberArrayValue = readonly TileflowThemeNumberValue[] | TileflowFixedValue<readonly number[]>;
100
+ /** A visual numeric array, expression, or zoom ramp with explicit theme intent. */
101
+ type TileflowNumberArrayStyleValue = TileflowExpression<readonly number[]> | TileflowThemeNumberArrayValue | TileflowZoomValue<TileflowThemeNumberArrayValue>;
102
+ /** A two-dimensional visual offset with category-safe numeric components. */
103
+ type TileflowNumberOffsetStyleValue = readonly [TileflowThemeNumberValue, TileflowThemeNumberValue] | TileflowFixedValue<readonly number[]> | TileflowExpression<readonly number[]> | TileflowZoomValue<readonly [TileflowThemeNumberValue, TileflowThemeNumberValue] | TileflowFixedValue<readonly number[]>>;
104
+ /** Top, right, bottom, and left visual insets with category-safe numeric components. */
105
+ type TileflowNumberInsetsStyleValue = readonly [
106
+ TileflowThemeNumberValue,
107
+ TileflowThemeNumberValue,
108
+ TileflowThemeNumberValue,
109
+ TileflowThemeNumberValue
110
+ ] | TileflowFixedValue<readonly [number, number, number, number]> | TileflowExpression<readonly number[]> | TileflowZoomValue<readonly [
111
+ TileflowThemeNumberValue,
112
+ TileflowThemeNumberValue,
113
+ TileflowThemeNumberValue,
114
+ TileflowThemeNumberValue
115
+ ] | TileflowFixedValue<readonly [number, number, number, number]>>;
116
+ /** A structural value that does not participate in semantic theme-token substitution. */
117
+ type TileflowStructuralStyleValue<T> = T | TileflowExpression<T> | TileflowZoomValue<T>;
118
+ /** Structural text, including expressions and zoom-dependent literal strings. */
119
+ type TileflowStringStyleValue = TileflowStructuralStyleValue<string>;
120
+ type TileflowLineCap = 'butt' | 'round' | 'square';
121
+ type TileflowLineJoin = 'bevel' | 'miter' | 'round';
122
+ type TileflowSymbolPlacement = 'line' | 'line-center' | 'point';
123
+ type TileflowSymbolZOrder = 'auto' | 'source' | 'viewport-y';
124
+ type TileflowTextAnchor = 'bottom' | 'bottom-left' | 'bottom-right' | 'center' | 'left' | 'right' | 'top' | 'top-left' | 'top-right';
125
+ type TileflowTextJustify = 'auto' | 'center' | 'left' | 'right';
126
+ type TileflowIconAnchor = TileflowTextAnchor;
127
+ type TileflowAlignment = 'auto' | 'map' | 'viewport';
128
+ type TileflowIconTextFit = 'both' | 'height' | 'none' | 'width';
129
+ /** Visibility and zoom bounds shared by every visual primitive. */
130
+ type TileflowLayerRange = {
131
+ maxZoom?: number;
132
+ minZoom?: number;
133
+ visible?: boolean;
134
+ };
135
+ type TileflowBackgroundPaint = {
136
+ color?: TileflowColorStyleValue;
137
+ opacity?: TileflowNumberStyleValue;
138
+ pattern?: TileflowImageStyleValue;
139
+ };
140
+ type TileflowBackgroundStyle = TileflowLayerRange & TileflowBackgroundPaint;
141
+ type TileflowFillPaint = {
142
+ antialias?: boolean;
143
+ color?: TileflowColorStyleValue;
144
+ opacity?: TileflowNumberStyleValue;
145
+ pattern?: TileflowImageStyleValue;
146
+ };
147
+ type TileflowFillStyle = TileflowLayerRange & TileflowFillPaint;
148
+ type TileflowLinePaint = {
149
+ blur?: TileflowNumberStyleValue;
150
+ color?: TileflowColorStyleValue;
151
+ dash?: TileflowNumberArrayStyleValue;
152
+ gapWidth?: TileflowNumberStyleValue;
153
+ offset?: TileflowNumberStyleValue;
154
+ opacity?: TileflowNumberStyleValue;
155
+ pattern?: TileflowImageStyleValue;
156
+ width?: TileflowNumberStyleValue;
157
+ };
158
+ type TileflowLineLayout = {
159
+ cap?: TileflowStructuralStyleValue<TileflowLineCap>;
160
+ join?: TileflowStructuralStyleValue<TileflowLineJoin>;
161
+ miterLimit?: TileflowNumberStyleValue;
162
+ roundLimit?: TileflowNumberStyleValue;
163
+ };
164
+ type TileflowLineStyle = TileflowLayerRange & TileflowLinePaint & TileflowLineLayout;
165
+ /** Repeated diagonal marks placed along a stroked geographic feature. */
166
+ type TileflowLineHatchStyle = TileflowLayerRange & {
167
+ angle?: TileflowNumberStyleValue;
168
+ color?: TileflowColorStyleValue;
169
+ opacity?: TileflowNumberStyleValue;
170
+ /** Sprite pattern clipped to the line deck; when set, it replaces glyph hatching. */
171
+ pattern?: TileflowImageStyleValue;
172
+ /**
173
+ * Intrinsic pixel heights available as `${pattern}-${width}` sprites. Tileflow
174
+ * selects the closest height to the rendered line width so marks retain a
175
+ * nearly fixed screen-pixel thickness instead of stretching with the road.
176
+ * Requires `pattern` to be a literal sprite-name prefix.
177
+ */
178
+ patternWidths?: TileflowThemeNumberArrayValue;
179
+ size?: TileflowNumberStyleValue;
180
+ spacing?: TileflowNumberStyleValue;
181
+ };
182
+ type TileflowTextPaint = {
183
+ color?: TileflowColorStyleValue;
184
+ haloBlur?: TileflowNumberStyleValue;
185
+ haloColor?: TileflowColorStyleValue;
186
+ haloWidth?: TileflowNumberStyleValue;
187
+ opacity?: TileflowNumberStyleValue;
188
+ };
189
+ type TileflowTextLayout = {
190
+ allowOverlap?: boolean;
191
+ anchor?: TileflowTextAnchor;
192
+ field?: TileflowStringStyleValue;
193
+ font?: TileflowThemeFontValue;
194
+ fallbacks?: readonly TileflowThemeFontValue[];
195
+ ignorePlacement?: boolean;
196
+ justify?: TileflowTextJustify;
197
+ keepUpright?: boolean;
198
+ letterSpacing?: TileflowNumberStyleValue;
199
+ lineHeight?: TileflowNumberStyleValue;
200
+ maxAngle?: TileflowNumberStyleValue;
201
+ maxWidth?: TileflowNumberStyleValue;
202
+ offset?: TileflowNumberOffsetStyleValue;
203
+ optional?: boolean;
204
+ padding?: TileflowNumberStyleValue;
205
+ pitchAlignment?: TileflowAlignment;
206
+ radialOffset?: TileflowNumberStyleValue;
207
+ rotate?: TileflowNumberStyleValue;
208
+ rotationAlignment?: TileflowAlignment;
209
+ size?: TileflowNumberStyleValue;
210
+ transform?: 'lowercase' | 'none' | 'uppercase';
211
+ variableAnchors?: readonly TileflowTextAnchor[];
212
+ };
213
+ type TileflowTextStyle = TileflowLayerRange & TileflowTextPaint & TileflowTextLayout;
214
+ type TileflowIconPaint = {
215
+ color?: TileflowColorStyleValue;
216
+ haloBlur?: TileflowNumberStyleValue;
217
+ haloColor?: TileflowColorStyleValue;
218
+ haloWidth?: TileflowNumberStyleValue;
219
+ opacity?: TileflowNumberStyleValue;
220
+ };
221
+ type TileflowIconLayout = {
222
+ allowOverlap?: boolean;
223
+ anchor?: TileflowIconAnchor;
224
+ image?: TileflowImageStyleValue;
225
+ ignorePlacement?: boolean;
226
+ keepUpright?: boolean;
227
+ offset?: TileflowNumberOffsetStyleValue;
228
+ optional?: boolean;
229
+ padding?: TileflowNumberStyleValue;
230
+ pitchAlignment?: TileflowAlignment;
231
+ rotate?: TileflowNumberStyleValue;
232
+ rotationAlignment?: TileflowAlignment;
233
+ size?: TileflowNumberStyleValue;
234
+ textFit?: TileflowIconTextFit;
235
+ textFitPadding?: TileflowNumberInsetsStyleValue;
236
+ };
237
+ type TileflowIconStyle = TileflowLayerRange & TileflowIconPaint & TileflowIconLayout;
238
+ type TileflowSymbolPlacementStyle = TileflowLayerRange & {
239
+ placement?: TileflowSymbolPlacement;
240
+ priority?: TileflowStructuralStyleValue<number>;
241
+ spacing?: TileflowNumberStyleValue;
242
+ zOrder?: TileflowSymbolZOrder;
243
+ };
244
+ type TileflowCirclePaint = {
245
+ blur?: TileflowNumberStyleValue;
246
+ color?: TileflowColorStyleValue;
247
+ opacity?: TileflowNumberStyleValue;
248
+ pitchAlignment?: 'map' | 'viewport';
249
+ pitchScale?: 'map' | 'viewport';
250
+ radius?: TileflowNumberStyleValue;
251
+ strokeColor?: TileflowColorStyleValue;
252
+ strokeOpacity?: TileflowNumberStyleValue;
253
+ strokeWidth?: TileflowNumberStyleValue;
254
+ };
255
+ type TileflowCircleStyle = TileflowLayerRange & TileflowCirclePaint;
256
+ type TileflowExtrusionPaint = {
257
+ base?: TileflowNumberStyleValue;
258
+ color?: TileflowColorStyleValue;
259
+ height?: TileflowNumberStyleValue;
260
+ opacity?: TileflowNumberStyleValue;
261
+ pattern?: TileflowImageStyleValue;
262
+ verticalGradient?: boolean;
263
+ };
264
+ type TileflowExtrusionStyle = TileflowLayerRange & TileflowExtrusionPaint;
265
+ /** A polygon rendered as a fill and, when requested, a separate line layer. */
266
+ type TileflowAreaStyle = {
267
+ fill?: TileflowFillStyle;
268
+ outline?: TileflowLineStyle;
269
+ };
270
+ /** The canonical ordered phases used for roads, aeroways, and other stroked paths. */
271
+ type TileflowLineStackStyle = {
272
+ casing?: TileflowLineStyle;
273
+ fill?: TileflowLineStyle;
274
+ shadow?: TileflowLineStyle;
275
+ };
276
+ /** A symbol layer composed from one placement policy and optional text/icon parts. */
277
+ type TileflowSymbolStyle = TileflowSymbolPlacementStyle & {
278
+ icon?: TileflowIconStyle;
279
+ marker?: TileflowCircleStyle;
280
+ text?: TileflowTextStyle;
281
+ };
282
+
283
+ type TileflowColor = `#${string}`;
284
+ type TileflowTypographyStyle = {
285
+ /** Ordered exact fallback face names; CSS generic families are allowed for local fonts. */
286
+ fallbacks?: readonly string[];
287
+ /** Exact OpenType full name or exact remote glyph face name. */
288
+ font?: string;
289
+ letterSpacing?: number;
290
+ transform?: 'lowercase' | 'none' | 'uppercase';
291
+ };
292
+ type ResolvedTileflowTypographyStyle = Required<Pick<TileflowTypographyStyle, 'font'>> & Omit<TileflowTypographyStyle, 'font'>;
293
+ type ResolvedTileflowTypography = ResolvedTileflowTypographyStyle & {
294
+ places: ResolvedTileflowTypographyStyle;
295
+ roads: ResolvedTileflowTypographyStyle;
296
+ water: ResolvedTileflowTypographyStyle;
297
+ poi: ResolvedTileflowTypographyStyle;
298
+ };
299
+ type TileflowTerrainMode = 'none' | 'hillshade' | '3d';
300
+ type TileflowTerrainEncoding = 'mapbox' | 'terrarium';
301
+ type TileflowTerrainLayerRange = {
302
+ maxZoom?: number;
303
+ minZoom?: number;
304
+ visible?: boolean;
305
+ };
306
+ type TileflowTerrainHillshadeStyle = TileflowTerrainLayerRange & {
307
+ accentColor?: TileflowThemeColorValue;
308
+ exaggeration?: TileflowThemeNumberValue;
309
+ highlightColor?: TileflowThemeColorValue;
310
+ illuminationAnchor?: 'map' | 'viewport';
311
+ illuminationDirection?: TileflowThemeNumberValue;
312
+ shadowColor?: TileflowThemeColorValue;
313
+ };
314
+ type TileflowTerrainContourLineStyle = TileflowTerrainLayerRange & {
315
+ color?: TileflowThemeColorValue;
316
+ opacity?: TileflowThemeNumberValue;
317
+ width?: TileflowThemeNumberValue;
318
+ };
319
+ type TileflowTerrainContourLabelStyle = TileflowTerrainLayerRange & {
320
+ color?: TileflowThemeColorValue;
321
+ font?: TileflowThemeFontValue;
322
+ haloColor?: TileflowThemeColorValue;
323
+ haloWidth?: TileflowThemeNumberValue;
324
+ opacity?: TileflowThemeNumberValue;
325
+ size?: TileflowThemeNumberValue;
326
+ spacing?: TileflowThemeNumberValue;
327
+ };
328
+ type TileflowTerrainContoursConfig = {
329
+ /** Maximum native zoom exposed by the DEM tile template. */
330
+ demMaxZoom: number;
331
+ /** Explicit HTTP(S) DEM template containing {z}, {x}, and {y}. */
332
+ demUrl: string;
333
+ index?: TileflowTerrainContourLineStyle;
334
+ labels?: TileflowTerrainContourLabelStyle;
335
+ maxZoom?: number;
336
+ minZoom?: number;
337
+ minor?: TileflowTerrainContourLineStyle;
338
+ multiplier?: number;
339
+ overzoom?: number;
340
+ sourceId?: string;
341
+ /** Zoom-indexed [minor, index] elevation intervals. */
342
+ thresholds: Readonly<Record<number, readonly [number, number]>>;
343
+ };
344
+ type TileflowTerrainConfig = {
345
+ attribution?: string;
346
+ contours?: TileflowTerrainContoursConfig;
347
+ encoding?: TileflowTerrainEncoding;
348
+ exaggeration?: number;
349
+ hillshade?: TileflowTerrainHillshadeStyle;
350
+ mode?: TileflowTerrainMode;
351
+ sourceId?: string;
352
+ url?: string;
353
+ };
354
+ type TileflowTerrain = TileflowTerrainMode | TileflowTerrainConfig;
355
+ type TileflowViewConfig = {
356
+ bearing?: number;
357
+ center?: readonly [number, number];
358
+ pitch?: number;
359
+ zoom?: number;
360
+ };
361
+ type TileflowRoadDetail = 'none' | 'highways' | 'major' | 'streets' | 'all';
362
+ type TileflowRoadClass = 'motorway' | 'trunk' | 'primary' | 'secondary' | 'tertiary' | 'minor' | 'service' | 'track' | 'pathway' | 'footway' | 'cycleway' | 'steps' | 'pedestrian';
363
+ type TileflowRoadHierarchy = 'subtle' | 'clear' | 'strong';
364
+ type TileflowRoadWeight = 'thin' | 'regular' | 'bold';
365
+ type TileflowRoadOutline = 'none' | 'subtle' | 'strong';
366
+ type TileflowRoadStructure = 'bridge' | 'surface' | 'tunnel';
367
+ type TileflowRoadExtras = {
368
+ paths?: boolean;
369
+ };
370
+ type TileflowRoadLayerStyle = TileflowLineStackStyle & {
371
+ hatch?: TileflowLineHatchStyle;
372
+ };
373
+ type TileflowRoadTreatmentLineStyle = Pick<TileflowLinePaint, 'blur' | 'color' | 'dash' | 'gapWidth' | 'offset' | 'opacity' | 'width'>;
374
+ type TileflowRoadTreatmentLayerStyle = {
375
+ casing?: TileflowRoadTreatmentLineStyle;
376
+ fill?: TileflowRoadTreatmentLineStyle;
377
+ shadow?: TileflowRoadTreatmentLineStyle;
378
+ };
379
+ type TileflowRoadTreatmentStyle = Partial<Record<TileflowRoadStructure, TileflowRoadTreatmentLayerStyle>> & {
380
+ enabled?: boolean;
381
+ widthScale?: TileflowThemeNumberValue;
382
+ };
383
+ type TileflowRoadModifier = 'construction' | 'expressway' | 'indoor' | 'official' | 'ramp' | 'unpaved';
384
+ type TileflowRoadRestriction = 'access' | 'bicycle' | 'foot' | 'horse' | 'toll';
385
+ type TileflowMountainBikeScale = '0' | '0+' | '1' | '1+' | '2' | '2+' | '3' | '3+' | '4' | '5' | '6';
386
+ type TileflowRoadServiceType = 'alley' | 'crossover' | 'driveway' | 'parkingAisle' | 'yard';
387
+ type TileflowRoadClassStyle = Partial<Record<TileflowRoadStructure, TileflowRoadLayerStyle>> & {
388
+ enabled?: boolean;
389
+ };
390
+ type TileflowRoadAreaStyle = {
391
+ pedestrian?: TileflowAreaStyle;
392
+ pier?: TileflowAreaStyle;
393
+ road?: TileflowAreaStyle;
394
+ };
395
+ type TileflowRoadCrossingStyle = Omit<TileflowIconStyle, 'image'> & Required<Pick<TileflowIconStyle, 'image'>>;
396
+ type TileflowRoadRoundaboutStyle = {
397
+ casing?: TileflowCircleStyle;
398
+ fill?: TileflowCircleStyle;
399
+ };
400
+ type TileflowRoadSidewalkStyle = {
401
+ outline?: TileflowLineStyle;
402
+ pattern?: TileflowFillStyle;
403
+ surface?: TileflowFillStyle;
404
+ };
405
+ type TileflowRoadsModuleConfig = {
406
+ type: 'roads';
407
+ areas?: TileflowRoadAreaStyle;
408
+ classes?: Partial<Record<TileflowRoadClass, TileflowRoadClassStyle>>;
409
+ crossings?: TileflowRoadCrossingStyle;
410
+ detail?: TileflowRoadDetail;
411
+ enabled?: boolean;
412
+ extras?: TileflowRoadExtras;
413
+ hierarchy?: TileflowRoadHierarchy;
414
+ modifiers?: Partial<Record<TileflowRoadModifier, TileflowRoadTreatmentStyle>>;
415
+ mountainBike?: Partial<Record<TileflowMountainBikeScale, TileflowRoadTreatmentStyle>>;
416
+ oneWayMarkers?: boolean;
417
+ outline?: TileflowRoadOutline;
418
+ restrictions?: Partial<Record<TileflowRoadRestriction, TileflowRoadTreatmentStyle>>;
419
+ roundabouts?: TileflowRoadRoundaboutStyle;
420
+ serviceTypes?: Partial<Record<TileflowRoadServiceType, TileflowRoadTreatmentStyle>>;
421
+ sidewalks?: TileflowRoadSidewalkStyle;
422
+ structures?: Partial<Record<TileflowRoadStructure, TileflowRoadLayerStyle>>;
423
+ weight?: TileflowRoadWeight;
424
+ widthScale?: Partial<Record<TileflowRoadClass, TileflowThemeNumberValue>>;
425
+ };
426
+ type TileflowRoadsModuleOptions = Omit<TileflowRoadsModuleConfig, 'type'>;
427
+ type TileflowLabelDetail = 'none' | 'major' | 'all';
428
+ type TileflowAerodromeCodeDetail = 'none' | 'iata' | 'all';
429
+ type TileflowRoadLabelDetail = TileflowRoadDetail;
430
+ type TileflowLabelLanguage = 'auto' | 'local' | 'en' | (string & {});
431
+ type TileflowPlaceLabelClass = 'city' | 'continent' | 'country' | 'neighborhood' | 'other' | 'state' | 'town' | 'village';
432
+ type TileflowWaterLabelClass = 'line' | 'ocean' | 'other' | 'waterway';
433
+ type TileflowRoadShieldDetail = 'none' | 'major' | 'all';
434
+ type TileflowRoadShieldStyles = {
435
+ default?: TileflowSymbolStyle;
436
+ detail?: TileflowSymbolStyle;
437
+ kinds?: Record<string, {
438
+ image: TileflowThemeImageValue;
439
+ }>;
440
+ overview?: TileflowSymbolStyle;
441
+ textColors?: Record<string, {
442
+ color: TileflowThemeColorValue;
443
+ }>;
444
+ };
445
+ type TileflowLabelStyles = {
446
+ aerodrome?: TileflowSymbolStyle;
447
+ junctions?: TileflowSymbolStyle;
448
+ places?: Partial<Record<TileflowPlaceLabelClass, TileflowSymbolStyle>>;
449
+ roads?: Partial<Record<TileflowRoadClass, TileflowSymbolStyle>>;
450
+ shields?: TileflowRoadShieldStyles;
451
+ water?: Partial<Record<TileflowWaterLabelClass, TileflowSymbolStyle>>;
452
+ };
453
+ type TileflowLabelsModuleConfig = {
454
+ type: 'labels';
455
+ aerodromeCodes?: TileflowAerodromeCodeDetail;
456
+ enabled?: boolean;
457
+ junctions?: boolean;
458
+ language?: TileflowLabelLanguage;
459
+ places?: TileflowLabelDetail;
460
+ roadClasses?: readonly TileflowRoadClass[];
461
+ roads?: TileflowRoadLabelDetail;
462
+ shields?: TileflowRoadShieldDetail;
463
+ styles?: TileflowLabelStyles;
464
+ water?: TileflowLabelDetail;
465
+ };
466
+ type TileflowLabelsModuleOptions = Omit<TileflowLabelsModuleConfig, 'type'>;
467
+ /** Closed editorial vocabulary emitted by Tileflow World's canonical POI projection. */
468
+ declare const tileflowPoiCategories: readonly ["arts-entertainment", "education", "food-drink", "landmark", "lodging", "medical", "park-nature", "public-services", "religion", "retail", "sport-leisure", "transport", "visitor-amenity"];
469
+ type TileflowPoiCategory = (typeof tileflowPoiCategories)[number];
470
+ type TileflowPoiDensity = 1 | 2 | 3 | 4 | 5;
471
+ type TileflowPoiColorMode = 'uniform' | 'category';
472
+ type TileflowPoiCategoryStyle = Omit<TileflowSymbolStyle, 'priority'>;
473
+ type TileflowPoiModuleConfig = {
474
+ type: 'poi';
475
+ categories?: readonly TileflowPoiCategory[];
476
+ color?: TileflowPoiColorMode;
477
+ density?: TileflowPoiDensity;
478
+ enabled?: boolean;
479
+ icons?: boolean;
480
+ labels?: boolean;
481
+ minZoom?: number;
482
+ placement?: {
483
+ coupleIconAndLabel?: boolean;
484
+ iconPadding?: number;
485
+ textPadding?: number;
486
+ };
487
+ styles?: Partial<Record<TileflowPoiCategory, TileflowPoiCategoryStyle>>;
488
+ };
489
+ type TileflowPoiModuleOptions = Omit<TileflowPoiModuleConfig, 'type'>;
490
+ type MapLibreSprite = string | Array<{
491
+ id: string;
492
+ url: string;
493
+ }>;
494
+ type TileflowProjection = 'globe' | 'mercator';
495
+ type TileflowLight = {
496
+ anchor?: 'map' | 'viewport';
497
+ color?: TileflowColor;
498
+ intensity?: number;
499
+ position?: readonly [number, number, number];
500
+ };
501
+ type MapLibreStyle = {
502
+ version: 8;
503
+ name: string;
504
+ glyphs?: string;
505
+ light?: TileflowLight;
506
+ projection?: {
507
+ type: TileflowProjection;
508
+ };
509
+ sprite?: MapLibreSprite;
510
+ sources: Record<string, Record<string, unknown>>;
511
+ layers: Array<Record<string, unknown>>;
512
+ terrain?: Record<string, unknown>;
513
+ metadata?: Record<string, unknown>;
514
+ };
515
+ type ValidationMessage = {
516
+ level: 'error' | 'warning';
517
+ path: string;
518
+ message: string;
519
+ };
520
+ type ValidationResult = {
521
+ valid: boolean;
522
+ messages: ValidationMessage[];
523
+ };
524
+
525
+ export { type TileflowLineJoin as $, type TileflowBackgroundStyle as A, type TileflowCirclePaint as B, type TileflowCircleStyle as C, type TileflowColor as D, type TileflowColorStyleValue as E, type TileflowExpression as F, type TileflowExtrusionPaint as G, type TileflowExtrusionStyle as H, type TileflowFillPaint as I, type TileflowFilterExpression as J, type TileflowFixedValue as K, type TileflowIconAnchor as L, type MapLibreStyle as M, type TileflowIconLayout as N, type TileflowIconPaint as O, type TileflowIconStyle as P, type TileflowIconTextFit as Q, type ResolvedTileflowTypography as R, type TileflowImageStyleValue as S, type TileflowViewConfig as T, type TileflowLabelDetail as U, type ValidationResult as V, type TileflowLabelLanguage as W, type TileflowLabelStyles as X, type TileflowLayerRange as Y, type TileflowLineCap as Z, type TileflowLineHatchStyle as _, type TileflowFillStyle as a, tileflowPoiCategories as a$, type TileflowLineLayout as a0, type TileflowLinePaint as a1, type TileflowLineStackStyle as a2, type TileflowMountainBikeScale as a3, type TileflowNumberInsetsStyleValue as a4, type TileflowNumberStyleValue as a5, type TileflowPlaceLabelClass as a6, type TileflowPoiCategory as a7, type TileflowPoiCategoryStyle as a8, type TileflowPoiColorMode as a9, type TileflowSymbolPlacement as aA, type TileflowSymbolPlacementStyle as aB, type TileflowSymbolZOrder as aC, type TileflowTerrainConfig as aD, type TileflowTerrainContourLabelStyle as aE, type TileflowTerrainContourLineStyle as aF, type TileflowTerrainContoursConfig as aG, type TileflowTerrainLayerRange as aH, type TileflowTerrainMode as aI, type TileflowTextAnchor as aJ, type TileflowTextJustify as aK, type TileflowTextLayout as aL, type TileflowTextPaint as aM, type TileflowTextStyle as aN, type TileflowThemeColorAlpha as aO, type TileflowThemeColorMix as aP, type TileflowThemeColorOperation as aQ, type TileflowThemeTokenCategory as aR, type TileflowThemeTokenReference as aS, type TileflowThemeValue as aT, type TileflowWaterLabelClass as aU, type TileflowZoomInterpolation as aV, type TileflowZoomValue as aW, color as aX, expression as aY, filter as aZ, fixed as a_, type TileflowPoiDensity as aa, type TileflowRoadAreaStyle as ab, type TileflowRoadClass as ac, type TileflowRoadClassStyle as ad, type TileflowRoadCrossingStyle as ae, type TileflowRoadDetail as af, type TileflowRoadExtras as ag, type TileflowRoadHierarchy as ah, type TileflowRoadLabelDetail as ai, type TileflowRoadLayerStyle as aj, type TileflowRoadModifier as ak, type TileflowRoadOutline as al, type TileflowRoadRestriction as am, type TileflowRoadRoundaboutStyle as an, type TileflowRoadServiceType as ao, type TileflowRoadShieldDetail as ap, type TileflowRoadShieldStyles as aq, type TileflowRoadSidewalkStyle as ar, type TileflowRoadStructure as as, type TileflowRoadTreatmentLayerStyle as at, type TileflowRoadTreatmentLineStyle as au, type TileflowRoadTreatmentStyle as av, type TileflowRoadWeight as aw, type TileflowStringStyleValue as ax, type TileflowStructuralStyleValue as ay, type TileflowStyleValue as az, type TileflowLineStyle as b, token as b0, zoom as b1, type TileflowSymbolStyle as c, type TileflowTerrainHillshadeStyle as d, type TileflowTerrainEncoding as e, type TileflowThemeNumberValue as f, type TileflowThemeColorValue as g, type TileflowThemeFontValue as h, type TileflowThemeImageValue as i, type TileflowTypographyStyle as j, type TileflowLight as k, type TileflowProjection as l, type TileflowTerrain as m, type ValidationMessage as n, type TileflowRoadsModuleOptions as o, type TileflowRoadsModuleConfig as p, type TileflowLabelsModuleOptions as q, type TileflowLabelsModuleConfig as r, type TileflowPoiModuleOptions as s, toMapLibreStyleValue as t, type TileflowPoiModuleConfig as u, type MapLibreSprite as v, type TileflowAerodromeCodeDetail as w, type TileflowAlignment as x, type TileflowAreaStyle as y, type TileflowBackgroundPaint as z };