forked from cn-docs/vueuse
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
38 changed files
with
1,409 additions
and
1,353 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,16 @@ | ||
{ | ||
"name": "@vueuse/monorepo", | ||
"type": "module", | ||
"version": "10.3.0", | ||
"private": true, | ||
"packageManager": "[email protected].10", | ||
"packageManager": "[email protected].12", | ||
"description": "Collection of essential Vue Composition Utilities", | ||
"author": "Anthony Fu<https://github.com/antfu>", | ||
"license": "MIT", | ||
"scripts": { | ||
"build": "nr update && esno scripts/build.ts", | ||
"build": "nr update && esno scripts/build-run.ts", | ||
"build:redirects": "esno scripts/redirects.ts", | ||
"build:rollup": "NODE_OPTIONS=\"--max-old-space-size=6144\" rollup -c", | ||
"build:rollup": "NODE_OPTIONS=\"--max-old-space-size=6144\" rollup --config=rollup.config.ts --configPlugin=rollup-plugin-esbuild", | ||
"build:types": "tsc --emitDeclarationOnly && nr types:fix", | ||
"clean": "rimraf --glob dist types \"packages/*/dist\"", | ||
"dev": "nr update && nr docs", | ||
|
@@ -32,24 +33,24 @@ | |
"types:fix": "esno scripts/fix-types.ts", | ||
"update": "nr -C packages/metadata update && esno scripts/update.ts", | ||
"update:full": "nr update && nr build:types", | ||
"watch": "esno scripts/build.ts --watch" | ||
"watch": "esno scripts/build-run.ts --watch" | ||
}, | ||
"devDependencies": { | ||
"@antfu/eslint-config": "^0.39.8", | ||
"@antfu/ni": "^0.21.5", | ||
"@iconify/json": "^2.2.84", | ||
"@antfu/eslint-config": "^0.41.0", | ||
"@antfu/ni": "^0.21.6", | ||
"@iconify/json": "^2.2.106", | ||
"@rollup/plugin-json": "^6.0.0", | ||
"@rollup/plugin-replace": "^5.0.2", | ||
"@type-challenges/utils": "^0.1.1", | ||
"@types/fs-extra": "^11.0.1", | ||
"@types/js-yaml": "^4.0.5", | ||
"@types/md5": "^2.3.2", | ||
"@types/node": "^20.4.4", | ||
"@types/prettier": "^2.7.3", | ||
"@types/node": "^20.5.6", | ||
"@types/prettier": "^3.0.0", | ||
"@types/remove-markdown": "^0.3.1", | ||
"@types/semver": "^7.5.0", | ||
"@vitest/coverage-c8": "^0.33.0", | ||
"@vitest/ui": "^0.33.0", | ||
"@vitest/ui": "^0.34.3", | ||
"@vue/compiler-sfc": "^3.3.4", | ||
"@vue/test-utils": "^2.4.1", | ||
"@vueuse/core": "workspace:*", | ||
|
@@ -58,12 +59,12 @@ | |
"@vueuse/rxjs": "workspace:*", | ||
"@vueuse/shared": "workspace:*", | ||
"axios": "^1.4.0", | ||
"bumpp": "^9.1.1", | ||
"bumpp": "^9.2.0", | ||
"consola": "^3.2.3", | ||
"esbuild-register": "^3.4.2", | ||
"eslint": "8.45.0", | ||
"eslint": "8.47.0", | ||
"esno": "^0.17.0", | ||
"export-size": "^0.5.2", | ||
"export-size": "^0.6.0", | ||
"fake-indexeddb": "^4.0.2", | ||
"fast-glob": "^3.3.1", | ||
"firebase": "^9.23.0", | ||
|
@@ -73,37 +74,37 @@ | |
"gray-matter": "^4.0.3", | ||
"js-yaml": "^4.1.0", | ||
"jsdom": "^22.1.0", | ||
"lint-staged": "^13.2.3", | ||
"lint-staged": "^14.0.1", | ||
"markdown-table": "^3.0.3", | ||
"md5": "^2.3.0", | ||
"msw": "1.0.1", | ||
"node-fetch": "^3.3.1", | ||
"node-fetch-native": "^1.2.0", | ||
"node-fetch": "^3.3.2", | ||
"node-fetch-native": "^1.4.0", | ||
"ohmyfetch": "^0.4.21", | ||
"pnpm": "^8.6.10", | ||
"postcss": "^8.4.27", | ||
"pnpm": "^8.6.12", | ||
"postcss": "^8.4.28", | ||
"postcss-nested": "^6.0.1", | ||
"prettier": "^2.8.8", | ||
"prettier": "^3.0.2", | ||
"prism-theme-vars": "^0.2.4", | ||
"remove-markdown": "^0.5.0", | ||
"rimraf": "^5.0.1", | ||
"rollup": "^3.26.3", | ||
"rollup-plugin-dts": "^5.3.0", | ||
"rollup": "^3.28.1", | ||
"rollup-plugin-dts": "^6.0.0", | ||
"rollup-plugin-esbuild": "^5.0.0", | ||
"rollup-plugin-pure": "^0.1.1", | ||
"sharp": "0.32.4", | ||
"sharp": "0.32.5", | ||
"simple-git": "^3.19.1", | ||
"simple-git-hooks": "^2.9.0", | ||
"taze": "^0.11.2", | ||
"typescript": "5.1.6", | ||
"unocss": "^0.53.6", | ||
"typescript": "5.2.2", | ||
"unocss": "^0.55.3", | ||
"unplugin-icons": "^0.16.5", | ||
"unplugin-vue-components": "^0.25.1", | ||
"vite": "^4.4.7", | ||
"vite-plugin-inspect": "^0.7.33", | ||
"vite": "^4.4.9", | ||
"vite-plugin-inspect": "^0.7.38", | ||
"vite-plugin-pwa": "^0.16.4", | ||
"vitepress": "1.0.0-beta.6", | ||
"vitest": "^0.33.0", | ||
"vitepress": "1.0.0-rc.4", | ||
"vitest": "^0.34.3", | ||
"vue": "^3.3.4", | ||
"vue2": "npm:vue@^2.7.14" | ||
}, | ||
|
@@ -112,9 +113,9 @@ | |
"electron" | ||
], | ||
"overrides": { | ||
"vue-demi": "0.14.5", | ||
"magic-string": "^0.30.0", | ||
"sourcemap-codec": "npm:@jridgewell/sourcemap-codec@^1.4.15" | ||
"sourcemap-codec": "npm:@jridgewell/sourcemap-codec@^1.4.15", | ||
"vue-demi": "0.14.5" | ||
} | ||
}, | ||
"simple-git-hooks": { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/** | ||
* Resolves an element from a given element, window, or document. | ||
* | ||
* @internal | ||
*/ | ||
export function resolveElement( | ||
el: HTMLElement | SVGElement | Window | Document | null | undefined, | ||
): HTMLElement | SVGElement | null | undefined { | ||
if (typeof Window !== 'undefined' && el instanceof Window) | ||
return el.document.documentElement | ||
|
||
if (typeof Document !== 'undefined' && el instanceof Document) | ||
return el.documentElement | ||
|
||
return el as HTMLElement | SVGElement | null | undefined | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.