From 135f0f1f91f983552ef03e05f01e471eb61f6cde Mon Sep 17 00:00:00 2001 From: canisminor1990 Date: Tue, 7 Jan 2025 22:27:31 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20Update=20remark?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .dumirc.ts | 2 +- .github/workflows/pkg.pr.new.yml | 31 +++++++++++++++++++ package.json | 15 +++++---- src/BarList/styles.ts | 2 +- src/Legend/LegendItem.tsx | 4 +-- src/ScatterChart/ScatterChartTooltip.tsx | 2 +- src/common/ChartTooltip/ChartTooltipFrame.tsx | 3 +- src/common/ChartTooltip/index.tsx | 2 +- src/utils/theme.ts | 18 ----------- 9 files changed, 46 insertions(+), 33 deletions(-) create mode 100644 .github/workflows/pkg.pr.new.yml diff --git a/.dumirc.ts b/.dumirc.ts index 06c3547..359846f 100644 --- a/.dumirc.ts +++ b/.dumirc.ts @@ -77,7 +77,7 @@ export default defineConfig({ favicons: ['https://lobehub.com/favicon.ico'], jsMinifier: 'swc', locales: [{ id: 'en-US', name: 'English' }], - mako: {}, + mako: isWin ? false : {}, mfsu: isWin ? undefined : {}, npmClient: 'pnpm', publicPath: '/', diff --git a/.github/workflows/pkg.pr.new.yml b/.github/workflows/pkg.pr.new.yml new file mode 100644 index 0000000..86238ae --- /dev/null +++ b/.github/workflows/pkg.pr.new.yml @@ -0,0 +1,31 @@ +name: Pkg Pr New CI +on: + pull_request: + push: + branches: + - '!main' + +jobs: + release: + name: Release + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Install bun + uses: oven-sh/setup-bun@v2 + + - name: Install deps + run: bun i + + - name: CI + run: bun run ci + + - name: Test + run: bun run test + + - name: Build + run: bun run build + + - name: Release + run: bunx pkg-pr-new publish diff --git a/package.json b/package.json index 442c5f4..ce2b62e 100644 --- a/package.json +++ b/package.json @@ -70,7 +70,7 @@ ] }, "dependencies": { - "@lobehub/ui": "^1.161.0", + "@lobehub/ui": "^1.162.0", "ahooks": "^3.8.4", "antd-style": "^3.7.1", "chroma-js": "^3.1.2", @@ -84,9 +84,9 @@ "devDependencies": { "@commitlint/cli": "^19.6.1", "@icons-pack/react-simple-icons": "^9.7.0", - "@lobehub/lint": "^1.24.4", - "@testing-library/react": "^14.3.1", - "@types/chroma-js": "^2.4.5", + "@lobehub/lint": "^1.25.3", + "@testing-library/react": "^16.1.0", + "@types/chroma-js": "^3.1.0", "@types/pangu": "^4.0.2", "@types/react": "^19.0.3", "@types/react-dom": "^19.0.2", @@ -94,7 +94,6 @@ "babel-plugin-antd-style": "^1.0.4", "clean-package": "^2.2.0", "commitlint": "^19.6.1", - "concurrently": "^8.2.2", "cross-env": "^7.0.3", "dpdm": "^3.14.0", "dumi": "^2.4.17", @@ -102,13 +101,13 @@ "eslint": "^8.57.1", "father": "^4.5.1", "husky": "^9.1.7", - "jsdom": "^23.2.0", + "jsdom": "^25.0.1", "lint-staged": "^15.3.0", "prettier": "^3.4.2", "react": "^19.0.0", "react-dom": "^19.0.0", - "remark": "^14.0.3", - "remark-cli": "^11.0.0", + "remark": "^15.0.1", + "remark-cli": "^12.0.1", "semantic-release": "^21.1.2", "stylelint": "^15.11.0", "typescript": "^5.7.2", diff --git a/src/BarList/styles.ts b/src/BarList/styles.ts index 9103b55..3b29dfa 100644 --- a/src/BarList/styles.ts +++ b/src/BarList/styles.ts @@ -9,9 +9,9 @@ export const useStyles = createStyles(({ prefixCls, css, token }) => ({ max-width: 100%; height: 100%; + border-radius: ${token.borderRadius}px; opacity: 0.25; - border-radius: ${token.borderRadius}px; transition: all 0.25s ${token.motionEaseInOut}; `, diff --git a/src/Legend/LegendItem.tsx b/src/Legend/LegendItem.tsx index 306068b..3aa7016 100644 --- a/src/Legend/LegendItem.tsx +++ b/src/Legend/LegendItem.tsx @@ -10,10 +10,10 @@ const useStyles = createStyles(({ css, token }) => ({ display: inline-flex; align-items: center; + border-radius: ${token.borderRadius}px; + color: ${token.colorTextDescription}; white-space: nowrap; - - border-radius: ${token.borderRadius}px; `, hasOnValueChange: css` transition: all 0.25s ${token.motionEaseInOut}; diff --git a/src/ScatterChart/ScatterChartTooltip.tsx b/src/ScatterChart/ScatterChartTooltip.tsx index 2d4193b..e2ec261 100644 --- a/src/ScatterChart/ScatterChartTooltip.tsx +++ b/src/ScatterChart/ScatterChartTooltip.tsx @@ -13,8 +13,8 @@ import ScatterChartTooltipRow from './ScatterChartTooltipRow'; const useStyles = createStyles(({ css, token }) => ({ header: css` - font-weight: 500; border-bottom: 1px solid ${token.colorBorderSecondary}; + font-weight: 500; `, })); diff --git a/src/common/ChartTooltip/ChartTooltipFrame.tsx b/src/common/ChartTooltip/ChartTooltipFrame.tsx index 330a6d9..8f2f3f2 100644 --- a/src/common/ChartTooltip/ChartTooltipFrame.tsx +++ b/src/common/ChartTooltip/ChartTooltipFrame.tsx @@ -6,9 +6,10 @@ export const useStyles = createStyles(({ css, token }) => ({ container: css` overflow: hidden; - background: ${token.colorBgElevated}; border: 1px solid ${token.colorBorderSecondary}; border-radius: ${token.borderRadiusLG}px; + + background: ${token.colorBgElevated}; box-shadow: ${token.boxShadow}; `, })); diff --git a/src/common/ChartTooltip/index.tsx b/src/common/ChartTooltip/index.tsx index 0b0cfac..cb40cb7 100644 --- a/src/common/ChartTooltip/index.tsx +++ b/src/common/ChartTooltip/index.tsx @@ -10,8 +10,8 @@ import ChartTooltipRow from './ChartTooltipRow'; const useStyles = createStyles(({ css, token }) => ({ header: css` - font-weight: 500; border-bottom: 1px solid ${token.colorBorderSecondary}; + font-weight: 500; `, })); diff --git a/src/utils/theme.ts b/src/utils/theme.ts index 91f2d0b..00ef2c1 100644 --- a/src/utils/theme.ts +++ b/src/utils/theme.ts @@ -47,21 +47,3 @@ export function createTheme(input?: string[], size: number = 5): string[] { return defaultTheme; } - -export const convertAlphaToSolid = (foreground: string, background: string): string => { - const fgColor = chroma(foreground); - const bgColor = chroma(background); - - const alpha = fgColor.alpha(); - const alphaComplement = 1 - alpha; - - const mixedColor = [ - fgColor.get('rgb.r') * alpha + bgColor.get('rgb.r') * alphaComplement, - fgColor.get('rgb.g') * alpha + bgColor.get('rgb.g') * alphaComplement, - fgColor.get('rgb.b') * alpha + bgColor.get('rgb.b') * alphaComplement, - ]; - - const resultColor = chroma(mixedColor); - - return resultColor.hex(); -};