@reactflow/minimap
Advanced tools
Comparing version 11.0.0-next.5 to 11.0.0-next.6
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
140647
640
7
+ Added@reactflow/core@11.0.0-next.6(transitive)
- Removed@reactflow/core@11.0.0-next.5(transitive)
- Removed@types/d3@7.4.3(transitive)
- Removed@types/d3-array@3.2.1(transitive)
- Removed@types/d3-axis@3.0.6(transitive)
- Removed@types/d3-brush@3.0.6(transitive)
- Removed@types/d3-chord@3.0.6(transitive)
- Removed@types/d3-contour@3.0.6(transitive)
- Removed@types/d3-delaunay@6.0.4(transitive)
- Removed@types/d3-dispatch@3.0.6(transitive)
- Removed@types/d3-dsv@3.0.7(transitive)
- Removed@types/d3-ease@3.0.2(transitive)
- Removed@types/d3-fetch@3.0.7(transitive)
- Removed@types/d3-force@3.0.10(transitive)
- Removed@types/d3-format@3.0.4(transitive)
- Removed@types/d3-geo@3.1.0(transitive)
- Removed@types/d3-hierarchy@3.1.7(transitive)
- Removed@types/d3-path@3.1.0(transitive)
- Removed@types/d3-polygon@3.0.2(transitive)
- Removed@types/d3-quadtree@3.0.6(transitive)
- Removed@types/d3-random@3.0.3(transitive)
- Removed@types/d3-scale@4.0.8(transitive)
- Removed@types/d3-scale-chromatic@3.0.3(transitive)
- Removed@types/d3-shape@3.1.6(transitive)
- Removed@types/d3-time@3.0.3(transitive)
- Removed@types/d3-time-format@4.0.3(transitive)
- Removed@types/d3-timer@3.0.2(transitive)
- Removed@types/d3-transition@3.0.8(transitive)
- Removed@types/geojson@7946.0.14(transitive)