vite-plugin-vue-devtools 1.0.0-beta.3 → 1.0.0-beta.4
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/README.md +6 -0
- package/dist/client/assets/{Icon.vue_vue_type_script_setup_true_lang-bf37ec60.js → Icon.vue_vue_type_script_setup_true_lang-4a8fe583.js} +1 -1
- package/dist/client/assets/{IconButton.vue_vue_type_script_setup_true_lang-9417e3da.js → IconButton.vue_vue_type_script_setup_true_lang-7533112d.js} +2 -2
- package/dist/client/assets/{IconTitle.vue_vue_type_script_setup_true_lang-a710fbe0.js → IconTitle.vue_vue_type_script_setup_true_lang-bdc080e4.js} +1 -1
- package/dist/client/assets/{IframeView.vue_vue_type_script_setup_true_lang-f1ea8625.js → IframeView.vue_vue_type_script_setup_true_lang-77dbdc62.js} +1 -1
- package/dist/client/assets/{PanelGrids-09fbe816.js → PanelGrids-3cdf73ad.js} +1 -1
- package/dist/client/assets/{SectionBlock-740d82f0.js → SectionBlock-0fb75671.js} +3 -3
- package/dist/client/assets/{StateFields.vue_vue_type_script_setup_true_lang-ed4f449a.js → StateFields.vue_vue_type_script_setup_true_lang-65d71ce4.js} +4 -4
- package/dist/client/assets/{Switch.vue_vue_type_script_setup_true_lang-86be5e4b.js → Switch.vue_vue_type_script_setup_true_lang-3983cd12.js} +2 -2
- package/dist/client/assets/{TextInput.vue_vue_type_script_setup_true_lang-217531ea.js → TextInput.vue_vue_type_script_setup_true_lang-40607e18.js} +2 -2
- package/dist/client/assets/{__eyedropper-3339cbcc.js → __eyedropper-ba9a76be.js} +3 -3
- package/dist/client/assets/{assets-8fd9db77.js → assets-1c2e5083.js} +7 -7
- package/dist/client/assets/{component-docs-94c9d80e.js → component-docs-57fca81e.js} +4 -4
- package/dist/client/assets/{components-133974b2.js → components-b8f121d9.js} +8 -8
- package/dist/client/assets/{data-1a736865.js → data-4774a5dd.js} +2 -2
- package/dist/client/assets/{documentations-bb1c038c.js → documentations-f47e8527.js} +2 -2
- package/dist/client/assets/{graph-7e8bbdd3.js → graph-128136c1.js} +3 -3
- package/dist/client/assets/{index-57b0b18f.js → index-5266a399.js} +1 -1
- package/dist/client/assets/{index-056bb29c.js → index-6b2b8b6a.js} +19 -15
- package/dist/client/assets/{index-c3d74b48.css → index-f4f0a93b.css} +1 -1
- package/dist/client/assets/{inspect-d8a11fe1.js → inspect-d185c0d8.js} +2 -2
- package/dist/client/assets/{npm-3ad72929.js → npm-760dcb8c.js} +5 -5
- package/dist/client/assets/{overview-f7d1a936.js → overview-8f06d8d8.js} +4 -4
- package/dist/client/assets/{pages-26acd942.js → pages-2ad456d4.js} +5 -5
- package/dist/client/assets/{pinia-f75a2b94.js → pinia-1f4baab5.js} +6 -6
- package/dist/client/assets/rerender-trace-a8d6a8df.css +14 -0
- package/dist/client/assets/{rerender-trace-a3fe7edb.js → rerender-trace-e2a70cde.js} +100 -35
- package/dist/client/assets/{routes-f320ef35.js → routes-cc654c70.js} +7 -7
- package/dist/client/assets/{settings-b70ac3bb.js → settings-0c6c179d.js} +6 -6
- package/dist/client/assets/{splitpanes.es-166029e0.js → splitpanes.es-16f3d333.js} +1 -1
- package/dist/client/assets/{timeline-92a66364.js → timeline-252da334.js} +7 -7
- package/dist/client/index.html +2 -2
- package/dist/vite.cjs +5 -2
- package/dist/vite.d.ts +5 -0
- package/dist/vite.mjs +5 -2
- package/package.json +3 -3
- package/src/views/ComponentInspector.vue +1 -0
- package/src/views/Main.vue +7 -1
- package/src/views/RerenderIndicator.vue +37 -0
- package/src/views/composables.ts +43 -1
- package/src/views/utils.ts +13 -0
- package/dist/client/assets/rerender-trace-6c5229c1.css +0 -14
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { _ as __unplugin_components_0$1 } from './PanelGrids-
|
|
2
|
-
import { a$ as ref, cc as rpc, a1 as computed, cb as routes, v as defineComponent, r as resolveComponent, o as openBlock, c as createBlock, h as withCtx, x as createBaseVNode, u as createVNode, y as toDisplayString, z as unref, cd as vueVersion, a9 as createTextVNode, e as createElementBlock, F as Fragment, ce as __unplugin_components_0, c3 as __unplugin_components_1, bL as _sfc_main$1 } from './index-
|
|
3
|
-
import { i as isMacOS } from './index-
|
|
1
|
+
import { _ as __unplugin_components_0$1 } from './PanelGrids-3cdf73ad.js';
|
|
2
|
+
import { a$ as ref, cc as rpc, a1 as computed, cb as routes, v as defineComponent, r as resolveComponent, o as openBlock, c as createBlock, h as withCtx, x as createBaseVNode, u as createVNode, y as toDisplayString, z as unref, cd as vueVersion, a9 as createTextVNode, e as createElementBlock, F as Fragment, ce as __unplugin_components_0, c3 as __unplugin_components_1, bL as _sfc_main$1 } from './index-6b2b8b6a.js';
|
|
3
|
+
import { i as isMacOS } from './index-5266a399.js';
|
|
4
4
|
|
|
5
|
-
const version = "1.0.0-beta.
|
|
5
|
+
const version = "1.0.0-beta.4";
|
|
6
6
|
|
|
7
7
|
/* Injected with object hook! */
|
|
8
8
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { _ as __unplugin_components_3 } from './SectionBlock-
|
|
2
|
-
import { v as defineComponent, a$ as ref, a1 as computed, r as resolveComponent, z as unref, o as openBlock, e as createElementBlock, x as createBaseVNode, y as toDisplayString, c as createBlock, h as withCtx, bG as withModifiers, F as Fragment, i as renderList, g as createCommentVNode, u as createVNode, a9 as createTextVNode, q as normalizeClass, bL as _sfc_main$4, c3 as __unplugin_components_1, aP as onMounted, ca as currentRoute, b_ as router, aC as isRef, bE as withKeys, cb as routes } from './index-
|
|
3
|
-
import { _ as _sfc_main$3 } from './TextInput.vue_vue_type_script_setup_true_lang-
|
|
4
|
-
import './IconTitle.vue_vue_type_script_setup_true_lang-
|
|
5
|
-
import './Icon.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import { _ as __unplugin_components_3 } from './SectionBlock-0fb75671.js';
|
|
2
|
+
import { v as defineComponent, a$ as ref, a1 as computed, r as resolveComponent, z as unref, o as openBlock, e as createElementBlock, x as createBaseVNode, y as toDisplayString, c as createBlock, h as withCtx, bG as withModifiers, F as Fragment, i as renderList, g as createCommentVNode, u as createVNode, a9 as createTextVNode, q as normalizeClass, bL as _sfc_main$4, c3 as __unplugin_components_1, aP as onMounted, ca as currentRoute, b_ as router, aC as isRef, bE as withKeys, cb as routes } from './index-6b2b8b6a.js';
|
|
3
|
+
import { _ as _sfc_main$3 } from './TextInput.vue_vue_type_script_setup_true_lang-40607e18.js';
|
|
4
|
+
import './IconTitle.vue_vue_type_script_setup_true_lang-bdc080e4.js';
|
|
5
|
+
import './Icon.vue_vue_type_script_setup_true_lang-4a8fe583.js';
|
|
6
6
|
|
|
7
7
|
const _hoisted_1$2 = {
|
|
8
8
|
block: "",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { _ as _sfc_main$1 } from './StateFields.vue_vue_type_script_setup_true_lang-
|
|
2
|
-
import { g, M } from './splitpanes.es-
|
|
3
|
-
import { v as defineComponent, a$ as ref, a1 as computed, c7 as piniaStoresCategory, bd as toRaw, c8 as piniaState, c9 as piniaGetters, z as unref, o as openBlock, e as createElementBlock, u as createVNode, h as withCtx, x as createBaseVNode, F as Fragment, i as renderList, q as normalizeClass, y as toDisplayString, c as createBlock } from './index-
|
|
4
|
-
import { p as pick } from './index-
|
|
5
|
-
import './Icon.vue_vue_type_script_setup_true_lang-
|
|
6
|
-
import './IconButton.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import { _ as _sfc_main$1 } from './StateFields.vue_vue_type_script_setup_true_lang-65d71ce4.js';
|
|
2
|
+
import { g, M } from './splitpanes.es-16f3d333.js';
|
|
3
|
+
import { v as defineComponent, a$ as ref, a1 as computed, c7 as piniaStoresCategory, bd as toRaw, c8 as piniaState, c9 as piniaGetters, z as unref, o as openBlock, e as createElementBlock, u as createVNode, h as withCtx, x as createBaseVNode, F as Fragment, i as renderList, q as normalizeClass, y as toDisplayString, c as createBlock } from './index-6b2b8b6a.js';
|
|
4
|
+
import { p as pick } from './index-5266a399.js';
|
|
5
|
+
import './Icon.vue_vue_type_script_setup_true_lang-4a8fe583.js';
|
|
6
|
+
import './IconButton.vue_vue_type_script_setup_true_lang-7533112d.js';
|
|
7
7
|
|
|
8
8
|
const _hoisted_1 = {
|
|
9
9
|
"h-screen": "",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { v as defineComponent, a$ as ref, c4 as DevToolsHooks, r as resolveComponent, o as openBlock, e as createElementBlock, x as createBaseVNode, u as createVNode, h as withCtx, z as unref, c as createBlock, a9 as createTextVNode, g as createCommentVNode, F as Fragment, i as renderList, c5 as useDevToolsClient, c6 as rootPath, _ as __unplugin_components_7, c3 as __unplugin_components_1, p as pushScopeId, a as popScopeId, y as toDisplayString, bJ as _export_sfc } from './index-
|
|
1
|
+
import { v as defineComponent, a$ as ref, c4 as DevToolsHooks, r as resolveComponent, o as openBlock, e as createElementBlock, x as createBaseVNode, u as createVNode, h as withCtx, z as unref, c as createBlock, a9 as createTextVNode, g as createCommentVNode, F as Fragment, i as renderList, c5 as useDevToolsClient, c6 as rootPath, _ as __unplugin_components_7, c3 as __unplugin_components_1, p as pushScopeId, a as popScopeId, y as toDisplayString, bJ as _export_sfc } from './index-6b2b8b6a.js';
|
|
2
2
|
import { d as dayjs } from './dayjs.min-ff0bd3aa.js';
|
|
3
|
-
import { g as getSetupStateInfo, t as toRaw } from './data-
|
|
3
|
+
import { g as getInstanceName, a as getSetupStateInfo, t as toRaw } from './data-4774a5dd.js';
|
|
4
4
|
import './_commonjsHelpers-7e83dbf2.js';
|
|
5
5
|
|
|
6
|
-
const _withScopeId = (n) => (pushScopeId("data-v-
|
|
6
|
+
const _withScopeId = (n) => (pushScopeId("data-v-24f1b68d"), n = n(), popScopeId(), n);
|
|
7
7
|
const _hoisted_1 = {
|
|
8
8
|
"h-full": "",
|
|
9
9
|
"w-full": "",
|
|
@@ -19,22 +19,26 @@ const _hoisted_4 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createBase
|
|
|
19
19
|
"text-xs": "",
|
|
20
20
|
"op-50": ""
|
|
21
21
|
}, " Clear ", -1));
|
|
22
|
-
const _hoisted_5 = {
|
|
22
|
+
const _hoisted_5 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createBaseVNode("p", {
|
|
23
|
+
"text-xs": "",
|
|
24
|
+
"op-50": ""
|
|
25
|
+
}, " Capture rerender elements ", -1));
|
|
26
|
+
const _hoisted_6 = {
|
|
23
27
|
key: 0,
|
|
24
28
|
flex: "~ items-center justify-center",
|
|
25
29
|
"h-screen": ""
|
|
26
30
|
};
|
|
27
|
-
const
|
|
31
|
+
const _hoisted_7 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createBaseVNode("i", {
|
|
28
32
|
class: "i-fluent:record-12-regular",
|
|
29
33
|
text: "4.7",
|
|
30
34
|
"cursor-pointer": "",
|
|
31
35
|
"text-secondary": "",
|
|
32
36
|
hover: "text-black dark:text-white"
|
|
33
37
|
}, null, -1));
|
|
34
|
-
const
|
|
35
|
-
|
|
38
|
+
const _hoisted_8 = [
|
|
39
|
+
_hoisted_7
|
|
36
40
|
];
|
|
37
|
-
const
|
|
41
|
+
const _hoisted_9 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createBaseVNode("p", { flex: "~ items-center" }, [
|
|
38
42
|
/* @__PURE__ */ createTextVNode(" Click the clear button "),
|
|
39
43
|
/* @__PURE__ */ createBaseVNode("span", {
|
|
40
44
|
border: "~ base",
|
|
@@ -52,14 +56,32 @@ const _hoisted_8 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createBase
|
|
|
52
56
|
]),
|
|
53
57
|
/* @__PURE__ */ createTextVNode(" to clear the results. ")
|
|
54
58
|
], -1));
|
|
55
|
-
const
|
|
59
|
+
const _hoisted_10 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createBaseVNode("p", { flex: "~ items-center" }, [
|
|
60
|
+
/* @__PURE__ */ createTextVNode(" Click the capture button "),
|
|
61
|
+
/* @__PURE__ */ createBaseVNode("span", {
|
|
62
|
+
border: "~ base",
|
|
63
|
+
"mx-1": "",
|
|
64
|
+
"inline-flex": "",
|
|
65
|
+
"items-center": "",
|
|
66
|
+
"justify-center": "",
|
|
67
|
+
p1: ""
|
|
68
|
+
}, [
|
|
69
|
+
/* @__PURE__ */ createBaseVNode("i", {
|
|
70
|
+
class: "i-tabler:capture",
|
|
71
|
+
text: "3.8",
|
|
72
|
+
"text-secondary": ""
|
|
73
|
+
})
|
|
74
|
+
]),
|
|
75
|
+
/* @__PURE__ */ createTextVNode(" to capture the rerender effect element. ")
|
|
76
|
+
], -1));
|
|
77
|
+
const _hoisted_11 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createBaseVNode("p", { "lh-5": "" }, [
|
|
56
78
|
/* @__PURE__ */ createTextVNode(" Start tracing, do something in the page. Then,"),
|
|
57
79
|
/* @__PURE__ */ createBaseVNode("br"),
|
|
58
80
|
/* @__PURE__ */ createTextVNode(" press the stop button to show the resulting triggers for page rerenders. ")
|
|
59
81
|
], -1));
|
|
60
|
-
const
|
|
61
|
-
const
|
|
62
|
-
const
|
|
82
|
+
const _hoisted_12 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createBaseVNode("p", { class: "loading-animation" }, " Tracing... ", -1));
|
|
83
|
+
const _hoisted_13 = { key: 1 };
|
|
84
|
+
const _hoisted_14 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createBaseVNode("thead", {
|
|
63
85
|
border: "b r base",
|
|
64
86
|
sticky: "",
|
|
65
87
|
display: "table-header-group",
|
|
@@ -93,9 +115,9 @@ const _hoisted_12 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createBas
|
|
|
93
115
|
}, " Update Time ")
|
|
94
116
|
])
|
|
95
117
|
], -1));
|
|
96
|
-
const
|
|
97
|
-
const
|
|
98
|
-
const
|
|
118
|
+
const _hoisted_15 = { border: "b r base" };
|
|
119
|
+
const _hoisted_16 = ["onClick"];
|
|
120
|
+
const _hoisted_17 = {
|
|
99
121
|
"max-w-30": "",
|
|
100
122
|
"w-30": "",
|
|
101
123
|
"of-hidden": "",
|
|
@@ -107,7 +129,7 @@ const _hoisted_15 = {
|
|
|
107
129
|
"font-mono": "",
|
|
108
130
|
op70: ""
|
|
109
131
|
};
|
|
110
|
-
const
|
|
132
|
+
const _hoisted_18 = {
|
|
111
133
|
"max-w-30": "",
|
|
112
134
|
"w-30": "",
|
|
113
135
|
"of-hidden": "",
|
|
@@ -119,7 +141,7 @@ const _hoisted_16 = {
|
|
|
119
141
|
"font-mono": "",
|
|
120
142
|
op70: ""
|
|
121
143
|
};
|
|
122
|
-
const
|
|
144
|
+
const _hoisted_19 = {
|
|
123
145
|
"max-w-30": "",
|
|
124
146
|
"w-30": "",
|
|
125
147
|
"of-hidden": "",
|
|
@@ -131,7 +153,7 @@ const _hoisted_17 = {
|
|
|
131
153
|
"font-mono": "",
|
|
132
154
|
op70: ""
|
|
133
155
|
};
|
|
134
|
-
const
|
|
156
|
+
const _hoisted_20 = {
|
|
135
157
|
"max-w-30": "",
|
|
136
158
|
"w-30": "",
|
|
137
159
|
"of-hidden": "",
|
|
@@ -143,7 +165,7 @@ const _hoisted_18 = {
|
|
|
143
165
|
"font-mono": "",
|
|
144
166
|
op70: ""
|
|
145
167
|
};
|
|
146
|
-
const
|
|
168
|
+
const _hoisted_21 = {
|
|
147
169
|
"max-w-30": "",
|
|
148
170
|
"w-30": "",
|
|
149
171
|
"of-hidden": "",
|
|
@@ -163,6 +185,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
163
185
|
const isTracing = ref(false);
|
|
164
186
|
const result = ref([]);
|
|
165
187
|
const traceBuffer = ref([]);
|
|
188
|
+
const highlightEnabled = ref(true);
|
|
166
189
|
function normalizeEventInfo(e, instance) {
|
|
167
190
|
const info = getSetupStateInfo(e.target);
|
|
168
191
|
const file = instance.type.__file?.replace?.(rootPath, "") ?? "-";
|
|
@@ -184,7 +207,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
184
207
|
isTracing.value && traceBuffer.value.push(normalizeEventInfo(e, instance));
|
|
185
208
|
});
|
|
186
209
|
hook.on(DevToolsHooks.RENDER_TRIGGERED, (e, instance) => {
|
|
187
|
-
isTracing.value
|
|
210
|
+
if (isTracing.value) {
|
|
211
|
+
traceBuffer.value.push(normalizeEventInfo(e, instance));
|
|
212
|
+
if (highlightEnabled.value) {
|
|
213
|
+
let el = null;
|
|
214
|
+
const instanceEl = instance.vnode.el;
|
|
215
|
+
if (instanceEl?.nodeType === Node.TEXT_NODE)
|
|
216
|
+
el = instanceEl?.parentElement;
|
|
217
|
+
else if (instanceEl?.nodeType === Node.ELEMENT_NODE)
|
|
218
|
+
el = instanceEl;
|
|
219
|
+
if (el)
|
|
220
|
+
client.value.rerenderHighlight.updateInfo(instance.uid.toString(), getInstanceName(instance), el.getBoundingClientRect());
|
|
221
|
+
}
|
|
222
|
+
}
|
|
188
223
|
});
|
|
189
224
|
function start() {
|
|
190
225
|
result.value = [];
|
|
@@ -270,11 +305,40 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
270
305
|
})
|
|
271
306
|
]),
|
|
272
307
|
_: 1
|
|
308
|
+
}),
|
|
309
|
+
createVNode(_component_VTooltip, {
|
|
310
|
+
placement: "bottom",
|
|
311
|
+
distance: 12,
|
|
312
|
+
"text-center": ""
|
|
313
|
+
}, {
|
|
314
|
+
popper: withCtx(() => [
|
|
315
|
+
_hoisted_5
|
|
316
|
+
]),
|
|
317
|
+
default: withCtx(() => [
|
|
318
|
+
!unref(highlightEnabled) ? (openBlock(), createElementBlock("i", {
|
|
319
|
+
key: 0,
|
|
320
|
+
class: "i-tabler:capture",
|
|
321
|
+
text: "4.7",
|
|
322
|
+
"cursor-pointer": "",
|
|
323
|
+
"text-secondary": "",
|
|
324
|
+
hover: "text-black dark:text-white",
|
|
325
|
+
onClick: _cache[0] || (_cache[0] = ($event) => highlightEnabled.value = true)
|
|
326
|
+
})) : (openBlock(), createElementBlock("i", {
|
|
327
|
+
key: 1,
|
|
328
|
+
class: "i-tabler:capture",
|
|
329
|
+
text: "4.7",
|
|
330
|
+
"cursor-pointer": "",
|
|
331
|
+
"text-green-600": "",
|
|
332
|
+
hover: "text-green-800",
|
|
333
|
+
onClick: _cache[1] || (_cache[1] = ($event) => highlightEnabled.value = false)
|
|
334
|
+
}))
|
|
335
|
+
]),
|
|
336
|
+
_: 1
|
|
273
337
|
})
|
|
274
338
|
]),
|
|
275
339
|
_: 1
|
|
276
340
|
}),
|
|
277
|
-
!unref(result).length ? (openBlock(), createElementBlock("div",
|
|
341
|
+
!unref(result).length ? (openBlock(), createElementBlock("div", _hoisted_6, [
|
|
278
342
|
!unref(isTracing) && !unref(result).length ? (openBlock(), createBlock(_component_VDCard, {
|
|
279
343
|
key: 0,
|
|
280
344
|
flex: "~ col gap2",
|
|
@@ -293,11 +357,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
293
357
|
"justify-center": "",
|
|
294
358
|
p: "0.5",
|
|
295
359
|
onClick: start
|
|
296
|
-
},
|
|
360
|
+
}, _hoisted_8),
|
|
297
361
|
createTextVNode(" to start a new tracing. ")
|
|
298
362
|
]),
|
|
299
|
-
_hoisted_8,
|
|
300
363
|
_hoisted_9,
|
|
364
|
+
_hoisted_10,
|
|
365
|
+
_hoisted_11,
|
|
301
366
|
createVNode(_component_VDBadge, {
|
|
302
367
|
absolute: "",
|
|
303
368
|
"right--0.5": "",
|
|
@@ -316,14 +381,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
316
381
|
p3: ""
|
|
317
382
|
}, {
|
|
318
383
|
default: withCtx(() => [
|
|
319
|
-
|
|
384
|
+
_hoisted_12
|
|
320
385
|
]),
|
|
321
386
|
_: 1
|
|
322
387
|
})) : createCommentVNode("", true)
|
|
323
388
|
])) : createCommentVNode("", true),
|
|
324
|
-
unref(result).length && !unref(isTracing) ? (openBlock(), createElementBlock("table",
|
|
325
|
-
|
|
326
|
-
createBaseVNode("tbody",
|
|
389
|
+
unref(result).length && !unref(isTracing) ? (openBlock(), createElementBlock("table", _hoisted_13, [
|
|
390
|
+
_hoisted_14,
|
|
391
|
+
createBaseVNode("tbody", _hoisted_15, [
|
|
327
392
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(result), (item, index) => {
|
|
328
393
|
return openBlock(), createElementBlock("tr", {
|
|
329
394
|
key: index,
|
|
@@ -342,12 +407,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
342
407
|
op70: "",
|
|
343
408
|
hover: "text-primary",
|
|
344
409
|
onClick: ($event) => openInEditor(item.fullFilePath)
|
|
345
|
-
}, toDisplayString(item.componentFile), 9,
|
|
346
|
-
createBaseVNode("td",
|
|
347
|
-
createBaseVNode("td",
|
|
348
|
-
createBaseVNode("td",
|
|
349
|
-
createBaseVNode("td",
|
|
350
|
-
createBaseVNode("td",
|
|
410
|
+
}, toDisplayString(item.componentFile), 9, _hoisted_16),
|
|
411
|
+
createBaseVNode("td", _hoisted_17, toDisplayString(item.key), 1),
|
|
412
|
+
createBaseVNode("td", _hoisted_18, toDisplayString(item.value), 1),
|
|
413
|
+
createBaseVNode("td", _hoisted_19, toDisplayString(item.dataType), 1),
|
|
414
|
+
createBaseVNode("td", _hoisted_20, toDisplayString(item.updateType), 1),
|
|
415
|
+
createBaseVNode("td", _hoisted_21, toDisplayString(unref(dayjs)(item.updateTime).format("HH:mm:ss")), 1)
|
|
351
416
|
]);
|
|
352
417
|
}), 128))
|
|
353
418
|
])
|
|
@@ -360,10 +425,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
360
425
|
|
|
361
426
|
/* Injected with object hook! */
|
|
362
427
|
|
|
363
|
-
/* unplugin-vue-components disabled */const
|
|
428
|
+
/* unplugin-vue-components disabled */const rerenderTrace_vue_vue_type_style_index_0_scoped_24f1b68d_lang = '';
|
|
364
429
|
/* Injected with object hook! */
|
|
365
430
|
|
|
366
|
-
const rerenderTrace = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
431
|
+
const rerenderTrace = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-24f1b68d"]]);
|
|
367
432
|
|
|
368
433
|
/* Injected with object hook! */
|
|
369
434
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { _ as __unplugin_components_0 } from './PanelGrids-
|
|
2
|
-
import { v as defineComponent, z as unref, b_ as router, o as openBlock, e as createElementBlock, u as createVNode, h as withCtx, x as createBaseVNode, F as Fragment, i as renderList, b$ as routeRecordMatcherState, c0 as activeRouteRecordMatcherState, c as createBlock, bZ as _sfc_main$2, _ as __unplugin_components_7, q as normalizeClass, c1 as activeRouteRecordIndex, c2 as toggleRouteRecordMatcher, a9 as createTextVNode, y as toDisplayString, l as normalizeStyle, g as createCommentVNode, c3 as __unplugin_components_1 } from './index-
|
|
3
|
-
import { _ as _sfc_main$1 } from './StateFields.vue_vue_type_script_setup_true_lang-
|
|
4
|
-
import { g, M } from './splitpanes.es-
|
|
5
|
-
import './Icon.vue_vue_type_script_setup_true_lang-
|
|
6
|
-
import './index-
|
|
7
|
-
import './IconButton.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import { _ as __unplugin_components_0 } from './PanelGrids-3cdf73ad.js';
|
|
2
|
+
import { v as defineComponent, z as unref, b_ as router, o as openBlock, e as createElementBlock, u as createVNode, h as withCtx, x as createBaseVNode, F as Fragment, i as renderList, b$ as routeRecordMatcherState, c0 as activeRouteRecordMatcherState, c as createBlock, bZ as _sfc_main$2, _ as __unplugin_components_7, q as normalizeClass, c1 as activeRouteRecordIndex, c2 as toggleRouteRecordMatcher, a9 as createTextVNode, y as toDisplayString, l as normalizeStyle, g as createCommentVNode, c3 as __unplugin_components_1 } from './index-6b2b8b6a.js';
|
|
3
|
+
import { _ as _sfc_main$1 } from './StateFields.vue_vue_type_script_setup_true_lang-65d71ce4.js';
|
|
4
|
+
import { g, M } from './splitpanes.es-16f3d333.js';
|
|
5
|
+
import './Icon.vue_vue_type_script_setup_true_lang-4a8fe583.js';
|
|
6
|
+
import './index-5266a399.js';
|
|
7
|
+
import './IconButton.vue_vue_type_script_setup_true_lang-7533112d.js';
|
|
8
8
|
|
|
9
9
|
const _hoisted_1 = {
|
|
10
10
|
key: 0,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { _ as _sfc_main$a, a as _sfc_main$c } from './Switch.vue_vue_type_script_setup_true_lang-
|
|
2
|
-
import { I as BaseTransition, J as BaseTransitionPropsValidators, K as Comment, L as EffectScope, F as Fragment, M as KeepAlive, R as ReactiveEffect, S as Static, N as Suspense, T as Teleport, O as Text, P as Transition, Q as TransitionGroup, V as VueElement, U as assertNumber, W as callWithAsyncErrorHandling, X as callWithErrorHandling, Y as camelize, Z as capitalize, $ as cloneVNode, a0 as compatUtils, a1 as computed, a2 as createApp, c as createBlock, g as createCommentVNode, e as createElementBlock, x as createBaseVNode, a3 as createHydrationRenderer, a4 as createPropsRestProxy, a5 as createRenderer, a6 as createSSRApp, a7 as createSlots, a8 as createStaticVNode, a9 as createTextVNode, u as createVNode, aa as customRef, ab as defineAsyncComponent, v as defineComponent, ac as defineCustomElement, ad as defineEmits, ae as defineExpose, af as defineModel, ag as defineOptions, ah as defineProps, ai as defineSSRCustomElement, aj as defineSlots, ak as devtools, al as effect, am as effectScope, an as getCurrentInstance, ao as getCurrentScope, ap as getTransitionRawChildren, aq as guardReactiveProps, ar as h, as as handleError, at as hasInjectionContext, au as hydrate, av as initCustomFormatter, aw as initDirectivesForSSR, ax as inject, ay as isMemoSame, az as isProxy, aA as isReactive, aB as isReadonly, aC as isRef, aD as isRuntimeOnly, aE as isShallow, aF as isVNode, m as markRaw, aG as mergeDefaults, aH as mergeModels, k as mergeProps, n as nextTick, q as normalizeClass, aI as normalizeProps, l as normalizeStyle, aJ as onActivated, aK as onBeforeMount, aL as onBeforeUnmount, aM as onBeforeUpdate, aN as onDeactivated, aO as onErrorCaptured, aP as onMounted, aQ as onRenderTracked, aR as onRenderTriggered, aS as onScopeDispose, aT as onServerPrefetch, aU as onUnmounted, aV as onUpdated, o as openBlock, a as popScopeId, aW as provide, aX as proxyRefs, p as pushScopeId, aY as queuePostFlushCb, aZ as reactive, a_ as readonly, a$ as ref, b0 as registerRuntimeCompiler, b1 as render, i as renderList, f as renderSlot, r as resolveComponent, b as resolveDirective, j as resolveDynamicComponent, b2 as resolveFilter, b3 as resolveTransitionHooks, b4 as setBlockTracking, b5 as setDevtoolsHook, b6 as setTransitionHooks, s as shallowReactive, b7 as shallowReadonly, b8 as shallowRef, b9 as ssrContextKey, ba as ssrUtils, bb as stop, y as toDisplayString, bc as toHandlerKey, t as toHandlers, bd as toRaw, be as toRef, bf as toRefs, bg as toValue, bh as transformVNodeArgs, bi as triggerRef, z as unref, bj as useAttrs, bk as useCssModule, bl as useCssVars, bm as useModel, bn as useSSRContext, bo as useSlots, bp as useTransitionState, bq as vModelCheckbox, br as vModelDynamic, bs as vModelRadio, bt as vModelSelect, bu as vModelText, bv as vShow, bw as version$1, bx as warn, by as watch, bz as watchEffect, bA as watchPostEffect, bB as watchSyncEffect, bC as withAsyncContext, h as withCtx, bD as withDefaults, d as withDirectives, bE as withKeys, bF as withMemo, bG as withModifiers, w as withScopeId, bH as getSortedTabs, bI as updateTabsPosition, bJ as _export_sfc, bK as useVModel, bL as _sfc_main$5, bM as _sfc_main$6, bN as useToggle, bO as shouldHideTabGroup, bP as DEFAULT_TAB_GROUP, bQ as useGroupedTabs, bR as ungroupAllTabs, bS as resetAllTabs, bT as removeTabGroup, bU as checkGroupExist, bV as createGroup, bW as useDevToolsSettings, bX as useFrameState, bY as _sfc_main$b, bZ as _sfc_main$d } from './index-
|
|
3
|
-
import { _ as _sfc_main$4 } from './Icon.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import { _ as _sfc_main$a, a as _sfc_main$c } from './Switch.vue_vue_type_script_setup_true_lang-3983cd12.js';
|
|
2
|
+
import { I as BaseTransition, J as BaseTransitionPropsValidators, K as Comment, L as EffectScope, F as Fragment, M as KeepAlive, R as ReactiveEffect, S as Static, N as Suspense, T as Teleport, O as Text, P as Transition, Q as TransitionGroup, V as VueElement, U as assertNumber, W as callWithAsyncErrorHandling, X as callWithErrorHandling, Y as camelize, Z as capitalize, $ as cloneVNode, a0 as compatUtils, a1 as computed, a2 as createApp, c as createBlock, g as createCommentVNode, e as createElementBlock, x as createBaseVNode, a3 as createHydrationRenderer, a4 as createPropsRestProxy, a5 as createRenderer, a6 as createSSRApp, a7 as createSlots, a8 as createStaticVNode, a9 as createTextVNode, u as createVNode, aa as customRef, ab as defineAsyncComponent, v as defineComponent, ac as defineCustomElement, ad as defineEmits, ae as defineExpose, af as defineModel, ag as defineOptions, ah as defineProps, ai as defineSSRCustomElement, aj as defineSlots, ak as devtools, al as effect, am as effectScope, an as getCurrentInstance, ao as getCurrentScope, ap as getTransitionRawChildren, aq as guardReactiveProps, ar as h, as as handleError, at as hasInjectionContext, au as hydrate, av as initCustomFormatter, aw as initDirectivesForSSR, ax as inject, ay as isMemoSame, az as isProxy, aA as isReactive, aB as isReadonly, aC as isRef, aD as isRuntimeOnly, aE as isShallow, aF as isVNode, m as markRaw, aG as mergeDefaults, aH as mergeModels, k as mergeProps, n as nextTick, q as normalizeClass, aI as normalizeProps, l as normalizeStyle, aJ as onActivated, aK as onBeforeMount, aL as onBeforeUnmount, aM as onBeforeUpdate, aN as onDeactivated, aO as onErrorCaptured, aP as onMounted, aQ as onRenderTracked, aR as onRenderTriggered, aS as onScopeDispose, aT as onServerPrefetch, aU as onUnmounted, aV as onUpdated, o as openBlock, a as popScopeId, aW as provide, aX as proxyRefs, p as pushScopeId, aY as queuePostFlushCb, aZ as reactive, a_ as readonly, a$ as ref, b0 as registerRuntimeCompiler, b1 as render, i as renderList, f as renderSlot, r as resolveComponent, b as resolveDirective, j as resolveDynamicComponent, b2 as resolveFilter, b3 as resolveTransitionHooks, b4 as setBlockTracking, b5 as setDevtoolsHook, b6 as setTransitionHooks, s as shallowReactive, b7 as shallowReadonly, b8 as shallowRef, b9 as ssrContextKey, ba as ssrUtils, bb as stop, y as toDisplayString, bc as toHandlerKey, t as toHandlers, bd as toRaw, be as toRef, bf as toRefs, bg as toValue, bh as transformVNodeArgs, bi as triggerRef, z as unref, bj as useAttrs, bk as useCssModule, bl as useCssVars, bm as useModel, bn as useSSRContext, bo as useSlots, bp as useTransitionState, bq as vModelCheckbox, br as vModelDynamic, bs as vModelRadio, bt as vModelSelect, bu as vModelText, bv as vShow, bw as version$1, bx as warn, by as watch, bz as watchEffect, bA as watchPostEffect, bB as watchSyncEffect, bC as withAsyncContext, h as withCtx, bD as withDefaults, d as withDirectives, bE as withKeys, bF as withMemo, bG as withModifiers, w as withScopeId, bH as getSortedTabs, bI as updateTabsPosition, bJ as _export_sfc, bK as useVModel, bL as _sfc_main$5, bM as _sfc_main$6, bN as useToggle, bO as shouldHideTabGroup, bP as DEFAULT_TAB_GROUP, bQ as useGroupedTabs, bR as ungroupAllTabs, bS as resetAllTabs, bT as removeTabGroup, bU as checkGroupExist, bV as createGroup, bW as useDevToolsSettings, bX as useFrameState, bY as _sfc_main$b, bZ as _sfc_main$d } from './index-6b2b8b6a.js';
|
|
3
|
+
import { _ as _sfc_main$4 } from './Icon.vue_vue_type_script_setup_true_lang-4a8fe583.js';
|
|
4
4
|
import { g as getAugmentedNamespace, c as commonjsGlobal, a as getDefaultExportFromCjs } from './_commonjsHelpers-7e83dbf2.js';
|
|
5
|
-
import { _ as _sfc_main$8 } from './IconButton.vue_vue_type_script_setup_true_lang-
|
|
6
|
-
import { _ as _sfc_main$7 } from './TextInput.vue_vue_type_script_setup_true_lang-
|
|
7
|
-
import { _ as _sfc_main$9 } from './IconTitle.vue_vue_type_script_setup_true_lang-
|
|
5
|
+
import { _ as _sfc_main$8 } from './IconButton.vue_vue_type_script_setup_true_lang-7533112d.js';
|
|
6
|
+
import { _ as _sfc_main$7 } from './TextInput.vue_vue_type_script_setup_true_lang-40607e18.js';
|
|
7
|
+
import { _ as _sfc_main$9 } from './IconTitle.vue_vue_type_script_setup_true_lang-bdc080e4.js';
|
|
8
8
|
|
|
9
9
|
const compile = () => {
|
|
10
10
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ar as h, o as openBlock, e as createElementBlock, f as renderSlot, l as normalizeStyle } from './index-
|
|
1
|
+
import { ar as h, o as openBlock, e as createElementBlock, f as renderSlot, l as normalizeStyle } from './index-6b2b8b6a.js';
|
|
2
2
|
|
|
3
3
|
const M = {
|
|
4
4
|
name: "splitpanes",
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { _ as _sfc_main$2 } from './StateFields.vue_vue_type_script_setup_true_lang-
|
|
2
|
-
import { _ as __unplugin_components_0 } from './PanelGrids-
|
|
3
|
-
import { p as pushScopeId, a as popScopeId, n as nextTick, o as openBlock, c as createBlock, w as withScopeId, m as markRaw, s as shallowReactive, r as resolveComponent, b as resolveDirective, d as withDirectives, e as createElementBlock, f as renderSlot, g as createCommentVNode, h as withCtx, F as Fragment, i as renderList, j as resolveDynamicComponent, k as mergeProps, t as toHandlers, l as normalizeStyle, q as normalizeClass, u as createVNode, v as defineComponent, x as createBaseVNode, y as toDisplayString, z as unref, _ as __unplugin_components_7, A as timelineLayer, B as activeTimelineEvents, C as activeTimelineEventIndex, D as toggleTimelineEventIndex, E as timelineEventDetails, G as activeLayerId, H as toggleTimelineLayer } from './index-
|
|
1
|
+
import { _ as _sfc_main$2 } from './StateFields.vue_vue_type_script_setup_true_lang-65d71ce4.js';
|
|
2
|
+
import { _ as __unplugin_components_0 } from './PanelGrids-3cdf73ad.js';
|
|
3
|
+
import { p as pushScopeId, a as popScopeId, n as nextTick, o as openBlock, c as createBlock, w as withScopeId, m as markRaw, s as shallowReactive, r as resolveComponent, b as resolveDirective, d as withDirectives, e as createElementBlock, f as renderSlot, g as createCommentVNode, h as withCtx, F as Fragment, i as renderList, j as resolveDynamicComponent, k as mergeProps, t as toHandlers, l as normalizeStyle, q as normalizeClass, u as createVNode, v as defineComponent, x as createBaseVNode, y as toDisplayString, z as unref, _ as __unplugin_components_7, A as timelineLayer, B as activeTimelineEvents, C as activeTimelineEventIndex, D as toggleTimelineEventIndex, E as timelineEventDetails, G as activeLayerId, H as toggleTimelineLayer } from './index-6b2b8b6a.js';
|
|
4
4
|
import { d as dayjs } from './dayjs.min-ff0bd3aa.js';
|
|
5
|
-
import { g, M } from './splitpanes.es-
|
|
6
|
-
import './Icon.vue_vue_type_script_setup_true_lang-
|
|
7
|
-
import './index-
|
|
8
|
-
import './IconButton.vue_vue_type_script_setup_true_lang-
|
|
5
|
+
import { g, M } from './splitpanes.es-16f3d333.js';
|
|
6
|
+
import './Icon.vue_vue_type_script_setup_true_lang-4a8fe583.js';
|
|
7
|
+
import './index-5266a399.js';
|
|
8
|
+
import './IconButton.vue_vue_type_script_setup_true_lang-7533112d.js';
|
|
9
9
|
import './_commonjsHelpers-7e83dbf2.js';
|
|
10
10
|
|
|
11
11
|
function getInternetExplorerVersion() {
|
package/dist/client/index.html
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
6
|
<link rel="icon" href="/favicon.svg" type="image/svg+xml">
|
|
7
7
|
<title>Vue DevTools</title>
|
|
8
|
-
<script type="module" crossorigin src="./assets/index-
|
|
9
|
-
<link rel="stylesheet" href="./assets/index-
|
|
8
|
+
<script type="module" crossorigin src="./assets/index-6b2b8b6a.js"></script>
|
|
9
|
+
<link rel="stylesheet" href="./assets/index-f4f0a93b.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
|
12
12
|
<div id="app"></div>
|
package/dist/vite.cjs
CHANGED
|
@@ -13757,7 +13757,8 @@ function getVueDevtoolsPath() {
|
|
|
13757
13757
|
}
|
|
13758
13758
|
const defaultOptions = {
|
|
13759
13759
|
appendTo: "",
|
|
13760
|
-
analyze: compiler.analyzeOptionsDefault
|
|
13760
|
+
analyze: compiler.analyzeOptionsDefault,
|
|
13761
|
+
openInEditorHost: false
|
|
13761
13762
|
};
|
|
13762
13763
|
function mergeOptions(options) {
|
|
13763
13764
|
return Object.assign({}, defaultOptions, options);
|
|
@@ -13868,7 +13869,9 @@ import 'virtual:vue-devtools-path:app.js'`;
|
|
|
13868
13869
|
inspect,
|
|
13869
13870
|
VueInspector__default({
|
|
13870
13871
|
toggleComboKey: "",
|
|
13871
|
-
toggleButtonVisibility: "never"
|
|
13872
|
+
toggleButtonVisibility: "never",
|
|
13873
|
+
openInEditorHost: pluginOptions.openInEditorHost,
|
|
13874
|
+
...pluginOptions.appendTo ? { appendTo: pluginOptions.appendTo } : {}
|
|
13872
13875
|
})
|
|
13873
13876
|
];
|
|
13874
13877
|
}
|
package/dist/vite.d.ts
CHANGED
|
@@ -18,6 +18,11 @@ interface VitePluginVueDevToolsOptions {
|
|
|
18
18
|
* }
|
|
19
19
|
*/
|
|
20
20
|
analyze?: Partial<AnalyzeOptions>;
|
|
21
|
+
/**
|
|
22
|
+
* Customize openInEditor host (e.g. http://localhost:3000)
|
|
23
|
+
* @default false
|
|
24
|
+
*/
|
|
25
|
+
openInEditorHost?: string | false;
|
|
21
26
|
}
|
|
22
27
|
declare function VitePluginVueDevTools(options?: VitePluginVueDevToolsOptions): PluginOption;
|
|
23
28
|
|
package/dist/vite.mjs
CHANGED
|
@@ -13731,7 +13731,8 @@ function getVueDevtoolsPath() {
|
|
|
13731
13731
|
}
|
|
13732
13732
|
const defaultOptions = {
|
|
13733
13733
|
appendTo: "",
|
|
13734
|
-
analyze: analyzeOptionsDefault
|
|
13734
|
+
analyze: analyzeOptionsDefault,
|
|
13735
|
+
openInEditorHost: false
|
|
13735
13736
|
};
|
|
13736
13737
|
function mergeOptions(options) {
|
|
13737
13738
|
return Object.assign({}, defaultOptions, options);
|
|
@@ -13842,7 +13843,9 @@ import 'virtual:vue-devtools-path:app.js'`;
|
|
|
13842
13843
|
inspect,
|
|
13843
13844
|
VueInspector({
|
|
13844
13845
|
toggleComboKey: "",
|
|
13845
|
-
toggleButtonVisibility: "never"
|
|
13846
|
+
toggleButtonVisibility: "never",
|
|
13847
|
+
openInEditorHost: pluginOptions.openInEditorHost,
|
|
13848
|
+
...pluginOptions.appendTo ? { appendTo: pluginOptions.appendTo } : {}
|
|
13846
13849
|
})
|
|
13847
13850
|
];
|
|
13848
13851
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite-plugin-vue-devtools",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.0-beta.
|
|
4
|
+
"version": "1.0.0-beta.4",
|
|
5
5
|
"description": "A vite plugin for Vue DevTools",
|
|
6
6
|
"author": "webfansplz",
|
|
7
7
|
"license": "MIT",
|
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
"execa": "^7.1.1",
|
|
53
53
|
"sirv": "^2.0.3",
|
|
54
54
|
"vite-plugin-inspect": "^0.7.33",
|
|
55
|
-
"vite-plugin-vue-inspector": "^3.
|
|
56
|
-
"@vite-plugin-vue-devtools/core": "1.0.0-beta.
|
|
55
|
+
"vite-plugin-vue-inspector": "^3.5.0",
|
|
56
|
+
"@vite-plugin-vue-devtools/core": "1.0.0-beta.4"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@types/node": "^20.4.4",
|
|
@@ -28,6 +28,7 @@ const inspectorCardStyle = computed(() => ({ top: props.bounds.top < 35 ? 0 : '-
|
|
|
28
28
|
<span class="vue-devtools-component-inspector-card" :style="inspectorCardStyle">
|
|
29
29
|
<{{ name }}>
|
|
30
30
|
<i>{{ Math.round(bounds.width * 100) / 100 }} x {{ Math.round(bounds.height * 100) / 100 }}</i>
|
|
31
|
+
<slot name="header-extra" />
|
|
31
32
|
</span>
|
|
32
33
|
</div>
|
|
33
34
|
</template>
|
package/src/views/Main.vue
CHANGED
|
@@ -6,8 +6,9 @@ import vueDevToolsOptions from 'virtual:vue-devtools-options'
|
|
|
6
6
|
import { DevToolsHooks, collectDevToolsHookBuffer } from '@vite-plugin-vue-devtools/core'
|
|
7
7
|
import Frame from './FrameBox.vue'
|
|
8
8
|
import ComponentInspector from './ComponentInspector.vue'
|
|
9
|
-
import { useHighlightComponent, useIframe, useInspector, usePanelVisible, usePiPMode, usePosition } from './composables'
|
|
9
|
+
import { useHighlightComponent, useIframe, useInspector, usePanelVisible, usePiPMode, usePosition, useRerenderHighlight } from './composables'
|
|
10
10
|
import { checkIsSafari, useColorScheme, usePreferredColorScheme, warn } from './utils'
|
|
11
|
+
import RerenderIndicator from './RerenderIndicator.vue'
|
|
11
12
|
|
|
12
13
|
const props = defineProps({
|
|
13
14
|
hook: {
|
|
@@ -79,6 +80,7 @@ const { iframe, getIframe } = useIframe(clientUrl, async () => {
|
|
|
79
80
|
// Picture-in-Picture mode
|
|
80
81
|
const { popup } = usePiPMode(getIframe, hook)
|
|
81
82
|
const { overlayVisible, name: componentName, bounds, highlight, unHighlight } = useHighlightComponent()
|
|
83
|
+
const { updateRerenderHighlightInfo } = useRerenderHighlight()
|
|
82
84
|
|
|
83
85
|
async function setupClient(iframe: HTMLIFrameElement) {
|
|
84
86
|
const injection: any = iframe?.contentWindow?.__VUE_DEVTOOLS_VIEW__
|
|
@@ -124,6 +126,9 @@ async function setupClient(iframe: HTMLIFrameElement) {
|
|
|
124
126
|
}, 2000)
|
|
125
127
|
},
|
|
126
128
|
},
|
|
129
|
+
rerenderHighlight: {
|
|
130
|
+
updateInfo: updateRerenderHighlightInfo,
|
|
131
|
+
},
|
|
127
132
|
})
|
|
128
133
|
}
|
|
129
134
|
|
|
@@ -284,6 +289,7 @@ collectHookBuffer()
|
|
|
284
289
|
</div>
|
|
285
290
|
<!-- component inspector -->
|
|
286
291
|
<ComponentInspector v-if="overlayVisible" :bounds="bounds" :name="componentName" />
|
|
292
|
+
<RerenderIndicator />
|
|
287
293
|
</template>
|
|
288
294
|
|
|
289
295
|
<style scoped>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import ComponentInspector from './ComponentInspector.vue'
|
|
3
|
+
import { useRerenderHighlight } from './composables'
|
|
4
|
+
|
|
5
|
+
const { rerenderHighlightMap } = useRerenderHighlight()
|
|
6
|
+
|
|
7
|
+
const colors = [
|
|
8
|
+
['#ff5555', 50],
|
|
9
|
+
['#fff888', 20],
|
|
10
|
+
] as const
|
|
11
|
+
|
|
12
|
+
function getColors(times: number) {
|
|
13
|
+
const [color] = colors.find(([_, t]) => times >= t) || '#fff'
|
|
14
|
+
return color as string
|
|
15
|
+
}
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<template v-for="[uid, { bound, rerenderCount, name }] in rerenderHighlightMap.entries()" :key="uid">
|
|
20
|
+
<ComponentInspector
|
|
21
|
+
:bounds="bound"
|
|
22
|
+
:name="name"
|
|
23
|
+
>
|
|
24
|
+
<template #header-extra>
|
|
25
|
+
<span
|
|
26
|
+
v-if="rerenderCount"
|
|
27
|
+
>
|
|
28
|
+
(Rerender Count: <span
|
|
29
|
+
:style="{
|
|
30
|
+
color: getColors(rerenderCount),
|
|
31
|
+
}"
|
|
32
|
+
>{{ rerenderCount + 1 }})</span>
|
|
33
|
+
</span>
|
|
34
|
+
</template>
|
|
35
|
+
</ComponentInspector>
|
|
36
|
+
</template>
|
|
37
|
+
</template>
|
package/src/views/composables.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { computed, onMounted, reactive, ref, shallowRef, watchEffect } from 'vue'
|
|
2
2
|
import type { CSSProperties, Ref } from 'vue'
|
|
3
|
-
import { clamp, useObjectStorage, useScreenSafeArea, useWindowEventListener, warn } from './utils'
|
|
3
|
+
import { clamp, createDebounceFn, useObjectStorage, useScreenSafeArea, useWindowEventListener, warn } from './utils'
|
|
4
4
|
|
|
5
5
|
interface DevToolsFrameState {
|
|
6
6
|
width: number
|
|
@@ -474,3 +474,45 @@ export function useHighlightComponent() {
|
|
|
474
474
|
unHighlight,
|
|
475
475
|
}
|
|
476
476
|
}
|
|
477
|
+
|
|
478
|
+
// use rerender highlight
|
|
479
|
+
|
|
480
|
+
interface RerenderHighlightData {
|
|
481
|
+
name: string
|
|
482
|
+
rerenderCount: number
|
|
483
|
+
bound: {
|
|
484
|
+
width: number
|
|
485
|
+
height: number
|
|
486
|
+
left: number
|
|
487
|
+
top: number
|
|
488
|
+
}
|
|
489
|
+
debounceFn: () => void
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
const rerenderHighlightMap = ref<Map</* component instance uid */string, RerenderHighlightData>>(new Map())
|
|
493
|
+
|
|
494
|
+
function updateRerenderHighlightInfo(uid: string, name: string, bound: RerenderHighlightData['bound']) {
|
|
495
|
+
const data = rerenderHighlightMap.value.get(uid)
|
|
496
|
+
if (!data) {
|
|
497
|
+
const debounceFn = createDebounceFn(() => {
|
|
498
|
+
rerenderHighlightMap.value.delete(uid)
|
|
499
|
+
}, 3000)
|
|
500
|
+
rerenderHighlightMap.value.set(uid, {
|
|
501
|
+
rerenderCount: 0,
|
|
502
|
+
bound,
|
|
503
|
+
debounceFn,
|
|
504
|
+
name,
|
|
505
|
+
})
|
|
506
|
+
debounceFn()
|
|
507
|
+
return
|
|
508
|
+
}
|
|
509
|
+
data.rerenderCount += 1
|
|
510
|
+
data.debounceFn()
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
export function useRerenderHighlight() {
|
|
514
|
+
return {
|
|
515
|
+
rerenderHighlightMap,
|
|
516
|
+
updateRerenderHighlightInfo,
|
|
517
|
+
}
|
|
518
|
+
}
|