From a86dc1ef353458de1f1319ff0dd8d61beae241cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20S=C3=A1nchez=20Jim=C3=A9nez?= Date: Tue, 7 Jun 2022 23:49:52 +0200 Subject: [PATCH 01/45] docs: new theme --- docs/.vitepress/components.d.ts | 52 +++ docs/.vitepress/config.ts | 46 +- docs/.vitepress/theme/components/PwaHero.vue | 10 + docs/.vitepress/theme/composables/dark.ts | 6 +- docs/.vitepress/theme/index.ts | 31 +- docs/.vitepress/theme/styles/main.css | 37 ++ docs/.vitepress/theme/styles/vars.css | 91 ++++ docs/index.md | 20 +- docs/package.json | 4 +- docs/public/icon_light.svg | 2 +- docs/vite.config.ts | 14 +- package.json | 2 +- pnpm-lock.yaml | 448 ++++++++++++++++--- 13 files changed, 656 insertions(+), 107 deletions(-) create mode 100644 docs/.vitepress/components.d.ts create mode 100644 docs/.vitepress/theme/components/PwaHero.vue create mode 100644 docs/.vitepress/theme/styles/main.css diff --git a/docs/.vitepress/components.d.ts b/docs/.vitepress/components.d.ts new file mode 100644 index 00000000..674b5004 --- /dev/null +++ b/docs/.vitepress/components.d.ts @@ -0,0 +1,52 @@ +// generated by unplugin-vue-components +// We suggest you to commit this file into source control +// Read more: https://github.com/vuejs/vue-next/pull/3399 +import '@vue/runtime-core' + +declare module '@vue/runtime-core' { + export interface GlobalComponents { + ArrowLeft: typeof import('./theme/components/icons/ArrowLeft.vue')['default'] + ArrowRight: typeof import('./theme/components/icons/ArrowRight.vue')['default'] + CleanupOutdatedCaches: typeof import('./theme/components/CleanupOutdatedCaches.md')['default'] + DarkModeSwitch: typeof import('./theme/components/DarkModeSwitch.vue')['default'] + EditLink: typeof import('./theme/components/EditLink.vue')['default'] + ExamplesBehaviors: typeof import('./theme/components/ExamplesBehaviors.md')['default'] + ExamplesGenerateSW: typeof import('./theme/components/ExamplesGenerateSW.md')['default'] + ExamplesInjectManifest: typeof import('./theme/components/ExamplesInjectManifest.md')['default'] + GenerateSWCleanupOutdatedCaches: typeof import('./theme/components/GenerateSWCleanupOutdatedCaches.md')['default'] + GenerateSWSourceMap: typeof import('./theme/components/GenerateSWSourceMap.md')['default'] + HeuristicWorkboxWindow: typeof import('./theme/components/HeuristicWorkboxWindow.md')['default'] + Home: typeof import('./theme/components/Home.vue')['default'] + HomeFeatures: typeof import('./theme/components/HomeFeatures.vue')['default'] + HomeFooter: typeof import('./theme/components/HomeFooter.vue')['default'] + HomeHero: typeof import('./theme/components/HomeHero.vue')['default'] + InjectManifestCleanupOutdatedCaches: typeof import('./theme/components/InjectManifestCleanupOutdatedCaches.md')['default'] + InjectManifestSourceMap: typeof import('./theme/components/InjectManifestSourceMap.md')['default'] + MdListAnchor: typeof import('./theme/components/MdListAnchor.vue')['default'] + NavBar: typeof import('./theme/components/NavBar.vue')['default'] + NavBarTitle: typeof import('./theme/components/NavBarTitle.vue')['default'] + NavDropdownLink: typeof import('./theme/components/NavDropdownLink.vue')['default'] + NavDropdownLinkItem: typeof import('./theme/components/NavDropdownLinkItem.vue')['default'] + NavLink: typeof import('./theme/components/NavLink.vue')['default'] + NavLinks: typeof import('./theme/components/NavLinks.vue')['default'] + NextAndPrevLinks: typeof import('./theme/components/NextAndPrevLinks.vue')['default'] + Note: typeof import('./theme/components/Note.vue')['default'] + OutboundLink: typeof import('./theme/components/icons/OutboundLink.vue')['default'] + Page: typeof import('./theme/components/Page.vue')['default'] + PageFooter: typeof import('./theme/components/PageFooter.vue')['default'] + PluginVersion: typeof import('./theme/components/PluginVersion.vue')['default'] + PromptForUpdateImg: typeof import('./theme/components/PromptForUpdateImg.vue')['default'] + PwaHero: typeof import('./theme/components/PwaHero.vue')['default'] + PwaLogo: typeof import('./theme/components/PwaLogo.vue')['default'] + ReloadPrompt: typeof import('./theme/components/ReloadPrompt.vue')['default'] + RouterLink: typeof import('vue-router')['RouterLink'] + RouterView: typeof import('vue-router')['RouterView'] + RunExamples: typeof import('./theme/components/RunExamples.md')['default'] + SideBar: typeof import('./theme/components/SideBar.vue')['default'] + SideBarLinks: typeof import('./theme/components/SideBarLinks.vue')['default'] + SsrSsg: typeof import('./theme/components/SsrSsg.md')['default'] + ToggleSideBarButton: typeof import('./theme/components/ToggleSideBarButton.vue')['default'] + } +} + +export {} diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index 2afb937c..a95adb7f 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -1,4 +1,4 @@ -import type { UserConfig } from 'vitepress' +import { defineConfig } from 'vitepress' const Guide = [ { @@ -158,45 +158,45 @@ const Workbox = [ const slidebars = [ { text: 'Guide', - children: Guide.map((e) => { + items: Guide.map((e) => { (e as any).useLinkText = `${e.text} | Guide` return e }), }, { text: 'Frameworks', - children: Frameworks.map((e) => { + items: Frameworks.map((e) => { (e as any).useLinkText = `${e.text} | Frameworks` return e }), }, { text: 'Examples', - children: Examples.map((e) => { + items: Examples.map((e) => { (e as any).useLinkText = `${e.text} | Examples` return e }), }, { text: 'Deployment', - children: Deployment.map((e) => { + items: Deployment.map((e) => { (e as any).useLinkText = `${e.text} | Deployment` return e }), }, { text: 'Workbox', - children: Workbox.map((e) => { + items: Workbox.map((e) => { (e as any).useLinkText = `${e.text} | Workbox` return e }), }, ] -const config: UserConfig = { +export default defineConfig({ + lang: 'en-US', title: 'Vite Plugin PWA', description: 'Zero-config PWA Framework-agnostic Plugin for Vite', - lang: 'en-US', head: [ ['meta', { name: 'theme-color', content: '#ffffff' }], ['link', { rel: 'icon', href: '/favicon.svg', type: 'image/svg+xml' }], @@ -210,13 +210,21 @@ const config: UserConfig = { ['meta', { name: 'twitter:creator', content: '@antfu7' }], ['link', { rel: 'apple-touch-icon', href: '/apple-touch-icon.png', sizes: '180x180' }], ], + lastUpdated: true, + markdown: { + theme: { + light: 'vitesse-light', + dark: 'vitesse-dark', + }, + }, themeConfig: { logo: '/favicon.svg', - repo: 'antfu/vite-plugin-pwa', - docsDir: 'docs', - editLinks: true, - editLinkText: 'Edit this page', - lastUpdated: 'Last Updated', + editLink: { + repo: 'antfu/vite-plugin-pwa', + branch: 'main', + dir: 'docs', + text: 'Suggest changes to this page', + }, /* algolia: { apiKey: 'todo@antfu: replace this', @@ -227,6 +235,14 @@ const config: UserConfig = { } }, */ + socialLinks: [ + { icon: 'discord', link: 'https://discord.com/channels/937808017016119440/937973377883336704' }, + { icon: 'github', link: 'https://github.com/antfu/vite-plugin-pwa' }, + ], + footer: { + message: 'Released under the MIT License.', + copyright: 'Copyright © 2021-PRESENT Anthony Fu', + }, nav: [ { text: 'Guide', @@ -258,6 +274,4 @@ const config: UserConfig = { '/': slidebars, }, }, -} - -export default config +}) diff --git a/docs/.vitepress/theme/components/PwaHero.vue b/docs/.vitepress/theme/components/PwaHero.vue new file mode 100644 index 00000000..2e966419 --- /dev/null +++ b/docs/.vitepress/theme/components/PwaHero.vue @@ -0,0 +1,10 @@ + diff --git a/docs/.vitepress/theme/composables/dark.ts b/docs/.vitepress/theme/composables/dark.ts index 5976a5a6..d8499c08 100644 --- a/docs/.vitepress/theme/composables/dark.ts +++ b/docs/.vitepress/theme/composables/dark.ts @@ -1,3 +1,7 @@ import { useDark } from '@vueuse/core' -export const isDark = useDark() +export const isDark = useDark({ + storage: localStorage, + attribute: 'vitepress-theme-appearance', + listenToStorageChanges: true, +}) diff --git a/docs/.vitepress/theme/index.ts b/docs/.vitepress/theme/index.ts index 550a0504..dd2fe3a0 100644 --- a/docs/.vitepress/theme/index.ts +++ b/docs/.vitepress/theme/index.ts @@ -1,18 +1,15 @@ -import 'vue-global-api' - -import Layout from './Layout.vue' -import NotFound from './NotFound.vue' - +// import { h } from 'vue' +import Theme from 'vitepress/theme' +import './styles/main.css' import './styles/vars.css' -import './styles/layout.css' -import './styles/code.css' -import './styles/sidebar-links.css' - -import 'virtual:windi.css' - -const theme = { - Layout, - NotFound, -} - -export default theme +import 'uno.css' +// import PwaHero from './components/PwaHero.vue' + +export default Theme/* { + ...Theme, + Layout() { + return h(Theme.Layout, null, { + 'home-hero-before': () => h(PwaHero), + }) + }, +} */ diff --git a/docs/.vitepress/theme/styles/main.css b/docs/.vitepress/theme/styles/main.css new file mode 100644 index 00000000..6c86a057 --- /dev/null +++ b/docs/.vitepress/theme/styles/main.css @@ -0,0 +1,37 @@ +.dark [img-light] { + display: none; +} + +html:not(.dark) [img-dark] { + display: none; +} + +/* Overrides */ + +.VPSocialLink { + transform: scale(0.9); +} + +.vp-doc th, .vp-doc td { + padding: 6px 10px; + border: 1px solid #8882; +} + +/* h3 breaks SEO => replaced with h2 with the same size */ +.home-content h2 { + margin-top: 2rem; + font-size: 1.35rem; + border-bottom: none; + margin-bottom: 0; +} + +img.resizable-img { + width: unset; + height: unset; +} + +.dark .prompt-img { + filter: invert(86%); +} + + diff --git a/docs/.vitepress/theme/styles/vars.css b/docs/.vitepress/theme/styles/vars.css index 01de04cd..90c4524b 100644 --- a/docs/.vitepress/theme/styles/vars.css +++ b/docs/.vitepress/theme/styles/vars.css @@ -1,3 +1,94 @@ +/** + * Colors + * -------------------------------------------------------------------------- */ + +:root { + --vp-c-accent: #2c7f95; + --vp-c-brand: #2c7f95; + --vp-c-brand-light: #2e859c; + --vp-c-brand-lighter: #3392ac; + --vp-c-brand-dark: #00586e; + --vp-c-brand-darker: #00586e; + --vp-c-text-code: #5d6f5d; + --vp-code-block-bg: rgba(125,125,125,0.04); + --vp-custom-block-tip-text: rgb(18, 181, 157); + --vp-custom-block-tip-border: rgba(18, 181, 157, 0.5); + --vp-custom-block-tip-bg: rgba(18, 181, 157, 0.1); +} + +.dark { + --vp-c-accent: #4AA6C0; + --vp-c-brand: #4AA6C0; + --vp-c-brand-light: #52b1cc; + --vp-c-brand-lighter: #52b1cc; + --vp-c-brand-dark: #52b1cc; + --vp-c-brand-darker: #52b1cc; + --vp-code-block-bg: rgba(0,0,0,0.2); + --vp-c-text-code: #c0cec0; +} + +/** + * Component: Button + * -------------------------------------------------------------------------- */ + +:root { + --vp-button-brand-border: var(--vp-c-brand-light); + --vp-button-brand-text: var(--vp-c-text-dark-1); + --vp-button-brand-bg: var(--vp-c-brand); + --vp-button-brand-hover-border: var(--vp-c-brand-light); + --vp-button-brand-hover-text: var(--vp-c-text-dark-1); + --vp-button-brand-hover-bg: var(--vp-c-brand-light); + --vp-button-brand-active-border: var(--vp-c-brand-light); + --vp-button-brand-active-text: var(--vp-c-text-dark-1); + --vp-button-brand-active-bg: var(--vp-button-brand-bg); +} + +/** + * Component: Home + * -------------------------------------------------------------------------- */ + +:root { + --vp-home-hero-name-color: transparent; + --vp-home-hero-name-background: -webkit-linear-gradient( + 120deg, + #00586e 30%, + #52b1cc + ); + --vp-home-hero-image-background-image: linear-gradient( + -45deg, + #00586e60 30%, + #52b1cc60 + ); + --vp-home-hero-image-filter: blur(30px); +} + +@media (min-width: 640px) { + :root { + --vp-home-hero-image-filter: blur(56px); + } +} + +@media (min-width: 960px) { + :root { + --vp-home-hero-image-filter: blur(72px); + } +} + + +/** + * Component: Algolia + * -------------------------------------------------------------------------- */ + +.DocSearch { + --docsearch-primary-color: var(--vp-c-brand) !important; +} + + + + + + + /** Base Styles */ :root { diff --git a/docs/index.md b/docs/index.md index 18b62f29..bca9d45b 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,8 +1,21 @@ --- -home: true +layout: home +sidebar: false -actionText: Get Started -actionLink: /guide/ +hero: + name: Vite Plugin PWA + text: '' + tagline: Zero-config PWA Framework-agnostic Plugin for Vite + image: + src: /icon_light.svg + alt: Vite Plugin PWA + actions: + - theme: brand + text: Get Started + link: /guide/ + - theme: alt + text: View on GitHub + link: https://github.com/vite-plugin-pwa features: - title: 👌 Zero-Config @@ -22,5 +35,4 @@ features: - title: 🐞 Development Support details: Debug your custom service worker logic as you develop your application -footer: MIT Licensed | Copyright © 2021-PRESENT Anthony Fu --- diff --git a/docs/package.json b/docs/package.json index 1263c100..8ea2dcc4 100644 --- a/docs/package.json +++ b/docs/package.json @@ -25,11 +25,13 @@ "https-localhost": "^4.7.1", "prism-theme-vars": "^0.2.3", "typescript": "^4.6.4", + "unocss": "^0.38.1", "unplugin-icons": "^0.14.3", "unplugin-vue-components": "^0.19.5", "vite": "^2.9.9", "vite-plugin-pwa": "workspace:*", "vite-plugin-windicss": "^1.8.4", - "vitepress": "^0.22.4" + "vitepress": "^1.0.0-alpha.1", + "workbox-window": "^6.5.3" } } diff --git a/docs/public/icon_light.svg b/docs/public/icon_light.svg index 6f06c886..2ae1e7c4 100644 --- a/docs/public/icon_light.svg +++ b/docs/public/icon_light.svg @@ -1,4 +1,4 @@ - + diff --git a/docs/vite.config.ts b/docs/vite.config.ts index d9e5fbec..c7fd1763 100644 --- a/docs/vite.config.ts +++ b/docs/vite.config.ts @@ -1,9 +1,10 @@ import { defineConfig } from 'vite' import Components from 'unplugin-vue-components/vite' -import WindiCSS from 'vite-plugin-windicss' -import Icons from 'unplugin-icons/vite' +// import WindiCSS from 'vite-plugin-windicss' +// import Icons from 'unplugin-icons/vite' import IconsResolver from 'unplugin-icons/resolver' import replace from '@rollup/plugin-replace' +import Unocss from 'unocss/vite' import { VitePWA } from '../dist' import { version } from '../package.json' @@ -41,7 +42,7 @@ export default defineConfig({ include: [/\.vue$/, /\.vue\?vue/, /\.md$/], // generate `components.d.ts` for ts support with Volar - dts: false, + dts: '.vitepress/components.d.ts', // auto import icons resolvers: [ // https://github.com/antfu/vite-plugin-icons @@ -52,11 +53,8 @@ export default defineConfig({ ], }), - // https://github.com/antfu/vite-plugin-icons - Icons(), - - // https://github.com/antfu/vite-plugin-windicss - WindiCSS(), + // https://github.com/unocss/unocss + Unocss(), // https://github.com/antfu/vite-plugin-pwa VitePWA({ diff --git a/package.json b/package.json index d9c14bf4..c6925d89 100644 --- a/package.json +++ b/package.json @@ -69,7 +69,7 @@ "@types/workbox-build": "^5.0.1", "@typescript-eslint/eslint-plugin": "^5.27.0", "eslint": "^8.17.0", - "esno": "^0.16.3", + "esno": "^0.14.1", "kolorist": "^1.5.1", "pnpm": "^7.1.8", "preact": "^10.7.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2ab5a199..830be679 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13,7 +13,7 @@ importers: '@typescript-eslint/eslint-plugin': ^5.27.0 debug: ^4.3.4 eslint: ^8.17.0 - esno: ^0.16.3 + esno: ^0.14.1 fast-glob: ^3.2.11 kolorist: ^1.5.1 pnpm: ^7.1.8 @@ -46,7 +46,7 @@ importers: '@types/workbox-build': 5.0.1 '@typescript-eslint/eslint-plugin': 5.27.0_ud6rd4xtew5bv4yhvkvu24pzm4 eslint: 8.17.0 - esno: 0.16.3 + esno: 0.14.1 kolorist: 1.5.1 pnpm: 7.1.8 preact: 10.7.3 @@ -73,14 +73,16 @@ importers: https-localhost: ^4.7.1 prism-theme-vars: ^0.2.3 typescript: ^4.6.4 + unocss: ^0.38.1 unplugin-icons: ^0.14.3 unplugin-vue-components: ^0.19.5 vite: ^2.9.9 vite-plugin-pwa: workspace:* vite-plugin-windicss: ^1.8.4 - vitepress: ^0.22.4 + vitepress: ^1.0.0-alpha.1 vue: ^3.2.35 vue-global-api: ^0.4.1 + workbox-window: ^6.5.3 dependencies: '@vueuse/core': 8.5.0_vue@3.2.35 '@vueuse/shared': 8.5.0_vue@3.2.35 @@ -97,12 +99,14 @@ importers: https-localhost: 4.7.1 prism-theme-vars: 0.2.3 typescript: 4.6.4 + unocss: 0.38.1_vite@2.9.9 unplugin-icons: 0.14.3_vite@2.9.9 unplugin-vue-components: 0.19.5_vite@2.9.9+vue@3.2.35 vite: 2.9.9 vite-plugin-pwa: link:.. vite-plugin-windicss: 1.8.4_vite@2.9.9 - vitepress: 0.22.4 + vitepress: 1.0.0-alpha.1 + workbox-window: 6.5.3 examples/preact-router: specifiers: @@ -2278,7 +2282,7 @@ packages: resolution: {integrity: sha512-5XSK+xbP0hcTIp54MECqxkWLs6kf7Ug4nWdxWNtx8cUpLiFNFnKXDxCb35wnyNpjukmrx7Q9DkO5tFFsmNVxng==} dependencies: '@docsearch/react': 3.1.0 - preact: 10.7.2 + preact: 10.7.3 transitivePeerDependencies: - '@types/react' - react @@ -2297,27 +2301,6 @@ packages: algoliasearch: 4.10.3 dev: true - /@esbuild-kit/cjs-loader/2.0.1: - resolution: {integrity: sha512-KmE8XouKm6m05jPIsf5CTIZZ4171GHd+PUts1mtti2tzoiD228qCRjpkCwg540c3fMUweKupO+PIpkJ9+Z7vPg==} - dependencies: - '@esbuild-kit/core-utils': 1.2.1 - get-tsconfig: 3.0.1 - dev: true - - /@esbuild-kit/core-utils/1.2.1: - resolution: {integrity: sha512-zNtrwZ/754OMs6joIQIxsdOA3rjhde7Vt/IzkgNnCcQrwUDG5iHmlv9vhlHzyg+BZ6Cp519lrkMKlTCEW00Kpw==} - dependencies: - esbuild: 0.14.38 - dev: true - - /@esbuild-kit/esm-loader/2.1.4: - resolution: {integrity: sha512-acfzciUGugu1TV1QHJOAOe6F5miEjQLDYMWhoD4mVPFmwHA8Iwp5UCJidyruj67qp2ybu+Zc++7+th9VnYaZMA==} - dependencies: - '@esbuild-kit/core-utils': 1.2.1 - es-module-lexer: 0.10.5 - get-tsconfig: 3.0.1 - dev: true - /@eslint/eslintrc/1.3.0: resolution: {integrity: sha512-UWW0TMTmk2d7hLcWD1/e2g5HDM/HQ3csaLSqXCfqwh4uNDuNqlaKWXmEsL4Cs41Z0KnILNvwbHAah3C2yt06kw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -2415,6 +2398,10 @@ packages: '@nodelib/fs.scandir': 2.1.5 fastq: 1.11.0 + /@polka/url/1.0.0-next.21: + resolution: {integrity: sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g==} + dev: true + /@preact/preset-vite/2.2.0_preact@10.7.2+vite@2.9.9: resolution: {integrity: sha512-xOtPzyVSPphUF/tRnzjxkCR/ovbCS6O25ekdCw5MGKcaAkb6PDRo50tS1x2n0+O9qL7Z/qrHJKpyCVn29A4iMg==} peerDependencies: @@ -3100,6 +3087,140 @@ packages: eslint-visitor-keys: 3.3.0 dev: true + /@unocss/cli/0.38.1: + resolution: {integrity: sha512-R4PcnzXK+mb9FJSsLIQ5oiAin5NliZta9bVSu5K8xQ4A3L17zPY8e8V8XV778rxkmKWu2BA9dFXmoywqev/elw==} + engines: {node: '>=14'} + hasBin: true + dependencies: + '@unocss/config': 0.38.1 + '@unocss/core': 0.38.1 + '@unocss/preset-uno': 0.38.1 + cac: 6.7.12 + chokidar: 3.5.3 + colorette: 2.0.17 + consola: 2.15.3 + fast-glob: 3.2.11 + pathe: 0.3.0 + perfect-debounce: 0.1.3 + dev: true + + /@unocss/config/0.38.1: + resolution: {integrity: sha512-+9OPsc7WjuZKF9HV7F1PF4sQq3h0vu+Plc3ehpPZVZdQCWcstZ4edOA4LZtLvQM+h75cuLYRdC0fSR+r1NtnqQ==} + engines: {node: '>=14'} + dependencies: + '@unocss/core': 0.38.1 + unconfig: 0.3.4 + dev: true + + /@unocss/core/0.38.1: + resolution: {integrity: sha512-X9nYsiDn/ePvP8pq6b3UZgT1J+Ai6PqBbY5HKmJrKbV9eqrbRcBA/oajK5mHPUSmbSC8nBhhJJz7sz4o5CUzpA==} + dev: true + + /@unocss/inspector/0.38.1: + resolution: {integrity: sha512-Xgc8nVUGp0oh6J5KJrJEQIrDmrOSsDDkpq3z2HBIdO6CubrLImzvZmKWFhh+K+QEh7MlhVxFoFcco9GJ6WsmTw==} + dependencies: + gzip-size: 6.0.0 + sirv: 2.0.2 + dev: true + + /@unocss/preset-attributify/0.38.1: + resolution: {integrity: sha512-tsnQArFD0mGIESdk0y2v2tm5YHL15VAKYf0BGIVvCyax9nUOXELc2pdpyZg7PglLkIMC7Oh5HLGu/RcC1+NBJw==} + dependencies: + '@unocss/core': 0.38.1 + dev: true + + /@unocss/preset-icons/0.38.1: + resolution: {integrity: sha512-D4Mf17BRqqntkBhHyW3GTvSWmntTIvrEIa5a9UHU1nhwpf5d/7to+bp+eNoPUo2IddnLTFfgx+B+PsWL39VKiA==} + dependencies: + '@iconify/utils': 1.0.32 + '@unocss/core': 0.38.1 + ohmyfetch: 0.4.18 + transitivePeerDependencies: + - supports-color + dev: true + + /@unocss/preset-mini/0.38.1: + resolution: {integrity: sha512-5NEoX1I84SqRZcxbSK6qnsHxxdEKFV1M+5pnodphhztO0zBAWCDHeq+IP4QYH1OXbWd9dOzH7C1eKOsNm/MHxg==} + dependencies: + '@unocss/core': 0.38.1 + dev: true + + /@unocss/preset-tagify/0.38.1: + resolution: {integrity: sha512-bV+DDWE05/4Aws44I2AIIfeSra9PiOOqOebYD+XtYl8DS1li+jGBkgs2QSxKTCt1FzWJvlAzcTKSqRXEkuhCLw==} + dependencies: + '@unocss/core': 0.38.1 + dev: true + + /@unocss/preset-typography/0.38.1: + resolution: {integrity: sha512-ukAcYc7StT2SffcqibEu8hheIvd16gUdqiZwKuDjc1o3aF8qDOqFHbPQ9G+XapXEaE6OWAMfJit+jK4JQljAOA==} + dependencies: + '@unocss/core': 0.38.1 + dev: true + + /@unocss/preset-uno/0.38.1: + resolution: {integrity: sha512-P3KhGJLpQmiGZl2N8AiqAP9djaD416IhvW08bgwMlYlKKLruicYQC9AM9Obv2N5UwY4I+xUpV4B6aHrMnU8Dww==} + dependencies: + '@unocss/core': 0.38.1 + '@unocss/preset-mini': 0.38.1 + '@unocss/preset-wind': 0.38.1 + dev: true + + /@unocss/preset-web-fonts/0.38.1: + resolution: {integrity: sha512-Q+2w7stTKIbaHsEMZJqLdhuIGFmsWOCLeaAWnuySQN04EIoe1jIWSmOJFDIcA3mijtdT8EaCi+b8hyGe46RXiA==} + dependencies: + '@unocss/core': 0.38.1 + ohmyfetch: 0.4.18 + dev: true + + /@unocss/preset-wind/0.38.1: + resolution: {integrity: sha512-vCZuj6RalDGNKiIjUdtJNfkLql4dxqkRUW9Eeu2xpQuzRwGdg3u1AV8RApIuq4RmIkar4ZJp35JPSYb7JcE7jw==} + dependencies: + '@unocss/core': 0.38.1 + '@unocss/preset-mini': 0.38.1 + dev: true + + /@unocss/reset/0.38.1: + resolution: {integrity: sha512-nMdOEuDZkWmaarwFqORJVtWW5BEbpart2jXcq7er1lkIn5mKsgimOTwnvooysX86OqrqRl4HWKhf7xhZS1MG2A==} + dev: true + + /@unocss/scope/0.38.1: + resolution: {integrity: sha512-svuMmUDAKnn3Oa+v23FUim9bmZXrKTB15FLGcEEs87Xnt1gkFAQb4yiLHjqnAOGbVeEVGt34n0/eNC/zzlVyBg==} + dev: true + + /@unocss/transformer-compile-class/0.38.1: + resolution: {integrity: sha512-BvcDE2sEXLKMgcss3iPcgv0V5x0tRjuPEs0GLti1EIKQum8qYWgZXdwOoGr5NLuKI7k+LmDjKwETb1V/JYUTgg==} + dependencies: + '@unocss/core': 0.38.1 + dev: true + + /@unocss/transformer-directives/0.38.1: + resolution: {integrity: sha512-qK1xLRgM3VrmT+uteC+AFvZzhac0cdVrxK+pBN43oj6ZfMYhtbfJn0Gwpj71mYwZhL1/lJqPud9AAUPm+NR6yQ==} + dependencies: + '@unocss/core': 0.38.1 + css-tree: 2.1.0 + dev: true + + /@unocss/transformer-variant-group/0.38.1: + resolution: {integrity: sha512-d9TfCEqkpAHlF7GIJRrvdrL6hVEm8mIDr14+u+O0fM+qHLqQQfVNB0+7NpdB0va6Nj0WfaVEQacX7rlp6JeqpA==} + dependencies: + '@unocss/core': 0.38.1 + dev: true + + /@unocss/vite/0.38.1_vite@2.9.9: + resolution: {integrity: sha512-f4WNUJiorQYf/ZYlNnp96CN9FeXBuX6f0mNlMAbnwyiiUWroQDMx8fHOnFSrqljKIBY3jJWW1cZ9Izp1IEh8Rg==} + peerDependencies: + vite: ^2.9.0 + dependencies: + '@rollup/pluginutils': 4.2.1 + '@unocss/config': 0.38.1 + '@unocss/core': 0.38.1 + '@unocss/inspector': 0.38.1 + '@unocss/scope': 0.38.1 + '@unocss/transformer-directives': 0.38.1 + magic-string: 0.26.2 + vite: 2.9.9 + dev: true + /@vitejs/plugin-react-refresh/1.3.6: resolution: {integrity: sha512-iNR/UqhUOmFFxiezt0em9CgmiJBdWR+5jGxB2FihaoJfqGt76kiwaKoVOJVU5NYcDWMdN06LbyN2VIGIoYdsEA==} engines: {node: '>=12.0.0'} @@ -3124,6 +3245,17 @@ packages: vue: 3.2.35 dev: true + /@vitejs/plugin-vue/2.3.3_vite@2.9.9+vue@3.2.36: + resolution: {integrity: sha512-SmQLDyhz+6lGJhPELsBdzXGc+AcaT8stgkbiTFGpXPe8Tl1tJaBw1A6pxDqDuRsVkD8uscrkx3hA7QDOoKYtyw==} + engines: {node: '>=12.0.0'} + peerDependencies: + vite: ^2.5.10 + vue: ^3.2.25 + dependencies: + vite: 2.9.9 + vue: 3.2.36 + dev: true + /@vue/compiler-core/3.2.35: resolution: {integrity: sha512-1Mtmh8ceVUoUsn/PME5oM+Dus648rCeV/fBaZ4ERLFbTHBJXj6QmDPrSn9mfEyPDXE0RYIwyJNn884NdWK+Yiw==} dependencies: @@ -3300,6 +3432,23 @@ packages: vue: 3.2.35 vue-demi: 0.12.5_vue@3.2.35 + /@vueuse/core/8.5.0_vue@3.2.36: + resolution: {integrity: sha512-VEJ6sGNsPlUp0o9BGda2YISvDZbhWJSOJu5zlp2TufRGVrLcYUKr31jyFEOj6RXzG3k/H4aCYeZyjpItfU8glw==} + peerDependencies: + '@vue/composition-api': ^1.1.0 + vue: ^2.6.0 || ^3.2.0 + peerDependenciesMeta: + '@vue/composition-api': + optional: true + vue: + optional: true + dependencies: + '@vueuse/metadata': 8.5.0 + '@vueuse/shared': 8.5.0_vue@3.2.36 + vue: 3.2.36 + vue-demi: 0.12.5_vue@3.2.36 + dev: true + /@vueuse/metadata/8.5.0: resolution: {integrity: sha512-WxsD+Cd+bn+HcjpY6Dl9FJ8ywTRTT9pTwk3bCQpzEhXVYAyNczKDSahk50fCfIJKeWHhyI4B2+/ZEOxQAkUr0g==} @@ -3317,6 +3466,21 @@ packages: vue: 3.2.35 vue-demi: 0.12.5_vue@3.2.35 + /@vueuse/shared/8.5.0_vue@3.2.36: + resolution: {integrity: sha512-qKG+SZb44VvGD4dU5cQ63z4JE2Yk39hQUecR0a9sEdJA01cx+XrxAvFKJfPooxwoiqalAVw/ktWK6xbyc/jS3g==} + peerDependencies: + '@vue/composition-api': ^1.1.0 + vue: ^2.6.0 || ^3.2.0 + peerDependenciesMeta: + '@vue/composition-api': + optional: true + vue: + optional: true + dependencies: + vue: 3.2.36 + vue-demi: 0.12.5_vue@3.2.36 + dev: true + /@windicss/config/1.8.4: resolution: {integrity: sha512-i4fFGFfZoRess6WMkauykHC3PFd9xKYVx7lSuLfMK7sgo6x3+l4dY42GbsWMHyLqH1sTMfyt1LgfXSIKYJozSA==} dependencies: @@ -3623,6 +3787,10 @@ packages: - supports-color dev: true + /body-scroll-lock/4.0.0-beta.0: + resolution: {integrity: sha512-a7tP5+0Mw3YlUJcGAKUqIBkYYGlYxk2fnCasq/FUph1hadxlTRjF+gAcZksxANnaMnALjxEddmSi/H3OR8ugcQ==} + dev: true + /boolbase/1.0.0: resolution: {integrity: sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==} dev: true @@ -3822,6 +3990,10 @@ packages: resolution: {integrity: sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w==} dev: true + /colorette/2.0.17: + resolution: {integrity: sha512-hJo+3Bkn0NCHybn9Tu35fIeoOKGOk5OCC32y4Hz2It+qlCO2Q3DeQ1hRn/tDDMQKRYUEzqsl7jbF6dYKjlE60g==} + dev: true + /combined-stream/1.0.8: resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} engines: {node: '>= 0.8'} @@ -3879,6 +4051,10 @@ packages: dotenv: 8.6.0 dev: true + /consola/2.15.3: + resolution: {integrity: sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw==} + dev: true + /content-disposition/0.5.3: resolution: {integrity: sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==} engines: {node: '>= 0.6'} @@ -3957,6 +4133,14 @@ packages: engines: {node: '>=8'} dev: false + /css-tree/2.1.0: + resolution: {integrity: sha512-PcysZRzToBbrpoUrZ9qfblRIRf8zbEAkU0AIpQFtgkFK0vSbzOmBCvdSAx2Zg7Xx5wiYJKUKk0NMP7kxevie/A==} + engines: {node: ^10 || ^12.20.0 || ^14.13.0 || >=15.0.0, npm: '>=7.0.0'} + dependencies: + mdn-data: 2.0.27 + source-map-js: 1.0.2 + dev: true + /cssesc/3.0.0: resolution: {integrity: sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==} engines: {node: '>=4'} @@ -4065,6 +4249,10 @@ packages: has-property-descriptors: 1.0.0 object-keys: 1.1.1 + /defu/6.0.0: + resolution: {integrity: sha512-t2MZGLf1V2rV4VBZbWIaXKdX/mUcYW0n2znQZoADBkGGxYL8EWqCuCZBmJPJ/Yy9fofJkyuuSuo5GSwo0XdEgw==} + dev: true + /delayed-stream/1.0.0: resolution: {integrity: sha1-3zrhmayt+31ECqrgsp4icrJOxhk=} engines: {node: '>=0.4.0'} @@ -4075,6 +4263,10 @@ packages: engines: {node: '>= 0.6'} dev: true + /destr/1.1.1: + resolution: {integrity: sha512-QqkneF8LrYmwATMdnuD2MLI3GHQIcBnG6qFC2q9bSH430VTCDAVjcspPmUaKhPGtAtPAftIUFqY1obQYQuwmbg==} + dev: true + /destroy/1.0.4: resolution: {integrity: sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=} dev: true @@ -4148,6 +4340,10 @@ packages: engines: {node: '>=10'} dev: true + /duplexer/0.1.2: + resolution: {integrity: sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==} + dev: true + /ee-first/1.1.1: resolution: {integrity: sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=} dev: true @@ -4241,10 +4437,6 @@ packages: string.prototype.trimstart: 1.0.5 unbox-primitive: 1.0.2 - /es-module-lexer/0.10.5: - resolution: {integrity: sha512-+7IwY/kiGAacQfY+YBhKMvEmyAJnw5grTUgjG85Pe7vcUI/6b7pZjZG8nQ7+48YhzEAEqrEgD2dCz/JIK+AYvw==} - dev: true - /es-shim-unscopables/1.0.0: resolution: {integrity: sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==} dependencies: @@ -4533,6 +4725,12 @@ packages: dev: true optional: true + /esbuild-node-loader/0.6.5: + resolution: {integrity: sha512-uPP+dllWm38cFvDysdocutN3lfe5pTIbddAHp1ENyLzpHYqE2r+3Wo+pfg9X3p8DFWwzIisft5YkeBIthIcixw==} + dependencies: + esbuild: 0.14.38 + dev: true + /esbuild-openbsd-64/0.14.36: resolution: {integrity: sha512-NvGB2Chf8GxuleXRGk8e9zD3aSdRO5kLt9coTQbCg7WMGXeX471sBgh4kSg8pjx0yTXRt0MlrUDnjVYnetyivg==} engines: {node: '>=12'} @@ -4557,6 +4755,14 @@ packages: esbuild: '>=0.12 <1' dev: true + /esbuild-register/3.3.2_esbuild@0.14.38: + resolution: {integrity: sha512-jceAtTO6zxPmCfSD5cBb3rgIK1vmuqCKYwgylHiS1BF4pq0jJiJb4K2QMuqF4BEw7XDBRatYzip0upyTzfkgsQ==} + peerDependencies: + esbuild: '>=0.12 <1' + dependencies: + esbuild: 0.14.38 + dev: true + /esbuild-sunos-64/0.14.36: resolution: {integrity: sha512-VkUZS5ftTSjhRjuRLp+v78auMO3PZBXu6xl4ajomGenEm2/rGuWlhFSjB7YbBNErOchj51Jb2OK8lKAo8qdmsQ==} engines: {node: '>=12'} @@ -5113,11 +5319,15 @@ packages: engines: {node: '>=6'} dev: true - /esno/0.16.3: - resolution: {integrity: sha512-6slSBEV1lMKcX13DBifvnDFpNno5WXhw4j/ff7RI0y51BZiDqEe5dNhhjhIQ3iCOQuzsm2MbVzmwqbN78BBhPg==} + /esno/0.14.1: + resolution: {integrity: sha512-yDFYw6dGUjCT1qKsdG7WOc/RzIh/qwxUEVZ+ohCltaxBxEFMNqeqbQL9xjRl6Yvdwrfc5OCjUA9JbFmuu/8BKg==} hasBin: true dependencies: - tsx: 3.4.2 + cross-spawn: 7.0.3 + esbuild: 0.14.38 + esbuild-node-loader: 0.6.5 + esbuild-register: 3.3.2_esbuild@0.14.38 + import-meta-resolve: 1.1.1 dev: true /espree/9.3.2: @@ -5418,10 +5628,6 @@ packages: call-bind: 1.0.2 get-intrinsic: 1.1.1 - /get-tsconfig/3.0.1: - resolution: {integrity: sha512-+m30eQjbcf3xMNdnacXH5IDAKUMbI7Mhbf3e1BHif1FzBlUhBzBlmOVc7kL4+kB035l8OCyBdI3dNXZ3of9HqA==} - dev: true - /glob-parent/5.1.2: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} engines: {node: '>= 6'} @@ -5490,6 +5696,13 @@ packages: /graceful-fs/4.2.8: resolution: {integrity: sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==} + /gzip-size/6.0.0: + resolution: {integrity: sha512-ax7ZYomf6jqPTQ4+XCpUGyXKHk5WweS+e05MBO4/y3WJ5RkmPXNKvX+bx1behVILVwr6JSQvZAku021CHPXG3Q==} + engines: {node: '>=10'} + dependencies: + duplexer: 0.1.2 + dev: true + /handle-thing/2.0.1: resolution: {integrity: sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg==} dev: true @@ -5673,6 +5886,12 @@ packages: resolve-from: 5.0.0 dev: true + /import-meta-resolve/1.1.1: + resolution: {integrity: sha512-JiTuIvVyPaUg11eTrNDx5bgQ/yMKMZffc7YSjvQeSMXy58DO2SQ8BtAf3xteZvmzvjYh14wnqNjL8XVeDy2o9A==} + dependencies: + builtins: 4.0.0 + dev: true + /imurmurhash/0.1.4: resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} engines: {node: '>=0.8.19'} @@ -6010,6 +6229,10 @@ packages: semver: 7.3.7 dev: true + /jsonc-parser/3.0.0: + resolution: {integrity: sha512-fQzRfAbIBnR0IQvftw9FJveWiHp72Fg20giDrHz6TdfB12UH/uue0D3hm57UB5KgAVuniLMCaS8P1IMj9NR7cA==} + dev: true + /jsonfile/6.1.0: resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} dependencies: @@ -6170,6 +6393,10 @@ packages: resolution: {integrity: sha512-AW4DRS3QbBayY/jJmD8437V1Gombjf8RSOUCMFBuo5iHi58AGEgVCKQ+ezHkZZDpAQS75hcBMpLqjpJTjtUL7w==} dev: true + /mdn-data/2.0.27: + resolution: {integrity: sha512-kwqO0I0jtWr25KcfLm9pia8vLZ8qoAKhWZuZMbneJq3jjBD3gl5nZs8l8Tu3ZBlBAHVQtDur9rdDGyvtfVraHQ==} + dev: true + /media-typer/0.3.0: resolution: {integrity: sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=} engines: {node: '>= 0.6'} @@ -6292,6 +6519,11 @@ packages: engines: {node: '>=4'} dev: true + /mrmime/1.0.0: + resolution: {integrity: sha512-a70zx7zFfVO7XpnQ2IX1Myh9yY4UYvfld/dikWRnsXxbyvMcfz+u6UfgNAtH+k2QqtJuzVpv6eLTx1G2+WKZbQ==} + engines: {node: '>=10'} + dev: true + /ms/2.0.0: resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==} dev: true @@ -6329,6 +6561,10 @@ packages: engines: {node: '>= 0.6'} dev: true + /node-fetch-native/0.1.3: + resolution: {integrity: sha512-Jf1IQZdovUIv9E+5avmN6Sf+bND+rnMlODnBQhdE2VRyuWP9WgqZb/KEgPekh19DAN1X2C4vbS1VCOaz2OH19g==} + dev: true + /node-fetch/2.6.1: resolution: {integrity: sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==} engines: {node: 4.x || >=6.0.0} @@ -6445,6 +6681,15 @@ packages: resolution: {integrity: sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==} dev: true + /ohmyfetch/0.4.18: + resolution: {integrity: sha512-MslzNrQzBLtZHmiZBI8QMOcMpdNFlK61OJ34nFNFynZ4v+4BonfCQ7VIN4EGXvGGq5zhDzgdJoY3o9S1l2T7KQ==} + dependencies: + destr: 1.1.1 + node-fetch-native: 0.1.3 + ufo: 0.8.4 + undici: 5.4.0 + dev: true + /on-finished/2.3.0: resolution: {integrity: sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=} engines: {node: '>= 0.8'} @@ -6617,6 +6862,14 @@ packages: resolution: {integrity: sha512-sTitTPYnn23esFR3RlqYBWn4c45WGeLcsKzQiUpXJAyfcWkolvlYpV8FLo7JishK946oQwMFUCHXQ9AjGPKExw==} dev: true + /pathe/0.3.0: + resolution: {integrity: sha512-3vUjp552BJzCw9vqKsO5sttHkbYqqsZtH0x1PNtItgqx8BXEXzoY1SYRKcL6BTyVh4lGJGLj0tM42elUDMvcYA==} + dev: true + + /perfect-debounce/0.1.3: + resolution: {integrity: sha512-NOT9AcKiDGpnV/HBhI22Str++XWcErO/bALvHCuhv33owZW/CjH8KAFLZDCmu3727sihe0wTxpDhyGc6M8qacQ==} + dev: true + /picocolors/1.0.0: resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} @@ -6710,10 +6963,6 @@ packages: resolution: {integrity: sha512-lpRg8GWfxu38m4rZwjrvOxeHlmL4tERhe9sTjrC47HMu6uCEch3bLUQVNlISoEq9Z24g5Xm+B7AKdyiKSevktg==} dev: true - /prismjs/1.25.0: - resolution: {integrity: sha512-WCjJHl1KEWbnkQom1+SzftbtXMKQoezOCYs5rECqMN+jP+apI7ftoflyqigqzopSO3hMhTEb0mFClA8lkolgEg==} - dev: true - /process-nextick-args/2.0.1: resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==} dev: true @@ -7156,6 +7405,14 @@ packages: engines: {node: '>=8'} dev: true + /shiki/0.10.1: + resolution: {integrity: sha512-VsY7QJVzU51j5o1+DguUd+6vmCmZ5v/6gYu4vyYAhzjuNQU6P/vmSy4uQaOhvje031qQMiW0d2BwgMH52vqMng==} + dependencies: + jsonc-parser: 3.0.0 + vscode-oniguruma: 1.6.2 + vscode-textmate: 5.2.0 + dev: true + /side-channel/1.0.4: resolution: {integrity: sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==} dependencies: @@ -7167,6 +7424,15 @@ packages: resolution: {integrity: sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==} dev: true + /sirv/2.0.2: + resolution: {integrity: sha512-4Qog6aE29nIjAOKe/wowFTxOdmbEZKb+3tsLljaBRzJwtqto0BChD2zzH0LhgCSXiI+V7X+Y45v14wBZQ1TK3w==} + engines: {node: '>= 10'} + dependencies: + '@polka/url': 1.0.0-next.21 + mrmime: 1.0.0 + totalist: 3.0.0 + dev: true + /sisteransi/1.0.5: resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} dev: true @@ -7593,6 +7859,11 @@ packages: engines: {node: '>=0.6'} dev: true + /totalist/3.0.0: + resolution: {integrity: sha512-eM+pCBxXO/njtF7vdFsHuqb+ElbxqtI4r5EAvk6grfAFyJ6IvWlSkfZ5T9ozC6xWw3Fj1fGoSmrl0gUs46JVIw==} + engines: {node: '>=6'} + dev: true + /tough-cookie/4.0.0: resolution: {integrity: sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==} engines: {node: '>=6'} @@ -7699,17 +7970,6 @@ packages: typescript: 4.7.3 dev: true - /tsx/3.4.2: - resolution: {integrity: sha512-Rd1gm2noOUiVynF+VFxo4bVBNbzS6haWKWtlQ0bEfCLLEqm+GG3R98D3Rqk6foQ3NnJk6JAWOx1ragwcAPj4Lg==} - hasBin: true - dependencies: - '@esbuild-kit/cjs-loader': 2.0.1 - '@esbuild-kit/core-utils': 1.2.1 - '@esbuild-kit/esm-loader': 2.1.4 - optionalDependencies: - fsevents: 2.3.2 - dev: true - /type-check/0.3.2: resolution: {integrity: sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=} engines: {node: '>= 0.8.0'} @@ -7764,6 +8024,10 @@ packages: hasBin: true dev: true + /ufo/0.8.4: + resolution: {integrity: sha512-/+BmBDe8GvlB2nIflWasLLAInjYG0bC9HRnfEpNi4sw77J2AJNnEVnTDReVrehoh825+Q/evF3THXTAweyam2g==} + dev: true + /uglify-js/3.15.4: resolution: {integrity: sha512-vMOPGDuvXecPs34V74qDKk4iJ/SN4vL3Ow/23ixafENYvtrNvtbcgUeugTcUGRGsOF/5fU8/NYSL5Hyb3l1OJA==} engines: {node: '>=0.8.0'} @@ -7787,6 +8051,19 @@ packages: has-symbols: 1.0.3 which-boxed-primitive: 1.0.2 + /unconfig/0.3.4: + resolution: {integrity: sha512-cf39F1brwQuLSuMLTYXOdWJH0O1CJee6a4QW1nYtO7SoBUfVvQCvEel6ssTNXtPfi17kop1ADmVtmC49NlFkIQ==} + dependencies: + '@antfu/utils': 0.5.1 + defu: 6.0.0 + jiti: 1.13.0 + dev: true + + /undici/5.4.0: + resolution: {integrity: sha512-A1SRXysDg7J+mVP46jF+9cKANw0kptqSFZ8tGyL+HBiv0K1spjxPX8Z4EGu+Eu6pjClJUBdnUPlxrOafR668/g==} + engines: {node: '>=12.18'} + dev: true + /unicode-canonical-property-names-ecmascript/1.0.4: resolution: {integrity: sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ==} engines: {node: '>=4'} @@ -7832,6 +8109,35 @@ packages: resolution: {integrity: sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==} engines: {node: '>= 10.0.0'} + /unocss/0.38.1_vite@2.9.9: + resolution: {integrity: sha512-p0GK+cAwjZeRHMBkKtr9hrQyhwDrew8kgf01Kt4+ISp1UMeldLH9b5j/jevpYqP1oQitAP64gX7jD94wOXYSxg==} + engines: {node: '>=14'} + peerDependencies: + '@unocss/webpack': 0.38.1 + peerDependenciesMeta: + '@unocss/webpack': + optional: true + dependencies: + '@unocss/cli': 0.38.1 + '@unocss/core': 0.38.1 + '@unocss/preset-attributify': 0.38.1 + '@unocss/preset-icons': 0.38.1 + '@unocss/preset-mini': 0.38.1 + '@unocss/preset-tagify': 0.38.1 + '@unocss/preset-typography': 0.38.1 + '@unocss/preset-uno': 0.38.1 + '@unocss/preset-web-fonts': 0.38.1 + '@unocss/preset-wind': 0.38.1 + '@unocss/reset': 0.38.1 + '@unocss/transformer-compile-class': 0.38.1 + '@unocss/transformer-directives': 0.38.1 + '@unocss/transformer-variant-group': 0.38.1 + '@unocss/vite': 0.38.1_vite@2.9.9 + transitivePeerDependencies: + - supports-color + - vite + dev: true + /unpipe/1.0.0: resolution: {integrity: sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=} engines: {node: '>= 0.8'} @@ -8044,19 +8350,22 @@ packages: fsevents: 2.3.2 dev: true - /vitepress/0.22.4: - resolution: {integrity: sha512-oZUnLO/SpYdThaBKefDeOiVlr0Rie4Ppx3FzMnMyLtJnI5GlBMNjqYqMy/4+umm/iC+ZDJfI+IlDKxv5fZnYzA==} - engines: {node: '>=14.0.0'} + /vitepress/1.0.0-alpha.1: + resolution: {integrity: sha512-yA0QIl+mB3fQ2j+keQVa0DTT0waP2AeWM/p9VYfUAT9vOkQEGass4/oYmMGPCQrBwCaO3cpOxJL3ZFVooyvybQ==} + engines: {node: '>=14.6.0'} hasBin: true dependencies: '@docsearch/css': 3.1.0 '@docsearch/js': 3.1.0 - '@vitejs/plugin-vue': 2.3.3_vite@2.9.9+vue@3.2.35 - prismjs: 1.25.0 + '@vitejs/plugin-vue': 2.3.3_vite@2.9.9+vue@3.2.36 + '@vueuse/core': 8.5.0_vue@3.2.36 + body-scroll-lock: 4.0.0-beta.0 + shiki: 0.10.1 vite: 2.9.9 - vue: 3.2.35 + vue: 3.2.36 transitivePeerDependencies: - '@types/react' + - '@vue/composition-api' - less - react - react-dom @@ -8064,6 +8373,14 @@ packages: - stylus dev: true + /vscode-oniguruma/1.6.2: + resolution: {integrity: sha512-KH8+KKov5eS/9WhofZR8M8dMHWN2gTxjMsG4jd04YhpbPR91fUj7rYQ2/XjeHCJWbg7X++ApRIU9NUwM2vTvLA==} + dev: true + + /vscode-textmate/5.2.0: + resolution: {integrity: sha512-Uw5ooOQxRASHgu6C7GVvUxisKXfSgW4oFlO+aa+PAkgmH89O3CXxEEzNRNtHSqtXFTl0nAC1uYj0GMSH27uwtQ==} + dev: true + /vue-demi/0.12.5_vue@3.2.35: resolution: {integrity: sha512-BREuTgTYlUr0zw0EZn3hnhC3I6gPWv+Kwh4MCih6QcAeaTlaIX0DwOVN0wHej7hSvDPecz4jygy/idsgKfW58Q==} engines: {node: '>=12'} @@ -8078,6 +8395,21 @@ packages: dependencies: vue: 3.2.35 + /vue-demi/0.12.5_vue@3.2.36: + resolution: {integrity: sha512-BREuTgTYlUr0zw0EZn3hnhC3I6gPWv+Kwh4MCih6QcAeaTlaIX0DwOVN0wHej7hSvDPecz4jygy/idsgKfW58Q==} + engines: {node: '>=12'} + hasBin: true + requiresBuild: true + peerDependencies: + '@vue/composition-api': ^1.0.0-rc.1 + vue: ^3.0.0-0 || ^2.6.0 + peerDependenciesMeta: + '@vue/composition-api': + optional: true + dependencies: + vue: 3.2.36 + dev: true + /vue-demi/0.13.1_vue@3.2.35: resolution: {integrity: sha512-xmkJ56koG3ptpLnpgmIzk9/4nFf4CqduSJbUM0OdPoU87NwRuZ6x49OLhjSa/fC15fV+5CbEnrxU4oyE022svg==} engines: {node: '>=12'} From 97b33c2987311cc5c0d6f7d9fcfdaedaf76a15ba Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Wed, 8 Jun 2022 06:28:05 +0800 Subject: [PATCH 02/45] chore: update --- docs/.vitepress/components.d.ts | 17 - docs/.vitepress/config.ts | 2 +- .../theme/components/DarkModeSwitch.vue | 13 - docs/.vitepress/theme/components/EditLink.vue | 38 --- docs/.vitepress/theme/components/Home.vue | 30 -- .../theme/components/HomeFeatures.vue | 147 --------- .../theme/components/HomeFooter.vue | 44 --- docs/.vitepress/theme/components/HomeHero.vue | 131 -------- .../theme/components/MdListAnchor.vue | 71 ---- docs/.vitepress/theme/components/NavBar.vue | 105 ------ .../theme/components/NavBarTitle.vue | 29 -- .../theme/components/NavDropdownLink.vue | 130 -------- .../theme/components/NavDropdownLinkItem.vue | 74 ----- docs/.vitepress/theme/components/NavLink.vue | 59 ---- docs/.vitepress/theme/components/NavLinks.vue | 45 --- .../theme/components/NextAndPrevLinks.vue | 102 ------ .../theme/components/PageFooter.vue | 36 --- docs/.vitepress/theme/components/SideBar.vue | 53 --- .../theme/components/SideBarLink.ts | 97 ------ .../theme/components/SideBarLinks.vue | 12 - docs/.vitepress/theme/index.ts | 11 +- docs/.vitepress/theme/styles/code.css | 107 ------- docs/.vitepress/theme/styles/layout.css | 302 ------------------ docs/.vitepress/theme/styles/main.css | 31 +- .../.vitepress/theme/styles/sidebar-links.css | 102 ------ docs/.vitepress/theme/styles/vars.css | 206 +++--------- docs/index.md | 12 +- docs/public/icon_gray.svg | 5 + 28 files changed, 70 insertions(+), 1941 deletions(-) delete mode 100644 docs/.vitepress/theme/components/DarkModeSwitch.vue delete mode 100644 docs/.vitepress/theme/components/EditLink.vue delete mode 100644 docs/.vitepress/theme/components/Home.vue delete mode 100644 docs/.vitepress/theme/components/HomeFeatures.vue delete mode 100644 docs/.vitepress/theme/components/HomeFooter.vue delete mode 100644 docs/.vitepress/theme/components/HomeHero.vue delete mode 100644 docs/.vitepress/theme/components/MdListAnchor.vue delete mode 100644 docs/.vitepress/theme/components/NavBar.vue delete mode 100644 docs/.vitepress/theme/components/NavBarTitle.vue delete mode 100644 docs/.vitepress/theme/components/NavDropdownLink.vue delete mode 100644 docs/.vitepress/theme/components/NavDropdownLinkItem.vue delete mode 100644 docs/.vitepress/theme/components/NavLink.vue delete mode 100644 docs/.vitepress/theme/components/NavLinks.vue delete mode 100644 docs/.vitepress/theme/components/NextAndPrevLinks.vue delete mode 100644 docs/.vitepress/theme/components/PageFooter.vue delete mode 100644 docs/.vitepress/theme/components/SideBar.vue delete mode 100644 docs/.vitepress/theme/components/SideBarLink.ts delete mode 100644 docs/.vitepress/theme/components/SideBarLinks.vue delete mode 100644 docs/.vitepress/theme/styles/code.css delete mode 100644 docs/.vitepress/theme/styles/layout.css delete mode 100644 docs/.vitepress/theme/styles/sidebar-links.css create mode 100644 docs/public/icon_gray.svg diff --git a/docs/.vitepress/components.d.ts b/docs/.vitepress/components.d.ts index 674b5004..fdb0d0fc 100644 --- a/docs/.vitepress/components.d.ts +++ b/docs/.vitepress/components.d.ts @@ -8,32 +8,17 @@ declare module '@vue/runtime-core' { ArrowLeft: typeof import('./theme/components/icons/ArrowLeft.vue')['default'] ArrowRight: typeof import('./theme/components/icons/ArrowRight.vue')['default'] CleanupOutdatedCaches: typeof import('./theme/components/CleanupOutdatedCaches.md')['default'] - DarkModeSwitch: typeof import('./theme/components/DarkModeSwitch.vue')['default'] - EditLink: typeof import('./theme/components/EditLink.vue')['default'] ExamplesBehaviors: typeof import('./theme/components/ExamplesBehaviors.md')['default'] ExamplesGenerateSW: typeof import('./theme/components/ExamplesGenerateSW.md')['default'] ExamplesInjectManifest: typeof import('./theme/components/ExamplesInjectManifest.md')['default'] GenerateSWCleanupOutdatedCaches: typeof import('./theme/components/GenerateSWCleanupOutdatedCaches.md')['default'] GenerateSWSourceMap: typeof import('./theme/components/GenerateSWSourceMap.md')['default'] HeuristicWorkboxWindow: typeof import('./theme/components/HeuristicWorkboxWindow.md')['default'] - Home: typeof import('./theme/components/Home.vue')['default'] - HomeFeatures: typeof import('./theme/components/HomeFeatures.vue')['default'] - HomeFooter: typeof import('./theme/components/HomeFooter.vue')['default'] - HomeHero: typeof import('./theme/components/HomeHero.vue')['default'] InjectManifestCleanupOutdatedCaches: typeof import('./theme/components/InjectManifestCleanupOutdatedCaches.md')['default'] InjectManifestSourceMap: typeof import('./theme/components/InjectManifestSourceMap.md')['default'] - MdListAnchor: typeof import('./theme/components/MdListAnchor.vue')['default'] - NavBar: typeof import('./theme/components/NavBar.vue')['default'] - NavBarTitle: typeof import('./theme/components/NavBarTitle.vue')['default'] - NavDropdownLink: typeof import('./theme/components/NavDropdownLink.vue')['default'] - NavDropdownLinkItem: typeof import('./theme/components/NavDropdownLinkItem.vue')['default'] - NavLink: typeof import('./theme/components/NavLink.vue')['default'] - NavLinks: typeof import('./theme/components/NavLinks.vue')['default'] - NextAndPrevLinks: typeof import('./theme/components/NextAndPrevLinks.vue')['default'] Note: typeof import('./theme/components/Note.vue')['default'] OutboundLink: typeof import('./theme/components/icons/OutboundLink.vue')['default'] Page: typeof import('./theme/components/Page.vue')['default'] - PageFooter: typeof import('./theme/components/PageFooter.vue')['default'] PluginVersion: typeof import('./theme/components/PluginVersion.vue')['default'] PromptForUpdateImg: typeof import('./theme/components/PromptForUpdateImg.vue')['default'] PwaHero: typeof import('./theme/components/PwaHero.vue')['default'] @@ -42,8 +27,6 @@ declare module '@vue/runtime-core' { RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] RunExamples: typeof import('./theme/components/RunExamples.md')['default'] - SideBar: typeof import('./theme/components/SideBar.vue')['default'] - SideBarLinks: typeof import('./theme/components/SideBarLinks.vue')['default'] SsrSsg: typeof import('./theme/components/SsrSsg.md')['default'] ToggleSideBarButton: typeof import('./theme/components/ToggleSideBarButton.vue')['default'] } diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index a95adb7f..02aacec8 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -218,7 +218,7 @@ export default defineConfig({ }, }, themeConfig: { - logo: '/favicon.svg', + // logo: '/favicon.svg', editLink: { repo: 'antfu/vite-plugin-pwa', branch: 'main', diff --git a/docs/.vitepress/theme/components/DarkModeSwitch.vue b/docs/.vitepress/theme/components/DarkModeSwitch.vue deleted file mode 100644 index 949a0db4..00000000 --- a/docs/.vitepress/theme/components/DarkModeSwitch.vue +++ /dev/null @@ -1,13 +0,0 @@ - - - diff --git a/docs/.vitepress/theme/components/EditLink.vue b/docs/.vitepress/theme/components/EditLink.vue deleted file mode 100644 index 4c75402f..00000000 --- a/docs/.vitepress/theme/components/EditLink.vue +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - diff --git a/docs/.vitepress/theme/components/Home.vue b/docs/.vitepress/theme/components/Home.vue deleted file mode 100644 index 9eb605f5..00000000 --- a/docs/.vitepress/theme/components/Home.vue +++ /dev/null @@ -1,30 +0,0 @@ - - - diff --git a/docs/.vitepress/theme/components/HomeFeatures.vue b/docs/.vitepress/theme/components/HomeFeatures.vue deleted file mode 100644 index 166868ba..00000000 --- a/docs/.vitepress/theme/components/HomeFeatures.vue +++ /dev/null @@ -1,147 +0,0 @@ - - - - - diff --git a/docs/.vitepress/theme/components/HomeFooter.vue b/docs/.vitepress/theme/components/HomeFooter.vue deleted file mode 100644 index f7678b43..00000000 --- a/docs/.vitepress/theme/components/HomeFooter.vue +++ /dev/null @@ -1,44 +0,0 @@ - - - diff --git a/docs/.vitepress/theme/components/HomeHero.vue b/docs/.vitepress/theme/components/HomeHero.vue deleted file mode 100644 index 228a8ef8..00000000 --- a/docs/.vitepress/theme/components/HomeHero.vue +++ /dev/null @@ -1,131 +0,0 @@ - - - - - diff --git a/docs/.vitepress/theme/components/MdListAnchor.vue b/docs/.vitepress/theme/components/MdListAnchor.vue deleted file mode 100644 index 9fbf3d98..00000000 --- a/docs/.vitepress/theme/components/MdListAnchor.vue +++ /dev/null @@ -1,71 +0,0 @@ - - - - - diff --git a/docs/.vitepress/theme/components/NavBar.vue b/docs/.vitepress/theme/components/NavBar.vue deleted file mode 100644 index 28ea1017..00000000 --- a/docs/.vitepress/theme/components/NavBar.vue +++ /dev/null @@ -1,105 +0,0 @@ - - - - - diff --git a/docs/.vitepress/theme/components/NavBarTitle.vue b/docs/.vitepress/theme/components/NavBarTitle.vue deleted file mode 100644 index 222114b4..00000000 --- a/docs/.vitepress/theme/components/NavBarTitle.vue +++ /dev/null @@ -1,29 +0,0 @@ - - - diff --git a/docs/.vitepress/theme/components/NavDropdownLink.vue b/docs/.vitepress/theme/components/NavDropdownLink.vue deleted file mode 100644 index a4e42766..00000000 --- a/docs/.vitepress/theme/components/NavDropdownLink.vue +++ /dev/null @@ -1,130 +0,0 @@ - - - - - diff --git a/docs/.vitepress/theme/components/NavDropdownLinkItem.vue b/docs/.vitepress/theme/components/NavDropdownLinkItem.vue deleted file mode 100644 index ad398502..00000000 --- a/docs/.vitepress/theme/components/NavDropdownLinkItem.vue +++ /dev/null @@ -1,74 +0,0 @@ - - - - - diff --git a/docs/.vitepress/theme/components/NavLink.vue b/docs/.vitepress/theme/components/NavLink.vue deleted file mode 100644 index e16f81e3..00000000 --- a/docs/.vitepress/theme/components/NavLink.vue +++ /dev/null @@ -1,59 +0,0 @@ - - - - - diff --git a/docs/.vitepress/theme/components/NavLinks.vue b/docs/.vitepress/theme/components/NavLinks.vue deleted file mode 100644 index 50b0cf3e..00000000 --- a/docs/.vitepress/theme/components/NavLinks.vue +++ /dev/null @@ -1,45 +0,0 @@ - - - - - diff --git a/docs/.vitepress/theme/components/NextAndPrevLinks.vue b/docs/.vitepress/theme/components/NextAndPrevLinks.vue deleted file mode 100644 index 89124f5e..00000000 --- a/docs/.vitepress/theme/components/NextAndPrevLinks.vue +++ /dev/null @@ -1,102 +0,0 @@ - - - - - diff --git a/docs/.vitepress/theme/components/PageFooter.vue b/docs/.vitepress/theme/components/PageFooter.vue deleted file mode 100644 index 93f42b31..00000000 --- a/docs/.vitepress/theme/components/PageFooter.vue +++ /dev/null @@ -1,36 +0,0 @@ - - - diff --git a/docs/.vitepress/theme/components/SideBar.vue b/docs/.vitepress/theme/components/SideBar.vue deleted file mode 100644 index 12583d3a..00000000 --- a/docs/.vitepress/theme/components/SideBar.vue +++ /dev/null @@ -1,53 +0,0 @@ - - - - - diff --git a/docs/.vitepress/theme/components/SideBarLink.ts b/docs/.vitepress/theme/components/SideBarLink.ts deleted file mode 100644 index 7d344bd2..00000000 --- a/docs/.vitepress/theme/components/SideBarLink.ts +++ /dev/null @@ -1,97 +0,0 @@ -import type { FunctionalComponent, VNode } from 'vue' -import { h } from 'vue' -import { useData, useRoute } from 'vitepress' -import type { DefaultTheme } from '../config' -import { isActive, joinUrl } from '../utils' - -export interface Header { - level: number - title: string - slug: string -} - -interface HeaderWithChildren extends Header { - children?: Header[] -} - -export const SideBarLink: FunctionalComponent<{ - item: DefaultTheme.SideBarItem -}> = (props) => { - const route = useRoute() - const { site } = useData() - - const headers = route.data.headers - const text = props.item.text - const link = resolveLink(site.value.base, props.item.link) - const children = (props.item as DefaultTheme.SideBarGroup).children - const active = isActive(route, props.item.link) - const childItems = createChildren(active, children, headers) - - return h('li', { class: 'sidebar-link' }, [ - h( - link ? 'a' : 'p', - { - class: { 'sidebar-link-item': true, active }, - href: link, - }, - text, - ), - childItems, - ]) -} - -function resolveLink(base: string, path?: string): string | undefined { - if (path === undefined) - return path - - // keep relative hash to the same page - if (path.startsWith('#')) - return path - - return joinUrl(base, path) -} - -function createChildren( - active: boolean, - children?: DefaultTheme.SideBarItem[], - headers?: Header[], -): VNode | null { - if (children && children.length > 0) { - return h( - 'ul', - { class: 'sidebar-links' }, - children.map((c) => { - return h(SideBarLink, { item: c }) - }), - ) - } - - return active && headers - ? createChildren(false, resolveHeaders(headers)) - : null -} - -function resolveHeaders(headers: Header[]): DefaultTheme.SideBarItem[] { - return mapHeaders(groupHeaders(headers)) -} - -function groupHeaders(headers: Header[]): HeaderWithChildren[] { - headers = headers.map(h => Object.assign({}, h)) - let lastH2: HeaderWithChildren - headers.forEach((h) => { - if (h.level === 2) - lastH2 = h - - else if (lastH2) - (lastH2.children || (lastH2.children = [])).push(h) - }) - return headers.filter(h => h.level === 2) -} - -function mapHeaders(headers: HeaderWithChildren[]): DefaultTheme.SideBarItem[] { - return headers.map(header => ({ - text: header.title, - link: `#${header.slug}`, - children: header.children ? mapHeaders(header.children) : undefined, - })) -} diff --git a/docs/.vitepress/theme/components/SideBarLinks.vue b/docs/.vitepress/theme/components/SideBarLinks.vue deleted file mode 100644 index a86e665c..00000000 --- a/docs/.vitepress/theme/components/SideBarLinks.vue +++ /dev/null @@ -1,12 +0,0 @@ - - - diff --git a/docs/.vitepress/theme/index.ts b/docs/.vitepress/theme/index.ts index dd2fe3a0..f617364a 100644 --- a/docs/.vitepress/theme/index.ts +++ b/docs/.vitepress/theme/index.ts @@ -1,15 +1,6 @@ -// import { h } from 'vue' import Theme from 'vitepress/theme' import './styles/main.css' import './styles/vars.css' import 'uno.css' -// import PwaHero from './components/PwaHero.vue' -export default Theme/* { - ...Theme, - Layout() { - return h(Theme.Layout, null, { - 'home-hero-before': () => h(PwaHero), - }) - }, -} */ +export default Theme diff --git a/docs/.vitepress/theme/styles/code.css b/docs/.vitepress/theme/styles/code.css deleted file mode 100644 index ad669d23..00000000 --- a/docs/.vitepress/theme/styles/code.css +++ /dev/null @@ -1,107 +0,0 @@ -/* https://github.com/antfu/prism-theme-vars */ -@import 'prism-theme-vars/base.css'; -@import 'prism-theme-vars/marker.css'; - -:root { - --prism-font-family: var(--font-family-mono); - --prism-font-size: 0.85rem; - --prism-marker-opacity: 0; -} - -html:not(.dark) { - --prism-foreground: #393a34; - --prism-background: #fafafa; - --prism-inline-background: #f5f5f5; - --prism-comment: #a0ada0; - --prism-string: #a56051; - --prism-literal: #2f8a89; - --prism-number: #296aa3; - --prism-keyword: #1c6b48; - --prism-function: #6c7834; - --prism-boolean: #1c6b48; - --prism-constant: #a65e2b; - --prism-deleted: #a14f55; - --prism-class: #2993a3; - --prism-builtin: #ab5959; - --prism-property: #926a41; - --prism-namespace: #b05a78; - --prism-punctuation: #8e8f8b; - --prism-decorator: #bd8f8f; - --prism-regex: #ab5e3f; - --prism-json-property: #698c96; -} - -html.dark { - --prism-scheme: dark; - --prism-foreground: #d4cfbf; - --prism-background: #181818; - --prism-comment: #758575; - --prism-string: #d48372; - --prism-literal: #429988; - --prism-keyword: #4d9375; - --prism-boolean: #1c6b48; - --prism-number: #6394bf; - --prism-variable: #c2b36e; - --prism-function: #a1b567; - --prism-deleted: #bc6066; - --prism-class: #54b1bf; - --prism-builtin: #e0a569; - --prism-property: #dd8e6e; - --prism-namespace: #db889a; - --prism-punctuation: #858585; - --prism-decorator: #bd8f8f; - --prism-regex: #ab5e3f; - --prism-json-property: #6b8b9e; - --prism-line-number: #888888; - --prism-line-number-gutter: #eeeeee; - --prism-line-highlight-background: #444444; - --prism-selection-background: #444444; - --prism-inline-background: theme('colors.dark.300'); -} - -/* Overrides */ - -:not(pre) > code { - background: var(--prism-inline-background); - padding: 1px 6px; - border-radius: 3px; -} - -a > code { - color: var(--c-brand-dark); -} - -div[class*='language-'] { - position: relative; -} - -div[class*='language-'] pre { - margin: 0; - z-index: 1; -} - -div[class*='language-'] code { - font-size: var(--prism-font-size); - font-family: var(--prism-font-family); -} - -/* Line highlighting */ - -.highlight-lines { - position: absolute; - top: 0; - bottom: 0; - left: 0; - padding: var(--prism-block-padding-y) 0; - width: 100%; - line-height: var(--prism-line-height); - font-family: var(--prism-font-family); - font-size: var(--prism-font-size); - user-select: none; - overflow: hidden; - z-index: -1; -} - -.highlight-lines .highlighted { - background-color: var(--prism-line-highlight-background); -} diff --git a/docs/.vitepress/theme/styles/layout.css b/docs/.vitepress/theme/styles/layout.css deleted file mode 100644 index 68764792..00000000 --- a/docs/.vitepress/theme/styles/layout.css +++ /dev/null @@ -1,302 +0,0 @@ -*, -::before, -::after { - box-sizing: border-box; -} - -* { - scrollbar-color: var(--c-divider-light) var(--c-bg); -} -::-webkit-scrollbar { - width: var(--scrollbar-width); -} -::-webkit-scrollbar:horizontal { - height: var(--scrollbar-width); -} -::-webkit-scrollbar-track { - background: var(--c-bg); - border-radius: 10px; -} -::-webkit-scrollbar-thumb { - background: var(--c-divider-light); - border-radius: 10px; -} -::-webkit-scrollbar-thumb:hover { - background: var(--c-divider-dark); -} - -html { - line-height: 1.4; - font-size: 16px; - -webkit-text-size-adjust: 100%; -} - -body { - margin: 0; - width: 100%; - min-width: 320px; - min-height: 100vh; - line-height: 1.4; - font-family: var(--font-family-base); - font-size: 16px; - font-weight: 400; - color: var(--c-text); - background-color: var(--c-bg); - direction: ltr; - font-synthesis: none; - text-rendering: optimizeLegibility; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - overflow-x: hidden; -} - -main { - display: block; -} - -h1, -h2, -h3, -h4, -h5, -h6 { - margin: 0; - line-height: 1.25; -} - -h1, -h2, -h3, -h4, -h5, -h6, -strong, -b { - font-weight: 600; -} - -h1:hover .header-anchor, -h1:focus .header-anchor, -h2:hover .header-anchor, -h2:focus .header-anchor, -h3:hover .header-anchor, -h3:focus .header-anchor, -h4:hover .header-anchor, -h4:focus .header-anchor, -h5:hover .header-anchor, -h5:focus .header-anchor, -h6:hover .header-anchor, -h6:focus .header-anchor { - opacity: 1; -} - -h1 { - margin-top: 1.5rem; - font-size: 1.9rem; -} - -@media screen and (min-width: 420px) { - h1 { - font-size: 2.2rem; - } -} - -h2 { - margin-top: 2.25rem; - margin-bottom: 1.25rem; - border-bottom: 1px solid var(--c-divider); - padding-bottom: 0.3rem; - line-height: 1.25; - font-size: 1.65rem; - /* overflow-x: auto; */ -} - -h2 + h3 { - margin-top: 1.5rem; -} - -h3 { - margin-top: 2rem; - font-size: 1.35rem; -} - -h4 { - font-size: 1.15rem; -} - -p, -ol, -ul { - margin: 1rem 0; - line-height: 1.7; -} - -a, -area, -button, -[role="button"], -input, -label, -select, -summary, -textarea { - touch-action: manipulation; -} - -a { - text-decoration: none; - font-weight: bolder; - color: var(--c-brand-active); -} - -a:hover { - text-decoration: underline; -} - -a.header-anchor { - float: left; - margin-top: 0.125em; - margin-left: -0.87em; - padding-right: 0.23em; - font-size: 0.85em; - opacity: 0; -} - -a.header-anchor:hover, -a.header-anchor:focus { - text-decoration: none; -} - -figure { - margin: 0; -} - -img { - max-width: 100%; -} - -ul, -ol { - padding-left: 1.25em; -} - -li > ul, -li > ol { - margin: 0; -} - -table { - display: block; - border-collapse: collapse; - margin: 1rem 0; - overflow-x: auto; -} - -tr { - border-top: 1px solid var(--c-divider-light); -} - -tr:nth-child(2n) { - background-color: var(--code-inline-bg-color); -} - -th, -td { - border: 1px solid var(--c-divider-light); - padding: 0.6em 1em; -} - -blockquote { - margin: 1rem 0; - border-left: 0.2rem solid #dfe2e5; - padding: 0.25rem 0.25rem 0.25rem 1rem; - font-size: 1rem; - color: var(--c-text); - @apply bg-gray-400 bg-opacity-10; -} - -blockquote > p { - margin: 0; -} - -form { - margin: 0; -} - -.theme.sidebar-open .sidebar-mask { - display: block; -} - -.theme.no-navbar > h1, -.theme.no-navbar > h2, -.theme.no-navbar > h3, -.theme.no-navbar > h4, -.theme.no-navbar > h5, -.theme.no-navbar > h6 { - margin-top: 1.5rem; - padding-top: 0; -} - -.theme.no-navbar aside { - top: 0; -} - -@media screen and (min-width: 780px) { - .theme.no-sidebar aside { - display: none; - } - - .theme.no-sidebar main { - margin-left: 0; - } -} - -.sidebar-mask { - position: fixed; - z-index: 2; - display: none; - width: 100vw; - height: 100vh; -} - -.icon-button { - display: flex; - font-size: 1.05rem; - border: 0; - /*outline: none;*/ - background: none; - color: var(--c-text); - opacity: 0.8; - cursor: pointer; -} -.icon-button:hover { - opacity: 1; -} -.icon-button svg { - margin: auto; -} -.external-link { - font-size: 0.95rem; - opacity: 0.7; -} - -.version-img { - text-align: center; - -} - -html.dark .version-img { - text-align: center; -} - -html.dark .prompt-img img { - filter: invert(93%); -} - -details summary { - cursor: pointer; -} -details summary strong { - color: var(--c-brand-active); -} - diff --git a/docs/.vitepress/theme/styles/main.css b/docs/.vitepress/theme/styles/main.css index 6c86a057..4cba693a 100644 --- a/docs/.vitepress/theme/styles/main.css +++ b/docs/.vitepress/theme/styles/main.css @@ -1,37 +1,40 @@ .dark [img-light] { - display: none; + display: none; } html:not(.dark) [img-dark] { - display: none; + display: none; } /* Overrides */ .VPSocialLink { - transform: scale(0.9); + transform: scale(0.9); } -.vp-doc th, .vp-doc td { - padding: 6px 10px; - border: 1px solid #8882; +.vp-doc th, +.vp-doc td { + padding: 6px 10px; + border: 1px solid #8882; } /* h3 breaks SEO => replaced with h2 with the same size */ .home-content h2 { - margin-top: 2rem; - font-size: 1.35rem; - border-bottom: none; - margin-bottom: 0; + margin-top: 2rem; + font-size: 1.35rem; + border-bottom: none; + margin-bottom: 0; } img.resizable-img { - width: unset; - height: unset; + width: unset; + height: unset; } .dark .prompt-img { - filter: invert(86%); + filter: invert(86%); } - +.tagline { + white-space: pre-wrap; +} diff --git a/docs/.vitepress/theme/styles/sidebar-links.css b/docs/.vitepress/theme/styles/sidebar-links.css deleted file mode 100644 index 74851e9a..00000000 --- a/docs/.vitepress/theme/styles/sidebar-links.css +++ /dev/null @@ -1,102 +0,0 @@ -.sidebar-links { - margin: 0; - padding: 0; - list-style: none; -} - -.sidebar-link-item { - display: block; - margin: 0; - border-left: .25rem solid transparent; - color: var(--c-text); -} - -a.sidebar-link-item:hover { - text-decoration: none; - color: var(--c-text); -} - -a.sidebar-link-item.active { - color: var(--c-text); -} - -.sidebar > .sidebar-links { - padding: .75rem 0 5rem; -} - -@media (min-width: 780px) { - .sidebar > .sidebar-links { - padding: 1.5rem 0; - } -} - -.sidebar > .sidebar-links > .sidebar-link + .sidebar-link { - padding-top: .5rem; -} - -@media (min-width: 780px) { - .sidebar > .sidebar-links > .sidebar-link + .sidebar-link { - padding-top: 1.25rem; - } -} - -.sidebar > .sidebar-links > .sidebar-link > .sidebar-link-item { - padding: .35rem 1.5rem .35rem 1.25rem; - font-size: 1.1rem; - font-weight: 700; -} - -.sidebar > .sidebar-links > .sidebar-link > a.sidebar-link-item.active { - border-left-color: var(--c-brand-dark); - font-weight: 600; -} - -.sidebar > .sidebar-links > .sidebar-link > .sidebar-links > .sidebar-link > .sidebar-link-item { - display: block; - padding: .35rem 1.5rem .35rem 2rem; - line-height: 1.4; - font-size: 1rem; - font-weight: 400; -} - -.sidebar > .sidebar-links > .sidebar-link > .sidebar-links > .sidebar-link > a.sidebar-link-item.active { - border-left-color: var(--c-brand-dark); - font-weight: 600; -} - -.sidebar > -.sidebar-links > -.sidebar-link > -.sidebar-links > -.sidebar-link > -.sidebar-links > -.sidebar-link > -.sidebar-link-item { - display: block; - padding: .3rem 1.5rem .3rem 3rem; - line-height: 1.4; - font-size: .9rem; - font-weight: 400; -} - -.sidebar > -.sidebar-links > -.sidebar-link > -.sidebar-links > -.sidebar-link > -.sidebar-links > -.sidebar-link > -.sidebar-links > -.sidebar-link > -.sidebar-link-item { - display: block; - padding: .3rem 1.5rem .3rem 4rem; - line-height: 1.4; - font-size: .9rem; - font-weight: 400; -} -/* -a.sidebar-link-item { - font-family: monospace; - letter-spacing: -0.5px; -} */ diff --git a/docs/.vitepress/theme/styles/vars.css b/docs/.vitepress/theme/styles/vars.css index 90c4524b..8c1cf980 100644 --- a/docs/.vitepress/theme/styles/vars.css +++ b/docs/.vitepress/theme/styles/vars.css @@ -3,28 +3,28 @@ * -------------------------------------------------------------------------- */ :root { - --vp-c-accent: #2c7f95; - --vp-c-brand: #2c7f95; - --vp-c-brand-light: #2e859c; - --vp-c-brand-lighter: #3392ac; - --vp-c-brand-dark: #00586e; - --vp-c-brand-darker: #00586e; - --vp-c-text-code: #5d6f5d; - --vp-code-block-bg: rgba(125,125,125,0.04); - --vp-custom-block-tip-text: rgb(18, 181, 157); - --vp-custom-block-tip-border: rgba(18, 181, 157, 0.5); - --vp-custom-block-tip-bg: rgba(18, 181, 157, 0.1); + --vp-c-accent: #2c7f95; + --vp-c-brand: #2c7f95; + --vp-c-brand-light: #2e859c; + --vp-c-brand-lighter: #3392ac; + --vp-c-brand-dark: #00586e; + --vp-c-brand-darker: #00586e; + --vp-c-text-code: #5d6f5d; + --vp-code-block-bg: rgba(125, 125, 125, 0.04); + --vp-custom-block-tip-text: rgb(18, 181, 157); + --vp-custom-block-tip-border: rgba(18, 181, 157, 0.5); + --vp-custom-block-tip-bg: rgba(18, 181, 157, 0.1); } .dark { - --vp-c-accent: #4AA6C0; - --vp-c-brand: #4AA6C0; - --vp-c-brand-light: #52b1cc; - --vp-c-brand-lighter: #52b1cc; - --vp-c-brand-dark: #52b1cc; - --vp-c-brand-darker: #52b1cc; - --vp-code-block-bg: rgba(0,0,0,0.2); - --vp-c-text-code: #c0cec0; + --vp-c-accent: #4aa6c0; + --vp-c-brand: #4aa6c0; + --vp-c-brand-light: #52b1cc; + --vp-c-brand-lighter: #52b1cc; + --vp-c-brand-dark: #52b1cc; + --vp-c-brand-darker: #52b1cc; + --vp-code-block-bg: rgba(0, 0, 0, 0.2); + --vp-c-text-code: #c0cec0; } /** @@ -32,15 +32,15 @@ * -------------------------------------------------------------------------- */ :root { - --vp-button-brand-border: var(--vp-c-brand-light); - --vp-button-brand-text: var(--vp-c-text-dark-1); - --vp-button-brand-bg: var(--vp-c-brand); - --vp-button-brand-hover-border: var(--vp-c-brand-light); - --vp-button-brand-hover-text: var(--vp-c-text-dark-1); - --vp-button-brand-hover-bg: var(--vp-c-brand-light); - --vp-button-brand-active-border: var(--vp-c-brand-light); - --vp-button-brand-active-text: var(--vp-c-text-dark-1); - --vp-button-brand-active-bg: var(--vp-button-brand-bg); + --vp-button-brand-border: var(--vp-c-brand-light); + --vp-button-brand-text: var(--vp-c-text-dark-1); + --vp-button-brand-bg: var(--vp-c-brand); + --vp-button-brand-hover-border: var(--vp-c-brand-light); + --vp-button-brand-hover-text: var(--vp-c-text-dark-1); + --vp-button-brand-hover-bg: var(--vp-c-brand-light); + --vp-button-brand-active-border: var(--vp-c-brand-light); + --vp-button-brand-active-text: var(--vp-c-text-dark-1); + --vp-button-brand-active-bg: var(--vp-button-brand-bg); } /** @@ -48,156 +48,28 @@ * -------------------------------------------------------------------------- */ :root { - --vp-home-hero-name-color: transparent; - --vp-home-hero-name-background: -webkit-linear-gradient( - 120deg, - #00586e 30%, - #52b1cc - ); - --vp-home-hero-image-background-image: linear-gradient( - -45deg, - #00586e60 30%, - #52b1cc60 - ); - --vp-home-hero-image-filter: blur(30px); + --vp-home-hero-name-color: transparent; + --vp-home-hero-name-background: linear-gradient(347deg, #358399 30%, #3bb89c); + --vp-home-hero-image-background-image: linear-gradient(45deg, #00586e60 30%, #e5e05660); + --vp-home-hero-image-filter: blur(30px); } @media (min-width: 640px) { - :root { - --vp-home-hero-image-filter: blur(56px); - } + :root { + --vp-home-hero-image-filter: blur(56px); + } } @media (min-width: 960px) { - :root { - --vp-home-hero-image-filter: blur(72px); - } + :root { + --vp-home-hero-image-filter: blur(72px); + } } - /** * Component: Algolia * -------------------------------------------------------------------------- */ .DocSearch { - --docsearch-primary-color: var(--vp-c-brand) !important; -} - - - - - - - -/** Base Styles */ -:root { - - /** - * Colors - * --------------------------------------------------------------------- */ - --c-bg: #fff; - --c-bg-semi: rgba(255,255,255,0.8); - --c-bg-secondary: #f3f5f7; - - --c-white: #ffffff; - --c-black: #000000; - - --c-divider-light: rgba(60, 60, 67, .12); - --c-divider-dark: rgba(84, 84, 88, .48); - - --c-text-light-1: #2c3e50; - --c-text-light-2: #476582; - --c-text-light-3: #90a4b7; - - --c-brand: #2e859c; - --c-brand-active: #2c7f95; - --c-brand-dark: #00586e; - --c-brand-light: #52b1cc; - - --c-disabled-bg: #e5e5e5; - --c-disabled-fg: #666; - - --code-bg-color: #f8f8f8; - --code-inline-bg-color: rgba(27, 31, 35, .04); - --code-highlight: rgba(0, 0, 0, .04); - - /** - * Typography - * --------------------------------------------------------------------- */ - - --font-family-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; - --font-family-mono: source-code-pro, Menlo, Monaco, Consolas, "Courier New", monospace; - - /** - * Z Indexes - * - * Algolia SearchBox has a z-index of 200, so make sure not to go above - * that value. - * --------------------------------------------------------------------- */ - - --z-index-navbar: 10; - --z-index-sidebar: 6; - - /** - * Shadows - * --------------------------------------------------------------------- */ - - --shadow-1: 0 1px 2px rgba(0, 0, 0, .04), 0 1px 2px rgba(0, 0, 0, .06); - --shadow-2: 0 3px 12px rgba(0, 0, 0, .07), 0 1px 4px rgba(0, 0, 0, .07); - --shadow-3: 0 12px 32px rgba(0, 0, 0, .1), 0 2px 6px rgba(0, 0, 0, .08); - --shadow-4: 0 14px 44px rgba(0, 0, 0, .12), 0 3px 9px rgba(0, 0, 0, .12); - --shadow-5: 0 18px 56px rgba(0, 0, 0, .16), 0 4px 12px rgba(0, 0, 0, .16); - - /** - * Sizes - * --------------------------------------------------------------------- */ - - --header-height: 3.6rem; - --sidebar-width: 17.5rem; - --scrollbar-width: 6px; - - --pwa-logo-p: #3e3e3e; -} - -html.dark { - - --c-bg: #111; - --c-bg-semi: rgba(17,17,17,0.8); - --c-bg-secondary: #222; - --c-text: #f5f7fa; - --c-text-light: #f9f9f9; - --c-text-lighter: #ffffff; - - --c-divider-light: rgba(200, 200, 200, .12); - --c-divider-dark: rgba(200, 200, 200, .48); - --code-bg-color: #191919; - --code-inline-bg-color: rgba(255, 255, 255, .04); - --code-highlight: rgba(0, 0, 0, .66); - - --c-brand: #4AA6C0; - --c-brand-active: #3392ac; - --c-brand-dark: #00586e; - --c-brand-light: #52b1cc; - - --c-disabled-bg: #333; - --c-disabled-fg: #aaa; - - --pwa-logo-p: #b9b9b9; -} - -/** Fallback Styles */ -:root { - --c-divider: var(--c-divider-light); - - --c-text: var(--c-text-light-1); - --c-text-light: var(--c-text-light-2); - --c-text-lighter: var(--c-text-light-3); - - --c-bg: var(--c-white); - - --code-line-height: 24px; - --code-font-family: var(--font-family-mono); - --code-font-size: 14px; - - --pwa-logo-w: var(--c-brand); + --docsearch-primary-color: var(--vp-c-brand) !important; } diff --git a/docs/index.md b/docs/index.md index bca9d45b..94f6bd46 100644 --- a/docs/index.md +++ b/docs/index.md @@ -3,11 +3,13 @@ layout: home sidebar: false hero: - name: Vite Plugin PWA - text: '' - tagline: Zero-config PWA Framework-agnostic Plugin for Vite + name: PWA + text: Vite Plugin + tagline: | + Zero-config and framework-agnostic + PWA Plugin for Vite image: - src: /icon_light.svg + src: /icon_gray.svg alt: Vite Plugin PWA actions: - theme: brand @@ -15,7 +17,7 @@ hero: link: /guide/ - theme: alt text: View on GitHub - link: https://github.com/vite-plugin-pwa + link: https://github.com/antfu/vite-plugin-pwa features: - title: 👌 Zero-Config diff --git a/docs/public/icon_gray.svg b/docs/public/icon_gray.svg new file mode 100644 index 00000000..c683dd29 --- /dev/null +++ b/docs/public/icon_gray.svg @@ -0,0 +1,5 @@ + + + + + From 3360cb1a83ee47408aabc0e237506a2bad173b2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20S=C3=A1nchez=20Jim=C3=A9nez?= Date: Thu, 9 Jun 2022 00:21:21 +0200 Subject: [PATCH 03/45] chore: cleanup deependencies chore: cleanup components chore: cleanup composables chore: cleanup vite plugins chore: update pages with new utilities from vitepress theme chore: change code colors to use old ones + minimal styles from pwa prompt --- docs/.vitepress/components.d.ts | 9 - docs/.vitepress/config.ts | 51 +++-- docs/.vitepress/theme/Layout.vue | 137 -------------- docs/.vitepress/theme/NotFound.vue | 21 --- .../theme/components/CleanupOutdatedCaches.md | 6 +- .../GenerateSWCleanupOutdatedCaches.md | 7 +- .../theme/components/GenerateSWSourceMap.md | 7 +- .../components/HeuristicWorkboxWindow.md | 9 +- .../InjectManifestCleanupOutdatedCaches.md | 4 +- .../components/InjectManifestSourceMap.md | 6 +- docs/.vitepress/theme/components/Note.vue | 5 - docs/.vitepress/theme/components/Page.vue | 39 ---- .../theme/components/PluginVersion.vue | 45 ----- docs/.vitepress/theme/components/PwaHero.vue | 10 - docs/.vitepress/theme/components/PwaLogo.vue | 8 - .../theme/components/ReloadPrompt.vue | 33 +++- .../theme/components/RunExamples.md | 23 +-- docs/.vitepress/theme/components/SsrSsg.md | 3 +- .../theme/components/ToggleSideBarButton.vue | 51 ----- .../theme/components/icons/ArrowLeft.vue | 5 - .../theme/components/icons/ArrowRight.vue | 5 - .../theme/components/icons/OutboundLink.vue | 31 --- .../theme/composables/activeSidebarLink.ts | 131 ------------- docs/.vitepress/theme/composables/dark.ts | 7 - docs/.vitepress/theme/composables/editLink.ts | 89 --------- docs/.vitepress/theme/composables/nav.ts | 59 ------ docs/.vitepress/theme/composables/navLink.ts | 63 ------- .../theme/composables/nextAndPrevLinks.ts | 50 ----- docs/.vitepress/theme/composables/repo.ts | 47 ----- docs/.vitepress/theme/composables/sideBar.ts | 72 ------- docs/.vitepress/theme/composables/url.ts | 16 -- docs/.vitepress/theme/config.ts | 126 ------------- docs/.vitepress/theme/index.ts | 12 +- docs/.vitepress/theme/styles/main.css | 15 ++ docs/.vitepress/theme/styles/vars.css | 6 +- docs/.vitepress/theme/utils.ts | 77 -------- docs/deployment/aws.md | 4 +- docs/deployment/index.md | 36 +--- docs/deployment/nginx.md | 2 + docs/deployment/vercel.md | 4 +- docs/examples/astro.md | 9 + docs/examples/iles.md | 9 + docs/examples/index.md | 176 +++++------------- docs/examples/preact.md | 7 +- docs/examples/react.md | 7 +- docs/examples/solidjs.md | 7 +- docs/examples/svelte.md | 8 +- docs/examples/sveltekit.md | 6 +- docs/examples/vitepress.md | 6 +- docs/examples/vue.md | 7 +- docs/frameworks/astro.md | 9 + docs/frameworks/iles.md | 11 ++ docs/frameworks/index.md | 92 +++------ docs/frameworks/preact.md | 22 +-- docs/frameworks/react.md | 22 +-- docs/frameworks/solidjs.md | 22 +-- docs/frameworks/svelte.md | 18 +- docs/frameworks/sveltekit.md | 43 ++--- docs/frameworks/vitepress.md | 10 +- docs/frameworks/vue.md | 27 +-- docs/guide/auto-update.md | 16 +- docs/guide/development.md | 50 ++--- docs/guide/faq.md | 39 ++-- docs/guide/generate.md | 29 +-- docs/guide/index.md | 47 ++--- docs/guide/inject-manifest.md | 29 ++- docs/guide/periodic-sw-updates.md | 10 +- docs/guide/prompt-for-update.md | 15 +- docs/guide/static-assets.md | 46 ++--- docs/guide/testing.md | 6 +- docs/package.json | 5 - docs/vite.config.ts | 24 +-- docs/workbox/generate-sw.md | 40 ++-- docs/workbox/index.md | 27 +-- docs/workbox/inject-manifest.md | 30 ++- pnpm-lock.yaml | 162 +++------------- 76 files changed, 488 insertions(+), 1936 deletions(-) delete mode 100644 docs/.vitepress/theme/Layout.vue delete mode 100644 docs/.vitepress/theme/NotFound.vue delete mode 100644 docs/.vitepress/theme/components/Note.vue delete mode 100644 docs/.vitepress/theme/components/Page.vue delete mode 100644 docs/.vitepress/theme/components/PluginVersion.vue delete mode 100644 docs/.vitepress/theme/components/PwaHero.vue delete mode 100644 docs/.vitepress/theme/components/PwaLogo.vue delete mode 100644 docs/.vitepress/theme/components/ToggleSideBarButton.vue delete mode 100644 docs/.vitepress/theme/components/icons/ArrowLeft.vue delete mode 100644 docs/.vitepress/theme/components/icons/ArrowRight.vue delete mode 100644 docs/.vitepress/theme/components/icons/OutboundLink.vue delete mode 100644 docs/.vitepress/theme/composables/activeSidebarLink.ts delete mode 100644 docs/.vitepress/theme/composables/dark.ts delete mode 100644 docs/.vitepress/theme/composables/editLink.ts delete mode 100644 docs/.vitepress/theme/composables/nav.ts delete mode 100644 docs/.vitepress/theme/composables/navLink.ts delete mode 100644 docs/.vitepress/theme/composables/nextAndPrevLinks.ts delete mode 100644 docs/.vitepress/theme/composables/repo.ts delete mode 100644 docs/.vitepress/theme/composables/sideBar.ts delete mode 100644 docs/.vitepress/theme/composables/url.ts delete mode 100644 docs/.vitepress/theme/config.ts delete mode 100644 docs/.vitepress/theme/utils.ts create mode 100644 docs/examples/astro.md create mode 100644 docs/examples/iles.md create mode 100644 docs/frameworks/astro.md create mode 100644 docs/frameworks/iles.md diff --git a/docs/.vitepress/components.d.ts b/docs/.vitepress/components.d.ts index fdb0d0fc..cd67af27 100644 --- a/docs/.vitepress/components.d.ts +++ b/docs/.vitepress/components.d.ts @@ -5,8 +5,6 @@ import '@vue/runtime-core' declare module '@vue/runtime-core' { export interface GlobalComponents { - ArrowLeft: typeof import('./theme/components/icons/ArrowLeft.vue')['default'] - ArrowRight: typeof import('./theme/components/icons/ArrowRight.vue')['default'] CleanupOutdatedCaches: typeof import('./theme/components/CleanupOutdatedCaches.md')['default'] ExamplesBehaviors: typeof import('./theme/components/ExamplesBehaviors.md')['default'] ExamplesGenerateSW: typeof import('./theme/components/ExamplesGenerateSW.md')['default'] @@ -16,19 +14,12 @@ declare module '@vue/runtime-core' { HeuristicWorkboxWindow: typeof import('./theme/components/HeuristicWorkboxWindow.md')['default'] InjectManifestCleanupOutdatedCaches: typeof import('./theme/components/InjectManifestCleanupOutdatedCaches.md')['default'] InjectManifestSourceMap: typeof import('./theme/components/InjectManifestSourceMap.md')['default'] - Note: typeof import('./theme/components/Note.vue')['default'] - OutboundLink: typeof import('./theme/components/icons/OutboundLink.vue')['default'] - Page: typeof import('./theme/components/Page.vue')['default'] - PluginVersion: typeof import('./theme/components/PluginVersion.vue')['default'] PromptForUpdateImg: typeof import('./theme/components/PromptForUpdateImg.vue')['default'] - PwaHero: typeof import('./theme/components/PwaHero.vue')['default'] - PwaLogo: typeof import('./theme/components/PwaLogo.vue')['default'] ReloadPrompt: typeof import('./theme/components/ReloadPrompt.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] RunExamples: typeof import('./theme/components/RunExamples.md')['default'] SsrSsg: typeof import('./theme/components/SsrSsg.md')['default'] - ToggleSideBarButton: typeof import('./theme/components/ToggleSideBarButton.vue')['default'] } } diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index 02aacec8..d01d396f 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -1,4 +1,5 @@ import { defineConfig } from 'vitepress' +import { version } from '../../package.json' const Guide = [ { @@ -103,6 +104,14 @@ const Frameworks = [ text: 'VitePress', link: '/frameworks/vitepress', }, + { + text: 'îles', + link: '/frameworks/iles', + }, + { + text: 'Astro (WIP)', + link: '/frameworks/astro', + }, ] const Examples = [ @@ -138,6 +147,14 @@ const Examples = [ text: 'VitePress', link: '/examples/vitepress', }, + { + text: 'îles', + link: '/examples/iles', + }, + { + text: 'Astro (WIP)', + link: '/examples/astro', + }, ] const Workbox = [ @@ -158,38 +175,23 @@ const Workbox = [ const slidebars = [ { text: 'Guide', - items: Guide.map((e) => { - (e as any).useLinkText = `${e.text} | Guide` - return e - }), + items: Guide, }, { text: 'Frameworks', - items: Frameworks.map((e) => { - (e as any).useLinkText = `${e.text} | Frameworks` - return e - }), + items: Frameworks, }, { text: 'Examples', - items: Examples.map((e) => { - (e as any).useLinkText = `${e.text} | Examples` - return e - }), + items: Examples, }, { text: 'Deployment', - items: Deployment.map((e) => { - (e as any).useLinkText = `${e.text} | Deployment` - return e - }), + items: Deployment, }, { text: 'Workbox', - items: Workbox.map((e) => { - (e as any).useLinkText = `${e.text} | Workbox` - return e - }), + items: Workbox, }, ] @@ -264,6 +266,15 @@ export default defineConfig({ text: 'Workbox', items: Workbox, }, + { + text: `v${version}`, + items: [ + { + text: 'Contributing', + link: 'https://github.com/antfu/vite-plugin-pwa/blob/main/CONTRIBUTING.md', + }, + ], + }, ], sidebar: { '/guide/': slidebars, diff --git a/docs/.vitepress/theme/Layout.vue b/docs/.vitepress/theme/Layout.vue deleted file mode 100644 index 5257fed8..00000000 --- a/docs/.vitepress/theme/Layout.vue +++ /dev/null @@ -1,137 +0,0 @@ - - - diff --git a/docs/.vitepress/theme/NotFound.vue b/docs/.vitepress/theme/NotFound.vue deleted file mode 100644 index 2a1f38e3..00000000 --- a/docs/.vitepress/theme/NotFound.vue +++ /dev/null @@ -1,21 +0,0 @@ - - - - diff --git a/docs/.vitepress/theme/components/CleanupOutdatedCaches.md b/docs/.vitepress/theme/components/CleanupOutdatedCaches.md index 4bb9db69..8deb3471 100644 --- a/docs/.vitepress/theme/components/CleanupOutdatedCaches.md +++ b/docs/.vitepress/theme/components/CleanupOutdatedCaches.md @@ -1,5 +1 @@ -The service worker will store all your application assets in a browser cache (or set of caches). Every time you make -changes to your application and rebuild it, the `service worker` will be also rebuild, including in its cache manifest -all new modified assets, which will have their revision changed (all assets that have been modified will have a new -version). Assets that have not been modified will also be included in the service worker manifest cache, but their -revision will not change from the previous version. +The service worker will store all your application assets in a browser cache (or set of caches). Every time you make changes to your application and rebuild it, the `service worker` will be also rebuild, including in its cache manifest all new modified assets, which will have their revision changed (all assets that have been modified will have a new version). Assets that have not been modified will also be included in the service worker manifest cache, but their revision will not change from the previous version. diff --git a/docs/.vitepress/theme/components/GenerateSWCleanupOutdatedCaches.md b/docs/.vitepress/theme/components/GenerateSWCleanupOutdatedCaches.md index 8c97b10c..53fe9f3c 100644 --- a/docs/.vitepress/theme/components/GenerateSWCleanupOutdatedCaches.md +++ b/docs/.vitepress/theme/components/GenerateSWCleanupOutdatedCaches.md @@ -1,11 +1,8 @@ -When the user installs the new version of the application, we will have on the service worker cache all new assets and -also the old ones. To delete old assets (from previous versions that are no longer necessary), you have to configure -an option on the `workbox` entry of the plugin configuration. +When the user installs the new version of the application, we will have on the service worker cache all new assets and also the old ones. To delete old assets (from previous versions that are no longer necessary), you have to configure an option on the `workbox` entry of the plugin configuration. When using the `generateSW` strategy, it is not necessary to activate it, the plugin will activate it by default. -We strongly recommend you to **NOT** deactivate the option. If you are curious, you can deactivate it using -this code on your plugin configuration: +We strongly recommend you to **NOT** deactivate the option. If you are curious, you can deactivate it using this code on your plugin configuration: ```ts import { VitePWA } from 'vite-plugin-pwa' diff --git a/docs/.vitepress/theme/components/GenerateSWSourceMap.md b/docs/.vitepress/theme/components/GenerateSWSourceMap.md index 40331787..8c57b650 100644 --- a/docs/.vitepress/theme/components/GenerateSWSourceMap.md +++ b/docs/.vitepress/theme/components/GenerateSWSourceMap.md @@ -1,9 +1,6 @@ -Since plugin version `0.11.2`, your service worker's source map will not be generated as it uses the `build.sourcemap` -option from the Vite config, which by default is `false`. +Since plugin version `0.11.2`, your service worker's source map will not be generated as it uses the `build.sourcemap` option from the Vite config, which by default is `false`. -Your service worker source map will be generated when Vite's `build.sourcemap` configuration option has the value -`true`, `'online'` or `'hidden'`, and you have not configured the `workbox.sourcemap` option in the plugin -configuration. If you configure the `workbox.sourcemap` option, the plugin will not change that value. +Your service worker source map will be generated when Vite's `build.sourcemap` configuration option has the value `true`, `'online'` or `'hidden'`, and you have not configured the `workbox.sourcemap` option in the plugin configuration. If you configure the `workbox.sourcemap` option, the plugin will not change that value. If you want to generate the source map of your service worker, you can use this code: diff --git a/docs/.vitepress/theme/components/HeuristicWorkboxWindow.md b/docs/.vitepress/theme/components/HeuristicWorkboxWindow.md index 1eb2dd96..1e12b968 100644 --- a/docs/.vitepress/theme/components/HeuristicWorkboxWindow.md +++ b/docs/.vitepress/theme/components/HeuristicWorkboxWindow.md @@ -1,6 +1,3 @@ -> Since `workbox-window` uses a time-based `heuristic` algorithm to handle service worker updates, if you -build your service worker and register it again, if the time between last registration and the new one is less than -1 minute, then, `workbox-window` will handle the `service worker update found` event as an external event, and so the -behavior could be strange (for example, if using `prompt`, instead showing the dialog for new content available, the -ready to work offline dialog will be shown; if using `autoUpdate`, the ready to work offline dialog will be shown and -shouldn't be shown). +::: warning +Since `workbox-window` uses a time-based `heuristic` algorithm to handle service worker updates, if you build your service worker and register it again, if the time between last registration and the new one is less than 1 minute, then, `workbox-window` will handle the `service worker update found` event as an external event, and so the behavior could be strange (for example, if using `prompt`, instead showing the dialog for new content available, the ready to work offline dialog will be shown; if using `autoUpdate`, the ready to work offline dialog will be shown and shouldn't be shown). +::: diff --git a/docs/.vitepress/theme/components/InjectManifestCleanupOutdatedCaches.md b/docs/.vitepress/theme/components/InjectManifestCleanupOutdatedCaches.md index 01297e16..0679bbf3 100644 --- a/docs/.vitepress/theme/components/InjectManifestCleanupOutdatedCaches.md +++ b/docs/.vitepress/theme/components/InjectManifestCleanupOutdatedCaches.md @@ -1,6 +1,4 @@ -When the user installs the new version of the application, we will have on the service worker cache all new assets and -also the old ones. To delete old assets (from previous versions that are no longer necessary), and since you are -building your own service worker, you will need to add the following code to your custom service worker: +When the user installs the new version of the application, we will have on the service worker cache all new assets and also the old ones. To delete old assets (from previous versions that are no longer necessary), and since you are building your own service worker, you will need to add the following code to your custom service worker: ```js import { cleanupOutdatedCaches, precacheAndRoute } from 'workbox-precaching' diff --git a/docs/.vitepress/theme/components/InjectManifestSourceMap.md b/docs/.vitepress/theme/components/InjectManifestSourceMap.md index 6b4f22a0..7120ca00 100644 --- a/docs/.vitepress/theme/components/InjectManifestSourceMap.md +++ b/docs/.vitepress/theme/components/InjectManifestSourceMap.md @@ -1,5 +1,3 @@ -Since you are building your own service worker, this plugin will use Vite's `build.sourcemap` configuration option, -which default value is `false`, to generate the source map. +Since you are building your own service worker, this plugin will use Vite's `build.sourcemap` configuration option, which default value is `false`, to generate the source map. -If you want to generate the source map for your service worker, you will need to generate the source map for the -entire application. +If you want to generate the source map for your service worker, you will need to generate the source map for the entire application. diff --git a/docs/.vitepress/theme/components/Note.vue b/docs/.vitepress/theme/components/Note.vue deleted file mode 100644 index 0329e9f3..00000000 --- a/docs/.vitepress/theme/components/Note.vue +++ /dev/null @@ -1,5 +0,0 @@ - diff --git a/docs/.vitepress/theme/components/Page.vue b/docs/.vitepress/theme/components/Page.vue deleted file mode 100644 index 9baf7109..00000000 --- a/docs/.vitepress/theme/components/Page.vue +++ /dev/null @@ -1,39 +0,0 @@ - - - diff --git a/docs/.vitepress/theme/components/PluginVersion.vue b/docs/.vitepress/theme/components/PluginVersion.vue deleted file mode 100644 index c430d555..00000000 --- a/docs/.vitepress/theme/components/PluginVersion.vue +++ /dev/null @@ -1,45 +0,0 @@ - - - - - diff --git a/docs/.vitepress/theme/components/PwaHero.vue b/docs/.vitepress/theme/components/PwaHero.vue deleted file mode 100644 index 2e966419..00000000 --- a/docs/.vitepress/theme/components/PwaHero.vue +++ /dev/null @@ -1,10 +0,0 @@ - diff --git a/docs/.vitepress/theme/components/PwaLogo.vue b/docs/.vitepress/theme/components/PwaLogo.vue deleted file mode 100644 index def9fe50..00000000 --- a/docs/.vitepress/theme/components/PwaLogo.vue +++ /dev/null @@ -1,8 +0,0 @@ - - - diff --git a/docs/.vitepress/theme/components/ReloadPrompt.vue b/docs/.vitepress/theme/components/ReloadPrompt.vue index bf5d9c61..1fe53bf9 100644 --- a/docs/.vitepress/theme/components/ReloadPrompt.vue +++ b/docs/.vitepress/theme/components/ReloadPrompt.vue @@ -1,30 +1,47 @@ - From 6814c7cdf4b18290097e9034e9473637e26015d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20S=C3=A1nchez=20Jim=C3=A9nez?= Date: Thu, 16 Jun 2022 09:52:44 +0200 Subject: [PATCH 10/45] fix: patch VitePress Layout adding slots chore: update pwa prompt buttons styles --- .../theme/components/ReloadPrompt.vue | 4 +-- docs/.vitepress/theme/index.ts | 3 +- docs/.vitepress/theme/styles/main.css | 30 ++++++++++++++++ docs/vite.config.ts | 35 +++++-------------- 4 files changed, 41 insertions(+), 31 deletions(-) diff --git a/docs/.vitepress/theme/components/ReloadPrompt.vue b/docs/.vitepress/theme/components/ReloadPrompt.vue index c64ba2aa..de34f35e 100644 --- a/docs/.vitepress/theme/components/ReloadPrompt.vue +++ b/docs/.vitepress/theme/components/ReloadPrompt.vue @@ -34,14 +34,14 @@ onBeforeMount(async () => {