diff --git a/.dumi/global.less b/.dumi/global.less index 5a72992..ca7810b 100644 --- a/.dumi/global.less +++ b/.dumi/global.less @@ -1,12 +1,10 @@ #root { background-color: rgb(248, 248, 250); .dumi-default-header { - background: rgb(255, 255, 255); box-shadow: rgba(0, 0, 0, 0.03) 0px 1px 2px 0px, rgba(0, 0, 0, 0.02) 0px 1px 6px -1px, rgba(0, 0, 0, 0.02) 0px 2px 4px 0px; - border-bottom: 1px solid rgb(240, 240, 240); } .dumi-default-header-left { width: 300px; diff --git a/.dumi/theme/builtins/IconSearch/IconSearch.tsx b/.dumi/theme/builtins/IconSearch/IconSearch.tsx index bfab1ea..7a735f0 100644 --- a/.dumi/theme/builtins/IconSearch/IconSearch.tsx +++ b/.dumi/theme/builtins/IconSearch/IconSearch.tsx @@ -4,7 +4,7 @@ import AntdIcon from '@ant-design/icons'; import { Affix, Empty, Grid, Input, Segmented, type SegmentedProps } from 'antd'; import { createStyles, useTheme } from 'antd-style'; import { useIntl } from 'dumi'; -import debounce from 'lodash/debounce'; +import { debounce } from 'lodash-es'; import Category from './Category'; import { categories, CategoriesKeys } from './fields'; diff --git a/package.json b/package.json index 7243a9e..4dfb792 100644 --- a/package.json +++ b/package.json @@ -47,12 +47,12 @@ "devDependencies": { "@aelf-design/common": "workspace:*", "@aelf-design/internal-icons": "workspace:*", + "aelf-design": "workspace:*", "@ant-design/icons": "^5.2.6", "@babel/parser": "^7.24.0", "@biomejs/biome": "^1.4.1", "@changesets/changelog-git": "^0.2.0", "@changesets/cli": "^2.27.1", - "@dr.pogodin/babel-preset-svgr": "^1.8.0", "@ianvs/prettier-plugin-sort-imports": "^4.1.1", "@svgr/babel-plugin-transform-svg-component": "^8.0.0", "@svgr/babel-preset": "^8.1.0", @@ -70,12 +70,9 @@ "@typescript-eslint/parser": "^7.1.1", "@umijs/fabric": "^4.0.1", "@vitest/coverage-v8": "^1.1.0", - "aelf-design": "workspace:*", "antd": "^5.13.2", "antd-style": "^3.6.1", - "babel-plugin-add-import-extension": "^1.6.0", "babel-plugin-inline-react-svg-v2": "^2.0.2", - "babel-plugin-react-svg": "^3.0.3", "classnames": "^2.3.2", "dumi": "^2.2.17", "eslint": "^8.56.0", @@ -84,12 +81,11 @@ "eslint-plugin-react": "^7.34.0", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-unused-imports": "^3.0.0", - "ethers": "^6.9.1", "father": "^4.3.8", "husky": "^8.0.3", "jsdom": "^23.0.1", "lint-staged": "^15.2.0", - "lodash": "^4.17.21", + "lodash-es": "^4.17.21", "prettier": "^3.1.1", "rc-util": "^5.38.1", "react": "^18.2.0", diff --git a/packages/common/tsconfig.json b/packages/common/tsconfig.json index 2877451..564a599 100644 --- a/packages/common/tsconfig.json +++ b/packages/common/tsconfig.json @@ -1,4 +1,4 @@ { "extends": "../../tsconfig.base.json", - "include": ["src", "global.d.ts", "../ethereum/src/wallets"] + "include": ["src"] } diff --git a/packages/component/package.json b/packages/component/package.json index d03eadd..9ab1c10 100755 --- a/packages/component/package.json +++ b/packages/component/package.json @@ -48,7 +48,8 @@ "copy-to-clipboard": "^3.3.3", "swiper": "^11.0.5", "dayjs": "^1.11.10", - "ahooks": "^3.7.10" + "ahooks": "^3.7.10", + "lodash-es": "^4.17.21" }, "devDependencies": { "@types/react": "^18.2.45", diff --git a/packages/component/src/Button/index.tsx b/packages/component/src/Button/index.tsx index 451c293..b92cd53 100644 --- a/packages/component/src/Button/index.tsx +++ b/packages/component/src/Button/index.tsx @@ -1,6 +1,6 @@ import React, { MouseEvent } from 'react'; import { Button as AntdButton, ButtonProps } from 'antd'; -import { debounce } from 'lodash'; +import { debounce } from 'lodash-es'; import useStyles from './style'; diff --git a/packages/component/src/Pagination/index.tsx b/packages/component/src/Pagination/index.tsx index 78b558a..37be75a 100644 --- a/packages/component/src/Pagination/index.tsx +++ b/packages/component/src/Pagination/index.tsx @@ -1,7 +1,7 @@ import React, { useEffect, useMemo, useState } from 'react'; import { DownArrowIcon, LeftArrowIcon, RightArrowIcon } from '@aelf-design/internal-icons'; import { Select } from 'antd'; -import { debounce } from 'lodash'; +import { debounce } from 'lodash-es'; import Button from '../Button'; import useStyles from './style'; diff --git a/packages/component/tsconfig.json b/packages/component/tsconfig.json index 84a04f6..f19d80b 100644 --- a/packages/component/tsconfig.json +++ b/packages/component/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../tsconfig.base.json", - "include": ["src/", "global.d.ts"], - "exclude": ["src/**/*/demos/"], + "include": ["src", "global.d.ts"], "compilerOptions": { "outDir": "dist" } diff --git a/packages/internal-icons/src/__tests__/iconTest.tsx b/packages/internal-icons/src/__tests__/iconTest.tsx index 6c8d6c4..5858db9 100644 --- a/packages/internal-icons/src/__tests__/iconTest.tsx +++ b/packages/internal-icons/src/__tests__/iconTest.tsx @@ -1,5 +1,5 @@ import path from 'path'; -import { type ComponentType } from 'react'; +import React, { type ComponentType } from 'react'; import { globSync } from 'glob'; export async function getComponents(dir: string): Promise { diff --git a/packages/internal-icons/src/__tests__/index.test.tsx b/packages/internal-icons/src/__tests__/index.test.tsx index ff16b24..affecf1 100644 --- a/packages/internal-icons/src/__tests__/index.test.tsx +++ b/packages/internal-icons/src/__tests__/index.test.tsx @@ -1,3 +1,4 @@ +import React from 'react'; import { render } from '@testing-library/react'; import { describe, expect, it } from 'vitest'; diff --git a/packages/internal-icons/src/global.d.ts b/packages/internal-icons/src/global.d.ts deleted file mode 100644 index bff9471..0000000 --- a/packages/internal-icons/src/global.d.ts +++ /dev/null @@ -1 +0,0 @@ -declare module '*.svg'; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8182aff..294a992 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -29,9 +29,6 @@ importers: '@changesets/cli': specifier: ^2.27.1 version: 2.27.1 - '@dr.pogodin/babel-preset-svgr': - specifier: ^1.8.0 - version: 1.8.0(@babel/parser@7.24.0)(typescript@5.3.3) '@ianvs/prettier-plugin-sort-imports': specifier: ^4.1.1 version: 4.1.1(prettier@3.2.5) @@ -92,15 +89,9 @@ importers: antd-style: specifier: ^3.6.1 version: 3.6.1(@types/react@18.2.61)(antd@5.14.2)(react-dom@18.2.0)(react@18.2.0) - babel-plugin-add-import-extension: - specifier: ^1.6.0 - version: 1.6.0(@babel/core@7.24.0) babel-plugin-inline-react-svg-v2: specifier: ^2.0.2 version: 2.0.2(@babel/core@7.24.0) - babel-plugin-react-svg: - specifier: ^3.0.3 - version: 3.0.3(@babel/plugin-syntax-jsx@7.23.3) classnames: specifier: ^2.3.2 version: 2.5.1 @@ -125,9 +116,6 @@ importers: eslint-plugin-unused-imports: specifier: ^3.0.0 version: 3.1.0(@typescript-eslint/eslint-plugin@7.1.1)(eslint@8.57.0) - ethers: - specifier: ^6.9.1 - version: 6.11.1 father: specifier: ^4.3.8 version: 4.4.0(@babel/core@7.24.0)(@types/node@20.11.24)(styled-components@6.1.8)(webpack@5.90.3) @@ -140,7 +128,7 @@ importers: lint-staged: specifier: ^15.2.0 version: 15.2.2 - lodash: + lodash-es: specifier: ^4.17.21 version: 4.17.21 prettier: @@ -231,6 +219,9 @@ importers: dayjs: specifier: ^1.11.10 version: 1.11.10 + lodash-es: + specifier: ^4.17.21 + version: 4.17.21 react: specifier: '>=17.0.0' version: 18.2.0 @@ -323,10 +314,6 @@ packages: resolution: {integrity: sha512-nA9XHtlAkYfJxY7bce8DcN7eKxWWCWkU+1GR9d+U6MbNpfwQp8TI7vqOsBsMcHoT4mBu2kypKoSKnghEzOOq5Q==} dev: true - /@adraffy/ens-normalize@1.10.1: - resolution: {integrity: sha512-96Z2IP3mYmF1Xg2cDm8f1gWGf/HUVedQ3FMifV4kG/PQ4yEP51xDtRAEfhVNt5f/uzpNkZHwWQuUcu6D6K+Ekw==} - dev: true - /@ampproject/remapping@2.2.1: resolution: {integrity: sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==} engines: {node: '>=6.0.0'} @@ -2965,21 +2952,6 @@ packages: engines: {node: '>=14'} dev: false - /@dr.pogodin/babel-preset-svgr@1.8.0(@babel/parser@7.24.0)(typescript@5.3.3): - resolution: {integrity: sha512-Bn7vv9gqSdMNgOjliLtGkpu5eg4+GVtzcDKA43TAzroDv2/O0EkDWX3kb5NZmk550R0TWQmxiVFDYgHgioBvJQ==} - peerDependencies: - '@babel/parser': ^7.22.10 - dependencies: - '@babel/parser': 7.24.0 - '@svgr/core': 8.1.0(typescript@5.3.3) - '@svgr/plugin-jsx': 8.1.0(@svgr/core@8.1.0) - '@svgr/plugin-prettier': 8.1.0(@svgr/core@8.1.0) - '@svgr/plugin-svgo': 8.1.0(@svgr/core@8.1.0)(typescript@5.3.3) - transitivePeerDependencies: - - supports-color - - typescript - dev: true - /@emotion/babel-plugin@11.11.0: resolution: {integrity: sha512-m4HEDZleaaCH+XgDDsPF15Ht6wTLsgDTeR3WYj9Q/k76JtWhrJjcP4+/XlG8LGT/Rol9qUfOIztXeA84ATpqPQ==} dependencies: @@ -5628,10 +5600,6 @@ packages: resolution: {integrity: sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==} dev: true - /@types/node@18.15.13: - resolution: {integrity: sha512-N+0kuo9KgrUQ1Sn/ifDXsvg0TTleP7rIy4zOBGECxAljqvqfqpTfzx0Q1NUedOixRMBfe2Whhb056a42cWs26Q==} - dev: true - /@types/node@20.11.24: resolution: {integrity: sha512-Kza43ewS3xoLgCEpQrsT+xRo/EJej1y0kVYGiLFE1NEODXGzTfwiC6tXTLMQskn1X4/Rjlh0MQUvx9W+L9long==} dependencies: @@ -6735,10 +6703,6 @@ packages: hasBin: true dev: true - /aes-js@4.0.0-beta.5: - resolution: {integrity: sha512-G965FqalsNyrPqgEGON7nIx1e/OVENSgiEIzyC63haUMuvNnwIgIjMs52hlTCKhkBny7A2ORNlfY9Zu+jmGk1Q==} - dev: true - /agent-base@4.3.0: resolution: {integrity: sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg==} engines: {node: '>= 4.0.0'} @@ -7256,15 +7220,6 @@ packages: - supports-color dev: true - /babel-plugin-add-import-extension@1.6.0(@babel/core@7.24.0): - resolution: {integrity: sha512-JVSQPMzNzN/S4wPRoKQ7+u8PlkV//BPUMnfWVbr63zcE+6yHdU2Mblz10Vf7qe+6Rmu4svF5jG7JxdcPi9VvKg==} - peerDependencies: - '@babel/core': '>=7.0.0' - dependencies: - '@babel/core': 7.24.0 - '@babel/helper-plugin-utils': 7.24.0 - dev: true - /babel-plugin-dynamic-import-node@2.3.3: resolution: {integrity: sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ==} dependencies: @@ -7364,15 +7319,6 @@ packages: - supports-color dev: true - /babel-plugin-react-svg@3.0.3(@babel/plugin-syntax-jsx@7.23.3): - resolution: {integrity: sha512-Pst1RWjUIiV0Ykv1ODSeceCBsFOP2Y4dusjq7/XkjuzJdvS9CjpkPMUIoO4MLlvp5PiLCeMlsOC7faEUA0gm3Q==} - engines: {node: '>=8'} - peerDependencies: - '@babel/plugin-syntax-jsx': ^7.2.0 - dependencies: - '@babel/plugin-syntax-jsx': 7.23.3(@babel/core@7.24.0) - dev: true - /babel-plugin-styled-components@2.1.4(@babel/core@7.24.0)(styled-components@6.1.8): resolution: {integrity: sha512-Xgp9g+A/cG47sUyRwwYxGM4bR/jDRg5N6it/8+HxCnbT5XNKSKDT9xm4oag/osgqjC2It/vH0yXsomOG6k558g==} peerDependencies: @@ -9810,22 +9756,6 @@ packages: engines: {node: '>=0.10.0'} dev: true - /ethers@6.11.1: - resolution: {integrity: sha512-mxTAE6wqJQAbp5QAe/+o+rXOID7Nw91OZXvgpjDa1r4fAbq2Nu314oEZSbjoRLacuCzs7kUC3clEvkCQowffGg==} - engines: {node: '>=14.0.0'} - dependencies: - '@adraffy/ens-normalize': 1.10.1 - '@noble/curves': 1.2.0 - '@noble/hashes': 1.3.2 - '@types/node': 18.15.13 - aes-js: 4.0.0-beta.5 - tslib: 2.4.0 - ws: 8.5.0 - transitivePeerDependencies: - - bufferutil - - utf-8-validate - dev: true - /eventemitter3@2.0.3: resolution: {integrity: sha512-jLN68Dx5kyFHaePoXWPsCGW5qdyZQtLYHkxkg02/Mz6g0kYpDx4FyP6XfArhQdlOC4b8Mv+EMxPo/8La7Tzghg==} dev: true @@ -12391,6 +12321,9 @@ packages: p-locate: 5.0.0 dev: true + /lodash-es@4.17.21: + resolution: {integrity: sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==} + /lodash.debounce@4.0.8: resolution: {integrity: sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==} dev: true @@ -17569,10 +17502,6 @@ packages: resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} dev: true - /tslib@2.4.0: - resolution: {integrity: sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==} - dev: true - /tslib@2.5.0: resolution: {integrity: sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==} dev: true @@ -18622,19 +18551,6 @@ packages: optional: true dev: true - /ws@8.5.0: - resolution: {integrity: sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==} - engines: {node: '>=10.0.0'} - peerDependencies: - bufferutil: ^4.0.1 - utf-8-validate: ^5.0.2 - peerDependenciesMeta: - bufferutil: - optional: true - utf-8-validate: - optional: true - dev: true - /xdg-basedir@3.0.0: resolution: {integrity: sha512-1Dly4xqlulvPD3fZUQJLY+FUIeqN3N2MM3uqe4rCJftAvOjFa3jFGfctOgluGx4ahPbUCsZkmJILiP0Vi4T6lQ==} engines: {node: '>=4'} diff --git a/tsconfig.json b/tsconfig.json index 90b458a..aa153d7 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,5 +1,4 @@ { "extends": "./tsconfig.base.json", - "include": ["./packages/component/src/**/*", ".dumirc.ts"], - "exclude": ["./docs/**/*", "./packages/component/src/**/*/demos/"] + "include": ["/packages/**/*", ".dumirc.ts"] }