Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
getname1997 committed Mar 7, 2024
2 parents 3de061c + ff534da commit be6305e
Show file tree
Hide file tree
Showing 117 changed files with 3,788 additions and 2,359 deletions.
7 changes: 7 additions & 0 deletions FUNDING.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"drips": {
"ethereum": {
"ownedBy": "0x929Eb10Cf1621b26199120a521C785F8271e0b78"
}
}
}
79 changes: 36 additions & 43 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "@vueuse/monorepo",
"type": "module",
"version": "10.7.2",
"version": "10.9.0",
"private": true,
"packageManager": "pnpm@8.14.1",
"packageManager": "pnpm@8.15.3",
"description": "Collection of essential Vue Composition Utilities",
"author": "Anthony Fu<https://github.com/antfu>",
"license": "MIT",
Expand All @@ -15,7 +15,7 @@
"clean": "rimraf --glob dist types \"packages/*/dist\"",
"dev": "nr update && nr docs",
"docs": "vue-demi-switch 3 && vitepress dev packages --open",
"docs:build": "nr update:full && vitepress build packages && nr build:redirects && esno scripts/post-docs.ts",
"docs:build": "nr update:full && vitepress build packages && nr build:redirects",
"docs:serve": "vitepress serve packages",
"lint": "eslint --cache .",
"lint:fix": "nr lint --fix",
Expand All @@ -37,29 +37,31 @@
"prepare": "simple-git-hooks"
},
"devDependencies": {
"@antfu/eslint-config": "^2.6.2",
"@antfu/eslint-config": "^2.6.4",
"@antfu/ni": "^0.21.12",
"@iconify/json": "^2.2.168",
"@iconify/json": "^2.2.184",
"@rollup/plugin-json": "^6.1.0",
"@rollup/plugin-replace": "^5.0.5",
"@shikijs/vitepress-twoslash": "^1.1.6",
"@type-challenges/utils": "^0.1.1",
"@types/fs-extra": "^11.0.4",
"@types/js-yaml": "^4.0.9",
"@types/md5": "^2.3.5",
"@types/node": "^20.11.0",
"@types/node": "^20.11.19",
"@types/remove-markdown": "^0.3.4",
"@types/semver": "^7.5.6",
"@vitest/coverage-v8": "^1.2.0",
"@vitest/ui": "^1.2.0",
"@vue/compiler-sfc": "^3.4.13",
"@vue/test-utils": "^2.4.3",
"@types/semver": "^7.5.7",
"@vite-pwa/vitepress": "^0.4.0",
"@vitest/coverage-v8": "^1.3.0",
"@vitest/ui": "^1.3.0",
"@vue/compiler-sfc": "^3.4.19",
"@vue/test-utils": "^2.4.4",
"@vueuse/core": "workspace:*",
"@vueuse/integrations": "workspace:*",
"@vueuse/math": "workspace:*",
"@vueuse/rxjs": "workspace:*",
"@vueuse/shared": "workspace:*",
"axios": "^1.6.5",
"bumpp": "^9.2.1",
"axios": "^1.6.7",
"bumpp": "^9.3.0",
"consola": "^3.2.3",
"esbuild-register": "^3.5.0",
"eslint": "^8.56.0",
Expand All @@ -68,49 +70,44 @@
"export-size": "^0.7.0",
"fake-indexeddb": "^5.0.2",
"fast-glob": "^3.3.2",
"firebase": "^10.7.1",
"firebase": "^10.8.0",
"fs-extra": "^11.2.0",
"fuse.js": "^7.0.0",
"google-font-installer": "^1.2.0",
"gray-matter": "^4.0.3",
"js-yaml": "^4.1.0",
"jsdom": "^23.2.0",
"lint-staged": "^15.2.0",
"jsdom": "^24.0.0",
"lint-staged": "^15.2.2",
"markdown-table": "^3.0.3",
"md5": "^2.3.0",
"msw": "1.0.1",
"node-fetch": "^3.3.2",
"node-fetch-native": "^1.6.1",
"node-fetch-native": "^1.6.2",
"ofetch": "^1.3.3",
"pnpm": "^8.14.1",
"postcss": "^8.4.33",
"pnpm": "^8.15.3",
"postcss": "^8.4.35",
"postcss-nested": "^6.0.1",
"prettier": "^3.2.2",
"prettier": "^3.2.5",
"prism-theme-vars": "^0.2.4",
"remove-markdown": "^0.5.0",
"rimraf": "^5.0.5",
"rollup": "^4.9.5",
"rollup": "^4.12.0",
"rollup-plugin-dts": "^6.1.0",
"rollup-plugin-esbuild": "^6.1.0",
"rollup-plugin-esbuild": "^6.1.1",
"rollup-plugin-pure": "^0.2.1",
"sharp": "0.32.6",
"shikiji": "0.10.0-beta.1",
"shikiji-transformers": "0.10.0-beta.1",
"shikiji-twoslash": "0.10.0-beta.1",
"simple-git": "^3.22.0",
"simple-git-hooks": "^2.9.0",
"taze": "^0.13.1",
"taze": "^0.13.3",
"typescript": "^5.3.3",
"unocss": "^0.58.3",
"unplugin-icons": "^0.18.2",
"unocss": "^0.58.5",
"unplugin-icons": "^0.18.5",
"unplugin-vue-components": "^0.26.0",
"vite": "^5.0.11",
"vite-plugin-inspect": "^0.8.1",
"vite-plugin-pwa": "^0.17.4",
"vitepress": "^1.0.0-rc.36",
"vitepress-plugin-twoslash": "0.10.0-beta.1",
"vitest": "^1.2.0",
"vue": "^3.4.13",
"vite": "^5.1.3",
"vite-plugin-inspect": "^0.8.3",
"vitepress": "^1.0.0-rc.44",
"vitest": "^1.3.0",
"vue": "^3.4.19",
"vue2": "npm:vue@^2.7.14"
},
"pnpm": {
Expand All @@ -119,14 +116,10 @@
]
},
"resolutions": {
"magic-string": "^0.30.5",
"rollup": "^4.9.5",
"shikiji": "0.10.0-beta.1",
"shikiji-transformers": "0.10.0-beta.1",
"shikiji-twoslash": "0.10.0-beta.1",
"vite": "^5.0.11",
"vitepress-plugin-twoslash": "0.10.0-beta.1",
"vue-demi": "^0.14.6"
"magic-string": "^0.30.7",
"rollup": "^4.12.0",
"vite": "^5.1.3",
"vue-demi": "^0.14.7"
},
"simple-git-hooks": {
"pre-commit": "npx lint-staged"
Expand Down
2 changes: 1 addition & 1 deletion packages/.test/mount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { InjectionKey, Ref } from 'vue-demi'
import { createApp, defineComponent, h, provide, ref } from 'vue-demi'

type InstanceType<V> = V extends { new (...arg: any[]): infer X } ? X : never
type VM<V> = InstanceType<V> & { unmount(): void }
type VM<V> = InstanceType<V> & { unmount: () => void }

export function mount<V>(Comp: V) {
const el = document.createElement('div')
Expand Down
77 changes: 70 additions & 7 deletions packages/.vitepress/config.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { resolve } from 'node:path'
import { defineConfig } from 'vitepress'
import { transformerTwoslash } from 'vitepress-plugin-twoslash'
import { transformerTwoslash } from '@shikijs/vitepress-twoslash'
import { withPwa } from '@vite-pwa/vitepress'
import { addonCategoryNames, categoryNames, coreCategoryNames, metadata } from '../metadata/metadata'
import { currentVersion, versions } from '../../meta/versions'
import viteConfig from './vite.config'
import { transformHead } from './transformHead'

const Guide = [
{ text: 'Get Started', link: '/guide/' },
Expand Down Expand Up @@ -51,7 +54,7 @@ const DefaultSideBar = [

const FunctionsSideBar = getFunctionsSideBar()

export default defineConfig({
export default withPwa(defineConfig({
title: 'VueUse',
description: 'Collection of essential Vue Composition Utilities',
lang: 'en-US',
Expand Down Expand Up @@ -167,25 +170,85 @@ export default defineConfig({
},
head: [
['meta', { name: 'theme-color', content: '#ffffff' }],
['link', { rel: 'icon', href: '/favicon-32x32.png', type: 'image/png' }],
['link', { rel: 'icon', href: '/favicon.svg', type: 'image/svg+xml' }],
['link', { rel: 'icon', href: '/favicon.ico', sizes: '48x48' }],
['link', { rel: 'icon', href: '/favicon.svg', sizes: 'any', type: 'image/svg+xml' }],
['meta', { name: 'author', content: 'Anthony Fu' }],
['meta', { property: 'og:title', content: 'VueUse' }],
['meta', { property: 'og:image', content: 'https://vueuse.org/og.png' }],
['meta', { property: 'og:description', content: 'Collection of essential Vue Composition Utilities' }],
['meta', { name: 'twitter:card', content: 'summary_large_image' }],
['meta', { name: 'twitter:creator', content: '@antfu7' }],
['meta', { name: 'twitter:image', content: 'https://vueuse.org/og.png' }],
['meta', { name: 'viewport', content: 'width=device-width, initial-scale=1.0, viewport-fit=cover' }],
['link', { rel: 'apple-touch-icon', href: '/apple-touch-icon.png', sizes: '180x180' }],

['link', { rel: 'dns-prefetch', href: 'https://fonts.gstatic.com' }],
['link', { rel: 'preconnect', crossorigin: 'anonymous', href: 'https://fonts.gstatic.com' }],
['link', { rel: 'stylesheet', href: 'https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap' }],
['link', { rel: 'stylesheet', href: 'https://fonts.googleapis.com/css2?family=Fira+Code&display=swap' }],
],

transformHead,
pwa: {
outDir: resolve(__dirname, 'dist'),
registerType: 'autoUpdate',
strategies: 'injectManifest',
srcDir: '.vitepress/',
filename: 'sw.ts',
injectRegister: 'inline',
manifest: {
id: '/',
name: 'VueUse',
short_name: 'VueUse',
description: 'Collection of Essential Vue Composition Utilities',
theme_color: '#ffffff',
start_url: '/',
lang: 'en-US',
dir: 'ltr',
orientation: 'natural',
display: 'standalone',
display_override: ['window-controls-overlay'],
categories: ['development', 'developer tools'],
icons: [
{
src: '/pwa-64x64.png',
sizes: '64x64',
type: 'image/png',
},
{
src: '/pwa-192x192.png',
sizes: '192x192',
type: 'image/png',
},
{
src: '/pwa-512x512.png',
sizes: '512x512',
type: 'image/png',
purpose: 'any',
},
{
src: '/maskable-icon.png',
sizes: '512x512',
type: 'image/png',
purpose: 'maskable',
},
],
edge_side_panel: {
preferred_width: 480,
},
screenshots: [{
src: 'og.png',
sizes: '1281x641',
type: 'image/png',
label: `Screenshot of VueUse`,
}],
},
injectManifest: {
globPatterns: ['**/*.{css,js,html,svg,png,ico,txt,woff2}', 'hashmap.json'],
globIgnores: ['og-*.png'],
},
},

vite: viteConfig,
})
}))

function getFunctionsSideBar() {
const links = []
Expand Down

0 comments on commit be6305e

Please sign in to comment.