chore(packages): use @reactflow org for packages

This commit is contained in:
moklick
2022-08-29 17:18:05 +02:00
parent 22cb21a4ae
commit 588d8fc02e
23 changed files with 77 additions and 65 deletions
@@ -13,5 +13,6 @@ module.exports = defineConfig({
framework: 'next', framework: 'next',
bundler: 'webpack', bundler: 'webpack',
}, },
video: false,
}, },
}); });
@@ -13,7 +13,7 @@ import ReactFlow, {
HandleType, HandleType,
} from 'reactflow'; } from 'reactflow';
import { Controls } from '@rctflw/controls'; import { Controls } from '@reactflow/controls';
const initialNodes: Node[] = [ const initialNodes: Node[] = [
{ {
+1 -1
View File
@@ -4,7 +4,7 @@ import '../styles/globals.css';
// Unfortunately this doesn't work because preconsruct clears the dist folder and there is // Unfortunately this doesn't work because preconsruct clears the dist folder and there is
// no way to hook into the watch process to copy the files back to the dist folder // no way to hook into the watch process to copy the files back to the dist folder
// import '@rctflw/core/dist/theme-default.css'; // import '@reactflow/core/dist/theme-default.css';
// this is a workaround for testing the theme. See explanation above. // this is a workaround for testing the theme. See explanation above.
import '../styles/rf-style.css'; import '../styles/rf-style.css';
+1 -1
View File
@@ -15,7 +15,7 @@
"jsx": "preserve", "jsx": "preserve",
"incremental": true, "incremental": true,
"baseUrl": "./", "baseUrl": "./",
"types": ["cypress", "@testing-library/cypress"] "types": ["cypress"]
}, },
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"] "exclude": ["node_modules"]
+1 -1
View File
@@ -14,7 +14,7 @@
"dev": "preconstruct watch", "dev": "preconstruct watch",
"dev:example": "cd examples/nextjs && yarn dev", "dev:example": "cd examples/nextjs && yarn dev",
"build": "preconstruct build && yarn run packages", "build": "preconstruct build && yarn run packages",
"packages": "yarn workspaces foreach --include '@rctflw/**' --include 'reactflow' run build", "packages": "yarn workspaces foreach --include '@reactflow/**' --include 'reactflow' run build",
"test:all": "yarn test:chrome && yarn test:firefox", "test:all": "yarn test:chrome && yarn test:firefox",
"test:e2e": "cd examples/nextjs && cypress run", "test:e2e": "cd examples/nextjs && cypress run",
"test:component": "cd examples/nextjs && cypress run --component", "test:component": "cd examples/nextjs && cypress run --component",
+2 -2
View File
@@ -1,10 +1,10 @@
# @rctflw/background # @reactflow/background
Background component for React Flow. Background component for React Flow.
## Installation ## Installation
```sh ```sh
npm install @rctflw/background npm install @reactflow/background
``` ```
+8 -5
View File
@@ -1,5 +1,5 @@
{ {
"name": "@rctflw/background", "name": "@reactflow/background",
"version": "11.0.0-next.0", "version": "11.0.0-next.0",
"description": "Background component with different variants for React Flow", "description": "Background component with different variants for React Flow",
"keywords": [ "keywords": [
@@ -13,10 +13,13 @@
"files": [ "files": [
"dist" "dist"
], ],
"main": "dist/rctflw-background.cjs.js", "main": "dist/reactflow-background.cjs.js",
"module": "dist/rctflw-background.esm.js", "module": "dist/reactflow-background.esm.js",
"types": "dist/rctflw-background.cjs.d.ts", "types": "dist/reactflow-background.cjs.d.ts",
"sideEffects": false, "sideEffects": false,
"publishConfig": {
"access": "public"
},
"license": "MIT", "license": "MIT",
"repository": { "repository": {
"type": "git", "type": "git",
@@ -25,7 +28,7 @@
}, },
"dependencies": { "dependencies": {
"@babel/runtime": "^7.18.9", "@babel/runtime": "^7.18.9",
"@rctflw/core": "workspace:*", "@reactflow/core": "workspace:*",
"classcat": "^5.0.3" "classcat": "^5.0.3"
}, },
"peerDependencies": { "peerDependencies": {
+1 -1
View File
@@ -1,6 +1,6 @@
import { memo, useRef, useId } from 'react'; import { memo, useRef, useId } from 'react';
import cc from 'classcat'; import cc from 'classcat';
import { useStore, ReactFlowState } from '@rctflw/core'; import { useStore, ReactFlowState } from '@reactflow/core';
import { BackgroundProps, BackgroundVariant } from './types'; import { BackgroundProps, BackgroundVariant } from './types';
import { DotPattern, LinePattern } from './Patterns'; import { DotPattern, LinePattern } from './Patterns';
+2 -2
View File
@@ -1,10 +1,10 @@
# @rctflw/controls # @reactflow/controls
Controls component for React Flow. Controls component for React Flow.
## Installation ## Installation
```sh ```sh
npm install @rctflw/controls npm install @reactflow/controls
``` ```
+8 -5
View File
@@ -1,5 +1,5 @@
{ {
"name": "@rctflw/controls", "name": "@reactflow/controls",
"version": "11.0.0-next.0", "version": "11.0.0-next.0",
"description": "Component to control the viewport of a React Flow instance", "description": "Component to control the viewport of a React Flow instance",
"keywords": [ "keywords": [
@@ -13,9 +13,9 @@
"files": [ "files": [
"dist" "dist"
], ],
"main": "dist/rctflw-controls.cjs.js", "main": "dist/reactflow-controls.cjs.js",
"module": "dist/rctflw-controls.esm.js", "module": "dist/reactflow-controls.esm.js",
"types": "dist/rctflw-controls.cjs.d.ts", "types": "dist/reactflow-controls.cjs.d.ts",
"sideEffects": false, "sideEffects": false,
"license": "MIT", "license": "MIT",
"repository": { "repository": {
@@ -26,9 +26,12 @@
"scripts": { "scripts": {
"build": "postcss src/*.css --config ../../postcss.config.json --dir dist" "build": "postcss src/*.css --config ../../postcss.config.json --dir dist"
}, },
"publishConfig": {
"access": "public"
},
"dependencies": { "dependencies": {
"@babel/runtime": "^7.18.9", "@babel/runtime": "^7.18.9",
"@rctflw/core": "workspace:*", "@reactflow/core": "workspace:*",
"classcat": "^5.0.3" "classcat": "^5.0.3"
}, },
"peerDependencies": { "peerDependencies": {
+1 -1
View File
@@ -1,6 +1,6 @@
import { memo, FC, useEffect, useState, PropsWithChildren } from 'react'; import { memo, FC, useEffect, useState, PropsWithChildren } from 'react';
import cc from 'classcat'; import cc from 'classcat';
import { useStore, useStoreApi, useReactFlow, ReactFlowState, Panel } from '@rctflw/core'; import { useStore, useStoreApi, useReactFlow, ReactFlowState, Panel } from '@reactflow/core';
import PlusIcon from './Icons/Plus'; import PlusIcon from './Icons/Plus';
import MinusIcon from './Icons/Minus'; import MinusIcon from './Icons/Minus';
+1 -1
View File
@@ -1,5 +1,5 @@
import { ButtonHTMLAttributes, HTMLAttributes } from 'react'; import { ButtonHTMLAttributes, HTMLAttributes } from 'react';
import { FitViewOptions, PanelPosition } from '@rctflw/core'; import { FitViewOptions, PanelPosition } from '@reactflow/core';
export interface ControlProps extends HTMLAttributes<HTMLDivElement> { export interface ControlProps extends HTMLAttributes<HTMLDivElement> {
showZoom?: boolean; showZoom?: boolean;
+2 -2
View File
@@ -1,10 +1,10 @@
# @rctflw/core # @reactflow/core
Core components and util functions of React Flow. Core components and util functions of React Flow.
## Installation ## Installation
```sh ```sh
npm install @rctflw/core npm install @reactflow/core
``` ```
+7 -4
View File
@@ -1,5 +1,5 @@
{ {
"name": "@rctflw/core", "name": "@reactflow/core",
"version": "11.0.0-next.0", "version": "11.0.0-next.0",
"description": "Core components and util functions of React Flow.", "description": "Core components and util functions of React Flow.",
"keywords": [ "keywords": [
@@ -13,11 +13,14 @@
"files": [ "files": [
"dist" "dist"
], ],
"main": "dist/rctflw-core.cjs.js", "main": "dist/reactflow-core.cjs.js",
"module": "dist/rctflw-core.esm.js", "module": "dist/reactflow-core.esm.js",
"types": "dist/rctflw-core.cjs.d.ts", "types": "dist/reactflow-core.cjs.d.ts",
"sideEffects": false, "sideEffects": false,
"license": "MIT", "license": "MIT",
"publishConfig": {
"access": "public"
},
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/wbkd/react-flow.git", "url": "https://github.com/wbkd/react-flow.git",
+2 -1
View File
@@ -1,4 +1,4 @@
/* these are the necessary styles for React Flow */ /* these are the necessary styles for React Flow, they get used by base.css and style.css */
.react-flow__container { .react-flow__container {
position: absolute; position: absolute;
width: 100%; width: 100%;
@@ -138,6 +138,7 @@
&.connectable { &.connectable {
pointer-events: all; pointer-events: all;
cursor: crosshair;
} }
&-bottom { &-bottom {
+1 -1
View File
@@ -7,7 +7,7 @@ export const getDimensions = (node: HTMLDivElement): Dimensions => ({
export const clamp = (val: number, min = 0, max = 1): number => Math.min(Math.max(val, min), max); export const clamp = (val: number, min = 0, max = 1): number => Math.min(Math.max(val, min), max);
export const clampPosition = (position: XYPosition, extent: CoordinateExtent) => ({ export const clampPosition = (position: XYPosition = { x: 0, y: 0 }, extent: CoordinateExtent) => ({
x: clamp(position.x, extent[0][0], extent[1][0]), x: clamp(position.x, extent[0][0], extent[1][0]),
y: clamp(position.y, extent[0][1], extent[1][1]), y: clamp(position.y, extent[0][1], extent[1][1]),
}); });
+2 -2
View File
@@ -1,10 +1,10 @@
# @rctflw/minimap # @reactflow/minimap
Mini map component for React Flow. Mini map component for React Flow.
## Installation ## Installation
```sh ```sh
npm install @rctflw/minimap npm install @reactflow/minimap
``` ```
+8 -5
View File
@@ -1,5 +1,5 @@
{ {
"name": "@rctflw/minimap", "name": "@reactflow/minimap",
"version": "11.0.0-next.0", "version": "11.0.0-next.0",
"description": "Minimap component for React Flow.", "description": "Minimap component for React Flow.",
"keywords": [ "keywords": [
@@ -13,10 +13,13 @@
"files": [ "files": [
"dist" "dist"
], ],
"main": "dist/rctflw-minimap.cjs.js", "main": "dist/reactflow-minimap.cjs.js",
"module": "dist/rctflw-minimap.esm.js", "module": "dist/reactflow-minimap.esm.js",
"types": "dist/rctflw-minimap.cjs.d.ts", "types": "dist/reactflow-minimap.cjs.d.ts",
"sideEffects": false, "sideEffects": false,
"publishConfig": {
"access": "public"
},
"license": "MIT", "license": "MIT",
"repository": { "repository": {
"type": "git", "type": "git",
@@ -28,7 +31,7 @@
}, },
"dependencies": { "dependencies": {
"@babel/runtime": "^7.18.9", "@babel/runtime": "^7.18.9",
"@rctflw/core": "workspace:*", "@reactflow/core": "workspace:*",
"classcat": "^5.0.3", "classcat": "^5.0.3",
"zustand": "^4.0.0" "zustand": "^4.0.0"
}, },
+1 -1
View File
@@ -2,7 +2,7 @@
import { memo, useId } from 'react'; import { memo, useId } from 'react';
import cc from 'classcat'; import cc from 'classcat';
import shallow from 'zustand/shallow'; import shallow from 'zustand/shallow';
import { useStore, getRectOfNodes, ReactFlowState, Rect, Panel, getBoundsOfRects } from '@rctflw/core'; import { useStore, getRectOfNodes, ReactFlowState, Rect, Panel, getBoundsOfRects } from '@reactflow/core';
import MiniMapNode from './MiniMapNode'; import MiniMapNode from './MiniMapNode';
import { MiniMapProps, GetMiniMapNodeAttribute } from './types'; import { MiniMapProps, GetMiniMapNodeAttribute } from './types';
+1 -1
View File
@@ -1,6 +1,6 @@
/* eslint-disable @typescript-eslint/no-explicit-any */ /* eslint-disable @typescript-eslint/no-explicit-any */
import { HTMLAttributes } from 'react'; import { HTMLAttributes } from 'react';
import { Node, PanelPosition } from '@rctflw/core'; import { Node, PanelPosition } from '@reactflow/core';
export type GetMiniMapNodeAttribute<NodeData = any> = (node: Node<NodeData>) => string; export type GetMiniMapNodeAttribute<NodeData = any> = (node: Node<NodeData>) => string;
+5 -5
View File
@@ -1,6 +1,6 @@
{ {
"name": "reactflow", "name": "reactflow",
"version": "11.0.0-next.2", "version": "11.0.0-next.6",
"description": "A highly customizable React library for building node-based editors and interactive flow charts", "description": "A highly customizable React library for building node-based editors and interactive flow charts",
"keywords": [ "keywords": [
"react", "react",
@@ -28,10 +28,10 @@
}, },
"dependencies": { "dependencies": {
"@babel/runtime": "^7.18.9", "@babel/runtime": "^7.18.9",
"@rctflw/background": "workspace:*", "@reactflow/background": "workspace:*",
"@rctflw/controls": "workspace:*", "@reactflow/controls": "workspace:*",
"@rctflw/core": "workspace:*", "@reactflow/core": "workspace:*",
"@rctflw/minimap": "workspace:*" "@reactflow/minimap": "workspace:*"
}, },
"peerDependencies": { "peerDependencies": {
"react": ">=18", "react": ">=18",
+5 -7
View File
@@ -1,8 +1,6 @@
export * from '@rctflw/core'; export * from '@reactflow/core';
export * from '@rctflw/minimap'; export * from '@reactflow/minimap';
export * from '@rctflw/controls'; export * from '@reactflow/controls';
export * from '@rctflw/background'; export * from '@reactflow/background';
import { ReactFlow } from '@rctflw/core'; export { ReactFlow as default } from '@reactflow/core';
export default ReactFlow;
+15 -15
View File
@@ -2301,12 +2301,12 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"@rctflw/background@workspace:*, @rctflw/background@workspace:packages/background": "@reactflow/background@workspace:*, @reactflow/background@workspace:packages/background":
version: 0.0.0-use.local version: 0.0.0-use.local
resolution: "@rctflw/background@workspace:packages/background" resolution: "@reactflow/background@workspace:packages/background"
dependencies: dependencies:
"@babel/runtime": ^7.18.9 "@babel/runtime": ^7.18.9
"@rctflw/core": "workspace:*" "@reactflow/core": "workspace:*"
classcat: ^5.0.3 classcat: ^5.0.3
peerDependencies: peerDependencies:
react: ">=18" react: ">=18"
@@ -2314,12 +2314,12 @@ __metadata:
languageName: unknown languageName: unknown
linkType: soft linkType: soft
"@rctflw/controls@workspace:*, @rctflw/controls@workspace:packages/controls": "@reactflow/controls@workspace:*, @reactflow/controls@workspace:packages/controls":
version: 0.0.0-use.local version: 0.0.0-use.local
resolution: "@rctflw/controls@workspace:packages/controls" resolution: "@reactflow/controls@workspace:packages/controls"
dependencies: dependencies:
"@babel/runtime": ^7.18.9 "@babel/runtime": ^7.18.9
"@rctflw/core": "workspace:*" "@reactflow/core": "workspace:*"
autoprefixer: ^10.4.8 autoprefixer: ^10.4.8
classcat: ^5.0.3 classcat: ^5.0.3
postcss: ^8.4.16 postcss: ^8.4.16
@@ -2333,9 +2333,9 @@ __metadata:
languageName: unknown languageName: unknown
linkType: soft linkType: soft
"@rctflw/core@workspace:*, @rctflw/core@workspace:packages/core": "@reactflow/core@workspace:*, @reactflow/core@workspace:packages/core":
version: 0.0.0-use.local version: 0.0.0-use.local
resolution: "@rctflw/core@workspace:packages/core" resolution: "@reactflow/core@workspace:packages/core"
dependencies: dependencies:
"@babel/runtime": ^7.18.9 "@babel/runtime": ^7.18.9
"@types/d3": ^7.4.0 "@types/d3": ^7.4.0
@@ -2357,12 +2357,12 @@ __metadata:
languageName: unknown languageName: unknown
linkType: soft linkType: soft
"@rctflw/minimap@workspace:*, @rctflw/minimap@workspace:packages/minimap": "@reactflow/minimap@workspace:*, @reactflow/minimap@workspace:packages/minimap":
version: 0.0.0-use.local version: 0.0.0-use.local
resolution: "@rctflw/minimap@workspace:packages/minimap" resolution: "@reactflow/minimap@workspace:packages/minimap"
dependencies: dependencies:
"@babel/runtime": ^7.18.9 "@babel/runtime": ^7.18.9
"@rctflw/core": "workspace:*" "@reactflow/core": "workspace:*"
autoprefixer: ^10.4.8 autoprefixer: ^10.4.8
classcat: ^5.0.3 classcat: ^5.0.3
postcss: ^8.4.16 postcss: ^8.4.16
@@ -8520,10 +8520,10 @@ __metadata:
resolution: "reactflow@workspace:packages/reactflow" resolution: "reactflow@workspace:packages/reactflow"
dependencies: dependencies:
"@babel/runtime": ^7.18.9 "@babel/runtime": ^7.18.9
"@rctflw/background": "workspace:*" "@reactflow/background": "workspace:*"
"@rctflw/controls": "workspace:*" "@reactflow/controls": "workspace:*"
"@rctflw/core": "workspace:*" "@reactflow/core": "workspace:*"
"@rctflw/minimap": "workspace:*" "@reactflow/minimap": "workspace:*"
autoprefixer: ^10.4.8 autoprefixer: ^10.4.8
postcss: ^8.4.14 postcss: ^8.4.14
postcss-cli: ^10.0.0 postcss-cli: ^10.0.0