@tileflow/static 0.1.0-alpha.3 → 0.1.0-alpha.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,290 @@
1
+ import { z } from 'zod';
2
+ import { S as StaticMapError } from './errors-CSz1xaDx.js';
3
+ import { a as StaticSceneInput, f as StaticScene } from './scene-contract-NFnIcQtt.js';
4
+ export { M as MAX_OVERLAY_LATITUDE, g as StaticAttributionMode, S as StaticAttributionPosition, h as StaticAttributionRequest, i as StaticCoordinate, j as StaticMapFormat, k as StaticOverlayPlacement, n as StaticPadding, o as StaticSymbolAnchor, q as StaticSymbolCollision, r as StaticSymbolLabelAppearance, t as StaticSymbolLabelPosition, u as StaticSymbolLanguage, v as isSupportedStaticSymbolCodePoint, w as staticAttributionPositionSchema, x as staticAttributionRequestSchema, y as staticOverlayPlacements, z as staticSceneLimits, A as staticSceneSchema, B as staticSceneSchemaVersion, C as staticSymbolAnchors, D as staticSymbolCollisions, E as staticSymbolLabelAppearances, F as staticSymbolLabelPositions, G as staticSymbolLanguages } from './scene-contract-NFnIcQtt.js';
5
+
6
+ declare const autoFitDetailsSchema: z.ZodObject<{
7
+ overlay: z.ZodOptional<z.ZodObject<{
8
+ id: z.ZodString;
9
+ index: z.ZodNumber;
10
+ type: z.ZodEnum<{
11
+ circle: "circle";
12
+ line: "line";
13
+ marker: "marker";
14
+ polygon: "polygon";
15
+ symbol: "symbol";
16
+ }>;
17
+ }, z.core.$strict>>;
18
+ padding: z.ZodOptional<z.ZodObject<{
19
+ bottom: z.ZodNumber;
20
+ left: z.ZodNumber;
21
+ right: z.ZodNumber;
22
+ top: z.ZodNumber;
23
+ }, z.core.$strict>>;
24
+ projection: z.ZodOptional<z.ZodEnum<{
25
+ globe: "globe";
26
+ mercator: "mercator";
27
+ }>>;
28
+ requiredInsets: z.ZodOptional<z.ZodObject<{
29
+ bottom: z.ZodNumber;
30
+ left: z.ZodNumber;
31
+ right: z.ZodNumber;
32
+ top: z.ZodNumber;
33
+ }, z.core.$strict>>;
34
+ ringIndex: z.ZodOptional<z.ZodNumber>;
35
+ segmentIndex: z.ZodOptional<z.ZodNumber>;
36
+ viewport: z.ZodOptional<z.ZodObject<{
37
+ height: z.ZodNumber;
38
+ width: z.ZodNumber;
39
+ }, z.core.$strict>>;
40
+ }, z.core.$strict>;
41
+ type StaticAutoFitDetails = z.infer<typeof autoFitDetailsSchema>;
42
+ declare const staticOverlayInvalidDetailsSchema: z.ZodObject<{
43
+ latitude: z.ZodNumber;
44
+ limit: z.ZodLiteral<85.051129>;
45
+ overlay: z.ZodObject<{
46
+ id: z.ZodString;
47
+ index: z.ZodNumber;
48
+ type: z.ZodEnum<{
49
+ circle: "circle";
50
+ line: "line";
51
+ marker: "marker";
52
+ polygon: "polygon";
53
+ symbol: "symbol";
54
+ }>;
55
+ }, z.core.$strict>;
56
+ }, z.core.$strict>;
57
+ declare const staticLabelUnsupportedDetailsSchema: z.ZodObject<{
58
+ codePoint: z.ZodNumber;
59
+ overlay: z.ZodObject<{
60
+ id: z.ZodString;
61
+ index: z.ZodNumber;
62
+ type: z.ZodLiteral<"symbol">;
63
+ }, z.core.$strict>;
64
+ }, z.core.$strict>;
65
+ declare const staticIconUnavailableDetailsSchema: z.ZodObject<{
66
+ icon: z.ZodString;
67
+ overlay: z.ZodObject<{
68
+ id: z.ZodString;
69
+ index: z.ZodNumber;
70
+ type: z.ZodLiteral<"symbol">;
71
+ }, z.core.$strict>;
72
+ }, z.core.$strict>;
73
+ declare const staticSymbolTooLargeDetailsSchema: z.ZodObject<{
74
+ height: z.ZodNumber;
75
+ limit: z.ZodLiteral<2048>;
76
+ overlay: z.ZodObject<{
77
+ id: z.ZodString;
78
+ index: z.ZodNumber;
79
+ type: z.ZodLiteral<"symbol">;
80
+ }, z.core.$strict>;
81
+ width: z.ZodNumber;
82
+ }, z.core.$strict>;
83
+ type StaticMapRequestErrorDetails = StaticAutoFitDetails | z.infer<typeof staticIconUnavailableDetailsSchema> | z.infer<typeof staticOverlayInvalidDetailsSchema> | z.infer<typeof staticLabelUnsupportedDetailsSchema> | z.infer<typeof staticSymbolTooLargeDetailsSchema>;
84
+ declare const staticMapRequestErrorResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
85
+ error: z.ZodString;
86
+ retryable: z.ZodLiteral<false>;
87
+ code: z.ZodLiteral<"AUTO_FIT_EMPTY">;
88
+ reason: z.ZodLiteral<"NO_FITTABLE_OVERLAYS">;
89
+ }, z.core.$strict>, z.ZodObject<{
90
+ error: z.ZodString;
91
+ retryable: z.ZodLiteral<false>;
92
+ code: z.ZodLiteral<"AUTO_FIT_AMBIGUOUS">;
93
+ details: z.ZodObject<{
94
+ overlay: z.ZodOptional<z.ZodObject<{
95
+ id: z.ZodString;
96
+ index: z.ZodNumber;
97
+ type: z.ZodEnum<{
98
+ circle: "circle";
99
+ line: "line";
100
+ marker: "marker";
101
+ polygon: "polygon";
102
+ symbol: "symbol";
103
+ }>;
104
+ }, z.core.$strict>>;
105
+ padding: z.ZodOptional<z.ZodObject<{
106
+ bottom: z.ZodNumber;
107
+ left: z.ZodNumber;
108
+ right: z.ZodNumber;
109
+ top: z.ZodNumber;
110
+ }, z.core.$strict>>;
111
+ projection: z.ZodOptional<z.ZodEnum<{
112
+ globe: "globe";
113
+ mercator: "mercator";
114
+ }>>;
115
+ requiredInsets: z.ZodOptional<z.ZodObject<{
116
+ bottom: z.ZodNumber;
117
+ left: z.ZodNumber;
118
+ right: z.ZodNumber;
119
+ top: z.ZodNumber;
120
+ }, z.core.$strict>>;
121
+ ringIndex: z.ZodOptional<z.ZodNumber>;
122
+ segmentIndex: z.ZodOptional<z.ZodNumber>;
123
+ viewport: z.ZodOptional<z.ZodObject<{
124
+ height: z.ZodNumber;
125
+ width: z.ZodNumber;
126
+ }, z.core.$strict>>;
127
+ }, z.core.$strict>;
128
+ reason: z.ZodLiteral<"ANTIMERIDIAN_WRAP_REQUIRED">;
129
+ }, z.core.$strict>, z.ZodObject<{
130
+ error: z.ZodString;
131
+ retryable: z.ZodLiteral<false>;
132
+ code: z.ZodLiteral<"AUTO_FIT_IMPOSSIBLE">;
133
+ details: z.ZodOptional<z.ZodObject<{
134
+ overlay: z.ZodOptional<z.ZodObject<{
135
+ id: z.ZodString;
136
+ index: z.ZodNumber;
137
+ type: z.ZodEnum<{
138
+ circle: "circle";
139
+ line: "line";
140
+ marker: "marker";
141
+ polygon: "polygon";
142
+ symbol: "symbol";
143
+ }>;
144
+ }, z.core.$strict>>;
145
+ padding: z.ZodOptional<z.ZodObject<{
146
+ bottom: z.ZodNumber;
147
+ left: z.ZodNumber;
148
+ right: z.ZodNumber;
149
+ top: z.ZodNumber;
150
+ }, z.core.$strict>>;
151
+ projection: z.ZodOptional<z.ZodEnum<{
152
+ globe: "globe";
153
+ mercator: "mercator";
154
+ }>>;
155
+ requiredInsets: z.ZodOptional<z.ZodObject<{
156
+ bottom: z.ZodNumber;
157
+ left: z.ZodNumber;
158
+ right: z.ZodNumber;
159
+ top: z.ZodNumber;
160
+ }, z.core.$strict>>;
161
+ ringIndex: z.ZodOptional<z.ZodNumber>;
162
+ segmentIndex: z.ZodOptional<z.ZodNumber>;
163
+ viewport: z.ZodOptional<z.ZodObject<{
164
+ height: z.ZodNumber;
165
+ width: z.ZodNumber;
166
+ }, z.core.$strict>>;
167
+ }, z.core.$strict>>;
168
+ reason: z.ZodEnum<{
169
+ CAMERA_UNRESOLVABLE: "CAMERA_UNRESOLVABLE";
170
+ GLOBE_NOT_SIMULTANEOUSLY_VISIBLE: "GLOBE_NOT_SIMULTANEOUSLY_VISIBLE";
171
+ INSUFFICIENT_VIEWPORT: "INSUFFICIENT_VIEWPORT";
172
+ PROJECTED_FOOTPRINT_OUTSIDE_VIEWPORT: "PROJECTED_FOOTPRINT_OUTSIDE_VIEWPORT";
173
+ }>;
174
+ }, z.core.$strict>, z.ZodObject<{
175
+ error: z.ZodString;
176
+ retryable: z.ZodLiteral<false>;
177
+ code: z.ZodLiteral<"STATIC_OVERLAY_INVALID">;
178
+ details: z.ZodObject<{
179
+ latitude: z.ZodNumber;
180
+ limit: z.ZodLiteral<85.051129>;
181
+ overlay: z.ZodObject<{
182
+ id: z.ZodString;
183
+ index: z.ZodNumber;
184
+ type: z.ZodEnum<{
185
+ circle: "circle";
186
+ line: "line";
187
+ marker: "marker";
188
+ polygon: "polygon";
189
+ symbol: "symbol";
190
+ }>;
191
+ }, z.core.$strict>;
192
+ }, z.core.$strict>;
193
+ reason: z.ZodLiteral<"OVERLAY_LATITUDE_OUT_OF_RANGE">;
194
+ }, z.core.$strict>, z.ZodObject<{
195
+ error: z.ZodString;
196
+ retryable: z.ZodLiteral<false>;
197
+ code: z.ZodLiteral<"STATIC_MAP_LABEL_UNSUPPORTED">;
198
+ details: z.ZodObject<{
199
+ codePoint: z.ZodNumber;
200
+ overlay: z.ZodObject<{
201
+ id: z.ZodString;
202
+ index: z.ZodNumber;
203
+ type: z.ZodLiteral<"symbol">;
204
+ }, z.core.$strict>;
205
+ }, z.core.$strict>;
206
+ reason: z.ZodLiteral<"UNSUPPORTED_GLYPH">;
207
+ }, z.core.$strict>, z.ZodObject<{
208
+ error: z.ZodString;
209
+ retryable: z.ZodLiteral<false>;
210
+ code: z.ZodLiteral<"STATIC_MAP_ICON_UNAVAILABLE">;
211
+ details: z.ZodObject<{
212
+ icon: z.ZodString;
213
+ overlay: z.ZodObject<{
214
+ id: z.ZodString;
215
+ index: z.ZodNumber;
216
+ type: z.ZodLiteral<"symbol">;
217
+ }, z.core.$strict>;
218
+ }, z.core.$strict>;
219
+ reason: z.ZodEnum<{
220
+ ICON_NOT_FOUND: "ICON_NOT_FOUND";
221
+ MANAGED_SPRITE_REQUIRED: "MANAGED_SPRITE_REQUIRED";
222
+ }>;
223
+ }, z.core.$strict>, z.ZodObject<{
224
+ error: z.ZodString;
225
+ retryable: z.ZodLiteral<false>;
226
+ code: z.ZodLiteral<"STATIC_MAP_PLACEMENT_UNAVAILABLE">;
227
+ reason: z.ZodLiteral<"MAP_REDEPLOY_REQUIRED">;
228
+ }, z.core.$strict>, z.ZodObject<{
229
+ error: z.ZodString;
230
+ retryable: z.ZodLiteral<false>;
231
+ code: z.ZodLiteral<"STATIC_MAP_SYMBOL_TOO_LARGE">;
232
+ details: z.ZodObject<{
233
+ height: z.ZodNumber;
234
+ limit: z.ZodLiteral<2048>;
235
+ overlay: z.ZodObject<{
236
+ id: z.ZodString;
237
+ index: z.ZodNumber;
238
+ type: z.ZodLiteral<"symbol">;
239
+ }, z.core.$strict>;
240
+ width: z.ZodNumber;
241
+ }, z.core.$strict>;
242
+ reason: z.ZodLiteral<"COMPOSED_IMAGE_TOO_LARGE">;
243
+ }, z.core.$strict>, z.ZodObject<{
244
+ error: z.ZodString;
245
+ retryable: z.ZodLiteral<false>;
246
+ code: z.ZodLiteral<"STATIC_MAP_ATTRIBUTION_UNSUPPORTED">;
247
+ reason: z.ZodEnum<{
248
+ UNSUPPORTED_DECLARATION: "UNSUPPORTED_DECLARATION";
249
+ UNSUPPORTED_GLYPH: "UNSUPPORTED_GLYPH";
250
+ }>;
251
+ }, z.core.$strict>, z.ZodObject<{
252
+ error: z.ZodString;
253
+ retryable: z.ZodLiteral<false>;
254
+ code: z.ZodLiteral<"STATIC_MAP_ATTRIBUTION_TOO_LARGE">;
255
+ reason: z.ZodLiteral<"CONTENT_LIMIT_EXCEEDED">;
256
+ }, z.core.$strict>, z.ZodObject<{
257
+ error: z.ZodString;
258
+ retryable: z.ZodLiteral<false>;
259
+ code: z.ZodLiteral<"STATIC_MAP_ATTRIBUTION_DOES_NOT_FIT">;
260
+ reason: z.ZodLiteral<"BLOCK_DOES_NOT_FIT">;
261
+ }, z.core.$strict>], "code">;
262
+ type StaticMapRequestErrorResponse = z.infer<typeof staticMapRequestErrorResponseSchema>;
263
+ type StaticAutoFitErrorResponse = Extract<StaticMapRequestErrorResponse, {
264
+ code: `AUTO_FIT_${string}`;
265
+ }>;
266
+ declare class StaticMapRequestError extends StaticMapError {
267
+ readonly code: StaticMapRequestErrorResponse['code'];
268
+ readonly details?: StaticMapRequestErrorDetails;
269
+ readonly reason: StaticMapRequestErrorResponse['reason'];
270
+ readonly retryable = false;
271
+ readonly status: number;
272
+ constructor(response: StaticMapRequestErrorResponse, status?: number);
273
+ }
274
+ type StaticAutoFitFailure = StaticAutoFitErrorResponse & {
275
+ ok: false;
276
+ };
277
+ type StaticMapRequestFailure = StaticMapRequestErrorResponse & {
278
+ ok: false;
279
+ };
280
+
281
+ declare function validateStaticScene(input: unknown): {
282
+ ok: true;
283
+ scene: StaticScene;
284
+ } | {
285
+ error: string;
286
+ ok: false;
287
+ } | StaticMapRequestFailure;
288
+ declare function normalizeStaticScene(scene: StaticSceneInput): StaticScene;
289
+
290
+ export { type StaticAutoFitErrorResponse, type StaticAutoFitFailure, StaticMapRequestError, type StaticMapRequestErrorResponse, type StaticMapRequestFailure, StaticScene, StaticSceneInput, normalizeStaticScene, staticMapRequestErrorResponseSchema, validateStaticScene };
package/dist/scene.js ADDED
@@ -0,0 +1,40 @@
1
+ import {
2
+ StaticMapRequestError,
3
+ normalizeStaticScene,
4
+ staticMapRequestErrorResponseSchema,
5
+ validateStaticScene
6
+ } from "./chunk-ALFVZ3PC.js";
7
+ import {
8
+ MAX_OVERLAY_LATITUDE,
9
+ isSupportedStaticSymbolCodePoint,
10
+ staticAttributionPositionSchema,
11
+ staticAttributionRequestSchema,
12
+ staticOverlayPlacements,
13
+ staticSceneLimits,
14
+ staticSceneSchema,
15
+ staticSceneSchemaVersion,
16
+ staticSymbolAnchors,
17
+ staticSymbolCollisions,
18
+ staticSymbolLabelAppearances,
19
+ staticSymbolLabelPositions,
20
+ staticSymbolLanguages
21
+ } from "./chunk-6DWVCK64.js";
22
+ export {
23
+ MAX_OVERLAY_LATITUDE,
24
+ StaticMapRequestError,
25
+ isSupportedStaticSymbolCodePoint,
26
+ normalizeStaticScene,
27
+ staticAttributionPositionSchema,
28
+ staticAttributionRequestSchema,
29
+ staticMapRequestErrorResponseSchema,
30
+ staticOverlayPlacements,
31
+ staticSceneLimits,
32
+ staticSceneSchema,
33
+ staticSceneSchemaVersion,
34
+ staticSymbolAnchors,
35
+ staticSymbolCollisions,
36
+ staticSymbolLabelAppearances,
37
+ staticSymbolLabelPositions,
38
+ staticSymbolLanguages,
39
+ validateStaticScene
40
+ };
package/package.json CHANGED
@@ -1,16 +1,18 @@
1
1
  {
2
2
  "name": "@tileflow/static",
3
- "version": "0.1.0-alpha.3",
3
+ "version": "0.1.0-alpha.30",
4
+ "license": "Apache-2.0",
4
5
  "description": "Static map request schemas and helpers for Tileflow.",
5
6
  "type": "module",
7
+ "sideEffects": false,
6
8
  "homepage": "https://tileflow.dev",
7
9
  "repository": {
8
10
  "type": "git",
9
- "url": "git+https://github.com/tileflow/tileflow.git",
11
+ "url": "git+https://github.com/tileflow/tileflow-sdk.git",
10
12
  "directory": "packages/static"
11
13
  },
12
14
  "bugs": {
13
- "url": "https://github.com/tileflow/tileflow/issues"
15
+ "url": "https://github.com/tileflow/tileflow-sdk/issues"
14
16
  },
15
17
  "keywords": [
16
18
  "tileflow",
@@ -19,26 +21,41 @@
19
21
  "maplibre",
20
22
  "tiles"
21
23
  ],
22
- "main": "./dist/index.js",
23
- "types": "./dist/index.d.ts",
24
24
  "files": [
25
- "dist"
25
+ "dist",
26
+ "LICENSE"
26
27
  ],
27
28
  "exports": {
28
- ".": {
29
- "types": "./dist/index.d.ts",
30
- "import": "./dist/index.js",
31
- "default": "./dist/index.js"
29
+ "./client": {
30
+ "types": "./dist/client.d.ts",
31
+ "import": "./dist/client.js",
32
+ "default": "./dist/client.js"
33
+ },
34
+ "./manifest": {
35
+ "types": "./dist/manifest.d.ts",
36
+ "import": "./dist/manifest.js",
37
+ "default": "./dist/manifest.js"
38
+ },
39
+ "./overlays": {
40
+ "types": "./dist/overlays.d.ts",
41
+ "import": "./dist/overlays.js",
42
+ "default": "./dist/overlays.js"
43
+ },
44
+ "./scene": {
45
+ "types": "./dist/scene.d.ts",
46
+ "import": "./dist/scene.js",
47
+ "default": "./dist/scene.js"
32
48
  }
33
49
  },
34
50
  "publishConfig": {
35
51
  "access": "public"
36
52
  },
37
53
  "dependencies": {
38
- "zod": "^4.4.3"
54
+ "zod": "^4.6.7"
39
55
  },
40
56
  "scripts": {
41
- "build": "tsup src/index.ts --format esm --dts --clean",
57
+ "build": "tsup src/scene.ts src/overlays.ts src/manifest.ts src/client.ts --format esm --dts --clean --splitting && node ../../scripts/canonicalize-zod-enums.mjs dist",
58
+ "verify": "pnpm --silent --dir ../.. static-text:check && tsx --test test/*.test.ts",
42
59
  "typecheck": "tsc -p tsconfig.json --noEmit",
43
60
  "lint": "tsc -p tsconfig.json --noEmit"
44
61
  }
package/dist/index.d.ts DELETED
@@ -1,248 +0,0 @@
1
- import { z } from 'zod';
2
-
3
- declare const staticSceneSchemaVersion = 1;
4
- declare const staticRendererSchemaVersion = 1;
5
- declare const staticSceneLimits: {
6
- readonly maxDimension: 1280;
7
- readonly maxGeoJsonBytes: 96000;
8
- readonly maxOverlays: 24;
9
- readonly maxPathCoordinates: 2000;
10
- readonly maxPhysicalPixels: number;
11
- readonly minDimension: 64;
12
- };
13
- declare const coordinateSchema: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
14
- declare const lineOverlaySchema: z.ZodObject<{
15
- color: z.ZodDefault<z.ZodString>;
16
- coordinates: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
17
- id: z.ZodOptional<z.ZodString>;
18
- opacity: z.ZodDefault<z.ZodNumber>;
19
- type: z.ZodLiteral<"line">;
20
- width: z.ZodDefault<z.ZodNumber>;
21
- }, z.core.$strip>;
22
- declare const circleOverlaySchema: z.ZodObject<{
23
- color: z.ZodDefault<z.ZodString>;
24
- coordinate: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
25
- id: z.ZodOptional<z.ZodString>;
26
- opacity: z.ZodDefault<z.ZodNumber>;
27
- radius: z.ZodDefault<z.ZodNumber>;
28
- strokeColor: z.ZodOptional<z.ZodString>;
29
- strokeWidth: z.ZodDefault<z.ZodNumber>;
30
- type: z.ZodLiteral<"circle">;
31
- }, z.core.$strip>;
32
- declare const markerOverlaySchema: z.ZodObject<{
33
- color: z.ZodDefault<z.ZodString>;
34
- coordinate: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
35
- id: z.ZodOptional<z.ZodString>;
36
- radius: z.ZodDefault<z.ZodNumber>;
37
- strokeColor: z.ZodDefault<z.ZodString>;
38
- strokeWidth: z.ZodDefault<z.ZodNumber>;
39
- type: z.ZodLiteral<"marker">;
40
- }, z.core.$strip>;
41
- declare const polygonOverlaySchema: z.ZodObject<{
42
- coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
43
- fill: z.ZodDefault<z.ZodString>;
44
- id: z.ZodOptional<z.ZodString>;
45
- opacity: z.ZodDefault<z.ZodNumber>;
46
- stroke: z.ZodOptional<z.ZodString>;
47
- strokeWidth: z.ZodDefault<z.ZodNumber>;
48
- type: z.ZodLiteral<"polygon">;
49
- }, z.core.$strip>;
50
- declare const staticOverlaySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
51
- color: z.ZodDefault<z.ZodString>;
52
- coordinates: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
53
- id: z.ZodOptional<z.ZodString>;
54
- opacity: z.ZodDefault<z.ZodNumber>;
55
- type: z.ZodLiteral<"line">;
56
- width: z.ZodDefault<z.ZodNumber>;
57
- }, z.core.$strip>, z.ZodObject<{
58
- color: z.ZodDefault<z.ZodString>;
59
- coordinate: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
60
- id: z.ZodOptional<z.ZodString>;
61
- opacity: z.ZodDefault<z.ZodNumber>;
62
- radius: z.ZodDefault<z.ZodNumber>;
63
- strokeColor: z.ZodOptional<z.ZodString>;
64
- strokeWidth: z.ZodDefault<z.ZodNumber>;
65
- type: z.ZodLiteral<"circle">;
66
- }, z.core.$strip>, z.ZodObject<{
67
- color: z.ZodDefault<z.ZodString>;
68
- coordinate: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
69
- id: z.ZodOptional<z.ZodString>;
70
- radius: z.ZodDefault<z.ZodNumber>;
71
- strokeColor: z.ZodDefault<z.ZodString>;
72
- strokeWidth: z.ZodDefault<z.ZodNumber>;
73
- type: z.ZodLiteral<"marker">;
74
- }, z.core.$strip>, z.ZodObject<{
75
- coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
76
- fill: z.ZodDefault<z.ZodString>;
77
- id: z.ZodOptional<z.ZodString>;
78
- opacity: z.ZodDefault<z.ZodNumber>;
79
- stroke: z.ZodOptional<z.ZodString>;
80
- strokeWidth: z.ZodDefault<z.ZodNumber>;
81
- type: z.ZodLiteral<"polygon">;
82
- }, z.core.$strip>], "type">;
83
- declare const staticSceneSchema: z.ZodObject<{
84
- camera: z.ZodDiscriminatedUnion<[z.ZodObject<{
85
- bearing: z.ZodOptional<z.ZodNumber>;
86
- center: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
87
- type: z.ZodLiteral<"center">;
88
- zoom: z.ZodNumber;
89
- }, z.core.$strip>, z.ZodObject<{
90
- bearing: z.ZodOptional<z.ZodNumber>;
91
- bounds: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
92
- padding: z.ZodOptional<z.ZodNumber>;
93
- type: z.ZodLiteral<"bounds">;
94
- }, z.core.$strip>], "type">;
95
- map: z.ZodString;
96
- overlays: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
97
- color: z.ZodDefault<z.ZodString>;
98
- coordinates: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
99
- id: z.ZodOptional<z.ZodString>;
100
- opacity: z.ZodDefault<z.ZodNumber>;
101
- type: z.ZodLiteral<"line">;
102
- width: z.ZodDefault<z.ZodNumber>;
103
- }, z.core.$strip>, z.ZodObject<{
104
- color: z.ZodDefault<z.ZodString>;
105
- coordinate: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
106
- id: z.ZodOptional<z.ZodString>;
107
- opacity: z.ZodDefault<z.ZodNumber>;
108
- radius: z.ZodDefault<z.ZodNumber>;
109
- strokeColor: z.ZodOptional<z.ZodString>;
110
- strokeWidth: z.ZodDefault<z.ZodNumber>;
111
- type: z.ZodLiteral<"circle">;
112
- }, z.core.$strip>, z.ZodObject<{
113
- color: z.ZodDefault<z.ZodString>;
114
- coordinate: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
115
- id: z.ZodOptional<z.ZodString>;
116
- radius: z.ZodDefault<z.ZodNumber>;
117
- strokeColor: z.ZodDefault<z.ZodString>;
118
- strokeWidth: z.ZodDefault<z.ZodNumber>;
119
- type: z.ZodLiteral<"marker">;
120
- }, z.core.$strip>, z.ZodObject<{
121
- coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
122
- fill: z.ZodDefault<z.ZodString>;
123
- id: z.ZodOptional<z.ZodString>;
124
- opacity: z.ZodDefault<z.ZodNumber>;
125
- stroke: z.ZodOptional<z.ZodString>;
126
- strokeWidth: z.ZodDefault<z.ZodNumber>;
127
- type: z.ZodLiteral<"polygon">;
128
- }, z.core.$strip>], "type">>>;
129
- size: z.ZodObject<{
130
- dpr: z.ZodOptional<z.ZodLiteral<1>>;
131
- height: z.ZodNumber;
132
- width: z.ZodNumber;
133
- }, z.core.$strip>;
134
- }, z.core.$strip>;
135
- declare const staticRenderManifestSchema: z.ZodObject<{
136
- mapId: z.ZodString;
137
- rendererVersion: z.ZodString;
138
- schemaVersion: z.ZodLiteral<1>;
139
- scene: z.ZodObject<{
140
- camera: z.ZodDiscriminatedUnion<[z.ZodObject<{
141
- bearing: z.ZodOptional<z.ZodNumber>;
142
- center: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
143
- type: z.ZodLiteral<"center">;
144
- zoom: z.ZodNumber;
145
- }, z.core.$strip>, z.ZodObject<{
146
- bearing: z.ZodOptional<z.ZodNumber>;
147
- bounds: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
148
- padding: z.ZodOptional<z.ZodNumber>;
149
- type: z.ZodLiteral<"bounds">;
150
- }, z.core.$strip>], "type">;
151
- map: z.ZodString;
152
- overlays: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
153
- color: z.ZodDefault<z.ZodString>;
154
- coordinates: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
155
- id: z.ZodOptional<z.ZodString>;
156
- opacity: z.ZodDefault<z.ZodNumber>;
157
- type: z.ZodLiteral<"line">;
158
- width: z.ZodDefault<z.ZodNumber>;
159
- }, z.core.$strip>, z.ZodObject<{
160
- color: z.ZodDefault<z.ZodString>;
161
- coordinate: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
162
- id: z.ZodOptional<z.ZodString>;
163
- opacity: z.ZodDefault<z.ZodNumber>;
164
- radius: z.ZodDefault<z.ZodNumber>;
165
- strokeColor: z.ZodOptional<z.ZodString>;
166
- strokeWidth: z.ZodDefault<z.ZodNumber>;
167
- type: z.ZodLiteral<"circle">;
168
- }, z.core.$strip>, z.ZodObject<{
169
- color: z.ZodDefault<z.ZodString>;
170
- coordinate: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
171
- id: z.ZodOptional<z.ZodString>;
172
- radius: z.ZodDefault<z.ZodNumber>;
173
- strokeColor: z.ZodDefault<z.ZodString>;
174
- strokeWidth: z.ZodDefault<z.ZodNumber>;
175
- type: z.ZodLiteral<"marker">;
176
- }, z.core.$strip>, z.ZodObject<{
177
- coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
178
- fill: z.ZodDefault<z.ZodString>;
179
- id: z.ZodOptional<z.ZodString>;
180
- opacity: z.ZodDefault<z.ZodNumber>;
181
- stroke: z.ZodOptional<z.ZodString>;
182
- strokeWidth: z.ZodDefault<z.ZodNumber>;
183
- type: z.ZodLiteral<"polygon">;
184
- }, z.core.$strip>], "type">>>;
185
- size: z.ZodObject<{
186
- dpr: z.ZodOptional<z.ZodLiteral<1>>;
187
- height: z.ZodNumber;
188
- width: z.ZodNumber;
189
- }, z.core.$strip>;
190
- }, z.core.$strip>;
191
- styleId: z.ZodOptional<z.ZodString>;
192
- styleRevision: z.ZodString;
193
- styleUrl: z.ZodString;
194
- }, z.core.$strip>;
195
- type StaticCoordinate = z.infer<typeof coordinateSchema>;
196
- type StaticSceneInput = z.input<typeof staticSceneSchema>;
197
- type StaticScene = z.infer<typeof staticSceneSchema>;
198
- type StaticOverlayInput = z.input<typeof staticOverlaySchema>;
199
- type StaticOverlay = z.infer<typeof staticOverlaySchema>;
200
- type StaticRenderManifest = z.infer<typeof staticRenderManifestSchema>;
201
- type StaticMapResult = {
202
- cached: boolean;
203
- hash: string;
204
- imageUrl: string;
205
- status: 'ready';
206
- };
207
- type StaticMapCreateOptions = {
208
- apiKey?: string;
209
- apiUrl?: string;
210
- fetch?: typeof fetch;
211
- };
212
- declare function line(input: Omit<z.input<typeof lineOverlaySchema>, 'type'>): StaticOverlay;
213
- declare function circle(input: Omit<z.input<typeof circleOverlaySchema>, 'type'>): StaticOverlay;
214
- declare function marker(input: Omit<z.input<typeof markerOverlaySchema>, 'type'>): StaticOverlay;
215
- declare function polygon(input: Omit<z.input<typeof polygonOverlaySchema>, 'type'>): StaticOverlay;
216
- declare function validateStaticScene(input: unknown): {
217
- ok: true;
218
- scene: StaticScene;
219
- } | {
220
- error: string;
221
- ok: false;
222
- };
223
- declare function validateStaticRenderManifest(input: unknown): {
224
- manifest: StaticRenderManifest;
225
- ok: true;
226
- } | {
227
- error: string;
228
- ok: false;
229
- };
230
- declare function normalizeStaticScene(scene: StaticSceneInput): StaticScene;
231
- declare function createRenderManifest(input: {
232
- mapId: string;
233
- rendererVersion: string;
234
- scene: StaticSceneInput;
235
- styleId?: string;
236
- styleRevision: string;
237
- styleUrl: string;
238
- }): StaticRenderManifest;
239
- declare function hashRenderManifest(manifest: StaticRenderManifest): Promise<string>;
240
- declare function compileStaticOverlays(overlays: StaticOverlay[]): {
241
- layers: Record<string, unknown>[];
242
- sources: Record<string, Record<string, unknown>>;
243
- };
244
- declare function createStaticMap(scene: StaticSceneInput, options?: StaticMapCreateOptions): Promise<StaticMapResult>;
245
- declare function precacheStaticMap(scene: StaticSceneInput, options?: StaticMapCreateOptions): Promise<StaticMapResult>;
246
- declare function stableStringify(value: unknown): string;
247
-
248
- export { type StaticCoordinate, type StaticMapCreateOptions, type StaticMapResult, type StaticOverlay, type StaticOverlayInput, type StaticRenderManifest, type StaticScene, type StaticSceneInput, circle, compileStaticOverlays, createRenderManifest, createStaticMap, hashRenderManifest, line, marker, normalizeStaticScene, polygon, precacheStaticMap, stableStringify, staticOverlaySchema, staticRenderManifestSchema, staticRendererSchemaVersion, staticSceneLimits, staticSceneSchema, staticSceneSchemaVersion, validateStaticRenderManifest, validateStaticScene };