Socket
Socket
Sign inDemoInstall

@reactflow/minimap

Package Overview
Dependencies
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@reactflow/minimap - npm Package Compare versions

Comparing version 11.0.0-next.5 to 11.0.0-next.6

8

dist/esm/index.js
import { jsx, jsxs } from 'react/jsx-runtime';
import { memo, useId } from 'react';
import { memo } from 'react';
import cc from 'classcat';

@@ -29,2 +29,3 @@ import shallow from 'zustand/shallow';

boundingRect: nodes.length > 0 ? getBoundsOfRects(getRectOfNodes(nodes), viewBB) : viewBB,
rfId: s.rfId,
};

@@ -35,4 +36,3 @@ };

function MiniMap({ style, className, nodeStrokeColor = '#555', nodeColor = '#fff', nodeClassName = '', nodeBorderRadius = 5, nodeStrokeWidth = 2, maskColor = 'rgb(240, 242, 243, 0.7)', position = 'bottom-right', }) {
const minimapId = useId();
const { boundingRect, viewBB, nodes } = useStore(selector, shallow);
const { boundingRect, viewBB, nodes, rfId } = useStore(selector, shallow);
const elementWidth = style?.width ?? defaultWidth;

@@ -54,3 +54,3 @@ const elementHeight = style?.height ?? defaultHeight;

const shapeRendering = typeof window === 'undefined' || !!window.chrome ? 'crispEdges' : 'geometricPrecision';
const labelledBy = `${ARIA_LABEL_KEY}-${minimapId}`;
const labelledBy = `${ARIA_LABEL_KEY}-${rfId}`;
return (jsx(Panel, { position: position, style: style, className: cc(['react-flow__minimap', className]), children: jsxs("svg", { width: elementWidth, height: elementHeight, viewBox: `${x} ${y} ${width} ${height}`, role: "img", "aria-labelledby": labelledBy, children: [jsx("title", { id: labelledBy, children: "React Flow mini map" }), nodes.map((node) => {

@@ -57,0 +57,0 @@ return (jsx(MiniMapNode$1, { x: node.positionAbsolute?.x ?? 0, y: node.positionAbsolute?.y ?? 0, width: node.width, height: node.height, style: node.style, className: nodeClassNameFunc(node), color: nodeColorFunc(node), borderRadius: nodeBorderRadius, strokeColor: nodeStrokeColorFunc(node), strokeWidth: nodeStrokeWidth, shapeRendering: shapeRendering }, node.id));

{
"name": "@reactflow/minimap",
"version": "11.0.0-next.5",
"version": "11.0.0-next.6",
"description": "Minimap component for React Flow.",

@@ -32,3 +32,3 @@ "keywords": [

"@babel/runtime": "^7.18.9",
"@reactflow/core": "11.0.0-next.5",
"@reactflow/core": "11.0.0-next.6",
"classcat": "^5.0.3",

@@ -38,4 +38,4 @@ "zustand": "^4.0.0"

"peerDependencies": {
"react": ">=18",
"react-dom": ">=18"
"react": ">=17",
"react-dom": ">=17"
},

@@ -48,3 +48,4 @@ "devDependencies": {

"@types/react": "^18.0.19",
"react": "^18.2.0"
"react": "^18.2.0",
"typescript": "^4.7.4"
},

@@ -51,0 +52,0 @@ "rollup": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc