chore(packages): use temporary scope name
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
# @react-flow/background
|
||||
# @rctflw/background
|
||||
|
||||
Background component for React Flow.
|
||||
|
||||
## Installation
|
||||
|
||||
```sh
|
||||
npm install @react-flow/background
|
||||
npm install @rctflw/background
|
||||
```
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "@react-flow/background",
|
||||
"name": "@rctflw/background",
|
||||
"version": "11.0.0-next.0",
|
||||
"description": "Background component with different variants for React Flow",
|
||||
"keywords": [
|
||||
@@ -13,9 +13,9 @@
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"main": "dist/react-flow-background.cjs.js",
|
||||
"module": "dist/react-flow-background.esm.js",
|
||||
"types": "dist/react-flow-background.cjs.d.ts",
|
||||
"main": "dist/rctflw-background.cjs.js",
|
||||
"module": "dist/rctflw-background.esm.js",
|
||||
"types": "dist/rctflw-background.cjs.d.ts",
|
||||
"sideEffects": false,
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
@@ -25,7 +25,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.18.9",
|
||||
"@react-flow/core": "workspace:*",
|
||||
"@rctflw/core": "workspace:*",
|
||||
"classcat": "^5.0.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { memo, useRef, useId } from 'react';
|
||||
import cc from 'classcat';
|
||||
import { useStore, ReactFlowState } from '@react-flow/core';
|
||||
import { useStore, ReactFlowState } from '@rctflw/core';
|
||||
|
||||
import { BackgroundProps, BackgroundVariant } from './types';
|
||||
import { DotPattern, LinePattern } from './Patterns';
|
||||
@@ -39,15 +39,10 @@ function Background({
|
||||
const isDots = variant === BackgroundVariant.Dots;
|
||||
const isCross = variant === BackgroundVariant.Cross;
|
||||
const gapXY: [number, number] = Array.isArray(gap) ? gap : [gap, gap];
|
||||
const scaledGap: [number, number] = [
|
||||
gapXY[0] * tScale || 1,
|
||||
gapXY[1] * tScale || 1,
|
||||
];
|
||||
const scaledGap: [number, number] = [gapXY[0] * tScale || 1, gapXY[1] * tScale || 1];
|
||||
const scaledSize = patternSize * tScale;
|
||||
|
||||
const patternDimensions: [number, number] = isCross
|
||||
? [scaledSize, scaledSize]
|
||||
: scaledGap;
|
||||
const patternDimensions: [number, number] = isCross ? [scaledSize, scaledSize] : scaledGap;
|
||||
|
||||
const patternOffset = isDots
|
||||
? [scaledSize / 2, scaledSize / 2]
|
||||
@@ -78,20 +73,10 @@ function Background({
|
||||
{isDots ? (
|
||||
<DotPattern color={patternColor} radius={scaledSize / 2} />
|
||||
) : (
|
||||
<LinePattern
|
||||
dimensions={patternDimensions}
|
||||
color={patternColor}
|
||||
lineWidth={lineWidth}
|
||||
/>
|
||||
<LinePattern dimensions={patternDimensions} color={patternColor} lineWidth={lineWidth} />
|
||||
)}
|
||||
</pattern>
|
||||
<rect
|
||||
x="0"
|
||||
y="0"
|
||||
width="100%"
|
||||
height="100%"
|
||||
fill={`url(#${patternId})`}
|
||||
/>
|
||||
<rect x="0" y="0" width="100%" height="100%" fill={`url(#${patternId})`} />
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
# @react-flow/controls
|
||||
# @rctflw/controls
|
||||
|
||||
Controls component for React Flow.
|
||||
|
||||
## Installation
|
||||
|
||||
```sh
|
||||
npm install @react-flow/controls
|
||||
npm install @rctflw/controls
|
||||
```
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "@react-flow/controls",
|
||||
"name": "@rctflw/controls",
|
||||
"version": "11.0.0-next.0",
|
||||
"description": "Component to control the viewport of a React Flow instance",
|
||||
"keywords": [
|
||||
@@ -13,9 +13,9 @@
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"main": "dist/react-flow-controls.cjs.js",
|
||||
"module": "dist/react-flow-controls.esm.js",
|
||||
"types": "dist/react-flow-controls.cjs.d.ts",
|
||||
"main": "dist/rctflw-controls.cjs.js",
|
||||
"module": "dist/rctflw-controls.esm.js",
|
||||
"types": "dist/rctflw-controls.cjs.d.ts",
|
||||
"sideEffects": false,
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
@@ -28,7 +28,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.18.9",
|
||||
"@react-flow/core": "workspace:*",
|
||||
"@rctflw/core": "workspace:*",
|
||||
"classcat": "^5.0.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { memo, FC, useEffect, useState, PropsWithChildren } from 'react';
|
||||
import cc from 'classcat';
|
||||
import { useStore, useStoreApi, useReactFlow, ReactFlowState, Panel } from '@react-flow/core';
|
||||
import { useStore, useStoreApi, useReactFlow, ReactFlowState, Panel } from '@rctflw/core';
|
||||
|
||||
import PlusIcon from './Icons/Plus';
|
||||
import MinusIcon from './Icons/Minus';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ButtonHTMLAttributes, HTMLAttributes } from 'react';
|
||||
import { FitViewOptions, PanelPosition } from '@react-flow/core';
|
||||
import { FitViewOptions, PanelPosition } from '@rctflw/core';
|
||||
|
||||
export interface ControlProps extends HTMLAttributes<HTMLDivElement> {
|
||||
showZoom?: boolean;
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
# @react-flow/core
|
||||
# @rctflw/core
|
||||
|
||||
Core components and util functions of React Flow.
|
||||
|
||||
## Installation
|
||||
|
||||
```sh
|
||||
npm install @react-flow/core
|
||||
npm install @rctflw/core
|
||||
```
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "@react-flow/core",
|
||||
"name": "@rctflw/core",
|
||||
"version": "11.0.0-next.0",
|
||||
"description": "Core components and util functions of React Flow.",
|
||||
"keywords": [
|
||||
@@ -13,9 +13,9 @@
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"main": "dist/react-flow-core.cjs.js",
|
||||
"module": "dist/react-flow-core.esm.js",
|
||||
"types": "dist/react-flow-core.cjs.d.ts",
|
||||
"main": "dist/rctflw-core.cjs.js",
|
||||
"module": "dist/rctflw-core.esm.js",
|
||||
"types": "dist/rctflw-core.cjs.d.ts",
|
||||
"sideEffects": false,
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
# @react-flow/minimap
|
||||
# @rctflw/minimap
|
||||
|
||||
Mini map component for React Flow.
|
||||
|
||||
## Installation
|
||||
|
||||
```sh
|
||||
npm install @react-flow/minimap
|
||||
npm install @rctflw/minimap
|
||||
```
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "@react-flow/minimap",
|
||||
"name": "@rctflw/minimap",
|
||||
"version": "11.0.0-next.0",
|
||||
"description": "Minimap component for React Flow.",
|
||||
"keywords": [
|
||||
@@ -13,9 +13,9 @@
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"main": "dist/react-flow-minimap.cjs.js",
|
||||
"module": "dist/react-flow-minimap.esm.js",
|
||||
"types": "dist/react-flow-minimap.cjs.d.ts",
|
||||
"main": "dist/rctflw-minimap.cjs.js",
|
||||
"module": "dist/rctflw-minimap.esm.js",
|
||||
"types": "dist/rctflw-minimap.cjs.d.ts",
|
||||
"sideEffects": false,
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
@@ -28,7 +28,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.18.9",
|
||||
"@react-flow/core": "workspace:*",
|
||||
"@rctflw/core": "workspace:*",
|
||||
"classcat": "^5.0.3",
|
||||
"zustand": "^4.0.0"
|
||||
},
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import { memo, useId } from 'react';
|
||||
import cc from 'classcat';
|
||||
import shallow from 'zustand/shallow';
|
||||
import { useStore, getRectOfNodes, ReactFlowState, Rect, Panel, getBoundsOfRects } from '@react-flow/core';
|
||||
import { useStore, getRectOfNodes, ReactFlowState, Rect, Panel, getBoundsOfRects } from '@rctflw/core';
|
||||
|
||||
import MiniMapNode from './MiniMapNode';
|
||||
import { MiniMapProps, GetMiniMapNodeAttribute } from './types';
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
import { HTMLAttributes } from 'react';
|
||||
import { Node, PanelPosition } from '@react-flow/core';
|
||||
import { Node, PanelPosition } from '@rctflw/core';
|
||||
|
||||
export type GetMiniMapNodeAttribute<NodeData = any> = (
|
||||
node: Node<NodeData>
|
||||
) => string;
|
||||
export type GetMiniMapNodeAttribute<NodeData = any> = (node: Node<NodeData>) => string;
|
||||
|
||||
export interface MiniMapProps<NodeData = any>
|
||||
extends HTMLAttributes<SVGSVGElement> {
|
||||
export interface MiniMapProps<NodeData = any> extends HTMLAttributes<SVGSVGElement> {
|
||||
nodeColor?: string | GetMiniMapNodeAttribute<NodeData>;
|
||||
nodeStrokeColor?: string | GetMiniMapNodeAttribute<NodeData>;
|
||||
nodeClassName?: string | GetMiniMapNodeAttribute<NodeData>;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "reactflow",
|
||||
"version": "11.0.0-next.0",
|
||||
"version": "11.0.0-next.2",
|
||||
"description": "A highly customizable React library for building node-based editors and interactive flow charts",
|
||||
"keywords": [
|
||||
"react",
|
||||
@@ -28,10 +28,10 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.18.9",
|
||||
"@react-flow/background": "workspace:*",
|
||||
"@react-flow/controls": "workspace:*",
|
||||
"@react-flow/core": "workspace:*",
|
||||
"@react-flow/minimap": "workspace:*"
|
||||
"@rctflw/background": "workspace:*",
|
||||
"@rctflw/controls": "workspace:*",
|
||||
"@rctflw/core": "workspace:*",
|
||||
"@rctflw/minimap": "workspace:*"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": ">=18",
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
export * from '@react-flow/core';
|
||||
export * from '@react-flow/minimap';
|
||||
export * from '@react-flow/controls';
|
||||
export * from '@react-flow/background';
|
||||
export * from '@rctflw/core';
|
||||
export * from '@rctflw/minimap';
|
||||
export * from '@rctflw/controls';
|
||||
export * from '@rctflw/background';
|
||||
|
||||
import { ReactFlow } from '@react-flow/core';
|
||||
import { ReactFlow } from '@rctflw/core';
|
||||
|
||||
export default ReactFlow;
|
||||
|
||||
Reference in New Issue
Block a user