@nuxt/devtools-nightly 4.0.0-29893186.47ed265 → 4.0.0-29893215.c87df43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -26,7 +26,7 @@ import { DEVTOOLS_TERMINALS_DOCK_ID, DEVTOOLS_MOUNT_PATH } from '@vitejs/devtool
|
|
|
26
26
|
import { debounce } from 'perfect-debounce';
|
|
27
27
|
import { Server } from 'node:tls';
|
|
28
28
|
|
|
29
|
-
const version = "4.0.0-
|
|
29
|
+
const version = "4.0.0-29893215.c87df43";
|
|
30
30
|
const peerDependencies = {
|
|
31
31
|
"@nuxt/kit": "^4.0.0-0 || ^5.0.0-0",
|
|
32
32
|
nitro: "*",
|
package/dist/module.json
CHANGED
|
@@ -7,6 +7,7 @@ import { computed, effect, isRef, markRaw, nextTick, reactive, ref, shallowReact
|
|
|
7
7
|
import { useAppConfig } from "#imports";
|
|
8
8
|
import { initTimelineMetrics } from "../../function-metrics-helpers.js";
|
|
9
9
|
const NUXT_DOCK_ANCHOR_ID = "nuxt:devtools";
|
|
10
|
+
const VUE_TRACER_DOCK_ID = "vue-tracer";
|
|
10
11
|
function getDevframeContext() {
|
|
11
12
|
return getDevframeClientContext();
|
|
12
13
|
}
|
|
@@ -34,7 +35,7 @@ export async function setupDevToolsClient({
|
|
|
34
35
|
close() {
|
|
35
36
|
const ctx = getDevframeContext();
|
|
36
37
|
if (ctx)
|
|
37
|
-
ctx
|
|
38
|
+
closePanel(ctx);
|
|
38
39
|
},
|
|
39
40
|
open() {
|
|
40
41
|
const ctx = getDevframeContext();
|
|
@@ -94,10 +95,46 @@ export async function setupDevToolsClient({
|
|
|
94
95
|
left: "0",
|
|
95
96
|
top: "0"
|
|
96
97
|
});
|
|
98
|
+
const supportsTopLayer = typeof component.showPopover === "function";
|
|
99
|
+
function raiseToTopLayer() {
|
|
100
|
+
if (!supportsTopLayer)
|
|
101
|
+
return;
|
|
102
|
+
if (component.matches(":popover-open"))
|
|
103
|
+
component.hidePopover();
|
|
104
|
+
component.showPopover();
|
|
105
|
+
}
|
|
106
|
+
if (supportsTopLayer) {
|
|
107
|
+
component.popover = "manual";
|
|
108
|
+
Object.assign(component.style, {
|
|
109
|
+
inset: "auto",
|
|
110
|
+
margin: "0",
|
|
111
|
+
padding: "0",
|
|
112
|
+
border: "none",
|
|
113
|
+
background: "transparent",
|
|
114
|
+
overflow: "visible"
|
|
115
|
+
});
|
|
116
|
+
raiseToTopLayer();
|
|
117
|
+
}
|
|
118
|
+
let reopenPanelOnClose = false;
|
|
119
|
+
function holdPanelWhileInspecting() {
|
|
120
|
+
queueMicrotask(() => {
|
|
121
|
+
const ctx = getDevframeContext();
|
|
122
|
+
if (!props.matched || !ctx?.panel.session.open)
|
|
123
|
+
return;
|
|
124
|
+
ctx.panel.session.open = false;
|
|
125
|
+
reopenPanelOnClose = true;
|
|
126
|
+
});
|
|
127
|
+
}
|
|
97
128
|
component.addEventListener("close", () => {
|
|
98
129
|
props.matched = void 0;
|
|
99
130
|
inspectorState.isEnabled = false;
|
|
100
131
|
inspectorState.isVisible = false;
|
|
132
|
+
if (reopenPanelOnClose) {
|
|
133
|
+
reopenPanelOnClose = false;
|
|
134
|
+
const ctx = getDevframeContext();
|
|
135
|
+
if (ctx)
|
|
136
|
+
ctx.panel.session.open = true;
|
|
137
|
+
}
|
|
101
138
|
});
|
|
102
139
|
component.addEventListener("selectParent", () => {
|
|
103
140
|
const parent = inspectorState.main?.getParent();
|
|
@@ -132,6 +169,8 @@ export async function setupDevToolsClient({
|
|
|
132
169
|
inspectorState.isVisible = true;
|
|
133
170
|
props.matched = info;
|
|
134
171
|
props.mouse = { x: e.clientX, y: e.clientY };
|
|
172
|
+
raiseToTopLayer();
|
|
173
|
+
holdPanelWhileInspecting();
|
|
135
174
|
});
|
|
136
175
|
const isAvailable = ref(inspectorHasData());
|
|
137
176
|
if (!isAvailable.value) {
|
|
@@ -139,21 +178,21 @@ export async function setupDevToolsClient({
|
|
|
139
178
|
isAvailable.value = inspectorHasData();
|
|
140
179
|
});
|
|
141
180
|
}
|
|
181
|
+
function setActive(active) {
|
|
182
|
+
const ctx = getDevframeContext();
|
|
183
|
+
if (ctx?.docks.getStateById(VUE_TRACER_DOCK_ID)) {
|
|
184
|
+
ctx.docks.setActionActive(VUE_TRACER_DOCK_ID, active);
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
inspectorState.isVisible = active;
|
|
188
|
+
inspectorState.isEnabled = active;
|
|
189
|
+
}
|
|
142
190
|
return inspector = markRaw({
|
|
143
191
|
isAvailable,
|
|
144
192
|
isEnabled: toRef(inspectorState, "isVisible"),
|
|
145
|
-
enable: () =>
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
},
|
|
149
|
-
disable: () => {
|
|
150
|
-
inspectorState.isVisible = false;
|
|
151
|
-
inspectorState.isEnabled = false;
|
|
152
|
-
},
|
|
153
|
-
toggle: () => {
|
|
154
|
-
inspectorState.isEnabled = !inspectorState.isEnabled;
|
|
155
|
-
inspectorState.isVisible = inspectorState.isEnabled;
|
|
156
|
-
}
|
|
193
|
+
enable: () => setActive(true),
|
|
194
|
+
disable: () => setActive(false),
|
|
195
|
+
toggle: () => setActive(!inspectorState.isEnabled)
|
|
157
196
|
});
|
|
158
197
|
}
|
|
159
198
|
setupRouteTracking(timeline, router);
|
|
@@ -164,6 +203,10 @@ export async function setupDevToolsClient({
|
|
|
164
203
|
client.devtools.toggle();
|
|
165
204
|
});
|
|
166
205
|
}
|
|
206
|
+
function closePanel(ctx) {
|
|
207
|
+
ctx.docks.switchEntry(null);
|
|
208
|
+
ctx.panel.session.open = false;
|
|
209
|
+
}
|
|
167
210
|
export function useClientColorMode() {
|
|
168
211
|
const explicitColor = ref();
|
|
169
212
|
const systemColor = ref();
|
|
@@ -190,6 +190,43 @@ function onClickOutside(target, handler, options = {}) {
|
|
|
190
190
|
return stop;
|
|
191
191
|
}
|
|
192
192
|
//#endregion
|
|
193
|
+
//#region onKeyStroke/index.ts
|
|
194
|
+
function createKeyPredicate(keyFilter) {
|
|
195
|
+
if (typeof keyFilter === "function") return keyFilter;
|
|
196
|
+
else if (typeof keyFilter === "string") return (event) => event.key === keyFilter;
|
|
197
|
+
else if (Array.isArray(keyFilter)) return (event) => keyFilter.includes(event.key);
|
|
198
|
+
return () => true;
|
|
199
|
+
}
|
|
200
|
+
function onKeyStroke(...args) {
|
|
201
|
+
let key;
|
|
202
|
+
let handler;
|
|
203
|
+
let options = {};
|
|
204
|
+
if (args.length === 3) {
|
|
205
|
+
key = args[0];
|
|
206
|
+
handler = args[1];
|
|
207
|
+
options = args[2];
|
|
208
|
+
} else if (args.length === 2) {
|
|
209
|
+
if (typeof args[1] === "object") {
|
|
210
|
+
key = true;
|
|
211
|
+
handler = args[0];
|
|
212
|
+
options = args[1];
|
|
213
|
+
} else {
|
|
214
|
+
key = args[0];
|
|
215
|
+
handler = args[1];
|
|
216
|
+
}
|
|
217
|
+
} else {
|
|
218
|
+
key = true;
|
|
219
|
+
handler = args[0];
|
|
220
|
+
}
|
|
221
|
+
const { target = defaultWindow, eventName = "keydown", passive = false, dedupe = false } = options;
|
|
222
|
+
const predicate = createKeyPredicate(key);
|
|
223
|
+
const listener = (e) => {
|
|
224
|
+
if (e.repeat && toValue(dedupe)) return;
|
|
225
|
+
if (predicate(e)) handler(e);
|
|
226
|
+
};
|
|
227
|
+
return useEventListener(target, eventName, listener, passive);
|
|
228
|
+
}
|
|
229
|
+
//#endregion
|
|
193
230
|
//#region useDraggable/index.ts
|
|
194
231
|
const defaultScrollConfig = {
|
|
195
232
|
speed: 2,
|
|
@@ -441,6 +478,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
441
478
|
close();
|
|
442
479
|
});
|
|
443
480
|
});
|
|
481
|
+
onKeyStroke("Escape", () => {
|
|
482
|
+
if (__props.props.matched)
|
|
483
|
+
close();
|
|
484
|
+
});
|
|
444
485
|
function close() {
|
|
445
486
|
emit("close");
|
|
446
487
|
}
|
|
@@ -452,6 +493,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
452
493
|
return;
|
|
453
494
|
const file = `${__props.props.matched.pos[0]}:${__props.props.matched.pos[1]}:${__props.props.matched.pos[2]}`;
|
|
454
495
|
emit("openInEditor", file);
|
|
496
|
+
close();
|
|
455
497
|
}
|
|
456
498
|
function generateUniqueSelector(element) {
|
|
457
499
|
if (!element)
|
|
@@ -545,6 +587,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
545
587
|
toastTimer = setTimeout(() => {
|
|
546
588
|
showToast.value = false;
|
|
547
589
|
}, 6e3);
|
|
590
|
+
close();
|
|
548
591
|
} catch (error) {
|
|
549
592
|
console.error("Failed to copy agent info:", error);
|
|
550
593
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxt/devtools-nightly",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "4.0.0-
|
|
4
|
+
"version": "4.0.0-29893215.c87df43",
|
|
5
5
|
"description": "The Nuxt DevTools gives you insights and transparency about your Nuxt App.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://nuxt.com/modules/devtools",
|
|
@@ -43,18 +43,18 @@
|
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@devframes/hub": "^1.
|
|
47
|
-
"@devframes/plugin-assets": "^1.
|
|
48
|
-
"@devframes/plugin-code-server": "^1.
|
|
49
|
-
"@devframes/plugin-data-inspector": "^1.
|
|
50
|
-
"@devframes/plugin-og": "^1.
|
|
51
|
-
"@nuxt/devtools-assets": "npm:@nuxt/devtools-assets-nightly@4.0.0-
|
|
52
|
-
"@nuxt/devtools-kit": "npm:@nuxt/devtools-kit-nightly@4.0.0-
|
|
46
|
+
"@devframes/hub": "^1.3.1",
|
|
47
|
+
"@devframes/plugin-assets": "^1.3.1",
|
|
48
|
+
"@devframes/plugin-code-server": "^1.3.1",
|
|
49
|
+
"@devframes/plugin-data-inspector": "^1.3.1",
|
|
50
|
+
"@devframes/plugin-og": "^1.3.1",
|
|
51
|
+
"@nuxt/devtools-assets": "npm:@nuxt/devtools-assets-nightly@4.0.0-29893215.c87df43",
|
|
52
|
+
"@nuxt/devtools-kit": "npm:@nuxt/devtools-kit-nightly@4.0.0-29893215.c87df43",
|
|
53
53
|
"@vitejs/devtools": "^0.8.0",
|
|
54
54
|
"@vitejs/devtools-kit": "^0.8.0",
|
|
55
55
|
"consola": "^3.4.2",
|
|
56
56
|
"destr": "^2.0.5",
|
|
57
|
-
"devframe": "^1.
|
|
57
|
+
"devframe": "^1.3.1",
|
|
58
58
|
"error-stack-parser-es": "^2.0.1",
|
|
59
59
|
"escape-string-regexp": "^5.0.0",
|
|
60
60
|
"fast-npm-meta": "^2.2.0",
|
|
@@ -66,10 +66,10 @@
|
|
|
66
66
|
"pathe": "^2.0.3",
|
|
67
67
|
"perfect-debounce": "^2.1.0",
|
|
68
68
|
"tinyglobby": "^0.2.17",
|
|
69
|
-
"unplugin": "^3.
|
|
69
|
+
"unplugin": "^3.7.0",
|
|
70
70
|
"verkit": "^0.5.0",
|
|
71
71
|
"vite-plugin-vue-devtools": "^9.0.0-beta.1",
|
|
72
|
-
"vite-plugin-vue-tracer": "^1.
|
|
72
|
+
"vite-plugin-vue-tracer": "^1.7.0"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
75
|
"@antfu/utils": "^9.3.0",
|
|
@@ -79,9 +79,9 @@
|
|
|
79
79
|
"@iconify-json/ph": "^1.2.2",
|
|
80
80
|
"@iconify-json/ri": "^1.2.10",
|
|
81
81
|
"@iconify-json/simple-icons": "^1.2.101",
|
|
82
|
-
"@iconify-json/tabler": "^1.2.
|
|
83
|
-
"@nuxt/kit": "npm:@nuxt/kit-nightly@5.0.0-
|
|
84
|
-
"@nuxt/schema": "npm:@nuxt/schema-nightly@5.0.0-
|
|
82
|
+
"@iconify-json/tabler": "^1.2.43",
|
|
83
|
+
"@nuxt/kit": "npm:@nuxt/kit-nightly@5.0.0-2611010234-c709ec8",
|
|
84
|
+
"@nuxt/schema": "npm:@nuxt/schema-nightly@5.0.0-2611010234-c709ec8",
|
|
85
85
|
"@parcel/watcher": "^2.6.0",
|
|
86
86
|
"@types/markdown-it-link-attributes": "^3.0.5",
|
|
87
87
|
"@unocss/nuxt": "^66.12.0",
|
|
@@ -91,16 +91,16 @@
|
|
|
91
91
|
"cronstrue": "^3.38.0",
|
|
92
92
|
"diff": "^9.0.0",
|
|
93
93
|
"dompurify": "^3.4.17",
|
|
94
|
-
"exsolve": "^1.
|
|
94
|
+
"exsolve": "^1.2.0",
|
|
95
95
|
"floating-vue": "^5.4.0",
|
|
96
96
|
"fuse.js": "^7.5.0",
|
|
97
97
|
"json-editor-vue": "^0.19.2",
|
|
98
98
|
"lightningcss": "^1.33.0",
|
|
99
99
|
"markdown-exit": "^1.3.0",
|
|
100
100
|
"markdown-it-link-attributes": "^4.0.1",
|
|
101
|
-
"nitro": "^3.0.
|
|
101
|
+
"nitro": "^3.0.261029-rc",
|
|
102
102
|
"nitropack": "^2.13.5",
|
|
103
|
-
"nuxt": "npm:nuxt-nightly@5.0.0-
|
|
103
|
+
"nuxt": "npm:nuxt-nightly@5.0.0-2611010234-c709ec8",
|
|
104
104
|
"ofetch": "^1.5.1",
|
|
105
105
|
"package-manager-detector": "^1.9.0",
|
|
106
106
|
"quicktype-core": "22.0.0",
|
|
@@ -114,14 +114,14 @@
|
|
|
114
114
|
"unbuild": "^3.6.1",
|
|
115
115
|
"unimport": "^7.0.2",
|
|
116
116
|
"unocss": "^66.12.0",
|
|
117
|
-
"unplugin-vue": "^8.0.
|
|
117
|
+
"unplugin-vue": "^8.0.1",
|
|
118
118
|
"unplugin-vue-markdown": "^32.1.1",
|
|
119
119
|
"unstorage": "^1.17.6",
|
|
120
120
|
"vanilla-jsoneditor": "^3.13.0",
|
|
121
121
|
"vis-data": "^8.0.6",
|
|
122
|
-
"vis-network": "^10.1.
|
|
122
|
+
"vis-network": "^10.1.4",
|
|
123
123
|
"vite-plugin-inspect": "^12.1.0",
|
|
124
|
-
"vue-tsc": "
|
|
124
|
+
"vue-tsc": "3.3.13",
|
|
125
125
|
"vue-virtual-scroller": "^3.0.5"
|
|
126
126
|
},
|
|
127
127
|
"scripts": {
|