@tileflow/core 0.1.0-alpha.20 → 0.1.0-alpha.22
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/GENERATED_OUTPUT_LICENSE.md +21 -0
- package/LICENSE +201 -0
- package/NOTICE +9 -0
- package/README.md +1097 -145
- package/THIRD_PARTY_NOTICES.md +243 -0
- package/TRADEMARKS.md +10 -0
- package/dist/browser.d.ts +182 -13
- package/dist/browser.js +4207 -116
- package/dist/build.d.ts +158 -0
- package/dist/build.js +14836 -0
- package/dist/capture-scene-BK_0J2oR.d.ts +161 -0
- package/dist/capture.d.ts +9 -0
- package/dist/capture.js +206 -0
- package/dist/config-reference.json +31882 -0
- package/dist/index.d.ts +643 -182
- package/dist/index.js +15943 -4352
- package/dist/manifest-B5GKVMFE.d.ts +757 -0
- package/dist/manifest.d.ts +2 -0
- package/dist/manifest.js +245 -0
- package/dist/map-BHL_0Mkx.d.ts +1145 -0
- package/dist/runtime.d.ts +2 -0
- package/dist/runtime.js +1172 -0
- package/package.json +37 -5
- package/dist/runtime-DroKDIuB.d.ts +0 -1069
|
@@ -0,0 +1,757 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
declare const expressionBrand: unique symbol;
|
|
4
|
+
declare const themeValueBrand: unique symbol;
|
|
5
|
+
declare const zoomBrand: unique symbol;
|
|
6
|
+
declare const tileflowThemeTokenCategories: readonly ["color", "font", "image", "number"];
|
|
7
|
+
type TileflowThemeTokenCategory = (typeof tileflowThemeTokenCategories)[number];
|
|
8
|
+
type TileflowThemeTokenPrimitive = {
|
|
9
|
+
color: string;
|
|
10
|
+
font: string;
|
|
11
|
+
image: string;
|
|
12
|
+
number: number;
|
|
13
|
+
};
|
|
14
|
+
/** A JSON-safe semantic reference. The category is carried at runtime as well as in its type. */
|
|
15
|
+
type TileflowThemeTokenReference<TCategory extends TileflowThemeTokenCategory = TileflowThemeTokenCategory> = {
|
|
16
|
+
readonly category: TCategory;
|
|
17
|
+
readonly kind: 'theme-token';
|
|
18
|
+
readonly token: string;
|
|
19
|
+
readonly [themeValueBrand]: TileflowThemeTokenPrimitive[TCategory];
|
|
20
|
+
};
|
|
21
|
+
/** An explicit opt-out from theme substitution. A reason is mandatory for auditability. */
|
|
22
|
+
type TileflowFixedValue<T> = {
|
|
23
|
+
readonly kind: 'theme-fixed';
|
|
24
|
+
readonly reason: string;
|
|
25
|
+
readonly value: T;
|
|
26
|
+
readonly [themeValueBrand]: T;
|
|
27
|
+
};
|
|
28
|
+
type TileflowThemeColorMix = {
|
|
29
|
+
readonly amount: TileflowThemeNumberValue;
|
|
30
|
+
readonly from: TileflowThemeColorValue;
|
|
31
|
+
readonly kind: 'theme-color';
|
|
32
|
+
readonly operation: 'mix';
|
|
33
|
+
readonly space: 'oklch';
|
|
34
|
+
readonly to: TileflowThemeColorValue;
|
|
35
|
+
readonly [themeValueBrand]: string;
|
|
36
|
+
};
|
|
37
|
+
type TileflowThemeColorAlpha = {
|
|
38
|
+
readonly color: TileflowThemeColorValue;
|
|
39
|
+
readonly kind: 'theme-color';
|
|
40
|
+
readonly opacity: TileflowThemeNumberValue;
|
|
41
|
+
readonly operation: 'alpha';
|
|
42
|
+
readonly [themeValueBrand]: string;
|
|
43
|
+
};
|
|
44
|
+
type TileflowThemeColorOperation = TileflowThemeColorAlpha | TileflowThemeColorMix;
|
|
45
|
+
type TileflowThemeNumberValue = number | TileflowFixedValue<number> | TileflowThemeTokenReference<'number'>;
|
|
46
|
+
type TileflowThemeColorValue = string | TileflowFixedValue<string> | TileflowThemeColorOperation | TileflowThemeTokenReference<'color'>;
|
|
47
|
+
type TileflowThemeFontValue = string | TileflowFixedValue<string> | TileflowThemeTokenReference<'font'>;
|
|
48
|
+
type TileflowThemeImageValue = string | TileflowFixedValue<string> | TileflowThemeTokenReference<'image'>;
|
|
49
|
+
type TileflowThemeValue<T> = T | TileflowFixedValue<T> | (T extends number ? TileflowThemeTokenReference<'number'> : T extends string ? TileflowThemeTokenReference<'color' | 'font' | 'image'> | TileflowThemeColorOperation : never);
|
|
50
|
+
declare const token: {
|
|
51
|
+
color(name: string): TileflowThemeTokenReference<"color">;
|
|
52
|
+
font(name: string): TileflowThemeTokenReference<"font">;
|
|
53
|
+
image(name: string): TileflowThemeTokenReference<"image">;
|
|
54
|
+
number(name: string): TileflowThemeTokenReference<"number">;
|
|
55
|
+
};
|
|
56
|
+
declare function fixed<T>(value: T, options: {
|
|
57
|
+
reason: string;
|
|
58
|
+
}): TileflowFixedValue<T>;
|
|
59
|
+
declare const color: {
|
|
60
|
+
alpha(value: TileflowThemeColorValue, opacity: TileflowThemeNumberValue): TileflowThemeColorAlpha;
|
|
61
|
+
mix(from: TileflowThemeColorValue, to: TileflowThemeColorValue, options: {
|
|
62
|
+
amount: TileflowThemeNumberValue;
|
|
63
|
+
space?: "oklch";
|
|
64
|
+
}): TileflowThemeColorMix;
|
|
65
|
+
};
|
|
66
|
+
type TileflowExpression<T> = {
|
|
67
|
+
readonly kind: 'expression';
|
|
68
|
+
readonly value: readonly unknown[];
|
|
69
|
+
/** Opaque result type. Only Tileflow's closed `expr.*` builders expose this brand publicly. */
|
|
70
|
+
readonly [expressionBrand]: T;
|
|
71
|
+
};
|
|
72
|
+
type TileflowZoomInterpolation = 'linear' | 'exponential';
|
|
73
|
+
type TileflowZoomValueCommon<T> = {
|
|
74
|
+
readonly kind: 'zoom';
|
|
75
|
+
readonly stops: readonly (readonly [number, T])[];
|
|
76
|
+
readonly [zoomBrand]?: T;
|
|
77
|
+
};
|
|
78
|
+
type TileflowZoomValue<T> = TileflowZoomValueCommon<T> & ({
|
|
79
|
+
readonly base: number;
|
|
80
|
+
readonly interpolation: 'exponential';
|
|
81
|
+
} | {
|
|
82
|
+
readonly base?: never;
|
|
83
|
+
readonly interpolation: 'linear' | 'step';
|
|
84
|
+
});
|
|
85
|
+
type TileflowStyleValue<T> = TileflowExpression<T> | TileflowThemeValue<T> | TileflowZoomValue<TileflowThemeValue<T>>;
|
|
86
|
+
declare const zoom: {
|
|
87
|
+
exponential<T>(base: number, stops: readonly (readonly [number, T])[]): TileflowZoomValue<T>;
|
|
88
|
+
linear<T>(stops: readonly (readonly [number, T])[]): TileflowZoomValue<T>;
|
|
89
|
+
step<T>(stops: readonly (readonly [number, T])[]): TileflowZoomValue<T>;
|
|
90
|
+
};
|
|
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 TileflowPriorityOrder = 'higher-first' | 'lower-first';
|
|
125
|
+
type TileflowTextAnchor = 'bottom' | 'bottom-left' | 'bottom-right' | 'center' | 'left' | 'right' | 'top' | 'top-left' | 'top-right';
|
|
126
|
+
type TileflowTextJustify = 'auto' | 'center' | 'left' | 'right';
|
|
127
|
+
type TileflowIconAnchor = TileflowTextAnchor;
|
|
128
|
+
type TileflowAlignment = 'auto' | 'map' | 'viewport';
|
|
129
|
+
type TileflowIconTextFit = 'both' | 'height' | 'none' | 'width';
|
|
130
|
+
/** Visibility and zoom bounds shared by every visual primitive. */
|
|
131
|
+
type TileflowLayerRange = {
|
|
132
|
+
maxZoom?: number;
|
|
133
|
+
minZoom?: number;
|
|
134
|
+
visible?: boolean;
|
|
135
|
+
};
|
|
136
|
+
type TileflowBackgroundPaint = {
|
|
137
|
+
color?: TileflowColorStyleValue;
|
|
138
|
+
opacity?: TileflowNumberStyleValue;
|
|
139
|
+
pattern?: TileflowImageStyleValue;
|
|
140
|
+
};
|
|
141
|
+
type TileflowBackgroundStyle = TileflowLayerRange & TileflowBackgroundPaint;
|
|
142
|
+
type TileflowFillPaint = {
|
|
143
|
+
antialias?: boolean;
|
|
144
|
+
color?: TileflowColorStyleValue;
|
|
145
|
+
opacity?: TileflowNumberStyleValue;
|
|
146
|
+
pattern?: TileflowImageStyleValue;
|
|
147
|
+
translate?: TileflowNumberOffsetStyleValue;
|
|
148
|
+
translateAnchor?: 'map' | 'viewport';
|
|
149
|
+
};
|
|
150
|
+
type TileflowFillStyle = TileflowLayerRange & TileflowFillPaint;
|
|
151
|
+
type TileflowLinePaint = {
|
|
152
|
+
blur?: TileflowNumberStyleValue;
|
|
153
|
+
color?: TileflowColorStyleValue;
|
|
154
|
+
dash?: TileflowNumberArrayStyleValue;
|
|
155
|
+
gapWidth?: TileflowNumberStyleValue;
|
|
156
|
+
offset?: TileflowNumberStyleValue;
|
|
157
|
+
opacity?: TileflowNumberStyleValue;
|
|
158
|
+
pattern?: TileflowImageStyleValue;
|
|
159
|
+
translate?: TileflowNumberOffsetStyleValue;
|
|
160
|
+
translateAnchor?: 'map' | 'viewport';
|
|
161
|
+
width?: TileflowNumberStyleValue;
|
|
162
|
+
};
|
|
163
|
+
type TileflowLineLayout = {
|
|
164
|
+
cap?: TileflowStructuralStyleValue<TileflowLineCap>;
|
|
165
|
+
join?: TileflowStructuralStyleValue<TileflowLineJoin>;
|
|
166
|
+
miterLimit?: TileflowNumberStyleValue;
|
|
167
|
+
roundLimit?: TileflowNumberStyleValue;
|
|
168
|
+
};
|
|
169
|
+
type TileflowLineStyle = TileflowLayerRange & TileflowLinePaint & TileflowLineLayout;
|
|
170
|
+
/** Repeated diagonal marks placed along a stroked geographic feature. */
|
|
171
|
+
type TileflowLineHatchStyle = TileflowLayerRange & {
|
|
172
|
+
angle?: TileflowNumberStyleValue;
|
|
173
|
+
color?: TileflowColorStyleValue;
|
|
174
|
+
opacity?: TileflowNumberStyleValue;
|
|
175
|
+
/** Sprite pattern clipped to the line deck; when set, it replaces glyph hatching. */
|
|
176
|
+
pattern?: TileflowImageStyleValue;
|
|
177
|
+
/**
|
|
178
|
+
* Intrinsic pixel heights available as `${pattern}-${width}` sprites. Tileflow
|
|
179
|
+
* selects the closest height to the rendered line width so marks retain a
|
|
180
|
+
* nearly fixed screen-pixel thickness instead of stretching with the road.
|
|
181
|
+
* Requires `pattern` to be a literal sprite-name prefix.
|
|
182
|
+
*/
|
|
183
|
+
patternWidths?: TileflowThemeNumberArrayValue;
|
|
184
|
+
size?: TileflowNumberStyleValue;
|
|
185
|
+
spacing?: TileflowNumberStyleValue;
|
|
186
|
+
};
|
|
187
|
+
type TileflowTextPaint = {
|
|
188
|
+
color?: TileflowColorStyleValue;
|
|
189
|
+
haloBlur?: TileflowNumberStyleValue;
|
|
190
|
+
haloColor?: TileflowColorStyleValue;
|
|
191
|
+
haloWidth?: TileflowNumberStyleValue;
|
|
192
|
+
opacity?: TileflowNumberStyleValue;
|
|
193
|
+
};
|
|
194
|
+
type TileflowTextLayout = {
|
|
195
|
+
allowOverlap?: boolean;
|
|
196
|
+
anchor?: TileflowTextAnchor;
|
|
197
|
+
field?: TileflowStringStyleValue;
|
|
198
|
+
font?: TileflowThemeFontValue;
|
|
199
|
+
fallbacks?: readonly TileflowThemeFontValue[];
|
|
200
|
+
ignorePlacement?: boolean;
|
|
201
|
+
justify?: TileflowTextJustify;
|
|
202
|
+
keepUpright?: boolean;
|
|
203
|
+
letterSpacing?: TileflowNumberStyleValue;
|
|
204
|
+
lineHeight?: TileflowNumberStyleValue;
|
|
205
|
+
maxAngle?: TileflowNumberStyleValue;
|
|
206
|
+
maxWidth?: TileflowNumberStyleValue;
|
|
207
|
+
offset?: TileflowNumberOffsetStyleValue;
|
|
208
|
+
optional?: boolean;
|
|
209
|
+
padding?: TileflowNumberStyleValue;
|
|
210
|
+
pitchAlignment?: TileflowAlignment;
|
|
211
|
+
radialOffset?: TileflowNumberStyleValue;
|
|
212
|
+
rotate?: TileflowNumberStyleValue;
|
|
213
|
+
rotationAlignment?: TileflowAlignment;
|
|
214
|
+
size?: TileflowNumberStyleValue;
|
|
215
|
+
transform?: 'lowercase' | 'none' | 'uppercase';
|
|
216
|
+
variableAnchors?: readonly TileflowTextAnchor[];
|
|
217
|
+
};
|
|
218
|
+
type TileflowTextStyle = TileflowLayerRange & TileflowTextPaint & TileflowTextLayout;
|
|
219
|
+
type TileflowIconPaint = {
|
|
220
|
+
color?: TileflowColorStyleValue;
|
|
221
|
+
haloBlur?: TileflowNumberStyleValue;
|
|
222
|
+
haloColor?: TileflowColorStyleValue;
|
|
223
|
+
haloWidth?: TileflowNumberStyleValue;
|
|
224
|
+
opacity?: TileflowNumberStyleValue;
|
|
225
|
+
};
|
|
226
|
+
type TileflowIconLayout = {
|
|
227
|
+
allowOverlap?: boolean;
|
|
228
|
+
anchor?: TileflowIconAnchor;
|
|
229
|
+
image?: TileflowImageStyleValue;
|
|
230
|
+
ignorePlacement?: boolean;
|
|
231
|
+
keepUpright?: boolean;
|
|
232
|
+
offset?: TileflowNumberOffsetStyleValue;
|
|
233
|
+
optional?: boolean;
|
|
234
|
+
padding?: TileflowNumberStyleValue;
|
|
235
|
+
pitchAlignment?: TileflowAlignment;
|
|
236
|
+
rotate?: TileflowNumberStyleValue;
|
|
237
|
+
rotationAlignment?: TileflowAlignment;
|
|
238
|
+
size?: TileflowNumberStyleValue;
|
|
239
|
+
textFit?: TileflowIconTextFit;
|
|
240
|
+
textFitPadding?: TileflowNumberInsetsStyleValue;
|
|
241
|
+
};
|
|
242
|
+
type TileflowIconStyle = TileflowLayerRange & TileflowIconPaint & TileflowIconLayout;
|
|
243
|
+
type TileflowSymbolPlacementStyle = TileflowLayerRange & {
|
|
244
|
+
placement?: TileflowSymbolPlacement;
|
|
245
|
+
priority?: TileflowStructuralStyleValue<number>;
|
|
246
|
+
/** Collision order for the semantic priority value. Defaults to `higher-first`. */
|
|
247
|
+
priorityOrder?: TileflowPriorityOrder;
|
|
248
|
+
spacing?: TileflowNumberStyleValue;
|
|
249
|
+
zOrder?: TileflowSymbolZOrder;
|
|
250
|
+
};
|
|
251
|
+
type TileflowCirclePaint = {
|
|
252
|
+
blur?: TileflowNumberStyleValue;
|
|
253
|
+
color?: TileflowColorStyleValue;
|
|
254
|
+
opacity?: TileflowNumberStyleValue;
|
|
255
|
+
pitchAlignment?: 'map' | 'viewport';
|
|
256
|
+
pitchScale?: 'map' | 'viewport';
|
|
257
|
+
priority?: TileflowStructuralStyleValue<number>;
|
|
258
|
+
/** Drawing order for the semantic priority value. Defaults to `higher-first`. */
|
|
259
|
+
priorityOrder?: TileflowPriorityOrder;
|
|
260
|
+
radius?: TileflowNumberStyleValue;
|
|
261
|
+
strokeColor?: TileflowColorStyleValue;
|
|
262
|
+
strokeOpacity?: TileflowNumberStyleValue;
|
|
263
|
+
strokeWidth?: TileflowNumberStyleValue;
|
|
264
|
+
translate?: TileflowNumberOffsetStyleValue;
|
|
265
|
+
translateAnchor?: 'map' | 'viewport';
|
|
266
|
+
};
|
|
267
|
+
type TileflowCircleStyle = TileflowLayerRange & TileflowCirclePaint;
|
|
268
|
+
type TileflowExtrusionPaint = {
|
|
269
|
+
base?: TileflowNumberStyleValue;
|
|
270
|
+
color?: TileflowColorStyleValue;
|
|
271
|
+
height?: TileflowNumberStyleValue;
|
|
272
|
+
opacity?: TileflowNumberStyleValue;
|
|
273
|
+
pattern?: TileflowImageStyleValue;
|
|
274
|
+
verticalGradient?: boolean;
|
|
275
|
+
};
|
|
276
|
+
type TileflowExtrusionStyle = TileflowLayerRange & TileflowExtrusionPaint;
|
|
277
|
+
/** A polygon rendered as a fill and, when requested, a separate line layer. */
|
|
278
|
+
type TileflowAreaStyle = {
|
|
279
|
+
fill?: TileflowFillStyle;
|
|
280
|
+
outline?: TileflowLineStyle;
|
|
281
|
+
};
|
|
282
|
+
/** The canonical ordered phases used for roads, aeroways, and other stroked paths. */
|
|
283
|
+
type TileflowLineStackStyle = {
|
|
284
|
+
casing?: TileflowLineStyle;
|
|
285
|
+
fill?: TileflowLineStyle;
|
|
286
|
+
shadow?: TileflowLineStyle;
|
|
287
|
+
};
|
|
288
|
+
/** A symbol layer composed from one placement policy and optional text/icon parts. */
|
|
289
|
+
type TileflowSymbolStyle = TileflowSymbolPlacementStyle & {
|
|
290
|
+
icon?: TileflowIconStyle;
|
|
291
|
+
text?: TileflowTextStyle;
|
|
292
|
+
};
|
|
293
|
+
/** A symbol style that may also materialize a separate circle marker layer. */
|
|
294
|
+
type TileflowMarkerSymbolStyle = TileflowSymbolStyle & {
|
|
295
|
+
marker?: TileflowCircleStyle;
|
|
296
|
+
};
|
|
297
|
+
|
|
298
|
+
type TileflowColor = `#${string}`;
|
|
299
|
+
type TileflowTypographyStyle = {
|
|
300
|
+
/** Ordered exact fallback face names; CSS generic families are allowed for local fonts. */
|
|
301
|
+
fallbacks?: readonly string[];
|
|
302
|
+
/** Exact OpenType full name or exact remote glyph face name. */
|
|
303
|
+
font?: string;
|
|
304
|
+
letterSpacing?: number;
|
|
305
|
+
transform?: 'lowercase' | 'none' | 'uppercase';
|
|
306
|
+
};
|
|
307
|
+
type ResolvedTileflowTypographyStyle = Required<Pick<TileflowTypographyStyle, 'font'>> & Omit<TileflowTypographyStyle, 'font'>;
|
|
308
|
+
type ResolvedTileflowTypography = ResolvedTileflowTypographyStyle & {
|
|
309
|
+
places: ResolvedTileflowTypographyStyle;
|
|
310
|
+
roads: ResolvedTileflowTypographyStyle;
|
|
311
|
+
water: ResolvedTileflowTypographyStyle;
|
|
312
|
+
poi: ResolvedTileflowTypographyStyle;
|
|
313
|
+
};
|
|
314
|
+
type TileflowTerrainMode = 'none' | 'hillshade' | '3d';
|
|
315
|
+
type TileflowTerrainEncoding = 'mapbox' | 'terrarium';
|
|
316
|
+
type TileflowTerrainLayerRange = {
|
|
317
|
+
maxZoom?: number;
|
|
318
|
+
minZoom?: number;
|
|
319
|
+
visible?: boolean;
|
|
320
|
+
};
|
|
321
|
+
type TileflowTerrainHillshadeStyle = TileflowTerrainLayerRange & {
|
|
322
|
+
accentColor?: TileflowThemeColorValue;
|
|
323
|
+
exaggeration?: TileflowThemeNumberValue;
|
|
324
|
+
highlightColor?: TileflowThemeColorValue;
|
|
325
|
+
illuminationAnchor?: 'map' | 'viewport';
|
|
326
|
+
illuminationDirection?: TileflowThemeNumberValue;
|
|
327
|
+
shadowColor?: TileflowThemeColorValue;
|
|
328
|
+
};
|
|
329
|
+
type TileflowTerrainContourLineStyle = TileflowTerrainLayerRange & {
|
|
330
|
+
color?: TileflowThemeColorValue;
|
|
331
|
+
opacity?: TileflowThemeNumberValue;
|
|
332
|
+
width?: TileflowThemeNumberValue;
|
|
333
|
+
};
|
|
334
|
+
type TileflowTerrainContourLabelStyle = TileflowTerrainLayerRange & {
|
|
335
|
+
color?: TileflowThemeColorValue;
|
|
336
|
+
font?: TileflowThemeFontValue;
|
|
337
|
+
haloColor?: TileflowThemeColorValue;
|
|
338
|
+
haloWidth?: TileflowThemeNumberValue;
|
|
339
|
+
opacity?: TileflowThemeNumberValue;
|
|
340
|
+
size?: TileflowThemeNumberValue;
|
|
341
|
+
spacing?: TileflowThemeNumberValue;
|
|
342
|
+
};
|
|
343
|
+
type TileflowTerrainContoursConfig = {
|
|
344
|
+
/** Maximum native zoom exposed by the DEM tile template. */
|
|
345
|
+
demMaxZoom: number;
|
|
346
|
+
/** Explicit HTTP(S) DEM template containing {z}, {x}, and {y}. */
|
|
347
|
+
demUrl: string;
|
|
348
|
+
index?: TileflowTerrainContourLineStyle;
|
|
349
|
+
labels?: TileflowTerrainContourLabelStyle;
|
|
350
|
+
maxZoom?: number;
|
|
351
|
+
minZoom?: number;
|
|
352
|
+
minor?: TileflowTerrainContourLineStyle;
|
|
353
|
+
multiplier?: number;
|
|
354
|
+
overzoom?: number;
|
|
355
|
+
sourceId?: string;
|
|
356
|
+
/** Zoom-indexed [minor, index] elevation intervals. */
|
|
357
|
+
thresholds: Readonly<Record<number, readonly [number, number]>>;
|
|
358
|
+
};
|
|
359
|
+
type TileflowTerrainConfig = {
|
|
360
|
+
attribution?: string;
|
|
361
|
+
contours?: TileflowTerrainContoursConfig;
|
|
362
|
+
encoding?: TileflowTerrainEncoding;
|
|
363
|
+
exaggeration?: number;
|
|
364
|
+
hillshade?: TileflowTerrainHillshadeStyle;
|
|
365
|
+
mode?: TileflowTerrainMode;
|
|
366
|
+
sourceId?: string;
|
|
367
|
+
url?: string;
|
|
368
|
+
};
|
|
369
|
+
type TileflowTerrain = TileflowTerrainMode | TileflowTerrainConfig;
|
|
370
|
+
type TileflowViewConfig = {
|
|
371
|
+
bearing?: number;
|
|
372
|
+
center?: readonly [number, number];
|
|
373
|
+
pitch?: number;
|
|
374
|
+
zoom?: number;
|
|
375
|
+
};
|
|
376
|
+
type TileflowRoadDetail = 'none' | 'highways' | 'major' | 'streets' | 'all';
|
|
377
|
+
type TileflowRoadClass = 'motorway' | 'trunk' | 'primary' | 'secondary' | 'tertiary' | 'minor' | 'service' | 'track' | 'pathway' | 'footway' | 'cycleway' | 'steps' | 'pedestrian';
|
|
378
|
+
type TileflowRoadHierarchy = 'subtle' | 'clear' | 'strong';
|
|
379
|
+
type TileflowRoadWeight = 'thin' | 'regular' | 'bold';
|
|
380
|
+
type TileflowRoadOutline = 'none' | 'subtle' | 'strong';
|
|
381
|
+
type TileflowRoadStructure = 'bridge' | 'surface' | 'tunnel';
|
|
382
|
+
type TileflowRoadExtras = {
|
|
383
|
+
paths?: boolean;
|
|
384
|
+
};
|
|
385
|
+
type TileflowRoadLayerStyle = TileflowLineStackStyle & {
|
|
386
|
+
hatch?: TileflowLineHatchStyle;
|
|
387
|
+
};
|
|
388
|
+
type TileflowRoadTreatmentLineStyle = Pick<TileflowLinePaint, 'blur' | 'color' | 'dash' | 'gapWidth' | 'offset' | 'opacity' | 'width'>;
|
|
389
|
+
type TileflowRoadTreatmentLayerStyle = {
|
|
390
|
+
casing?: TileflowRoadTreatmentLineStyle;
|
|
391
|
+
fill?: TileflowRoadTreatmentLineStyle;
|
|
392
|
+
shadow?: TileflowRoadTreatmentLineStyle;
|
|
393
|
+
};
|
|
394
|
+
type TileflowRoadTreatmentStyle = Partial<Record<TileflowRoadStructure, TileflowRoadTreatmentLayerStyle>> & {
|
|
395
|
+
enabled?: boolean;
|
|
396
|
+
widthScale?: TileflowThemeNumberValue;
|
|
397
|
+
};
|
|
398
|
+
type TileflowRoadModifier = 'construction' | 'expressway' | 'indoor' | 'official' | 'ramp' | 'unpaved';
|
|
399
|
+
type TileflowRoadRestriction = 'access' | 'bicycle' | 'foot' | 'horse' | 'toll';
|
|
400
|
+
type TileflowMountainBikeScale = '0' | '0+' | '1' | '1+' | '2' | '2+' | '3' | '3+' | '4' | '5' | '6';
|
|
401
|
+
type TileflowRoadServiceType = 'alley' | 'crossover' | 'driveway' | 'parkingAisle' | 'yard';
|
|
402
|
+
type TileflowRoadClassStyle = Partial<Record<TileflowRoadStructure, TileflowRoadLayerStyle>> & {
|
|
403
|
+
enabled?: boolean;
|
|
404
|
+
};
|
|
405
|
+
type TileflowRoadAreaStyle = {
|
|
406
|
+
pedestrian?: TileflowAreaStyle;
|
|
407
|
+
pier?: TileflowAreaStyle;
|
|
408
|
+
road?: TileflowAreaStyle;
|
|
409
|
+
};
|
|
410
|
+
type TileflowRoadCrossingStyle = Omit<TileflowIconStyle, 'image'> & Required<Pick<TileflowIconStyle, 'image'>>;
|
|
411
|
+
type TileflowRoadRoundaboutStyle = {
|
|
412
|
+
casing?: TileflowCircleStyle;
|
|
413
|
+
fill?: TileflowCircleStyle;
|
|
414
|
+
};
|
|
415
|
+
type TileflowRoadSidewalkStyle = {
|
|
416
|
+
outline?: TileflowLineStyle;
|
|
417
|
+
pattern?: TileflowFillStyle;
|
|
418
|
+
surface?: TileflowFillStyle;
|
|
419
|
+
};
|
|
420
|
+
type TileflowRoadsModuleConfig = {
|
|
421
|
+
type: 'roads';
|
|
422
|
+
areas?: TileflowRoadAreaStyle;
|
|
423
|
+
classes?: Partial<Record<TileflowRoadClass, TileflowRoadClassStyle>>;
|
|
424
|
+
crossings?: TileflowRoadCrossingStyle;
|
|
425
|
+
detail?: TileflowRoadDetail;
|
|
426
|
+
extras?: TileflowRoadExtras;
|
|
427
|
+
hierarchy?: TileflowRoadHierarchy;
|
|
428
|
+
modifiers?: Partial<Record<TileflowRoadModifier, TileflowRoadTreatmentStyle>>;
|
|
429
|
+
mountainBike?: Partial<Record<TileflowMountainBikeScale, TileflowRoadTreatmentStyle>>;
|
|
430
|
+
oneWayMarkers?: boolean;
|
|
431
|
+
outline?: TileflowRoadOutline;
|
|
432
|
+
restrictions?: Partial<Record<TileflowRoadRestriction, TileflowRoadTreatmentStyle>>;
|
|
433
|
+
roundabouts?: TileflowRoadRoundaboutStyle;
|
|
434
|
+
serviceTypes?: Partial<Record<TileflowRoadServiceType, TileflowRoadTreatmentStyle>>;
|
|
435
|
+
sidewalks?: TileflowRoadSidewalkStyle;
|
|
436
|
+
structures?: Partial<Record<TileflowRoadStructure, TileflowRoadLayerStyle>>;
|
|
437
|
+
weight?: TileflowRoadWeight;
|
|
438
|
+
widthScale?: Partial<Record<TileflowRoadClass, TileflowThemeNumberValue>>;
|
|
439
|
+
};
|
|
440
|
+
type TileflowRoadsModuleOptions = Omit<TileflowRoadsModuleConfig, 'type'>;
|
|
441
|
+
type TileflowLabelDetail = 'none' | 'major' | 'all';
|
|
442
|
+
type TileflowAerodromeCodeDetail = 'none' | 'iata' | 'all';
|
|
443
|
+
type TileflowRoadLabelDetail = TileflowRoadDetail;
|
|
444
|
+
type TileflowLabelLanguage = 'auto' | 'local' | 'en' | (string & {});
|
|
445
|
+
type TileflowPlaceLabelClass = 'city' | 'continent' | 'country' | 'neighborhood' | 'other' | 'state' | 'town' | 'village';
|
|
446
|
+
type TileflowWaterLabelClass = 'line' | 'ocean' | 'other' | 'waterway';
|
|
447
|
+
type TileflowRoadShieldDetail = 'none' | 'major' | 'all';
|
|
448
|
+
type TileflowLabelCollisionPriority = 'balanced' | 'navigation';
|
|
449
|
+
type TileflowRoadShieldStyles = {
|
|
450
|
+
default?: TileflowSymbolStyle;
|
|
451
|
+
detail?: TileflowSymbolStyle;
|
|
452
|
+
kinds?: Record<string, {
|
|
453
|
+
image: TileflowThemeImageValue;
|
|
454
|
+
}>;
|
|
455
|
+
overview?: TileflowSymbolStyle;
|
|
456
|
+
textColors?: Record<string, {
|
|
457
|
+
color: TileflowThemeColorValue;
|
|
458
|
+
}>;
|
|
459
|
+
};
|
|
460
|
+
type TileflowLabelStyles = {
|
|
461
|
+
aerodrome?: TileflowSymbolStyle;
|
|
462
|
+
junctions?: TileflowSymbolStyle;
|
|
463
|
+
places?: Partial<Record<TileflowPlaceLabelClass, TileflowSymbolStyle>>;
|
|
464
|
+
roads?: Partial<Record<TileflowRoadClass, TileflowSymbolStyle>>;
|
|
465
|
+
shields?: TileflowRoadShieldStyles;
|
|
466
|
+
water?: Partial<Record<TileflowWaterLabelClass, TileflowSymbolStyle>>;
|
|
467
|
+
};
|
|
468
|
+
type TileflowLabelsModuleConfig = {
|
|
469
|
+
type: 'labels';
|
|
470
|
+
aerodromeCodes?: TileflowAerodromeCodeDetail;
|
|
471
|
+
collisionPriority?: TileflowLabelCollisionPriority;
|
|
472
|
+
junctions?: boolean;
|
|
473
|
+
language?: TileflowLabelLanguage;
|
|
474
|
+
places?: TileflowLabelDetail;
|
|
475
|
+
roadClasses?: readonly TileflowRoadClass[];
|
|
476
|
+
roads?: TileflowRoadLabelDetail;
|
|
477
|
+
shields?: TileflowRoadShieldDetail;
|
|
478
|
+
styles?: TileflowLabelStyles;
|
|
479
|
+
water?: TileflowLabelDetail;
|
|
480
|
+
};
|
|
481
|
+
type TileflowLabelsModuleOptions = Omit<TileflowLabelsModuleConfig, 'type'>;
|
|
482
|
+
/** Closed editorial vocabulary emitted by Tileflow World's canonical POI projection. */
|
|
483
|
+
declare const tileflowPoiCategories: readonly ["arts-entertainment", "education", "food-drink", "landmark", "lodging", "medical", "park-nature", "public-services", "religion", "retail", "sport-leisure", "transport", "visitor-amenity"];
|
|
484
|
+
type TileflowPoiCategory = (typeof tileflowPoiCategories)[number];
|
|
485
|
+
type TileflowPoiDensity = 1 | 2 | 3 | 4 | 5;
|
|
486
|
+
type TileflowPoiColorMode = 'uniform' | 'category';
|
|
487
|
+
type TileflowPoiCategoryStyle = Omit<TileflowMarkerSymbolStyle, 'priority'> & {
|
|
488
|
+
/** Optional category-local cap within the module's canonical density tiers. */
|
|
489
|
+
density?: TileflowPoiDensity;
|
|
490
|
+
};
|
|
491
|
+
type TileflowPoiModuleConfig = {
|
|
492
|
+
type: 'poi';
|
|
493
|
+
categories?: readonly TileflowPoiCategory[];
|
|
494
|
+
color?: TileflowPoiColorMode;
|
|
495
|
+
density?: TileflowPoiDensity;
|
|
496
|
+
icons?: boolean;
|
|
497
|
+
labels?: boolean;
|
|
498
|
+
minZoom?: number;
|
|
499
|
+
placement?: {
|
|
500
|
+
coupleIconAndLabel?: boolean;
|
|
501
|
+
iconPadding?: number;
|
|
502
|
+
textPadding?: number;
|
|
503
|
+
};
|
|
504
|
+
styles?: Partial<Record<TileflowPoiCategory, TileflowPoiCategoryStyle>>;
|
|
505
|
+
};
|
|
506
|
+
type TileflowPoiModuleOptions = Omit<TileflowPoiModuleConfig, 'type'>;
|
|
507
|
+
type MapLibreSprite = string | Array<{
|
|
508
|
+
id: string;
|
|
509
|
+
url: string;
|
|
510
|
+
}>;
|
|
511
|
+
type TileflowProjection = 'globe' | 'mercator';
|
|
512
|
+
type TileflowLight = {
|
|
513
|
+
anchor?: 'map' | 'viewport';
|
|
514
|
+
color?: TileflowColor;
|
|
515
|
+
intensity?: number;
|
|
516
|
+
position?: readonly [number, number, number];
|
|
517
|
+
};
|
|
518
|
+
type MapLibreStyle = {
|
|
519
|
+
version: 8;
|
|
520
|
+
name: string;
|
|
521
|
+
glyphs?: string;
|
|
522
|
+
light?: TileflowLight;
|
|
523
|
+
projection?: {
|
|
524
|
+
type: TileflowProjection;
|
|
525
|
+
};
|
|
526
|
+
sprite?: MapLibreSprite;
|
|
527
|
+
sources: Record<string, Record<string, unknown>>;
|
|
528
|
+
layers: Array<Record<string, unknown>>;
|
|
529
|
+
terrain?: Record<string, unknown>;
|
|
530
|
+
metadata?: Record<string, unknown>;
|
|
531
|
+
};
|
|
532
|
+
type ValidationMessage = {
|
|
533
|
+
level: 'error' | 'warning';
|
|
534
|
+
path: string;
|
|
535
|
+
message: string;
|
|
536
|
+
};
|
|
537
|
+
type ValidationResult = {
|
|
538
|
+
valid: boolean;
|
|
539
|
+
messages: ValidationMessage[];
|
|
540
|
+
};
|
|
541
|
+
|
|
542
|
+
declare const defaultTileflowManifestUrl = "/tileflow/manifest.json";
|
|
543
|
+
declare const defaultTileflowRuntimeView: Readonly<{
|
|
544
|
+
bearing: 0;
|
|
545
|
+
center: readonly [number, number];
|
|
546
|
+
pitch: 0;
|
|
547
|
+
zoom: 2;
|
|
548
|
+
}>;
|
|
549
|
+
type TileflowAnalytics = {
|
|
550
|
+
apiUrl?: string;
|
|
551
|
+
endpoint?: string;
|
|
552
|
+
enabled?: boolean;
|
|
553
|
+
mapId?: string;
|
|
554
|
+
metadata?: Record<string, unknown>;
|
|
555
|
+
projectId?: string;
|
|
556
|
+
sdkVersion?: string;
|
|
557
|
+
source?: string;
|
|
558
|
+
styleId?: string;
|
|
559
|
+
surfaceId?: string;
|
|
560
|
+
};
|
|
561
|
+
declare function normalizeTileflowSurfaceId(value: unknown): string;
|
|
562
|
+
type TileflowSessionGrantResponse = {
|
|
563
|
+
billingEnabled?: false;
|
|
564
|
+
disposition?: 'ordinary' | 'unbilled_fail_open';
|
|
565
|
+
expiresAt?: string;
|
|
566
|
+
grant?: string;
|
|
567
|
+
meterMode?: 'disabled' | 'shadow' | 'enforced';
|
|
568
|
+
ok: boolean;
|
|
569
|
+
resourceOrigins?: string[];
|
|
570
|
+
sessionId: string;
|
|
571
|
+
usageMode?: 'session';
|
|
572
|
+
code?: string;
|
|
573
|
+
retryWithNewSession?: boolean;
|
|
574
|
+
};
|
|
575
|
+
type TileflowSessionController = {
|
|
576
|
+
readonly sessionId: string;
|
|
577
|
+
resolveRequestUrl(url: string, analytics: TileflowAnalytics | undefined): Promise<string | undefined>;
|
|
578
|
+
};
|
|
579
|
+
type TileflowMapMode = 'interactive' | 'image';
|
|
580
|
+
type TileflowMapModeOptions = {
|
|
581
|
+
mode?: TileflowMapMode;
|
|
582
|
+
};
|
|
583
|
+
/** Runtime-ready logical map with all relative theme resources already resolved. */
|
|
584
|
+
type TileflowRuntimeManifestMap = TileflowRuntimeManifestMapEntry & {
|
|
585
|
+
apiUrl?: string;
|
|
586
|
+
name: string;
|
|
587
|
+
};
|
|
588
|
+
/** `system` is a selector and therefore reserved as a published theme name. */
|
|
589
|
+
type TileflowThemeSelection = string | 'system';
|
|
590
|
+
type TileflowResolvedRuntimeTheme = TileflowRuntimeManifestTheme & {
|
|
591
|
+
name: string;
|
|
592
|
+
};
|
|
593
|
+
type TileflowRuntimeStyle = {
|
|
594
|
+
analytics?: TileflowAnalytics;
|
|
595
|
+
colorScheme?: TileflowRuntimeColorScheme;
|
|
596
|
+
/** An explicit empty array means the manifest declares that no web fonts are required. */
|
|
597
|
+
fontFaces?: TileflowStyleFontFace[];
|
|
598
|
+
revision?: string;
|
|
599
|
+
style: MapLibreStyle | string;
|
|
600
|
+
theme?: string;
|
|
601
|
+
};
|
|
602
|
+
declare const tileflowStyleFontFacesMetadataKey: "tileflow:fontFaces";
|
|
603
|
+
declare const tileflowStyleFontFaceLimits: Readonly<{
|
|
604
|
+
maximumCount: 16;
|
|
605
|
+
maximumSourceLength: 2048;
|
|
606
|
+
}>;
|
|
607
|
+
type TileflowStyleFontFace = {
|
|
608
|
+
family: string;
|
|
609
|
+
source: string;
|
|
610
|
+
style?: 'italic' | 'normal' | 'oblique';
|
|
611
|
+
weight?: '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900';
|
|
612
|
+
};
|
|
613
|
+
/** Browser input is either one published Tileflow map or one direct MapLibre style. */
|
|
614
|
+
type TileflowRuntimeSource = {
|
|
615
|
+
kind: 'tileflow';
|
|
616
|
+
manifestUrl?: string;
|
|
617
|
+
map: string;
|
|
618
|
+
} | {
|
|
619
|
+
kind: 'maplibre';
|
|
620
|
+
style: MapLibreStyle | string;
|
|
621
|
+
};
|
|
622
|
+
type TileflowRuntimeStyleOptions = {
|
|
623
|
+
colorScheme?: TileflowRuntimeColorScheme;
|
|
624
|
+
manifestMap?: TileflowRuntimeManifestMap | null;
|
|
625
|
+
source: TileflowRuntimeSource;
|
|
626
|
+
theme?: TileflowThemeSelection;
|
|
627
|
+
};
|
|
628
|
+
type TileflowRuntimeSourceValidation = {
|
|
629
|
+
ok: true;
|
|
630
|
+
} | {
|
|
631
|
+
code: 'invalid-source' | 'missing-source';
|
|
632
|
+
error: string;
|
|
633
|
+
ok: false;
|
|
634
|
+
};
|
|
635
|
+
type TileflowManifestLoadOptions = {
|
|
636
|
+
source: TileflowRuntimeSource;
|
|
637
|
+
};
|
|
638
|
+
type TileflowManifestFetchOptions = {
|
|
639
|
+
/** Successful manifests are shared for this duration. Set to 0 to bypass the cache. */
|
|
640
|
+
cacheTtlMs?: number;
|
|
641
|
+
fetch?: typeof globalThis.fetch;
|
|
642
|
+
signal?: AbortSignal;
|
|
643
|
+
/** Hard request timeout in milliseconds. Defaults to 10 seconds and is capped at 60 seconds. */
|
|
644
|
+
timeoutMs?: number;
|
|
645
|
+
};
|
|
646
|
+
type TileflowRuntimeViewOptions = TileflowViewConfig & {
|
|
647
|
+
fallback?: TileflowViewConfig;
|
|
648
|
+
manifestMap?: TileflowRuntimeManifestMap | null;
|
|
649
|
+
};
|
|
650
|
+
type TileflowRuntimeCenterLike = readonly [number, number] | {
|
|
651
|
+
lat: number;
|
|
652
|
+
lng: number;
|
|
653
|
+
} | {
|
|
654
|
+
lat: number;
|
|
655
|
+
lon: number;
|
|
656
|
+
};
|
|
657
|
+
declare function shouldLoadTileflowManifest(options: TileflowManifestLoadOptions): boolean;
|
|
658
|
+
declare function validateTileflowRuntimeSource(source: unknown): TileflowRuntimeSourceValidation;
|
|
659
|
+
/** Validate the only runtime selection grammar: one concrete portable name or `system`. */
|
|
660
|
+
declare function validateTileflowThemeSelection(value: unknown): value is TileflowThemeSelection;
|
|
661
|
+
declare function assertValidTileflowRuntimeSource(source: unknown): asserts source is TileflowRuntimeSource;
|
|
662
|
+
declare function resolveTileflowRuntimeStyle(options: TileflowRuntimeStyleOptions): TileflowRuntimeStyle | null;
|
|
663
|
+
/** Resolve one concrete published theme without consulting ambient browser state. */
|
|
664
|
+
declare function resolveTileflowRuntimeTheme(map: TileflowRuntimeManifestMap, selection: TileflowThemeSelection | undefined, colorScheme?: TileflowRuntimeColorScheme): TileflowResolvedRuntimeTheme;
|
|
665
|
+
/** Strictly reads Tileflow-owned web-font metadata from a compiled MapLibre style. */
|
|
666
|
+
declare function getTileflowStyleFontFaces(style: Pick<MapLibreStyle, 'metadata'>): TileflowStyleFontFace[];
|
|
667
|
+
declare function normalizeTileflowUrl(value: string): string;
|
|
668
|
+
declare function createTileflowSessionId(): string;
|
|
669
|
+
declare function createTileflowSessionController(input: {
|
|
670
|
+
fetch?: typeof fetch;
|
|
671
|
+
grantTimeoutMs?: number;
|
|
672
|
+
now?: () => Date;
|
|
673
|
+
sessionIdFactory?: () => string;
|
|
674
|
+
source: string;
|
|
675
|
+
}): TileflowSessionController;
|
|
676
|
+
declare function resolveTileflowAnalyticsRequestUrl(url: string, analytics: TileflowAnalytics | undefined, sessionId: string): string | undefined;
|
|
677
|
+
declare function startTileflowSession(analytics: TileflowAnalytics | undefined, input: {
|
|
678
|
+
mapId?: string;
|
|
679
|
+
sessionId: string;
|
|
680
|
+
source: string;
|
|
681
|
+
styleId?: string;
|
|
682
|
+
}): void;
|
|
683
|
+
declare function getTileflowAnalyticsApiUrl(analytics: TileflowAnalytics): string;
|
|
684
|
+
declare function mergeTileflowAnalytics(userAnalytics: TileflowAnalytics | undefined, runtimeAnalytics: TileflowAnalytics | undefined): TileflowAnalytics | undefined;
|
|
685
|
+
declare function resolveTileflowMapMode(options: TileflowMapModeOptions): TileflowMapMode;
|
|
686
|
+
declare function resolveTileflowRuntimeView(options: TileflowRuntimeViewOptions): TileflowViewConfig;
|
|
687
|
+
declare function normalizeTileflowRuntimeCenter(center: TileflowRuntimeCenterLike | undefined, fallback?: readonly [number, number]): [number, number];
|
|
688
|
+
declare function loadTileflowManifest(url: string, options?: TileflowManifestFetchOptions): Promise<TileflowRuntimeManifest | null>;
|
|
689
|
+
declare function clearTileflowManifestCache(url?: string): void;
|
|
690
|
+
declare function resolveTileflowManifestMap(manifest: TileflowRuntimeManifest, mapName: string): TileflowRuntimeManifestMap | null;
|
|
691
|
+
declare function resolveTileflowStaticImageUrl(input: {
|
|
692
|
+
center: [number, number];
|
|
693
|
+
colorScheme?: TileflowRuntimeColorScheme;
|
|
694
|
+
imageSize: {
|
|
695
|
+
height: number;
|
|
696
|
+
width: number;
|
|
697
|
+
} | null;
|
|
698
|
+
manifestMap: TileflowRuntimeManifestMap | null;
|
|
699
|
+
theme?: TileflowThemeSelection;
|
|
700
|
+
zoom: number;
|
|
701
|
+
}): string | undefined;
|
|
702
|
+
declare function normalizeTileflowStaticImageSize(input: {
|
|
703
|
+
height: number;
|
|
704
|
+
width: number;
|
|
705
|
+
}): {
|
|
706
|
+
height: number;
|
|
707
|
+
width: number;
|
|
708
|
+
};
|
|
709
|
+
declare function inferTileflowAnalyticsFromStyleUrl(styleUrl: string): TileflowAnalytics | undefined;
|
|
710
|
+
|
|
711
|
+
/** The first and only public multi-theme runtime manifest contract. */
|
|
712
|
+
declare const tileflowRuntimeManifestVersion: 1;
|
|
713
|
+
declare const tileflowRuntimeManifestLimits: Readonly<{
|
|
714
|
+
maximumBytes: number;
|
|
715
|
+
}>;
|
|
716
|
+
type TileflowRuntimeColorScheme = 'dark' | 'light';
|
|
717
|
+
type TileflowRuntimeManifestTheme = {
|
|
718
|
+
colorScheme: TileflowRuntimeColorScheme;
|
|
719
|
+
/** Complete font closure for this compiled theme. */
|
|
720
|
+
fontFaces?: TileflowStyleFontFace[];
|
|
721
|
+
/** Content or deployment revision used for cache identity and receipts. */
|
|
722
|
+
revision?: string;
|
|
723
|
+
/** Hosted style identity, when different from the logical map identity. */
|
|
724
|
+
styleId?: string;
|
|
725
|
+
styleUrl: string;
|
|
726
|
+
};
|
|
727
|
+
type TileflowRuntimeSystemThemes = {
|
|
728
|
+
dark: string;
|
|
729
|
+
light: string;
|
|
730
|
+
};
|
|
731
|
+
type TileflowRuntimeManifestMapEntry = {
|
|
732
|
+
apiUrl?: string;
|
|
733
|
+
defaultTheme: string;
|
|
734
|
+
environment?: string;
|
|
735
|
+
mapId?: string;
|
|
736
|
+
systemThemes?: TileflowRuntimeSystemThemes;
|
|
737
|
+
themes: Record<string, TileflowRuntimeManifestTheme>;
|
|
738
|
+
usageMode?: 'session';
|
|
739
|
+
view?: TileflowViewConfig;
|
|
740
|
+
worldGeneration?: 'v1';
|
|
741
|
+
};
|
|
742
|
+
/**
|
|
743
|
+
* One logical map catalog for local and Hosted delivery.
|
|
744
|
+
*
|
|
745
|
+
* Delivery-specific fields are optional metadata on a map. The wire shape never forks into
|
|
746
|
+
* self-hosted and Hosted variants, so every runtime follows the same theme resolution path.
|
|
747
|
+
*/
|
|
748
|
+
type TileflowRuntimeManifest = {
|
|
749
|
+
apiUrl?: string;
|
|
750
|
+
maps: Record<string, TileflowRuntimeManifestMapEntry>;
|
|
751
|
+
version: typeof tileflowRuntimeManifestVersion;
|
|
752
|
+
};
|
|
753
|
+
declare const tileflowRuntimeManifestSchema: z.ZodType<TileflowRuntimeManifest>;
|
|
754
|
+
declare function parseTileflowRuntimeManifest(input: unknown): TileflowRuntimeManifest;
|
|
755
|
+
declare function safeParseTileflowRuntimeManifest(input: unknown): z.ZodSafeParseResult<TileflowRuntimeManifest>;
|
|
756
|
+
|
|
757
|
+
export { type TileflowNumberInsetsStyleValue as $, type TileflowFillPaint as A, type TileflowIconAnchor as B, type TileflowIconLayout as C, type TileflowIconPaint as D, type TileflowIconStyle as E, type TileflowIconTextFit as F, type TileflowImageStyleValue as G, type TileflowLabelDetail as H, type TileflowLabelLanguage as I, type TileflowLabelStyles as J, type TileflowLayerRange as K, type TileflowLight as L, type MapLibreStyle as M, type TileflowLineCap as N, type TileflowLineHatchStyle as O, type TileflowLineJoin as P, type TileflowLineLayout as Q, type TileflowLinePaint as R, type TileflowLineStackStyle as S, type TileflowRuntimeManifest as T, type TileflowManifestFetchOptions as U, type ValidationMessage as V, type TileflowManifestLoadOptions as W, type TileflowMapMode as X, type TileflowMapModeOptions as Y, type TileflowMarkerSymbolStyle as Z, type TileflowMountainBikeScale as _, type TileflowExpression as a, type TileflowTextPaint as a$, type TileflowNumberStyleValue as a0, type TileflowPlaceLabelClass as a1, type TileflowPoiCategory as a2, type TileflowPoiCategoryStyle as a3, type TileflowPoiColorMode as a4, type TileflowPoiDensity as a5, type TileflowPriorityOrder as a6, type TileflowProjection as a7, type TileflowResolvedRuntimeTheme as a8, type TileflowRoadAreaStyle as a9, type TileflowRuntimeSource as aA, type TileflowRuntimeSourceValidation as aB, type TileflowRuntimeStyle as aC, type TileflowRuntimeStyleOptions as aD, type TileflowRuntimeSystemThemes as aE, type TileflowRuntimeViewOptions as aF, type TileflowSessionController as aG, type TileflowSessionGrantResponse as aH, type TileflowStringStyleValue as aI, type TileflowStructuralStyleValue as aJ, type TileflowStyleFontFace as aK, type TileflowStyleValue as aL, type TileflowSymbolPlacement as aM, type TileflowSymbolPlacementStyle as aN, type TileflowSymbolZOrder as aO, type TileflowTerrain as aP, type TileflowTerrainConfig as aQ, type TileflowTerrainContourLabelStyle as aR, type TileflowTerrainContourLineStyle as aS, type TileflowTerrainContoursConfig as aT, type TileflowTerrainEncoding as aU, type TileflowTerrainHillshadeStyle as aV, type TileflowTerrainLayerRange as aW, type TileflowTerrainMode as aX, type TileflowTextAnchor as aY, type TileflowTextJustify as aZ, type TileflowTextLayout as a_, type TileflowRoadClass as aa, type TileflowRoadClassStyle as ab, type TileflowRoadCrossingStyle as ac, type TileflowRoadDetail as ad, type TileflowRoadExtras as ae, type TileflowRoadHierarchy as af, type TileflowRoadLabelDetail as ag, type TileflowRoadLayerStyle as ah, type TileflowRoadModifier as ai, type TileflowRoadOutline as aj, type TileflowRoadRestriction as ak, type TileflowRoadRoundaboutStyle as al, type TileflowRoadServiceType as am, type TileflowRoadShieldDetail as an, type TileflowRoadShieldStyles as ao, type TileflowRoadSidewalkStyle as ap, type TileflowRoadStructure as aq, type TileflowRoadTreatmentLayerStyle as ar, type TileflowRoadTreatmentLineStyle as as, type TileflowRoadTreatmentStyle as at, type TileflowRoadWeight as au, type TileflowRuntimeCenterLike as av, type TileflowRuntimeColorScheme as aw, type TileflowRuntimeManifestMap as ax, type TileflowRuntimeManifestMapEntry as ay, type TileflowRuntimeManifestTheme as az, type TileflowFixedValue as b, type TileflowTextStyle as b0, type TileflowThemeColorAlpha as b1, type TileflowThemeColorMix as b2, type TileflowThemeColorValue as b3, type TileflowThemeFontValue as b4, type TileflowThemeImageValue as b5, type TileflowThemeNumberValue as b6, type TileflowThemeSelection as b7, type TileflowThemeTokenCategory as b8, type TileflowThemeValue as b9, resolveTileflowRuntimeTheme as bA, resolveTileflowRuntimeView as bB, resolveTileflowStaticImageUrl as bC, safeParseTileflowRuntimeManifest as bD, shouldLoadTileflowManifest as bE, startTileflowSession as bF, tileflowPoiCategories as bG, tileflowRuntimeManifestLimits as bH, tileflowRuntimeManifestSchema as bI, tileflowRuntimeManifestVersion as bJ, tileflowStyleFontFaceLimits as bK, tileflowStyleFontFacesMetadataKey as bL, tileflowThemeTokenCategories as bM, token as bN, validateTileflowRuntimeSource as bO, validateTileflowThemeSelection as bP, zoom as bQ, type TileflowTypographyStyle as bR, type ResolvedTileflowTypography as bS, normalizeTileflowSurfaceId as bT, type TileflowViewConfig as ba, type TileflowWaterLabelClass as bb, type TileflowZoomInterpolation as bc, type TileflowZoomValue as bd, type ValidationResult as be, assertValidTileflowRuntimeSource as bf, clearTileflowManifestCache as bg, color as bh, createTileflowSessionController as bi, createTileflowSessionId as bj, defaultTileflowManifestUrl as bk, defaultTileflowRuntimeView as bl, fixed as bm, getTileflowAnalyticsApiUrl as bn, getTileflowStyleFontFaces as bo, inferTileflowAnalyticsFromStyleUrl as bp, loadTileflowManifest as bq, mergeTileflowAnalytics as br, normalizeTileflowRuntimeCenter as bs, normalizeTileflowStaticImageSize as bt, normalizeTileflowUrl as bu, parseTileflowRuntimeManifest as bv, resolveTileflowAnalyticsRequestUrl as bw, resolveTileflowManifestMap as bx, resolveTileflowMapMode as by, resolveTileflowRuntimeStyle as bz, type TileflowThemeTokenReference as c, type TileflowThemeColorOperation as d, type TileflowBackgroundStyle as e, type TileflowCircleStyle as f, type TileflowExtrusionStyle as g, type TileflowFillStyle as h, type TileflowLineStyle as i, type TileflowSymbolStyle as j, type TileflowRoadsModuleOptions as k, type TileflowRoadsModuleConfig as l, type TileflowLabelsModuleOptions as m, type TileflowLabelsModuleConfig as n, type TileflowPoiModuleOptions as o, type TileflowPoiModuleConfig as p, type MapLibreSprite as q, type TileflowAerodromeCodeDetail as r, type TileflowAlignment as s, type TileflowAnalytics as t, type TileflowAreaStyle as u, type TileflowBackgroundPaint as v, type TileflowCirclePaint as w, type TileflowColor as x, type TileflowColorStyleValue as y, type TileflowExtrusionPaint as z };
|