@tileflow/core 0.1.0-alpha.31 → 0.1.0-alpha.33

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.
Files changed (40) hide show
  1. package/README.md +41 -2
  2. package/THIRD_PARTY_NOTICES.md +25 -2
  3. package/dist/browser.d.ts +1008 -16
  4. package/dist/browser.js +6661 -1392
  5. package/dist/build.d.ts +64 -56
  6. package/dist/build.js +702 -253
  7. package/dist/capture-shot-ChPQvPyi.d.ts +291 -0
  8. package/dist/capture.d.ts +1 -1
  9. package/dist/capture.js +230 -0
  10. package/dist/config-reference.json +1710 -1370
  11. package/dist/{icon-composition-BiOTwrvD.d.ts → icon-composition-CSnN2-Xt.d.ts} +169 -33
  12. package/dist/index.d.ts +57 -13
  13. package/dist/index.js +1684 -800
  14. package/dist/{manifest-types-CTT2eLbp.d.ts → manifest-types-E7m23eXL.d.ts} +18 -1
  15. package/dist/manifest.d.ts +2 -2
  16. package/dist/native-profile.d.ts +25 -11
  17. package/dist/native-profile.js +21 -1
  18. package/dist/native.js +1893 -1884
  19. package/dist/runtime.d.ts +1 -1
  20. package/docs/application-tile-reading.md +80 -0
  21. package/docs/authoring-model.md +16 -6
  22. package/docs/buildings-3d.md +168 -0
  23. package/docs/camera-moves-and-tile-cache.md +112 -0
  24. package/docs/capture-scenes.md +5 -1
  25. package/docs/capture-shots.md +173 -0
  26. package/docs/compiled-style-performance.md +4 -1
  27. package/docs/data-is-separate-from-design.md +103 -9
  28. package/docs/depth-markers.md +65 -0
  29. package/docs/dynamic-style-images.md +100 -0
  30. package/docs/native-artifact-profile.md +5 -3
  31. package/docs/public-api-and-browser-subpath.md +3 -3
  32. package/docs/route-drawing.md +191 -0
  33. package/docs/shared-visual-primitives.md +20 -0
  34. package/docs/street-lights.md +80 -0
  35. package/docs/style-states.md +73 -0
  36. package/docs/sun-and-light.md +125 -0
  37. package/docs/theme-transitions-and-blends.md +41 -2
  38. package/docs/themes-and-module-styles.md +7 -0
  39. package/package.json +4 -1
  40. package/dist/capture-scene-D6soWztE.d.ts +0 -161
