@vitejs/devtools 0.0.0-alpha.24 → 0.0.0-alpha.25
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.
- package/dist/{DockIcon-B3uZMhP_.js → DockIcon-CG2NSDoX.js} +2 -2
- package/dist/{ViewBuiltinLogs-FLr_sRZn.js → ViewBuiltinLogs-CUz-jlMA.js} +1 -1
- package/dist/{ViewBuiltinTerminals-D-EWWPT5.js → ViewBuiltinTerminals-BKqSU-x4.js} +3 -3
- package/dist/{cli-commands-tTICAwZZ.js → cli-commands-DEf9IsfU.js} +1 -1
- package/dist/cli-commands.js +2 -2
- package/dist/cli.js +2 -2
- package/dist/client/inject.js +3 -3
- package/dist/client/standalone/assets/ViewBuiltinLogs-DPvwWqqt.js +1 -0
- package/dist/client/standalone/assets/{ViewBuiltinTerminals-x7geWavo.js → ViewBuiltinTerminals-BAc9-MAy.js} +1 -1
- package/dist/client/standalone/assets/{index-BQSrRIa9.css → index-BgrADCac.css} +1 -1
- package/dist/client/standalone/assets/{index-BTGj0xT1.js → index-DXUNB7Hd.js} +2 -2
- package/dist/client/standalone/index.html +2 -2
- package/dist/client/webcomponents.d.ts +1 -1
- package/dist/client/webcomponents.js +258 -89
- package/dist/{dist-Ce2tZLIf.js → dist-B-r4P83Y.js} +104 -2
- package/dist/{docks-C4bgrO3z.js → docks-Dgft7LEp.js} +8 -7
- package/dist/{index-BYIZX1ss.d.ts → index-CmOJZ3e5.d.ts} +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/{plugins-Palbn5Oi.js → plugins-CCFu2oMz.js} +4 -5
- package/dist/{vue.runtime.esm-bundler-B98sE5ly.js → vue.runtime.esm-bundler-B7xD_5x9.js} +19 -2
- package/package.json +8 -9
- package/dist/client/standalone/assets/ViewBuiltinLogs-CnVEaSMm.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as
|
|
1
|
+
import { A as customRef, B as toValue, D as watchEffect, E as watch, F as readonly, I as ref, L as shallowRef, N as onScopeDispose, R as toRef$1, V as unref, _ as hasInjectionContext, b as onMounted, h as getCurrentInstance, j as getCurrentScope, o as computed, v as inject, y as nextTick } from "./vue.runtime.esm-bundler-B7xD_5x9.js";
|
|
2
2
|
|
|
3
3
|
//#region ../../node_modules/.pnpm/@vueuse+shared@14.1.0_vue@3.5.26_typescript@5.9.3_/node_modules/@vueuse/shared/dist/index.js
|
|
4
4
|
/**
|
|
@@ -40,6 +40,11 @@ const notNullish = (val) => val != null;
|
|
|
40
40
|
const toString = Object.prototype.toString;
|
|
41
41
|
const isObject = (val) => toString.call(val) === "[object Object]";
|
|
42
42
|
const noop = () => {};
|
|
43
|
+
const isIOS = /* @__PURE__ */ getIsIOS();
|
|
44
|
+
function getIsIOS() {
|
|
45
|
+
var _window, _window2, _window3;
|
|
46
|
+
return isClient && !!((_window = window) === null || _window === void 0 || (_window = _window.navigator) === null || _window === void 0 ? void 0 : _window.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((_window2 = window) === null || _window2 === void 0 || (_window2 = _window2.navigator) === null || _window2 === void 0 ? void 0 : _window2.maxTouchPoints) > 2 && /iPad|Macintosh/.test((_window3 = window) === null || _window3 === void 0 ? void 0 : _window3.navigator.userAgent));
|
|
47
|
+
}
|
|
43
48
|
function toRef(...args) {
|
|
44
49
|
if (args.length !== 1) return toRef$1(...args);
|
|
45
50
|
const r = args[0];
|
|
@@ -202,6 +207,13 @@ function tryOnMounted(fn, sync = true, target) {
|
|
|
202
207
|
else if (sync) fn();
|
|
203
208
|
else nextTick(fn);
|
|
204
209
|
}
|
|
210
|
+
function watchDebounced(source, cb, options = {}) {
|
|
211
|
+
const { debounce = 0, maxWait = void 0, ...watchOptions } = options;
|
|
212
|
+
return watchWithFilter(source, cb, {
|
|
213
|
+
...watchOptions,
|
|
214
|
+
eventFilter: debounceFilter(debounce, { maxWait })
|
|
215
|
+
});
|
|
216
|
+
}
|
|
205
217
|
/**
|
|
206
218
|
* Shorthand for watching value with {immediate: true}
|
|
207
219
|
*
|
|
@@ -256,6 +268,96 @@ function useEventListener(...args) {
|
|
|
256
268
|
});
|
|
257
269
|
}, { flush: "post" });
|
|
258
270
|
}
|
|
271
|
+
let _iOSWorkaround = false;
|
|
272
|
+
function onClickOutside(target, handler, options = {}) {
|
|
273
|
+
const { window: window$1 = defaultWindow, ignore = [], capture = true, detectIframe = false, controls = false } = options;
|
|
274
|
+
if (!window$1) return controls ? {
|
|
275
|
+
stop: noop,
|
|
276
|
+
cancel: noop,
|
|
277
|
+
trigger: noop
|
|
278
|
+
} : noop;
|
|
279
|
+
if (isIOS && !_iOSWorkaround) {
|
|
280
|
+
_iOSWorkaround = true;
|
|
281
|
+
const listenerOptions = { passive: true };
|
|
282
|
+
Array.from(window$1.document.body.children).forEach((el) => el.addEventListener("click", noop, listenerOptions));
|
|
283
|
+
window$1.document.documentElement.addEventListener("click", noop, listenerOptions);
|
|
284
|
+
}
|
|
285
|
+
let shouldListen = true;
|
|
286
|
+
const shouldIgnore = (event) => {
|
|
287
|
+
return toValue(ignore).some((target$1) => {
|
|
288
|
+
if (typeof target$1 === "string") return Array.from(window$1.document.querySelectorAll(target$1)).some((el) => el === event.target || event.composedPath().includes(el));
|
|
289
|
+
else {
|
|
290
|
+
const el = unrefElement(target$1);
|
|
291
|
+
return el && (event.target === el || event.composedPath().includes(el));
|
|
292
|
+
}
|
|
293
|
+
});
|
|
294
|
+
};
|
|
295
|
+
/**
|
|
296
|
+
* Determines if the given target has multiple root elements.
|
|
297
|
+
* Referenced from: https://github.com/vuejs/test-utils/blob/ccb460be55f9f6be05ab708500a41ec8adf6f4bc/src/vue-wrapper.ts#L21
|
|
298
|
+
*/
|
|
299
|
+
function hasMultipleRoots(target$1) {
|
|
300
|
+
const vm = toValue(target$1);
|
|
301
|
+
return vm && vm.$.subTree.shapeFlag === 16;
|
|
302
|
+
}
|
|
303
|
+
function checkMultipleRoots(target$1, event) {
|
|
304
|
+
const vm = toValue(target$1);
|
|
305
|
+
const children = vm.$.subTree && vm.$.subTree.children;
|
|
306
|
+
if (children == null || !Array.isArray(children)) return false;
|
|
307
|
+
return children.some((child) => child.el === event.target || event.composedPath().includes(child.el));
|
|
308
|
+
}
|
|
309
|
+
const listener = (event) => {
|
|
310
|
+
const el = unrefElement(target);
|
|
311
|
+
if (event.target == null) return;
|
|
312
|
+
if (!(el instanceof Element) && hasMultipleRoots(target) && checkMultipleRoots(target, event)) return;
|
|
313
|
+
if (!el || el === event.target || event.composedPath().includes(el)) return;
|
|
314
|
+
if ("detail" in event && event.detail === 0) shouldListen = !shouldIgnore(event);
|
|
315
|
+
if (!shouldListen) {
|
|
316
|
+
shouldListen = true;
|
|
317
|
+
return;
|
|
318
|
+
}
|
|
319
|
+
handler(event);
|
|
320
|
+
};
|
|
321
|
+
let isProcessingClick = false;
|
|
322
|
+
const cleanup = [
|
|
323
|
+
useEventListener(window$1, "click", (event) => {
|
|
324
|
+
if (!isProcessingClick) {
|
|
325
|
+
isProcessingClick = true;
|
|
326
|
+
setTimeout(() => {
|
|
327
|
+
isProcessingClick = false;
|
|
328
|
+
}, 0);
|
|
329
|
+
listener(event);
|
|
330
|
+
}
|
|
331
|
+
}, {
|
|
332
|
+
passive: true,
|
|
333
|
+
capture
|
|
334
|
+
}),
|
|
335
|
+
useEventListener(window$1, "pointerdown", (e) => {
|
|
336
|
+
const el = unrefElement(target);
|
|
337
|
+
shouldListen = !shouldIgnore(e) && !!(el && !e.composedPath().includes(el));
|
|
338
|
+
}, { passive: true }),
|
|
339
|
+
detectIframe && useEventListener(window$1, "blur", (event) => {
|
|
340
|
+
setTimeout(() => {
|
|
341
|
+
var _window$document$acti;
|
|
342
|
+
const el = unrefElement(target);
|
|
343
|
+
if (((_window$document$acti = window$1.document.activeElement) === null || _window$document$acti === void 0 ? void 0 : _window$document$acti.tagName) === "IFRAME" && !(el === null || el === void 0 ? void 0 : el.contains(window$1.document.activeElement))) handler(event);
|
|
344
|
+
}, 0);
|
|
345
|
+
}, { passive: true })
|
|
346
|
+
].filter(Boolean);
|
|
347
|
+
const stop = () => cleanup.forEach((fn) => fn());
|
|
348
|
+
if (controls) return {
|
|
349
|
+
stop,
|
|
350
|
+
cancel: () => {
|
|
351
|
+
shouldListen = false;
|
|
352
|
+
},
|
|
353
|
+
trigger: (event) => {
|
|
354
|
+
shouldListen = true;
|
|
355
|
+
listener(event);
|
|
356
|
+
shouldListen = false;
|
|
357
|
+
}
|
|
358
|
+
};
|
|
359
|
+
return stop;
|
|
360
|
+
}
|
|
259
361
|
/**
|
|
260
362
|
* Mounted state in ref.
|
|
261
363
|
*
|
|
@@ -812,4 +914,4 @@ function useWindowSize(options = {}) {
|
|
|
812
914
|
}
|
|
813
915
|
|
|
814
916
|
//#endregion
|
|
815
|
-
export {
|
|
917
|
+
export { useScreenSafeArea as a, watchDebounced as c, useLocalStorage as i, watchImmediate as l, useElementBounding as n, useWindowSize as o, useEventListener as r, useDebounceFn as s, onClickOutside as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { E as watch, L as shallowRef, M as markRaw, P as reactive } from "./vue.runtime.esm-bundler-B7xD_5x9.js";
|
|
2
2
|
import { createEventEmitter } from "@vitejs/devtools-kit/utils/events";
|
|
3
3
|
|
|
4
4
|
//#region src/client/webcomponents/constants.ts
|
|
@@ -10,12 +10,13 @@ const BUILTIN_ENTRY_CLIENT_AUTH_NOTICE = Object.freeze({
|
|
|
10
10
|
});
|
|
11
11
|
const BUILTIN_ENTRIES = Object.freeze([BUILTIN_ENTRY_CLIENT_AUTH_NOTICE]);
|
|
12
12
|
const DEFAULT_CATEGORIES_ORDER = {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
"~viteplus": -1e3,
|
|
14
|
+
"default": 0,
|
|
15
|
+
"app": 100,
|
|
16
|
+
"framework": 200,
|
|
17
|
+
"web": 300,
|
|
18
|
+
"advanced": 400,
|
|
19
|
+
"~builtin": 1e3
|
|
19
20
|
};
|
|
20
21
|
|
|
21
22
|
//#endregion
|
|
@@ -91,7 +91,7 @@ interface DevToolsDockHost {
|
|
|
91
91
|
includeBuiltin?: boolean;
|
|
92
92
|
}) => DevToolsDockEntry[];
|
|
93
93
|
}
|
|
94
|
-
type DevToolsDockEntryCategory = 'app' | 'framework' | 'web' | 'advanced' | 'default' | 'builtin';
|
|
94
|
+
type DevToolsDockEntryCategory = 'app' | 'framework' | 'web' | 'advanced' | 'default' | '~viteplus' | '~builtin';
|
|
95
95
|
type DevToolsDockEntryIcon = string | {
|
|
96
96
|
light: string;
|
|
97
97
|
dark: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as RpcDefinitionsToFunctions, c as DevToolsTerminalSessionBase, d as DevToolsRpcServerFunctions, f as SharedStatePatch, l as DevToolsTerminalSessionStreamChunkEvent, o as ConnectionMeta, p as DevToolsDockEntry, s as DevToolsNodeContext, u as DevToolsRpcClientFunctions } from "./index-
|
|
1
|
+
import { a as RpcDefinitionsToFunctions, c as DevToolsTerminalSessionBase, d as DevToolsRpcServerFunctions, f as SharedStatePatch, l as DevToolsTerminalSessionStreamChunkEvent, o as ConnectionMeta, p as DevToolsDockEntry, s as DevToolsNodeContext, u as DevToolsRpcClientFunctions } from "./index-CmOJZ3e5.js";
|
|
2
2
|
import { Plugin, ResolvedConfig, ViteDevServer } from "vite";
|
|
3
3
|
import * as birpc_x0 from "birpc-x";
|
|
4
4
|
import { RpcFunctionsCollectorBase } from "birpc-x";
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as createDevToolsMiddleware, t as DevTools, u as createDevToolsContext } from "./plugins-
|
|
1
|
+
import { n as createDevToolsMiddleware, t as DevTools, u as createDevToolsContext } from "./plugins-CCFu2oMz.js";
|
|
2
2
|
|
|
3
3
|
export { DevTools, createDevToolsContext, createDevToolsMiddleware };
|
|
@@ -75,7 +75,7 @@ var DevToolsDockHost = class {
|
|
|
75
75
|
id: "~terminals",
|
|
76
76
|
title: "Terminals",
|
|
77
77
|
icon: "ph:terminal-duotone",
|
|
78
|
-
category: "builtin",
|
|
78
|
+
category: "~builtin",
|
|
79
79
|
get isHidden() {
|
|
80
80
|
return context.terminals.sessions.size === 0;
|
|
81
81
|
}
|
|
@@ -85,16 +85,15 @@ var DevToolsDockHost = class {
|
|
|
85
85
|
id: "~logs",
|
|
86
86
|
title: "Logs",
|
|
87
87
|
icon: "ph:notification-duotone",
|
|
88
|
-
category: "builtin",
|
|
88
|
+
category: "~builtin",
|
|
89
89
|
isHidden: true
|
|
90
90
|
},
|
|
91
91
|
{
|
|
92
92
|
type: "~builtin",
|
|
93
93
|
id: "~settings",
|
|
94
94
|
title: "Settings",
|
|
95
|
-
category: "builtin",
|
|
96
|
-
icon: "ph:gear-duotone"
|
|
97
|
-
isHidden: true
|
|
95
|
+
category: "~builtin",
|
|
96
|
+
icon: "ph:gear-duotone"
|
|
98
97
|
}
|
|
99
98
|
];
|
|
100
99
|
return [...Array.from(this.views.values()), ...includeBuiltin ? builtinDocksEntries : []];
|
|
@@ -2916,7 +2916,7 @@ function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP)
|
|
|
2916
2916
|
}
|
|
2917
2917
|
}
|
|
2918
2918
|
function callHook(hook, instance, type) {
|
|
2919
|
-
callWithAsyncErrorHandling(isArray(hook) ? hook.map((h) => h.bind(instance.proxy)) : hook.bind(instance.proxy), instance, type);
|
|
2919
|
+
callWithAsyncErrorHandling(isArray(hook) ? hook.map((h$1) => h$1.bind(instance.proxy)) : hook.bind(instance.proxy), instance, type);
|
|
2920
2920
|
}
|
|
2921
2921
|
function createWatcher(raw, ctx, publicThis, key) {
|
|
2922
2922
|
let getter = key.includes(".") ? createPathGetter(publicThis, key) : () => publicThis[key];
|
|
@@ -5424,6 +5424,23 @@ const computed = (getterOrOptions, debugOptions) => {
|
|
|
5424
5424
|
}
|
|
5425
5425
|
return c;
|
|
5426
5426
|
};
|
|
5427
|
+
function h(type, propsOrChildren, children) {
|
|
5428
|
+
try {
|
|
5429
|
+
setBlockTracking(-1);
|
|
5430
|
+
const l = arguments.length;
|
|
5431
|
+
if (l === 2) if (isObject(propsOrChildren) && !isArray(propsOrChildren)) {
|
|
5432
|
+
if (isVNode(propsOrChildren)) return createVNode(type, null, [propsOrChildren]);
|
|
5433
|
+
return createVNode(type, propsOrChildren);
|
|
5434
|
+
} else return createVNode(type, null, propsOrChildren);
|
|
5435
|
+
else {
|
|
5436
|
+
if (l > 3) children = Array.prototype.slice.call(arguments, 2);
|
|
5437
|
+
else if (l === 3 && isVNode(children)) children = [children];
|
|
5438
|
+
return createVNode(type, propsOrChildren, children);
|
|
5439
|
+
}
|
|
5440
|
+
} finally {
|
|
5441
|
+
setBlockTracking(1);
|
|
5442
|
+
}
|
|
5443
|
+
}
|
|
5427
5444
|
function initCustomFormatter() {
|
|
5428
5445
|
if (!!!(process.env.NODE_ENV !== "production") || typeof window === "undefined") return;
|
|
5429
5446
|
const vueStyle = { style: "color:#3ba776" };
|
|
@@ -6350,4 +6367,4 @@ function initDev() {
|
|
|
6350
6367
|
if (!!(process.env.NODE_ENV !== "production")) initDev();
|
|
6351
6368
|
|
|
6352
6369
|
//#endregion
|
|
6353
|
-
export {
|
|
6370
|
+
export { customRef as A, toValue as B, renderList as C, watchEffect as D, watch as E, readonly as F, normalizeClass as H, ref as I, shallowRef as L, markRaw as M, onScopeDispose as N, withCtx as O, reactive as P, toRef as R, openBlock as S, useTemplateRef as T, normalizeStyle as U, unref as V, toDisplayString as W, hasInjectionContext as _, Suspense as a, onMounted as b, createBlock as c, createStaticVNode as d, createVNode as f, h as g, getCurrentInstance as h, Fragment as i, getCurrentScope as j, withDirectives as k, createCommentVNode as l, defineComponent as m, vShow as n, computed as o, defineAsyncComponent as p, withModifiers as r, createBaseVNode as s, defineCustomElement as t, createElementBlock as u, inject as v, renderSlot as w, onUnmounted as x, nextTick as y, toRefs as z };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitejs/devtools",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.0-alpha.
|
|
4
|
+
"version": "0.0.0-alpha.25",
|
|
5
5
|
"description": "Vite DevTools",
|
|
6
6
|
"author": "VoidZero Inc.",
|
|
7
7
|
"license": "MIT",
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"bugs": "https://github.com/vitejs/devtools/issues",
|
|
15
15
|
"keywords": [
|
|
16
16
|
"vite",
|
|
17
|
+
"vite-plugin",
|
|
17
18
|
"devtools",
|
|
18
19
|
"rpc"
|
|
19
20
|
],
|
|
@@ -27,8 +28,6 @@
|
|
|
27
28
|
"./dirs": "./dist/dirs.js",
|
|
28
29
|
"./package.json": "./package.json"
|
|
29
30
|
},
|
|
30
|
-
"main": "./dist/index.js",
|
|
31
|
-
"module": "./dist/index.js",
|
|
32
31
|
"types": "./dist/index.d.ts",
|
|
33
32
|
"bin": {
|
|
34
33
|
"vite-devtools": "./bin.js"
|
|
@@ -54,9 +53,9 @@
|
|
|
54
53
|
"sirv": "^3.0.2",
|
|
55
54
|
"tinyexec": "^1.0.2",
|
|
56
55
|
"ws": "^8.19.0",
|
|
57
|
-
"@vitejs/devtools-
|
|
58
|
-
"@vitejs/devtools-
|
|
59
|
-
"@vitejs/devtools-
|
|
56
|
+
"@vitejs/devtools-rpc": "0.0.0-alpha.25",
|
|
57
|
+
"@vitejs/devtools-kit": "0.0.0-alpha.25",
|
|
58
|
+
"@vitejs/devtools-vite": "0.0.0-alpha.25"
|
|
60
59
|
},
|
|
61
60
|
"devDependencies": {
|
|
62
61
|
"@clack/prompts": "^0.11.0",
|
|
@@ -64,15 +63,15 @@
|
|
|
64
63
|
"@xterm/addon-fit": "^0.11.0",
|
|
65
64
|
"@xterm/xterm": "^6.0.0",
|
|
66
65
|
"dompurify": "^3.3.1",
|
|
67
|
-
"tsdown": "^0.
|
|
66
|
+
"tsdown": "^0.19.0",
|
|
68
67
|
"typescript": "^5.9.3",
|
|
69
68
|
"unplugin-vue": "^7.1.0",
|
|
70
69
|
"unplugin-vue-router": "^0.19.2",
|
|
71
|
-
"vite": "^8.0.0-beta.
|
|
70
|
+
"vite": "^8.0.0-beta.7",
|
|
72
71
|
"vue": "^3.5.26",
|
|
73
72
|
"vue-router": "^4.6.4",
|
|
74
73
|
"vue-tsc": "^3.2.2",
|
|
75
|
-
"@vitejs/devtools-vite": "0.0.0-alpha.
|
|
74
|
+
"@vitejs/devtools-vite": "0.0.0-alpha.25"
|
|
76
75
|
},
|
|
77
76
|
"scripts": {
|
|
78
77
|
"build": "pnpm build:js && pnpm build:standalone",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as e,m as t,n}from"./index-BTGj0xT1.js";var r={};function i(n,r){return t(),e(`div`,null,` Logs // TODO: `)}var a=n(r,[[`render`,i]]);export{a as default};
|