@maplibre-yaml/core 0.1.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +21 -0
- package/dist/components/index.d.ts +106 -0
- package/dist/components/index.js +4332 -0
- package/dist/components/index.js.map +1 -0
- package/dist/index.d.ts +2717 -0
- package/dist/index.js +4305 -0
- package/dist/index.js.map +1 -0
- package/dist/map-renderer-RQc5_bdo.d.ts +149 -0
- package/dist/map.schema-EnZRrtIh.d.ts +68122 -0
- package/dist/schemas/index.d.ts +3151 -0
- package/dist/schemas/index.js +710 -0
- package/dist/schemas/index.js.map +1 -0
- package/package.json +79 -0
|
@@ -0,0 +1,3151 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export { h as BackgroundLayerSchema, B as BaseLayerPropertiesSchema, d as CircleLayerSchema, k as ControlPositionSchema, C as ControlsConfigSchema, f as FillExtrusionLayerSchema, F as FillLayerSchema, H as HeatmapLayerSchema, g as HillshadeLayerSchema, I as InteractiveConfigSchema, j as LayerOrReferenceSchema, i as LayerReferenceSchema, L as LayerSchema, a as LegendConfigSchema, c as LegendItemSchema, e as LineLayerSchema, l as MapBlockSchema, M as MapConfigSchema, m as MapFullPageBlockSchema, b as PopupContentItemSchema, P as PopupContentSchema, R as RasterLayerSchema, S as SymbolLayerSchema } from '../map.schema-EnZRrtIh.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @file Base schemas for maplibre-yaml
|
|
6
|
+
* @module @maplibre-yaml/core/schemas/base
|
|
7
|
+
*
|
|
8
|
+
* @description
|
|
9
|
+
* Foundational Zod schemas for coordinates, colors, expressions, and other
|
|
10
|
+
* primitive types used throughout the library.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```typescript
|
|
14
|
+
* import { LngLatSchema, ColorSchema } from '@maplibre-yaml/core/schemas';
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Longitude value in degrees.
|
|
20
|
+
*
|
|
21
|
+
* @remarks
|
|
22
|
+
* Valid range: -180 to 180 (inclusive)
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```typescript
|
|
26
|
+
* const lng = LongitudeSchema.parse(-74.006);
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
declare const LongitudeSchema: z.ZodNumber;
|
|
30
|
+
/**
|
|
31
|
+
* Latitude value in degrees.
|
|
32
|
+
*
|
|
33
|
+
* @remarks
|
|
34
|
+
* Valid range: -90 to 90 (inclusive)
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```typescript
|
|
38
|
+
* const lat = LatitudeSchema.parse(40.7128);
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
declare const LatitudeSchema: z.ZodNumber;
|
|
42
|
+
/**
|
|
43
|
+
* Geographic coordinates as [longitude, latitude].
|
|
44
|
+
*
|
|
45
|
+
* @remarks
|
|
46
|
+
* **Validation Rules:**
|
|
47
|
+
* - Longitude: -180 to 180
|
|
48
|
+
* - Latitude: -90 to 90
|
|
49
|
+
* - Must be a 2-element tuple
|
|
50
|
+
*
|
|
51
|
+
* Follows GeoJSON convention (lng, lat), not (lat, lng).
|
|
52
|
+
*
|
|
53
|
+
* **Common Values:**
|
|
54
|
+
* - `[0, 0]` - Null Island (Gulf of Guinea)
|
|
55
|
+
* - `[-74.006, 40.7128]` - New York City
|
|
56
|
+
* - `[139.6917, 35.6895]` - Tokyo
|
|
57
|
+
*
|
|
58
|
+
* @example YAML
|
|
59
|
+
* ```yaml
|
|
60
|
+
* center: [-74.006, 40.7128]
|
|
61
|
+
* ```
|
|
62
|
+
*
|
|
63
|
+
* @example TypeScript
|
|
64
|
+
* ```typescript
|
|
65
|
+
* const coords = LngLatSchema.parse([-74.006, 40.7128]);
|
|
66
|
+
* ```
|
|
67
|
+
*
|
|
68
|
+
* @see {@link https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.1 | GeoJSON Position}
|
|
69
|
+
*/
|
|
70
|
+
declare const LngLatSchema: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
71
|
+
/**
|
|
72
|
+
* Bounding box as [west, south, east, north].
|
|
73
|
+
*
|
|
74
|
+
* @remarks
|
|
75
|
+
* Defines a rectangular geographic area. Corner order:
|
|
76
|
+
* 1. West (min longitude)
|
|
77
|
+
* 2. South (min latitude)
|
|
78
|
+
* 3. East (max longitude)
|
|
79
|
+
* 4. North (max latitude)
|
|
80
|
+
*
|
|
81
|
+
* @example YAML
|
|
82
|
+
* ```yaml
|
|
83
|
+
* maxBounds: [-74.3, 40.5, -73.7, 40.9]
|
|
84
|
+
* ```
|
|
85
|
+
*
|
|
86
|
+
* @example TypeScript
|
|
87
|
+
* ```typescript
|
|
88
|
+
* // NYC bounding box
|
|
89
|
+
* const bounds = LngLatBoundsSchema.parse([-74.3, 40.5, -73.7, 40.9]);
|
|
90
|
+
* ```
|
|
91
|
+
*/
|
|
92
|
+
declare const LngLatBoundsSchema: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
93
|
+
/**
|
|
94
|
+
* CSS color value.
|
|
95
|
+
*
|
|
96
|
+
* @remarks
|
|
97
|
+
* Supports multiple color formats:
|
|
98
|
+
* - Hex: `#rgb`, `#rrggbb`, `#rrggbbaa`
|
|
99
|
+
* - RGB: `rgb(255, 0, 0)`
|
|
100
|
+
* - RGBA: `rgba(255, 0, 0, 0.5)`
|
|
101
|
+
* - HSL: `hsl(0, 100%, 50%)`
|
|
102
|
+
* - HSLA: `hsla(0, 100%, 50%, 0.5)`
|
|
103
|
+
* - Named: `red`, `blue`, `transparent`, etc.
|
|
104
|
+
*
|
|
105
|
+
* @example YAML
|
|
106
|
+
* ```yaml
|
|
107
|
+
* paint:
|
|
108
|
+
* circle-color: "#ff0000"
|
|
109
|
+
* fill-color: "rgba(255, 0, 0, 0.5)"
|
|
110
|
+
* line-color: "hsl(120, 100%, 50%)"
|
|
111
|
+
* text-color: "blue"
|
|
112
|
+
* ```
|
|
113
|
+
*
|
|
114
|
+
* @example TypeScript
|
|
115
|
+
* ```typescript
|
|
116
|
+
* const hex = ColorSchema.parse("#ff0000");
|
|
117
|
+
* const rgba = ColorSchema.parse("rgba(255, 0, 0, 0.5)");
|
|
118
|
+
* const named = ColorSchema.parse("red");
|
|
119
|
+
* ```
|
|
120
|
+
*/
|
|
121
|
+
declare const ColorSchema: z.ZodEffects<z.ZodString, string, string>;
|
|
122
|
+
/**
|
|
123
|
+
* MapLibre expression for data-driven styling.
|
|
124
|
+
*
|
|
125
|
+
* @remarks
|
|
126
|
+
* MapLibre expressions provide powerful data-driven styling capabilities.
|
|
127
|
+
* An expression is an array where the first element is the operator name.
|
|
128
|
+
*
|
|
129
|
+
* **Common Operators:**
|
|
130
|
+
* - `get` - Get feature property
|
|
131
|
+
* - `interpolate` - Interpolate between values
|
|
132
|
+
* - `match` - Match values
|
|
133
|
+
* - `case` - Conditional logic
|
|
134
|
+
* - `step` - Step function
|
|
135
|
+
*
|
|
136
|
+
* This schema provides basic validation (array starting with string).
|
|
137
|
+
* Full expression syntax is validated by MapLibre at runtime.
|
|
138
|
+
*
|
|
139
|
+
* @example Get Property
|
|
140
|
+
* ```yaml
|
|
141
|
+
* text-field: ["get", "name"]
|
|
142
|
+
* ```
|
|
143
|
+
*
|
|
144
|
+
* @example Interpolate by Zoom
|
|
145
|
+
* ```yaml
|
|
146
|
+
* circle-radius:
|
|
147
|
+
* - interpolate
|
|
148
|
+
* - ["linear"]
|
|
149
|
+
* - ["zoom"]
|
|
150
|
+
* - 5
|
|
151
|
+
* - 2
|
|
152
|
+
* - 15
|
|
153
|
+
* - 10
|
|
154
|
+
* ```
|
|
155
|
+
*
|
|
156
|
+
* @example Match Values
|
|
157
|
+
* ```yaml
|
|
158
|
+
* circle-color:
|
|
159
|
+
* - match
|
|
160
|
+
* - ["get", "type"]
|
|
161
|
+
* - "park"
|
|
162
|
+
* - "#228B22"
|
|
163
|
+
* - "water"
|
|
164
|
+
* - "#4169E1"
|
|
165
|
+
* - "#808080"
|
|
166
|
+
* ```
|
|
167
|
+
*
|
|
168
|
+
* @see {@link https://maplibre.org/maplibre-style-spec/expressions/ | MapLibre Expressions}
|
|
169
|
+
*/
|
|
170
|
+
declare const ExpressionSchema: z.ZodType<any[]>;
|
|
171
|
+
/**
|
|
172
|
+
* Number value or MapLibre expression.
|
|
173
|
+
*
|
|
174
|
+
* @remarks
|
|
175
|
+
* Accepts either a static number or a dynamic expression.
|
|
176
|
+
* Use expressions for data-driven or zoom-dependent values.
|
|
177
|
+
*
|
|
178
|
+
* @example Static Value
|
|
179
|
+
* ```yaml
|
|
180
|
+
* circle-radius: 8
|
|
181
|
+
* ```
|
|
182
|
+
*
|
|
183
|
+
* @example Expression
|
|
184
|
+
* ```yaml
|
|
185
|
+
* circle-radius:
|
|
186
|
+
* - interpolate
|
|
187
|
+
* - ["linear"]
|
|
188
|
+
* - ["get", "magnitude"]
|
|
189
|
+
* - 0
|
|
190
|
+
* - 4
|
|
191
|
+
* - 10
|
|
192
|
+
* - 20
|
|
193
|
+
* ```
|
|
194
|
+
*/
|
|
195
|
+
declare const NumberOrExpressionSchema: z.ZodUnion<[z.ZodNumber, z.ZodType<any[], z.ZodTypeDef, any[]>]>;
|
|
196
|
+
/**
|
|
197
|
+
* Color value or MapLibre expression.
|
|
198
|
+
*
|
|
199
|
+
* @remarks
|
|
200
|
+
* Accepts either a static color or a dynamic expression.
|
|
201
|
+
* Use expressions for data-driven colors.
|
|
202
|
+
*
|
|
203
|
+
* @example Static Color
|
|
204
|
+
* ```yaml
|
|
205
|
+
* circle-color: "#ff0000"
|
|
206
|
+
* ```
|
|
207
|
+
*
|
|
208
|
+
* @example Expression
|
|
209
|
+
* ```yaml
|
|
210
|
+
* circle-color:
|
|
211
|
+
* - match
|
|
212
|
+
* - ["get", "severity"]
|
|
213
|
+
* - "high"
|
|
214
|
+
* - "#ff0000"
|
|
215
|
+
* - "medium"
|
|
216
|
+
* - "#ffaa00"
|
|
217
|
+
* - "low"
|
|
218
|
+
* - "#00ff00"
|
|
219
|
+
* - "#808080"
|
|
220
|
+
* ```
|
|
221
|
+
*/
|
|
222
|
+
declare const ColorOrExpressionSchema: z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodType<any[], z.ZodTypeDef, any[]>]>;
|
|
223
|
+
/**
|
|
224
|
+
* Map zoom level.
|
|
225
|
+
*
|
|
226
|
+
* @remarks
|
|
227
|
+
* Valid range: 0 to 24
|
|
228
|
+
*
|
|
229
|
+
* **Common Values:**
|
|
230
|
+
* - 0 - Whole world
|
|
231
|
+
* - 5 - Continent
|
|
232
|
+
* - 10 - City
|
|
233
|
+
* - 15 - Streets
|
|
234
|
+
* - 20 - Buildings
|
|
235
|
+
*
|
|
236
|
+
* @example
|
|
237
|
+
* ```yaml
|
|
238
|
+
* zoom: 12
|
|
239
|
+
* minZoom: 8
|
|
240
|
+
* maxZoom: 18
|
|
241
|
+
* ```
|
|
242
|
+
*/
|
|
243
|
+
declare const ZoomLevelSchema: z.ZodNumber;
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* @file Source schemas for maplibre-yaml
|
|
247
|
+
* @module @maplibre-yaml/core/schemas/source
|
|
248
|
+
*
|
|
249
|
+
* @description
|
|
250
|
+
* Zod schemas for all MapLibre data source types with runtime-first defaults.
|
|
251
|
+
* Supports GeoJSON, vector, raster, image, and video sources with dynamic data loading.
|
|
252
|
+
*
|
|
253
|
+
* @example
|
|
254
|
+
* ```typescript
|
|
255
|
+
* import { GeoJSONSourceSchema, LayerSourceSchema } from '@maplibre-yaml/core/schemas';
|
|
256
|
+
* ```
|
|
257
|
+
*/
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* WebSocket or Server-Sent Events streaming configuration.
|
|
261
|
+
*
|
|
262
|
+
* @remarks
|
|
263
|
+
* Enables real-time data updates via WebSocket or SSE connections.
|
|
264
|
+
*
|
|
265
|
+
* **Connection Types:**
|
|
266
|
+
* - `websocket` - Bidirectional WebSocket connection
|
|
267
|
+
* - `sse` - Server-Sent Events (unidirectional)
|
|
268
|
+
*
|
|
269
|
+
* @example WebSocket
|
|
270
|
+
* ```yaml
|
|
271
|
+
* stream:
|
|
272
|
+
* type: websocket
|
|
273
|
+
* url: "wss://api.example.com/live-data"
|
|
274
|
+
* reconnect: true
|
|
275
|
+
* reconnectMaxAttempts: 10
|
|
276
|
+
* protocols: ["json", "v1"]
|
|
277
|
+
* ```
|
|
278
|
+
*
|
|
279
|
+
* @example Server-Sent Events
|
|
280
|
+
* ```yaml
|
|
281
|
+
* stream:
|
|
282
|
+
* type: sse
|
|
283
|
+
* url: "https://api.example.com/events"
|
|
284
|
+
* eventTypes: ["update", "delete"]
|
|
285
|
+
* ```
|
|
286
|
+
*/
|
|
287
|
+
declare const StreamConfigSchema: z.ZodObject<{
|
|
288
|
+
type: z.ZodEnum<["websocket", "sse"]>;
|
|
289
|
+
url: z.ZodOptional<z.ZodString>;
|
|
290
|
+
reconnect: z.ZodDefault<z.ZodBoolean>;
|
|
291
|
+
reconnectMaxAttempts: z.ZodDefault<z.ZodNumber>;
|
|
292
|
+
reconnectDelay: z.ZodDefault<z.ZodNumber>;
|
|
293
|
+
reconnectMaxDelay: z.ZodDefault<z.ZodNumber>;
|
|
294
|
+
eventTypes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
295
|
+
protocols: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
296
|
+
}, "strip", z.ZodTypeAny, {
|
|
297
|
+
type: "websocket" | "sse";
|
|
298
|
+
reconnect: boolean;
|
|
299
|
+
reconnectMaxAttempts: number;
|
|
300
|
+
reconnectDelay: number;
|
|
301
|
+
reconnectMaxDelay: number;
|
|
302
|
+
url?: string | undefined;
|
|
303
|
+
eventTypes?: string[] | undefined;
|
|
304
|
+
protocols?: string | string[] | undefined;
|
|
305
|
+
}, {
|
|
306
|
+
type: "websocket" | "sse";
|
|
307
|
+
url?: string | undefined;
|
|
308
|
+
reconnect?: boolean | undefined;
|
|
309
|
+
reconnectMaxAttempts?: number | undefined;
|
|
310
|
+
reconnectDelay?: number | undefined;
|
|
311
|
+
reconnectMaxDelay?: number | undefined;
|
|
312
|
+
eventTypes?: string[] | undefined;
|
|
313
|
+
protocols?: string | string[] | undefined;
|
|
314
|
+
}>;
|
|
315
|
+
/**
|
|
316
|
+
* Loading UI configuration for data fetching.
|
|
317
|
+
*
|
|
318
|
+
* @remarks
|
|
319
|
+
* Controls the loading experience while data is being fetched.
|
|
320
|
+
*
|
|
321
|
+
* @example
|
|
322
|
+
* ```yaml
|
|
323
|
+
* loading:
|
|
324
|
+
* enabled: true
|
|
325
|
+
* message: "Loading earthquake data..."
|
|
326
|
+
* showErrorOverlay: true
|
|
327
|
+
* ```
|
|
328
|
+
*/
|
|
329
|
+
declare const LoadingConfigSchema: z.ZodObject<{
|
|
330
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
331
|
+
message: z.ZodOptional<z.ZodString>;
|
|
332
|
+
showErrorOverlay: z.ZodDefault<z.ZodBoolean>;
|
|
333
|
+
}, "strip", z.ZodTypeAny, {
|
|
334
|
+
enabled: boolean;
|
|
335
|
+
showErrorOverlay: boolean;
|
|
336
|
+
message?: string | undefined;
|
|
337
|
+
}, {
|
|
338
|
+
message?: string | undefined;
|
|
339
|
+
enabled?: boolean | undefined;
|
|
340
|
+
showErrorOverlay?: boolean | undefined;
|
|
341
|
+
}>;
|
|
342
|
+
/**
|
|
343
|
+
* GeoJSON data source configuration.
|
|
344
|
+
*
|
|
345
|
+
* @remarks
|
|
346
|
+
* The primary data source type for maplibre-yaml. Supports multiple data
|
|
347
|
+
* loading strategies:
|
|
348
|
+
*
|
|
349
|
+
* **Data Sources (one required):**
|
|
350
|
+
* - `url` - Fetch GeoJSON from URL at runtime
|
|
351
|
+
* - `data` - Inline GeoJSON object
|
|
352
|
+
* - `stream` - Real-time WebSocket or SSE connection
|
|
353
|
+
*
|
|
354
|
+
* **Fetch Strategy:**
|
|
355
|
+
* - `runtime` (default) - Fetch when map loads, keeps bundle small
|
|
356
|
+
* - `build` - Fetch at build time, bundle with app
|
|
357
|
+
* - `hybrid` - Build-time with runtime refresh
|
|
358
|
+
*
|
|
359
|
+
* **Real-time Updates:**
|
|
360
|
+
* - Use `refreshInterval` for polling (minimum 1000ms)
|
|
361
|
+
* - Use `stream` for WebSocket/SSE
|
|
362
|
+
* - Configure `updateStrategy` for merge vs replace
|
|
363
|
+
*
|
|
364
|
+
* @example Basic URL Source
|
|
365
|
+
* ```yaml
|
|
366
|
+
* source:
|
|
367
|
+
* type: geojson
|
|
368
|
+
* url: "https://example.com/data.geojson"
|
|
369
|
+
* ```
|
|
370
|
+
*
|
|
371
|
+
* @example Inline Data
|
|
372
|
+
* ```yaml
|
|
373
|
+
* source:
|
|
374
|
+
* type: geojson
|
|
375
|
+
* data:
|
|
376
|
+
* type: FeatureCollection
|
|
377
|
+
* features:
|
|
378
|
+
* - type: Feature
|
|
379
|
+
* geometry:
|
|
380
|
+
* type: Point
|
|
381
|
+
* coordinates: [-74.006, 40.7128]
|
|
382
|
+
* properties:
|
|
383
|
+
* name: "New York"
|
|
384
|
+
* ```
|
|
385
|
+
*
|
|
386
|
+
* @example Polling Updates
|
|
387
|
+
* ```yaml
|
|
388
|
+
* source:
|
|
389
|
+
* type: geojson
|
|
390
|
+
* url: "https://api.example.com/live-data"
|
|
391
|
+
* refreshInterval: 15000
|
|
392
|
+
* loading:
|
|
393
|
+
* message: "Loading live data..."
|
|
394
|
+
* ```
|
|
395
|
+
*
|
|
396
|
+
* @example WebSocket Streaming
|
|
397
|
+
* ```yaml
|
|
398
|
+
* source:
|
|
399
|
+
* type: geojson
|
|
400
|
+
* stream:
|
|
401
|
+
* type: websocket
|
|
402
|
+
* url: "wss://api.example.com/stream"
|
|
403
|
+
* updateStrategy: merge
|
|
404
|
+
* updateKey: "id"
|
|
405
|
+
* ```
|
|
406
|
+
*
|
|
407
|
+
* @example Clustered Points
|
|
408
|
+
* ```yaml
|
|
409
|
+
* source:
|
|
410
|
+
* type: geojson
|
|
411
|
+
* url: "https://example.com/points.geojson"
|
|
412
|
+
* cluster: true
|
|
413
|
+
* clusterRadius: 50
|
|
414
|
+
* clusterMaxZoom: 14
|
|
415
|
+
* ```
|
|
416
|
+
*
|
|
417
|
+
* @see {@link StreamConfigSchema} for streaming options
|
|
418
|
+
* @see {@link LoadingConfigSchema} for loading UI options
|
|
419
|
+
* @see {@link https://maplibre.org/maplibre-style-spec/sources/#geojson | MapLibre GeoJSON Source}
|
|
420
|
+
*/
|
|
421
|
+
declare const GeoJSONSourceSchema: z.ZodEffects<z.ZodObject<{
|
|
422
|
+
type: z.ZodLiteral<"geojson">;
|
|
423
|
+
url: z.ZodOptional<z.ZodString>;
|
|
424
|
+
data: z.ZodOptional<z.ZodAny>;
|
|
425
|
+
prefetchedData: z.ZodOptional<z.ZodAny>;
|
|
426
|
+
fetchStrategy: z.ZodDefault<z.ZodEnum<["runtime", "build", "hybrid"]>>;
|
|
427
|
+
stream: z.ZodOptional<z.ZodObject<{
|
|
428
|
+
type: z.ZodEnum<["websocket", "sse"]>;
|
|
429
|
+
url: z.ZodOptional<z.ZodString>;
|
|
430
|
+
reconnect: z.ZodDefault<z.ZodBoolean>;
|
|
431
|
+
reconnectMaxAttempts: z.ZodDefault<z.ZodNumber>;
|
|
432
|
+
reconnectDelay: z.ZodDefault<z.ZodNumber>;
|
|
433
|
+
reconnectMaxDelay: z.ZodDefault<z.ZodNumber>;
|
|
434
|
+
eventTypes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
435
|
+
protocols: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
436
|
+
}, "strip", z.ZodTypeAny, {
|
|
437
|
+
type: "websocket" | "sse";
|
|
438
|
+
reconnect: boolean;
|
|
439
|
+
reconnectMaxAttempts: number;
|
|
440
|
+
reconnectDelay: number;
|
|
441
|
+
reconnectMaxDelay: number;
|
|
442
|
+
url?: string | undefined;
|
|
443
|
+
eventTypes?: string[] | undefined;
|
|
444
|
+
protocols?: string | string[] | undefined;
|
|
445
|
+
}, {
|
|
446
|
+
type: "websocket" | "sse";
|
|
447
|
+
url?: string | undefined;
|
|
448
|
+
reconnect?: boolean | undefined;
|
|
449
|
+
reconnectMaxAttempts?: number | undefined;
|
|
450
|
+
reconnectDelay?: number | undefined;
|
|
451
|
+
reconnectMaxDelay?: number | undefined;
|
|
452
|
+
eventTypes?: string[] | undefined;
|
|
453
|
+
protocols?: string | string[] | undefined;
|
|
454
|
+
}>>;
|
|
455
|
+
refresh: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
456
|
+
refreshInterval: z.ZodOptional<z.ZodNumber>;
|
|
457
|
+
updateStrategy: z.ZodDefault<z.ZodEnum<["replace", "merge", "append-window"]>>;
|
|
458
|
+
updateKey: z.ZodOptional<z.ZodString>;
|
|
459
|
+
windowSize: z.ZodOptional<z.ZodNumber>;
|
|
460
|
+
windowDuration: z.ZodOptional<z.ZodNumber>;
|
|
461
|
+
timestampField: z.ZodOptional<z.ZodString>;
|
|
462
|
+
}, "strip", z.ZodTypeAny, {
|
|
463
|
+
updateStrategy: "replace" | "merge" | "append-window";
|
|
464
|
+
refreshInterval?: number | undefined;
|
|
465
|
+
updateKey?: string | undefined;
|
|
466
|
+
windowSize?: number | undefined;
|
|
467
|
+
windowDuration?: number | undefined;
|
|
468
|
+
timestampField?: string | undefined;
|
|
469
|
+
}, {
|
|
470
|
+
refreshInterval?: number | undefined;
|
|
471
|
+
updateStrategy?: "replace" | "merge" | "append-window" | undefined;
|
|
472
|
+
updateKey?: string | undefined;
|
|
473
|
+
windowSize?: number | undefined;
|
|
474
|
+
windowDuration?: number | undefined;
|
|
475
|
+
timestampField?: string | undefined;
|
|
476
|
+
}>, {
|
|
477
|
+
updateStrategy: "replace" | "merge" | "append-window";
|
|
478
|
+
refreshInterval?: number | undefined;
|
|
479
|
+
updateKey?: string | undefined;
|
|
480
|
+
windowSize?: number | undefined;
|
|
481
|
+
windowDuration?: number | undefined;
|
|
482
|
+
timestampField?: string | undefined;
|
|
483
|
+
}, {
|
|
484
|
+
refreshInterval?: number | undefined;
|
|
485
|
+
updateStrategy?: "replace" | "merge" | "append-window" | undefined;
|
|
486
|
+
updateKey?: string | undefined;
|
|
487
|
+
windowSize?: number | undefined;
|
|
488
|
+
windowDuration?: number | undefined;
|
|
489
|
+
timestampField?: string | undefined;
|
|
490
|
+
}>>;
|
|
491
|
+
refreshInterval: z.ZodOptional<z.ZodNumber>;
|
|
492
|
+
updateStrategy: z.ZodOptional<z.ZodEnum<["replace", "merge", "append-window"]>>;
|
|
493
|
+
updateKey: z.ZodOptional<z.ZodString>;
|
|
494
|
+
loading: z.ZodOptional<z.ZodObject<{
|
|
495
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
496
|
+
message: z.ZodOptional<z.ZodString>;
|
|
497
|
+
showErrorOverlay: z.ZodDefault<z.ZodBoolean>;
|
|
498
|
+
}, "strip", z.ZodTypeAny, {
|
|
499
|
+
enabled: boolean;
|
|
500
|
+
showErrorOverlay: boolean;
|
|
501
|
+
message?: string | undefined;
|
|
502
|
+
}, {
|
|
503
|
+
message?: string | undefined;
|
|
504
|
+
enabled?: boolean | undefined;
|
|
505
|
+
showErrorOverlay?: boolean | undefined;
|
|
506
|
+
}>>;
|
|
507
|
+
cache: z.ZodOptional<z.ZodObject<{
|
|
508
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
509
|
+
ttl: z.ZodOptional<z.ZodNumber>;
|
|
510
|
+
}, "strip", z.ZodTypeAny, {
|
|
511
|
+
enabled: boolean;
|
|
512
|
+
ttl?: number | undefined;
|
|
513
|
+
}, {
|
|
514
|
+
enabled?: boolean | undefined;
|
|
515
|
+
ttl?: number | undefined;
|
|
516
|
+
}>>;
|
|
517
|
+
cluster: z.ZodOptional<z.ZodBoolean>;
|
|
518
|
+
clusterRadius: z.ZodDefault<z.ZodNumber>;
|
|
519
|
+
clusterMaxZoom: z.ZodOptional<z.ZodNumber>;
|
|
520
|
+
clusterMinPoints: z.ZodOptional<z.ZodNumber>;
|
|
521
|
+
clusterProperties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
522
|
+
tolerance: z.ZodOptional<z.ZodNumber>;
|
|
523
|
+
buffer: z.ZodOptional<z.ZodNumber>;
|
|
524
|
+
lineMetrics: z.ZodOptional<z.ZodBoolean>;
|
|
525
|
+
generateId: z.ZodOptional<z.ZodBoolean>;
|
|
526
|
+
promoteId: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
|
|
527
|
+
attribution: z.ZodOptional<z.ZodString>;
|
|
528
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
529
|
+
type: z.ZodLiteral<"geojson">;
|
|
530
|
+
url: z.ZodOptional<z.ZodString>;
|
|
531
|
+
data: z.ZodOptional<z.ZodAny>;
|
|
532
|
+
prefetchedData: z.ZodOptional<z.ZodAny>;
|
|
533
|
+
fetchStrategy: z.ZodDefault<z.ZodEnum<["runtime", "build", "hybrid"]>>;
|
|
534
|
+
stream: z.ZodOptional<z.ZodObject<{
|
|
535
|
+
type: z.ZodEnum<["websocket", "sse"]>;
|
|
536
|
+
url: z.ZodOptional<z.ZodString>;
|
|
537
|
+
reconnect: z.ZodDefault<z.ZodBoolean>;
|
|
538
|
+
reconnectMaxAttempts: z.ZodDefault<z.ZodNumber>;
|
|
539
|
+
reconnectDelay: z.ZodDefault<z.ZodNumber>;
|
|
540
|
+
reconnectMaxDelay: z.ZodDefault<z.ZodNumber>;
|
|
541
|
+
eventTypes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
542
|
+
protocols: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
543
|
+
}, "strip", z.ZodTypeAny, {
|
|
544
|
+
type: "websocket" | "sse";
|
|
545
|
+
reconnect: boolean;
|
|
546
|
+
reconnectMaxAttempts: number;
|
|
547
|
+
reconnectDelay: number;
|
|
548
|
+
reconnectMaxDelay: number;
|
|
549
|
+
url?: string | undefined;
|
|
550
|
+
eventTypes?: string[] | undefined;
|
|
551
|
+
protocols?: string | string[] | undefined;
|
|
552
|
+
}, {
|
|
553
|
+
type: "websocket" | "sse";
|
|
554
|
+
url?: string | undefined;
|
|
555
|
+
reconnect?: boolean | undefined;
|
|
556
|
+
reconnectMaxAttempts?: number | undefined;
|
|
557
|
+
reconnectDelay?: number | undefined;
|
|
558
|
+
reconnectMaxDelay?: number | undefined;
|
|
559
|
+
eventTypes?: string[] | undefined;
|
|
560
|
+
protocols?: string | string[] | undefined;
|
|
561
|
+
}>>;
|
|
562
|
+
refresh: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
563
|
+
refreshInterval: z.ZodOptional<z.ZodNumber>;
|
|
564
|
+
updateStrategy: z.ZodDefault<z.ZodEnum<["replace", "merge", "append-window"]>>;
|
|
565
|
+
updateKey: z.ZodOptional<z.ZodString>;
|
|
566
|
+
windowSize: z.ZodOptional<z.ZodNumber>;
|
|
567
|
+
windowDuration: z.ZodOptional<z.ZodNumber>;
|
|
568
|
+
timestampField: z.ZodOptional<z.ZodString>;
|
|
569
|
+
}, "strip", z.ZodTypeAny, {
|
|
570
|
+
updateStrategy: "replace" | "merge" | "append-window";
|
|
571
|
+
refreshInterval?: number | undefined;
|
|
572
|
+
updateKey?: string | undefined;
|
|
573
|
+
windowSize?: number | undefined;
|
|
574
|
+
windowDuration?: number | undefined;
|
|
575
|
+
timestampField?: string | undefined;
|
|
576
|
+
}, {
|
|
577
|
+
refreshInterval?: number | undefined;
|
|
578
|
+
updateStrategy?: "replace" | "merge" | "append-window" | undefined;
|
|
579
|
+
updateKey?: string | undefined;
|
|
580
|
+
windowSize?: number | undefined;
|
|
581
|
+
windowDuration?: number | undefined;
|
|
582
|
+
timestampField?: string | undefined;
|
|
583
|
+
}>, {
|
|
584
|
+
updateStrategy: "replace" | "merge" | "append-window";
|
|
585
|
+
refreshInterval?: number | undefined;
|
|
586
|
+
updateKey?: string | undefined;
|
|
587
|
+
windowSize?: number | undefined;
|
|
588
|
+
windowDuration?: number | undefined;
|
|
589
|
+
timestampField?: string | undefined;
|
|
590
|
+
}, {
|
|
591
|
+
refreshInterval?: number | undefined;
|
|
592
|
+
updateStrategy?: "replace" | "merge" | "append-window" | undefined;
|
|
593
|
+
updateKey?: string | undefined;
|
|
594
|
+
windowSize?: number | undefined;
|
|
595
|
+
windowDuration?: number | undefined;
|
|
596
|
+
timestampField?: string | undefined;
|
|
597
|
+
}>>;
|
|
598
|
+
refreshInterval: z.ZodOptional<z.ZodNumber>;
|
|
599
|
+
updateStrategy: z.ZodOptional<z.ZodEnum<["replace", "merge", "append-window"]>>;
|
|
600
|
+
updateKey: z.ZodOptional<z.ZodString>;
|
|
601
|
+
loading: z.ZodOptional<z.ZodObject<{
|
|
602
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
603
|
+
message: z.ZodOptional<z.ZodString>;
|
|
604
|
+
showErrorOverlay: z.ZodDefault<z.ZodBoolean>;
|
|
605
|
+
}, "strip", z.ZodTypeAny, {
|
|
606
|
+
enabled: boolean;
|
|
607
|
+
showErrorOverlay: boolean;
|
|
608
|
+
message?: string | undefined;
|
|
609
|
+
}, {
|
|
610
|
+
message?: string | undefined;
|
|
611
|
+
enabled?: boolean | undefined;
|
|
612
|
+
showErrorOverlay?: boolean | undefined;
|
|
613
|
+
}>>;
|
|
614
|
+
cache: z.ZodOptional<z.ZodObject<{
|
|
615
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
616
|
+
ttl: z.ZodOptional<z.ZodNumber>;
|
|
617
|
+
}, "strip", z.ZodTypeAny, {
|
|
618
|
+
enabled: boolean;
|
|
619
|
+
ttl?: number | undefined;
|
|
620
|
+
}, {
|
|
621
|
+
enabled?: boolean | undefined;
|
|
622
|
+
ttl?: number | undefined;
|
|
623
|
+
}>>;
|
|
624
|
+
cluster: z.ZodOptional<z.ZodBoolean>;
|
|
625
|
+
clusterRadius: z.ZodDefault<z.ZodNumber>;
|
|
626
|
+
clusterMaxZoom: z.ZodOptional<z.ZodNumber>;
|
|
627
|
+
clusterMinPoints: z.ZodOptional<z.ZodNumber>;
|
|
628
|
+
clusterProperties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
629
|
+
tolerance: z.ZodOptional<z.ZodNumber>;
|
|
630
|
+
buffer: z.ZodOptional<z.ZodNumber>;
|
|
631
|
+
lineMetrics: z.ZodOptional<z.ZodBoolean>;
|
|
632
|
+
generateId: z.ZodOptional<z.ZodBoolean>;
|
|
633
|
+
promoteId: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
|
|
634
|
+
attribution: z.ZodOptional<z.ZodString>;
|
|
635
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
636
|
+
type: z.ZodLiteral<"geojson">;
|
|
637
|
+
url: z.ZodOptional<z.ZodString>;
|
|
638
|
+
data: z.ZodOptional<z.ZodAny>;
|
|
639
|
+
prefetchedData: z.ZodOptional<z.ZodAny>;
|
|
640
|
+
fetchStrategy: z.ZodDefault<z.ZodEnum<["runtime", "build", "hybrid"]>>;
|
|
641
|
+
stream: z.ZodOptional<z.ZodObject<{
|
|
642
|
+
type: z.ZodEnum<["websocket", "sse"]>;
|
|
643
|
+
url: z.ZodOptional<z.ZodString>;
|
|
644
|
+
reconnect: z.ZodDefault<z.ZodBoolean>;
|
|
645
|
+
reconnectMaxAttempts: z.ZodDefault<z.ZodNumber>;
|
|
646
|
+
reconnectDelay: z.ZodDefault<z.ZodNumber>;
|
|
647
|
+
reconnectMaxDelay: z.ZodDefault<z.ZodNumber>;
|
|
648
|
+
eventTypes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
649
|
+
protocols: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
650
|
+
}, "strip", z.ZodTypeAny, {
|
|
651
|
+
type: "websocket" | "sse";
|
|
652
|
+
reconnect: boolean;
|
|
653
|
+
reconnectMaxAttempts: number;
|
|
654
|
+
reconnectDelay: number;
|
|
655
|
+
reconnectMaxDelay: number;
|
|
656
|
+
url?: string | undefined;
|
|
657
|
+
eventTypes?: string[] | undefined;
|
|
658
|
+
protocols?: string | string[] | undefined;
|
|
659
|
+
}, {
|
|
660
|
+
type: "websocket" | "sse";
|
|
661
|
+
url?: string | undefined;
|
|
662
|
+
reconnect?: boolean | undefined;
|
|
663
|
+
reconnectMaxAttempts?: number | undefined;
|
|
664
|
+
reconnectDelay?: number | undefined;
|
|
665
|
+
reconnectMaxDelay?: number | undefined;
|
|
666
|
+
eventTypes?: string[] | undefined;
|
|
667
|
+
protocols?: string | string[] | undefined;
|
|
668
|
+
}>>;
|
|
669
|
+
refresh: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
670
|
+
refreshInterval: z.ZodOptional<z.ZodNumber>;
|
|
671
|
+
updateStrategy: z.ZodDefault<z.ZodEnum<["replace", "merge", "append-window"]>>;
|
|
672
|
+
updateKey: z.ZodOptional<z.ZodString>;
|
|
673
|
+
windowSize: z.ZodOptional<z.ZodNumber>;
|
|
674
|
+
windowDuration: z.ZodOptional<z.ZodNumber>;
|
|
675
|
+
timestampField: z.ZodOptional<z.ZodString>;
|
|
676
|
+
}, "strip", z.ZodTypeAny, {
|
|
677
|
+
updateStrategy: "replace" | "merge" | "append-window";
|
|
678
|
+
refreshInterval?: number | undefined;
|
|
679
|
+
updateKey?: string | undefined;
|
|
680
|
+
windowSize?: number | undefined;
|
|
681
|
+
windowDuration?: number | undefined;
|
|
682
|
+
timestampField?: string | undefined;
|
|
683
|
+
}, {
|
|
684
|
+
refreshInterval?: number | undefined;
|
|
685
|
+
updateStrategy?: "replace" | "merge" | "append-window" | undefined;
|
|
686
|
+
updateKey?: string | undefined;
|
|
687
|
+
windowSize?: number | undefined;
|
|
688
|
+
windowDuration?: number | undefined;
|
|
689
|
+
timestampField?: string | undefined;
|
|
690
|
+
}>, {
|
|
691
|
+
updateStrategy: "replace" | "merge" | "append-window";
|
|
692
|
+
refreshInterval?: number | undefined;
|
|
693
|
+
updateKey?: string | undefined;
|
|
694
|
+
windowSize?: number | undefined;
|
|
695
|
+
windowDuration?: number | undefined;
|
|
696
|
+
timestampField?: string | undefined;
|
|
697
|
+
}, {
|
|
698
|
+
refreshInterval?: number | undefined;
|
|
699
|
+
updateStrategy?: "replace" | "merge" | "append-window" | undefined;
|
|
700
|
+
updateKey?: string | undefined;
|
|
701
|
+
windowSize?: number | undefined;
|
|
702
|
+
windowDuration?: number | undefined;
|
|
703
|
+
timestampField?: string | undefined;
|
|
704
|
+
}>>;
|
|
705
|
+
refreshInterval: z.ZodOptional<z.ZodNumber>;
|
|
706
|
+
updateStrategy: z.ZodOptional<z.ZodEnum<["replace", "merge", "append-window"]>>;
|
|
707
|
+
updateKey: z.ZodOptional<z.ZodString>;
|
|
708
|
+
loading: z.ZodOptional<z.ZodObject<{
|
|
709
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
710
|
+
message: z.ZodOptional<z.ZodString>;
|
|
711
|
+
showErrorOverlay: z.ZodDefault<z.ZodBoolean>;
|
|
712
|
+
}, "strip", z.ZodTypeAny, {
|
|
713
|
+
enabled: boolean;
|
|
714
|
+
showErrorOverlay: boolean;
|
|
715
|
+
message?: string | undefined;
|
|
716
|
+
}, {
|
|
717
|
+
message?: string | undefined;
|
|
718
|
+
enabled?: boolean | undefined;
|
|
719
|
+
showErrorOverlay?: boolean | undefined;
|
|
720
|
+
}>>;
|
|
721
|
+
cache: z.ZodOptional<z.ZodObject<{
|
|
722
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
723
|
+
ttl: z.ZodOptional<z.ZodNumber>;
|
|
724
|
+
}, "strip", z.ZodTypeAny, {
|
|
725
|
+
enabled: boolean;
|
|
726
|
+
ttl?: number | undefined;
|
|
727
|
+
}, {
|
|
728
|
+
enabled?: boolean | undefined;
|
|
729
|
+
ttl?: number | undefined;
|
|
730
|
+
}>>;
|
|
731
|
+
cluster: z.ZodOptional<z.ZodBoolean>;
|
|
732
|
+
clusterRadius: z.ZodDefault<z.ZodNumber>;
|
|
733
|
+
clusterMaxZoom: z.ZodOptional<z.ZodNumber>;
|
|
734
|
+
clusterMinPoints: z.ZodOptional<z.ZodNumber>;
|
|
735
|
+
clusterProperties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
736
|
+
tolerance: z.ZodOptional<z.ZodNumber>;
|
|
737
|
+
buffer: z.ZodOptional<z.ZodNumber>;
|
|
738
|
+
lineMetrics: z.ZodOptional<z.ZodBoolean>;
|
|
739
|
+
generateId: z.ZodOptional<z.ZodBoolean>;
|
|
740
|
+
promoteId: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
|
|
741
|
+
attribution: z.ZodOptional<z.ZodString>;
|
|
742
|
+
}, z.ZodTypeAny, "passthrough">>, z.objectOutputType<{
|
|
743
|
+
type: z.ZodLiteral<"geojson">;
|
|
744
|
+
url: z.ZodOptional<z.ZodString>;
|
|
745
|
+
data: z.ZodOptional<z.ZodAny>;
|
|
746
|
+
prefetchedData: z.ZodOptional<z.ZodAny>;
|
|
747
|
+
fetchStrategy: z.ZodDefault<z.ZodEnum<["runtime", "build", "hybrid"]>>;
|
|
748
|
+
stream: z.ZodOptional<z.ZodObject<{
|
|
749
|
+
type: z.ZodEnum<["websocket", "sse"]>;
|
|
750
|
+
url: z.ZodOptional<z.ZodString>;
|
|
751
|
+
reconnect: z.ZodDefault<z.ZodBoolean>;
|
|
752
|
+
reconnectMaxAttempts: z.ZodDefault<z.ZodNumber>;
|
|
753
|
+
reconnectDelay: z.ZodDefault<z.ZodNumber>;
|
|
754
|
+
reconnectMaxDelay: z.ZodDefault<z.ZodNumber>;
|
|
755
|
+
eventTypes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
756
|
+
protocols: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
757
|
+
}, "strip", z.ZodTypeAny, {
|
|
758
|
+
type: "websocket" | "sse";
|
|
759
|
+
reconnect: boolean;
|
|
760
|
+
reconnectMaxAttempts: number;
|
|
761
|
+
reconnectDelay: number;
|
|
762
|
+
reconnectMaxDelay: number;
|
|
763
|
+
url?: string | undefined;
|
|
764
|
+
eventTypes?: string[] | undefined;
|
|
765
|
+
protocols?: string | string[] | undefined;
|
|
766
|
+
}, {
|
|
767
|
+
type: "websocket" | "sse";
|
|
768
|
+
url?: string | undefined;
|
|
769
|
+
reconnect?: boolean | undefined;
|
|
770
|
+
reconnectMaxAttempts?: number | undefined;
|
|
771
|
+
reconnectDelay?: number | undefined;
|
|
772
|
+
reconnectMaxDelay?: number | undefined;
|
|
773
|
+
eventTypes?: string[] | undefined;
|
|
774
|
+
protocols?: string | string[] | undefined;
|
|
775
|
+
}>>;
|
|
776
|
+
refresh: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
777
|
+
refreshInterval: z.ZodOptional<z.ZodNumber>;
|
|
778
|
+
updateStrategy: z.ZodDefault<z.ZodEnum<["replace", "merge", "append-window"]>>;
|
|
779
|
+
updateKey: z.ZodOptional<z.ZodString>;
|
|
780
|
+
windowSize: z.ZodOptional<z.ZodNumber>;
|
|
781
|
+
windowDuration: z.ZodOptional<z.ZodNumber>;
|
|
782
|
+
timestampField: z.ZodOptional<z.ZodString>;
|
|
783
|
+
}, "strip", z.ZodTypeAny, {
|
|
784
|
+
updateStrategy: "replace" | "merge" | "append-window";
|
|
785
|
+
refreshInterval?: number | undefined;
|
|
786
|
+
updateKey?: string | undefined;
|
|
787
|
+
windowSize?: number | undefined;
|
|
788
|
+
windowDuration?: number | undefined;
|
|
789
|
+
timestampField?: string | undefined;
|
|
790
|
+
}, {
|
|
791
|
+
refreshInterval?: number | undefined;
|
|
792
|
+
updateStrategy?: "replace" | "merge" | "append-window" | undefined;
|
|
793
|
+
updateKey?: string | undefined;
|
|
794
|
+
windowSize?: number | undefined;
|
|
795
|
+
windowDuration?: number | undefined;
|
|
796
|
+
timestampField?: string | undefined;
|
|
797
|
+
}>, {
|
|
798
|
+
updateStrategy: "replace" | "merge" | "append-window";
|
|
799
|
+
refreshInterval?: number | undefined;
|
|
800
|
+
updateKey?: string | undefined;
|
|
801
|
+
windowSize?: number | undefined;
|
|
802
|
+
windowDuration?: number | undefined;
|
|
803
|
+
timestampField?: string | undefined;
|
|
804
|
+
}, {
|
|
805
|
+
refreshInterval?: number | undefined;
|
|
806
|
+
updateStrategy?: "replace" | "merge" | "append-window" | undefined;
|
|
807
|
+
updateKey?: string | undefined;
|
|
808
|
+
windowSize?: number | undefined;
|
|
809
|
+
windowDuration?: number | undefined;
|
|
810
|
+
timestampField?: string | undefined;
|
|
811
|
+
}>>;
|
|
812
|
+
refreshInterval: z.ZodOptional<z.ZodNumber>;
|
|
813
|
+
updateStrategy: z.ZodOptional<z.ZodEnum<["replace", "merge", "append-window"]>>;
|
|
814
|
+
updateKey: z.ZodOptional<z.ZodString>;
|
|
815
|
+
loading: z.ZodOptional<z.ZodObject<{
|
|
816
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
817
|
+
message: z.ZodOptional<z.ZodString>;
|
|
818
|
+
showErrorOverlay: z.ZodDefault<z.ZodBoolean>;
|
|
819
|
+
}, "strip", z.ZodTypeAny, {
|
|
820
|
+
enabled: boolean;
|
|
821
|
+
showErrorOverlay: boolean;
|
|
822
|
+
message?: string | undefined;
|
|
823
|
+
}, {
|
|
824
|
+
message?: string | undefined;
|
|
825
|
+
enabled?: boolean | undefined;
|
|
826
|
+
showErrorOverlay?: boolean | undefined;
|
|
827
|
+
}>>;
|
|
828
|
+
cache: z.ZodOptional<z.ZodObject<{
|
|
829
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
830
|
+
ttl: z.ZodOptional<z.ZodNumber>;
|
|
831
|
+
}, "strip", z.ZodTypeAny, {
|
|
832
|
+
enabled: boolean;
|
|
833
|
+
ttl?: number | undefined;
|
|
834
|
+
}, {
|
|
835
|
+
enabled?: boolean | undefined;
|
|
836
|
+
ttl?: number | undefined;
|
|
837
|
+
}>>;
|
|
838
|
+
cluster: z.ZodOptional<z.ZodBoolean>;
|
|
839
|
+
clusterRadius: z.ZodDefault<z.ZodNumber>;
|
|
840
|
+
clusterMaxZoom: z.ZodOptional<z.ZodNumber>;
|
|
841
|
+
clusterMinPoints: z.ZodOptional<z.ZodNumber>;
|
|
842
|
+
clusterProperties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
843
|
+
tolerance: z.ZodOptional<z.ZodNumber>;
|
|
844
|
+
buffer: z.ZodOptional<z.ZodNumber>;
|
|
845
|
+
lineMetrics: z.ZodOptional<z.ZodBoolean>;
|
|
846
|
+
generateId: z.ZodOptional<z.ZodBoolean>;
|
|
847
|
+
promoteId: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
|
|
848
|
+
attribution: z.ZodOptional<z.ZodString>;
|
|
849
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
850
|
+
type: z.ZodLiteral<"geojson">;
|
|
851
|
+
url: z.ZodOptional<z.ZodString>;
|
|
852
|
+
data: z.ZodOptional<z.ZodAny>;
|
|
853
|
+
prefetchedData: z.ZodOptional<z.ZodAny>;
|
|
854
|
+
fetchStrategy: z.ZodDefault<z.ZodEnum<["runtime", "build", "hybrid"]>>;
|
|
855
|
+
stream: z.ZodOptional<z.ZodObject<{
|
|
856
|
+
type: z.ZodEnum<["websocket", "sse"]>;
|
|
857
|
+
url: z.ZodOptional<z.ZodString>;
|
|
858
|
+
reconnect: z.ZodDefault<z.ZodBoolean>;
|
|
859
|
+
reconnectMaxAttempts: z.ZodDefault<z.ZodNumber>;
|
|
860
|
+
reconnectDelay: z.ZodDefault<z.ZodNumber>;
|
|
861
|
+
reconnectMaxDelay: z.ZodDefault<z.ZodNumber>;
|
|
862
|
+
eventTypes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
863
|
+
protocols: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
864
|
+
}, "strip", z.ZodTypeAny, {
|
|
865
|
+
type: "websocket" | "sse";
|
|
866
|
+
reconnect: boolean;
|
|
867
|
+
reconnectMaxAttempts: number;
|
|
868
|
+
reconnectDelay: number;
|
|
869
|
+
reconnectMaxDelay: number;
|
|
870
|
+
url?: string | undefined;
|
|
871
|
+
eventTypes?: string[] | undefined;
|
|
872
|
+
protocols?: string | string[] | undefined;
|
|
873
|
+
}, {
|
|
874
|
+
type: "websocket" | "sse";
|
|
875
|
+
url?: string | undefined;
|
|
876
|
+
reconnect?: boolean | undefined;
|
|
877
|
+
reconnectMaxAttempts?: number | undefined;
|
|
878
|
+
reconnectDelay?: number | undefined;
|
|
879
|
+
reconnectMaxDelay?: number | undefined;
|
|
880
|
+
eventTypes?: string[] | undefined;
|
|
881
|
+
protocols?: string | string[] | undefined;
|
|
882
|
+
}>>;
|
|
883
|
+
refresh: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
884
|
+
refreshInterval: z.ZodOptional<z.ZodNumber>;
|
|
885
|
+
updateStrategy: z.ZodDefault<z.ZodEnum<["replace", "merge", "append-window"]>>;
|
|
886
|
+
updateKey: z.ZodOptional<z.ZodString>;
|
|
887
|
+
windowSize: z.ZodOptional<z.ZodNumber>;
|
|
888
|
+
windowDuration: z.ZodOptional<z.ZodNumber>;
|
|
889
|
+
timestampField: z.ZodOptional<z.ZodString>;
|
|
890
|
+
}, "strip", z.ZodTypeAny, {
|
|
891
|
+
updateStrategy: "replace" | "merge" | "append-window";
|
|
892
|
+
refreshInterval?: number | undefined;
|
|
893
|
+
updateKey?: string | undefined;
|
|
894
|
+
windowSize?: number | undefined;
|
|
895
|
+
windowDuration?: number | undefined;
|
|
896
|
+
timestampField?: string | undefined;
|
|
897
|
+
}, {
|
|
898
|
+
refreshInterval?: number | undefined;
|
|
899
|
+
updateStrategy?: "replace" | "merge" | "append-window" | undefined;
|
|
900
|
+
updateKey?: string | undefined;
|
|
901
|
+
windowSize?: number | undefined;
|
|
902
|
+
windowDuration?: number | undefined;
|
|
903
|
+
timestampField?: string | undefined;
|
|
904
|
+
}>, {
|
|
905
|
+
updateStrategy: "replace" | "merge" | "append-window";
|
|
906
|
+
refreshInterval?: number | undefined;
|
|
907
|
+
updateKey?: string | undefined;
|
|
908
|
+
windowSize?: number | undefined;
|
|
909
|
+
windowDuration?: number | undefined;
|
|
910
|
+
timestampField?: string | undefined;
|
|
911
|
+
}, {
|
|
912
|
+
refreshInterval?: number | undefined;
|
|
913
|
+
updateStrategy?: "replace" | "merge" | "append-window" | undefined;
|
|
914
|
+
updateKey?: string | undefined;
|
|
915
|
+
windowSize?: number | undefined;
|
|
916
|
+
windowDuration?: number | undefined;
|
|
917
|
+
timestampField?: string | undefined;
|
|
918
|
+
}>>;
|
|
919
|
+
refreshInterval: z.ZodOptional<z.ZodNumber>;
|
|
920
|
+
updateStrategy: z.ZodOptional<z.ZodEnum<["replace", "merge", "append-window"]>>;
|
|
921
|
+
updateKey: z.ZodOptional<z.ZodString>;
|
|
922
|
+
loading: z.ZodOptional<z.ZodObject<{
|
|
923
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
924
|
+
message: z.ZodOptional<z.ZodString>;
|
|
925
|
+
showErrorOverlay: z.ZodDefault<z.ZodBoolean>;
|
|
926
|
+
}, "strip", z.ZodTypeAny, {
|
|
927
|
+
enabled: boolean;
|
|
928
|
+
showErrorOverlay: boolean;
|
|
929
|
+
message?: string | undefined;
|
|
930
|
+
}, {
|
|
931
|
+
message?: string | undefined;
|
|
932
|
+
enabled?: boolean | undefined;
|
|
933
|
+
showErrorOverlay?: boolean | undefined;
|
|
934
|
+
}>>;
|
|
935
|
+
cache: z.ZodOptional<z.ZodObject<{
|
|
936
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
937
|
+
ttl: z.ZodOptional<z.ZodNumber>;
|
|
938
|
+
}, "strip", z.ZodTypeAny, {
|
|
939
|
+
enabled: boolean;
|
|
940
|
+
ttl?: number | undefined;
|
|
941
|
+
}, {
|
|
942
|
+
enabled?: boolean | undefined;
|
|
943
|
+
ttl?: number | undefined;
|
|
944
|
+
}>>;
|
|
945
|
+
cluster: z.ZodOptional<z.ZodBoolean>;
|
|
946
|
+
clusterRadius: z.ZodDefault<z.ZodNumber>;
|
|
947
|
+
clusterMaxZoom: z.ZodOptional<z.ZodNumber>;
|
|
948
|
+
clusterMinPoints: z.ZodOptional<z.ZodNumber>;
|
|
949
|
+
clusterProperties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
950
|
+
tolerance: z.ZodOptional<z.ZodNumber>;
|
|
951
|
+
buffer: z.ZodOptional<z.ZodNumber>;
|
|
952
|
+
lineMetrics: z.ZodOptional<z.ZodBoolean>;
|
|
953
|
+
generateId: z.ZodOptional<z.ZodBoolean>;
|
|
954
|
+
promoteId: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
|
|
955
|
+
attribution: z.ZodOptional<z.ZodString>;
|
|
956
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
957
|
+
/**
|
|
958
|
+
* Vector tile source configuration.
|
|
959
|
+
*
|
|
960
|
+
* @remarks
|
|
961
|
+
* Vector tiles provide efficient rendering of large datasets.
|
|
962
|
+
* Requires either a TileJSON URL or a tiles URL array.
|
|
963
|
+
*
|
|
964
|
+
* @example TileJSON URL
|
|
965
|
+
* ```yaml
|
|
966
|
+
* source:
|
|
967
|
+
* type: vector
|
|
968
|
+
* url: "https://api.maptiler.com/tiles/v3/tiles.json?key=YOUR_KEY"
|
|
969
|
+
* ```
|
|
970
|
+
*
|
|
971
|
+
* @example Tiles Array
|
|
972
|
+
* ```yaml
|
|
973
|
+
* source:
|
|
974
|
+
* type: vector
|
|
975
|
+
* tiles:
|
|
976
|
+
* - "https://tile.example.com/{z}/{x}/{y}.pbf"
|
|
977
|
+
* minzoom: 0
|
|
978
|
+
* maxzoom: 14
|
|
979
|
+
* ```
|
|
980
|
+
*
|
|
981
|
+
* @see {@link https://maplibre.org/maplibre-style-spec/sources/#vector | MapLibre Vector Source}
|
|
982
|
+
*/
|
|
983
|
+
declare const VectorSourceSchema: z.ZodEffects<z.ZodObject<{
|
|
984
|
+
type: z.ZodLiteral<"vector">;
|
|
985
|
+
url: z.ZodOptional<z.ZodString>;
|
|
986
|
+
tiles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
987
|
+
minzoom: z.ZodOptional<z.ZodNumber>;
|
|
988
|
+
maxzoom: z.ZodOptional<z.ZodNumber>;
|
|
989
|
+
bounds: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
990
|
+
scheme: z.ZodOptional<z.ZodEnum<["xyz", "tms"]>>;
|
|
991
|
+
attribution: z.ZodOptional<z.ZodString>;
|
|
992
|
+
promoteId: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
|
|
993
|
+
volatile: z.ZodOptional<z.ZodBoolean>;
|
|
994
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
995
|
+
type: z.ZodLiteral<"vector">;
|
|
996
|
+
url: z.ZodOptional<z.ZodString>;
|
|
997
|
+
tiles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
998
|
+
minzoom: z.ZodOptional<z.ZodNumber>;
|
|
999
|
+
maxzoom: z.ZodOptional<z.ZodNumber>;
|
|
1000
|
+
bounds: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
1001
|
+
scheme: z.ZodOptional<z.ZodEnum<["xyz", "tms"]>>;
|
|
1002
|
+
attribution: z.ZodOptional<z.ZodString>;
|
|
1003
|
+
promoteId: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
|
|
1004
|
+
volatile: z.ZodOptional<z.ZodBoolean>;
|
|
1005
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1006
|
+
type: z.ZodLiteral<"vector">;
|
|
1007
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1008
|
+
tiles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1009
|
+
minzoom: z.ZodOptional<z.ZodNumber>;
|
|
1010
|
+
maxzoom: z.ZodOptional<z.ZodNumber>;
|
|
1011
|
+
bounds: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
1012
|
+
scheme: z.ZodOptional<z.ZodEnum<["xyz", "tms"]>>;
|
|
1013
|
+
attribution: z.ZodOptional<z.ZodString>;
|
|
1014
|
+
promoteId: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
|
|
1015
|
+
volatile: z.ZodOptional<z.ZodBoolean>;
|
|
1016
|
+
}, z.ZodTypeAny, "passthrough">>, z.objectOutputType<{
|
|
1017
|
+
type: z.ZodLiteral<"vector">;
|
|
1018
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1019
|
+
tiles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1020
|
+
minzoom: z.ZodOptional<z.ZodNumber>;
|
|
1021
|
+
maxzoom: z.ZodOptional<z.ZodNumber>;
|
|
1022
|
+
bounds: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
1023
|
+
scheme: z.ZodOptional<z.ZodEnum<["xyz", "tms"]>>;
|
|
1024
|
+
attribution: z.ZodOptional<z.ZodString>;
|
|
1025
|
+
promoteId: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
|
|
1026
|
+
volatile: z.ZodOptional<z.ZodBoolean>;
|
|
1027
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1028
|
+
type: z.ZodLiteral<"vector">;
|
|
1029
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1030
|
+
tiles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1031
|
+
minzoom: z.ZodOptional<z.ZodNumber>;
|
|
1032
|
+
maxzoom: z.ZodOptional<z.ZodNumber>;
|
|
1033
|
+
bounds: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
1034
|
+
scheme: z.ZodOptional<z.ZodEnum<["xyz", "tms"]>>;
|
|
1035
|
+
attribution: z.ZodOptional<z.ZodString>;
|
|
1036
|
+
promoteId: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
|
|
1037
|
+
volatile: z.ZodOptional<z.ZodBoolean>;
|
|
1038
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
1039
|
+
/**
|
|
1040
|
+
* Raster tile source configuration.
|
|
1041
|
+
*
|
|
1042
|
+
* @remarks
|
|
1043
|
+
* Raster tiles for satellite imagery, hillshading, or other bitmap data.
|
|
1044
|
+
*
|
|
1045
|
+
* @example
|
|
1046
|
+
* ```yaml
|
|
1047
|
+
* source:
|
|
1048
|
+
* type: raster
|
|
1049
|
+
* tiles:
|
|
1050
|
+
* - "https://tile.openstreetmap.org/{z}/{x}/{y}.png"
|
|
1051
|
+
* tileSize: 256
|
|
1052
|
+
* maxzoom: 19
|
|
1053
|
+
* attribution: "© OpenStreetMap contributors"
|
|
1054
|
+
* ```
|
|
1055
|
+
*
|
|
1056
|
+
* @see {@link https://maplibre.org/maplibre-style-spec/sources/#raster | MapLibre Raster Source}
|
|
1057
|
+
*/
|
|
1058
|
+
declare const RasterSourceSchema: z.ZodEffects<z.ZodObject<{
|
|
1059
|
+
type: z.ZodLiteral<"raster">;
|
|
1060
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1061
|
+
tiles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1062
|
+
tileSize: z.ZodDefault<z.ZodNumber>;
|
|
1063
|
+
minzoom: z.ZodOptional<z.ZodNumber>;
|
|
1064
|
+
maxzoom: z.ZodOptional<z.ZodNumber>;
|
|
1065
|
+
bounds: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
1066
|
+
scheme: z.ZodOptional<z.ZodEnum<["xyz", "tms"]>>;
|
|
1067
|
+
attribution: z.ZodOptional<z.ZodString>;
|
|
1068
|
+
volatile: z.ZodOptional<z.ZodBoolean>;
|
|
1069
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1070
|
+
type: z.ZodLiteral<"raster">;
|
|
1071
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1072
|
+
tiles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1073
|
+
tileSize: z.ZodDefault<z.ZodNumber>;
|
|
1074
|
+
minzoom: z.ZodOptional<z.ZodNumber>;
|
|
1075
|
+
maxzoom: z.ZodOptional<z.ZodNumber>;
|
|
1076
|
+
bounds: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
1077
|
+
scheme: z.ZodOptional<z.ZodEnum<["xyz", "tms"]>>;
|
|
1078
|
+
attribution: z.ZodOptional<z.ZodString>;
|
|
1079
|
+
volatile: z.ZodOptional<z.ZodBoolean>;
|
|
1080
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1081
|
+
type: z.ZodLiteral<"raster">;
|
|
1082
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1083
|
+
tiles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1084
|
+
tileSize: z.ZodDefault<z.ZodNumber>;
|
|
1085
|
+
minzoom: z.ZodOptional<z.ZodNumber>;
|
|
1086
|
+
maxzoom: z.ZodOptional<z.ZodNumber>;
|
|
1087
|
+
bounds: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
1088
|
+
scheme: z.ZodOptional<z.ZodEnum<["xyz", "tms"]>>;
|
|
1089
|
+
attribution: z.ZodOptional<z.ZodString>;
|
|
1090
|
+
volatile: z.ZodOptional<z.ZodBoolean>;
|
|
1091
|
+
}, z.ZodTypeAny, "passthrough">>, z.objectOutputType<{
|
|
1092
|
+
type: z.ZodLiteral<"raster">;
|
|
1093
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1094
|
+
tiles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1095
|
+
tileSize: z.ZodDefault<z.ZodNumber>;
|
|
1096
|
+
minzoom: z.ZodOptional<z.ZodNumber>;
|
|
1097
|
+
maxzoom: z.ZodOptional<z.ZodNumber>;
|
|
1098
|
+
bounds: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
1099
|
+
scheme: z.ZodOptional<z.ZodEnum<["xyz", "tms"]>>;
|
|
1100
|
+
attribution: z.ZodOptional<z.ZodString>;
|
|
1101
|
+
volatile: z.ZodOptional<z.ZodBoolean>;
|
|
1102
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1103
|
+
type: z.ZodLiteral<"raster">;
|
|
1104
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1105
|
+
tiles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1106
|
+
tileSize: z.ZodDefault<z.ZodNumber>;
|
|
1107
|
+
minzoom: z.ZodOptional<z.ZodNumber>;
|
|
1108
|
+
maxzoom: z.ZodOptional<z.ZodNumber>;
|
|
1109
|
+
bounds: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
1110
|
+
scheme: z.ZodOptional<z.ZodEnum<["xyz", "tms"]>>;
|
|
1111
|
+
attribution: z.ZodOptional<z.ZodString>;
|
|
1112
|
+
volatile: z.ZodOptional<z.ZodBoolean>;
|
|
1113
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
1114
|
+
/**
|
|
1115
|
+
* Image source configuration.
|
|
1116
|
+
*
|
|
1117
|
+
* @remarks
|
|
1118
|
+
* Display a single image on the map anchored to geographic coordinates.
|
|
1119
|
+
* Useful for overlaying maps, floor plans, or custom imagery.
|
|
1120
|
+
*
|
|
1121
|
+
* **Coordinate Order:**
|
|
1122
|
+
* Four corners must be specified clockwise starting from top-left:
|
|
1123
|
+
* 1. Top-left
|
|
1124
|
+
* 2. Top-right
|
|
1125
|
+
* 3. Bottom-right
|
|
1126
|
+
* 4. Bottom-left
|
|
1127
|
+
*
|
|
1128
|
+
* @example
|
|
1129
|
+
* ```yaml
|
|
1130
|
+
* source:
|
|
1131
|
+
* type: image
|
|
1132
|
+
* url: "https://example.com/overlay.png"
|
|
1133
|
+
* coordinates:
|
|
1134
|
+
* - [-80.425, 46.437] # top-left
|
|
1135
|
+
* - [-71.516, 46.437] # top-right
|
|
1136
|
+
* - [-71.516, 37.936] # bottom-right
|
|
1137
|
+
* - [-80.425, 37.936] # bottom-left
|
|
1138
|
+
* ```
|
|
1139
|
+
*
|
|
1140
|
+
* @see {@link https://maplibre.org/maplibre-style-spec/sources/#image | MapLibre Image Source}
|
|
1141
|
+
*/
|
|
1142
|
+
declare const ImageSourceSchema: z.ZodObject<{
|
|
1143
|
+
type: z.ZodLiteral<"image">;
|
|
1144
|
+
url: z.ZodString;
|
|
1145
|
+
coordinates: z.ZodTuple<[z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>], null>;
|
|
1146
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1147
|
+
type: z.ZodLiteral<"image">;
|
|
1148
|
+
url: z.ZodString;
|
|
1149
|
+
coordinates: z.ZodTuple<[z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>], null>;
|
|
1150
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1151
|
+
type: z.ZodLiteral<"image">;
|
|
1152
|
+
url: z.ZodString;
|
|
1153
|
+
coordinates: z.ZodTuple<[z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>], null>;
|
|
1154
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
1155
|
+
/**
|
|
1156
|
+
* Video source configuration.
|
|
1157
|
+
*
|
|
1158
|
+
* @remarks
|
|
1159
|
+
* Display video content on the map anchored to geographic coordinates.
|
|
1160
|
+
* Multiple URLs can be provided for browser compatibility.
|
|
1161
|
+
*
|
|
1162
|
+
* @example
|
|
1163
|
+
* ```yaml
|
|
1164
|
+
* source:
|
|
1165
|
+
* type: video
|
|
1166
|
+
* urls:
|
|
1167
|
+
* - "https://example.com/video.mp4"
|
|
1168
|
+
* - "https://example.com/video.webm"
|
|
1169
|
+
* coordinates:
|
|
1170
|
+
* - [-122.51596391201019, 37.56238816766053]
|
|
1171
|
+
* - [-122.51467645168304, 37.56410183312965]
|
|
1172
|
+
* - [-122.51309394836426, 37.563391708549425]
|
|
1173
|
+
* - [-122.51423120498657, 37.56161849366671]
|
|
1174
|
+
* ```
|
|
1175
|
+
*
|
|
1176
|
+
* @see {@link https://maplibre.org/maplibre-style-spec/sources/#video | MapLibre Video Source}
|
|
1177
|
+
*/
|
|
1178
|
+
declare const VideoSourceSchema: z.ZodObject<{
|
|
1179
|
+
type: z.ZodLiteral<"video">;
|
|
1180
|
+
urls: z.ZodArray<z.ZodString, "many">;
|
|
1181
|
+
coordinates: z.ZodTuple<[z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>], null>;
|
|
1182
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1183
|
+
type: z.ZodLiteral<"video">;
|
|
1184
|
+
urls: z.ZodArray<z.ZodString, "many">;
|
|
1185
|
+
coordinates: z.ZodTuple<[z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>], null>;
|
|
1186
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1187
|
+
type: z.ZodLiteral<"video">;
|
|
1188
|
+
urls: z.ZodArray<z.ZodString, "many">;
|
|
1189
|
+
coordinates: z.ZodTuple<[z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>], null>;
|
|
1190
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
1191
|
+
/**
|
|
1192
|
+
* Union of all layer source types.
|
|
1193
|
+
*
|
|
1194
|
+
* @remarks
|
|
1195
|
+
* Use the `type` field to determine which source type is being used.
|
|
1196
|
+
*
|
|
1197
|
+
* @example
|
|
1198
|
+
* ```typescript
|
|
1199
|
+
* const source: LayerSource = {
|
|
1200
|
+
* type: 'geojson',
|
|
1201
|
+
* url: 'https://example.com/data.geojson'
|
|
1202
|
+
* };
|
|
1203
|
+
*
|
|
1204
|
+
* // TypeScript knows the available fields based on type
|
|
1205
|
+
* if (source.type === 'geojson') {
|
|
1206
|
+
* console.log(source.refreshInterval); // OK
|
|
1207
|
+
* }
|
|
1208
|
+
* ```
|
|
1209
|
+
*/
|
|
1210
|
+
declare const LayerSourceSchema: z.ZodUnion<[z.ZodEffects<z.ZodObject<{
|
|
1211
|
+
type: z.ZodLiteral<"geojson">;
|
|
1212
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1213
|
+
data: z.ZodOptional<z.ZodAny>;
|
|
1214
|
+
prefetchedData: z.ZodOptional<z.ZodAny>;
|
|
1215
|
+
fetchStrategy: z.ZodDefault<z.ZodEnum<["runtime", "build", "hybrid"]>>;
|
|
1216
|
+
stream: z.ZodOptional<z.ZodObject<{
|
|
1217
|
+
type: z.ZodEnum<["websocket", "sse"]>;
|
|
1218
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1219
|
+
reconnect: z.ZodDefault<z.ZodBoolean>;
|
|
1220
|
+
reconnectMaxAttempts: z.ZodDefault<z.ZodNumber>;
|
|
1221
|
+
reconnectDelay: z.ZodDefault<z.ZodNumber>;
|
|
1222
|
+
reconnectMaxDelay: z.ZodDefault<z.ZodNumber>;
|
|
1223
|
+
eventTypes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1224
|
+
protocols: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
1225
|
+
}, "strip", z.ZodTypeAny, {
|
|
1226
|
+
type: "websocket" | "sse";
|
|
1227
|
+
reconnect: boolean;
|
|
1228
|
+
reconnectMaxAttempts: number;
|
|
1229
|
+
reconnectDelay: number;
|
|
1230
|
+
reconnectMaxDelay: number;
|
|
1231
|
+
url?: string | undefined;
|
|
1232
|
+
eventTypes?: string[] | undefined;
|
|
1233
|
+
protocols?: string | string[] | undefined;
|
|
1234
|
+
}, {
|
|
1235
|
+
type: "websocket" | "sse";
|
|
1236
|
+
url?: string | undefined;
|
|
1237
|
+
reconnect?: boolean | undefined;
|
|
1238
|
+
reconnectMaxAttempts?: number | undefined;
|
|
1239
|
+
reconnectDelay?: number | undefined;
|
|
1240
|
+
reconnectMaxDelay?: number | undefined;
|
|
1241
|
+
eventTypes?: string[] | undefined;
|
|
1242
|
+
protocols?: string | string[] | undefined;
|
|
1243
|
+
}>>;
|
|
1244
|
+
refresh: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
1245
|
+
refreshInterval: z.ZodOptional<z.ZodNumber>;
|
|
1246
|
+
updateStrategy: z.ZodDefault<z.ZodEnum<["replace", "merge", "append-window"]>>;
|
|
1247
|
+
updateKey: z.ZodOptional<z.ZodString>;
|
|
1248
|
+
windowSize: z.ZodOptional<z.ZodNumber>;
|
|
1249
|
+
windowDuration: z.ZodOptional<z.ZodNumber>;
|
|
1250
|
+
timestampField: z.ZodOptional<z.ZodString>;
|
|
1251
|
+
}, "strip", z.ZodTypeAny, {
|
|
1252
|
+
updateStrategy: "replace" | "merge" | "append-window";
|
|
1253
|
+
refreshInterval?: number | undefined;
|
|
1254
|
+
updateKey?: string | undefined;
|
|
1255
|
+
windowSize?: number | undefined;
|
|
1256
|
+
windowDuration?: number | undefined;
|
|
1257
|
+
timestampField?: string | undefined;
|
|
1258
|
+
}, {
|
|
1259
|
+
refreshInterval?: number | undefined;
|
|
1260
|
+
updateStrategy?: "replace" | "merge" | "append-window" | undefined;
|
|
1261
|
+
updateKey?: string | undefined;
|
|
1262
|
+
windowSize?: number | undefined;
|
|
1263
|
+
windowDuration?: number | undefined;
|
|
1264
|
+
timestampField?: string | undefined;
|
|
1265
|
+
}>, {
|
|
1266
|
+
updateStrategy: "replace" | "merge" | "append-window";
|
|
1267
|
+
refreshInterval?: number | undefined;
|
|
1268
|
+
updateKey?: string | undefined;
|
|
1269
|
+
windowSize?: number | undefined;
|
|
1270
|
+
windowDuration?: number | undefined;
|
|
1271
|
+
timestampField?: string | undefined;
|
|
1272
|
+
}, {
|
|
1273
|
+
refreshInterval?: number | undefined;
|
|
1274
|
+
updateStrategy?: "replace" | "merge" | "append-window" | undefined;
|
|
1275
|
+
updateKey?: string | undefined;
|
|
1276
|
+
windowSize?: number | undefined;
|
|
1277
|
+
windowDuration?: number | undefined;
|
|
1278
|
+
timestampField?: string | undefined;
|
|
1279
|
+
}>>;
|
|
1280
|
+
refreshInterval: z.ZodOptional<z.ZodNumber>;
|
|
1281
|
+
updateStrategy: z.ZodOptional<z.ZodEnum<["replace", "merge", "append-window"]>>;
|
|
1282
|
+
updateKey: z.ZodOptional<z.ZodString>;
|
|
1283
|
+
loading: z.ZodOptional<z.ZodObject<{
|
|
1284
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1285
|
+
message: z.ZodOptional<z.ZodString>;
|
|
1286
|
+
showErrorOverlay: z.ZodDefault<z.ZodBoolean>;
|
|
1287
|
+
}, "strip", z.ZodTypeAny, {
|
|
1288
|
+
enabled: boolean;
|
|
1289
|
+
showErrorOverlay: boolean;
|
|
1290
|
+
message?: string | undefined;
|
|
1291
|
+
}, {
|
|
1292
|
+
message?: string | undefined;
|
|
1293
|
+
enabled?: boolean | undefined;
|
|
1294
|
+
showErrorOverlay?: boolean | undefined;
|
|
1295
|
+
}>>;
|
|
1296
|
+
cache: z.ZodOptional<z.ZodObject<{
|
|
1297
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1298
|
+
ttl: z.ZodOptional<z.ZodNumber>;
|
|
1299
|
+
}, "strip", z.ZodTypeAny, {
|
|
1300
|
+
enabled: boolean;
|
|
1301
|
+
ttl?: number | undefined;
|
|
1302
|
+
}, {
|
|
1303
|
+
enabled?: boolean | undefined;
|
|
1304
|
+
ttl?: number | undefined;
|
|
1305
|
+
}>>;
|
|
1306
|
+
cluster: z.ZodOptional<z.ZodBoolean>;
|
|
1307
|
+
clusterRadius: z.ZodDefault<z.ZodNumber>;
|
|
1308
|
+
clusterMaxZoom: z.ZodOptional<z.ZodNumber>;
|
|
1309
|
+
clusterMinPoints: z.ZodOptional<z.ZodNumber>;
|
|
1310
|
+
clusterProperties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
1311
|
+
tolerance: z.ZodOptional<z.ZodNumber>;
|
|
1312
|
+
buffer: z.ZodOptional<z.ZodNumber>;
|
|
1313
|
+
lineMetrics: z.ZodOptional<z.ZodBoolean>;
|
|
1314
|
+
generateId: z.ZodOptional<z.ZodBoolean>;
|
|
1315
|
+
promoteId: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
|
|
1316
|
+
attribution: z.ZodOptional<z.ZodString>;
|
|
1317
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1318
|
+
type: z.ZodLiteral<"geojson">;
|
|
1319
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1320
|
+
data: z.ZodOptional<z.ZodAny>;
|
|
1321
|
+
prefetchedData: z.ZodOptional<z.ZodAny>;
|
|
1322
|
+
fetchStrategy: z.ZodDefault<z.ZodEnum<["runtime", "build", "hybrid"]>>;
|
|
1323
|
+
stream: z.ZodOptional<z.ZodObject<{
|
|
1324
|
+
type: z.ZodEnum<["websocket", "sse"]>;
|
|
1325
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1326
|
+
reconnect: z.ZodDefault<z.ZodBoolean>;
|
|
1327
|
+
reconnectMaxAttempts: z.ZodDefault<z.ZodNumber>;
|
|
1328
|
+
reconnectDelay: z.ZodDefault<z.ZodNumber>;
|
|
1329
|
+
reconnectMaxDelay: z.ZodDefault<z.ZodNumber>;
|
|
1330
|
+
eventTypes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1331
|
+
protocols: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
1332
|
+
}, "strip", z.ZodTypeAny, {
|
|
1333
|
+
type: "websocket" | "sse";
|
|
1334
|
+
reconnect: boolean;
|
|
1335
|
+
reconnectMaxAttempts: number;
|
|
1336
|
+
reconnectDelay: number;
|
|
1337
|
+
reconnectMaxDelay: number;
|
|
1338
|
+
url?: string | undefined;
|
|
1339
|
+
eventTypes?: string[] | undefined;
|
|
1340
|
+
protocols?: string | string[] | undefined;
|
|
1341
|
+
}, {
|
|
1342
|
+
type: "websocket" | "sse";
|
|
1343
|
+
url?: string | undefined;
|
|
1344
|
+
reconnect?: boolean | undefined;
|
|
1345
|
+
reconnectMaxAttempts?: number | undefined;
|
|
1346
|
+
reconnectDelay?: number | undefined;
|
|
1347
|
+
reconnectMaxDelay?: number | undefined;
|
|
1348
|
+
eventTypes?: string[] | undefined;
|
|
1349
|
+
protocols?: string | string[] | undefined;
|
|
1350
|
+
}>>;
|
|
1351
|
+
refresh: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
1352
|
+
refreshInterval: z.ZodOptional<z.ZodNumber>;
|
|
1353
|
+
updateStrategy: z.ZodDefault<z.ZodEnum<["replace", "merge", "append-window"]>>;
|
|
1354
|
+
updateKey: z.ZodOptional<z.ZodString>;
|
|
1355
|
+
windowSize: z.ZodOptional<z.ZodNumber>;
|
|
1356
|
+
windowDuration: z.ZodOptional<z.ZodNumber>;
|
|
1357
|
+
timestampField: z.ZodOptional<z.ZodString>;
|
|
1358
|
+
}, "strip", z.ZodTypeAny, {
|
|
1359
|
+
updateStrategy: "replace" | "merge" | "append-window";
|
|
1360
|
+
refreshInterval?: number | undefined;
|
|
1361
|
+
updateKey?: string | undefined;
|
|
1362
|
+
windowSize?: number | undefined;
|
|
1363
|
+
windowDuration?: number | undefined;
|
|
1364
|
+
timestampField?: string | undefined;
|
|
1365
|
+
}, {
|
|
1366
|
+
refreshInterval?: number | undefined;
|
|
1367
|
+
updateStrategy?: "replace" | "merge" | "append-window" | undefined;
|
|
1368
|
+
updateKey?: string | undefined;
|
|
1369
|
+
windowSize?: number | undefined;
|
|
1370
|
+
windowDuration?: number | undefined;
|
|
1371
|
+
timestampField?: string | undefined;
|
|
1372
|
+
}>, {
|
|
1373
|
+
updateStrategy: "replace" | "merge" | "append-window";
|
|
1374
|
+
refreshInterval?: number | undefined;
|
|
1375
|
+
updateKey?: string | undefined;
|
|
1376
|
+
windowSize?: number | undefined;
|
|
1377
|
+
windowDuration?: number | undefined;
|
|
1378
|
+
timestampField?: string | undefined;
|
|
1379
|
+
}, {
|
|
1380
|
+
refreshInterval?: number | undefined;
|
|
1381
|
+
updateStrategy?: "replace" | "merge" | "append-window" | undefined;
|
|
1382
|
+
updateKey?: string | undefined;
|
|
1383
|
+
windowSize?: number | undefined;
|
|
1384
|
+
windowDuration?: number | undefined;
|
|
1385
|
+
timestampField?: string | undefined;
|
|
1386
|
+
}>>;
|
|
1387
|
+
refreshInterval: z.ZodOptional<z.ZodNumber>;
|
|
1388
|
+
updateStrategy: z.ZodOptional<z.ZodEnum<["replace", "merge", "append-window"]>>;
|
|
1389
|
+
updateKey: z.ZodOptional<z.ZodString>;
|
|
1390
|
+
loading: z.ZodOptional<z.ZodObject<{
|
|
1391
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1392
|
+
message: z.ZodOptional<z.ZodString>;
|
|
1393
|
+
showErrorOverlay: z.ZodDefault<z.ZodBoolean>;
|
|
1394
|
+
}, "strip", z.ZodTypeAny, {
|
|
1395
|
+
enabled: boolean;
|
|
1396
|
+
showErrorOverlay: boolean;
|
|
1397
|
+
message?: string | undefined;
|
|
1398
|
+
}, {
|
|
1399
|
+
message?: string | undefined;
|
|
1400
|
+
enabled?: boolean | undefined;
|
|
1401
|
+
showErrorOverlay?: boolean | undefined;
|
|
1402
|
+
}>>;
|
|
1403
|
+
cache: z.ZodOptional<z.ZodObject<{
|
|
1404
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1405
|
+
ttl: z.ZodOptional<z.ZodNumber>;
|
|
1406
|
+
}, "strip", z.ZodTypeAny, {
|
|
1407
|
+
enabled: boolean;
|
|
1408
|
+
ttl?: number | undefined;
|
|
1409
|
+
}, {
|
|
1410
|
+
enabled?: boolean | undefined;
|
|
1411
|
+
ttl?: number | undefined;
|
|
1412
|
+
}>>;
|
|
1413
|
+
cluster: z.ZodOptional<z.ZodBoolean>;
|
|
1414
|
+
clusterRadius: z.ZodDefault<z.ZodNumber>;
|
|
1415
|
+
clusterMaxZoom: z.ZodOptional<z.ZodNumber>;
|
|
1416
|
+
clusterMinPoints: z.ZodOptional<z.ZodNumber>;
|
|
1417
|
+
clusterProperties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
1418
|
+
tolerance: z.ZodOptional<z.ZodNumber>;
|
|
1419
|
+
buffer: z.ZodOptional<z.ZodNumber>;
|
|
1420
|
+
lineMetrics: z.ZodOptional<z.ZodBoolean>;
|
|
1421
|
+
generateId: z.ZodOptional<z.ZodBoolean>;
|
|
1422
|
+
promoteId: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
|
|
1423
|
+
attribution: z.ZodOptional<z.ZodString>;
|
|
1424
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1425
|
+
type: z.ZodLiteral<"geojson">;
|
|
1426
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1427
|
+
data: z.ZodOptional<z.ZodAny>;
|
|
1428
|
+
prefetchedData: z.ZodOptional<z.ZodAny>;
|
|
1429
|
+
fetchStrategy: z.ZodDefault<z.ZodEnum<["runtime", "build", "hybrid"]>>;
|
|
1430
|
+
stream: z.ZodOptional<z.ZodObject<{
|
|
1431
|
+
type: z.ZodEnum<["websocket", "sse"]>;
|
|
1432
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1433
|
+
reconnect: z.ZodDefault<z.ZodBoolean>;
|
|
1434
|
+
reconnectMaxAttempts: z.ZodDefault<z.ZodNumber>;
|
|
1435
|
+
reconnectDelay: z.ZodDefault<z.ZodNumber>;
|
|
1436
|
+
reconnectMaxDelay: z.ZodDefault<z.ZodNumber>;
|
|
1437
|
+
eventTypes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1438
|
+
protocols: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
1439
|
+
}, "strip", z.ZodTypeAny, {
|
|
1440
|
+
type: "websocket" | "sse";
|
|
1441
|
+
reconnect: boolean;
|
|
1442
|
+
reconnectMaxAttempts: number;
|
|
1443
|
+
reconnectDelay: number;
|
|
1444
|
+
reconnectMaxDelay: number;
|
|
1445
|
+
url?: string | undefined;
|
|
1446
|
+
eventTypes?: string[] | undefined;
|
|
1447
|
+
protocols?: string | string[] | undefined;
|
|
1448
|
+
}, {
|
|
1449
|
+
type: "websocket" | "sse";
|
|
1450
|
+
url?: string | undefined;
|
|
1451
|
+
reconnect?: boolean | undefined;
|
|
1452
|
+
reconnectMaxAttempts?: number | undefined;
|
|
1453
|
+
reconnectDelay?: number | undefined;
|
|
1454
|
+
reconnectMaxDelay?: number | undefined;
|
|
1455
|
+
eventTypes?: string[] | undefined;
|
|
1456
|
+
protocols?: string | string[] | undefined;
|
|
1457
|
+
}>>;
|
|
1458
|
+
refresh: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
1459
|
+
refreshInterval: z.ZodOptional<z.ZodNumber>;
|
|
1460
|
+
updateStrategy: z.ZodDefault<z.ZodEnum<["replace", "merge", "append-window"]>>;
|
|
1461
|
+
updateKey: z.ZodOptional<z.ZodString>;
|
|
1462
|
+
windowSize: z.ZodOptional<z.ZodNumber>;
|
|
1463
|
+
windowDuration: z.ZodOptional<z.ZodNumber>;
|
|
1464
|
+
timestampField: z.ZodOptional<z.ZodString>;
|
|
1465
|
+
}, "strip", z.ZodTypeAny, {
|
|
1466
|
+
updateStrategy: "replace" | "merge" | "append-window";
|
|
1467
|
+
refreshInterval?: number | undefined;
|
|
1468
|
+
updateKey?: string | undefined;
|
|
1469
|
+
windowSize?: number | undefined;
|
|
1470
|
+
windowDuration?: number | undefined;
|
|
1471
|
+
timestampField?: string | undefined;
|
|
1472
|
+
}, {
|
|
1473
|
+
refreshInterval?: number | undefined;
|
|
1474
|
+
updateStrategy?: "replace" | "merge" | "append-window" | undefined;
|
|
1475
|
+
updateKey?: string | undefined;
|
|
1476
|
+
windowSize?: number | undefined;
|
|
1477
|
+
windowDuration?: number | undefined;
|
|
1478
|
+
timestampField?: string | undefined;
|
|
1479
|
+
}>, {
|
|
1480
|
+
updateStrategy: "replace" | "merge" | "append-window";
|
|
1481
|
+
refreshInterval?: number | undefined;
|
|
1482
|
+
updateKey?: string | undefined;
|
|
1483
|
+
windowSize?: number | undefined;
|
|
1484
|
+
windowDuration?: number | undefined;
|
|
1485
|
+
timestampField?: string | undefined;
|
|
1486
|
+
}, {
|
|
1487
|
+
refreshInterval?: number | undefined;
|
|
1488
|
+
updateStrategy?: "replace" | "merge" | "append-window" | undefined;
|
|
1489
|
+
updateKey?: string | undefined;
|
|
1490
|
+
windowSize?: number | undefined;
|
|
1491
|
+
windowDuration?: number | undefined;
|
|
1492
|
+
timestampField?: string | undefined;
|
|
1493
|
+
}>>;
|
|
1494
|
+
refreshInterval: z.ZodOptional<z.ZodNumber>;
|
|
1495
|
+
updateStrategy: z.ZodOptional<z.ZodEnum<["replace", "merge", "append-window"]>>;
|
|
1496
|
+
updateKey: z.ZodOptional<z.ZodString>;
|
|
1497
|
+
loading: z.ZodOptional<z.ZodObject<{
|
|
1498
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1499
|
+
message: z.ZodOptional<z.ZodString>;
|
|
1500
|
+
showErrorOverlay: z.ZodDefault<z.ZodBoolean>;
|
|
1501
|
+
}, "strip", z.ZodTypeAny, {
|
|
1502
|
+
enabled: boolean;
|
|
1503
|
+
showErrorOverlay: boolean;
|
|
1504
|
+
message?: string | undefined;
|
|
1505
|
+
}, {
|
|
1506
|
+
message?: string | undefined;
|
|
1507
|
+
enabled?: boolean | undefined;
|
|
1508
|
+
showErrorOverlay?: boolean | undefined;
|
|
1509
|
+
}>>;
|
|
1510
|
+
cache: z.ZodOptional<z.ZodObject<{
|
|
1511
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1512
|
+
ttl: z.ZodOptional<z.ZodNumber>;
|
|
1513
|
+
}, "strip", z.ZodTypeAny, {
|
|
1514
|
+
enabled: boolean;
|
|
1515
|
+
ttl?: number | undefined;
|
|
1516
|
+
}, {
|
|
1517
|
+
enabled?: boolean | undefined;
|
|
1518
|
+
ttl?: number | undefined;
|
|
1519
|
+
}>>;
|
|
1520
|
+
cluster: z.ZodOptional<z.ZodBoolean>;
|
|
1521
|
+
clusterRadius: z.ZodDefault<z.ZodNumber>;
|
|
1522
|
+
clusterMaxZoom: z.ZodOptional<z.ZodNumber>;
|
|
1523
|
+
clusterMinPoints: z.ZodOptional<z.ZodNumber>;
|
|
1524
|
+
clusterProperties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
1525
|
+
tolerance: z.ZodOptional<z.ZodNumber>;
|
|
1526
|
+
buffer: z.ZodOptional<z.ZodNumber>;
|
|
1527
|
+
lineMetrics: z.ZodOptional<z.ZodBoolean>;
|
|
1528
|
+
generateId: z.ZodOptional<z.ZodBoolean>;
|
|
1529
|
+
promoteId: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
|
|
1530
|
+
attribution: z.ZodOptional<z.ZodString>;
|
|
1531
|
+
}, z.ZodTypeAny, "passthrough">>, z.objectOutputType<{
|
|
1532
|
+
type: z.ZodLiteral<"geojson">;
|
|
1533
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1534
|
+
data: z.ZodOptional<z.ZodAny>;
|
|
1535
|
+
prefetchedData: z.ZodOptional<z.ZodAny>;
|
|
1536
|
+
fetchStrategy: z.ZodDefault<z.ZodEnum<["runtime", "build", "hybrid"]>>;
|
|
1537
|
+
stream: z.ZodOptional<z.ZodObject<{
|
|
1538
|
+
type: z.ZodEnum<["websocket", "sse"]>;
|
|
1539
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1540
|
+
reconnect: z.ZodDefault<z.ZodBoolean>;
|
|
1541
|
+
reconnectMaxAttempts: z.ZodDefault<z.ZodNumber>;
|
|
1542
|
+
reconnectDelay: z.ZodDefault<z.ZodNumber>;
|
|
1543
|
+
reconnectMaxDelay: z.ZodDefault<z.ZodNumber>;
|
|
1544
|
+
eventTypes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1545
|
+
protocols: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
1546
|
+
}, "strip", z.ZodTypeAny, {
|
|
1547
|
+
type: "websocket" | "sse";
|
|
1548
|
+
reconnect: boolean;
|
|
1549
|
+
reconnectMaxAttempts: number;
|
|
1550
|
+
reconnectDelay: number;
|
|
1551
|
+
reconnectMaxDelay: number;
|
|
1552
|
+
url?: string | undefined;
|
|
1553
|
+
eventTypes?: string[] | undefined;
|
|
1554
|
+
protocols?: string | string[] | undefined;
|
|
1555
|
+
}, {
|
|
1556
|
+
type: "websocket" | "sse";
|
|
1557
|
+
url?: string | undefined;
|
|
1558
|
+
reconnect?: boolean | undefined;
|
|
1559
|
+
reconnectMaxAttempts?: number | undefined;
|
|
1560
|
+
reconnectDelay?: number | undefined;
|
|
1561
|
+
reconnectMaxDelay?: number | undefined;
|
|
1562
|
+
eventTypes?: string[] | undefined;
|
|
1563
|
+
protocols?: string | string[] | undefined;
|
|
1564
|
+
}>>;
|
|
1565
|
+
refresh: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
1566
|
+
refreshInterval: z.ZodOptional<z.ZodNumber>;
|
|
1567
|
+
updateStrategy: z.ZodDefault<z.ZodEnum<["replace", "merge", "append-window"]>>;
|
|
1568
|
+
updateKey: z.ZodOptional<z.ZodString>;
|
|
1569
|
+
windowSize: z.ZodOptional<z.ZodNumber>;
|
|
1570
|
+
windowDuration: z.ZodOptional<z.ZodNumber>;
|
|
1571
|
+
timestampField: z.ZodOptional<z.ZodString>;
|
|
1572
|
+
}, "strip", z.ZodTypeAny, {
|
|
1573
|
+
updateStrategy: "replace" | "merge" | "append-window";
|
|
1574
|
+
refreshInterval?: number | undefined;
|
|
1575
|
+
updateKey?: string | undefined;
|
|
1576
|
+
windowSize?: number | undefined;
|
|
1577
|
+
windowDuration?: number | undefined;
|
|
1578
|
+
timestampField?: string | undefined;
|
|
1579
|
+
}, {
|
|
1580
|
+
refreshInterval?: number | undefined;
|
|
1581
|
+
updateStrategy?: "replace" | "merge" | "append-window" | undefined;
|
|
1582
|
+
updateKey?: string | undefined;
|
|
1583
|
+
windowSize?: number | undefined;
|
|
1584
|
+
windowDuration?: number | undefined;
|
|
1585
|
+
timestampField?: string | undefined;
|
|
1586
|
+
}>, {
|
|
1587
|
+
updateStrategy: "replace" | "merge" | "append-window";
|
|
1588
|
+
refreshInterval?: number | undefined;
|
|
1589
|
+
updateKey?: string | undefined;
|
|
1590
|
+
windowSize?: number | undefined;
|
|
1591
|
+
windowDuration?: number | undefined;
|
|
1592
|
+
timestampField?: string | undefined;
|
|
1593
|
+
}, {
|
|
1594
|
+
refreshInterval?: number | undefined;
|
|
1595
|
+
updateStrategy?: "replace" | "merge" | "append-window" | undefined;
|
|
1596
|
+
updateKey?: string | undefined;
|
|
1597
|
+
windowSize?: number | undefined;
|
|
1598
|
+
windowDuration?: number | undefined;
|
|
1599
|
+
timestampField?: string | undefined;
|
|
1600
|
+
}>>;
|
|
1601
|
+
refreshInterval: z.ZodOptional<z.ZodNumber>;
|
|
1602
|
+
updateStrategy: z.ZodOptional<z.ZodEnum<["replace", "merge", "append-window"]>>;
|
|
1603
|
+
updateKey: z.ZodOptional<z.ZodString>;
|
|
1604
|
+
loading: z.ZodOptional<z.ZodObject<{
|
|
1605
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1606
|
+
message: z.ZodOptional<z.ZodString>;
|
|
1607
|
+
showErrorOverlay: z.ZodDefault<z.ZodBoolean>;
|
|
1608
|
+
}, "strip", z.ZodTypeAny, {
|
|
1609
|
+
enabled: boolean;
|
|
1610
|
+
showErrorOverlay: boolean;
|
|
1611
|
+
message?: string | undefined;
|
|
1612
|
+
}, {
|
|
1613
|
+
message?: string | undefined;
|
|
1614
|
+
enabled?: boolean | undefined;
|
|
1615
|
+
showErrorOverlay?: boolean | undefined;
|
|
1616
|
+
}>>;
|
|
1617
|
+
cache: z.ZodOptional<z.ZodObject<{
|
|
1618
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1619
|
+
ttl: z.ZodOptional<z.ZodNumber>;
|
|
1620
|
+
}, "strip", z.ZodTypeAny, {
|
|
1621
|
+
enabled: boolean;
|
|
1622
|
+
ttl?: number | undefined;
|
|
1623
|
+
}, {
|
|
1624
|
+
enabled?: boolean | undefined;
|
|
1625
|
+
ttl?: number | undefined;
|
|
1626
|
+
}>>;
|
|
1627
|
+
cluster: z.ZodOptional<z.ZodBoolean>;
|
|
1628
|
+
clusterRadius: z.ZodDefault<z.ZodNumber>;
|
|
1629
|
+
clusterMaxZoom: z.ZodOptional<z.ZodNumber>;
|
|
1630
|
+
clusterMinPoints: z.ZodOptional<z.ZodNumber>;
|
|
1631
|
+
clusterProperties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
1632
|
+
tolerance: z.ZodOptional<z.ZodNumber>;
|
|
1633
|
+
buffer: z.ZodOptional<z.ZodNumber>;
|
|
1634
|
+
lineMetrics: z.ZodOptional<z.ZodBoolean>;
|
|
1635
|
+
generateId: z.ZodOptional<z.ZodBoolean>;
|
|
1636
|
+
promoteId: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
|
|
1637
|
+
attribution: z.ZodOptional<z.ZodString>;
|
|
1638
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1639
|
+
type: z.ZodLiteral<"geojson">;
|
|
1640
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1641
|
+
data: z.ZodOptional<z.ZodAny>;
|
|
1642
|
+
prefetchedData: z.ZodOptional<z.ZodAny>;
|
|
1643
|
+
fetchStrategy: z.ZodDefault<z.ZodEnum<["runtime", "build", "hybrid"]>>;
|
|
1644
|
+
stream: z.ZodOptional<z.ZodObject<{
|
|
1645
|
+
type: z.ZodEnum<["websocket", "sse"]>;
|
|
1646
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1647
|
+
reconnect: z.ZodDefault<z.ZodBoolean>;
|
|
1648
|
+
reconnectMaxAttempts: z.ZodDefault<z.ZodNumber>;
|
|
1649
|
+
reconnectDelay: z.ZodDefault<z.ZodNumber>;
|
|
1650
|
+
reconnectMaxDelay: z.ZodDefault<z.ZodNumber>;
|
|
1651
|
+
eventTypes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1652
|
+
protocols: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
1653
|
+
}, "strip", z.ZodTypeAny, {
|
|
1654
|
+
type: "websocket" | "sse";
|
|
1655
|
+
reconnect: boolean;
|
|
1656
|
+
reconnectMaxAttempts: number;
|
|
1657
|
+
reconnectDelay: number;
|
|
1658
|
+
reconnectMaxDelay: number;
|
|
1659
|
+
url?: string | undefined;
|
|
1660
|
+
eventTypes?: string[] | undefined;
|
|
1661
|
+
protocols?: string | string[] | undefined;
|
|
1662
|
+
}, {
|
|
1663
|
+
type: "websocket" | "sse";
|
|
1664
|
+
url?: string | undefined;
|
|
1665
|
+
reconnect?: boolean | undefined;
|
|
1666
|
+
reconnectMaxAttempts?: number | undefined;
|
|
1667
|
+
reconnectDelay?: number | undefined;
|
|
1668
|
+
reconnectMaxDelay?: number | undefined;
|
|
1669
|
+
eventTypes?: string[] | undefined;
|
|
1670
|
+
protocols?: string | string[] | undefined;
|
|
1671
|
+
}>>;
|
|
1672
|
+
refresh: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
1673
|
+
refreshInterval: z.ZodOptional<z.ZodNumber>;
|
|
1674
|
+
updateStrategy: z.ZodDefault<z.ZodEnum<["replace", "merge", "append-window"]>>;
|
|
1675
|
+
updateKey: z.ZodOptional<z.ZodString>;
|
|
1676
|
+
windowSize: z.ZodOptional<z.ZodNumber>;
|
|
1677
|
+
windowDuration: z.ZodOptional<z.ZodNumber>;
|
|
1678
|
+
timestampField: z.ZodOptional<z.ZodString>;
|
|
1679
|
+
}, "strip", z.ZodTypeAny, {
|
|
1680
|
+
updateStrategy: "replace" | "merge" | "append-window";
|
|
1681
|
+
refreshInterval?: number | undefined;
|
|
1682
|
+
updateKey?: string | undefined;
|
|
1683
|
+
windowSize?: number | undefined;
|
|
1684
|
+
windowDuration?: number | undefined;
|
|
1685
|
+
timestampField?: string | undefined;
|
|
1686
|
+
}, {
|
|
1687
|
+
refreshInterval?: number | undefined;
|
|
1688
|
+
updateStrategy?: "replace" | "merge" | "append-window" | undefined;
|
|
1689
|
+
updateKey?: string | undefined;
|
|
1690
|
+
windowSize?: number | undefined;
|
|
1691
|
+
windowDuration?: number | undefined;
|
|
1692
|
+
timestampField?: string | undefined;
|
|
1693
|
+
}>, {
|
|
1694
|
+
updateStrategy: "replace" | "merge" | "append-window";
|
|
1695
|
+
refreshInterval?: number | undefined;
|
|
1696
|
+
updateKey?: string | undefined;
|
|
1697
|
+
windowSize?: number | undefined;
|
|
1698
|
+
windowDuration?: number | undefined;
|
|
1699
|
+
timestampField?: string | undefined;
|
|
1700
|
+
}, {
|
|
1701
|
+
refreshInterval?: number | undefined;
|
|
1702
|
+
updateStrategy?: "replace" | "merge" | "append-window" | undefined;
|
|
1703
|
+
updateKey?: string | undefined;
|
|
1704
|
+
windowSize?: number | undefined;
|
|
1705
|
+
windowDuration?: number | undefined;
|
|
1706
|
+
timestampField?: string | undefined;
|
|
1707
|
+
}>>;
|
|
1708
|
+
refreshInterval: z.ZodOptional<z.ZodNumber>;
|
|
1709
|
+
updateStrategy: z.ZodOptional<z.ZodEnum<["replace", "merge", "append-window"]>>;
|
|
1710
|
+
updateKey: z.ZodOptional<z.ZodString>;
|
|
1711
|
+
loading: z.ZodOptional<z.ZodObject<{
|
|
1712
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1713
|
+
message: z.ZodOptional<z.ZodString>;
|
|
1714
|
+
showErrorOverlay: z.ZodDefault<z.ZodBoolean>;
|
|
1715
|
+
}, "strip", z.ZodTypeAny, {
|
|
1716
|
+
enabled: boolean;
|
|
1717
|
+
showErrorOverlay: boolean;
|
|
1718
|
+
message?: string | undefined;
|
|
1719
|
+
}, {
|
|
1720
|
+
message?: string | undefined;
|
|
1721
|
+
enabled?: boolean | undefined;
|
|
1722
|
+
showErrorOverlay?: boolean | undefined;
|
|
1723
|
+
}>>;
|
|
1724
|
+
cache: z.ZodOptional<z.ZodObject<{
|
|
1725
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1726
|
+
ttl: z.ZodOptional<z.ZodNumber>;
|
|
1727
|
+
}, "strip", z.ZodTypeAny, {
|
|
1728
|
+
enabled: boolean;
|
|
1729
|
+
ttl?: number | undefined;
|
|
1730
|
+
}, {
|
|
1731
|
+
enabled?: boolean | undefined;
|
|
1732
|
+
ttl?: number | undefined;
|
|
1733
|
+
}>>;
|
|
1734
|
+
cluster: z.ZodOptional<z.ZodBoolean>;
|
|
1735
|
+
clusterRadius: z.ZodDefault<z.ZodNumber>;
|
|
1736
|
+
clusterMaxZoom: z.ZodOptional<z.ZodNumber>;
|
|
1737
|
+
clusterMinPoints: z.ZodOptional<z.ZodNumber>;
|
|
1738
|
+
clusterProperties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
1739
|
+
tolerance: z.ZodOptional<z.ZodNumber>;
|
|
1740
|
+
buffer: z.ZodOptional<z.ZodNumber>;
|
|
1741
|
+
lineMetrics: z.ZodOptional<z.ZodBoolean>;
|
|
1742
|
+
generateId: z.ZodOptional<z.ZodBoolean>;
|
|
1743
|
+
promoteId: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
|
|
1744
|
+
attribution: z.ZodOptional<z.ZodString>;
|
|
1745
|
+
}, z.ZodTypeAny, "passthrough">>, z.ZodEffects<z.ZodObject<{
|
|
1746
|
+
type: z.ZodLiteral<"vector">;
|
|
1747
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1748
|
+
tiles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1749
|
+
minzoom: z.ZodOptional<z.ZodNumber>;
|
|
1750
|
+
maxzoom: z.ZodOptional<z.ZodNumber>;
|
|
1751
|
+
bounds: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
1752
|
+
scheme: z.ZodOptional<z.ZodEnum<["xyz", "tms"]>>;
|
|
1753
|
+
attribution: z.ZodOptional<z.ZodString>;
|
|
1754
|
+
promoteId: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
|
|
1755
|
+
volatile: z.ZodOptional<z.ZodBoolean>;
|
|
1756
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1757
|
+
type: z.ZodLiteral<"vector">;
|
|
1758
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1759
|
+
tiles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1760
|
+
minzoom: z.ZodOptional<z.ZodNumber>;
|
|
1761
|
+
maxzoom: z.ZodOptional<z.ZodNumber>;
|
|
1762
|
+
bounds: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
1763
|
+
scheme: z.ZodOptional<z.ZodEnum<["xyz", "tms"]>>;
|
|
1764
|
+
attribution: z.ZodOptional<z.ZodString>;
|
|
1765
|
+
promoteId: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
|
|
1766
|
+
volatile: z.ZodOptional<z.ZodBoolean>;
|
|
1767
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1768
|
+
type: z.ZodLiteral<"vector">;
|
|
1769
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1770
|
+
tiles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1771
|
+
minzoom: z.ZodOptional<z.ZodNumber>;
|
|
1772
|
+
maxzoom: z.ZodOptional<z.ZodNumber>;
|
|
1773
|
+
bounds: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
1774
|
+
scheme: z.ZodOptional<z.ZodEnum<["xyz", "tms"]>>;
|
|
1775
|
+
attribution: z.ZodOptional<z.ZodString>;
|
|
1776
|
+
promoteId: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
|
|
1777
|
+
volatile: z.ZodOptional<z.ZodBoolean>;
|
|
1778
|
+
}, z.ZodTypeAny, "passthrough">>, z.objectOutputType<{
|
|
1779
|
+
type: z.ZodLiteral<"vector">;
|
|
1780
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1781
|
+
tiles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1782
|
+
minzoom: z.ZodOptional<z.ZodNumber>;
|
|
1783
|
+
maxzoom: z.ZodOptional<z.ZodNumber>;
|
|
1784
|
+
bounds: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
1785
|
+
scheme: z.ZodOptional<z.ZodEnum<["xyz", "tms"]>>;
|
|
1786
|
+
attribution: z.ZodOptional<z.ZodString>;
|
|
1787
|
+
promoteId: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
|
|
1788
|
+
volatile: z.ZodOptional<z.ZodBoolean>;
|
|
1789
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1790
|
+
type: z.ZodLiteral<"vector">;
|
|
1791
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1792
|
+
tiles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1793
|
+
minzoom: z.ZodOptional<z.ZodNumber>;
|
|
1794
|
+
maxzoom: z.ZodOptional<z.ZodNumber>;
|
|
1795
|
+
bounds: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
1796
|
+
scheme: z.ZodOptional<z.ZodEnum<["xyz", "tms"]>>;
|
|
1797
|
+
attribution: z.ZodOptional<z.ZodString>;
|
|
1798
|
+
promoteId: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
|
|
1799
|
+
volatile: z.ZodOptional<z.ZodBoolean>;
|
|
1800
|
+
}, z.ZodTypeAny, "passthrough">>, z.ZodEffects<z.ZodObject<{
|
|
1801
|
+
type: z.ZodLiteral<"raster">;
|
|
1802
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1803
|
+
tiles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1804
|
+
tileSize: z.ZodDefault<z.ZodNumber>;
|
|
1805
|
+
minzoom: z.ZodOptional<z.ZodNumber>;
|
|
1806
|
+
maxzoom: z.ZodOptional<z.ZodNumber>;
|
|
1807
|
+
bounds: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
1808
|
+
scheme: z.ZodOptional<z.ZodEnum<["xyz", "tms"]>>;
|
|
1809
|
+
attribution: z.ZodOptional<z.ZodString>;
|
|
1810
|
+
volatile: z.ZodOptional<z.ZodBoolean>;
|
|
1811
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1812
|
+
type: z.ZodLiteral<"raster">;
|
|
1813
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1814
|
+
tiles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1815
|
+
tileSize: z.ZodDefault<z.ZodNumber>;
|
|
1816
|
+
minzoom: z.ZodOptional<z.ZodNumber>;
|
|
1817
|
+
maxzoom: z.ZodOptional<z.ZodNumber>;
|
|
1818
|
+
bounds: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
1819
|
+
scheme: z.ZodOptional<z.ZodEnum<["xyz", "tms"]>>;
|
|
1820
|
+
attribution: z.ZodOptional<z.ZodString>;
|
|
1821
|
+
volatile: z.ZodOptional<z.ZodBoolean>;
|
|
1822
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1823
|
+
type: z.ZodLiteral<"raster">;
|
|
1824
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1825
|
+
tiles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1826
|
+
tileSize: z.ZodDefault<z.ZodNumber>;
|
|
1827
|
+
minzoom: z.ZodOptional<z.ZodNumber>;
|
|
1828
|
+
maxzoom: z.ZodOptional<z.ZodNumber>;
|
|
1829
|
+
bounds: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
1830
|
+
scheme: z.ZodOptional<z.ZodEnum<["xyz", "tms"]>>;
|
|
1831
|
+
attribution: z.ZodOptional<z.ZodString>;
|
|
1832
|
+
volatile: z.ZodOptional<z.ZodBoolean>;
|
|
1833
|
+
}, z.ZodTypeAny, "passthrough">>, z.objectOutputType<{
|
|
1834
|
+
type: z.ZodLiteral<"raster">;
|
|
1835
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1836
|
+
tiles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1837
|
+
tileSize: z.ZodDefault<z.ZodNumber>;
|
|
1838
|
+
minzoom: z.ZodOptional<z.ZodNumber>;
|
|
1839
|
+
maxzoom: z.ZodOptional<z.ZodNumber>;
|
|
1840
|
+
bounds: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
1841
|
+
scheme: z.ZodOptional<z.ZodEnum<["xyz", "tms"]>>;
|
|
1842
|
+
attribution: z.ZodOptional<z.ZodString>;
|
|
1843
|
+
volatile: z.ZodOptional<z.ZodBoolean>;
|
|
1844
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1845
|
+
type: z.ZodLiteral<"raster">;
|
|
1846
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1847
|
+
tiles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1848
|
+
tileSize: z.ZodDefault<z.ZodNumber>;
|
|
1849
|
+
minzoom: z.ZodOptional<z.ZodNumber>;
|
|
1850
|
+
maxzoom: z.ZodOptional<z.ZodNumber>;
|
|
1851
|
+
bounds: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
1852
|
+
scheme: z.ZodOptional<z.ZodEnum<["xyz", "tms"]>>;
|
|
1853
|
+
attribution: z.ZodOptional<z.ZodString>;
|
|
1854
|
+
volatile: z.ZodOptional<z.ZodBoolean>;
|
|
1855
|
+
}, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
|
|
1856
|
+
type: z.ZodLiteral<"image">;
|
|
1857
|
+
url: z.ZodString;
|
|
1858
|
+
coordinates: z.ZodTuple<[z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>], null>;
|
|
1859
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1860
|
+
type: z.ZodLiteral<"image">;
|
|
1861
|
+
url: z.ZodString;
|
|
1862
|
+
coordinates: z.ZodTuple<[z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>], null>;
|
|
1863
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1864
|
+
type: z.ZodLiteral<"image">;
|
|
1865
|
+
url: z.ZodString;
|
|
1866
|
+
coordinates: z.ZodTuple<[z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>], null>;
|
|
1867
|
+
}, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
|
|
1868
|
+
type: z.ZodLiteral<"video">;
|
|
1869
|
+
urls: z.ZodArray<z.ZodString, "many">;
|
|
1870
|
+
coordinates: z.ZodTuple<[z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>], null>;
|
|
1871
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1872
|
+
type: z.ZodLiteral<"video">;
|
|
1873
|
+
urls: z.ZodArray<z.ZodString, "many">;
|
|
1874
|
+
coordinates: z.ZodTuple<[z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>], null>;
|
|
1875
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1876
|
+
type: z.ZodLiteral<"video">;
|
|
1877
|
+
urls: z.ZodArray<z.ZodString, "many">;
|
|
1878
|
+
coordinates: z.ZodTuple<[z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>], null>;
|
|
1879
|
+
}, z.ZodTypeAny, "passthrough">>]>;
|
|
1880
|
+
|
|
1881
|
+
/**
|
|
1882
|
+
* @file Content schemas for maplibre-yaml
|
|
1883
|
+
* @module @maplibre-yaml/core/schemas/content
|
|
1884
|
+
*
|
|
1885
|
+
* @description
|
|
1886
|
+
* Zod schemas for non-map content blocks including text, images, iframes,
|
|
1887
|
+
* and other HTML elements with dynamic property interpolation.
|
|
1888
|
+
*
|
|
1889
|
+
* @example
|
|
1890
|
+
* ```typescript
|
|
1891
|
+
* import { ContentBlockSchema } from '@maplibre-yaml/core/schemas';
|
|
1892
|
+
* ```
|
|
1893
|
+
*/
|
|
1894
|
+
|
|
1895
|
+
/**
|
|
1896
|
+
* Valid HTML tag names for content elements.
|
|
1897
|
+
*
|
|
1898
|
+
* @remarks
|
|
1899
|
+
* Supports common HTML elements for rich content rendering.
|
|
1900
|
+
* Use semantic tags for better accessibility and SEO.
|
|
1901
|
+
*
|
|
1902
|
+
* **Heading Tags:** h1, h2, h3, h4, h5, h6
|
|
1903
|
+
* **Text Tags:** p, span, div, strong, em, code, pre
|
|
1904
|
+
* **Link Tag:** a
|
|
1905
|
+
* **Media Tags:** img, iframe
|
|
1906
|
+
* **List Tags:** ul, ol, li
|
|
1907
|
+
* **Other Tags:** blockquote, hr, br
|
|
1908
|
+
*/
|
|
1909
|
+
declare const ValidTagNames: readonly ["h1", "h2", "h3", "h4", "h5", "h6", "p", "span", "div", "a", "strong", "em", "code", "pre", "img", "iframe", "ul", "ol", "li", "blockquote", "hr", "br"];
|
|
1910
|
+
/**
|
|
1911
|
+
* Content element with styling and dynamic properties.
|
|
1912
|
+
*
|
|
1913
|
+
* @remarks
|
|
1914
|
+
* Defines a single element within content. Supports both static and
|
|
1915
|
+
* dynamic values via property interpolation.
|
|
1916
|
+
*
|
|
1917
|
+
* **Core Properties:**
|
|
1918
|
+
* - `str` - Static text string
|
|
1919
|
+
* - `property` - Feature/context property name
|
|
1920
|
+
* - `else` - Fallback value if property is missing
|
|
1921
|
+
*
|
|
1922
|
+
* **Styling:**
|
|
1923
|
+
* - `classList` - CSS class names (space-separated or array)
|
|
1924
|
+
* - `id` - Element ID
|
|
1925
|
+
* - `style` - Inline CSS styles
|
|
1926
|
+
*
|
|
1927
|
+
* **Links (a tag):**
|
|
1928
|
+
* - `href` - URL
|
|
1929
|
+
* - `target` - Link target (_blank, _self, etc.)
|
|
1930
|
+
*
|
|
1931
|
+
* **Media (img, iframe):**
|
|
1932
|
+
* - `src` - Source URL
|
|
1933
|
+
* - `alt` - Alternative text (img)
|
|
1934
|
+
* - `width` - Width (pixels or %)
|
|
1935
|
+
* - `height` - Height (pixels or %)
|
|
1936
|
+
*
|
|
1937
|
+
* @example Static Text
|
|
1938
|
+
* ```yaml
|
|
1939
|
+
* - str: "Welcome to our site"
|
|
1940
|
+
* ```
|
|
1941
|
+
*
|
|
1942
|
+
* @example Dynamic Property
|
|
1943
|
+
* ```yaml
|
|
1944
|
+
* - property: "userName"
|
|
1945
|
+
* else: "Guest"
|
|
1946
|
+
* ```
|
|
1947
|
+
*
|
|
1948
|
+
* @example Styled Element
|
|
1949
|
+
* ```yaml
|
|
1950
|
+
* - str: "Important"
|
|
1951
|
+
* classList: "text-bold text-red"
|
|
1952
|
+
* style: "font-size: 18px;"
|
|
1953
|
+
* ```
|
|
1954
|
+
*
|
|
1955
|
+
* @example Link
|
|
1956
|
+
* ```yaml
|
|
1957
|
+
* - str: "Learn more"
|
|
1958
|
+
* href: "https://example.com"
|
|
1959
|
+
* target: "_blank"
|
|
1960
|
+
* ```
|
|
1961
|
+
*
|
|
1962
|
+
* @example Image
|
|
1963
|
+
* ```yaml
|
|
1964
|
+
* - src: "https://example.com/photo.jpg"
|
|
1965
|
+
* alt: "Photo description"
|
|
1966
|
+
* width: "100%"
|
|
1967
|
+
* ```
|
|
1968
|
+
*/
|
|
1969
|
+
declare const ContentElementSchema: z.ZodObject<{
|
|
1970
|
+
str: z.ZodOptional<z.ZodString>;
|
|
1971
|
+
property: z.ZodOptional<z.ZodString>;
|
|
1972
|
+
else: z.ZodOptional<z.ZodString>;
|
|
1973
|
+
classList: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
1974
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1975
|
+
style: z.ZodOptional<z.ZodString>;
|
|
1976
|
+
href: z.ZodOptional<z.ZodString>;
|
|
1977
|
+
target: z.ZodOptional<z.ZodString>;
|
|
1978
|
+
src: z.ZodOptional<z.ZodString>;
|
|
1979
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
1980
|
+
width: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
1981
|
+
height: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
1982
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1983
|
+
str: z.ZodOptional<z.ZodString>;
|
|
1984
|
+
property: z.ZodOptional<z.ZodString>;
|
|
1985
|
+
else: z.ZodOptional<z.ZodString>;
|
|
1986
|
+
classList: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
1987
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1988
|
+
style: z.ZodOptional<z.ZodString>;
|
|
1989
|
+
href: z.ZodOptional<z.ZodString>;
|
|
1990
|
+
target: z.ZodOptional<z.ZodString>;
|
|
1991
|
+
src: z.ZodOptional<z.ZodString>;
|
|
1992
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
1993
|
+
width: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
1994
|
+
height: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
1995
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1996
|
+
str: z.ZodOptional<z.ZodString>;
|
|
1997
|
+
property: z.ZodOptional<z.ZodString>;
|
|
1998
|
+
else: z.ZodOptional<z.ZodString>;
|
|
1999
|
+
classList: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
2000
|
+
id: z.ZodOptional<z.ZodString>;
|
|
2001
|
+
style: z.ZodOptional<z.ZodString>;
|
|
2002
|
+
href: z.ZodOptional<z.ZodString>;
|
|
2003
|
+
target: z.ZodOptional<z.ZodString>;
|
|
2004
|
+
src: z.ZodOptional<z.ZodString>;
|
|
2005
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
2006
|
+
width: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
2007
|
+
height: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
2008
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
2009
|
+
/**
|
|
2010
|
+
* Content item mapping tag name to element array.
|
|
2011
|
+
*
|
|
2012
|
+
* @remarks
|
|
2013
|
+
* Each content item is a record where the key is an HTML tag name
|
|
2014
|
+
* and the value is an array of content elements to render inside that tag.
|
|
2015
|
+
*
|
|
2016
|
+
* @example
|
|
2017
|
+
* ```yaml
|
|
2018
|
+
* - h1:
|
|
2019
|
+
* - str: "Page Title"
|
|
2020
|
+
* - p:
|
|
2021
|
+
* - str: "Welcome, "
|
|
2022
|
+
* - property: "userName"
|
|
2023
|
+
* else: "Guest"
|
|
2024
|
+
* ```
|
|
2025
|
+
*/
|
|
2026
|
+
declare const ContentItemSchema: z.ZodRecord<z.ZodEnum<["h1", "h2", "h3", "h4", "h5", "h6", "p", "span", "div", "a", "strong", "em", "code", "pre", "img", "iframe", "ul", "ol", "li", "blockquote", "hr", "br"]>, z.ZodArray<z.ZodObject<{
|
|
2027
|
+
str: z.ZodOptional<z.ZodString>;
|
|
2028
|
+
property: z.ZodOptional<z.ZodString>;
|
|
2029
|
+
else: z.ZodOptional<z.ZodString>;
|
|
2030
|
+
classList: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
2031
|
+
id: z.ZodOptional<z.ZodString>;
|
|
2032
|
+
style: z.ZodOptional<z.ZodString>;
|
|
2033
|
+
href: z.ZodOptional<z.ZodString>;
|
|
2034
|
+
target: z.ZodOptional<z.ZodString>;
|
|
2035
|
+
src: z.ZodOptional<z.ZodString>;
|
|
2036
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
2037
|
+
width: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
2038
|
+
height: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
2039
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
2040
|
+
str: z.ZodOptional<z.ZodString>;
|
|
2041
|
+
property: z.ZodOptional<z.ZodString>;
|
|
2042
|
+
else: z.ZodOptional<z.ZodString>;
|
|
2043
|
+
classList: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
2044
|
+
id: z.ZodOptional<z.ZodString>;
|
|
2045
|
+
style: z.ZodOptional<z.ZodString>;
|
|
2046
|
+
href: z.ZodOptional<z.ZodString>;
|
|
2047
|
+
target: z.ZodOptional<z.ZodString>;
|
|
2048
|
+
src: z.ZodOptional<z.ZodString>;
|
|
2049
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
2050
|
+
width: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
2051
|
+
height: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
2052
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
2053
|
+
str: z.ZodOptional<z.ZodString>;
|
|
2054
|
+
property: z.ZodOptional<z.ZodString>;
|
|
2055
|
+
else: z.ZodOptional<z.ZodString>;
|
|
2056
|
+
classList: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
2057
|
+
id: z.ZodOptional<z.ZodString>;
|
|
2058
|
+
style: z.ZodOptional<z.ZodString>;
|
|
2059
|
+
href: z.ZodOptional<z.ZodString>;
|
|
2060
|
+
target: z.ZodOptional<z.ZodString>;
|
|
2061
|
+
src: z.ZodOptional<z.ZodString>;
|
|
2062
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
2063
|
+
width: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
2064
|
+
height: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
2065
|
+
}, z.ZodTypeAny, "passthrough">>, "many">>;
|
|
2066
|
+
/**
|
|
2067
|
+
* Content block for rich text and media.
|
|
2068
|
+
*
|
|
2069
|
+
* @remarks
|
|
2070
|
+
* Content blocks allow you to add non-map content to your pages.
|
|
2071
|
+
* They render as HTML with support for dynamic property interpolation.
|
|
2072
|
+
*
|
|
2073
|
+
* **Use Cases:**
|
|
2074
|
+
* - Introductory text
|
|
2075
|
+
* - Explanatory sections
|
|
2076
|
+
* - Embedded images and videos
|
|
2077
|
+
* - Interactive elements
|
|
2078
|
+
* - Mixed content layouts
|
|
2079
|
+
*
|
|
2080
|
+
* **Properties are resolved from:**
|
|
2081
|
+
* 1. Page-level context (passed to renderer)
|
|
2082
|
+
* 2. Global configuration
|
|
2083
|
+
* 3. URL query parameters (if configured)
|
|
2084
|
+
*
|
|
2085
|
+
* @example Basic Text Content
|
|
2086
|
+
* ```yaml
|
|
2087
|
+
* type: content
|
|
2088
|
+
* id: intro
|
|
2089
|
+
* content:
|
|
2090
|
+
* - h1:
|
|
2091
|
+
* - str: "Welcome"
|
|
2092
|
+
* - p:
|
|
2093
|
+
* - str: "This is a simple text block."
|
|
2094
|
+
* ```
|
|
2095
|
+
*
|
|
2096
|
+
* @example Dynamic Content
|
|
2097
|
+
* ```yaml
|
|
2098
|
+
* type: content
|
|
2099
|
+
* id: user-info
|
|
2100
|
+
* className: user-section
|
|
2101
|
+
* content:
|
|
2102
|
+
* - h2:
|
|
2103
|
+
* - str: "User Profile"
|
|
2104
|
+
* - p:
|
|
2105
|
+
* - str: "Name: "
|
|
2106
|
+
* - property: "userName"
|
|
2107
|
+
* else: "Unknown"
|
|
2108
|
+
* - p:
|
|
2109
|
+
* - str: "Location: "
|
|
2110
|
+
* - property: "userCity"
|
|
2111
|
+
* else: "Not specified"
|
|
2112
|
+
* ```
|
|
2113
|
+
*
|
|
2114
|
+
* @example Rich Content with Media
|
|
2115
|
+
* ```yaml
|
|
2116
|
+
* type: content
|
|
2117
|
+
* id: article
|
|
2118
|
+
* content:
|
|
2119
|
+
* - h1:
|
|
2120
|
+
* - str: "Article Title"
|
|
2121
|
+
* - img:
|
|
2122
|
+
* - src: "https://example.com/header.jpg"
|
|
2123
|
+
* alt: "Header image"
|
|
2124
|
+
* width: "100%"
|
|
2125
|
+
* - p:
|
|
2126
|
+
* - str: "Article text goes here..."
|
|
2127
|
+
* - blockquote:
|
|
2128
|
+
* - str: "An inspiring quote."
|
|
2129
|
+
* - a:
|
|
2130
|
+
* - str: "Read more"
|
|
2131
|
+
* href: "https://example.com/full-article"
|
|
2132
|
+
* target: "_blank"
|
|
2133
|
+
* ```
|
|
2134
|
+
*
|
|
2135
|
+
* @example Styled Content
|
|
2136
|
+
* ```yaml
|
|
2137
|
+
* type: content
|
|
2138
|
+
* id: styled
|
|
2139
|
+
* className: "card shadow"
|
|
2140
|
+
* style: "padding: 20px; background: #f5f5f5;"
|
|
2141
|
+
* content:
|
|
2142
|
+
* - h3:
|
|
2143
|
+
* - str: "Card Title"
|
|
2144
|
+
* classList: "text-primary"
|
|
2145
|
+
* - p:
|
|
2146
|
+
* - str: "Card content"
|
|
2147
|
+
* ```
|
|
2148
|
+
*
|
|
2149
|
+
* @example List Content
|
|
2150
|
+
* ```yaml
|
|
2151
|
+
* type: content
|
|
2152
|
+
* id: features
|
|
2153
|
+
* content:
|
|
2154
|
+
* - h2:
|
|
2155
|
+
* - str: "Features"
|
|
2156
|
+
* - ul:
|
|
2157
|
+
* - li:
|
|
2158
|
+
* - str: "Fast rendering"
|
|
2159
|
+
* - li:
|
|
2160
|
+
* - str: "Easy configuration"
|
|
2161
|
+
* - li:
|
|
2162
|
+
* - str: "Fully customizable"
|
|
2163
|
+
* ```
|
|
2164
|
+
*
|
|
2165
|
+
* @example Embedded Content
|
|
2166
|
+
* ```yaml
|
|
2167
|
+
* type: content
|
|
2168
|
+
* id: video
|
|
2169
|
+
* content:
|
|
2170
|
+
* - h2:
|
|
2171
|
+
* - str: "Tutorial Video"
|
|
2172
|
+
* - iframe:
|
|
2173
|
+
* - src: "https://www.youtube.com/embed/VIDEO_ID"
|
|
2174
|
+
* width: "560"
|
|
2175
|
+
* height: "315"
|
|
2176
|
+
* ```
|
|
2177
|
+
*/
|
|
2178
|
+
declare const ContentBlockSchema: z.ZodObject<{
|
|
2179
|
+
type: z.ZodLiteral<"content">;
|
|
2180
|
+
id: z.ZodOptional<z.ZodString>;
|
|
2181
|
+
className: z.ZodOptional<z.ZodString>;
|
|
2182
|
+
style: z.ZodOptional<z.ZodString>;
|
|
2183
|
+
content: z.ZodArray<z.ZodRecord<z.ZodEnum<["h1", "h2", "h3", "h4", "h5", "h6", "p", "span", "div", "a", "strong", "em", "code", "pre", "img", "iframe", "ul", "ol", "li", "blockquote", "hr", "br"]>, z.ZodArray<z.ZodObject<{
|
|
2184
|
+
str: z.ZodOptional<z.ZodString>;
|
|
2185
|
+
property: z.ZodOptional<z.ZodString>;
|
|
2186
|
+
else: z.ZodOptional<z.ZodString>;
|
|
2187
|
+
classList: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
2188
|
+
id: z.ZodOptional<z.ZodString>;
|
|
2189
|
+
style: z.ZodOptional<z.ZodString>;
|
|
2190
|
+
href: z.ZodOptional<z.ZodString>;
|
|
2191
|
+
target: z.ZodOptional<z.ZodString>;
|
|
2192
|
+
src: z.ZodOptional<z.ZodString>;
|
|
2193
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
2194
|
+
width: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
2195
|
+
height: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
2196
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
2197
|
+
str: z.ZodOptional<z.ZodString>;
|
|
2198
|
+
property: z.ZodOptional<z.ZodString>;
|
|
2199
|
+
else: z.ZodOptional<z.ZodString>;
|
|
2200
|
+
classList: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
2201
|
+
id: z.ZodOptional<z.ZodString>;
|
|
2202
|
+
style: z.ZodOptional<z.ZodString>;
|
|
2203
|
+
href: z.ZodOptional<z.ZodString>;
|
|
2204
|
+
target: z.ZodOptional<z.ZodString>;
|
|
2205
|
+
src: z.ZodOptional<z.ZodString>;
|
|
2206
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
2207
|
+
width: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
2208
|
+
height: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
2209
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
2210
|
+
str: z.ZodOptional<z.ZodString>;
|
|
2211
|
+
property: z.ZodOptional<z.ZodString>;
|
|
2212
|
+
else: z.ZodOptional<z.ZodString>;
|
|
2213
|
+
classList: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
2214
|
+
id: z.ZodOptional<z.ZodString>;
|
|
2215
|
+
style: z.ZodOptional<z.ZodString>;
|
|
2216
|
+
href: z.ZodOptional<z.ZodString>;
|
|
2217
|
+
target: z.ZodOptional<z.ZodString>;
|
|
2218
|
+
src: z.ZodOptional<z.ZodString>;
|
|
2219
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
2220
|
+
width: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
2221
|
+
height: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
2222
|
+
}, z.ZodTypeAny, "passthrough">>, "many">>, "many">;
|
|
2223
|
+
}, "strip", z.ZodTypeAny, {
|
|
2224
|
+
type: "content";
|
|
2225
|
+
content: Partial<Record<"code" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "p" | "span" | "div" | "a" | "strong" | "em" | "pre" | "img" | "iframe" | "ul" | "ol" | "li" | "blockquote" | "hr" | "br", z.objectOutputType<{
|
|
2226
|
+
str: z.ZodOptional<z.ZodString>;
|
|
2227
|
+
property: z.ZodOptional<z.ZodString>;
|
|
2228
|
+
else: z.ZodOptional<z.ZodString>;
|
|
2229
|
+
classList: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
2230
|
+
id: z.ZodOptional<z.ZodString>;
|
|
2231
|
+
style: z.ZodOptional<z.ZodString>;
|
|
2232
|
+
href: z.ZodOptional<z.ZodString>;
|
|
2233
|
+
target: z.ZodOptional<z.ZodString>;
|
|
2234
|
+
src: z.ZodOptional<z.ZodString>;
|
|
2235
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
2236
|
+
width: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
2237
|
+
height: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
2238
|
+
}, z.ZodTypeAny, "passthrough">[]>>[];
|
|
2239
|
+
id?: string | undefined;
|
|
2240
|
+
style?: string | undefined;
|
|
2241
|
+
className?: string | undefined;
|
|
2242
|
+
}, {
|
|
2243
|
+
type: "content";
|
|
2244
|
+
content: Partial<Record<"code" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "p" | "span" | "div" | "a" | "strong" | "em" | "pre" | "img" | "iframe" | "ul" | "ol" | "li" | "blockquote" | "hr" | "br", z.objectInputType<{
|
|
2245
|
+
str: z.ZodOptional<z.ZodString>;
|
|
2246
|
+
property: z.ZodOptional<z.ZodString>;
|
|
2247
|
+
else: z.ZodOptional<z.ZodString>;
|
|
2248
|
+
classList: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
2249
|
+
id: z.ZodOptional<z.ZodString>;
|
|
2250
|
+
style: z.ZodOptional<z.ZodString>;
|
|
2251
|
+
href: z.ZodOptional<z.ZodString>;
|
|
2252
|
+
target: z.ZodOptional<z.ZodString>;
|
|
2253
|
+
src: z.ZodOptional<z.ZodString>;
|
|
2254
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
2255
|
+
width: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
2256
|
+
height: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
2257
|
+
}, z.ZodTypeAny, "passthrough">[]>>[];
|
|
2258
|
+
id?: string | undefined;
|
|
2259
|
+
style?: string | undefined;
|
|
2260
|
+
className?: string | undefined;
|
|
2261
|
+
}>;
|
|
2262
|
+
|
|
2263
|
+
/**
|
|
2264
|
+
* @file Scrollytelling schemas for maplibre-yaml
|
|
2265
|
+
* @module @maplibre-yaml/core/schemas/scrollytelling
|
|
2266
|
+
*
|
|
2267
|
+
* @description
|
|
2268
|
+
* Zod schemas for narrative scrollytelling maps with chapters, animations,
|
|
2269
|
+
* and layer transitions.
|
|
2270
|
+
*
|
|
2271
|
+
* @example
|
|
2272
|
+
* ```typescript
|
|
2273
|
+
* import { ScrollytellingBlockSchema, ChapterSchema } from '@maplibre-yaml/core/schemas';
|
|
2274
|
+
* ```
|
|
2275
|
+
*/
|
|
2276
|
+
|
|
2277
|
+
/**
|
|
2278
|
+
* Chapter action for map state changes.
|
|
2279
|
+
*
|
|
2280
|
+
* @remarks
|
|
2281
|
+
* Actions are triggered when entering or exiting a chapter.
|
|
2282
|
+
* They can modify layer properties, filters, or trigger animations.
|
|
2283
|
+
*
|
|
2284
|
+
* **Action Types:**
|
|
2285
|
+
* - `setFilter` - Update layer filter
|
|
2286
|
+
* - `setPaintProperty` - Update layer paint property
|
|
2287
|
+
* - `setLayoutProperty` - Update layer layout property
|
|
2288
|
+
* - `flyTo` - Fly to location (handled by chapter config)
|
|
2289
|
+
* - `easeTo` - Ease to location (handled by chapter config)
|
|
2290
|
+
* - `fitBounds` - Fit to bounds
|
|
2291
|
+
* - `custom` - Custom action (handled by application)
|
|
2292
|
+
*
|
|
2293
|
+
* @example Set Filter
|
|
2294
|
+
* ```yaml
|
|
2295
|
+
* onChapterEnter:
|
|
2296
|
+
* - action: setFilter
|
|
2297
|
+
* layer: earthquakes
|
|
2298
|
+
* filter: [">=", ["get", "magnitude"], 5]
|
|
2299
|
+
* ```
|
|
2300
|
+
*
|
|
2301
|
+
* @example Set Paint Property
|
|
2302
|
+
* ```yaml
|
|
2303
|
+
* onChapterEnter:
|
|
2304
|
+
* - action: setPaintProperty
|
|
2305
|
+
* layer: buildings
|
|
2306
|
+
* property: fill-extrusion-height
|
|
2307
|
+
* value: ["get", "height"]
|
|
2308
|
+
* ```
|
|
2309
|
+
*
|
|
2310
|
+
* @example Fit Bounds
|
|
2311
|
+
* ```yaml
|
|
2312
|
+
* onChapterEnter:
|
|
2313
|
+
* - action: fitBounds
|
|
2314
|
+
* bounds: [-74.3, 40.5, -73.7, 40.9]
|
|
2315
|
+
* options:
|
|
2316
|
+
* padding: 50
|
|
2317
|
+
* duration: 1000
|
|
2318
|
+
* ```
|
|
2319
|
+
*/
|
|
2320
|
+
declare const ChapterActionSchema: z.ZodObject<{
|
|
2321
|
+
action: z.ZodEnum<["setFilter", "setPaintProperty", "setLayoutProperty", "flyTo", "easeTo", "fitBounds", "custom"]>;
|
|
2322
|
+
layer: z.ZodOptional<z.ZodString>;
|
|
2323
|
+
property: z.ZodOptional<z.ZodString>;
|
|
2324
|
+
value: z.ZodOptional<z.ZodAny>;
|
|
2325
|
+
filter: z.ZodOptional<z.ZodNullable<z.ZodType<any[], z.ZodTypeDef, any[]>>>;
|
|
2326
|
+
bounds: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
2327
|
+
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
2328
|
+
}, "strip", z.ZodTypeAny, {
|
|
2329
|
+
action: "custom" | "flyTo" | "setFilter" | "setPaintProperty" | "setLayoutProperty" | "easeTo" | "fitBounds";
|
|
2330
|
+
value?: any;
|
|
2331
|
+
filter?: any[] | null | undefined;
|
|
2332
|
+
options?: Record<string, any> | undefined;
|
|
2333
|
+
bounds?: number[] | undefined;
|
|
2334
|
+
property?: string | undefined;
|
|
2335
|
+
layer?: string | undefined;
|
|
2336
|
+
}, {
|
|
2337
|
+
action: "custom" | "flyTo" | "setFilter" | "setPaintProperty" | "setLayoutProperty" | "easeTo" | "fitBounds";
|
|
2338
|
+
value?: any;
|
|
2339
|
+
filter?: any[] | null | undefined;
|
|
2340
|
+
options?: Record<string, any> | undefined;
|
|
2341
|
+
bounds?: number[] | undefined;
|
|
2342
|
+
property?: string | undefined;
|
|
2343
|
+
layer?: string | undefined;
|
|
2344
|
+
}>;
|
|
2345
|
+
/**
|
|
2346
|
+
* Chapter layer visibility configuration.
|
|
2347
|
+
*
|
|
2348
|
+
* @remarks
|
|
2349
|
+
* Controls which layers are visible during this chapter.
|
|
2350
|
+
*
|
|
2351
|
+
* @example
|
|
2352
|
+
* ```yaml
|
|
2353
|
+
* layers:
|
|
2354
|
+
* show:
|
|
2355
|
+
* - earthquakes
|
|
2356
|
+
* - fault-lines
|
|
2357
|
+
* hide:
|
|
2358
|
+
* - buildings
|
|
2359
|
+
* ```
|
|
2360
|
+
*/
|
|
2361
|
+
declare const ChapterLayersSchema: z.ZodObject<{
|
|
2362
|
+
show: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
2363
|
+
hide: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
2364
|
+
}, "strip", z.ZodTypeAny, {
|
|
2365
|
+
show: string[];
|
|
2366
|
+
hide: string[];
|
|
2367
|
+
}, {
|
|
2368
|
+
show?: string[] | undefined;
|
|
2369
|
+
hide?: string[] | undefined;
|
|
2370
|
+
}>;
|
|
2371
|
+
/**
|
|
2372
|
+
* Scrollytelling chapter.
|
|
2373
|
+
*
|
|
2374
|
+
* @remarks
|
|
2375
|
+
* A chapter represents one section of the scrollytelling narrative.
|
|
2376
|
+
* As the user scrolls, the map transitions between chapters with
|
|
2377
|
+
* camera animations and layer changes.
|
|
2378
|
+
*
|
|
2379
|
+
* **Required:**
|
|
2380
|
+
* - `id` - Unique chapter identifier
|
|
2381
|
+
* - `title` - Chapter title
|
|
2382
|
+
* - `center` - Map center for this chapter
|
|
2383
|
+
* - `zoom` - Zoom level for this chapter
|
|
2384
|
+
*
|
|
2385
|
+
* **Content:**
|
|
2386
|
+
* - `description` - HTML description (supports markdown)
|
|
2387
|
+
* - `image` - Hero image URL
|
|
2388
|
+
* - `video` - Video URL
|
|
2389
|
+
*
|
|
2390
|
+
* **Camera:**
|
|
2391
|
+
* - `pitch` - Camera tilt (0-85)
|
|
2392
|
+
* - `bearing` - Camera rotation (-180 to 180)
|
|
2393
|
+
* - `animation` - Animation type (flyTo, easeTo, jumpTo)
|
|
2394
|
+
* - `speed`, `curve` - Animation parameters
|
|
2395
|
+
*
|
|
2396
|
+
* **Layout:**
|
|
2397
|
+
* - `alignment` - Content position (left, right, center, full)
|
|
2398
|
+
* - `hidden` - Hide chapter content (map-only)
|
|
2399
|
+
*
|
|
2400
|
+
* **Interactivity:**
|
|
2401
|
+
* - `layers` - Show/hide layers
|
|
2402
|
+
* - `onChapterEnter`, `onChapterExit` - Actions
|
|
2403
|
+
*
|
|
2404
|
+
* @example Basic Chapter
|
|
2405
|
+
* ```yaml
|
|
2406
|
+
* - id: intro
|
|
2407
|
+
* title: "Welcome"
|
|
2408
|
+
* description: "This is the introduction."
|
|
2409
|
+
* center: [-74.006, 40.7128]
|
|
2410
|
+
* zoom: 12
|
|
2411
|
+
* ```
|
|
2412
|
+
*
|
|
2413
|
+
* @example Chapter with 3D View
|
|
2414
|
+
* ```yaml
|
|
2415
|
+
* - id: downtown
|
|
2416
|
+
* title: "Downtown"
|
|
2417
|
+
* description: "Explore the city center in 3D."
|
|
2418
|
+
* center: [-74.006, 40.7128]
|
|
2419
|
+
* zoom: 16
|
|
2420
|
+
* pitch: 60
|
|
2421
|
+
* bearing: 30
|
|
2422
|
+
* ```
|
|
2423
|
+
*
|
|
2424
|
+
* @example Chapter with Media
|
|
2425
|
+
* ```yaml
|
|
2426
|
+
* - id: overview
|
|
2427
|
+
* title: "City Overview"
|
|
2428
|
+
* description: "A bird's eye view of the city."
|
|
2429
|
+
* image: "https://example.com/overview.jpg"
|
|
2430
|
+
* center: [-74.006, 40.7128]
|
|
2431
|
+
* zoom: 10
|
|
2432
|
+
* ```
|
|
2433
|
+
*
|
|
2434
|
+
* @example Chapter with Layer Control
|
|
2435
|
+
* ```yaml
|
|
2436
|
+
* - id: earthquakes
|
|
2437
|
+
* title: "Recent Earthquakes"
|
|
2438
|
+
* description: "Major earthquakes in the last month."
|
|
2439
|
+
* center: [-120, 35]
|
|
2440
|
+
* zoom: 6
|
|
2441
|
+
* layers:
|
|
2442
|
+
* show:
|
|
2443
|
+
* - earthquakes
|
|
2444
|
+
* - fault-lines
|
|
2445
|
+
* hide:
|
|
2446
|
+
* - cities
|
|
2447
|
+
* ```
|
|
2448
|
+
*
|
|
2449
|
+
* @example Chapter with Actions
|
|
2450
|
+
* ```yaml
|
|
2451
|
+
* - id: filtered
|
|
2452
|
+
* title: "High Magnitude Events"
|
|
2453
|
+
* center: [-120, 35]
|
|
2454
|
+
* zoom: 6
|
|
2455
|
+
* onChapterEnter:
|
|
2456
|
+
* - action: setFilter
|
|
2457
|
+
* layer: earthquakes
|
|
2458
|
+
* filter: [">=", ["get", "magnitude"], 5]
|
|
2459
|
+
* onChapterExit:
|
|
2460
|
+
* - action: setFilter
|
|
2461
|
+
* layer: earthquakes
|
|
2462
|
+
* filter: null
|
|
2463
|
+
* ```
|
|
2464
|
+
*
|
|
2465
|
+
* @example Full-Width Chapter
|
|
2466
|
+
* ```yaml
|
|
2467
|
+
* - id: fullwidth
|
|
2468
|
+
* title: "Immersive View"
|
|
2469
|
+
* alignment: full
|
|
2470
|
+
* center: [-74.006, 40.7128]
|
|
2471
|
+
* zoom: 14
|
|
2472
|
+
* pitch: 45
|
|
2473
|
+
* ```
|
|
2474
|
+
*/
|
|
2475
|
+
declare const ChapterSchema: z.ZodObject<{
|
|
2476
|
+
id: z.ZodString;
|
|
2477
|
+
title: z.ZodString;
|
|
2478
|
+
center: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
2479
|
+
zoom: z.ZodNumber;
|
|
2480
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2481
|
+
image: z.ZodOptional<z.ZodString>;
|
|
2482
|
+
video: z.ZodOptional<z.ZodString>;
|
|
2483
|
+
pitch: z.ZodDefault<z.ZodNumber>;
|
|
2484
|
+
bearing: z.ZodDefault<z.ZodNumber>;
|
|
2485
|
+
speed: z.ZodDefault<z.ZodNumber>;
|
|
2486
|
+
curve: z.ZodDefault<z.ZodNumber>;
|
|
2487
|
+
animation: z.ZodDefault<z.ZodEnum<["flyTo", "easeTo", "jumpTo"]>>;
|
|
2488
|
+
rotateAnimation: z.ZodOptional<z.ZodBoolean>;
|
|
2489
|
+
spinGlobe: z.ZodOptional<z.ZodBoolean>;
|
|
2490
|
+
alignment: z.ZodDefault<z.ZodEnum<["left", "right", "center", "full"]>>;
|
|
2491
|
+
hidden: z.ZodDefault<z.ZodBoolean>;
|
|
2492
|
+
layers: z.ZodOptional<z.ZodObject<{
|
|
2493
|
+
show: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
2494
|
+
hide: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
2495
|
+
}, "strip", z.ZodTypeAny, {
|
|
2496
|
+
show: string[];
|
|
2497
|
+
hide: string[];
|
|
2498
|
+
}, {
|
|
2499
|
+
show?: string[] | undefined;
|
|
2500
|
+
hide?: string[] | undefined;
|
|
2501
|
+
}>>;
|
|
2502
|
+
onChapterEnter: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
2503
|
+
action: z.ZodEnum<["setFilter", "setPaintProperty", "setLayoutProperty", "flyTo", "easeTo", "fitBounds", "custom"]>;
|
|
2504
|
+
layer: z.ZodOptional<z.ZodString>;
|
|
2505
|
+
property: z.ZodOptional<z.ZodString>;
|
|
2506
|
+
value: z.ZodOptional<z.ZodAny>;
|
|
2507
|
+
filter: z.ZodOptional<z.ZodNullable<z.ZodType<any[], z.ZodTypeDef, any[]>>>;
|
|
2508
|
+
bounds: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
2509
|
+
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
2510
|
+
}, "strip", z.ZodTypeAny, {
|
|
2511
|
+
action: "custom" | "flyTo" | "setFilter" | "setPaintProperty" | "setLayoutProperty" | "easeTo" | "fitBounds";
|
|
2512
|
+
value?: any;
|
|
2513
|
+
filter?: any[] | null | undefined;
|
|
2514
|
+
options?: Record<string, any> | undefined;
|
|
2515
|
+
bounds?: number[] | undefined;
|
|
2516
|
+
property?: string | undefined;
|
|
2517
|
+
layer?: string | undefined;
|
|
2518
|
+
}, {
|
|
2519
|
+
action: "custom" | "flyTo" | "setFilter" | "setPaintProperty" | "setLayoutProperty" | "easeTo" | "fitBounds";
|
|
2520
|
+
value?: any;
|
|
2521
|
+
filter?: any[] | null | undefined;
|
|
2522
|
+
options?: Record<string, any> | undefined;
|
|
2523
|
+
bounds?: number[] | undefined;
|
|
2524
|
+
property?: string | undefined;
|
|
2525
|
+
layer?: string | undefined;
|
|
2526
|
+
}>, "many">>;
|
|
2527
|
+
onChapterExit: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
2528
|
+
action: z.ZodEnum<["setFilter", "setPaintProperty", "setLayoutProperty", "flyTo", "easeTo", "fitBounds", "custom"]>;
|
|
2529
|
+
layer: z.ZodOptional<z.ZodString>;
|
|
2530
|
+
property: z.ZodOptional<z.ZodString>;
|
|
2531
|
+
value: z.ZodOptional<z.ZodAny>;
|
|
2532
|
+
filter: z.ZodOptional<z.ZodNullable<z.ZodType<any[], z.ZodTypeDef, any[]>>>;
|
|
2533
|
+
bounds: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
2534
|
+
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
2535
|
+
}, "strip", z.ZodTypeAny, {
|
|
2536
|
+
action: "custom" | "flyTo" | "setFilter" | "setPaintProperty" | "setLayoutProperty" | "easeTo" | "fitBounds";
|
|
2537
|
+
value?: any;
|
|
2538
|
+
filter?: any[] | null | undefined;
|
|
2539
|
+
options?: Record<string, any> | undefined;
|
|
2540
|
+
bounds?: number[] | undefined;
|
|
2541
|
+
property?: string | undefined;
|
|
2542
|
+
layer?: string | undefined;
|
|
2543
|
+
}, {
|
|
2544
|
+
action: "custom" | "flyTo" | "setFilter" | "setPaintProperty" | "setLayoutProperty" | "easeTo" | "fitBounds";
|
|
2545
|
+
value?: any;
|
|
2546
|
+
filter?: any[] | null | undefined;
|
|
2547
|
+
options?: Record<string, any> | undefined;
|
|
2548
|
+
bounds?: number[] | undefined;
|
|
2549
|
+
property?: string | undefined;
|
|
2550
|
+
layer?: string | undefined;
|
|
2551
|
+
}>, "many">>;
|
|
2552
|
+
callback: z.ZodOptional<z.ZodString>;
|
|
2553
|
+
}, "strip", z.ZodTypeAny, {
|
|
2554
|
+
center: [number, number];
|
|
2555
|
+
zoom: number;
|
|
2556
|
+
id: string;
|
|
2557
|
+
title: string;
|
|
2558
|
+
pitch: number;
|
|
2559
|
+
bearing: number;
|
|
2560
|
+
speed: number;
|
|
2561
|
+
curve: number;
|
|
2562
|
+
animation: "flyTo" | "easeTo" | "jumpTo";
|
|
2563
|
+
alignment: "center" | "left" | "right" | "full";
|
|
2564
|
+
hidden: boolean;
|
|
2565
|
+
onChapterEnter: {
|
|
2566
|
+
action: "custom" | "flyTo" | "setFilter" | "setPaintProperty" | "setLayoutProperty" | "easeTo" | "fitBounds";
|
|
2567
|
+
value?: any;
|
|
2568
|
+
filter?: any[] | null | undefined;
|
|
2569
|
+
options?: Record<string, any> | undefined;
|
|
2570
|
+
bounds?: number[] | undefined;
|
|
2571
|
+
property?: string | undefined;
|
|
2572
|
+
layer?: string | undefined;
|
|
2573
|
+
}[];
|
|
2574
|
+
onChapterExit: {
|
|
2575
|
+
action: "custom" | "flyTo" | "setFilter" | "setPaintProperty" | "setLayoutProperty" | "easeTo" | "fitBounds";
|
|
2576
|
+
value?: any;
|
|
2577
|
+
filter?: any[] | null | undefined;
|
|
2578
|
+
options?: Record<string, any> | undefined;
|
|
2579
|
+
bounds?: number[] | undefined;
|
|
2580
|
+
property?: string | undefined;
|
|
2581
|
+
layer?: string | undefined;
|
|
2582
|
+
}[];
|
|
2583
|
+
image?: string | undefined;
|
|
2584
|
+
video?: string | undefined;
|
|
2585
|
+
layers?: {
|
|
2586
|
+
show: string[];
|
|
2587
|
+
hide: string[];
|
|
2588
|
+
} | undefined;
|
|
2589
|
+
description?: string | undefined;
|
|
2590
|
+
rotateAnimation?: boolean | undefined;
|
|
2591
|
+
spinGlobe?: boolean | undefined;
|
|
2592
|
+
callback?: string | undefined;
|
|
2593
|
+
}, {
|
|
2594
|
+
center: [number, number];
|
|
2595
|
+
zoom: number;
|
|
2596
|
+
id: string;
|
|
2597
|
+
title: string;
|
|
2598
|
+
image?: string | undefined;
|
|
2599
|
+
video?: string | undefined;
|
|
2600
|
+
pitch?: number | undefined;
|
|
2601
|
+
bearing?: number | undefined;
|
|
2602
|
+
layers?: {
|
|
2603
|
+
show?: string[] | undefined;
|
|
2604
|
+
hide?: string[] | undefined;
|
|
2605
|
+
} | undefined;
|
|
2606
|
+
description?: string | undefined;
|
|
2607
|
+
speed?: number | undefined;
|
|
2608
|
+
curve?: number | undefined;
|
|
2609
|
+
animation?: "flyTo" | "easeTo" | "jumpTo" | undefined;
|
|
2610
|
+
rotateAnimation?: boolean | undefined;
|
|
2611
|
+
spinGlobe?: boolean | undefined;
|
|
2612
|
+
alignment?: "center" | "left" | "right" | "full" | undefined;
|
|
2613
|
+
hidden?: boolean | undefined;
|
|
2614
|
+
onChapterEnter?: {
|
|
2615
|
+
action: "custom" | "flyTo" | "setFilter" | "setPaintProperty" | "setLayoutProperty" | "easeTo" | "fitBounds";
|
|
2616
|
+
value?: any;
|
|
2617
|
+
filter?: any[] | null | undefined;
|
|
2618
|
+
options?: Record<string, any> | undefined;
|
|
2619
|
+
bounds?: number[] | undefined;
|
|
2620
|
+
property?: string | undefined;
|
|
2621
|
+
layer?: string | undefined;
|
|
2622
|
+
}[] | undefined;
|
|
2623
|
+
onChapterExit?: {
|
|
2624
|
+
action: "custom" | "flyTo" | "setFilter" | "setPaintProperty" | "setLayoutProperty" | "easeTo" | "fitBounds";
|
|
2625
|
+
value?: any;
|
|
2626
|
+
filter?: any[] | null | undefined;
|
|
2627
|
+
options?: Record<string, any> | undefined;
|
|
2628
|
+
bounds?: number[] | undefined;
|
|
2629
|
+
property?: string | undefined;
|
|
2630
|
+
layer?: string | undefined;
|
|
2631
|
+
}[] | undefined;
|
|
2632
|
+
callback?: string | undefined;
|
|
2633
|
+
}>;
|
|
2634
|
+
/**
|
|
2635
|
+
* Scrollytelling block for narrative map stories.
|
|
2636
|
+
*
|
|
2637
|
+
* @remarks
|
|
2638
|
+
* Creates an immersive scrollytelling experience where the map
|
|
2639
|
+
* transitions between chapters as the user scrolls through content.
|
|
2640
|
+
*
|
|
2641
|
+
* **Features:**
|
|
2642
|
+
* - Smooth camera transitions
|
|
2643
|
+
* - Layer show/hide animations
|
|
2644
|
+
* - Dynamic property updates
|
|
2645
|
+
* - Chapter-based narrative structure
|
|
2646
|
+
* - Customizable themes and markers
|
|
2647
|
+
*
|
|
2648
|
+
* **Structure:**
|
|
2649
|
+
* 1. Base map configuration (persistent)
|
|
2650
|
+
* 2. Persistent layers (visible throughout)
|
|
2651
|
+
* 3. Chapters (individual story sections)
|
|
2652
|
+
* 4. Optional footer
|
|
2653
|
+
*
|
|
2654
|
+
* @example Basic Scrollytelling
|
|
2655
|
+
* ```yaml
|
|
2656
|
+
* - type: scrollytelling
|
|
2657
|
+
* id: story
|
|
2658
|
+
* config:
|
|
2659
|
+
* center: [-74.006, 40.7128]
|
|
2660
|
+
* zoom: 12
|
|
2661
|
+
* mapStyle: "https://demotiles.maplibre.org/style.json"
|
|
2662
|
+
* chapters:
|
|
2663
|
+
* - id: intro
|
|
2664
|
+
* title: "Introduction"
|
|
2665
|
+
* description: "Welcome to our story."
|
|
2666
|
+
* center: [-74.006, 40.7128]
|
|
2667
|
+
* zoom: 12
|
|
2668
|
+
* - id: detail
|
|
2669
|
+
* title: "A Closer Look"
|
|
2670
|
+
* description: "Let's zoom in."
|
|
2671
|
+
* center: [-74.006, 40.7128]
|
|
2672
|
+
* zoom: 16
|
|
2673
|
+
* ```
|
|
2674
|
+
*
|
|
2675
|
+
* @example Themed Scrollytelling
|
|
2676
|
+
* ```yaml
|
|
2677
|
+
* - type: scrollytelling
|
|
2678
|
+
* id: dark-story
|
|
2679
|
+
* theme: dark
|
|
2680
|
+
* showMarkers: true
|
|
2681
|
+
* markerColor: "#ff0000"
|
|
2682
|
+
* config:
|
|
2683
|
+
* center: [0, 0]
|
|
2684
|
+
* zoom: 2
|
|
2685
|
+
* mapStyle: "https://demotiles.maplibre.org/style.json"
|
|
2686
|
+
* chapters:
|
|
2687
|
+
* - id: chapter1
|
|
2688
|
+
* title: "Chapter 1"
|
|
2689
|
+
* center: [0, 0]
|
|
2690
|
+
* zoom: 3
|
|
2691
|
+
* ```
|
|
2692
|
+
*
|
|
2693
|
+
* @example With Persistent Layers
|
|
2694
|
+
* ```yaml
|
|
2695
|
+
* - type: scrollytelling
|
|
2696
|
+
* id: earthquake-story
|
|
2697
|
+
* config:
|
|
2698
|
+
* center: [-120, 35]
|
|
2699
|
+
* zoom: 5
|
|
2700
|
+
* mapStyle: "https://demotiles.maplibre.org/style.json"
|
|
2701
|
+
* layers:
|
|
2702
|
+
* - id: base-layer
|
|
2703
|
+
* type: circle
|
|
2704
|
+
* source:
|
|
2705
|
+
* type: geojson
|
|
2706
|
+
* url: "https://example.com/data.geojson"
|
|
2707
|
+
* paint:
|
|
2708
|
+
* circle-radius: 6
|
|
2709
|
+
* circle-color: "#888888"
|
|
2710
|
+
* chapters:
|
|
2711
|
+
* - id: overview
|
|
2712
|
+
* title: "Overview"
|
|
2713
|
+
* center: [-120, 35]
|
|
2714
|
+
* zoom: 5
|
|
2715
|
+
* - id: detail
|
|
2716
|
+
* title: "Major Event"
|
|
2717
|
+
* center: [-118, 34]
|
|
2718
|
+
* zoom: 10
|
|
2719
|
+
* layers:
|
|
2720
|
+
* show:
|
|
2721
|
+
* - base-layer
|
|
2722
|
+
* ```
|
|
2723
|
+
*
|
|
2724
|
+
* @example With Footer
|
|
2725
|
+
* ```yaml
|
|
2726
|
+
* - type: scrollytelling
|
|
2727
|
+
* id: story
|
|
2728
|
+
* config:
|
|
2729
|
+
* center: [0, 0]
|
|
2730
|
+
* zoom: 2
|
|
2731
|
+
* mapStyle: "https://demotiles.maplibre.org/style.json"
|
|
2732
|
+
* chapters:
|
|
2733
|
+
* - id: chapter1
|
|
2734
|
+
* title: "Chapter 1"
|
|
2735
|
+
* center: [0, 0]
|
|
2736
|
+
* zoom: 3
|
|
2737
|
+
* footer: |
|
|
2738
|
+
* <p>Data sources: ...</p>
|
|
2739
|
+
* <p>Created with maplibre-yaml</p>
|
|
2740
|
+
* ```
|
|
2741
|
+
*/
|
|
2742
|
+
declare const ScrollytellingBlockSchema: z.ZodObject<any>;
|
|
2743
|
+
|
|
2744
|
+
/**
|
|
2745
|
+
* @file Page and root configuration schemas for maplibre-yaml
|
|
2746
|
+
* @module @maplibre-yaml/core/schemas/page
|
|
2747
|
+
*
|
|
2748
|
+
* @description
|
|
2749
|
+
* Zod schemas for pages, global configuration, and the root schema.
|
|
2750
|
+
* Includes recursive MixedBlock for complex layouts.
|
|
2751
|
+
*
|
|
2752
|
+
* @example
|
|
2753
|
+
* ```typescript
|
|
2754
|
+
* import { RootSchema, PageSchema } from '@maplibre-yaml/core/schemas';
|
|
2755
|
+
* ```
|
|
2756
|
+
*/
|
|
2757
|
+
|
|
2758
|
+
/**
|
|
2759
|
+
* Mixed block for combining multiple block types.
|
|
2760
|
+
*
|
|
2761
|
+
* @remarks
|
|
2762
|
+
* MixedBlock allows you to create complex layouts by combining
|
|
2763
|
+
* content, map, and scrollytelling blocks. Uses z.lazy() for recursion.
|
|
2764
|
+
*
|
|
2765
|
+
* **Layout Options:**
|
|
2766
|
+
* - `row` - Horizontal layout (default)
|
|
2767
|
+
* - `column` - Vertical layout
|
|
2768
|
+
* - `grid` - CSS Grid layout
|
|
2769
|
+
*
|
|
2770
|
+
* @example Row Layout
|
|
2771
|
+
* ```yaml
|
|
2772
|
+
* - type: mixed
|
|
2773
|
+
* layout: row
|
|
2774
|
+
* blocks:
|
|
2775
|
+
* - type: content
|
|
2776
|
+
* content:
|
|
2777
|
+
* - h2: [{ str: "Left Column" }]
|
|
2778
|
+
* - type: map
|
|
2779
|
+
* id: side-map
|
|
2780
|
+
* config:
|
|
2781
|
+
* center: [0, 0]
|
|
2782
|
+
* zoom: 2
|
|
2783
|
+
* mapStyle: "..."
|
|
2784
|
+
* ```
|
|
2785
|
+
*
|
|
2786
|
+
* @example Grid Layout
|
|
2787
|
+
* ```yaml
|
|
2788
|
+
* - type: mixed
|
|
2789
|
+
* layout: grid
|
|
2790
|
+
* style: "grid-template-columns: repeat(2, 1fr); gap: 20px;"
|
|
2791
|
+
* blocks:
|
|
2792
|
+
* - type: content
|
|
2793
|
+
* content: [...]
|
|
2794
|
+
* - type: content
|
|
2795
|
+
* content: [...]
|
|
2796
|
+
* - type: map
|
|
2797
|
+
* id: map1
|
|
2798
|
+
* config: {...}
|
|
2799
|
+
* - type: map
|
|
2800
|
+
* id: map2
|
|
2801
|
+
* config: {...}
|
|
2802
|
+
* ```
|
|
2803
|
+
*
|
|
2804
|
+
* @example Nested Mixed Blocks
|
|
2805
|
+
* ```yaml
|
|
2806
|
+
* - type: mixed
|
|
2807
|
+
* layout: column
|
|
2808
|
+
* blocks:
|
|
2809
|
+
* - type: content
|
|
2810
|
+
* content: [...]
|
|
2811
|
+
* - type: mixed
|
|
2812
|
+
* layout: row
|
|
2813
|
+
* blocks:
|
|
2814
|
+
* - type: map
|
|
2815
|
+
* id: left-map
|
|
2816
|
+
* config: {...}
|
|
2817
|
+
* - type: map
|
|
2818
|
+
* id: right-map
|
|
2819
|
+
* config: {...}
|
|
2820
|
+
* ```
|
|
2821
|
+
*/
|
|
2822
|
+
declare const MixedBlockSchema: z.ZodType<any>;
|
|
2823
|
+
/**
|
|
2824
|
+
* Union of all block types.
|
|
2825
|
+
*
|
|
2826
|
+
* @remarks
|
|
2827
|
+
* Blocks are the building blocks of pages. Each page contains an
|
|
2828
|
+
* array of blocks that are rendered in order.
|
|
2829
|
+
*
|
|
2830
|
+
* **Block Types:**
|
|
2831
|
+
* - `content` - Rich text and media
|
|
2832
|
+
* - `map` - Standard map
|
|
2833
|
+
* - `map-fullpage` - Full viewport map
|
|
2834
|
+
* - `scrollytelling` - Narrative map story
|
|
2835
|
+
* - `mixed` - Layout container for other blocks
|
|
2836
|
+
*/
|
|
2837
|
+
declare const BlockSchema: z.ZodType<any>;
|
|
2838
|
+
/**
|
|
2839
|
+
* Page configuration.
|
|
2840
|
+
*
|
|
2841
|
+
* @remarks
|
|
2842
|
+
* A page represents a single route/URL in your application.
|
|
2843
|
+
* Pages contain blocks that define the content and maps.
|
|
2844
|
+
*
|
|
2845
|
+
* **Required:**
|
|
2846
|
+
* - `path` - URL path (e.g., "/", "/about", "/map")
|
|
2847
|
+
* - `title` - Page title (used for browser tab and SEO)
|
|
2848
|
+
* - `blocks` - Array of content/map blocks
|
|
2849
|
+
*
|
|
2850
|
+
* **Optional:**
|
|
2851
|
+
* - `description` - Meta description for SEO
|
|
2852
|
+
*
|
|
2853
|
+
* @example Home Page
|
|
2854
|
+
* ```yaml
|
|
2855
|
+
* - path: "/"
|
|
2856
|
+
* title: "Home"
|
|
2857
|
+
* description: "Welcome to our mapping application"
|
|
2858
|
+
* blocks:
|
|
2859
|
+
* - type: content
|
|
2860
|
+
* content:
|
|
2861
|
+
* - h1: [{ str: "Welcome" }]
|
|
2862
|
+
* - type: map
|
|
2863
|
+
* id: home-map
|
|
2864
|
+
* config:
|
|
2865
|
+
* center: [0, 0]
|
|
2866
|
+
* zoom: 2
|
|
2867
|
+
* mapStyle: "..."
|
|
2868
|
+
* ```
|
|
2869
|
+
*
|
|
2870
|
+
* @example Story Page
|
|
2871
|
+
* ```yaml
|
|
2872
|
+
* - path: "/story"
|
|
2873
|
+
* title: "Our Story"
|
|
2874
|
+
* description: "An interactive map story"
|
|
2875
|
+
* blocks:
|
|
2876
|
+
* - type: scrollytelling
|
|
2877
|
+
* id: main-story
|
|
2878
|
+
* config: {...}
|
|
2879
|
+
* chapters: [...]
|
|
2880
|
+
* ```
|
|
2881
|
+
*
|
|
2882
|
+
* @example Complex Layout
|
|
2883
|
+
* ```yaml
|
|
2884
|
+
* - path: "/dashboard"
|
|
2885
|
+
* title: "Dashboard"
|
|
2886
|
+
* blocks:
|
|
2887
|
+
* - type: content
|
|
2888
|
+
* content:
|
|
2889
|
+
* - h1: [{ str: "Dashboard" }]
|
|
2890
|
+
* - type: mixed
|
|
2891
|
+
* layout: row
|
|
2892
|
+
* blocks:
|
|
2893
|
+
* - type: map
|
|
2894
|
+
* id: map1
|
|
2895
|
+
* config: {...}
|
|
2896
|
+
* - type: map
|
|
2897
|
+
* id: map2
|
|
2898
|
+
* config: {...}
|
|
2899
|
+
* ```
|
|
2900
|
+
*/
|
|
2901
|
+
declare const PageSchema: z.ZodObject<{
|
|
2902
|
+
path: z.ZodString;
|
|
2903
|
+
title: z.ZodString;
|
|
2904
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2905
|
+
blocks: z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">;
|
|
2906
|
+
}, "strip", z.ZodTypeAny, {
|
|
2907
|
+
path: string;
|
|
2908
|
+
title: string;
|
|
2909
|
+
blocks: any[];
|
|
2910
|
+
description?: string | undefined;
|
|
2911
|
+
}, {
|
|
2912
|
+
path: string;
|
|
2913
|
+
title: string;
|
|
2914
|
+
blocks: any[];
|
|
2915
|
+
description?: string | undefined;
|
|
2916
|
+
}>;
|
|
2917
|
+
/**
|
|
2918
|
+
* Global configuration.
|
|
2919
|
+
*
|
|
2920
|
+
* @remarks
|
|
2921
|
+
* Global settings that apply across all pages.
|
|
2922
|
+
*
|
|
2923
|
+
* **General:**
|
|
2924
|
+
* - `title` - Application title
|
|
2925
|
+
* - `description` - Application description
|
|
2926
|
+
* - `defaultMapStyle` - Default map style for all maps
|
|
2927
|
+
* - `theme` - Default theme (light/dark)
|
|
2928
|
+
*
|
|
2929
|
+
* **Data Fetching:**
|
|
2930
|
+
* - `defaultStrategy` - Default fetch strategy (runtime, build, hybrid)
|
|
2931
|
+
* - `timeout` - Default fetch timeout
|
|
2932
|
+
* - `retryAttempts` - Default retry attempts
|
|
2933
|
+
*
|
|
2934
|
+
* @example Basic Config
|
|
2935
|
+
* ```yaml
|
|
2936
|
+
* config:
|
|
2937
|
+
* title: "My Map App"
|
|
2938
|
+
* description: "Interactive maps and stories"
|
|
2939
|
+
* defaultMapStyle: "https://demotiles.maplibre.org/style.json"
|
|
2940
|
+
* ```
|
|
2941
|
+
*
|
|
2942
|
+
* @example With Data Fetching
|
|
2943
|
+
* ```yaml
|
|
2944
|
+
* config:
|
|
2945
|
+
* title: "My Map App"
|
|
2946
|
+
* defaultMapStyle: "https://demotiles.maplibre.org/style.json"
|
|
2947
|
+
* theme: dark
|
|
2948
|
+
* dataFetching:
|
|
2949
|
+
* defaultStrategy: build
|
|
2950
|
+
* timeout: 15000
|
|
2951
|
+
* retryAttempts: 5
|
|
2952
|
+
* ```
|
|
2953
|
+
*/
|
|
2954
|
+
declare const GlobalConfigSchema: z.ZodObject<{
|
|
2955
|
+
title: z.ZodOptional<z.ZodString>;
|
|
2956
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2957
|
+
defaultMapStyle: z.ZodOptional<z.ZodString>;
|
|
2958
|
+
theme: z.ZodDefault<z.ZodEnum<["light", "dark"]>>;
|
|
2959
|
+
dataFetching: z.ZodOptional<z.ZodObject<{
|
|
2960
|
+
defaultStrategy: z.ZodDefault<z.ZodEnum<["runtime", "build", "hybrid"]>>;
|
|
2961
|
+
timeout: z.ZodDefault<z.ZodNumber>;
|
|
2962
|
+
retryAttempts: z.ZodDefault<z.ZodNumber>;
|
|
2963
|
+
}, "strip", z.ZodTypeAny, {
|
|
2964
|
+
defaultStrategy: "runtime" | "build" | "hybrid";
|
|
2965
|
+
timeout: number;
|
|
2966
|
+
retryAttempts: number;
|
|
2967
|
+
}, {
|
|
2968
|
+
defaultStrategy?: "runtime" | "build" | "hybrid" | undefined;
|
|
2969
|
+
timeout?: number | undefined;
|
|
2970
|
+
retryAttempts?: number | undefined;
|
|
2971
|
+
}>>;
|
|
2972
|
+
}, "strip", z.ZodTypeAny, {
|
|
2973
|
+
theme: "light" | "dark";
|
|
2974
|
+
title?: string | undefined;
|
|
2975
|
+
description?: string | undefined;
|
|
2976
|
+
defaultMapStyle?: string | undefined;
|
|
2977
|
+
dataFetching?: {
|
|
2978
|
+
defaultStrategy: "runtime" | "build" | "hybrid";
|
|
2979
|
+
timeout: number;
|
|
2980
|
+
retryAttempts: number;
|
|
2981
|
+
} | undefined;
|
|
2982
|
+
}, {
|
|
2983
|
+
title?: string | undefined;
|
|
2984
|
+
description?: string | undefined;
|
|
2985
|
+
theme?: "light" | "dark" | undefined;
|
|
2986
|
+
defaultMapStyle?: string | undefined;
|
|
2987
|
+
dataFetching?: {
|
|
2988
|
+
defaultStrategy?: "runtime" | "build" | "hybrid" | undefined;
|
|
2989
|
+
timeout?: number | undefined;
|
|
2990
|
+
retryAttempts?: number | undefined;
|
|
2991
|
+
} | undefined;
|
|
2992
|
+
}>;
|
|
2993
|
+
/**
|
|
2994
|
+
* Root configuration schema.
|
|
2995
|
+
*
|
|
2996
|
+
* @remarks
|
|
2997
|
+
* The root schema represents the entire maplibre-yaml configuration.
|
|
2998
|
+
* This is the top-level structure for YAML files.
|
|
2999
|
+
*
|
|
3000
|
+
* **Structure:**
|
|
3001
|
+
* 1. `config` - Global settings (optional)
|
|
3002
|
+
* 2. `layers` - Named layer definitions for reuse (optional)
|
|
3003
|
+
* 3. `sources` - Named source definitions for reuse (optional)
|
|
3004
|
+
* 4. `pages` - Page definitions (required, minimum 1)
|
|
3005
|
+
*
|
|
3006
|
+
* **Global Layers and Sources:**
|
|
3007
|
+
* Define layers and sources once, reference them anywhere using `$ref`.
|
|
3008
|
+
*
|
|
3009
|
+
* @example Minimal Configuration
|
|
3010
|
+
* ```yaml
|
|
3011
|
+
* pages:
|
|
3012
|
+
* - path: "/"
|
|
3013
|
+
* title: "Home"
|
|
3014
|
+
* blocks:
|
|
3015
|
+
* - type: map
|
|
3016
|
+
* id: main-map
|
|
3017
|
+
* config:
|
|
3018
|
+
* center: [0, 0]
|
|
3019
|
+
* zoom: 2
|
|
3020
|
+
* mapStyle: "https://demotiles.maplibre.org/style.json"
|
|
3021
|
+
* ```
|
|
3022
|
+
*
|
|
3023
|
+
* @example With Global Config
|
|
3024
|
+
* ```yaml
|
|
3025
|
+
* config:
|
|
3026
|
+
* title: "My App"
|
|
3027
|
+
* defaultMapStyle: "https://demotiles.maplibre.org/style.json"
|
|
3028
|
+
*
|
|
3029
|
+
* pages:
|
|
3030
|
+
* - path: "/"
|
|
3031
|
+
* title: "Home"
|
|
3032
|
+
* blocks:
|
|
3033
|
+
* - type: map
|
|
3034
|
+
* id: main-map
|
|
3035
|
+
* config:
|
|
3036
|
+
* center: [0, 0]
|
|
3037
|
+
* zoom: 2
|
|
3038
|
+
* ```
|
|
3039
|
+
*
|
|
3040
|
+
* @example With Global Layers
|
|
3041
|
+
* ```yaml
|
|
3042
|
+
* config:
|
|
3043
|
+
* defaultMapStyle: "https://demotiles.maplibre.org/style.json"
|
|
3044
|
+
*
|
|
3045
|
+
* layers:
|
|
3046
|
+
* bikeLayer:
|
|
3047
|
+
* id: bikes
|
|
3048
|
+
* type: line
|
|
3049
|
+
* source:
|
|
3050
|
+
* type: geojson
|
|
3051
|
+
* url: "https://example.com/bikes.geojson"
|
|
3052
|
+
* paint:
|
|
3053
|
+
* line-color: "#00ff00"
|
|
3054
|
+
* line-width: 2
|
|
3055
|
+
*
|
|
3056
|
+
* parkLayer:
|
|
3057
|
+
* id: parks
|
|
3058
|
+
* type: fill
|
|
3059
|
+
* source:
|
|
3060
|
+
* type: geojson
|
|
3061
|
+
* url: "https://example.com/parks.geojson"
|
|
3062
|
+
* paint:
|
|
3063
|
+
* fill-color: "#228B22"
|
|
3064
|
+
* fill-opacity: 0.5
|
|
3065
|
+
*
|
|
3066
|
+
* pages:
|
|
3067
|
+
* - path: "/"
|
|
3068
|
+
* title: "Home"
|
|
3069
|
+
* blocks:
|
|
3070
|
+
* - type: map
|
|
3071
|
+
* id: main-map
|
|
3072
|
+
* config:
|
|
3073
|
+
* center: [-74.006, 40.7128]
|
|
3074
|
+
* zoom: 12
|
|
3075
|
+
* layers:
|
|
3076
|
+
* - $ref: "#/layers/bikeLayer"
|
|
3077
|
+
* - $ref: "#/layers/parkLayer"
|
|
3078
|
+
* ```
|
|
3079
|
+
*
|
|
3080
|
+
* @example With Global Sources
|
|
3081
|
+
* ```yaml
|
|
3082
|
+
* sources:
|
|
3083
|
+
* earthquakeSource:
|
|
3084
|
+
* type: geojson
|
|
3085
|
+
* url: "https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_day.geojson"
|
|
3086
|
+
* refreshInterval: 60000
|
|
3087
|
+
*
|
|
3088
|
+
* layers:
|
|
3089
|
+
* earthquakes:
|
|
3090
|
+
* id: earthquakes
|
|
3091
|
+
* type: circle
|
|
3092
|
+
* source: earthquakeSource
|
|
3093
|
+
* paint:
|
|
3094
|
+
* circle-radius: 8
|
|
3095
|
+
* circle-color: "#ff0000"
|
|
3096
|
+
*
|
|
3097
|
+
* pages:
|
|
3098
|
+
* - path: "/"
|
|
3099
|
+
* title: "Earthquakes"
|
|
3100
|
+
* blocks:
|
|
3101
|
+
* - type: map
|
|
3102
|
+
* id: quake-map
|
|
3103
|
+
* config:
|
|
3104
|
+
* center: [0, 0]
|
|
3105
|
+
* zoom: 2
|
|
3106
|
+
* mapStyle: "..."
|
|
3107
|
+
* layers:
|
|
3108
|
+
* - $ref: "#/layers/earthquakes"
|
|
3109
|
+
* ```
|
|
3110
|
+
*
|
|
3111
|
+
* @example Multi-Page Application
|
|
3112
|
+
* ```yaml
|
|
3113
|
+
* config:
|
|
3114
|
+
* title: "Multi-Page Map App"
|
|
3115
|
+
* defaultMapStyle: "https://demotiles.maplibre.org/style.json"
|
|
3116
|
+
*
|
|
3117
|
+
* pages:
|
|
3118
|
+
* - path: "/"
|
|
3119
|
+
* title: "Home"
|
|
3120
|
+
* blocks:
|
|
3121
|
+
* - type: content
|
|
3122
|
+
* content:
|
|
3123
|
+
* - h1: [{ str: "Welcome" }]
|
|
3124
|
+
*
|
|
3125
|
+
* - path: "/map"
|
|
3126
|
+
* title: "Interactive Map"
|
|
3127
|
+
* blocks:
|
|
3128
|
+
* - type: map
|
|
3129
|
+
* id: main-map
|
|
3130
|
+
* config:
|
|
3131
|
+
* center: [0, 0]
|
|
3132
|
+
* zoom: 2
|
|
3133
|
+
*
|
|
3134
|
+
* - path: "/story"
|
|
3135
|
+
* title: "Our Story"
|
|
3136
|
+
* blocks:
|
|
3137
|
+
* - type: scrollytelling
|
|
3138
|
+
* id: story
|
|
3139
|
+
* config:
|
|
3140
|
+
* center: [0, 0]
|
|
3141
|
+
* zoom: 2
|
|
3142
|
+
* chapters:
|
|
3143
|
+
* - id: intro
|
|
3144
|
+
* title: "Introduction"
|
|
3145
|
+
* center: [0, 0]
|
|
3146
|
+
* zoom: 3
|
|
3147
|
+
* ```
|
|
3148
|
+
*/
|
|
3149
|
+
declare const RootSchema: z.ZodType<any>;
|
|
3150
|
+
|
|
3151
|
+
export { BlockSchema, ChapterActionSchema, ChapterLayersSchema, ChapterSchema, ColorOrExpressionSchema, ColorSchema, ContentBlockSchema, ContentElementSchema, ContentItemSchema, ExpressionSchema, GeoJSONSourceSchema, GlobalConfigSchema, ImageSourceSchema, LatitudeSchema, LayerSourceSchema, LngLatBoundsSchema, LngLatSchema, LoadingConfigSchema, LongitudeSchema, MixedBlockSchema, NumberOrExpressionSchema, PageSchema, RasterSourceSchema, RootSchema, ScrollytellingBlockSchema, StreamConfigSchema, ValidTagNames, VectorSourceSchema, VideoSourceSchema, ZoomLevelSchema };
|