@@ -0,0 +1,73 @@
1
+ # Style states
2
+
3
+ A theme can read a value that the application sets once for the whole style, such as whether
4
+ anything is selected. The theme reads it with `expr.globalState(name)`; the application sets it with
5
+ the theme controller's `setState(name, value)`. MapLibre calls these values global state (GL JS 5.6
6
+ or later).
7
+
8
+ ## Read a state in a theme
9
+
10
+ A state reads `null` until the application sets it, so wrap it in a typed assertion with a fallback.
11
+ To let a value move smoothly, make the state a number and interpolate on it:
12
+
13
+ <!-- docs:check -->
14
+
15
+ ```ts
16
+ import {expr} from '@tileflow/core';
17
+
18
+ // 0 shows the standing highlight, 1 the quiet plate; values between mix the two.
19
+ const selection = expr.toNumber(expr.globalState('selection'), 0);
20
+ export const captionPlate = expr.interpolate({kind: 'linear'}, selection, [
21
+ [0, '#ef5f57'],
22
+ [1, '#fff9ee'],
23
+ ]);
24
+ ```
25
+
26
+ A boolean works too, through `expr.case`, but it can only switch.
27
+
28
+ ## Set a state from the application
29
+
30
+ This example assumes an existing MapLibre map named `map` that shows the `light` theme of a
31
+ published Tileflow map:
32
+
33
+ <!-- docs:check -->
34
+
35
+ ```ts
36
+ import {createTileflowThemeController, type TileflowStyleSwitchMap} from '@tileflow/core/browser';
37
+
38
+ // A MapLibre map satisfies TileflowStyleSwitchMap.
39
+ export function selectionStates(map: TileflowStyleSwitchMap, styleUrl: string) {
40
+ const controller = createTileflowThemeController({
41
+ initial: {style: styleUrl, theme: 'light'},
42
+ map,
43
+ });
44
+ void controller.setState('selection', 0);
45
+ return {
46
+ select: () => controller.setState('selection', 1, {transition: {duration: 300}}),
47
+ clear: () => controller.setState('selection', 0, {transition: {duration: 300}}),
48
+ };
49
+ }
50
+ ```
51
+
52
+ A number eases from the value the map shows to the new one over the transition, so the plate mixes
53
+ smoothly from one colour to the other. Booleans, strings, `null`, and a number set for the first
54
+ time change at once, so set a starting value before easing it. A browser preference for
55
+ reduced motion changes at once. Each call supersedes an easing of the same state still in progress,
56
+ which resolves with `status: 'superseded'`; the new easing starts from where the old one stood.
57
+
58
+ States stay through `setTheme` and every `setBlend`: the controller writes them again after each
59
+ new style. `getState(name)` returns the value set last.
60
+
61
+ ## Keep eased values free of feature data
62
+
63
+ Keep a value that eases on a state free of feature data and feature state. MapLibre evaluates such
64
+ a value for the whole layer at each frame. A value that also reads a feature's data or state is
65
+ evaluated per feature when its tiles are laid out, so each change of the state lays them out
66
+ again: the value follows late, in steps, and each frame costs far more. Put the per-feature choice
67
+ in another layer, or let the application draw the feature it marks.
68
+
69
+ ## Cost
70
+
71
+ Each frame of an easing sets the state once, and MapLibre then evaluates again every paint value
72
+ that reads it. A state read by a few layers costs little; a state read by most layers of a map can
73
+ cost more per frame than the blend itself on slower devices.
@@ -0,0 +1,125 @@
1
+ # Sun and light
2
+
3
+ A theme can describe its sun and the light from its sky, as a light preset for that theme: a high
4
+ sun in white light for a day theme, a low amber sun in the west for an evening theme, a cold moon
5
+ with faint shadows for a night theme. In a browser, the theme controller returns the sun the map
6
+ shows, mixed between neighbouring themes during a blend, so an application's own 3D layers can light
7
+ their models and cast their shadows from it. An application can also place the sun itself, by
8
+ direction or by the real position of the sun for a date and place.
9
+
10
+ MapLibre lights its `fill-extrusion` layers with one directional light and casts no shadows. When a
11
+ theme describes a sun, the map's light is anchored to the map and points from the sun, so Tileflow's
12
+ 3D buildings are shaded from where it stands. Shadows, ambient occlusion and lit windows are for the
13
+ application's own WebGL layers to draw, from the values `getSun()` returns.
14
+
15
+ ## Describe a theme's sun
16
+
17
+ Set `lighting.sun` and `lighting.ambient` in the theme. Every value is optional; unset values take
18
+ the defaults in `tileflowDefaultSunPreset` (azimuth 210°, altitude 60°, white light at 0.5, full
19
+ shadows, a white sky at 0.5):
20
+
21
+ <!-- docs:check -->
22
+
23
+ ```ts
24
+ import {defineTheme} from '@tileflow/core';
25
+ import {streetsThemes} from '@tileflow/maps';
26
+
27
+ export const evening = defineTheme(streetsThemes.dark, {
28
+ id: 'city-evening',
29
+ version: 1,
30
+ colorScheme: 'dark',
31
+ lighting: {
32
+ // Degrees clockwise from north, and above the horizon.
33
+ sun: {azimuth: 285, altitude: 9, color: '#ff9a50', intensity: 1, shadowIntensity: 0.9},
34
+ ambient: {color: '#5a4290', intensity: 0.3},
35
+ },
36
+ });
37
+ ```
38
+
39
+ `intensity` values run from 0 to 1. `shadowIntensity` says how dark the shadows the sun casts fall,
40
+ from 0 (none) to 1. A theme derived from another changes single values of its sun and sky light; the
41
+ others are inherited. The compiled style carries the resolved sun in its metadata
42
+ (`tileflow:sun`) and a map-anchored `light` that points from it; MapLibre's `anchor` and the
43
+ direction in `lighting.position` no longer apply to a theme with a sun. A theme without `sun` or
44
+ `ambient` compiles exactly as before.
45
+
46
+ ## Read the sun in an application
47
+
48
+ `themeController.getSun()` returns the sun the map shows:
49
+
50
+ - `azimuth` and `altitude`, in degrees, and `direction`, a unit vector towards the sun with x east,
51
+ y north and z up.
52
+ - `color` and `rgb` (sRGB channels from 0 to 1) of the direct light, and its `intensity`, which fades
53
+ to 0 over the sun's last degrees above the horizon: a sun below it lights nothing.
54
+ - `ambient`, the light from the sky, with its own `color`, `rgb` and `intensity`.
55
+ - `shadowIntensity`, how dark the sun's shadows fall.
56
+ - `brightness`, how bright flat, open ground is under this light, from 0 to 1: the sky's light plus
57
+ the sun's at its height, each weighted by its colour's luminance. Use it to switch lamps or windows
58
+ on as a scene darkens, whatever theme or sun lights it.
59
+ - `source`: `theme`, `direction`, or `date`.
60
+
61
+ During a blend the sun is mixed between the neighbouring themes' suns: the azimuth turns the short
62
+ way round, colours mix in OKLab as the map's colours do, and numbers mix linearly. Read it when a
63
+ custom layer draws; the map redraws whenever the sun changes.
64
+
65
+ ## Place the sun
66
+
67
+ `setSun` places the sun by direction, or by the real sun of a date over a place given as
68
+ `[longitude, latitude]`, the map's centre when it is left out. The themes keep the sun's colours,
69
+ strengths and shadow strength; only its direction changes. `setSun(undefined)` returns it to the
70
+ themes. This example assumes an existing MapLibre map and a controller for it:
71
+
72
+ <!-- docs:check -->
73
+
74
+ ```ts
75
+ import type {TileflowThemeController} from '@tileflow/core/browser';
76
+
77
+ export function followTheRealSun(controller: TileflowThemeController) {
78
+ // Where the sun stands over Miami Beach now; a later call moves it on.
79
+ void controller.setSun({date: Date.now(), location: [-80.13, 25.79]});
80
+ }
81
+
82
+ export function lowWesternSun(controller: TileflowThemeController) {
83
+ // Turns the short way round to the west over a second.
84
+ return controller.setSun({azimuth: 270, altitude: 8}, {transition: {duration: 1000}});
85
+ }
86
+ ```
87
+
88
+ A request that follows an animation, such as a clock that moves every frame, passes no transition.
89
+ A request with a transition supersedes one still in progress, which resolves with
90
+ `status: 'superseded'`; a browser preference for reduced motion changes at once.
91
+
92
+ `tileflowSunPosition(date, [longitude, latitude])` returns the sun's azimuth and apparent altitude,
93
+ with atmospheric refraction, from NOAA's solar equations (accurate to about a hundredth of a degree
94
+ for years 1800 to 2200). It runs anywhere, without a map:
95
+
96
+ <!-- docs:check -->
97
+
98
+ ```ts
99
+ import {tileflowSunPosition} from '@tileflow/core/browser';
100
+
101
+ // Solar noon in Miami at the June solstice, 17:22 UTC: the sun stands about 87.7° high, due south.
102
+ export const noon = tileflowSunPosition(Date.UTC(2026, 5, 21, 17, 22), [-80.19, 25.77]);
103
+ ```
104
+
105
+ ## Light a custom layer
106
+
107
+ For a custom WebGL layer that draws 3D content, light each surface with the sky's light, plus the
108
+ sun's where the surface faces it and nothing stands in the way:
109
+
110
+ light = ambient.rgb × ambient.intensity + rgb × intensity × max(normal · direction, 0) × (1 − shadowIntensity × shadowed)
111
+
112
+ Convert the colours to linear light before adding them and back to sRGB after. MapLibre's own 2D
113
+ layers take no shadows, so a layer that casts shadows on the ground darkens the map it is drawn over:
114
+ draw the ground under the scene, after the scene's own geometry, with multiplying blending and a
115
+ depth test against it.
116
+
117
+ ## Limits
118
+
119
+ - MapLibre shades extrusions with its one light; it has no shadow maps, ambient occlusion or
120
+ emissive light. The sun gives custom layers what they need to draw them.
121
+ - Themes interpolate the sun linearly between presets; a request by date follows the real sun, not
122
+ the themes' presets.
123
+ - Style expressions cannot read the sun yet. An application that wants a theme to react to it sets a
124
+ [style state](https://github.com/tileflow/tileflow-sdk/blob/main/packages/core/docs/style-states.md)
125
+ from `getSun().brightness`.
@@ -83,7 +83,8 @@ While a blend is shown, `data-tileflow-theme` names the theme nearest to the pos
83
83
  - Colours and numbers of the ground, such as land, water, roads, buildings, and their widths and
84
84
  opacities, follow the position continuously. Colours mix in the OKLab colour space, so halfway
85
85
  between two themes looks halfway to the eye.
86
- - Patterns, the sky, and light follow the position too. Pattern artwork is mixed in its pixels.
86
+ - Patterns, the sky, and light follow the position too. Pattern artwork is mixed in its pixels;
87
+ artwork two neighbouring themes share, by name or pixel for pixel, is not uploaded again.
87
88
  - Labels, icons, and other symbols change when the nearest theme changes, with a short cross-fade.
88
89
  Light lettering on a dark plate and dark lettering on a light plate would meet in the same grey
89
90
  halfway, so symbols do not follow the position.
@@ -195,7 +196,8 @@ export async function moveThroughTheDay(map: MapLibreMap, manifestMap: TileflowR
195
196
  await controller.setBlend({position: 0.5, themes});
196
197
  // The same themes: the position applies at once.
197
198
  await controller.setBlend({position: 0.6, themes});
198
- return controller.getBlend(); // {position: 0.6, themes: ['night', 'dusk', 'day']}
199
+ // {held: false, position: 0.6, relayoutAt: [...], themes: ['night', 'dusk', 'day']}
200
+ return controller.getBlend();
199
201
  }
200
202
  ```
201
203
 
@@ -209,6 +211,8 @@ when styles need another loader.
209
211
 
210
212
  The controller also shows [map emphasis](https://github.com/tileflow/tileflow-sdk/blob/main/packages/core/docs/map-emphasis.md),
211
213
  which stays through theme changes and follows every blend position.
214
+ Its [dynamic style images](dynamic-style-images.md) receive theme, blend and declared state inputs
215
+ under one resource owner, with fixed geometry and restoration after a style reload.
212
216
 
213
217
  ## Fast sweeps on slower devices
214
218
 
@@ -219,3 +223,38 @@ changes most ground layers on every frame. Measured in Chromium on Apple silicon
219
223
  a detailed city map, such a sweep kept 76 frames a second; with the processor slowed four times, as
220
224
  on a mid-range phone, it fell to about 11, against 28 for the same camera move without the sweep.
221
225
  On slower devices, prefer short sweeps or move the position less often.
226
+
227
+ ## Camera moves and recordings
228
+
229
+ Some changes make MapLibre lay tiles out again: when the nearest theme changes, the values that
230
+ switch with it (icon names, layout values, and values that read feature data or feature state),
231
+ and each step of pattern or icon artwork that is mixed in pixels. A camera move or a screen
232
+ recording shows that work as dropped frames. `getBlend().relayoutAt` lists the positions where the
233
+ nearest theme changes over such values, so a sequence can be planned around them.
234
+
235
+ Pass `hold: true` to hold that work back. Colours, numbers, the sky, and light keep following the
236
+ position; the nearest theme, the values that switch with it, and mixed artwork wait.
237
+ `getBlend().held` reports whether anything waits. The next request without `hold` brings it in at
238
+ once, so make it while the camera rests:
239
+
240
+ ```ts
241
+ import type {TileflowThemeController} from '@tileflow/core/browser';
242
+ import type {TileflowRuntimeStyle} from '@tileflow/core/runtime';
243
+
244
+ export async function duskWhileFlying(
245
+ controller: TileflowThemeController,
246
+ themes: readonly TileflowRuntimeStyle[],
247
+ flight: Promise<void>,
248
+ ) {
249
+ // Through the camera move the ground darkens towards night with no layout work.
250
+ for (const position of [0.25, 0.5, 0.75])
251
+ await controller.setBlend({hold: true, position, themes});
252
+ await flight;
253
+ // The camera rests: labels, icons, and artwork follow at once.
254
+ await controller.setBlend({position: 0.75, themes});
255
+ }
256
+ ```
257
+
258
+ The React, Vue, and Svelte maps take the same flag in `themeBlend`: pass
259
+ `themeBlend={{hold: true, position, themes}}` while the camera moves and drop `hold` when it rests.
260
+ The React Native `Map` blends natively and does not take `hold`.
@@ -15,6 +15,13 @@ same token keys, so changing a theme can never change map structure or silently
15
15
  role. `defineTheme(base, definition)` is an authoring convenience that returns a fully materialized
16
16
  document; it does not leave an inheritance edge in the resolved config.
17
17
 
18
+ Some optional tokens are for the application rather than the map's own layers. Route inks
19
+ (`route.line`, `route.casing`, `route.core`, `route.glow`, `route.alternative`,
20
+ `route.glow.opacity` and `route.core.opacity`) set how an application draws its routes; a theme
21
+ without them uses its colour scheme's defaults. The compiler publishes them in the style's metadata
22
+ and the theme controller returns them; see
23
+ [route drawing](https://github.com/tileflow/tileflow-sdk/blob/main/packages/core/docs/route-drawing.md).
24
+
18
25
  The key in the `themes` record is its concrete runtime selector and output-path segment. The
19
26
  theme's own `id` and `version` are its editorial identity and build provenance, so they need not
20
27
  equal that key. Concrete keys may be names such as `day` and `night`; every `systemThemes.light` or
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tileflow/core",
3
- "version": "0.1.0-alpha.31",
3
+ "version": "0.1.0-alpha.33",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Typed Tileflow config and MapLibre style compiler.",
6
6
  "type": "module",
@@ -81,7 +81,10 @@
81
81
  "zod": "^4.4.3"
82
82
  },
83
83
  "devDependencies": {
84
+ "@mapbox/vector-tile": "3.0.0",
85
+ "earcut": "3.2.4",
84
86
  "maplibre-contour": "0.1.0",
87
+ "pbf": "5.1.2",
85
88
  "pmtiles": "4.4.0",
86
89
  "whatwg-url": "15.1.0"
87
90
  },
@@ -1,161 +0,0 @@
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
- theme: z.ZodString;
88
- camera: z.ZodDiscriminatedUnion<[z.ZodObject<{
89
- type: z.ZodLiteral<"center">;
90
- center: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
91
- zoom: z.ZodNumber;
92
- bearing: z.ZodOptional<z.ZodNumber>;
93
- pitch: z.ZodOptional<z.ZodNumber>;
94
- }, z.core.$strict>, z.ZodObject<{
95
- type: z.ZodLiteral<"bounds">;
96
- bounds: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
97
- padding: z.ZodOptional<z.ZodNumber>;
98
- bearing: z.ZodOptional<z.ZodNumber>;
99
- pitch: z.ZodOptional<z.ZodNumber>;
100
- }, z.core.$strict>], "type">;
101
- viewport: z.ZodObject<{
102
- width: z.ZodNumber;
103
- height: z.ZodNumber;
104
- dpr: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
105
- }, z.core.$strict>;
106
- target: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
107
- kind: z.ZodLiteral<"map">;
108
- }, z.core.$strict>, z.ZodObject<{
109
- kind: z.ZodLiteral<"application">;
110
- path: z.ZodString;
111
- captureId: z.ZodOptional<z.ZodString>;
112
- selector: z.ZodOptional<z.ZodString>;
113
- frame: z.ZodOptional<z.ZodEnum<{
114
- map: "map";
115
- viewport: "viewport";
116
- }>>;
117
- }, z.core.$strict>], "kind">>;
118
- }, z.core.$strict>;
119
- type TileflowCaptureCenterCamera = z.infer<typeof tileflowCaptureCenterCameraSchema>;
120
- type TileflowCaptureBoundsCamera = z.infer<typeof tileflowCaptureBoundsCameraSchema>;
121
- type TileflowCaptureCamera = z.infer<typeof tileflowCaptureCameraSchema>;
122
- type TileflowCaptureViewport = z.infer<typeof tileflowCaptureViewportSchema>;
123
- type TileflowCaptureMapTarget = z.infer<typeof tileflowCaptureMapTargetSchema>;
124
- type TileflowCaptureApplicationTarget = z.infer<typeof tileflowCaptureApplicationTargetSchema>;
125
- type TileflowCaptureTarget = z.infer<typeof tileflowCaptureTargetSchema>;
126
- type TileflowCaptureScene = z.infer<typeof tileflowCaptureSceneSchema>;
127
- type NormalizedTileflowCaptureScene = {
128
- map: string;
129
- theme: string;
130
- camera: {
131
- type: 'center';
132
- center: [number, number];
133
- zoom: number;
134
- bearing: number;
135
- pitch: number;
136
- } | {
137
- type: 'bounds';
138
- bounds: [number, number, number, number];
139
- padding: number;
140
- bearing: number;
141
- pitch: number;
142
- };
143
- viewport: {
144
- width: number;
145
- height: number;
146
- dpr: 1 | 2;
147
- };
148
- target: {
149
- kind: 'map';
150
- } | {
151
- kind: 'application';
152
- path: string;
153
- captureId?: string;
154
- selector?: string;
155
- frame: 'map' | 'viewport';
156
- };
157
- };
158
- declare function normalizeTileflowCaptureScene(input: TileflowCaptureScene): NormalizedTileflowCaptureScene;
159
- declare function normalizeTileflowCaptureId(value: string | undefined): string | undefined;
160
-
161
- export { type NormalizedTileflowCaptureScene as N, type TileflowCaptureScene as T, type TileflowCaptureApplicationTarget as a, type TileflowCaptureBoundsCamera as b, type TileflowCaptureCamera as c, type TileflowCaptureCenterCamera as d, type TileflowCaptureMapTarget as e, type TileflowCaptureTarget as f, type TileflowCaptureViewport as g, normalizeTileflowCaptureScene as h, tileflowCaptureBoundsCameraSchema as i, tileflowCaptureCameraSchema as j, tileflowCaptureCenterCameraSchema as k, tileflowCaptureIdSchema as l, tileflowCaptureMapTargetSchema as m, normalizeTileflowCaptureId as n, tileflowCaptureSceneLimits as o, tileflowCaptureSceneNameSchema as p, tileflowCaptureSceneSchema as q, tileflowCaptureSceneSchemaVersion as r, tileflowCaptureTargetSchema as s, tileflowCaptureApplicationTargetSchema as t, tileflowCaptureViewportSchema as u };