react-zoom-pan-pinch 4.2.0 → 4.3.0

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
@@ -443,17 +443,48 @@ declare const KeepScale: React.ForwardRefExoticComponent<React.HTMLAttributes<HT
443
443
 
444
444
  type MiniMapProps = {
445
445
  children: React.ReactNode;
446
+ /** Width of the mini map box in px. */
446
447
  width?: number;
448
+ /** Height of the mini map box in px. */
447
449
  height?: number;
450
+ /** Border colour of the viewport indicator. */
448
451
  borderColor?: string;
452
+ /**
453
+ * Colour of the overlay that dims everything outside the viewport
454
+ * (`.rzpp-minimap-mask`).
455
+ */
456
+ maskColor?: string;
449
457
  /** Merged onto the viewport indicator (`.rzpp-minimap-preview`). */
450
458
  previewStyle?: React.CSSProperties;
451
459
  /** Extra class name(s) appended to `.rzpp-minimap-wrapper`. */
452
460
  wrapperClassName?: string;
453
461
  /** Extra class name(s) appended to `.rzpp-minimap-preview`. */
454
462
  previewClassName?: string;
463
+ /**
464
+ * Dragging anywhere on the mini map grabs the viewport indicator and moves
465
+ * it with the pointer (mouse and touch).
466
+ */
455
467
  panning?: boolean;
456
- } & React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
468
+ /**
469
+ * Flips the drag direction: instead of grabbing the viewport indicator the
470
+ * drag moves the content, like panning the main view.
471
+ */
472
+ inversePan?: boolean;
473
+ /** Wheel over the mini map zooms the main view around its centre. */
474
+ zoomable?: boolean;
475
+ /** Scale increment applied per wheel notch when `zoomable` is on. */
476
+ zoomStep?: number;
477
+ /**
478
+ * Padding around the mapped area, in mini map px at the current map scale
479
+ * (same meaning as React Flow's `offsetScale`).
480
+ */
481
+ offsetScale?: number;
482
+ /**
483
+ * Fired for a click (or tap) that did not turn into a drag. `position` is
484
+ * the clicked point in content coordinates, ready for `zoomToPoint`.
485
+ */
486
+ onClick?: (event: MouseEvent | TouchEvent, position: PositionType) => void;
487
+ } & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "onClick">;
457
488
  declare const MiniMap: React.FC<MiniMapProps>;
458
489
 
459
490
  type Props = {