From d10c73873c2c7ce8d12488ca45becc90ce54b1a6 Mon Sep 17 00:00:00 2001 From: xiaoluoHe Date: Fri, 7 Jun 2024 17:01:04 +0800 Subject: [PATCH 01/16] feat: add demo site component --- common/config/rush/pnpm-config.json | 1 + common/config/rush/pnpm-lock.yaml | 236 ++-- .../vchart-theme-demo-component/.eslintrc.js | 19 + .../vchart-theme-demo-component/README.md | 11 + .../bundler.config.js | 7 + .../vchart-theme-demo-component/package.json | 48 + .../src/global.d.ts | 1 + .../vchart-theme-demo-component/src/index.jsx | 2 + .../src/interface.ts | 8 + .../src/vchart-chart-hub-theme/chart-list.ts | 74 + .../src/vchart-chart-hub-theme/chartSpec.ts | 1253 +++++++++++++++++ .../src/vchart-chart-hub-theme/charts.jsx | 45 + .../createServiceWorker.js | 52 + .../src/vchart-chart-hub-theme/frame.jsx | 43 + .../src/vchart-chart-hub-theme/index.jsx | 1 + .../vchart-chart-hub-theme/index.module.less | 129 ++ .../src/vchart-chart-hub-theme/normalize.css | 128 ++ .../tsconfig.eslint.json | 10 + .../vchart-theme-demo-component/tsconfig.json | 10 + .../vite/index.html | 13 + .../vite/public/vite.svg | 1 + .../vite/src/App.tsx | 18 + .../vite/src/index.less | 31 + .../vite/src/index.tsx | 5 + .../vite/src/vite-env.d.ts | 1 + .../vite/tsconfig.json | 26 + .../vite/tsconfig.node.json | 10 + .../vite/vite.config.ts | 7 + rush.json | 12 +- 29 files changed, 2058 insertions(+), 144 deletions(-) create mode 100644 packages/vchart-theme-demo-component/.eslintrc.js create mode 100644 packages/vchart-theme-demo-component/README.md create mode 100644 packages/vchart-theme-demo-component/bundler.config.js create mode 100644 packages/vchart-theme-demo-component/package.json create mode 100644 packages/vchart-theme-demo-component/src/global.d.ts create mode 100644 packages/vchart-theme-demo-component/src/index.jsx create mode 100644 packages/vchart-theme-demo-component/src/interface.ts create mode 100644 packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/chart-list.ts create mode 100644 packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/chartSpec.ts create mode 100644 packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/charts.jsx create mode 100644 packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/createServiceWorker.js create mode 100644 packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/frame.jsx create mode 100644 packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/index.jsx create mode 100644 packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/index.module.less create mode 100644 packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/normalize.css create mode 100644 packages/vchart-theme-demo-component/tsconfig.eslint.json create mode 100644 packages/vchart-theme-demo-component/tsconfig.json create mode 100644 packages/vchart-theme-demo-component/vite/index.html create mode 100644 packages/vchart-theme-demo-component/vite/public/vite.svg create mode 100644 packages/vchart-theme-demo-component/vite/src/App.tsx create mode 100644 packages/vchart-theme-demo-component/vite/src/index.less create mode 100644 packages/vchart-theme-demo-component/vite/src/index.tsx create mode 100644 packages/vchart-theme-demo-component/vite/src/vite-env.d.ts create mode 100644 packages/vchart-theme-demo-component/vite/tsconfig.json create mode 100644 packages/vchart-theme-demo-component/vite/tsconfig.node.json create mode 100644 packages/vchart-theme-demo-component/vite/vite.config.ts diff --git a/common/config/rush/pnpm-config.json b/common/config/rush/pnpm-config.json index ca3a5c8..f8940a5 100644 --- a/common/config/rush/pnpm-config.json +++ b/common/config/rush/pnpm-config.json @@ -89,6 +89,7 @@ * PNPM documentation: https://pnpm.io/package_json#pnpmoverrides */ "globalOverrides": { + "@visactor/vchart-theme":"1.11.1-alpha.2" // "example1": "^1.0.0", // "example2": "npm:@company/example2@^1.0.0" }, diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 53fde5f..b29af62 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -1,5 +1,8 @@ lockfileVersion: 5.4 +overrides: + '@visactor/vchart-theme': 1.11.1-alpha.2 + importers: .: @@ -293,6 +296,53 @@ importers: typescript: 4.9.5 vite: 4.5.3_@types+node@20.12.7 + ../../packages/vchart-theme-demo-component: + specifiers: + '@arco-design/web-react': ^2.32.2 + '@douyinfe/semi-icons': latest + '@douyinfe/semi-icons-lab': latest + '@douyinfe/semi-ui': ^2.51.3 + '@internal/bundler': workspace:* + '@internal/eslint-config': workspace:* + '@internal/ts-config': workspace:* + '@rushstack/eslint-patch': ~1.1.4 + '@types/react': ^17.0.0 + '@types/react-dom': ^17.0.0 + '@visactor/react-vchart': 1.11.0 + '@visactor/vchart': 1.11.0 + '@visactor/vchart-theme': 1.11.1-alpha.2 + '@visactor/vchart-theme-utils': workspace:1.11.0 + '@vitejs/plugin-react': ^4.1.1 + eslint: ~8.18.0 + react: ^18.0.0 + react-device-detect: ^2.2.2 + react-dom: ^18.0.0 + typescript: 4.9.5 + vite: ^4.5.0 + dependencies: + '@arco-design/web-react': 2.61.2_42iwexueogtmu5amowprdpoisy + '@douyinfe/semi-icons': 2.59.1_react@18.2.0 + '@douyinfe/semi-icons-lab': 2.59.1_biqbaboplfbrettd7655fr4n2y + '@douyinfe/semi-ui': 2.55.5_biqbaboplfbrettd7655fr4n2y + '@visactor/react-vchart': 1.11.0_biqbaboplfbrettd7655fr4n2y + '@visactor/vchart': 1.11.0 + '@visactor/vchart-theme': 1.11.1-alpha.2_@visactor+vchart@1.11.0 + '@visactor/vchart-theme-utils': link:../vchart-theme-utils + devDependencies: + '@internal/bundler': link:../../tools/bundler + '@internal/eslint-config': link:../../share/eslint-config + '@internal/ts-config': link:../../share/ts-config + '@rushstack/eslint-patch': 1.1.4 + '@types/react': 17.0.80 + '@types/react-dom': 17.0.25 + '@vitejs/plugin-react': 4.2.1_vite@4.5.3 + eslint: 8.18.0 + react: 18.2.0 + react-device-detect: 2.2.3_biqbaboplfbrettd7655fr4n2y + react-dom: 18.2.0_react@18.2.0 + typescript: 4.9.5 + vite: 4.5.3 + ../../packages/vchart-theme-utils: specifiers: '@internal/bundler': workspace:* @@ -826,7 +876,6 @@ packages: resolution: {integrity: sha512-s7p9MSwJgHeL8DwcATaXvWT3m2SigKpxx4JA1BGPHL4gfvaQsmQfrLBDpjOJFJuJ2jG2dMt3R3P8Pm9E65q18g==} dependencies: color: 3.2.1 - dev: true /@arco-design/web-react/2.61.2_42iwexueogtmu5amowprdpoisy: resolution: {integrity: sha512-YroNHRESaffGwkJ5jCgVCAsLeKhIB+Nky4tmHr1/FruTdGEjERNaxagvj8yCgBTpunwJdbxU6OXlzYwW1IfBeQ==} @@ -852,7 +901,6 @@ packages: shallowequal: 1.1.0 transitivePeerDependencies: - '@types/react' - dev: true /@arco-design/webpack-plugin/1.7.0: resolution: {integrity: sha512-dRDXaNK9pzjTfxo6jQe2oZs9PLJIF6kovT5HJCM843XgdClSyvVvlZo+xtzK84Y+VRL+YE4zUt3Jb+3AEp5gqA==} @@ -2144,7 +2192,6 @@ packages: dependencies: react: 18.2.0 tslib: 2.3.1 - dev: true /@dnd-kit/core/6.1.0_biqbaboplfbrettd7655fr4n2y: resolution: {integrity: sha512-J3cQBClB4TVxwGo3KEjssGEXNJqGVWx17aRTZ1ob0FliR5IjYgTxl5YJbKTzA6IzrtelotH19v6y7uoIRUZPSg==} @@ -2157,7 +2204,6 @@ packages: react: 18.2.0 react-dom: 18.2.0_react@18.2.0 tslib: 2.3.1 - dev: true /@dnd-kit/sortable/7.0.2_sm3txfnl76aqlmpp73hvpv5hze: resolution: {integrity: sha512-wDkBHHf9iCi1veM834Gbk1429bd4lHX4RpAwT0y2cHLf246GAvU2sVw/oxWNpPKQNQRQaeGXhAVgrOl1IT+iyA==} @@ -2169,7 +2215,6 @@ packages: '@dnd-kit/utilities': 3.2.2_react@18.2.0 react: 18.2.0 tslib: 2.3.1 - dev: true /@dnd-kit/utilities/3.2.2_react@18.2.0: resolution: {integrity: sha512-+MKAJEOfaBe5SmV6t34p80MMKhjvUz0vRrvVJbPT0WElzaOJ/1xs+D+KDv+tD/NE5ujfrChEcshd4fLn0wpiqg==} @@ -2178,7 +2223,6 @@ packages: dependencies: react: 18.2.0 tslib: 2.3.1 - dev: true /@douyinfe/semi-animation-react/2.55.5: resolution: {integrity: sha512-PDN88GHgnAizae1LJx5YPtNqG+l3qjRchFsPPvTQZ8NuohXzacL7MsB0BAJBcAAypC4lFpSK6MGceSDoPzzHsQ==} @@ -2186,17 +2230,14 @@ packages: '@douyinfe/semi-animation': 2.55.5 '@douyinfe/semi-animation-styled': 2.55.5 classnames: 2.5.1 - dev: true /@douyinfe/semi-animation-styled/2.55.5: resolution: {integrity: sha512-rA4IWeVCJdbX8dcCC4n7XTbysDfGptksaMuKfeUaLbSoiXCPPZRrA2rNIBVlioQ1cUSCojsw8tmp1wGnMazFWg==} - dev: true /@douyinfe/semi-animation/2.55.5: resolution: {integrity: sha512-bKosskhnjteDhZpMpugxAhswo0LrnXebqaC9L80JunNxKa47i9t66JVGEzEvdcDRh9sBMKE0CuHt8pGR2Qsz0Q==} dependencies: bezier-easing: 2.1.0 - dev: true /@douyinfe/semi-foundation/2.55.5: resolution: {integrity: sha512-4qKlpqd9eANnlRsp1uMsFp1yPmjjjsYza03Gknp5YtoeHz4BpdmlPt3kqtvwJgSmvupJcjd/DRg92JY4JDmRxg==} @@ -2210,7 +2251,6 @@ packages: lodash: 4.17.21 memoize-one: 5.2.1 scroll-into-view-if-needed: 2.2.31 - dev: true /@douyinfe/semi-icons-lab/2.60.0_biqbaboplfbrettd7655fr4n2y: resolution: {integrity: sha512-tt+LQREg7FQbgz7NWOKyfiOO4ssR1KxziCNkB+Ko0bMXucZYQx3Totbjon8qS59xi26ovzbsLKc/wDwvr6Ao+A==} @@ -2220,7 +2260,6 @@ packages: dependencies: react: 18.2.0 react-dom: 18.2.0_react@18.2.0 - dev: true /@douyinfe/semi-icons/2.55.5_react@18.2.0: resolution: {integrity: sha512-y3gbo5yiDxWdk0rRgWWktilS2/pcDUoldozoAeEuUhCWl8rTw0qJ622lTaUcD3AggK7t8K+hMPLdxoT9lpsI0Q==} @@ -2229,7 +2268,6 @@ packages: dependencies: classnames: 2.5.1 react: 18.2.0 - dev: true /@douyinfe/semi-icons/2.60.0_react@18.2.0: resolution: {integrity: sha512-+Rz6o+4k3wO1vRQee/RhPjM04+8fTScLcMYYC5tT+TRgzWO82aOGZKPtJTW45T+iM+oDOnS9/FB2xQj2sPEnIw==} @@ -2238,7 +2276,6 @@ packages: dependencies: classnames: 2.5.1 react: 18.2.0 - dev: true /@douyinfe/semi-illustrations/2.55.5_react@18.2.0: resolution: {integrity: sha512-FlvdJWx0oQezRzzFetR0fSodA8PwAekkwg0pS+PC8+O3znO7MVXbN0E9XwCNZ0w5zW3/rObPqGCadXj1ynUIkg==} @@ -2246,13 +2283,11 @@ packages: react: ^16.8.0 || ^17.0.0 || ^18.0.0 dependencies: react: 18.2.0 - dev: true /@douyinfe/semi-theme-default/2.55.5: resolution: {integrity: sha512-XSa2FmvNUxxDXymWc1EbsImSXKKl+3xt37PAFnhm/UDdZvTizmmth82KLgT4Z7hCk4sJlrCWZBpp1NU88P84MQ==} dependencies: glob: 7.2.3 - dev: true /@douyinfe/semi-ui/2.55.5_biqbaboplfbrettd7655fr4n2y: resolution: {integrity: sha512-JkDL0fYpdU3kUSsC5LHPUMwRUJIjRRThd1qjVel2vRD5oaXJhbJ/uRbc8AIEEsWqoHLJN2KX4GcstLoUIeF/pQ==} @@ -2283,7 +2318,6 @@ packages: react-window: 1.8.10_biqbaboplfbrettd7655fr4n2y scroll-into-view-if-needed: 2.2.31 utility-types: 3.11.0 - dev: true /@esbuild-plugins/node-globals-polyfill/0.1.1: resolution: {integrity: sha512-MR0oAA+mlnJWrt1RQVQ+4VYuRJW/P2YmRTv1AsplObyvuBMnPHiizUF95HHYiSsMGLhyGtWufaq2XQg6+iurBg==} @@ -2932,7 +2966,6 @@ packages: cpu: [arm] os: [android] requiresBuild: true - dev: true optional: true /@resvg/resvg-js-android-arm64/2.4.1: @@ -2941,7 +2974,6 @@ packages: cpu: [arm64] os: [android] requiresBuild: true - dev: true optional: true /@resvg/resvg-js-darwin-arm64/2.4.1: @@ -2950,7 +2982,6 @@ packages: cpu: [arm64] os: [darwin] requiresBuild: true - dev: true optional: true /@resvg/resvg-js-darwin-x64/2.4.1: @@ -2959,7 +2990,6 @@ packages: cpu: [x64] os: [darwin] requiresBuild: true - dev: true optional: true /@resvg/resvg-js-linux-arm-gnueabihf/2.4.1: @@ -2968,7 +2998,6 @@ packages: cpu: [arm] os: [linux] requiresBuild: true - dev: true optional: true /@resvg/resvg-js-linux-arm64-gnu/2.4.1: @@ -2977,7 +3006,6 @@ packages: cpu: [arm64] os: [linux] requiresBuild: true - dev: true optional: true /@resvg/resvg-js-linux-arm64-musl/2.4.1: @@ -2986,7 +3014,6 @@ packages: cpu: [arm64] os: [linux] requiresBuild: true - dev: true optional: true /@resvg/resvg-js-linux-x64-gnu/2.4.1: @@ -2995,7 +3022,6 @@ packages: cpu: [x64] os: [linux] requiresBuild: true - dev: true optional: true /@resvg/resvg-js-linux-x64-musl/2.4.1: @@ -3004,7 +3030,6 @@ packages: cpu: [x64] os: [linux] requiresBuild: true - dev: true optional: true /@resvg/resvg-js-win32-arm64-msvc/2.4.1: @@ -3013,7 +3038,6 @@ packages: cpu: [arm64] os: [win32] requiresBuild: true - dev: true optional: true /@resvg/resvg-js-win32-ia32-msvc/2.4.1: @@ -3022,7 +3046,6 @@ packages: cpu: [ia32] os: [win32] requiresBuild: true - dev: true optional: true /@resvg/resvg-js-win32-x64-msvc/2.4.1: @@ -3031,7 +3054,6 @@ packages: cpu: [x64] os: [win32] requiresBuild: true - dev: true optional: true /@resvg/resvg-js/2.4.1: @@ -3050,7 +3072,6 @@ packages: '@resvg/resvg-js-win32-arm64-msvc': 2.4.1 '@resvg/resvg-js-win32-ia32-msvc': 2.4.1 '@resvg/resvg-js-win32-x64-msvc': 2.4.1 - dev: true /@rollup/plugin-alias/5.0.0_rollup@3.20.5: resolution: {integrity: sha512-l9hY5chSCjuFRPsnRm16twWBiSApl2uYFLsepQYwtBuAxNMQ/1dJqADld40P0Jkqm65GRTLy/AC6hnpVebtLsA==} @@ -3754,40 +3775,33 @@ packages: dependencies: '@turf/helpers': 6.5.0 '@turf/invariant': 6.5.0 - dev: true /@turf/clone/6.5.0: resolution: {integrity: sha512-mzVtTFj/QycXOn6ig+annKrM6ZlimreKYz6f/GSERytOpgzodbQyOgkfwru100O1KQhhjSudKK4DsQ0oyi9cTw==} dependencies: '@turf/helpers': 6.5.0 - dev: true /@turf/flatten/6.5.0: resolution: {integrity: sha512-IBZVwoNLVNT6U/bcUUllubgElzpMsNoCw8tLqBw6dfYg9ObGmpEjf9BIYLr7a2Yn5ZR4l7YIj2T7kD5uJjZADQ==} dependencies: '@turf/helpers': 6.5.0 '@turf/meta': 6.5.0 - dev: true /@turf/helpers/6.5.0: resolution: {integrity: sha512-VbI1dV5bLFzohYYdgqwikdMVpe7pJ9X3E+dlr425wa2/sMJqYDhTO++ec38/pcPvPE6oD9WEEeU3Xu3gza+VPw==} - dev: true /@turf/invariant/6.5.0: resolution: {integrity: sha512-Wv8PRNCtPD31UVbdJE/KVAWKe7l6US+lJItRR/HOEW3eh+U/JwRCSUl/KZ7bmjM/C+zLNoreM2TU6OoLACs4eg==} dependencies: '@turf/helpers': 6.5.0 - dev: true /@turf/meta/3.14.0: resolution: {integrity: sha512-OtXqLQuR9hlQ/HkAF/OdzRea7E0eZK1ay8y8CBXkoO2R6v34CsDrWYLMSo0ZzMsaQDpKo76NPP2GGo+PyG1cSg==} - dev: true /@turf/meta/6.5.0: resolution: {integrity: sha512-RrArvtsV0vdsCBegoBtOalgdSOfkBrTJ07VkpiCnq/491W67hnMWmDu7e6Ztw0C3WldRYTXkg3SumfdzZxLBHA==} dependencies: '@turf/helpers': 6.5.0 - dev: true /@turf/rewind/6.5.0: resolution: {integrity: sha512-IoUAMcHWotBWYwSYuYypw/LlqZmO+wcBpn8ysrBNbazkFNkLf3btSDZMkKJO/bvOzl55imr/Xj4fi3DdsLsbzQ==} @@ -3797,7 +3811,6 @@ packages: '@turf/helpers': 6.5.0 '@turf/invariant': 6.5.0 '@turf/meta': 6.5.0 - dev: true /@types/babel__core/7.20.0: resolution: {integrity: sha512-+n8dL/9GWblDO0iU6eZAwEIJVr5DWigtle+Q6HLOrh/pdbXOhOtqzq8VPPE2zvNJzSKY4vH/z3iT3tn0A3ypiQ==} @@ -3996,7 +4009,6 @@ packages: /@types/prop-types/15.7.12: resolution: {integrity: sha512-5zvhXYtRNRluoE/jAp4GVsSduVUzNWKkOZrCDBWYtE7biZywwdC2AcEzg+cSMLFRfVgeAFqpfNabiPjxFddV1Q==} - dev: true /@types/q/1.5.8: resolution: {integrity: sha512-hroOstUScF6zhIi+5+x0dzqrHA1EJi+Irri6b1fxolMTqqHIV/Cg77EtnQcZqZCu8hR3mX2BzIxN4/GzI68Kfw==} @@ -4023,7 +4035,6 @@ packages: '@types/prop-types': 15.7.12 '@types/scheduler': 0.16.8 csstype: 3.1.3 - dev: true /@types/resolve/1.20.2: resolution: {integrity: sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==} @@ -4031,7 +4042,6 @@ packages: /@types/scheduler/0.16.8: resolution: {integrity: sha512-WZLiwShhwLRmeV6zH+GkbOFT6Z6VklCItrDioxUnv+u4Ll+8vKeFySoFyK/0ctcRpOmwAicELfmys1sDc/Rw+A==} - dev: true /@types/semver/7.3.12: resolution: {integrity: sha512-WwA1MW0++RfXmCr12xeYOOC5baSC9mSb0ZqCquFzKhcoF4TvHu5MKOuXsncgZcpVFhB1pXd5hZmM0ryAoCp12A==} @@ -4225,7 +4235,14 @@ packages: react: 18.2.0 react-dom: 18.2.0_react@18.2.0 react-is: 18.2.0 - dev: true + + /@visactor/vchart-theme/1.11.1-alpha.2_@visactor+vchart@1.11.0: + resolution: {integrity: sha512-sq5Tqr9AVe7tY42OKZB5oA1RFeFSl3fRfYjfM7AfnxeXudkLbOSKb1IxLhxC/a7TnXkblw+DMsv40t0iQmj9CA==} + peerDependencies: + '@visactor/vchart': '>=1.10.4' + dependencies: + '@visactor/vchart': 1.11.0 + dev: false /@visactor/vchart-types/1.11.0: resolution: {integrity: sha512-YAcYvfy2rv/HZYOEFjFb7s/Rcx1kDQs4Q77nZa/2+0lgcLwEhwmJymUFT8giklGxlKzwvqj0dkM0AplUs767uA==} @@ -4249,7 +4266,6 @@ packages: '@visactor/vscale': 0.18.6 '@visactor/vutils': 0.18.6 '@visactor/vutils-extension': 1.11.0_7qcgcpuz2j5tzhxzhxchuz72qy - dev: true /@visactor/vdataset/0.18.6: resolution: {integrity: sha512-48ioKGrGFVuvM2SOyZjSfZxy+l8ZGb64S5/kwIOcLjMkUeYk/WkhKZRhVeDa+TCcthRndHrPgvL6XOZOtg9gEA==} @@ -4271,14 +4287,12 @@ packages: simple-statistics: 7.8.3 simplify-geojson: 1.0.5 topojson-client: 3.1.0 - dev: true /@visactor/vgrammar-coordinate/0.13.2: resolution: {integrity: sha512-mvIJa8V7zVnfOrKDc6v4XLXo5h0vJoPG/US4nakSX+EK4cODbiQg0TCOsJQDHntPRdXx20A5EGp3mRoIOHM6sw==} dependencies: '@visactor/vgrammar-util': 0.13.2 '@visactor/vutils': 0.18.6 - dev: true /@visactor/vgrammar-core/0.13.2: resolution: {integrity: sha512-uBmGP4Cj1yEc+iR31dKCM4J0ISs5Qy9cbtouCJfuMx2lGzlJQR7ThVS5sFKlPbLtRDp8YPz+TmNcACHGXWZLUg==} @@ -4291,7 +4305,6 @@ packages: '@visactor/vrender-kits': 0.19.0 '@visactor/vscale': 0.18.6 '@visactor/vutils': 0.18.6 - dev: true /@visactor/vgrammar-hierarchy/0.13.2: resolution: {integrity: sha512-31pDnI4/+DPHme1isFNTvAoU8BAJCdmNM734hQ0gBgq7wyjKyybkxdIFNm7oh2ow+Q3wpVSUHNoyAR7l/uJGPg==} @@ -4301,7 +4314,6 @@ packages: '@visactor/vrender-core': 0.19.0 '@visactor/vrender-kits': 0.19.0 '@visactor/vutils': 0.18.6 - dev: true /@visactor/vgrammar-projection/0.13.2: resolution: {integrity: sha512-+3xObQkYSWYZPuWiml82Gp3mSuUa7/QRoKmicv9sEFjC++HmTllD729/CofPXEodYhK5Ju4q5TO0qRhV5/DOOA==} @@ -4310,7 +4322,6 @@ packages: '@visactor/vgrammar-util': 0.13.2 '@visactor/vutils': 0.18.6 d3-geo: 1.12.1 - dev: true /@visactor/vgrammar-sankey/0.13.2: resolution: {integrity: sha512-jjX6BGLTbTivAVRjS5KIMK7GLJ2QlosYzzUXl6/4xP8fmiUJgoLLQpDUIucKTE3QcA1tUDWn6tXrzgTB4fyD5A==} @@ -4320,13 +4331,11 @@ packages: '@visactor/vrender-core': 0.19.0 '@visactor/vrender-kits': 0.19.0 '@visactor/vutils': 0.18.6 - dev: true /@visactor/vgrammar-util/0.13.2: resolution: {integrity: sha512-UIGLsoFP0q9NcLSfDiSGLIZ6QzB5kOyP8AHqqktZs08bPgqisbobyVtl6zuGVuwsQZBKf1i50knLX1Lnb+sOcw==} dependencies: '@visactor/vutils': 0.18.6 - dev: true /@visactor/vgrammar-venn/0.13.2: resolution: {integrity: sha512-ppMHjZeOiMbmNTiyeWYqVkZdEUn/ny1v6pPGUh1f3/JKUYy80fM6PG6yKcwbEPg5Rc68Hjz5T9IFO4f0mWloNQ==} @@ -4336,7 +4345,6 @@ packages: '@visactor/vrender-core': 0.19.0 '@visactor/vrender-kits': 0.19.0 '@visactor/vutils': 0.18.6 - dev: true /@visactor/vgrammar-wordcloud-shape/0.13.2: resolution: {integrity: sha512-RxpakDTusIYSy3G2SNmB1nYtXKBs4nYcONc/Njrfk21/+P73pVoZ/DXGI8SB4YxSjp1MPRf9bpPWOWNTw5u8og==} @@ -4347,7 +4355,6 @@ packages: '@visactor/vrender-kits': 0.19.0 '@visactor/vscale': 0.18.6 '@visactor/vutils': 0.18.6 - dev: true /@visactor/vgrammar-wordcloud/0.13.2: resolution: {integrity: sha512-VSho3WsH1AQt95qZytrlZDyEUNVXnuO+4hPAyXWVtT2DrGFkF6MHXqx/pPQRfHW3AkrQByCuK4KAirMPNPi8Kw==} @@ -4357,7 +4364,6 @@ packages: '@visactor/vrender-core': 0.19.0 '@visactor/vrender-kits': 0.19.0 '@visactor/vutils': 0.18.6 - dev: true /@visactor/vrender-components/0.19.0: resolution: {integrity: sha512-J+Dtw727xVKg+7tTAbFkaM6AzNVdx0ZEXaGH4JYbhGTC6S6gO7rn8X+vGO2l/vilt4MfEWYAhRuGwZkJToiAxA==} @@ -4366,14 +4372,12 @@ packages: '@visactor/vrender-kits': 0.19.0 '@visactor/vscale': 0.17.5 '@visactor/vutils': 0.18.6 - dev: true /@visactor/vrender-core/0.19.0: resolution: {integrity: sha512-LOMg4bySvVXrCcyd8dqsQRvrPcdozOi1trIddslJuiES7bzldniTH0yWaqdysdhIK9dPCryDjOtU0i9nc0bz2w==} dependencies: '@visactor/vutils': 0.18.6 color-convert: 2.0.1 - dev: true /@visactor/vrender-kits/0.19.0: resolution: {integrity: sha512-aTB2CYYpNHWusVTO3bjH/wMYkhaKvO+sD6TA9A0tB5T4+jh0cfxKT+K3UE3sYDXhCjcuQNr9ZLbyz51IdxE4Gg==} @@ -4382,19 +4386,16 @@ packages: '@visactor/vrender-core': 0.19.0 '@visactor/vutils': 0.18.6 roughjs: 4.5.2 - dev: true /@visactor/vscale/0.17.5: resolution: {integrity: sha512-2dkS1IlAJ/IdTp8JElbctOOv6lkHKBKPDm8KvwBo0NuGWQeYAebSeyN3QCdwKbj76gMlCub4zc+xWrS5YiA2zA==} dependencies: '@visactor/vutils': 0.17.5 - dev: true /@visactor/vscale/0.18.6: resolution: {integrity: sha512-v4zPi1Ngo9WOf7YdseISyVMtKwAc4FqqQ5VkHDXYGeGJH3JrMOjCvbi9mD7Sw2LfMQ9CTqqGhoQ9M/+BXQ8t/A==} dependencies: '@visactor/vutils': 0.18.6 - dev: true /@visactor/vutils-extension/1.11.0_7qcgcpuz2j5tzhxzhxchuz72qy: resolution: {integrity: sha512-fRxv1VkoDgDVaTCeBoc9u6d343vd/lZGR8N2f/c6Hn8woToJB1lHrGg1MBEgxNKOaeLZN3dc5EcMn9LhxOpM4g==} @@ -4407,7 +4408,6 @@ packages: '@visactor/vrender-core': 0.19.0 '@visactor/vscale': 0.18.6 '@visactor/vutils': 0.18.6 - dev: true /@visactor/vutils/0.17.5: resolution: {integrity: sha512-HFN6Pk1Wc1RK842g02MeKOlvdri5L7/nqxMVTqxIvi0XMhHXpmoqN4+/9H+h8LmJpVohyrI/MT85TRBV/rManw==} @@ -4415,7 +4415,6 @@ packages: '@turf/helpers': 6.5.0 '@turf/invariant': 6.5.0 eventemitter3: 4.0.7 - dev: true /@visactor/vutils/0.18.6: resolution: {integrity: sha512-/Bw+yfP0yrrI/iTesv2XroDte3BYfTFhNJx7BVj1/z6S9TwOcry76xjW8Xjet5+hESUGas0H2J1WZR+5WliSXA==} @@ -4423,7 +4422,6 @@ packages: '@turf/helpers': 6.5.0 '@turf/invariant': 6.5.0 eventemitter3: 4.0.7 - dev: true /@vitejs/plugin-react-swc/3.6.0_vite@4.5.3: resolution: {integrity: sha512-XFRbsGgpGxGzEV5i5+vRiro1bwcIaZDIdBRP16qwm+jP68ue/S8FJTBEgOeojtVDYrbSua3XFp71kC8VJE6v+g==} @@ -4497,7 +4495,6 @@ packages: /abs-svg-path/0.1.1: resolution: {integrity: sha512-d8XPSGjfyzlXC3Xx891DJRyZfqk5JU0BJrDQcsWomFIV1/BIzPW5HDH5iDdWpqWaav0YVIEzT1RHTwWr0FFshA==} - dev: true /acorn-jsx/5.3.2_acorn@8.11.3: resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} @@ -4802,7 +4799,6 @@ packages: /array-source/0.0.4: resolution: {integrity: sha512-frNdc+zBn80vipY+GdcJkLEbMWj3xmzArYApmUGxoiV8uAu/ygcs9icPdsGdA26h0MkHUMW6EN2piIvVx+M5Mw==} - dev: true /array-union/2.1.0: resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} @@ -4902,7 +4898,6 @@ packages: /async-validator/3.5.2: resolution: {integrity: sha512-8eLCg00W9pIRZSB781UUX/H6Oskmm8xloZfr09lz5bikRpBVDlJ3hRVuxxP1SxcwsEYfJ4IU8Q19Y8/893r3rQ==} - dev: true /atob/2.1.2: resolution: {integrity: sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==} @@ -4934,11 +4929,9 @@ packages: /b-tween/0.3.3: resolution: {integrity: sha512-oEHegcRpA7fAuc9KC4nktucuZn2aS8htymCPcP3qkEGPqiBH+GfqtqoG2l7LxHngg6O0HFM7hOeOYExl1Oz4ZA==} - dev: true /b-validate/1.5.3: resolution: {integrity: sha512-iCvCkGFskbaYtfQ0a3GmcQCHl/Sv1GufXFGuUQ+FE+WJa7A/espLOuFIn09B944V8/ImPj71T4+rTASxO2PAuA==} - dev: true /babel-code-frame/6.26.0: resolution: {integrity: sha512-XqYMR2dfdGMW+hd0IUZ2PwK+fGeFkOxZJ0wY+JaQAHzt1Zx8LcvpiZD2NiGkEG8qx0CfkAOr5xt76d1e8vG90g==} @@ -5090,7 +5083,6 @@ packages: /bezier-easing/2.1.0: resolution: {integrity: sha512-gbIqZ/eslnUFC1tjEvtz0sgx+xTK20wDnYMIA27VA04R7w6xxXQPZDbibjA9DTWZRA2CXtwHykkVzlCaAJAZig==} - dev: true /big.js/5.2.2: resolution: {integrity: sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==} @@ -5413,7 +5405,6 @@ packages: /classnames/2.5.1: resolution: {integrity: sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==} - dev: true /clean-css/5.3.2: resolution: {integrity: sha512-JVJbM+f3d3Q704rF4bqQ5UUyTtuJ0JRKNbTKVEeujCCBoMdkEi+V+e8oktO9qGQNSvHrFTM6JZRXrUvGR1czww==} @@ -5490,7 +5481,6 @@ packages: /clsx/1.2.1: resolution: {integrity: sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg==} engines: {node: '>=6'} - dev: true /co/4.6.0: resolution: {integrity: sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==} @@ -5552,7 +5542,6 @@ packages: dependencies: color-name: 1.1.4 simple-swizzle: 0.2.2 - dev: true /color-support/1.1.3: resolution: {integrity: sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==} @@ -5563,7 +5552,6 @@ packages: dependencies: color-convert: 1.9.3 color-string: 1.9.1 - dev: true /colord/2.9.3: resolution: {integrity: sha512-jeC1axXpnb0/2nn/Y1LPuLdgXBLH7aDcHu4KEKfqw3CUhX7ZpfBSlPKyqXE6btIgEzfWtrX3/tyBCaCvXvMkOw==} @@ -5591,11 +5579,9 @@ packages: /compute-scroll-into-view/1.0.11: resolution: {integrity: sha512-uUnglJowSe0IPmWOdDtrlHXof5CTIJitfJEyITHBW6zDVOGu9Pjk5puaLM73SLcwak0L4hEjO7Td88/a6P5i7A==} - dev: true /compute-scroll-into-view/1.0.20: resolution: {integrity: sha512-UCB0ioiyj8CRjtrvaceBLqqhZCVP+1B8+NWQhmdsm0VXOJtobBCf1dBQmebCCo34qZmUwZfIH2MZLqNHazrfjg==} - dev: true /concat-map/0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} @@ -5607,7 +5593,6 @@ packages: inherits: 2.0.4 readable-stream: 1.1.14 typedarray: 0.0.7 - dev: true /concat-stream/1.6.2: resolution: {integrity: sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==} @@ -5627,7 +5612,6 @@ packages: inherits: 2.0.4 readable-stream: 3.6.2 typedarray: 0.0.6 - dev: true /concordance/5.0.4: resolution: {integrity: sha512-OAcsnTEYu1ARJqWVGwf4zh4JDfHZEaSNlNccFmt8YjB2l/n19/PF2viLINHc57vO4FKIAFl2FWASIGZZWZ2Kxw==} @@ -5673,7 +5657,6 @@ packages: /copy-text-to-clipboard/2.2.0: resolution: {integrity: sha512-WRvoIdnTs1rgPMkgA2pUOa/M4Enh2uzCwdKsOMYNAJiz/4ZvEJgmbF4OmninPmlFdAWisfeh0tH+Cpf7ni3RqQ==} engines: {node: '>=6'} - dev: true /copy-to-clipboard/3.3.3: resolution: {integrity: sha512-2KV8NhB5JqC3ky0r9PMCAZKbUHSwtEo4CwCs0KXgruG43gX5PMqDEBbVU4OUzw2MuAWUfsuFmWvEKG5QRfSnJA==} @@ -5826,7 +5809,6 @@ packages: /csstype/3.1.3: resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==} - dev: true /d/1.0.2: resolution: {integrity: sha512-MOqHvMWF9/9MX6nza0KgvFH4HpMU0EF5uUDXqX/BtxtU8NfB0QzRtJ8Oe/6SuS4kbhyzVJwjd97EA4PKrzJ8bw==} @@ -5838,7 +5820,6 @@ packages: /d3-array/1.2.4: resolution: {integrity: sha512-KHW6M86R+FUPYGb3R5XiYjXPq7VzwxZ22buHhAEVG5ztoEcZZMLov530mmccaqA1GghZArjQV46fuc8kUqhhHw==} - dev: true /d3-dsv/2.0.0: resolution: {integrity: sha512-E+Pn8UJYx9mViuIUkoc93gJGGYut6mSDKy2+XaPwccwkRGlR+LO97L2VCCRjQivTwLHkSnAJG7yo00BWY6QM+w==} @@ -5847,22 +5828,18 @@ packages: commander: 2.20.3 iconv-lite: 0.4.24 rw: 1.3.3 - dev: true /d3-geo/1.12.1: resolution: {integrity: sha512-XG4d1c/UJSEX9NfU02KwBL6BYPj8YKHxgBEw5om2ZnTRSbIcego6dhHwcxuSR3clxh0EpE38os1DVPOmnYtTPg==} dependencies: d3-array: 1.2.4 - dev: true /d3-hexbin/0.2.2: resolution: {integrity: sha512-KS3fUT2ReD4RlGCjvCEm1RgMtp2NFZumdMu4DBzQK8AZv3fXRM6Xm8I4fSU07UXvH4xxg03NwWKWdvxfS/yc4w==} - dev: true /d3-hierarchy/3.1.2: resolution: {integrity: sha512-FX/9frcub54beBdugHjDCdikxThEqjnR93Qt7PvQTOHxyiNCAlvMrHhclk3cD5VeAaq9fxmfRp+CnWw9rEMBuA==} engines: {node: '>=12'} - dev: true /data-view-buffer/1.0.1: resolution: {integrity: sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==} @@ -5894,7 +5871,6 @@ packages: date-fns: '>=2.0.0' dependencies: date-fns: 2.30.0 - dev: true /date-fns/2.30.0: resolution: {integrity: sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==} @@ -5912,7 +5888,6 @@ packages: /dayjs/1.11.10: resolution: {integrity: sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ==} - dev: true /debug-fabulous/1.1.0: resolution: {integrity: sha512-GZqvGIgKNlUnHUPQhepnUZFIMoi3dgZKQBzKDeL2g7oJF9SNAji/AAu36dusFUas0O+pae74lNeoIPHqXWDkLg==} @@ -6066,7 +6041,6 @@ packages: /detect-node-es/1.1.0: resolution: {integrity: sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ==} - dev: true /diff-sequences/29.6.3: resolution: {integrity: sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==} @@ -6104,7 +6078,6 @@ packages: dependencies: '@babel/runtime': 7.24.7 csstype: 3.1.3 - dev: true /dom-serializer/0.2.2: resolution: {integrity: sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==} @@ -6624,7 +6597,6 @@ packages: /eventemitter3/4.0.7: resolution: {integrity: sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==} - dev: true /execa/4.1.0: resolution: {integrity: sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==} @@ -6747,7 +6719,6 @@ packages: /fast-copy/3.0.2: resolution: {integrity: sha512-dl0O9Vhju8IrcLndv2eU4ldt1ftXMqqfgN4H1cpmGV7P6jeB9FwpN9a2c8DPGE1Ys88rNUJVYDHq73CGAGOPfQ==} - dev: true /fast-deep-equal/3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} @@ -6801,7 +6772,6 @@ packages: resolution: {integrity: sha512-1R1KneL7eTXmXfKxC10V/9NeGOdbsAXJ+lQ//fvvcHUgtaZcZDWNJNblxAoVOyV1cj45pOtUrR3vZTBwqcW8XA==} dependencies: stream-source: 0.3.5 - dev: true /file-uri-to-path/1.0.0: resolution: {integrity: sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==} @@ -6904,7 +6874,6 @@ packages: engines: {node: '>=10'} dependencies: tslib: 2.3.1 - dev: true /for-each/0.3.3: resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} @@ -7034,7 +7003,6 @@ packages: concat-stream: 2.0.0 pbf: 3.2.1 shapefile: 0.6.6 - dev: true /geojson-dissolve/3.1.0: resolution: {integrity: sha512-JXHfn+A3tU392HA703gJbjmuHaQOAE/C1KzbELCczFRFux+GdY6zt1nKb1VMBHp4LWeE7gUY2ql+g06vJqhiwQ==} @@ -7044,7 +7012,6 @@ packages: geojson-linestring-dissolve: 0.0.1 topojson-client: 3.1.0 topojson-server: 3.0.1 - dev: true /geojson-flatten/0.2.4: resolution: {integrity: sha512-LiX6Jmot8adiIdZ/fthbcKKPOfWjTQchX/ggHnwMZ2e4b0I243N1ANUos0LvnzepTEsj0+D4fIJ5bKhBrWnAHA==} @@ -7052,11 +7019,9 @@ packages: dependencies: get-stdin: 6.0.0 minimist: 1.2.0 - dev: true /geojson-linestring-dissolve/0.0.1: resolution: {integrity: sha512-Y8I2/Ea28R/Xeki7msBcpMvJL2TaPfaPKP8xqueJfQ9/jEhps+iOJxOR2XCBGgVb12Z6XnDb1CMbaPfLepsLaw==} - dev: true /get-caller-file/1.0.3: resolution: {integrity: sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==} @@ -7092,7 +7057,6 @@ packages: /get-stdin/6.0.0: resolution: {integrity: sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==} engines: {node: '>=4'} - dev: true /get-stream/5.2.0: resolution: {integrity: sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==} @@ -7586,7 +7550,6 @@ packages: engines: {node: '>=0.10.0'} dependencies: safer-buffer: 2.1.2 - dev: true /iconv-lite/0.6.3: resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} @@ -7597,7 +7560,6 @@ packages: /ieee754/1.2.1: resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} - dev: true /ignore/5.3.1: resolution: {integrity: sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==} @@ -7708,7 +7670,6 @@ packages: /is-arrayish/0.3.2: resolution: {integrity: sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==} - dev: true /is-bigint/1.0.4: resolution: {integrity: sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==} @@ -7978,7 +7939,6 @@ packages: /isarray/0.0.1: resolution: {integrity: sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==} - dev: true /isarray/1.0.0: resolution: {integrity: sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==} @@ -9122,7 +9082,6 @@ packages: /memoize-one/5.2.1: resolution: {integrity: sha512-zYiwtZUcYyXKo/np96AGZAckk+FWWsUdJ3cHGGmld7+AhvcWmQyGCYUh1hc4Q/pkOhb65dQR/pqCyK0cOaHz4Q==} - dev: true /memoizee/0.4.15: resolution: {integrity: sha512-UBWmJpLZd5STPm7PMUlOw/TSy972M+z8gcyQ5veOnSDRREz/0bmpyTfKt3/51DhEBqCZQn1udM/5flcSPYhkdQ==} @@ -9246,11 +9205,9 @@ packages: /minimist/1.2.0: resolution: {integrity: sha512-7Wl+Jz+IGWuSdgsQEJ4JunV0si/iMhg42MnQQG6h1R6TNeVenp4U9x5CC5v/gYqz/fENLQITAWXidNtVL0NNbw==} - dev: true /minimist/1.2.6: resolution: {integrity: sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==} - dev: true /minimist/1.2.8: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} @@ -9561,7 +9518,6 @@ packages: /number-precision/1.6.0: resolution: {integrity: sha512-05OLPgbgmnixJw+VvEh18yNPUo3iyp4BEWJcrLu4X9W05KmMifN7Mu5exYvQXqxxeNWhvIF+j3Rij+HmddM/hQ==} - dev: true /object-assign/4.1.1: resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} @@ -9791,7 +9747,6 @@ packages: /parse-svg-path/0.1.2: resolution: {integrity: sha512-JyPSBnkTJ0AI8GGJLfMXvKq42cj5c006fnLz6fXy6zfoVjJizi8BNTpu8on8ziI1cKy9d9DGNuY17Ce7wuejpQ==} - dev: true /pascalcase/0.1.1: resolution: {integrity: sha512-XHXfu/yOQRy9vYOtUDVMN60OEJjW013GoObG1o+xwQTpB9eYJX/BjXMsdW13ZDPruFhYYn0AG22w0xgQMwl3Nw==} @@ -9800,11 +9755,9 @@ packages: /path-browserify/1.0.1: resolution: {integrity: sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==} - dev: true /path-data-parser/0.1.0: resolution: {integrity: sha512-NOnmBpt5Y2RWbuv0LMzsayp3lVylAHLPUTut412ZA3l+C4uw4ZVkQbjShYCQ8TCpUMdPapr4YjUqLYD6v68j+w==} - dev: true /path-dirname/1.0.2: resolution: {integrity: sha512-ALzNPpyNq9AqXMBjeymIjFDAkAFH06mHJH/cSBHAgU0s4vfpBn6b2nf8tiRLvagKD8RbTpq2FKTBg7cl9l3c7Q==} @@ -9849,7 +9802,6 @@ packages: dependencies: array-source: 0.0.4 file-source: 0.6.1 - dev: true /path-to-regexp/1.8.0: resolution: {integrity: sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==} @@ -9884,7 +9836,6 @@ packages: dependencies: ieee754: 1.2.1 resolve-protobuf-schema: 2.1.0 - dev: true /picocolors/0.2.1: resolution: {integrity: sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==} @@ -9975,18 +9926,15 @@ packages: abs-svg-path: 0.1.1 isarray: 0.0.1 parse-svg-path: 0.1.2 - dev: true /points-on-curve/0.2.0: resolution: {integrity: sha512-0mYKnYYe9ZcqMCWhUjItv/oHjvgEsfKvnUTg8sAtnHr3GVy7rGkXCb6d5cSyqrWqL4k81b9CPg3urd+T7aop3A==} - dev: true /points-on-path/0.2.1: resolution: {integrity: sha512-25ClnWWuw7JbWZcgqY/gJ4FQWadKxGWk+3kR/7kD0tCaDtPPMj7oHu2ToLaVhfpnHrZzYby2w6tUA0eOIuUg8g==} dependencies: path-data-parser: 0.1.0 points-on-curve: 0.2.0 - dev: true /posix-character-classes/0.1.1: resolution: {integrity: sha512-xTgYBc3fuo7Yt7JbiuFxSYGToMoz8fLoE6TC9Wx1P/u+LfeThMOAqmuyECnlBaaJb+u1m9hHiXUEtwW4OzfUJg==} @@ -10144,7 +10092,6 @@ packages: /protocol-buffers-schema/3.6.0: resolution: {integrity: sha512-TdDRD+/QNdrCGCE7v8340QyuXd4kIWIgapsE2+n/SaGiSSbomYl4TjHlvIoCWRpE7wFt02EpB35VVA2ImcBVqw==} - dev: true /prr/1.0.1: resolution: {integrity: sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==} @@ -10214,7 +10161,6 @@ packages: dependencies: '@babel/runtime': 7.24.7 react: 18.2.0 - dev: true /react-color/2.19.3_react@18.2.0: resolution: {integrity: sha512-LEeGE/ZzNLIsFWa1TMe8y5VYqr7bibneWmvJwm1pCn/eNmrabWDh659JSPn9BuaMpEfU83WTOJfnCcjDZwNQTA==} @@ -10260,7 +10206,6 @@ packages: loose-envify: 1.4.0 react: 18.2.0 scheduler: 0.23.0 - dev: true /react-draggable/4.4.6_biqbaboplfbrettd7655fr4n2y: resolution: {integrity: sha512-LtY5Xw1zTPqHkVmtM3X8MUOxNDOUhv/khTgBgrUvwaS064bwVvxT+q5El0uUFNx5IEPKXuRejr7UqLwBIg5pdw==} @@ -10272,7 +10217,6 @@ packages: prop-types: 15.8.1 react: 18.2.0 react-dom: 18.2.0_react@18.2.0 - dev: true /react-focus-lock/2.11.2_drztyhed36ktqiumts32oy3nzi: resolution: {integrity: sha512-DDTbEiov0+RthESPVSTIdAWPPKic+op3sCcP+icbMRobvQNt7LuAlJ3KoarqQv5sCgKArru3kXmlmFTa27/CdQ==} @@ -10291,7 +10235,6 @@ packages: react-clientside-effect: 1.2.6_react@18.2.0 use-callback-ref: 1.3.2_drztyhed36ktqiumts32oy3nzi use-sidecar: 1.1.2_drztyhed36ktqiumts32oy3nzi - dev: true /react-is/16.13.1: resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==} @@ -10340,7 +10283,6 @@ packages: react-draggable: 4.4.6_biqbaboplfbrettd7655fr4n2y transitivePeerDependencies: - react-dom - dev: true /react-router-dom/5.3.4_react@18.2.0: resolution: {integrity: sha512-m4EqFMHv/Ih4kpcBCONHbkT68KoAeHN4p3lAGoNryfHi0dMy0kCzEZakiKRsvg5wHZ/JLrLW8o8KomWiz/qbYQ==} @@ -10386,7 +10328,6 @@ packages: prop-types: 15.8.1 react: 18.2.0 react-dom: 18.2.0_react@18.2.0 - dev: true /react-window/1.8.10_biqbaboplfbrettd7655fr4n2y: resolution: {integrity: sha512-Y0Cx+dnU6NLa5/EvoHukUD0BklJ8qITCtVEPY1C/nL8wwoZ0b5aEw8Ff1dOVHw7fCzMt55XfJDd8S8W8LCaUCg==} @@ -10399,14 +10340,12 @@ packages: memoize-one: 5.2.1 react: 18.2.0 react-dom: 18.2.0_react@18.2.0 - dev: true /react/18.2.0: resolution: {integrity: sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==} engines: {node: '>=0.10.0'} dependencies: loose-envify: 1.4.0 - dev: true /reactcss/1.2.3: resolution: {integrity: sha512-KiwVUcFu1RErkI97ywr8nvx8dNOpT03rbnma0SSalTYjkrPYaEajR4a/MRt6DZ46K6arDRbWMNHF+xH7G7n/8A==} @@ -10457,7 +10396,6 @@ packages: inherits: 2.0.4 isarray: 0.0.1 string_decoder: 0.10.31 - dev: true /readable-stream/2.3.8: resolution: {integrity: sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==} @@ -10638,7 +10576,6 @@ packages: /resize-observer-polyfill/1.5.1: resolution: {integrity: sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg==} - dev: true /resolve-cwd/3.0.0: resolution: {integrity: sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==} @@ -10677,7 +10614,6 @@ packages: resolution: {integrity: sha512-kI5ffTiZWmJaS/huM8wZfEMer1eRd7oJQhDuxeCLe3t7N7mX3z94CN0xPxBQxFYQTSNz9T0i+v6inKqSdK8xrQ==} dependencies: protocol-buffers-schema: 3.6.0 - dev: true /resolve-url/0.2.1: resolution: {integrity: sha512-ZuF55hVUQaaczgOIwqWzkEcEidmlD/xl44x1UZnhOXcYuFN2S6+rcxpG+C1N3So0wvNI3DmJICUFfu2SxhBmvg==} @@ -10785,7 +10721,6 @@ packages: path-data-parser: 0.1.0 points-on-curve: 0.2.0 points-on-path: 0.2.1 - dev: true /run-parallel/1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} @@ -10794,7 +10729,6 @@ packages: /rw/1.3.3: resolution: {integrity: sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ==} - dev: true /rxjs/7.8.1: resolution: {integrity: sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==} @@ -10857,7 +10791,6 @@ packages: resolution: {integrity: sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==} dependencies: loose-envify: 1.4.0 - dev: true /schema-utils/3.3.0: resolution: {integrity: sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==} @@ -10872,13 +10805,11 @@ packages: resolution: {integrity: sha512-P9kYMrhi9f6dvWwTGpO5I3HgjSU/8Mts7xL3lkoH5xlewK7O9Obdc5WmMCzppln7bCVGNmf3qfoZXrpCeyNJXw==} dependencies: compute-scroll-into-view: 1.0.11 - dev: true /scroll-into-view-if-needed/2.2.31: resolution: {integrity: sha512-dGCXy99wZQivjmjIqihaBQNjryrz5rueJY7eHfTdyWEiR4ttYpsajb14rn9s5d4DY4EcY6+4+U/maARBXJedkA==} dependencies: compute-scroll-into-view: 1.0.20 - dev: true /scss-tokenizer/0.4.3: resolution: {integrity: sha512-raKLgf1LI5QMQnG+RxHz6oK0sL3x3I4FN2UDLqgLOGO8hodECNnNh5BXn7fAyBxrA8zVzdQizQ6XjNJQ+uBwMw==} @@ -10957,7 +10888,6 @@ packages: /shallowequal/1.1.0: resolution: {integrity: sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==} - dev: true /shapefile/0.6.6: resolution: {integrity: sha512-rLGSWeK2ufzCVx05wYd+xrWnOOdSV7xNUW5/XFgx3Bc02hBkpMlrd2F1dDII7/jhWzv0MSyBFh5uJIy9hLdfuw==} @@ -10969,7 +10899,6 @@ packages: slice-source: 0.4.1 stream-source: 0.3.5 text-encoding: 0.6.4 - dev: true /shebang-command/2.0.0: resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} @@ -10999,13 +10928,11 @@ packages: /simple-statistics/7.8.3: resolution: {integrity: sha512-JFvMY00t6SBGtwMuJ+nqgsx9ylkMiJ5JlK9bkj8AdvniIe5615wWQYkKHXe84XtSuc40G/tlrPu0A5/NlJvv8A==} - dev: true /simple-swizzle/0.2.2: resolution: {integrity: sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==} dependencies: is-arrayish: 0.3.2 - dev: true /simplify-geojson/1.0.5: resolution: {integrity: sha512-02l1W4UipP5ivNVq6kX15mAzCRIV1oI3tz0FUEyOsNiv1ltuFDjbNhO+nbv/xhbDEtKqWLYuzpWhUsJrjR/ypA==} @@ -11014,11 +10941,9 @@ packages: concat-stream: 1.4.11 minimist: 1.2.6 simplify-geometry: 0.0.2 - dev: true /simplify-geometry/0.0.2: resolution: {integrity: sha512-ZEyrplkqgCqDlL7V8GbbYgTLlcnNF+MWWUdy8s8ZeJru50bnI71rDew/I+HG36QS2mPOYAq1ZjwNXxHJ8XOVBw==} - dev: true /sisteransi/1.0.5: resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} @@ -11060,7 +10985,6 @@ packages: /slice-source/0.4.1: resolution: {integrity: sha512-YiuPbxpCj4hD9Qs06hGAz/OZhQ0eDuALN0lRWJez0eD/RevzKqGdUx1IOMUnXgpr+sXZLq3g8ERwbAH0bCb8vg==} - dev: true /smart-buffer/4.2.0: resolution: {integrity: sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==} @@ -11298,7 +11222,6 @@ packages: /stream-source/0.3.5: resolution: {integrity: sha512-ZuEDP9sgjiAwUVoDModftG0JtYiLUV8K4ljYD1VyUMRWtbVf92474o4kuuul43iZ8t/hRuiDAx1dIJSvirrK/g==} - dev: true /strict-uri-encode/2.0.0: resolution: {integrity: sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ==} @@ -11386,7 +11309,6 @@ packages: /string_decoder/0.10.31: resolution: {integrity: sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==} - dev: true /string_decoder/1.1.1: resolution: {integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==} @@ -11666,7 +11588,6 @@ packages: /text-encoding/0.6.4: resolution: {integrity: sha512-hJnc6Qg3dWoOMkqP53F0dzRIgtmsAge09kxUIqGrEUS4qr5rWLckGYaQAVr+opBrIMRErGgy6f5aPnyPpyGRfg==} deprecated: no longer maintained - dev: true /text-table/0.2.0: resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} @@ -11812,14 +11733,12 @@ packages: hasBin: true dependencies: commander: 2.20.3 - dev: true /topojson-server/3.0.1: resolution: {integrity: sha512-/VS9j/ffKr2XAOjlZ9CgyyeLmgJ9dMwq6Y0YEON8O7p/tGGk+dCWnrE03zEdu7i4L7YsFZLEPZPzCvcB7lEEXw==} hasBin: true dependencies: commander: 2.20.3 - dev: true /trim-newlines/3.0.1: resolution: {integrity: sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==} @@ -12038,7 +11957,6 @@ packages: /typedarray/0.0.7: resolution: {integrity: sha512-ueeb9YybpjhivjbHP2LdFDAjbS948fGEPj+ACAMs4xCMmh72OCOMQWBQKlaN4ZNQ04yfLSDLSx1tGRIoWimObQ==} - dev: true /typescript/4.9.5: resolution: {integrity: sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==} @@ -12207,7 +12125,6 @@ packages: '@types/react': 17.0.80 react: 18.2.0 tslib: 2.3.1 - dev: true /use-sidecar/1.1.2_drztyhed36ktqiumts32oy3nzi: resolution: {integrity: sha512-epTbsLuzZ7lPClpz2TyryBfztm7m+28DlEv2ZCQ3MDr5ssiwyOwGH/e5F9CkfWjJ1t4clvI58yF822/GUkjjhw==} @@ -12223,7 +12140,6 @@ packages: detect-node-es: 1.1.0 react: 18.2.0 tslib: 2.3.1 - dev: true /use/3.1.1: resolution: {integrity: sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==} @@ -12245,7 +12161,6 @@ packages: /utility-types/3.11.0: resolution: {integrity: sha512-6Z7Ma2aVEWisaL6TvBCy7P8rm2LQoPv6dJ7ecIaIixHcwfbJ0x7mWdbcwlIM5IGQxPZSFYeqRCqlOOeKoJYMkw==} engines: {node: '>= 4'} - dev: true /v8-compile-cache-lib/3.0.1: resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} @@ -12368,6 +12283,41 @@ packages: - typescript dev: true + /vite/4.5.3: + resolution: {integrity: sha512-kQL23kMeX92v3ph7IauVkXkikdDRsYMGTVl5KY2E9OY4ONLvkHf04MDTbnfo6NKxZiDLWzVpP5oTa8hQD8U3dg==} + engines: {node: ^14.18.0 || >=16.0.0} + hasBin: true + peerDependencies: + '@types/node': '>= 14' + less: '*' + lightningcss: ^1.21.0 + sass: '*' + stylus: '*' + sugarss: '*' + terser: ^5.4.0 + peerDependenciesMeta: + '@types/node': + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + dependencies: + esbuild: 0.18.20 + postcss: 8.4.38 + rollup: 3.29.4 + optionalDependencies: + fsevents: 2.3.3 + dev: true + /vite/4.5.3_@types+node@20.12.7: resolution: {integrity: sha512-kQL23kMeX92v3ph7IauVkXkikdDRsYMGTVl5KY2E9OY4ONLvkHf04MDTbnfo6NKxZiDLWzVpP5oTa8hQD8U3dg==} engines: {node: ^14.18.0 || >=16.0.0} diff --git a/packages/vchart-theme-demo-component/.eslintrc.js b/packages/vchart-theme-demo-component/.eslintrc.js new file mode 100644 index 0000000..a32edaf --- /dev/null +++ b/packages/vchart-theme-demo-component/.eslintrc.js @@ -0,0 +1,19 @@ +require('@rushstack/eslint-patch/modern-module-resolution'); + +module.exports = { + extends: ['@internal/eslint-config/profile/lib'], + overrides: [ + { + files: ['**/__tests__/**', '**/*.test.ts'], + // 测试文件允许以下规则 + rules: { + '@typescript-eslint/no-empty-function': 'off', + 'no-console': 'off', + 'dot-notation': 'off', + 'promise/catch-or-return': 'off' + } + } + ], + parserOptions: { tsconfigRootDir: __dirname, project: './tsconfig.eslint.json' }, + ignorePatterns: ['scripts/**', 'bundler.config.js'] +}; diff --git a/packages/vchart-theme-demo-component/README.md b/packages/vchart-theme-demo-component/README.md new file mode 100644 index 0000000..9e8d251 --- /dev/null +++ b/packages/vchart-theme-demo-component/README.md @@ -0,0 +1,11 @@ +# @visactor/vchart-theme-demo-component + +## Description + +theme demo page in vchart site + +## Usage + +```typescript +import { xxx } from '@visactor/vchart-theme-demo-component'; +``` diff --git a/packages/vchart-theme-demo-component/bundler.config.js b/packages/vchart-theme-demo-component/bundler.config.js new file mode 100644 index 0000000..d7f1972 --- /dev/null +++ b/packages/vchart-theme-demo-component/bundler.config.js @@ -0,0 +1,7 @@ + +/** + * @type {Partial} + */ +module.exports = { + formats: ["cjs", "es", "umd"], +}; diff --git a/packages/vchart-theme-demo-component/package.json b/packages/vchart-theme-demo-component/package.json new file mode 100644 index 0000000..2c3d85f --- /dev/null +++ b/packages/vchart-theme-demo-component/package.json @@ -0,0 +1,48 @@ +{ + "name": "@visactor/vchart-theme-demo-component", + "version": "0.0.1", + "description": "theme demo page in vchart site", + "sideEffects": false, + "main": "cjs/index.js", + "module": "es/index.js", + "types": "es/index.d.ts", + "files": [ + "cjs", + "es", + "dist" + ], + "scripts": { + "compile": "tsc --noEmit", + "eslint": "eslint --debug --fix src/", + "build": "bundle", + "dev": "bundle --clean -f es -w", + "start": "vite ./vite", + "start1": "vite ./vite1", + "prepublishOnly": "npm run build" + }, + "dependencies": { + "@douyinfe/semi-ui": "^2.51.3", + "@douyinfe/semi-icons": "latest", + "@douyinfe/semi-icons-lab": "latest", + "@arco-design/web-react": "^2.32.2", + "@visactor/vchart-theme-utils": "workspace:1.11.0", + "@visactor/vchart-theme": "workspace:1.11.0", + "@visactor/vchart": "1.11.0", + "@visactor/react-vchart": "1.11.0" + }, + "devDependencies": { + "@internal/bundler": "workspace:*", + "@internal/eslint-config": "workspace:*", + "@internal/ts-config": "workspace:*", + "@rushstack/eslint-patch": "~1.1.4", + "react": "^18.0.0", + "react-dom": "^18.0.0", + "@types/react": "^17.0.0", + "@types/react-dom": "^17.0.0", + "@vitejs/plugin-react": "^4.1.1", + "eslint": "~8.18.0", + "vite": "^4.5.0", + "typescript": "4.9.5", + "react-device-detect": "^2.2.2" + } +} diff --git a/packages/vchart-theme-demo-component/src/global.d.ts b/packages/vchart-theme-demo-component/src/global.d.ts new file mode 100644 index 0000000..415c2c8 --- /dev/null +++ b/packages/vchart-theme-demo-component/src/global.d.ts @@ -0,0 +1 @@ +declare const __VERSION__: string; diff --git a/packages/vchart-theme-demo-component/src/index.jsx b/packages/vchart-theme-demo-component/src/index.jsx new file mode 100644 index 0000000..ecea4e4 --- /dev/null +++ b/packages/vchart-theme-demo-component/src/index.jsx @@ -0,0 +1,2 @@ +import ChartHubThemePage from './vchart-chart-hub-theme/index'; +export { ChartHubThemePage }; diff --git a/packages/vchart-theme-demo-component/src/interface.ts b/packages/vchart-theme-demo-component/src/interface.ts new file mode 100644 index 0000000..b57ac9f --- /dev/null +++ b/packages/vchart-theme-demo-component/src/interface.ts @@ -0,0 +1,8 @@ +import type { IInitOption } from '@visactor/vchart'; + +export interface IChartInfo { + spec: any; + option?: IInitOption; + title: string; + description?: string; +} diff --git a/packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/chart-list.ts b/packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/chart-list.ts new file mode 100644 index 0000000..89a9acf --- /dev/null +++ b/packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/chart-list.ts @@ -0,0 +1,74 @@ +import type { IChartInfo } from '../interface'; +import { + areaSpec, + barGroupHorizontalSpec, + barGroupSpec, + barStackedHorizontalSpec, + barStackedSpec, + lineSpec, + ringSpec, + pieSpec, + radarSpec, + gaugeSpec, + horizontalBarSpec, + scatterSpec, + indicatorSankeySpec +} from './chartSpec'; + +export const charts: IChartInfo[] = [ + { + title: 'Line Chart', + spec: lineSpec + }, + { + title: 'Area Chart', + spec: areaSpec + }, + { + title: 'Grouped Bar Chart', + spec: barGroupSpec + }, + { + title: 'Stacked Bar Chart', + spec: barStackedSpec + }, + { + title: 'Horizontal Grouped Bar Chart', + spec: barGroupHorizontalSpec + }, + { + title: 'Horizontal Stacked Bar Chart', + spec: barStackedHorizontalSpec + }, + { + title: 'Pie Chart', + spec: pieSpec + }, + { + title: 'Ring Chart', + spec: ringSpec + }, + { + title: 'Gauge Chart', + spec: gaugeSpec + }, + { + title: 'Horizontal Bar Chart', + spec: horizontalBarSpec + }, + { + title: 'Scatter Chart', + spec: scatterSpec + }, + { + title: 'Radar Chart', + spec: radarSpec + }, + { + title: 'Indicator Sankey Chart', + spec: indicatorSankeySpec, + option: { + enableHtmlAttribute: true + } + } +]; diff --git a/packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/chartSpec.ts b/packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/chartSpec.ts new file mode 100644 index 0000000..4fb7e02 --- /dev/null +++ b/packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/chartSpec.ts @@ -0,0 +1,1253 @@ +export const barSpec = { + type: 'bar', + data: { + values: [ + { type: 'Autocracies', year: '1930', value: 129 }, + { type: 'Autocracies', year: '1940', value: 133 }, + { type: 'Autocracies', year: '1950', value: 130 }, + { type: 'Autocracies', year: '1960', value: 126 }, + { type: 'Autocracies', year: '1970', value: 117 }, + { type: 'Autocracies', year: '1980', value: 114 }, + { type: 'Autocracies', year: '1990', value: 111 }, + { type: 'Autocracies', year: '2000', value: 89 }, + { type: 'Autocracies', year: '2010', value: 80 }, + { type: 'Autocracies', year: '2018', value: 80 } + ] + }, + height: 500, + xField: ['year', 'type'], + yField: 'value', + seriesField: 'type', + axes: [ + { + orient: 'bottom', + visible: true, + domainLine: { visible: true }, + tick: { visible: true } + }, + { + orient: 'left', + visible: true, + domainLine: { visible: false }, + tick: { visible: false } + } + ], + legends: { + visible: true + }, + indicator: { + visible: true + } +}; + +export const barGroupSpec = { + type: 'bar', + data: { + values: [ + { type: 'Autocracies', year: '1930', value: 129 }, + { type: 'Autocracies', year: '1940', value: 133 }, + { type: 'Autocracies', year: '1950', value: 130 }, + { type: 'Autocracies', year: '1960', value: 126 }, + { type: 'Autocracies', year: '1970', value: 117 }, + { type: 'Autocracies', year: '1980', value: 114 }, + { type: 'Autocracies', year: '1990', value: 111 }, + { type: 'Autocracies', year: '2000', value: 89 }, + { type: 'Autocracies', year: '2010', value: 80 }, + { type: 'Autocracies', year: '2018', value: 80 }, + { type: 'Democracies', year: '1930', value: 22 }, + { type: 'Democracies', year: '1940', value: 13 }, + { type: 'Democracies', year: '1950', value: 25 }, + { type: 'Democracies', year: '1960', value: 29 }, + { type: 'Democracies', year: '1970', value: 38 }, + { type: 'Democracies', year: '1980', value: 41 }, + { type: 'Democracies', year: '1990', value: 57 }, + { type: 'Democracies', year: '2000', value: 87 }, + { type: 'Democracies', year: '2010', value: 98 }, + { type: 'Democracies', year: '2018', value: 99 }, + { type: 'Price', year: '1930', value: 56 }, + { type: 'Price', year: '1940', value: 122 }, + { type: 'Price', year: '1950', value: 72 }, + { type: 'Price', year: '1960', value: 82 }, + { type: 'Price', year: '1970', value: 67 }, + { type: 'Price', year: '1980', value: 89 }, + { type: 'Price', year: '1990', value: 60 }, + { type: 'Price', year: '2000', value: 123 }, + { type: 'Price', year: '2010', value: 111 }, + { type: 'Price', year: '2018', value: 99 } + ] + }, + height: 500, + xField: ['year', 'type'], + yField: 'value', + seriesField: 'type', + axes: [ + { + orient: 'bottom', + visible: true, + domainLine: { visible: true }, + tick: { visible: true } + }, + { + orient: 'left', + visible: true, + domainLine: { visible: false }, + tick: { visible: false } + } + ], + legends: { + visible: true + } +}; + +export const barGroupHorizontalSpec = { + type: 'bar', + data: { + values: [ + { type: 'Autocracies', year: '1930', value: 129 }, + { type: 'Autocracies', year: '1940', value: 133 }, + { type: 'Autocracies', year: '1950', value: 130 }, + { type: 'Autocracies', year: '1960', value: 126 }, + { type: 'Autocracies', year: '1970', value: 117 }, + { type: 'Autocracies', year: '1980', value: 114 }, + { type: 'Autocracies', year: '1990', value: 111 }, + { type: 'Democracies', year: '1930', value: 22 }, + { type: 'Democracies', year: '1940', value: 13 }, + { type: 'Democracies', year: '1950', value: 25 }, + { type: 'Democracies', year: '1960', value: 29 }, + { type: 'Democracies', year: '1970', value: 38 }, + { type: 'Democracies', year: '1980', value: 41 }, + { type: 'Democracies', year: '1990', value: 57 } + ] + }, + height: 500, + direction: 'horizontal', + xField: 'value', + yField: ['year', 'type'], + seriesField: 'type', + axes: [ + { + orient: 'left', + visible: true, + domainLine: { visible: true }, + tick: { visible: true } + }, + { + orient: 'bottom', + visible: true, + domainLine: { visible: false }, + tick: { visible: false } + } + ], + legends: { + visible: true + } +}; + +export const barStackedSpec = { + type: 'bar', + //stack: true, + data: { + values: [ + { type: 'Autocracies', year: '1930', value: 129 }, + { type: 'Autocracies', year: '1940', value: 133 }, + { type: 'Autocracies', year: '1950', value: 130 }, + { type: 'Autocracies', year: '1960', value: 126 }, + { type: 'Autocracies', year: '1970', value: 117 }, + { type: 'Autocracies', year: '1980', value: 114 }, + { type: 'Autocracies', year: '1990', value: 111 }, + { type: 'Autocracies', year: '2000', value: 89 }, + { type: 'Autocracies', year: '2010', value: 80 }, + { type: 'Autocracies', year: '2018', value: 80 }, + { type: 'Democracies', year: '1930', value: 22 }, + { type: 'Democracies', year: '1940', value: 13 }, + { type: 'Democracies', year: '1950', value: 25 }, + { type: 'Democracies', year: '1960', value: 29 }, + { type: 'Democracies', year: '1970', value: 38 }, + { type: 'Democracies', year: '1980', value: 41 }, + { type: 'Democracies', year: '1990', value: 57 }, + { type: 'Democracies', year: '2000', value: 87 }, + { type: 'Democracies', year: '2010', value: 98 }, + { type: 'Democracies', year: '2018', value: 99 }, + { type: 'Price', year: '1930', value: 56 }, + { type: 'Price', year: '1940', value: 122 }, + { type: 'Price', year: '1950', value: 72 }, + { type: 'Price', year: '1960', value: 82 }, + { type: 'Price', year: '1970', value: 67 }, + { type: 'Price', year: '1980', value: 89 }, + { type: 'Price', year: '1990', value: 60 }, + { type: 'Price', year: '2000', value: 123 }, + { type: 'Price', year: '2010', value: 111 }, + { type: 'Price', year: '2018', value: 99 } + ] + }, + height: 500, + xField: 'year', + yField: 'value', + seriesField: 'type', + axes: [ + { + orient: 'bottom', + visible: true, + domainLine: { visible: true }, + tick: { visible: true } + }, + { + orient: 'left', + visible: true, + domainLine: { visible: false }, + tick: { visible: false } + } + ], + legends: { + visible: true + }, + indicator: { + visible: true + } +}; + +export const barStackedHorizontalSpec = { + type: 'bar', + //stack: true, + data: { + values: [ + { type: 'Autocracies', year: '1930', value: 129 }, + { type: 'Autocracies', year: '1940', value: 133 }, + { type: 'Autocracies', year: '1950', value: 130 }, + { type: 'Autocracies', year: '1960', value: 126 }, + { type: 'Autocracies', year: '1970', value: 117 }, + { type: 'Autocracies', year: '1980', value: 114 }, + { type: 'Autocracies', year: '1990', value: 111 }, + { type: 'Democracies', year: '1930', value: 22 }, + { type: 'Democracies', year: '1940', value: 13 }, + { type: 'Democracies', year: '1950', value: 25 }, + { type: 'Democracies', year: '1960', value: 29 }, + { type: 'Democracies', year: '1970', value: 38 }, + { type: 'Democracies', year: '1980', value: 41 }, + { type: 'Democracies', year: '1990', value: 57 }, + { type: 'Price', year: '1930', value: 56 }, + { type: 'Price', year: '1940', value: 122 }, + { type: 'Price', year: '1950', value: 72 }, + { type: 'Price', year: '1960', value: 82 }, + { type: 'Price', year: '1970', value: 67 }, + { type: 'Price', year: '1980', value: 89 }, + { type: 'Price', year: '1990', value: 60 }, + { type: 'D', year: '1930', value: 56 }, + { type: 'D', year: '1940', value: 122 }, + { type: 'D', year: '1950', value: 72 }, + { type: 'D', year: '1960', value: 82 }, + { type: 'D', year: '1970', value: 67 }, + { type: 'D', year: '1980', value: 89 }, + { type: 'D', year: '1990', value: 60 }, + { type: 'E', year: '1930', value: 56 }, + { type: 'E', year: '1940', value: 122 }, + { type: 'E', year: '1950', value: 72 }, + { type: 'E', year: '1960', value: 82 }, + { type: 'E', year: '1970', value: 67 }, + { type: 'E', year: '1980', value: 89 }, + { type: 'E', year: '1990', value: 60 } + ] + }, + height: 500, + direction: 'horizontal', + xField: 'value', + yField: 'year', + seriesField: 'type', + axes: [ + { + orient: 'left', + visible: true, + domainLine: { visible: true }, + tick: { visible: true } + }, + { + orient: 'bottom', + visible: true, + domainLine: { visible: false }, + tick: { visible: false } + } + ], + legends: { + visible: true + }, + indicator: { + visible: true + } +}; + +export const barStackedPercentSpec = { + type: 'bar', + stack: true, + percent: true, + data: { + values: [ + { type: 'Autocracies', year: '1930', value: 129 }, + { type: 'Autocracies', year: '1940', value: 133 }, + { type: 'Autocracies', year: '1950', value: 130 }, + { type: 'Autocracies', year: '1960', value: 126 }, + { type: 'Autocracies', year: '1970', value: 117 }, + { type: 'Autocracies', year: '1980', value: 114 }, + { type: 'Autocracies', year: '1990', value: 111 }, + { type: 'Autocracies', year: '2000', value: 89 }, + { type: 'Autocracies', year: '2010', value: 80 }, + { type: 'Autocracies', year: '2018', value: 80 }, + { type: 'Democracies', year: '1930', value: 22 }, + { type: 'Democracies', year: '1940', value: 13 }, + { type: 'Democracies', year: '1950', value: 25 }, + { type: 'Democracies', year: '1960', value: 29 }, + { type: 'Democracies', year: '1970', value: 38 }, + { type: 'Democracies', year: '1980', value: 41 }, + { type: 'Democracies', year: '1990', value: 57 }, + { type: 'Democracies', year: '2000', value: 87 }, + { type: 'Democracies', year: '2010', value: 98 }, + { type: 'Democracies', year: '2018', value: 99 }, + { type: 'Price', year: '1930', value: 56 }, + { type: 'Price', year: '1940', value: 122 }, + { type: 'Price', year: '1950', value: 72 }, + { type: 'Price', year: '1960', value: 82 }, + { type: 'Price', year: '1970', value: 67 }, + { type: 'Price', year: '1980', value: 89 }, + { type: 'Price', year: '1990', value: 60 }, + { type: 'Price', year: '2000', value: 123 }, + { type: 'Price', year: '2010', value: 111 }, + { type: 'Price', year: '2018', value: 99 } + ] + }, + height: 500, + xField: 'year', + yField: 'value', + seriesField: 'type', + axes: [ + { + orient: 'bottom', + visible: true, + domainLine: { visible: true }, + tick: { visible: true } + }, + { + orient: 'left', + visible: true, + domainLine: { visible: false }, + tick: { visible: false } + } + ], + legends: { + visible: true + }, + label: { + visible: false + } +}; + +export const lineSpec = { + type: 'line', + data: { + values: [ + { type: 'Nail polish', country: 'Africa', value: 4229 }, + { type: 'Nail polish', country: 'China', value: 3054 }, + { type: 'Nail polish', country: 'USA', value: 12814 }, + { type: 'Eyebrow pencil', country: 'Africa', value: 3932 }, + { type: 'Eyebrow pencil', country: 'China', value: 5067 }, + { type: 'Eyebrow pencil', country: 'USA', value: 13012 }, + { type: 'Rouge', country: 'Africa', value: 5221 }, + { type: 'Rouge', country: 'China', value: 7004 }, + { type: 'Rouge', country: 'USA', value: 11624 }, + { type: 'Lipstick', country: 'Africa', value: 9256 }, + { type: 'Lipstick', country: 'China', value: 9054 }, + { type: 'Lipstick', country: 'USA', value: 8814 }, + { type: 'Eyeshadows', country: 'Africa', value: 3308 }, + { type: 'Eyeshadows', country: 'China', value: 12043 }, + { type: 'Eyeshadows', country: 'USA', value: 12998 }, + { type: 'Eyeliner', country: 'Africa', value: 5432 }, + { type: 'Eyeliner', country: 'China', value: 15067 }, + { type: 'Eyeliner', country: 'USA', value: 12321 }, + { type: 'Foundation', country: 'Africa', value: 13701 }, + { type: 'Foundation', country: 'China', value: 10119 }, + { type: 'Foundation', country: 'USA', value: 10342 }, + { type: 'Lip gloss', country: 'Africa', value: 4008 }, + { type: 'Lip gloss', country: 'China', value: 12043 }, + { type: 'Lip gloss', country: 'USA', value: 22998 }, + { type: 'Mascara', country: 'Africa', value: 18712 }, + { type: 'Mascara', country: 'China', value: 10419 }, + { type: 'Mascara', country: 'USA', value: 11261 } + ] + }, + height: 600, + xField: ['type'], + yField: 'value', + seriesField: 'country', + legends: { + visible: true + }, + point: { + state: { + dimension_hover: { + visible: true, + size: 12 + } + } + }, + line: { + state: { + active: { + lineWidth: 3 + } + } + }, + interactions: [ + { + type: 'element-active-by-legend', + state: 'active' + } + ], + crosshair: { + xField: { + line: { + type: 'line', + style: { + lineWidth: 1 + } + } + } + } +}; + +export const ringSpec = { + type: 'pie', + data: [ + { + id: 'id0', + values: [ + { type: 'Category 1', value: '0.38' }, + { type: 'Category 2', value: '0.26' }, + { type: 'Category 3', value: '0.36' } + ] + } + ], + valueField: 'value', + categoryField: 'type', + legends: { + visible: true, + orient: 'bottom' + }, + interactions: [ + { + type: 'element-active-by-legend', + state: 'active' + } + ], + pie: { + state: { + active: { + lineWidth: 0 + } + } + }, + label: { + formatMethod: (value, data) => { + return { + type: 'rich', + text: [ + { + text: `${data.value}\n`, + fontSize: 18, + fontWeight: 'bold', + fill: 'black' + }, + { + text: data.type, + fill: '#595959' + } + ] + }; + } + }, + indicator: { + visible: true, + trigger: 'none', + title: { + visible: true, + style: { + text: '饼图', + fontSize: 30 + } + } + } +}; + +export const pieSpec = { + type: 'pie', + innerRadius: 0, + data: [ + { + id: 'id0', + values: [ + { type: 'Category 1', value: '0.38' }, + { type: 'Category 2', value: '0.26' }, + { type: 'Category 3', value: '0.36' } + ] + } + ], + valueField: 'value', + categoryField: 'type', + legends: { + visible: true, + orient: 'bottom' + }, + interactions: [ + { + type: 'element-active-by-legend', + state: 'active' + } + ], + pie: { + state: { + active: { + lineWidth: 0 + } + } + }, + label: { + formatMethod: (value, data) => { + return { + type: 'rich', + text: [ + { + text: `${data.value}\n`, + fontSize: 18, + fontWeight: 'bold', + fill: 'black' + }, + { + text: data.type, + fill: '#595959' + } + ] + }; + } + } +}; + +export const radarSpec = { + type: 'radar', + data: [ + { + id: 'radarData', + values: [ + { + key: 'Strength', + value: 6, + type: 'Risk' + }, + { + key: 'Speed', + value: 5, + type: 'Risk' + }, + { + key: 'Shooting', + value: 3, + type: 'Risk' + }, + { + key: 'Endurance', + value: 4, + type: 'Risk' + }, + { + key: 'Precision', + value: 5, + type: 'Risk' + }, + { + key: 'Strength', + value: 5, + type: 'Average risk' + }, + { + key: 'Speed', + value: 5, + type: 'Average risk' + }, + { + key: 'Shooting', + value: 5, + type: 'Average risk' + }, + { + key: 'Endurance', + value: 5, + type: 'Average risk' + }, + { + key: 'Precision', + value: 5, + type: 'Average risk' + } + ] + } + ], + categoryField: 'key', + valueField: 'value', + seriesField: 'type', + point: { + state: { + dimension_hover: { + visible: true, + size: 6 + } + } + }, + line: { + state: { + active: { + lineWidth: 2 + } + } + }, + area: { + visible: true, + state: { + active: { + fillOpacity: 0 + } + } + }, + crosshair: { + categoryField: { + line: { + style: { lineWidth: 1 } + } + } + }, + legends: { + visible: true + }, + outerRadius: 0.8, + interactions: [ + { + type: 'element-active-by-legend', + state: 'active' + } + ], + axes: [ + { + orient: 'radius', // radius axis + zIndex: 100, + min: 0, + max: 8, + grid: { smooth: false }, + label: { visible: true } + }, + { + orient: 'angle', // angle axis + zIndex: 50, + grid: { smooth: false }, + domainLine: { visible: false } + } + ] +}; + +export const funnelSpec = { + type: 'funnel', + categoryField: 'name', + valueField: 'value', + data: [ + { + id: 'funnel', + values: [ + { + value: 100, + name: 'Step1' + }, + { + value: 80, + name: 'Step2' + }, + { + value: 60, + name: 'Step3' + }, + { + value: 40, + name: 'Step4' + }, + { + value: 20, + name: 'Step5' + } + ] + } + ], + label: { + visible: true + }, + legends: { + visible: true, + orient: 'bottom' + } +}; + +export const areaSpec = { + type: 'area', + seriesMark: 'line', + data: { + values: [ + { type: 'Nail polish', country: 'Africa', value: 4229 }, + { type: 'Nail polish', country: 'China', value: 3054 }, + { type: 'Nail polish', country: 'USA', value: 12814 }, + { type: 'Eyebrow pencil', country: 'Africa', value: 3932 }, + { type: 'Eyebrow pencil', country: 'China', value: 5067 }, + { type: 'Eyebrow pencil', country: 'USA', value: 13012 }, + { type: 'Rouge', country: 'Africa', value: 5221 }, + { type: 'Rouge', country: 'China', value: 7004 }, + { type: 'Rouge', country: 'USA', value: 11624 }, + { type: 'Lipstick', country: 'Africa', value: 9256 }, + { type: 'Lipstick', country: 'China', value: 9054 }, + { type: 'Lipstick', country: 'USA', value: 8814 }, + { type: 'Eyeshadows', country: 'Africa', value: 3308 }, + { type: 'Eyeshadows', country: 'China', value: 12043 }, + { type: 'Eyeshadows', country: 'USA', value: 12998 }, + { type: 'Eyeliner', country: 'Africa', value: 5432 }, + { type: 'Eyeliner', country: 'China', value: 15067 }, + { type: 'Eyeliner', country: 'USA', value: 12321 }, + { type: 'Foundation', country: 'Africa', value: 13701 }, + { type: 'Foundation', country: 'China', value: 10119 }, + { type: 'Foundation', country: 'USA', value: 10342 }, + { type: 'Lip gloss', country: 'Africa', value: 4008 }, + { type: 'Lip gloss', country: 'China', value: 12043 }, + { type: 'Lip gloss', country: 'USA', value: 22998 }, + { type: 'Mascara', country: 'Africa', value: 18712 }, + { type: 'Mascara', country: 'China', value: 10419 }, + { type: 'Mascara', country: 'USA', value: 11261 } + ] + }, + height: 600, + xField: ['type'], + yField: 'value', + seriesField: 'country', + legends: { + visible: true + }, + line: { + style: { + curveType: 'linear' + } + }, + point: { + state: { + dimension_hover: { + visible: true, + size: 12 + } + } + }, + crosshair: { + xField: { + line: { + type: 'line', + style: { + lineWidth: 1 + } + } + } + }, + stack: false +}; + +export const gaugeSpec = { + type: 'gauge', + data: [ + { + id: 'id0', + values: [ + { + type: '目标A', + value: 45 + } + ] + } + ], + categoryField: 'type', + valueField: 'value', + outerRadius: 0.8, + innerRadius: 0.7, + startAngle: -180, + endAngle: 0, + indicator: [ + { + visible: true, + title: { + style: { + text: '45', + fontSize: 60, + fontWeight: 800 + } + } + } + ], + axes: [ + { + type: 'linear', + orient: 'angle', + min: 0, + max: 50, + offset: 20, + radius: 0.81, + grid: { visible: false }, + tick: { visible: true, tickSize: 5, style: { lineWidth: 1 } }, + subTick: { visible: true, tickSize: 3, style: { lineWidth: 1 } }, + label: { visible: true, style: { fill: 'black', fontSize: 12 } } + } + ] +}; + +export const horizontalBarSpec = { + type: 'bar', + data: [ + { + id: 'barData', + values: [ + { + province: '北京', + value: 3080, + type: 'top1' + }, + { + province: '天津', + value: 2880, + type: 'top2' + }, + { + province: '重庆', + value: 880, + type: 'top3' + }, + { + province: '深圳', + value: 780, + type: 'common' + }, + { + province: '广州', + value: 680, + type: 'common' + }, + { + province: '山东', + value: 580, + type: 'common' + }, + { + province: '浙江', + value: 480, + type: 'common' + }, + { + province: '福建', + value: 100, + type: 'common' + }, + { + province: '石家庄', + value: 100, + type: 'common' + }, + { + province: '广西壮族自治区', + value: 100, + type: 'common' + } + ] + } + ], + direction: 'horizontal', + xField: 'value', + yField: 'province', + seriesField: 'province', + padding: { right: 50, left: 10 }, + axes: [ + { + orient: 'bottom', + visible: false, + nice: false + }, + { + orient: 'left', + maxWidth: 65, + label: { + autoLimit: true + }, + domainLine: { + visible: false + }, + tick: { + visible: false + } + } + ], + stackCornerRadius: 0, + bar: { + style: { + cornerRadius: [5, 5, 5, 5], + height: 10 + } + }, + barBackground: { + visible: true, + style: { + cornerRadius: [5, 5, 5, 5], + height: 10 + }, + state: { + hover: { + stroke: '#D9D9D9', + lineWidth: 1 + } + } + }, + extensionMark: [ + { + type: 'text', + dataId: 'barData', + visible: true, + style: { + text: datum => datum.value, + fontSize: 12, + x: (datum, ctx) => { + return ctx.getRegion().getLayoutRect().width + 10; + }, + y: (datum, ctx) => { + return ctx.valueToY([datum.province]) + ctx.yBandwidth() / 2; + }, + textBaseline: 'middle', + textAlign: 'left', + fill: '#595959', + size: 20 + } + } + ], + crosshair: { + yField: { + visible: false + } + }, + tooltip: { + mark: { + title: { + visible: false + } + }, + dimension: { + title: { + visible: false + } + }, + style: { + shape: { + shapeType: 'circle' + } + } + } +}; + +export const scatterSpec = { + type: 'scatter', + data: [ + { + id: 'barData', + values: [ + { + gender: 'female', + height: 156.5, + weight: 51.6, + age: 26 + }, + { + gender: 'female', + height: 158, + weight: 59, + age: 22 + }, + { + gender: 'female', + height: 159, + weight: 49.2, + age: 23 + }, + { + gender: 'female', + height: 160, + weight: 63, + age: 31 + }, + { + gender: 'female', + height: 162, + weight: 53.6, + age: 30 + }, + { + gender: 'female', + height: 163, + weight: 59, + age: 17 + }, + { + gender: 'female', + height: 168, + weight: 47.6, + age: 18 + }, + { + gender: 'female', + height: 170, + weight: 69.8, + age: 26 + }, + { + gender: 'female', + height: 170.2, + weight: 66.8, + age: 25 + }, + { + gender: 'female', + height: 171, + weight: 75.2, + age: 27 + }, + { + gender: 'male', + height: 171.5, + weight: 65.6, + age: 29 + }, + { + gender: 'male', + height: 172, + weight: 71.8, + age: 15 + }, + { + gender: 'male', + height: 175, + weight: 80.7, + age: 18 + }, + { + gender: 'male', + height: 178, + weight: 72.6, + age: 19 + }, + { + gender: 'male', + height: 180, + weight: 78.8, + age: 21 + }, + { + gender: 'male', + height: 183, + weight: 74.8, + age: 25 + }, + { + gender: 'male', + height: 184, + weight: 86.4, + age: 27 + }, + { + gender: 'male', + height: 184, + weight: 78.4, + age: 23 + }, + { + gender: 'male', + height: 185, + weight: 62, + age: 28 + }, + { + gender: 'male', + height: 187, + weight: 91.6, + age: 50 + } + ] + } + ], + xField: 'height', + yField: 'weight', + seriesField: 'gender', + legends: { visible: true }, + crosshair: { + xField: { visible: false } + }, + interactions: [ + { + type: 'element-active-by-legend', + state: 'active' + } + ], + tooltip: { + dimension: { visible: false } + }, + point: { + state: { + active: { + size: 10, + fillOpacity: 0.6, + strokeOpacity: 0.6, + outerBorder: { + lineWidth: 1, + strokeOpacity: 0.2, + distance: 2 + } + } + } + }, + axes: [ + { + orient: 'bottom', + type: 'linear', + zero: false, + domainLine: { visible: true }, + grid: { visible: false } + } + ] +}; + +export const indicatorSankeySpec = { + type: 'sankey', + data: [ + { + id: 'sankeyData', + values: [ + { + links: [ + { + source: 'Opportunity Audience', + target: 'High Potential Users', + value: 199999 + }, + { + source: 'High Potential User 0', + target: 'High Potential Users', + value: 299999 + }, + { + source: 'First Course New Order', + target: 'High Potential Users', + value: 399999 + }, + { + source: 'First Course New Order', + target: 'Repeat Loyalty', + value: 499999 + }, + { + source: 'Deputy Purchase Loyalty', + target: 'High Potential Users', + value: 599999 + }, + { + source: 'Others', + value: 199999 + }, + { + target: 'First Order New Customer', + value: 999 + } + ] + } + ] + } + ], + dataId: 'sankeyData', + categoryField: 'name', + valueField: 'value', + sourceField: 'source', + targetField: 'target', + // nodeAlign: 'justify', + + dropIsolatedNode: false, + nodeGap: 2, + nodeWidth: 200, + + // nodeHeight: 100, + equalNodeHeight: true, + linkOverlap: 'center', + label: { + visible: false, + style: { + fontSize: 10 + } + }, + node: { + state: { + hover: { + stroke: '#333333' + }, + selected: { + lineWidth: 1, + brighter: 1, + fillOpacity: 0.1 + } + }, + style: { + fill: '#1664FF', + fillOpacity: 0, + lineWidth: 1, + stroke: '#1664FF', + html: (datum, a, c) => { + const color = '#1664FF'; + const hasSource = datum.targetLinks && datum.targetLinks.length; + + return { + style: ({ width, height }) => { + return { + 'border-right': `8px solid ${color}`, + width: `${width}px`, + height: `${height}px`, + background: hasSource ? color : 'transparent' + }; + }, + dom: `
+

${datum.key}

+

${datum.value}

+
` + }; + } + } + }, + link: { + style: { + fill: '#1664FF' + }, + state: { + hover: { + fillOpacity: 1 + }, + selected: { + fill: '#1664FF', + stroke: '', + lineWidth: 1, + brighter: 1, + fillOpacity: 0.2 + } + } + } +}; diff --git a/packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/charts.jsx b/packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/charts.jsx new file mode 100644 index 0000000..f1cde20 --- /dev/null +++ b/packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/charts.jsx @@ -0,0 +1,45 @@ +import React from 'react'; +import { isMobile } from 'react-device-detect'; +import { charts } from './chart-list'; +import { VChart as VChartComponent } from '@visactor/react-vchart'; +import VChart from '@visactor/vchart'; +import { chartHubLightTheme } from '@visactor/vchart-theme'; + +import { Card } from '@douyinfe/semi-ui'; +import { Grid } from '@arco-design/web-react'; + +const { Row, Col } = Grid; + +const chartHeight = 400; + +const gutter = 16; + +VChart.ThemeManager.registerTheme('chart-hub-light', chartHubLightTheme); +VChart.ThemeManager.setCurrentTheme('chart-hub-light'); + +const Charts = () => { + return ( + + {charts.map((chart, i) => { + return ( + + + + + + ); + })} + + ); +}; + +export default Charts; diff --git a/packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/createServiceWorker.js b/packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/createServiceWorker.js new file mode 100644 index 0000000..12c55a5 --- /dev/null +++ b/packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/createServiceWorker.js @@ -0,0 +1,52 @@ +// In production, we register a service worker to serve assets from local cache. + +// This lets the app load faster on subsequent visits in production, and gives +// it offline capabilities. However, it also means that developers (and users) +// will only see deployed updates on the "N+1" visit to a page, since previously +// cached resources are updated in the background. + +// To learn more about the benefits of this model, read https://goo.gl/KwvDNy. +// This link also includes instructions on opting out of this behavior. + +export default function register() { + if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) { + window.addEventListener('load', () => { + const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`; + navigator.serviceWorker + .register(swUrl) + .then((registration) => { + // eslint-disable-next-line no-param-reassign + registration.onupdatefound = () => { + const installingWorker = registration.installing; + installingWorker.onstatechange = () => { + if (installingWorker.state === 'installed') { + if (navigator.serviceWorker.controller) { + // At this point, the old content will have been purged and + // the fresh content will have been added to the cache. + // It's the perfect time to display a "New content is + // available; please refresh." message in your web app. + console.log('New content is available; please refresh.'); // eslint-disable-line no-console + } else { + // At this point, everything has been precached. + // It's the perfect time to display a + // "Content is cached for offline use." message. + console.log('Content is cached for offline use.'); // eslint-disable-line no-console + } + } + }; + }; + }) + .catch((error) => { + console.error('Error during service worker registration:', error); + }); + }); + } +} + +export function unregister() { + if ('serviceWorker' in navigator) { + navigator.serviceWorker.ready.then((registration) => { + registration.unregister(); + }); + } +} diff --git a/packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/frame.jsx b/packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/frame.jsx new file mode 100644 index 0000000..6401da9 --- /dev/null +++ b/packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/frame.jsx @@ -0,0 +1,43 @@ +import React from 'react'; +import { Nav, Avatar } from '@douyinfe/semi-ui'; +import { IconFeishuLogo, IconHelpCircle, IconBell } from '@douyinfe/semi-icons'; +import styles from './index.module.less'; +import Charts from './charts.jsx'; + +const Frame = () => { + return ( +
+
+ } + className={styles.nav} + > +
+
+
+ +
+
+
+ + ); +}; + +export default Frame; diff --git a/packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/index.jsx b/packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/index.jsx new file mode 100644 index 0000000..a21b4e7 --- /dev/null +++ b/packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/index.jsx @@ -0,0 +1 @@ +export * as ChartHubThemePage from './frame'; diff --git a/packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/index.module.less b/packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/index.module.less new file mode 100644 index 0000000..3e31bf1 --- /dev/null +++ b/packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/index.module.less @@ -0,0 +1,129 @@ +.rootSidenav { + align-items: flex-start; + background: var(--semi-color-fill-0); + flex-direction: column; + overflow: hidden; + row-gap: 0; + display: flex; + color: var(--semi-color-text-0); + font-family: Inter; + font-size: 20px; + font-weight: 600; + letter-spacing: -0.6px; + line-height: 28px; + text-align: left; + + .nav { + align-self: stretch; + height: 60px; + + .navigationHeaderLogo { + align-items: flex-start; + column-gap: 0; + display: inline-flex; + flex-shrink: 0; + + .semiIconsSemiLogo { + font-size: 36px; + color: var(--semi-color-text-0); + } + } + + .dIV { + align-items: center; + column-gap: 16px; + display: inline-flex; + flex-shrink: 0; + + .semiIconsFeishuLogo, + .semiIconsHelpCircle, + .semiIconsBell { + font-size: 20px; + color: var(--semi-color-text-2); + } + + .avatar { + height: 32px; + width: 32px; + } + } + } + + .main { + align-items: flex-start; + column-gap: 0; + display: flex; + flex-shrink: 0; + align-self: stretch; + + .left { + height: calc(100vh - 60px); + + .navItem, + .navItem5 { + width: 223px; + + .iconIntro, + .iconRadio { + height: 20px; + position: relative; + width: 20px; + } + } + + .navItem1, + .navItem2, + .navItem3, + .navItem4, + .navItem6, + .navItem7 { + width: 223px; + + .iconHeart, + .iconCalendar, + .iconCheckbox, + .iconCalendar, + .iconList, + .iconToast { + height: 20px; + width: 20px; + } + } + } + + .right { + height: calc(100vh - 60px); + overflow-y: auto; + align-items: flex-start; + display: flex; + flex-basis: 0; + flex-direction: column; + padding: 40px; + row-gap: 24px; + flex-grow: 1; + + .item { + min-width: 90px; + vertical-align: middle; + flex-shrink: 0; + } + + .frame1321317607 { + align-items: center; + border-radius: 12px; + display: flex; + flex-direction: row; + flex-shrink: 0; + color: var(--semi-color-disabled-text); + font-size: 14px; + letter-spacing: -0.14px; + line-height: 20px; + + .yourContentHere { + vertical-align: middle; + min-width: 123px; + } + } + } + } +} diff --git a/packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/normalize.css b/packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/normalize.css new file mode 100644 index 0000000..0375ff2 --- /dev/null +++ b/packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/normalize.css @@ -0,0 +1,128 @@ +* { + box-sizing: border-box; +} + +html, +body, +div, +span, +applet, +object, +iframe, +h1, +h2, +h3, +h4, +h5, +h6, +p, +blockquote, +pre, +a, +abbr, +acronym, +address, +big, +cite, +code, +del, +dfn, +em, +img, +ins, +kbd, +q, +s, +samp, +small, +strike, +strong, +sub, +sup, +tt, +var, +b, +u, +i, +center, +dl, +dt, +dd, +ol, +ul, +li, +fieldset, +form, +label, +legend, +table, +caption, +tbody, +tfoot, +thead, +tr, +th, +td, +article, +aside, +canvas, +details, +embed, +figure, +figcaption, +footer, +header, +hgroup, +menu, +nav, +output, +ruby, +section, +summary, +time, +mark, +audio, +video { + /* margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline; */ +} +/* HTML5 display-role reset for older browsers */ +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +menu, +nav, +section { + display: block; +} +body { + line-height: 1; +} +ol, +ul { + list-style: none; +} +blockquote, +q { + quotes: none; +} +blockquote:before, +blockquote:after, +q:before, +q:after { + content: ''; + content: none; +} +table { + border-collapse: collapse; + border-spacing: 0; +} diff --git a/packages/vchart-theme-demo-component/tsconfig.eslint.json b/packages/vchart-theme-demo-component/tsconfig.eslint.json new file mode 100644 index 0000000..b63b093 --- /dev/null +++ b/packages/vchart-theme-demo-component/tsconfig.eslint.json @@ -0,0 +1,10 @@ +{ + "extends": "@internal/ts-config/tsconfig.base.json", + "compilerOptions": { + "types": ["jest", "offscreencanvas", "node"], + "lib": ["DOM", "ESNext"], + "baseUrl": "./", + "rootDir": "./" + }, + "include": ["src", "vite"] +} diff --git a/packages/vchart-theme-demo-component/tsconfig.json b/packages/vchart-theme-demo-component/tsconfig.json new file mode 100644 index 0000000..47fb0bf --- /dev/null +++ b/packages/vchart-theme-demo-component/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "@internal/ts-config/tsconfig.base.json", + "compilerOptions": { + "baseUrl": ".", + "outDir": "output" + }, + "include": [ + "src" + ] +} diff --git a/packages/vchart-theme-demo-component/vite/index.html b/packages/vchart-theme-demo-component/vite/index.html new file mode 100644 index 0000000..ac77894 --- /dev/null +++ b/packages/vchart-theme-demo-component/vite/index.html @@ -0,0 +1,13 @@ + + + + + + + React App + + +
+ + + diff --git a/packages/vchart-theme-demo-component/vite/public/vite.svg b/packages/vchart-theme-demo-component/vite/public/vite.svg new file mode 100644 index 0000000..e7b8dfb --- /dev/null +++ b/packages/vchart-theme-demo-component/vite/public/vite.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/vchart-theme-demo-component/vite/src/App.tsx b/packages/vchart-theme-demo-component/vite/src/App.tsx new file mode 100644 index 0000000..5cf8ea2 --- /dev/null +++ b/packages/vchart-theme-demo-component/vite/src/App.tsx @@ -0,0 +1,18 @@ +import React from 'react'; + +import ChartHubThemePage from '../../src/vchart-chart-hub-theme/frame'; +import './index.less'; + +function App() { + return ( + <> +
+
+ ; +
+
+ + ); +} + +export default App; diff --git a/packages/vchart-theme-demo-component/vite/src/index.less b/packages/vchart-theme-demo-component/vite/src/index.less new file mode 100644 index 0000000..bd99c7e --- /dev/null +++ b/packages/vchart-theme-demo-component/vite/src/index.less @@ -0,0 +1,31 @@ +.theme-demo-container { + width: 100%; + height: 100%; + background: var(--color-fill-2); + display: flex; + flex-direction: column; +} + +@theme-demo-iframe-margin: 30px; + +.theme-demo-iframe { + margin: @theme-demo-iframe-margin; + width: calc(100% - @theme-demo-iframe-margin * 2); + height: calc(100% - @theme-demo-iframe-margin * 2); + border: 1px solid var(--color-neutral-3); + border-radius: 10px; + box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); + overflow-x: clip; + overflow-y: clip; +} + +.theme-demo-description { + margin: -20px @theme-demo-iframe-margin - 10px -10px; + a { + color: rgb(var(--arcoblue-6)); + } +} + +.theme-demo-description h2 { + margin-top: 1em !important; +} diff --git a/packages/vchart-theme-demo-component/vite/src/index.tsx b/packages/vchart-theme-demo-component/vite/src/index.tsx new file mode 100644 index 0000000..9fc7d21 --- /dev/null +++ b/packages/vchart-theme-demo-component/vite/src/index.tsx @@ -0,0 +1,5 @@ +import React from 'react'; +import ReactDOM from 'react-dom'; +import App from './App.tsx'; + +ReactDOM.render(, document.getElementById('root') as HTMLElement); diff --git a/packages/vchart-theme-demo-component/vite/src/vite-env.d.ts b/packages/vchart-theme-demo-component/vite/src/vite-env.d.ts new file mode 100644 index 0000000..11f02fe --- /dev/null +++ b/packages/vchart-theme-demo-component/vite/src/vite-env.d.ts @@ -0,0 +1 @@ +/// diff --git a/packages/vchart-theme-demo-component/vite/tsconfig.json b/packages/vchart-theme-demo-component/vite/tsconfig.json new file mode 100644 index 0000000..600676a --- /dev/null +++ b/packages/vchart-theme-demo-component/vite/tsconfig.json @@ -0,0 +1,26 @@ +{ + "compilerOptions": { + "target": "ESNext", + "lib": ["DOM", "DOM.Iterable", "ESNext"], + "module": "ESNext", + "skipLibCheck": true, + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "react", + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src"], + "references": [ + { + "path": "./tsconfig.node.json" + } + ] +} diff --git a/packages/vchart-theme-demo-component/vite/tsconfig.node.json b/packages/vchart-theme-demo-component/vite/tsconfig.node.json new file mode 100644 index 0000000..42872c5 --- /dev/null +++ b/packages/vchart-theme-demo-component/vite/tsconfig.node.json @@ -0,0 +1,10 @@ +{ + "compilerOptions": { + "composite": true, + "skipLibCheck": true, + "module": "ESNext", + "moduleResolution": "bundler", + "allowSyntheticDefaultImports": true + }, + "include": ["vite.config.ts"] +} diff --git a/packages/vchart-theme-demo-component/vite/vite.config.ts b/packages/vchart-theme-demo-component/vite/vite.config.ts new file mode 100644 index 0000000..c8f4f28 --- /dev/null +++ b/packages/vchart-theme-demo-component/vite/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite'; +import react from '@vitejs/plugin-react'; + +// https://vitejs.dev/config/ +export default defineConfig({ + plugins: [react({ jsxRuntime: 'classic' })] +}); diff --git a/rush.json b/rush.json index 26ac418..07ec20e 100644 --- a/rush.json +++ b/rush.json @@ -19,6 +19,16 @@ }, "allowedProjectTags": ["tool", "share", "package", "doc"], "projects": [ + { + "packageName": "@visactor/test", + "projectFolder": "packages/test", + "shouldPublish": false + }, + { + "packageName": "@visactor/vchart-theme-demo-component", + "projectFolder": "packages/vchart-theme-demo-component", + "shouldPublish": false + }, { "packageName": "@visactor/vchart-theme", "projectFolder": "packages/vchart-theme", @@ -92,4 +102,4 @@ "shouldPublish": false } ] -} +} \ No newline at end of file From 3cd2d43700ebb211696e4b624b3de1dbb8235252 Mon Sep 17 00:00:00 2001 From: xiaoluoHe Date: Fri, 7 Jun 2024 17:06:07 +0800 Subject: [PATCH 02/16] chore: modify bundler config --- .../vchart-theme-demo-component/bundler.config.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/packages/vchart-theme-demo-component/bundler.config.js b/packages/vchart-theme-demo-component/bundler.config.js index d7f1972..b5c5728 100644 --- a/packages/vchart-theme-demo-component/bundler.config.js +++ b/packages/vchart-theme-demo-component/bundler.config.js @@ -1,7 +1,13 @@ - /** - * @type {Partial} + * @type {Partial} */ module.exports = { - formats: ["cjs", "es", "umd"], + formats: ['cjs', 'es', 'umd'], + outputDir: { + es: 'esm', + cjs: 'cjs', + umd: 'build' + }, + name: 'vchart-theme-demo-component', + umdOutputFilename: 'index' }; From c7329b565bb8ae6bfdfc55d5943a4e9fa7e60a53 Mon Sep 17 00:00:00 2001 From: xiaoluoHe Date: Fri, 7 Jun 2024 17:45:45 +0800 Subject: [PATCH 03/16] chore: fix build error --- common/config/rush/pnpm-lock.yaml | 47 ++++------------- .../vchart-theme-demo-component/.eslintrc.js | 2 +- .../bundler.config.js | 9 ++-- .../vchart-theme-demo-component/package.json | 12 +++-- .../src/declaration.d.ts | 23 ++++++++ .../vchart-theme-demo-component/src/index.jsx | 2 - .../vchart-theme-demo-component/src/index.ts | 2 + .../src/vchart-chart-hub-theme/chartSpec.ts | 14 ++--- .../{charts.jsx => charts.tsx} | 2 +- .../createServiceWorker.js | 52 ------------------- .../{frame.jsx => frame.tsx} | 0 .../{index.jsx => index.tsx} | 0 .../vchart-theme-demo-component/tsconfig.json | 19 +++++-- rush.json | 7 +-- 14 files changed, 68 insertions(+), 123 deletions(-) create mode 100644 packages/vchart-theme-demo-component/src/declaration.d.ts delete mode 100644 packages/vchart-theme-demo-component/src/index.jsx create mode 100644 packages/vchart-theme-demo-component/src/index.ts rename packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/{charts.jsx => charts.tsx} (91%) delete mode 100644 packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/createServiceWorker.js rename packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/{frame.jsx => frame.tsx} (100%) rename packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/{index.jsx => index.tsx} (100%) diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index b29af62..cc42062 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -306,6 +306,9 @@ importers: '@internal/eslint-config': workspace:* '@internal/ts-config': workspace:* '@rushstack/eslint-patch': ~1.1.4 + '@types/jest': ~29.5.0 + '@types/node': '*' + '@types/offscreencanvas': 2019.6.4 '@types/react': ^17.0.0 '@types/react-dom': ^17.0.0 '@visactor/react-vchart': 1.11.0 @@ -321,8 +324,8 @@ importers: vite: ^4.5.0 dependencies: '@arco-design/web-react': 2.61.2_42iwexueogtmu5amowprdpoisy - '@douyinfe/semi-icons': 2.59.1_react@18.2.0 - '@douyinfe/semi-icons-lab': 2.59.1_biqbaboplfbrettd7655fr4n2y + '@douyinfe/semi-icons': 2.60.0_react@18.2.0 + '@douyinfe/semi-icons-lab': 2.60.0_biqbaboplfbrettd7655fr4n2y '@douyinfe/semi-ui': 2.55.5_biqbaboplfbrettd7655fr4n2y '@visactor/react-vchart': 1.11.0_biqbaboplfbrettd7655fr4n2y '@visactor/vchart': 1.11.0 @@ -333,6 +336,9 @@ importers: '@internal/eslint-config': link:../../share/eslint-config '@internal/ts-config': link:../../share/ts-config '@rushstack/eslint-patch': 1.1.4 + '@types/jest': 29.5.12 + '@types/node': 20.12.7 + '@types/offscreencanvas': 2019.6.4 '@types/react': 17.0.80 '@types/react-dom': 17.0.25 '@vitejs/plugin-react': 4.2.1_vite@4.5.3 @@ -341,7 +347,7 @@ importers: react-device-detect: 2.2.3_biqbaboplfbrettd7655fr4n2y react-dom: 18.2.0_react@18.2.0 typescript: 4.9.5 - vite: 4.5.3 + vite: 4.5.3_@types+node@20.12.7 ../../packages/vchart-theme-utils: specifiers: @@ -12283,41 +12289,6 @@ packages: - typescript dev: true - /vite/4.5.3: - resolution: {integrity: sha512-kQL23kMeX92v3ph7IauVkXkikdDRsYMGTVl5KY2E9OY4ONLvkHf04MDTbnfo6NKxZiDLWzVpP5oTa8hQD8U3dg==} - engines: {node: ^14.18.0 || >=16.0.0} - hasBin: true - peerDependencies: - '@types/node': '>= 14' - less: '*' - lightningcss: ^1.21.0 - sass: '*' - stylus: '*' - sugarss: '*' - terser: ^5.4.0 - peerDependenciesMeta: - '@types/node': - optional: true - less: - optional: true - lightningcss: - optional: true - sass: - optional: true - stylus: - optional: true - sugarss: - optional: true - terser: - optional: true - dependencies: - esbuild: 0.18.20 - postcss: 8.4.38 - rollup: 3.29.4 - optionalDependencies: - fsevents: 2.3.3 - dev: true - /vite/4.5.3_@types+node@20.12.7: resolution: {integrity: sha512-kQL23kMeX92v3ph7IauVkXkikdDRsYMGTVl5KY2E9OY4ONLvkHf04MDTbnfo6NKxZiDLWzVpP5oTa8hQD8U3dg==} engines: {node: ^14.18.0 || >=16.0.0} diff --git a/packages/vchart-theme-demo-component/.eslintrc.js b/packages/vchart-theme-demo-component/.eslintrc.js index a32edaf..5955de8 100644 --- a/packages/vchart-theme-demo-component/.eslintrc.js +++ b/packages/vchart-theme-demo-component/.eslintrc.js @@ -1,7 +1,7 @@ require('@rushstack/eslint-patch/modern-module-resolution'); module.exports = { - extends: ['@internal/eslint-config/profile/lib'], + extends: ['@internal/eslint-config/profile/react'], overrides: [ { files: ['**/__tests__/**', '**/*.test.ts'], diff --git a/packages/vchart-theme-demo-component/bundler.config.js b/packages/vchart-theme-demo-component/bundler.config.js index b5c5728..633131e 100644 --- a/packages/vchart-theme-demo-component/bundler.config.js +++ b/packages/vchart-theme-demo-component/bundler.config.js @@ -2,12 +2,9 @@ * @type {Partial} */ module.exports = { - formats: ['cjs', 'es', 'umd'], + formats: ['cjs', 'es'], outputDir: { es: 'esm', - cjs: 'cjs', - umd: 'build' - }, - name: 'vchart-theme-demo-component', - umdOutputFilename: 'index' + cjs: 'cjs' + } }; diff --git a/packages/vchart-theme-demo-component/package.json b/packages/vchart-theme-demo-component/package.json index 2c3d85f..c81b39d 100644 --- a/packages/vchart-theme-demo-component/package.json +++ b/packages/vchart-theme-demo-component/package.json @@ -4,12 +4,11 @@ "description": "theme demo page in vchart site", "sideEffects": false, "main": "cjs/index.js", - "module": "es/index.js", - "types": "es/index.d.ts", + "module": "esm/index.js", + "types": "esm/index.d.ts", "files": [ "cjs", - "es", - "dist" + "esm" ], "scripts": { "compile": "tsc --noEmit", @@ -43,6 +42,9 @@ "eslint": "~8.18.0", "vite": "^4.5.0", "typescript": "4.9.5", - "react-device-detect": "^2.2.2" + "react-device-detect": "^2.2.2", + "@types/jest": "~29.5.0", + "@types/offscreencanvas": "2019.6.4", + "@types/node": "*" } } diff --git a/packages/vchart-theme-demo-component/src/declaration.d.ts b/packages/vchart-theme-demo-component/src/declaration.d.ts new file mode 100644 index 0000000..68479f8 --- /dev/null +++ b/packages/vchart-theme-demo-component/src/declaration.d.ts @@ -0,0 +1,23 @@ +// @ts-ignore +declare module '*.less' { + const classes: { [className: string]: string }; + export default classes; +} + +declare module '*/settings.json' { + const value: { + colorWeek: boolean; + navbar: boolean; + menu: boolean; + footer: boolean; + themeColor: string; + menuWidth: number; + }; + + export default value; +} + +declare module '*.png' { + const value: string; + export default value; +} diff --git a/packages/vchart-theme-demo-component/src/index.jsx b/packages/vchart-theme-demo-component/src/index.jsx deleted file mode 100644 index ecea4e4..0000000 --- a/packages/vchart-theme-demo-component/src/index.jsx +++ /dev/null @@ -1,2 +0,0 @@ -import ChartHubThemePage from './vchart-chart-hub-theme/index'; -export { ChartHubThemePage }; diff --git a/packages/vchart-theme-demo-component/src/index.ts b/packages/vchart-theme-demo-component/src/index.ts new file mode 100644 index 0000000..b4f941b --- /dev/null +++ b/packages/vchart-theme-demo-component/src/index.ts @@ -0,0 +1,2 @@ +import { ChartHubThemePage } from './vchart-chart-hub-theme/index'; +export { ChartHubThemePage }; diff --git a/packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/chartSpec.ts b/packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/chartSpec.ts index 4fb7e02..13a0a3d 100644 --- a/packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/chartSpec.ts +++ b/packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/chartSpec.ts @@ -444,7 +444,7 @@ export const ringSpec = { } }, label: { - formatMethod: (value, data) => { + formatMethod: (value: any, data: any) => { return { type: 'rich', text: [ @@ -508,7 +508,7 @@ export const pieSpec = { } }, label: { - formatMethod: (value, data) => { + formatMethod: (value: any, data: any) => { return { type: 'rich', text: [ @@ -912,12 +912,12 @@ export const horizontalBarSpec = { dataId: 'barData', visible: true, style: { - text: datum => datum.value, + text: (datum: any) => datum.value, fontSize: 12, - x: (datum, ctx) => { + x: (datum: any, ctx: any) => { return ctx.getRegion().getLayoutRect().width + 10; }, - y: (datum, ctx) => { + y: (datum: any, ctx: any) => { return ctx.valueToY([datum.province]) + ctx.yBandwidth() / 2; }, textBaseline: 'middle', @@ -1203,12 +1203,12 @@ export const indicatorSankeySpec = { fillOpacity: 0, lineWidth: 1, stroke: '#1664FF', - html: (datum, a, c) => { + html: (datum: any, a: any, c: any) => { const color = '#1664FF'; const hasSource = datum.targetLinks && datum.targetLinks.length; return { - style: ({ width, height }) => { + style: ({ width, height }: any) => { return { 'border-right': `8px solid ${color}`, width: `${width}px`, diff --git a/packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/charts.jsx b/packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/charts.tsx similarity index 91% rename from packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/charts.jsx rename to packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/charts.tsx index f1cde20..2faeb94 100644 --- a/packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/charts.jsx +++ b/packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/charts.tsx @@ -23,7 +23,7 @@ const Charts = () => { {charts.map((chart, i) => { return ( - + { - const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`; - navigator.serviceWorker - .register(swUrl) - .then((registration) => { - // eslint-disable-next-line no-param-reassign - registration.onupdatefound = () => { - const installingWorker = registration.installing; - installingWorker.onstatechange = () => { - if (installingWorker.state === 'installed') { - if (navigator.serviceWorker.controller) { - // At this point, the old content will have been purged and - // the fresh content will have been added to the cache. - // It's the perfect time to display a "New content is - // available; please refresh." message in your web app. - console.log('New content is available; please refresh.'); // eslint-disable-line no-console - } else { - // At this point, everything has been precached. - // It's the perfect time to display a - // "Content is cached for offline use." message. - console.log('Content is cached for offline use.'); // eslint-disable-line no-console - } - } - }; - }; - }) - .catch((error) => { - console.error('Error during service worker registration:', error); - }); - }); - } -} - -export function unregister() { - if ('serviceWorker' in navigator) { - navigator.serviceWorker.ready.then((registration) => { - registration.unregister(); - }); - } -} diff --git a/packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/frame.jsx b/packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/frame.tsx similarity index 100% rename from packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/frame.jsx rename to packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/frame.tsx diff --git a/packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/index.jsx b/packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/index.tsx similarity index 100% rename from packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/index.jsx rename to packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/index.tsx diff --git a/packages/vchart-theme-demo-component/tsconfig.json b/packages/vchart-theme-demo-component/tsconfig.json index 47fb0bf..ef0694a 100644 --- a/packages/vchart-theme-demo-component/tsconfig.json +++ b/packages/vchart-theme-demo-component/tsconfig.json @@ -1,10 +1,19 @@ { "extends": "@internal/ts-config/tsconfig.base.json", "compilerOptions": { - "baseUrl": ".", - "outDir": "output" + "jsx": "react", + "baseUrl": "./", + "rootDir": "./src", + "types": ["jest", "offscreencanvas", "node"], + "lib": ["DOM", "ESNext"], + "composite": true, + "outDir": "./esm" }, - "include": [ - "src" - ] + "ts-node": { + "transpileOnly": true, + "compilerOptions": { + "module": "commonjs" + } + }, + "include": ["src"] } diff --git a/rush.json b/rush.json index 07ec20e..7bd15c8 100644 --- a/rush.json +++ b/rush.json @@ -19,11 +19,6 @@ }, "allowedProjectTags": ["tool", "share", "package", "doc"], "projects": [ - { - "packageName": "@visactor/test", - "projectFolder": "packages/test", - "shouldPublish": false - }, { "packageName": "@visactor/vchart-theme-demo-component", "projectFolder": "packages/vchart-theme-demo-component", @@ -102,4 +97,4 @@ "shouldPublish": false } ] -} \ No newline at end of file +} From de783fc37d2a686a93fcdb71d526f35aeabf9635 Mon Sep 17 00:00:00 2001 From: xiaoluoHe Date: Fri, 7 Jun 2024 17:51:35 +0800 Subject: [PATCH 04/16] chore: update version --- packages/vchart-theme-demo-component/package.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/vchart-theme-demo-component/package.json b/packages/vchart-theme-demo-component/package.json index c81b39d..1c135b1 100644 --- a/packages/vchart-theme-demo-component/package.json +++ b/packages/vchart-theme-demo-component/package.json @@ -1,6 +1,6 @@ { "name": "@visactor/vchart-theme-demo-component", - "version": "0.0.1", + "version": "0.0.1-alpha.0", "description": "theme demo page in vchart site", "sideEffects": false, "main": "cjs/index.js", @@ -46,5 +46,8 @@ "@types/jest": "~29.5.0", "@types/offscreencanvas": "2019.6.4", "@types/node": "*" + }, + "publishConfig": { + "access": "public" } } From f85d7f04d5d588ee00ca789620adaf786c6f7ad0 Mon Sep 17 00:00:00 2001 From: xiaoluoHe Date: Fri, 7 Jun 2024 18:13:00 +0800 Subject: [PATCH 05/16] chore: update dependency --- packages/vchart-theme-demo-component/package.json | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/packages/vchart-theme-demo-component/package.json b/packages/vchart-theme-demo-component/package.json index 1c135b1..b646c43 100644 --- a/packages/vchart-theme-demo-component/package.json +++ b/packages/vchart-theme-demo-component/package.json @@ -1,6 +1,6 @@ { "name": "@visactor/vchart-theme-demo-component", - "version": "0.0.1-alpha.0", + "version": "0.0.1-alpha.2", "description": "theme demo page in vchart site", "sideEffects": false, "main": "cjs/index.js", @@ -24,15 +24,12 @@ "@douyinfe/semi-icons": "latest", "@douyinfe/semi-icons-lab": "latest", "@arco-design/web-react": "^2.32.2", - "@visactor/vchart-theme-utils": "workspace:1.11.0", - "@visactor/vchart-theme": "workspace:1.11.0", + "@visactor/vchart-theme-utils": "1.11.0", + "@visactor/vchart-theme": "1.11.0", "@visactor/vchart": "1.11.0", "@visactor/react-vchart": "1.11.0" }, "devDependencies": { - "@internal/bundler": "workspace:*", - "@internal/eslint-config": "workspace:*", - "@internal/ts-config": "workspace:*", "@rushstack/eslint-patch": "~1.1.4", "react": "^18.0.0", "react-dom": "^18.0.0", From 03ac0989e7651ac059be23a1933912672313aa15 Mon Sep 17 00:00:00 2001 From: xiaoluoHe Date: Tue, 11 Jun 2024 11:52:18 +0800 Subject: [PATCH 06/16] chore: use css instead of less --- .../vchart-theme-demo-component/package.json | 1 + .../src/vchart-chart-hub-theme/frame.tsx | 22 ++-- .../src/vchart-chart-hub-theme/style.css | 113 ++++++++++++++++++ 3 files changed, 125 insertions(+), 11 deletions(-) create mode 100644 packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/style.css diff --git a/packages/vchart-theme-demo-component/package.json b/packages/vchart-theme-demo-component/package.json index b646c43..b84c442 100644 --- a/packages/vchart-theme-demo-component/package.json +++ b/packages/vchart-theme-demo-component/package.json @@ -14,6 +14,7 @@ "compile": "tsc --noEmit", "eslint": "eslint --debug --fix src/", "build": "bundle", + "buildLess": "DEBUG='Bundler*' bundle --less true", "dev": "bundle --clean -f es -w", "start": "vite ./vite", "start1": "vite ./vite1", diff --git a/packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/frame.tsx b/packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/frame.tsx index 6401da9..47c2099 100644 --- a/packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/frame.tsx +++ b/packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/frame.tsx @@ -1,37 +1,37 @@ import React from 'react'; import { Nav, Avatar } from '@douyinfe/semi-ui'; import { IconFeishuLogo, IconHelpCircle, IconBell } from '@douyinfe/semi-icons'; -import styles from './index.module.less'; +import './style.css'; import Charts from './charts.jsx'; const Frame = () => { return ( -
+
-
-
-
+
+
+
diff --git a/packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/style.css b/packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/style.css new file mode 100644 index 0000000..3e2c45c --- /dev/null +++ b/packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/style.css @@ -0,0 +1,113 @@ +.rootSidenav { + align-items: flex-start; + background: var(--semi-color-fill-0); + flex-direction: column; + overflow: hidden; + row-gap: 0; + display: flex; + color: var(--semi-color-text-0); + font-family: Inter; + font-size: 20px; + font-weight: 600; + letter-spacing: -0.6px; + line-height: 28px; + text-align: left; + .nav { + align-self: stretch; + height: 60px; + .navigationHeaderLogo { + align-items: flex-start; + column-gap: 0; + display: inline-flex; + flex-shrink: 0; + .semiIconsSemiLogo { + font-size: 36px; + color: var(--semi-color-text-0); + } + } + .dIV { + align-items: center; + column-gap: 16px; + display: inline-flex; + flex-shrink: 0; + .semiIconsFeishuLogo, + .semiIconsHelpCircle, + .semiIconsBell { + font-size: 20px; + color: var(--semi-color-text-2); + } + .avatar { + height: 32px; + width: 32px; + } + } + } + .main { + align-items: flex-start; + column-gap: 0; + display: flex; + flex-shrink: 0; + align-self: stretch; + .left { + height: calc(100vh - 60px); + .navItem, + .navItem5 { + width: 223px; + .iconIntro, + .iconRadio { + height: 20px; + position: relative; + width: 20px; + } + } + .navItem1, + .navItem2, + .navItem3, + .navItem4, + .navItem6, + .navItem7 { + width: 223px; + .iconHeart, + .iconCalendar, + .iconCheckbox, + .iconCalendar, + .iconList, + .iconToast { + height: 20px; + width: 20px; + } + } + } + .right { + height: calc(100vh - 60px); + overflow-y: auto; + align-items: flex-start; + display: flex; + flex-basis: 0; + flex-direction: column; + padding: 40px; + row-gap: 24px; + flex-grow: 1; + .item { + min-width: 90px; + vertical-align: middle; + flex-shrink: 0; + } + .frame1321317607 { + align-items: center; + border-radius: 12px; + display: flex; + flex-direction: row; + flex-shrink: 0; + color: var(--semi-color-disabled-text); + font-size: 14px; + letter-spacing: -0.14px; + line-height: 20px; + .yourContentHere { + vertical-align: middle; + min-width: 123px; + } + } + } + } +} From 7f5a719720496fecd3699207be0f9d6c78d96ed6 Mon Sep 17 00:00:00 2001 From: xiaoluoHe Date: Tue, 11 Jun 2024 11:52:41 +0800 Subject: [PATCH 07/16] chore: update version --- packages/vchart-theme-demo-component/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/vchart-theme-demo-component/package.json b/packages/vchart-theme-demo-component/package.json index b84c442..d0b28ee 100644 --- a/packages/vchart-theme-demo-component/package.json +++ b/packages/vchart-theme-demo-component/package.json @@ -1,6 +1,6 @@ { "name": "@visactor/vchart-theme-demo-component", - "version": "0.0.1-alpha.2", + "version": "0.0.1-alpha.3", "description": "theme demo page in vchart site", "sideEffects": false, "main": "cjs/index.js", From 4d91b2d8fd37cd99163e7f9d24142a27e172aaaa Mon Sep 17 00:00:00 2001 From: xiaoluoHe Date: Tue, 11 Jun 2024 15:41:04 +0800 Subject: [PATCH 08/16] chore: support less compile --- .../vchart-theme-demo-component/package.json | 3 +- .../src/vchart-chart-hub-theme/frame.tsx | 2 +- .../src/vchart-chart-hub-theme/normalize.css | 128 ------------------ .../{style.css => style/style.less} | 0 .../src/vchart-chart-hub-theme/style/style.ts | 1 + tools/bundler/src/tasks/modules.ts | 2 +- tools/bundler/src/tasks/style.ts | 2 +- 7 files changed, 5 insertions(+), 133 deletions(-) delete mode 100644 packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/normalize.css rename packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/{style.css => style/style.less} (100%) create mode 100644 packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/style/style.ts diff --git a/packages/vchart-theme-demo-component/package.json b/packages/vchart-theme-demo-component/package.json index d0b28ee..54cab87 100644 --- a/packages/vchart-theme-demo-component/package.json +++ b/packages/vchart-theme-demo-component/package.json @@ -13,8 +13,7 @@ "scripts": { "compile": "tsc --noEmit", "eslint": "eslint --debug --fix src/", - "build": "bundle", - "buildLess": "DEBUG='Bundler*' bundle --less true", + "build": "bundle --clean --less true", "dev": "bundle --clean -f es -w", "start": "vite ./vite", "start1": "vite ./vite1", diff --git a/packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/frame.tsx b/packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/frame.tsx index 47c2099..527e651 100644 --- a/packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/frame.tsx +++ b/packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/frame.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { Nav, Avatar } from '@douyinfe/semi-ui'; import { IconFeishuLogo, IconHelpCircle, IconBell } from '@douyinfe/semi-icons'; -import './style.css'; +import './style/style'; import Charts from './charts.jsx'; const Frame = () => { diff --git a/packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/normalize.css b/packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/normalize.css deleted file mode 100644 index 0375ff2..0000000 --- a/packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/normalize.css +++ /dev/null @@ -1,128 +0,0 @@ -* { - box-sizing: border-box; -} - -html, -body, -div, -span, -applet, -object, -iframe, -h1, -h2, -h3, -h4, -h5, -h6, -p, -blockquote, -pre, -a, -abbr, -acronym, -address, -big, -cite, -code, -del, -dfn, -em, -img, -ins, -kbd, -q, -s, -samp, -small, -strike, -strong, -sub, -sup, -tt, -var, -b, -u, -i, -center, -dl, -dt, -dd, -ol, -ul, -li, -fieldset, -form, -label, -legend, -table, -caption, -tbody, -tfoot, -thead, -tr, -th, -td, -article, -aside, -canvas, -details, -embed, -figure, -figcaption, -footer, -header, -hgroup, -menu, -nav, -output, -ruby, -section, -summary, -time, -mark, -audio, -video { - /* margin: 0; - padding: 0; - border: 0; - font-size: 100%; - font: inherit; - vertical-align: baseline; */ -} -/* HTML5 display-role reset for older browsers */ -article, -aside, -details, -figcaption, -figure, -footer, -header, -hgroup, -menu, -nav, -section { - display: block; -} -body { - line-height: 1; -} -ol, -ul { - list-style: none; -} -blockquote, -q { - quotes: none; -} -blockquote:before, -blockquote:after, -q:before, -q:after { - content: ''; - content: none; -} -table { - border-collapse: collapse; - border-spacing: 0; -} diff --git a/packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/style.css b/packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/style/style.less similarity index 100% rename from packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/style.css rename to packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/style/style.less diff --git a/packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/style/style.ts b/packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/style/style.ts new file mode 100644 index 0000000..68840b7 --- /dev/null +++ b/packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/style/style.ts @@ -0,0 +1 @@ +import './style.less'; diff --git a/tools/bundler/src/tasks/modules.ts b/tools/bundler/src/tasks/modules.ts index ecb35c8..4806ebf 100644 --- a/tools/bundler/src/tasks/modules.ts +++ b/tools/bundler/src/tasks/modules.ts @@ -139,7 +139,7 @@ export function compile( .pipe( through2.obj(function z(file, encoding, next) { this.push(file.clone()); - if (file.path.match(/(\/|\\)style(\/|\\)index\.js/)) { + if (file.path.match(/(\/|\\)style\.js/)) { DebugCompile('CSS inject for', file.path); const content = file.contents.toString(encoding); diff --git a/tools/bundler/src/tasks/style.ts b/tools/bundler/src/tasks/style.ts index 9ac1f53..3f0db33 100644 --- a/tools/bundler/src/tasks/style.ts +++ b/tools/bundler/src/tasks/style.ts @@ -38,7 +38,7 @@ export function buildStyle( // see file type: https://www.npmjs.com/package/vinyl through2.obj(function foo(file, _encoding, next) { this.push(file.clone()); - if (file.path.match(/(\/|\\)style(\/|\\)index\.less$/)) { + if (file.path.match(/(\/|\\)style\.less$/)) { // contact output entry less file const relativePath = path.relative(`${outputDir.umd}/css`, outputDir.es!); lessEntry.push(`@import '${relativePath}/${file.relative}';`); From fa75f059b05efa89deae74f4916d8e4a444db3af Mon Sep 17 00:00:00 2001 From: xiaoluoHe Date: Tue, 11 Jun 2024 15:55:47 +0800 Subject: [PATCH 09/16] chore: update dependency --- packages/vchart-theme-demo-component/package.json | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/vchart-theme-demo-component/package.json b/packages/vchart-theme-demo-component/package.json index 54cab87..0a7c5c7 100644 --- a/packages/vchart-theme-demo-component/package.json +++ b/packages/vchart-theme-demo-component/package.json @@ -1,6 +1,6 @@ { "name": "@visactor/vchart-theme-demo-component", - "version": "0.0.1-alpha.3", + "version": "0.0.1-alpha.4", "description": "theme demo page in vchart site", "sideEffects": false, "main": "cjs/index.js", @@ -24,11 +24,15 @@ "@douyinfe/semi-icons": "latest", "@douyinfe/semi-icons-lab": "latest", "@arco-design/web-react": "^2.32.2", - "@visactor/vchart-theme-utils": "1.11.0", - "@visactor/vchart-theme": "1.11.0", + "@visactor/vchart-theme-utils": "1.11.1-alpha.2", + "@visactor/vchart-theme": "1.11.1-alpha.2", "@visactor/vchart": "1.11.0", "@visactor/react-vchart": "1.11.0" }, + "peerDependencies": { + "react": ">=16.0.0", + "react-dom": ">=16.0.0" + }, "devDependencies": { "@rushstack/eslint-patch": "~1.1.4", "react": "^18.0.0", From 55a2a9e280e964f7f63fe6ebb69925a16e0acc1b Mon Sep 17 00:00:00 2001 From: xiaoluoHe Date: Tue, 11 Jun 2024 19:19:35 +0800 Subject: [PATCH 10/16] feat: style & export --- packages/vchart-theme-demo-component/src/index.ts | 2 +- .../src/vchart-chart-hub-theme/charts.tsx | 5 ++--- .../src/vchart-chart-hub-theme/frame.tsx | 6 +++--- .../src/vchart-chart-hub-theme/index.tsx | 2 +- .../src/vchart-chart-hub-theme/style/style.less | 1 + .../vchart-theme-demo-component/vite/src/App.tsx | 12 +++++------- .../vchart-theme-demo-component/vite/src/index.less | 3 +-- 7 files changed, 14 insertions(+), 17 deletions(-) diff --git a/packages/vchart-theme-demo-component/src/index.ts b/packages/vchart-theme-demo-component/src/index.ts index b4f941b..6ababd5 100644 --- a/packages/vchart-theme-demo-component/src/index.ts +++ b/packages/vchart-theme-demo-component/src/index.ts @@ -1,2 +1,2 @@ -import { ChartHubThemePage } from './vchart-chart-hub-theme/index'; +import { Frame as ChartHubThemePage } from './vchart-chart-hub-theme/index'; export { ChartHubThemePage }; diff --git a/packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/charts.tsx b/packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/charts.tsx index 2faeb94..b1396e6 100644 --- a/packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/charts.tsx +++ b/packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/charts.tsx @@ -7,6 +7,7 @@ import { chartHubLightTheme } from '@visactor/vchart-theme'; import { Card } from '@douyinfe/semi-ui'; import { Grid } from '@arco-design/web-react'; +import '@arco-design/web-react/dist/css/arco.css'; const { Row, Col } = Grid; @@ -17,7 +18,7 @@ const gutter = 16; VChart.ThemeManager.registerTheme('chart-hub-light', chartHubLightTheme); VChart.ThemeManager.setCurrentTheme('chart-hub-light'); -const Charts = () => { +export const Charts = () => { return ( {charts.map((chart, i) => { @@ -41,5 +42,3 @@ const Charts = () => { ); }; - -export default Charts; diff --git a/packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/frame.tsx b/packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/frame.tsx index 527e651..053af88 100644 --- a/packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/frame.tsx +++ b/packages/vchart-theme-demo-component/src/vchart-chart-hub-theme/frame.tsx @@ -2,9 +2,9 @@ import React from 'react'; import { Nav, Avatar } from '@douyinfe/semi-ui'; import { IconFeishuLogo, IconHelpCircle, IconBell } from '@douyinfe/semi-icons'; import './style/style'; -import Charts from './charts.jsx'; +import { Charts } from './charts'; -const Frame = () => { +export const Frame = () => { return (