Skip to content

Commit

Permalink
fix: fix react node issues (antvis#5267)
Browse files Browse the repository at this point in the history
  • Loading branch information
Aarebecca authored and liujiangyu committed Mar 23, 2024
1 parent 9429516 commit 6f33ddb
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"build:pc": "cd ./packages/pc && npm run build",
"build:g6": "cd ./packages/g6 && npm run build",
"build:react-node": "cd ./packages/react-node && npm run build",
"build:all": "npm run build:core && npm run build:element && npm run build:plugin && npm run build:pc && npm run build:g6",
"build:all": "npm run build:core && npm run build:element && npm run build:plugin && npm run build:react-node && npm run build:pc && npm run build:g6",
"lint:core": "cd ./packages/core && npm run lint",
"lint:element": "cd ./packages/element && npm run lint",
"lint:plugin": "cd ./packages/plugin && npm run lint",
Expand Down
7 changes: 5 additions & 2 deletions packages/react-node/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@antv/g6-react-node",
"description": "Using React Component to Define Your G6 Graph Node",
"version": "1.4.6",
"version": "1.4.8",
"scripts": {
"start": "dumi dev",
"build": "father-build",
Expand Down Expand Up @@ -29,14 +29,17 @@
]
},
"dependencies": {
"@antv/g6-core": "workspace:*",
"@antv/g-base": "^0.5.1",
"@antv/g-canvas": "^0.5.2",
"@antv/g6-core": "workspace:*",
"@types/yoga-layout": "^1.9.3",
"react": "^16.12.0",
"yoga-layout-prebuilt": "^1.10.0"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^4.11.1",
"@umijs/test": "^3.0.5",
"csstype": "^3.1.3",
"dumi": "^1.1.1",
"father-build": "^1.17.2",
"gh-pages": "^3.0.0",
Expand Down
3 changes: 2 additions & 1 deletion packages/react-node/src/ReactNode/Shape/Text.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, { CSSProperties } from 'react';
import React from 'react';
import { CommonProps } from '../Group';
import { CommonShapeProps } from './common';
import type { Properties as CSSProperties } from 'csstype';

export interface TextStyle extends CommonShapeProps {
/**
Expand Down
20 changes: 10 additions & 10 deletions packages/react-node/src/ReactNode/Shape/common.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { LayoutAttrs } from '../../Layout/LayoutEnums';
import { CSSProperties } from 'react';
import type { Properties as CSSProperties } from 'csstype';

export interface GShapeProps extends Partial<LayoutAttrs> {
/**
Expand Down Expand Up @@ -103,12 +103,12 @@ export type GPath =
export type Arrow =
| boolean
| {
/**
* SVG path string of arrow
*/
path: string;
/**
* @description.en-US offset distance of the arrow
*/
d: number;
};
/**
* SVG path string of arrow
*/
path: string;
/**
* @description.en-US offset distance of the arrow
*/
d: number;
};
31 changes: 30 additions & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6f33ddb

Please sign in to comment.