diff --git a/.husky/.lintstagedrc b/.husky/.lintstagedrc index 329de8f4b..df68f03cf 100644 --- a/.husky/.lintstagedrc +++ b/.husky/.lintstagedrc @@ -11,7 +11,7 @@ ], "*.{css,scss,html}": [ "prettier --write", - "stylelint --fix" + "stylelint --fix \"strict\"" ], "*.md": [ "prettier --write" @@ -19,6 +19,6 @@ "*.vue": [ "prettier --write", "eslint --fix", - "stylelint --fix" + "stylelint --fix \"strict\"" ] } diff --git a/.husky/commit-msg b/.husky/commit-msg index 8ddffd943..1bf37d598 100755 --- a/.husky/commit-msg +++ b/.husky/commit-msg @@ -1,7 +1,5 @@ -#!/bin/sh huskyDir=$(dirname "$0") -. "$huskyDir/_/husky.sh" . "$huskyDir/scripts/common.sh" npx --no-install commitlint --edit "$1" diff --git a/.husky/post-merge b/.husky/post-merge index 12482bdf7..f06a30901 100755 --- a/.husky/post-merge +++ b/.husky/post-merge @@ -1,6 +1,4 @@ -#!/bin/sh huskyDir=$(dirname "$0") -. "$huskyDir/_/husky.sh" . "$huskyDir/scripts/common.sh" . "$huskyDir/scripts/update-deps.sh" diff --git a/.husky/post-rebase b/.husky/post-rebase index 12482bdf7..f06a30901 100755 --- a/.husky/post-rebase +++ b/.husky/post-rebase @@ -1,6 +1,4 @@ -#!/bin/sh huskyDir=$(dirname "$0") -. "$huskyDir/_/husky.sh" . "$huskyDir/scripts/common.sh" . "$huskyDir/scripts/update-deps.sh" diff --git a/.husky/pre-commit b/.husky/pre-commit index 3dff929b9..08e8c7abb 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,7 +1,5 @@ -#!/bin/sh huskyDir=$(dirname "$0") -. "$huskyDir/_/husky.sh" . "$huskyDir/scripts/common.sh" [ -n "$CI" ] && exit 0 diff --git a/common/config/package.json b/common/config/package.json index 52643c558..82dc36e72 100644 --- a/common/config/package.json +++ b/common/config/package.json @@ -31,8 +31,8 @@ "@vexip-ui/bem-helper": "workspace:*", "@vexip-ui/icons": "workspace:*", "@vexip-ui/utils": "workspace:*", - "lucide-vue-next": "^0.365.0", - "vue": "^3.4.38" + "lucide-vue-next": "^0.471.0", + "vue": "^3.5.13" }, "peerDependencies": { "vue": "^3.2.25" diff --git a/common/hooks/package.json b/common/hooks/package.json index 42df834f2..3310c4d18 100644 --- a/common/hooks/package.json +++ b/common/hooks/package.json @@ -31,12 +31,12 @@ }, "homepage": "https://github.com/vexip-ui/vexip-ui/tree/main/common/hooks#readme", "dependencies": { - "@floating-ui/dom": "^1.5.3", + "@floating-ui/dom": "^1.6.13", "@juggle/resize-observer": "^3.4.0", "@vexip-ui/utils": "workspace:*" }, "devDependencies": { - "vue": "^3.4.38" + "vue": "^3.5.13" }, "peerDependencies": { "vue": "^3.2.25" diff --git a/common/icons/package.json b/common/icons/package.json index 784f3f1e5..a475c130d 100644 --- a/common/icons/package.json +++ b/common/icons/package.json @@ -47,13 +47,13 @@ }, "homepage": "https://github.com/vexip-ui/vexip-ui/tree/main/common/icons#readme", "devDependencies": { - "@types/node": "^20.12.5", - "execa": "^8.0.1", - "fast-glob": "^3.3.2", + "@types/node": "^22.10.6", + "execa": "^9.5.2", + "fast-glob": "^3.3.3", "fs-extra": "^11.2.0", "kolorist": "^1.8.0", - "prettier": "^3.3.3", - "vue": "^3.4.38" + "prettier": "^3.4.2", + "vue": "^3.5.13" }, "peerDependencies": { "vue": "^3.2.25" diff --git a/common/meta/package.json b/common/meta/package.json index 68c7f2a64..4ea73b8b1 100644 --- a/common/meta/package.json +++ b/common/meta/package.json @@ -1,16 +1,16 @@ { "name": "@vexip-ui/meta", + "private": true, "author": "winchesHe", "scripts": { "build": "run-p build:contributors build:components", - "build:contributors": "tsx scripts/contributors.ts", "build:components": "tsx scripts/components.ts", + "build:contributors": "tsx scripts/contributors.ts", "dev": "DEV=\"1\" pnpm run build" }, - "private": true, "devDependencies": { "@vexip-ui/scripts": "workspace:*", "@vexip-ui/utils": "workspace:*", - "dotenv": "^16.3.1" + "dotenv": "^16.4.7" } } diff --git a/common/plugins/package.json b/common/plugins/package.json index 0708d565a..a1ab9f875 100644 --- a/common/plugins/package.json +++ b/common/plugins/package.json @@ -1,15 +1,15 @@ { "name": "@vexip-ui/plugins", "version": "1.6.0", + "type": "module", "license": "MIT", - "anchor": "qmhc", + "private": false, "scripts": { "build": "tsx scripts/build.ts", "test": "vitest run", "test:cover": "vitest run --coverage", "test:dev": "vitest dev" }, - "type": "module", "main": "dist/index.cjs", "module": "dist/index.js", "types": "dist/index.d.ts", @@ -20,25 +20,25 @@ "import": "./dist/index.js" } }, - "private": false, "files": [ "dist" ], - "homepage": "https://github.com/vexip-ui/vexip-ui/tree/main/common/plugins#readme", "repository": { "type": "git", "url": "git+https://github.com/vexip-ui/vexip-ui.git", "directory": "common/plugins" }, + "homepage": "https://github.com/vexip-ui/vexip-ui/tree/main/common/plugins#readme", "dependencies": { "@vexip-ui/utils": "workspace:*", - "compare-versions": "^6.1.0", - "local-pkg": "^0.5.0" + "compare-versions": "^6.1.1", + "local-pkg": "^1.0.0" }, "devDependencies": { - "@types/node": "^20.12.5", - "postcss": "^8.4.38", - "tsup": "^8.0.2", - "unplugin-vue-components": "^0.26.0" - } + "@types/node": "^22.10.6", + "postcss": "^8.5.0", + "tsup": "^8.3.5", + "unplugin-vue-components": "^28.0.0" + }, + "anchor": "qmhc" } diff --git a/common/scripts/package.json b/common/scripts/package.json index a19ec85d9..69b1d90b8 100644 --- a/common/scripts/package.json +++ b/common/scripts/package.json @@ -1,16 +1,17 @@ { "name": "@vexip-ui/scripts", "version": "1.1.4", + "type": "module", "license": "MIT", + "private": false, "author": "qmhc", "scripts": { "build": "tsx scripts/build.ts" }, - "type": "module", "bin": { "vexip": "bin/vexip.js", - "vxp": "bin/vexip.js", "vexip-cli": "bin/vexip.js", + "vxp": "bin/vexip.js", "vxp-cli": "bin/vexip.js" }, "main": "dist/index.cjs", @@ -23,34 +24,33 @@ "import": "./dist/index.js" } }, - "private": false, "files": [ "bin", "dist" ], - "homepage": "https://github.com/vexip-ui/vexip-ui/tree/main/common/scripts#readme", "repository": { "type": "git", "url": "git+https://github.com/vexip-ui/vexip-ui.git", "directory": "common/scripts" }, + "homepage": "https://github.com/vexip-ui/vexip-ui/tree/main/common/scripts#readme", "dependencies": { "@vexip-ui/utils": "workspace:*", - "compare-versions": "^6.1.0", - "execa": "^8.0.1", + "compare-versions": "^6.1.1", + "execa": "^9.5.2", "kolorist": "^1.8.0", - "local-pkg": "^0.5.0", + "local-pkg": "^1.0.0", "prompts": "^2.4.2", - "semver": "^7.6.0", + "semver": "^7.6.3", "yargs": "^17.7.2" }, "devDependencies": { - "@pnpm/types": "^9.4.2", + "@pnpm/types": "^12.2.0", "@types/minimist": "^1.2.5", - "@types/node": "^20.12.5", + "@types/node": "^22.10.6", "@types/prompts": "^2.4.9", "@types/semver": "^7.5.8", - "@types/yargs": "^17.0.32", - "tsup": "^8.0.2" + "@types/yargs": "^17.0.33", + "tsup": "^8.3.5" } } diff --git a/components/affix/tests/affix.spec.tsx b/components/affix/tests/affix.spec.tsx index b1cc01c89..d40b01361 100644 --- a/components/affix/tests/affix.spec.tsx +++ b/components/affix/tests/affix.spec.tsx @@ -178,7 +178,7 @@ describe('Affix', () => { <>
- + {'指定容器'}
diff --git a/components/anchor/tests/anchor.spec.tsx b/components/anchor/tests/anchor.spec.tsx index 32bc0934a..bfbbed1bc 100644 --- a/components/anchor/tests/anchor.spec.tsx +++ b/components/anchor/tests/anchor.spec.tsx @@ -77,7 +77,7 @@ describe('Anchor', () => { const viewer = createEl(0, 'viewer') viewer.appendChild(createEl(20, 'a')) viewer.appendChild(createEl(40, 'b')) - document.appendChild(viewer) + document.body.appendChild(viewer) Object.defineProperty(viewer, 'scrollHeight', { configurable: true, diff --git a/components/loading/loading.vue b/components/loading/loading.vue index c216be7af..322cfba03 100644 --- a/components/loading/loading.vue +++ b/components/loading/loading.vue @@ -69,9 +69,9 @@ function startLoading(options: LoadingOptions) { const setLoading = () => { percent.value = boundRange(options.percent, 0, 100) - state.value = options.state ?? 'default' + state.value = options.state ?? state.value strokeWidth.value = boundRange(options.strokeWidth ?? 2, 1, 10) - position.value = options.position ?? 'top' + position.value = options.position ?? position.value maxPercent = boundRange(options.maxPercent ?? 95, percent.value, 95) if (percent.value === 100) { diff --git a/components/loading/tests/loading.spec.tsx b/components/loading/tests/loading.spec.tsx index f97c7a55f..2287c8947 100644 --- a/components/loading/tests/loading.spec.tsx +++ b/components/loading/tests/loading.spec.tsx @@ -7,6 +7,10 @@ import { LoadingManager } from '..' vi.useFakeTimers() +function nextFrame() { + return new Promise(resolve => requestAnimationFrame(() => resolve())) +} + function createLoading() { const Loading = new LoadingManager() @@ -68,8 +72,9 @@ describe('Loading', () => { wrapper.unmount() wrapper = mount(Loading) - wrapper.vm.startLoading({ percent: 0, position: 'bottom' }) + wrapper.vm.startLoading({ percent: 10, position: 'bottom' }) await vi.runAllTimersAsync() + await nextFrame() expect(wrapper.find('.vxp-loading').attributes('style')).toContain('bottom: 0px;') }) @@ -88,6 +93,7 @@ describe('Loading', () => { wrapper.vm.startLoading({ percent: 0, state }) await vi.runAllTimersAsync() + await nextFrame() if (state === 'default') { expect(wrapper.find('.vxp-loading').classes()).not.toContain(`vxp-loading--${state}`) diff --git a/components/radio/tests/ssr.spec.tsx b/components/radio/tests/ssr.spec.tsx index caa6fc9da..88462b273 100644 --- a/components/radio/tests/ssr.spec.tsx +++ b/components/radio/tests/ssr.spec.tsx @@ -13,7 +13,7 @@ import { Radio } from '..' describe('SSR for Radio', () => { it('render', async () => { try { - await renderToString(createSSRApp(() => )) + await renderToString(createSSRApp(() => )) } catch (error) { expect(error).toBeFalsy() } diff --git a/components/table/table.vue b/components/table/table.vue index ee5936bf4..ea277603b 100644 --- a/components/table/table.vue +++ b/components/table/table.vue @@ -1,5 +1,6 @@ diff --git a/docs/demos/loading/basis copy/demo.zh-CN.vue b/docs/demos/loading/basis copy/demo.zh-CN.vue new file mode 100644 index 000000000..99132546d --- /dev/null +++ b/docs/demos/loading/basis copy/demo.zh-CN.vue @@ -0,0 +1,34 @@ + + + diff --git a/docs/demos/loading/basis/demo.en-US.vue b/docs/demos/loading/basis/demo.en-US.vue index 7bb158cdf..0b8459112 100644 --- a/docs/demos/loading/basis/demo.en-US.vue +++ b/docs/demos/loading/basis/demo.en-US.vue @@ -6,6 +6,7 @@