@arenarium/maps 1.0.54 → 1.0.55

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 CHANGED
@@ -114,7 +114,6 @@ declare const mapStyleSchema: z.ZodObject<{
114
114
  url?: string | undefined;
115
115
  }>;
116
116
  declare const mapOptionsSchema: z.ZodObject<{
117
- apiKey: z.ZodString;
118
117
  container: z.ZodString;
119
118
  position: z.ZodObject<{
120
119
  center: z.ZodObject<{
@@ -248,7 +247,6 @@ declare const mapOptionsSchema: z.ZodObject<{
248
247
  url?: string | undefined;
249
248
  }>;
250
249
  }, "strip", z.ZodTypeAny, {
251
- apiKey: string;
252
250
  container: string;
253
251
  position: {
254
252
  center: {
@@ -281,7 +279,6 @@ declare const mapOptionsSchema: z.ZodObject<{
281
279
  } | undefined;
282
280
  } | undefined;
283
281
  }, {
284
- apiKey: string;
285
282
  container: string;
286
283
  position: {
287
284
  center: {
@@ -382,55 +379,95 @@ export type MapEventPopupClickHandler = z.infer<typeof mapEventPopupClickHandler
382
379
  export type MapEventLoadingStartHandler = z.infer<typeof mapEventLoadingStartHandlerSchema>;
383
380
  export type MapEventLoadingEndHandler = z.infer<typeof mapEventLoadingEndHandlerSchema>;
384
381
  declare const mapPopupSchema: z.ZodObject<{
385
- id: z.ZodString;
386
- rank: z.ZodNumber;
387
- lat: z.ZodNumber;
388
- lng: z.ZodNumber;
389
- width: z.ZodNumber;
390
- height: z.ZodNumber;
391
- }, "strip", z.ZodTypeAny, {
392
- lat: number;
393
- lng: number;
394
- id: string;
395
- rank: number;
396
- width: number;
397
- height: number;
398
- }, {
399
- lat: number;
400
- lng: number;
401
- id: string;
402
- rank: number;
403
- width: number;
404
- height: number;
405
- }>;
406
- export type MapPopup = z.infer<typeof mapPopupSchema>;
407
- declare namespace Types {
408
- export interface Popup {
382
+ data: z.ZodObject<{
383
+ id: z.ZodString;
384
+ rank: z.ZodNumber;
385
+ lat: z.ZodNumber;
386
+ lng: z.ZodNumber;
387
+ width: z.ZodNumber;
388
+ height: z.ZodNumber;
389
+ }, "strip", z.ZodTypeAny, {
390
+ lat: number;
391
+ lng: number;
409
392
  id: string;
410
393
  rank: number;
394
+ width: number;
395
+ height: number;
396
+ }, {
411
397
  lat: number;
412
398
  lng: number;
399
+ id: string;
400
+ rank: number;
413
401
  width: number;
414
402
  height: number;
415
- }
416
- export interface Marker {
403
+ }>;
404
+ state: z.ZodTuple<[
405
+ z.ZodNumber,
406
+ z.ZodArray<z.ZodTuple<[
407
+ z.ZodNumber,
408
+ z.ZodNumber
409
+ ], null>, "many">
410
+ ], null>;
411
+ }, "strip", z.ZodTypeAny, {
412
+ data: {
413
+ lat: number;
414
+ lng: number;
417
415
  id: string;
416
+ rank: number;
417
+ width: number;
418
+ height: number;
419
+ };
420
+ state: [
421
+ number,
422
+ [
423
+ number,
424
+ number
425
+ ][]
426
+ ];
427
+ }, {
428
+ data: {
418
429
  lat: number;
419
430
  lng: number;
431
+ id: string;
432
+ rank: number;
420
433
  width: number;
421
434
  height: number;
422
- zet: number;
423
- angs: [
435
+ };
436
+ state: [
437
+ number,
438
+ [
424
439
  number,
425
440
  number
426
- ][];
441
+ ][]
442
+ ];
443
+ }>;
444
+ 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;
427
460
  }
428
- export interface MarkersRequest {
461
+ export interface PopupStatesRequest {
429
462
  apiKey: string;
430
- popups: Popup[];
463
+ data: PopupData[];
431
464
  minZoom: number;
432
465
  maxZoom: number;
433
466
  }
467
+ export interface Popup {
468
+ data: PopupData;
469
+ state: PopupState;
470
+ }
434
471
  }
435
472
  export declare namespace MapComponent {
436
473
  type MapPopupContentCallback = (id: string) => Promise<HTMLElement>;
@@ -448,8 +485,9 @@ export interface MapComponent {
448
485
  zoomOut: () => void;
449
486
  getStyle: () => MapStyle;
450
487
  setStyle: (style: MapStyle) => void;
451
- updatePopupContentCallback: (callback: MapComponent.MapPopupContentCallback) => Promise<HTMLElement>;
452
- updatePopups: (popups: Types.Popup[]) => Promise<void>;
488
+ setPopupContentCallback: (callback: MapComponent.MapPopupContentCallback) => Promise<HTMLElement>;
489
+ setPopups: (popups: Types.Popup[]) => Promise<void>;
490
+ getPopups: () => Types.Popup[];
453
491
  removePopups: () => void;
454
492
  on: <E extends EventId>(eventId: E, handler: EventHandler<E>) => void;
455
493
  off: <E extends EventId>(eventId: E, handler: EventHandler<E>) => void;