@tileflow/static 0.1.0-alpha.2 → 0.1.0-alpha.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/GENERATED_OUTPUT_LICENSE.md +21 -0
- package/LICENSE +201 -0
- package/NOTICE +9 -0
- package/README.md +94 -2
- package/TRADEMARKS.md +10 -0
- package/dist/chunk-A23RC4BE.js +328 -0
- package/dist/chunk-KPT7PASB.js +122 -0
- package/dist/chunk-MGQCHCU3.js +228 -0
- package/dist/chunk-NHQK5UZ2.js +455 -0
- package/dist/chunk-S3WXE5P4.js +99 -0
- package/dist/client.d.ts +58 -0
- package/dist/client.js +25 -0
- package/dist/index.d.ts +6 -248
- package/dist/index.js +49 -375
- package/dist/manifest.d.ts +111 -0
- package/dist/manifest.js +18 -0
- package/dist/overlays.d.ts +16 -0
- package/dist/overlays.js +18 -0
- package/dist/scene-contract-DZMhLDnf.d.ts +159 -0
- package/dist/scene.d.ts +191 -0
- package/dist/scene.js +22 -0
- package/package.json +32 -5
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
declare const staticSceneSchemaVersion = 1;
|
|
4
|
+
declare const MAX_OVERLAY_LATITUDE = 85.051129;
|
|
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 staticPaddingSchema: z.ZodObject<{
|
|
15
|
+
bottom: z.ZodNumber;
|
|
16
|
+
left: z.ZodNumber;
|
|
17
|
+
right: z.ZodNumber;
|
|
18
|
+
top: z.ZodNumber;
|
|
19
|
+
}, z.core.$strict>;
|
|
20
|
+
declare const lineOverlaySchema: z.ZodObject<{
|
|
21
|
+
color: z.ZodDefault<z.ZodString>;
|
|
22
|
+
coordinates: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
|
|
23
|
+
id: z.ZodOptional<z.ZodString>;
|
|
24
|
+
opacity: z.ZodDefault<z.ZodNumber>;
|
|
25
|
+
type: z.ZodLiteral<"line">;
|
|
26
|
+
width: z.ZodDefault<z.ZodNumber>;
|
|
27
|
+
}, z.core.$strip>;
|
|
28
|
+
declare const circleOverlaySchema: z.ZodObject<{
|
|
29
|
+
color: z.ZodDefault<z.ZodString>;
|
|
30
|
+
coordinate: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
31
|
+
id: z.ZodOptional<z.ZodString>;
|
|
32
|
+
opacity: z.ZodDefault<z.ZodNumber>;
|
|
33
|
+
radius: z.ZodDefault<z.ZodNumber>;
|
|
34
|
+
strokeColor: z.ZodOptional<z.ZodString>;
|
|
35
|
+
strokeWidth: z.ZodDefault<z.ZodNumber>;
|
|
36
|
+
type: z.ZodLiteral<"circle">;
|
|
37
|
+
}, z.core.$strip>;
|
|
38
|
+
declare const markerOverlaySchema: z.ZodObject<{
|
|
39
|
+
color: z.ZodDefault<z.ZodString>;
|
|
40
|
+
coordinate: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
41
|
+
id: z.ZodOptional<z.ZodString>;
|
|
42
|
+
radius: z.ZodDefault<z.ZodNumber>;
|
|
43
|
+
strokeColor: z.ZodDefault<z.ZodString>;
|
|
44
|
+
strokeWidth: z.ZodDefault<z.ZodNumber>;
|
|
45
|
+
type: z.ZodLiteral<"marker">;
|
|
46
|
+
}, z.core.$strip>;
|
|
47
|
+
declare const polygonOverlaySchema: z.ZodObject<{
|
|
48
|
+
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
49
|
+
fill: z.ZodDefault<z.ZodString>;
|
|
50
|
+
id: z.ZodOptional<z.ZodString>;
|
|
51
|
+
opacity: z.ZodDefault<z.ZodNumber>;
|
|
52
|
+
stroke: z.ZodOptional<z.ZodString>;
|
|
53
|
+
strokeWidth: z.ZodDefault<z.ZodNumber>;
|
|
54
|
+
type: z.ZodLiteral<"polygon">;
|
|
55
|
+
}, z.core.$strip>;
|
|
56
|
+
declare const staticOverlaySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
57
|
+
color: z.ZodDefault<z.ZodString>;
|
|
58
|
+
coordinates: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
|
|
59
|
+
id: z.ZodOptional<z.ZodString>;
|
|
60
|
+
opacity: z.ZodDefault<z.ZodNumber>;
|
|
61
|
+
type: z.ZodLiteral<"line">;
|
|
62
|
+
width: z.ZodDefault<z.ZodNumber>;
|
|
63
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
64
|
+
color: z.ZodDefault<z.ZodString>;
|
|
65
|
+
coordinate: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
66
|
+
id: z.ZodOptional<z.ZodString>;
|
|
67
|
+
opacity: z.ZodDefault<z.ZodNumber>;
|
|
68
|
+
radius: z.ZodDefault<z.ZodNumber>;
|
|
69
|
+
strokeColor: z.ZodOptional<z.ZodString>;
|
|
70
|
+
strokeWidth: z.ZodDefault<z.ZodNumber>;
|
|
71
|
+
type: z.ZodLiteral<"circle">;
|
|
72
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
73
|
+
color: z.ZodDefault<z.ZodString>;
|
|
74
|
+
coordinate: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
75
|
+
id: z.ZodOptional<z.ZodString>;
|
|
76
|
+
radius: z.ZodDefault<z.ZodNumber>;
|
|
77
|
+
strokeColor: z.ZodDefault<z.ZodString>;
|
|
78
|
+
strokeWidth: z.ZodDefault<z.ZodNumber>;
|
|
79
|
+
type: z.ZodLiteral<"marker">;
|
|
80
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
81
|
+
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
82
|
+
fill: z.ZodDefault<z.ZodString>;
|
|
83
|
+
id: z.ZodOptional<z.ZodString>;
|
|
84
|
+
opacity: z.ZodDefault<z.ZodNumber>;
|
|
85
|
+
stroke: z.ZodOptional<z.ZodString>;
|
|
86
|
+
strokeWidth: z.ZodDefault<z.ZodNumber>;
|
|
87
|
+
type: z.ZodLiteral<"polygon">;
|
|
88
|
+
}, z.core.$strip>], "type">;
|
|
89
|
+
declare const staticSceneSchema: z.ZodObject<{
|
|
90
|
+
camera: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
91
|
+
bearing: z.ZodOptional<z.ZodNumber>;
|
|
92
|
+
center: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
93
|
+
type: z.ZodLiteral<"center">;
|
|
94
|
+
zoom: z.ZodNumber;
|
|
95
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
96
|
+
bearing: z.ZodOptional<z.ZodNumber>;
|
|
97
|
+
bounds: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
98
|
+
padding: z.ZodOptional<z.ZodNumber>;
|
|
99
|
+
type: z.ZodLiteral<"bounds">;
|
|
100
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
101
|
+
bearing: z.ZodOptional<z.ZodNumber>;
|
|
102
|
+
maxZoom: z.ZodOptional<z.ZodNumber>;
|
|
103
|
+
padding: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
|
|
104
|
+
bottom: z.ZodOptional<z.ZodNumber>;
|
|
105
|
+
left: z.ZodOptional<z.ZodNumber>;
|
|
106
|
+
right: z.ZodOptional<z.ZodNumber>;
|
|
107
|
+
top: z.ZodOptional<z.ZodNumber>;
|
|
108
|
+
}, z.core.$strict>]>>;
|
|
109
|
+
type: z.ZodLiteral<"auto">;
|
|
110
|
+
}, z.core.$strip>], "type">;
|
|
111
|
+
map: z.ZodString;
|
|
112
|
+
overlays: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
113
|
+
color: z.ZodDefault<z.ZodString>;
|
|
114
|
+
coordinates: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
|
|
115
|
+
id: z.ZodOptional<z.ZodString>;
|
|
116
|
+
opacity: z.ZodDefault<z.ZodNumber>;
|
|
117
|
+
type: z.ZodLiteral<"line">;
|
|
118
|
+
width: z.ZodDefault<z.ZodNumber>;
|
|
119
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
120
|
+
color: z.ZodDefault<z.ZodString>;
|
|
121
|
+
coordinate: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
122
|
+
id: z.ZodOptional<z.ZodString>;
|
|
123
|
+
opacity: z.ZodDefault<z.ZodNumber>;
|
|
124
|
+
radius: z.ZodDefault<z.ZodNumber>;
|
|
125
|
+
strokeColor: z.ZodOptional<z.ZodString>;
|
|
126
|
+
strokeWidth: z.ZodDefault<z.ZodNumber>;
|
|
127
|
+
type: z.ZodLiteral<"circle">;
|
|
128
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
129
|
+
color: z.ZodDefault<z.ZodString>;
|
|
130
|
+
coordinate: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
131
|
+
id: z.ZodOptional<z.ZodString>;
|
|
132
|
+
radius: z.ZodDefault<z.ZodNumber>;
|
|
133
|
+
strokeColor: z.ZodDefault<z.ZodString>;
|
|
134
|
+
strokeWidth: z.ZodDefault<z.ZodNumber>;
|
|
135
|
+
type: z.ZodLiteral<"marker">;
|
|
136
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
137
|
+
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
138
|
+
fill: z.ZodDefault<z.ZodString>;
|
|
139
|
+
id: z.ZodOptional<z.ZodString>;
|
|
140
|
+
opacity: z.ZodDefault<z.ZodNumber>;
|
|
141
|
+
stroke: z.ZodOptional<z.ZodString>;
|
|
142
|
+
strokeWidth: z.ZodDefault<z.ZodNumber>;
|
|
143
|
+
type: z.ZodLiteral<"polygon">;
|
|
144
|
+
}, z.core.$strip>], "type">>>;
|
|
145
|
+
size: z.ZodObject<{
|
|
146
|
+
dpr: z.ZodOptional<z.ZodLiteral<1>>;
|
|
147
|
+
height: z.ZodNumber;
|
|
148
|
+
width: z.ZodNumber;
|
|
149
|
+
}, z.core.$strip>;
|
|
150
|
+
theme: z.ZodString;
|
|
151
|
+
}, z.core.$strip>;
|
|
152
|
+
type StaticCoordinate = z.infer<typeof coordinateSchema>;
|
|
153
|
+
type StaticPadding = z.infer<typeof staticPaddingSchema>;
|
|
154
|
+
type StaticSceneInput = z.input<typeof staticSceneSchema>;
|
|
155
|
+
type StaticScene = z.infer<typeof staticSceneSchema>;
|
|
156
|
+
type StaticOverlayInput = z.input<typeof staticOverlaySchema>;
|
|
157
|
+
type StaticOverlay = z.infer<typeof staticOverlaySchema>;
|
|
158
|
+
|
|
159
|
+
export { MAX_OVERLAY_LATITUDE as M, type StaticCoordinate as S, type StaticOverlay as a, type StaticOverlayInput as b, type StaticPadding as c, type StaticScene as d, type StaticSceneInput as e, staticSceneLimits as f, staticSceneSchema as g, staticSceneSchemaVersion as h, circleOverlaySchema as i, lineOverlaySchema as l, markerOverlaySchema as m, polygonOverlaySchema as p, staticOverlaySchema as s };
|
package/dist/scene.d.ts
ADDED
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { e as StaticSceneInput, d as StaticScene } from './scene-contract-DZMhLDnf.js';
|
|
3
|
+
export { M as MAX_OVERLAY_LATITUDE, S as StaticCoordinate, c as StaticPadding, f as staticSceneLimits, g as staticSceneSchema, h as staticSceneSchemaVersion } from './scene-contract-DZMhLDnf.js';
|
|
4
|
+
|
|
5
|
+
declare const autoFitDetailsSchema: z.ZodObject<{
|
|
6
|
+
overlay: z.ZodOptional<z.ZodObject<{
|
|
7
|
+
id: z.ZodString;
|
|
8
|
+
index: z.ZodNumber;
|
|
9
|
+
type: z.ZodEnum<{
|
|
10
|
+
line: "line";
|
|
11
|
+
circle: "circle";
|
|
12
|
+
marker: "marker";
|
|
13
|
+
polygon: "polygon";
|
|
14
|
+
}>;
|
|
15
|
+
}, z.core.$strict>>;
|
|
16
|
+
padding: z.ZodOptional<z.ZodObject<{
|
|
17
|
+
bottom: z.ZodNumber;
|
|
18
|
+
left: z.ZodNumber;
|
|
19
|
+
right: z.ZodNumber;
|
|
20
|
+
top: z.ZodNumber;
|
|
21
|
+
}, z.core.$strict>>;
|
|
22
|
+
projection: z.ZodOptional<z.ZodEnum<{
|
|
23
|
+
globe: "globe";
|
|
24
|
+
mercator: "mercator";
|
|
25
|
+
}>>;
|
|
26
|
+
requiredInsets: z.ZodOptional<z.ZodObject<{
|
|
27
|
+
bottom: z.ZodNumber;
|
|
28
|
+
left: z.ZodNumber;
|
|
29
|
+
right: z.ZodNumber;
|
|
30
|
+
top: z.ZodNumber;
|
|
31
|
+
}, z.core.$strict>>;
|
|
32
|
+
ringIndex: z.ZodOptional<z.ZodNumber>;
|
|
33
|
+
segmentIndex: z.ZodOptional<z.ZodNumber>;
|
|
34
|
+
viewport: z.ZodOptional<z.ZodObject<{
|
|
35
|
+
height: z.ZodNumber;
|
|
36
|
+
width: z.ZodNumber;
|
|
37
|
+
}, z.core.$strict>>;
|
|
38
|
+
}, z.core.$strict>;
|
|
39
|
+
type StaticAutoFitDetails = z.infer<typeof autoFitDetailsSchema>;
|
|
40
|
+
declare const staticOverlayInvalidDetailsSchema: z.ZodObject<{
|
|
41
|
+
latitude: z.ZodNumber;
|
|
42
|
+
limit: z.ZodLiteral<85.051129>;
|
|
43
|
+
overlay: z.ZodObject<{
|
|
44
|
+
id: z.ZodString;
|
|
45
|
+
index: z.ZodNumber;
|
|
46
|
+
type: z.ZodEnum<{
|
|
47
|
+
line: "line";
|
|
48
|
+
circle: "circle";
|
|
49
|
+
marker: "marker";
|
|
50
|
+
polygon: "polygon";
|
|
51
|
+
}>;
|
|
52
|
+
}, z.core.$strict>;
|
|
53
|
+
}, z.core.$strict>;
|
|
54
|
+
type StaticMapRequestErrorDetails = StaticAutoFitDetails | z.infer<typeof staticOverlayInvalidDetailsSchema>;
|
|
55
|
+
declare const staticMapRequestErrorResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
56
|
+
code: z.ZodLiteral<"AUTO_FIT_EMPTY">;
|
|
57
|
+
reason: z.ZodLiteral<"NO_FITTABLE_OVERLAYS">;
|
|
58
|
+
error: z.ZodString;
|
|
59
|
+
retryable: z.ZodLiteral<false>;
|
|
60
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
61
|
+
code: z.ZodLiteral<"AUTO_FIT_AMBIGUOUS">;
|
|
62
|
+
details: z.ZodObject<{
|
|
63
|
+
overlay: z.ZodOptional<z.ZodObject<{
|
|
64
|
+
id: z.ZodString;
|
|
65
|
+
index: z.ZodNumber;
|
|
66
|
+
type: z.ZodEnum<{
|
|
67
|
+
line: "line";
|
|
68
|
+
circle: "circle";
|
|
69
|
+
marker: "marker";
|
|
70
|
+
polygon: "polygon";
|
|
71
|
+
}>;
|
|
72
|
+
}, z.core.$strict>>;
|
|
73
|
+
padding: z.ZodOptional<z.ZodObject<{
|
|
74
|
+
bottom: z.ZodNumber;
|
|
75
|
+
left: z.ZodNumber;
|
|
76
|
+
right: z.ZodNumber;
|
|
77
|
+
top: z.ZodNumber;
|
|
78
|
+
}, z.core.$strict>>;
|
|
79
|
+
projection: z.ZodOptional<z.ZodEnum<{
|
|
80
|
+
globe: "globe";
|
|
81
|
+
mercator: "mercator";
|
|
82
|
+
}>>;
|
|
83
|
+
requiredInsets: z.ZodOptional<z.ZodObject<{
|
|
84
|
+
bottom: z.ZodNumber;
|
|
85
|
+
left: z.ZodNumber;
|
|
86
|
+
right: z.ZodNumber;
|
|
87
|
+
top: z.ZodNumber;
|
|
88
|
+
}, z.core.$strict>>;
|
|
89
|
+
ringIndex: z.ZodOptional<z.ZodNumber>;
|
|
90
|
+
segmentIndex: z.ZodOptional<z.ZodNumber>;
|
|
91
|
+
viewport: z.ZodOptional<z.ZodObject<{
|
|
92
|
+
height: z.ZodNumber;
|
|
93
|
+
width: z.ZodNumber;
|
|
94
|
+
}, z.core.$strict>>;
|
|
95
|
+
}, z.core.$strict>;
|
|
96
|
+
reason: z.ZodLiteral<"ANTIMERIDIAN_WRAP_REQUIRED">;
|
|
97
|
+
error: z.ZodString;
|
|
98
|
+
retryable: z.ZodLiteral<false>;
|
|
99
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
100
|
+
code: z.ZodLiteral<"AUTO_FIT_IMPOSSIBLE">;
|
|
101
|
+
details: z.ZodOptional<z.ZodObject<{
|
|
102
|
+
overlay: z.ZodOptional<z.ZodObject<{
|
|
103
|
+
id: z.ZodString;
|
|
104
|
+
index: z.ZodNumber;
|
|
105
|
+
type: z.ZodEnum<{
|
|
106
|
+
line: "line";
|
|
107
|
+
circle: "circle";
|
|
108
|
+
marker: "marker";
|
|
109
|
+
polygon: "polygon";
|
|
110
|
+
}>;
|
|
111
|
+
}, z.core.$strict>>;
|
|
112
|
+
padding: z.ZodOptional<z.ZodObject<{
|
|
113
|
+
bottom: z.ZodNumber;
|
|
114
|
+
left: z.ZodNumber;
|
|
115
|
+
right: z.ZodNumber;
|
|
116
|
+
top: z.ZodNumber;
|
|
117
|
+
}, z.core.$strict>>;
|
|
118
|
+
projection: z.ZodOptional<z.ZodEnum<{
|
|
119
|
+
globe: "globe";
|
|
120
|
+
mercator: "mercator";
|
|
121
|
+
}>>;
|
|
122
|
+
requiredInsets: z.ZodOptional<z.ZodObject<{
|
|
123
|
+
bottom: z.ZodNumber;
|
|
124
|
+
left: z.ZodNumber;
|
|
125
|
+
right: z.ZodNumber;
|
|
126
|
+
top: z.ZodNumber;
|
|
127
|
+
}, z.core.$strict>>;
|
|
128
|
+
ringIndex: z.ZodOptional<z.ZodNumber>;
|
|
129
|
+
segmentIndex: z.ZodOptional<z.ZodNumber>;
|
|
130
|
+
viewport: z.ZodOptional<z.ZodObject<{
|
|
131
|
+
height: z.ZodNumber;
|
|
132
|
+
width: z.ZodNumber;
|
|
133
|
+
}, z.core.$strict>>;
|
|
134
|
+
}, z.core.$strict>>;
|
|
135
|
+
reason: z.ZodEnum<{
|
|
136
|
+
GLOBE_NOT_SIMULTANEOUSLY_VISIBLE: "GLOBE_NOT_SIMULTANEOUSLY_VISIBLE";
|
|
137
|
+
INSUFFICIENT_VIEWPORT: "INSUFFICIENT_VIEWPORT";
|
|
138
|
+
CAMERA_UNRESOLVABLE: "CAMERA_UNRESOLVABLE";
|
|
139
|
+
PROJECTED_FOOTPRINT_OUTSIDE_VIEWPORT: "PROJECTED_FOOTPRINT_OUTSIDE_VIEWPORT";
|
|
140
|
+
}>;
|
|
141
|
+
error: z.ZodString;
|
|
142
|
+
retryable: z.ZodLiteral<false>;
|
|
143
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
144
|
+
code: z.ZodLiteral<"STATIC_OVERLAY_INVALID">;
|
|
145
|
+
details: z.ZodObject<{
|
|
146
|
+
latitude: z.ZodNumber;
|
|
147
|
+
limit: z.ZodLiteral<85.051129>;
|
|
148
|
+
overlay: z.ZodObject<{
|
|
149
|
+
id: z.ZodString;
|
|
150
|
+
index: z.ZodNumber;
|
|
151
|
+
type: z.ZodEnum<{
|
|
152
|
+
line: "line";
|
|
153
|
+
circle: "circle";
|
|
154
|
+
marker: "marker";
|
|
155
|
+
polygon: "polygon";
|
|
156
|
+
}>;
|
|
157
|
+
}, z.core.$strict>;
|
|
158
|
+
}, z.core.$strict>;
|
|
159
|
+
reason: z.ZodLiteral<"OVERLAY_LATITUDE_OUT_OF_RANGE">;
|
|
160
|
+
error: z.ZodString;
|
|
161
|
+
retryable: z.ZodLiteral<false>;
|
|
162
|
+
}, z.core.$strict>], "code">;
|
|
163
|
+
type StaticMapRequestErrorResponse = z.infer<typeof staticMapRequestErrorResponseSchema>;
|
|
164
|
+
type StaticAutoFitErrorResponse = Extract<StaticMapRequestErrorResponse, {
|
|
165
|
+
code: `AUTO_FIT_${string}`;
|
|
166
|
+
}>;
|
|
167
|
+
declare class StaticMapRequestError extends Error {
|
|
168
|
+
readonly code: StaticMapRequestErrorResponse['code'];
|
|
169
|
+
readonly details?: StaticMapRequestErrorDetails;
|
|
170
|
+
readonly reason: StaticMapRequestErrorResponse['reason'];
|
|
171
|
+
readonly retryable = false;
|
|
172
|
+
readonly status: number;
|
|
173
|
+
constructor(response: StaticMapRequestErrorResponse, status?: number);
|
|
174
|
+
}
|
|
175
|
+
type StaticAutoFitFailure = StaticAutoFitErrorResponse & {
|
|
176
|
+
ok: false;
|
|
177
|
+
};
|
|
178
|
+
type StaticMapRequestFailure = StaticMapRequestErrorResponse & {
|
|
179
|
+
ok: false;
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
declare function validateStaticScene(input: unknown): {
|
|
183
|
+
ok: true;
|
|
184
|
+
scene: StaticScene;
|
|
185
|
+
} | {
|
|
186
|
+
error: string;
|
|
187
|
+
ok: false;
|
|
188
|
+
} | StaticMapRequestFailure;
|
|
189
|
+
declare function normalizeStaticScene(scene: StaticSceneInput): StaticScene;
|
|
190
|
+
|
|
191
|
+
export { type StaticAutoFitErrorResponse, type StaticAutoFitFailure, StaticMapRequestError, type StaticMapRequestErrorResponse, type StaticMapRequestFailure, StaticScene, StaticSceneInput, normalizeStaticScene, staticMapRequestErrorResponseSchema, validateStaticScene };
|
package/dist/scene.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import {
|
|
2
|
+
StaticMapRequestError,
|
|
3
|
+
normalizeStaticScene,
|
|
4
|
+
staticMapRequestErrorResponseSchema,
|
|
5
|
+
validateStaticScene
|
|
6
|
+
} from "./chunk-NHQK5UZ2.js";
|
|
7
|
+
import {
|
|
8
|
+
MAX_OVERLAY_LATITUDE,
|
|
9
|
+
staticSceneLimits,
|
|
10
|
+
staticSceneSchema,
|
|
11
|
+
staticSceneSchemaVersion
|
|
12
|
+
} from "./chunk-MGQCHCU3.js";
|
|
13
|
+
export {
|
|
14
|
+
MAX_OVERLAY_LATITUDE,
|
|
15
|
+
StaticMapRequestError,
|
|
16
|
+
normalizeStaticScene,
|
|
17
|
+
staticMapRequestErrorResponseSchema,
|
|
18
|
+
staticSceneLimits,
|
|
19
|
+
staticSceneSchema,
|
|
20
|
+
staticSceneSchemaVersion,
|
|
21
|
+
validateStaticScene
|
|
22
|
+
};
|
package/package.json
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tileflow/static",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.21",
|
|
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",
|
|
@@ -22,13 +24,37 @@
|
|
|
22
24
|
"main": "./dist/index.js",
|
|
23
25
|
"types": "./dist/index.d.ts",
|
|
24
26
|
"files": [
|
|
25
|
-
"dist"
|
|
27
|
+
"dist",
|
|
28
|
+
"LICENSE",
|
|
29
|
+
"NOTICE",
|
|
30
|
+
"GENERATED_OUTPUT_LICENSE.md",
|
|
31
|
+
"TRADEMARKS.md"
|
|
26
32
|
],
|
|
27
33
|
"exports": {
|
|
28
34
|
".": {
|
|
29
35
|
"types": "./dist/index.d.ts",
|
|
30
36
|
"import": "./dist/index.js",
|
|
31
37
|
"default": "./dist/index.js"
|
|
38
|
+
},
|
|
39
|
+
"./client": {
|
|
40
|
+
"types": "./dist/client.d.ts",
|
|
41
|
+
"import": "./dist/client.js",
|
|
42
|
+
"default": "./dist/client.js"
|
|
43
|
+
},
|
|
44
|
+
"./manifest": {
|
|
45
|
+
"types": "./dist/manifest.d.ts",
|
|
46
|
+
"import": "./dist/manifest.js",
|
|
47
|
+
"default": "./dist/manifest.js"
|
|
48
|
+
},
|
|
49
|
+
"./overlays": {
|
|
50
|
+
"types": "./dist/overlays.d.ts",
|
|
51
|
+
"import": "./dist/overlays.js",
|
|
52
|
+
"default": "./dist/overlays.js"
|
|
53
|
+
},
|
|
54
|
+
"./scene": {
|
|
55
|
+
"types": "./dist/scene.d.ts",
|
|
56
|
+
"import": "./dist/scene.js",
|
|
57
|
+
"default": "./dist/scene.js"
|
|
32
58
|
}
|
|
33
59
|
},
|
|
34
60
|
"publishConfig": {
|
|
@@ -38,7 +64,8 @@
|
|
|
38
64
|
"zod": "^4.4.3"
|
|
39
65
|
},
|
|
40
66
|
"scripts": {
|
|
41
|
-
"build": "tsup src/index.ts --format esm --dts --clean",
|
|
67
|
+
"build": "tsup src/index.ts src/scene.ts src/overlays.ts src/manifest.ts src/client.ts --format esm --dts --clean --splitting",
|
|
68
|
+
"verify": "tsx --test test/*.test.ts",
|
|
42
69
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
43
70
|
"lint": "tsc -p tsconfig.json --noEmit"
|
|
44
71
|
}
|