diff --git a/.github/actions/download-artifact/action.yml b/.github/actions/download-artifact/action.yml deleted file mode 100644 index eec6a45835b..00000000000 --- a/.github/actions/download-artifact/action.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Download artifact -description: Wrapper around GitHub's official action, with additional extraction before download -# https://github.com/actions/upload-artifact/issues/199#issuecomment-1516555821 - -inputs: - name: - description: Artifact name - required: true - path: - description: Destination path - required: false - default: . - -runs: - using: composite - steps: - - name: Download artifacts - uses: actions/download-artifact@v4 - with: - name: ${{ inputs.name }} - path: ${{ inputs.path }} - - - name: Extract artifacts - run: tar -xvf ${{ inputs.name }}.tar - shell: bash - working-directory: ${{ inputs.path }} - - - name: Remove archive - run: rm -f ${{ inputs.name }}.tar - shell: bash - working-directory: ${{ inputs.path }} diff --git a/.github/actions/nightly-release/action.yml b/.github/actions/nightly-release/action.yml index 42a0e37a855..c87ffe456ff 100644 --- a/.github/actions/nightly-release/action.yml +++ b/.github/actions/nightly-release/action.yml @@ -35,7 +35,7 @@ runs: repository: ${{ inputs.checkout-repo }} ref: ${{ inputs.checkout-ref }} fetch-depth: 0 - - uses: ./.github/actions/pnpm-install + - uses: vuetifyjs/setup-action@master - run: >- node -e " const json = require('./lerna.json'); @@ -47,7 +47,7 @@ runs: shell: bash - run: pnpm lerna version ${{ steps.get-version.outputs.full-version }} --no-push --no-commit-hooks --force-publish --yes shell: bash - - run: pnpm conventional-changelog -p angular --outfile ./packages/vuetify/CHANGELOG.md -r 2 + - run: pnpm conventional-changelog -p vuetify --outfile ./packages/vuetify/CHANGELOG.md -r 2 shell: bash - run: >- node -e "fs.writeFileSync( diff --git a/.github/actions/pnpm-install/action.yml b/.github/actions/pnpm-install/action.yml deleted file mode 100644 index ac8aa599b79..00000000000 --- a/.github/actions/pnpm-install/action.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: pnpm install -description: Restore node_modules and cache, then run pnpm install - -runs: - using: composite - steps: - - uses: actions/cache@v4 - with: - path: | - node_modules - **/node_modules - /home/runner/.cache/pnpm - /home/runner/.cache/Cypress - /home/runner/.pnpm-store - key: pnpm-${{ runner.os }}-${{ hashFiles('./pnpm-lock.yaml') }} - - uses: pnpm/action-setup@v4 - - run: pnpm i --frozen-lockfile - shell: bash diff --git a/.github/actions/upload-artifact/action.yml b/.github/actions/upload-artifact/action.yml deleted file mode 100644 index 32e7bdee35a..00000000000 --- a/.github/actions/upload-artifact/action.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: Upload artifact -description: Wrapper around GitHub's official action, with additional archiving before upload -# https://github.com/actions/upload-artifact/issues/199#issuecomment-1516555821 - -inputs: - name: - description: Artifact name - required: true - path: - description: A file, directory or wildcard pattern that describes what to upload - required: true - if-no-files-found: - description: > - The desired behavior if no files are found using the provided path. - Available Options: - warn: Output a warning but do not fail the action - error: Fail the action with an error message - ignore: Do not output any warnings or errors, the action does not fail - required: false - default: warn - retention-days: - description: > - Duration after which artifact will expire in days. 0 means using default retention. - Minimum 1 day. - Maximum 90 days unless changed from the repository settings page. - required: false - default: '0' - -runs: - using: composite - steps: - - name: Archive artifacts - run: tar -cvf ${{ inputs.name }}.tar ${{ inputs.path }} - shell: bash - - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - if-no-files-found: ${{ inputs.if-no-files-found }} - name: ${{ inputs.name }} - path: ${{ inputs.name }}.tar - retention-days: ${{ inputs.retention-days }} - - - name: Remove archive - run: rm -f ${{ inputs.name }}.tar - shell: bash diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 70ae55916d4..c59b178cf8d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ env: jobs: pre_job: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 outputs: should_skip: ${{ steps.skip_check.outputs.should_skip }} steps: @@ -28,15 +28,21 @@ jobs: name: Build vuetify needs: pre_job if: needs.pre_job.outputs.should_skip != 'true' - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: + - uses: earthly/setup-ucacher@b99687d79dd75262bfc326b9e5ad3a520385a18b - uses: actions/checkout@v4 - - uses: ./.github/actions/pnpm-install - - run: pnpm build vuetify - - uses: ./.github/actions/upload-artifact + - uses: vuetifyjs/setup-action@master + - run: pnpm build:lib + working-directory: ./packages/vuetify + - run: ucacher pnpm build:dist + working-directory: ./packages/vuetify + - run: ucacher pnpm build:types + working-directory: ./packages/vuetify + - uses: actions/upload-artifact@v4 with: name: vuetify-dist - path: > + path: | packages/vuetify/dist packages/vuetify/lib @@ -44,68 +50,60 @@ jobs: name: Lint needs: [pre_job, build-vuetify] if: needs.pre_job.outputs.should_skip != 'true' - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 strategy: fail-fast: false matrix: scopes: ['--scope vuetify --scope @vuetify/api-generator', '--scope vuetifyjs.com'] steps: + - uses: earthly/setup-ucacher@b99687d79dd75262bfc326b9e5ad3a520385a18b - uses: actions/checkout@v4 - - uses: ./.github/actions/download-artifact + - uses: actions/download-artifact@v4 with: name: vuetify-dist - - uses: ./.github/actions/pnpm-install - - run: pnpm lerna run lint $SCOPES + path: packages/vuetify + - uses: vuetifyjs/setup-action@master + - run: ucacher pnpm lerna run lint $SCOPES env: SCOPES: ${{ matrix.scopes }} - test-jest: - name: Test (Jest) + test-unit: + name: Test (Unit) needs: pre_job if: needs.pre_job.outputs.should_skip != 'true' - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 - - uses: ./.github/actions/pnpm-install - - run: pnpm run test:coverage -i + - uses: vuetifyjs/setup-action@master + - run: pnpm run test --project unit working-directory: ./packages/vuetify - test-cypress: - name: Test (Cypress) + test-e2e: + name: Test (e2e) needs: pre_job if: needs.pre_job.outputs.should_skip != 'true' - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 - - uses: ./.github/actions/pnpm-install - - run: pnpm cy:run --record --parallel --ci-build-id $GITHUB_RUN_ID - if: ${{ !startswith(github.ref, 'refs/tags/v') && github.repository_owner == 'vuetifyjs' }} - working-directory: ./packages/vuetify - env: - CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} - - run: pnpm cy:run - if: ${{ !startswith(github.ref, 'refs/tags/v') && github.repository_owner != 'vuetifyjs' }} + - uses: vuetifyjs/setup-action@master + - run: pnpm run test --project browser working-directory: ./packages/vuetify - - uses: actions/upload-artifact@v3 - if: failure() - with: - name: cypress-screenshots - path: ./packages/vuetify/cypress/screenshots/ - if-no-files-found: ignore deploy: - needs: [lint, test-jest, test-cypress, build-vuetify] - runs-on: ubuntu-latest + needs: [lint, test-unit, test-e2e, build-vuetify] + runs-on: ubuntu-24.04 if: github.event_name == 'push' && startswith(github.ref, 'refs/tags/v') && github.repository_owner == 'vuetifyjs' steps: + - uses: earthly/setup-ucacher@b99687d79dd75262bfc326b9e5ad3a520385a18b - uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: ./.github/actions/download-artifact + - uses: actions/download-artifact@v4 with: name: vuetify-dist - - uses: ./.github/actions/pnpm-install - - run: pnpm build api + path: packages/vuetify + - uses: vuetifyjs/setup-action@master + - run: ucacher pnpm build api - run: echo "RELEASE_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV - name: NPM Release run: bash scripts/deploy.sh @@ -123,15 +121,17 @@ jobs: name: Build docs needs: [pre_job, build-vuetify] if: needs.pre_job.outputs.should_skip != 'true' && github.event_name == 'push' && github.repository_owner == 'vuetifyjs' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/next') - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: + - uses: earthly/setup-ucacher@b99687d79dd75262bfc326b9e5ad3a520385a18b - uses: actions/checkout@v4 - - uses: ./.github/actions/download-artifact + - uses: actions/download-artifact@v4 with: name: vuetify-dist - - uses: ./.github/actions/pnpm-install + path: packages/vuetify + - uses: vuetifyjs/setup-action@master - uses: ./.github/actions/download-locales - - run: pnpm build api + - run: ucacher pnpm build api - run: pnpm build docs env: NODE_OPTIONS: --max-old-space-size=4096 @@ -146,22 +146,25 @@ jobs: VITE_EMAILJS_TEMPLATE_ID: ${{ secrets.EMAILJS_TEMPLATE_ID }} VITE_API_SERVER_URL: ${{ secrets.API_SERVER_URL }} VITE_GITHUB_SHA: ${{ github.sha }} - - uses: ./.github/actions/upload-artifact + - uses: actions/upload-artifact@v4 with: name: docs-dist path: packages/docs/dist publish-docs: - needs: [lint, test-jest, build-docs] - runs-on: ubuntu-latest - if: github.event_name == 'push' && github.repository_owner == 'vuetifyjs' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/next') + needs: [lint, test-unit, build-docs] + runs-on: ubuntu-24.04 + environment: Production + if: github.event_name == 'push' && github.repository_owner == 'vuetifyjs' && github.ref == 'refs/heads/master' steps: - uses: actions/checkout@v4 - - uses: ./.github/actions/download-artifact + - uses: actions/download-artifact@v4 with: name: docs-dist - - uses: ./.github/actions/pnpm-install - - run: pnpm add vercel --global - - run: node scripts/deploy-and-alias.js ${{ github.ref }} - env: - NOW_TOKEN: ${{ secrets.NOW_TOKEN }} + path: packages/docs/dist + - uses: vuetifyjs/coolify-action@master + with: + token: ${{ secrets.GITHUB_TOKEN }} + imageName: docs + coolifyWebhook: ${{ secrets.COOLIFY_WEBHOOK }} + coolifySecret: ${{ secrets.COOLIFY_TOKEN }} diff --git a/.github/workflows/close-issue.yml b/.github/workflows/close-issue.yml index 1122540141d..539ed67ea26 100644 --- a/.github/workflows/close-issue.yml +++ b/.github/workflows/close-issue.yml @@ -12,7 +12,7 @@ env: jobs: close: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 if: github.repository_owner == 'vuetifyjs' steps: - uses: vuetifyjs/close-action@master diff --git a/.github/workflows/crowdin-uploads.yml b/.github/workflows/crowdin-uploads.yml index 97fb9f013ea..88ecc4cfa15 100644 --- a/.github/workflows/crowdin-uploads.yml +++ b/.github/workflows/crowdin-uploads.yml @@ -21,7 +21,7 @@ env: jobs: upload-to-crowdin: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Checkout uses: actions/checkout@v4 diff --git a/.github/workflows/nightly-pr.yml b/.github/workflows/nightly-pr.yml index b55f1652a72..20f52ef9876 100644 --- a/.github/workflows/nightly-pr.yml +++ b/.github/workflows/nightly-pr.yml @@ -9,7 +9,7 @@ on: jobs: deploy: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 if: ${{ github.repository_owner == 'vuetifyjs' }} steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/nightly-schedule.yml b/.github/workflows/nightly-schedule.yml index 6dea032fa96..3ff8bfd46d9 100644 --- a/.github/workflows/nightly-schedule.yml +++ b/.github/workflows/nightly-schedule.yml @@ -6,7 +6,7 @@ on: jobs: deploy: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 if: ${{ github.repository_owner == 'vuetifyjs' }} strategy: max-parallel: 1 @@ -49,7 +49,7 @@ jobs: percy: name: Visual regression tests - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 if: ${{ github.repository_owner == 'vuetifyjs' }} steps: - uses: actions/checkout@v4 @@ -64,18 +64,12 @@ jobs: echo "Last commit was more than 24 hours ago, skipping tests" exit 1 fi - - uses: ./.github/actions/pnpm-install + - uses: vuetifyjs/setup-action@master - run: echo "COMMIT=$(git rev-parse HEAD)" >> $GITHUB_ENV - - run: pnpm cy:run + - run: pnpm test:percy working-directory: ./packages/vuetify env: PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }} PERCY_BRANCH: master PERCY_TARGET_BRANCH: master PERCY_COMMIT: ${{ env.COMMIT }} - - uses: actions/upload-artifact@v3 - if: failure() - with: - name: cypress-screenshots - path: ./packages/vuetify/cypress/screenshots/ - if-no-files-found: ignore diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 2b7abfdfc6d..e192907708c 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -6,7 +6,7 @@ on: jobs: stale: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - uses: actions/stale@v9 with: diff --git a/.github/workflows/triage.yml b/.github/workflows/triage.yml index 6b25c9fe022..def257ccd39 100644 --- a/.github/workflows/triage.yml +++ b/.github/workflows/triage.yml @@ -1,18 +1,20 @@ name: Issue triage on: issues: - types: [opened, labeled, unlabeled] + types: [opened, labeled, unlabeled, closed] jobs: triage: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 - uses: vuetifyjs/triage-action@master with: token: ${{ secrets.GITHUB_TOKEN }} triageLabel: 'S: triage' + staleLabel: 'S: stale' sponsorsFile: '.github/sponsors.yml' + duplicateLabel: 'duplicate' triagedLabels: |- T: documentation T: bug diff --git a/.gitignore b/.gitignore index e556fb4f513..f433d067efa 100644 --- a/.gitignore +++ b/.gitignore @@ -21,5 +21,8 @@ coverage/ cypress/screenshots cypress/videos +# vitest +__screenshots__/ + .vercel .now diff --git a/.npmrc b/.npmrc index 0e5a898885a..76d5968aa83 100644 --- a/.npmrc +++ b/.npmrc @@ -1,2 +1,3 @@ auto-install-peers=false ignore-workspace-root-check=true +shell-emulator=true diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 00000000000..dc5f6a52b13 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +22.6.0 diff --git a/.pnpmfile.cjs b/.pnpmfile.cjs index 5ef62d5594e..e7e3c5af05a 100644 --- a/.pnpmfile.cjs +++ b/.pnpmfile.cjs @@ -14,6 +14,10 @@ module.exports = { if (['@rollup/pluginutils', 'rollup-plugin-terser', '@rollup/plugin-replace'].includes(pkg.name)) { pkg.peerDependencies.rollup = '*' } + if (pkg.name === 'brilliant-errors') { + delete pkg.dependencies.bumpp + delete pkg.dependencies.vitest + } return pkg } } diff --git a/.ucacherignore b/.ucacherignore new file mode 100644 index 00000000000..3976e7278a6 --- /dev/null +++ b/.ucacherignore @@ -0,0 +1,5 @@ +.git/**/* +node_modules/**/* +/tmp/**/* +.github/workflows/**/* +package.json diff --git a/.ucacherignore.env b/.ucacherignore.env new file mode 100644 index 00000000000..27ecbced8f0 --- /dev/null +++ b/.ucacherignore.env @@ -0,0 +1,52 @@ +ACTIONS_RUNTIME_TOKEN +GITHUB_ACTION +GITHUB_ACTION_PATH +GITHUB_ACTION_REF +GITHUB_ACTOR +GITHUB_ACTOR_ID +GITHUB_API_URL +GITHUB_BASE_REF +GITHUB_ENV +GITHUB_EVENT_NAME +GITHUB_EVENT_PATH +GITHUB_GRAPHQL_URL +GITHUB_HEAD_REF +GITHUB_JOB +GITHUB_OUTPUT +GITHUB_PATH +GITHUB_REF +GITHUB_REF_NAME +GITHUB_REF_PROTECTED +GITHUB_REF_TYPE +GITHUB_RETENTION_DAYS +GITHUB_RUN_ATTEMPT +GITHUB_RUN_ID +GITHUB_RUN_NUMBER +GITHUB_SERVER_URL +GITHUB_SHA +GITHUB_STATE +GITHUB_STEP_SUMMARY +GITHUB_TOKEN +GITHUB_TRIGGERING_ACTOR +GITHUB_WORKFLOW +GITHUB_WORKFLOW_REF +GITHUB_WORKFLOW_SHA +GITHUB_WORKSPACE +HOSTNAME +INVOCATION_ID +JOURNAL_STREAM +LOG_LEVEL +LS_COLORS +RUNNER_DEBUG +RUNNER_ENVIRONMENT +RUNNER_NAME +RUNNER_TEMP +RUNNER_TOOL_CACHE +RUNNER_TRACKING_ID +SSH_CLIENT +SSH_CONNECTION +STATS_BLT +STATS_EXTP +SYSTEMD_EXEC_PID +VITE_GITHUB_SHA +XDG_SESSION_ID diff --git a/.vercelignore b/.vercelignore deleted file mode 100644 index be2cda03b58..00000000000 --- a/.vercelignore +++ /dev/null @@ -1,6 +0,0 @@ -node_modules -/scripts -/packages/vuetify -/packages/api-generator -/packages/docs/src -!/packages/docs/dist diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000000..d149e10e681 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,4 @@ +FROM nginx:alpine +EXPOSE 80 +COPY ./packages/docs/dist /usr/share/nginx/html +COPY ./packages/docs/build/nginx.conf /etc/nginx/nginx.conf diff --git a/README.md b/README.md index 6197af29abf..232962ba6cd 100644 --- a/README.md +++ b/README.md @@ -61,8 +61,8 @@ Funds donated through GitHub Sponsors and Patreon go directly to support John an - - + + @@ -75,8 +75,18 @@ Funds donated through GitHub Sponsors and Patreon go directly to support John an - - Your Logo Here + + + + + + + + + + + + @@ -89,59 +99,63 @@ Funds donated through GitHub Sponsors and Patreon go directly to support John an - - + + - - - + + + - - + + - - + + - - + + - - + + - - + + - - + + + + + + + - - + + - diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 00000000000..3aa0fd8b8b7 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,8 @@ +services: + docs: + image: nginx:alpine + ports: + - ${PORT:-8095}:80 + volumes: + - ./packages/docs/dist:/usr/share/nginx/html + - ./packages/docs/build/nginx.conf:/etc/nginx/nginx.conf diff --git a/eslint-local-rules.js b/eslint-local-rules.js index da775cc19cb..8bbba50c890 100644 --- a/eslint-local-rules.js +++ b/eslint-local-rules.js @@ -5,8 +5,7 @@ module.exports = { 'no-components-index': require('./scripts/rules/no-components-index'), 'jsx-condition-key': require('./scripts/rules/jsx-condition-key'), 'jsx-curly-spacing': require('./scripts/rules/jsx-curly-spacing'), - 'jest-global-imports': require('./scripts/rules/jest-global-imports'), - 'cypress-types-reference': require('./scripts/rules/cypress-types-reference'), + 'vitest-global-imports': require('./scripts/rules/vitest-global-imports'), 'sort-imports': require('./scripts/rules/sort-imports'), 'no-nullish-coalescing-in-condition': require('./scripts/rules/no-nullish-coalescing-in-condition'), } diff --git a/lerna.json b/lerna.json index adccaf732bf..ce3af3594f1 100644 --- a/lerna.json +++ b/lerna.json @@ -13,5 +13,5 @@ } }, "npmClient": "pnpm", - "version": "3.6.14" + "version": "3.7.9" } \ No newline at end of file diff --git a/package.json b/package.json index 0a694ef5e78..b80b83615bd 100755 --- a/package.json +++ b/package.json @@ -27,30 +27,29 @@ "vue-ecosystem-ci:test": "pnpm --filter vuetify run lint && pnpm --filter vuetify run test" }, "engines": { - "node": ">=18.19.0 || >=20.6.0" + "node": ">=22.0.0" }, "devDependencies": { - "@babel/cli": "^7.24.1", - "@babel/core": "^7.24.4", - "@babel/preset-env": "^7.24.4", - "@babel/preset-typescript": "^7.24.1", - "@mdi/font": "6.2.95", - "@mdi/js": "6.2.95", - "@mdi/svg": "6.2.95", + "@babel/cli": "^7.24.8", + "@babel/core": "^7.25.2", + "@babel/preset-env": "^7.25.3", + "@babel/preset-typescript": "^7.24.7", + "@mdi/font": "7.4.47", + "@mdi/js": "7.4.47", + "@mdi/svg": "7.4.47", "@octokit/core": "^5.2.0", - "@typescript-eslint/eslint-plugin": "^6.21.0", - "@typescript-eslint/parser": "^6.21.0", + "@typescript-eslint/eslint-plugin": "^7.18.0", + "@typescript-eslint/parser": "^7.18.0", "@unhead/vue": "^1.9.4", "@vue/compiler-sfc": "^3.4.27", + "@vue/language-server": "^2.0.29", "@vue/runtime-core": "^3.4.27", "@vue/runtime-dom": "^3.4.27", "@vueuse/head": "^1.3.1", "babel-eslint": "^10.1.0", - "babel-jest": "^28.1.3", "conventional-changelog-cli": "^3.0.0", "conventional-changelog-vuetify": "^1.2.1", "conventional-github-releaser": "^3.1.5", - "cross-env": "^7.0.3", "cross-spawn": "^7.0.3", "eslint": "^8.57.0", "eslint-config-standard": "^17.1.0", @@ -66,28 +65,36 @@ "glob": "^11.0.0", "husky": "^3.1.0", "inquirer": "^6.5.2", - "jest": "^28.1.3", - "jest-cli": "^28.1.3", - "jest-environment-jsdom": "^28.1.3", - "jest-serializer-html": "^7.1.0", "lerna": "^8.1.7", "magic-string": "^0.30.9", "mkdirp": "^3.0.1", "moment": "^2.30.1", "rimraf": "^5.0.5", - "sass": "^1.77.8", + "sass": "^1.80.1", + "sass-embedded": "^1.80.1", "semver": "^7.6.0", "shelljs": "^0.8.5", "stringify-object": "^5.0.0", - "typescript": "~5.3.3", + "typescript": "~5.5.4", "upath": "^2.0.1", "vite-plugin-inspect": "^0.8.3", "vite-plugin-warmup": "^0.1.0", "vue": "^3.4.27", "vue-analytics": "^5.16.1", "vue-router": "^4.3.0", - "vue-tsc": "^1.8.27", + "vue-tsc": "^2.0.29", "yargs": "^17.7.2" }, - "packageManager": "pnpm@9.5.0" + "packageManager": "pnpm@9.10.0", + "pnpm": { + "patchedDependencies": { + "@mdi/js@7.4.47": "patches/@mdi__js@7.4.47.patch", + "@testing-library/vue": "patches/@testing-library__vue.patch" + }, + "overrides": { + "@testing-library/dom": "npm:@vuetify/testing-library-dom@1.0.2", + "@types/node": "22.5.4", + "tough-cookie": "5.0.0-rc.4" + } + } } diff --git a/packages/api-generator/package.json b/packages/api-generator/package.json index 3ae4d481272..3d1f7682467 100755 --- a/packages/api-generator/package.json +++ b/packages/api-generator/package.json @@ -1,6 +1,6 @@ { "name": "@vuetify/api-generator", - "version": "3.6.14", + "version": "3.7.9", "private": true, "description": "", "scripts": { @@ -20,6 +20,7 @@ "vuetify": "workspace:*" }, "devDependencies": { + "@types/lodash-es": "^4.17.12", "@types/stringify-object": "^4.0.5", "eslint": "^8.57.0", "lodash-es": "^4.17.21", diff --git a/packages/api-generator/src/index.ts b/packages/api-generator/src/index.ts index 0521edd3a1f..f9f02295a49 100644 --- a/packages/api-generator/src/index.ts +++ b/packages/api-generator/src/index.ts @@ -1,8 +1,8 @@ import fs from 'fs/promises' import path from 'upath' import { components } from 'vuetify/dist/vuetify-labs.js' -import importMap from 'vuetify/dist/json/importMap.json' assert { type: 'json' } -import importMapLabs from 'vuetify/dist/json/importMap-labs.json' assert { type: 'json' } +import importMap from 'vuetify/dist/json/importMap.json' with { type: 'json' } +import importMapLabs from 'vuetify/dist/json/importMap-labs.json' with { type: 'json' } import { kebabCase } from './helpers/text' import type { BaseData, ComponentData, DirectiveData } from './types' import { generateComposableDataFromTypes, generateDirectiveDataFromTypes } from './types' diff --git a/packages/api-generator/src/locale/en/Select.json b/packages/api-generator/src/locale/en/Select.json index e2af9a03120..d625eecaa29 100644 --- a/packages/api-generator/src/locale/en/Select.json +++ b/packages/api-generator/src/locale/en/Select.json @@ -1,6 +1,6 @@ { "props": { - "closeText": "Text set to to the inputs `aria-label` and `title` when input menu is closed.", + "closeText": "Text set to the inputs `aria-label` and `title` when input menu is closed.", "chips": "Changes display of selections to chips.", "closableChips": "Enables the [closable](/api/v-chip/#props-closable) prop on all [v-chip](/components/chips/) components.", "hideSelected": "Do not display in the select menu items that are already selected.", @@ -9,6 +9,6 @@ "menuProps": "Pass props through to the `v-menu` component. Accepts an object with anything from [v-menu](/api/v-menu/#props) props, camelCase keys are recommended.", "multiple": "Changes select to multiple. Accepts array for value.", "openOnClear": "Open's the menu whenever the clear icon is clicked.", - "openText": "Text set to to the inputs **aria-label** and **title** when input menu is open." + "openText": "Text set to the inputs **aria-label** and **title** when input menu is open." } } diff --git a/packages/api-generator/src/locale/en/VBadge.json b/packages/api-generator/src/locale/en/VBadge.json index df9a307d48d..c52c270e38d 100644 --- a/packages/api-generator/src/locale/en/VBadge.json +++ b/packages/api-generator/src/locale/en/VBadge.json @@ -3,13 +3,13 @@ "bordered": "Applies a **2px** by default and **1.5px** border around the badge when using the **dot** property.", "content": "Text content to show in the badge.", "dot": "Reduce the size of the badge and hide its contents.", - "floating": "Elevates the badge above the slotted content.", - "inline": "Moves the badge to be inline with the wrapping element. Supports the usage of the **left** prop.", + "floating": "Move the badge further away from the slotted content. Equivalent to an 8px offset.", + "inline": "Display as an inline block instead of absolute position. **location**, **floating**, and **offset** will have no effect.", "label": "The **aria-label** used for the badge.", "max": "Sets the maximum number allowed when using the **content** prop with a `number` like value. If the content number exceeds the maximum value, a `+` suffix is added.", "offsetX": "Offset the badge on the x-axis.", "offsetY": "Offset the badge on the y-axis.", - "overlap": "Overlaps the slotted content on top of the component." + "modelValue": "Controls whether the component is visible or hidden." }, "slots": { "badge": "The slot used for the badge's content." diff --git a/packages/api-generator/src/locale/en/VCalendar.json b/packages/api-generator/src/locale/en/VCalendar.json index f4fd72b61c6..298c322a760 100644 --- a/packages/api-generator/src/locale/en/VCalendar.json +++ b/packages/api-generator/src/locale/en/VCalendar.json @@ -1,7 +1,6 @@ { "props": { "allowedDates": "Determines which dates are selectable.", - "displayValue": "Value to display for the component, possibly a formatted date.", "hideHeader": "Determines whether the header is hidden in the calendar view.", "hideWeekNumber": "Toggles the display of week numbers in a calendar view.", "intervals": "Total number of intervals in a day view.", @@ -14,7 +13,8 @@ "year": "Specifies the year for the calendar view." }, "slots": { - "header": "Slot for custom header content." + "header": "Slot for custom header content.", + "event": "Slot for custom event content." }, "events": { "next": "Emitted when moving to the next time period.", diff --git a/packages/api-generator/src/locale/en/VChip.json b/packages/api-generator/src/locale/en/VChip.json index 0f19ce2421c..2cbe5efb21c 100644 --- a/packages/api-generator/src/locale/en/VChip.json +++ b/packages/api-generator/src/locale/en/VChip.json @@ -12,6 +12,7 @@ "label": "Applies a medium size border radius.", "outlined": "Removes background and applies border and text color.", "pill": "Remove `v-avatar` padding.", + "size": "Sets the height, padding and the font size of the component. Accepts only predefined options: **x-small**, **small**, **default**, **large**, and **x-large**.", "value": "The value used when a child of a [v-chip-group](/components/chip-groups)." }, "events": { diff --git a/packages/api-generator/src/locale/en/VConfirmEdit.json b/packages/api-generator/src/locale/en/VConfirmEdit.json index 61341dd2aea..8828e91097d 100644 --- a/packages/api-generator/src/locale/en/VConfirmEdit.json +++ b/packages/api-generator/src/locale/en/VConfirmEdit.json @@ -5,6 +5,7 @@ }, "events": { "ok": "The event emitted when the user clicks the OK button", + "save": "The event emitted when the user clicks the Save button", "cancel": "The event emitted when the user clicks the Cancel button" } } diff --git a/packages/api-generator/src/locale/en/VDataIterator.json b/packages/api-generator/src/locale/en/VDataIterator.json index 84967bc5c1d..b20df3e4fd8 100644 --- a/packages/api-generator/src/locale/en/VDataIterator.json +++ b/packages/api-generator/src/locale/en/VDataIterator.json @@ -43,6 +43,7 @@ "input": "Array of selected items.", "itemExpanded": "Event emitted when an item is expanded or closed.", "itemSelected": "Event emitted when an item is selected or deselected.", + "update:currentItems": "The `.sync` event for `currentItems` prop.", "update:expanded": "The `.sync` event for `expanded` prop.", "update:groupBy": "The `.sync` event for `groupBy` prop.", "update:itemsPerPage": "The `.sync` event for `itemsPerPage` prop.", diff --git a/packages/api-generator/src/locale/en/VDataTable.json b/packages/api-generator/src/locale/en/VDataTable.json index 2e5bdcdefb6..037caf10c0c 100644 --- a/packages/api-generator/src/locale/en/VDataTable.json +++ b/packages/api-generator/src/locale/en/VDataTable.json @@ -38,7 +38,10 @@ "virtualRows": "Virtualizes the rendering of rows. Be aware that you can not use the `body`, `body.prepend` or `body.append` slots with this prop." }, "slots": { + "[`header.${string}`]": "Slot for custom rendering of a header cell.", "[`item.${string}`]": "Slot for custom rendering of a row cell.", + "header.data-table-expand": "Slot to replace the default `v-icon` used when expanding header.", + "header": "Slot to replace the default table ``.", "body": "Slot to replace the default table ``.", "body.append": "Appends elements to the end of the default table ``.", "body.prepend": "Prepends elements to the start of the default table ``.", @@ -55,11 +58,15 @@ "heading": "Slot to add a custom header.", "header.": "Slot to customize a specific header column.", "header.data-table-select": "Slot to replace the default `v-checkbox-btn` in header.", + "headers": "An array of objects that each describe a header column. See the example below for a definition of all properties.", "item": "Slot to replace the default rendering of a row.", "item.data-table-select": "Slot to replace the default `v-checkbox-btn` used when selecting rows.", "item.data-table-expand": "Slot to replace the default `v-icon` used when expanding rows.", "item.": "Slot to customize a specific column.", "loading": "Defines content for when `loading` is true and no items are provided.", + "tbody": "Slot to replace the default table ``.", + "thead": "Slot to replace the default table ``.", + "tfoot": "Slot to replace the default table ``.", "no-data": "Defines content for when no items are provided.", "no-results": "Defines content for when `search` is provided but no results are found.", "progress": "Slot to replace the default `` component.", @@ -73,6 +80,7 @@ "pageCount": "Emits when the **pageCount** property of the **pagination** prop is updated.", "pagination": "Emits when something changed to the `pagination` which can be provided via the `pagination` prop.", "toggleSelectAll": "Emits when the `select-all` checkbox in table header is clicked. This checkbox is enabled by the **show-select** prop.", + "update:currentItems": "Emits with the items currently being displayed.", "update:expanded": "Emits when the **expanded** property of the **options** prop is updated.", "update:groupBy": "Emits when the **group-by** property of the **options** property is updated.", "update:groupDesc": "Emits when the **group-desc** property of the **options** prop is updated.", diff --git a/packages/api-generator/src/locale/en/VDataTableFooter.json b/packages/api-generator/src/locale/en/VDataTableFooter.json index a4a1cb8ac38..0ed0f4dbc14 100644 --- a/packages/api-generator/src/locale/en/VDataTableFooter.json +++ b/packages/api-generator/src/locale/en/VDataTableFooter.json @@ -12,5 +12,8 @@ "prevIcon": "Previous icon.", "prevPageLabel": "Label for previous page.", "showCurrentPage": "Show current page number between prev/next icons." + }, + "slots": { + "prepend": "Extra content placed before the default pagination." } } diff --git a/packages/api-generator/src/locale/en/VDataTableHeader.json b/packages/api-generator/src/locale/en/VDataTableHeader.json deleted file mode 100644 index 9ac97c72528..00000000000 --- a/packages/api-generator/src/locale/en/VDataTableHeader.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "props": { - "everyItem": "Indicates if all items in table are selected.", - "headers": "Array of header items to display.", - "mobile": "Renders mobile view of headers.", - "options": "Options object. Identical to the one on `v-data-table`.", - "showGroupBy": "Shows group by button.", - "singleSelect": "Toggles rendering of select-all checkbox.", - "someItems": "Indicates if one or more items in table are selected.", - "sortByText": "Sets the label text used by the default sort-by selector when `v-data-table` is rendering the mobile view.", - "sortIcon": "Icon used for sort button." - } -} diff --git a/packages/api-generator/src/locale/en/VDataTableHeaders.json b/packages/api-generator/src/locale/en/VDataTableHeaders.json index d00ed1ab290..8abf879cf07 100644 --- a/packages/api-generator/src/locale/en/VDataTableHeaders.json +++ b/packages/api-generator/src/locale/en/VDataTableHeaders.json @@ -3,9 +3,14 @@ "disableSort": "Toggles rendering of sort button.", "sortAscIcon": "Icon used for ascending sort button.", "sortDescIcon": "Icon used for descending sort button.", - "sticky": "Sticks the header to the top of the table." + "sticky": "Deprecated, use `fixed-header` instead.", + "fixedHeader": "Sticks the header to the top of the table." }, "slots": { - "[`column.${string}`]": "Slot for custom rendering of a column." + "[`column.${string}`]": "Slot for custom rendering of a column.", + "[`header.${string}`]": "Slot for custom rendering of a header cell.", + "header.data-table-expand": "Slot for the expand button in the header.", + "header.data-table-select": "Slot for the select-all checkbox in the header.", + "headers": "Slot to replace the default rendering of the `` element." } } diff --git a/packages/api-generator/src/locale/en/VDataTableRow.json b/packages/api-generator/src/locale/en/VDataTableRow.json index b2e97b4f05e..83eedaed30b 100644 --- a/packages/api-generator/src/locale/en/VDataTableRow.json +++ b/packages/api-generator/src/locale/en/VDataTableRow.json @@ -1,6 +1,20 @@ { "props": { + "cellProps": "Props to be applied to the cell.", "index": "Row index.", "item": "Data (key, index and column values) of the displayed item." + }, + "events": { + "contextmenu": "The event emitted when the user clicks the context menu button.", + "dblclick": "The event emitted when the user double clicks the row.", + "[`item.${string}`]": "The event emitted when the user clicks the item." + }, + "slots": { + "[`header.${string}`]": "Slot for custom rendering of a header cell.", + "[`item.${string}`]": "Slot for custom rendering of a row cell.", + "header.data-table-expand": "Slot to replace the default `v-icon` used when expanding header.", + "header.data-table-select": "Slot to replace the default `v-checkbox-btn` in header.", + "item.data-table-expand": "Slot for the expand button in the row.", + "item.data-table-select": "Slot for the select checkbox in the row." } } diff --git a/packages/api-generator/src/locale/en/VDataTableRows.json b/packages/api-generator/src/locale/en/VDataTableRows.json index 65a41784031..0418f0f18e3 100644 --- a/packages/api-generator/src/locale/en/VDataTableRows.json +++ b/packages/api-generator/src/locale/en/VDataTableRows.json @@ -10,7 +10,10 @@ "click:row": "Emitted when a row is clicked. Native event is passed as the first argument, row data as the second." }, "slots": { - "[`item.${string}]`": "Slot for custom rendering of a column.", + "[`header.${string}`]": "Slot for custom rendering of a header cell.", + "header.data-table-expand": "Slot to replace the default `v-icon` used when expanding header.", + "header.data-table-select": "Slot to replace the default `v-checkbox-btn` in header.", + "[`item.${string}`]": "Slot for custom rendering of a column.", "data-table-group": "Slot for custom rendering of a group.", "data-table-select": "Slot for custom rendering of a header cell with the select checkbox.", "expanded-row": "Slot for custom rendering of an expanded row.", diff --git a/packages/api-generator/src/locale/en/VDataTableServer.json b/packages/api-generator/src/locale/en/VDataTableServer.json index c4c85b60cf3..e361b53bd70 100644 --- a/packages/api-generator/src/locale/en/VDataTableServer.json +++ b/packages/api-generator/src/locale/en/VDataTableServer.json @@ -1,11 +1,17 @@ { "props": { - "itemsLength": "Number of all items." + "itemsLength": "Number of all items.", + "headerProps": "Pass props to the default header. See [`v-data-table-server` API](/api/v-data-table-server) for more information." }, "slots": { + "[`header.${string}`]": "Slot for a specific header. See [`v-data-table-server` API](/api/v-data-table-server) for more information.", "[`column.${string}`]": "Slot for custom rendering of a column.", "[`item.${string}`]": "Slot for custom rendering of a row cell.", "body": "Slot to replace the default rendering of the `` element.", + "body.append": "Adds content to the empty space in the body.", + "body.prepend": "Adds content to the empty space in the body.", + "header.data-table-expand": "Slot for the expand button in the header.", + "header.data-table-select": "Slot for the select-all checkbox in the header.", "bottom": "Slot to add content below the table.", "colgroup": "Slot to replace the default rendering of the `` element.", "column.data-table-expand": "Slot to replace the default `v-icon` used when expanding rows.", diff --git a/packages/api-generator/src/locale/en/VDataTableVirtual.json b/packages/api-generator/src/locale/en/VDataTableVirtual.json index e24b810ffb4..5d0638db286 100644 --- a/packages/api-generator/src/locale/en/VDataTableVirtual.json +++ b/packages/api-generator/src/locale/en/VDataTableVirtual.json @@ -1,8 +1,16 @@ { + "props": { + "headerProps": "Pass props to the default header." + }, "slots": { + "[`header.${string}`]": "Slot for a specific header. See [`v-data-table-virtual` API](/api/v-data-table-virtual) for more information.", "[`column.${string}`]": "Slot for custom rendering of a column.", "[`item.${string}`]": "Slot for custom rendering of a row cell.", + "header.data-table-expand": "Slot for the expand button in the header.", + "header.data-table-select": "Slot for the select-all checkbox in the header.", "body": "Slot to replace the default rendering of the `` element.", + "body.append": "Slot to add content below the table.", + "body.prepend": "Slot to add content above the table.", "bottom": "Slot to add content below the table.", "colgroup": "Slot to replace the default rendering of the `` element.", "column.data-table-expand": "Slot to replace the default `v-icon` used when expanding rows.", diff --git a/packages/api-generator/src/locale/en/VDatePicker.json b/packages/api-generator/src/locale/en/VDatePicker.json index 2234f5b312e..a0c4e318ffe 100644 --- a/packages/api-generator/src/locale/en/VDatePicker.json +++ b/packages/api-generator/src/locale/en/VDatePicker.json @@ -7,6 +7,12 @@ "eventColor": "Sets the color for event dot. It can be string (all events will have the same color) or `object` where attribute is the event date and value is boolean/color/array of colors for specified date or `function` taking date as a parameter and returning boolean/color/array of colors for that date.", "events": "Array of dates or object defining events or colors or function returning boolean/color/array of colors.", "expandIcon": "Icon used for **view-mode** toggle.", + "hideHeader": "Hides the header.", + "hideWeekdays": "Hides the weekdays.", + "landscape": "Changes the picker to landscape mode.", + "month": "Sets the month.", + "weekdays": "Array of weekdays.", + "year": "Sets the year.", "firstDayOfWeek": "Sets the first day of the week, starting with 0 for Sunday.", "flat": "Removes elevation.", "format": "Takes a date object and returns it in a specified format.", @@ -40,10 +46,17 @@ "yearIcon": "Sets the icon in the year selection button." }, "events": { + "update:month": "Emitted when the month changes.", + "update:year": "Emitted when the year changes.", + "update:viewMode": "Emitted when the view mode changes.", ":date": "Emitted when the specified DOM event occurs on the date button.", ":month": "Emitted when the specified DOM event occurs on the month button.", ":year": "Emitted when the specified DOM event occurs on the year button.", "change": "Reactive date picker emits `input` even when any part of the date (year/month/day) changes, but `change` event is emitted only when the day (for date pickers) or month (for month pickers) changes. If `range` prop is set, date picker emits `change` when both [from, to] are selected.", "update:pickerDate": "The `.sync` event for `picker-date` prop." + }, + "slots": { + "actions": "Slot for the actions.", + "header": "Slot for the header." } } diff --git a/packages/api-generator/src/locale/en/VDatePickerControls.json b/packages/api-generator/src/locale/en/VDatePickerControls.json new file mode 100644 index 00000000000..c8b7ee5c739 --- /dev/null +++ b/packages/api-generator/src/locale/en/VDatePickerControls.json @@ -0,0 +1,15 @@ +{ + "props": { + "modeIcon": "Icon used for the mode button.", + "nextIcon": "Icon used for the next button.", + "prevIcon": "Icon used for the previous button.", + "viewMode": "Sets the view mode of the date picker." + }, + "events": { + "click:month": "Event fired when clicking on the month.", + "click:next": "Event fired when clicking the next button.", + "click:prev": "Event fired when clicking the previous button.", + "click:year": "Event fired when clicking the date text.", + "click:text": "Event fired when clicking the year." + } +} diff --git a/packages/api-generator/src/locale/en/VDatePickerHeader.json b/packages/api-generator/src/locale/en/VDatePickerHeader.json new file mode 100644 index 00000000000..ed109816f66 --- /dev/null +++ b/packages/api-generator/src/locale/en/VDatePickerHeader.json @@ -0,0 +1,6 @@ +{ + "props": { + "header": "Sets the header content.", + "transition": "Sets the transition when the header changes." + } +} diff --git a/packages/api-generator/src/locale/en/VDatePickerMonth.json b/packages/api-generator/src/locale/en/VDatePickerMonth.json index e7697b78d2b..396bda1c277 100644 --- a/packages/api-generator/src/locale/en/VDatePickerMonth.json +++ b/packages/api-generator/src/locale/en/VDatePickerMonth.json @@ -1,7 +1,21 @@ { "props": { + "allowedDates": "Sets the allowed dates of the month.", "hideWeekdays": "Hide the days of the week letters.", + "max": "Sets the maximum date of the month.", + "min": "Sets the minimum date of the month.", + "month": "Sets the month.", + "weekdays": "Sets the weekdays of the month.", + "year": "Sets the year.", + "multiple": "Sets the multiple of the month.", + "showAdjacentMonths": "Show adjacent months.", + "showWeek": "Show the week number.", "transition": "The transition used when changing months into the future", "reverseTransition": "The transition used when changing months into the past" + }, + "events": { + "update:month": "Fired when the month changes.", + "update:year": "Fired when the year changes.", + "day": "Fired when a day is clicked." } } diff --git a/packages/api-generator/src/locale/en/VDatePickerMonths.json b/packages/api-generator/src/locale/en/VDatePickerMonths.json new file mode 100644 index 00000000000..fe4691b8cbc --- /dev/null +++ b/packages/api-generator/src/locale/en/VDatePickerMonths.json @@ -0,0 +1,5 @@ +{ + "slots": { + "month": "Slot for the month." + } +} diff --git a/packages/api-generator/src/locale/en/VDatePickerYear.json b/packages/api-generator/src/locale/en/VDatePickerYear.json new file mode 100644 index 00000000000..8b56845b0ef --- /dev/null +++ b/packages/api-generator/src/locale/en/VDatePickerYear.json @@ -0,0 +1,21 @@ +{ + "props": { + "allowedDates": "Sets the allowed dates of the month.", + "hideWeekdays": "Hide the days of the week letters.", + "max": "Sets the maximum date of the month.", + "min": "Sets the minimum date of the month.", + "month": "Sets the month.", + "weekdays": "Sets the weekdays of the month.", + "year": "Sets the year.", + "day": "The current day of the selected date.", + "multiple": "Sets the multiple of the month.", + "showAdjacentMonths": "Show adjacent months.", + "showWeek": "Show the week number.", + "transition": "The transition used when changing months into the future", + "reverseTransition": "The transition used when changing months into the past" + }, + "events": { + "update:month": "Event emitted when the month changes.", + "update:year": "Event emitted when the year changes." + } +} diff --git a/packages/api-generator/src/locale/en/VDatePickerYears.json b/packages/api-generator/src/locale/en/VDatePickerYears.json new file mode 100644 index 00000000000..85e72f00423 --- /dev/null +++ b/packages/api-generator/src/locale/en/VDatePickerYears.json @@ -0,0 +1,7 @@ +{ + "props": { + "max": "Sets the maximum date of the month.", + "min": "Sets the minimum date of the month.", + "year": "Sets the year." + } +} diff --git a/packages/api-generator/src/locale/en/VDialog.json b/packages/api-generator/src/locale/en/VDialog.json index c5cb77f7f8e..d9e1762c28c 100644 --- a/packages/api-generator/src/locale/en/VDialog.json +++ b/packages/api-generator/src/locale/en/VDialog.json @@ -20,6 +20,7 @@ "activatorEl": "Ref to the current activator element.", "animateClick": "Function invoked when user clicks outside the component and the **persistent** prop is used.", "contentEl": "Ref to the current content element.", + "scrimEl": "Ref to the current scrim element.", "globalTop": "Used by activator to determine a components position in the global stack order.", "localTop": "Used by activator to determine a components position in the local stack order.", "updateLocation": "Function used for locationStrategy positioning." diff --git a/packages/api-generator/src/locale/en/VDialogTransition.json b/packages/api-generator/src/locale/en/VDialogTransition.json index 0967ef424bc..f0afa14c071 100644 --- a/packages/api-generator/src/locale/en/VDialogTransition.json +++ b/packages/api-generator/src/locale/en/VDialogTransition.json @@ -1 +1,5 @@ -{} +{ + "props": { + "target": "Sets the target element for the transition." + } +} diff --git a/packages/api-generator/src/locale/en/VEmptyState.json b/packages/api-generator/src/locale/en/VEmptyState.json index 7e0a4593d30..72ae9b491f9 100644 --- a/packages/api-generator/src/locale/en/VEmptyState.json +++ b/packages/api-generator/src/locale/en/VEmptyState.json @@ -5,7 +5,8 @@ "href": "The URL the action button links to.", "justify": "Control the justification of the text.", "textWidth": "Sets the width of the text container.", - "to": "The URL the action button links to." + "to": "The URL the action button links to.", + "size": "The size used to control the dimensions of the media element inside the component. Can be specified as a number or a string (e.g., '50%', '100px')." }, "events": { "click:action": "Event emitted when the action button is clicked." diff --git a/packages/api-generator/src/locale/en/VExpansionPanel.json b/packages/api-generator/src/locale/en/VExpansionPanel.json index 4dedda416cd..89adeecf64d 100644 --- a/packages/api-generator/src/locale/en/VExpansionPanel.json +++ b/packages/api-generator/src/locale/en/VExpansionPanel.json @@ -1,8 +1,10 @@ { "props": { "disabled": "Disables the expansion-panel content.", - "readonly": "Makes the expansion-panel content read only.", - "value": "Controls the opened/closed state of content." + "readonly": "Makes the expansion panel content read only.", + "focusable": "Makes the expansion panel content focusable.", + "value": "Controls the opened/closed state of content.", + "static": "Remove title size expansion when selected." }, "events": { "change": "Toggles the value of the selected panel.", diff --git a/packages/api-generator/src/locale/en/VExpansionPanelTitle.json b/packages/api-generator/src/locale/en/VExpansionPanelTitle.json index c3d385c2bf4..fd57c53bd5c 100644 --- a/packages/api-generator/src/locale/en/VExpansionPanelTitle.json +++ b/packages/api-generator/src/locale/en/VExpansionPanelTitle.json @@ -3,6 +3,11 @@ "collapseIcon": "Icon used when the expansion panel is in a collapsable state.", "expandIcon": "Icon used when the expansion panel is in a expandable state.", "hideActions": "Hide the expand icon in the content title.", - "static": "Remove title size expansion when selected." + "static": "Remove title size expansion when selected.", + "focusable": "Makes the expansion panel headers focusable.", + "readonly": "Makes the expansion panel content read only." + }, + "slots": { + "actions": "Slot for the actions." } } diff --git a/packages/api-generator/src/locale/en/VExpansionPanels.json b/packages/api-generator/src/locale/en/VExpansionPanels.json index 0fcd1a5b4b7..9c095ccb48f 100644 --- a/packages/api-generator/src/locale/en/VExpansionPanels.json +++ b/packages/api-generator/src/locale/en/VExpansionPanels.json @@ -5,9 +5,10 @@ "focusable": "Makes the expansion-panel headers focusable.", "flat": "Removes the expansion-panel's elevation and borders.", "hover": "Applies a background-color shift on hover to expansion panel headers.", - "inset": "Makes the expansion-panel open with a inset style.", + "inset": "Makes the expansion panel open with a inset style.", "popout": "Makes the expansion-panel open with an popout style.", - "readonly": "Makes the entire expansion-panel read only.", + "readonly": "Makes the entire expansion panel read only.", + "static": "Remove title size expansion when selected.", "tile": "Removes the border-radius.", "value": "Controls the opened/closed state of content in the expansion-panel. Corresponds to a zero-based index of the currently opened content. If the `multiple` prop (previously `expand` in 1.5.x) is used then it is an array of numbers where each entry corresponds to the index of the opened content. The index order is not relevant." } diff --git a/packages/api-generator/src/locale/en/VFileInput.json b/packages/api-generator/src/locale/en/VFileInput.json index 1530cc6a21d..9022f6e37f3 100644 --- a/packages/api-generator/src/locale/en/VFileInput.json +++ b/packages/api-generator/src/locale/en/VFileInput.json @@ -8,7 +8,6 @@ "hideInput": "Display the icon only without the input (file names).", "multiple": "Adds the **multiple** attribute to the input, allowing multiple file selections.", "showSize": "Sets the displayed size of selected file(s). When using **true** will default to _1000_ displaying (**kB, MB, GB**) while _1024_ will display (**KiB, MiB, GiB**).", - "smallChips": "Changes display of selections to chips with the **small** property.", "truncateLength": "The length of a filename before it is truncated with ellipsis.", "value": "A single or array of [File objects](https://developer.mozilla.org/en-US/docs/Web/API/File)." }, diff --git a/packages/api-generator/src/locale/en/VImg.json b/packages/api-generator/src/locale/en/VImg.json index 3519c534ae9..d39cb84be76 100644 --- a/packages/api-generator/src/locale/en/VImg.json +++ b/packages/api-generator/src/locale/en/VImg.json @@ -24,5 +24,12 @@ "error": "Emitted if the image fails to load.", "load": "Emitted when the image is loaded.", "loadstart": "Emitted when the image starts to load." + }, + "exposed": { + "currentSrc": "The current source of the image. This is the image that is currently being displayed. This is useful for determining if the image is loading or not.", + "image": "The image element.", + "naturalHeight": "The natural height of the image.", + "naturalWidth": "The natural width of the image.", + "state": "The current state of the image. This is useful for determining if the image is loading or not." } } diff --git a/packages/api-generator/src/locale/en/VInput.json b/packages/api-generator/src/locale/en/VInput.json index 47f3a7804c3..ca319eb0451 100644 --- a/packages/api-generator/src/locale/en/VInput.json +++ b/packages/api-generator/src/locale/en/VInput.json @@ -27,6 +27,8 @@ "mouseup": "Emitted when click is released." }, "exposed": { + "errorMessages": "An array of error messages that were set by the `setErrors` method.", + "isValid": "Boolean indicating if the input is valid.", "reset": "Resets the input value.", "resetValidation": "Resets validation of the input without modifying its value.", "validate": "Validates the input's value." diff --git a/packages/api-generator/src/locale/en/VLayoutItem.json b/packages/api-generator/src/locale/en/VLayoutItem.json index 0967ef424bc..c720fa99f74 100644 --- a/packages/api-generator/src/locale/en/VLayoutItem.json +++ b/packages/api-generator/src/locale/en/VLayoutItem.json @@ -1 +1,5 @@ -{} +{ + "props": { + "position": "The position of the item." + } +} diff --git a/packages/api-generator/src/locale/en/VList.json b/packages/api-generator/src/locale/en/VList.json index c45480c4d31..17843255058 100644 --- a/packages/api-generator/src/locale/en/VList.json +++ b/packages/api-generator/src/locale/en/VList.json @@ -1,6 +1,7 @@ { "props": { "itemType": "Designates the key on the supplied items that is used for determining the nodes type.", + "activatable": "Designates whether the list items are activatable.", "disabled": "Puts all children inputs into a disabled state.", "inactive": "If set, the list tile will not be rendered as a link even if it has to/href prop or @click handler.", "lines": "Designates a **minimum-height** for all children `v-list-item` components. This prop uses [line-clamp](https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-line-clamp) and is not supported in all browsers.", @@ -9,6 +10,24 @@ "subheader": "Removes the top padding from `v-list-subheader` components. When used as a **String**, renders a subheader for you.", "slim": "Reduces horizontal spacing for badges, icons, tooltips, and avatars within slim list items to create a more compact visual representation.", "collapseIcon": "Icon to display when the list item is expanded.", - "expandIcon": "Icon to display when the list item is collapsed." + "expandIcon": "Icon to display when the list item is collapsed.", + "selectable": "Designates whether the list items are selectable." + }, + "events": { + "click:activate": "Emitted when the list item is activated.", + "click:open": "Emitted when the list item is opened.", + "click:select": "Emitted when the list item is selected.", + "update:activated": "Emitted when the list item is activated.", + "update:opened": "Emitted when the list item is opened.", + "update:selected": "Emitted when the list item is selected." + }, + "slots": { + "divider": "Slot for the divider.", + "header": "Slot for the header.", + "subheader": "Removes the top padding from `v-list-subheader` components. When used as a **String**, renders a subheader for you.", + "children": "Slot for the children.", + "focus": "Slot for the focus.", + "open": "Slot for the open.", + "parents": "Slot for the parents." } } diff --git a/packages/api-generator/src/locale/en/VListGroup.json b/packages/api-generator/src/locale/en/VListGroup.json index 798eb02ee5a..4054c872d3f 100644 --- a/packages/api-generator/src/locale/en/VListGroup.json +++ b/packages/api-generator/src/locale/en/VListGroup.json @@ -7,7 +7,8 @@ "noAction": "Removes left padding assigned for action icons from group items.", "prependIcon": "Prepends an icon to the component, uses the same syntax as `v-icon`.", "subgroup": "Designate the component as nested list group.", - "value": "Expands / Collapse the list-group." + "value": "Expands / Collapse the list-group.", + "fluid": "Removes the left padding assigned for action icons from group items." }, "exposed": { "isOpen": "Returns the current state of the list-group." diff --git a/packages/api-generator/src/locale/en/VListItem.json b/packages/api-generator/src/locale/en/VListItem.json index 61d1733f621..ce3ff1870dc 100644 --- a/packages/api-generator/src/locale/en/VListItem.json +++ b/packages/api-generator/src/locale/en/VListItem.json @@ -4,7 +4,7 @@ "color": "Applies specified color to the control when in an **active** state or **input-value** is **true** - supports utility colors (for example `success` or `purple`) or css color (`#033` or `rgba(255, 0, 0, 0.5)`). Find a list of built-in classes on the [colors page](/styles/colors#material-colors),", "contained": "Changes the component style by changing how color is applied to the background.", "title": "Generates a `v-list-item-title` component with the supplied value. Note that this overrides the native [`title`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/title) attribute, that must be set with `v-bind:title.attr` instead.", - "value": "The value used for selection.", + "value": "The value used for selection. Obtained from [`v-list`](/api/v-list)'s `v-model:selected` when the item is selected.", "lines": "The line declaration specifies the minimum height of the item and can also be controlled from v-list with the same prop.", "nav": "Reduces the width v-list-item takes up as well as adding a border radius.", "slim": "Reduces horizontal spacing for badges, icons, tooltips, and avatars to create a more compact visual representation." diff --git a/packages/api-generator/src/locale/en/VListSubheader.json b/packages/api-generator/src/locale/en/VListSubheader.json index 0967ef424bc..4aa6c753d0a 100644 --- a/packages/api-generator/src/locale/en/VListSubheader.json +++ b/packages/api-generator/src/locale/en/VListSubheader.json @@ -1 +1,8 @@ -{} +{ + "props": { + "tag": "Specify a custom tag used on the root element.", + "title": "Specify a title text for the component.", + "inset": "Insets the subheader without additional spacing, aligning it flush with the surrounding content.", + "sticky": "Sticks the header to the top of the table." + } +} diff --git a/packages/api-generator/src/locale/en/VLocaleProvider.json b/packages/api-generator/src/locale/en/VLocaleProvider.json index 0967ef424bc..a848828f572 100644 --- a/packages/api-generator/src/locale/en/VLocaleProvider.json +++ b/packages/api-generator/src/locale/en/VLocaleProvider.json @@ -1 +1,7 @@ -{} +{ + "props": { + "fallbackLocale": "Specify a fallback locale to use when a locale is not found.", + "locale": "Specify a locale to use.", + "rtl": "Specify a RTL mode." + } +} diff --git a/packages/api-generator/src/locale/en/VMain.json b/packages/api-generator/src/locale/en/VMain.json index 0967ef424bc..75b873474aa 100644 --- a/packages/api-generator/src/locale/en/VMain.json +++ b/packages/api-generator/src/locale/en/VMain.json @@ -1 +1,5 @@ -{} +{ + "props": { + "scrollable": "Specify a custom scrollable function." + } +} diff --git a/packages/api-generator/src/locale/en/VMenu.json b/packages/api-generator/src/locale/en/VMenu.json index 1c722b31e76..50b31910e48 100644 --- a/packages/api-generator/src/locale/en/VMenu.json +++ b/packages/api-generator/src/locale/en/VMenu.json @@ -13,6 +13,17 @@ "openDelay": "Milliseconds to wait before opening component. Only works with the **open-on-hover** prop.", "openOnClick": "Designates whether menu should open on activator click.", "openOnHover": "Designates whether menu should open on activator hover.", - "returnValue": "The value that is updated when the menu is closed - must be primitive. Dot notation is supported." + "returnValue": "The value that is updated when the menu is closed - must be primitive. Dot notation is supported.", + "submenu": "Opens with right arrow and closes on left instead of up/down. Implies `location=\"end\"`. Directions are reversed for RTL." + }, + "exposed": { + "activatorEl": "Ref to the current activator element.", + "animateClick": "Function invoked when user clicks outside.", + "contentEl": "Ref to the current content element.", + "globalTop": "Used by activator to determine a components position in the global stack order.", + "id": "The unique identifier of the component.", + "localTop": "Used by activator to determine a components position in the local stack order.", + "target": "Ref to the current target element.", + "updateLocation": "Function used for locationStrategy positioning." } } diff --git a/packages/api-generator/src/locale/en/VNavigationDrawer.json b/packages/api-generator/src/locale/en/VNavigationDrawer.json index 24ac310e122..73b3293bac5 100644 --- a/packages/api-generator/src/locale/en/VNavigationDrawer.json +++ b/packages/api-generator/src/locale/en/VNavigationDrawer.json @@ -19,7 +19,8 @@ "temporary": "A temporary drawer sits above its application and uses a scrim (overlay) to darken the background.", "touchless": "Disable mobile touch functionality.", "value": "Controls whether the component is visible or hidden.", - "location": "Controls the edge of the screen the drawer is attached to." + "location": "Controls the edge of the screen the drawer is attached to.", + "sticky": "When true, the drawer will remain visible when scrolling past the top of the page." }, "slots": { "append": "A slot at the bottom of the drawer.", @@ -29,5 +30,8 @@ "events": { "transitionend": "Emits event object when transition is complete.", "update:rail": "Event that is emitted when the rail model changes." + }, + "exposed": { + "isStuck": "Used to determine if the drawer is stuck to the top of the page." } } diff --git a/packages/api-generator/src/locale/en/VNumberInput.json b/packages/api-generator/src/locale/en/VNumberInput.json new file mode 100644 index 00000000000..b88211ffcf7 --- /dev/null +++ b/packages/api-generator/src/locale/en/VNumberInput.json @@ -0,0 +1,14 @@ +{ + "props": { + "controlVariant": "The color of the control. It defaults to the value of `variant` prop.", + "hideInput": "Hide the input field.", + "inset": "Applies an indentation to the dividers used in the stepper buttons.", + "max": "Specifies the maximum allowable value for the input.", + "min": "Specifies the minimum allowable value for the input.", + "step": "Defines the interval between allowed values when the user increments or decrements the input" + }, + "slots": { + "decrement": "Slot for customizing the decrement button or icon used to decrease the value of the input.", + "increment": "Slot for customizing the increment button or icon used to increase the value of the input." + } +} diff --git a/packages/api-generator/src/locale/en/VOverlay.json b/packages/api-generator/src/locale/en/VOverlay.json index 36cd8a8b3c8..cc66bde776d 100644 --- a/packages/api-generator/src/locale/en/VOverlay.json +++ b/packages/api-generator/src/locale/en/VOverlay.json @@ -12,6 +12,17 @@ }, "events": { "click:outside": "Event that fires when clicking outside an active overlay.", - "afterLeave": "Event that fires after the overlay has finished transitioning out." + "afterLeave": "Event that fires after the overlay has finished transitioning out.", + "afterEnter": "Event that fires after the overlay has finished transitioning in." + }, + "exposed": { + "activatorEl": "Ref to the current activator element.", + "animateClick": "Function invoked when user clicks outside.", + "contentEl": "Ref to the current content element.", + "globalTop": "Used by activator to determine a components position in the global stack order.", + "localTop": "Used by activator to determine a components position in the local stack order.", + "scrimEl": "Ref to the current scrim element.", + "target": "Ref to the current target element.", + "updateLocation": "Function used for locationStrategy positioning." } } diff --git a/packages/api-generator/src/locale/en/VParallax.json b/packages/api-generator/src/locale/en/VParallax.json index 832d1d0db39..9f68244bbc4 100644 --- a/packages/api-generator/src/locale/en/VParallax.json +++ b/packages/api-generator/src/locale/en/VParallax.json @@ -2,6 +2,12 @@ "props": { "alt": "Attaches an alt property to the parallax image.", "src": "The image to parallax.", + "scale": "The scale of the parallax image.", "srcset": "A set of alternate images to use based on device size. [Read more...](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attr-srcset)." + }, + "slots": { + "error": "Puts the input in a manual error state.", + "placeholder": "Sets the input's placeholder text.", + "sources": "A list of `` elements." } } diff --git a/packages/api-generator/src/locale/en/VPicker.json b/packages/api-generator/src/locale/en/VPicker.json index 0e720d6074f..6b5ea7ca3d3 100644 --- a/packages/api-generator/src/locale/en/VPicker.json +++ b/packages/api-generator/src/locale/en/VPicker.json @@ -2,5 +2,8 @@ "props": { "landscape": "Puts the picker into landscape mode.", "hideHeader": "Hide the picker header." + }, + "slots": { + "actions": "Slot for customizing the content in the actions area" } } diff --git a/packages/api-generator/src/locale/en/VRating.json b/packages/api-generator/src/locale/en/VRating.json index 8909cf20ff9..8a1bd98dee5 100644 --- a/packages/api-generator/src/locale/en/VRating.json +++ b/packages/api-generator/src/locale/en/VRating.json @@ -10,7 +10,8 @@ "halfIncrements": "Allows the selection of half increments.", "hover": "Provides visual feedback when hovering over icons.", "length": "The amount of items to show.", - "readonly": "Removes all hover effects and pointer events." + "readonly": "Removes all hover effects and pointer events.", + "itemAriaLabel": "The **aria-label** used for each item." }, "slots": { "item": "The slot for each item.", diff --git a/packages/api-generator/src/locale/en/VResponsive.json b/packages/api-generator/src/locale/en/VResponsive.json index e899c62a56e..c850f25d70d 100644 --- a/packages/api-generator/src/locale/en/VResponsive.json +++ b/packages/api-generator/src/locale/en/VResponsive.json @@ -3,5 +3,8 @@ "aspectRatio": "Sets a base aspect ratio, calculated as width/height. This will only set a **minimum** height, the component can still grow if it has a lot of content.", "contentClass": "Apply a custom class to the internal content element.", "inline": "Display as an inline element instead of a block, also disables flex-grow." + }, + "slots": { + "additional": "The slot for additional content." } } diff --git a/packages/api-generator/src/locale/en/VSelect.json b/packages/api-generator/src/locale/en/VSelect.json index b350a1af0d3..01ae1b6c3c6 100644 --- a/packages/api-generator/src/locale/en/VSelect.json +++ b/packages/api-generator/src/locale/en/VSelect.json @@ -19,7 +19,6 @@ "overflow": "Creates an overflow button - [spec](https://material.io/guidelines/components/buttons.html#buttons-dropdown-buttons).", "searchInput": "Use the **.sync** modifier to catch user input from the search input.", "segmented": "Creates a segmented button - [spec](https://material.io/guidelines/components/buttons.html#buttons-dropdown-buttons).", - "smallChips": "Changes display of selections to chips with the **small** property.", "tags": "Tagging functionality, allows the user to create new values not available from the **items** prop." }, "events": { diff --git a/packages/api-generator/src/locale/en/VSlideGroup.json b/packages/api-generator/src/locale/en/VSlideGroup.json index 4003ee86c94..edaf96457a5 100644 --- a/packages/api-generator/src/locale/en/VSlideGroup.json +++ b/packages/api-generator/src/locale/en/VSlideGroup.json @@ -15,5 +15,11 @@ "change": "Emitted when the component value is changed by user interaction.", "click:prev": "Emitted when the prev is clicked.", "click:next": "Emitted when the next is clicked." + }, + "exposed": { + "focus": "Focus the component.", + "scrollOffset": "Scroll the component to a given index.", + "scrollTo": "Scroll the component to a given index.", + "selected": "Get the selected component index." } } diff --git a/packages/api-generator/src/locale/en/VSnackbar.json b/packages/api-generator/src/locale/en/VSnackbar.json index 261ccb6982a..473db493c0c 100644 --- a/packages/api-generator/src/locale/en/VSnackbar.json +++ b/packages/api-generator/src/locale/en/VSnackbar.json @@ -9,5 +9,14 @@ }, "slots": { "actions": "Used to bind styles to [v-btn](/components/buttons) to match MD2 specification." + }, + "exposed": { + "activatorEl": "Ref to the current activator element.", + "animateClick": "Function invoked when user clicks outside.", + "contentEl": "Ref to the current content element.", + "globalTop": "Used by activator to determine a components position in the global stack order.", + "localTop": "Used by activator to determine a components position in the local stack order.", + "scrimEl": "Ref to the current scrim element.", + "updateLocation": "Function used for locationStrategy positioning." } } diff --git a/packages/api-generator/src/locale/en/VSparkline.json b/packages/api-generator/src/locale/en/VSparkline.json index fbb53433e7e..8b62dede9bd 100644 --- a/packages/api-generator/src/locale/en/VSparkline.json +++ b/packages/api-generator/src/locale/en/VSparkline.json @@ -17,6 +17,10 @@ "smooth": "Number of px to use as a corner radius. `true` defaults to 8, `false` is 0.", "type": "Choose between a trendline or bars.", "value": "An array of numbers.", - "width": "Width of the SVG trendline or bars." + "width": "Width of the SVG trendline or bars.", + "id": "The id of the component.", + "itemValue": "The value of the item.", + "max": "The maximum value of the sparkline.", + "min": "The minimum value of the sparkline." } } diff --git a/packages/api-generator/src/locale/en/VTextarea.json b/packages/api-generator/src/locale/en/VTextarea.json index 318d95ad79c..05348794645 100644 --- a/packages/api-generator/src/locale/en/VTextarea.json +++ b/packages/api-generator/src/locale/en/VTextarea.json @@ -5,10 +5,10 @@ "noResize": "Remove resize handle.", "persistentPlaceholder": "Forces placeholder to always be visible.", "prefix": "Displays prefix text.", - "rowHeight": "Height value for each row. Requires the use of the **auto-grow** prop.", "rows": "Default row count.", "suffix": "Displays suffix text.", - "maxRows": "Specifies the maximum number of row count" + "maxRows": "Specifies the maximum number of rows for **auto-grow**.", + "autofocus": "The element should be focused as soon as the page loads." }, "events": { "keydown": "Emitted when **any** key is pressed, textarea must be focused.", diff --git a/packages/api-generator/src/locale/en/VThemeProvider.json b/packages/api-generator/src/locale/en/VThemeProvider.json index 2cd0275178d..462a133cd75 100644 --- a/packages/api-generator/src/locale/en/VThemeProvider.json +++ b/packages/api-generator/src/locale/en/VThemeProvider.json @@ -1,6 +1,7 @@ { "props": { - "root": "Use the current value of `$vuetify.theme.dark` as opposed to the provided one." + "root": "Use the current value of `$vuetify.theme.dark` as opposed to the provided one.", + "withBackground": "Use the current value of `$vuetify.theme.dark` as opposed to the provided one." }, "slots": { "default": "All child components will have their theme overridden. Must have exactly one root element." diff --git a/packages/api-generator/src/locale/en/VTimePicker.json b/packages/api-generator/src/locale/en/VTimePicker.json index ce361a10f2e..13b1603b1ca 100644 --- a/packages/api-generator/src/locale/en/VTimePicker.json +++ b/packages/api-generator/src/locale/en/VTimePicker.json @@ -16,7 +16,7 @@ "width": "Width of the picker." }, "slots": { - "default": "Displayed below the clock, can be used for example for adding action button (`OK` and `Cancel`)/" + "default": "Displayed below the clock, can be used for example for adding action button (`OK` and `Cancel`)" }, "events": { "change": "Emitted when the time selection is done (when user changes the minute for HH:MM picker and the second for HH:MM:SS picker.", diff --git a/packages/api-generator/src/locale/en/VTimePickerClock.json b/packages/api-generator/src/locale/en/VTimePickerClock.json new file mode 100644 index 00000000000..896bf476dbe --- /dev/null +++ b/packages/api-generator/src/locale/en/VTimePickerClock.json @@ -0,0 +1,18 @@ +{ + "props": { + "allowedValues": "Restricts which hours can be selected.", + "ampm": "Displays time in a 12-hour format.", + "displayValue": "Used to display a custom value on the clock.", + "double": "If set, this probably indicates a double rotation or a mode where more than one set of values (like hours and minutes) is displayed on the clock at the same time.", + "format": "Specifies the format of the displayed time, either 12-hour or 24-hour, depending on the component's setup.", + "max": "Defines the maximum time value that can be selected.", + "min": "Defines the minimum time value that can be selected.", + "readonly": "When true, the picker is in a read-only state, and users cannot modify the selected time.", + "rotate": "Controls rotation, specifying the degree of rotation for the clock hands.", + "scrollable": "Allows the time selection to be scrollable, enhancing user experience for devices with scroll inputs.", + "step": "Defines the increments between selectable times, such as a step of 1 for every minute or a larger step for every 5 or 15 minutes." + }, + "events": { + "change": "The event that is triggered when the selected time is changed." + } +} diff --git a/packages/api-generator/src/locale/en/VTooltip.json b/packages/api-generator/src/locale/en/VTooltip.json index 08406ae4a2f..b6b9d664ad6 100644 --- a/packages/api-generator/src/locale/en/VTooltip.json +++ b/packages/api-generator/src/locale/en/VTooltip.json @@ -14,6 +14,7 @@ "animateClick": "Function invoked when user clicks outside.", "contentEl": "Ref to the current content element.", "globalTop": "Used by activator to determine a components position in the global stack order.", + "scrimEl": "Ref to the current scrim element.", "localTop": "Used by activator to determine a components position in the local stack order.", "updateLocation": "Function used for locationStrategy positioning." } diff --git a/packages/api-generator/src/locale/en/VTreeview.json b/packages/api-generator/src/locale/en/VTreeview.json index 3025b82f42b..0d6564ba408 100644 --- a/packages/api-generator/src/locale/en/VTreeview.json +++ b/packages/api-generator/src/locale/en/VTreeview.json @@ -16,6 +16,7 @@ "itemText": "Property on supplied `items` that contains its label text.", "loadChildren": "A function used when dynamically loading children. If this prop is set, then the supplied function will be run if expanding an item that has a `item-children` property that is an empty array. Supports returning a Promise.", "loadingIcon": "Icon used when node is in a loading state.", + "modelValue": "Allows one to control which nodes are selected. The array contains the values of currently selected items. It is equivalent to the `v-model:selected`", "multipleActive": "When `true`, allows user to have multiple active nodes at the same time.", "offIcon": "Icon used when node is not selected. Only visible when `selectable` is `true`.", "onIcon": "Icon used when leaf node is selected or when a branch node is fully selected. Only visible when `selectable` is `true`.", @@ -25,12 +26,13 @@ "returnObject": "When `true` will make `v-model`, `active.sync` and `open.sync` return the complete object instead of just the key.", "rounded": "Provides an alternative active style for `v-treeview` node. Only visible when `activatable` is `true` and should not be used in conjunction with the `shaped` prop.", "search": "The search model for filtering results.", - "selectable": "Will render a checkbox next to each node allowing them to be selected.", + "selectable": "Will render a checkbox next to each node allowing them to be selected. Additionally, the **[openOnClick](/api/v-treeview/#props-open-on-click)** property will be applied internally.", "selectedColor": "The color of the selection checkbox.", "selectionType": "Controls how the treeview selects nodes. There are two modes available: 'leaf' and 'independent'.", "shaped": "Provides an alternative active style for `v-treeview` node. Only visible when `activatable` is `true` and should not be used in conjunction with the `rounded` prop.", "transition": "Applies a transition when nodes are opened and closed.", - "value": "Allows one to control which nodes are selected. The array consists of the `item-key` of each selected item. Is used with `@input` event to allow for `v-model` binding." + "value": "Allows one to control which nodes are selected. The array consists of the `item-key` of each selected item. Is used with `@input` event to allow for `v-model` binding.", + "collapseIcon": "Icon to display when the list item is expanded." }, "slots": { "append": "Appends content after label.", diff --git a/packages/api-generator/src/locale/en/VTreeviewGroup.json b/packages/api-generator/src/locale/en/VTreeviewGroup.json new file mode 100644 index 00000000000..b53db48095b --- /dev/null +++ b/packages/api-generator/src/locale/en/VTreeviewGroup.json @@ -0,0 +1,5 @@ +{ + "props": { + "fluid": "Removes viewport maximum-width size breakpoints." + } +} diff --git a/packages/api-generator/src/locale/en/VTreeviewItem.json b/packages/api-generator/src/locale/en/VTreeviewItem.json new file mode 100644 index 00000000000..bd95dfab3d9 --- /dev/null +++ b/packages/api-generator/src/locale/en/VTreeviewItem.json @@ -0,0 +1,9 @@ +{ + "props": { + "lines": "The line declaration specifies the minimum height of the item and can also be controlled from v-list with the same prop.", + "loading": "Places the v-treeview-item into a loading state.", + "nav": "Reduces the width of v-list-item takes and adds a border radius.", + "slim": "Reduces the vertical padding or height of the v-treeview-item, making it more compact.", + "toggleIcon": "Allows customization of the icon used to toggle the expansion and collapse of treeview branches." + } +} diff --git a/packages/api-generator/src/locale/en/useDate.json b/packages/api-generator/src/locale/en/useDate.json index 69aa2f4b833..3d9d5ef74c4 100644 --- a/packages/api-generator/src/locale/en/useDate.json +++ b/packages/api-generator/src/locale/en/useDate.json @@ -1,7 +1,10 @@ { "exposed": { + "addWeeks": "Adds the specified number of weeks to the date.", "addDays": "Adds the specified number of days to the date.", "addMonths": "Adds the specified number of months to the date.", + "addHours": "Adds the specified number of hours to the date.", + "addMinutes": "Adds the specified number of minutes to the date.", "date": "Takes any value and returns a date object.", "endOfDay": "Returns the last second of the day.", "endOfMonth": "Returns the last day of the month.", @@ -13,6 +16,11 @@ "getWeek": "Returns the week of the year of the date.", "getWeekArray": "Returns an array of the days of the week of the date.", "getWeekdays": "Returns an array of the names of the days of the week.", + "getDate": "Returns the day of the month of the date.", + "getHours": "Returns the hours of the day of the date.", + "getMinutes": "Returns the minutes of the hour of the date.", + "getNextMonth": "Returns the next month of the date.", + "parseISO": "Parses a date string in ISO format.", "isAfter": "Returns true if the first date is after the second date.", "isBefore": "Returns true if the first date is before the second date.", "isEqual": "Returns true if the two dates are equal.", @@ -23,10 +31,15 @@ "locale": "Returns the current locale being used.", "getYear": "Returns the year of the date.", "setYear": "Sets the year of the date.", + "setMonth": "Sets the month of the date.", + "setDate": "Sets the day of the date.", + "setHours": "Sets the hours of the date.", + "setMinutes": "Sets the minutes of the date.", "startOfDay": "Returns the first second of the day.", "startOfMonth": "Returns first day of the month.", "startOfWeek": "Returns the first day of the week.", "startOfYear": "Returns the first day of the year.", - "toJsDate": "Converts date value to a JS Date Object." + "toJsDate": "Converts date value to a JS Date Object.", + "toISO": "Converts date value to a ISO Date Object." } } diff --git a/packages/api-generator/src/locale/en/useDisplay.json b/packages/api-generator/src/locale/en/useDisplay.json index 47c5a9d3d81..41c23129dce 100644 --- a/packages/api-generator/src/locale/en/useDisplay.json +++ b/packages/api-generator/src/locale/en/useDisplay.json @@ -21,6 +21,8 @@ "xlAndDown": "Returns **true** if the current browser breakpoint is **xl** or lower.", "xlAndUp": "Returns **true** if the current browser breakpoint is **xl** or higher.", "xs": "Returns **true** if the current browser breakpoint is **xs**.", - "xxl": "Returns **true** if the current browser breakpoint is **xxl**." + "xxl": "Returns **true** if the current browser breakpoint is **xxl**.", + "ssr": "Returns **true** if the current page was server rendered.", + "displayClasses": "Returns an object containing the breakpoints and their corresponding classes." } } diff --git a/packages/api-generator/src/utils.ts b/packages/api-generator/src/utils.ts index b575f215039..ee04b07308c 100644 --- a/packages/api-generator/src/utils.ts +++ b/packages/api-generator/src/utils.ts @@ -108,7 +108,7 @@ async function loadLocale (componentName: string, locale: string): Promise { const getDocUrl = (cmp: string, heading?: string) => diff --git a/packages/api-generator/templates/component.d.ts b/packages/api-generator/templates/component.d.ts index 545f9deed73..664a9d798e4 100644 --- a/packages/api-generator/templates/component.d.ts +++ b/packages/api-generator/templates/component.d.ts @@ -1,7 +1,14 @@ -import type { AllowedComponentProps, ComponentPublicInstance, FunctionalComponent, RenderFunction, VNodeChild, VNodeProps } from 'vue' +import type { AllowedComponentProps, ComponentOptionsBase, VNodeChild, VNodeProps, UnwrapRef } from 'vue' +import type { UnionToIntersection } from '@/util' import type { __component__ } from '@/__name__' -type StripProps = keyof VNodeProps | keyof AllowedComponentProps | 'v-slots' | '$children' | `v-slot:${string}` +type StripProps = + | keyof VNodeProps + | keyof AllowedComponentProps + | 'v-slots' + | '$children' + | `v-slot:${string}` + | `on${Capitalize}Once` type Event = `on${string}` type Props = T extends { $props: infer P extends object } @@ -26,17 +33,6 @@ type Events = T extends { $props: infer P extends object } export type ComponentProps = Props<__component__> export type ComponentEvents = Events<__component__> -type RemoveIndex = { - [K in keyof T as string extends K - ? never - : number extends K - ? never - : symbol extends K - ? never - : K - ]: T[K] -} - type Slot = (...args: T) => VNodeChild type Slots< T extends { $props: any }, @@ -50,18 +46,13 @@ type ExcludeEmpty = T extends AtLeastOne ? T : never export type ComponentSlots = Slots<__component__> -type ExtractExposed = T extends (...args: any[]) => infer R - ? R extends Promise - ? never - : R extends RenderFunction - ? never - : R extends void - ? never - : R extends HTMLElement - ? never - : R extends object - ? RemoveIndex - : never +type ExtractExposed = T extends ComponentOptionsBase + ? B extends void ? never + : B extends { _allExposed: infer E } ? E + : B extends object ? B + : never : never -export type ComponentExposed = ExtractExposed<__component__['$options']['setup']> +type Pretty = { [K in keyof T]: UnwrapRef } + +export type ComponentExposed = Pretty>> diff --git a/packages/api-generator/tsconfig.json b/packages/api-generator/tsconfig.json index 2d95541bb5b..3eaeb8309c3 100644 --- a/packages/api-generator/tsconfig.json +++ b/packages/api-generator/tsconfig.json @@ -15,5 +15,6 @@ }, "include": [ "./src/locale/**/*.json", + "./templates/tmp/*" ], } diff --git a/packages/docs/auto-imports.d.ts b/packages/docs/auto-imports.d.ts index 15cb2c8530e..e6b6cfa4212 100644 --- a/packages/docs/auto-imports.d.ts +++ b/packages/docs/auto-imports.d.ts @@ -6,55 +6,108 @@ export {} declare global { const ComponentPublicInstance: typeof import('vue')['ComponentPublicInstance'] + const EffectScope: typeof import('vue')['EffectScope'] const IN_BROWSER: typeof import('./src/utils/globals')['IN_BROWSER'] const IS_DEBUG: typeof import('./src/utils/globals')['IS_DEBUG'] const IS_PROD: typeof import('./src/utils/globals')['IS_PROD'] const IS_SERVER: typeof import('./src/utils/globals')['IS_SERVER'] const PropType: typeof import('vue')['PropType'] + const acceptHMRUpdate: typeof import('pinia')['acceptHMRUpdate'] const anyLanguagePattern: typeof import('./src/utils/routes')['anyLanguagePattern'] + const cacheManifestEntries: typeof import('./src/utils/pwa')['cacheManifestEntries'] const camelCase: typeof import('lodash-es')['camelCase'] const camelize: typeof import('vue')['camelize'] + const cleanCache: typeof import('./src/utils/pwa')['cleanCache'] const computed: typeof import('vue')['computed'] const configureMarkdown: typeof import('./src/utils/markdown-it')['configureMarkdown'] const copyElementContent: typeof import('./src/utils/helpers')['copyElementContent'] const createAdProps: typeof import('./src/composables/ad')['createAdProps'] + const createApp: typeof import('vue')['createApp'] + const createCacheKey: typeof import('./src/utils/pwa')['createCacheKey'] const createOne: typeof import('@vuetify/one')['createOne'] + const createPinia: typeof import('pinia')['createPinia'] + const customRef: typeof import('vue')['customRef'] + const defineAsyncComponent: typeof import('vue')['defineAsyncComponent'] + const defineComponent: typeof import('vue')['defineComponent'] const defineStore: typeof import('pinia')['defineStore'] const disabledLanguagePattern: typeof import('./src/utils/routes')['disabledLanguagePattern'] - const distance: typeof import('./src/utils/helpers')['distance'] + const effectScope: typeof import('vue')['effectScope'] + const ensureCacheableResponse: typeof import('./src/utils/pwa')['ensureCacheableResponse'] const eventName: typeof import('./src/utils/helpers')['eventName'] const genAppMetaInfo: typeof import('./src/utils/metadata')['genAppMetaInfo'] const genMetaInfo: typeof import('./src/utils/metadata')['genMetaInfo'] const generatedRoutes: typeof import('./src/utils/routes')['generatedRoutes'] + const getActivePinia: typeof import('pinia')['getActivePinia'] const getBranch: typeof import('./src/utils/helpers')['getBranch'] + const getCacheKeyForUrl: typeof import('./src/utils/pwa')['getCacheKeyForUrl'] + const getCurrentInstance: typeof import('vue')['getCurrentInstance'] + const getCurrentScope: typeof import('vue')['getCurrentScope'] + const getDistance: typeof import('./src/utils/helpers')['getDistance'] const getMatchMedia: typeof import('./src/utils/helpers')['getMatchMedia'] const gtagClick: typeof import('./src/utils/analytics')['gtagClick'] const h: typeof import('vue')['h'] + const inject: typeof import('vue')['inject'] const insertLinks: typeof import('./src/utils/api')['insertLinks'] const isOn: typeof import('./src/utils/helpers')['isOn'] + const isProxy: typeof import('vue')['isProxy'] + const isReactive: typeof import('vue')['isReactive'] + const isReadonly: typeof import('vue')['isReadonly'] + const isRef: typeof import('vue')['isRef'] const kebabCase: typeof import('lodash-es')['kebabCase'] const languagePattern: typeof import('./src/utils/routes')['languagePattern'] const leadingSlash: typeof import('./src/utils/routes')['leadingSlash'] + const mapActions: typeof import('pinia')['mapActions'] + const mapGetters: typeof import('pinia')['mapGetters'] + const mapState: typeof import('pinia')['mapState'] + const mapStores: typeof import('pinia')['mapStores'] + const mapWritableState: typeof import('pinia')['mapWritableState'] + const markRaw: typeof import('vue')['markRaw'] const markdownItRules: typeof import('./src/utils/markdown-it-rules')['default'] + const matchPrecache: typeof import('./src/utils/pwa')['matchPrecache'] const mergeProps: typeof import('vue')['mergeProps'] + const messageSW: typeof import('./src/utils/pwa')['messageSW'] const nextTick: typeof import('vue')['nextTick'] + const onActivated: typeof import('vue')['onActivated'] const onBeforeMount: typeof import('vue')['onBeforeMount'] const onBeforeRouteLeave: typeof import('vue-router')['onBeforeRouteLeave'] const onBeforeRouteUpdate: typeof import('vue-router')['onBeforeRouteUpdate'] const onBeforeUnMount: typeof import('vue')['onBeforeUnMount'] const onBeforeUnmount: typeof import('vue')['onBeforeUnmount'] + const onBeforeUpdate: typeof import('vue')['onBeforeUpdate'] + const onDeactivated: typeof import('vue')['onDeactivated'] + const onErrorCaptured: typeof import('vue')['onErrorCaptured'] const onMounted: typeof import('vue')['onMounted'] + const onRenderTracked: typeof import('vue')['onRenderTracked'] + const onRenderTriggered: typeof import('vue')['onRenderTriggered'] const onScopeDispose: typeof import('vue')['onScopeDispose'] const onServerPrefetch: typeof import('vue')['onServerPrefetch'] + const onUnmounted: typeof import('vue')['onUnmounted'] + const onUpdated: typeof import('vue')['onUpdated'] + const openCache: typeof import('./src/utils/pwa')['openCache'] const preferredLocale: typeof import('./src/utils/routes')['preferredLocale'] const propsToString: typeof import('./src/utils/helpers')['propsToString'] + const provide: typeof import('vue')['provide'] + const pwaStore: typeof import('./src/stores/pwa')['pwaStore'] + const reactive: typeof import('vue')['reactive'] + const readonly: typeof import('vue')['readonly'] const redirectRoutes: typeof import('./src/utils/routes')['redirectRoutes'] const ref: typeof import('vue')['ref'] + const resolveComponent: typeof import('vue')['resolveComponent'] const rpath: typeof import('./src/utils/routes')['rpath'] + const setActivePinia: typeof import('pinia')['setActivePinia'] + const setMapStoreSuffix: typeof import('pinia')['setMapStoreSuffix'] + const shallowReactive: typeof import('vue')['shallowReactive'] + const shallowReadonly: typeof import('vue')['shallowReadonly'] const shallowRef: typeof import('vue')['shallowRef'] const storeToRefs: typeof import('pinia')['storeToRefs'] const stripLinks: typeof import('./src/utils/api')['stripLinks'] + const toRaw: typeof import('vue')['toRaw'] + const toRef: typeof import('vue')['toRef'] + const toRefs: typeof import('vue')['toRefs'] + const toValue: typeof import('vue')['toValue'] const trailingSlash: typeof import('./src/utils/routes')['trailingSlash'] + const triggerRef: typeof import('vue')['triggerRef'] + const unref: typeof import('vue')['unref'] const upperFirst: typeof import('lodash-es')['upperFirst'] const useAd: typeof import('./src/composables/ad')['useAd'] const useAdsStore: typeof import('./src/stores/ads')['useAdsStore'] @@ -63,13 +116,17 @@ declare global { const useAuthStore: typeof import('@vuetify/one')['useAuthStore'] const useCommitsStore: typeof import('./src/stores/commits')['useCommitsStore'] const useCosmic: typeof import('./src/composables/cosmic')['useCosmic'] + const useCssModule: typeof import('vue')['useCssModule'] + const useCssVars: typeof import('vue')['useCssVars'] const useDate: typeof import('vuetify')['useDate'] const useDisplay: typeof import('vuetify')['useDisplay'] + const useFrontmatter: typeof import('./src/composables/frontmatter')['useFrontmatter'] const useGoTo: typeof import('vuetify')['useGoTo'] const useGtag: typeof import('vue-gtag-next')['useGtag'] const useHttpStore: typeof import('@vuetify/one')['useHttpStore'] const useI18n: typeof import('vue-i18n')['useI18n'] const useJobsStore: typeof import('./src/stores/jobs')['useJobsStore'] + const useLink: typeof import('vue-router')['useLink'] const useLocaleStore: typeof import('./src/stores/locale')['useLocaleStore'] const useMadeWithVuetifyStore: typeof import('./src/stores/made-with-vuetify')['useMadeWithVuetifyStore'] const useOneStore: typeof import('@vuetify/one')['useOneStore'] @@ -77,6 +134,7 @@ declare global { const usePlayground: typeof import('./src/composables/playground')['usePlayground'] const useProductsStore: typeof import('@vuetify/one')['useProductsStore'] const usePromotionsStore: typeof import('./src/stores/promotions')['usePromotionsStore'] + const usePwaStore: typeof import('./src/stores/pwa')['usePwaStore'] const useQueueStore: typeof import('@vuetify/one')['useQueueStore'] const useReleasesStore: typeof import('./src/stores/releases')['useReleasesStore'] const useRoute: typeof import('vue-router')['useRoute'] @@ -84,6 +142,7 @@ declare global { const useRtl: typeof import('vuetify')['useRtl'] const useSettingsStore: typeof import('@vuetify/one')['useSettingsStore'] const useShopifyStore: typeof import('./src/stores/shopify')['useShopifyStore'] + const useSlots: typeof import('vue')['useSlots'] const useSponsorsStore: typeof import('./src/stores/sponsors')['useSponsorsStore'] const useSpotStore: typeof import('./src/stores/spot')['useSpotStore'] const useTeamStore: typeof import('./src/stores/team')['useTeamStore'] @@ -93,60 +152,117 @@ declare global { const waitForReadystate: typeof import('./src/utils/helpers')['waitForReadystate'] const watch: typeof import('vue')['watch'] const watchEffect: typeof import('vue')['watchEffect'] + const watchPostEffect: typeof import('vue')['watchPostEffect'] + const watchSyncEffect: typeof import('vue')['watchSyncEffect'] const wrapInArray: typeof import('./src/utils/helpers')['wrapInArray'] } +// for type re-export +declare global { + // @ts-ignore + export type { Component, ComponentPublicInstance, ComputedRef, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, VNode, WritableComputedRef } from 'vue' + import('vue') +} // for vue template auto import import { UnwrapRef } from 'vue' declare module 'vue' { interface GlobalComponents {} interface ComponentCustomProperties { + readonly EffectScope: UnwrapRef readonly IN_BROWSER: UnwrapRef readonly IS_DEBUG: UnwrapRef readonly IS_PROD: UnwrapRef readonly IS_SERVER: UnwrapRef + readonly acceptHMRUpdate: UnwrapRef readonly anyLanguagePattern: UnwrapRef + readonly cacheManifestEntries: UnwrapRef readonly camelCase: UnwrapRef readonly camelize: UnwrapRef + readonly cleanCache: UnwrapRef readonly computed: UnwrapRef readonly configureMarkdown: UnwrapRef readonly copyElementContent: UnwrapRef readonly createAdProps: UnwrapRef + readonly createApp: UnwrapRef readonly createOne: UnwrapRef + readonly createPinia: UnwrapRef + readonly customRef: UnwrapRef + readonly defineAsyncComponent: UnwrapRef + readonly defineComponent: UnwrapRef readonly defineStore: UnwrapRef readonly disabledLanguagePattern: UnwrapRef - readonly distance: UnwrapRef + readonly effectScope: UnwrapRef + readonly ensureCacheableResponse: UnwrapRef readonly eventName: UnwrapRef readonly genAppMetaInfo: UnwrapRef readonly genMetaInfo: UnwrapRef readonly generatedRoutes: UnwrapRef + readonly getActivePinia: UnwrapRef readonly getBranch: UnwrapRef + readonly getCurrentInstance: UnwrapRef + readonly getCurrentScope: UnwrapRef + readonly getDistance: UnwrapRef readonly getMatchMedia: UnwrapRef readonly gtagClick: UnwrapRef readonly h: UnwrapRef + readonly inject: UnwrapRef readonly insertLinks: UnwrapRef readonly isOn: UnwrapRef + readonly isProxy: UnwrapRef + readonly isReactive: UnwrapRef + readonly isReadonly: UnwrapRef + readonly isRef: UnwrapRef readonly kebabCase: UnwrapRef readonly languagePattern: UnwrapRef readonly leadingSlash: UnwrapRef + readonly mapActions: UnwrapRef + readonly mapGetters: UnwrapRef + readonly mapState: UnwrapRef + readonly mapStores: UnwrapRef + readonly mapWritableState: UnwrapRef + readonly markRaw: UnwrapRef readonly markdownItRules: UnwrapRef readonly mergeProps: UnwrapRef + readonly messageSW: UnwrapRef readonly nextTick: UnwrapRef + readonly onActivated: UnwrapRef readonly onBeforeMount: UnwrapRef readonly onBeforeRouteLeave: UnwrapRef readonly onBeforeRouteUpdate: UnwrapRef readonly onBeforeUnmount: UnwrapRef + readonly onBeforeUpdate: UnwrapRef + readonly onDeactivated: UnwrapRef + readonly onErrorCaptured: UnwrapRef readonly onMounted: UnwrapRef + readonly onRenderTracked: UnwrapRef + readonly onRenderTriggered: UnwrapRef readonly onScopeDispose: UnwrapRef readonly onServerPrefetch: UnwrapRef + readonly onUnmounted: UnwrapRef + readonly onUpdated: UnwrapRef + readonly openCache: UnwrapRef readonly preferredLocale: UnwrapRef readonly propsToString: UnwrapRef + readonly provide: UnwrapRef + readonly reactive: UnwrapRef + readonly readonly: UnwrapRef readonly redirectRoutes: UnwrapRef readonly ref: UnwrapRef + readonly resolveComponent: UnwrapRef readonly rpath: UnwrapRef + readonly setActivePinia: UnwrapRef + readonly setMapStoreSuffix: UnwrapRef + readonly shallowReactive: UnwrapRef + readonly shallowReadonly: UnwrapRef readonly shallowRef: UnwrapRef readonly storeToRefs: UnwrapRef readonly stripLinks: UnwrapRef + readonly toRaw: UnwrapRef + readonly toRef: UnwrapRef + readonly toRefs: UnwrapRef + readonly toValue: UnwrapRef readonly trailingSlash: UnwrapRef + readonly triggerRef: UnwrapRef + readonly unref: UnwrapRef readonly upperFirst: UnwrapRef readonly useAd: UnwrapRef readonly useAdsStore: UnwrapRef @@ -155,13 +271,17 @@ declare module 'vue' { readonly useAuthStore: UnwrapRef readonly useCommitsStore: UnwrapRef readonly useCosmic: UnwrapRef + readonly useCssModule: UnwrapRef + readonly useCssVars: UnwrapRef readonly useDate: UnwrapRef readonly useDisplay: UnwrapRef + readonly useFrontmatter: UnwrapRef readonly useGoTo: UnwrapRef readonly useGtag: UnwrapRef readonly useHttpStore: UnwrapRef readonly useI18n: UnwrapRef readonly useJobsStore: UnwrapRef + readonly useLink: UnwrapRef readonly useLocaleStore: UnwrapRef readonly useMadeWithVuetifyStore: UnwrapRef readonly useOneStore: UnwrapRef @@ -169,6 +289,7 @@ declare module 'vue' { readonly usePlayground: UnwrapRef readonly useProductsStore: UnwrapRef readonly usePromotionsStore: UnwrapRef + readonly usePwaStore: UnwrapRef readonly useQueueStore: UnwrapRef readonly useReleasesStore: UnwrapRef readonly useRoute: UnwrapRef @@ -176,6 +297,7 @@ declare module 'vue' { readonly useRtl: UnwrapRef readonly useSettingsStore: UnwrapRef readonly useShopifyStore: UnwrapRef + readonly useSlots: UnwrapRef readonly useSponsorsStore: UnwrapRef readonly useSpotStore: UnwrapRef readonly useTeamStore: UnwrapRef @@ -185,59 +307,110 @@ declare module 'vue' { readonly waitForReadystate: UnwrapRef readonly watch: UnwrapRef readonly watchEffect: UnwrapRef + readonly watchPostEffect: UnwrapRef + readonly watchSyncEffect: UnwrapRef readonly wrapInArray: UnwrapRef } } declare module '@vue/runtime-core' { interface GlobalComponents {} interface ComponentCustomProperties { + readonly EffectScope: UnwrapRef readonly IN_BROWSER: UnwrapRef readonly IS_DEBUG: UnwrapRef readonly IS_PROD: UnwrapRef readonly IS_SERVER: UnwrapRef + readonly acceptHMRUpdate: UnwrapRef readonly anyLanguagePattern: UnwrapRef + readonly cacheManifestEntries: UnwrapRef readonly camelCase: UnwrapRef readonly camelize: UnwrapRef + readonly cleanCache: UnwrapRef readonly computed: UnwrapRef readonly configureMarkdown: UnwrapRef readonly copyElementContent: UnwrapRef readonly createAdProps: UnwrapRef + readonly createApp: UnwrapRef readonly createOne: UnwrapRef + readonly createPinia: UnwrapRef + readonly customRef: UnwrapRef + readonly defineAsyncComponent: UnwrapRef + readonly defineComponent: UnwrapRef readonly defineStore: UnwrapRef readonly disabledLanguagePattern: UnwrapRef - readonly distance: UnwrapRef + readonly effectScope: UnwrapRef + readonly ensureCacheableResponse: UnwrapRef readonly eventName: UnwrapRef readonly genAppMetaInfo: UnwrapRef readonly genMetaInfo: UnwrapRef readonly generatedRoutes: UnwrapRef + readonly getActivePinia: UnwrapRef readonly getBranch: UnwrapRef + readonly getCurrentInstance: UnwrapRef + readonly getCurrentScope: UnwrapRef + readonly getDistance: UnwrapRef readonly getMatchMedia: UnwrapRef readonly gtagClick: UnwrapRef readonly h: UnwrapRef + readonly inject: UnwrapRef readonly insertLinks: UnwrapRef readonly isOn: UnwrapRef + readonly isProxy: UnwrapRef + readonly isReactive: UnwrapRef + readonly isReadonly: UnwrapRef + readonly isRef: UnwrapRef readonly kebabCase: UnwrapRef readonly languagePattern: UnwrapRef readonly leadingSlash: UnwrapRef + readonly mapActions: UnwrapRef + readonly mapGetters: UnwrapRef + readonly mapState: UnwrapRef + readonly mapStores: UnwrapRef + readonly mapWritableState: UnwrapRef + readonly markRaw: UnwrapRef readonly markdownItRules: UnwrapRef readonly mergeProps: UnwrapRef + readonly messageSW: UnwrapRef readonly nextTick: UnwrapRef + readonly onActivated: UnwrapRef readonly onBeforeMount: UnwrapRef readonly onBeforeRouteLeave: UnwrapRef readonly onBeforeRouteUpdate: UnwrapRef readonly onBeforeUnmount: UnwrapRef + readonly onBeforeUpdate: UnwrapRef + readonly onDeactivated: UnwrapRef + readonly onErrorCaptured: UnwrapRef readonly onMounted: UnwrapRef + readonly onRenderTracked: UnwrapRef + readonly onRenderTriggered: UnwrapRef readonly onScopeDispose: UnwrapRef readonly onServerPrefetch: UnwrapRef + readonly onUnmounted: UnwrapRef + readonly onUpdated: UnwrapRef + readonly openCache: UnwrapRef readonly preferredLocale: UnwrapRef readonly propsToString: UnwrapRef + readonly provide: UnwrapRef + readonly reactive: UnwrapRef + readonly readonly: UnwrapRef readonly redirectRoutes: UnwrapRef readonly ref: UnwrapRef + readonly resolveComponent: UnwrapRef readonly rpath: UnwrapRef + readonly setActivePinia: UnwrapRef + readonly setMapStoreSuffix: UnwrapRef + readonly shallowReactive: UnwrapRef + readonly shallowReadonly: UnwrapRef readonly shallowRef: UnwrapRef readonly storeToRefs: UnwrapRef readonly stripLinks: UnwrapRef + readonly toRaw: UnwrapRef + readonly toRef: UnwrapRef + readonly toRefs: UnwrapRef + readonly toValue: UnwrapRef readonly trailingSlash: UnwrapRef + readonly triggerRef: UnwrapRef + readonly unref: UnwrapRef readonly upperFirst: UnwrapRef readonly useAd: UnwrapRef readonly useAdsStore: UnwrapRef @@ -246,13 +419,17 @@ declare module '@vue/runtime-core' { readonly useAuthStore: UnwrapRef readonly useCommitsStore: UnwrapRef readonly useCosmic: UnwrapRef + readonly useCssModule: UnwrapRef + readonly useCssVars: UnwrapRef readonly useDate: UnwrapRef readonly useDisplay: UnwrapRef + readonly useFrontmatter: UnwrapRef readonly useGoTo: UnwrapRef readonly useGtag: UnwrapRef readonly useHttpStore: UnwrapRef readonly useI18n: UnwrapRef readonly useJobsStore: UnwrapRef + readonly useLink: UnwrapRef readonly useLocaleStore: UnwrapRef readonly useMadeWithVuetifyStore: UnwrapRef readonly useOneStore: UnwrapRef @@ -260,6 +437,7 @@ declare module '@vue/runtime-core' { readonly usePlayground: UnwrapRef readonly useProductsStore: UnwrapRef readonly usePromotionsStore: UnwrapRef + readonly usePwaStore: UnwrapRef readonly useQueueStore: UnwrapRef readonly useReleasesStore: UnwrapRef readonly useRoute: UnwrapRef @@ -267,6 +445,7 @@ declare module '@vue/runtime-core' { readonly useRtl: UnwrapRef readonly useSettingsStore: UnwrapRef readonly useShopifyStore: UnwrapRef + readonly useSlots: UnwrapRef readonly useSponsorsStore: UnwrapRef readonly useSpotStore: UnwrapRef readonly useTeamStore: UnwrapRef @@ -276,6 +455,8 @@ declare module '@vue/runtime-core' { readonly waitForReadystate: UnwrapRef readonly watch: UnwrapRef readonly watchEffect: UnwrapRef + readonly watchPostEffect: UnwrapRef + readonly watchSyncEffect: UnwrapRef readonly wrapInArray: UnwrapRef } } diff --git a/packages/docs/build/api-plugin.ts b/packages/docs/build/api-plugin.ts index 60433356134..536ec1d50de 100644 --- a/packages/docs/build/api-plugin.ts +++ b/packages/docs/build/api-plugin.ts @@ -1,163 +1,28 @@ // Imports -import fs from 'fs' -import path, { resolve } from 'path' -import { createRequire } from 'module' -import { startCase } from 'lodash-es' -import locales from '../src/i18n/locales.json' -import pageToApi from '../src/data/page-to-api.json' +import fs from 'node:fs/promises' +import path from 'node:path' import type { Plugin } from 'vite' -import { rimraf } from 'rimraf' -import { mkdirp } from 'mkdirp' -const API_ROOT = resolve('../api-generator/dist/api') -const API_PAGES_ROOT = resolve('./node_modules/.cache/api-pages') - -const require = createRequire(import.meta.url) - -const sections = ['props', 'events', 'slots', 'exposed', 'sass', 'argument', 'modifiers', 'value'] as const -// This can't be imported from the api-generator because it mixes the type definitions up -type Data = { - displayName: string // user visible name used in page titles - fileName: string // file name for translation strings and generated types - pathName: string // kebab-case name for use in urls -} & Record> - -const localeList = locales - .filter(item => item.enabled) - .map(item => item.alternate || item.locale) - -function genApiLinks (componentName: string, header: string) { - const section = ['', ''] - const links = (Object.keys(pageToApi) as (keyof typeof pageToApi)[]) - .filter(page => pageToApi[page].includes(componentName)) - .reduce((acc, href) => { - const name = href.split('/')[1] - acc.push(`- [${startCase(name)}](/${href})`) - return acc - }, []) - - if (links.length && header) { - section.unshift(...[links.join('\n'), `## ${header} {#links}`]) - } - - return `${section.join('\n\n')}\n\n` -} - -function genFrontMatter (component: string) { - const fm = [ - `title: ${component} API`, - `description: API for the ${component} component.`, - `keywords: ${component}, api, vuetify`, - ] - - return `---\nmeta:\n${fm.map(s => ' ' + s).join('\n')}\n---` -} - -function genHeader (componentName: string) { - const header = [ - genFrontMatter(componentName), - `# ${componentName} API`, - '', - ] - - return `${header.join('\n\n')}\n\n` -} - -const sanitize = (str: string) => str.replace(/\$/g, '') - -async function loadMessages (locale: string) { - const prefix = path.resolve('./src/i18n/messages/') - const fallback = require(path.join(prefix, 'en.json')) - - try { - const messages = require(path.join(prefix, `${locale}.json`)) - - return { - ...fallback['api-headers'], - ...(messages['api-headers'] || {}), - } - } catch (err) { - return fallback['api-headers'] - } -} - -async function createMdFile (component: Data, locale: string) { - const messages = await loadMessages(locale) - let str = '' - - str += genHeader(component.displayName) - str += genApiLinks(component.displayName, messages.links) - - for (const section of sections) { - if (Object.keys(component[section] ?? {}).length) { - str += `## ${messages[section]} {#${section}}\n\n` - str += `\n\n` - } - } - - return str -} - -async function writeFile (componentApi: Data, locale: string) { - if (!componentApi?.fileName) return - - const folder = resolve(API_PAGES_ROOT, locale, 'api') - - if (!fs.existsSync(folder)) { - fs.mkdirSync(folder, { recursive: true }) - } - - fs.writeFileSync(resolve(folder, `${sanitize(componentApi.pathName)}.md`), await createMdFile(componentApi, locale)) -} - -function getApiData () { - const files = fs.readdirSync(API_ROOT) - const data: Data[] = [] - - for (const file of files) { - const obj = JSON.parse(fs.readFileSync(resolve(API_ROOT, file), 'utf-8')) - - data.push(obj) - } - - return data -} - -async function generateFiles () { - // const api: Record[] = getCompleteApi(localeList) - const api = getApiData() - - for (const locale of localeList) { - // const pages = {} as Record - - for (const item of api) { - await writeFile(item, locale) - - // pages[`/${locale}/api/${sanitize(kebabCase(item.name))}/`] = item.name - } - - // fs.writeFileSync(resolve(API_PAGES_ROOT, `${locale}/pages.json`), JSON.stringify(pages, null, 2)) - fs.writeFileSync(resolve(API_PAGES_ROOT, `${locale}.js`), `export default require.context('./${locale}/api', true, /\\.md$/)`) - } - - // for (const item of api) { - // writeData(item.name, item) - // } - - // fs.writeFileSync(resolve(API_PAGES_ROOT, 'sass.json'), JSON.stringify([ - // ...api.filter(item => item && item.sass && item.sass.length > 0).map(item => item.name), - // ])) -} +const API_ROOT = path.resolve('../api-generator/dist/api') export default function Api (): Plugin { return { name: 'vuetify:api', enforce: 'pre', - async config () { - await rimraf(API_PAGES_ROOT) - await mkdirp(API_PAGES_ROOT) + resolveId (id) { + return id === 'virtual:api-list' ? '\0' + id : undefined + }, + async load (id) { + if (id === '\0virtual:api-list') { + const files = await fs.readdir(API_ROOT) + + const names = files + .sort((a, b) => a.localeCompare(b)) + .map(file => `'${file.split('.')[0]}'`) + .join(', ') - await generateFiles() + return `export default [${names}]` + } }, } } diff --git a/packages/docs/build/markdown-it.ts b/packages/docs/build/markdown-it.ts index ddeee9b98ab..c03866abb6b 100644 --- a/packages/docs/build/markdown-it.ts +++ b/packages/docs/build/markdown-it.ts @@ -1,123 +1,5 @@ -import fs from 'fs' -import path from 'path' -import Ajv from 'ajv' -import fm from 'front-matter' import MarkdownIt from 'markdown-it' import { configureMarkdown } from '../src/utils/markdown-it' export { configureMarkdown } from '../src/utils/markdown-it' export const md = configureMarkdown(new MarkdownIt()) - -const generateToc = (content: string) => { - const headings = [] - const tokens = md.parse(content, {}) - const length = tokens.length - - for (let i = 0; i < length; i++) { - const token = tokens[i] - - if (token.type === 'inline' && token.content.startsWith('')) { - do { - i++ - } while (i < length && !tokens[i].content.endsWith('-->')) - continue - } - - if (token.type !== 'heading_open') continue - - // heading level by hash length '###' === h3 - const level = token.markup.length - - if (level <= 1) continue - - const next = tokens[i + 1] - const link = next.children?.find(child => child.type === 'link_open') - const text = next.children?.filter(child => !!child.content).map(child => child.content).join('') - const anchor = link?.attrs?.find(([attr]) => attr === 'href') - const [, to] = anchor ?? [] - - headings.push({ - text, - to, - level, - }) - } - - return headings -} - -const ajv = new Ajv() -const validate = ajv.compile({ - type: 'object', - additionalProperties: false, - properties: { - meta: { - type: 'object', - additionalProperties: false, - properties: { - nav: { type: 'string' }, // Title used in navigation links - title: { type: 'string' }, // SEO title - description: { type: 'string' }, // SEO description - keywords: { type: 'string' }, // SEO keywords - }, - }, - layout: { type: 'string' }, - related: { - type: 'array', - maxItems: 3, - uniqueItems: true, - items: { type: 'string' }, // Absolute paths to related pages - }, - assets: { - type: 'array', - uniqueItems: true, - items: { type: 'string' }, // Additional stylesheets to load - }, - disabled: { type: 'boolean' }, // The page is not published - emphasized: { type: 'boolean' }, // The page is emphasized in the navigation - fluid: { type: 'boolean' }, // Hide the Toc - backmatter: { type: 'boolean' }, // Hide the backmatter - features: { - type: 'object', - additionalProperties: false, - properties: { - figma: { type: 'boolean' }, - label: { type: 'string' }, - report: { type: 'boolean' }, - github: { type: 'string' }, - spec: { type: 'string' }, - }, - }, - }, -}) - -export function parseMeta (componentPath: string, locale: string) { - const str = fs.readFileSync(path.resolve(componentPath.slice(1)), { encoding: 'utf-8' }) - const { attributes, body } = fm(str) - - const valid = validate(attributes) - if (!valid && locale !== 'eo-UY') { - throw new Error(`\nInvalid frontmatter: ${componentPath}` + validate.errors!.map(error => ( - `\n | Property ${error.instancePath} ${error.message}` - )).join()) - } - - const { meta, ...rest } = attributes as any - - if (locale !== 'en') { - const original = parseMeta(componentPath.replace(`/${locale}/`, '/en/'), 'en') - Object.assign(rest, { - layout: original.layout, - related: original.related, - assets: original.assets, - disabled: original.disabled, - emphasized: original.emphasized, - }) - } - - return { - ...rest, - ...meta, - toc: generateToc(body), - } -} diff --git a/packages/docs/build/markdownBuilders.ts b/packages/docs/build/markdownBuilders.ts new file mode 100644 index 00000000000..aaa8dac3846 --- /dev/null +++ b/packages/docs/build/markdownBuilders.ts @@ -0,0 +1,223 @@ +import { createBuilder } from '@yankeeinlondon/builder-api' +import type { Pipeline } from '@yankeeinlondon/builder-api' +import type { Plugin } from 'vite' +import Ajv from 'ajv' +import { md } from './markdown-it' +import fm from 'front-matter' +import fs from 'node:fs' +import path from 'node:path' + +const ajv = new Ajv() +const validate = ajv.compile({ + type: 'object', + additionalProperties: false, + properties: { + meta: { + type: 'object', + additionalProperties: false, + properties: { + nav: { type: 'string' }, // Title used in navigation links + title: { type: 'string' }, // SEO title + description: { type: 'string' }, // SEO description + keywords: { type: 'string' }, // SEO keywords + }, + }, + layout: { type: 'string' }, + related: { + type: 'array', + maxItems: 3, + uniqueItems: true, + items: { type: 'string' }, // Absolute paths to related pages + }, + assets: { + type: 'array', + uniqueItems: true, + items: { type: 'string' }, // Additional stylesheets to load + }, + disabled: { type: 'boolean' }, // The page is not published + emphasized: { type: 'boolean' }, // The page is emphasized in the navigation + fluid: { type: 'boolean' }, // Hide the Toc + backmatter: { type: 'boolean' }, // Hide the backmatter + features: { + type: 'object', + additionalProperties: false, + properties: { + figma: { type: 'boolean' }, + label: { type: 'string' }, + report: { type: 'boolean' }, + github: { type: 'string' }, + spec: { type: 'string' }, + }, + }, + }, +}) + +async function setupPages> ( + payload: T, + options: { + files?: Map + awaiting?: Map void)[]> + pages?: ReadonlyArray> + } +) { + if (!options.pages) { + const pagesPlugin = payload.viteConfig.plugins! + .find((p: any) => p && 'name' in p && p.name === 'vite-plugin-pages') as Plugin + options.pages = await pagesPlugin.api.getResolvedRoutes() as [] + } + + const page = options.pages.find(p => payload.fileName.endsWith(p.component)) + + if (!page) throw new Error('Unable to find page') + + const locale = page.path.split('/').at(1)! + + const html = 'html' in payload && typeof payload.html !== 'string' + ? payload.html.cloneNode(true) + : undefined + options.files ??= new Map() + options.files.set(page.path, { + ...payload, + html, + }) + + let original: T | undefined + if (locale !== 'en') { + const originalPath = page.path.replace(`/${locale}/`, '/en/') + original = options.files.get(originalPath) + if (!original) { + options.awaiting ??= new Map() + const awaiting = options.awaiting.get(originalPath) ?? [] + const { promise, resolve } = Promise.withResolvers() + awaiting.push(resolve) + options.awaiting.set(originalPath, awaiting) + original = await promise + } + } else { + original = payload + if (options.awaiting?.has(page.path)) { + options.awaiting.get(page.path)!.forEach(fn => fn({ + ...payload, + html, + })) + } + } + + return { page, locale, original } +} + +export const frontmatterBuilder = createBuilder('frontmatterBuilder', 'metaExtracted') + .options() + .initializer() + .handler(async (payload, options) => { + const { locale, original } = await setupPages(payload, options) + + const { meta, ...rest } = payload.frontmatter + + if (locale !== 'en') { + Object.assign(rest, { + assets: original.frontmatter.assets, + related: original.frontmatter.related, + }) + } + + payload.frontmatter = { + meta, + assets: rest.assets, + backmatter: rest.backmatter, + features: rest.features, + fluid: rest.fluid, + related: rest.related, + toc: generateToc(payload.md), + } + + return payload + }) + .meta() + +export function getRouteMeta (componentPath: string, locale: string) { + const str = fs.readFileSync(path.resolve(componentPath.slice(1)), { encoding: 'utf-8' }) + const { attributes } = fm(str) + + const valid = validate(attributes) + if (!valid && locale !== 'eo-UY') { + throw new Error(`\nInvalid frontmatter: ${componentPath}` + validate.errors!.map(error => ( + `\n | Property ${error.instancePath} ${error.message}` + )).join()) + } + + const a = attributes as any + + if (locale !== 'en') { + const original = getRouteMeta(componentPath.replace(`/${locale}/`, '/en/'), 'en') + a.disabled = original.disabled + a.emphasized = original.emphasized + a.layout = original.layout + } + + return { + disabled: a.disabled, + emphasized: a.emphasized, + layout: a.layout, + ...a.meta, + } +} + +function generateToc (content: string) { + const headings = [] + const tokens = md.parse(content, {}) + const length = tokens.length + + for (let i = 0; i < length; i++) { + const token = tokens[i] + + if (token.type === 'inline' && token.content.startsWith('')) { + do { + i++ + } while (i < length && !tokens[i].content.endsWith('-->')) + continue + } + + if (token.type !== 'heading_open') continue + + // heading level by hash length '###' === h3 + const level = token.markup.length + + if (level <= 1) continue + + const next = tokens[i + 1] + const link = next.children?.find(child => child.type === 'link_open') + const text = next.children?.filter(child => !!child.content).map(child => child.content).join('') + const anchor = link?.attrs?.find(([attr]) => attr === 'href') + const [, to] = anchor ?? [] + + headings.push({ + text, + to, + level, + }) + } + + return headings +} + +export const scriptFixer = createBuilder('scriptFixer', 'dom') + .options() + .initializer() + .handler(async (payload, options) => { + const { locale, original } = await setupPages(payload, options) + + if (locale !== 'en') { + const setup = payload.html.querySelector('script[setup]') + const origSetup = original.html.querySelector('script[setup]') + if (setup) { + if (!origSetup) { + throw new Error(`Extra setup in ${payload.fileName}`) + } + setup.innerHTML = origSetup.innerHTML + } + } + + return payload + }) + .meta() diff --git a/packages/docs/build/mdi-js.ts b/packages/docs/build/mdi-js.ts new file mode 100644 index 00000000000..0d1e5c5e770 --- /dev/null +++ b/packages/docs/build/mdi-js.ts @@ -0,0 +1,31 @@ +import { camelize } from 'vue' +import type { Plugin } from 'vite' + +const virtual = 'virtual:mdi-js-icons' +const resolvedVirtual = `\0${virtual}` + +export function MdiJs () { + return { + name: 'vuetify:mdi-js-icons', + enforce: 'pre', + resolveId (id) { + return id === virtual ? resolvedVirtual : undefined + }, + async load (id) { + if (id === resolvedVirtual) { + const [meta, paths] = await Promise.all([ + import('@mdi/svg/meta.json', { with: { type: 'json' } }).then(m => m.default), + import('@mdi/js'), + ]) + const icons = meta.map(icon => ({ + name: icon.name, + aliases: icon.aliases, + path: paths[camelize('mdi-' + icon.name) as keyof typeof paths], + })) + return `export const icons = ${JSON.stringify(icons)}` + } + + return undefined + }, + } satisfies Plugin +} diff --git a/packages/docs/build/nginx.conf b/packages/docs/build/nginx.conf new file mode 100644 index 00000000000..ca0860572dc --- /dev/null +++ b/packages/docs/build/nginx.conf @@ -0,0 +1,40 @@ +worker_processes 1; + +events { + worker_connections 1024; +} + +http { + include mime.types; + default_type application/octet-stream; + root /usr/share/nginx/html; + + sendfile on; + tcp_nopush on; + + keepalive_timeout 65; + + server { + listen 80; + server_name localhost; + + charset utf-8; + + location / { + index index.html; + try_files $uri $uri/ /_fallback.html; + add_header Cache-Control 'public, max-age=3600, s-maxage=60'; + } + + location /assets/ { + add_header Cache-Control 'public, immutable, max-age=31536000, stale-if-error=604800'; + } + + location = /service-worker.js { + add_header Cache-Control 'public, max-age=0, s-maxage=60, must-revalidate'; + } + + #error_page 404 /404.html; + #error_page 500 502 503 504 /50x.html; + } +} diff --git a/packages/docs/components.d.ts b/packages/docs/components.d.ts index a3dd894b29d..d3430970b17 100644 --- a/packages/docs/components.d.ts +++ b/packages/docs/components.d.ts @@ -1,16 +1,17 @@ /* eslint-disable */ -/* prettier-ignore */ // @ts-nocheck // Generated by unplugin-vue-components // Read more: https://github.com/vuejs/core/pull/3399 export {} +/* prettier-ignore */ declare module 'vue' { export interface GlobalComponents { AboutTeamMember: typeof import('./src/components/about/TeamMember.vue')['default'] AboutTeamMembers: typeof import('./src/components/about/TeamMembers.vue')['default'] Alert: typeof import('./src/components/Alert.vue')['default'] ApiApiTable: typeof import('./src/components/api/ApiTable.vue')['default'] + ApiBacklinks: typeof import('./src/components/api/Backlinks.vue')['default'] ApiDirectiveTable: typeof import('./src/components/api/DirectiveTable.vue')['default'] ApiEventsTable: typeof import('./src/components/api/EventsTable.vue')['default'] ApiExposedTable: typeof import('./src/components/api/ExposedTable.vue')['default'] @@ -23,8 +24,10 @@ declare module 'vue' { ApiSearch: typeof import('./src/components/api/Search.vue')['default'] ApiSection: typeof import('./src/components/api/Section.vue')['default'] ApiSlotsTable: typeof import('./src/components/api/SlotsTable.vue')['default'] + ApiView: typeof import('./src/components/api/View.vue')['default'] AppBackToTop: typeof import('./src/components/app/BackToTop.vue')['default'] AppBarBar: typeof import('./src/components/app/bar/Bar.vue')['default'] + AppBarBlogLink: typeof import('./src/components/app/bar/BlogLink.vue')['default'] AppBarEcosystemMenu: typeof import('./src/components/app/bar/EcosystemMenu.vue')['default'] AppBarEnterpriseLink: typeof import('./src/components/app/bar/EnterpriseLink.vue')['default'] AppBarJobsLink: typeof import('./src/components/app/bar/JobsLink.vue')['default'] @@ -53,10 +56,10 @@ declare module 'vue' { AppLink: typeof import('./src/components/app/Link.vue')['default'] AppListLinkListItem: typeof import('./src/components/app/list/LinkListItem.vue')['default'] AppListList: typeof import('./src/components/app/list/List.vue')['default'] - AppMarkdown: typeof import('./src/components/app/Markdown.vue')['default'] AppMarkup: typeof import('./src/components/app/Markup.vue')['default'] AppMenuMenu: typeof import('./src/components/app/menu/Menu.vue')['default'] AppSearchSearch: typeof import('./src/components/app/search/Search.vue')['default'] + AppSearchSearchDialog: typeof import('./src/components/app/search/SearchDialog.vue')['default'] AppSearchSearchRecent: typeof import('./src/components/app/search/SearchRecent.vue')['default'] AppSearchSearchResults: typeof import('./src/components/app/search/SearchResults.vue')['default'] AppSettingsAdvancedOptions: typeof import('./src/components/app/settings/AdvancedOptions.vue')['default'] @@ -73,6 +76,7 @@ declare module 'vue' { AppSettingsOptionsBannerOption: typeof import('./src/components/app/settings/options/BannerOption.vue')['default'] AppSettingsOptionsCodeOption: typeof import('./src/components/app/settings/options/CodeOption.vue')['default'] AppSettingsOptionsNotificationsOption: typeof import('./src/components/app/settings/options/NotificationsOption.vue')['default'] + AppSettingsOptionsOfflineOption: typeof import('./src/components/app/settings/options/OfflineOption.vue')['default'] AppSettingsOptionsPinOption: typeof import('./src/components/app/settings/options/PinOption.vue')['default'] AppSettingsOptionsQuickbarOption: typeof import('./src/components/app/settings/options/QuickbarOption.vue')['default'] AppSettingsOptionsRailDrawerOption: typeof import('./src/components/app/settings/options/RailDrawerOption.vue')['default'] @@ -120,6 +124,7 @@ declare module 'vue' { GettingStartedWireframeExamples: typeof import('./src/components/getting-started/WireframeExamples.vue')['default'] HomeActionBtns: typeof import('./src/components/home/ActionBtns.vue')['default'] HomeEntry: typeof import('./src/components/home/Entry.vue')['default'] + HomeEpicmaxSupport: typeof import('./src/components/home/EpicmaxSupport.vue')['default'] HomeFeatures: typeof import('./src/components/home/Features.vue')['default'] HomeFooter: typeof import('./src/components/home/Footer.vue')['default'] HomeLogo: typeof import('./src/components/home/Logo.vue')['default'] @@ -127,6 +132,7 @@ declare module 'vue' { HomeSponsors: typeof import('./src/components/home/Sponsors.vue')['default'] IconsChevronDown: typeof import('./src/components/icons/ChevronDown.vue')['default'] IntroductionComparison: typeof import('./src/components/introduction/Comparison.vue')['default'] + IntroductionConsultingServices: typeof import('./src/components/introduction/ConsultingServices.vue')['default'] IntroductionDirectSupport: typeof import('./src/components/introduction/DirectSupport.vue')['default'] IntroductionDiscordDeck: typeof import('./src/components/introduction/DiscordDeck.vue')['default'] IntroductionEnterpriseDeck: typeof import('./src/components/introduction/EnterpriseDeck.vue')['default'] diff --git a/packages/docs/jest.config.js b/packages/docs/jest.config.js index 7d57ee7901a..a24743350b9 100644 --- a/packages/docs/jest.config.js +++ b/packages/docs/jest.config.js @@ -1,6 +1,6 @@ const os = require('os') -const maxWorkers = Math.max(1, Math.floor(Math.min(os.cpus().length / 2, os.freemem() / 1024 / 1024 / 1024 / 2.5))) +const maxWorkers = Math.max(1, Math.floor(Math.min(os.cpus().length / 2, os.freemem() / 1024 ** 3 / 3.1))) module.exports = { maxWorkers, diff --git a/packages/docs/package.json b/packages/docs/package.json index dc79e68a195..168aecdc545 100644 --- a/packages/docs/package.json +++ b/packages/docs/package.json @@ -3,7 +3,7 @@ "description": "A Vue.js project", "private": true, "author": "John Leider ", - "version": "3.6.14", + "version": "3.7.9", "repository": { "type": "git", "url": "git+https://github.com/vuetifyjs/vuetify.git", @@ -21,9 +21,10 @@ }, "dependencies": { "@cosmicjs/sdk": "^1.0.11", + "@vue/compiler-dom": "^3.4.27", "@vuelidate/core": "^2.0.3", "@vuelidate/validators": "^2.0.4", - "@vuetify/one": "^1.9.1", + "@vuetify/one": "^1.9.5", "algoliasearch": "^4.23.3", "fflate": "^0.8.2", "isomorphic-fetch": "^3.0.0", @@ -32,6 +33,7 @@ "prism-theme-vars": "^0.2.4", "prismjs": "^1.29.0", "roboto-fontface": "^0.10.0", + "swetrix": "^3.5.0", "vee-validate": "^4.12.6", "vue": "^3.4.27", "vue-gtag-next": "^1.14.0", @@ -41,8 +43,14 @@ "vuetify": "workspace:*" }, "devDependencies": { + "@babel/generator": "^7.25.0", + "@babel/types": "^7.25.2", "@emailjs/browser": "^4.3.3", "@intlify/unplugin-vue-i18n": "^4.0.0", + "@mdi/js": "7.4.47", + "@mdi/svg": "7.4.47", + "@octokit/openapi-types": "^22.2.0", + "@types/babel__generator": "^7.6.8", "@types/lodash-es": "^4.17.12", "@types/markdown-it": "^14.0.0", "@types/markdown-it-container": "^2.0.10", @@ -51,7 +59,9 @@ "@vitejs/plugin-vue": "^5.0.4", "@vue/compiler-sfc": "^3.4.27", "@vuetify/api-generator": "workspace:*", + "@yankeeinlondon/builder-api": "^1.4.1", "ajv": "^8.12.0", + "algoliasearch-helper": "^3.22.3", "async-es": "^3.2.5", "date-fns": "^3.6.0", "emailjs-com": "^3.2.0", @@ -71,14 +81,14 @@ "markdownlint-cli": "^0.39.0", "unplugin-auto-import": "0.17.5", "unplugin-fonts": "1.0.3", - "unplugin-vue-components": "^0.26.0", - "vite": "^5.2.8", + "unplugin-vue-components": "^0.27.4", + "vite": "^5.4.3", "vite-plugin-md": "^0.21.5", "vite-plugin-pages": "^0.32.1", "vite-plugin-pwa": "^0.17.4", "vite-plugin-vue-layouts": "^0.11.0", - "vite-plugin-vuetify": "^2.0.3", - "vue-tsc": "^1.8.27" + "vite-plugin-vuetify": "^2.0.4", + "vue-tsc": "^2.0.29" }, "publishConfig": { "access": "public" diff --git a/packages/docs/src/App.vue b/packages/docs/src/App.vue index dc7b5caf2be..9412f7768b1 100644 --- a/packages/docs/src/App.vue +++ b/packages/docs/src/App.vue @@ -16,15 +16,16 @@ const theme = useTheme() const { locale } = useI18n() const auth = useAuthStore() + const frontmatter = useFrontmatter() const path = computed(() => route.path.replace(`/${locale.value}/`, '')) const meta = computed(() => { return genAppMetaInfo({ title: `${route.meta.title}${path.value === '' ? '' : ' — Vuetify'}`, - description: route.meta.description, - keywords: route.meta.keywords, - assets: route.meta.assets, + description: frontmatter.value?.meta.description, + keywords: frontmatter.value?.meta.keywords, + assets: frontmatter.value?.assets, }) }) diff --git a/packages/docs/src/components/PageFeatures.vue b/packages/docs/src/components/PageFeatures.vue index 66346b5bdc2..4a79a0064ca 100644 --- a/packages/docs/src/components/PageFeatures.vue +++ b/packages/docs/src/components/PageFeatures.vue @@ -12,7 +12,7 @@ { - if (!route.meta.features?.label) return false + if (!frontmatter.value?.features?.label) return false - const original = encodeURIComponent(route.meta.features.label) + const original = encodeURIComponent(frontmatter.value.features.label) return `https://github.com/vuetifyjs/vuetify/labels/${original}` }) @@ -103,7 +104,7 @@ pins.toggle(!pinned.value, { title: route.meta.title, to: route.path, - category: route.meta.category, + category: frontmatter.value?.category, }) } diff --git a/packages/docs/src/components/about/TeamMember.vue b/packages/docs/src/components/about/TeamMember.vue index db96e038b66..2884e44a483 100644 --- a/packages/docs/src/components/about/TeamMember.vue +++ b/packages/docs/src/components/about/TeamMember.vue @@ -1,6 +1,6 @@ @@ -49,7 +48,7 @@ const { t, locale } = useI18n() const user = useUserStore() const name = ref() - const sections = ['props', 'slots', 'events', 'functions'] + const sections = ['props', 'slots', 'events', 'exposed'] as const const components = computed(() => { if (props.components) return props.components.split(/, ?/) diff --git a/packages/docs/src/components/api/Section.vue b/packages/docs/src/components/api/Section.vue index f586345d7ac..688da67b67e 100644 --- a/packages/docs/src/components/api/Section.vue +++ b/packages/docs/src/components/api/Section.vue @@ -8,7 +8,7 @@ @input="filter = $event" /> --> - + @@ -45,7 +45,6 @@ type: String as PropType, required: true, }, - showHeadline: Boolean, }) const store = useLocaleStore() diff --git a/packages/docs/src/components/api/View.vue b/packages/docs/src/components/api/View.vue new file mode 100644 index 00000000000..c71bd344f4e --- /dev/null +++ b/packages/docs/src/components/api/View.vue @@ -0,0 +1,35 @@ + + + diff --git a/packages/docs/src/components/app/Markdown.vue b/packages/docs/src/components/app/Markdown.vue index 05098706840..03f9fbe732c 100644 --- a/packages/docs/src/components/app/Markdown.vue +++ b/packages/docs/src/components/app/Markdown.vue @@ -7,6 +7,20 @@ diff --git a/packages/docs/src/components/app/Toc.vue b/packages/docs/src/components/app/Toc.vue index 5daa54a2174..ea08d92ddf9 100644 --- a/packages/docs/src/components/app/Toc.vue +++ b/packages/docs/src/components/app/Toc.vue @@ -9,11 +9,9 @@ floating sticky > - diff --git a/packages/docs/src/components/app/bar/SettingsToggle.vue b/packages/docs/src/components/app/bar/SettingsToggle.vue index 77ff0c074c2..2698143397d 100644 --- a/packages/docs/src/components/app/bar/SettingsToggle.vue +++ b/packages/docs/src/components/app/bar/SettingsToggle.vue @@ -1,5 +1,21 @@ \n${props.script}`, + content: `\n${props.script || ''}`, }, ])) diff --git a/packages/docs/src/components/home/Entry.vue b/packages/docs/src/components/home/Entry.vue index ae48c6308ab..861dd6be065 100644 --- a/packages/docs/src/components/home/Entry.vue +++ b/packages/docs/src/components/home/Entry.vue @@ -90,6 +90,10 @@ + + + + @@ -104,10 +108,15 @@ function copy () { isCopying.value = true - navigator.clipboard.writeText('pnpm create vuetify') + navigator.clipboard.writeText(`${randomPackage} create vuetify`) setTimeout(() => { isCopying.value = false }, 1000) } + + diff --git a/packages/docs/src/components/home/EpicmaxSupport.vue b/packages/docs/src/components/home/EpicmaxSupport.vue new file mode 100644 index 00000000000..72e50bfe865 --- /dev/null +++ b/packages/docs/src/components/home/EpicmaxSupport.vue @@ -0,0 +1,24 @@ + + + diff --git a/packages/docs/src/components/home/Features.vue b/packages/docs/src/components/home/Features.vue index dfda4d37c7b..94aedf45db4 100644 --- a/packages/docs/src/components/home/Features.vue +++ b/packages/docs/src/components/home/Features.vue @@ -1,5 +1,5 @@ diff --git a/packages/docs/src/examples/border-radius/misc-components.vue b/packages/docs/src/examples/border-radius/misc-components.vue index 6982676ba1c..9e17e7e352b 100644 --- a/packages/docs/src/examples/border-radius/misc-components.vue +++ b/packages/docs/src/examples/border-radius/misc-components.vue @@ -4,7 +4,7 @@ color="primary" rounded="pill" text="Update Account" - flat + variant="flat" > diff --git a/packages/docs/src/examples/border-radius/misc-removing-border-radius.vue b/packages/docs/src/examples/border-radius/misc-removing-border-radius.vue index 15f2712bcbb..5dcef89880c 100644 --- a/packages/docs/src/examples/border-radius/misc-removing-border-radius.vue +++ b/packages/docs/src/examples/border-radius/misc-removing-border-radius.vue @@ -4,7 +4,7 @@ color="primary" rounded="0" text="Update Account" - flat + variant="flat" > diff --git a/packages/docs/src/examples/border/colors.vue b/packages/docs/src/examples/border/colors.vue index 3d22020222b..9e239d1cc95 100644 --- a/packages/docs/src/examples/border/colors.vue +++ b/packages/docs/src/examples/border/colors.vue @@ -11,7 +11,7 @@
-
"sucess sm"
+
"success sm"
diff --git a/packages/docs/src/examples/elevation/prop-dynamic.vue b/packages/docs/src/examples/elevation/prop-dynamic.vue index aa253a4f3f5..9d206132bd2 100644 --- a/packages/docs/src/examples/elevation/prop-dynamic.vue +++ b/packages/docs/src/examples/elevation/prop-dynamic.vue @@ -18,7 +18,7 @@
Class based elevation
diff --git a/packages/docs/src/examples/transitions/misc-fab.vue b/packages/docs/src/examples/transitions/misc-fab.vue index 40a863405b7..44f17ddc469 100644 --- a/packages/docs/src/examples/transitions/misc-fab.vue +++ b/packages/docs/src/examples/transitions/misc-fab.vue @@ -4,7 +4,6 @@