@arenarium/maps 1.0.85 → 1.0.87
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/index.d.ts +161 -78
- package/dist/index.js +6 -6
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -78,42 +78,74 @@ declare const mapBoundsSchema: z.ZodObject<{
|
|
|
78
78
|
lng: number;
|
|
79
79
|
};
|
|
80
80
|
}>;
|
|
81
|
-
declare const mapStyleSchema: z.
|
|
82
|
-
|
|
83
|
-
z.
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
81
|
+
declare const mapStyleSchema: z.ZodUnion<[
|
|
82
|
+
z.ZodObject<{
|
|
83
|
+
name: z.ZodUnion<[
|
|
84
|
+
z.ZodLiteral<"dark">,
|
|
85
|
+
z.ZodLiteral<"light">
|
|
86
|
+
]>;
|
|
87
|
+
colors: z.ZodObject<{
|
|
88
|
+
primary: z.ZodString;
|
|
89
|
+
background: z.ZodString;
|
|
90
|
+
text: z.ZodString;
|
|
91
|
+
}, "strip", z.ZodTypeAny, {
|
|
92
|
+
primary: string;
|
|
93
|
+
background: string;
|
|
94
|
+
text: string;
|
|
95
|
+
}, {
|
|
96
|
+
primary: string;
|
|
97
|
+
background: string;
|
|
98
|
+
text: string;
|
|
99
|
+
}>;
|
|
91
100
|
}, "strip", z.ZodTypeAny, {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
101
|
+
name: "dark" | "light";
|
|
102
|
+
colors: {
|
|
103
|
+
primary: string;
|
|
104
|
+
background: string;
|
|
105
|
+
text: string;
|
|
106
|
+
};
|
|
95
107
|
}, {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
108
|
+
name: "dark" | "light";
|
|
109
|
+
colors: {
|
|
110
|
+
primary: string;
|
|
111
|
+
background: string;
|
|
112
|
+
text: string;
|
|
113
|
+
};
|
|
114
|
+
}>,
|
|
115
|
+
z.ZodObject<{
|
|
116
|
+
name: z.ZodLiteral<"custom">;
|
|
117
|
+
url: z.ZodString;
|
|
118
|
+
colors: z.ZodObject<{
|
|
119
|
+
primary: z.ZodString;
|
|
120
|
+
background: z.ZodString;
|
|
121
|
+
text: z.ZodString;
|
|
122
|
+
}, "strip", z.ZodTypeAny, {
|
|
123
|
+
primary: string;
|
|
124
|
+
background: string;
|
|
125
|
+
text: string;
|
|
126
|
+
}, {
|
|
127
|
+
primary: string;
|
|
128
|
+
background: string;
|
|
129
|
+
text: string;
|
|
130
|
+
}>;
|
|
131
|
+
}, "strip", z.ZodTypeAny, {
|
|
132
|
+
name: "custom";
|
|
133
|
+
colors: {
|
|
134
|
+
primary: string;
|
|
135
|
+
background: string;
|
|
136
|
+
text: string;
|
|
137
|
+
};
|
|
138
|
+
url: string;
|
|
139
|
+
}, {
|
|
140
|
+
name: "custom";
|
|
141
|
+
colors: {
|
|
142
|
+
primary: string;
|
|
143
|
+
background: string;
|
|
144
|
+
text: string;
|
|
145
|
+
};
|
|
146
|
+
url: string;
|
|
147
|
+
}>
|
|
148
|
+
]>;
|
|
117
149
|
declare const mapOptionsSchema: z.ZodObject<{
|
|
118
150
|
container: z.ZodString;
|
|
119
151
|
position: z.ZodObject<{
|
|
@@ -211,42 +243,74 @@ declare const mapOptionsSchema: z.ZodObject<{
|
|
|
211
243
|
};
|
|
212
244
|
} | undefined;
|
|
213
245
|
}>>;
|
|
214
|
-
style: z.
|
|
215
|
-
|
|
216
|
-
z.
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
246
|
+
style: z.ZodUnion<[
|
|
247
|
+
z.ZodObject<{
|
|
248
|
+
name: z.ZodUnion<[
|
|
249
|
+
z.ZodLiteral<"dark">,
|
|
250
|
+
z.ZodLiteral<"light">
|
|
251
|
+
]>;
|
|
252
|
+
colors: z.ZodObject<{
|
|
253
|
+
primary: z.ZodString;
|
|
254
|
+
background: z.ZodString;
|
|
255
|
+
text: z.ZodString;
|
|
256
|
+
}, "strip", z.ZodTypeAny, {
|
|
257
|
+
primary: string;
|
|
258
|
+
background: string;
|
|
259
|
+
text: string;
|
|
260
|
+
}, {
|
|
261
|
+
primary: string;
|
|
262
|
+
background: string;
|
|
263
|
+
text: string;
|
|
264
|
+
}>;
|
|
224
265
|
}, "strip", z.ZodTypeAny, {
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
266
|
+
name: "dark" | "light";
|
|
267
|
+
colors: {
|
|
268
|
+
primary: string;
|
|
269
|
+
background: string;
|
|
270
|
+
text: string;
|
|
271
|
+
};
|
|
228
272
|
}, {
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
273
|
+
name: "dark" | "light";
|
|
274
|
+
colors: {
|
|
275
|
+
primary: string;
|
|
276
|
+
background: string;
|
|
277
|
+
text: string;
|
|
278
|
+
};
|
|
279
|
+
}>,
|
|
280
|
+
z.ZodObject<{
|
|
281
|
+
name: z.ZodLiteral<"custom">;
|
|
282
|
+
url: z.ZodString;
|
|
283
|
+
colors: z.ZodObject<{
|
|
284
|
+
primary: z.ZodString;
|
|
285
|
+
background: z.ZodString;
|
|
286
|
+
text: z.ZodString;
|
|
287
|
+
}, "strip", z.ZodTypeAny, {
|
|
288
|
+
primary: string;
|
|
289
|
+
background: string;
|
|
290
|
+
text: string;
|
|
291
|
+
}, {
|
|
292
|
+
primary: string;
|
|
293
|
+
background: string;
|
|
294
|
+
text: string;
|
|
295
|
+
}>;
|
|
296
|
+
}, "strip", z.ZodTypeAny, {
|
|
297
|
+
name: "custom";
|
|
298
|
+
colors: {
|
|
299
|
+
primary: string;
|
|
300
|
+
background: string;
|
|
301
|
+
text: string;
|
|
302
|
+
};
|
|
303
|
+
url: string;
|
|
304
|
+
}, {
|
|
305
|
+
name: "custom";
|
|
306
|
+
colors: {
|
|
307
|
+
primary: string;
|
|
308
|
+
background: string;
|
|
309
|
+
text: string;
|
|
310
|
+
};
|
|
311
|
+
url: string;
|
|
312
|
+
}>
|
|
313
|
+
]>;
|
|
250
314
|
}, "strip", z.ZodTypeAny, {
|
|
251
315
|
container: string;
|
|
252
316
|
position: {
|
|
@@ -263,7 +327,14 @@ declare const mapOptionsSchema: z.ZodObject<{
|
|
|
263
327
|
background: string;
|
|
264
328
|
text: string;
|
|
265
329
|
};
|
|
266
|
-
|
|
330
|
+
} | {
|
|
331
|
+
name: "custom";
|
|
332
|
+
colors: {
|
|
333
|
+
primary: string;
|
|
334
|
+
background: string;
|
|
335
|
+
text: string;
|
|
336
|
+
};
|
|
337
|
+
url: string;
|
|
267
338
|
};
|
|
268
339
|
restriction?: {
|
|
269
340
|
minZoom?: number | undefined;
|
|
@@ -295,7 +366,14 @@ declare const mapOptionsSchema: z.ZodObject<{
|
|
|
295
366
|
background: string;
|
|
296
367
|
text: string;
|
|
297
368
|
};
|
|
298
|
-
|
|
369
|
+
} | {
|
|
370
|
+
name: "custom";
|
|
371
|
+
colors: {
|
|
372
|
+
primary: string;
|
|
373
|
+
background: string;
|
|
374
|
+
text: string;
|
|
375
|
+
};
|
|
376
|
+
url: string;
|
|
299
377
|
};
|
|
300
378
|
restriction?: {
|
|
301
379
|
minZoom?: number | undefined;
|
|
@@ -317,6 +395,8 @@ export type MapPosition = z.infer<typeof mapPositionSchema>;
|
|
|
317
395
|
export type MapBounds = z.infer<typeof mapBoundsSchema>;
|
|
318
396
|
export type MapOptions = z.infer<typeof mapOptionsSchema>;
|
|
319
397
|
export type MapStyle = z.infer<typeof mapStyleSchema>;
|
|
398
|
+
declare const mapEventLoadHandlerSchema: z.ZodFunction<z.ZodTuple<[
|
|
399
|
+
], z.ZodUnknown>, z.ZodVoid>;
|
|
320
400
|
declare const mapEventIdleHandlerSchema: z.ZodFunction<z.ZodTuple<[
|
|
321
401
|
], z.ZodUnknown>, z.ZodVoid>;
|
|
322
402
|
declare const mapEventMoveHandlerSchema: z.ZodFunction<z.ZodTuple<[
|
|
@@ -358,21 +438,24 @@ declare const mapEventClickHandlerSchema: z.ZodFunction<z.ZodTuple<[
|
|
|
358
438
|
lng: number;
|
|
359
439
|
}>
|
|
360
440
|
], z.ZodUnknown>, z.ZodVoid>;
|
|
361
|
-
export
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
}
|
|
441
|
+
export type MapEventLoadHandler = z.infer<typeof mapEventLoadHandlerSchema>;
|
|
442
|
+
export type MapEventIdleHandler = z.infer<typeof mapEventIdleHandlerSchema>;
|
|
443
|
+
export type MapEventMoveHandler = z.infer<typeof mapEventMoveHandlerSchema>;
|
|
444
|
+
export type MapEventClickHandler = z.infer<typeof mapEventClickHandlerSchema>;
|
|
366
445
|
export interface EventHandlerMap {
|
|
446
|
+
load: MapEventLoadHandler;
|
|
367
447
|
idle: MapEventIdleHandler;
|
|
368
448
|
move: MapEventMoveHandler;
|
|
369
449
|
click: MapEventClickHandler;
|
|
370
450
|
}
|
|
451
|
+
export interface EventPayloadMap {
|
|
452
|
+
load: null;
|
|
453
|
+
idle: null;
|
|
454
|
+
move: MapPosition;
|
|
455
|
+
click: MapCoordinate;
|
|
456
|
+
}
|
|
371
457
|
export type EventId = keyof EventHandlerMap;
|
|
372
458
|
export type EventHandler<E extends EventId> = (payload: EventPayloadMap[E]) => void;
|
|
373
|
-
export type MapEventIdleHandler = z.infer<typeof mapEventIdleHandlerSchema>;
|
|
374
|
-
export type MapEventMoveHandler = z.infer<typeof mapEventMoveHandlerSchema>;
|
|
375
|
-
export type MapEventClickHandler = z.infer<typeof mapEventClickHandlerSchema>;
|
|
376
459
|
declare const mapPopupDataSchema: z.ZodObject<{
|
|
377
460
|
id: z.ZodString;
|
|
378
461
|
rank: z.ZodNumber;
|