@arenarium/maps 1.0.55 → 1.0.58
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 +6 -30
- package/dist/index.js +9 -9
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -408,6 +408,9 @@ declare const mapPopupSchema: z.ZodObject<{
|
|
|
408
408
|
z.ZodNumber
|
|
409
409
|
], null>, "many">
|
|
410
410
|
], null>;
|
|
411
|
+
contentCallback: z.ZodFunction<z.ZodTuple<[
|
|
412
|
+
z.ZodString
|
|
413
|
+
], z.ZodUnknown>, z.ZodPromise<z.ZodAny>>;
|
|
411
414
|
}, "strip", z.ZodTypeAny, {
|
|
412
415
|
data: {
|
|
413
416
|
lat: number;
|
|
@@ -424,6 +427,7 @@ declare const mapPopupSchema: z.ZodObject<{
|
|
|
424
427
|
number
|
|
425
428
|
][]
|
|
426
429
|
];
|
|
430
|
+
contentCallback: (args_0: string, ...args: unknown[]) => Promise<any>;
|
|
427
431
|
}, {
|
|
428
432
|
data: {
|
|
429
433
|
lat: number;
|
|
@@ -440,35 +444,9 @@ declare const mapPopupSchema: z.ZodObject<{
|
|
|
440
444
|
number
|
|
441
445
|
][]
|
|
442
446
|
];
|
|
447
|
+
contentCallback: (args_0: string, ...args: unknown[]) => Promise<any>;
|
|
443
448
|
}>;
|
|
444
449
|
export type MapPopup = z.infer<typeof mapPopupSchema>;
|
|
445
|
-
declare namespace Types {
|
|
446
|
-
export type PopupState = [
|
|
447
|
-
number,
|
|
448
|
-
[
|
|
449
|
-
number,
|
|
450
|
-
number
|
|
451
|
-
][]
|
|
452
|
-
];
|
|
453
|
-
export interface PopupData {
|
|
454
|
-
id: string;
|
|
455
|
-
rank: number;
|
|
456
|
-
lat: number;
|
|
457
|
-
lng: number;
|
|
458
|
-
width: number;
|
|
459
|
-
height: number;
|
|
460
|
-
}
|
|
461
|
-
export interface PopupStatesRequest {
|
|
462
|
-
apiKey: string;
|
|
463
|
-
data: PopupData[];
|
|
464
|
-
minZoom: number;
|
|
465
|
-
maxZoom: number;
|
|
466
|
-
}
|
|
467
|
-
export interface Popup {
|
|
468
|
-
data: PopupData;
|
|
469
|
-
state: PopupState;
|
|
470
|
-
}
|
|
471
|
-
}
|
|
472
450
|
export declare namespace MapComponent {
|
|
473
451
|
type MapPopupContentCallback = (id: string) => Promise<HTMLElement>;
|
|
474
452
|
}
|
|
@@ -485,9 +463,7 @@ export interface MapComponent {
|
|
|
485
463
|
zoomOut: () => void;
|
|
486
464
|
getStyle: () => MapStyle;
|
|
487
465
|
setStyle: (style: MapStyle) => void;
|
|
488
|
-
|
|
489
|
-
setPopups: (popups: Types.Popup[]) => Promise<void>;
|
|
490
|
-
getPopups: () => Types.Popup[];
|
|
466
|
+
updatePopups: (popups: MapPopup[]) => Promise<void>;
|
|
491
467
|
removePopups: () => void;
|
|
492
468
|
on: <E extends EventId>(eventId: E, handler: EventHandler<E>) => void;
|
|
493
469
|
off: <E extends EventId>(eventId: E, handler: EventHandler<E>) => void;
|