@tileflow/core 0.1.0-alpha.14 → 0.1.0-alpha.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +119 -6
- package/dist/browser.d.ts +74 -0
- package/dist/browser.js +320 -0
- package/dist/index.d.ts +701 -464
- package/dist/index.js +1491 -282
- package/dist/runtime-BMZ_tuba.d.ts +656 -0
- package/package.json +13 -5
|
@@ -0,0 +1,656 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
declare const tileflowCaptureSceneSchemaVersion: 1;
|
|
4
|
+
declare const tileflowCaptureSceneLimits: Readonly<{
|
|
5
|
+
applicationPathLength: 2048;
|
|
6
|
+
boundsPadding: {
|
|
7
|
+
maximum: number;
|
|
8
|
+
minimum: number;
|
|
9
|
+
};
|
|
10
|
+
captureIdLength: 64;
|
|
11
|
+
maximumPhysicalPixels: 16777216;
|
|
12
|
+
pitch: {
|
|
13
|
+
maximum: number;
|
|
14
|
+
minimum: number;
|
|
15
|
+
};
|
|
16
|
+
selectorLength: 256;
|
|
17
|
+
viewport: {
|
|
18
|
+
maximum: number;
|
|
19
|
+
minimum: number;
|
|
20
|
+
};
|
|
21
|
+
zoom: {
|
|
22
|
+
maximum: number;
|
|
23
|
+
minimum: number;
|
|
24
|
+
};
|
|
25
|
+
}>;
|
|
26
|
+
declare const tileflowCaptureCenterCameraSchema: z.ZodObject<{
|
|
27
|
+
type: z.ZodLiteral<"center">;
|
|
28
|
+
center: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
29
|
+
zoom: z.ZodNumber;
|
|
30
|
+
bearing: z.ZodOptional<z.ZodNumber>;
|
|
31
|
+
pitch: z.ZodOptional<z.ZodNumber>;
|
|
32
|
+
}, z.core.$strict>;
|
|
33
|
+
declare const tileflowCaptureBoundsCameraSchema: z.ZodObject<{
|
|
34
|
+
type: z.ZodLiteral<"bounds">;
|
|
35
|
+
bounds: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
36
|
+
padding: z.ZodOptional<z.ZodNumber>;
|
|
37
|
+
bearing: z.ZodOptional<z.ZodNumber>;
|
|
38
|
+
pitch: z.ZodOptional<z.ZodNumber>;
|
|
39
|
+
}, z.core.$strict>;
|
|
40
|
+
declare const tileflowCaptureCameraSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
41
|
+
type: z.ZodLiteral<"center">;
|
|
42
|
+
center: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
43
|
+
zoom: z.ZodNumber;
|
|
44
|
+
bearing: z.ZodOptional<z.ZodNumber>;
|
|
45
|
+
pitch: z.ZodOptional<z.ZodNumber>;
|
|
46
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
47
|
+
type: z.ZodLiteral<"bounds">;
|
|
48
|
+
bounds: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
49
|
+
padding: z.ZodOptional<z.ZodNumber>;
|
|
50
|
+
bearing: z.ZodOptional<z.ZodNumber>;
|
|
51
|
+
pitch: z.ZodOptional<z.ZodNumber>;
|
|
52
|
+
}, z.core.$strict>], "type">;
|
|
53
|
+
declare const tileflowCaptureViewportSchema: z.ZodObject<{
|
|
54
|
+
width: z.ZodNumber;
|
|
55
|
+
height: z.ZodNumber;
|
|
56
|
+
dpr: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
|
|
57
|
+
}, z.core.$strict>;
|
|
58
|
+
declare const tileflowCaptureIdSchema: z.ZodString;
|
|
59
|
+
declare const tileflowCaptureSceneNameSchema: z.ZodString;
|
|
60
|
+
declare const tileflowCaptureMapTargetSchema: z.ZodObject<{
|
|
61
|
+
kind: z.ZodLiteral<"map">;
|
|
62
|
+
}, z.core.$strict>;
|
|
63
|
+
declare const tileflowCaptureApplicationTargetSchema: z.ZodObject<{
|
|
64
|
+
kind: z.ZodLiteral<"application">;
|
|
65
|
+
path: z.ZodString;
|
|
66
|
+
captureId: z.ZodOptional<z.ZodString>;
|
|
67
|
+
selector: z.ZodOptional<z.ZodString>;
|
|
68
|
+
frame: z.ZodOptional<z.ZodEnum<{
|
|
69
|
+
map: "map";
|
|
70
|
+
viewport: "viewport";
|
|
71
|
+
}>>;
|
|
72
|
+
}, z.core.$strict>;
|
|
73
|
+
declare const tileflowCaptureTargetSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
74
|
+
kind: z.ZodLiteral<"map">;
|
|
75
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
76
|
+
kind: z.ZodLiteral<"application">;
|
|
77
|
+
path: z.ZodString;
|
|
78
|
+
captureId: z.ZodOptional<z.ZodString>;
|
|
79
|
+
selector: z.ZodOptional<z.ZodString>;
|
|
80
|
+
frame: z.ZodOptional<z.ZodEnum<{
|
|
81
|
+
map: "map";
|
|
82
|
+
viewport: "viewport";
|
|
83
|
+
}>>;
|
|
84
|
+
}, z.core.$strict>], "kind">;
|
|
85
|
+
declare const tileflowCaptureSceneSchema: z.ZodObject<{
|
|
86
|
+
map: z.ZodString;
|
|
87
|
+
camera: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
88
|
+
type: z.ZodLiteral<"center">;
|
|
89
|
+
center: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
90
|
+
zoom: z.ZodNumber;
|
|
91
|
+
bearing: z.ZodOptional<z.ZodNumber>;
|
|
92
|
+
pitch: z.ZodOptional<z.ZodNumber>;
|
|
93
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
94
|
+
type: z.ZodLiteral<"bounds">;
|
|
95
|
+
bounds: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
96
|
+
padding: z.ZodOptional<z.ZodNumber>;
|
|
97
|
+
bearing: z.ZodOptional<z.ZodNumber>;
|
|
98
|
+
pitch: z.ZodOptional<z.ZodNumber>;
|
|
99
|
+
}, z.core.$strict>], "type">;
|
|
100
|
+
viewport: z.ZodObject<{
|
|
101
|
+
width: z.ZodNumber;
|
|
102
|
+
height: z.ZodNumber;
|
|
103
|
+
dpr: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
|
|
104
|
+
}, z.core.$strict>;
|
|
105
|
+
target: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
106
|
+
kind: z.ZodLiteral<"map">;
|
|
107
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
108
|
+
kind: z.ZodLiteral<"application">;
|
|
109
|
+
path: z.ZodString;
|
|
110
|
+
captureId: z.ZodOptional<z.ZodString>;
|
|
111
|
+
selector: z.ZodOptional<z.ZodString>;
|
|
112
|
+
frame: z.ZodOptional<z.ZodEnum<{
|
|
113
|
+
map: "map";
|
|
114
|
+
viewport: "viewport";
|
|
115
|
+
}>>;
|
|
116
|
+
}, z.core.$strict>], "kind">>;
|
|
117
|
+
}, z.core.$strict>;
|
|
118
|
+
type TileflowCaptureCenterCamera = z.infer<typeof tileflowCaptureCenterCameraSchema>;
|
|
119
|
+
type TileflowCaptureBoundsCamera = z.infer<typeof tileflowCaptureBoundsCameraSchema>;
|
|
120
|
+
type TileflowCaptureCamera = z.infer<typeof tileflowCaptureCameraSchema>;
|
|
121
|
+
type TileflowCaptureViewport = z.infer<typeof tileflowCaptureViewportSchema>;
|
|
122
|
+
type TileflowCaptureMapTarget = z.infer<typeof tileflowCaptureMapTargetSchema>;
|
|
123
|
+
type TileflowCaptureApplicationTarget = z.infer<typeof tileflowCaptureApplicationTargetSchema>;
|
|
124
|
+
type TileflowCaptureTarget = z.infer<typeof tileflowCaptureTargetSchema>;
|
|
125
|
+
type TileflowCaptureScene = z.infer<typeof tileflowCaptureSceneSchema>;
|
|
126
|
+
type NormalizedTileflowCaptureScene = {
|
|
127
|
+
map: string;
|
|
128
|
+
camera: {
|
|
129
|
+
type: 'center';
|
|
130
|
+
center: [number, number];
|
|
131
|
+
zoom: number;
|
|
132
|
+
bearing: number;
|
|
133
|
+
pitch: number;
|
|
134
|
+
} | {
|
|
135
|
+
type: 'bounds';
|
|
136
|
+
bounds: [number, number, number, number];
|
|
137
|
+
padding: number;
|
|
138
|
+
bearing: number;
|
|
139
|
+
pitch: number;
|
|
140
|
+
};
|
|
141
|
+
viewport: {
|
|
142
|
+
width: number;
|
|
143
|
+
height: number;
|
|
144
|
+
dpr: 1 | 2;
|
|
145
|
+
};
|
|
146
|
+
target: {
|
|
147
|
+
kind: 'map';
|
|
148
|
+
} | {
|
|
149
|
+
kind: 'application';
|
|
150
|
+
path: string;
|
|
151
|
+
captureId?: string;
|
|
152
|
+
selector?: string;
|
|
153
|
+
frame: 'map' | 'viewport';
|
|
154
|
+
};
|
|
155
|
+
};
|
|
156
|
+
declare function normalizeTileflowCaptureScene(input: TileflowCaptureScene): NormalizedTileflowCaptureScene;
|
|
157
|
+
declare function normalizeTileflowCaptureId(value: string | undefined): string | undefined;
|
|
158
|
+
|
|
159
|
+
type TileflowDensity = 'clean' | 'balanced' | 'dense';
|
|
160
|
+
type TileflowRoads = 'hidden' | 'soft' | 'standard' | 'detailed';
|
|
161
|
+
type TileflowLabels = 'none' | 'essential' | 'balanced' | 'full';
|
|
162
|
+
type TileflowPoi = 'none' | 'minimal' | 'balanced' | 'full';
|
|
163
|
+
type TileflowLabelDetail = 'none' | 'major' | 'all';
|
|
164
|
+
type TileflowRoadLabelDetail = TileflowRoadDetail;
|
|
165
|
+
type TileflowLabelLanguage = 'auto' | 'local' | 'en' | (string & {});
|
|
166
|
+
type TileflowPoiCategory = 'food' | 'coffee' | 'culture' | 'transit' | 'shopping' | 'lodging' | 'health' | 'education' | 'services' | (string & {});
|
|
167
|
+
type TileflowPoiIcons = boolean | 'essential' | 'full';
|
|
168
|
+
type TileflowPoiLabels = 'none' | 'minimal' | 'balanced' | 'full';
|
|
169
|
+
type TileflowPoiDensity = 'sparse' | 'balanced' | 'dense';
|
|
170
|
+
type TileflowPoiColorMode = 'uniform' | 'category';
|
|
171
|
+
type TileflowPoiClassMapping = Record<string, readonly string[]>;
|
|
172
|
+
type TileflowTheme = 'standard' | 'light' | 'dark' | 'minimal' | 'osm-bright-2';
|
|
173
|
+
type TileflowBuildings = 'hidden' | 'flat' | '3d';
|
|
174
|
+
type TileflowTerrainMode = 'none' | 'hillshade' | '3d';
|
|
175
|
+
type TileflowTerrainEncoding = 'mapbox' | 'terrarium';
|
|
176
|
+
type TileflowRenderer = 'auto' | 'osm-bright' | 'generated';
|
|
177
|
+
type TileflowThemeName = string;
|
|
178
|
+
type TileflowThemeMode = 'light' | 'dark';
|
|
179
|
+
type TileflowColor = `#${string}`;
|
|
180
|
+
type TileflowBaseColors = {
|
|
181
|
+
background: TileflowColor;
|
|
182
|
+
land: TileflowColor;
|
|
183
|
+
water: TileflowColor;
|
|
184
|
+
park: TileflowColor;
|
|
185
|
+
building: TileflowColor;
|
|
186
|
+
road: TileflowColor;
|
|
187
|
+
roadMajor: TileflowColor;
|
|
188
|
+
boundary: TileflowColor;
|
|
189
|
+
text: TileflowColor;
|
|
190
|
+
textMuted: TileflowColor;
|
|
191
|
+
textHalo: TileflowColor;
|
|
192
|
+
};
|
|
193
|
+
type LegacyTileflowColorAliases = {
|
|
194
|
+
accent?: TileflowColor;
|
|
195
|
+
canvas?: TileflowColor;
|
|
196
|
+
background?: TileflowColor;
|
|
197
|
+
greenspace?: TileflowColor;
|
|
198
|
+
nature?: TileflowColor;
|
|
199
|
+
park?: TileflowColor;
|
|
200
|
+
roadCasing?: TileflowColor;
|
|
201
|
+
};
|
|
202
|
+
type TileflowRoadColorConfig = {
|
|
203
|
+
bridge?: TileflowColor;
|
|
204
|
+
casing?: TileflowColor;
|
|
205
|
+
ferry?: TileflowColor;
|
|
206
|
+
minor?: TileflowColor;
|
|
207
|
+
motorway?: TileflowColor;
|
|
208
|
+
path?: TileflowColor;
|
|
209
|
+
primary?: TileflowColor;
|
|
210
|
+
rail?: TileflowColor;
|
|
211
|
+
secondary?: TileflowColor;
|
|
212
|
+
trunk?: TileflowColor;
|
|
213
|
+
tunnel?: TileflowColor;
|
|
214
|
+
};
|
|
215
|
+
type TileflowLabelColorConfig = {
|
|
216
|
+
country?: TileflowColor;
|
|
217
|
+
halo?: TileflowColor;
|
|
218
|
+
muted?: TileflowColor;
|
|
219
|
+
neighborhood?: TileflowColor;
|
|
220
|
+
poi?: TileflowColor;
|
|
221
|
+
primary?: TileflowColor;
|
|
222
|
+
road?: TileflowColor;
|
|
223
|
+
settlement?: TileflowColor;
|
|
224
|
+
water?: TileflowColor;
|
|
225
|
+
};
|
|
226
|
+
type TileflowPoiColorConfig = {
|
|
227
|
+
coffee?: TileflowColor;
|
|
228
|
+
culture?: TileflowColor;
|
|
229
|
+
education?: TileflowColor;
|
|
230
|
+
food?: TileflowColor;
|
|
231
|
+
halo?: TileflowColor;
|
|
232
|
+
health?: TileflowColor;
|
|
233
|
+
icon?: TileflowColor;
|
|
234
|
+
label?: TileflowColor;
|
|
235
|
+
lodging?: TileflowColor;
|
|
236
|
+
services?: TileflowColor;
|
|
237
|
+
shopping?: TileflowColor;
|
|
238
|
+
transit?: TileflowColor;
|
|
239
|
+
};
|
|
240
|
+
type TileflowLanduseColorConfig = {
|
|
241
|
+
cemetery?: TileflowColor;
|
|
242
|
+
civic?: TileflowColor;
|
|
243
|
+
commercial?: TileflowColor;
|
|
244
|
+
industrial?: TileflowColor;
|
|
245
|
+
residential?: TileflowColor;
|
|
246
|
+
};
|
|
247
|
+
type TileflowLandcoverColorConfig = {
|
|
248
|
+
grass?: TileflowColor;
|
|
249
|
+
ice?: TileflowColor;
|
|
250
|
+
park?: TileflowColor;
|
|
251
|
+
protected?: TileflowColor;
|
|
252
|
+
sand?: TileflowColor;
|
|
253
|
+
wood?: TileflowColor;
|
|
254
|
+
};
|
|
255
|
+
type TileflowHydroColorConfig = {
|
|
256
|
+
ferry?: TileflowColor;
|
|
257
|
+
label?: TileflowColor;
|
|
258
|
+
water?: TileflowColor;
|
|
259
|
+
waterway?: TileflowColor;
|
|
260
|
+
};
|
|
261
|
+
type TileflowBuildingColorConfig = {
|
|
262
|
+
extrusion?: TileflowColor;
|
|
263
|
+
fill?: TileflowColor;
|
|
264
|
+
highRise?: TileflowColor;
|
|
265
|
+
highRiseOutline?: TileflowColor;
|
|
266
|
+
lowRise?: TileflowColor;
|
|
267
|
+
lowRiseOutline?: TileflowColor;
|
|
268
|
+
outline?: TileflowColor;
|
|
269
|
+
};
|
|
270
|
+
type TileflowBuildingStyleConfig = {
|
|
271
|
+
fillOpacity?: number;
|
|
272
|
+
heightThreshold?: number;
|
|
273
|
+
outlineOpacity?: number;
|
|
274
|
+
outlineWidth?: number;
|
|
275
|
+
};
|
|
276
|
+
type TileflowBoundaryColorConfig = {
|
|
277
|
+
admin?: TileflowColor;
|
|
278
|
+
disputed?: TileflowColor;
|
|
279
|
+
major?: TileflowColor;
|
|
280
|
+
maritime?: TileflowColor;
|
|
281
|
+
};
|
|
282
|
+
type TileflowAdvancedColorConfig = {
|
|
283
|
+
boundaries?: TileflowBoundaryColorConfig;
|
|
284
|
+
buildings?: TileflowBuildingColorConfig;
|
|
285
|
+
hydro?: TileflowHydroColorConfig;
|
|
286
|
+
labels?: TileflowLabelColorConfig;
|
|
287
|
+
landcover?: TileflowLandcoverColorConfig;
|
|
288
|
+
landuse?: TileflowLanduseColorConfig;
|
|
289
|
+
poi?: TileflowPoiColorConfig;
|
|
290
|
+
roads?: TileflowRoadColorConfig;
|
|
291
|
+
};
|
|
292
|
+
type TileflowThemeModulesConfig = TileflowAdvancedColorConfig;
|
|
293
|
+
type TileflowColorConfig = Partial<TileflowBaseColors> & LegacyTileflowColorAliases & TileflowAdvancedColorConfig;
|
|
294
|
+
type TileflowColors = {
|
|
295
|
+
[K in keyof TileflowBaseColors]: string;
|
|
296
|
+
} & {
|
|
297
|
+
canvas: string;
|
|
298
|
+
greenspace: string;
|
|
299
|
+
nature: string;
|
|
300
|
+
};
|
|
301
|
+
type TileflowFontWeight = 'regular' | 'medium' | 'semibold' | 'bold';
|
|
302
|
+
declare const tileflowHostedNotoSansWeights: readonly ["regular", "bold"];
|
|
303
|
+
type TileflowHostedNotoSansWeight = (typeof tileflowHostedNotoSansWeights)[number];
|
|
304
|
+
type TileflowTypographyStyle = {
|
|
305
|
+
font?: string;
|
|
306
|
+
fontFamily?: string;
|
|
307
|
+
weight?: TileflowFontWeight;
|
|
308
|
+
};
|
|
309
|
+
type TileflowTypographyDomain = 'places' | 'roads' | 'water' | 'poi';
|
|
310
|
+
type TileflowTypography = TileflowTypographyStyle & {
|
|
311
|
+
places?: TileflowTypographyStyle;
|
|
312
|
+
roads?: TileflowTypographyStyle;
|
|
313
|
+
water?: TileflowTypographyStyle;
|
|
314
|
+
poi?: TileflowTypographyStyle;
|
|
315
|
+
};
|
|
316
|
+
type ResolvedTileflowTypography = Required<TileflowTypographyStyle> & {
|
|
317
|
+
places: Required<TileflowTypographyStyle>;
|
|
318
|
+
roads: Required<TileflowTypographyStyle>;
|
|
319
|
+
water: Required<TileflowTypographyStyle>;
|
|
320
|
+
poi: Required<TileflowTypographyStyle>;
|
|
321
|
+
};
|
|
322
|
+
type TileflowFonts = {
|
|
323
|
+
body?: string;
|
|
324
|
+
labels?: string;
|
|
325
|
+
};
|
|
326
|
+
type TileflowThemeConfig = {
|
|
327
|
+
colors?: TileflowColorConfig;
|
|
328
|
+
extends?: string;
|
|
329
|
+
fonts?: TileflowFonts;
|
|
330
|
+
layers?: Record<string, TileflowStyleLayerOverride>;
|
|
331
|
+
mode?: TileflowThemeMode;
|
|
332
|
+
modules?: TileflowThemeModulesConfig;
|
|
333
|
+
typography?: TileflowTypography;
|
|
334
|
+
};
|
|
335
|
+
type TileflowSourceLayers = {
|
|
336
|
+
landcover?: string;
|
|
337
|
+
landuse?: string;
|
|
338
|
+
park?: string;
|
|
339
|
+
water?: string;
|
|
340
|
+
waterName?: string;
|
|
341
|
+
waterway?: string;
|
|
342
|
+
road?: string;
|
|
343
|
+
roadName?: string;
|
|
344
|
+
building?: string;
|
|
345
|
+
boundary?: string;
|
|
346
|
+
place?: string;
|
|
347
|
+
poi?: string;
|
|
348
|
+
};
|
|
349
|
+
type TileflowTiles = {
|
|
350
|
+
sourceId?: string;
|
|
351
|
+
tileset?: string;
|
|
352
|
+
url?: string;
|
|
353
|
+
attribution?: string;
|
|
354
|
+
sourceLayers?: TileflowSourceLayers;
|
|
355
|
+
version?: string;
|
|
356
|
+
};
|
|
357
|
+
type TileflowTerrainConfig = {
|
|
358
|
+
attribution?: string;
|
|
359
|
+
encoding?: TileflowTerrainEncoding;
|
|
360
|
+
exaggeration?: number;
|
|
361
|
+
mode?: TileflowTerrainMode;
|
|
362
|
+
sourceId?: string;
|
|
363
|
+
tileset?: string;
|
|
364
|
+
url?: string;
|
|
365
|
+
};
|
|
366
|
+
type TileflowTerrain = TileflowTerrainMode | TileflowTerrainConfig;
|
|
367
|
+
type TileflowViewConfig = {
|
|
368
|
+
bearing?: number;
|
|
369
|
+
center?: readonly [number, number];
|
|
370
|
+
zoom?: number;
|
|
371
|
+
};
|
|
372
|
+
type TileflowOsmBasemapConfig = {
|
|
373
|
+
type: 'osm';
|
|
374
|
+
attribution?: string;
|
|
375
|
+
glyphs?: string;
|
|
376
|
+
sourceId?: string;
|
|
377
|
+
sourceLayers?: TileflowSourceLayers;
|
|
378
|
+
sprite?: string;
|
|
379
|
+
tileset?: string;
|
|
380
|
+
url?: string;
|
|
381
|
+
version?: string;
|
|
382
|
+
};
|
|
383
|
+
type TileflowBasemapConfig = TileflowOsmBasemapConfig;
|
|
384
|
+
type TileflowOsmBasemapOptions = Omit<TileflowOsmBasemapConfig, 'type'>;
|
|
385
|
+
type TileflowRoadDetail = 'none' | 'highways' | 'major' | 'streets' | 'all';
|
|
386
|
+
type TileflowRoadClass = 'motorway' | 'trunk' | 'primary' | 'secondary' | 'tertiary' | 'minor' | 'service' | 'track' | 'path';
|
|
387
|
+
type TileflowRoadHierarchy = 'subtle' | 'clear' | 'strong';
|
|
388
|
+
type TileflowRoadWeight = 'thin' | 'regular' | 'bold';
|
|
389
|
+
type TileflowRoadOutline = 'none' | 'subtle' | 'strong';
|
|
390
|
+
type TileflowRoadExtras = {
|
|
391
|
+
ferry?: boolean;
|
|
392
|
+
paths?: boolean;
|
|
393
|
+
rail?: boolean;
|
|
394
|
+
};
|
|
395
|
+
type TileflowRoadsModuleConfig = {
|
|
396
|
+
type: 'roads';
|
|
397
|
+
detail?: TileflowRoadDetail;
|
|
398
|
+
extras?: TileflowRoadExtras;
|
|
399
|
+
hierarchy?: TileflowRoadHierarchy;
|
|
400
|
+
oneWayMarkers?: boolean;
|
|
401
|
+
outline?: TileflowRoadOutline;
|
|
402
|
+
weight?: TileflowRoadWeight;
|
|
403
|
+
widthScale?: Partial<Record<TileflowRoadClass, number>>;
|
|
404
|
+
};
|
|
405
|
+
type TileflowRoadsModuleOptions = Omit<TileflowRoadsModuleConfig, 'type'>;
|
|
406
|
+
type TileflowLabelsModuleConfig = {
|
|
407
|
+
type: 'labels';
|
|
408
|
+
language?: TileflowLabelLanguage;
|
|
409
|
+
places?: TileflowLabelDetail;
|
|
410
|
+
roadClasses?: readonly TileflowRoadClass[];
|
|
411
|
+
roads?: TileflowRoadLabelDetail;
|
|
412
|
+
water?: TileflowLabelDetail;
|
|
413
|
+
};
|
|
414
|
+
type TileflowLabelsModuleOptions = Omit<TileflowLabelsModuleConfig, 'type'>;
|
|
415
|
+
type TileflowPoiModuleConfig = {
|
|
416
|
+
type: 'poi';
|
|
417
|
+
categories?: readonly TileflowPoiCategory[];
|
|
418
|
+
classMapping?: TileflowPoiClassMapping;
|
|
419
|
+
color?: TileflowPoiColorMode;
|
|
420
|
+
density?: TileflowPoiDensity;
|
|
421
|
+
icons?: TileflowPoiIcons;
|
|
422
|
+
labels?: TileflowPoiLabels;
|
|
423
|
+
minZoom?: number;
|
|
424
|
+
placement?: {
|
|
425
|
+
coupleIconAndLabel?: boolean;
|
|
426
|
+
iconPadding?: number;
|
|
427
|
+
textPadding?: number;
|
|
428
|
+
};
|
|
429
|
+
preset?: TileflowPoi;
|
|
430
|
+
};
|
|
431
|
+
type TileflowPoiModuleOptions = Omit<TileflowPoiModuleConfig, 'type'>;
|
|
432
|
+
type TileflowIconSetConfig = {
|
|
433
|
+
extends?: string;
|
|
434
|
+
mapping?: Record<string, string>;
|
|
435
|
+
source?: string;
|
|
436
|
+
sprite?: string;
|
|
437
|
+
};
|
|
438
|
+
type TileflowIconSet = string | TileflowIconSetConfig;
|
|
439
|
+
type TileflowProjectIconSets = Record<string, TileflowIconSet>;
|
|
440
|
+
type MapLibreSprite = string | Array<{
|
|
441
|
+
id: string;
|
|
442
|
+
url: string;
|
|
443
|
+
}>;
|
|
444
|
+
type TileflowStyleLayerOverride = Record<string, unknown> & {
|
|
445
|
+
before?: string;
|
|
446
|
+
filter?: unknown;
|
|
447
|
+
layout?: Record<string, unknown>;
|
|
448
|
+
maxzoom?: number;
|
|
449
|
+
metadata?: Record<string, unknown>;
|
|
450
|
+
minzoom?: number;
|
|
451
|
+
paint?: Record<string, unknown>;
|
|
452
|
+
source?: string;
|
|
453
|
+
'source-layer'?: string;
|
|
454
|
+
type?: string;
|
|
455
|
+
};
|
|
456
|
+
type TileflowStyleOverrideModuleConfig = {
|
|
457
|
+
type: 'styleOverride';
|
|
458
|
+
layers?: Record<string, TileflowStyleLayerOverride>;
|
|
459
|
+
removeLayers?: string[];
|
|
460
|
+
};
|
|
461
|
+
type TileflowStyleOverrideOptions = Omit<TileflowStyleOverrideModuleConfig, 'type'>;
|
|
462
|
+
type TileflowModuleConfig = TileflowLabelsModuleConfig | TileflowPoiModuleConfig | TileflowRoadsModuleConfig | TileflowStyleOverrideModuleConfig;
|
|
463
|
+
type TileflowConfig = {
|
|
464
|
+
basemap?: TileflowBasemapConfig;
|
|
465
|
+
name?: string;
|
|
466
|
+
tileset?: string;
|
|
467
|
+
theme?: TileflowTheme | string | TileflowThemeConfig;
|
|
468
|
+
modules?: readonly TileflowModuleConfig[];
|
|
469
|
+
layers?: Record<string, TileflowStyleLayerOverride>;
|
|
470
|
+
colors?: TileflowColorConfig;
|
|
471
|
+
typography?: TileflowTypography;
|
|
472
|
+
density?: TileflowDensity;
|
|
473
|
+
roads?: TileflowRoads;
|
|
474
|
+
labels?: TileflowLabels;
|
|
475
|
+
poi?: TileflowPoi;
|
|
476
|
+
buildings?: TileflowBuildings;
|
|
477
|
+
buildingStyle?: TileflowBuildingStyleConfig;
|
|
478
|
+
terrain?: TileflowTerrain;
|
|
479
|
+
renderer?: TileflowRenderer;
|
|
480
|
+
glyphs?: string;
|
|
481
|
+
icons?: TileflowIconSet;
|
|
482
|
+
sprite?: string;
|
|
483
|
+
tiles?: TileflowTiles;
|
|
484
|
+
view?: TileflowViewConfig;
|
|
485
|
+
/**
|
|
486
|
+
* Domains allowed to load this map in production (e.g. "example.com" or
|
|
487
|
+
* "*.example.com"). When set, tile and session requests from other
|
|
488
|
+
* websites are rejected. Local development (localhost, private network
|
|
489
|
+
* addresses) is always allowed. Leave unset to allow any domain.
|
|
490
|
+
*/
|
|
491
|
+
allowedOrigins?: string[];
|
|
492
|
+
};
|
|
493
|
+
type TileflowMapConfig = TileflowConfig;
|
|
494
|
+
type TileflowTilesetConfig = {
|
|
495
|
+
id?: string;
|
|
496
|
+
name?: string;
|
|
497
|
+
attribution?: string;
|
|
498
|
+
sourceLayers?: TileflowSourceLayers;
|
|
499
|
+
version?: string;
|
|
500
|
+
};
|
|
501
|
+
type TileflowProjectThemes = Record<TileflowThemeName, TileflowThemeConfig>;
|
|
502
|
+
type TileflowProjectConfig = {
|
|
503
|
+
icons?: TileflowProjectIconSets;
|
|
504
|
+
scenes?: Record<string, TileflowCaptureScene>;
|
|
505
|
+
themes?: TileflowProjectThemes;
|
|
506
|
+
tilesets?: Record<string, TileflowTilesetConfig>;
|
|
507
|
+
maps: Record<string, TileflowMapConfig>;
|
|
508
|
+
};
|
|
509
|
+
type TileflowStyleOptions = {
|
|
510
|
+
iconSets?: TileflowProjectIconSets;
|
|
511
|
+
themes?: TileflowProjectThemes;
|
|
512
|
+
tileBaseUrl?: string;
|
|
513
|
+
tileset?: string;
|
|
514
|
+
};
|
|
515
|
+
type TileflowManifest = {
|
|
516
|
+
version: 1;
|
|
517
|
+
tileBaseUrl: string;
|
|
518
|
+
styles: Record<string, string>;
|
|
519
|
+
maps: Record<string, string>;
|
|
520
|
+
};
|
|
521
|
+
type MapLibreStyle = {
|
|
522
|
+
version: 8;
|
|
523
|
+
name: string;
|
|
524
|
+
glyphs?: string;
|
|
525
|
+
sprite?: MapLibreSprite;
|
|
526
|
+
sources: Record<string, Record<string, unknown>>;
|
|
527
|
+
layers: Array<Record<string, unknown>>;
|
|
528
|
+
terrain?: Record<string, unknown>;
|
|
529
|
+
metadata?: Record<string, unknown>;
|
|
530
|
+
};
|
|
531
|
+
type ValidationMessage = {
|
|
532
|
+
level: 'error' | 'warning';
|
|
533
|
+
path: string;
|
|
534
|
+
message: string;
|
|
535
|
+
};
|
|
536
|
+
type ValidationResult = {
|
|
537
|
+
valid: boolean;
|
|
538
|
+
messages: ValidationMessage[];
|
|
539
|
+
};
|
|
540
|
+
declare function createStyle(input?: TileflowConfig, options?: TileflowStyleOptions): MapLibreStyle;
|
|
541
|
+
declare function createStyleFromProject<const TProject extends TileflowProjectConfig, const TMapName extends keyof TProject['maps'] & string>(projectConfig: TProject, mapName: TMapName, options?: TileflowStyleOptions): MapLibreStyle;
|
|
542
|
+
declare function createManifest(projectConfig: TileflowProjectConfig, options?: {
|
|
543
|
+
styleBaseUrl?: string;
|
|
544
|
+
tileBaseUrl?: string;
|
|
545
|
+
}): TileflowManifest;
|
|
546
|
+
declare function getDefaultColors(): TileflowColors;
|
|
547
|
+
|
|
548
|
+
declare const defaultTileflowManifestUrl = "/tileflow/manifest.json";
|
|
549
|
+
declare const defaultTileflowStyleBaseUrl = "http://localhost:3333";
|
|
550
|
+
type TileflowAnalytics = {
|
|
551
|
+
apiUrl?: string;
|
|
552
|
+
endpoint?: string;
|
|
553
|
+
enabled?: boolean;
|
|
554
|
+
mapId?: string;
|
|
555
|
+
metadata?: Record<string, unknown>;
|
|
556
|
+
projectId?: string;
|
|
557
|
+
sdkVersion?: string;
|
|
558
|
+
source?: string;
|
|
559
|
+
styleId?: string;
|
|
560
|
+
};
|
|
561
|
+
type TileflowMapMarker = {
|
|
562
|
+
id: string;
|
|
563
|
+
coordinates: [number, number];
|
|
564
|
+
color?: string;
|
|
565
|
+
label?: string;
|
|
566
|
+
};
|
|
567
|
+
type TileflowMapMode = 'interactive' | 'image';
|
|
568
|
+
type TileflowMapModeOptions = {
|
|
569
|
+
imageUrl?: string;
|
|
570
|
+
mode?: TileflowMapMode;
|
|
571
|
+
preferLocalDev?: boolean;
|
|
572
|
+
};
|
|
573
|
+
type TileflowRuntimeManifestMapEntry = string | {
|
|
574
|
+
apiUrl?: string;
|
|
575
|
+
environment?: string;
|
|
576
|
+
mapId?: string;
|
|
577
|
+
styleId?: string;
|
|
578
|
+
styleUrl?: string;
|
|
579
|
+
tilesetId?: string;
|
|
580
|
+
url?: string;
|
|
581
|
+
};
|
|
582
|
+
type TileflowRuntimeManifest = {
|
|
583
|
+
apiUrl?: string;
|
|
584
|
+
maps?: Record<string, TileflowRuntimeManifestMapEntry>;
|
|
585
|
+
styles?: Record<string, string>;
|
|
586
|
+
tileBaseUrl?: string;
|
|
587
|
+
version?: number;
|
|
588
|
+
};
|
|
589
|
+
type TileflowRuntimeManifestMap = {
|
|
590
|
+
apiUrl?: string;
|
|
591
|
+
mapId?: string;
|
|
592
|
+
styleId?: string;
|
|
593
|
+
styleUrl?: string;
|
|
594
|
+
};
|
|
595
|
+
type TileflowRuntimeStyle = {
|
|
596
|
+
analytics?: TileflowAnalytics;
|
|
597
|
+
style: MapLibreStyle | string;
|
|
598
|
+
};
|
|
599
|
+
type TileflowRuntimeStyleOptions = {
|
|
600
|
+
config?: TileflowConfig;
|
|
601
|
+
manifestMap?: TileflowRuntimeManifestMap | null;
|
|
602
|
+
map?: string;
|
|
603
|
+
preferLocalDev?: boolean;
|
|
604
|
+
style?: MapLibreStyle;
|
|
605
|
+
styleBaseUrl?: string;
|
|
606
|
+
styleUrl?: string;
|
|
607
|
+
themes?: TileflowProjectThemes;
|
|
608
|
+
tileBaseUrl?: string;
|
|
609
|
+
};
|
|
610
|
+
type TileflowManifestLoadOptions = {
|
|
611
|
+
config?: unknown;
|
|
612
|
+
imageMode?: boolean;
|
|
613
|
+
imageUrl?: string;
|
|
614
|
+
map?: string;
|
|
615
|
+
style?: unknown;
|
|
616
|
+
styleBaseUrl?: string;
|
|
617
|
+
styleUrl?: string;
|
|
618
|
+
};
|
|
619
|
+
declare function shouldLoadTileflowManifest(options: TileflowManifestLoadOptions): boolean;
|
|
620
|
+
declare function resolveTileflowRuntimeStyle(options: TileflowRuntimeStyleOptions): TileflowRuntimeStyle | null;
|
|
621
|
+
declare function resolveTileflowStyleUrl(mapName: string, styleBaseUrl?: string): string;
|
|
622
|
+
declare function getDefaultTileflowStyleBaseUrl(): string;
|
|
623
|
+
declare function normalizeTileflowUrl(value: string): string;
|
|
624
|
+
declare function createTileflowSessionId(): string;
|
|
625
|
+
declare function resolveTileflowAnalyticsRequestUrl(url: string, analytics: TileflowAnalytics | undefined, sessionId: string): string | undefined;
|
|
626
|
+
declare function startTileflowSession(analytics: TileflowAnalytics | undefined, input: {
|
|
627
|
+
mapId?: string;
|
|
628
|
+
sessionId: string;
|
|
629
|
+
source: string;
|
|
630
|
+
styleId?: string;
|
|
631
|
+
}): void;
|
|
632
|
+
declare function getTileflowAnalyticsApiUrl(analytics: TileflowAnalytics): string;
|
|
633
|
+
declare function mergeTileflowAnalytics(userAnalytics: TileflowAnalytics | undefined, runtimeAnalytics: TileflowAnalytics | undefined): TileflowAnalytics | undefined;
|
|
634
|
+
declare function isTileflowLocalDevHost(): boolean;
|
|
635
|
+
declare function resolveTileflowMapMode(options: TileflowMapModeOptions): TileflowMapMode;
|
|
636
|
+
declare function loadTileflowManifest(url: string): Promise<TileflowRuntimeManifest | null>;
|
|
637
|
+
declare function resolveTileflowManifestMap(manifest: TileflowRuntimeManifest, mapName: string): TileflowRuntimeManifestMap | null;
|
|
638
|
+
declare function resolveTileflowStaticImageUrl(input: {
|
|
639
|
+
center: [number, number];
|
|
640
|
+
imageSize: {
|
|
641
|
+
height: number;
|
|
642
|
+
width: number;
|
|
643
|
+
} | null;
|
|
644
|
+
manifestMap: TileflowRuntimeManifestMap | null;
|
|
645
|
+
zoom: number;
|
|
646
|
+
}): string | undefined;
|
|
647
|
+
declare function normalizeTileflowStaticImageSize(input: {
|
|
648
|
+
height: number;
|
|
649
|
+
width: number;
|
|
650
|
+
}): {
|
|
651
|
+
height: number;
|
|
652
|
+
width: number;
|
|
653
|
+
};
|
|
654
|
+
declare function inferTileflowAnalyticsFromStyleUrl(styleUrl: string): TileflowAnalytics | undefined;
|
|
655
|
+
|
|
656
|
+
export { type TileflowMapMode as $, type TileflowCaptureTarget as A, type TileflowCaptureViewport as B, type TileflowColor as C, type TileflowColorConfig as D, type TileflowColors as E, type TileflowDensity as F, type TileflowFontWeight as G, type TileflowFonts as H, type TileflowHostedNotoSansWeight as I, type TileflowHydroColorConfig as J, type TileflowIconSet as K, type TileflowIconSetConfig as L, type MapLibreSprite as M, type NormalizedTileflowCaptureScene as N, type TileflowLabelColorConfig as O, type TileflowLabelDetail as P, type TileflowLabelLanguage as Q, type ResolvedTileflowTypography as R, type TileflowLabels as S, type TileflowAnalytics as T, type TileflowLandcoverColorConfig as U, type ValidationResult as V, type TileflowLanduseColorConfig as W, type TileflowManifest as X, type TileflowManifestLoadOptions as Y, type TileflowMapConfig as Z, type TileflowMapMarker as _, type TileflowConfig as a, resolveTileflowAnalyticsRequestUrl as a$, type TileflowMapModeOptions as a0, type TileflowModuleConfig as a1, type TileflowPoi as a2, type TileflowPoiCategory as a3, type TileflowPoiClassMapping as a4, type TileflowPoiColorConfig as a5, type TileflowPoiColorMode as a6, type TileflowPoiDensity as a7, type TileflowPoiIcons as a8, type TileflowPoiLabels as a9, type TileflowThemeMode as aA, type TileflowThemeModulesConfig as aB, type TileflowThemeName as aC, type TileflowTiles as aD, type TileflowTilesetConfig as aE, type TileflowTypography as aF, type TileflowTypographyDomain as aG, type TileflowTypographyStyle as aH, type TileflowViewConfig as aI, type ValidationMessage as aJ, createManifest as aK, createStyle as aL, createStyleFromProject as aM, createTileflowSessionId as aN, defaultTileflowManifestUrl as aO, defaultTileflowStyleBaseUrl as aP, getDefaultColors as aQ, getDefaultTileflowStyleBaseUrl as aR, getTileflowAnalyticsApiUrl as aS, inferTileflowAnalyticsFromStyleUrl as aT, isTileflowLocalDevHost as aU, loadTileflowManifest as aV, mergeTileflowAnalytics as aW, normalizeTileflowCaptureId as aX, normalizeTileflowCaptureScene as aY, normalizeTileflowStaticImageSize as aZ, normalizeTileflowUrl as a_, type TileflowProjectIconSets as aa, type TileflowProjectThemes as ab, type TileflowRenderer as ac, type TileflowRoadClass as ad, type TileflowRoadColorConfig as ae, type TileflowRoadDetail as af, type TileflowRoadExtras as ag, type TileflowRoadHierarchy as ah, type TileflowRoadLabelDetail as ai, type TileflowRoadOutline as aj, type TileflowRoadWeight as ak, type TileflowRoads as al, type TileflowRuntimeManifest as am, type TileflowRuntimeManifestMap as an, type TileflowRuntimeManifestMapEntry as ao, type TileflowRuntimeStyle as ap, type TileflowRuntimeStyleOptions as aq, type TileflowSourceLayers as ar, type TileflowStyleLayerOverride as as, type TileflowStyleOptions as at, type TileflowTerrain as au, type TileflowTerrainConfig as av, type TileflowTerrainEncoding as aw, type TileflowTerrainMode as ax, type TileflowTheme as ay, type TileflowThemeConfig as az, type TileflowProjectConfig as b, resolveTileflowManifestMap as b0, resolveTileflowMapMode as b1, resolveTileflowRuntimeStyle as b2, resolveTileflowStaticImageUrl as b3, resolveTileflowStyleUrl as b4, shouldLoadTileflowManifest as b5, startTileflowSession as b6, tileflowCaptureApplicationTargetSchema as b7, tileflowCaptureBoundsCameraSchema as b8, tileflowCaptureCameraSchema as b9, tileflowCaptureCenterCameraSchema as ba, tileflowCaptureIdSchema as bb, tileflowCaptureMapTargetSchema as bc, tileflowCaptureSceneLimits as bd, tileflowCaptureSceneNameSchema as be, tileflowCaptureSceneSchema as bf, tileflowCaptureSceneSchemaVersion as bg, tileflowCaptureTargetSchema as bh, tileflowCaptureViewportSchema as bi, tileflowHostedNotoSansWeights as bj, type TileflowOsmBasemapOptions as c, type TileflowOsmBasemapConfig as d, type TileflowRoadsModuleOptions as e, type TileflowRoadsModuleConfig as f, type TileflowLabelsModuleOptions as g, type TileflowLabelsModuleConfig as h, type TileflowPoiModuleOptions as i, type TileflowPoiModuleConfig as j, type TileflowStyleOverrideOptions as k, type TileflowStyleOverrideModuleConfig as l, type MapLibreStyle as m, type TileflowAdvancedColorConfig as n, type TileflowBaseColors as o, type TileflowBasemapConfig as p, type TileflowBoundaryColorConfig as q, type TileflowBuildingColorConfig as r, type TileflowBuildingStyleConfig as s, type TileflowBuildings as t, type TileflowCaptureApplicationTarget as u, type TileflowCaptureBoundsCamera as v, type TileflowCaptureCamera as w, type TileflowCaptureCenterCamera as x, type TileflowCaptureMapTarget as y, type TileflowCaptureScene as z };
|