@feltmaps/js-sdk 1.5.0-next.15 → 1.5.0-next.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-QXPO53SH.js +1 -0
- package/dist/client.cjs +1 -1
- package/dist/client.d.cts +34 -15
- package/dist/client.d.ts +34 -15
- package/dist/client.js +1 -1
- package/dist/handler.cjs +1 -1
- package/dist/handler.d.cts +501 -203
- package/dist/handler.d.ts +501 -203
- package/dist/handler.js +1 -1
- package/dist/{types-PSY3LPGC.d.cts → types-DrMm8Los.d.cts} +2832 -434
- package/dist/{types-PSY3LPGC.d.ts → types-DrMm8Los.d.ts} +2832 -434
- package/handler.d.ts +501 -203
- package/handler.js +1 -1
- package/package.json +1 -2
- package/{types-PSY3LPGC.d.ts → types-DrMm8Los.d.ts} +2832 -434
|
@@ -14,21 +14,321 @@ type zInfer<T extends {
|
|
|
14
14
|
shape: ZodRawShape;
|
|
15
15
|
}> = objectOutputType<T["shape"], ZodTypeAny, "strip">;
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
/**
|
|
18
|
+
* Represents a point in world coordinates.
|
|
19
|
+
*/
|
|
20
|
+
interface LatLng {
|
|
21
|
+
latitude: number;
|
|
22
|
+
longitude: number;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* A tuple representing a longitude and latitude coordinate.
|
|
26
|
+
*
|
|
27
|
+
* This is used hen serializing geometry because that's the standard used in
|
|
28
|
+
* GeoJSON.
|
|
29
|
+
*/
|
|
30
|
+
type LngLatTuple = [longitude: number, latitude: number];
|
|
31
|
+
/**
|
|
32
|
+
* A GeoJSON properties object.
|
|
33
|
+
*/
|
|
34
|
+
type GeoJsonProperties = Record<string, unknown>;
|
|
35
|
+
/**
|
|
36
|
+
* A GeoJSON feature object, compliant with:
|
|
37
|
+
* https://datatracker.ietf.org/doc/html/rfc7946#section-3.2
|
|
38
|
+
*
|
|
39
|
+
* @interface
|
|
40
|
+
*/
|
|
41
|
+
type GeoJsonFeature = {
|
|
42
|
+
type: "Feature";
|
|
43
|
+
/**
|
|
44
|
+
* The bounding box of the feature in [west, south, east, north] order.
|
|
45
|
+
*/
|
|
46
|
+
bbox?: FeltBoundary;
|
|
47
|
+
/**
|
|
48
|
+
* The feature's geometry
|
|
49
|
+
*/
|
|
50
|
+
geometry: GeoJsonGeometry;
|
|
51
|
+
/**
|
|
52
|
+
* A value that uniquely identifies this feature in a
|
|
53
|
+
* https://tools.ietf.org/html/rfc7946#section-3.2.
|
|
54
|
+
*/
|
|
55
|
+
id?: string | number | undefined;
|
|
56
|
+
/**
|
|
57
|
+
* Properties associated with this feature.
|
|
58
|
+
*/
|
|
59
|
+
properties: GeoJsonProperties;
|
|
60
|
+
};
|
|
61
|
+
interface PointGeometry {
|
|
62
|
+
type: "Point";
|
|
63
|
+
coordinates: LngLatTuple;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* A GeoJSON multi-point geometry.
|
|
67
|
+
*
|
|
68
|
+
* @remarks
|
|
69
|
+
* You shouldn't expect this to come from Felt - it is here for completeness
|
|
70
|
+
* of the GeoJSON spec.
|
|
71
|
+
*/
|
|
72
|
+
interface MultiPointGeometry {
|
|
73
|
+
type: "MultiPoint";
|
|
74
|
+
coordinates: PointGeometry["coordinates"][];
|
|
75
|
+
}
|
|
76
|
+
interface PolygonGeometry extends zInfer<typeof PolygonGeometrySchema> {
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* A GeoJSON polygon geometry.
|
|
80
|
+
*/
|
|
81
|
+
declare const PolygonGeometrySchema: z.ZodObject<{
|
|
82
|
+
type: z.ZodLiteral<"Polygon">;
|
|
83
|
+
/**
|
|
84
|
+
* The coordinates of a polygon. The first array is the exterior ring, and
|
|
85
|
+
* any subsequent arrays are the interior rings.
|
|
86
|
+
*
|
|
87
|
+
* Each ring must have at least 4 points: 3 to make a valid triangle and the
|
|
88
|
+
* last to close the path, which must be identical to the first.
|
|
89
|
+
*/
|
|
90
|
+
coordinates: z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">;
|
|
91
|
+
}, "strip", z.ZodTypeAny, {
|
|
92
|
+
type: "Polygon";
|
|
93
|
+
coordinates: [number, number][][];
|
|
94
|
+
}, {
|
|
95
|
+
type: "Polygon";
|
|
96
|
+
coordinates: [number, number][][];
|
|
97
|
+
}>;
|
|
98
|
+
/**
|
|
99
|
+
* A GeoJSON multi-polygon geometry.
|
|
100
|
+
*
|
|
101
|
+
* @interface
|
|
102
|
+
*/
|
|
103
|
+
type MultiPolygonGeometry = {
|
|
104
|
+
type: "MultiPolygon";
|
|
105
|
+
coordinates: PolygonGeometry["coordinates"][];
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* A GeoJSON line string geometry.
|
|
109
|
+
*
|
|
110
|
+
* @interface
|
|
111
|
+
*/
|
|
112
|
+
type LineStringGeometry = {
|
|
113
|
+
type: "LineString";
|
|
114
|
+
coordinates: LngLatTuple[];
|
|
115
|
+
};
|
|
116
|
+
/**
|
|
117
|
+
* A GeoJSON multi-line string geometry.
|
|
118
|
+
*
|
|
119
|
+
* @interface
|
|
120
|
+
*/
|
|
121
|
+
type MultiLineStringGeometry = {
|
|
122
|
+
type: "MultiLineString";
|
|
123
|
+
coordinates: LineStringGeometry["coordinates"][];
|
|
124
|
+
};
|
|
125
|
+
/**
|
|
126
|
+
* A GeoJSON geometry of any type
|
|
127
|
+
*/
|
|
128
|
+
type GeoJsonGeometry = PointGeometry | PolygonGeometry | LineStringGeometry | MultiLineStringGeometry | MultiPolygonGeometry | MultiPointGeometry;
|
|
129
|
+
/**
|
|
130
|
+
* @ignore
|
|
131
|
+
* @internal
|
|
132
|
+
*/
|
|
133
|
+
declare const FeltZoomSchema: z.ZodNumber;
|
|
134
|
+
/**
|
|
135
|
+
* The zoom level of the map.
|
|
136
|
+
*
|
|
137
|
+
* It is a floating-point number between 1 and 23, where 1 is the most
|
|
138
|
+
* zoomed out and 23 is the most zoomed in.
|
|
139
|
+
*
|
|
140
|
+
* @group Types
|
|
141
|
+
* @public
|
|
142
|
+
*/
|
|
143
|
+
type FeltZoom = z.infer<typeof FeltZoomSchema>;
|
|
144
|
+
/**
|
|
145
|
+
* @ignore
|
|
146
|
+
* @internal
|
|
147
|
+
*/
|
|
148
|
+
declare const FeltBoundarySchema: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
149
|
+
/**
|
|
150
|
+
* The edges of the map in the form of a bounding box.
|
|
151
|
+
*
|
|
152
|
+
* The boundary is a tuple of the form `[west, south, east, north]`.
|
|
153
|
+
*
|
|
154
|
+
* @group Types
|
|
155
|
+
* @public
|
|
156
|
+
*/
|
|
157
|
+
type FeltBoundary = z.infer<typeof FeltBoundarySchema>;
|
|
158
|
+
/**
|
|
159
|
+
* The parameters for the methods that change the visibility of entities.
|
|
160
|
+
*
|
|
161
|
+
* @public
|
|
162
|
+
* @category Visibility
|
|
163
|
+
*/
|
|
164
|
+
interface SetVisibilityRequest extends zInfer<typeof SetVisibilityRequestSchema> {
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* @internal
|
|
168
|
+
*/
|
|
169
|
+
declare const SetVisibilityRequestSchema: z.ZodObject<{
|
|
170
|
+
/**
|
|
171
|
+
* The ids of the entities you want to change the visibility of.
|
|
172
|
+
*/
|
|
173
|
+
show: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
174
|
+
hide: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
175
|
+
}, "strip", z.ZodTypeAny, {
|
|
176
|
+
show?: string[] | undefined;
|
|
177
|
+
hide?: string[] | undefined;
|
|
178
|
+
}, {
|
|
179
|
+
show?: string[] | undefined;
|
|
180
|
+
hide?: string[] | undefined;
|
|
181
|
+
}>;
|
|
182
|
+
/**
|
|
183
|
+
* Specifies the direction to sort data in
|
|
184
|
+
*
|
|
185
|
+
* @group Types
|
|
186
|
+
*/
|
|
187
|
+
type SortDirection = z.infer<typeof SortDirectionSchema>;
|
|
188
|
+
/** @ignore */
|
|
189
|
+
declare const SortDirectionSchema: z.ZodEnum<["asc", "desc"]>;
|
|
190
|
+
/**
|
|
191
|
+
* Configuration for sorting data by a specific attribute
|
|
192
|
+
*
|
|
193
|
+
* @group Types
|
|
194
|
+
*/
|
|
195
|
+
interface SortConfig extends zInfer<typeof SortConfigSchema> {
|
|
196
|
+
direction: SortDirection;
|
|
197
|
+
}
|
|
198
|
+
/** @ignore */
|
|
199
|
+
declare const SortConfigSchema: z.ZodObject<{
|
|
200
|
+
/**
|
|
201
|
+
* The attribute to sort by. What this represents depends on the context.
|
|
202
|
+
* For instance, when sorting features in a data table, the attribute is
|
|
203
|
+
* the column to sort by.
|
|
204
|
+
*/
|
|
205
|
+
attribute: z.ZodString;
|
|
206
|
+
/**
|
|
207
|
+
* The direction to sort in
|
|
208
|
+
*/
|
|
209
|
+
direction: z.ZodEnum<["asc", "desc"]>;
|
|
210
|
+
}, "strip", z.ZodTypeAny, {
|
|
211
|
+
attribute: string;
|
|
212
|
+
direction: "asc" | "desc";
|
|
213
|
+
}, {
|
|
214
|
+
attribute: string;
|
|
215
|
+
direction: "asc" | "desc";
|
|
216
|
+
}>;
|
|
217
|
+
|
|
218
|
+
declare const PlaceCreateSchema: z.ZodObject<Omit<z.objectUtil.extendShape<{
|
|
21
219
|
id: z.ZodOptional<z.ZodString>;
|
|
22
220
|
groupId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
23
221
|
color: z.ZodOptional<z.ZodString>;
|
|
24
|
-
name: z.ZodOptional<z.
|
|
25
|
-
description: z.ZodOptional<z.
|
|
222
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
223
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
26
224
|
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
27
225
|
interaction: z.ZodOptional<z.ZodOptional<z.ZodEnum<["default", "locked"]>>>;
|
|
28
226
|
imageUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
227
|
+
type: z.ZodOptional<z.ZodLiteral<"Place">>;
|
|
228
|
+
coordinates: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
|
|
229
|
+
symbol: z.ZodOptional<z.ZodString>;
|
|
29
230
|
frame: z.ZodOptional<z.ZodNullable<z.ZodEnum<["frame-circle", "frame-square"]>>>;
|
|
30
231
|
hideLabel: z.ZodOptional<z.ZodBoolean>;
|
|
31
|
-
},
|
|
232
|
+
}, Pick<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
233
|
+
/**
|
|
234
|
+
* The unique identifier for the element.
|
|
235
|
+
*/
|
|
236
|
+
id: z.ZodString;
|
|
237
|
+
/**
|
|
238
|
+
* The ID of the element group that the element belongs to.
|
|
239
|
+
* For elements that are not part of a group, this will be null.
|
|
240
|
+
*/
|
|
241
|
+
groupId: z.ZodNullable<z.ZodString>;
|
|
242
|
+
/**
|
|
243
|
+
* The color of the element in some CSS-like format.
|
|
244
|
+
*
|
|
245
|
+
* @example
|
|
246
|
+
* ```typescript
|
|
247
|
+
* "#ABC123";
|
|
248
|
+
* "rgb(255, 0, 0)";
|
|
249
|
+
* "hsl(200, 100%, 50%)";
|
|
250
|
+
* ```
|
|
251
|
+
*
|
|
252
|
+
* @default "#C93535"
|
|
253
|
+
*/
|
|
254
|
+
color: z.ZodString;
|
|
255
|
+
/**
|
|
256
|
+
* The element's name. For elements that can show a label or text on
|
|
257
|
+
* the map (e.g. a Place or Text element) this is the text that will be shown.
|
|
258
|
+
*
|
|
259
|
+
* For elements such as Polygons or Paths, the name is what is shown when
|
|
260
|
+
* the element is selected by clicking on it.
|
|
261
|
+
*/
|
|
262
|
+
name: z.ZodNullable<z.ZodString>;
|
|
263
|
+
/**
|
|
264
|
+
* Text describing the element, which is shown in an element's popup when it
|
|
265
|
+
* is selected.
|
|
266
|
+
*
|
|
267
|
+
* Note that some elements are not selectable on the map, such as Notes, Text
|
|
268
|
+
* and Markers, so their description will not be shown.
|
|
269
|
+
*/
|
|
270
|
+
description: z.ZodNullable<z.ZodString>;
|
|
271
|
+
/**
|
|
272
|
+
* A set of key-value pairs that can be used to store arbitrary data about the element.
|
|
273
|
+
*
|
|
274
|
+
* This is most useful for associating additional data with an element that is not
|
|
275
|
+
* part of the element's core data, such as a Place's address or some other
|
|
276
|
+
* data.
|
|
277
|
+
*/
|
|
278
|
+
attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
279
|
+
/**
|
|
280
|
+
* Whether the element is interactive.
|
|
281
|
+
*
|
|
282
|
+
* The `default` interaction mode means that the element can be selected and edited by
|
|
283
|
+
* the user, if it was created by the SDK or by the user using a tool.
|
|
284
|
+
*
|
|
285
|
+
* If the interaction mode is `locked`, the element will not be editable by the user,
|
|
286
|
+
* which is often used for elements that you don't want the user to edit or move by
|
|
287
|
+
* accident.
|
|
288
|
+
*
|
|
289
|
+
* Elements that were created by the map author (i.e. not during an SDK "session") are
|
|
290
|
+
* not editable and have special behaviour depending on their name, description and
|
|
291
|
+
* attributes.
|
|
292
|
+
*
|
|
293
|
+
* @default "default"
|
|
294
|
+
*/
|
|
295
|
+
interaction: z.ZodOptional<z.ZodEnum<["default", "locked"]>>;
|
|
296
|
+
}, {
|
|
297
|
+
/**
|
|
298
|
+
* The URL of an image that has been added to the element.
|
|
299
|
+
*/
|
|
300
|
+
imageUrl: z.ZodNullable<z.ZodString>;
|
|
301
|
+
}>, {
|
|
302
|
+
type: z.ZodLiteral<"Place">;
|
|
303
|
+
coordinates: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
304
|
+
/**
|
|
305
|
+
* The symbol that is rendered for the Place.
|
|
306
|
+
*
|
|
307
|
+
* This can be an emoji by using colon-enclosed characters (e.g. `":smiley:"`)
|
|
308
|
+
* or one of the symbols available in Felt's symbol library.
|
|
309
|
+
*
|
|
310
|
+
* You can see the available symbols in the Felt UI when editing a Place
|
|
311
|
+
* by hovering a symbol and converting the tooltip to kebab-case. For example,
|
|
312
|
+
* the "Oil barrel" symbol is `oil-barrel`.
|
|
313
|
+
*/
|
|
314
|
+
symbol: z.ZodString;
|
|
315
|
+
/**
|
|
316
|
+
* The frame that is rendered around the Place's symbol. This is
|
|
317
|
+
* only available for non-emoji symbols.
|
|
318
|
+
*/
|
|
319
|
+
frame: z.ZodNullable<z.ZodEnum<["frame-circle", "frame-square"]>>;
|
|
320
|
+
/**
|
|
321
|
+
* Whether the element's label is hidden on the map. This allows you
|
|
322
|
+
* to add a name to the element and can show in popups, but not have
|
|
323
|
+
* it visible on the map.
|
|
324
|
+
*
|
|
325
|
+
* This will also hide the faint placeholder label that is shown when
|
|
326
|
+
* an editable Place is selected.
|
|
327
|
+
*
|
|
328
|
+
* @default false
|
|
329
|
+
*/
|
|
330
|
+
hideLabel: z.ZodBoolean;
|
|
331
|
+
}>, "type" | "coordinates">>, "id">, "strip", z.ZodTypeAny, {
|
|
32
332
|
type: "Place";
|
|
33
333
|
coordinates: [number, number];
|
|
34
334
|
symbol?: string | undefined;
|
|
@@ -55,24 +355,138 @@ declare const PlaceCreateSchema: z.ZodObject<Omit<{
|
|
|
55
355
|
frame?: "frame-circle" | "frame-square" | null | undefined;
|
|
56
356
|
hideLabel?: boolean | undefined;
|
|
57
357
|
}>;
|
|
58
|
-
declare const PathCreateSchema: z.ZodObject<Omit<{
|
|
59
|
-
type: z.ZodLiteral<"Path">;
|
|
60
|
-
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">;
|
|
358
|
+
declare const PathCreateSchema: z.ZodObject<Omit<z.objectUtil.extendShape<{
|
|
61
359
|
id: z.ZodOptional<z.ZodString>;
|
|
62
360
|
groupId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
63
361
|
color: z.ZodOptional<z.ZodString>;
|
|
64
|
-
name: z.ZodOptional<z.
|
|
65
|
-
description: z.ZodOptional<z.
|
|
362
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
363
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
66
364
|
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
67
365
|
interaction: z.ZodOptional<z.ZodOptional<z.ZodEnum<["default", "locked"]>>>;
|
|
68
366
|
imageUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
69
367
|
strokeOpacity: z.ZodOptional<z.ZodNumber>;
|
|
70
368
|
strokeWidth: z.ZodOptional<z.ZodNumber>;
|
|
71
369
|
strokeStyle: z.ZodOptional<z.ZodEnum<["solid", "dashed", "dotted"]>>;
|
|
370
|
+
type: z.ZodOptional<z.ZodLiteral<"Path">>;
|
|
371
|
+
coordinates: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">>;
|
|
72
372
|
distanceMarker: z.ZodOptional<z.ZodBoolean>;
|
|
73
|
-
endCaps: z.ZodOptional<z.ZodBoolean>;
|
|
74
373
|
routingMode: z.ZodOptional<z.ZodNullable<z.ZodEnum<["driving", "cycling", "walking", "flying"]>>>;
|
|
75
|
-
|
|
374
|
+
endCaps: z.ZodOptional<z.ZodBoolean>;
|
|
375
|
+
}, Pick<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
376
|
+
/**
|
|
377
|
+
* The unique identifier for the element.
|
|
378
|
+
*/
|
|
379
|
+
id: z.ZodString;
|
|
380
|
+
/**
|
|
381
|
+
* The ID of the element group that the element belongs to.
|
|
382
|
+
* For elements that are not part of a group, this will be null.
|
|
383
|
+
*/
|
|
384
|
+
groupId: z.ZodNullable<z.ZodString>;
|
|
385
|
+
/**
|
|
386
|
+
* The color of the element in some CSS-like format.
|
|
387
|
+
*
|
|
388
|
+
* @example
|
|
389
|
+
* ```typescript
|
|
390
|
+
* "#ABC123";
|
|
391
|
+
* "rgb(255, 0, 0)";
|
|
392
|
+
* "hsl(200, 100%, 50%)";
|
|
393
|
+
* ```
|
|
394
|
+
*
|
|
395
|
+
* @default "#C93535"
|
|
396
|
+
*/
|
|
397
|
+
color: z.ZodString;
|
|
398
|
+
/**
|
|
399
|
+
* The element's name. For elements that can show a label or text on
|
|
400
|
+
* the map (e.g. a Place or Text element) this is the text that will be shown.
|
|
401
|
+
*
|
|
402
|
+
* For elements such as Polygons or Paths, the name is what is shown when
|
|
403
|
+
* the element is selected by clicking on it.
|
|
404
|
+
*/
|
|
405
|
+
name: z.ZodNullable<z.ZodString>;
|
|
406
|
+
/**
|
|
407
|
+
* Text describing the element, which is shown in an element's popup when it
|
|
408
|
+
* is selected.
|
|
409
|
+
*
|
|
410
|
+
* Note that some elements are not selectable on the map, such as Notes, Text
|
|
411
|
+
* and Markers, so their description will not be shown.
|
|
412
|
+
*/
|
|
413
|
+
description: z.ZodNullable<z.ZodString>;
|
|
414
|
+
/**
|
|
415
|
+
* A set of key-value pairs that can be used to store arbitrary data about the element.
|
|
416
|
+
*
|
|
417
|
+
* This is most useful for associating additional data with an element that is not
|
|
418
|
+
* part of the element's core data, such as a Place's address or some other
|
|
419
|
+
* data.
|
|
420
|
+
*/
|
|
421
|
+
attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
422
|
+
/**
|
|
423
|
+
* Whether the element is interactive.
|
|
424
|
+
*
|
|
425
|
+
* The `default` interaction mode means that the element can be selected and edited by
|
|
426
|
+
* the user, if it was created by the SDK or by the user using a tool.
|
|
427
|
+
*
|
|
428
|
+
* If the interaction mode is `locked`, the element will not be editable by the user,
|
|
429
|
+
* which is often used for elements that you don't want the user to edit or move by
|
|
430
|
+
* accident.
|
|
431
|
+
*
|
|
432
|
+
* Elements that were created by the map author (i.e. not during an SDK "session") are
|
|
433
|
+
* not editable and have special behaviour depending on their name, description and
|
|
434
|
+
* attributes.
|
|
435
|
+
*
|
|
436
|
+
* @default "default"
|
|
437
|
+
*/
|
|
438
|
+
interaction: z.ZodOptional<z.ZodEnum<["default", "locked"]>>;
|
|
439
|
+
}, {
|
|
440
|
+
/**
|
|
441
|
+
* The URL of an image that has been added to the element.
|
|
442
|
+
*/
|
|
443
|
+
imageUrl: z.ZodNullable<z.ZodString>;
|
|
444
|
+
}>, {
|
|
445
|
+
/**
|
|
446
|
+
* A value between 0 and 1 that describes the opacity of the element's stroke.
|
|
447
|
+
*
|
|
448
|
+
* @default 1
|
|
449
|
+
*/
|
|
450
|
+
strokeOpacity: z.ZodNumber;
|
|
451
|
+
/**
|
|
452
|
+
* The width of the element's stroke in pixels.
|
|
453
|
+
*
|
|
454
|
+
* @default 2
|
|
455
|
+
*/
|
|
456
|
+
strokeWidth: z.ZodNumber;
|
|
457
|
+
/**
|
|
458
|
+
* The style of the element's stroke.
|
|
459
|
+
*
|
|
460
|
+
* @default "solid"
|
|
461
|
+
*/
|
|
462
|
+
strokeStyle: z.ZodEnum<["solid", "dashed", "dotted"]>;
|
|
463
|
+
}>, {
|
|
464
|
+
type: z.ZodLiteral<"Path">;
|
|
465
|
+
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">;
|
|
466
|
+
/**
|
|
467
|
+
* Whether a distance marker is shown at the midpoint of the path.
|
|
468
|
+
*
|
|
469
|
+
* @default false
|
|
470
|
+
*/
|
|
471
|
+
distanceMarker: z.ZodBoolean;
|
|
472
|
+
/**
|
|
473
|
+
* Whether this represents a route, and if so, what mode of transport
|
|
474
|
+
* is used.
|
|
475
|
+
*
|
|
476
|
+
* If this is `null`, the path is not considered to be a route, so while it
|
|
477
|
+
* can have a `distanceMarker`, it will does not have a start or end cap.
|
|
478
|
+
*
|
|
479
|
+
* @default null
|
|
480
|
+
*/
|
|
481
|
+
routingMode: z.ZodNullable<z.ZodEnum<["driving", "cycling", "walking", "flying"]>>;
|
|
482
|
+
/**
|
|
483
|
+
* Whether or not to show Start and End caps on the path. This is
|
|
484
|
+
* only available if the `routingMode` is set.
|
|
485
|
+
*
|
|
486
|
+
* @default false
|
|
487
|
+
*/
|
|
488
|
+
endCaps: z.ZodBoolean;
|
|
489
|
+
}>, "type" | "coordinates">>, "id">, "strip", z.ZodTypeAny, {
|
|
76
490
|
type: "Path";
|
|
77
491
|
coordinates: [number, number][][];
|
|
78
492
|
groupId?: string | null | undefined;
|
|
@@ -86,8 +500,8 @@ declare const PathCreateSchema: z.ZodObject<Omit<{
|
|
|
86
500
|
strokeWidth?: number | undefined;
|
|
87
501
|
strokeStyle?: "solid" | "dashed" | "dotted" | undefined;
|
|
88
502
|
distanceMarker?: boolean | undefined;
|
|
89
|
-
endCaps?: boolean | undefined;
|
|
90
503
|
routingMode?: "driving" | "cycling" | "walking" | "flying" | null | undefined;
|
|
504
|
+
endCaps?: boolean | undefined;
|
|
91
505
|
}, {
|
|
92
506
|
type: "Path";
|
|
93
507
|
coordinates: [number, number][][];
|
|
@@ -102,26 +516,129 @@ declare const PathCreateSchema: z.ZodObject<Omit<{
|
|
|
102
516
|
strokeWidth?: number | undefined;
|
|
103
517
|
strokeStyle?: "solid" | "dashed" | "dotted" | undefined;
|
|
104
518
|
distanceMarker?: boolean | undefined;
|
|
105
|
-
endCaps?: boolean | undefined;
|
|
106
519
|
routingMode?: "driving" | "cycling" | "walking" | "flying" | null | undefined;
|
|
520
|
+
endCaps?: boolean | undefined;
|
|
107
521
|
}>;
|
|
108
|
-
declare const PolygonCreateSchema: z.ZodObject<Omit<{
|
|
109
|
-
type: z.ZodLiteral<"Polygon">;
|
|
110
|
-
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">;
|
|
522
|
+
declare const PolygonCreateSchema: z.ZodObject<Omit<z.objectUtil.extendShape<{
|
|
111
523
|
id: z.ZodOptional<z.ZodString>;
|
|
112
524
|
groupId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
113
525
|
color: z.ZodOptional<z.ZodString>;
|
|
114
|
-
name: z.ZodOptional<z.
|
|
115
|
-
description: z.ZodOptional<z.
|
|
526
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
527
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
116
528
|
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
117
529
|
interaction: z.ZodOptional<z.ZodOptional<z.ZodEnum<["default", "locked"]>>>;
|
|
118
530
|
imageUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
119
531
|
strokeOpacity: z.ZodOptional<z.ZodNumber>;
|
|
120
532
|
strokeWidth: z.ZodOptional<z.ZodNumber>;
|
|
121
533
|
strokeStyle: z.ZodOptional<z.ZodEnum<["solid", "dashed", "dotted"]>>;
|
|
534
|
+
type: z.ZodOptional<z.ZodLiteral<"Polygon">>;
|
|
535
|
+
coordinates: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">>;
|
|
122
536
|
fillOpacity: z.ZodOptional<z.ZodNumber>;
|
|
123
537
|
areaMarker: z.ZodOptional<z.ZodBoolean>;
|
|
124
|
-
},
|
|
538
|
+
}, Pick<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
539
|
+
/**
|
|
540
|
+
* The unique identifier for the element.
|
|
541
|
+
*/
|
|
542
|
+
id: z.ZodString;
|
|
543
|
+
/**
|
|
544
|
+
* The ID of the element group that the element belongs to.
|
|
545
|
+
* For elements that are not part of a group, this will be null.
|
|
546
|
+
*/
|
|
547
|
+
groupId: z.ZodNullable<z.ZodString>;
|
|
548
|
+
/**
|
|
549
|
+
* The color of the element in some CSS-like format.
|
|
550
|
+
*
|
|
551
|
+
* @example
|
|
552
|
+
* ```typescript
|
|
553
|
+
* "#ABC123";
|
|
554
|
+
* "rgb(255, 0, 0)";
|
|
555
|
+
* "hsl(200, 100%, 50%)";
|
|
556
|
+
* ```
|
|
557
|
+
*
|
|
558
|
+
* @default "#C93535"
|
|
559
|
+
*/
|
|
560
|
+
color: z.ZodString;
|
|
561
|
+
/**
|
|
562
|
+
* The element's name. For elements that can show a label or text on
|
|
563
|
+
* the map (e.g. a Place or Text element) this is the text that will be shown.
|
|
564
|
+
*
|
|
565
|
+
* For elements such as Polygons or Paths, the name is what is shown when
|
|
566
|
+
* the element is selected by clicking on it.
|
|
567
|
+
*/
|
|
568
|
+
name: z.ZodNullable<z.ZodString>;
|
|
569
|
+
/**
|
|
570
|
+
* Text describing the element, which is shown in an element's popup when it
|
|
571
|
+
* is selected.
|
|
572
|
+
*
|
|
573
|
+
* Note that some elements are not selectable on the map, such as Notes, Text
|
|
574
|
+
* and Markers, so their description will not be shown.
|
|
575
|
+
*/
|
|
576
|
+
description: z.ZodNullable<z.ZodString>;
|
|
577
|
+
/**
|
|
578
|
+
* A set of key-value pairs that can be used to store arbitrary data about the element.
|
|
579
|
+
*
|
|
580
|
+
* This is most useful for associating additional data with an element that is not
|
|
581
|
+
* part of the element's core data, such as a Place's address or some other
|
|
582
|
+
* data.
|
|
583
|
+
*/
|
|
584
|
+
attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
585
|
+
/**
|
|
586
|
+
* Whether the element is interactive.
|
|
587
|
+
*
|
|
588
|
+
* The `default` interaction mode means that the element can be selected and edited by
|
|
589
|
+
* the user, if it was created by the SDK or by the user using a tool.
|
|
590
|
+
*
|
|
591
|
+
* If the interaction mode is `locked`, the element will not be editable by the user,
|
|
592
|
+
* which is often used for elements that you don't want the user to edit or move by
|
|
593
|
+
* accident.
|
|
594
|
+
*
|
|
595
|
+
* Elements that were created by the map author (i.e. not during an SDK "session") are
|
|
596
|
+
* not editable and have special behaviour depending on their name, description and
|
|
597
|
+
* attributes.
|
|
598
|
+
*
|
|
599
|
+
* @default "default"
|
|
600
|
+
*/
|
|
601
|
+
interaction: z.ZodOptional<z.ZodEnum<["default", "locked"]>>;
|
|
602
|
+
}, {
|
|
603
|
+
/**
|
|
604
|
+
* The URL of an image that has been added to the element.
|
|
605
|
+
*/
|
|
606
|
+
imageUrl: z.ZodNullable<z.ZodString>;
|
|
607
|
+
}>, {
|
|
608
|
+
/**
|
|
609
|
+
* A value between 0 and 1 that describes the opacity of the element's stroke.
|
|
610
|
+
*
|
|
611
|
+
* @default 1
|
|
612
|
+
*/
|
|
613
|
+
strokeOpacity: z.ZodNumber;
|
|
614
|
+
/**
|
|
615
|
+
* The width of the element's stroke in pixels.
|
|
616
|
+
*
|
|
617
|
+
* @default 2
|
|
618
|
+
*/
|
|
619
|
+
strokeWidth: z.ZodNumber;
|
|
620
|
+
/**
|
|
621
|
+
* The style of the element's stroke.
|
|
622
|
+
*
|
|
623
|
+
* @default "solid"
|
|
624
|
+
*/
|
|
625
|
+
strokeStyle: z.ZodEnum<["solid", "dashed", "dotted"]>;
|
|
626
|
+
}>, {
|
|
627
|
+
type: z.ZodLiteral<"Polygon">;
|
|
628
|
+
coordinates: z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">;
|
|
629
|
+
/**
|
|
630
|
+
* The opacity of the polygon's fill, between 0 and 1.
|
|
631
|
+
*
|
|
632
|
+
* @default 0.25
|
|
633
|
+
*/
|
|
634
|
+
fillOpacity: z.ZodNumber;
|
|
635
|
+
/**
|
|
636
|
+
* Whether to show an area marker on the polygon.
|
|
637
|
+
*
|
|
638
|
+
* @default false
|
|
639
|
+
*/
|
|
640
|
+
areaMarker: z.ZodBoolean;
|
|
641
|
+
}>, "type" | "coordinates">>, "id">, "strip", z.ZodTypeAny, {
|
|
125
642
|
type: "Polygon";
|
|
126
643
|
coordinates: [number, number][][];
|
|
127
644
|
groupId?: string | null | undefined;
|
|
@@ -152,28 +669,155 @@ declare const PolygonCreateSchema: z.ZodObject<Omit<{
|
|
|
152
669
|
fillOpacity?: number | undefined;
|
|
153
670
|
areaMarker?: boolean | undefined;
|
|
154
671
|
}>;
|
|
155
|
-
declare const CircleCreateSchema: z.ZodObject<Omit<{
|
|
156
|
-
type: z.ZodLiteral<"Circle">;
|
|
157
|
-
coordinates: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
672
|
+
declare const CircleCreateSchema: z.ZodObject<Omit<z.objectUtil.extendShape<{
|
|
158
673
|
id: z.ZodOptional<z.ZodString>;
|
|
159
674
|
groupId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
160
675
|
color: z.ZodOptional<z.ZodString>;
|
|
161
|
-
name: z.ZodOptional<z.
|
|
162
|
-
description: z.ZodOptional<z.
|
|
676
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
677
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
163
678
|
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
164
679
|
interaction: z.ZodOptional<z.ZodOptional<z.ZodEnum<["default", "locked"]>>>;
|
|
165
680
|
imageUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
166
681
|
strokeOpacity: z.ZodOptional<z.ZodNumber>;
|
|
167
682
|
strokeWidth: z.ZodOptional<z.ZodNumber>;
|
|
168
683
|
strokeStyle: z.ZodOptional<z.ZodEnum<["solid", "dashed", "dotted"]>>;
|
|
169
|
-
|
|
170
|
-
|
|
684
|
+
type: z.ZodOptional<z.ZodLiteral<"Circle">>;
|
|
685
|
+
center: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
|
|
686
|
+
radius: z.ZodOptional<z.ZodNumber>;
|
|
687
|
+
radiusMarker: z.ZodOptional<z.ZodBoolean>;
|
|
171
688
|
radiusDisplayAngle: z.ZodOptional<z.ZodNumber>;
|
|
172
689
|
radiusDisplayUnit: z.ZodOptional<z.ZodNullable<z.ZodEnum<["meter", "kilometer", "foot", "mile"]>>>;
|
|
173
|
-
|
|
174
|
-
},
|
|
690
|
+
fillOpacity: z.ZodOptional<z.ZodNumber>;
|
|
691
|
+
}, Pick<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
692
|
+
/**
|
|
693
|
+
* The unique identifier for the element.
|
|
694
|
+
*/
|
|
695
|
+
id: z.ZodString;
|
|
696
|
+
/**
|
|
697
|
+
* The ID of the element group that the element belongs to.
|
|
698
|
+
* For elements that are not part of a group, this will be null.
|
|
699
|
+
*/
|
|
700
|
+
groupId: z.ZodNullable<z.ZodString>;
|
|
701
|
+
/**
|
|
702
|
+
* The color of the element in some CSS-like format.
|
|
703
|
+
*
|
|
704
|
+
* @example
|
|
705
|
+
* ```typescript
|
|
706
|
+
* "#ABC123";
|
|
707
|
+
* "rgb(255, 0, 0)";
|
|
708
|
+
* "hsl(200, 100%, 50%)";
|
|
709
|
+
* ```
|
|
710
|
+
*
|
|
711
|
+
* @default "#C93535"
|
|
712
|
+
*/
|
|
713
|
+
color: z.ZodString;
|
|
714
|
+
/**
|
|
715
|
+
* The element's name. For elements that can show a label or text on
|
|
716
|
+
* the map (e.g. a Place or Text element) this is the text that will be shown.
|
|
717
|
+
*
|
|
718
|
+
* For elements such as Polygons or Paths, the name is what is shown when
|
|
719
|
+
* the element is selected by clicking on it.
|
|
720
|
+
*/
|
|
721
|
+
name: z.ZodNullable<z.ZodString>;
|
|
722
|
+
/**
|
|
723
|
+
* Text describing the element, which is shown in an element's popup when it
|
|
724
|
+
* is selected.
|
|
725
|
+
*
|
|
726
|
+
* Note that some elements are not selectable on the map, such as Notes, Text
|
|
727
|
+
* and Markers, so their description will not be shown.
|
|
728
|
+
*/
|
|
729
|
+
description: z.ZodNullable<z.ZodString>;
|
|
730
|
+
/**
|
|
731
|
+
* A set of key-value pairs that can be used to store arbitrary data about the element.
|
|
732
|
+
*
|
|
733
|
+
* This is most useful for associating additional data with an element that is not
|
|
734
|
+
* part of the element's core data, such as a Place's address or some other
|
|
735
|
+
* data.
|
|
736
|
+
*/
|
|
737
|
+
attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
738
|
+
/**
|
|
739
|
+
* Whether the element is interactive.
|
|
740
|
+
*
|
|
741
|
+
* The `default` interaction mode means that the element can be selected and edited by
|
|
742
|
+
* the user, if it was created by the SDK or by the user using a tool.
|
|
743
|
+
*
|
|
744
|
+
* If the interaction mode is `locked`, the element will not be editable by the user,
|
|
745
|
+
* which is often used for elements that you don't want the user to edit or move by
|
|
746
|
+
* accident.
|
|
747
|
+
*
|
|
748
|
+
* Elements that were created by the map author (i.e. not during an SDK "session") are
|
|
749
|
+
* not editable and have special behaviour depending on their name, description and
|
|
750
|
+
* attributes.
|
|
751
|
+
*
|
|
752
|
+
* @default "default"
|
|
753
|
+
*/
|
|
754
|
+
interaction: z.ZodOptional<z.ZodEnum<["default", "locked"]>>;
|
|
755
|
+
}, {
|
|
756
|
+
/**
|
|
757
|
+
* The URL of an image that has been added to the element.
|
|
758
|
+
*/
|
|
759
|
+
imageUrl: z.ZodNullable<z.ZodString>;
|
|
760
|
+
}>, {
|
|
761
|
+
/**
|
|
762
|
+
* A value between 0 and 1 that describes the opacity of the element's stroke.
|
|
763
|
+
*
|
|
764
|
+
* @default 1
|
|
765
|
+
*/
|
|
766
|
+
strokeOpacity: z.ZodNumber;
|
|
767
|
+
/**
|
|
768
|
+
* The width of the element's stroke in pixels.
|
|
769
|
+
*
|
|
770
|
+
* @default 2
|
|
771
|
+
*/
|
|
772
|
+
strokeWidth: z.ZodNumber;
|
|
773
|
+
/**
|
|
774
|
+
* The style of the element's stroke.
|
|
775
|
+
*
|
|
776
|
+
* @default "solid"
|
|
777
|
+
*/
|
|
778
|
+
strokeStyle: z.ZodEnum<["solid", "dashed", "dotted"]>;
|
|
779
|
+
}>, {
|
|
780
|
+
type: z.ZodLiteral<"Circle">;
|
|
781
|
+
/**
|
|
782
|
+
* The center of the circle.
|
|
783
|
+
*/
|
|
784
|
+
center: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
785
|
+
/**
|
|
786
|
+
* The radius of the circle in meters.
|
|
787
|
+
*/
|
|
788
|
+
radius: z.ZodNumber;
|
|
789
|
+
/**
|
|
790
|
+
* Whether to show a marker on the circle that indicates the radius
|
|
791
|
+
*
|
|
792
|
+
* @default false
|
|
793
|
+
*/
|
|
794
|
+
radiusMarker: z.ZodBoolean;
|
|
795
|
+
/**
|
|
796
|
+
* The angle at which the control point for setting the radius is displayed,
|
|
797
|
+
* in degrees. When the `radiusMarker` is `true`, there is a dotted line rendered
|
|
798
|
+
* from the center of the circle to the control point, and the marker is shown
|
|
799
|
+
* at the midpoint of this line.
|
|
800
|
+
*
|
|
801
|
+
* @default 90
|
|
802
|
+
*/
|
|
803
|
+
radiusDisplayAngle: z.ZodNumber;
|
|
804
|
+
/**
|
|
805
|
+
* The unit of the radius used when the `radiusMarker` is `true`.
|
|
806
|
+
*
|
|
807
|
+
* A value of `null` means that the unit matches the user's locale.
|
|
808
|
+
*
|
|
809
|
+
* @default null
|
|
810
|
+
*/
|
|
811
|
+
radiusDisplayUnit: z.ZodNullable<z.ZodEnum<["meter", "kilometer", "foot", "mile"]>>;
|
|
812
|
+
/**
|
|
813
|
+
* The opacity of the circle's fill.
|
|
814
|
+
*
|
|
815
|
+
* @default 0.25
|
|
816
|
+
*/
|
|
817
|
+
fillOpacity: z.ZodNumber;
|
|
818
|
+
}>, "type" | "center" | "radius">>, "id">, "strip", z.ZodTypeAny, {
|
|
175
819
|
type: "Circle";
|
|
176
|
-
|
|
820
|
+
center: [number, number];
|
|
177
821
|
radius: number;
|
|
178
822
|
groupId?: string | null | undefined;
|
|
179
823
|
color?: string | undefined;
|
|
@@ -186,12 +830,12 @@ declare const CircleCreateSchema: z.ZodObject<Omit<{
|
|
|
186
830
|
strokeWidth?: number | undefined;
|
|
187
831
|
strokeStyle?: "solid" | "dashed" | "dotted" | undefined;
|
|
188
832
|
fillOpacity?: number | undefined;
|
|
833
|
+
radiusMarker?: boolean | undefined;
|
|
189
834
|
radiusDisplayAngle?: number | undefined;
|
|
190
835
|
radiusDisplayUnit?: "meter" | "kilometer" | "foot" | "mile" | null | undefined;
|
|
191
|
-
radiusMarker?: boolean | undefined;
|
|
192
836
|
}, {
|
|
193
837
|
type: "Circle";
|
|
194
|
-
|
|
838
|
+
center: [number, number];
|
|
195
839
|
radius: number;
|
|
196
840
|
groupId?: string | null | undefined;
|
|
197
841
|
color?: string | undefined;
|
|
@@ -204,24 +848,112 @@ declare const CircleCreateSchema: z.ZodObject<Omit<{
|
|
|
204
848
|
strokeWidth?: number | undefined;
|
|
205
849
|
strokeStyle?: "solid" | "dashed" | "dotted" | undefined;
|
|
206
850
|
fillOpacity?: number | undefined;
|
|
851
|
+
radiusMarker?: boolean | undefined;
|
|
207
852
|
radiusDisplayAngle?: number | undefined;
|
|
208
853
|
radiusDisplayUnit?: "meter" | "kilometer" | "foot" | "mile" | null | undefined;
|
|
209
|
-
radiusMarker?: boolean | undefined;
|
|
210
854
|
}>;
|
|
211
|
-
declare const MarkerCreateSchema: z.ZodObject<Omit<{
|
|
212
|
-
type: z.ZodLiteral<"Marker">;
|
|
213
|
-
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">;
|
|
855
|
+
declare const MarkerCreateSchema: z.ZodObject<Omit<z.objectUtil.extendShape<{
|
|
214
856
|
id: z.ZodOptional<z.ZodString>;
|
|
215
857
|
groupId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
216
858
|
color: z.ZodOptional<z.ZodString>;
|
|
217
|
-
name: z.ZodOptional<z.
|
|
218
|
-
description: z.ZodOptional<z.
|
|
859
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
860
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
219
861
|
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
220
862
|
interaction: z.ZodOptional<z.ZodOptional<z.ZodEnum<["default", "locked"]>>>;
|
|
863
|
+
type: z.ZodOptional<z.ZodLiteral<"Marker">>;
|
|
864
|
+
coordinates: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">>;
|
|
221
865
|
opacity: z.ZodOptional<z.ZodNumber>;
|
|
222
866
|
size: z.ZodOptional<z.ZodNumber>;
|
|
223
867
|
zoom: z.ZodOptional<z.ZodNumber>;
|
|
224
|
-
},
|
|
868
|
+
}, Pick<z.objectUtil.extendShape<{
|
|
869
|
+
/**
|
|
870
|
+
* The unique identifier for the element.
|
|
871
|
+
*/
|
|
872
|
+
id: z.ZodString;
|
|
873
|
+
/**
|
|
874
|
+
* The ID of the element group that the element belongs to.
|
|
875
|
+
* For elements that are not part of a group, this will be null.
|
|
876
|
+
*/
|
|
877
|
+
groupId: z.ZodNullable<z.ZodString>;
|
|
878
|
+
/**
|
|
879
|
+
* The color of the element in some CSS-like format.
|
|
880
|
+
*
|
|
881
|
+
* @example
|
|
882
|
+
* ```typescript
|
|
883
|
+
* "#ABC123";
|
|
884
|
+
* "rgb(255, 0, 0)";
|
|
885
|
+
* "hsl(200, 100%, 50%)";
|
|
886
|
+
* ```
|
|
887
|
+
*
|
|
888
|
+
* @default "#C93535"
|
|
889
|
+
*/
|
|
890
|
+
color: z.ZodString;
|
|
891
|
+
/**
|
|
892
|
+
* The element's name. For elements that can show a label or text on
|
|
893
|
+
* the map (e.g. a Place or Text element) this is the text that will be shown.
|
|
894
|
+
*
|
|
895
|
+
* For elements such as Polygons or Paths, the name is what is shown when
|
|
896
|
+
* the element is selected by clicking on it.
|
|
897
|
+
*/
|
|
898
|
+
name: z.ZodNullable<z.ZodString>;
|
|
899
|
+
/**
|
|
900
|
+
* Text describing the element, which is shown in an element's popup when it
|
|
901
|
+
* is selected.
|
|
902
|
+
*
|
|
903
|
+
* Note that some elements are not selectable on the map, such as Notes, Text
|
|
904
|
+
* and Markers, so their description will not be shown.
|
|
905
|
+
*/
|
|
906
|
+
description: z.ZodNullable<z.ZodString>;
|
|
907
|
+
/**
|
|
908
|
+
* A set of key-value pairs that can be used to store arbitrary data about the element.
|
|
909
|
+
*
|
|
910
|
+
* This is most useful for associating additional data with an element that is not
|
|
911
|
+
* part of the element's core data, such as a Place's address or some other
|
|
912
|
+
* data.
|
|
913
|
+
*/
|
|
914
|
+
attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
915
|
+
/**
|
|
916
|
+
* Whether the element is interactive.
|
|
917
|
+
*
|
|
918
|
+
* The `default` interaction mode means that the element can be selected and edited by
|
|
919
|
+
* the user, if it was created by the SDK or by the user using a tool.
|
|
920
|
+
*
|
|
921
|
+
* If the interaction mode is `locked`, the element will not be editable by the user,
|
|
922
|
+
* which is often used for elements that you don't want the user to edit or move by
|
|
923
|
+
* accident.
|
|
924
|
+
*
|
|
925
|
+
* Elements that were created by the map author (i.e. not during an SDK "session") are
|
|
926
|
+
* not editable and have special behaviour depending on their name, description and
|
|
927
|
+
* attributes.
|
|
928
|
+
*
|
|
929
|
+
* @default "default"
|
|
930
|
+
*/
|
|
931
|
+
interaction: z.ZodOptional<z.ZodEnum<["default", "locked"]>>;
|
|
932
|
+
}, {
|
|
933
|
+
type: z.ZodLiteral<"Marker">;
|
|
934
|
+
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">;
|
|
935
|
+
/**
|
|
936
|
+
* The opacity of the marker, between 0 and 1.
|
|
937
|
+
*
|
|
938
|
+
* @default 1
|
|
939
|
+
*/
|
|
940
|
+
opacity: z.ZodNumber;
|
|
941
|
+
/**
|
|
942
|
+
* The size of the marker, used in conjunction with the `zoom` to determine
|
|
943
|
+
* the actual size of the marker.
|
|
944
|
+
*
|
|
945
|
+
* @default 10
|
|
946
|
+
*/
|
|
947
|
+
size: z.ZodNumber;
|
|
948
|
+
/**
|
|
949
|
+
* The zoom level at which the marker was created. This is combined with
|
|
950
|
+
* the `size` to determine the actual size of the marker.
|
|
951
|
+
*
|
|
952
|
+
* When creating a marker, if you don't supply this value it defaults to
|
|
953
|
+
* the current zoom of the map when you call `createElement`.
|
|
954
|
+
*/
|
|
955
|
+
zoom: z.ZodNumber;
|
|
956
|
+
}>, "type" | "coordinates">>, "id">, "strip", z.ZodTypeAny, {
|
|
225
957
|
type: "Marker";
|
|
226
958
|
coordinates: [number, number][][];
|
|
227
959
|
groupId?: string | null | undefined;
|
|
@@ -246,20 +978,106 @@ declare const MarkerCreateSchema: z.ZodObject<Omit<{
|
|
|
246
978
|
size?: number | undefined;
|
|
247
979
|
zoom?: number | undefined;
|
|
248
980
|
}>;
|
|
249
|
-
declare const HighlighterCreateSchema: z.ZodObject<Omit<{
|
|
250
|
-
type: z.ZodLiteral<"Highlighter">;
|
|
251
|
-
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">;
|
|
981
|
+
declare const HighlighterCreateSchema: z.ZodObject<Omit<z.objectUtil.extendShape<{
|
|
252
982
|
id: z.ZodOptional<z.ZodString>;
|
|
253
983
|
groupId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
254
984
|
color: z.ZodOptional<z.ZodString>;
|
|
255
|
-
name: z.ZodOptional<z.
|
|
256
|
-
description: z.ZodOptional<z.
|
|
985
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
986
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
257
987
|
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
258
988
|
interaction: z.ZodOptional<z.ZodOptional<z.ZodEnum<["default", "locked"]>>>;
|
|
989
|
+
type: z.ZodOptional<z.ZodLiteral<"Highlighter">>;
|
|
990
|
+
coordinates: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">, "many">>;
|
|
991
|
+
renderHoles: z.ZodOptional<z.ZodBoolean>;
|
|
259
992
|
opacity: z.ZodOptional<z.ZodNumber>;
|
|
260
|
-
},
|
|
993
|
+
}, Pick<z.objectUtil.extendShape<{
|
|
994
|
+
/**
|
|
995
|
+
* The unique identifier for the element.
|
|
996
|
+
*/
|
|
997
|
+
id: z.ZodString;
|
|
998
|
+
/**
|
|
999
|
+
* The ID of the element group that the element belongs to.
|
|
1000
|
+
* For elements that are not part of a group, this will be null.
|
|
1001
|
+
*/
|
|
1002
|
+
groupId: z.ZodNullable<z.ZodString>;
|
|
1003
|
+
/**
|
|
1004
|
+
* The color of the element in some CSS-like format.
|
|
1005
|
+
*
|
|
1006
|
+
* @example
|
|
1007
|
+
* ```typescript
|
|
1008
|
+
* "#ABC123";
|
|
1009
|
+
* "rgb(255, 0, 0)";
|
|
1010
|
+
* "hsl(200, 100%, 50%)";
|
|
1011
|
+
* ```
|
|
1012
|
+
*
|
|
1013
|
+
* @default "#C93535"
|
|
1014
|
+
*/
|
|
1015
|
+
color: z.ZodString;
|
|
1016
|
+
/**
|
|
1017
|
+
* The element's name. For elements that can show a label or text on
|
|
1018
|
+
* the map (e.g. a Place or Text element) this is the text that will be shown.
|
|
1019
|
+
*
|
|
1020
|
+
* For elements such as Polygons or Paths, the name is what is shown when
|
|
1021
|
+
* the element is selected by clicking on it.
|
|
1022
|
+
*/
|
|
1023
|
+
name: z.ZodNullable<z.ZodString>;
|
|
1024
|
+
/**
|
|
1025
|
+
* Text describing the element, which is shown in an element's popup when it
|
|
1026
|
+
* is selected.
|
|
1027
|
+
*
|
|
1028
|
+
* Note that some elements are not selectable on the map, such as Notes, Text
|
|
1029
|
+
* and Markers, so their description will not be shown.
|
|
1030
|
+
*/
|
|
1031
|
+
description: z.ZodNullable<z.ZodString>;
|
|
1032
|
+
/**
|
|
1033
|
+
* A set of key-value pairs that can be used to store arbitrary data about the element.
|
|
1034
|
+
*
|
|
1035
|
+
* This is most useful for associating additional data with an element that is not
|
|
1036
|
+
* part of the element's core data, such as a Place's address or some other
|
|
1037
|
+
* data.
|
|
1038
|
+
*/
|
|
1039
|
+
attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1040
|
+
/**
|
|
1041
|
+
* Whether the element is interactive.
|
|
1042
|
+
*
|
|
1043
|
+
* The `default` interaction mode means that the element can be selected and edited by
|
|
1044
|
+
* the user, if it was created by the SDK or by the user using a tool.
|
|
1045
|
+
*
|
|
1046
|
+
* If the interaction mode is `locked`, the element will not be editable by the user,
|
|
1047
|
+
* which is often used for elements that you don't want the user to edit or move by
|
|
1048
|
+
* accident.
|
|
1049
|
+
*
|
|
1050
|
+
* Elements that were created by the map author (i.e. not during an SDK "session") are
|
|
1051
|
+
* not editable and have special behaviour depending on their name, description and
|
|
1052
|
+
* attributes.
|
|
1053
|
+
*
|
|
1054
|
+
* @default "default"
|
|
1055
|
+
*/
|
|
1056
|
+
interaction: z.ZodOptional<z.ZodEnum<["default", "locked"]>>;
|
|
1057
|
+
}, {
|
|
1058
|
+
type: z.ZodLiteral<"Highlighter">;
|
|
1059
|
+
/**
|
|
1060
|
+
* A multipolygon describing the area that is highlighted.
|
|
1061
|
+
*
|
|
1062
|
+
* If `renderHoles` is set to false, only the outer ring of each polygon
|
|
1063
|
+
* will be rendered, filling in the area inside the highlighted region.
|
|
1064
|
+
*/
|
|
1065
|
+
coordinates: z.ZodArray<z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">, "many">;
|
|
1066
|
+
/**
|
|
1067
|
+
* Whether to render the holes of the highlighted area.
|
|
1068
|
+
*
|
|
1069
|
+
* @default false
|
|
1070
|
+
*/
|
|
1071
|
+
renderHoles: z.ZodBoolean;
|
|
1072
|
+
/**
|
|
1073
|
+
* The opacity of the highlighter, between 0 and 1.
|
|
1074
|
+
*
|
|
1075
|
+
* @default 0.5
|
|
1076
|
+
*/
|
|
1077
|
+
opacity: z.ZodNumber;
|
|
1078
|
+
}>, "type" | "coordinates">>, "id">, "strip", z.ZodTypeAny, {
|
|
261
1079
|
type: "Highlighter";
|
|
262
|
-
coordinates: [number, number][][];
|
|
1080
|
+
coordinates: [number, number][][][];
|
|
263
1081
|
groupId?: string | null | undefined;
|
|
264
1082
|
color?: string | undefined;
|
|
265
1083
|
name?: string | null | undefined;
|
|
@@ -267,9 +1085,10 @@ declare const HighlighterCreateSchema: z.ZodObject<Omit<{
|
|
|
267
1085
|
attributes?: Record<string, unknown> | undefined;
|
|
268
1086
|
interaction?: "default" | "locked" | undefined;
|
|
269
1087
|
opacity?: number | undefined;
|
|
1088
|
+
renderHoles?: boolean | undefined;
|
|
270
1089
|
}, {
|
|
271
1090
|
type: "Highlighter";
|
|
272
|
-
coordinates: [number, number][][];
|
|
1091
|
+
coordinates: [number, number][][][];
|
|
273
1092
|
groupId?: string | null | undefined;
|
|
274
1093
|
color?: string | undefined;
|
|
275
1094
|
name?: string | null | undefined;
|
|
@@ -277,25 +1096,29 @@ declare const HighlighterCreateSchema: z.ZodObject<Omit<{
|
|
|
277
1096
|
attributes?: Record<string, unknown> | undefined;
|
|
278
1097
|
interaction?: "default" | "locked" | undefined;
|
|
279
1098
|
opacity?: number | undefined;
|
|
1099
|
+
renderHoles?: boolean | undefined;
|
|
280
1100
|
}>;
|
|
281
|
-
declare const TextCreateSchema: z.ZodObject<
|
|
282
|
-
type: z.ZodLiteral<"Text">;
|
|
283
|
-
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">;
|
|
1101
|
+
declare const TextCreateSchema: z.ZodObject<z.objectUtil.extendShape<Omit<{
|
|
284
1102
|
id: z.ZodOptional<z.ZodString>;
|
|
285
1103
|
groupId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
286
1104
|
color: z.ZodOptional<z.ZodString>;
|
|
287
|
-
|
|
288
|
-
description: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
|
|
1105
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
289
1106
|
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
290
1107
|
interaction: z.ZodOptional<z.ZodOptional<z.ZodEnum<["default", "locked"]>>>;
|
|
291
|
-
zoom: z.ZodOptional<z.ZodNumber>;
|
|
292
1108
|
position: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
|
|
293
1109
|
rotation: z.ZodOptional<z.ZodNumber>;
|
|
294
1110
|
scale: z.ZodOptional<z.ZodNumber>;
|
|
295
|
-
|
|
1111
|
+
zoom: z.ZodOptional<z.ZodNumber>;
|
|
1112
|
+
coordinates: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">>;
|
|
1113
|
+
text: z.ZodOptional<z.ZodString>;
|
|
296
1114
|
align: z.ZodOptional<z.ZodEnum<["left", "center", "right"]>>;
|
|
297
1115
|
style: z.ZodOptional<z.ZodEnum<["italic", "light", "regular", "caps"]>>;
|
|
298
|
-
|
|
1116
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1117
|
+
type: z.ZodOptional<z.ZodLiteral<"Text">>;
|
|
1118
|
+
}, "type" | "coordinates" | "id" | "name">, {
|
|
1119
|
+
type: z.ZodLiteral<"Text">;
|
|
1120
|
+
text: z.ZodString;
|
|
1121
|
+
}>, "strip", z.ZodTypeAny, {
|
|
299
1122
|
type: "Text";
|
|
300
1123
|
text: string;
|
|
301
1124
|
groupId?: string | null | undefined;
|
|
@@ -307,7 +1130,7 @@ declare const TextCreateSchema: z.ZodObject<Omit<Omit<{
|
|
|
307
1130
|
position?: [number, number] | undefined;
|
|
308
1131
|
rotation?: number | undefined;
|
|
309
1132
|
scale?: number | undefined;
|
|
310
|
-
align?: "
|
|
1133
|
+
align?: "center" | "left" | "right" | undefined;
|
|
311
1134
|
style?: "italic" | "light" | "regular" | "caps" | undefined;
|
|
312
1135
|
}, {
|
|
313
1136
|
type: "Text";
|
|
@@ -321,28 +1144,31 @@ declare const TextCreateSchema: z.ZodObject<Omit<Omit<{
|
|
|
321
1144
|
position?: [number, number] | undefined;
|
|
322
1145
|
rotation?: number | undefined;
|
|
323
1146
|
scale?: number | undefined;
|
|
324
|
-
align?: "
|
|
1147
|
+
align?: "center" | "left" | "right" | undefined;
|
|
325
1148
|
style?: "italic" | "light" | "regular" | "caps" | undefined;
|
|
326
1149
|
}>;
|
|
327
|
-
declare const NoteCreateSchema: z.ZodObject<
|
|
328
|
-
type: z.ZodLiteral<"Note">;
|
|
329
|
-
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">;
|
|
1150
|
+
declare const NoteCreateSchema: z.ZodObject<z.objectUtil.extendShape<Omit<{
|
|
330
1151
|
id: z.ZodOptional<z.ZodString>;
|
|
331
1152
|
groupId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
332
1153
|
color: z.ZodOptional<z.ZodString>;
|
|
333
|
-
|
|
334
|
-
description: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
|
|
1154
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
335
1155
|
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
336
1156
|
interaction: z.ZodOptional<z.ZodOptional<z.ZodEnum<["default", "locked"]>>>;
|
|
337
|
-
zoom: z.ZodOptional<z.ZodNumber>;
|
|
338
1157
|
position: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
|
|
339
1158
|
rotation: z.ZodOptional<z.ZodNumber>;
|
|
340
1159
|
scale: z.ZodOptional<z.ZodNumber>;
|
|
341
|
-
|
|
1160
|
+
zoom: z.ZodOptional<z.ZodNumber>;
|
|
1161
|
+
coordinates: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">>;
|
|
1162
|
+
text: z.ZodOptional<z.ZodString>;
|
|
342
1163
|
align: z.ZodOptional<z.ZodEnum<["left", "center", "right"]>>;
|
|
343
1164
|
style: z.ZodOptional<z.ZodEnum<["italic", "light", "regular", "caps"]>>;
|
|
1165
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1166
|
+
type: z.ZodOptional<z.ZodLiteral<"Note">>;
|
|
344
1167
|
widthScale: z.ZodOptional<z.ZodNumber>;
|
|
345
|
-
}, "
|
|
1168
|
+
}, "type" | "coordinates" | "id" | "name">, {
|
|
1169
|
+
type: z.ZodLiteral<"Note">;
|
|
1170
|
+
text: z.ZodString;
|
|
1171
|
+
}>, "strip", z.ZodTypeAny, {
|
|
346
1172
|
type: "Note";
|
|
347
1173
|
text: string;
|
|
348
1174
|
groupId?: string | null | undefined;
|
|
@@ -354,7 +1180,7 @@ declare const NoteCreateSchema: z.ZodObject<Omit<Omit<{
|
|
|
354
1180
|
position?: [number, number] | undefined;
|
|
355
1181
|
rotation?: number | undefined;
|
|
356
1182
|
scale?: number | undefined;
|
|
357
|
-
align?: "
|
|
1183
|
+
align?: "center" | "left" | "right" | undefined;
|
|
358
1184
|
style?: "italic" | "light" | "regular" | "caps" | undefined;
|
|
359
1185
|
widthScale?: number | undefined;
|
|
360
1186
|
}, {
|
|
@@ -369,22 +1195,99 @@ declare const NoteCreateSchema: z.ZodObject<Omit<Omit<{
|
|
|
369
1195
|
position?: [number, number] | undefined;
|
|
370
1196
|
rotation?: number | undefined;
|
|
371
1197
|
scale?: number | undefined;
|
|
372
|
-
align?: "
|
|
1198
|
+
align?: "center" | "left" | "right" | undefined;
|
|
373
1199
|
style?: "italic" | "light" | "regular" | "caps" | undefined;
|
|
374
1200
|
widthScale?: number | undefined;
|
|
375
1201
|
}>;
|
|
376
|
-
declare const ImageCreateSchema: z.ZodObject<Omit<{
|
|
377
|
-
type: z.ZodLiteral<"Image"
|
|
378
|
-
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many"
|
|
1202
|
+
declare const ImageCreateSchema: z.ZodObject<Omit<z.objectUtil.extendShape<{
|
|
1203
|
+
type: z.ZodOptional<z.ZodLiteral<"Image">>;
|
|
1204
|
+
coordinates: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">>;
|
|
379
1205
|
id: z.ZodOptional<z.ZodString>;
|
|
380
1206
|
groupId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
381
|
-
name: z.ZodOptional<z.
|
|
382
|
-
description: z.ZodOptional<z.
|
|
1207
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1208
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
383
1209
|
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
384
1210
|
interaction: z.ZodOptional<z.ZodOptional<z.ZodEnum<["default", "locked"]>>>;
|
|
385
|
-
imageUrl: z.ZodString
|
|
1211
|
+
imageUrl: z.ZodOptional<z.ZodString>;
|
|
386
1212
|
opacity: z.ZodOptional<z.ZodNumber>;
|
|
387
|
-
},
|
|
1213
|
+
}, Pick<Omit<z.objectUtil.extendShape<{
|
|
1214
|
+
/**
|
|
1215
|
+
* The unique identifier for the element.
|
|
1216
|
+
*/
|
|
1217
|
+
id: z.ZodString;
|
|
1218
|
+
/**
|
|
1219
|
+
* The ID of the element group that the element belongs to.
|
|
1220
|
+
* For elements that are not part of a group, this will be null.
|
|
1221
|
+
*/
|
|
1222
|
+
groupId: z.ZodNullable<z.ZodString>;
|
|
1223
|
+
/**
|
|
1224
|
+
* The color of the element in some CSS-like format.
|
|
1225
|
+
*
|
|
1226
|
+
* @example
|
|
1227
|
+
* ```typescript
|
|
1228
|
+
* "#ABC123";
|
|
1229
|
+
* "rgb(255, 0, 0)";
|
|
1230
|
+
* "hsl(200, 100%, 50%)";
|
|
1231
|
+
* ```
|
|
1232
|
+
*
|
|
1233
|
+
* @default "#C93535"
|
|
1234
|
+
*/
|
|
1235
|
+
color: z.ZodString;
|
|
1236
|
+
/**
|
|
1237
|
+
* The element's name. For elements that can show a label or text on
|
|
1238
|
+
* the map (e.g. a Place or Text element) this is the text that will be shown.
|
|
1239
|
+
*
|
|
1240
|
+
* For elements such as Polygons or Paths, the name is what is shown when
|
|
1241
|
+
* the element is selected by clicking on it.
|
|
1242
|
+
*/
|
|
1243
|
+
name: z.ZodNullable<z.ZodString>;
|
|
1244
|
+
/**
|
|
1245
|
+
* Text describing the element, which is shown in an element's popup when it
|
|
1246
|
+
* is selected.
|
|
1247
|
+
*
|
|
1248
|
+
* Note that some elements are not selectable on the map, such as Notes, Text
|
|
1249
|
+
* and Markers, so their description will not be shown.
|
|
1250
|
+
*/
|
|
1251
|
+
description: z.ZodNullable<z.ZodString>;
|
|
1252
|
+
/**
|
|
1253
|
+
* A set of key-value pairs that can be used to store arbitrary data about the element.
|
|
1254
|
+
*
|
|
1255
|
+
* This is most useful for associating additional data with an element that is not
|
|
1256
|
+
* part of the element's core data, such as a Place's address or some other
|
|
1257
|
+
* data.
|
|
1258
|
+
*/
|
|
1259
|
+
attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1260
|
+
/**
|
|
1261
|
+
* Whether the element is interactive.
|
|
1262
|
+
*
|
|
1263
|
+
* The `default` interaction mode means that the element can be selected and edited by
|
|
1264
|
+
* the user, if it was created by the SDK or by the user using a tool.
|
|
1265
|
+
*
|
|
1266
|
+
* If the interaction mode is `locked`, the element will not be editable by the user,
|
|
1267
|
+
* which is often used for elements that you don't want the user to edit or move by
|
|
1268
|
+
* accident.
|
|
1269
|
+
*
|
|
1270
|
+
* Elements that were created by the map author (i.e. not during an SDK "session") are
|
|
1271
|
+
* not editable and have special behaviour depending on their name, description and
|
|
1272
|
+
* attributes.
|
|
1273
|
+
*
|
|
1274
|
+
* @default "default"
|
|
1275
|
+
*/
|
|
1276
|
+
interaction: z.ZodOptional<z.ZodEnum<["default", "locked"]>>;
|
|
1277
|
+
}, {
|
|
1278
|
+
type: z.ZodLiteral<"Image">;
|
|
1279
|
+
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">;
|
|
1280
|
+
/**
|
|
1281
|
+
* The URL of the image that is rendered in this element
|
|
1282
|
+
*/
|
|
1283
|
+
imageUrl: z.ZodString;
|
|
1284
|
+
/**
|
|
1285
|
+
* The opacity of the image, between 0 and 1.
|
|
1286
|
+
*
|
|
1287
|
+
* @default 1
|
|
1288
|
+
*/
|
|
1289
|
+
opacity: z.ZodNumber;
|
|
1290
|
+
}>, "color">, "type" | "coordinates" | "imageUrl">>, "id">, "strip", z.ZodTypeAny, {
|
|
388
1291
|
type: "Image";
|
|
389
1292
|
coordinates: [number, number][][];
|
|
390
1293
|
imageUrl: string;
|
|
@@ -406,20 +1309,103 @@ declare const ImageCreateSchema: z.ZodObject<Omit<{
|
|
|
406
1309
|
opacity?: number | undefined;
|
|
407
1310
|
}>;
|
|
408
1311
|
declare const PlaceReadSchema: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
1312
|
+
/**
|
|
1313
|
+
* The unique identifier for the element.
|
|
1314
|
+
*/
|
|
409
1315
|
id: z.ZodString;
|
|
1316
|
+
/**
|
|
1317
|
+
* The ID of the element group that the element belongs to.
|
|
1318
|
+
* For elements that are not part of a group, this will be null.
|
|
1319
|
+
*/
|
|
410
1320
|
groupId: z.ZodNullable<z.ZodString>;
|
|
1321
|
+
/**
|
|
1322
|
+
* The color of the element in some CSS-like format.
|
|
1323
|
+
*
|
|
1324
|
+
* @example
|
|
1325
|
+
* ```typescript
|
|
1326
|
+
* "#ABC123";
|
|
1327
|
+
* "rgb(255, 0, 0)";
|
|
1328
|
+
* "hsl(200, 100%, 50%)";
|
|
1329
|
+
* ```
|
|
1330
|
+
*
|
|
1331
|
+
* @default "#C93535"
|
|
1332
|
+
*/
|
|
411
1333
|
color: z.ZodString;
|
|
412
|
-
|
|
413
|
-
|
|
1334
|
+
/**
|
|
1335
|
+
* The element's name. For elements that can show a label or text on
|
|
1336
|
+
* the map (e.g. a Place or Text element) this is the text that will be shown.
|
|
1337
|
+
*
|
|
1338
|
+
* For elements such as Polygons or Paths, the name is what is shown when
|
|
1339
|
+
* the element is selected by clicking on it.
|
|
1340
|
+
*/
|
|
1341
|
+
name: z.ZodNullable<z.ZodString>;
|
|
1342
|
+
/**
|
|
1343
|
+
* Text describing the element, which is shown in an element's popup when it
|
|
1344
|
+
* is selected.
|
|
1345
|
+
*
|
|
1346
|
+
* Note that some elements are not selectable on the map, such as Notes, Text
|
|
1347
|
+
* and Markers, so their description will not be shown.
|
|
1348
|
+
*/
|
|
1349
|
+
description: z.ZodNullable<z.ZodString>;
|
|
1350
|
+
/**
|
|
1351
|
+
* A set of key-value pairs that can be used to store arbitrary data about the element.
|
|
1352
|
+
*
|
|
1353
|
+
* This is most useful for associating additional data with an element that is not
|
|
1354
|
+
* part of the element's core data, such as a Place's address or some other
|
|
1355
|
+
* data.
|
|
1356
|
+
*/
|
|
414
1357
|
attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1358
|
+
/**
|
|
1359
|
+
* Whether the element is interactive.
|
|
1360
|
+
*
|
|
1361
|
+
* The `default` interaction mode means that the element can be selected and edited by
|
|
1362
|
+
* the user, if it was created by the SDK or by the user using a tool.
|
|
1363
|
+
*
|
|
1364
|
+
* If the interaction mode is `locked`, the element will not be editable by the user,
|
|
1365
|
+
* which is often used for elements that you don't want the user to edit or move by
|
|
1366
|
+
* accident.
|
|
1367
|
+
*
|
|
1368
|
+
* Elements that were created by the map author (i.e. not during an SDK "session") are
|
|
1369
|
+
* not editable and have special behaviour depending on their name, description and
|
|
1370
|
+
* attributes.
|
|
1371
|
+
*
|
|
1372
|
+
* @default "default"
|
|
1373
|
+
*/
|
|
415
1374
|
interaction: z.ZodOptional<z.ZodEnum<["default", "locked"]>>;
|
|
416
1375
|
}, {
|
|
1376
|
+
/**
|
|
1377
|
+
* The URL of an image that has been added to the element.
|
|
1378
|
+
*/
|
|
417
1379
|
imageUrl: z.ZodNullable<z.ZodString>;
|
|
418
1380
|
}>, {
|
|
419
1381
|
type: z.ZodLiteral<"Place">;
|
|
420
1382
|
coordinates: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
1383
|
+
/**
|
|
1384
|
+
* The symbol that is rendered for the Place.
|
|
1385
|
+
*
|
|
1386
|
+
* This can be an emoji by using colon-enclosed characters (e.g. `":smiley:"`)
|
|
1387
|
+
* or one of the symbols available in Felt's symbol library.
|
|
1388
|
+
*
|
|
1389
|
+
* You can see the available symbols in the Felt UI when editing a Place
|
|
1390
|
+
* by hovering a symbol and converting the tooltip to kebab-case. For example,
|
|
1391
|
+
* the "Oil barrel" symbol is `oil-barrel`.
|
|
1392
|
+
*/
|
|
421
1393
|
symbol: z.ZodString;
|
|
1394
|
+
/**
|
|
1395
|
+
* The frame that is rendered around the Place's symbol. This is
|
|
1396
|
+
* only available for non-emoji symbols.
|
|
1397
|
+
*/
|
|
422
1398
|
frame: z.ZodNullable<z.ZodEnum<["frame-circle", "frame-square"]>>;
|
|
1399
|
+
/**
|
|
1400
|
+
* Whether the element's label is hidden on the map. This allows you
|
|
1401
|
+
* to add a name to the element and can show in popups, but not have
|
|
1402
|
+
* it visible on the map.
|
|
1403
|
+
*
|
|
1404
|
+
* This will also hide the faint placeholder label that is shown when
|
|
1405
|
+
* an editable Place is selected.
|
|
1406
|
+
*
|
|
1407
|
+
* @default false
|
|
1408
|
+
*/
|
|
423
1409
|
hideLabel: z.ZodBoolean;
|
|
424
1410
|
}>, "strip", z.ZodTypeAny, {
|
|
425
1411
|
symbol: string;
|
|
@@ -451,25 +1437,119 @@ declare const PlaceReadSchema: z.ZodObject<z.objectUtil.extendShape<z.objectUtil
|
|
|
451
1437
|
interaction?: "default" | "locked" | undefined;
|
|
452
1438
|
}>;
|
|
453
1439
|
declare const PathReadSchema: z.ZodObject<Omit<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
1440
|
+
/**
|
|
1441
|
+
* The unique identifier for the element.
|
|
1442
|
+
*/
|
|
454
1443
|
id: z.ZodString;
|
|
1444
|
+
/**
|
|
1445
|
+
* The ID of the element group that the element belongs to.
|
|
1446
|
+
* For elements that are not part of a group, this will be null.
|
|
1447
|
+
*/
|
|
455
1448
|
groupId: z.ZodNullable<z.ZodString>;
|
|
1449
|
+
/**
|
|
1450
|
+
* The color of the element in some CSS-like format.
|
|
1451
|
+
*
|
|
1452
|
+
* @example
|
|
1453
|
+
* ```typescript
|
|
1454
|
+
* "#ABC123";
|
|
1455
|
+
* "rgb(255, 0, 0)";
|
|
1456
|
+
* "hsl(200, 100%, 50%)";
|
|
1457
|
+
* ```
|
|
1458
|
+
*
|
|
1459
|
+
* @default "#C93535"
|
|
1460
|
+
*/
|
|
456
1461
|
color: z.ZodString;
|
|
457
|
-
|
|
458
|
-
|
|
1462
|
+
/**
|
|
1463
|
+
* The element's name. For elements that can show a label or text on
|
|
1464
|
+
* the map (e.g. a Place or Text element) this is the text that will be shown.
|
|
1465
|
+
*
|
|
1466
|
+
* For elements such as Polygons or Paths, the name is what is shown when
|
|
1467
|
+
* the element is selected by clicking on it.
|
|
1468
|
+
*/
|
|
1469
|
+
name: z.ZodNullable<z.ZodString>;
|
|
1470
|
+
/**
|
|
1471
|
+
* Text describing the element, which is shown in an element's popup when it
|
|
1472
|
+
* is selected.
|
|
1473
|
+
*
|
|
1474
|
+
* Note that some elements are not selectable on the map, such as Notes, Text
|
|
1475
|
+
* and Markers, so their description will not be shown.
|
|
1476
|
+
*/
|
|
1477
|
+
description: z.ZodNullable<z.ZodString>;
|
|
1478
|
+
/**
|
|
1479
|
+
* A set of key-value pairs that can be used to store arbitrary data about the element.
|
|
1480
|
+
*
|
|
1481
|
+
* This is most useful for associating additional data with an element that is not
|
|
1482
|
+
* part of the element's core data, such as a Place's address or some other
|
|
1483
|
+
* data.
|
|
1484
|
+
*/
|
|
459
1485
|
attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1486
|
+
/**
|
|
1487
|
+
* Whether the element is interactive.
|
|
1488
|
+
*
|
|
1489
|
+
* The `default` interaction mode means that the element can be selected and edited by
|
|
1490
|
+
* the user, if it was created by the SDK or by the user using a tool.
|
|
1491
|
+
*
|
|
1492
|
+
* If the interaction mode is `locked`, the element will not be editable by the user,
|
|
1493
|
+
* which is often used for elements that you don't want the user to edit or move by
|
|
1494
|
+
* accident.
|
|
1495
|
+
*
|
|
1496
|
+
* Elements that were created by the map author (i.e. not during an SDK "session") are
|
|
1497
|
+
* not editable and have special behaviour depending on their name, description and
|
|
1498
|
+
* attributes.
|
|
1499
|
+
*
|
|
1500
|
+
* @default "default"
|
|
1501
|
+
*/
|
|
460
1502
|
interaction: z.ZodOptional<z.ZodEnum<["default", "locked"]>>;
|
|
461
1503
|
}, {
|
|
1504
|
+
/**
|
|
1505
|
+
* The URL of an image that has been added to the element.
|
|
1506
|
+
*/
|
|
462
1507
|
imageUrl: z.ZodNullable<z.ZodString>;
|
|
463
1508
|
}>, {
|
|
1509
|
+
/**
|
|
1510
|
+
* A value between 0 and 1 that describes the opacity of the element's stroke.
|
|
1511
|
+
*
|
|
1512
|
+
* @default 1
|
|
1513
|
+
*/
|
|
464
1514
|
strokeOpacity: z.ZodNumber;
|
|
1515
|
+
/**
|
|
1516
|
+
* The width of the element's stroke in pixels.
|
|
1517
|
+
*
|
|
1518
|
+
* @default 2
|
|
1519
|
+
*/
|
|
465
1520
|
strokeWidth: z.ZodNumber;
|
|
1521
|
+
/**
|
|
1522
|
+
* The style of the element's stroke.
|
|
1523
|
+
*
|
|
1524
|
+
* @default "solid"
|
|
1525
|
+
*/
|
|
466
1526
|
strokeStyle: z.ZodEnum<["solid", "dashed", "dotted"]>;
|
|
467
1527
|
}>, {
|
|
468
1528
|
type: z.ZodLiteral<"Path">;
|
|
469
1529
|
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">;
|
|
1530
|
+
/**
|
|
1531
|
+
* Whether a distance marker is shown at the midpoint of the path.
|
|
1532
|
+
*
|
|
1533
|
+
* @default false
|
|
1534
|
+
*/
|
|
470
1535
|
distanceMarker: z.ZodBoolean;
|
|
471
|
-
|
|
1536
|
+
/**
|
|
1537
|
+
* Whether this represents a route, and if so, what mode of transport
|
|
1538
|
+
* is used.
|
|
1539
|
+
*
|
|
1540
|
+
* If this is `null`, the path is not considered to be a route, so while it
|
|
1541
|
+
* can have a `distanceMarker`, it will does not have a start or end cap.
|
|
1542
|
+
*
|
|
1543
|
+
* @default null
|
|
1544
|
+
*/
|
|
472
1545
|
routingMode: z.ZodNullable<z.ZodEnum<["driving", "cycling", "walking", "flying"]>>;
|
|
1546
|
+
/**
|
|
1547
|
+
* Whether or not to show Start and End caps on the path. This is
|
|
1548
|
+
* only available if the `routingMode` is set.
|
|
1549
|
+
*
|
|
1550
|
+
* @default false
|
|
1551
|
+
*/
|
|
1552
|
+
endCaps: z.ZodBoolean;
|
|
473
1553
|
}>, "coordinates">, "strip", z.ZodTypeAny, {
|
|
474
1554
|
type: "Path";
|
|
475
1555
|
id: string;
|
|
@@ -483,8 +1563,8 @@ declare const PathReadSchema: z.ZodObject<Omit<z.objectUtil.extendShape<z.object
|
|
|
483
1563
|
strokeWidth: number;
|
|
484
1564
|
strokeStyle: "solid" | "dashed" | "dotted";
|
|
485
1565
|
distanceMarker: boolean;
|
|
486
|
-
endCaps: boolean;
|
|
487
1566
|
routingMode: "driving" | "cycling" | "walking" | "flying" | null;
|
|
1567
|
+
endCaps: boolean;
|
|
488
1568
|
interaction?: "default" | "locked" | undefined;
|
|
489
1569
|
}, {
|
|
490
1570
|
type: "Path";
|
|
@@ -499,28 +1579,112 @@ declare const PathReadSchema: z.ZodObject<Omit<z.objectUtil.extendShape<z.object
|
|
|
499
1579
|
strokeWidth: number;
|
|
500
1580
|
strokeStyle: "solid" | "dashed" | "dotted";
|
|
501
1581
|
distanceMarker: boolean;
|
|
502
|
-
endCaps: boolean;
|
|
503
1582
|
routingMode: "driving" | "cycling" | "walking" | "flying" | null;
|
|
1583
|
+
endCaps: boolean;
|
|
504
1584
|
interaction?: "default" | "locked" | undefined;
|
|
505
1585
|
}>;
|
|
506
1586
|
declare const PolygonReadSchema: z.ZodObject<Omit<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
1587
|
+
/**
|
|
1588
|
+
* The unique identifier for the element.
|
|
1589
|
+
*/
|
|
507
1590
|
id: z.ZodString;
|
|
1591
|
+
/**
|
|
1592
|
+
* The ID of the element group that the element belongs to.
|
|
1593
|
+
* For elements that are not part of a group, this will be null.
|
|
1594
|
+
*/
|
|
508
1595
|
groupId: z.ZodNullable<z.ZodString>;
|
|
1596
|
+
/**
|
|
1597
|
+
* The color of the element in some CSS-like format.
|
|
1598
|
+
*
|
|
1599
|
+
* @example
|
|
1600
|
+
* ```typescript
|
|
1601
|
+
* "#ABC123";
|
|
1602
|
+
* "rgb(255, 0, 0)";
|
|
1603
|
+
* "hsl(200, 100%, 50%)";
|
|
1604
|
+
* ```
|
|
1605
|
+
*
|
|
1606
|
+
* @default "#C93535"
|
|
1607
|
+
*/
|
|
509
1608
|
color: z.ZodString;
|
|
510
|
-
|
|
511
|
-
|
|
1609
|
+
/**
|
|
1610
|
+
* The element's name. For elements that can show a label or text on
|
|
1611
|
+
* the map (e.g. a Place or Text element) this is the text that will be shown.
|
|
1612
|
+
*
|
|
1613
|
+
* For elements such as Polygons or Paths, the name is what is shown when
|
|
1614
|
+
* the element is selected by clicking on it.
|
|
1615
|
+
*/
|
|
1616
|
+
name: z.ZodNullable<z.ZodString>;
|
|
1617
|
+
/**
|
|
1618
|
+
* Text describing the element, which is shown in an element's popup when it
|
|
1619
|
+
* is selected.
|
|
1620
|
+
*
|
|
1621
|
+
* Note that some elements are not selectable on the map, such as Notes, Text
|
|
1622
|
+
* and Markers, so their description will not be shown.
|
|
1623
|
+
*/
|
|
1624
|
+
description: z.ZodNullable<z.ZodString>;
|
|
1625
|
+
/**
|
|
1626
|
+
* A set of key-value pairs that can be used to store arbitrary data about the element.
|
|
1627
|
+
*
|
|
1628
|
+
* This is most useful for associating additional data with an element that is not
|
|
1629
|
+
* part of the element's core data, such as a Place's address or some other
|
|
1630
|
+
* data.
|
|
1631
|
+
*/
|
|
512
1632
|
attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1633
|
+
/**
|
|
1634
|
+
* Whether the element is interactive.
|
|
1635
|
+
*
|
|
1636
|
+
* The `default` interaction mode means that the element can be selected and edited by
|
|
1637
|
+
* the user, if it was created by the SDK or by the user using a tool.
|
|
1638
|
+
*
|
|
1639
|
+
* If the interaction mode is `locked`, the element will not be editable by the user,
|
|
1640
|
+
* which is often used for elements that you don't want the user to edit or move by
|
|
1641
|
+
* accident.
|
|
1642
|
+
*
|
|
1643
|
+
* Elements that were created by the map author (i.e. not during an SDK "session") are
|
|
1644
|
+
* not editable and have special behaviour depending on their name, description and
|
|
1645
|
+
* attributes.
|
|
1646
|
+
*
|
|
1647
|
+
* @default "default"
|
|
1648
|
+
*/
|
|
513
1649
|
interaction: z.ZodOptional<z.ZodEnum<["default", "locked"]>>;
|
|
514
1650
|
}, {
|
|
1651
|
+
/**
|
|
1652
|
+
* The URL of an image that has been added to the element.
|
|
1653
|
+
*/
|
|
515
1654
|
imageUrl: z.ZodNullable<z.ZodString>;
|
|
516
1655
|
}>, {
|
|
1656
|
+
/**
|
|
1657
|
+
* A value between 0 and 1 that describes the opacity of the element's stroke.
|
|
1658
|
+
*
|
|
1659
|
+
* @default 1
|
|
1660
|
+
*/
|
|
517
1661
|
strokeOpacity: z.ZodNumber;
|
|
1662
|
+
/**
|
|
1663
|
+
* The width of the element's stroke in pixels.
|
|
1664
|
+
*
|
|
1665
|
+
* @default 2
|
|
1666
|
+
*/
|
|
518
1667
|
strokeWidth: z.ZodNumber;
|
|
1668
|
+
/**
|
|
1669
|
+
* The style of the element's stroke.
|
|
1670
|
+
*
|
|
1671
|
+
* @default "solid"
|
|
1672
|
+
*/
|
|
519
1673
|
strokeStyle: z.ZodEnum<["solid", "dashed", "dotted"]>;
|
|
520
1674
|
}>, {
|
|
521
1675
|
type: z.ZodLiteral<"Polygon">;
|
|
522
|
-
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">;
|
|
1676
|
+
coordinates: z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">;
|
|
1677
|
+
/**
|
|
1678
|
+
* The opacity of the polygon's fill, between 0 and 1.
|
|
1679
|
+
*
|
|
1680
|
+
* @default 0.25
|
|
1681
|
+
*/
|
|
523
1682
|
fillOpacity: z.ZodNumber;
|
|
1683
|
+
/**
|
|
1684
|
+
* Whether to show an area marker on the polygon.
|
|
1685
|
+
*
|
|
1686
|
+
* @default false
|
|
1687
|
+
*/
|
|
524
1688
|
areaMarker: z.ZodBoolean;
|
|
525
1689
|
}>, "coordinates">, "strip", z.ZodTypeAny, {
|
|
526
1690
|
type: "Polygon";
|
|
@@ -554,30 +1718,134 @@ declare const PolygonReadSchema: z.ZodObject<Omit<z.objectUtil.extendShape<z.obj
|
|
|
554
1718
|
interaction?: "default" | "locked" | undefined;
|
|
555
1719
|
}>;
|
|
556
1720
|
declare const CircleReadSchema: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
1721
|
+
/**
|
|
1722
|
+
* The unique identifier for the element.
|
|
1723
|
+
*/
|
|
557
1724
|
id: z.ZodString;
|
|
1725
|
+
/**
|
|
1726
|
+
* The ID of the element group that the element belongs to.
|
|
1727
|
+
* For elements that are not part of a group, this will be null.
|
|
1728
|
+
*/
|
|
558
1729
|
groupId: z.ZodNullable<z.ZodString>;
|
|
1730
|
+
/**
|
|
1731
|
+
* The color of the element in some CSS-like format.
|
|
1732
|
+
*
|
|
1733
|
+
* @example
|
|
1734
|
+
* ```typescript
|
|
1735
|
+
* "#ABC123";
|
|
1736
|
+
* "rgb(255, 0, 0)";
|
|
1737
|
+
* "hsl(200, 100%, 50%)";
|
|
1738
|
+
* ```
|
|
1739
|
+
*
|
|
1740
|
+
* @default "#C93535"
|
|
1741
|
+
*/
|
|
559
1742
|
color: z.ZodString;
|
|
560
|
-
|
|
561
|
-
|
|
1743
|
+
/**
|
|
1744
|
+
* The element's name. For elements that can show a label or text on
|
|
1745
|
+
* the map (e.g. a Place or Text element) this is the text that will be shown.
|
|
1746
|
+
*
|
|
1747
|
+
* For elements such as Polygons or Paths, the name is what is shown when
|
|
1748
|
+
* the element is selected by clicking on it.
|
|
1749
|
+
*/
|
|
1750
|
+
name: z.ZodNullable<z.ZodString>;
|
|
1751
|
+
/**
|
|
1752
|
+
* Text describing the element, which is shown in an element's popup when it
|
|
1753
|
+
* is selected.
|
|
1754
|
+
*
|
|
1755
|
+
* Note that some elements are not selectable on the map, such as Notes, Text
|
|
1756
|
+
* and Markers, so their description will not be shown.
|
|
1757
|
+
*/
|
|
1758
|
+
description: z.ZodNullable<z.ZodString>;
|
|
1759
|
+
/**
|
|
1760
|
+
* A set of key-value pairs that can be used to store arbitrary data about the element.
|
|
1761
|
+
*
|
|
1762
|
+
* This is most useful for associating additional data with an element that is not
|
|
1763
|
+
* part of the element's core data, such as a Place's address or some other
|
|
1764
|
+
* data.
|
|
1765
|
+
*/
|
|
562
1766
|
attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1767
|
+
/**
|
|
1768
|
+
* Whether the element is interactive.
|
|
1769
|
+
*
|
|
1770
|
+
* The `default` interaction mode means that the element can be selected and edited by
|
|
1771
|
+
* the user, if it was created by the SDK or by the user using a tool.
|
|
1772
|
+
*
|
|
1773
|
+
* If the interaction mode is `locked`, the element will not be editable by the user,
|
|
1774
|
+
* which is often used for elements that you don't want the user to edit or move by
|
|
1775
|
+
* accident.
|
|
1776
|
+
*
|
|
1777
|
+
* Elements that were created by the map author (i.e. not during an SDK "session") are
|
|
1778
|
+
* not editable and have special behaviour depending on their name, description and
|
|
1779
|
+
* attributes.
|
|
1780
|
+
*
|
|
1781
|
+
* @default "default"
|
|
1782
|
+
*/
|
|
563
1783
|
interaction: z.ZodOptional<z.ZodEnum<["default", "locked"]>>;
|
|
564
1784
|
}, {
|
|
1785
|
+
/**
|
|
1786
|
+
* The URL of an image that has been added to the element.
|
|
1787
|
+
*/
|
|
565
1788
|
imageUrl: z.ZodNullable<z.ZodString>;
|
|
566
1789
|
}>, {
|
|
1790
|
+
/**
|
|
1791
|
+
* A value between 0 and 1 that describes the opacity of the element's stroke.
|
|
1792
|
+
*
|
|
1793
|
+
* @default 1
|
|
1794
|
+
*/
|
|
567
1795
|
strokeOpacity: z.ZodNumber;
|
|
1796
|
+
/**
|
|
1797
|
+
* The width of the element's stroke in pixels.
|
|
1798
|
+
*
|
|
1799
|
+
* @default 2
|
|
1800
|
+
*/
|
|
568
1801
|
strokeWidth: z.ZodNumber;
|
|
1802
|
+
/**
|
|
1803
|
+
* The style of the element's stroke.
|
|
1804
|
+
*
|
|
1805
|
+
* @default "solid"
|
|
1806
|
+
*/
|
|
569
1807
|
strokeStyle: z.ZodEnum<["solid", "dashed", "dotted"]>;
|
|
570
1808
|
}>, {
|
|
571
1809
|
type: z.ZodLiteral<"Circle">;
|
|
572
|
-
|
|
1810
|
+
/**
|
|
1811
|
+
* The center of the circle.
|
|
1812
|
+
*/
|
|
1813
|
+
center: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
1814
|
+
/**
|
|
1815
|
+
* The radius of the circle in meters.
|
|
1816
|
+
*/
|
|
573
1817
|
radius: z.ZodNumber;
|
|
1818
|
+
/**
|
|
1819
|
+
* Whether to show a marker on the circle that indicates the radius
|
|
1820
|
+
*
|
|
1821
|
+
* @default false
|
|
1822
|
+
*/
|
|
1823
|
+
radiusMarker: z.ZodBoolean;
|
|
1824
|
+
/**
|
|
1825
|
+
* The angle at which the control point for setting the radius is displayed,
|
|
1826
|
+
* in degrees. When the `radiusMarker` is `true`, there is a dotted line rendered
|
|
1827
|
+
* from the center of the circle to the control point, and the marker is shown
|
|
1828
|
+
* at the midpoint of this line.
|
|
1829
|
+
*
|
|
1830
|
+
* @default 90
|
|
1831
|
+
*/
|
|
574
1832
|
radiusDisplayAngle: z.ZodNumber;
|
|
1833
|
+
/**
|
|
1834
|
+
* The unit of the radius used when the `radiusMarker` is `true`.
|
|
1835
|
+
*
|
|
1836
|
+
* A value of `null` means that the unit matches the user's locale.
|
|
1837
|
+
*
|
|
1838
|
+
* @default null
|
|
1839
|
+
*/
|
|
575
1840
|
radiusDisplayUnit: z.ZodNullable<z.ZodEnum<["meter", "kilometer", "foot", "mile"]>>;
|
|
1841
|
+
/**
|
|
1842
|
+
* The opacity of the circle's fill.
|
|
1843
|
+
*
|
|
1844
|
+
* @default 0.25
|
|
1845
|
+
*/
|
|
576
1846
|
fillOpacity: z.ZodNumber;
|
|
577
|
-
radiusMarker: z.ZodBoolean;
|
|
578
1847
|
}>, "strip", z.ZodTypeAny, {
|
|
579
1848
|
type: "Circle";
|
|
580
|
-
coordinates: [number, number];
|
|
581
1849
|
id: string;
|
|
582
1850
|
groupId: string | null;
|
|
583
1851
|
color: string;
|
|
@@ -589,14 +1857,14 @@ declare const CircleReadSchema: z.ZodObject<z.objectUtil.extendShape<z.objectUti
|
|
|
589
1857
|
strokeWidth: number;
|
|
590
1858
|
strokeStyle: "solid" | "dashed" | "dotted";
|
|
591
1859
|
fillOpacity: number;
|
|
1860
|
+
center: [number, number];
|
|
592
1861
|
radius: number;
|
|
1862
|
+
radiusMarker: boolean;
|
|
593
1863
|
radiusDisplayAngle: number;
|
|
594
1864
|
radiusDisplayUnit: "meter" | "kilometer" | "foot" | "mile" | null;
|
|
595
|
-
radiusMarker: boolean;
|
|
596
1865
|
interaction?: "default" | "locked" | undefined;
|
|
597
1866
|
}, {
|
|
598
1867
|
type: "Circle";
|
|
599
|
-
coordinates: [number, number];
|
|
600
1868
|
id: string;
|
|
601
1869
|
groupId: string | null;
|
|
602
1870
|
color: string;
|
|
@@ -608,25 +1876,100 @@ declare const CircleReadSchema: z.ZodObject<z.objectUtil.extendShape<z.objectUti
|
|
|
608
1876
|
strokeWidth: number;
|
|
609
1877
|
strokeStyle: "solid" | "dashed" | "dotted";
|
|
610
1878
|
fillOpacity: number;
|
|
1879
|
+
center: [number, number];
|
|
611
1880
|
radius: number;
|
|
1881
|
+
radiusMarker: boolean;
|
|
612
1882
|
radiusDisplayAngle: number;
|
|
613
1883
|
radiusDisplayUnit: "meter" | "kilometer" | "foot" | "mile" | null;
|
|
614
|
-
radiusMarker: boolean;
|
|
615
1884
|
interaction?: "default" | "locked" | undefined;
|
|
616
1885
|
}>;
|
|
617
1886
|
declare const MarkerReadSchema: z.ZodObject<Omit<z.objectUtil.extendShape<{
|
|
1887
|
+
/**
|
|
1888
|
+
* The unique identifier for the element.
|
|
1889
|
+
*/
|
|
618
1890
|
id: z.ZodString;
|
|
1891
|
+
/**
|
|
1892
|
+
* The ID of the element group that the element belongs to.
|
|
1893
|
+
* For elements that are not part of a group, this will be null.
|
|
1894
|
+
*/
|
|
619
1895
|
groupId: z.ZodNullable<z.ZodString>;
|
|
1896
|
+
/**
|
|
1897
|
+
* The color of the element in some CSS-like format.
|
|
1898
|
+
*
|
|
1899
|
+
* @example
|
|
1900
|
+
* ```typescript
|
|
1901
|
+
* "#ABC123";
|
|
1902
|
+
* "rgb(255, 0, 0)";
|
|
1903
|
+
* "hsl(200, 100%, 50%)";
|
|
1904
|
+
* ```
|
|
1905
|
+
*
|
|
1906
|
+
* @default "#C93535"
|
|
1907
|
+
*/
|
|
620
1908
|
color: z.ZodString;
|
|
621
|
-
|
|
622
|
-
|
|
1909
|
+
/**
|
|
1910
|
+
* The element's name. For elements that can show a label or text on
|
|
1911
|
+
* the map (e.g. a Place or Text element) this is the text that will be shown.
|
|
1912
|
+
*
|
|
1913
|
+
* For elements such as Polygons or Paths, the name is what is shown when
|
|
1914
|
+
* the element is selected by clicking on it.
|
|
1915
|
+
*/
|
|
1916
|
+
name: z.ZodNullable<z.ZodString>;
|
|
1917
|
+
/**
|
|
1918
|
+
* Text describing the element, which is shown in an element's popup when it
|
|
1919
|
+
* is selected.
|
|
1920
|
+
*
|
|
1921
|
+
* Note that some elements are not selectable on the map, such as Notes, Text
|
|
1922
|
+
* and Markers, so their description will not be shown.
|
|
1923
|
+
*/
|
|
1924
|
+
description: z.ZodNullable<z.ZodString>;
|
|
1925
|
+
/**
|
|
1926
|
+
* A set of key-value pairs that can be used to store arbitrary data about the element.
|
|
1927
|
+
*
|
|
1928
|
+
* This is most useful for associating additional data with an element that is not
|
|
1929
|
+
* part of the element's core data, such as a Place's address or some other
|
|
1930
|
+
* data.
|
|
1931
|
+
*/
|
|
623
1932
|
attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1933
|
+
/**
|
|
1934
|
+
* Whether the element is interactive.
|
|
1935
|
+
*
|
|
1936
|
+
* The `default` interaction mode means that the element can be selected and edited by
|
|
1937
|
+
* the user, if it was created by the SDK or by the user using a tool.
|
|
1938
|
+
*
|
|
1939
|
+
* If the interaction mode is `locked`, the element will not be editable by the user,
|
|
1940
|
+
* which is often used for elements that you don't want the user to edit or move by
|
|
1941
|
+
* accident.
|
|
1942
|
+
*
|
|
1943
|
+
* Elements that were created by the map author (i.e. not during an SDK "session") are
|
|
1944
|
+
* not editable and have special behaviour depending on their name, description and
|
|
1945
|
+
* attributes.
|
|
1946
|
+
*
|
|
1947
|
+
* @default "default"
|
|
1948
|
+
*/
|
|
624
1949
|
interaction: z.ZodOptional<z.ZodEnum<["default", "locked"]>>;
|
|
625
1950
|
}, {
|
|
626
1951
|
type: z.ZodLiteral<"Marker">;
|
|
627
1952
|
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">;
|
|
1953
|
+
/**
|
|
1954
|
+
* The opacity of the marker, between 0 and 1.
|
|
1955
|
+
*
|
|
1956
|
+
* @default 1
|
|
1957
|
+
*/
|
|
628
1958
|
opacity: z.ZodNumber;
|
|
1959
|
+
/**
|
|
1960
|
+
* The size of the marker, used in conjunction with the `zoom` to determine
|
|
1961
|
+
* the actual size of the marker.
|
|
1962
|
+
*
|
|
1963
|
+
* @default 10
|
|
1964
|
+
*/
|
|
629
1965
|
size: z.ZodNumber;
|
|
1966
|
+
/**
|
|
1967
|
+
* The zoom level at which the marker was created. This is combined with
|
|
1968
|
+
* the `size` to determine the actual size of the marker.
|
|
1969
|
+
*
|
|
1970
|
+
* When creating a marker, if you don't supply this value it defaults to
|
|
1971
|
+
* the current zoom of the map when you call `createElement`.
|
|
1972
|
+
*/
|
|
630
1973
|
zoom: z.ZodNumber;
|
|
631
1974
|
}>, "coordinates">, "strip", z.ZodTypeAny, {
|
|
632
1975
|
type: "Marker";
|
|
@@ -654,16 +1997,89 @@ declare const MarkerReadSchema: z.ZodObject<Omit<z.objectUtil.extendShape<{
|
|
|
654
1997
|
interaction?: "default" | "locked" | undefined;
|
|
655
1998
|
}>;
|
|
656
1999
|
declare const HighlighterReadSchema: z.ZodObject<Omit<z.objectUtil.extendShape<{
|
|
2000
|
+
/**
|
|
2001
|
+
* The unique identifier for the element.
|
|
2002
|
+
*/
|
|
657
2003
|
id: z.ZodString;
|
|
2004
|
+
/**
|
|
2005
|
+
* The ID of the element group that the element belongs to.
|
|
2006
|
+
* For elements that are not part of a group, this will be null.
|
|
2007
|
+
*/
|
|
658
2008
|
groupId: z.ZodNullable<z.ZodString>;
|
|
2009
|
+
/**
|
|
2010
|
+
* The color of the element in some CSS-like format.
|
|
2011
|
+
*
|
|
2012
|
+
* @example
|
|
2013
|
+
* ```typescript
|
|
2014
|
+
* "#ABC123";
|
|
2015
|
+
* "rgb(255, 0, 0)";
|
|
2016
|
+
* "hsl(200, 100%, 50%)";
|
|
2017
|
+
* ```
|
|
2018
|
+
*
|
|
2019
|
+
* @default "#C93535"
|
|
2020
|
+
*/
|
|
659
2021
|
color: z.ZodString;
|
|
660
|
-
|
|
661
|
-
|
|
2022
|
+
/**
|
|
2023
|
+
* The element's name. For elements that can show a label or text on
|
|
2024
|
+
* the map (e.g. a Place or Text element) this is the text that will be shown.
|
|
2025
|
+
*
|
|
2026
|
+
* For elements such as Polygons or Paths, the name is what is shown when
|
|
2027
|
+
* the element is selected by clicking on it.
|
|
2028
|
+
*/
|
|
2029
|
+
name: z.ZodNullable<z.ZodString>;
|
|
2030
|
+
/**
|
|
2031
|
+
* Text describing the element, which is shown in an element's popup when it
|
|
2032
|
+
* is selected.
|
|
2033
|
+
*
|
|
2034
|
+
* Note that some elements are not selectable on the map, such as Notes, Text
|
|
2035
|
+
* and Markers, so their description will not be shown.
|
|
2036
|
+
*/
|
|
2037
|
+
description: z.ZodNullable<z.ZodString>;
|
|
2038
|
+
/**
|
|
2039
|
+
* A set of key-value pairs that can be used to store arbitrary data about the element.
|
|
2040
|
+
*
|
|
2041
|
+
* This is most useful for associating additional data with an element that is not
|
|
2042
|
+
* part of the element's core data, such as a Place's address or some other
|
|
2043
|
+
* data.
|
|
2044
|
+
*/
|
|
662
2045
|
attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
2046
|
+
/**
|
|
2047
|
+
* Whether the element is interactive.
|
|
2048
|
+
*
|
|
2049
|
+
* The `default` interaction mode means that the element can be selected and edited by
|
|
2050
|
+
* the user, if it was created by the SDK or by the user using a tool.
|
|
2051
|
+
*
|
|
2052
|
+
* If the interaction mode is `locked`, the element will not be editable by the user,
|
|
2053
|
+
* which is often used for elements that you don't want the user to edit or move by
|
|
2054
|
+
* accident.
|
|
2055
|
+
*
|
|
2056
|
+
* Elements that were created by the map author (i.e. not during an SDK "session") are
|
|
2057
|
+
* not editable and have special behaviour depending on their name, description and
|
|
2058
|
+
* attributes.
|
|
2059
|
+
*
|
|
2060
|
+
* @default "default"
|
|
2061
|
+
*/
|
|
663
2062
|
interaction: z.ZodOptional<z.ZodEnum<["default", "locked"]>>;
|
|
664
2063
|
}, {
|
|
665
2064
|
type: z.ZodLiteral<"Highlighter">;
|
|
666
|
-
|
|
2065
|
+
/**
|
|
2066
|
+
* A multipolygon describing the area that is highlighted.
|
|
2067
|
+
*
|
|
2068
|
+
* If `renderHoles` is set to false, only the outer ring of each polygon
|
|
2069
|
+
* will be rendered, filling in the area inside the highlighted region.
|
|
2070
|
+
*/
|
|
2071
|
+
coordinates: z.ZodArray<z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">, "many">;
|
|
2072
|
+
/**
|
|
2073
|
+
* Whether to render the holes of the highlighted area.
|
|
2074
|
+
*
|
|
2075
|
+
* @default false
|
|
2076
|
+
*/
|
|
2077
|
+
renderHoles: z.ZodBoolean;
|
|
2078
|
+
/**
|
|
2079
|
+
* The opacity of the highlighter, between 0 and 1.
|
|
2080
|
+
*
|
|
2081
|
+
* @default 0.5
|
|
2082
|
+
*/
|
|
667
2083
|
opacity: z.ZodNumber;
|
|
668
2084
|
}>, "coordinates">, "strip", z.ZodTypeAny, {
|
|
669
2085
|
type: "Highlighter";
|
|
@@ -674,6 +2090,7 @@ declare const HighlighterReadSchema: z.ZodObject<Omit<z.objectUtil.extendShape<{
|
|
|
674
2090
|
description: string | null;
|
|
675
2091
|
attributes: Record<string, unknown>;
|
|
676
2092
|
opacity: number;
|
|
2093
|
+
renderHoles: boolean;
|
|
677
2094
|
interaction?: "default" | "locked" | undefined;
|
|
678
2095
|
}, {
|
|
679
2096
|
type: "Highlighter";
|
|
@@ -684,26 +2101,102 @@ declare const HighlighterReadSchema: z.ZodObject<Omit<z.objectUtil.extendShape<{
|
|
|
684
2101
|
description: string | null;
|
|
685
2102
|
attributes: Record<string, unknown>;
|
|
686
2103
|
opacity: number;
|
|
2104
|
+
renderHoles: boolean;
|
|
687
2105
|
interaction?: "default" | "locked" | undefined;
|
|
688
2106
|
}>;
|
|
689
2107
|
declare const TextReadSchema: z.ZodObject<Omit<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
2108
|
+
/**
|
|
2109
|
+
* The unique identifier for the element.
|
|
2110
|
+
*/
|
|
690
2111
|
id: z.ZodString;
|
|
2112
|
+
/**
|
|
2113
|
+
* The ID of the element group that the element belongs to.
|
|
2114
|
+
* For elements that are not part of a group, this will be null.
|
|
2115
|
+
*/
|
|
691
2116
|
groupId: z.ZodNullable<z.ZodString>;
|
|
2117
|
+
/**
|
|
2118
|
+
* The color of the element in some CSS-like format.
|
|
2119
|
+
*
|
|
2120
|
+
* @example
|
|
2121
|
+
* ```typescript
|
|
2122
|
+
* "#ABC123";
|
|
2123
|
+
* "rgb(255, 0, 0)";
|
|
2124
|
+
* "hsl(200, 100%, 50%)";
|
|
2125
|
+
* ```
|
|
2126
|
+
*
|
|
2127
|
+
* @default "#C93535"
|
|
2128
|
+
*/
|
|
692
2129
|
color: z.ZodString;
|
|
693
|
-
|
|
694
|
-
|
|
2130
|
+
/**
|
|
2131
|
+
* The element's name. For elements that can show a label or text on
|
|
2132
|
+
* the map (e.g. a Place or Text element) this is the text that will be shown.
|
|
2133
|
+
*
|
|
2134
|
+
* For elements such as Polygons or Paths, the name is what is shown when
|
|
2135
|
+
* the element is selected by clicking on it.
|
|
2136
|
+
*/
|
|
2137
|
+
name: z.ZodNullable<z.ZodString>;
|
|
2138
|
+
/**
|
|
2139
|
+
* Text describing the element, which is shown in an element's popup when it
|
|
2140
|
+
* is selected.
|
|
2141
|
+
*
|
|
2142
|
+
* Note that some elements are not selectable on the map, such as Notes, Text
|
|
2143
|
+
* and Markers, so their description will not be shown.
|
|
2144
|
+
*/
|
|
2145
|
+
description: z.ZodNullable<z.ZodString>;
|
|
2146
|
+
/**
|
|
2147
|
+
* A set of key-value pairs that can be used to store arbitrary data about the element.
|
|
2148
|
+
*
|
|
2149
|
+
* This is most useful for associating additional data with an element that is not
|
|
2150
|
+
* part of the element's core data, such as a Place's address or some other
|
|
2151
|
+
* data.
|
|
2152
|
+
*/
|
|
695
2153
|
attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
2154
|
+
/**
|
|
2155
|
+
* Whether the element is interactive.
|
|
2156
|
+
*
|
|
2157
|
+
* The `default` interaction mode means that the element can be selected and edited by
|
|
2158
|
+
* the user, if it was created by the SDK or by the user using a tool.
|
|
2159
|
+
*
|
|
2160
|
+
* If the interaction mode is `locked`, the element will not be editable by the user,
|
|
2161
|
+
* which is often used for elements that you don't want the user to edit or move by
|
|
2162
|
+
* accident.
|
|
2163
|
+
*
|
|
2164
|
+
* Elements that were created by the map author (i.e. not during an SDK "session") are
|
|
2165
|
+
* not editable and have special behaviour depending on their name, description and
|
|
2166
|
+
* attributes.
|
|
2167
|
+
*
|
|
2168
|
+
* @default "default"
|
|
2169
|
+
*/
|
|
696
2170
|
interaction: z.ZodOptional<z.ZodEnum<["default", "locked"]>>;
|
|
697
2171
|
}, {
|
|
698
2172
|
position: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
699
2173
|
rotation: z.ZodNumber;
|
|
700
2174
|
scale: z.ZodNumber;
|
|
701
2175
|
zoom: z.ZodNumber;
|
|
702
|
-
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">;
|
|
2176
|
+
coordinates: z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">;
|
|
703
2177
|
}>, {
|
|
2178
|
+
/**
|
|
2179
|
+
* The text in the element.
|
|
2180
|
+
*/
|
|
704
2181
|
text: z.ZodString;
|
|
2182
|
+
/**
|
|
2183
|
+
* The alignment of the text, either `left`, `center` or `right`.
|
|
2184
|
+
*
|
|
2185
|
+
* @default "center"
|
|
2186
|
+
*/
|
|
705
2187
|
align: z.ZodEnum<["left", "center", "right"]>;
|
|
2188
|
+
/**
|
|
2189
|
+
* The style of the text, either `italic`, `light`, `regular` or `caps`.
|
|
2190
|
+
*
|
|
2191
|
+
* @default "regular"
|
|
2192
|
+
*/
|
|
706
2193
|
style: z.ZodEnum<["italic", "light", "regular", "caps"]>;
|
|
2194
|
+
/**
|
|
2195
|
+
* The text shown in the element, which is identical to the `text` property.
|
|
2196
|
+
*
|
|
2197
|
+
* @remarks This is added for consistency with other elements that have a `name`
|
|
2198
|
+
* property.
|
|
2199
|
+
*/
|
|
707
2200
|
name: z.ZodString;
|
|
708
2201
|
}>, {
|
|
709
2202
|
type: z.ZodLiteral<"Text">;
|
|
@@ -720,7 +2213,7 @@ declare const TextReadSchema: z.ZodObject<Omit<z.objectUtil.extendShape<z.object
|
|
|
720
2213
|
rotation: number;
|
|
721
2214
|
scale: number;
|
|
722
2215
|
text: string;
|
|
723
|
-
align: "
|
|
2216
|
+
align: "center" | "left" | "right";
|
|
724
2217
|
style: "italic" | "light" | "regular" | "caps";
|
|
725
2218
|
interaction?: "default" | "locked" | undefined;
|
|
726
2219
|
}, {
|
|
@@ -736,28 +2229,103 @@ declare const TextReadSchema: z.ZodObject<Omit<z.objectUtil.extendShape<z.object
|
|
|
736
2229
|
rotation: number;
|
|
737
2230
|
scale: number;
|
|
738
2231
|
text: string;
|
|
739
|
-
align: "
|
|
2232
|
+
align: "center" | "left" | "right";
|
|
740
2233
|
style: "italic" | "light" | "regular" | "caps";
|
|
741
2234
|
interaction?: "default" | "locked" | undefined;
|
|
742
2235
|
}>;
|
|
743
2236
|
declare const NoteReadSchema: z.ZodObject<Omit<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
2237
|
+
/**
|
|
2238
|
+
* The unique identifier for the element.
|
|
2239
|
+
*/
|
|
744
2240
|
id: z.ZodString;
|
|
2241
|
+
/**
|
|
2242
|
+
* The ID of the element group that the element belongs to.
|
|
2243
|
+
* For elements that are not part of a group, this will be null.
|
|
2244
|
+
*/
|
|
745
2245
|
groupId: z.ZodNullable<z.ZodString>;
|
|
2246
|
+
/**
|
|
2247
|
+
* The color of the element in some CSS-like format.
|
|
2248
|
+
*
|
|
2249
|
+
* @example
|
|
2250
|
+
* ```typescript
|
|
2251
|
+
* "#ABC123";
|
|
2252
|
+
* "rgb(255, 0, 0)";
|
|
2253
|
+
* "hsl(200, 100%, 50%)";
|
|
2254
|
+
* ```
|
|
2255
|
+
*
|
|
2256
|
+
* @default "#C93535"
|
|
2257
|
+
*/
|
|
746
2258
|
color: z.ZodString;
|
|
747
|
-
|
|
748
|
-
|
|
2259
|
+
/**
|
|
2260
|
+
* The element's name. For elements that can show a label or text on
|
|
2261
|
+
* the map (e.g. a Place or Text element) this is the text that will be shown.
|
|
2262
|
+
*
|
|
2263
|
+
* For elements such as Polygons or Paths, the name is what is shown when
|
|
2264
|
+
* the element is selected by clicking on it.
|
|
2265
|
+
*/
|
|
2266
|
+
name: z.ZodNullable<z.ZodString>;
|
|
2267
|
+
/**
|
|
2268
|
+
* Text describing the element, which is shown in an element's popup when it
|
|
2269
|
+
* is selected.
|
|
2270
|
+
*
|
|
2271
|
+
* Note that some elements are not selectable on the map, such as Notes, Text
|
|
2272
|
+
* and Markers, so their description will not be shown.
|
|
2273
|
+
*/
|
|
2274
|
+
description: z.ZodNullable<z.ZodString>;
|
|
2275
|
+
/**
|
|
2276
|
+
* A set of key-value pairs that can be used to store arbitrary data about the element.
|
|
2277
|
+
*
|
|
2278
|
+
* This is most useful for associating additional data with an element that is not
|
|
2279
|
+
* part of the element's core data, such as a Place's address or some other
|
|
2280
|
+
* data.
|
|
2281
|
+
*/
|
|
749
2282
|
attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
2283
|
+
/**
|
|
2284
|
+
* Whether the element is interactive.
|
|
2285
|
+
*
|
|
2286
|
+
* The `default` interaction mode means that the element can be selected and edited by
|
|
2287
|
+
* the user, if it was created by the SDK or by the user using a tool.
|
|
2288
|
+
*
|
|
2289
|
+
* If the interaction mode is `locked`, the element will not be editable by the user,
|
|
2290
|
+
* which is often used for elements that you don't want the user to edit or move by
|
|
2291
|
+
* accident.
|
|
2292
|
+
*
|
|
2293
|
+
* Elements that were created by the map author (i.e. not during an SDK "session") are
|
|
2294
|
+
* not editable and have special behaviour depending on their name, description and
|
|
2295
|
+
* attributes.
|
|
2296
|
+
*
|
|
2297
|
+
* @default "default"
|
|
2298
|
+
*/
|
|
750
2299
|
interaction: z.ZodOptional<z.ZodEnum<["default", "locked"]>>;
|
|
751
2300
|
}, {
|
|
752
2301
|
position: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
753
2302
|
rotation: z.ZodNumber;
|
|
754
2303
|
scale: z.ZodNumber;
|
|
755
2304
|
zoom: z.ZodNumber;
|
|
756
|
-
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">;
|
|
2305
|
+
coordinates: z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">;
|
|
757
2306
|
}>, {
|
|
2307
|
+
/**
|
|
2308
|
+
* The text in the element.
|
|
2309
|
+
*/
|
|
758
2310
|
text: z.ZodString;
|
|
2311
|
+
/**
|
|
2312
|
+
* The alignment of the text, either `left`, `center` or `right`.
|
|
2313
|
+
*
|
|
2314
|
+
* @default "center"
|
|
2315
|
+
*/
|
|
759
2316
|
align: z.ZodEnum<["left", "center", "right"]>;
|
|
2317
|
+
/**
|
|
2318
|
+
* The style of the text, either `italic`, `light`, `regular` or `caps`.
|
|
2319
|
+
*
|
|
2320
|
+
* @default "regular"
|
|
2321
|
+
*/
|
|
760
2322
|
style: z.ZodEnum<["italic", "light", "regular", "caps"]>;
|
|
2323
|
+
/**
|
|
2324
|
+
* The text shown in the element, which is identical to the `text` property.
|
|
2325
|
+
*
|
|
2326
|
+
* @remarks This is added for consistency with other elements that have a `name`
|
|
2327
|
+
* property.
|
|
2328
|
+
*/
|
|
761
2329
|
name: z.ZodString;
|
|
762
2330
|
}>, {
|
|
763
2331
|
type: z.ZodLiteral<"Note">;
|
|
@@ -775,7 +2343,7 @@ declare const NoteReadSchema: z.ZodObject<Omit<z.objectUtil.extendShape<z.object
|
|
|
775
2343
|
rotation: number;
|
|
776
2344
|
scale: number;
|
|
777
2345
|
text: string;
|
|
778
|
-
align: "
|
|
2346
|
+
align: "center" | "left" | "right";
|
|
779
2347
|
style: "italic" | "light" | "regular" | "caps";
|
|
780
2348
|
widthScale: number;
|
|
781
2349
|
interaction?: "default" | "locked" | undefined;
|
|
@@ -792,23 +2360,87 @@ declare const NoteReadSchema: z.ZodObject<Omit<z.objectUtil.extendShape<z.object
|
|
|
792
2360
|
rotation: number;
|
|
793
2361
|
scale: number;
|
|
794
2362
|
text: string;
|
|
795
|
-
align: "
|
|
2363
|
+
align: "center" | "left" | "right";
|
|
796
2364
|
style: "italic" | "light" | "regular" | "caps";
|
|
797
2365
|
widthScale: number;
|
|
798
2366
|
interaction?: "default" | "locked" | undefined;
|
|
799
2367
|
}>;
|
|
800
2368
|
declare const ImageReadSchema: z.ZodObject<Omit<Omit<z.objectUtil.extendShape<{
|
|
2369
|
+
/**
|
|
2370
|
+
* The unique identifier for the element.
|
|
2371
|
+
*/
|
|
801
2372
|
id: z.ZodString;
|
|
2373
|
+
/**
|
|
2374
|
+
* The ID of the element group that the element belongs to.
|
|
2375
|
+
* For elements that are not part of a group, this will be null.
|
|
2376
|
+
*/
|
|
802
2377
|
groupId: z.ZodNullable<z.ZodString>;
|
|
2378
|
+
/**
|
|
2379
|
+
* The color of the element in some CSS-like format.
|
|
2380
|
+
*
|
|
2381
|
+
* @example
|
|
2382
|
+
* ```typescript
|
|
2383
|
+
* "#ABC123";
|
|
2384
|
+
* "rgb(255, 0, 0)";
|
|
2385
|
+
* "hsl(200, 100%, 50%)";
|
|
2386
|
+
* ```
|
|
2387
|
+
*
|
|
2388
|
+
* @default "#C93535"
|
|
2389
|
+
*/
|
|
803
2390
|
color: z.ZodString;
|
|
804
|
-
|
|
805
|
-
|
|
2391
|
+
/**
|
|
2392
|
+
* The element's name. For elements that can show a label or text on
|
|
2393
|
+
* the map (e.g. a Place or Text element) this is the text that will be shown.
|
|
2394
|
+
*
|
|
2395
|
+
* For elements such as Polygons or Paths, the name is what is shown when
|
|
2396
|
+
* the element is selected by clicking on it.
|
|
2397
|
+
*/
|
|
2398
|
+
name: z.ZodNullable<z.ZodString>;
|
|
2399
|
+
/**
|
|
2400
|
+
* Text describing the element, which is shown in an element's popup when it
|
|
2401
|
+
* is selected.
|
|
2402
|
+
*
|
|
2403
|
+
* Note that some elements are not selectable on the map, such as Notes, Text
|
|
2404
|
+
* and Markers, so their description will not be shown.
|
|
2405
|
+
*/
|
|
2406
|
+
description: z.ZodNullable<z.ZodString>;
|
|
2407
|
+
/**
|
|
2408
|
+
* A set of key-value pairs that can be used to store arbitrary data about the element.
|
|
2409
|
+
*
|
|
2410
|
+
* This is most useful for associating additional data with an element that is not
|
|
2411
|
+
* part of the element's core data, such as a Place's address or some other
|
|
2412
|
+
* data.
|
|
2413
|
+
*/
|
|
806
2414
|
attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
2415
|
+
/**
|
|
2416
|
+
* Whether the element is interactive.
|
|
2417
|
+
*
|
|
2418
|
+
* The `default` interaction mode means that the element can be selected and edited by
|
|
2419
|
+
* the user, if it was created by the SDK or by the user using a tool.
|
|
2420
|
+
*
|
|
2421
|
+
* If the interaction mode is `locked`, the element will not be editable by the user,
|
|
2422
|
+
* which is often used for elements that you don't want the user to edit or move by
|
|
2423
|
+
* accident.
|
|
2424
|
+
*
|
|
2425
|
+
* Elements that were created by the map author (i.e. not during an SDK "session") are
|
|
2426
|
+
* not editable and have special behaviour depending on their name, description and
|
|
2427
|
+
* attributes.
|
|
2428
|
+
*
|
|
2429
|
+
* @default "default"
|
|
2430
|
+
*/
|
|
807
2431
|
interaction: z.ZodOptional<z.ZodEnum<["default", "locked"]>>;
|
|
808
2432
|
}, {
|
|
809
2433
|
type: z.ZodLiteral<"Image">;
|
|
810
2434
|
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">;
|
|
2435
|
+
/**
|
|
2436
|
+
* The URL of the image that is rendered in this element
|
|
2437
|
+
*/
|
|
811
2438
|
imageUrl: z.ZodString;
|
|
2439
|
+
/**
|
|
2440
|
+
* The opacity of the image, between 0 and 1.
|
|
2441
|
+
*
|
|
2442
|
+
* @default 1
|
|
2443
|
+
*/
|
|
812
2444
|
opacity: z.ZodNumber;
|
|
813
2445
|
}>, "color">, "coordinates">, "strip", z.ZodTypeAny, {
|
|
814
2446
|
type: "Image";
|
|
@@ -832,16 +2464,75 @@ declare const ImageReadSchema: z.ZodObject<Omit<Omit<z.objectUtil.extendShape<{
|
|
|
832
2464
|
interaction?: "default" | "locked" | undefined;
|
|
833
2465
|
}>;
|
|
834
2466
|
declare const LinkReadSchema: z.ZodObject<Omit<z.objectUtil.extendShape<{
|
|
2467
|
+
/**
|
|
2468
|
+
* The unique identifier for the element.
|
|
2469
|
+
*/
|
|
835
2470
|
id: z.ZodString;
|
|
2471
|
+
/**
|
|
2472
|
+
* The ID of the element group that the element belongs to.
|
|
2473
|
+
* For elements that are not part of a group, this will be null.
|
|
2474
|
+
*/
|
|
836
2475
|
groupId: z.ZodNullable<z.ZodString>;
|
|
2476
|
+
/**
|
|
2477
|
+
* The color of the element in some CSS-like format.
|
|
2478
|
+
*
|
|
2479
|
+
* @example
|
|
2480
|
+
* ```typescript
|
|
2481
|
+
* "#ABC123";
|
|
2482
|
+
* "rgb(255, 0, 0)";
|
|
2483
|
+
* "hsl(200, 100%, 50%)";
|
|
2484
|
+
* ```
|
|
2485
|
+
*
|
|
2486
|
+
* @default "#C93535"
|
|
2487
|
+
*/
|
|
837
2488
|
color: z.ZodString;
|
|
838
|
-
|
|
839
|
-
|
|
2489
|
+
/**
|
|
2490
|
+
* The element's name. For elements that can show a label or text on
|
|
2491
|
+
* the map (e.g. a Place or Text element) this is the text that will be shown.
|
|
2492
|
+
*
|
|
2493
|
+
* For elements such as Polygons or Paths, the name is what is shown when
|
|
2494
|
+
* the element is selected by clicking on it.
|
|
2495
|
+
*/
|
|
2496
|
+
name: z.ZodNullable<z.ZodString>;
|
|
2497
|
+
/**
|
|
2498
|
+
* Text describing the element, which is shown in an element's popup when it
|
|
2499
|
+
* is selected.
|
|
2500
|
+
*
|
|
2501
|
+
* Note that some elements are not selectable on the map, such as Notes, Text
|
|
2502
|
+
* and Markers, so their description will not be shown.
|
|
2503
|
+
*/
|
|
2504
|
+
description: z.ZodNullable<z.ZodString>;
|
|
2505
|
+
/**
|
|
2506
|
+
* A set of key-value pairs that can be used to store arbitrary data about the element.
|
|
2507
|
+
*
|
|
2508
|
+
* This is most useful for associating additional data with an element that is not
|
|
2509
|
+
* part of the element's core data, such as a Place's address or some other
|
|
2510
|
+
* data.
|
|
2511
|
+
*/
|
|
840
2512
|
attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
2513
|
+
/**
|
|
2514
|
+
* Whether the element is interactive.
|
|
2515
|
+
*
|
|
2516
|
+
* The `default` interaction mode means that the element can be selected and edited by
|
|
2517
|
+
* the user, if it was created by the SDK or by the user using a tool.
|
|
2518
|
+
*
|
|
2519
|
+
* If the interaction mode is `locked`, the element will not be editable by the user,
|
|
2520
|
+
* which is often used for elements that you don't want the user to edit or move by
|
|
2521
|
+
* accident.
|
|
2522
|
+
*
|
|
2523
|
+
* Elements that were created by the map author (i.e. not during an SDK "session") are
|
|
2524
|
+
* not editable and have special behaviour depending on their name, description and
|
|
2525
|
+
* attributes.
|
|
2526
|
+
*
|
|
2527
|
+
* @default "default"
|
|
2528
|
+
*/
|
|
841
2529
|
interaction: z.ZodOptional<z.ZodEnum<["default", "locked"]>>;
|
|
842
2530
|
}, {
|
|
843
2531
|
type: z.ZodLiteral<"Link">;
|
|
844
2532
|
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">;
|
|
2533
|
+
/**
|
|
2534
|
+
* The URL of the link that is rendered in this element.
|
|
2535
|
+
*/
|
|
845
2536
|
url: z.ZodString;
|
|
846
2537
|
}>, "coordinates">, "strip", z.ZodTypeAny, {
|
|
847
2538
|
type: "Link";
|
|
@@ -864,21 +2555,120 @@ declare const LinkReadSchema: z.ZodObject<Omit<z.objectUtil.extendShape<{
|
|
|
864
2555
|
url: string;
|
|
865
2556
|
interaction?: "default" | "locked" | undefined;
|
|
866
2557
|
}>;
|
|
867
|
-
declare const PlaceUpdateSchema: z.ZodObject<{
|
|
868
|
-
|
|
869
|
-
type: z.ZodLiteral<"Place">;
|
|
870
|
-
coordinates: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
|
|
871
|
-
id: z.ZodString;
|
|
2558
|
+
declare const PlaceUpdateSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
2559
|
+
id: z.ZodOptional<z.ZodString>;
|
|
872
2560
|
groupId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
873
2561
|
color: z.ZodOptional<z.ZodString>;
|
|
874
|
-
name: z.ZodOptional<z.
|
|
875
|
-
description: z.ZodOptional<z.
|
|
2562
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2563
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
876
2564
|
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
877
2565
|
interaction: z.ZodOptional<z.ZodOptional<z.ZodEnum<["default", "locked"]>>>;
|
|
878
2566
|
imageUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2567
|
+
type: z.ZodOptional<z.ZodLiteral<"Place">>;
|
|
2568
|
+
coordinates: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
|
|
2569
|
+
symbol: z.ZodOptional<z.ZodString>;
|
|
879
2570
|
frame: z.ZodOptional<z.ZodNullable<z.ZodEnum<["frame-circle", "frame-square"]>>>;
|
|
880
2571
|
hideLabel: z.ZodOptional<z.ZodBoolean>;
|
|
881
|
-
},
|
|
2572
|
+
}, Pick<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
2573
|
+
/**
|
|
2574
|
+
* The unique identifier for the element.
|
|
2575
|
+
*/
|
|
2576
|
+
id: z.ZodString;
|
|
2577
|
+
/**
|
|
2578
|
+
* The ID of the element group that the element belongs to.
|
|
2579
|
+
* For elements that are not part of a group, this will be null.
|
|
2580
|
+
*/
|
|
2581
|
+
groupId: z.ZodNullable<z.ZodString>;
|
|
2582
|
+
/**
|
|
2583
|
+
* The color of the element in some CSS-like format.
|
|
2584
|
+
*
|
|
2585
|
+
* @example
|
|
2586
|
+
* ```typescript
|
|
2587
|
+
* "#ABC123";
|
|
2588
|
+
* "rgb(255, 0, 0)";
|
|
2589
|
+
* "hsl(200, 100%, 50%)";
|
|
2590
|
+
* ```
|
|
2591
|
+
*
|
|
2592
|
+
* @default "#C93535"
|
|
2593
|
+
*/
|
|
2594
|
+
color: z.ZodString;
|
|
2595
|
+
/**
|
|
2596
|
+
* The element's name. For elements that can show a label or text on
|
|
2597
|
+
* the map (e.g. a Place or Text element) this is the text that will be shown.
|
|
2598
|
+
*
|
|
2599
|
+
* For elements such as Polygons or Paths, the name is what is shown when
|
|
2600
|
+
* the element is selected by clicking on it.
|
|
2601
|
+
*/
|
|
2602
|
+
name: z.ZodNullable<z.ZodString>;
|
|
2603
|
+
/**
|
|
2604
|
+
* Text describing the element, which is shown in an element's popup when it
|
|
2605
|
+
* is selected.
|
|
2606
|
+
*
|
|
2607
|
+
* Note that some elements are not selectable on the map, such as Notes, Text
|
|
2608
|
+
* and Markers, so their description will not be shown.
|
|
2609
|
+
*/
|
|
2610
|
+
description: z.ZodNullable<z.ZodString>;
|
|
2611
|
+
/**
|
|
2612
|
+
* A set of key-value pairs that can be used to store arbitrary data about the element.
|
|
2613
|
+
*
|
|
2614
|
+
* This is most useful for associating additional data with an element that is not
|
|
2615
|
+
* part of the element's core data, such as a Place's address or some other
|
|
2616
|
+
* data.
|
|
2617
|
+
*/
|
|
2618
|
+
attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
2619
|
+
/**
|
|
2620
|
+
* Whether the element is interactive.
|
|
2621
|
+
*
|
|
2622
|
+
* The `default` interaction mode means that the element can be selected and edited by
|
|
2623
|
+
* the user, if it was created by the SDK or by the user using a tool.
|
|
2624
|
+
*
|
|
2625
|
+
* If the interaction mode is `locked`, the element will not be editable by the user,
|
|
2626
|
+
* which is often used for elements that you don't want the user to edit or move by
|
|
2627
|
+
* accident.
|
|
2628
|
+
*
|
|
2629
|
+
* Elements that were created by the map author (i.e. not during an SDK "session") are
|
|
2630
|
+
* not editable and have special behaviour depending on their name, description and
|
|
2631
|
+
* attributes.
|
|
2632
|
+
*
|
|
2633
|
+
* @default "default"
|
|
2634
|
+
*/
|
|
2635
|
+
interaction: z.ZodOptional<z.ZodEnum<["default", "locked"]>>;
|
|
2636
|
+
}, {
|
|
2637
|
+
/**
|
|
2638
|
+
* The URL of an image that has been added to the element.
|
|
2639
|
+
*/
|
|
2640
|
+
imageUrl: z.ZodNullable<z.ZodString>;
|
|
2641
|
+
}>, {
|
|
2642
|
+
type: z.ZodLiteral<"Place">;
|
|
2643
|
+
coordinates: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
2644
|
+
/**
|
|
2645
|
+
* The symbol that is rendered for the Place.
|
|
2646
|
+
*
|
|
2647
|
+
* This can be an emoji by using colon-enclosed characters (e.g. `":smiley:"`)
|
|
2648
|
+
* or one of the symbols available in Felt's symbol library.
|
|
2649
|
+
*
|
|
2650
|
+
* You can see the available symbols in the Felt UI when editing a Place
|
|
2651
|
+
* by hovering a symbol and converting the tooltip to kebab-case. For example,
|
|
2652
|
+
* the "Oil barrel" symbol is `oil-barrel`.
|
|
2653
|
+
*/
|
|
2654
|
+
symbol: z.ZodString;
|
|
2655
|
+
/**
|
|
2656
|
+
* The frame that is rendered around the Place's symbol. This is
|
|
2657
|
+
* only available for non-emoji symbols.
|
|
2658
|
+
*/
|
|
2659
|
+
frame: z.ZodNullable<z.ZodEnum<["frame-circle", "frame-square"]>>;
|
|
2660
|
+
/**
|
|
2661
|
+
* Whether the element's label is hidden on the map. This allows you
|
|
2662
|
+
* to add a name to the element and can show in popups, but not have
|
|
2663
|
+
* it visible on the map.
|
|
2664
|
+
*
|
|
2665
|
+
* This will also hide the faint placeholder label that is shown when
|
|
2666
|
+
* an editable Place is selected.
|
|
2667
|
+
*
|
|
2668
|
+
* @default false
|
|
2669
|
+
*/
|
|
2670
|
+
hideLabel: z.ZodBoolean;
|
|
2671
|
+
}>, "type" | "id">>, "strip", z.ZodTypeAny, {
|
|
882
2672
|
type: "Place";
|
|
883
2673
|
id: string;
|
|
884
2674
|
symbol?: string | undefined;
|
|
@@ -907,24 +2697,138 @@ declare const PlaceUpdateSchema: z.ZodObject<{
|
|
|
907
2697
|
frame?: "frame-circle" | "frame-square" | null | undefined;
|
|
908
2698
|
hideLabel?: boolean | undefined;
|
|
909
2699
|
}>;
|
|
910
|
-
declare const PathUpdateSchema: z.ZodObject<{
|
|
911
|
-
|
|
912
|
-
coordinates: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">>;
|
|
913
|
-
id: z.ZodString;
|
|
2700
|
+
declare const PathUpdateSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
2701
|
+
id: z.ZodOptional<z.ZodString>;
|
|
914
2702
|
groupId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
915
2703
|
color: z.ZodOptional<z.ZodString>;
|
|
916
|
-
name: z.ZodOptional<z.
|
|
917
|
-
description: z.ZodOptional<z.
|
|
2704
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2705
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
918
2706
|
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
919
2707
|
interaction: z.ZodOptional<z.ZodOptional<z.ZodEnum<["default", "locked"]>>>;
|
|
920
2708
|
imageUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
921
2709
|
strokeOpacity: z.ZodOptional<z.ZodNumber>;
|
|
922
2710
|
strokeWidth: z.ZodOptional<z.ZodNumber>;
|
|
923
2711
|
strokeStyle: z.ZodOptional<z.ZodEnum<["solid", "dashed", "dotted"]>>;
|
|
2712
|
+
type: z.ZodOptional<z.ZodLiteral<"Path">>;
|
|
2713
|
+
coordinates: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">>;
|
|
924
2714
|
distanceMarker: z.ZodOptional<z.ZodBoolean>;
|
|
925
|
-
endCaps: z.ZodOptional<z.ZodBoolean>;
|
|
926
2715
|
routingMode: z.ZodOptional<z.ZodNullable<z.ZodEnum<["driving", "cycling", "walking", "flying"]>>>;
|
|
927
|
-
|
|
2716
|
+
endCaps: z.ZodOptional<z.ZodBoolean>;
|
|
2717
|
+
}, Pick<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
2718
|
+
/**
|
|
2719
|
+
* The unique identifier for the element.
|
|
2720
|
+
*/
|
|
2721
|
+
id: z.ZodString;
|
|
2722
|
+
/**
|
|
2723
|
+
* The ID of the element group that the element belongs to.
|
|
2724
|
+
* For elements that are not part of a group, this will be null.
|
|
2725
|
+
*/
|
|
2726
|
+
groupId: z.ZodNullable<z.ZodString>;
|
|
2727
|
+
/**
|
|
2728
|
+
* The color of the element in some CSS-like format.
|
|
2729
|
+
*
|
|
2730
|
+
* @example
|
|
2731
|
+
* ```typescript
|
|
2732
|
+
* "#ABC123";
|
|
2733
|
+
* "rgb(255, 0, 0)";
|
|
2734
|
+
* "hsl(200, 100%, 50%)";
|
|
2735
|
+
* ```
|
|
2736
|
+
*
|
|
2737
|
+
* @default "#C93535"
|
|
2738
|
+
*/
|
|
2739
|
+
color: z.ZodString;
|
|
2740
|
+
/**
|
|
2741
|
+
* The element's name. For elements that can show a label or text on
|
|
2742
|
+
* the map (e.g. a Place or Text element) this is the text that will be shown.
|
|
2743
|
+
*
|
|
2744
|
+
* For elements such as Polygons or Paths, the name is what is shown when
|
|
2745
|
+
* the element is selected by clicking on it.
|
|
2746
|
+
*/
|
|
2747
|
+
name: z.ZodNullable<z.ZodString>;
|
|
2748
|
+
/**
|
|
2749
|
+
* Text describing the element, which is shown in an element's popup when it
|
|
2750
|
+
* is selected.
|
|
2751
|
+
*
|
|
2752
|
+
* Note that some elements are not selectable on the map, such as Notes, Text
|
|
2753
|
+
* and Markers, so their description will not be shown.
|
|
2754
|
+
*/
|
|
2755
|
+
description: z.ZodNullable<z.ZodString>;
|
|
2756
|
+
/**
|
|
2757
|
+
* A set of key-value pairs that can be used to store arbitrary data about the element.
|
|
2758
|
+
*
|
|
2759
|
+
* This is most useful for associating additional data with an element that is not
|
|
2760
|
+
* part of the element's core data, such as a Place's address or some other
|
|
2761
|
+
* data.
|
|
2762
|
+
*/
|
|
2763
|
+
attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
2764
|
+
/**
|
|
2765
|
+
* Whether the element is interactive.
|
|
2766
|
+
*
|
|
2767
|
+
* The `default` interaction mode means that the element can be selected and edited by
|
|
2768
|
+
* the user, if it was created by the SDK or by the user using a tool.
|
|
2769
|
+
*
|
|
2770
|
+
* If the interaction mode is `locked`, the element will not be editable by the user,
|
|
2771
|
+
* which is often used for elements that you don't want the user to edit or move by
|
|
2772
|
+
* accident.
|
|
2773
|
+
*
|
|
2774
|
+
* Elements that were created by the map author (i.e. not during an SDK "session") are
|
|
2775
|
+
* not editable and have special behaviour depending on their name, description and
|
|
2776
|
+
* attributes.
|
|
2777
|
+
*
|
|
2778
|
+
* @default "default"
|
|
2779
|
+
*/
|
|
2780
|
+
interaction: z.ZodOptional<z.ZodEnum<["default", "locked"]>>;
|
|
2781
|
+
}, {
|
|
2782
|
+
/**
|
|
2783
|
+
* The URL of an image that has been added to the element.
|
|
2784
|
+
*/
|
|
2785
|
+
imageUrl: z.ZodNullable<z.ZodString>;
|
|
2786
|
+
}>, {
|
|
2787
|
+
/**
|
|
2788
|
+
* A value between 0 and 1 that describes the opacity of the element's stroke.
|
|
2789
|
+
*
|
|
2790
|
+
* @default 1
|
|
2791
|
+
*/
|
|
2792
|
+
strokeOpacity: z.ZodNumber;
|
|
2793
|
+
/**
|
|
2794
|
+
* The width of the element's stroke in pixels.
|
|
2795
|
+
*
|
|
2796
|
+
* @default 2
|
|
2797
|
+
*/
|
|
2798
|
+
strokeWidth: z.ZodNumber;
|
|
2799
|
+
/**
|
|
2800
|
+
* The style of the element's stroke.
|
|
2801
|
+
*
|
|
2802
|
+
* @default "solid"
|
|
2803
|
+
*/
|
|
2804
|
+
strokeStyle: z.ZodEnum<["solid", "dashed", "dotted"]>;
|
|
2805
|
+
}>, {
|
|
2806
|
+
type: z.ZodLiteral<"Path">;
|
|
2807
|
+
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">;
|
|
2808
|
+
/**
|
|
2809
|
+
* Whether a distance marker is shown at the midpoint of the path.
|
|
2810
|
+
*
|
|
2811
|
+
* @default false
|
|
2812
|
+
*/
|
|
2813
|
+
distanceMarker: z.ZodBoolean;
|
|
2814
|
+
/**
|
|
2815
|
+
* Whether this represents a route, and if so, what mode of transport
|
|
2816
|
+
* is used.
|
|
2817
|
+
*
|
|
2818
|
+
* If this is `null`, the path is not considered to be a route, so while it
|
|
2819
|
+
* can have a `distanceMarker`, it will does not have a start or end cap.
|
|
2820
|
+
*
|
|
2821
|
+
* @default null
|
|
2822
|
+
*/
|
|
2823
|
+
routingMode: z.ZodNullable<z.ZodEnum<["driving", "cycling", "walking", "flying"]>>;
|
|
2824
|
+
/**
|
|
2825
|
+
* Whether or not to show Start and End caps on the path. This is
|
|
2826
|
+
* only available if the `routingMode` is set.
|
|
2827
|
+
*
|
|
2828
|
+
* @default false
|
|
2829
|
+
*/
|
|
2830
|
+
endCaps: z.ZodBoolean;
|
|
2831
|
+
}>, "type" | "id">>, "strip", z.ZodTypeAny, {
|
|
928
2832
|
type: "Path";
|
|
929
2833
|
id: string;
|
|
930
2834
|
coordinates?: [number, number][][] | undefined;
|
|
@@ -939,8 +2843,8 @@ declare const PathUpdateSchema: z.ZodObject<{
|
|
|
939
2843
|
strokeWidth?: number | undefined;
|
|
940
2844
|
strokeStyle?: "solid" | "dashed" | "dotted" | undefined;
|
|
941
2845
|
distanceMarker?: boolean | undefined;
|
|
942
|
-
endCaps?: boolean | undefined;
|
|
943
2846
|
routingMode?: "driving" | "cycling" | "walking" | "flying" | null | undefined;
|
|
2847
|
+
endCaps?: boolean | undefined;
|
|
944
2848
|
}, {
|
|
945
2849
|
type: "Path";
|
|
946
2850
|
id: string;
|
|
@@ -956,26 +2860,129 @@ declare const PathUpdateSchema: z.ZodObject<{
|
|
|
956
2860
|
strokeWidth?: number | undefined;
|
|
957
2861
|
strokeStyle?: "solid" | "dashed" | "dotted" | undefined;
|
|
958
2862
|
distanceMarker?: boolean | undefined;
|
|
959
|
-
endCaps?: boolean | undefined;
|
|
960
2863
|
routingMode?: "driving" | "cycling" | "walking" | "flying" | null | undefined;
|
|
2864
|
+
endCaps?: boolean | undefined;
|
|
961
2865
|
}>;
|
|
962
|
-
declare const PolygonUpdateSchema: z.ZodObject<{
|
|
963
|
-
|
|
964
|
-
coordinates: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">>;
|
|
965
|
-
id: z.ZodString;
|
|
2866
|
+
declare const PolygonUpdateSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
2867
|
+
id: z.ZodOptional<z.ZodString>;
|
|
966
2868
|
groupId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
967
2869
|
color: z.ZodOptional<z.ZodString>;
|
|
968
|
-
name: z.ZodOptional<z.
|
|
969
|
-
description: z.ZodOptional<z.
|
|
2870
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2871
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
970
2872
|
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
971
2873
|
interaction: z.ZodOptional<z.ZodOptional<z.ZodEnum<["default", "locked"]>>>;
|
|
972
2874
|
imageUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
973
2875
|
strokeOpacity: z.ZodOptional<z.ZodNumber>;
|
|
974
2876
|
strokeWidth: z.ZodOptional<z.ZodNumber>;
|
|
975
2877
|
strokeStyle: z.ZodOptional<z.ZodEnum<["solid", "dashed", "dotted"]>>;
|
|
2878
|
+
type: z.ZodOptional<z.ZodLiteral<"Polygon">>;
|
|
2879
|
+
coordinates: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">>;
|
|
976
2880
|
fillOpacity: z.ZodOptional<z.ZodNumber>;
|
|
977
2881
|
areaMarker: z.ZodOptional<z.ZodBoolean>;
|
|
978
|
-
},
|
|
2882
|
+
}, Pick<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
2883
|
+
/**
|
|
2884
|
+
* The unique identifier for the element.
|
|
2885
|
+
*/
|
|
2886
|
+
id: z.ZodString;
|
|
2887
|
+
/**
|
|
2888
|
+
* The ID of the element group that the element belongs to.
|
|
2889
|
+
* For elements that are not part of a group, this will be null.
|
|
2890
|
+
*/
|
|
2891
|
+
groupId: z.ZodNullable<z.ZodString>;
|
|
2892
|
+
/**
|
|
2893
|
+
* The color of the element in some CSS-like format.
|
|
2894
|
+
*
|
|
2895
|
+
* @example
|
|
2896
|
+
* ```typescript
|
|
2897
|
+
* "#ABC123";
|
|
2898
|
+
* "rgb(255, 0, 0)";
|
|
2899
|
+
* "hsl(200, 100%, 50%)";
|
|
2900
|
+
* ```
|
|
2901
|
+
*
|
|
2902
|
+
* @default "#C93535"
|
|
2903
|
+
*/
|
|
2904
|
+
color: z.ZodString;
|
|
2905
|
+
/**
|
|
2906
|
+
* The element's name. For elements that can show a label or text on
|
|
2907
|
+
* the map (e.g. a Place or Text element) this is the text that will be shown.
|
|
2908
|
+
*
|
|
2909
|
+
* For elements such as Polygons or Paths, the name is what is shown when
|
|
2910
|
+
* the element is selected by clicking on it.
|
|
2911
|
+
*/
|
|
2912
|
+
name: z.ZodNullable<z.ZodString>;
|
|
2913
|
+
/**
|
|
2914
|
+
* Text describing the element, which is shown in an element's popup when it
|
|
2915
|
+
* is selected.
|
|
2916
|
+
*
|
|
2917
|
+
* Note that some elements are not selectable on the map, such as Notes, Text
|
|
2918
|
+
* and Markers, so their description will not be shown.
|
|
2919
|
+
*/
|
|
2920
|
+
description: z.ZodNullable<z.ZodString>;
|
|
2921
|
+
/**
|
|
2922
|
+
* A set of key-value pairs that can be used to store arbitrary data about the element.
|
|
2923
|
+
*
|
|
2924
|
+
* This is most useful for associating additional data with an element that is not
|
|
2925
|
+
* part of the element's core data, such as a Place's address or some other
|
|
2926
|
+
* data.
|
|
2927
|
+
*/
|
|
2928
|
+
attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
2929
|
+
/**
|
|
2930
|
+
* Whether the element is interactive.
|
|
2931
|
+
*
|
|
2932
|
+
* The `default` interaction mode means that the element can be selected and edited by
|
|
2933
|
+
* the user, if it was created by the SDK or by the user using a tool.
|
|
2934
|
+
*
|
|
2935
|
+
* If the interaction mode is `locked`, the element will not be editable by the user,
|
|
2936
|
+
* which is often used for elements that you don't want the user to edit or move by
|
|
2937
|
+
* accident.
|
|
2938
|
+
*
|
|
2939
|
+
* Elements that were created by the map author (i.e. not during an SDK "session") are
|
|
2940
|
+
* not editable and have special behaviour depending on their name, description and
|
|
2941
|
+
* attributes.
|
|
2942
|
+
*
|
|
2943
|
+
* @default "default"
|
|
2944
|
+
*/
|
|
2945
|
+
interaction: z.ZodOptional<z.ZodEnum<["default", "locked"]>>;
|
|
2946
|
+
}, {
|
|
2947
|
+
/**
|
|
2948
|
+
* The URL of an image that has been added to the element.
|
|
2949
|
+
*/
|
|
2950
|
+
imageUrl: z.ZodNullable<z.ZodString>;
|
|
2951
|
+
}>, {
|
|
2952
|
+
/**
|
|
2953
|
+
* A value between 0 and 1 that describes the opacity of the element's stroke.
|
|
2954
|
+
*
|
|
2955
|
+
* @default 1
|
|
2956
|
+
*/
|
|
2957
|
+
strokeOpacity: z.ZodNumber;
|
|
2958
|
+
/**
|
|
2959
|
+
* The width of the element's stroke in pixels.
|
|
2960
|
+
*
|
|
2961
|
+
* @default 2
|
|
2962
|
+
*/
|
|
2963
|
+
strokeWidth: z.ZodNumber;
|
|
2964
|
+
/**
|
|
2965
|
+
* The style of the element's stroke.
|
|
2966
|
+
*
|
|
2967
|
+
* @default "solid"
|
|
2968
|
+
*/
|
|
2969
|
+
strokeStyle: z.ZodEnum<["solid", "dashed", "dotted"]>;
|
|
2970
|
+
}>, {
|
|
2971
|
+
type: z.ZodLiteral<"Polygon">;
|
|
2972
|
+
coordinates: z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">;
|
|
2973
|
+
/**
|
|
2974
|
+
* The opacity of the polygon's fill, between 0 and 1.
|
|
2975
|
+
*
|
|
2976
|
+
* @default 0.25
|
|
2977
|
+
*/
|
|
2978
|
+
fillOpacity: z.ZodNumber;
|
|
2979
|
+
/**
|
|
2980
|
+
* Whether to show an area marker on the polygon.
|
|
2981
|
+
*
|
|
2982
|
+
* @default false
|
|
2983
|
+
*/
|
|
2984
|
+
areaMarker: z.ZodBoolean;
|
|
2985
|
+
}>, "type" | "id">>, "strip", z.ZodTypeAny, {
|
|
979
2986
|
type: "Polygon";
|
|
980
2987
|
id: string;
|
|
981
2988
|
coordinates?: [number, number][][] | undefined;
|
|
@@ -1008,29 +3015,155 @@ declare const PolygonUpdateSchema: z.ZodObject<{
|
|
|
1008
3015
|
fillOpacity?: number | undefined;
|
|
1009
3016
|
areaMarker?: boolean | undefined;
|
|
1010
3017
|
}>;
|
|
1011
|
-
declare const CircleUpdateSchema: z.ZodObject<{
|
|
1012
|
-
|
|
1013
|
-
coordinates: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
|
|
1014
|
-
id: z.ZodString;
|
|
3018
|
+
declare const CircleUpdateSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
3019
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1015
3020
|
groupId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1016
3021
|
color: z.ZodOptional<z.ZodString>;
|
|
1017
|
-
name: z.ZodOptional<z.
|
|
1018
|
-
description: z.ZodOptional<z.
|
|
3022
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3023
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1019
3024
|
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1020
3025
|
interaction: z.ZodOptional<z.ZodOptional<z.ZodEnum<["default", "locked"]>>>;
|
|
1021
3026
|
imageUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1022
3027
|
strokeOpacity: z.ZodOptional<z.ZodNumber>;
|
|
1023
3028
|
strokeWidth: z.ZodOptional<z.ZodNumber>;
|
|
1024
3029
|
strokeStyle: z.ZodOptional<z.ZodEnum<["solid", "dashed", "dotted"]>>;
|
|
1025
|
-
|
|
3030
|
+
type: z.ZodOptional<z.ZodLiteral<"Circle">>;
|
|
3031
|
+
center: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
|
|
1026
3032
|
radius: z.ZodOptional<z.ZodNumber>;
|
|
3033
|
+
radiusMarker: z.ZodOptional<z.ZodBoolean>;
|
|
1027
3034
|
radiusDisplayAngle: z.ZodOptional<z.ZodNumber>;
|
|
1028
3035
|
radiusDisplayUnit: z.ZodOptional<z.ZodNullable<z.ZodEnum<["meter", "kilometer", "foot", "mile"]>>>;
|
|
1029
|
-
|
|
1030
|
-
},
|
|
3036
|
+
fillOpacity: z.ZodOptional<z.ZodNumber>;
|
|
3037
|
+
}, Pick<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
3038
|
+
/**
|
|
3039
|
+
* The unique identifier for the element.
|
|
3040
|
+
*/
|
|
3041
|
+
id: z.ZodString;
|
|
3042
|
+
/**
|
|
3043
|
+
* The ID of the element group that the element belongs to.
|
|
3044
|
+
* For elements that are not part of a group, this will be null.
|
|
3045
|
+
*/
|
|
3046
|
+
groupId: z.ZodNullable<z.ZodString>;
|
|
3047
|
+
/**
|
|
3048
|
+
* The color of the element in some CSS-like format.
|
|
3049
|
+
*
|
|
3050
|
+
* @example
|
|
3051
|
+
* ```typescript
|
|
3052
|
+
* "#ABC123";
|
|
3053
|
+
* "rgb(255, 0, 0)";
|
|
3054
|
+
* "hsl(200, 100%, 50%)";
|
|
3055
|
+
* ```
|
|
3056
|
+
*
|
|
3057
|
+
* @default "#C93535"
|
|
3058
|
+
*/
|
|
3059
|
+
color: z.ZodString;
|
|
3060
|
+
/**
|
|
3061
|
+
* The element's name. For elements that can show a label or text on
|
|
3062
|
+
* the map (e.g. a Place or Text element) this is the text that will be shown.
|
|
3063
|
+
*
|
|
3064
|
+
* For elements such as Polygons or Paths, the name is what is shown when
|
|
3065
|
+
* the element is selected by clicking on it.
|
|
3066
|
+
*/
|
|
3067
|
+
name: z.ZodNullable<z.ZodString>;
|
|
3068
|
+
/**
|
|
3069
|
+
* Text describing the element, which is shown in an element's popup when it
|
|
3070
|
+
* is selected.
|
|
3071
|
+
*
|
|
3072
|
+
* Note that some elements are not selectable on the map, such as Notes, Text
|
|
3073
|
+
* and Markers, so their description will not be shown.
|
|
3074
|
+
*/
|
|
3075
|
+
description: z.ZodNullable<z.ZodString>;
|
|
3076
|
+
/**
|
|
3077
|
+
* A set of key-value pairs that can be used to store arbitrary data about the element.
|
|
3078
|
+
*
|
|
3079
|
+
* This is most useful for associating additional data with an element that is not
|
|
3080
|
+
* part of the element's core data, such as a Place's address or some other
|
|
3081
|
+
* data.
|
|
3082
|
+
*/
|
|
3083
|
+
attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
3084
|
+
/**
|
|
3085
|
+
* Whether the element is interactive.
|
|
3086
|
+
*
|
|
3087
|
+
* The `default` interaction mode means that the element can be selected and edited by
|
|
3088
|
+
* the user, if it was created by the SDK or by the user using a tool.
|
|
3089
|
+
*
|
|
3090
|
+
* If the interaction mode is `locked`, the element will not be editable by the user,
|
|
3091
|
+
* which is often used for elements that you don't want the user to edit or move by
|
|
3092
|
+
* accident.
|
|
3093
|
+
*
|
|
3094
|
+
* Elements that were created by the map author (i.e. not during an SDK "session") are
|
|
3095
|
+
* not editable and have special behaviour depending on their name, description and
|
|
3096
|
+
* attributes.
|
|
3097
|
+
*
|
|
3098
|
+
* @default "default"
|
|
3099
|
+
*/
|
|
3100
|
+
interaction: z.ZodOptional<z.ZodEnum<["default", "locked"]>>;
|
|
3101
|
+
}, {
|
|
3102
|
+
/**
|
|
3103
|
+
* The URL of an image that has been added to the element.
|
|
3104
|
+
*/
|
|
3105
|
+
imageUrl: z.ZodNullable<z.ZodString>;
|
|
3106
|
+
}>, {
|
|
3107
|
+
/**
|
|
3108
|
+
* A value between 0 and 1 that describes the opacity of the element's stroke.
|
|
3109
|
+
*
|
|
3110
|
+
* @default 1
|
|
3111
|
+
*/
|
|
3112
|
+
strokeOpacity: z.ZodNumber;
|
|
3113
|
+
/**
|
|
3114
|
+
* The width of the element's stroke in pixels.
|
|
3115
|
+
*
|
|
3116
|
+
* @default 2
|
|
3117
|
+
*/
|
|
3118
|
+
strokeWidth: z.ZodNumber;
|
|
3119
|
+
/**
|
|
3120
|
+
* The style of the element's stroke.
|
|
3121
|
+
*
|
|
3122
|
+
* @default "solid"
|
|
3123
|
+
*/
|
|
3124
|
+
strokeStyle: z.ZodEnum<["solid", "dashed", "dotted"]>;
|
|
3125
|
+
}>, {
|
|
3126
|
+
type: z.ZodLiteral<"Circle">;
|
|
3127
|
+
/**
|
|
3128
|
+
* The center of the circle.
|
|
3129
|
+
*/
|
|
3130
|
+
center: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
3131
|
+
/**
|
|
3132
|
+
* The radius of the circle in meters.
|
|
3133
|
+
*/
|
|
3134
|
+
radius: z.ZodNumber;
|
|
3135
|
+
/**
|
|
3136
|
+
* Whether to show a marker on the circle that indicates the radius
|
|
3137
|
+
*
|
|
3138
|
+
* @default false
|
|
3139
|
+
*/
|
|
3140
|
+
radiusMarker: z.ZodBoolean;
|
|
3141
|
+
/**
|
|
3142
|
+
* The angle at which the control point for setting the radius is displayed,
|
|
3143
|
+
* in degrees. When the `radiusMarker` is `true`, there is a dotted line rendered
|
|
3144
|
+
* from the center of the circle to the control point, and the marker is shown
|
|
3145
|
+
* at the midpoint of this line.
|
|
3146
|
+
*
|
|
3147
|
+
* @default 90
|
|
3148
|
+
*/
|
|
3149
|
+
radiusDisplayAngle: z.ZodNumber;
|
|
3150
|
+
/**
|
|
3151
|
+
* The unit of the radius used when the `radiusMarker` is `true`.
|
|
3152
|
+
*
|
|
3153
|
+
* A value of `null` means that the unit matches the user's locale.
|
|
3154
|
+
*
|
|
3155
|
+
* @default null
|
|
3156
|
+
*/
|
|
3157
|
+
radiusDisplayUnit: z.ZodNullable<z.ZodEnum<["meter", "kilometer", "foot", "mile"]>>;
|
|
3158
|
+
/**
|
|
3159
|
+
* The opacity of the circle's fill.
|
|
3160
|
+
*
|
|
3161
|
+
* @default 0.25
|
|
3162
|
+
*/
|
|
3163
|
+
fillOpacity: z.ZodNumber;
|
|
3164
|
+
}>, "type" | "id">>, "strip", z.ZodTypeAny, {
|
|
1031
3165
|
type: "Circle";
|
|
1032
3166
|
id: string;
|
|
1033
|
-
coordinates?: [number, number] | undefined;
|
|
1034
3167
|
groupId?: string | null | undefined;
|
|
1035
3168
|
color?: string | undefined;
|
|
1036
3169
|
name?: string | null | undefined;
|
|
@@ -1042,14 +3175,14 @@ declare const CircleUpdateSchema: z.ZodObject<{
|
|
|
1042
3175
|
strokeWidth?: number | undefined;
|
|
1043
3176
|
strokeStyle?: "solid" | "dashed" | "dotted" | undefined;
|
|
1044
3177
|
fillOpacity?: number | undefined;
|
|
3178
|
+
center?: [number, number] | undefined;
|
|
1045
3179
|
radius?: number | undefined;
|
|
3180
|
+
radiusMarker?: boolean | undefined;
|
|
1046
3181
|
radiusDisplayAngle?: number | undefined;
|
|
1047
3182
|
radiusDisplayUnit?: "meter" | "kilometer" | "foot" | "mile" | null | undefined;
|
|
1048
|
-
radiusMarker?: boolean | undefined;
|
|
1049
3183
|
}, {
|
|
1050
3184
|
type: "Circle";
|
|
1051
3185
|
id: string;
|
|
1052
|
-
coordinates?: [number, number] | undefined;
|
|
1053
3186
|
groupId?: string | null | undefined;
|
|
1054
3187
|
color?: string | undefined;
|
|
1055
3188
|
name?: string | null | undefined;
|
|
@@ -1061,25 +3194,114 @@ declare const CircleUpdateSchema: z.ZodObject<{
|
|
|
1061
3194
|
strokeWidth?: number | undefined;
|
|
1062
3195
|
strokeStyle?: "solid" | "dashed" | "dotted" | undefined;
|
|
1063
3196
|
fillOpacity?: number | undefined;
|
|
3197
|
+
center?: [number, number] | undefined;
|
|
1064
3198
|
radius?: number | undefined;
|
|
3199
|
+
radiusMarker?: boolean | undefined;
|
|
1065
3200
|
radiusDisplayAngle?: number | undefined;
|
|
1066
3201
|
radiusDisplayUnit?: "meter" | "kilometer" | "foot" | "mile" | null | undefined;
|
|
1067
|
-
radiusMarker?: boolean | undefined;
|
|
1068
3202
|
}>;
|
|
1069
|
-
declare const MarkerUpdateSchema: z.ZodObject<{
|
|
1070
|
-
|
|
1071
|
-
coordinates: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">>;
|
|
1072
|
-
id: z.ZodString;
|
|
3203
|
+
declare const MarkerUpdateSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
3204
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1073
3205
|
groupId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1074
3206
|
color: z.ZodOptional<z.ZodString>;
|
|
1075
|
-
name: z.ZodOptional<z.
|
|
1076
|
-
description: z.ZodOptional<z.
|
|
3207
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3208
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1077
3209
|
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1078
3210
|
interaction: z.ZodOptional<z.ZodOptional<z.ZodEnum<["default", "locked"]>>>;
|
|
3211
|
+
type: z.ZodOptional<z.ZodLiteral<"Marker">>;
|
|
3212
|
+
coordinates: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">>;
|
|
1079
3213
|
opacity: z.ZodOptional<z.ZodNumber>;
|
|
1080
3214
|
size: z.ZodOptional<z.ZodNumber>;
|
|
1081
3215
|
zoom: z.ZodOptional<z.ZodNumber>;
|
|
1082
|
-
},
|
|
3216
|
+
}, Pick<z.objectUtil.extendShape<{
|
|
3217
|
+
/**
|
|
3218
|
+
* The unique identifier for the element.
|
|
3219
|
+
*/
|
|
3220
|
+
id: z.ZodString;
|
|
3221
|
+
/**
|
|
3222
|
+
* The ID of the element group that the element belongs to.
|
|
3223
|
+
* For elements that are not part of a group, this will be null.
|
|
3224
|
+
*/
|
|
3225
|
+
groupId: z.ZodNullable<z.ZodString>;
|
|
3226
|
+
/**
|
|
3227
|
+
* The color of the element in some CSS-like format.
|
|
3228
|
+
*
|
|
3229
|
+
* @example
|
|
3230
|
+
* ```typescript
|
|
3231
|
+
* "#ABC123";
|
|
3232
|
+
* "rgb(255, 0, 0)";
|
|
3233
|
+
* "hsl(200, 100%, 50%)";
|
|
3234
|
+
* ```
|
|
3235
|
+
*
|
|
3236
|
+
* @default "#C93535"
|
|
3237
|
+
*/
|
|
3238
|
+
color: z.ZodString;
|
|
3239
|
+
/**
|
|
3240
|
+
* The element's name. For elements that can show a label or text on
|
|
3241
|
+
* the map (e.g. a Place or Text element) this is the text that will be shown.
|
|
3242
|
+
*
|
|
3243
|
+
* For elements such as Polygons or Paths, the name is what is shown when
|
|
3244
|
+
* the element is selected by clicking on it.
|
|
3245
|
+
*/
|
|
3246
|
+
name: z.ZodNullable<z.ZodString>;
|
|
3247
|
+
/**
|
|
3248
|
+
* Text describing the element, which is shown in an element's popup when it
|
|
3249
|
+
* is selected.
|
|
3250
|
+
*
|
|
3251
|
+
* Note that some elements are not selectable on the map, such as Notes, Text
|
|
3252
|
+
* and Markers, so their description will not be shown.
|
|
3253
|
+
*/
|
|
3254
|
+
description: z.ZodNullable<z.ZodString>;
|
|
3255
|
+
/**
|
|
3256
|
+
* A set of key-value pairs that can be used to store arbitrary data about the element.
|
|
3257
|
+
*
|
|
3258
|
+
* This is most useful for associating additional data with an element that is not
|
|
3259
|
+
* part of the element's core data, such as a Place's address or some other
|
|
3260
|
+
* data.
|
|
3261
|
+
*/
|
|
3262
|
+
attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
3263
|
+
/**
|
|
3264
|
+
* Whether the element is interactive.
|
|
3265
|
+
*
|
|
3266
|
+
* The `default` interaction mode means that the element can be selected and edited by
|
|
3267
|
+
* the user, if it was created by the SDK or by the user using a tool.
|
|
3268
|
+
*
|
|
3269
|
+
* If the interaction mode is `locked`, the element will not be editable by the user,
|
|
3270
|
+
* which is often used for elements that you don't want the user to edit or move by
|
|
3271
|
+
* accident.
|
|
3272
|
+
*
|
|
3273
|
+
* Elements that were created by the map author (i.e. not during an SDK "session") are
|
|
3274
|
+
* not editable and have special behaviour depending on their name, description and
|
|
3275
|
+
* attributes.
|
|
3276
|
+
*
|
|
3277
|
+
* @default "default"
|
|
3278
|
+
*/
|
|
3279
|
+
interaction: z.ZodOptional<z.ZodEnum<["default", "locked"]>>;
|
|
3280
|
+
}, {
|
|
3281
|
+
type: z.ZodLiteral<"Marker">;
|
|
3282
|
+
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">;
|
|
3283
|
+
/**
|
|
3284
|
+
* The opacity of the marker, between 0 and 1.
|
|
3285
|
+
*
|
|
3286
|
+
* @default 1
|
|
3287
|
+
*/
|
|
3288
|
+
opacity: z.ZodNumber;
|
|
3289
|
+
/**
|
|
3290
|
+
* The size of the marker, used in conjunction with the `zoom` to determine
|
|
3291
|
+
* the actual size of the marker.
|
|
3292
|
+
*
|
|
3293
|
+
* @default 10
|
|
3294
|
+
*/
|
|
3295
|
+
size: z.ZodNumber;
|
|
3296
|
+
/**
|
|
3297
|
+
* The zoom level at which the marker was created. This is combined with
|
|
3298
|
+
* the `size` to determine the actual size of the marker.
|
|
3299
|
+
*
|
|
3300
|
+
* When creating a marker, if you don't supply this value it defaults to
|
|
3301
|
+
* the current zoom of the map when you call `createElement`.
|
|
3302
|
+
*/
|
|
3303
|
+
zoom: z.ZodNumber;
|
|
3304
|
+
}>, "type" | "id">>, "strip", z.ZodTypeAny, {
|
|
1083
3305
|
type: "Marker";
|
|
1084
3306
|
id: string;
|
|
1085
3307
|
coordinates?: [number, number][][] | undefined;
|
|
@@ -1106,21 +3328,107 @@ declare const MarkerUpdateSchema: z.ZodObject<{
|
|
|
1106
3328
|
size?: number | undefined;
|
|
1107
3329
|
zoom?: number | undefined;
|
|
1108
3330
|
}>;
|
|
1109
|
-
declare const HighlighterUpdateSchema: z.ZodObject<{
|
|
1110
|
-
|
|
1111
|
-
coordinates: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">>;
|
|
1112
|
-
id: z.ZodString;
|
|
3331
|
+
declare const HighlighterUpdateSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
3332
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1113
3333
|
groupId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1114
3334
|
color: z.ZodOptional<z.ZodString>;
|
|
1115
|
-
name: z.ZodOptional<z.
|
|
1116
|
-
description: z.ZodOptional<z.
|
|
3335
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3336
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1117
3337
|
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1118
3338
|
interaction: z.ZodOptional<z.ZodOptional<z.ZodEnum<["default", "locked"]>>>;
|
|
3339
|
+
type: z.ZodOptional<z.ZodLiteral<"Highlighter">>;
|
|
3340
|
+
coordinates: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">, "many">>;
|
|
3341
|
+
renderHoles: z.ZodOptional<z.ZodBoolean>;
|
|
1119
3342
|
opacity: z.ZodOptional<z.ZodNumber>;
|
|
1120
|
-
},
|
|
3343
|
+
}, Pick<z.objectUtil.extendShape<{
|
|
3344
|
+
/**
|
|
3345
|
+
* The unique identifier for the element.
|
|
3346
|
+
*/
|
|
3347
|
+
id: z.ZodString;
|
|
3348
|
+
/**
|
|
3349
|
+
* The ID of the element group that the element belongs to.
|
|
3350
|
+
* For elements that are not part of a group, this will be null.
|
|
3351
|
+
*/
|
|
3352
|
+
groupId: z.ZodNullable<z.ZodString>;
|
|
3353
|
+
/**
|
|
3354
|
+
* The color of the element in some CSS-like format.
|
|
3355
|
+
*
|
|
3356
|
+
* @example
|
|
3357
|
+
* ```typescript
|
|
3358
|
+
* "#ABC123";
|
|
3359
|
+
* "rgb(255, 0, 0)";
|
|
3360
|
+
* "hsl(200, 100%, 50%)";
|
|
3361
|
+
* ```
|
|
3362
|
+
*
|
|
3363
|
+
* @default "#C93535"
|
|
3364
|
+
*/
|
|
3365
|
+
color: z.ZodString;
|
|
3366
|
+
/**
|
|
3367
|
+
* The element's name. For elements that can show a label or text on
|
|
3368
|
+
* the map (e.g. a Place or Text element) this is the text that will be shown.
|
|
3369
|
+
*
|
|
3370
|
+
* For elements such as Polygons or Paths, the name is what is shown when
|
|
3371
|
+
* the element is selected by clicking on it.
|
|
3372
|
+
*/
|
|
3373
|
+
name: z.ZodNullable<z.ZodString>;
|
|
3374
|
+
/**
|
|
3375
|
+
* Text describing the element, which is shown in an element's popup when it
|
|
3376
|
+
* is selected.
|
|
3377
|
+
*
|
|
3378
|
+
* Note that some elements are not selectable on the map, such as Notes, Text
|
|
3379
|
+
* and Markers, so their description will not be shown.
|
|
3380
|
+
*/
|
|
3381
|
+
description: z.ZodNullable<z.ZodString>;
|
|
3382
|
+
/**
|
|
3383
|
+
* A set of key-value pairs that can be used to store arbitrary data about the element.
|
|
3384
|
+
*
|
|
3385
|
+
* This is most useful for associating additional data with an element that is not
|
|
3386
|
+
* part of the element's core data, such as a Place's address or some other
|
|
3387
|
+
* data.
|
|
3388
|
+
*/
|
|
3389
|
+
attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
3390
|
+
/**
|
|
3391
|
+
* Whether the element is interactive.
|
|
3392
|
+
*
|
|
3393
|
+
* The `default` interaction mode means that the element can be selected and edited by
|
|
3394
|
+
* the user, if it was created by the SDK or by the user using a tool.
|
|
3395
|
+
*
|
|
3396
|
+
* If the interaction mode is `locked`, the element will not be editable by the user,
|
|
3397
|
+
* which is often used for elements that you don't want the user to edit or move by
|
|
3398
|
+
* accident.
|
|
3399
|
+
*
|
|
3400
|
+
* Elements that were created by the map author (i.e. not during an SDK "session") are
|
|
3401
|
+
* not editable and have special behaviour depending on their name, description and
|
|
3402
|
+
* attributes.
|
|
3403
|
+
*
|
|
3404
|
+
* @default "default"
|
|
3405
|
+
*/
|
|
3406
|
+
interaction: z.ZodOptional<z.ZodEnum<["default", "locked"]>>;
|
|
3407
|
+
}, {
|
|
3408
|
+
type: z.ZodLiteral<"Highlighter">;
|
|
3409
|
+
/**
|
|
3410
|
+
* A multipolygon describing the area that is highlighted.
|
|
3411
|
+
*
|
|
3412
|
+
* If `renderHoles` is set to false, only the outer ring of each polygon
|
|
3413
|
+
* will be rendered, filling in the area inside the highlighted region.
|
|
3414
|
+
*/
|
|
3415
|
+
coordinates: z.ZodArray<z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">, "many">;
|
|
3416
|
+
/**
|
|
3417
|
+
* Whether to render the holes of the highlighted area.
|
|
3418
|
+
*
|
|
3419
|
+
* @default false
|
|
3420
|
+
*/
|
|
3421
|
+
renderHoles: z.ZodBoolean;
|
|
3422
|
+
/**
|
|
3423
|
+
* The opacity of the highlighter, between 0 and 1.
|
|
3424
|
+
*
|
|
3425
|
+
* @default 0.5
|
|
3426
|
+
*/
|
|
3427
|
+
opacity: z.ZodNumber;
|
|
3428
|
+
}>, "type" | "id">>, "strip", z.ZodTypeAny, {
|
|
1121
3429
|
type: "Highlighter";
|
|
1122
3430
|
id: string;
|
|
1123
|
-
coordinates?: [number, number][][] | undefined;
|
|
3431
|
+
coordinates?: [number, number][][][] | undefined;
|
|
1124
3432
|
groupId?: string | null | undefined;
|
|
1125
3433
|
color?: string | undefined;
|
|
1126
3434
|
name?: string | null | undefined;
|
|
@@ -1128,10 +3436,11 @@ declare const HighlighterUpdateSchema: z.ZodObject<{
|
|
|
1128
3436
|
attributes?: Record<string, unknown> | undefined;
|
|
1129
3437
|
interaction?: "default" | "locked" | undefined;
|
|
1130
3438
|
opacity?: number | undefined;
|
|
3439
|
+
renderHoles?: boolean | undefined;
|
|
1131
3440
|
}, {
|
|
1132
3441
|
type: "Highlighter";
|
|
1133
3442
|
id: string;
|
|
1134
|
-
coordinates?: [number, number][][] | undefined;
|
|
3443
|
+
coordinates?: [number, number][][][] | undefined;
|
|
1135
3444
|
groupId?: string | null | undefined;
|
|
1136
3445
|
color?: string | undefined;
|
|
1137
3446
|
name?: string | null | undefined;
|
|
@@ -1139,25 +3448,122 @@ declare const HighlighterUpdateSchema: z.ZodObject<{
|
|
|
1139
3448
|
attributes?: Record<string, unknown> | undefined;
|
|
1140
3449
|
interaction?: "default" | "locked" | undefined;
|
|
1141
3450
|
opacity?: number | undefined;
|
|
3451
|
+
renderHoles?: boolean | undefined;
|
|
1142
3452
|
}>;
|
|
1143
|
-
declare const TextUpdateSchema: z.ZodObject<Omit<{
|
|
1144
|
-
|
|
1145
|
-
coordinates: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">>;
|
|
1146
|
-
id: z.ZodString;
|
|
3453
|
+
declare const TextUpdateSchema: z.ZodObject<Omit<z.objectUtil.extendShape<{
|
|
3454
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1147
3455
|
groupId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1148
3456
|
color: z.ZodOptional<z.ZodString>;
|
|
1149
|
-
|
|
1150
|
-
description: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
|
|
3457
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1151
3458
|
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1152
3459
|
interaction: z.ZodOptional<z.ZodOptional<z.ZodEnum<["default", "locked"]>>>;
|
|
1153
|
-
zoom: z.ZodOptional<z.ZodNumber>;
|
|
1154
3460
|
position: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
|
|
1155
3461
|
rotation: z.ZodOptional<z.ZodNumber>;
|
|
1156
3462
|
scale: z.ZodOptional<z.ZodNumber>;
|
|
3463
|
+
zoom: z.ZodOptional<z.ZodNumber>;
|
|
3464
|
+
coordinates: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">>;
|
|
1157
3465
|
text: z.ZodOptional<z.ZodString>;
|
|
1158
3466
|
align: z.ZodOptional<z.ZodEnum<["left", "center", "right"]>>;
|
|
1159
3467
|
style: z.ZodOptional<z.ZodEnum<["italic", "light", "regular", "caps"]>>;
|
|
1160
|
-
|
|
3468
|
+
name: z.ZodOptional<z.ZodString>;
|
|
3469
|
+
type: z.ZodOptional<z.ZodLiteral<"Text">>;
|
|
3470
|
+
}, Pick<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
3471
|
+
/**
|
|
3472
|
+
* The unique identifier for the element.
|
|
3473
|
+
*/
|
|
3474
|
+
id: z.ZodString;
|
|
3475
|
+
/**
|
|
3476
|
+
* The ID of the element group that the element belongs to.
|
|
3477
|
+
* For elements that are not part of a group, this will be null.
|
|
3478
|
+
*/
|
|
3479
|
+
groupId: z.ZodNullable<z.ZodString>;
|
|
3480
|
+
/**
|
|
3481
|
+
* The color of the element in some CSS-like format.
|
|
3482
|
+
*
|
|
3483
|
+
* @example
|
|
3484
|
+
* ```typescript
|
|
3485
|
+
* "#ABC123";
|
|
3486
|
+
* "rgb(255, 0, 0)";
|
|
3487
|
+
* "hsl(200, 100%, 50%)";
|
|
3488
|
+
* ```
|
|
3489
|
+
*
|
|
3490
|
+
* @default "#C93535"
|
|
3491
|
+
*/
|
|
3492
|
+
color: z.ZodString;
|
|
3493
|
+
/**
|
|
3494
|
+
* The element's name. For elements that can show a label or text on
|
|
3495
|
+
* the map (e.g. a Place or Text element) this is the text that will be shown.
|
|
3496
|
+
*
|
|
3497
|
+
* For elements such as Polygons or Paths, the name is what is shown when
|
|
3498
|
+
* the element is selected by clicking on it.
|
|
3499
|
+
*/
|
|
3500
|
+
name: z.ZodNullable<z.ZodString>;
|
|
3501
|
+
/**
|
|
3502
|
+
* Text describing the element, which is shown in an element's popup when it
|
|
3503
|
+
* is selected.
|
|
3504
|
+
*
|
|
3505
|
+
* Note that some elements are not selectable on the map, such as Notes, Text
|
|
3506
|
+
* and Markers, so their description will not be shown.
|
|
3507
|
+
*/
|
|
3508
|
+
description: z.ZodNullable<z.ZodString>;
|
|
3509
|
+
/**
|
|
3510
|
+
* A set of key-value pairs that can be used to store arbitrary data about the element.
|
|
3511
|
+
*
|
|
3512
|
+
* This is most useful for associating additional data with an element that is not
|
|
3513
|
+
* part of the element's core data, such as a Place's address or some other
|
|
3514
|
+
* data.
|
|
3515
|
+
*/
|
|
3516
|
+
attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
3517
|
+
/**
|
|
3518
|
+
* Whether the element is interactive.
|
|
3519
|
+
*
|
|
3520
|
+
* The `default` interaction mode means that the element can be selected and edited by
|
|
3521
|
+
* the user, if it was created by the SDK or by the user using a tool.
|
|
3522
|
+
*
|
|
3523
|
+
* If the interaction mode is `locked`, the element will not be editable by the user,
|
|
3524
|
+
* which is often used for elements that you don't want the user to edit or move by
|
|
3525
|
+
* accident.
|
|
3526
|
+
*
|
|
3527
|
+
* Elements that were created by the map author (i.e. not during an SDK "session") are
|
|
3528
|
+
* not editable and have special behaviour depending on their name, description and
|
|
3529
|
+
* attributes.
|
|
3530
|
+
*
|
|
3531
|
+
* @default "default"
|
|
3532
|
+
*/
|
|
3533
|
+
interaction: z.ZodOptional<z.ZodEnum<["default", "locked"]>>;
|
|
3534
|
+
}, {
|
|
3535
|
+
position: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
3536
|
+
rotation: z.ZodNumber;
|
|
3537
|
+
scale: z.ZodNumber;
|
|
3538
|
+
zoom: z.ZodNumber;
|
|
3539
|
+
coordinates: z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">;
|
|
3540
|
+
}>, {
|
|
3541
|
+
/**
|
|
3542
|
+
* The text in the element.
|
|
3543
|
+
*/
|
|
3544
|
+
text: z.ZodString;
|
|
3545
|
+
/**
|
|
3546
|
+
* The alignment of the text, either `left`, `center` or `right`.
|
|
3547
|
+
*
|
|
3548
|
+
* @default "center"
|
|
3549
|
+
*/
|
|
3550
|
+
align: z.ZodEnum<["left", "center", "right"]>;
|
|
3551
|
+
/**
|
|
3552
|
+
* The style of the text, either `italic`, `light`, `regular` or `caps`.
|
|
3553
|
+
*
|
|
3554
|
+
* @default "regular"
|
|
3555
|
+
*/
|
|
3556
|
+
style: z.ZodEnum<["italic", "light", "regular", "caps"]>;
|
|
3557
|
+
/**
|
|
3558
|
+
* The text shown in the element, which is identical to the `text` property.
|
|
3559
|
+
*
|
|
3560
|
+
* @remarks This is added for consistency with other elements that have a `name`
|
|
3561
|
+
* property.
|
|
3562
|
+
*/
|
|
3563
|
+
name: z.ZodString;
|
|
3564
|
+
}>, {
|
|
3565
|
+
type: z.ZodLiteral<"Text">;
|
|
3566
|
+
}>, "type" | "id">>, "coordinates" | "name">, "strip", z.ZodTypeAny, {
|
|
1161
3567
|
type: "Text";
|
|
1162
3568
|
id: string;
|
|
1163
3569
|
groupId?: string | null | undefined;
|
|
@@ -1170,7 +3576,7 @@ declare const TextUpdateSchema: z.ZodObject<Omit<{
|
|
|
1170
3576
|
rotation?: number | undefined;
|
|
1171
3577
|
scale?: number | undefined;
|
|
1172
3578
|
text?: string | undefined;
|
|
1173
|
-
align?: "
|
|
3579
|
+
align?: "center" | "left" | "right" | undefined;
|
|
1174
3580
|
style?: "italic" | "light" | "regular" | "caps" | undefined;
|
|
1175
3581
|
}, {
|
|
1176
3582
|
type: "Text";
|
|
@@ -1185,28 +3591,125 @@ declare const TextUpdateSchema: z.ZodObject<Omit<{
|
|
|
1185
3591
|
rotation?: number | undefined;
|
|
1186
3592
|
scale?: number | undefined;
|
|
1187
3593
|
text?: string | undefined;
|
|
1188
|
-
align?: "
|
|
3594
|
+
align?: "center" | "left" | "right" | undefined;
|
|
1189
3595
|
style?: "italic" | "light" | "regular" | "caps" | undefined;
|
|
1190
3596
|
}>;
|
|
1191
|
-
declare const NoteUpdateSchema: z.ZodObject<Omit<{
|
|
1192
|
-
|
|
1193
|
-
coordinates: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">>;
|
|
1194
|
-
id: z.ZodString;
|
|
3597
|
+
declare const NoteUpdateSchema: z.ZodObject<Omit<z.objectUtil.extendShape<{
|
|
3598
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1195
3599
|
groupId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1196
3600
|
color: z.ZodOptional<z.ZodString>;
|
|
1197
|
-
|
|
1198
|
-
description: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
|
|
3601
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1199
3602
|
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1200
3603
|
interaction: z.ZodOptional<z.ZodOptional<z.ZodEnum<["default", "locked"]>>>;
|
|
1201
|
-
zoom: z.ZodOptional<z.ZodNumber>;
|
|
1202
3604
|
position: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
|
|
1203
3605
|
rotation: z.ZodOptional<z.ZodNumber>;
|
|
1204
3606
|
scale: z.ZodOptional<z.ZodNumber>;
|
|
3607
|
+
zoom: z.ZodOptional<z.ZodNumber>;
|
|
3608
|
+
coordinates: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">>;
|
|
1205
3609
|
text: z.ZodOptional<z.ZodString>;
|
|
1206
3610
|
align: z.ZodOptional<z.ZodEnum<["left", "center", "right"]>>;
|
|
1207
3611
|
style: z.ZodOptional<z.ZodEnum<["italic", "light", "regular", "caps"]>>;
|
|
3612
|
+
name: z.ZodOptional<z.ZodString>;
|
|
3613
|
+
type: z.ZodOptional<z.ZodLiteral<"Note">>;
|
|
1208
3614
|
widthScale: z.ZodOptional<z.ZodNumber>;
|
|
1209
|
-
},
|
|
3615
|
+
}, Pick<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
3616
|
+
/**
|
|
3617
|
+
* The unique identifier for the element.
|
|
3618
|
+
*/
|
|
3619
|
+
id: z.ZodString;
|
|
3620
|
+
/**
|
|
3621
|
+
* The ID of the element group that the element belongs to.
|
|
3622
|
+
* For elements that are not part of a group, this will be null.
|
|
3623
|
+
*/
|
|
3624
|
+
groupId: z.ZodNullable<z.ZodString>;
|
|
3625
|
+
/**
|
|
3626
|
+
* The color of the element in some CSS-like format.
|
|
3627
|
+
*
|
|
3628
|
+
* @example
|
|
3629
|
+
* ```typescript
|
|
3630
|
+
* "#ABC123";
|
|
3631
|
+
* "rgb(255, 0, 0)";
|
|
3632
|
+
* "hsl(200, 100%, 50%)";
|
|
3633
|
+
* ```
|
|
3634
|
+
*
|
|
3635
|
+
* @default "#C93535"
|
|
3636
|
+
*/
|
|
3637
|
+
color: z.ZodString;
|
|
3638
|
+
/**
|
|
3639
|
+
* The element's name. For elements that can show a label or text on
|
|
3640
|
+
* the map (e.g. a Place or Text element) this is the text that will be shown.
|
|
3641
|
+
*
|
|
3642
|
+
* For elements such as Polygons or Paths, the name is what is shown when
|
|
3643
|
+
* the element is selected by clicking on it.
|
|
3644
|
+
*/
|
|
3645
|
+
name: z.ZodNullable<z.ZodString>;
|
|
3646
|
+
/**
|
|
3647
|
+
* Text describing the element, which is shown in an element's popup when it
|
|
3648
|
+
* is selected.
|
|
3649
|
+
*
|
|
3650
|
+
* Note that some elements are not selectable on the map, such as Notes, Text
|
|
3651
|
+
* and Markers, so their description will not be shown.
|
|
3652
|
+
*/
|
|
3653
|
+
description: z.ZodNullable<z.ZodString>;
|
|
3654
|
+
/**
|
|
3655
|
+
* A set of key-value pairs that can be used to store arbitrary data about the element.
|
|
3656
|
+
*
|
|
3657
|
+
* This is most useful for associating additional data with an element that is not
|
|
3658
|
+
* part of the element's core data, such as a Place's address or some other
|
|
3659
|
+
* data.
|
|
3660
|
+
*/
|
|
3661
|
+
attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
3662
|
+
/**
|
|
3663
|
+
* Whether the element is interactive.
|
|
3664
|
+
*
|
|
3665
|
+
* The `default` interaction mode means that the element can be selected and edited by
|
|
3666
|
+
* the user, if it was created by the SDK or by the user using a tool.
|
|
3667
|
+
*
|
|
3668
|
+
* If the interaction mode is `locked`, the element will not be editable by the user,
|
|
3669
|
+
* which is often used for elements that you don't want the user to edit or move by
|
|
3670
|
+
* accident.
|
|
3671
|
+
*
|
|
3672
|
+
* Elements that were created by the map author (i.e. not during an SDK "session") are
|
|
3673
|
+
* not editable and have special behaviour depending on their name, description and
|
|
3674
|
+
* attributes.
|
|
3675
|
+
*
|
|
3676
|
+
* @default "default"
|
|
3677
|
+
*/
|
|
3678
|
+
interaction: z.ZodOptional<z.ZodEnum<["default", "locked"]>>;
|
|
3679
|
+
}, {
|
|
3680
|
+
position: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
3681
|
+
rotation: z.ZodNumber;
|
|
3682
|
+
scale: z.ZodNumber;
|
|
3683
|
+
zoom: z.ZodNumber;
|
|
3684
|
+
coordinates: z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">;
|
|
3685
|
+
}>, {
|
|
3686
|
+
/**
|
|
3687
|
+
* The text in the element.
|
|
3688
|
+
*/
|
|
3689
|
+
text: z.ZodString;
|
|
3690
|
+
/**
|
|
3691
|
+
* The alignment of the text, either `left`, `center` or `right`.
|
|
3692
|
+
*
|
|
3693
|
+
* @default "center"
|
|
3694
|
+
*/
|
|
3695
|
+
align: z.ZodEnum<["left", "center", "right"]>;
|
|
3696
|
+
/**
|
|
3697
|
+
* The style of the text, either `italic`, `light`, `regular` or `caps`.
|
|
3698
|
+
*
|
|
3699
|
+
* @default "regular"
|
|
3700
|
+
*/
|
|
3701
|
+
style: z.ZodEnum<["italic", "light", "regular", "caps"]>;
|
|
3702
|
+
/**
|
|
3703
|
+
* The text shown in the element, which is identical to the `text` property.
|
|
3704
|
+
*
|
|
3705
|
+
* @remarks This is added for consistency with other elements that have a `name`
|
|
3706
|
+
* property.
|
|
3707
|
+
*/
|
|
3708
|
+
name: z.ZodString;
|
|
3709
|
+
}>, {
|
|
3710
|
+
type: z.ZodLiteral<"Note">;
|
|
3711
|
+
widthScale: z.ZodNumber;
|
|
3712
|
+
}>, "type" | "id">>, "coordinates" | "name">, "strip", z.ZodTypeAny, {
|
|
1210
3713
|
type: "Note";
|
|
1211
3714
|
id: string;
|
|
1212
3715
|
groupId?: string | null | undefined;
|
|
@@ -1219,7 +3722,7 @@ declare const NoteUpdateSchema: z.ZodObject<Omit<{
|
|
|
1219
3722
|
rotation?: number | undefined;
|
|
1220
3723
|
scale?: number | undefined;
|
|
1221
3724
|
text?: string | undefined;
|
|
1222
|
-
align?: "
|
|
3725
|
+
align?: "center" | "left" | "right" | undefined;
|
|
1223
3726
|
style?: "italic" | "light" | "regular" | "caps" | undefined;
|
|
1224
3727
|
widthScale?: number | undefined;
|
|
1225
3728
|
}, {
|
|
@@ -1235,22 +3738,99 @@ declare const NoteUpdateSchema: z.ZodObject<Omit<{
|
|
|
1235
3738
|
rotation?: number | undefined;
|
|
1236
3739
|
scale?: number | undefined;
|
|
1237
3740
|
text?: string | undefined;
|
|
1238
|
-
align?: "
|
|
3741
|
+
align?: "center" | "left" | "right" | undefined;
|
|
1239
3742
|
style?: "italic" | "light" | "regular" | "caps" | undefined;
|
|
1240
3743
|
widthScale?: number | undefined;
|
|
1241
3744
|
}>;
|
|
1242
|
-
declare const ImageUpdateSchema: z.ZodObject<{
|
|
1243
|
-
type: z.ZodLiteral<"Image"
|
|
3745
|
+
declare const ImageUpdateSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
3746
|
+
type: z.ZodOptional<z.ZodLiteral<"Image">>;
|
|
1244
3747
|
coordinates: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">>;
|
|
1245
|
-
id: z.ZodString
|
|
3748
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1246
3749
|
groupId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1247
|
-
name: z.ZodOptional<z.
|
|
1248
|
-
description: z.ZodOptional<z.
|
|
3750
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3751
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1249
3752
|
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1250
3753
|
interaction: z.ZodOptional<z.ZodOptional<z.ZodEnum<["default", "locked"]>>>;
|
|
1251
3754
|
imageUrl: z.ZodOptional<z.ZodString>;
|
|
1252
3755
|
opacity: z.ZodOptional<z.ZodNumber>;
|
|
1253
|
-
},
|
|
3756
|
+
}, Pick<Omit<z.objectUtil.extendShape<{
|
|
3757
|
+
/**
|
|
3758
|
+
* The unique identifier for the element.
|
|
3759
|
+
*/
|
|
3760
|
+
id: z.ZodString;
|
|
3761
|
+
/**
|
|
3762
|
+
* The ID of the element group that the element belongs to.
|
|
3763
|
+
* For elements that are not part of a group, this will be null.
|
|
3764
|
+
*/
|
|
3765
|
+
groupId: z.ZodNullable<z.ZodString>;
|
|
3766
|
+
/**
|
|
3767
|
+
* The color of the element in some CSS-like format.
|
|
3768
|
+
*
|
|
3769
|
+
* @example
|
|
3770
|
+
* ```typescript
|
|
3771
|
+
* "#ABC123";
|
|
3772
|
+
* "rgb(255, 0, 0)";
|
|
3773
|
+
* "hsl(200, 100%, 50%)";
|
|
3774
|
+
* ```
|
|
3775
|
+
*
|
|
3776
|
+
* @default "#C93535"
|
|
3777
|
+
*/
|
|
3778
|
+
color: z.ZodString;
|
|
3779
|
+
/**
|
|
3780
|
+
* The element's name. For elements that can show a label or text on
|
|
3781
|
+
* the map (e.g. a Place or Text element) this is the text that will be shown.
|
|
3782
|
+
*
|
|
3783
|
+
* For elements such as Polygons or Paths, the name is what is shown when
|
|
3784
|
+
* the element is selected by clicking on it.
|
|
3785
|
+
*/
|
|
3786
|
+
name: z.ZodNullable<z.ZodString>;
|
|
3787
|
+
/**
|
|
3788
|
+
* Text describing the element, which is shown in an element's popup when it
|
|
3789
|
+
* is selected.
|
|
3790
|
+
*
|
|
3791
|
+
* Note that some elements are not selectable on the map, such as Notes, Text
|
|
3792
|
+
* and Markers, so their description will not be shown.
|
|
3793
|
+
*/
|
|
3794
|
+
description: z.ZodNullable<z.ZodString>;
|
|
3795
|
+
/**
|
|
3796
|
+
* A set of key-value pairs that can be used to store arbitrary data about the element.
|
|
3797
|
+
*
|
|
3798
|
+
* This is most useful for associating additional data with an element that is not
|
|
3799
|
+
* part of the element's core data, such as a Place's address or some other
|
|
3800
|
+
* data.
|
|
3801
|
+
*/
|
|
3802
|
+
attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
3803
|
+
/**
|
|
3804
|
+
* Whether the element is interactive.
|
|
3805
|
+
*
|
|
3806
|
+
* The `default` interaction mode means that the element can be selected and edited by
|
|
3807
|
+
* the user, if it was created by the SDK or by the user using a tool.
|
|
3808
|
+
*
|
|
3809
|
+
* If the interaction mode is `locked`, the element will not be editable by the user,
|
|
3810
|
+
* which is often used for elements that you don't want the user to edit or move by
|
|
3811
|
+
* accident.
|
|
3812
|
+
*
|
|
3813
|
+
* Elements that were created by the map author (i.e. not during an SDK "session") are
|
|
3814
|
+
* not editable and have special behaviour depending on their name, description and
|
|
3815
|
+
* attributes.
|
|
3816
|
+
*
|
|
3817
|
+
* @default "default"
|
|
3818
|
+
*/
|
|
3819
|
+
interaction: z.ZodOptional<z.ZodEnum<["default", "locked"]>>;
|
|
3820
|
+
}, {
|
|
3821
|
+
type: z.ZodLiteral<"Image">;
|
|
3822
|
+
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">;
|
|
3823
|
+
/**
|
|
3824
|
+
* The URL of the image that is rendered in this element
|
|
3825
|
+
*/
|
|
3826
|
+
imageUrl: z.ZodString;
|
|
3827
|
+
/**
|
|
3828
|
+
* The opacity of the image, between 0 and 1.
|
|
3829
|
+
*
|
|
3830
|
+
* @default 1
|
|
3831
|
+
*/
|
|
3832
|
+
opacity: z.ZodNumber;
|
|
3833
|
+
}>, "color">, "type" | "id">>, "strip", z.ZodTypeAny, {
|
|
1254
3834
|
type: "Image";
|
|
1255
3835
|
id: string;
|
|
1256
3836
|
coordinates?: [number, number][][] | undefined;
|
|
@@ -1274,16 +3854,22 @@ declare const ImageUpdateSchema: z.ZodObject<{
|
|
|
1274
3854
|
opacity?: number | undefined;
|
|
1275
3855
|
}>;
|
|
1276
3856
|
interface PlaceElementCreate extends zInfer<typeof PlaceCreateSchema> {
|
|
3857
|
+
coordinates: LngLatTuple;
|
|
1277
3858
|
}
|
|
1278
3859
|
interface PathElementCreate extends zInfer<typeof PathCreateSchema> {
|
|
3860
|
+
coordinates: LngLatTuple[][];
|
|
1279
3861
|
}
|
|
1280
3862
|
interface PolygonElementCreate extends zInfer<typeof PolygonCreateSchema> {
|
|
3863
|
+
coordinates: LngLatTuple[][];
|
|
1281
3864
|
}
|
|
1282
3865
|
interface CircleElementCreate extends zInfer<typeof CircleCreateSchema> {
|
|
3866
|
+
center: LngLatTuple;
|
|
1283
3867
|
}
|
|
1284
3868
|
interface MarkerElementCreate extends zInfer<typeof MarkerCreateSchema> {
|
|
3869
|
+
coordinates: LngLatTuple[][];
|
|
1285
3870
|
}
|
|
1286
3871
|
interface HighlighterElementCreate extends zInfer<typeof HighlighterCreateSchema> {
|
|
3872
|
+
coordinates: LngLatTuple[][][];
|
|
1287
3873
|
}
|
|
1288
3874
|
interface TextElementCreate extends zInfer<typeof TextCreateSchema> {
|
|
1289
3875
|
}
|
|
@@ -1292,36 +3878,46 @@ interface NoteElementCreate extends zInfer<typeof NoteCreateSchema> {
|
|
|
1292
3878
|
interface ImageElementCreate extends zInfer<typeof ImageCreateSchema> {
|
|
1293
3879
|
}
|
|
1294
3880
|
interface PlaceElementRead extends zInfer<typeof PlaceReadSchema> {
|
|
3881
|
+
coordinates: LngLatTuple;
|
|
1295
3882
|
}
|
|
1296
3883
|
interface PathElementRead extends zInfer<typeof PathReadSchema> {
|
|
1297
3884
|
}
|
|
1298
3885
|
interface PolygonElementRead extends zInfer<typeof PolygonReadSchema> {
|
|
1299
3886
|
}
|
|
1300
3887
|
interface CircleElementRead extends zInfer<typeof CircleReadSchema> {
|
|
3888
|
+
center: LngLatTuple;
|
|
1301
3889
|
}
|
|
1302
3890
|
interface MarkerElementRead extends zInfer<typeof MarkerReadSchema> {
|
|
1303
3891
|
}
|
|
1304
3892
|
interface HighlighterElementRead extends zInfer<typeof HighlighterReadSchema> {
|
|
1305
3893
|
}
|
|
1306
3894
|
interface TextElementRead extends zInfer<typeof TextReadSchema> {
|
|
3895
|
+
position: LngLatTuple;
|
|
1307
3896
|
}
|
|
1308
3897
|
interface NoteElementRead extends zInfer<typeof NoteReadSchema> {
|
|
3898
|
+
position: LngLatTuple;
|
|
1309
3899
|
}
|
|
1310
3900
|
interface ImageElementRead extends zInfer<typeof ImageReadSchema> {
|
|
1311
3901
|
}
|
|
1312
3902
|
interface LinkElementRead extends zInfer<typeof LinkReadSchema> {
|
|
1313
3903
|
}
|
|
1314
3904
|
interface PlaceElementUpdate extends zInfer<typeof PlaceUpdateSchema> {
|
|
3905
|
+
coordinates?: LngLatTuple;
|
|
1315
3906
|
}
|
|
1316
3907
|
interface PathElementUpdate extends zInfer<typeof PathUpdateSchema> {
|
|
3908
|
+
coordinates?: LngLatTuple[][];
|
|
1317
3909
|
}
|
|
1318
3910
|
interface PolygonElementUpdate extends zInfer<typeof PolygonUpdateSchema> {
|
|
3911
|
+
coordinates?: LngLatTuple[][];
|
|
1319
3912
|
}
|
|
1320
3913
|
interface CircleElementUpdate extends zInfer<typeof CircleUpdateSchema> {
|
|
3914
|
+
center?: LngLatTuple;
|
|
1321
3915
|
}
|
|
1322
3916
|
interface MarkerElementUpdate extends zInfer<typeof MarkerUpdateSchema> {
|
|
3917
|
+
coordinates?: LngLatTuple[][];
|
|
1323
3918
|
}
|
|
1324
3919
|
interface HighlighterElementUpdate extends zInfer<typeof HighlighterUpdateSchema> {
|
|
3920
|
+
coordinates?: LngLatTuple[][][];
|
|
1325
3921
|
}
|
|
1326
3922
|
interface TextElementUpdate extends zInfer<typeof TextUpdateSchema> {
|
|
1327
3923
|
}
|
|
@@ -1355,7 +3951,7 @@ interface ElementGroup {
|
|
|
1355
3951
|
* The ids of the elements in the element group.
|
|
1356
3952
|
*
|
|
1357
3953
|
* @remarks
|
|
1358
|
-
* You can use these ids to get the full element objects via the `getElements` method.
|
|
3954
|
+
* You can use these ids to get the full element objects via the {@link ElementsController.getElements | `getElements`} method.
|
|
1359
3955
|
*/
|
|
1360
3956
|
elementIds: Array<string>;
|
|
1361
3957
|
/**
|
|
@@ -1405,7 +4001,7 @@ declare const GetElementGroupsConstraintSchema: z.ZodObject<{
|
|
|
1405
4001
|
ids?: string[] | undefined;
|
|
1406
4002
|
}>;
|
|
1407
4003
|
/**
|
|
1408
|
-
* The parameters for the `onElementChange` and the `onElementCreate` listeners.
|
|
4004
|
+
* The parameters for the {@link ElementsController.onElementChange | `onElementChange`} and the {@link ElementsController.onElementCreate | `onElementCreate`} listeners.
|
|
1409
4005
|
*
|
|
1410
4006
|
* @group Elements
|
|
1411
4007
|
*/
|
|
@@ -1432,7 +4028,7 @@ interface ElementChangeCallbackParams {
|
|
|
1432
4028
|
isBeingCreated: boolean;
|
|
1433
4029
|
}
|
|
1434
4030
|
/**
|
|
1435
|
-
* The parameters for the `onElementGroupChange` listener.
|
|
4031
|
+
* The parameters for the {@link ElementsController.onElementGroupChange | `onElementGroupChange`} listener.
|
|
1436
4032
|
*
|
|
1437
4033
|
* @group Element Groups
|
|
1438
4034
|
*/
|
|
@@ -1440,210 +4036,6 @@ interface ElementGroupChangeCallbackParams {
|
|
|
1440
4036
|
elementGroup: ElementGroup | null;
|
|
1441
4037
|
}
|
|
1442
4038
|
|
|
1443
|
-
/**
|
|
1444
|
-
* Represents a point in world coordinates.
|
|
1445
|
-
*/
|
|
1446
|
-
interface LatLng {
|
|
1447
|
-
latitude: number;
|
|
1448
|
-
longitude: number;
|
|
1449
|
-
}
|
|
1450
|
-
/**
|
|
1451
|
-
* A tuple representing a longitude and latitude coordinate.
|
|
1452
|
-
*
|
|
1453
|
-
* This is used hen serializing geometry because that's the standard used in
|
|
1454
|
-
* GeoJSON.
|
|
1455
|
-
*/
|
|
1456
|
-
type LngLatTuple = [longitude: number, latitude: number];
|
|
1457
|
-
/**
|
|
1458
|
-
* A GeoJSON properties object.
|
|
1459
|
-
*/
|
|
1460
|
-
type GeoJsonProperties = Record<string, unknown>;
|
|
1461
|
-
/**
|
|
1462
|
-
* A GeoJSON feature object, compliant with:
|
|
1463
|
-
* https://datatracker.ietf.org/doc/html/rfc7946#section-3.2
|
|
1464
|
-
*
|
|
1465
|
-
* @interface
|
|
1466
|
-
*/
|
|
1467
|
-
type GeoJsonFeature = {
|
|
1468
|
-
type: "Feature";
|
|
1469
|
-
/**
|
|
1470
|
-
* The bounding box of the feature.
|
|
1471
|
-
*/
|
|
1472
|
-
bbox?: FeltBoundary;
|
|
1473
|
-
/**
|
|
1474
|
-
* The feature's geometry
|
|
1475
|
-
*/
|
|
1476
|
-
geometry: GeoJsonGeometry;
|
|
1477
|
-
/**
|
|
1478
|
-
* A value that uniquely identifies this feature in a
|
|
1479
|
-
* https://tools.ietf.org/html/rfc7946#section-3.2.
|
|
1480
|
-
*/
|
|
1481
|
-
id?: string | number | undefined;
|
|
1482
|
-
/**
|
|
1483
|
-
* Properties associated with this feature.
|
|
1484
|
-
*/
|
|
1485
|
-
properties: GeoJsonProperties;
|
|
1486
|
-
};
|
|
1487
|
-
interface PointGeometry extends zInfer<typeof PointGeometrySchema> {
|
|
1488
|
-
}
|
|
1489
|
-
/**
|
|
1490
|
-
* A GeoJSON point geometry.
|
|
1491
|
-
*/
|
|
1492
|
-
declare const PointGeometrySchema: z.ZodObject<{
|
|
1493
|
-
type: z.ZodLiteral<"Point">;
|
|
1494
|
-
coordinates: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
1495
|
-
}, "strip", z.ZodTypeAny, {
|
|
1496
|
-
type: "Point";
|
|
1497
|
-
coordinates: [number, number];
|
|
1498
|
-
}, {
|
|
1499
|
-
type: "Point";
|
|
1500
|
-
coordinates: [number, number];
|
|
1501
|
-
}>;
|
|
1502
|
-
/**
|
|
1503
|
-
* A GeoJSON multi-point geometry.
|
|
1504
|
-
*
|
|
1505
|
-
* @remarks
|
|
1506
|
-
* You shouldn't expect this to come from Felt - it is here for completeness
|
|
1507
|
-
* of the GeoJSON spec.
|
|
1508
|
-
*/
|
|
1509
|
-
interface MultiPointGeometry {
|
|
1510
|
-
type: "MultiPoint";
|
|
1511
|
-
coordinates: PointGeometry["coordinates"][];
|
|
1512
|
-
}
|
|
1513
|
-
interface PolygonGeometry extends zInfer<typeof PolygonGeometrySchema> {
|
|
1514
|
-
}
|
|
1515
|
-
/**
|
|
1516
|
-
* A GeoJSON polygon geometry.
|
|
1517
|
-
*/
|
|
1518
|
-
declare const PolygonGeometrySchema: z.ZodObject<{
|
|
1519
|
-
type: z.ZodLiteral<"Polygon">;
|
|
1520
|
-
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">;
|
|
1521
|
-
}, "strip", z.ZodTypeAny, {
|
|
1522
|
-
type: "Polygon";
|
|
1523
|
-
coordinates: [number, number][][];
|
|
1524
|
-
}, {
|
|
1525
|
-
type: "Polygon";
|
|
1526
|
-
coordinates: [number, number][][];
|
|
1527
|
-
}>;
|
|
1528
|
-
/**
|
|
1529
|
-
* A GeoJSON multi-polygon geometry.
|
|
1530
|
-
*
|
|
1531
|
-
* @interface
|
|
1532
|
-
*/
|
|
1533
|
-
type MultiPolygonGeometry = {
|
|
1534
|
-
type: "MultiPolygon";
|
|
1535
|
-
coordinates: PolygonGeometry["coordinates"][];
|
|
1536
|
-
};
|
|
1537
|
-
/**
|
|
1538
|
-
* A GeoJSON line string geometry.
|
|
1539
|
-
*
|
|
1540
|
-
* @interface
|
|
1541
|
-
*/
|
|
1542
|
-
type LineStringGeometry = {
|
|
1543
|
-
type: "LineString";
|
|
1544
|
-
coordinates: LngLatTuple[];
|
|
1545
|
-
};
|
|
1546
|
-
/**
|
|
1547
|
-
* A GeoJSON multi-line string geometry.
|
|
1548
|
-
*
|
|
1549
|
-
* @interface
|
|
1550
|
-
*/
|
|
1551
|
-
type MultiLineStringGeometry = {
|
|
1552
|
-
type: "MultiLineString";
|
|
1553
|
-
coordinates: LineStringGeometry["coordinates"][];
|
|
1554
|
-
};
|
|
1555
|
-
/**
|
|
1556
|
-
* A GeoJSON geometry of any type
|
|
1557
|
-
*/
|
|
1558
|
-
type GeoJsonGeometry = PointGeometry | PolygonGeometry | LineStringGeometry | MultiLineStringGeometry | MultiPolygonGeometry | MultiPointGeometry;
|
|
1559
|
-
/**
|
|
1560
|
-
* @ignore
|
|
1561
|
-
* @internal
|
|
1562
|
-
*/
|
|
1563
|
-
declare const FeltZoomSchema: z.ZodNumber;
|
|
1564
|
-
/**
|
|
1565
|
-
* The zoom level of the map.
|
|
1566
|
-
*
|
|
1567
|
-
* It is a floating-point number between 1 and 23, where 1 is the most
|
|
1568
|
-
* zoomed out and 23 is the most zoomed in.
|
|
1569
|
-
*
|
|
1570
|
-
* @group Types
|
|
1571
|
-
* @public
|
|
1572
|
-
*/
|
|
1573
|
-
type FeltZoom = z.infer<typeof FeltZoomSchema>;
|
|
1574
|
-
/**
|
|
1575
|
-
* @ignore
|
|
1576
|
-
* @internal
|
|
1577
|
-
*/
|
|
1578
|
-
declare const FeltBoundarySchema: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
1579
|
-
/**
|
|
1580
|
-
* The edges of the map in the form of a bounding box.
|
|
1581
|
-
*
|
|
1582
|
-
* The boundary is a tuple of the form `[west, south, east, north]`.
|
|
1583
|
-
*
|
|
1584
|
-
* @group Types
|
|
1585
|
-
* @public
|
|
1586
|
-
*/
|
|
1587
|
-
type FeltBoundary = z.infer<typeof FeltBoundarySchema>;
|
|
1588
|
-
/**
|
|
1589
|
-
* The parameters for the methods that change the visibility of entities.
|
|
1590
|
-
*
|
|
1591
|
-
* @public
|
|
1592
|
-
* @category Visibility
|
|
1593
|
-
*/
|
|
1594
|
-
interface SetVisibilityRequest extends zInfer<typeof SetVisibilityRequestSchema> {
|
|
1595
|
-
}
|
|
1596
|
-
/**
|
|
1597
|
-
* @internal
|
|
1598
|
-
*/
|
|
1599
|
-
declare const SetVisibilityRequestSchema: z.ZodObject<{
|
|
1600
|
-
/**
|
|
1601
|
-
* The ids of the entities you want to change the visibility of.
|
|
1602
|
-
*/
|
|
1603
|
-
show: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1604
|
-
hide: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1605
|
-
}, "strip", z.ZodTypeAny, {
|
|
1606
|
-
show?: string[] | undefined;
|
|
1607
|
-
hide?: string[] | undefined;
|
|
1608
|
-
}, {
|
|
1609
|
-
show?: string[] | undefined;
|
|
1610
|
-
hide?: string[] | undefined;
|
|
1611
|
-
}>;
|
|
1612
|
-
/**
|
|
1613
|
-
* Specifies the direction to sort data in
|
|
1614
|
-
*
|
|
1615
|
-
* @group Types
|
|
1616
|
-
*/
|
|
1617
|
-
type SortDirection = z.infer<typeof SortDirectionSchema>;
|
|
1618
|
-
/** @ignore */
|
|
1619
|
-
declare const SortDirectionSchema: z.ZodEnum<["asc", "desc"]>;
|
|
1620
|
-
/**
|
|
1621
|
-
* Configuration for sorting data by a specific attribute
|
|
1622
|
-
*
|
|
1623
|
-
* @group Types
|
|
1624
|
-
*/
|
|
1625
|
-
interface SortConfig extends zInfer<typeof SortConfigSchema> {
|
|
1626
|
-
}
|
|
1627
|
-
/** @ignore */
|
|
1628
|
-
declare const SortConfigSchema: z.ZodObject<{
|
|
1629
|
-
/**
|
|
1630
|
-
* The attribute to sort by. What this represents depends on the context.
|
|
1631
|
-
* For instance, when sorting features in a data table, the attribute is
|
|
1632
|
-
* the column to sort by.
|
|
1633
|
-
*/
|
|
1634
|
-
attribute: z.ZodString;
|
|
1635
|
-
/**
|
|
1636
|
-
* The direction to sort in
|
|
1637
|
-
*/
|
|
1638
|
-
direction: z.ZodEnum<["asc", "desc"]>;
|
|
1639
|
-
}, "strip", z.ZodTypeAny, {
|
|
1640
|
-
attribute: string;
|
|
1641
|
-
direction: "asc" | "desc";
|
|
1642
|
-
}, {
|
|
1643
|
-
attribute: string;
|
|
1644
|
-
direction: "asc" | "desc";
|
|
1645
|
-
}>;
|
|
1646
|
-
|
|
1647
4039
|
/**
|
|
1648
4040
|
* A LayerFeature is a single geographical item in a layer.
|
|
1649
4041
|
*
|
|
@@ -1791,8 +4183,11 @@ interface Layer {
|
|
|
1791
4183
|
*/
|
|
1792
4184
|
geometryType: string | null;
|
|
1793
4185
|
/**
|
|
1794
|
-
* The bounding box of the layer
|
|
1795
|
-
*
|
|
4186
|
+
* The bounding box of the layer in [west, south, east, north] order
|
|
4187
|
+
*
|
|
4188
|
+
* There are cases where the bounds are not available, such as for layers added to the map
|
|
4189
|
+
* from URL sources, as these are not (depending on their type) processed and analyzed by
|
|
4190
|
+
* Felt.
|
|
1796
4191
|
*
|
|
1797
4192
|
* {@link FeltBoundary}
|
|
1798
4193
|
*/
|
|
@@ -1818,7 +4213,7 @@ interface LayerGroup {
|
|
|
1818
4213
|
* The ids of the layers in the layer group.
|
|
1819
4214
|
*
|
|
1820
4215
|
* @remarks
|
|
1821
|
-
* You can use these ids to get the full layer objects via the `getLayers` method.
|
|
4216
|
+
* You can use these ids to get the full layer objects via the {@link LayersController.getLayers | `getLayers`} method.
|
|
1822
4217
|
*/
|
|
1823
4218
|
layerIds: Array<string>;
|
|
1824
4219
|
/**
|
|
@@ -1830,7 +4225,7 @@ interface LayerGroup {
|
|
|
1830
4225
|
*/
|
|
1831
4226
|
shownInLegend: boolean;
|
|
1832
4227
|
/**
|
|
1833
|
-
* The bounding box of the layer group.
|
|
4228
|
+
* The bounding box of the layer group in [west, south, east, north] order.
|
|
1834
4229
|
*
|
|
1835
4230
|
* {@link FeltBoundary}
|
|
1836
4231
|
*/
|
|
@@ -1877,7 +4272,7 @@ declare const GetLayerGroupsFilterSchema: z.ZodObject<{
|
|
|
1877
4272
|
ids?: string[] | undefined;
|
|
1878
4273
|
}>;
|
|
1879
4274
|
/**
|
|
1880
|
-
* The parameters for the `onLayerChange` listener.
|
|
4275
|
+
* The parameters for the {@link LayersController.onLayerChange | `onLayerChange`} listener.
|
|
1881
4276
|
*
|
|
1882
4277
|
* @group Layers
|
|
1883
4278
|
*/
|
|
@@ -1888,7 +4283,7 @@ interface LayerChangeCallbackParams {
|
|
|
1888
4283
|
layer: Layer | null;
|
|
1889
4284
|
}
|
|
1890
4285
|
/**
|
|
1891
|
-
* The parameters for the `onLayerGroupChange` listener.
|
|
4286
|
+
* The parameters for the {@link LayersController.onLayerGroupChange | `onLayerGroupChange`} listener.
|
|
1892
4287
|
*
|
|
1893
4288
|
* @group Layer Groups
|
|
1894
4289
|
*/
|
|
@@ -1908,10 +4303,10 @@ interface LegendItem extends LegendItemIdentifier {
|
|
|
1908
4303
|
title: string | Array<string>;
|
|
1909
4304
|
/**
|
|
1910
4305
|
* Whether the title depends on the zoom level or not. If it does, you
|
|
1911
|
-
* need to call `getLegendItem` when the zoom level changes.
|
|
4306
|
+
* need to call {@link LayersController.getLegendItem | `getLegendItem`} when the zoom level changes.
|
|
1912
4307
|
*
|
|
1913
|
-
* Note that as the zoom level changes, the `onLegendItemChange` handler
|
|
1914
|
-
* will not be called, so you need to call `getLegendItem` yourself.
|
|
4308
|
+
* Note that as the zoom level changes, the {@link LayersController.onLegendItemChange | `onLegendItemChange`} handler
|
|
4309
|
+
* will not be called, so you need to call {@link LayersController.getLegendItem | `getLegendItem`} yourself.
|
|
1915
4310
|
*/
|
|
1916
4311
|
titleDependsOnZoom: boolean;
|
|
1917
4312
|
/**
|
|
@@ -1990,7 +4385,7 @@ declare const LegendItemsConstraintSchema: z.ZodObject<{
|
|
|
1990
4385
|
layerIds?: string[] | undefined;
|
|
1991
4386
|
}>;
|
|
1992
4387
|
/**
|
|
1993
|
-
* The parameters for the `onLegendItemChange` listener.
|
|
4388
|
+
* The parameters for the {@link LayersController.onLegendItemChange | `onLegendItemChange`} listener.
|
|
1994
4389
|
*
|
|
1995
4390
|
* @group Legend Items
|
|
1996
4391
|
*/
|
|
@@ -2001,7 +4396,7 @@ interface LegendItemChangeCallbackParams {
|
|
|
2001
4396
|
legendItem: LegendItem | null;
|
|
2002
4397
|
}
|
|
2003
4398
|
/**
|
|
2004
|
-
* Constraints for the `getRenderedFeatures` method. This can include layer constriants, spatial constraints, or both. If no constraints are
|
|
4399
|
+
* Constraints for the {@link LayersController.getRenderedFeatures | `getRenderedFeatures`} method. This can include layer constriants, spatial constraints, or both. If no constraints are
|
|
2005
4400
|
* provided, all rendered features will be returned.
|
|
2006
4401
|
*
|
|
2007
4402
|
* @group Layers
|
|
@@ -2440,7 +4835,7 @@ type FilterTernary = [
|
|
|
2440
4835
|
/**
|
|
2441
4836
|
*
|
|
2442
4837
|
* Filters can be used to change which features in a layer are rendered. Filters can be
|
|
2443
|
-
* applied to a layer by the `setLayerFilters` method on the Felt controller.
|
|
4838
|
+
* applied to a layer by the {@link LayersController.setLayerFilters | `setLayerFilters`} method on the Felt controller.
|
|
2444
4839
|
*
|
|
2445
4840
|
* Filters use a tree structure for combining expressions with logical operators, called a
|
|
2446
4841
|
* {@link FilterTernary}. When combining three or more conditions, you must use proper nesting
|
|
@@ -2569,7 +4964,7 @@ interface LayerFilters {
|
|
|
2569
4964
|
/**
|
|
2570
4965
|
* Filters that are set ephemerally by viewers in their own session.
|
|
2571
4966
|
*
|
|
2572
|
-
* These are the filters that are set when the `setLayerFilters` method is
|
|
4967
|
+
* These are the filters that are set when the {@link LayersController.setLayerFilters | `setLayerFilters`} method is
|
|
2573
4968
|
* called. There is no way to set these in the Felt UI - they can only be
|
|
2574
4969
|
* set using the SDK.
|
|
2575
4970
|
*/
|
|
@@ -2643,7 +5038,7 @@ interface MultiAggregationConfig<T extends AggregationMethod | "count"> extends
|
|
|
2643
5038
|
declare const ValueConfigurationSchema: z.ZodObject<{
|
|
2644
5039
|
boundary: z.ZodOptional<z.ZodUnion<[z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>, z.ZodObject<{
|
|
2645
5040
|
type: z.ZodLiteral<"Polygon">;
|
|
2646
|
-
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">;
|
|
5041
|
+
coordinates: z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">;
|
|
2647
5042
|
}, "strip", z.ZodTypeAny, {
|
|
2648
5043
|
type: "Polygon";
|
|
2649
5044
|
coordinates: [number, number][][];
|
|
@@ -2733,7 +5128,7 @@ declare const GetLayerCategoriesParamsSchema: z.ZodObject<{
|
|
|
2733
5128
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
2734
5129
|
boundary: z.ZodOptional<z.ZodUnion<[z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>, z.ZodObject<{
|
|
2735
5130
|
type: z.ZodLiteral<"Polygon">;
|
|
2736
|
-
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">;
|
|
5131
|
+
coordinates: z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">;
|
|
2737
5132
|
}, "strip", z.ZodTypeAny, {
|
|
2738
5133
|
type: "Polygon";
|
|
2739
5134
|
coordinates: [number, number][][];
|
|
@@ -2745,7 +5140,7 @@ declare const GetLayerCategoriesParamsSchema: z.ZodObject<{
|
|
|
2745
5140
|
values: z.ZodOptional<z.ZodObject<{
|
|
2746
5141
|
boundary: z.ZodOptional<z.ZodUnion<[z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>, z.ZodObject<{
|
|
2747
5142
|
type: z.ZodLiteral<"Polygon">;
|
|
2748
|
-
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">;
|
|
5143
|
+
coordinates: z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">;
|
|
2749
5144
|
}, "strip", z.ZodTypeAny, {
|
|
2750
5145
|
type: "Polygon";
|
|
2751
5146
|
coordinates: [number, number][][];
|
|
@@ -2911,7 +5306,7 @@ declare const GetLayerHistogramParamsSchema: z.ZodObject<{
|
|
|
2911
5306
|
}>, z.ZodArray<z.ZodNumber, "many">]>;
|
|
2912
5307
|
boundary: z.ZodOptional<z.ZodUnion<[z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>, z.ZodObject<{
|
|
2913
5308
|
type: z.ZodLiteral<"Polygon">;
|
|
2914
|
-
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">;
|
|
5309
|
+
coordinates: z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">;
|
|
2915
5310
|
}, "strip", z.ZodTypeAny, {
|
|
2916
5311
|
type: "Polygon";
|
|
2917
5312
|
coordinates: [number, number][][];
|
|
@@ -2936,7 +5331,7 @@ declare const GetLayerHistogramParamsSchema: z.ZodObject<{
|
|
|
2936
5331
|
values: z.ZodOptional<z.ZodObject<{
|
|
2937
5332
|
boundary: z.ZodOptional<z.ZodUnion<[z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>, z.ZodObject<{
|
|
2938
5333
|
type: z.ZodLiteral<"Polygon">;
|
|
2939
|
-
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">;
|
|
5334
|
+
coordinates: z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">;
|
|
2940
5335
|
}, "strip", z.ZodTypeAny, {
|
|
2941
5336
|
type: "Polygon";
|
|
2942
5337
|
coordinates: [number, number][][];
|
|
@@ -3085,7 +5480,7 @@ declare const GetLayerCalculationParamsSchema: z.ZodObject<{
|
|
|
3085
5480
|
layerId: z.ZodString;
|
|
3086
5481
|
boundary: z.ZodOptional<z.ZodUnion<[z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>, z.ZodObject<{
|
|
3087
5482
|
type: z.ZodLiteral<"Polygon">;
|
|
3088
|
-
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">;
|
|
5483
|
+
coordinates: z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">;
|
|
3089
5484
|
}, "strip", z.ZodTypeAny, {
|
|
3090
5485
|
type: "Polygon";
|
|
3091
5486
|
coordinates: [number, number][][];
|
|
@@ -3337,7 +5732,7 @@ interface PinToolSettings extends zInfer<typeof PinToolSettingsSchema> {
|
|
|
3337
5732
|
*
|
|
3338
5733
|
* - `"enter name"`: Enter a name for the Place, focusing the name input.
|
|
3339
5734
|
* - `"add another"`: Add another Place, leaving the tool still selected.
|
|
3340
|
-
* - `"
|
|
5735
|
+
* - `"select"`: Puts the tool down and selects the new Place element.
|
|
3341
5736
|
*
|
|
3342
5737
|
* @defaultValue `"enter name"`
|
|
3343
5738
|
*/
|
|
@@ -3370,24 +5765,24 @@ declare const RouteToolSettingsSchema: z.ZodObject<{
|
|
|
3370
5765
|
strokeWidth: z.ZodNumber;
|
|
3371
5766
|
strokeStyle: z.ZodEnum<["solid", "dashed", "dotted"]>;
|
|
3372
5767
|
distanceMarker: z.ZodBoolean;
|
|
3373
|
-
endCaps: z.ZodBoolean;
|
|
3374
5768
|
routingMode: z.ZodNullable<z.ZodEnum<["driving", "cycling", "walking", "flying"]>>;
|
|
5769
|
+
endCaps: z.ZodBoolean;
|
|
3375
5770
|
}, "strip", z.ZodTypeAny, {
|
|
3376
5771
|
color: string;
|
|
3377
5772
|
strokeOpacity: number;
|
|
3378
5773
|
strokeWidth: number;
|
|
3379
5774
|
strokeStyle: "solid" | "dashed" | "dotted";
|
|
3380
5775
|
distanceMarker: boolean;
|
|
3381
|
-
endCaps: boolean;
|
|
3382
5776
|
routingMode: "driving" | "cycling" | "walking" | "flying" | null;
|
|
5777
|
+
endCaps: boolean;
|
|
3383
5778
|
}, {
|
|
3384
5779
|
color: string;
|
|
3385
5780
|
strokeOpacity: number;
|
|
3386
5781
|
strokeWidth: number;
|
|
3387
5782
|
strokeStyle: "solid" | "dashed" | "dotted";
|
|
3388
5783
|
distanceMarker: boolean;
|
|
3389
|
-
endCaps: boolean;
|
|
3390
5784
|
routingMode: "driving" | "cycling" | "walking" | "flying" | null;
|
|
5785
|
+
endCaps: boolean;
|
|
3391
5786
|
}>;
|
|
3392
5787
|
interface RouteToolSettings extends zInfer<typeof RouteToolSettingsSchema> {
|
|
3393
5788
|
}
|
|
@@ -3457,15 +5852,18 @@ interface MarkerToolSettings extends zInfer<typeof MarkerToolSettingsSchema> {
|
|
|
3457
5852
|
declare const HighlighterToolSettingsSchema: z.ZodObject<{
|
|
3458
5853
|
color: z.ZodString;
|
|
3459
5854
|
opacity: z.ZodNumber;
|
|
5855
|
+
renderHoles: z.ZodBoolean;
|
|
3460
5856
|
size: z.ZodNumber;
|
|
3461
5857
|
}, "strip", z.ZodTypeAny, {
|
|
3462
5858
|
color: string;
|
|
3463
5859
|
opacity: number;
|
|
3464
5860
|
size: number;
|
|
5861
|
+
renderHoles: boolean;
|
|
3465
5862
|
}, {
|
|
3466
5863
|
color: string;
|
|
3467
5864
|
opacity: number;
|
|
3468
5865
|
size: number;
|
|
5866
|
+
renderHoles: boolean;
|
|
3469
5867
|
}>;
|
|
3470
5868
|
interface HighlighterToolSettings extends zInfer<typeof HighlighterToolSettingsSchema> {
|
|
3471
5869
|
}
|
|
@@ -3475,11 +5873,11 @@ declare const TextToolSettingsSchema: z.ZodObject<{
|
|
|
3475
5873
|
style: z.ZodEnum<["italic", "light", "regular", "caps"]>;
|
|
3476
5874
|
}, "strip", z.ZodTypeAny, {
|
|
3477
5875
|
color: string;
|
|
3478
|
-
align: "
|
|
5876
|
+
align: "center" | "left" | "right";
|
|
3479
5877
|
style: "italic" | "light" | "regular" | "caps";
|
|
3480
5878
|
}, {
|
|
3481
5879
|
color: string;
|
|
3482
|
-
align: "
|
|
5880
|
+
align: "center" | "left" | "right";
|
|
3483
5881
|
style: "italic" | "light" | "regular" | "caps";
|
|
3484
5882
|
}>;
|
|
3485
5883
|
interface TextToolSettings extends zInfer<typeof TextToolSettingsSchema> {
|
|
@@ -3490,11 +5888,11 @@ declare const NoteToolSettingsSchema: z.ZodObject<{
|
|
|
3490
5888
|
style: z.ZodEnum<["italic", "light", "regular", "caps"]>;
|
|
3491
5889
|
}, "strip", z.ZodTypeAny, {
|
|
3492
5890
|
color: string;
|
|
3493
|
-
align: "
|
|
5891
|
+
align: "center" | "left" | "right";
|
|
3494
5892
|
style: "italic" | "light" | "regular" | "caps";
|
|
3495
5893
|
}, {
|
|
3496
5894
|
color: string;
|
|
3497
|
-
align: "
|
|
5895
|
+
align: "center" | "left" | "right";
|
|
3498
5896
|
style: "italic" | "light" | "regular" | "caps";
|
|
3499
5897
|
}>;
|
|
3500
5898
|
interface NoteToolSettings extends zInfer<typeof NoteToolSettingsSchema> {
|
|
@@ -3585,17 +5983,17 @@ declare const ViewportCenterZoomSchema: z.ZodObject<{
|
|
|
3585
5983
|
}>;
|
|
3586
5984
|
zoom: z.ZodNumber;
|
|
3587
5985
|
}, "strip", z.ZodTypeAny, {
|
|
3588
|
-
zoom: number;
|
|
3589
5986
|
center: {
|
|
3590
5987
|
latitude: number;
|
|
3591
5988
|
longitude: number;
|
|
3592
5989
|
};
|
|
3593
|
-
}, {
|
|
3594
5990
|
zoom: number;
|
|
5991
|
+
}, {
|
|
3595
5992
|
center: {
|
|
3596
5993
|
latitude: number;
|
|
3597
5994
|
longitude: number;
|
|
3598
5995
|
};
|
|
5996
|
+
zoom: number;
|
|
3599
5997
|
}>;
|
|
3600
5998
|
/**
|
|
3601
5999
|
* The current state of the viewport, including the derived bounds.
|
|
@@ -3616,7 +6014,7 @@ interface ViewportState {
|
|
|
3616
6014
|
*/
|
|
3617
6015
|
zoom: FeltZoom;
|
|
3618
6016
|
/**
|
|
3619
|
-
* The bounding box of the viewport.
|
|
6017
|
+
* The bounding box of the viewport in [west, south, east, north] order.
|
|
3620
6018
|
*
|
|
3621
6019
|
* This is derived, and depends on the center and zoom of the viewport, as
|
|
3622
6020
|
* well as its size.
|
|
@@ -3626,7 +6024,7 @@ interface ViewportState {
|
|
|
3626
6024
|
bounds: FeltBoundary;
|
|
3627
6025
|
}
|
|
3628
6026
|
/**
|
|
3629
|
-
* The parameters for the `setViewport` method.
|
|
6027
|
+
* The parameters for the {@link ViewportController.setViewport | `setViewport`} method.
|
|
3630
6028
|
*
|
|
3631
6029
|
* @group Types
|
|
3632
6030
|
*/
|
|
@@ -3645,17 +6043,17 @@ declare const SetViewportCenterZoomParamsSchema: z.ZodObject<{
|
|
|
3645
6043
|
}>>;
|
|
3646
6044
|
zoom: z.ZodOptional<z.ZodNumber>;
|
|
3647
6045
|
}, "strip", z.ZodTypeAny, {
|
|
3648
|
-
zoom?: number | undefined;
|
|
3649
6046
|
center?: {
|
|
3650
6047
|
latitude: number;
|
|
3651
6048
|
longitude: number;
|
|
3652
6049
|
} | undefined;
|
|
3653
|
-
}, {
|
|
3654
6050
|
zoom?: number | undefined;
|
|
6051
|
+
}, {
|
|
3655
6052
|
center?: {
|
|
3656
6053
|
latitude: number;
|
|
3657
6054
|
longitude: number;
|
|
3658
6055
|
} | undefined;
|
|
6056
|
+
zoom?: number | undefined;
|
|
3659
6057
|
}>;
|
|
3660
6058
|
/**
|
|
3661
6059
|
* The constraints for the viewport. Used to ensure that the viewport stays
|
|
@@ -3684,7 +6082,7 @@ interface ViewportConstraints {
|
|
|
3684
6082
|
bounds: FeltBoundary | null;
|
|
3685
6083
|
}
|
|
3686
6084
|
/**
|
|
3687
|
-
* The parameters for the `fitViewportToBounds` method.
|
|
6085
|
+
* The parameters for the {@link ViewportController.fitViewportToBounds | `fitViewportToBounds`} method.
|
|
3688
6086
|
*
|
|
3689
6087
|
* @group Types
|
|
3690
6088
|
*/
|