Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@reactflow/background

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/background - npm Package Compare versions

Comparing version 11.2.8 to 11.3.0

4

dist/esm/Background.d.ts

@@ -1,2 +0,2 @@

/// <reference types="react" />
import React from 'react';
import { BackgroundProps } from './types';

@@ -7,4 +7,4 @@ declare function Background({ id, variant, gap, size, lineWidth, offset, color, style, className, }: BackgroundProps): JSX.Element;

}
declare const _default: import("react").MemoExoticComponent<typeof Background>;
declare const _default: React.MemoExoticComponent<typeof Background>;
export default _default;
//# sourceMappingURL=Background.d.ts.map

@@ -1,3 +0,2 @@

import { jsx, jsxs } from 'react/jsx-runtime';
import { memo, useRef } from 'react';
import React, { memo, useRef } from 'react';
import cc from 'classcat';

@@ -14,7 +13,7 @@ import { useStore } from '@reactflow/core';

function LinePattern({ color, dimensions, lineWidth, }) {
return (jsx("path", { stroke: color, strokeWidth: lineWidth, d: `M${dimensions[0] / 2} 0 V${dimensions[1]} M0 ${dimensions[1] / 2} H${dimensions[0]}` }));
function LinePattern({ color, dimensions, lineWidth }) {
return (React.createElement("path", { stroke: color, strokeWidth: lineWidth, d: `M${dimensions[0] / 2} 0 V${dimensions[1]} M0 ${dimensions[1] / 2} H${dimensions[0]}` }));
}
function DotPattern({ color, radius }) {
return jsx("circle", { cx: radius, cy: radius, r: radius, fill: color });
return React.createElement("circle", { cx: radius, cy: radius, r: radius, fill: color });
}

@@ -51,3 +50,3 @@

: [patternDimensions[0] / offset, patternDimensions[1] / offset];
return (jsxs("svg", { className: cc(['react-flow__background', className]), style: {
return (React.createElement("svg", { className: cc(['react-flow__background', className]), style: {
...style,

@@ -59,3 +58,5 @@ position: 'absolute',

left: 0,
}, ref: ref, "data-testid": "rf__background", children: [jsx("pattern", { id: patternId + id, x: transform[0] % scaledGap[0], y: transform[1] % scaledGap[1], width: scaledGap[0], height: scaledGap[1], patternUnits: "userSpaceOnUse", patternTransform: `translate(-${patternOffset[0]},-${patternOffset[1]})`, children: isDots ? (jsx(DotPattern, { color: patternColor, radius: scaledSize / offset })) : (jsx(LinePattern, { dimensions: patternDimensions, color: patternColor, lineWidth: lineWidth })) }), jsx("rect", { x: "0", y: "0", width: "100%", height: "100%", fill: `url(#${patternId + id})` })] }));
}, ref: ref, "data-testid": "rf__background" },
React.createElement("pattern", { id: patternId + id, x: transform[0] % scaledGap[0], y: transform[1] % scaledGap[1], width: scaledGap[0], height: scaledGap[1], patternUnits: "userSpaceOnUse", patternTransform: `translate(-${patternOffset[0]},-${patternOffset[1]})` }, isDots ? (React.createElement(DotPattern, { color: patternColor, radius: scaledSize / offset })) : (React.createElement(LinePattern, { dimensions: patternDimensions, color: patternColor, lineWidth: lineWidth }))),
React.createElement("rect", { x: "0", y: "0", width: "100%", height: "100%", fill: `url(#${patternId + id})` })));
}

@@ -62,0 +63,0 @@ Background.displayName = 'Background';

@@ -7,3 +7,3 @@ /// <reference types="react" />

};
export declare function LinePattern({ color, dimensions, lineWidth, }: LinePatternProps): JSX.Element;
export declare function LinePattern({ color, dimensions, lineWidth }: LinePatternProps): JSX.Element;
type DotPatternProps = {

@@ -10,0 +10,0 @@ radius: number;

@@ -1,2 +0,2 @@

/// <reference types="react" />
import React from 'react';
import { BackgroundProps } from './types';

@@ -7,4 +7,4 @@ declare function Background({ id, variant, gap, size, lineWidth, offset, color, style, className, }: BackgroundProps): JSX.Element;

}
declare const _default: import("react").MemoExoticComponent<typeof Background>;
declare const _default: React.MemoExoticComponent<typeof Background>;
export default _default;
//# sourceMappingURL=Background.d.ts.map

@@ -7,3 +7,3 @@ /// <reference types="react" />

};
export declare function LinePattern({ color, dimensions, lineWidth, }: LinePatternProps): JSX.Element;
export declare function LinePattern({ color, dimensions, lineWidth }: LinePatternProps): JSX.Element;
type DotPatternProps = {

@@ -10,0 +10,0 @@ radius: number;

{
"name": "@reactflow/background",
"version": "11.2.8",
"version": "11.3.0",
"description": "Background component with different variants for React Flow",

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

"types": "./dist/esm/index.d.ts",
"import": "./dist/esm/index.js",
"import": "./dist/esm/index.mjs",
"require": "./dist/umd/index.js"

@@ -43,3 +43,3 @@ }

"zustand": "^4.4.1",
"@reactflow/core": "11.8.3"
"@reactflow/core": "11.9.0"
},

@@ -51,5 +51,5 @@ "devDependencies": {

"typescript": "^4.9.4",
"@reactflow/rollup-config": "0.0.0",
"@reactflow/eslint-config": "0.0.0",
"@reactflow/tsconfig": "0.0.0",
"@reactflow/eslint-config": "0.0.0"
"@reactflow/rollup-config": "0.0.0"
},

@@ -56,0 +56,0 @@ "peerDependencies": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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

Sorry, the diff of this file is not supported yet

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