diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 7ebd71f4..e27d33a3 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -281,6 +281,21 @@ module.exports = { prev: ['class'], next: '*', }, + { + blankLine: 'always', + prev: '*', + next: 'for', + }, + { + blankLine: 'any', + prev: 'for', + next: 'for', + }, + { + blankLine: 'always', + prev: '*', + next: ['while', 'do', 'switch'], + }, ], }, } diff --git a/.prettierrc.cjs b/.prettierrc.cjs index e5dc7947..bd6b9713 100644 --- a/.prettierrc.cjs +++ b/.prettierrc.cjs @@ -17,6 +17,5 @@ module.exports = { proseWrap: 'preserve', // 使用默认的折行标准 htmlWhitespaceSensitivity: 'css', // 根据显示样式决定 `html` 要不要折行 endOfLine: 'lf', // 换行符使用 `lf`, - bracketLine: false, singleAttributePerLine: false, } diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d9cea37..05cb93da 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,20 @@ # CHANGE LOG +## 4.8.4 + +由于 `node canvas` 本身的特性(环境问题很多),故在 `v4.8.4` 版本予以移除 `RQRCode` 组件,使用 `vue3-next-qrcode` 替代。所有的使用方法保持一致。 + +## Feats + +- 新增 `package.json` 的 `lint` 命令,用于自动修复 `eslint, prettier` 问题 + +```sh +pnpm lint +``` + +- `useModal` 方法在 `preset = card` 并且设置了 `fullscreen` 时,现在会自动启用滚动条 +- `pre-commit` 新增 `vue-tsc` 检查 + ## 4.8.3 ## Feats diff --git a/__test__/components/qr-code.spec.ts b/__test__/components/qr-code.spec.ts deleted file mode 100644 index 17c095c8..00000000 --- a/__test__/components/qr-code.spec.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { RQRCode } from '../../src/components/RQRCode/index' -import { mount } from '@vue/test-utils' - -describe('RQRCode', () => { - it('should render a qr code', () => { - const wrapper = mount(RQRCode, { - props: { - text: 'hi', - }, - }) - - expect(wrapper.find('img').exists()).toBe(true) - }) - - it('should execute the callback', () => { - let successValue: 1 - let errorValue: -1 - - const _success = vitest.fn() - const _error = vitest.fn() - - _success.mockReturnValue(1) - _error.mockReturnValue(-1) - - mount(RQRCode, { - props: { - text: 'hi', - onSuccess: () => { - successValue = _success() - - expect(successValue).toBe(1) - }, - onError: () => { - errorValue = _error() - - expect(errorValue).toBe(-1) - }, - }, - }) - }) - - it('should execute the onReload function', async () => { - let count = 0 - - const wrapper = mount(RQRCode, { - props: { - text: 'hi', - status: 'error', - onReload: () => { - count = 1 - }, - }, - }) - - const btn = wrapper.find('.n-button') - - btn.trigger('click') - - expect(count).toBe(1) - }) -}) diff --git a/package.json b/package.json index c4e21824..7e8c8776 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ray-template", "private": false, - "version": "4.8.3", + "version": "4.8.4", "type": "module", "engines": { "node": "^18.0.0 || >=20.0.0", @@ -15,7 +15,8 @@ "report": "vite build --mode report", "prepare": "husky install", "test": "vitest", - "test:ui": "vitest --ui" + "test:ui": "vitest --ui", + "lint": "eslint src --ext .js,.jsx,.vue && prettier --write \"src/**/*.{ts,tsx,json,.vue}\"" }, "husky": { "hooks": { @@ -24,17 +25,19 @@ } }, "lint-staged": { - "*.{js,json}": [ + "*.{ts,tsx,json}": [ "prettier --write" ], - "*.ts?(x)": [ + ".ts,.tsx,.vue": [ + "vue-tsc --noEmit" + ], + "*.{ts,tsx,vue}": [ "eslint src", "prettier --parser=typescript --write" ] }, "dependencies": { "@vueuse/core": "^10.9.0", - "awesome-qr": "2.1.5-rc.0", "axios": "^1.6.7", "clipboard": "^2.0.11", "currency.js": "^2.0.4", @@ -53,7 +56,8 @@ "vue-demi": "0.14.6", "vue-hooks-plus": "1.9.0", "vue-i18n": "^9.13.1", - "vue-router": "^4.3.0" + "vue-router": "^4.3.0", + "vue3-next-qrcode": "2.0.10" }, "devDependencies": { "@commitlint/cli": "^17.7.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4d87c58e..e8d06250 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,9 +8,6 @@ dependencies: '@vueuse/core': specifier: ^10.9.0 version: 10.9.0(vue@3.4.26) - awesome-qr: - specifier: 2.1.5-rc.0 - version: 2.1.5-rc.0 axios: specifier: ^1.6.7 version: 1.6.8 @@ -68,6 +65,9 @@ dependencies: vue-router: specifier: ^4.3.0 version: 4.3.0(vue@3.4.26) + vue3-next-qrcode: + specifier: 2.0.10 + version: 2.0.10(typescript@5.2.2) devDependencies: '@commitlint/cli': @@ -1368,24 +1368,6 @@ packages: resolution: {integrity: sha512-dfLbk+PwWvFzSxwk3n5ySL0hfBog779o8h68wK/7/APo/7cgyWp5jcXockbxdk5kFRkbeXWm4Fbi9FrdN381sA==} dev: false - /@mapbox/node-pre-gyp@1.0.11: - resolution: {integrity: sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ==} - hasBin: true - dependencies: - detect-libc: 2.0.3 - https-proxy-agent: 5.0.1 - make-dir: 3.1.0 - node-fetch: 2.7.0 - nopt: 5.0.0 - npmlog: 5.0.1 - rimraf: 3.0.2 - semver: 7.6.0 - tar: 6.2.1 - transitivePeerDependencies: - - encoding - - supports-color - dev: false - /@nodelib/fs.scandir@2.1.5: resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -2277,10 +2259,6 @@ packages: through: 2.3.8 dev: true - /abbrev@1.1.1: - resolution: {integrity: sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==} - dev: false - /abbrev@2.0.0: resolution: {integrity: sha512-6/mh1E2u2YgEsCHdY0Yx5oW+61gZU+1vXaoiHHrpKeuRNNgFvS+/jrwHiQhB5apAf5oB7UB7E19ol2R2LKH8hQ==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} @@ -2305,15 +2283,6 @@ packages: hasBin: true dev: true - /agent-base@6.0.2: - resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} - engines: {node: '>= 6.0.0'} - dependencies: - debug: 4.3.4 - transitivePeerDependencies: - - supports-color - dev: false - /ajv@6.12.6: resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} dependencies: @@ -2347,6 +2316,7 @@ packages: /ansi-regex@5.0.1: resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} engines: {node: '>=8'} + dev: true /ansi-regex@6.0.1: resolution: {integrity: sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==} @@ -2390,18 +2360,6 @@ packages: picomatch: 2.3.1 dev: true - /aproba@2.0.0: - resolution: {integrity: sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==} - dev: false - - /are-we-there-yet@2.0.0: - resolution: {integrity: sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==} - engines: {node: '>=10'} - dependencies: - delegates: 1.0.0 - readable-stream: 3.6.2 - dev: false - /arg@4.1.3: resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==} dev: true @@ -2580,17 +2538,6 @@ packages: possible-typed-array-names: 1.0.0 dev: true - /awesome-qr@2.1.5-rc.0: - resolution: {integrity: sha512-nRxvKuJxoxdOIStb79bElh52YPI+Cbu/UewgLjVSpXJvxwIZQjcvZgrCjXPe3jSl2i6mz3foxA6xgzLf8NQy+Q==} - dependencies: - buffer: 6.0.3 - canvas: 2.11.2 - js-binary-schema-parser: 2.0.3 - transitivePeerDependencies: - - encoding - - supports-color - dev: false - /axios@1.6.8: resolution: {integrity: sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ==} dependencies: @@ -2603,10 +2550,7 @@ packages: /balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} - - /base64-js@1.5.1: - resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} - dev: false + dev: true /base@0.11.2: resolution: {integrity: sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==} @@ -2643,6 +2587,7 @@ packages: dependencies: balanced-match: 1.0.2 concat-map: 0.0.1 + dev: true /brace-expansion@2.0.1: resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} @@ -2686,13 +2631,6 @@ packages: update-browserslist-db: 1.0.13(browserslist@4.23.0) dev: true - /buffer@6.0.3: - resolution: {integrity: sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==} - dependencies: - base64-js: 1.5.1 - ieee754: 1.2.1 - dev: false - /builtin-modules@3.3.0: resolution: {integrity: sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==} engines: {node: '>=6'} @@ -2701,7 +2639,7 @@ packages: /builtins@5.1.0: resolution: {integrity: sha512-SW9lzGTLvWTP1AY8xeAMZimqDrIaSdLQUcVr9DMef51niJ022Ri87SwRRKYm4A6iHfkPaiVUu/Duw2Wc4J7kKg==} dependencies: - semver: 7.6.0 + semver: 7.6.1 dev: true /bundle-name@4.1.0: @@ -2778,19 +2716,6 @@ packages: resolution: {integrity: sha512-LRAQHZ4yT1+f9LemSMeqdMpMxZcc4RMWdj4tiFe3G8tNkWK+E58g+/tzotb5cU6TbcVJLr4fySiAW7XmxQvZQA==} dev: true - /canvas@2.11.2: - resolution: {integrity: sha512-ItanGBMrmRV7Py2Z+Xhs7cT+FNt5K0vPL4p9EZ/UX/Mu7hFbkxSjKF2KVtPwX7UYWp7dRKnrTvReflgrItJbdw==} - engines: {node: '>=6'} - requiresBuild: true - dependencies: - '@mapbox/node-pre-gyp': 1.0.11 - nan: 2.19.0 - simple-get: 3.1.1 - transitivePeerDependencies: - - encoding - - supports-color - dev: false - /chai@4.4.1: resolution: {integrity: sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g==} engines: {node: '>=4'} @@ -2858,11 +2783,6 @@ packages: fsevents: 2.3.3 dev: true - /chownr@2.0.0: - resolution: {integrity: sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==} - engines: {node: '>=10'} - dev: false - /class-utils@0.3.6: resolution: {integrity: sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==} engines: {node: '>=0.10.0'} @@ -2956,11 +2876,6 @@ packages: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} dev: true - /color-support@1.1.3: - resolution: {integrity: sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==} - hasBin: true - dev: false - /colorette@2.0.20: resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==} dev: true @@ -3009,6 +2924,7 @@ packages: /concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + dev: true /config-chain@1.1.13: resolution: {integrity: sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==} @@ -3017,10 +2933,6 @@ packages: proto-list: 1.2.4 dev: true - /console-control-strings@1.1.0: - resolution: {integrity: sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==} - dev: false - /conventional-changelog-angular@6.0.0: resolution: {integrity: sha512-6qLgrBF4gueoC7AFVHu51nHL9pF9FRjXrH+ceVf7WmAfH3gs+gEYOkvxhjMPjZu57I4AGUGoNTY8V7Hrgf1uqg==} engines: {node: '>=14'} @@ -3301,6 +3213,7 @@ packages: optional: true dependencies: ms: 2.1.2 + dev: true /decamelize-keys@1.1.1: resolution: {integrity: sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg==} @@ -3319,13 +3232,6 @@ packages: resolution: {integrity: sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==} engines: {node: '>=0.10'} - /decompress-response@4.2.1: - resolution: {integrity: sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw==} - engines: {node: '>=8'} - dependencies: - mimic-response: 2.1.0 - dev: false - /deep-eql@4.1.3: resolution: {integrity: sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==} engines: {node: '>=6'} @@ -3408,10 +3314,6 @@ packages: resolution: {integrity: sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw==} dev: false - /delegates@1.0.0: - resolution: {integrity: sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==} - dev: false - /depcheck@1.4.7: resolution: {integrity: sha512-1lklS/bV5chOxwNKA/2XUUk/hPORp8zihZsXflr8x0kLwmcZ9Y9BsS6Hs3ssvA+2wUVbG0U2Ciqvm1SokNjPkA==} engines: {node: '>=10'} @@ -3458,11 +3360,6 @@ packages: engines: {node: '>=0.10.0'} dev: true - /detect-libc@2.0.3: - resolution: {integrity: sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==} - engines: {node: '>=8'} - dev: false - /dezalgo@1.0.4: resolution: {integrity: sha512-rXSP0bf+5n0Qonsb+SVVfNfIsimO4HEtmnIpPHY8Q1UCzKlQrDMfdobr8nJOOsRgWCyMRqeSBQzmWUMq7zvVig==} dependencies: @@ -3637,6 +3534,7 @@ packages: /emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + dev: true /emoji-regex@9.2.2: resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} @@ -3863,7 +3761,7 @@ packages: eslint: '>=6.0.0' dependencies: eslint: 8.57.0 - semver: 7.6.0 + semver: 7.6.1 dev: true /eslint-config-prettier@9.1.0(eslint@8.57.0): @@ -4015,7 +3913,7 @@ packages: is-core-module: 2.13.1 minimatch: 3.1.2 resolve: 1.22.8 - semver: 7.6.0 + semver: 7.6.1 dev: true /eslint-plugin-prettier@5.1.3(eslint-config-prettier@9.1.0)(eslint@8.57.0)(prettier@3.2.5): @@ -4458,15 +4356,9 @@ packages: universalify: 2.0.1 dev: true - /fs-minipass@2.1.0: - resolution: {integrity: sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==} - engines: {node: '>= 8'} - dependencies: - minipass: 3.3.6 - dev: false - /fs.realpath@1.0.0: resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} + dev: true /fsevents@2.3.3: resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} @@ -4493,21 +4385,6 @@ packages: resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} dev: true - /gauge@3.0.2: - resolution: {integrity: sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==} - engines: {node: '>=10'} - dependencies: - aproba: 2.0.0 - color-support: 1.1.3 - console-control-strings: 1.1.0 - has-unicode: 2.0.1 - object-assign: 4.1.1 - signal-exit: 3.0.7 - string-width: 4.2.3 - strip-ansi: 6.0.1 - wide-align: 1.1.5 - dev: false - /gensync@1.0.0-beta.2: resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} engines: {node: '>=6.9.0'} @@ -4614,6 +4491,7 @@ packages: minimatch: 3.1.2 once: 1.4.0 path-is-absolute: 1.0.1 + dev: true /global-dirs@0.1.1: resolution: {integrity: sha512-NknMLn7F2J7aflwFOlGdNIuCDpN3VGoSoB+aap3KABFWbHVn1TCgFC+np23J8W2BiZbjfEw3BFBycSMv1AFblg==} @@ -4756,10 +4634,6 @@ packages: has-symbols: 1.0.3 dev: true - /has-unicode@2.0.1: - resolution: {integrity: sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==} - dev: false - /has-value@0.3.1: resolution: {integrity: sha512-gpG936j8/MzaeID5Yif+577c17TxaDmhuyVgSwtnL/q8UUTySg8Mecb+8Cf1otgLoD7DDH75axp86ER7LFsf3Q==} engines: {node: '>=0.10.0'} @@ -4862,16 +4736,6 @@ packages: engines: {node: '>= 0.4.0'} dev: true - /https-proxy-agent@5.0.1: - resolution: {integrity: sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==} - engines: {node: '>= 6'} - dependencies: - agent-base: 6.0.2 - debug: 4.3.4 - transitivePeerDependencies: - - supports-color - dev: false - /human-signals@2.1.0: resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} engines: {node: '>=10.17.0'} @@ -4895,10 +4759,6 @@ packages: safer-buffer: 2.1.2 dev: true - /ieee754@1.2.1: - resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} - dev: false - /ignore@5.3.1: resolution: {integrity: sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==} engines: {node: '>= 4'} @@ -4942,9 +4802,11 @@ packages: dependencies: once: 1.4.0 wrappy: 1.0.2 + dev: true /inherits@2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + dev: true /ini@1.3.8: resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==} @@ -5090,6 +4952,7 @@ packages: /is-fullwidth-code-point@3.0.0: resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} engines: {node: '>=8'} + dev: true /is-fullwidth-code-point@4.0.0: resolution: {integrity: sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==} @@ -5603,6 +5466,7 @@ packages: engines: {node: '>=10'} dependencies: yallist: 4.0.0 + dev: true /magic-string@0.30.10: resolution: {integrity: sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==} @@ -5616,13 +5480,6 @@ packages: '@jridgewell/sourcemap-codec': 1.4.15 dev: true - /make-dir@3.1.0: - resolution: {integrity: sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==} - engines: {node: '>=8'} - dependencies: - semver: 6.3.1 - dev: false - /make-error@1.3.6: resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} dev: true @@ -5748,11 +5605,6 @@ packages: engines: {node: '>=12'} dev: true - /mimic-response@2.1.0: - resolution: {integrity: sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==} - engines: {node: '>=8'} - dev: false - /min-indent@1.0.1: resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==} engines: {node: '>=4'} @@ -5762,6 +5614,7 @@ packages: resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} dependencies: brace-expansion: 1.1.11 + dev: true /minimatch@5.1.6: resolution: {integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==} @@ -5804,31 +5657,11 @@ packages: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} dev: true - /minipass@3.3.6: - resolution: {integrity: sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==} - engines: {node: '>=8'} - dependencies: - yallist: 4.0.0 - dev: false - - /minipass@5.0.0: - resolution: {integrity: sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==} - engines: {node: '>=8'} - dev: false - /minipass@7.0.4: resolution: {integrity: sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==} engines: {node: '>=16 || 14 >=14.17'} dev: true - /minizlib@2.1.2: - resolution: {integrity: sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==} - engines: {node: '>= 8'} - dependencies: - minipass: 3.3.6 - yallist: 4.0.0 - dev: false - /mitt@1.1.2: resolution: {integrity: sha512-3btxP0O9iGADGWAkteQ8mzDtEspZqu4I32y4GZYCV5BrwtzdcRpF4dQgNdJadCrbBx7Lu6Sq9AVrerMHR0Hkmw==} dev: true @@ -5841,12 +5674,6 @@ packages: is-extendable: 1.0.1 dev: true - /mkdirp@1.0.4: - resolution: {integrity: sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==} - engines: {node: '>=10'} - hasBin: true - dev: false - /mlly@1.6.1: resolution: {integrity: sha512-vLgaHvaeunuOXHSmEbZ9izxPx3USsk8KCQ8iC+aTlp5sKRSoZvwhHh5L9VbKSaVC6sJDqbyohIS76E2VmHIPAA==} dependencies: @@ -5874,6 +5701,7 @@ packages: /ms@2.1.2: resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} + dev: true /ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} @@ -5921,10 +5749,6 @@ packages: vueuc: 0.4.58(vue@3.4.26) dev: false - /nan@2.19.0: - resolution: {integrity: sha512-nO1xXxfh/RWNxfd/XPfbIfFk5vgLsAxUR9y5O0cHMJu/AW9U95JLXqthYHjEp+8gQ5p96K9jUp8nbVOxCdRbtw==} - dev: false - /nanoid@3.3.7: resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} @@ -5960,30 +5784,10 @@ packages: tslib: 2.6.2 dev: true - /node-fetch@2.7.0: - resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==} - engines: {node: 4.x || >=6.0.0} - peerDependencies: - encoding: ^0.1.0 - peerDependenciesMeta: - encoding: - optional: true - dependencies: - whatwg-url: 5.0.0 - dev: false - /node-releases@2.0.14: resolution: {integrity: sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==} dev: true - /nopt@5.0.0: - resolution: {integrity: sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==} - engines: {node: '>=6'} - hasBin: true - dependencies: - abbrev: 1.1.1 - dev: false - /nopt@7.2.0: resolution: {integrity: sha512-CVDtwCdhYIvnAzFoJ6NJ6dX3oga9/HyciQDnG1vQDjSLMeKLJ4A93ZqYKDrgYSr1FBY5/hMYC+2VCi24pgpkGA==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} @@ -6035,15 +5839,6 @@ packages: path-key: 4.0.0 dev: true - /npmlog@5.0.1: - resolution: {integrity: sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==} - dependencies: - are-we-there-yet: 2.0.0 - console-control-strings: 1.1.0 - gauge: 3.0.2 - set-blocking: 2.0.0 - dev: false - /nth-check@2.1.1: resolution: {integrity: sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==} dependencies: @@ -6053,6 +5848,7 @@ packages: /object-assign@4.1.1: resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} engines: {node: '>=0.10.0'} + dev: true /object-copy@0.1.0: resolution: {integrity: sha512-79LYn6VAb63zgtmAteVOWo9Vdj71ZVBy3Pbse+VqxDpEP83XuujMrGqHIwAXJ5I/aM0zU7dIyIAhifVTPrNItQ==} @@ -6127,6 +5923,7 @@ packages: resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} dependencies: wrappy: 1.0.2 + dev: true /onetime@5.1.2: resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==} @@ -6257,6 +6054,7 @@ packages: /path-is-absolute@1.0.1: resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} engines: {node: '>=0.10.0'} + dev: true /path-key@3.1.1: resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} @@ -6565,6 +6363,7 @@ packages: inherits: 2.0.4 string_decoder: 1.3.0 util-deprecate: 1.0.2 + dev: true /readdirp@3.6.0: resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} @@ -6697,6 +6496,7 @@ packages: hasBin: true dependencies: glob: 7.2.3 + dev: true /rollup@2.79.1: resolution: {integrity: sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==} @@ -6771,6 +6571,7 @@ packages: /safe-buffer@5.2.1: resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} + dev: true /safe-regex-test@1.0.3: resolution: {integrity: sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==} @@ -6830,6 +6631,7 @@ packages: /semver@6.3.1: resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} hasBin: true + dev: true /semver@7.5.4: resolution: {integrity: sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==} @@ -6845,10 +6647,13 @@ packages: hasBin: true dependencies: lru-cache: 6.0.0 + dev: true - /set-blocking@2.0.0: - resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==} - dev: false + /semver@7.6.1: + resolution: {integrity: sha512-f/vbBsu+fOiYt+lmwZV0rVwJScl46HppnOA1ZvIuBWKOTlllpyJ3bfVax76/OrhCH38dyxoDIA8K7uB963IYgA==} + engines: {node: '>=10'} + hasBin: true + dev: true /set-function-length@1.2.2: resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==} @@ -6912,24 +6717,13 @@ packages: /signal-exit@3.0.7: resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} + dev: true /signal-exit@4.1.0: resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} engines: {node: '>=14'} dev: true - /simple-concat@1.0.1: - resolution: {integrity: sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==} - dev: false - - /simple-get@3.1.1: - resolution: {integrity: sha512-CQ5LTKGfCpvE1K0n2us+kuMPbk/q0EKl82s4aheV9oXjFEz6W/Y7oQFVJuU6QG77hRT4Ghb5RURteF5vnWjupA==} - dependencies: - decompress-response: 4.2.1 - once: 1.4.0 - simple-concat: 1.0.1 - dev: false - /sirv@2.0.4: resolution: {integrity: sha512-94Bdh3cC2PKrbgSOUqTiGPWVZeSiXfKOVZNJniWoqrWrRkB1CJzBU3NEbiTsPcYy1lDsANA/THzS+9WBiy5nfQ==} engines: {node: '>= 10'} @@ -7119,6 +6913,7 @@ packages: emoji-regex: 8.0.0 is-fullwidth-code-point: 3.0.0 strip-ansi: 6.0.1 + dev: true /string-width@5.1.2: resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} @@ -7169,6 +6964,7 @@ packages: resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} dependencies: safe-buffer: 5.2.1 + dev: true /strip-ansi@3.0.1: resolution: {integrity: sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==} @@ -7182,6 +6978,7 @@ packages: engines: {node: '>=8'} dependencies: ansi-regex: 5.0.1 + dev: true /strip-ansi@7.1.0: resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==} @@ -7346,18 +7143,6 @@ packages: tslib: 2.6.2 dev: true - /tar@6.2.1: - resolution: {integrity: sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==} - engines: {node: '>=10'} - dependencies: - chownr: 2.0.0 - fs-minipass: 2.1.0 - minipass: 5.0.0 - minizlib: 2.1.2 - mkdirp: 1.0.4 - yallist: 4.0.0 - dev: false - /text-extensions@1.9.0: resolution: {integrity: sha512-wiBrwC1EhBelW12Zy26JeOUkQ5mRu+5o8rpsJk5+2t+Y5vE7e842qtZDQ2g1NpX/29HdyFeJ4nSIhI47ENSxlQ==} engines: {node: '>=0.10'} @@ -7446,10 +7231,6 @@ packages: engines: {node: '>=6'} dev: true - /tr46@0.0.3: - resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} - dev: false - /traverse@0.6.8: resolution: {integrity: sha512-aXJDbk6SnumuaZSANd21XAo15ucCDE38H4fkqiGsc3MhCK+wOlZvLP9cB/TvpHT0mOyWgC4Z8EwRlzqYSUzdsA==} engines: {node: '>= 0.4'} @@ -7802,6 +7583,7 @@ packages: /util-deprecate@1.0.2: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} + dev: true /v8-compile-cache-lib@3.0.1: resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} @@ -8247,6 +8029,15 @@ packages: typescript: 5.2.2 dev: true + /vue3-next-qrcode@2.0.10(typescript@5.2.2): + resolution: {integrity: sha512-YwdQ1YjbHzcUsA7Vj5ziQLoX7oQZGWDZNaAadLu7EZzV9UU8Dd2IXAxGobF7dIHamgz5mPiOgH1Xb3qO8bCGDA==} + dependencies: + js-binary-schema-parser: 2.0.3 + vue: 3.4.26(typescript@5.2.2) + transitivePeerDependencies: + - typescript + dev: false + /vue@3.4.26(typescript@5.2.2): resolution: {integrity: sha512-bUIq/p+VB+0xrJubaemrfhk1/FiW9iX+pDV+62I/XJ6EkspAO9/DXEjbDFoe8pIfOZBqfk45i9BMc41ptP/uRg==} peerDependencies: @@ -8277,10 +8068,6 @@ packages: vue: 3.4.26(typescript@5.2.2) dev: false - /webidl-conversions@3.0.1: - resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} - dev: false - /webidl-conversions@7.0.0: resolution: {integrity: sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==} engines: {node: '>=12'} @@ -8300,13 +8087,6 @@ packages: engines: {node: '>=12'} dev: true - /whatwg-url@5.0.0: - resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} - dependencies: - tr46: 0.0.3 - webidl-conversions: 3.0.1 - dev: false - /which-boxed-primitive@1.0.2: resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==} dependencies: @@ -8352,12 +8132,6 @@ packages: stackback: 0.0.2 dev: true - /wide-align@1.1.5: - resolution: {integrity: sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==} - dependencies: - string-width: 4.2.3 - dev: false - /wrap-ansi@7.0.0: resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} engines: {node: '>=10'} @@ -8387,6 +8161,7 @@ packages: /wrappy@1.0.2: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} + dev: true /ws@8.16.0: resolution: {integrity: sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==} @@ -8417,6 +8192,7 @@ packages: /yallist@4.0.0: resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} + dev: true /yaml-eslint-parser@1.2.2: resolution: {integrity: sha512-pEwzfsKbTrB8G3xc/sN7aw1v6A6c/pKxLAkjclnAyo5g5qOh6eL9WGu0o3cSDQZKrTNk4KL4lQSwZW+nBkANEg==} diff --git a/src/components/RModal/src/hooks/useModal.ts b/src/components/RModal/src/hooks/useModal.ts index 40ae3fa6..2332f6a9 100644 --- a/src/components/RModal/src/hooks/useModal.ts +++ b/src/components/RModal/src/hooks/useModal.ts @@ -1,4 +1,4 @@ -import { useModal as useNaiveModal } from 'naive-ui' +import { useModal as useNaiveModal, NScrollbar } from 'naive-ui' import { setupInteract } from '../utils' import { queryElements, setStyle, completeSize, setClass } from '@/utils' import { R_MODAL_CLASS, CSS_VARS_KEYS } from '../constant' @@ -11,8 +11,39 @@ const useModal = () => { const { create: naiveCreate, destroyAll: naiveDestroyAll } = useNaiveModal() const create = (options: UseModalCreateOptions) => { + const { content, ...rest } = options + let contentNode = content + + if (rest.preset === 'card' && rest.fullscreen) { + contentNode = () => + h( + NScrollbar, + { + themeOverrides: { + color: 'rgba(0, 0, 0, 0)', + colorHover: 'rgba(0, 0, 0, 0)', + }, + trigger: 'none', + style: { + padding: + '0 var(--n-padding-left) var(--n-padding-bottom) var(--n-padding-left)', + width: 'auto', + height: + 'calc(100vh - 29px - var(--n-padding-bottom) - var(--n-padding-bottom) - var(--n-padding-top))', + }, + }, + { + default: () => + typeof content === 'function' ? content() : content, + }, + ) + } + const { preset, dad, fullscreen, width, cardWidth, dialogWidth } = options - const modalReactive = naiveCreate(options) + const modalReactive = naiveCreate({ + ...rest, + content: contentNode, + }) const { key } = modalReactive const cssVars = { [CSS_VARS_KEYS['width']]: completeSize(width ?? 600), @@ -39,6 +70,17 @@ const useModal = () => { // preset 为 card,fullscreen 为 true 时,最大化 modal if (fullscreen && preset === 'card') { + const cardContentElement = + modalElement.querySelector('.n-card__content') + + if (cardContentElement) { + setStyle(cardContentElement, { + maxHeight: `calc(100vh - 9px - var(--n-padding-bottom) - var(--n-padding-bottom) - var(--n-padding-top))`, + overflowY: 'hidden', + padding: '0', + }) + } + setStyle(modalElement, { width: '100%', height: '100vh', diff --git a/src/components/RQRCode/index.ts b/src/components/RQRCode/index.ts deleted file mode 100644 index cf45bdca..00000000 --- a/src/components/RQRCode/index.ts +++ /dev/null @@ -1,10 +0,0 @@ -import RQRCode from './src' -import qrcodeProps from './src/props' - -import type * as RQRCodeType from './src/types' -import type { ExtractPublicPropTypes } from 'vue' - -export type QRCodeProps = ExtractPublicPropTypes -export type { RQRCodeType } - -export { RQRCode, qrcodeProps } diff --git a/src/components/RQRCode/src/index.scss b/src/components/RQRCode/src/index.scss deleted file mode 100644 index 8ad58338..00000000 --- a/src/components/RQRCode/src/index.scss +++ /dev/null @@ -1,37 +0,0 @@ -.ray-qrcode { - position: relative; - display: inline-flex; - - & .ray-qrcode__error { - position: absolute; - width: 100%; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - z-index: 10; - background-color: rgba(0, 0, 0, 0.7); - width: 100%; - height: 100%; - @include flexCenter; - flex-direction: column; - gap: 18px 0; - border-radius: 3px; - - & .ray-qrcode__error-content { - text-align: center; - font-size: 18px; - font-weight: 500; - color: #ffffff; - } - } -} - -.ray-qrcode { - &.ray-qrcode--loading img { - filter: blur(5px); - } - - &.ray-qrcode--error img { - filter: blur(5px); - } -} diff --git a/src/components/RQRCode/src/index.tsx b/src/components/RQRCode/src/index.tsx deleted file mode 100644 index e70897ff..00000000 --- a/src/components/RQRCode/src/index.tsx +++ /dev/null @@ -1,203 +0,0 @@ -/** - * - * @author Ray - * - * @date 2023-08-29 - * - * @workspace ray-template - * - * @remark 今天也是元气满满撸代码的一天 - */ - -import './index.scss' - -import { NButton, NSpin } from 'naive-ui' -import { RIcon } from '@/components' - -import props from './props' -import { AwesomeQR } from 'awesome-qr' -import { isValueType, downloadAnyFile, call } from '@/utils' - -import type { - QRCodeRenderResponse, - GIFBuffer, - DownloadFilenameType, -} from './types' -import type { WatchStopHandle } from 'vue' - -const readGIFAsArrayBuffer = (url: string): Promise => { - return new Promise((resolve, reject) => { - const xhr = new XMLHttpRequest() - - xhr.responseType = 'blob' - - xhr.onload = () => { - const reader = new FileReader() - - reader.onloadend = () => { - resolve(reader.result) - } - reader.onerror = (e) => { - reject(e) - } - reader.onabort = (e) => { - reject(e) - } - - reader.readAsArrayBuffer(xhr.response) - } - - xhr.open('GET', url) - xhr.send() - }) -} - -export default defineComponent({ - name: 'RQrcode', - props, - setup(props, ctx) { - const { expose } = ctx - - const qrcodeURL = ref() - let gifBuffer: GIFBuffer - let watchCallback!: WatchStopHandle - - const getGIFImageByURL = async () => { - const { gifBackgroundURL } = props - - if (!gifBackgroundURL) { - return - } - - try { - gifBuffer = await readGIFAsArrayBuffer(gifBackgroundURL) - } catch (e) { - console.error(e) - } - } - - const renderQRCode = () => { - const { gifBackground, ...ops } = props - - new AwesomeQR({ - ...ops, - gifBackground: (gifBuffer as ArrayBuffer) ?? void 0, - }) - .draw() - .then((res) => { - const { onSuccess } = props - - if (onSuccess) { - call(onSuccess, res) - } - - qrcodeURL.value = res - }) - .catch((err) => { - const { onError } = props - - if (onError) { - call(onError, err) - } - }) - } - - const errorActionClick = () => { - if (ctx.slots.errorAction) { - return - } - - const { onReload } = props - - if (onReload) { - call(onReload) - } - } - - const downloadQRCode = (fileName?: DownloadFilenameType) => { - if (qrcodeURL.value && isValueType(qrcodeURL.value, 'String')) { - return downloadAnyFile( - qrcodeURL.value, - fileName || new Date().getTime() + '.png', - ) - } else { - return Promise.reject() - } - } - - watchEffect(() => { - if (props.watchText) { - watchCallback = watch( - () => props.text, - () => renderQRCode(), - ) - } else { - watchCallback?.() - } - }) - - expose({ - downloadQRCode, - }) - - onMounted(async () => { - await getGIFImageByURL() - renderQRCode() - }) - onBeforeUnmount(() => { - watchCallback?.() - }) - - return { - qrcodeURL, - errorActionClick, - } - }, - render() { - const { - qrcodeURL, - status, - loadingDescription, - errorDescription, - $slots, - errorActionDescription, - } = this - const { errorActionClick } = this - - return ( -
- - - - {status === 'error' ? ( -
-
- {isValueType(errorDescription, 'String') - ? errorDescription - : () => errorDescription} -
-
- {$slots.errorAction ? ( - $slots.errorAction() - ) : ( - <> - - {{ - default: () => errorActionDescription, - icon: () => ( - - ), - }} - - - )} -
-
- ) : null} -
- ) - }, -}) diff --git a/src/components/RQRCode/src/props.ts b/src/components/RQRCode/src/props.ts deleted file mode 100644 index 109ad312..00000000 --- a/src/components/RQRCode/src/props.ts +++ /dev/null @@ -1,310 +0,0 @@ -/** - * - * @author Ray - * - * @date 2023-08-29 - * - * @workspace ray-template - * - * @remark 今天也是元气满满撸代码的一天 - */ - -import type { QRCodeStatus, QRCodeLevel } from './types' -import type { PropType, VNode } from 'vue' -import type { MaybeArray } from '@/types' -import type { Options } from 'awesome-qr' - -const props = { - loadingDescription: { - /** - * - * Loading status description label - * - * @default undefined - */ - type: String, - }, - watchText: { - /** - * - * Auto watch QR code text - * If update text, then re-render QR code - * - * @default true - */ - type: Boolean, - default: true, - }, - status: { - /** - * - * QR code status - * - * @default undefined - */ - type: String as PropType, - }, - errorDescription: { - /** - * - * QR code error description label - * - * @default 二维码已过期 - */ - type: [String, Object] as PropType, - default: '二维码已过期', - }, - errorActionDescription: { - /** - * - * QR code error action description label - * - * @default 重新加载 - */ - type: String, - default: '重新加载', - }, - text: { - /** - * - * Text to be encoded in the QR code - */ - type: String, - required: true, - }, - size: { - /** - * - * Size of the QR code in pixel. - * - * @default 160 - */ - type: Number, - default: 160, - }, - margin: { - /** - * - * Size of margins around the QR code body in pixel. - * - * @default 12 - */ - type: Number, - default: 12, - }, - correctLevel: { - /** - * - * Error correction level of the QR code - * Accepts a value provided by _QRErrorCorrectLevel_ - * - * @default 1 - */ - type: Number as PropType, - default: 1, - validator: (value: unknown) => [0, 1, 2, 3].includes(value as number), - }, - maskPattern: { - /** - * - * Specify the mask pattern to be used in QR code encoding - * Accepts a value provided by _QRMaskPattern_ - */ - type: Number, - }, - version: { - /** - * - * Specify the version to be used in QR code encoding - * Accepts an integer in range [1, 40] - */ - type: Number, - }, - components: { - /** - * - * Options to control components in the QR code. - * - * @default {data:{scale...},...} - */ - type: Object as PropType, - default: () => ({ - data: { - scale: 1, - }, - timing: { - scale: 1, - protectors: false, - }, - alignment: { - scale: 1, - protectors: false, - }, - cornerAlignment: { - scale: 1, - protectors: true, - }, - }), - }, - colorDark: { - /** - * - * Color of the blocks on the QR code - * Accepts a CSS <color> - * - * @default #000000 - */ - type: String, - default: '#000000', - }, - colorLight: { - /** - * - * Color of the blocks on the QR code - * Accepts a CSS <color> - * - * @default #ffffff - */ - type: String, - default: '#ffffff', - }, - autoColor: { - /** - * - * Automatically calculate the _colorLight_ value from the QR code's background - * - * @default true - */ - type: Boolean, - default: true, - }, - backgroundImage: { - /** - * - * Background image to be used in the QR code - * Accepts a `data:` string in web browsers or a Buffer in Node.js - * - * @default undefined - */ - type: String, - }, - backgroundDimming: { - /** - * - * Color of the dimming mask above the background image - * Accepts a CSS <color> - * - * @default rgba(0, 0, 0, 0) - */ - type: String, - default: 'rgba(0, 0, 0, 0)', - }, - gifBackgroundURL: { - /** - * - * GIF background image to be used in the QR code - * - * @default undefined - */ - type: String, - }, - gifBackground: { - /** - * - * GIF background image to be used in the QR code - * - * @default undefined - */ - type: ArrayBuffer, - }, - whiteMargin: { - /** - * - * Use a white margin instead of a transparent one which reveals the background of the QR code on margins - * - * @default true - */ - type: Boolean, - default: true, - }, - logoImage: { - /** - * - * Logo image to be displayed at the center of the QR code - * Accepts a `data:` string in web browsers or a Buffer in Node.js - * When set to `undefined` or `null`, the logo is disabled - * - * @default undefined - */ - type: String, - }, - logoScale: { - /** - * - * Ratio of the logo size to the QR code size - * - * @default 0.4 - */ - type: Number, - default: 0.4, - }, - logoMargin: { - /** - * - * Size of margins around the logo image in pixels - * - * @default 6 - */ - type: Number, - default: 6, - }, - logoCornerRadius: { - /** - * Corner radius of the logo image in pixels. - * - * @default 8 - */ - type: Number, - default: 8, - }, - dotScale: { - /** - * - * Ratio of the real size to the full size of the blocks. - * This can be helpful when you want to make more parts of the background visible. - * - * @default 1 - */ - type: Number, - default: 1, - }, - onSuccess: { - /** - * - * When the QR code is successfully generated, this callback is called - */ - type: [Function, Array] as PropType< - MaybeArray<(dataURL: ArrayBuffer | string | undefined) => void> - >, - default: null, - }, - onError: { - /** - * - * When the QR code generation fails, this callback is called - */ - type: [Function, Array] as PropType void>>, - default: null, - }, - onReload: { - /** - * - * When reload button is clicked, this callback is called - * This method will not execute if the errorAction slot is used - */ - type: [Function, Array] as PropType void>>, - default: null, - }, -} as const - -export default props diff --git a/src/components/RQRCode/src/types.ts b/src/components/RQRCode/src/types.ts deleted file mode 100644 index 2a0d31f4..00000000 --- a/src/components/RQRCode/src/types.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * - * @author Ray - * - * @date 2023-08-29 - * - * @workspace ray-template - * - * @remark 今天也是元气满满撸代码的一天 - */ - -export type QRCodeStatus = 'error' | 'success' | 'loading' - -export type QRCodeLevel = 0 | 1 | 2 | 3 - -export type QRCodeRenderResponse = string | ArrayBuffer | Buffer | undefined - -export type QRCodeInst = { - /** - * - * @param fileName file name - * - * 如果未设置名称,则默认以 时间戳.png 命名 - */ - downloadQRCode: (fileName?: DownloadFilenameType) => void -} - -export type GIFBuffer = string | ArrayBuffer | null - -export type DefaultDownloadImageType = 'png' | 'jpg' | 'jpeg' | 'webp' - -export type DownloadFilenameType = `${string}.${DefaultDownloadImageType}` diff --git a/src/components/index.ts b/src/components/index.ts index 4467f0f5..6c1972de 100644 --- a/src/components/index.ts +++ b/src/components/index.ts @@ -5,7 +5,6 @@ export * from './RIcon' export * from './RIframe' export * from './RModal' export * from './RMoreDropdown' -export * from './RQRCode' export * from './RTable' export * from './RTransitionComponent' export * from './RForm' @@ -16,7 +15,6 @@ export * from './RBarcode' export type * from './RChart/src/types' export type * from './RCollapseGrid/src/types' export type * from './RIframe/src/types' -export type * from './RQRCode/src/types' export type * from './RTable/src/types' export type * from './RTransitionComponent/src/types' export type * from './RForm/src/types' diff --git a/src/main.ts b/src/main.ts index 4534756f..bca86b8a 100644 --- a/src/main.ts +++ b/src/main.ts @@ -2,6 +2,7 @@ import App from './App' import '@/styles/base.scss' // 初始化一些基础样式 import './app-components/provider/provider.scss' // 初始化 provider 包注入组件样式 +import 'vue3-next-qrcode/es/style.css' // vue3-next-qrcode 样式 import 'virtual:svg-icons-register' // vite-plugin-svg-icons 脚本,启用 svg 雪碧图 diff --git a/src/views/demo/qrcode/index.tsx b/src/views/demo/qrcode/index.tsx index 979223ac..19836b97 100644 --- a/src/views/demo/qrcode/index.tsx +++ b/src/views/demo/qrcode/index.tsx @@ -10,18 +10,18 @@ */ import { NFlex, NCard, NButton } from 'naive-ui' -import { RQRCode } from '@/components' +import { Vue3NextQrcode } from 'vue3-next-qrcode' import LOGO from '@/assets/images/ray.svg' -import type { RQRCodeType } from '@/components' +import type { QRCodeStatus, QRCodeInst } from 'vue3-next-qrcode' export default defineComponent({ name: 'RQRCodeDemo', setup() { const qrcodeText = ref('ray template yes') - const qrcodeStatus = ref() - const rayQRCodeRef = ref() + const qrcodeStatus = ref() + const rayQRCodeRef = ref() return { qrcodeText, @@ -41,9 +41,9 @@ export default defineComponent({ - - - + + - - - - + ) },