Author SHA1 Message Date
Joaquín Sánchez d0a2016bed docs: add license section to readme 2023-02-06 11:46:28 +01:00
51 changed files with 8048 additions and 12284 deletions

No files matched your search

+3
View File
@@ -0,0 +1,3 @@
{
"extends": "@antfu"
}
+1 -2
View File
@@ -1,2 +1 @@
open_collective: antfu github: antfu
github: [antfu]
+20 -20
View File
@@ -13,11 +13,11 @@ jobs:
lint: lint:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v3
- uses: pnpm/action-setup@v3 - uses: pnpm/action-setup@v2
- uses: actions/setup-node@v4 - uses: actions/setup-node@v3
with: with:
node-version: lts/* node-version: 16.x
cache: pnpm cache: pnpm
- name: Install - name: Install
@@ -29,11 +29,11 @@ jobs:
typecheck: typecheck:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v3
- uses: pnpm/action-setup@v3 - uses: pnpm/action-setup@v2
- uses: actions/setup-node@v4 - uses: actions/setup-node@v3
with: with:
node-version: lts/* node-version: 16.x
cache: pnpm cache: pnpm
- name: Install - name: Install
@@ -47,15 +47,15 @@ jobs:
strategy: strategy:
matrix: matrix:
node-version: [20.x, 22.x] node-version: [14.x, 16.x]
os: [ubuntu-latest] os: [ubuntu-latest]
fail-fast: false fail-fast: false
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v3
- uses: pnpm/action-setup@v3 - uses: pnpm/action-setup@v2
- name: Use Node.js ${{ matrix.node-version }} - name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4 uses: actions/setup-node@v3
with: with:
node-version: ${{ matrix.node-version }} node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org/ registry-url: https://registry.npmjs.org/
@@ -67,19 +67,19 @@ jobs:
test-e2e: test-e2e:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v3
- uses: actions/cache@v4 - uses: actions/cache@v3
with: with:
path: | path: |
~/.cache ~/.cache
key: cypress-cache-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }} key: cypress-cache-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}
- uses: pnpm/action-setup@v3 - uses: pnpm/action-setup@v2
- name: Use Node.js - name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4 uses: actions/setup-node@v3
with: with:
node-version: lts/* node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org/ registry-url: https://registry.npmjs.org/
cache: pnpm cache: pnpm
@@ -89,8 +89,8 @@ jobs:
run: cp pnpm-lock.yaml package-lock.json run: cp pnpm-lock.yaml package-lock.json
- name: Cypress - name: Cypress
uses: cypress-io/github-action@v6 uses: cypress-io/github-action@v4
with: with:
install-command: echo install-command: echo
build: pnpm run build build: pnpm run build
start: npx vite preview --port 3333 start: npx vite --port 3333
-1
View File
@@ -8,4 +8,3 @@ node_modules
.idea/ .idea/
*.log *.log
cypress/downloads cypress/downloads
public/assets/fonts
+1
View File
@@ -1 +1,2 @@
shamefully-hoist=true shamefully-hoist=true
strict-peer-dependencies=false
+5 -38
View File
@@ -4,45 +4,12 @@
"i18n-ally.keystyle": "nested", "i18n-ally.keystyle": "nested",
"i18n-ally.localesPaths": "locales", "i18n-ally.localesPaths": "locales",
"i18n-ally.sortKeys": true, "i18n-ally.sortKeys": true,
// Disable the default formatter
"prettier.enable": false, "prettier.enable": false,
"editor.formatOnSave": false,
// Auto fix
"editor.codeActionsOnSave": { "editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit", "source.fixAll.eslint": true
"source.organizeImports": "never"
}, },
"files.associations": {
// Silent the stylistic rules in you IDE, but still auto fix them "*.css": "postcss"
"eslint.rules.customizations": [ },
{ "rule": "style/*", "severity": "off" }, "editor.formatOnSave": false
{ "rule": "format/*", "severity": "off" },
{ "rule": "*-indent", "severity": "off" },
{ "rule": "*-spacing", "severity": "off" },
{ "rule": "*-spaces", "severity": "off" },
{ "rule": "*-order", "severity": "off" },
{ "rule": "*-dangle", "severity": "off" },
{ "rule": "*-newline", "severity": "off" },
{ "rule": "*quotes", "severity": "off" },
{ "rule": "*semi", "severity": "off" }
],
// The following is optional.
// It's better to put under project setting `.vscode/settings.json`
// to avoid conflicts with working with different eslint configs
// that does not support all formats.
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"vue",
"html",
"markdown",
"json",
"jsonc",
"yaml"
]
} }
+3 -3
View File
@@ -1,16 +1,16 @@
FROM node:20-alpine AS build-stage FROM node:16-alpine as build-stage
WORKDIR /app WORKDIR /app
RUN corepack enable RUN corepack enable
COPY .npmrc package.json pnpm-lock.yaml pnpm-workspace.yaml ./ COPY .npmrc package.json pnpm-lock.yaml ./
RUN --mount=type=cache,id=pnpm-store,target=/root/.pnpm-store \ RUN --mount=type=cache,id=pnpm-store,target=/root/.pnpm-store \
pnpm install --frozen-lockfile pnpm install --frozen-lockfile
COPY . . COPY . .
RUN pnpm build RUN pnpm build
FROM nginx:stable-alpine AS production-stage FROM nginx:stable-alpine as production-stage
COPY --from=build-stage /app/dist /usr/share/nginx/html COPY --from=build-stage /app/dist /usr/share/nginx/html
EXPOSE 80 EXPOSE 80
+1 -1
View File
@@ -1,6 +1,6 @@
MIT License MIT License
Copyright (c) 2020-PRESENT Anthony Fu Copyright (c) 2020-2021 Anthony Fu
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal
+22 -18
View File
@@ -14,17 +14,14 @@ Mocking up web app with <b>Vitesse</b><sup><em>(speed)</em></sup><br>
<br> <br>
> **Note**: This template is created during the early transition of Vue 3 and Vite. At this moment, if you are seeking for better Vue developer experience and more consistent maintenance, we recommend using [Nuxt](https://nuxt.com) instead (it also works perfectly with SPA or SSG as needed). This template still serves as a reference, but expect slower updates.
<br>
<p align='center'> <p align='center'>
<b>English</b> | <a href="https://github.com/antfu-collective/vitesse/blob/main/README.zh-CN.md">简体中文</a> <b>English</b> | <a href="https://github.com/antfu/vitesse/blob/main/README.zh-CN.md">简体中文</a>
<!-- Contributors: Thanks for getting interested, however we DON'T accept new translations to the README, thanks. --> <!-- Contributors: Thanks for getting interested, however we DON'T accept new transitions to the README, thanks. -->
</p> </p>
<br> <br>
## Features ## Features
- ⚡️ [Vue 3](https://github.com/vuejs/core), [Vite](https://github.com/vitejs/vite), [pnpm](https://pnpm.io/), [esbuild](https://github.com/evanw/esbuild) - born with fastness - ⚡️ [Vue 3](https://github.com/vuejs/core), [Vite](https://github.com/vitejs/vite), [pnpm](https://pnpm.io/), [esbuild](https://github.com/evanw/esbuild) - born with fastness
@@ -47,15 +44,17 @@ Mocking up web app with <b>Vitesse</b><sup><em>(speed)</em></sup><br>
- 🔎 [Component Preview](https://github.com/johnsoncodehk/vite-plugin-vue-component-preview) - 🔎 [Component Preview](https://github.com/johnsoncodehk/vite-plugin-vue-component-preview)
- 🗒 [Markdown Support](https://github.com/unplugin/unplugin-vue-markdown) - 🗒 [Markdown Support](https://github.com/antfu/vite-plugin-vue-markdown)
- 🔥 Use the [new `<script setup>` syntax](https://github.com/vuejs/rfcs/pull/227) - 🔥 Use the [new `<script setup>` syntax](https://github.com/vuejs/rfcs/pull/227)
- 🤙🏻 [Reactivity Transform](https://vuejs.org/guide/extras/reactivity-transform.html) enabled
- 📥 [APIs auto importing](https://github.com/antfu/unplugin-auto-import) - use Composition API and others directly - 📥 [APIs auto importing](https://github.com/antfu/unplugin-auto-import) - use Composition API and others directly
- 🖨 Static-site generation (SSG) via [vite-ssg](https://github.com/antfu/vite-ssg) - 🖨 Static-site generation (SSG) via [vite-ssg](https://github.com/antfu/vite-ssg)
- 🦔 Critical CSS via [beasties](https://github.com/danielroe/beasties) - 🦔 Critical CSS via [critters](https://github.com/GoogleChromeLabs/critters)
- 🦾 TypeScript, of course - 🦾 TypeScript, of course
@@ -65,6 +64,7 @@ Mocking up web app with <b>Vitesse</b><sup><em>(speed)</em></sup><br>
<br> <br>
## Pre-packed ## Pre-packed
### UI Frameworks ### UI Frameworks
@@ -79,21 +79,22 @@ Mocking up web app with <b>Vitesse</b><sup><em>(speed)</em></sup><br>
### Plugins ### Plugins
- [Vue Router](https://github.com/vuejs/router) - [Vue Router](https://github.com/vuejs/router)
- [`unplugin-vue-router`](https://github.com/posva/unplugin-vue-router) - file system based routing - [`vite-plugin-pages`](https://github.com/hannoeru/vite-plugin-pages) - file system based routing
- [`vite-plugin-vue-layouts`](https://github.com/JohnCampionJr/vite-plugin-vue-layouts) - layouts for pages - [`vite-plugin-vue-layouts`](https://github.com/JohnCampionJr/vite-plugin-vue-layouts) - layouts for pages
- [Pinia](https://pinia.vuejs.org) - Intuitive, type safe, light and flexible Store for Vue using the composition api - [Pinia](https://pinia.vuejs.org) - Intuitive, type safe, light and flexible Store for Vue using the composition api
- [`unplugin-vue-components`](https://github.com/antfu/unplugin-vue-components) - components auto import - [`unplugin-vue-components`](https://github.com/antfu/unplugin-vue-components) - components auto import
- [`unplugin-auto-import`](https://github.com/antfu/unplugin-auto-import) - Directly use Vue Composition API and others without importing - [`unplugin-auto-import`](https://github.com/antfu/unplugin-auto-import) - Directly use Vue Composition API and others without importing
- [`unplugin-vue-macros`](https://github.com/sxzz/unplugin-vue-macros) - Explore and extend more macros and syntax sugar to Vue. - [`unplugin-vue-macros`](https://github.com/sxzz/unplugin-vue-macros) - Explore and extend more macros and syntax sugar to Vue.
- [`vite-plugin-pwa`](https://github.com/antfu/vite-plugin-pwa) - PWA - [`vite-plugin-pwa`](https://github.com/antfu/vite-plugin-pwa) - PWA
- [`unplugin-vue-markdown`](https://github.com/unplugin/unplugin-vue-markdown) - Markdown as components / components in Markdown - [`vite-plugin-vue-component-preview`](https://github.com/johnsoncodehk/vite-plugin-vue-component-preview) - Preview single component in VSCode
- [`@shikijs/markdown-it`](https://github.com/shikijs/shiki) - [Shiki](https://github.com/shikijs/shiki) for syntax highlighting - [`vite-plugin-vue-markdown`](https://github.com/antfu/vite-plugin-vue-markdown) - Markdown as components / components in Markdown
- [`markdown-it-shiki`](https://github.com/antfu/markdown-it-shiki) - [Shiki](https://github.com/shikijs/shiki) for syntax highlighting
- [Vue I18n](https://github.com/intlify/vue-i18n-next) - Internationalization - [Vue I18n](https://github.com/intlify/vue-i18n-next) - Internationalization
- [`unplugin-vue-i18n`](https://github.com/intlify/bundle-tools/tree/main/packages/unplugin-vue-i18n) - unplugin for Vue I18n - [`unplugin-vue-i18n`](https://github.com/intlify/bundle-tools/tree/main/packages/unplugin-vue-i18n) - unplugin for Vue I18n
- [VueUse](https://github.com/antfu/vueuse) - collection of useful composition APIs - [VueUse](https://github.com/antfu/vueuse) - collection of useful composition APIs
- [`vite-ssg-sitemap`](https://github.com/jbaubree/vite-ssg-sitemap) - Sitemap generator - [`vite-ssg-sitemap`](https://github.com/jbaubree/vite-ssg-sitemap) - Sitemap generator
- [`@unhead/vue v2`](https://github.com/unjs/unhead) - manipulate document head reactively - [`@vueuse/head`](https://github.com/vueuse/head) - manipulate document head reactively
- [`vite-plugin-vue-devtools`](https://github.com/vuejs/devtools-next) - Designed to enhance the Vue developer experience. - [`vite-plugin-vue-inspector`](https://github.com/webfansplz/vite-plugin-vue-inspector) - jump to local IDE source code while click the element of browser automatically
### Coding Style ### Coding Style
@@ -107,7 +108,7 @@ Mocking up web app with <b>Vitesse</b><sup><em>(speed)</em></sup><br>
- [Cypress](https://cypress.io/) - E2E testing - [Cypress](https://cypress.io/) - E2E testing
- [pnpm](https://pnpm.js.org/) - fast, disk space efficient package manager - [pnpm](https://pnpm.js.org/) - fast, disk space efficient package manager
- [`vite-ssg`](https://github.com/antfu/vite-ssg) - Static-site generation - [`vite-ssg`](https://github.com/antfu/vite-ssg) - Static-site generation
- [beasties](https://github.com/danielroe/beasties) - Critical CSS - [critters](https://github.com/GoogleChromeLabs/critters) - Critical CSS
- [Netlify](https://www.netlify.com/) - zero-config deployment - [Netlify](https://www.netlify.com/) - zero-config deployment
- [VS Code Extensions](./.vscode/extensions.json) - [VS Code Extensions](./.vscode/extensions.json)
- [Vite](https://marketplace.visualstudio.com/items?itemName=antfu.vite) - Fire up Vite server automatically - [Vite](https://marketplace.visualstudio.com/items?itemName=antfu.vite) - Fire up Vite server automatically
@@ -137,8 +138,7 @@ As this template is strongly opinionated, the following provides a curated list
- [vitecamp](https://github.com/nekobc1998923/vitecamp) by [@nekobc1998923](https://github.com/nekobc1998923) - Like Vitesse but without SSG/SSR/File based routing, includes Element Plus - [vitecamp](https://github.com/nekobc1998923/vitecamp) by [@nekobc1998923](https://github.com/nekobc1998923) - Like Vitesse but without SSG/SSR/File based routing, includes Element Plus
- [vitesse-h5](https://github.com/YunYouJun/vitesse-h5) by [@YunYouJun](https://github.com/YunYouJun) - Vitesse for Mobile - [vitesse-h5](https://github.com/YunYouJun/vitesse-h5) by [@YunYouJun](https://github.com/YunYouJun) - Vitesse for Mobile
- [bat](https://github.com/olgam4/bat) by [@olgam4](https://github.com/olgam4) - Vitesse for SolidJS - [bat](https://github.com/olgam4/bat) by [@olgam4](https://github.com/olgam4) - Vitesse for SolidJS
- [vitesse-solid](https://github.com/xbmlz/vitesse-solid) by [@xbmlz](https://github.com/xbmlz) - Vitesse for SolidJS, build with [`SolidStart`](https://start.solidjs.com/), includes [UnoCSS](https://github.com/unocss/unocss). - [vitesse-solid](https://github.com/xbmlz/vitesse-solid) by [@xbmlz](https://github.com/xbmlz) - Vitesse for SolidJS, build with [`SolidStart`](https://start.solidjs.com/), includes [UnoCSS](https://github.com/unocss/unocss) and [HopeUI](https://hope-ui.com/).
- [vue3-vant-mobile](https://github.com/easy-temps/vue3-vant-mobile) by [CharleeWa](https://github.com/CharleeWa) - Like Vitesse but without SSG/SSR, includes Vant
## Try it now! ## Try it now!
@@ -146,14 +146,14 @@ As this template is strongly opinionated, the following provides a curated list
### GitHub Template ### GitHub Template
[Create a repo from this template on GitHub](https://github.com/antfu-collective/vitesse/generate). [Create a repo from this template on GitHub](https://github.com/antfu/vitesse/generate).
### Clone to local ### Clone to local
If you prefer to do it manually with the cleaner git history If you prefer to do it manually with the cleaner git history
```bash ```bash
npx degit antfu-collective/vitesse my-vitesse-app npx degit antfu/vitesse my-vitesse-app
cd my-vitesse-app cd my-vitesse-app
pnpm i # If you don't have pnpm installed, run: npm install -g pnpm pnpm i # If you don't have pnpm installed, run: npm install -g pnpm
``` ```
@@ -214,3 +214,7 @@ docker run --rm -it -p 8080:80 vitesse:latest
I have created several Vite apps recently. Setting the configs up is kinda the bottleneck for me to make the ideas simply come true within a very short time. I have created several Vite apps recently. Setting the configs up is kinda the bottleneck for me to make the ideas simply come true within a very short time.
So I made this starter template for myself to create apps more easily, along with some good practices that I have learned from making those apps. It's strongly opinionated, but feel free to tweak it or even maintain your own forks. [(see community maintained variation forks)](#variations) So I made this starter template for myself to create apps more easily, along with some good practices that I have learned from making those apps. It's strongly opinionated, but feel free to tweak it or even maintain your own forks. [(see community maintained variation forks)](#variations)
## 📄 License
MIT License © 2020-PRESENT [Anthony Fu](https://github.com/antfu)
+12 -15
View File
@@ -15,12 +15,8 @@
<br> <br>
> **Note**: 本模板创建于 Vue 3 和 Vite 的早期过渡时期。目前,如果您正在寻求更好的 Vue 开发体验和更持续的维护,我们建议您使用 [Nuxt 3](https://nuxt.com) 来代替(它也可以根据需要使用 SPA 或 SSG)。本模板仍会作为参考缓慢地维护下去,但将不会有太多的更新。
<br>
<p align='center'> <p align='center'>
<a href="https://github.com/antfu-collective/vitesse/blob/main/README.md">English</a> | <b>简体中文</b> <a href="https://github.com/antfu/vitesse/blob/main/README.md">English</a> | <b>简体中文</b>
</p> </p>
<br> <br>
@@ -45,15 +41,17 @@
- 🌍 [I18n 国际化开箱即用](./locales) - 🌍 [I18n 国际化开箱即用](./locales)
- 🗒 [Markdown 支持](https://github.com/unplugin/unplugin-vue-markdown) - 🗒 [Markdown 支持](https://github.com/antfu/vite-plugin-vue-markdown)
- 🔥 使用 [新的 `<script setup>` 语法](https://github.com/vuejs/rfcs/pull/227) - 🔥 使用 [新的 `<script setup>` 语法](https://github.com/vuejs/rfcs/pull/227)
- 📥 [API 自动加载](https://github.com/unplugin/unplugin-auto-import) - 直接使用 Composition API 无需引入 - 🤙🏻 默认开启 [响应性语法糖](https://vuejs.org/guide/extras/reactivity-transform.html)
- 📥 [API 自动加载](https://github.com/antfu/unplugin-auto-import) - 直接使用 Composition API 无需引入
- 🖨 使用 [vite-ssg](https://github.com/antfu/vite-ssg) 进行服务端生成 (SSG) - 🖨 使用 [vite-ssg](https://github.com/antfu/vite-ssg) 进行服务端生成 (SSG)
- 🦔 使用 [beasties](https://github.com/danielroe/beasties) 的生成关键 CSS - 🦔 使用 [critters](https://github.com/GoogleChromeLabs/critters) 的生成关键 CSS
- 🦾 TypeScript, 当然 - 🦾 TypeScript, 当然
@@ -77,13 +75,13 @@
### 插件 ### 插件
- [Vue Router](https://github.com/vuejs/router) - [Vue Router](https://github.com/vuejs/router)
- [`unplugin-vue-router`](https://github.com/posva/unplugin-vue-router) - 以文件系统为基础的路由 - [`vite-plugin-pages`](https://github.com/hannoeru/vite-plugin-pages) - 以文件系统为基础的路由
- [`vite-plugin-vue-layouts`](https://github.com/JohnCampionJr/vite-plugin-vue-layouts) - 页面布局系统 - [`vite-plugin-vue-layouts`](https://github.com/JohnCampionJr/vite-plugin-vue-layouts) - 页面布局系统
- [Pinia](https://pinia.vuejs.org) - 直接的, 类型安全的, 使用 Composition API 的轻便灵活的 Vue 状态管理 - [Pinia](https://pinia.vuejs.org) - 直接的, 类型安全的, 使用 Composition API 的轻便灵活的 Vue 状态管理
- [`unplugin-vue-components`](https://github.com/antfu/unplugin-vue-components) - 自动加载组件 - [`unplugin-vue-components`](https://github.com/antfu/unplugin-vue-components) - 自动加载组件
- [`unplugin-auto-import`](https://github.com/antfu/unplugin-auto-import) - 直接使用 Composition API 等,无需导入 - [`unplugin-auto-import`](https://github.com/antfu/unplugin-auto-import) - 直接使用 Composition API 等,无需导入
- [`vite-plugin-pwa`](https://github.com/antfu/vite-plugin-pwa) - PWA - [`vite-plugin-pwa`](https://github.com/antfu/vite-plugin-pwa) - PWA
- [`unplugin-vue-markdown`](https://github.com/unplugin/unplugin-vue-markdown) - Markdown 作为组件,也可以让组件在 Markdown 中使用 - [`vite-plugin-vue-markdown`](https://github.com/antfu/vite-plugin-vue-markdown) - Markdown 作为组件,也可以让组件在 Markdown 中使用
- [`markdown-it-prism`](https://github.com/jGleitz/markdown-it-prism) - [Prism](https://prismjs.com/) 的语法高亮 - [`markdown-it-prism`](https://github.com/jGleitz/markdown-it-prism) - [Prism](https://prismjs.com/) 的语法高亮
- [`prism-theme-vars`](https://github.com/antfu/prism-theme-vars) - 利用 CSS 变量自定义 Prism.js 的主题 - [`prism-theme-vars`](https://github.com/antfu/prism-theme-vars) - 利用 CSS 变量自定义 Prism.js 的主题
- [Vue I18n](https://github.com/intlify/vue-i18n-next) - 国际化 - [Vue I18n](https://github.com/intlify/vue-i18n-next) - 国际化
@@ -91,7 +89,7 @@
- [VueUse](https://github.com/antfu/vueuse) - 实用的 Composition API 工具合集 - [VueUse](https://github.com/antfu/vueuse) - 实用的 Composition API 工具合集
- [`vite-ssg-sitemap`](https://github.com/jbaubree/vite-ssg-sitemap) - 站点地图生成器 - [`vite-ssg-sitemap`](https://github.com/jbaubree/vite-ssg-sitemap) - 站点地图生成器
- [`@vueuse/head`](https://github.com/vueuse/head) - 响应式地操作文档头信息 - [`@vueuse/head`](https://github.com/vueuse/head) - 响应式地操作文档头信息
- [`vite-plugin-vue-devtools`](https://github.com/webfansplz/vite-plugin-vue-devtools) - 旨在增强Vue开发者体验的Vite插件 - [`vite-plugin-vue-inspector`](https://github.com/webfansplz/vite-plugin-vue-inspector) - 点击页面元素自动跳转到本地IDE对应的 Vue 组件
### 编码风格 ### 编码风格
@@ -99,13 +97,12 @@
- [ESLint](https://eslint.org/) 配置为 [@antfu/eslint-config](https://github.com/antfu/eslint-config), 单引号, 无分号. - [ESLint](https://eslint.org/) 配置为 [@antfu/eslint-config](https://github.com/antfu/eslint-config), 单引号, 无分号.
### 开发工具 ### 开发工具
- [TypeScript](https://www.typescriptlang.org/) - [TypeScript](https://www.typescriptlang.org/)
- [Vitest](https://github.com/vitest-dev/vitest) - 基于 Vite 的单元测试框架 - [Vitest](https://github.com/vitest-dev/vitest) - 基于 Vite 的单元测试框架
- [Cypress](https://cypress.io/) - E2E 测试 - [Cypress](https://cypress.io/) - E2E 测试
- [pnpm](https://pnpm.js.org/) - 快, 节省磁盘空间的包管理器 - [pnpm](https://pnpm.js.org/) - 快, 节省磁盘空间的包管理器
- [`vite-ssg`](https://github.com/antfu/vite-ssg) - 服务端生成 - [`vite-ssg`](https://github.com/antfu/vite-ssg) - 服务端生成
- [beasties](https://github.com/danielroe/beasties) - 关键 CSS 生成器 - [critters](https://github.com/GoogleChromeLabs/critters) - 关键 CSS 生成器
- [Netlify](https://www.netlify.com/) - 零配置的部署 - [Netlify](https://www.netlify.com/) - 零配置的部署
- [VS Code 扩展](./.vscode/extensions.json) - [VS Code 扩展](./.vscode/extensions.json)
- [Vite](https://marketplace.visualstudio.com/items?itemName=antfu.vite) - 自动启动 Vite 服务器 - [Vite](https://marketplace.visualstudio.com/items?itemName=antfu.vite) - 自动启动 Vite 服务器
@@ -135,14 +132,14 @@
### GitHub 模板 ### GitHub 模板
[使用这个模板创建仓库](https://github.com/antfu-collective/vitesse/generate). [使用这个模板创建仓库](https://github.com/antfu/vitesse/generate).
### 克隆到本地 ### 克隆到本地
如果您更喜欢使用更干净的 git 历史记录手动执行此操作 如果您更喜欢使用更干净的 git 历史记录手动执行此操作
```bash ```bash
npx degit antfu-collective/vitesse my-vitesse-app npx degit antfu/vitesse my-vitesse-app
cd my-vitesse-app cd my-vitesse-app
pnpm i # 如果你没装过 pnpm, 可以先运行: npm install -g pnpm pnpm i # 如果你没装过 pnpm, 可以先运行: npm install -g pnpm
``` ```
-4
View File
@@ -1,5 +1,4 @@
import { defineConfig } from 'cypress' import { defineConfig } from 'cypress'
import vitePreprocessor from 'cypress-vite'
export default defineConfig({ export default defineConfig({
e2e: { e2e: {
@@ -7,8 +6,5 @@ export default defineConfig({
chromeWebSecurity: false, chromeWebSecurity: false,
specPattern: 'cypress/e2e/**/*.spec.*', specPattern: 'cypress/e2e/**/*.spec.*',
supportFile: false, supportFile: false,
setupNodeEvents(on) {
on('file:preprocessor', vitePreprocessor())
},
}, },
}) })
+1 -1
View File
@@ -25,7 +25,7 @@ context('Basic', () => {
}) })
it('markdown', () => { it('markdown', () => {
cy.get('[data-test-id="about"]') cy.get('[title="About"]')
.click() .click()
.url() .url()
.should('eq', 'http://localhost:3333/about') .should('eq', 'http://localhost:3333/about')
+2 -2
View File
@@ -5,8 +5,8 @@
"cypress" "cypress"
] ]
}, },
"exclude": [],
"include": [ "include": [
"**/*.ts" "**/*.ts"
], ]
"exclude": []
} }
-16
View File
@@ -1,16 +0,0 @@
// @ts-check
import antfu from '@antfu/eslint-config'
export default antfu(
{
unocss: true,
formatters: true,
pnpm: true,
},
{
files: ['README.md', 'README.zh-CN.md'],
rules: {
'markdown/heading-increment': 'off',
},
},
)
+20 -21
View File
@@ -1,23 +1,22 @@
<!doctype html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="apple-touch-icon" href="/pwa-192x192.png" /> <link rel="apple-touch-icon" href="/pwa-192x192.png">
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#00aba9" /> <link rel="mask-icon" href="/safari-pinned-tab.svg" color="#00aba9">
<meta name="msapplication-TileColor" content="#00aba9" /> <meta name="msapplication-TileColor" content="#00aba9">
<script> <script>
;(function () { (function () {
const prefersDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches const prefersDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches
const setting = localStorage.getItem('vueuse-color-scheme') || 'auto' const setting = localStorage.getItem('vueuse-color-scheme') || 'auto'
if (setting === 'dark' || (prefersDark && setting !== 'light')) if (setting === 'dark' || (prefersDark && setting !== 'light'))
document.documentElement.classList.toggle('dark', true) document.documentElement.classList.toggle('dark', true)
})() })()
</script> </script>
</head> </head>
<body class="font-sans"> <body class="font-sans">
<div id="app"></div> <div id="app"></div>
<script type="module" src="/src/main.ts"></script> <script type="module" src="/src/main.ts"></script>
<noscript> This website requires JavaScript to function properly. Please enable JavaScript to continue. </noscript> </body>
</body>
</html> </html>
-14
View File
@@ -1,14 +0,0 @@
button:
about: Haqida
back: Orqaga
go: Kettik
home: Bosh sahifa
toggle_dark: Qorong‘i rejimga o‘tish
toggle_langs: Tilni o‘zgartirish
intro:
desc: O‘ylangan boshlang‘ich Vite shabloni
dynamic-route: Dynamic route demo'si
hi: Assalomu alaykum, {name}!
aka: shuningdek
whats-your-name: Ismingiz nima?
not-found: Topilmadi
+11 -12
View File
@@ -1,17 +1,16 @@
[build]
publish = "dist"
command = "pnpm run build"
[build.environment] [build.environment]
NODE_VERSION = "22" NODE_VERSION = "16"
[build]
publish = "dist"
command = "pnpm run build"
[[redirects]] [[redirects]]
from = "/*" from = "/*"
to = "/index.html" to = "/index.html"
status = 200 status = 200
[[headers]] [[headers]]
for = "/manifest.webmanifest" for = "/manifest.webmanifest"
[headers.values]
[headers.values] Content-Type = "application/manifest+json"
Content-Type = "application/manifest+json"
+47 -62
View File
@@ -1,7 +1,7 @@
{ {
"type": "module", "type": "module",
"private": true, "private": true,
"packageManager": "pnpm@10.30.2", "packageManager": "pnpm@7.17.1",
"scripts": { "scripts": {
"build": "vite-ssg build", "build": "vite-ssg build",
"dev": "vite --port 3333 --open", "dev": "vite --port 3333 --open",
@@ -12,70 +12,55 @@
"test:e2e": "cypress open", "test:e2e": "cypress open",
"test:unit": "vitest", "test:unit": "vitest",
"typecheck": "vue-tsc --noEmit", "typecheck": "vue-tsc --noEmit",
"up": "taze major -I", "up": "taze major -I"
"postinstall": "npx simple-git-hooks",
"sizecheck": "npx vite-bundle-visualizer"
}, },
"dependencies": { "dependencies": {
"@unhead/vue": "catalog:frontend", "@unocss/reset": "^0.48.4",
"@unocss/reset": "catalog:frontend", "@vueuse/core": "^9.11.0",
"@vueuse/core": "catalog:frontend", "@vueuse/head": "^1.0.22",
"nprogress": "catalog:frontend", "nprogress": "^0.2.0",
"pinia": "catalog:frontend", "pinia": "^2.0.29",
"vue": "catalog:frontend", "vue": "^3.2.45",
"vue-i18n": "catalog:frontend", "vue-demi": "^0.13.11",
"vue-router": "catalog:frontend" "vue-i18n": "^9.2.2",
"vue-router": "^4.1.6"
}, },
"devDependencies": { "devDependencies": {
"@antfu/eslint-config": "catalog:dev", "@antfu/eslint-config": "^0.34.1",
"@iconify-json/carbon": "catalog:dev", "@iconify-json/carbon": "^1.1.13",
"@intlify/unplugin-vue-i18n": "catalog:build", "@intlify/unplugin-vue-i18n": "^0.8.1",
"@shikijs/markdown-it": "catalog:build", "@types/markdown-it-link-attributes": "^3.0.1",
"@types/markdown-it-link-attributes": "catalog:types", "@types/nprogress": "^0.2.0",
"@types/nprogress": "catalog:types", "@vitejs/plugin-vue": "^4.0.0",
"@unocss/eslint-config": "catalog:build", "@vue-macros/volar": "^0.5.15",
"@vitejs/plugin-vue": "catalog:build", "@vue/test-utils": "^2.2.7",
"@vue-macros/volar": "catalog:dev", "critters": "^0.0.16",
"@vue/test-utils": "catalog:dev", "cross-env": "^7.0.3",
"beasties": "catalog:build", "cypress": "^12.3.0",
"cypress": "catalog:dev", "eslint": "^8.32.0",
"cypress-vite": "catalog:dev", "eslint-plugin-cypress": "^2.12.1",
"eslint": "catalog:dev", "https-localhost": "^4.7.1",
"eslint-plugin-cypress": "catalog:dev", "markdown-it-link-attributes": "^4.0.1",
"eslint-plugin-format": "catalog:dev", "markdown-it-shiki": "^0.7.2",
"https-localhost": "catalog:dev", "pnpm": "^7.25.1",
"lint-staged": "catalog:dev", "shiki": "^0.12.1",
"markdown-it-link-attributes": "catalog:build", "taze": "^0.8.5",
"rollup": "catalog:build", "typescript": "^4.9.4",
"shiki": "catalog:build", "unocss": "^0.48.4",
"simple-git-hooks": "catalog:dev", "unplugin-auto-import": "^0.12.1",
"taze": "catalog:dev", "unplugin-vue-components": "^0.22.12",
"typescript": "catalog:dev", "unplugin-vue-macros": "^1.4.2",
"unocss": "catalog:build", "vite": "^4.0.4",
"unplugin-auto-import": "catalog:build", "vite-plugin-inspect": "^0.7.14",
"unplugin-vue-components": "catalog:build", "vite-plugin-pages": "^0.28.0",
"unplugin-vue-macros": "catalog:build", "vite-plugin-pwa": "^0.14.1",
"unplugin-vue-markdown": "catalog:build", "vite-plugin-vue-component-preview": "^0.3.4",
"vite": "catalog:build", "vite-plugin-vue-inspector": "^3.2.1",
"vite-bundle-visualizer": "catalog:build", "vite-plugin-vue-layouts": "^0.7.0",
"vite-plugin-inspect": "catalog:build", "vite-plugin-vue-markdown": "^0.22.2",
"vite-plugin-pwa": "catalog:build", "vite-ssg": "^0.22.1",
"vite-plugin-vue-devtools": "catalog:build", "vite-ssg-sitemap": "^0.4.3",
"vite-plugin-vue-layouts": "catalog:build", "vitest": "^0.27.2",
"vite-ssg": "catalog:build", "vue-tsc": "^1.0.24"
"vite-ssg-sitemap": "catalog:build",
"vitest": "catalog:dev",
"vue-tsc": "catalog:dev"
},
"resolutions": {
"unplugin": "catalog:build",
"vite": "catalog:build",
"vite-plugin-inspect": "catalog:build"
},
"simple-git-hooks": {
"pre-commit": "pnpm lint-staged"
},
"lint-staged": {
"*": "eslint --fix"
} }
} }
+7459 -11297
View File
File diff suppressed because it is too large. Load diff
-68
View File
@@ -1,68 +0,0 @@
shellEmulator: true
trustPolicy: no-downgrade
packages: []
catalogs:
build:
'@intlify/unplugin-vue-i18n': ^11.0.7
'@shikijs/markdown-it': ^3.23.0
'@unocss/eslint-config': ^66.6.1
'@vitejs/plugin-vue': ^6.0.4
beasties: ^0.4.1
markdown-it-link-attributes: ^4.0.1
rollup: ^4.59.0
shiki: ^3.23.0
unocss: ^66.6.1
unplugin: ^2.3.11
unplugin-auto-import: ^21.0.0
unplugin-vue-components: ^31.0.0
unplugin-vue-macros: ^2.14.5
unplugin-vue-markdown: ^29.2.0
vite: ^7.3.1
vite-bundle-visualizer: ^1.2.1
vite-plugin-inspect: ^11.3.3
vite-plugin-pwa: ^1.2.0
vite-plugin-vue-devtools: ^8.0.6
vite-plugin-vue-layouts: ^0.11.0
vite-ssg: ^28.3.0
vite-ssg-sitemap: ^0.10.0
dev:
'@antfu/eslint-config': ^7.6.1
'@iconify-json/carbon': ^1.2.18
'@vue-macros/volar': ^3.1.2
'@vue/test-utils': ^2.4.6
cypress: ^15.10.0
cypress-vite: ^1.8.0
eslint: ^10.0.2
eslint-plugin-cypress: ^6.1.0
eslint-plugin-format: ^2.0.1
https-localhost: ^4.7.1
lint-staged: ^16.2.7
simple-git-hooks: ^2.13.1
taze: ^19.9.2
typescript: ^5.8.2
vitest: ^4.0.18
vue-tsc: ^3.2.5
frontend:
'@unhead/vue': ^2.1.7
'@unocss/reset': ^66.6.1
'@vueuse/core': ^14.2.1
nprogress: ^0.2.0
pinia: ^3.0.4
vue: ^3.5.29
vue-i18n: ^11.2.8
vue-router: ^5.0.3
types:
'@types/markdown-it-link-attributes': ^3.0.5
'@types/nprogress': ^0.2.3
onlyBuiltDependencies:
- cypress
- esbuild
- simple-git-hooks
+3 -6
View File
@@ -5,20 +5,17 @@
useHead({ useHead({
title: 'Vitesse', title: 'Vitesse',
meta: [ meta: [
{ { name: 'description', content: 'Opinionated Vite Starter Template' },
name: 'description',
content: 'Opinionated Vite Starter Template',
},
{ {
name: 'theme-color', name: 'theme-color',
content: () => isDark.value ? '#00aba9' : '#ffffff', content: computed(() => isDark.value ? '#00aba9' : '#ffffff'),
}, },
], ],
link: [ link: [
{ {
rel: 'icon', rel: 'icon',
type: 'image/svg+xml', type: 'image/svg+xml',
href: () => preferredDark.value ? '/favicon-dark.svg' : '/favicon.svg', href: computed(() => preferredDark.value ? '/favicon-dark.svg' : '/favicon.svg'),
}, },
], ],
}) })
+286 -358
View File
@@ -1,329 +1,293 @@
/* eslint-disable */ // Generated by 'unplugin-auto-import'
/* prettier-ignore */
// @ts-nocheck
// noinspection JSUnusedGlobalSymbols
// Generated by unplugin-auto-import
// biome-ignore lint: disable
export {} export {}
declare global { declare global {
const EffectScope: typeof import('vue').EffectScope const $$: typeof import('vue/macros')['$$']
const asyncComputed: typeof import('@vueuse/core').asyncComputed const $: typeof import('vue/macros')['$']
const autoResetRef: typeof import('@vueuse/core').autoResetRef const $computed: typeof import('vue/macros')['$computed']
const computed: typeof import('vue').computed const $customRef: typeof import('vue/macros')['$customRef']
const computedAsync: typeof import('@vueuse/core').computedAsync const $ref: typeof import('vue/macros')['$ref']
const computedEager: typeof import('@vueuse/core').computedEager const $shallowRef: typeof import('vue/macros')['$shallowRef']
const computedInject: typeof import('@vueuse/core').computedInject const $toRef: typeof import('vue/macros')['$toRef']
const computedWithControl: typeof import('@vueuse/core').computedWithControl const EffectScope: typeof import('vue')['EffectScope']
const controlledComputed: typeof import('@vueuse/core').controlledComputed const asyncComputed: typeof import('@vueuse/core')['asyncComputed']
const controlledRef: typeof import('@vueuse/core').controlledRef const autoResetRef: typeof import('@vueuse/core')['autoResetRef']
const createApp: typeof import('vue').createApp const computed: typeof import('vue')['computed']
const createEventHook: typeof import('@vueuse/core').createEventHook const computedAsync: typeof import('@vueuse/core')['computedAsync']
const createGlobalState: typeof import('@vueuse/core').createGlobalState const computedEager: typeof import('@vueuse/core')['computedEager']
const createInjectionState: typeof import('@vueuse/core').createInjectionState const computedInject: typeof import('@vueuse/core')['computedInject']
const createReactiveFn: typeof import('@vueuse/core').createReactiveFn const computedWithControl: typeof import('@vueuse/core')['computedWithControl']
const createRef: typeof import('@vueuse/core').createRef const controlledComputed: typeof import('@vueuse/core')['controlledComputed']
const createReusableTemplate: typeof import('@vueuse/core').createReusableTemplate const controlledRef: typeof import('@vueuse/core')['controlledRef']
const createSharedComposable: typeof import('@vueuse/core').createSharedComposable const createApp: typeof import('vue')['createApp']
const createTemplatePromise: typeof import('@vueuse/core').createTemplatePromise const createEventHook: typeof import('@vueuse/core')['createEventHook']
const createUnrefFn: typeof import('@vueuse/core').createUnrefFn const createGlobalState: typeof import('@vueuse/core')['createGlobalState']
const customRef: typeof import('vue').customRef const createInjectionState: typeof import('@vueuse/core')['createInjectionState']
const debouncedRef: typeof import('@vueuse/core').debouncedRef const createReactiveFn: typeof import('@vueuse/core')['createReactiveFn']
const debouncedWatch: typeof import('@vueuse/core').debouncedWatch const createSharedComposable: typeof import('@vueuse/core')['createSharedComposable']
const defineAsyncComponent: typeof import('vue').defineAsyncComponent const createUnrefFn: typeof import('@vueuse/core')['createUnrefFn']
const defineComponent: typeof import('vue').defineComponent const customRef: typeof import('vue')['customRef']
const definePage: typeof import('vue-router/experimental').definePage const debouncedRef: typeof import('@vueuse/core')['debouncedRef']
const eagerComputed: typeof import('@vueuse/core').eagerComputed const debouncedWatch: typeof import('@vueuse/core')['debouncedWatch']
const effectScope: typeof import('vue').effectScope const defineAsyncComponent: typeof import('vue')['defineAsyncComponent']
const extendRef: typeof import('@vueuse/core').extendRef const defineComponent: typeof import('vue')['defineComponent']
const getCurrentInstance: typeof import('vue').getCurrentInstance const eagerComputed: typeof import('@vueuse/core')['eagerComputed']
const getCurrentScope: typeof import('vue').getCurrentScope const effectScope: typeof import('vue')['effectScope']
const getCurrentWatcher: typeof import('vue').getCurrentWatcher const extendRef: typeof import('@vueuse/core')['extendRef']
const h: typeof import('vue').h const getCurrentInstance: typeof import('vue')['getCurrentInstance']
const ignorableWatch: typeof import('@vueuse/core').ignorableWatch const getCurrentScope: typeof import('vue')['getCurrentScope']
const inject: typeof import('vue').inject const h: typeof import('vue')['h']
const injectHead: typeof import('@unhead/vue').injectHead const ignorableWatch: typeof import('@vueuse/core')['ignorableWatch']
const injectLocal: typeof import('@vueuse/core').injectLocal const inject: typeof import('vue')['inject']
const isDark: typeof import('./composables/dark').isDark const isDark: typeof import('./composables/dark')['isDark']
const isDefined: typeof import('@vueuse/core').isDefined const isDefined: typeof import('@vueuse/core')['isDefined']
const isProxy: typeof import('vue').isProxy const isProxy: typeof import('vue')['isProxy']
const isReactive: typeof import('vue').isReactive const isReactive: typeof import('vue')['isReactive']
const isReadonly: typeof import('vue').isReadonly const isReadonly: typeof import('vue')['isReadonly']
const isRef: typeof import('vue').isRef const isRef: typeof import('vue')['isRef']
const isShallow: typeof import('vue').isShallow const makeDestructurable: typeof import('@vueuse/core')['makeDestructurable']
const makeDestructurable: typeof import('@vueuse/core').makeDestructurable const markRaw: typeof import('vue')['markRaw']
const markRaw: typeof import('vue').markRaw const nextTick: typeof import('vue')['nextTick']
const nextTick: typeof import('vue').nextTick const onActivated: typeof import('vue')['onActivated']
const onActivated: typeof import('vue').onActivated const onBeforeMount: typeof import('vue')['onBeforeMount']
const onBeforeMount: typeof import('vue').onBeforeMount const onBeforeRouteLeave: typeof import('vue-router')['onBeforeRouteLeave']
const onBeforeRouteLeave: typeof import('vue-router').onBeforeRouteLeave const onBeforeRouteUpdate: typeof import('vue-router')['onBeforeRouteUpdate']
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 onBeforeUpdate: typeof import('vue').onBeforeUpdate const onClickOutside: typeof import('@vueuse/core')['onClickOutside']
const onClickOutside: typeof import('@vueuse/core').onClickOutside const onDeactivated: typeof import('vue')['onDeactivated']
const onDeactivated: typeof import('vue').onDeactivated const onErrorCaptured: typeof import('vue')['onErrorCaptured']
const onElementRemoval: typeof import('@vueuse/core').onElementRemoval const onKeyStroke: typeof import('@vueuse/core')['onKeyStroke']
const onErrorCaptured: typeof import('vue').onErrorCaptured const onLongPress: typeof import('@vueuse/core')['onLongPress']
const onKeyStroke: typeof import('@vueuse/core').onKeyStroke const onMounted: typeof import('vue')['onMounted']
const onLongPress: typeof import('@vueuse/core').onLongPress const onRenderTracked: typeof import('vue')['onRenderTracked']
const onMounted: typeof import('vue').onMounted const onRenderTriggered: typeof import('vue')['onRenderTriggered']
const onRenderTracked: typeof import('vue').onRenderTracked const onScopeDispose: typeof import('vue')['onScopeDispose']
const onRenderTriggered: typeof import('vue').onRenderTriggered const onServerPrefetch: typeof import('vue')['onServerPrefetch']
const onScopeDispose: typeof import('vue').onScopeDispose const onStartTyping: typeof import('@vueuse/core')['onStartTyping']
const onServerPrefetch: typeof import('vue').onServerPrefetch const onUnmounted: typeof import('vue')['onUnmounted']
const onStartTyping: typeof import('@vueuse/core').onStartTyping const onUpdated: typeof import('vue')['onUpdated']
const onUnmounted: typeof import('vue').onUnmounted const pausableWatch: typeof import('@vueuse/core')['pausableWatch']
const onUpdated: typeof import('vue').onUpdated const preferredDark: typeof import('./composables/dark')['preferredDark']
const onWatcherCleanup: typeof import('vue').onWatcherCleanup const provide: typeof import('vue')['provide']
const pausableWatch: typeof import('@vueuse/core').pausableWatch const reactify: typeof import('@vueuse/core')['reactify']
const preferredDark: typeof import('./composables/dark').preferredDark const reactifyObject: typeof import('@vueuse/core')['reactifyObject']
const provide: typeof import('vue').provide const reactive: typeof import('vue')['reactive']
const provideLocal: typeof import('@vueuse/core').provideLocal const reactiveComputed: typeof import('@vueuse/core')['reactiveComputed']
const reactify: typeof import('@vueuse/core').reactify const reactiveOmit: typeof import('@vueuse/core')['reactiveOmit']
const reactifyObject: typeof import('@vueuse/core').reactifyObject const reactivePick: typeof import('@vueuse/core')['reactivePick']
const reactive: typeof import('vue').reactive const readonly: typeof import('vue')['readonly']
const reactiveComputed: typeof import('@vueuse/core').reactiveComputed const ref: typeof import('vue')['ref']
const reactiveOmit: typeof import('@vueuse/core').reactiveOmit const refAutoReset: typeof import('@vueuse/core')['refAutoReset']
const reactivePick: typeof import('@vueuse/core').reactivePick const refDebounced: typeof import('@vueuse/core')['refDebounced']
const readonly: typeof import('vue').readonly const refDefault: typeof import('@vueuse/core')['refDefault']
const ref: typeof import('vue').ref const refThrottled: typeof import('@vueuse/core')['refThrottled']
const refAutoReset: typeof import('@vueuse/core').refAutoReset const refWithControl: typeof import('@vueuse/core')['refWithControl']
const refDebounced: typeof import('@vueuse/core').refDebounced const resolveComponent: typeof import('vue')['resolveComponent']
const refDefault: typeof import('@vueuse/core').refDefault const resolveDirective: typeof import('vue')['resolveDirective']
const refManualReset: typeof import('@vueuse/core').refManualReset const resolveRef: typeof import('@vueuse/core')['resolveRef']
const refThrottled: typeof import('@vueuse/core').refThrottled
const refWithControl: typeof import('@vueuse/core').refWithControl
const resolveComponent: typeof import('vue').resolveComponent
const resolveRef: typeof import('@vueuse/core').resolveRef
const resolveUnref: typeof import('@vueuse/core')['resolveUnref'] const resolveUnref: typeof import('@vueuse/core')['resolveUnref']
const shallowReactive: typeof import('vue').shallowReactive const shallowReactive: typeof import('vue')['shallowReactive']
const shallowReadonly: typeof import('vue').shallowReadonly const shallowReadonly: typeof import('vue')['shallowReadonly']
const shallowRef: typeof import('vue').shallowRef const shallowRef: typeof import('vue')['shallowRef']
const syncRef: typeof import('@vueuse/core').syncRef const syncRef: typeof import('@vueuse/core')['syncRef']
const syncRefs: typeof import('@vueuse/core').syncRefs const syncRefs: typeof import('@vueuse/core')['syncRefs']
const templateRef: typeof import('@vueuse/core').templateRef const templateRef: typeof import('@vueuse/core')['templateRef']
const throttledRef: typeof import('@vueuse/core').throttledRef const throttledRef: typeof import('@vueuse/core')['throttledRef']
const throttledWatch: typeof import('@vueuse/core').throttledWatch const throttledWatch: typeof import('@vueuse/core')['throttledWatch']
const toRaw: typeof import('vue').toRaw const toRaw: typeof import('vue')['toRaw']
const toReactive: typeof import('@vueuse/core').toReactive const toReactive: typeof import('@vueuse/core')['toReactive']
const toRef: typeof import('vue').toRef const toRef: typeof import('vue')['toRef']
const toRefs: typeof import('vue').toRefs const toRefs: typeof import('vue')['toRefs']
const toValue: typeof import('vue').toValue const toggleDark: typeof import('./composables/dark')['toggleDark']
const toggleDark: typeof import('./composables/dark').toggleDark const triggerRef: typeof import('vue')['triggerRef']
const triggerRef: typeof import('vue').triggerRef const tryOnBeforeMount: typeof import('@vueuse/core')['tryOnBeforeMount']
const tryOnBeforeMount: typeof import('@vueuse/core').tryOnBeforeMount const tryOnBeforeUnmount: typeof import('@vueuse/core')['tryOnBeforeUnmount']
const tryOnBeforeUnmount: typeof import('@vueuse/core').tryOnBeforeUnmount const tryOnMounted: typeof import('@vueuse/core')['tryOnMounted']
const tryOnMounted: typeof import('@vueuse/core').tryOnMounted const tryOnScopeDispose: typeof import('@vueuse/core')['tryOnScopeDispose']
const tryOnScopeDispose: typeof import('@vueuse/core').tryOnScopeDispose const tryOnUnmounted: typeof import('@vueuse/core')['tryOnUnmounted']
const tryOnUnmounted: typeof import('@vueuse/core').tryOnUnmounted const unref: typeof import('vue')['unref']
const unref: typeof import('vue').unref const unrefElement: typeof import('@vueuse/core')['unrefElement']
const unrefElement: typeof import('@vueuse/core').unrefElement const until: typeof import('@vueuse/core')['until']
const until: typeof import('@vueuse/core').until const useActiveElement: typeof import('@vueuse/core')['useActiveElement']
const useActiveElement: typeof import('@vueuse/core').useActiveElement const useArrayEvery: typeof import('@vueuse/core')['useArrayEvery']
const useAnimate: typeof import('@vueuse/core').useAnimate const useArrayFilter: typeof import('@vueuse/core')['useArrayFilter']
const useArrayDifference: typeof import('@vueuse/core').useArrayDifference const useArrayFind: typeof import('@vueuse/core')['useArrayFind']
const useArrayEvery: typeof import('@vueuse/core').useArrayEvery const useArrayFindIndex: typeof import('@vueuse/core')['useArrayFindIndex']
const useArrayFilter: typeof import('@vueuse/core').useArrayFilter const useArrayJoin: typeof import('@vueuse/core')['useArrayJoin']
const useArrayFind: typeof import('@vueuse/core').useArrayFind const useArrayMap: typeof import('@vueuse/core')['useArrayMap']
const useArrayFindIndex: typeof import('@vueuse/core').useArrayFindIndex const useArrayReduce: typeof import('@vueuse/core')['useArrayReduce']
const useArrayFindLast: typeof import('@vueuse/core').useArrayFindLast const useArraySome: typeof import('@vueuse/core')['useArraySome']
const useArrayIncludes: typeof import('@vueuse/core').useArrayIncludes const useAsyncQueue: typeof import('@vueuse/core')['useAsyncQueue']
const useArrayJoin: typeof import('@vueuse/core').useArrayJoin const useAsyncState: typeof import('@vueuse/core')['useAsyncState']
const useArrayMap: typeof import('@vueuse/core').useArrayMap const useAttrs: typeof import('vue')['useAttrs']
const useArrayReduce: typeof import('@vueuse/core').useArrayReduce const useBase64: typeof import('@vueuse/core')['useBase64']
const useArraySome: typeof import('@vueuse/core').useArraySome const useBattery: typeof import('@vueuse/core')['useBattery']
const useArrayUnique: typeof import('@vueuse/core').useArrayUnique const useBluetooth: typeof import('@vueuse/core')['useBluetooth']
const useAsyncQueue: typeof import('@vueuse/core').useAsyncQueue const useBreakpoints: typeof import('@vueuse/core')['useBreakpoints']
const useAsyncState: typeof import('@vueuse/core').useAsyncState const useBroadcastChannel: typeof import('@vueuse/core')['useBroadcastChannel']
const useAttrs: typeof import('vue').useAttrs const useBrowserLocation: typeof import('@vueuse/core')['useBrowserLocation']
const useBase64: typeof import('@vueuse/core').useBase64 const useCached: typeof import('@vueuse/core')['useCached']
const useBattery: typeof import('@vueuse/core').useBattery const useClipboard: typeof import('@vueuse/core')['useClipboard']
const useBluetooth: typeof import('@vueuse/core').useBluetooth const useCloned: typeof import('@vueuse/core')['useCloned']
const useBreakpoints: typeof import('@vueuse/core').useBreakpoints const useColorMode: typeof import('@vueuse/core')['useColorMode']
const useBroadcastChannel: typeof import('@vueuse/core').useBroadcastChannel const useConfirmDialog: typeof import('@vueuse/core')['useConfirmDialog']
const useBrowserLocation: typeof import('@vueuse/core').useBrowserLocation const useCounter: typeof import('@vueuse/core')['useCounter']
const useCached: typeof import('@vueuse/core').useCached const useCssModule: typeof import('vue')['useCssModule']
const useClipboard: typeof import('@vueuse/core').useClipboard const useCssVar: typeof import('@vueuse/core')['useCssVar']
const useClipboardItems: typeof import('@vueuse/core').useClipboardItems const useCssVars: typeof import('vue')['useCssVars']
const useCloned: typeof import('@vueuse/core').useCloned const useCurrentElement: typeof import('@vueuse/core')['useCurrentElement']
const useColorMode: typeof import('@vueuse/core').useColorMode const useCycleList: typeof import('@vueuse/core')['useCycleList']
const useConfirmDialog: typeof import('@vueuse/core').useConfirmDialog const useDark: typeof import('@vueuse/core')['useDark']
const useCountdown: typeof import('@vueuse/core').useCountdown const useDateFormat: typeof import('@vueuse/core')['useDateFormat']
const useCounter: typeof import('@vueuse/core').useCounter const useDebounce: typeof import('@vueuse/core')['useDebounce']
const useCssModule: typeof import('vue').useCssModule const useDebounceFn: typeof import('@vueuse/core')['useDebounceFn']
const useCssSupports: typeof import('@vueuse/core').useCssSupports const useDebouncedRefHistory: typeof import('@vueuse/core')['useDebouncedRefHistory']
const useCssVar: typeof import('@vueuse/core').useCssVar const useDeviceMotion: typeof import('@vueuse/core')['useDeviceMotion']
const useCssVars: typeof import('vue').useCssVars const useDeviceOrientation: typeof import('@vueuse/core')['useDeviceOrientation']
const useCurrentElement: typeof import('@vueuse/core').useCurrentElement const useDevicePixelRatio: typeof import('@vueuse/core')['useDevicePixelRatio']
const useCycleList: typeof import('@vueuse/core').useCycleList const useDevicesList: typeof import('@vueuse/core')['useDevicesList']
const useDark: typeof import('@vueuse/core').useDark const useDisplayMedia: typeof import('@vueuse/core')['useDisplayMedia']
const useDateFormat: typeof import('@vueuse/core').useDateFormat const useDocumentVisibility: typeof import('@vueuse/core')['useDocumentVisibility']
const useDebounce: typeof import('@vueuse/core').useDebounce const useDraggable: typeof import('@vueuse/core')['useDraggable']
const useDebounceFn: typeof import('@vueuse/core').useDebounceFn const useDropZone: typeof import('@vueuse/core')['useDropZone']
const useDebouncedRefHistory: typeof import('@vueuse/core').useDebouncedRefHistory const useElementBounding: typeof import('@vueuse/core')['useElementBounding']
const useDeviceMotion: typeof import('@vueuse/core').useDeviceMotion const useElementByPoint: typeof import('@vueuse/core')['useElementByPoint']
const useDeviceOrientation: typeof import('@vueuse/core').useDeviceOrientation const useElementHover: typeof import('@vueuse/core')['useElementHover']
const useDevicePixelRatio: typeof import('@vueuse/core').useDevicePixelRatio const useElementSize: typeof import('@vueuse/core')['useElementSize']
const useDevicesList: typeof import('@vueuse/core').useDevicesList const useElementVisibility: typeof import('@vueuse/core')['useElementVisibility']
const useDisplayMedia: typeof import('@vueuse/core').useDisplayMedia const useEventBus: typeof import('@vueuse/core')['useEventBus']
const useDocumentVisibility: typeof import('@vueuse/core').useDocumentVisibility const useEventListener: typeof import('@vueuse/core')['useEventListener']
const useDraggable: typeof import('@vueuse/core').useDraggable const useEventSource: typeof import('@vueuse/core')['useEventSource']
const useDropZone: typeof import('@vueuse/core').useDropZone const useEyeDropper: typeof import('@vueuse/core')['useEyeDropper']
const useElementBounding: typeof import('@vueuse/core').useElementBounding const useFavicon: typeof import('@vueuse/core')['useFavicon']
const useElementByPoint: typeof import('@vueuse/core').useElementByPoint const useFetch: typeof import('@vueuse/core')['useFetch']
const useElementHover: typeof import('@vueuse/core').useElementHover const useFileDialog: typeof import('@vueuse/core')['useFileDialog']
const useElementSize: typeof import('@vueuse/core').useElementSize const useFileSystemAccess: typeof import('@vueuse/core')['useFileSystemAccess']
const useElementVisibility: typeof import('@vueuse/core').useElementVisibility const useFocus: typeof import('@vueuse/core')['useFocus']
const useEventBus: typeof import('@vueuse/core').useEventBus const useFocusWithin: typeof import('@vueuse/core')['useFocusWithin']
const useEventListener: typeof import('@vueuse/core').useEventListener const useFps: typeof import('@vueuse/core')['useFps']
const useEventSource: typeof import('@vueuse/core').useEventSource const useFullscreen: typeof import('@vueuse/core')['useFullscreen']
const useEyeDropper: typeof import('@vueuse/core').useEyeDropper const useGamepad: typeof import('@vueuse/core')['useGamepad']
const useFavicon: typeof import('@vueuse/core').useFavicon const useGeolocation: typeof import('@vueuse/core')['useGeolocation']
const useFetch: typeof import('@vueuse/core').useFetch const useHead: typeof import('@vueuse/head')['useHead']
const useFileDialog: typeof import('@vueuse/core').useFileDialog const useI18n: typeof import('vue-i18n')['useI18n']
const useFileSystemAccess: typeof import('@vueuse/core').useFileSystemAccess const useIdle: typeof import('@vueuse/core')['useIdle']
const useFocus: typeof import('@vueuse/core').useFocus const useImage: typeof import('@vueuse/core')['useImage']
const useFocusWithin: typeof import('@vueuse/core').useFocusWithin const useInfiniteScroll: typeof import('@vueuse/core')['useInfiniteScroll']
const useFps: typeof import('@vueuse/core').useFps const useIntersectionObserver: typeof import('@vueuse/core')['useIntersectionObserver']
const useFullscreen: typeof import('@vueuse/core').useFullscreen const useInterval: typeof import('@vueuse/core')['useInterval']
const useGamepad: typeof import('@vueuse/core').useGamepad const useIntervalFn: typeof import('@vueuse/core')['useIntervalFn']
const useGeolocation: typeof import('@vueuse/core').useGeolocation const useKeyModifier: typeof import('@vueuse/core')['useKeyModifier']
const useHead: typeof import('@unhead/vue').useHead const useLastChanged: typeof import('@vueuse/core')['useLastChanged']
const useHeadSafe: typeof import('@unhead/vue').useHeadSafe const useLink: typeof import('vue-router')['useLink']
const useI18n: typeof import('vue-i18n').useI18n const useLocalStorage: typeof import('@vueuse/core')['useLocalStorage']
const useId: typeof import('vue').useId const useMagicKeys: typeof import('@vueuse/core')['useMagicKeys']
const useIdle: typeof import('@vueuse/core').useIdle const useManualRefHistory: typeof import('@vueuse/core')['useManualRefHistory']
const useImage: typeof import('@vueuse/core').useImage const useMediaControls: typeof import('@vueuse/core')['useMediaControls']
const useInfiniteScroll: typeof import('@vueuse/core').useInfiniteScroll const useMediaQuery: typeof import('@vueuse/core')['useMediaQuery']
const useIntersectionObserver: typeof import('@vueuse/core').useIntersectionObserver const useMemoize: typeof import('@vueuse/core')['useMemoize']
const useInterval: typeof import('@vueuse/core').useInterval const useMemory: typeof import('@vueuse/core')['useMemory']
const useIntervalFn: typeof import('@vueuse/core').useIntervalFn const useMounted: typeof import('@vueuse/core')['useMounted']
const useKeyModifier: typeof import('@vueuse/core').useKeyModifier const useMouse: typeof import('@vueuse/core')['useMouse']
const useLastChanged: typeof import('@vueuse/core').useLastChanged const useMouseInElement: typeof import('@vueuse/core')['useMouseInElement']
const useLink: typeof import('vue-router/auto').useLink const useMousePressed: typeof import('@vueuse/core')['useMousePressed']
const useLocalStorage: typeof import('@vueuse/core').useLocalStorage const useMutationObserver: typeof import('@vueuse/core')['useMutationObserver']
const useMagicKeys: typeof import('@vueuse/core').useMagicKeys const useNavigatorLanguage: typeof import('@vueuse/core')['useNavigatorLanguage']
const useManualRefHistory: typeof import('@vueuse/core').useManualRefHistory const useNetwork: typeof import('@vueuse/core')['useNetwork']
const useMediaControls: typeof import('@vueuse/core').useMediaControls const useNow: typeof import('@vueuse/core')['useNow']
const useMediaQuery: typeof import('@vueuse/core').useMediaQuery const useObjectUrl: typeof import('@vueuse/core')['useObjectUrl']
const useMemoize: typeof import('@vueuse/core').useMemoize const useOffsetPagination: typeof import('@vueuse/core')['useOffsetPagination']
const useMemory: typeof import('@vueuse/core').useMemory const useOnline: typeof import('@vueuse/core')['useOnline']
const useModel: typeof import('vue').useModel const usePageLeave: typeof import('@vueuse/core')['usePageLeave']
const useMounted: typeof import('@vueuse/core').useMounted const useParallax: typeof import('@vueuse/core')['useParallax']
const useMouse: typeof import('@vueuse/core').useMouse const usePermission: typeof import('@vueuse/core')['usePermission']
const useMouseInElement: typeof import('@vueuse/core').useMouseInElement const usePointer: typeof import('@vueuse/core')['usePointer']
const useMousePressed: typeof import('@vueuse/core').useMousePressed const usePointerSwipe: typeof import('@vueuse/core')['usePointerSwipe']
const useMutationObserver: typeof import('@vueuse/core').useMutationObserver const usePreferredColorScheme: typeof import('@vueuse/core')['usePreferredColorScheme']
const useNavigatorLanguage: typeof import('@vueuse/core').useNavigatorLanguage const usePreferredContrast: typeof import('@vueuse/core')['usePreferredContrast']
const useNetwork: typeof import('@vueuse/core').useNetwork const usePreferredDark: typeof import('@vueuse/core')['usePreferredDark']
const useNow: typeof import('@vueuse/core').useNow const usePreferredLanguages: typeof import('@vueuse/core')['usePreferredLanguages']
const useObjectUrl: typeof import('@vueuse/core').useObjectUrl const usePreferredReducedMotion: typeof import('@vueuse/core')['usePreferredReducedMotion']
const useOffsetPagination: typeof import('@vueuse/core').useOffsetPagination const useRafFn: typeof import('@vueuse/core')['useRafFn']
const useOnline: typeof import('@vueuse/core').useOnline const useRefHistory: typeof import('@vueuse/core')['useRefHistory']
const usePageLeave: typeof import('@vueuse/core').usePageLeave const useResizeObserver: typeof import('@vueuse/core')['useResizeObserver']
const useParallax: typeof import('@vueuse/core').useParallax const useRoute: typeof import('vue-router')['useRoute']
const useParentElement: typeof import('@vueuse/core').useParentElement const useRouter: typeof import('vue-router')['useRouter']
const usePerformanceObserver: typeof import('@vueuse/core').usePerformanceObserver const useScreenOrientation: typeof import('@vueuse/core')['useScreenOrientation']
const usePermission: typeof import('@vueuse/core').usePermission const useScreenSafeArea: typeof import('@vueuse/core')['useScreenSafeArea']
const usePointer: typeof import('@vueuse/core').usePointer const useScriptTag: typeof import('@vueuse/core')['useScriptTag']
const usePointerLock: typeof import('@vueuse/core').usePointerLock const useScroll: typeof import('@vueuse/core')['useScroll']
const usePointerSwipe: typeof import('@vueuse/core').usePointerSwipe const useScrollLock: typeof import('@vueuse/core')['useScrollLock']
const usePreferredColorScheme: typeof import('@vueuse/core').usePreferredColorScheme const useSessionStorage: typeof import('@vueuse/core')['useSessionStorage']
const usePreferredContrast: typeof import('@vueuse/core').usePreferredContrast const useShare: typeof import('@vueuse/core')['useShare']
const usePreferredDark: typeof import('@vueuse/core').usePreferredDark const useSlots: typeof import('vue')['useSlots']
const usePreferredLanguages: typeof import('@vueuse/core').usePreferredLanguages const useSorted: typeof import('@vueuse/core')['useSorted']
const usePreferredReducedMotion: typeof import('@vueuse/core').usePreferredReducedMotion const useSpeechRecognition: typeof import('@vueuse/core')['useSpeechRecognition']
const usePreferredReducedTransparency: typeof import('@vueuse/core').usePreferredReducedTransparency const useSpeechSynthesis: typeof import('@vueuse/core')['useSpeechSynthesis']
const usePrevious: typeof import('@vueuse/core').usePrevious const useStepper: typeof import('@vueuse/core')['useStepper']
const useRafFn: typeof import('@vueuse/core').useRafFn const useStorage: typeof import('@vueuse/core')['useStorage']
const useRefHistory: typeof import('@vueuse/core').useRefHistory const useStorageAsync: typeof import('@vueuse/core')['useStorageAsync']
const useResizeObserver: typeof import('@vueuse/core').useResizeObserver const useStyleTag: typeof import('@vueuse/core')['useStyleTag']
const useRoute: typeof import('vue-router').useRoute const useSupported: typeof import('@vueuse/core')['useSupported']
const useRouter: typeof import('vue-router').useRouter const useSwipe: typeof import('@vueuse/core')['useSwipe']
const useSSRWidth: typeof import('@vueuse/core').useSSRWidth const useTemplateRefsList: typeof import('@vueuse/core')['useTemplateRefsList']
const useScreenOrientation: typeof import('@vueuse/core').useScreenOrientation const useTextDirection: typeof import('@vueuse/core')['useTextDirection']
const useScreenSafeArea: typeof import('@vueuse/core').useScreenSafeArea const useTextSelection: typeof import('@vueuse/core')['useTextSelection']
const useScriptTag: typeof import('@vueuse/core').useScriptTag const useTextareaAutosize: typeof import('@vueuse/core')['useTextareaAutosize']
const useScroll: typeof import('@vueuse/core').useScroll const useThrottle: typeof import('@vueuse/core')['useThrottle']
const useScrollLock: typeof import('@vueuse/core').useScrollLock const useThrottleFn: typeof import('@vueuse/core')['useThrottleFn']
const useSeoMeta: typeof import('@unhead/vue').useSeoMeta const useThrottledRefHistory: typeof import('@vueuse/core')['useThrottledRefHistory']
const useServerHead: typeof import('@unhead/vue').useServerHead const useTimeAgo: typeof import('@vueuse/core')['useTimeAgo']
const useServerHeadSafe: typeof import('@unhead/vue').useServerHeadSafe const useTimeout: typeof import('@vueuse/core')['useTimeout']
const useServerSeoMeta: typeof import('@unhead/vue').useServerSeoMeta const useTimeoutFn: typeof import('@vueuse/core')['useTimeoutFn']
const useSessionStorage: typeof import('@vueuse/core').useSessionStorage const useTimeoutPoll: typeof import('@vueuse/core')['useTimeoutPoll']
const useShare: typeof import('@vueuse/core').useShare const useTimestamp: typeof import('@vueuse/core')['useTimestamp']
const useSlots: typeof import('vue').useSlots const useTitle: typeof import('@vueuse/core')['useTitle']
const useSorted: typeof import('@vueuse/core').useSorted const useToNumber: typeof import('@vueuse/core')['useToNumber']
const useSpeechRecognition: typeof import('@vueuse/core').useSpeechRecognition const useToString: typeof import('@vueuse/core')['useToString']
const useSpeechSynthesis: typeof import('@vueuse/core').useSpeechSynthesis const useToggle: typeof import('@vueuse/core')['useToggle']
const useStepper: typeof import('@vueuse/core').useStepper const useTransition: typeof import('@vueuse/core')['useTransition']
const useStorage: typeof import('@vueuse/core').useStorage const useUrlSearchParams: typeof import('@vueuse/core')['useUrlSearchParams']
const useStorageAsync: typeof import('@vueuse/core').useStorageAsync const useUserMedia: typeof import('@vueuse/core')['useUserMedia']
const useStyleTag: typeof import('@vueuse/core').useStyleTag const useUserStore: typeof import('./stores/user')['useUserStore']
const useSupported: typeof import('@vueuse/core').useSupported const useVModel: typeof import('@vueuse/core')['useVModel']
const useSwipe: typeof import('@vueuse/core').useSwipe const useVModels: typeof import('@vueuse/core')['useVModels']
const useTemplateRef: typeof import('vue').useTemplateRef const useVibrate: typeof import('@vueuse/core')['useVibrate']
const useTemplateRefsList: typeof import('@vueuse/core').useTemplateRefsList const useVirtualList: typeof import('@vueuse/core')['useVirtualList']
const useTextDirection: typeof import('@vueuse/core').useTextDirection const useWakeLock: typeof import('@vueuse/core')['useWakeLock']
const useTextSelection: typeof import('@vueuse/core').useTextSelection const useWebNotification: typeof import('@vueuse/core')['useWebNotification']
const useTextareaAutosize: typeof import('@vueuse/core').useTextareaAutosize const useWebSocket: typeof import('@vueuse/core')['useWebSocket']
const useThrottle: typeof import('@vueuse/core').useThrottle const useWebWorker: typeof import('@vueuse/core')['useWebWorker']
const useThrottleFn: typeof import('@vueuse/core').useThrottleFn const useWebWorkerFn: typeof import('@vueuse/core')['useWebWorkerFn']
const useThrottledRefHistory: typeof import('@vueuse/core').useThrottledRefHistory const useWindowFocus: typeof import('@vueuse/core')['useWindowFocus']
const useTimeAgo: typeof import('@vueuse/core').useTimeAgo const useWindowScroll: typeof import('@vueuse/core')['useWindowScroll']
const useTimeAgoIntl: typeof import('@vueuse/core').useTimeAgoIntl const useWindowSize: typeof import('@vueuse/core')['useWindowSize']
const useTimeout: typeof import('@vueuse/core').useTimeout const watch: typeof import('vue')['watch']
const useTimeoutFn: typeof import('@vueuse/core').useTimeoutFn const watchArray: typeof import('@vueuse/core')['watchArray']
const useTimeoutPoll: typeof import('@vueuse/core').useTimeoutPoll const watchAtMost: typeof import('@vueuse/core')['watchAtMost']
const useTimestamp: typeof import('@vueuse/core').useTimestamp const watchDebounced: typeof import('@vueuse/core')['watchDebounced']
const useTitle: typeof import('@vueuse/core').useTitle const watchEffect: typeof import('vue')['watchEffect']
const useToNumber: typeof import('@vueuse/core').useToNumber const watchIgnorable: typeof import('@vueuse/core')['watchIgnorable']
const useToString: typeof import('@vueuse/core').useToString const watchOnce: typeof import('@vueuse/core')['watchOnce']
const useToggle: typeof import('@vueuse/core').useToggle const watchPausable: typeof import('@vueuse/core')['watchPausable']
const useTransition: typeof import('@vueuse/core').useTransition const watchPostEffect: typeof import('vue')['watchPostEffect']
const useUrlSearchParams: typeof import('@vueuse/core').useUrlSearchParams const watchSyncEffect: typeof import('vue')['watchSyncEffect']
const useUserMedia: typeof import('@vueuse/core').useUserMedia const watchThrottled: typeof import('@vueuse/core')['watchThrottled']
const useUserStore: typeof import('./stores/user').useUserStore const watchTriggerable: typeof import('@vueuse/core')['watchTriggerable']
const useVModel: typeof import('@vueuse/core').useVModel const watchWithFilter: typeof import('@vueuse/core')['watchWithFilter']
const useVModels: typeof import('@vueuse/core').useVModels const whenever: typeof import('@vueuse/core')['whenever']
const useVibrate: typeof import('@vueuse/core').useVibrate
const useVirtualList: typeof import('@vueuse/core').useVirtualList
const useWakeLock: typeof import('@vueuse/core').useWakeLock
const useWebNotification: typeof import('@vueuse/core').useWebNotification
const useWebSocket: typeof import('@vueuse/core').useWebSocket
const useWebWorker: typeof import('@vueuse/core').useWebWorker
const useWebWorkerFn: typeof import('@vueuse/core').useWebWorkerFn
const useWindowFocus: typeof import('@vueuse/core').useWindowFocus
const useWindowScroll: typeof import('@vueuse/core').useWindowScroll
const useWindowSize: typeof import('@vueuse/core').useWindowSize
const watch: typeof import('vue').watch
const watchArray: typeof import('@vueuse/core').watchArray
const watchAtMost: typeof import('@vueuse/core').watchAtMost
const watchDebounced: typeof import('@vueuse/core').watchDebounced
const watchDeep: typeof import('@vueuse/core').watchDeep
const watchEffect: typeof import('vue').watchEffect
const watchIgnorable: typeof import('@vueuse/core').watchIgnorable
const watchImmediate: typeof import('@vueuse/core').watchImmediate
const watchOnce: typeof import('@vueuse/core').watchOnce
const watchPausable: typeof import('@vueuse/core').watchPausable
const watchPostEffect: typeof import('vue').watchPostEffect
const watchSyncEffect: typeof import('vue').watchSyncEffect
const watchThrottled: typeof import('@vueuse/core').watchThrottled
const watchTriggerable: typeof import('@vueuse/core').watchTriggerable
const watchWithFilter: typeof import('@vueuse/core').watchWithFilter
const whenever: typeof import('@vueuse/core').whenever
} }
// for type re-export
declare global {
// @ts-ignore
export type { Component, Slot, Slots, ComponentPublicInstance, ComputedRef, DirectiveBinding, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, ShallowRef, MaybeRef, MaybeRefOrGetter, VNode, WritableComputedRef } from 'vue'
import('vue')
}
// for vue template auto import // for vue template auto import
import { UnwrapRef } from 'vue' import { UnwrapRef } from 'vue'
declare module 'vue' { declare module 'vue' {
interface GlobalComponents {}
interface ComponentCustomProperties { interface ComponentCustomProperties {
readonly $$: UnwrapRef<typeof import('vue/macros')['$$']>
readonly $: UnwrapRef<typeof import('vue/macros')['$']>
readonly $computed: UnwrapRef<typeof import('vue/macros')['$computed']>
readonly $customRef: UnwrapRef<typeof import('vue/macros')['$customRef']>
readonly $ref: UnwrapRef<typeof import('vue/macros')['$ref']>
readonly $shallowRef: UnwrapRef<typeof import('vue/macros')['$shallowRef']>
readonly $toRef: UnwrapRef<typeof import('vue/macros')['$toRef']>
readonly EffectScope: UnwrapRef<typeof import('vue')['EffectScope']> readonly EffectScope: UnwrapRef<typeof import('vue')['EffectScope']>
readonly asyncComputed: UnwrapRef<typeof import('@vueuse/core')['asyncComputed']> readonly asyncComputed: UnwrapRef<typeof import('@vueuse/core')['asyncComputed']>
readonly autoResetRef: UnwrapRef<typeof import('@vueuse/core')['autoResetRef']> readonly autoResetRef: UnwrapRef<typeof import('@vueuse/core')['autoResetRef']>
@@ -339,35 +303,27 @@ declare module 'vue' {
readonly createGlobalState: UnwrapRef<typeof import('@vueuse/core')['createGlobalState']> readonly createGlobalState: UnwrapRef<typeof import('@vueuse/core')['createGlobalState']>
readonly createInjectionState: UnwrapRef<typeof import('@vueuse/core')['createInjectionState']> readonly createInjectionState: UnwrapRef<typeof import('@vueuse/core')['createInjectionState']>
readonly createReactiveFn: UnwrapRef<typeof import('@vueuse/core')['createReactiveFn']> readonly createReactiveFn: UnwrapRef<typeof import('@vueuse/core')['createReactiveFn']>
readonly createRef: UnwrapRef<typeof import('@vueuse/core')['createRef']>
readonly createReusableTemplate: UnwrapRef<typeof import('@vueuse/core')['createReusableTemplate']>
readonly createSharedComposable: UnwrapRef<typeof import('@vueuse/core')['createSharedComposable']> readonly createSharedComposable: UnwrapRef<typeof import('@vueuse/core')['createSharedComposable']>
readonly createTemplatePromise: UnwrapRef<typeof import('@vueuse/core')['createTemplatePromise']>
readonly createUnrefFn: UnwrapRef<typeof import('@vueuse/core')['createUnrefFn']> readonly createUnrefFn: UnwrapRef<typeof import('@vueuse/core')['createUnrefFn']>
readonly customRef: UnwrapRef<typeof import('vue')['customRef']> readonly customRef: UnwrapRef<typeof import('vue')['customRef']>
readonly debouncedRef: UnwrapRef<typeof import('@vueuse/core')['debouncedRef']> readonly debouncedRef: UnwrapRef<typeof import('@vueuse/core')['debouncedRef']>
readonly debouncedWatch: UnwrapRef<typeof import('@vueuse/core')['debouncedWatch']> readonly debouncedWatch: UnwrapRef<typeof import('@vueuse/core')['debouncedWatch']>
readonly defineAsyncComponent: UnwrapRef<typeof import('vue')['defineAsyncComponent']> readonly defineAsyncComponent: UnwrapRef<typeof import('vue')['defineAsyncComponent']>
readonly defineComponent: UnwrapRef<typeof import('vue')['defineComponent']> readonly defineComponent: UnwrapRef<typeof import('vue')['defineComponent']>
readonly definePage: UnwrapRef<typeof import('vue-router/experimental')['definePage']>
readonly eagerComputed: UnwrapRef<typeof import('@vueuse/core')['eagerComputed']> readonly eagerComputed: UnwrapRef<typeof import('@vueuse/core')['eagerComputed']>
readonly effectScope: UnwrapRef<typeof import('vue')['effectScope']> readonly effectScope: UnwrapRef<typeof import('vue')['effectScope']>
readonly extendRef: UnwrapRef<typeof import('@vueuse/core')['extendRef']> readonly extendRef: UnwrapRef<typeof import('@vueuse/core')['extendRef']>
readonly getCurrentInstance: UnwrapRef<typeof import('vue')['getCurrentInstance']> readonly getCurrentInstance: UnwrapRef<typeof import('vue')['getCurrentInstance']>
readonly getCurrentScope: UnwrapRef<typeof import('vue')['getCurrentScope']> readonly getCurrentScope: UnwrapRef<typeof import('vue')['getCurrentScope']>
readonly getCurrentWatcher: UnwrapRef<typeof import('vue')['getCurrentWatcher']>
readonly h: UnwrapRef<typeof import('vue')['h']> readonly h: UnwrapRef<typeof import('vue')['h']>
readonly ignorableWatch: UnwrapRef<typeof import('@vueuse/core')['ignorableWatch']> readonly ignorableWatch: UnwrapRef<typeof import('@vueuse/core')['ignorableWatch']>
readonly inject: UnwrapRef<typeof import('vue')['inject']> readonly inject: UnwrapRef<typeof import('vue')['inject']>
readonly injectHead: UnwrapRef<typeof import('@unhead/vue')['injectHead']>
readonly injectLocal: UnwrapRef<typeof import('@vueuse/core')['injectLocal']>
readonly isDark: UnwrapRef<typeof import('./composables/dark')['isDark']> readonly isDark: UnwrapRef<typeof import('./composables/dark')['isDark']>
readonly isDefined: UnwrapRef<typeof import('@vueuse/core')['isDefined']> readonly isDefined: UnwrapRef<typeof import('@vueuse/core')['isDefined']>
readonly isProxy: UnwrapRef<typeof import('vue')['isProxy']> readonly isProxy: UnwrapRef<typeof import('vue')['isProxy']>
readonly isReactive: UnwrapRef<typeof import('vue')['isReactive']> readonly isReactive: UnwrapRef<typeof import('vue')['isReactive']>
readonly isReadonly: UnwrapRef<typeof import('vue')['isReadonly']> readonly isReadonly: UnwrapRef<typeof import('vue')['isReadonly']>
readonly isRef: UnwrapRef<typeof import('vue')['isRef']> readonly isRef: UnwrapRef<typeof import('vue')['isRef']>
readonly isShallow: UnwrapRef<typeof import('vue')['isShallow']>
readonly makeDestructurable: UnwrapRef<typeof import('@vueuse/core')['makeDestructurable']> readonly makeDestructurable: UnwrapRef<typeof import('@vueuse/core')['makeDestructurable']>
readonly markRaw: UnwrapRef<typeof import('vue')['markRaw']> readonly markRaw: UnwrapRef<typeof import('vue')['markRaw']>
readonly nextTick: UnwrapRef<typeof import('vue')['nextTick']> readonly nextTick: UnwrapRef<typeof import('vue')['nextTick']>
@@ -379,7 +335,6 @@ declare module 'vue' {
readonly onBeforeUpdate: UnwrapRef<typeof import('vue')['onBeforeUpdate']> readonly onBeforeUpdate: UnwrapRef<typeof import('vue')['onBeforeUpdate']>
readonly onClickOutside: UnwrapRef<typeof import('@vueuse/core')['onClickOutside']> readonly onClickOutside: UnwrapRef<typeof import('@vueuse/core')['onClickOutside']>
readonly onDeactivated: UnwrapRef<typeof import('vue')['onDeactivated']> readonly onDeactivated: UnwrapRef<typeof import('vue')['onDeactivated']>
readonly onElementRemoval: UnwrapRef<typeof import('@vueuse/core')['onElementRemoval']>
readonly onErrorCaptured: UnwrapRef<typeof import('vue')['onErrorCaptured']> readonly onErrorCaptured: UnwrapRef<typeof import('vue')['onErrorCaptured']>
readonly onKeyStroke: UnwrapRef<typeof import('@vueuse/core')['onKeyStroke']> readonly onKeyStroke: UnwrapRef<typeof import('@vueuse/core')['onKeyStroke']>
readonly onLongPress: UnwrapRef<typeof import('@vueuse/core')['onLongPress']> readonly onLongPress: UnwrapRef<typeof import('@vueuse/core')['onLongPress']>
@@ -391,11 +346,9 @@ declare module 'vue' {
readonly onStartTyping: UnwrapRef<typeof import('@vueuse/core')['onStartTyping']> readonly onStartTyping: UnwrapRef<typeof import('@vueuse/core')['onStartTyping']>
readonly onUnmounted: UnwrapRef<typeof import('vue')['onUnmounted']> readonly onUnmounted: UnwrapRef<typeof import('vue')['onUnmounted']>
readonly onUpdated: UnwrapRef<typeof import('vue')['onUpdated']> readonly onUpdated: UnwrapRef<typeof import('vue')['onUpdated']>
readonly onWatcherCleanup: UnwrapRef<typeof import('vue')['onWatcherCleanup']>
readonly pausableWatch: UnwrapRef<typeof import('@vueuse/core')['pausableWatch']> readonly pausableWatch: UnwrapRef<typeof import('@vueuse/core')['pausableWatch']>
readonly preferredDark: UnwrapRef<typeof import('./composables/dark')['preferredDark']> readonly preferredDark: UnwrapRef<typeof import('./composables/dark')['preferredDark']>
readonly provide: UnwrapRef<typeof import('vue')['provide']> readonly provide: UnwrapRef<typeof import('vue')['provide']>
readonly provideLocal: UnwrapRef<typeof import('@vueuse/core')['provideLocal']>
readonly reactify: UnwrapRef<typeof import('@vueuse/core')['reactify']> readonly reactify: UnwrapRef<typeof import('@vueuse/core')['reactify']>
readonly reactifyObject: UnwrapRef<typeof import('@vueuse/core')['reactifyObject']> readonly reactifyObject: UnwrapRef<typeof import('@vueuse/core')['reactifyObject']>
readonly reactive: UnwrapRef<typeof import('vue')['reactive']> readonly reactive: UnwrapRef<typeof import('vue')['reactive']>
@@ -407,11 +360,12 @@ declare module 'vue' {
readonly refAutoReset: UnwrapRef<typeof import('@vueuse/core')['refAutoReset']> readonly refAutoReset: UnwrapRef<typeof import('@vueuse/core')['refAutoReset']>
readonly refDebounced: UnwrapRef<typeof import('@vueuse/core')['refDebounced']> readonly refDebounced: UnwrapRef<typeof import('@vueuse/core')['refDebounced']>
readonly refDefault: UnwrapRef<typeof import('@vueuse/core')['refDefault']> readonly refDefault: UnwrapRef<typeof import('@vueuse/core')['refDefault']>
readonly refManualReset: UnwrapRef<typeof import('@vueuse/core')['refManualReset']>
readonly refThrottled: UnwrapRef<typeof import('@vueuse/core')['refThrottled']> readonly refThrottled: UnwrapRef<typeof import('@vueuse/core')['refThrottled']>
readonly refWithControl: UnwrapRef<typeof import('@vueuse/core')['refWithControl']> readonly refWithControl: UnwrapRef<typeof import('@vueuse/core')['refWithControl']>
readonly resolveComponent: UnwrapRef<typeof import('vue')['resolveComponent']> readonly resolveComponent: UnwrapRef<typeof import('vue')['resolveComponent']>
readonly resolveDirective: UnwrapRef<typeof import('vue')['resolveDirective']>
readonly resolveRef: UnwrapRef<typeof import('@vueuse/core')['resolveRef']> readonly resolveRef: UnwrapRef<typeof import('@vueuse/core')['resolveRef']>
readonly resolveUnref: UnwrapRef<typeof import('@vueuse/core')['resolveUnref']>
readonly shallowReactive: UnwrapRef<typeof import('vue')['shallowReactive']> readonly shallowReactive: UnwrapRef<typeof import('vue')['shallowReactive']>
readonly shallowReadonly: UnwrapRef<typeof import('vue')['shallowReadonly']> readonly shallowReadonly: UnwrapRef<typeof import('vue')['shallowReadonly']>
readonly shallowRef: UnwrapRef<typeof import('vue')['shallowRef']> readonly shallowRef: UnwrapRef<typeof import('vue')['shallowRef']>
@@ -424,7 +378,6 @@ declare module 'vue' {
readonly toReactive: UnwrapRef<typeof import('@vueuse/core')['toReactive']> readonly toReactive: UnwrapRef<typeof import('@vueuse/core')['toReactive']>
readonly toRef: UnwrapRef<typeof import('vue')['toRef']> readonly toRef: UnwrapRef<typeof import('vue')['toRef']>
readonly toRefs: UnwrapRef<typeof import('vue')['toRefs']> readonly toRefs: UnwrapRef<typeof import('vue')['toRefs']>
readonly toValue: UnwrapRef<typeof import('vue')['toValue']>
readonly toggleDark: UnwrapRef<typeof import('./composables/dark')['toggleDark']> readonly toggleDark: UnwrapRef<typeof import('./composables/dark')['toggleDark']>
readonly triggerRef: UnwrapRef<typeof import('vue')['triggerRef']> readonly triggerRef: UnwrapRef<typeof import('vue')['triggerRef']>
readonly tryOnBeforeMount: UnwrapRef<typeof import('@vueuse/core')['tryOnBeforeMount']> readonly tryOnBeforeMount: UnwrapRef<typeof import('@vueuse/core')['tryOnBeforeMount']>
@@ -436,19 +389,14 @@ declare module 'vue' {
readonly unrefElement: UnwrapRef<typeof import('@vueuse/core')['unrefElement']> readonly unrefElement: UnwrapRef<typeof import('@vueuse/core')['unrefElement']>
readonly until: UnwrapRef<typeof import('@vueuse/core')['until']> readonly until: UnwrapRef<typeof import('@vueuse/core')['until']>
readonly useActiveElement: UnwrapRef<typeof import('@vueuse/core')['useActiveElement']> readonly useActiveElement: UnwrapRef<typeof import('@vueuse/core')['useActiveElement']>
readonly useAnimate: UnwrapRef<typeof import('@vueuse/core')['useAnimate']>
readonly useArrayDifference: UnwrapRef<typeof import('@vueuse/core')['useArrayDifference']>
readonly useArrayEvery: UnwrapRef<typeof import('@vueuse/core')['useArrayEvery']> readonly useArrayEvery: UnwrapRef<typeof import('@vueuse/core')['useArrayEvery']>
readonly useArrayFilter: UnwrapRef<typeof import('@vueuse/core')['useArrayFilter']> readonly useArrayFilter: UnwrapRef<typeof import('@vueuse/core')['useArrayFilter']>
readonly useArrayFind: UnwrapRef<typeof import('@vueuse/core')['useArrayFind']> readonly useArrayFind: UnwrapRef<typeof import('@vueuse/core')['useArrayFind']>
readonly useArrayFindIndex: UnwrapRef<typeof import('@vueuse/core')['useArrayFindIndex']> readonly useArrayFindIndex: UnwrapRef<typeof import('@vueuse/core')['useArrayFindIndex']>
readonly useArrayFindLast: UnwrapRef<typeof import('@vueuse/core')['useArrayFindLast']>
readonly useArrayIncludes: UnwrapRef<typeof import('@vueuse/core')['useArrayIncludes']>
readonly useArrayJoin: UnwrapRef<typeof import('@vueuse/core')['useArrayJoin']> readonly useArrayJoin: UnwrapRef<typeof import('@vueuse/core')['useArrayJoin']>
readonly useArrayMap: UnwrapRef<typeof import('@vueuse/core')['useArrayMap']> readonly useArrayMap: UnwrapRef<typeof import('@vueuse/core')['useArrayMap']>
readonly useArrayReduce: UnwrapRef<typeof import('@vueuse/core')['useArrayReduce']> readonly useArrayReduce: UnwrapRef<typeof import('@vueuse/core')['useArrayReduce']>
readonly useArraySome: UnwrapRef<typeof import('@vueuse/core')['useArraySome']> readonly useArraySome: UnwrapRef<typeof import('@vueuse/core')['useArraySome']>
readonly useArrayUnique: UnwrapRef<typeof import('@vueuse/core')['useArrayUnique']>
readonly useAsyncQueue: UnwrapRef<typeof import('@vueuse/core')['useAsyncQueue']> readonly useAsyncQueue: UnwrapRef<typeof import('@vueuse/core')['useAsyncQueue']>
readonly useAsyncState: UnwrapRef<typeof import('@vueuse/core')['useAsyncState']> readonly useAsyncState: UnwrapRef<typeof import('@vueuse/core')['useAsyncState']>
readonly useAttrs: UnwrapRef<typeof import('vue')['useAttrs']> readonly useAttrs: UnwrapRef<typeof import('vue')['useAttrs']>
@@ -460,14 +408,11 @@ declare module 'vue' {
readonly useBrowserLocation: UnwrapRef<typeof import('@vueuse/core')['useBrowserLocation']> readonly useBrowserLocation: UnwrapRef<typeof import('@vueuse/core')['useBrowserLocation']>
readonly useCached: UnwrapRef<typeof import('@vueuse/core')['useCached']> readonly useCached: UnwrapRef<typeof import('@vueuse/core')['useCached']>
readonly useClipboard: UnwrapRef<typeof import('@vueuse/core')['useClipboard']> readonly useClipboard: UnwrapRef<typeof import('@vueuse/core')['useClipboard']>
readonly useClipboardItems: UnwrapRef<typeof import('@vueuse/core')['useClipboardItems']>
readonly useCloned: UnwrapRef<typeof import('@vueuse/core')['useCloned']> readonly useCloned: UnwrapRef<typeof import('@vueuse/core')['useCloned']>
readonly useColorMode: UnwrapRef<typeof import('@vueuse/core')['useColorMode']> readonly useColorMode: UnwrapRef<typeof import('@vueuse/core')['useColorMode']>
readonly useConfirmDialog: UnwrapRef<typeof import('@vueuse/core')['useConfirmDialog']> readonly useConfirmDialog: UnwrapRef<typeof import('@vueuse/core')['useConfirmDialog']>
readonly useCountdown: UnwrapRef<typeof import('@vueuse/core')['useCountdown']>
readonly useCounter: UnwrapRef<typeof import('@vueuse/core')['useCounter']> readonly useCounter: UnwrapRef<typeof import('@vueuse/core')['useCounter']>
readonly useCssModule: UnwrapRef<typeof import('vue')['useCssModule']> readonly useCssModule: UnwrapRef<typeof import('vue')['useCssModule']>
readonly useCssSupports: UnwrapRef<typeof import('@vueuse/core')['useCssSupports']>
readonly useCssVar: UnwrapRef<typeof import('@vueuse/core')['useCssVar']> readonly useCssVar: UnwrapRef<typeof import('@vueuse/core')['useCssVar']>
readonly useCssVars: UnwrapRef<typeof import('vue')['useCssVars']> readonly useCssVars: UnwrapRef<typeof import('vue')['useCssVars']>
readonly useCurrentElement: UnwrapRef<typeof import('@vueuse/core')['useCurrentElement']> readonly useCurrentElement: UnwrapRef<typeof import('@vueuse/core')['useCurrentElement']>
@@ -504,10 +449,8 @@ declare module 'vue' {
readonly useFullscreen: UnwrapRef<typeof import('@vueuse/core')['useFullscreen']> readonly useFullscreen: UnwrapRef<typeof import('@vueuse/core')['useFullscreen']>
readonly useGamepad: UnwrapRef<typeof import('@vueuse/core')['useGamepad']> readonly useGamepad: UnwrapRef<typeof import('@vueuse/core')['useGamepad']>
readonly useGeolocation: UnwrapRef<typeof import('@vueuse/core')['useGeolocation']> readonly useGeolocation: UnwrapRef<typeof import('@vueuse/core')['useGeolocation']>
readonly useHead: UnwrapRef<typeof import('@unhead/vue')['useHead']> readonly useHead: UnwrapRef<typeof import('@vueuse/head')['useHead']>
readonly useHeadSafe: UnwrapRef<typeof import('@unhead/vue')['useHeadSafe']>
readonly useI18n: UnwrapRef<typeof import('vue-i18n')['useI18n']> readonly useI18n: UnwrapRef<typeof import('vue-i18n')['useI18n']>
readonly useId: UnwrapRef<typeof import('vue')['useId']>
readonly useIdle: UnwrapRef<typeof import('@vueuse/core')['useIdle']> readonly useIdle: UnwrapRef<typeof import('@vueuse/core')['useIdle']>
readonly useImage: UnwrapRef<typeof import('@vueuse/core')['useImage']> readonly useImage: UnwrapRef<typeof import('@vueuse/core')['useImage']>
readonly useInfiniteScroll: UnwrapRef<typeof import('@vueuse/core')['useInfiniteScroll']> readonly useInfiniteScroll: UnwrapRef<typeof import('@vueuse/core')['useInfiniteScroll']>
@@ -516,7 +459,7 @@ declare module 'vue' {
readonly useIntervalFn: UnwrapRef<typeof import('@vueuse/core')['useIntervalFn']> readonly useIntervalFn: UnwrapRef<typeof import('@vueuse/core')['useIntervalFn']>
readonly useKeyModifier: UnwrapRef<typeof import('@vueuse/core')['useKeyModifier']> readonly useKeyModifier: UnwrapRef<typeof import('@vueuse/core')['useKeyModifier']>
readonly useLastChanged: UnwrapRef<typeof import('@vueuse/core')['useLastChanged']> readonly useLastChanged: UnwrapRef<typeof import('@vueuse/core')['useLastChanged']>
readonly useLink: UnwrapRef<typeof import('vue-router/auto')['useLink']> readonly useLink: UnwrapRef<typeof import('vue-router')['useLink']>
readonly useLocalStorage: UnwrapRef<typeof import('@vueuse/core')['useLocalStorage']> readonly useLocalStorage: UnwrapRef<typeof import('@vueuse/core')['useLocalStorage']>
readonly useMagicKeys: UnwrapRef<typeof import('@vueuse/core')['useMagicKeys']> readonly useMagicKeys: UnwrapRef<typeof import('@vueuse/core')['useMagicKeys']>
readonly useManualRefHistory: UnwrapRef<typeof import('@vueuse/core')['useManualRefHistory']> readonly useManualRefHistory: UnwrapRef<typeof import('@vueuse/core')['useManualRefHistory']>
@@ -524,7 +467,6 @@ declare module 'vue' {
readonly useMediaQuery: UnwrapRef<typeof import('@vueuse/core')['useMediaQuery']> readonly useMediaQuery: UnwrapRef<typeof import('@vueuse/core')['useMediaQuery']>
readonly useMemoize: UnwrapRef<typeof import('@vueuse/core')['useMemoize']> readonly useMemoize: UnwrapRef<typeof import('@vueuse/core')['useMemoize']>
readonly useMemory: UnwrapRef<typeof import('@vueuse/core')['useMemory']> readonly useMemory: UnwrapRef<typeof import('@vueuse/core')['useMemory']>
readonly useModel: UnwrapRef<typeof import('vue')['useModel']>
readonly useMounted: UnwrapRef<typeof import('@vueuse/core')['useMounted']> readonly useMounted: UnwrapRef<typeof import('@vueuse/core')['useMounted']>
readonly useMouse: UnwrapRef<typeof import('@vueuse/core')['useMouse']> readonly useMouse: UnwrapRef<typeof import('@vueuse/core')['useMouse']>
readonly useMouseInElement: UnwrapRef<typeof import('@vueuse/core')['useMouseInElement']> readonly useMouseInElement: UnwrapRef<typeof import('@vueuse/core')['useMouseInElement']>
@@ -538,34 +480,24 @@ declare module 'vue' {
readonly useOnline: UnwrapRef<typeof import('@vueuse/core')['useOnline']> readonly useOnline: UnwrapRef<typeof import('@vueuse/core')['useOnline']>
readonly usePageLeave: UnwrapRef<typeof import('@vueuse/core')['usePageLeave']> readonly usePageLeave: UnwrapRef<typeof import('@vueuse/core')['usePageLeave']>
readonly useParallax: UnwrapRef<typeof import('@vueuse/core')['useParallax']> readonly useParallax: UnwrapRef<typeof import('@vueuse/core')['useParallax']>
readonly useParentElement: UnwrapRef<typeof import('@vueuse/core')['useParentElement']>
readonly usePerformanceObserver: UnwrapRef<typeof import('@vueuse/core')['usePerformanceObserver']>
readonly usePermission: UnwrapRef<typeof import('@vueuse/core')['usePermission']> readonly usePermission: UnwrapRef<typeof import('@vueuse/core')['usePermission']>
readonly usePointer: UnwrapRef<typeof import('@vueuse/core')['usePointer']> readonly usePointer: UnwrapRef<typeof import('@vueuse/core')['usePointer']>
readonly usePointerLock: UnwrapRef<typeof import('@vueuse/core')['usePointerLock']>
readonly usePointerSwipe: UnwrapRef<typeof import('@vueuse/core')['usePointerSwipe']> readonly usePointerSwipe: UnwrapRef<typeof import('@vueuse/core')['usePointerSwipe']>
readonly usePreferredColorScheme: UnwrapRef<typeof import('@vueuse/core')['usePreferredColorScheme']> readonly usePreferredColorScheme: UnwrapRef<typeof import('@vueuse/core')['usePreferredColorScheme']>
readonly usePreferredContrast: UnwrapRef<typeof import('@vueuse/core')['usePreferredContrast']> readonly usePreferredContrast: UnwrapRef<typeof import('@vueuse/core')['usePreferredContrast']>
readonly usePreferredDark: UnwrapRef<typeof import('@vueuse/core')['usePreferredDark']> readonly usePreferredDark: UnwrapRef<typeof import('@vueuse/core')['usePreferredDark']>
readonly usePreferredLanguages: UnwrapRef<typeof import('@vueuse/core')['usePreferredLanguages']> readonly usePreferredLanguages: UnwrapRef<typeof import('@vueuse/core')['usePreferredLanguages']>
readonly usePreferredReducedMotion: UnwrapRef<typeof import('@vueuse/core')['usePreferredReducedMotion']> readonly usePreferredReducedMotion: UnwrapRef<typeof import('@vueuse/core')['usePreferredReducedMotion']>
readonly usePreferredReducedTransparency: UnwrapRef<typeof import('@vueuse/core')['usePreferredReducedTransparency']>
readonly usePrevious: UnwrapRef<typeof import('@vueuse/core')['usePrevious']>
readonly useRafFn: UnwrapRef<typeof import('@vueuse/core')['useRafFn']> readonly useRafFn: UnwrapRef<typeof import('@vueuse/core')['useRafFn']>
readonly useRefHistory: UnwrapRef<typeof import('@vueuse/core')['useRefHistory']> readonly useRefHistory: UnwrapRef<typeof import('@vueuse/core')['useRefHistory']>
readonly useResizeObserver: UnwrapRef<typeof import('@vueuse/core')['useResizeObserver']> readonly useResizeObserver: UnwrapRef<typeof import('@vueuse/core')['useResizeObserver']>
readonly useRoute: UnwrapRef<typeof import('vue-router')['useRoute']> readonly useRoute: UnwrapRef<typeof import('vue-router')['useRoute']>
readonly useRouter: UnwrapRef<typeof import('vue-router')['useRouter']> readonly useRouter: UnwrapRef<typeof import('vue-router')['useRouter']>
readonly useSSRWidth: UnwrapRef<typeof import('@vueuse/core')['useSSRWidth']>
readonly useScreenOrientation: UnwrapRef<typeof import('@vueuse/core')['useScreenOrientation']> readonly useScreenOrientation: UnwrapRef<typeof import('@vueuse/core')['useScreenOrientation']>
readonly useScreenSafeArea: UnwrapRef<typeof import('@vueuse/core')['useScreenSafeArea']> readonly useScreenSafeArea: UnwrapRef<typeof import('@vueuse/core')['useScreenSafeArea']>
readonly useScriptTag: UnwrapRef<typeof import('@vueuse/core')['useScriptTag']> readonly useScriptTag: UnwrapRef<typeof import('@vueuse/core')['useScriptTag']>
readonly useScroll: UnwrapRef<typeof import('@vueuse/core')['useScroll']> readonly useScroll: UnwrapRef<typeof import('@vueuse/core')['useScroll']>
readonly useScrollLock: UnwrapRef<typeof import('@vueuse/core')['useScrollLock']> readonly useScrollLock: UnwrapRef<typeof import('@vueuse/core')['useScrollLock']>
readonly useSeoMeta: UnwrapRef<typeof import('@unhead/vue')['useSeoMeta']>
readonly useServerHead: UnwrapRef<typeof import('@unhead/vue')['useServerHead']>
readonly useServerHeadSafe: UnwrapRef<typeof import('@unhead/vue')['useServerHeadSafe']>
readonly useServerSeoMeta: UnwrapRef<typeof import('@unhead/vue')['useServerSeoMeta']>
readonly useSessionStorage: UnwrapRef<typeof import('@vueuse/core')['useSessionStorage']> readonly useSessionStorage: UnwrapRef<typeof import('@vueuse/core')['useSessionStorage']>
readonly useShare: UnwrapRef<typeof import('@vueuse/core')['useShare']> readonly useShare: UnwrapRef<typeof import('@vueuse/core')['useShare']>
readonly useSlots: UnwrapRef<typeof import('vue')['useSlots']> readonly useSlots: UnwrapRef<typeof import('vue')['useSlots']>
@@ -578,7 +510,6 @@ declare module 'vue' {
readonly useStyleTag: UnwrapRef<typeof import('@vueuse/core')['useStyleTag']> readonly useStyleTag: UnwrapRef<typeof import('@vueuse/core')['useStyleTag']>
readonly useSupported: UnwrapRef<typeof import('@vueuse/core')['useSupported']> readonly useSupported: UnwrapRef<typeof import('@vueuse/core')['useSupported']>
readonly useSwipe: UnwrapRef<typeof import('@vueuse/core')['useSwipe']> readonly useSwipe: UnwrapRef<typeof import('@vueuse/core')['useSwipe']>
readonly useTemplateRef: UnwrapRef<typeof import('vue')['useTemplateRef']>
readonly useTemplateRefsList: UnwrapRef<typeof import('@vueuse/core')['useTemplateRefsList']> readonly useTemplateRefsList: UnwrapRef<typeof import('@vueuse/core')['useTemplateRefsList']>
readonly useTextDirection: UnwrapRef<typeof import('@vueuse/core')['useTextDirection']> readonly useTextDirection: UnwrapRef<typeof import('@vueuse/core')['useTextDirection']>
readonly useTextSelection: UnwrapRef<typeof import('@vueuse/core')['useTextSelection']> readonly useTextSelection: UnwrapRef<typeof import('@vueuse/core')['useTextSelection']>
@@ -587,7 +518,6 @@ declare module 'vue' {
readonly useThrottleFn: UnwrapRef<typeof import('@vueuse/core')['useThrottleFn']> readonly useThrottleFn: UnwrapRef<typeof import('@vueuse/core')['useThrottleFn']>
readonly useThrottledRefHistory: UnwrapRef<typeof import('@vueuse/core')['useThrottledRefHistory']> readonly useThrottledRefHistory: UnwrapRef<typeof import('@vueuse/core')['useThrottledRefHistory']>
readonly useTimeAgo: UnwrapRef<typeof import('@vueuse/core')['useTimeAgo']> readonly useTimeAgo: UnwrapRef<typeof import('@vueuse/core')['useTimeAgo']>
readonly useTimeAgoIntl: UnwrapRef<typeof import('@vueuse/core')['useTimeAgoIntl']>
readonly useTimeout: UnwrapRef<typeof import('@vueuse/core')['useTimeout']> readonly useTimeout: UnwrapRef<typeof import('@vueuse/core')['useTimeout']>
readonly useTimeoutFn: UnwrapRef<typeof import('@vueuse/core')['useTimeoutFn']> readonly useTimeoutFn: UnwrapRef<typeof import('@vueuse/core')['useTimeoutFn']>
readonly useTimeoutPoll: UnwrapRef<typeof import('@vueuse/core')['useTimeoutPoll']> readonly useTimeoutPoll: UnwrapRef<typeof import('@vueuse/core')['useTimeoutPoll']>
@@ -616,10 +546,8 @@ declare module 'vue' {
readonly watchArray: UnwrapRef<typeof import('@vueuse/core')['watchArray']> readonly watchArray: UnwrapRef<typeof import('@vueuse/core')['watchArray']>
readonly watchAtMost: UnwrapRef<typeof import('@vueuse/core')['watchAtMost']> readonly watchAtMost: UnwrapRef<typeof import('@vueuse/core')['watchAtMost']>
readonly watchDebounced: UnwrapRef<typeof import('@vueuse/core')['watchDebounced']> readonly watchDebounced: UnwrapRef<typeof import('@vueuse/core')['watchDebounced']>
readonly watchDeep: UnwrapRef<typeof import('@vueuse/core')['watchDeep']>
readonly watchEffect: UnwrapRef<typeof import('vue')['watchEffect']> readonly watchEffect: UnwrapRef<typeof import('vue')['watchEffect']>
readonly watchIgnorable: UnwrapRef<typeof import('@vueuse/core')['watchIgnorable']> readonly watchIgnorable: UnwrapRef<typeof import('@vueuse/core')['watchIgnorable']>
readonly watchImmediate: UnwrapRef<typeof import('@vueuse/core')['watchImmediate']>
readonly watchOnce: UnwrapRef<typeof import('@vueuse/core')['watchOnce']> readonly watchOnce: UnwrapRef<typeof import('@vueuse/core')['watchOnce']>
readonly watchPausable: UnwrapRef<typeof import('@vueuse/core')['watchPausable']> readonly watchPausable: UnwrapRef<typeof import('@vueuse/core')['watchPausable']>
readonly watchPostEffect: UnwrapRef<typeof import('vue')['watchPostEffect']> readonly watchPostEffect: UnwrapRef<typeof import('vue')['watchPostEffect']>
+4 -8
View File
@@ -1,15 +1,11 @@
/* eslint-disable */ // generated by unplugin-vue-components
// @ts-nocheck // We suggest you to commit this file into source control
// biome-ignore lint: disable
// oxlint-disable
// ------
// Generated by unplugin-vue-components
// Read more: https://github.com/vuejs/core/pull/3399 // Read more: https://github.com/vuejs/core/pull/3399
import '@vue/runtime-core'
export {} export {}
/* prettier-ignore */ declare module '@vue/runtime-core' {
declare module 'vue' {
export interface GlobalComponents { export interface GlobalComponents {
README: typeof import('./components/README.md')['default'] README: typeof import('./components/README.md')['default']
RouterLink: typeof import('vue-router')['RouterLink'] RouterLink: typeof import('vue-router')['RouterLink']
+1
View File
@@ -2,6 +2,7 @@
Components in this dir will be auto-registered and on-demand, powered by [`unplugin-vue-components`](https://github.com/antfu/unplugin-vue-components). Components in this dir will be auto-registered and on-demand, powered by [`unplugin-vue-components`](https://github.com/antfu/unplugin-vue-components).
### Icons ### Icons
You can use icons from almost any icon sets by the power of [Iconify](https://iconify.design/). You can use icons from almost any icon sets by the power of [Iconify](https://iconify.design/).
+9 -13
View File
@@ -1,36 +1,32 @@
<script setup lang="ts"> <script setup lang="ts">
import { availableLocales, loadLanguageAsync } from '~/modules/i18n' const { t, availableLocales, locale } = useI18n()
const { t, locale } = useI18n() const toggleLocales = () => {
async function toggleLocales() {
// change to some real logic // change to some real logic
const locales = availableLocales const locales = availableLocales
const newLocale = locales[(locales.indexOf(locale.value) + 1) % locales.length] locale.value = locales[(locales.indexOf(locale.value) + 1) % locales.length]
await loadLanguageAsync(newLocale)
locale.value = newLocale
} }
</script> </script>
<template> <template>
<nav flex="~ gap-4" mt-6 justify-center text-xl> <nav text-xl mt-6>
<RouterLink icon-btn to="/" :title="t('button.home')"> <RouterLink class="icon-btn mx-2" to="/" :title="t('button.home')">
<div i-carbon-campsite /> <div i-carbon-campsite />
</RouterLink> </RouterLink>
<button icon-btn :title="t('button.toggle_dark')" @click="toggleDark()"> <button class="icon-btn mx-2 !outline-none" :title="t('button.toggle_dark')" @click="toggleDark()">
<div i="carbon-sun dark:carbon-moon" /> <div i="carbon-sun dark:carbon-moon" />
</button> </button>
<a icon-btn :title="t('button.toggle_langs')" @click="toggleLocales()"> <a class="icon-btn mx-2" :title="t('button.toggle_langs')" @click="toggleLocales()">
<div i-carbon-language /> <div i-carbon-language />
</a> </a>
<RouterLink icon-btn to="/about" :title="t('button.about')" data-test-id="about"> <RouterLink class="icon-btn mx-2" to="/about" :title="t('button.about')">
<div i-carbon-dicom-overlay /> <div i-carbon-dicom-overlay />
</RouterLink> </RouterLink>
<a icon-btn rel="noreferrer" href="https://github.com/antfu/vitesse" target="_blank" title="GitHub"> <a class="icon-btn mx-2" rel="noreferrer" href="https://github.com/antfu/vitesse" target="_blank" title="GitHub">
<div i-carbon-logo-github /> <div i-carbon-logo-github />
</a> </a>
</nav> </nav>
+2 -2
View File
@@ -1,5 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
const { modelValue } = defineModels<{ const { modelValue } = defineModel<{
modelValue: string modelValue: string
}>() }>()
</script> </script>
@@ -8,8 +8,8 @@ const { modelValue } = defineModels<{
<input <input
id="input" id="input"
v-model="modelValue" v-model="modelValue"
v-bind="$attrs"
type="text" type="text"
v-bind="$attrs"
p="x-4 y-2" p="x-4 y-2"
w="250px" w="250px"
text="center" text="center"
-3
View File
@@ -1,9 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
const router = useRouter() const router = useRouter()
const { t } = useI18n() const { t } = useI18n()
useHead({
title: () => t('not-found'),
})
</script> </script>
<template> <template>
+2 -2
View File
@@ -4,9 +4,9 @@ Vue components in this dir are used as layouts.
By default, `default.vue` will be used unless an alternative is specified in the route meta. By default, `default.vue` will be used unless an alternative is specified in the route meta.
With [`unplugin-vue-router`](https://github.com/posva/unplugin-vue-router) and [`vite-plugin-vue-layouts`](https://github.com/JohnCampionJr/vite-plugin-vue-layouts), you can specify the layout in the page's SFCs like this: With [`vite-plugin-pages`](https://github.com/hannoeru/vite-plugin-pages) and [`vite-plugin-vue-layouts`](https://github.com/JohnCampionJr/vite-plugin-vue-layouts), you can specify the layout in the page's SFCs like this:
```vue ```html
<route lang="yaml"> <route lang="yaml">
meta: meta:
layout: home layout: home
+2 -5
View File
@@ -1,11 +1,8 @@
<template> <template>
<main <main class="px-4 py-10 text-center text-gray-700 dark:text-gray-200">
px-4 py-10
text="center gray-700 dark:gray-200"
>
<RouterView /> <RouterView />
<TheFooter /> <TheFooter />
<div mx-auto mt-5 text-center text-sm opacity-50> <div class="mt-5 mx-auto text-center opacity-75 dark:opacity-50 text-sm">
[Default Layout] [Default Layout]
</div> </div>
</main> </main>
+2 -5
View File
@@ -1,11 +1,8 @@
<template> <template>
<main <main class="px-4 py-10 text-center text-gray-700 dark:text-gray-200">
px-4 py-10
text="center gray-700 dark:gray-200"
>
<RouterView /> <RouterView />
<TheFooter /> <TheFooter />
<div mx-auto mt-5 text-center text-sm opacity-50> <div class="mt-5 mx-auto text-center opacity-75 dark:opacity-50 text-sm">
[Home Layout] [Home Layout]
</div> </div>
</main> </main>
+8 -9
View File
@@ -1,25 +1,24 @@
import type { UserModule } from './types'
import { setupLayouts } from 'virtual:generated-layouts'
import { ViteSSG } from 'vite-ssg' import { ViteSSG } from 'vite-ssg'
import { routes } from 'vue-router/auto-routes' import { setupLayouts } from 'virtual:generated-layouts'
import Previewer from 'virtual:vue-component-preview'
import App from './App.vue' import App from './App.vue'
import type { UserModule } from './types'
import generatedRoutes from '~pages'
import '@unocss/reset/tailwind.css' import '@unocss/reset/tailwind.css'
import './styles/main.css' import './styles/main.css'
import 'uno.css' import 'uno.css'
const routes = setupLayouts(generatedRoutes)
// https://github.com/antfu/vite-ssg // https://github.com/antfu/vite-ssg
export const createApp = ViteSSG( export const createApp = ViteSSG(
App, App,
{ { routes, base: import.meta.env.BASE_URL },
routes: setupLayouts([...routes]),
base: import.meta.env.BASE_URL,
},
(ctx) => { (ctx) => {
// install all modules under `modules/` // install all modules under `modules/`
Object.values(import.meta.glob<{ install: UserModule }>('./modules/*.ts', { eager: true })) Object.values(import.meta.glob<{ install: UserModule }>('./modules/*.ts', { eager: true }))
.forEach(i => i.install?.(ctx)) .forEach(i => i.install?.(ctx))
// ctx.app.use(Previewer) ctx.app.use(Previewer)
}, },
) )
+1 -1
View File
@@ -3,7 +3,7 @@
A custom user module system. Place a `.ts` file with the following template, it will be installed automatically. A custom user module system. Place a `.ts` file with the following template, it will be installed automatically.
```ts ```ts
import type { UserModule } from '~/types' import { type UserModule } from '~/types'
export const install: UserModule = ({ app, router, isClient }) => { export const install: UserModule = ({ app, router, isClient }) => {
// do something // do something
+15 -40
View File
@@ -1,50 +1,25 @@
import type { Locale } from 'vue-i18n'
import type { UserModule } from '~/types'
import { createI18n } from 'vue-i18n' import { createI18n } from 'vue-i18n'
import { type UserModule } from '~/types'
// Import i18n resources // Import i18n resources
// https://vitejs.dev/guide/features.html#glob-import // https://vitejs.dev/guide/features.html#glob-import
// //
// Don't need this? Try vitesse-lite: https://github.com/antfu/vitesse-lite // Don't need this? Try vitesse-lite: https://github.com/antfu/vitesse-lite
const i18n = createI18n({ const messages = Object.fromEntries(
legacy: false, Object.entries(
locale: '', import.meta.glob<{ default: any }>('../../locales/*.y(a)?ml', { eager: true }))
messages: {}, .map(([key, value]) => {
}) const yaml = key.endsWith('.yaml')
return [key.slice(14, yaml ? -5 : -4), value.default]
const localesMap = Object.fromEntries( }),
Object.entries(import.meta.glob('../../locales/*.yml')) )
.map(([path, loadLocale]) => [path.match(/([\w-]*)\.yml$/)?.[1], loadLocale]),
) as Record<Locale, () => Promise<{ default: Record<string, string> }>>
export const availableLocales = Object.keys(localesMap)
const loadedLanguages: string[] = []
function setI18nLanguage(lang: Locale) {
i18n.global.locale.value = lang as any
if (typeof document !== 'undefined')
document.querySelector('html')?.setAttribute('lang', lang)
return lang
}
export async function loadLanguageAsync(lang: string): Promise<Locale> {
// If the same language
if (i18n.global.locale.value === lang)
return setI18nLanguage(lang)
// If the language was already loaded
if (loadedLanguages.includes(lang))
return setI18nLanguage(lang)
// If the language hasn't been loaded yet
const messages = await localesMap[lang]()
i18n.global.setLocaleMessage(lang, messages.default)
loadedLanguages.push(lang)
return setI18nLanguage(lang)
}
export const install: UserModule = ({ app }) => { export const install: UserModule = ({ app }) => {
const i18n = createI18n({
legacy: false,
locale: 'en',
messages,
})
app.use(i18n) app.use(i18n)
loadLanguageAsync('en')
} }
+1 -1
View File
@@ -1,5 +1,5 @@
import type { UserModule } from '~/types'
import NProgress from 'nprogress' import NProgress from 'nprogress'
import { type UserModule } from '~/types'
export const install: UserModule = ({ isClient, router }) => { export const install: UserModule = ({ isClient, router }) => {
if (isClient) { if (isClient) {
+1 -1
View File
@@ -1,5 +1,5 @@
import type { UserModule } from '~/types'
import { createPinia } from 'pinia' import { createPinia } from 'pinia'
import { type UserModule } from '~/types'
// Setup Pinia // Setup Pinia
// https://pinia.vuejs.org/ // https://pinia.vuejs.org/
+1 -1
View File
@@ -1,4 +1,4 @@
import type { UserModule } from '~/types' import { type UserModule } from '~/types'
// https://github.com/antfu/vite-plugin-pwa#automatic-reload-when-new-content-available // https://github.com/antfu/vite-plugin-pwa#automatic-reload-when-new-content-available
export const install: UserModule = ({ isClient, router }) => { export const install: UserModule = ({ isClient, router }) => {
+1 -1
View File
@@ -1,7 +1,7 @@
## File-based Routing ## File-based Routing
Routes will be auto-generated for Vue files in this dir with the same file structure. Routes will be auto-generated for Vue files in this dir with the same file structure.
Check out [`unplugin-vue-router`](https://github.com/posva/unplugin-vue-router) for more details. Check out [`vite-plugin-pages`](https://github.com/hannoeru/vite-plugin-pages) for more details.
### Path Aliasing ### Path Aliasing
+1 -6
View File
@@ -2,15 +2,10 @@
title: About title: About
--- ---
<script setup>
const { t } = useI18n()
useHead({ title: () => t('button.about') })
</script>
<div class="text-center"> <div class="text-center">
<!-- You can use Vue components inside markdown --> <!-- You can use Vue components inside markdown -->
<div i-carbon-dicom-overlay class="text-4xl -mb-6 m-auto" /> <div i-carbon-dicom-overlay class="text-4xl -mb-6 m-auto" />
<h3>{{ t('button.about') }}</h3> <h3>About</h3>
</div> </div>
[Vitesse](https://github.com/antfu/vitesse) is an opinionated [Vite](https://github.com/vitejs/vite) starter template made by [@antfu](https://github.com/antfu) for mocking apps swiftly. With **file-based routing**, **components auto importing**, **markdown support**, I18n, PWA and uses **UnoCSS** for styling and icons. [Vitesse](https://github.com/antfu/vitesse) is an opinionated [Vite](https://github.com/vitejs/vite) starter template made by [@antfu](https://github.com/antfu) for mocking apps swiftly. With **file-based routing**, **components auto importing**, **markdown support**, I18n, PWA and uses **UnoCSS** for styling and icons.
+6 -9
View File
@@ -1,14 +1,11 @@
<script setup lang="ts"> <script setup lang="ts">
const props = defineProps<{ name: string }>()
const router = useRouter() const router = useRouter()
const route = useRoute('/hi/[name]')
const user = useUserStore() const user = useUserStore()
const { t } = useI18n() const { t } = useI18n()
watchEffect(() => { watchEffect(() => {
user.setNewName(route.params.name) user.setNewName(props.name)
})
useHead({
title: () => t('intro.hi', { name: user.savedName }),
}) })
</script> </script>
@@ -18,7 +15,7 @@ useHead({
<div i-carbon-pedestrian inline-block /> <div i-carbon-pedestrian inline-block />
</div> </div>
<p> <p>
{{ t('intro.hi', { name: user.savedName }) }} {{ t('intro.hi', { name: props.name }) }}
</p> </p>
<p text-sm opacity-75> <p text-sm opacity-75>
@@ -26,7 +23,7 @@ useHead({
</p> </p>
<template v-if="user.otherNames.length"> <template v-if="user.otherNames.length">
<div mt-4 text-sm> <p text-sm mt-4>
<span opacity-75>{{ t('intro.aka') }}:</span> <span opacity-75>{{ t('intro.aka') }}:</span>
<ul> <ul>
<li v-for="otherName in user.otherNames" :key="otherName"> <li v-for="otherName in user.otherNames" :key="otherName">
@@ -35,12 +32,12 @@ useHead({
</RouterLink> </RouterLink>
</li> </li>
</ul> </ul>
</div> </p>
</template> </template>
<div> <div>
<button <button
m="3 t6" btn text-sm btn m="3 t6" text-sm
@click="router.back()" @click="router.back()"
> >
{{ t('button.back') }} {{ t('button.back') }}
+6 -9
View File
@@ -3,18 +3,15 @@ defineOptions({
name: 'IndexPage', name: 'IndexPage',
}) })
const user = useUserStore() const user = useUserStore()
const name = ref(user.savedName) const name = $ref(user.savedName)
const router = useRouter() const router = useRouter()
function go() { const go = () => {
if (name.value) if (name)
router.push(`/hi/${encodeURIComponent(name.value)}`) router.push(`/hi/${encodeURIComponent(name)}`)
} }
const { t } = useI18n() const { t } = useI18n()
useHead({
title: () => t('button.home'),
})
</script> </script>
<template> <template>
@@ -35,7 +32,7 @@ useHead({
<TheInput <TheInput
v-model="name" v-model="name"
:placeholder="t('intro.whats-your-name')" placeholder="What's your name?"
autocomplete="false" autocomplete="false"
@keydown.enter="go" @keydown.enter="go"
/> />
@@ -43,7 +40,7 @@ useHead({
<div> <div>
<button <button
m-3 btn text-sm btn m-3 text-sm
:disabled="!name" :disabled="!name"
@click="go" @click="go"
> >
-121
View File
@@ -1,121 +0,0 @@
/* eslint-disable */
/* prettier-ignore */
// oxfmt-ignore
// @ts-nocheck
// noinspection ES6UnusedImports
// Generated by vue-router. !! DO NOT MODIFY THIS FILE !!
// It's recommended to commit this file.
// Make sure to add this file to your tsconfig.json file as an "includes" or "files" entry.
import type {
RouteRecordInfo,
ParamValue,
ParamValueOneOrMore,
ParamValueZeroOrMore,
ParamValueZeroOrOne,
} from 'vue-router'
declare module 'vue-router' {
interface TypesConfig {
ParamParsers: never
}
}
declare module 'vue-router/auto-routes' {
/**
* Route name map generated by vue-router
*/
export interface RouteNamedMap {
'/': RouteRecordInfo<
'/',
'/',
Record<never, never>,
Record<never, never>,
| never
>,
'/[...all]': RouteRecordInfo<
'/[...all]',
'/:all(.*)',
{ all: ParamValue<true> },
{ all: ParamValue<false> },
| never
>,
'/about': RouteRecordInfo<
'/about',
'/about',
Record<never, never>,
Record<never, never>,
| never
>,
'/hi/[name]': RouteRecordInfo<
'/hi/[name]',
'/hi/:name',
{ name: ParamValue<true> },
{ name: ParamValue<false> },
| never
>,
'/README': RouteRecordInfo<
'/README',
'/README',
Record<never, never>,
Record<never, never>,
| never
>,
}
/**
* Route file to route info map by vue-router.
* Used by the \`sfc-typed-router\` Volar plugin to automatically type \`useRoute()\`.
*
* Each key is a file path relative to the project root with 2 properties:
* - routes: union of route names of the possible routes when in this page (passed to useRoute<...>())
* - views: names of nested views (can be passed to <RouterView name="...">)
*
* @internal
*/
export interface _RouteFileInfoMap {
'src/pages/index.vue': {
routes:
| '/'
views:
| never
}
'src/pages/[...all].vue': {
routes:
| '/[...all]'
views:
| never
}
'src/pages/about.md': {
routes:
| '/about'
views:
| never
}
'src/pages/hi/[name].vue': {
routes:
| '/hi/[name]'
views:
| never
}
'src/pages/README.md': {
routes:
| '/README'
views:
| never
}
}
/**
* Get a union of possible route names in a certain route component file.
* Used by the \`sfc-typed-router\` Volar plugin to automatically type \`useRoute()\`.
*
* @internal
*/
export type _RouteNamesForFilePath<FilePath extends string> =
_RouteFileInfoMap extends Record<FilePath, infer Info>
? Info['routes']
: keyof RouteNamedMap
}
export {}
+5 -7
View File
@@ -2,17 +2,15 @@ declare interface Window {
// extend the window // extend the window
} }
// with unplugin-vue-markdown, markdown files can be treated as Vue components // with vite-plugin-vue-markdown, markdown files can be treated as Vue components
declare module '*.md' { declare module '*.md' {
import type { DefineComponent } from 'vue' import { type DefineComponent } from 'vue'
const component: DefineComponent<{}, {}, any>
const component: DefineComponent<object, object, any>
export default component export default component
} }
declare module '*.vue' { declare module '*.vue' {
import type { DefineComponent } from 'vue' import { type DefineComponent } from 'vue'
const component: DefineComponent<{}, {}, any>
const component: DefineComponent<object, object, any>
export default component export default component
} }
+1 -1
View File
@@ -31,4 +31,4 @@ export const useUserStore = defineStore('user', () => {
}) })
if (import.meta.hot) if (import.meta.hot)
import.meta.hot.accept(acceptHMRUpdate(useUserStore as any, import.meta.hot)) import.meta.hot.accept(acceptHMRUpdate(useUserStore, import.meta.hot))
+1 -1
View File
@@ -18,7 +18,7 @@ html.dark {
} }
#nprogress .bar { #nprogress .bar {
background: rgb(13, 148, 136); background: rgb(13,148,136);
opacity: 0.75; opacity: 0.75;
position: fixed; position: fixed;
z-index: 1031; z-index: 1031;
+11 -8
View File
@@ -12,14 +12,17 @@
width: 100%; width: 100%;
} }
.shiki, .shiki-light {
.shiki span { background: #f8f8f8 !important;
color: var(--shiki-light); }
background: var(--shiki-light-bg); .shiki-dark {
background: #0e0e0e !important;
} }
html.dark .shiki, html.dark .shiki-light {
html.dark .shiki span { display: none;
color: var(--shiki-dark); }
background: var(--shiki-dark-bg);
html:not(.dark) .shiki-dark {
display: none;
} }
+1 -1
View File
@@ -1,3 +1,3 @@
import type { ViteSSGContext } from 'vite-ssg' import { type ViteSSGContext } from 'vite-ssg'
export type UserModule = (ctx: ViteSSGContext) => void export type UserModule = (ctx: ViteSSGContext) => void
+2 -2
View File
@@ -1,3 +1,3 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html // Vitest Snapshot v1
exports[`component TheCounter.vue > should render 1`] = `"<div>10 <button class="inc"> + </button><button class="dec"> - </button></div>"`; exports[`TheCounter.vue > should render 1`] = `"<div>10 <button class=\\"inc\\"> + </button><button class=\\"dec\\"> - </button></div>"`;
+1 -1
View File
@@ -2,7 +2,7 @@ import { mount } from '@vue/test-utils'
import { describe, expect, it } from 'vitest' import { describe, expect, it } from 'vitest'
import TheCounter from '../src/components/TheCounter.vue' import TheCounter from '../src/components/TheCounter.vue'
describe('component TheCounter.vue', () => { describe('TheCounter.vue', () => {
it('should render', () => { it('should render', () => {
const wrapper = mount(TheCounter, { props: { initial: 10 } }) const wrapper = mount(TheCounter, { props: { initial: 10 } })
expect(wrapper.text()).toContain('10') expect(wrapper.text()).toContain('10')
+18 -17
View File
@@ -1,35 +1,36 @@
{ {
"compilerOptions": { "compilerOptions": {
"target": "ESNext",
"jsx": "preserve",
"lib": ["DOM", "ESNext"],
"baseUrl": ".", "baseUrl": ".",
"module": "ESNext", "module": "ESNext",
"moduleResolution": "Bundler", "target": "ESNext",
"paths": { "lib": ["DOM", "ESNext"],
"~/*": ["src/*"] "strict": true,
}, "esModuleInterop": true,
"jsx": "preserve",
"skipLibCheck": true,
"moduleResolution": "node",
"resolveJsonModule": true, "resolveJsonModule": true,
"noUnusedLocals": true,
"strictNullChecks": true,
"allowJs": true,
"forceConsistentCasingInFileNames": true,
"types": [ "types": [
"vitest", "vitest",
"vite/client", "vite/client",
"vue/ref-macros",
"vite-plugin-pages/client",
"vite-plugin-vue-component-preview/client",
"vite-plugin-vue-layouts/client", "vite-plugin-vue-layouts/client",
"vite-plugin-pwa/client", "vite-plugin-pwa/client",
"unplugin-vue-macros/macros-global" "unplugin-vue-macros/macros-global"
], ],
"allowJs": true, "paths": {
"strict": true, "~/*": ["src/*"]
"strictNullChecks": true, }
"noUnusedLocals": true,
"noEmit": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"isolatedModules": true,
"skipLibCheck": true
}, },
"vueCompilerOptions": { "vueCompilerOptions": {
"plugins": [ "plugins": [
"@vue-macros/volar/define-models", "@vue-macros/volar/define-model",
"@vue-macros/volar/define-slots" "@vue-macros/volar/define-slots"
] ]
}, },
+2 -5
View File
@@ -1,6 +1,3 @@
import {
createLocalFontProcessor,
} from '@unocss/preset-web-fonts/local'
import { import {
defineConfig, defineConfig,
presetAttributify, presetAttributify,
@@ -14,7 +11,7 @@ import {
export default defineConfig({ export default defineConfig({
shortcuts: [ shortcuts: [
['btn', 'px-4 py-1 rounded inline-block bg-teal-700 text-white cursor-pointer !outline-none hover:bg-teal-800 disabled:cursor-default disabled:bg-gray-600 disabled:opacity-50'], ['btn', 'px-4 py-1 rounded inline-block bg-teal-700 text-white cursor-pointer hover:bg-teal-800 disabled:cursor-default disabled:bg-gray-600 disabled:opacity-50'],
['icon-btn', 'inline-block cursor-pointer select-none opacity-75 transition duration-200 ease-in-out hover:opacity-100 hover:text-teal-600'], ['icon-btn', 'inline-block cursor-pointer select-none opacity-75 transition duration-200 ease-in-out hover:opacity-100 hover:text-teal-600'],
], ],
presets: [ presets: [
@@ -22,6 +19,7 @@ export default defineConfig({
presetAttributify(), presetAttributify(),
presetIcons({ presetIcons({
scale: 1.2, scale: 1.2,
warn: true,
}), }),
presetTypography(), presetTypography(),
presetWebFonts({ presetWebFonts({
@@ -30,7 +28,6 @@ export default defineConfig({
serif: 'DM Serif Display', serif: 'DM Serif Display',
mono: 'DM Mono', mono: 'DM Mono',
}, },
processors: createLocalFontProcessor(),
}), }),
], ],
transformers: [ transformers: [
+46 -45
View File
@@ -1,22 +1,21 @@
import path from 'node:path' import path from 'path'
import VueI18n from '@intlify/unplugin-vue-i18n/vite' import { defineConfig } from 'vite'
import Shiki from '@shikijs/markdown-it' import Preview from 'vite-plugin-vue-component-preview'
import { unheadVueComposablesImports } from '@unhead/vue'
import Vue from '@vitejs/plugin-vue' import Vue from '@vitejs/plugin-vue'
import Pages from 'vite-plugin-pages'
import generateSitemap from 'vite-ssg-sitemap'
import Layouts from 'vite-plugin-vue-layouts'
import Components from 'unplugin-vue-components/vite'
import AutoImport from 'unplugin-auto-import/vite'
import Markdown from 'vite-plugin-vue-markdown'
import { VitePWA } from 'vite-plugin-pwa'
import VueI18n from '@intlify/unplugin-vue-i18n/vite'
import Inspect from 'vite-plugin-inspect'
import Inspector from 'vite-plugin-vue-inspector'
import LinkAttributes from 'markdown-it-link-attributes' import LinkAttributes from 'markdown-it-link-attributes'
import Unocss from 'unocss/vite' import Unocss from 'unocss/vite'
import AutoImport from 'unplugin-auto-import/vite' import Shiki from 'markdown-it-shiki'
import Components from 'unplugin-vue-components/vite'
import VueMacros from 'unplugin-vue-macros/vite' import VueMacros from 'unplugin-vue-macros/vite'
import Markdown from 'unplugin-vue-markdown/vite'
import { defineConfig } from 'vite'
import { VitePWA } from 'vite-plugin-pwa'
import VueDevTools from 'vite-plugin-vue-devtools'
import Layouts from 'vite-plugin-vue-layouts'
import generateSitemap from 'vite-ssg-sitemap'
import { VueRouterAutoImports } from 'vue-router/unplugin'
import VueRouter from 'vue-router/vite'
import 'vitest/config'
export default defineConfig({ export default defineConfig({
resolve: { resolve: {
@@ -26,36 +25,34 @@ export default defineConfig({
}, },
plugins: [ plugins: [
// https://github.com/vuejs/router Preview(),
VueRouter({
extensions: ['.vue', '.md'],
dts: 'src/route-map.d.ts',
}),
VueMacros({ VueMacros({
plugins: { plugins: {
vue: Vue({ vue: Vue({
include: [/\.vue$/, /\.md$/], include: [/\.vue$/, /\.md$/],
reactivityTransform: true,
}), }),
}, },
}), }),
// https://github.com/hannoeru/vite-plugin-pages
Pages({
extensions: ['vue', 'md'],
}),
// https://github.com/JohnCampionJr/vite-plugin-vue-layouts // https://github.com/JohnCampionJr/vite-plugin-vue-layouts
Layouts(), Layouts(),
// https://github.com/antfu/unplugin-auto-import // https://github.com/antfu/unplugin-auto-import
AutoImport({ AutoImport({
include: [/\.[jt]sx?$/, /\.vue$/, /\.vue\?vue/, /\.md$/],
imports: [ imports: [
'vue', 'vue',
'vue-router',
'vue-i18n', 'vue-i18n',
'vue/macros',
'@vueuse/head',
'@vueuse/core', '@vueuse/core',
unheadVueComposablesImports,
VueRouterAutoImports,
{
// add any other imports you were relying on
'vue-router/auto': ['useLink'],
},
], ],
dts: 'src/auto-imports.d.ts', dts: 'src/auto-imports.d.ts',
dirs: [ dirs: [
@@ -75,15 +72,22 @@ export default defineConfig({
}), }),
// https://github.com/antfu/unocss // https://github.com/antfu/unocss
// see uno.config.ts for config // see unocss.config.ts for config
Unocss(), Unocss(),
// https://github.com/unplugin/unplugin-vue-markdown // https://github.com/antfu/vite-plugin-vue-markdown
// Don't need this? Try vitesse-lite: https://github.com/antfu/vitesse-lite // Don't need this? Try vitesse-lite: https://github.com/antfu/vitesse-lite
Markdown({ Markdown({
wrapperClasses: 'prose prose-sm m-auto text-left', wrapperClasses: 'prose prose-sm m-auto text-left',
headEnabled: true, headEnabled: true,
async markdownItSetup(md) { markdownItSetup(md) {
// https://prismjs.com/
md.use(Shiki, {
theme: {
light: 'vitesse-light',
dark: 'vitesse-dark',
},
})
md.use(LinkAttributes, { md.use(LinkAttributes, {
matcher: (link: string) => /^https?:\/\//.test(link), matcher: (link: string) => /^https?:\/\//.test(link),
attrs: { attrs: {
@@ -91,13 +95,6 @@ export default defineConfig({
rel: 'noopener', rel: 'noopener',
}, },
}) })
md.use(await Shiki({
defaultColor: false,
themes: {
light: 'vitesse-light',
dark: 'vitesse-dark',
},
}))
}, },
}), }),
@@ -138,26 +135,30 @@ export default defineConfig({
include: [path.resolve(__dirname, 'locales/**')], include: [path.resolve(__dirname, 'locales/**')],
}), }),
// https://github.com/webfansplz/vite-plugin-vue-devtools // https://github.com/antfu/vite-plugin-inspect
VueDevTools(), // Visit http://localhost:3333/__inspect/ to see the inspector
Inspect(),
// https://github.com/webfansplz/vite-plugin-vue-inspector
Inspector({
toggleButtonVisibility: 'never',
}),
], ],
// https://github.com/vitest-dev/vitest // https://github.com/vitest-dev/vitest
test: { test: {
include: ['test/**/*.test.ts'], include: ['test/**/*.test.ts'],
environment: 'jsdom', environment: 'jsdom',
deps: {
inline: ['@vue', '@vueuse', 'vue-demi'],
},
}, },
// https://github.com/antfu/vite-ssg // https://github.com/antfu/vite-ssg
ssgOptions: { ssgOptions: {
script: 'async', script: 'async',
formatting: 'minify', formatting: 'minify',
beastiesOptions: { onFinished() { generateSitemap() },
reduceInlineStyles: false,
},
onFinished() {
generateSitemap()
},
}, },
ssr: { ssr: {