vite-plugin-vue-devtools
Advanced tools
Comparing version
@@ -33,3 +33,2 @@ declare type AssetType = 'image' | 'font' | 'video' | 'audio' | 'text' | 'json' | 'other' | ||
declare interface RPCFunctions { | ||
@@ -54,3 +53,2 @@ componentGraph(): Promise<ModuleInfo[]> | ||
declare interface PackageMeta { | ||
@@ -57,0 +55,0 @@ type: string |
@@ -6,8 +6,8 @@ import { PluginOption } from 'vite'; | ||
/** | ||
* append an import to the module id ending with `appendTo` instead of adding a script into body | ||
* useful for projects that do not use html file as an entry | ||
* | ||
* WARNING: only set this if you know exactly what it does. | ||
* @default '' | ||
*/ | ||
* append an import to the module id ending with `appendTo` instead of adding a script into body | ||
* useful for projects that do not use html file as an entry | ||
* | ||
* WARNING: only set this if you know exactly what it does. | ||
* @default '' | ||
*/ | ||
appendTo?: string | RegExp; | ||
@@ -20,8 +20,8 @@ /** | ||
* } | ||
*/ | ||
*/ | ||
analyze?: Partial<AnalyzeOptions>; | ||
/** | ||
* Customize openInEditor host (e.g. http://localhost:3000) | ||
* @default false | ||
*/ | ||
* Customize openInEditor host (e.g. http://localhost:3000) | ||
* @default false | ||
*/ | ||
openInEditorHost?: string | false; | ||
@@ -28,0 +28,0 @@ } |
{ | ||
"name": "vite-plugin-vue-devtools", | ||
"type": "module", | ||
"version": "1.0.0-rc.5", | ||
"version": "1.0.0-rc.6", | ||
"description": "A vite plugin for Vue DevTools", | ||
@@ -47,3 +47,3 @@ "author": "webfansplz", | ||
"peerDependencies": { | ||
"vite": "^3.1.0 || ^4.0.0-0" | ||
"vite": "^3.1.0 || ^4.0.0-0 || ^5.0.0-0" | ||
}, | ||
@@ -55,8 +55,8 @@ "dependencies": { | ||
"sirv": "^2.0.3", | ||
"vite-plugin-inspect": "^0.7.38", | ||
"vite-plugin-vue-inspector": "^3.7.1", | ||
"@vite-plugin-vue-devtools/core": "1.0.0-rc.5" | ||
"vite-plugin-inspect": "^0.7.40", | ||
"vite-plugin-vue-inspector": "^4.0.1", | ||
"@vite-plugin-vue-devtools/core": "1.0.0-rc.6" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^20.6.2", | ||
"@types/node": "^20.8.3", | ||
"fast-glob": "^3.3.1", | ||
@@ -63,0 +63,0 @@ "image-meta": "^0.1.1", |
@@ -0,1 +1,4 @@ | ||
> [!IMPORTANT] | ||
> We are heavily refactoring the codebase, so there might only be limited support and a slow response now. The new version will be released soon, if you have any suggestions, please feel free to [create an issue](https://github.com/webfansplz/vite-plugin-vue-devtools/issues/new). | ||
<p align="center"> | ||
@@ -125,3 +128,3 @@ <img src="https://github.com/webfansplz/vite-plugin-vue-devtools/raw/main/screenshots/bg.png" /> | ||
* @default true | ||
*/ | ||
*/ | ||
rerenderTrace: boolean | ||
@@ -132,7 +135,7 @@ } | ||
/** | ||
* append an import to the module id ending with `appendTo` instead of adding a script into body | ||
* useful for projects that do not use html file as an entry | ||
* | ||
* WARNING: only set this if you know exactly what it does. | ||
*/ | ||
* append an import to the module id ending with `appendTo` instead of adding a script into body | ||
* useful for projects that do not use html file as an entry | ||
* | ||
* WARNING: only set this if you know exactly what it does. | ||
*/ | ||
appendTo?: string | RegExp | ||
@@ -145,9 +148,9 @@ /** | ||
* } | ||
*/ | ||
*/ | ||
analyze?: Partial<AnalyzeOptions> | ||
/** | ||
* Customize openInEditor host (e.g. http://localhost:3000) | ||
* @default false | ||
*/ | ||
* Customize openInEditor host (e.g. http://localhost:3000) | ||
* @default false | ||
*/ | ||
openInEditorHost?: string | false | ||
@@ -154,0 +157,0 @@ } |
@@ -124,3 +124,3 @@ <p align="center"> | ||
* @default true | ||
*/ | ||
*/ | ||
rerenderTrace: boolean | ||
@@ -131,7 +131,7 @@ } | ||
/** | ||
* append an import to the module id ending with `appendTo` instead of adding a script into body | ||
* useful for projects that do not use html file as an entry | ||
* | ||
* WARNING: only set this if you know exactly what it does. | ||
*/ | ||
* append an import to the module id ending with `appendTo` instead of adding a script into body | ||
* useful for projects that do not use html file as an entry | ||
* | ||
* WARNING: only set this if you know exactly what it does. | ||
*/ | ||
appendTo?: string | RegExp | ||
@@ -145,3 +145,3 @@ | ||
* } | ||
*/ | ||
*/ | ||
analyze?: Partial<AnalyzeOptions> | ||
@@ -148,0 +148,0 @@ } |
@@ -201,8 +201,10 @@ import { computed, onMounted, reactive, ref, shallowRef, watchEffect } from 'vue' | ||
const iframe = iframeGetter() | ||
const pip = popupWindow.value = await documentPictureInPicture.requestWindow({ | ||
width: Math.round(window.innerWidth * state.value.width / 100), | ||
height: Math.round(window.innerHeight * state.value.height / 100), | ||
}) | ||
const style = pip.document.createElement('style') | ||
style.innerHTML = ` | ||
let isSuccess = true | ||
try { | ||
const pip = popupWindow.value = await documentPictureInPicture.requestWindow({ | ||
width: Math.round(window.innerWidth * state.value.width / 100), | ||
height: Math.round(window.innerHeight * state.value.height / 100), | ||
}) | ||
const style = pip.document.createElement('style') | ||
style.innerHTML = ` | ||
body { | ||
@@ -219,15 +221,21 @@ margin: 0; | ||
` | ||
pip.__VUE_DEVTOOLS_GLOBAL_HOOK__ = hook | ||
pip.__VUE_DEVTOOLS_IS_POPUP__ = true | ||
pip.document.title = 'Vue DevTools' | ||
pip.document.head.appendChild(style) | ||
pip.document.body.appendChild(iframe) | ||
pip.addEventListener('resize', () => { | ||
state.value.width = Math.round(pip.innerWidth / window.innerWidth * 100) | ||
state.value.height = Math.round(pip.innerHeight / window.innerHeight * 100) | ||
}) | ||
pip.addEventListener('pagehide', () => { | ||
popupWindow.value = null | ||
pip.close() | ||
}) | ||
pip.__VUE_DEVTOOLS_GLOBAL_HOOK__ = hook | ||
pip.__VUE_DEVTOOLS_IS_POPUP__ = true | ||
pip.document.title = 'Vue DevTools' | ||
pip.document.head.appendChild(style) | ||
pip.document.body.appendChild(iframe) | ||
pip.addEventListener('resize', () => { | ||
state.value.width = Math.round(pip.innerWidth / window.innerWidth * 100) | ||
state.value.height = Math.round(pip.innerHeight / window.innerHeight * 100) | ||
}) | ||
pip.addEventListener('pagehide', () => { | ||
popupWindow.value = null | ||
pip.close() | ||
}) | ||
} | ||
catch (error) { | ||
isSuccess = false | ||
console.error(`[vite-plugin-vue-devtools] Open popup mode failed: ${(error as DOMException).message}`) | ||
} | ||
return isSuccess | ||
} | ||
@@ -234,0 +242,0 @@ return { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
196
1.55%5601381
-0.4%59
-1.67%116315
-1.01%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
Updated