vite-plugin-vue-devtools 1.0.0-alpha.2 → 1.0.0-beta.1

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.
Files changed (41) hide show
  1. package/README.md +29 -11
  2. package/README.zh-CN.md +185 -0
  3. package/dist/client/assets/{Icon.vue_vue_type_script_setup_true_lang-9344440e.js → Icon.vue_vue_type_script_setup_true_lang-7b574e17.js} +1 -1
  4. package/dist/client/assets/{IconButton.vue_vue_type_script_setup_true_lang-f308a32e.js → IconButton.vue_vue_type_script_setup_true_lang-df1aed4a.js} +2 -2
  5. package/dist/client/assets/{IconTitle.vue_vue_type_script_setup_true_lang-4cf300a8.js → IconTitle.vue_vue_type_script_setup_true_lang-340f9637.js} +1 -1
  6. package/dist/client/assets/{IframeView.vue_vue_type_script_setup_true_lang-a998c802.js → IframeView.vue_vue_type_script_setup_true_lang-26b984e0.js} +1 -1
  7. package/dist/client/assets/{PanelGrids-bf67e36d.js → PanelGrids-79045561.js} +1 -1
  8. package/dist/client/assets/{SectionBlock-30cd0db7.js → SectionBlock-d6546a5c.js} +3 -3
  9. package/dist/client/assets/{StateFields.vue_vue_type_script_setup_true_lang-f232f911.js → StateFields.vue_vue_type_script_setup_true_lang-87cd4432.js} +4 -4
  10. package/dist/client/assets/{Switch.vue_vue_type_script_setup_true_lang-ff441d43.js → Switch.vue_vue_type_script_setup_true_lang-e9fc0dc8.js} +2 -2
  11. package/dist/client/assets/{TextInput.vue_vue_type_script_setup_true_lang-49fa3d66.js → TextInput.vue_vue_type_script_setup_true_lang-c719d9ea.js} +2 -2
  12. package/dist/client/assets/{__eyedropper-04974bae.js → __eyedropper-9c607201.js} +3 -3
  13. package/dist/client/assets/{assets-103b7b87.js → assets-6d3c029f.js} +16 -20
  14. package/dist/client/assets/{component-docs-c0980d29.js → component-docs-a9751a4b.js} +4 -4
  15. package/dist/client/assets/{components-4ea0f479.js → components-b5374f38.js} +8 -400
  16. package/dist/client/assets/data-8705dbff.js +396 -0
  17. package/dist/client/assets/dayjs.min-52f29994.js +13 -0
  18. package/dist/client/assets/{documentations-81489cc3.js → documentations-c72e57d5.js} +2 -2
  19. package/dist/client/assets/{graph-3ab96556.js → graph-28ffd27f.js} +81 -46
  20. package/dist/client/assets/index-43ac0c1e.js +70738 -0
  21. package/dist/client/assets/{index-d3dcbe9e.css → index-b16c49d4.css} +2 -1
  22. package/dist/client/assets/{index-cc695468.js → index-cdabf7ff.js} +1 -1
  23. package/dist/client/assets/{inspect-a4a1ccce.js → inspect-ce9eb51a.js} +2 -2
  24. package/dist/client/assets/{npm-d82cc33a.js → npm-307e966b.js} +5 -6
  25. package/dist/client/assets/{overview-62088e28.js → overview-5ce230b6.js} +4 -4
  26. package/dist/client/assets/{pages-b69a68f5.js → pages-ce469168.js} +5 -5
  27. package/dist/client/assets/{pinia-f806031f.js → pinia-309a64ad.js} +6 -6
  28. package/dist/client/assets/rerender-trace-6c5229c1.css +14 -0
  29. package/dist/client/assets/rerender-trace-b0a16930.js +369 -0
  30. package/dist/client/assets/{routes-06a1de65.js → routes-fef0d125.js} +7 -7
  31. package/dist/client/assets/{settings-a01dd288.js → settings-d650aa71.js} +6 -7
  32. package/dist/client/assets/{splitpanes.es-87d8571e.js → splitpanes.es-a1996dda.js} +1 -1
  33. package/dist/client/assets/{timeline-4af72c7c.js → timeline-881ae377.js} +8 -18
  34. package/dist/client/index.html +2 -2
  35. package/dist/vite.cjs +18 -7
  36. package/dist/vite.d.ts +10 -0
  37. package/dist/vite.mjs +19 -8
  38. package/package.json +2 -2
  39. package/src/views/composables.ts +2 -3
  40. package/dist/client/assets/_commonjsHelpers-65004790.js +0 -37
  41. package/dist/client/assets/index-773a455a.js +0 -18422
@@ -0,0 +1,369 @@
1
+ import { v as defineComponent, a$ as ref, c7 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, c8 as useDevToolsClient, c9 as rootPath, _ as __unplugin_components_7, c6 as __unplugin_components_1, p as pushScopeId, a as popScopeId, y as toDisplayString, bM as _export_sfc } from './index-43ac0c1e.js';
2
+ import { d as dayjs } from './dayjs.min-52f29994.js';
3
+ import { g as getSetupStateInfo, t as toRaw } from './data-8705dbff.js';
4
+
5
+ const _withScopeId = (n) => (pushScopeId("data-v-c4e9e7b3"), n = n(), popScopeId(), n);
6
+ const _hoisted_1 = {
7
+ "h-full": "",
8
+ "w-full": "",
9
+ "of-auto": "",
10
+ "n-panel-grids": ""
11
+ };
12
+ const _hoisted_2 = { "w-full": "" };
13
+ const _hoisted_3 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createBaseVNode("p", {
14
+ "text-xs": "",
15
+ "op-50": ""
16
+ }, " Start Tracing ", -1));
17
+ const _hoisted_4 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createBaseVNode("p", {
18
+ "text-xs": "",
19
+ "op-50": ""
20
+ }, " Clear ", -1));
21
+ const _hoisted_5 = {
22
+ key: 0,
23
+ flex: "~ items-center justify-center",
24
+ "h-screen": ""
25
+ };
26
+ const _hoisted_6 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createBaseVNode("i", {
27
+ class: "i-fluent:record-12-regular",
28
+ text: "4.7",
29
+ "cursor-pointer": "",
30
+ "text-secondary": "",
31
+ hover: "text-black dark:text-white"
32
+ }, null, -1));
33
+ const _hoisted_7 = [
34
+ _hoisted_6
35
+ ];
36
+ const _hoisted_8 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createBaseVNode("p", { flex: "~ items-center" }, [
37
+ /* @__PURE__ */ createTextVNode(" Click the clear button "),
38
+ /* @__PURE__ */ createBaseVNode("span", {
39
+ border: "~ base",
40
+ "mx-1": "",
41
+ "inline-flex": "",
42
+ "items-center": "",
43
+ "justify-center": "",
44
+ p1: ""
45
+ }, [
46
+ /* @__PURE__ */ createBaseVNode("i", {
47
+ class: "i-grommet-icons:clear",
48
+ text: "3.8",
49
+ "text-secondary": ""
50
+ })
51
+ ]),
52
+ /* @__PURE__ */ createTextVNode(" to clear the results. ")
53
+ ], -1));
54
+ const _hoisted_9 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createBaseVNode("p", { "lh-5": "" }, [
55
+ /* @__PURE__ */ createTextVNode(" Start tracing, do something in the page. Then,"),
56
+ /* @__PURE__ */ createBaseVNode("br"),
57
+ /* @__PURE__ */ createTextVNode(" press the stop button to show the resulting triggers for page rerenders. ")
58
+ ], -1));
59
+ const _hoisted_10 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createBaseVNode("p", { class: "loading-animation" }, " Tracing... ", -1));
60
+ const _hoisted_11 = { key: 1 };
61
+ const _hoisted_12 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createBaseVNode("thead", {
62
+ border: "b r base",
63
+ sticky: "",
64
+ display: "table-header-group",
65
+ "top-0": "",
66
+ "z-10": ""
67
+ }, [
68
+ /* @__PURE__ */ createBaseVNode("tr", { "bg-base": "" }, [
69
+ /* @__PURE__ */ createBaseVNode("th", {
70
+ "p-2": "",
71
+ "text-center": ""
72
+ }, " Component File "),
73
+ /* @__PURE__ */ createBaseVNode("th", {
74
+ "p-2": "",
75
+ "text-center": ""
76
+ }, " Key "),
77
+ /* @__PURE__ */ createBaseVNode("th", {
78
+ "p-2": "",
79
+ "text-center": ""
80
+ }, " Value "),
81
+ /* @__PURE__ */ createBaseVNode("th", {
82
+ "p-2": "",
83
+ "text-center": ""
84
+ }, " Data Type "),
85
+ /* @__PURE__ */ createBaseVNode("th", {
86
+ "p-2": "",
87
+ "text-center": ""
88
+ }, " Update Type "),
89
+ /* @__PURE__ */ createBaseVNode("th", {
90
+ "p-2": "",
91
+ "text-center": ""
92
+ }, " Update Time ")
93
+ ])
94
+ ], -1));
95
+ const _hoisted_13 = { border: "b r base" };
96
+ const _hoisted_14 = ["onClick"];
97
+ const _hoisted_15 = {
98
+ "max-w-30": "",
99
+ "w-30": "",
100
+ "of-hidden": "",
101
+ "text-ellipsis": "",
102
+ "ws-nowrap": "",
103
+ "px-2": "",
104
+ "text-center": "",
105
+ "text-sm": "",
106
+ "font-mono": "",
107
+ op70: ""
108
+ };
109
+ const _hoisted_16 = {
110
+ "max-w-30": "",
111
+ "w-30": "",
112
+ "of-hidden": "",
113
+ "text-ellipsis": "",
114
+ "ws-nowrap": "",
115
+ "px-2": "",
116
+ "text-center": "",
117
+ "text-sm": "",
118
+ "font-mono": "",
119
+ op70: ""
120
+ };
121
+ const _hoisted_17 = {
122
+ "max-w-30": "",
123
+ "w-30": "",
124
+ "of-hidden": "",
125
+ "text-ellipsis": "",
126
+ "ws-nowrap": "",
127
+ "px-2": "",
128
+ "text-center": "",
129
+ "text-sm": "",
130
+ "font-mono": "",
131
+ op70: ""
132
+ };
133
+ const _hoisted_18 = {
134
+ "max-w-30": "",
135
+ "w-30": "",
136
+ "of-hidden": "",
137
+ "text-ellipsis": "",
138
+ "ws-nowrap": "",
139
+ "px-2": "",
140
+ "text-center": "",
141
+ "text-sm": "",
142
+ "font-mono": "",
143
+ op70: ""
144
+ };
145
+ const _hoisted_19 = {
146
+ "max-w-30": "",
147
+ "w-30": "",
148
+ "of-hidden": "",
149
+ "text-ellipsis": "",
150
+ "ws-nowrap": "",
151
+ "px-2": "",
152
+ "text-center": "",
153
+ "text-sm": "",
154
+ "font-mono": "",
155
+ op70: ""
156
+ };
157
+ const _sfc_main = /* @__PURE__ */ defineComponent({
158
+ __name: "rerender-trace",
159
+ setup(__props) {
160
+ const client = useDevToolsClient();
161
+ const hook = client.value.hook;
162
+ const isTracing = ref(false);
163
+ const result = ref([]);
164
+ const traceBuffer = ref([]);
165
+ function normalizeEventInfo(e, instance) {
166
+ const info = getSetupStateInfo(e.target);
167
+ const file = instance.type.__file?.replace?.(rootPath, "") ?? "-";
168
+ const dataType = info.computed ? "Computed" : info.ref ? "Ref" : info.reactive ? "Reactive" : null;
169
+ const index = Object.values(instance.devtoolsRawSetupState).map((i) => toRaw(i)).indexOf(toRaw(e.target));
170
+ const key = index === -1 ? e.key ?? "unknown" : Object.keys(instance.devtoolsRawSetupState)[index];
171
+ const value = !dataType || info.reactive ? e.target[e.key] : e.target.value;
172
+ return {
173
+ componentFile: file,
174
+ fullFilePath: instance.type.__file ?? "",
175
+ key,
176
+ value,
177
+ dataType: dataType ?? "unknown",
178
+ updateType: e.type ?? "-",
179
+ updateTime: Date.now()
180
+ };
181
+ }
182
+ hook.on(DevToolsHooks.RENDER_TRACKED, (e, instance) => {
183
+ isTracing.value && traceBuffer.value.push(normalizeEventInfo(e, instance));
184
+ });
185
+ hook.on(DevToolsHooks.RENDER_TRIGGERED, (e, instance) => {
186
+ isTracing.value && traceBuffer.value.push(normalizeEventInfo(e, instance));
187
+ });
188
+ function start() {
189
+ result.value = [];
190
+ traceBuffer.value = [];
191
+ isTracing.value = true;
192
+ }
193
+ function stop() {
194
+ isTracing.value = false;
195
+ const typeOrder = { Ref: 0, Computed: 1 };
196
+ result.value = traceBuffer.value.sort((a, b) => typeOrder[a.dataType] - typeOrder[b.dataType]).sort((a, b) => a.updateTime - b.updateTime);
197
+ traceBuffer.value = [];
198
+ }
199
+ function clear() {
200
+ if (isTracing.value)
201
+ return;
202
+ result.value = [];
203
+ }
204
+ function openInEditor(filePath) {
205
+ if (!filePath)
206
+ return;
207
+ client.value.openInEditor(filePath);
208
+ }
209
+ return (_ctx, _cache) => {
210
+ const _component_VTooltip = resolveComponent("VTooltip");
211
+ const _component_VDCard = __unplugin_components_7;
212
+ const _component_VDBadge = __unplugin_components_1;
213
+ return openBlock(), createElementBlock("div", _hoisted_1, [
214
+ createBaseVNode("div", _hoisted_2, [
215
+ createVNode(_component_VDCard, {
216
+ flex: "~ col gap-2",
217
+ absolute: "",
218
+ "right-3": "",
219
+ "top-3": "",
220
+ "z-20": "",
221
+ p1: ""
222
+ }, {
223
+ default: withCtx(() => [
224
+ createVNode(_component_VTooltip, {
225
+ placement: "bottom",
226
+ distance: 12,
227
+ "text-center": ""
228
+ }, {
229
+ popper: withCtx(() => [
230
+ _hoisted_3
231
+ ]),
232
+ default: withCtx(() => [
233
+ !unref(isTracing) ? (openBlock(), createElementBlock("i", {
234
+ key: 0,
235
+ class: "i-fluent:record-12-regular",
236
+ text: "4.7",
237
+ "cursor-pointer": "",
238
+ "text-secondary": "",
239
+ hover: "text-black dark:text-white",
240
+ onClick: start
241
+ })) : (openBlock(), createElementBlock("i", {
242
+ key: 1,
243
+ class: "i-fluent:record-stop-12-regular",
244
+ text: "4.7",
245
+ "cursor-pointer": "",
246
+ "text-red-600": "",
247
+ hover: "text-red-800",
248
+ onClick: stop
249
+ }))
250
+ ]),
251
+ _: 1
252
+ }),
253
+ createVNode(_component_VTooltip, {
254
+ placement: "bottom",
255
+ distance: 12,
256
+ "text-center": ""
257
+ }, {
258
+ popper: withCtx(() => [
259
+ _hoisted_4
260
+ ]),
261
+ default: withCtx(() => [
262
+ createBaseVNode("i", {
263
+ class: "i-grommet-icons:clear",
264
+ text: "3.8",
265
+ "cursor-pointer": "",
266
+ "text-secondary": "",
267
+ hover: "text-black dark:text-white",
268
+ onClick: clear
269
+ })
270
+ ]),
271
+ _: 1
272
+ })
273
+ ]),
274
+ _: 1
275
+ }),
276
+ !unref(result).length ? (openBlock(), createElementBlock("div", _hoisted_5, [
277
+ !unref(isTracing) && !unref(result).length ? (openBlock(), createBlock(_component_VDCard, {
278
+ key: 0,
279
+ flex: "~ col gap2",
280
+ relative: "",
281
+ p3: "",
282
+ op60: ""
283
+ }, {
284
+ default: withCtx(() => [
285
+ createBaseVNode("p", { flex: "~ items-center" }, [
286
+ createTextVNode(" Click the start button "),
287
+ createBaseVNode("button", {
288
+ border: "~ base",
289
+ "mx-1": "",
290
+ "inline-flex": "",
291
+ "items-center": "",
292
+ "justify-center": "",
293
+ p: "0.5",
294
+ onClick: start
295
+ }, _hoisted_7),
296
+ createTextVNode(" to start a new tracing. ")
297
+ ]),
298
+ _hoisted_8,
299
+ _hoisted_9,
300
+ createVNode(_component_VDBadge, {
301
+ absolute: "",
302
+ "right--0.5": "",
303
+ "top-0": "",
304
+ "rounded-0": "",
305
+ "bg-green-400:10": "",
306
+ "text-green-400": "",
307
+ title: "Experimental",
308
+ textContent: "Experimental"
309
+ })
310
+ ]),
311
+ _: 1
312
+ })) : unref(isTracing) && !unref(result).length ? (openBlock(), createBlock(_component_VDCard, {
313
+ key: 1,
314
+ flex: "~ col gap2",
315
+ p3: ""
316
+ }, {
317
+ default: withCtx(() => [
318
+ _hoisted_10
319
+ ]),
320
+ _: 1
321
+ })) : createCommentVNode("", true)
322
+ ])) : createCommentVNode("", true),
323
+ unref(result).length && !unref(isTracing) ? (openBlock(), createElementBlock("table", _hoisted_11, [
324
+ _hoisted_12,
325
+ createBaseVNode("tbody", _hoisted_13, [
326
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(result), (item, index) => {
327
+ return openBlock(), createElementBlock("tr", {
328
+ key: index,
329
+ class: "group",
330
+ "h-7": "",
331
+ border: "b dashed transparent hover:base"
332
+ }, [
333
+ createBaseVNode("td", {
334
+ "max-w-50": "",
335
+ "of-hidden": "",
336
+ "text-ellipsis": "",
337
+ "px-2": "",
338
+ "text-center": "",
339
+ "text-sm": "",
340
+ underline: "",
341
+ op70: "",
342
+ hover: "text-primary",
343
+ onClick: ($event) => openInEditor(item.fullFilePath)
344
+ }, toDisplayString(item.componentFile), 9, _hoisted_14),
345
+ createBaseVNode("td", _hoisted_15, toDisplayString(item.key), 1),
346
+ createBaseVNode("td", _hoisted_16, toDisplayString(item.value), 1),
347
+ createBaseVNode("td", _hoisted_17, toDisplayString(item.dataType), 1),
348
+ createBaseVNode("td", _hoisted_18, toDisplayString(item.updateType), 1),
349
+ createBaseVNode("td", _hoisted_19, toDisplayString(unref(dayjs)(item.updateTime).format("HH:mm:ss")), 1)
350
+ ]);
351
+ }), 128))
352
+ ])
353
+ ])) : createCommentVNode("", true)
354
+ ])
355
+ ]);
356
+ };
357
+ }
358
+ });
359
+
360
+ /* Injected with object hook! */
361
+
362
+ /* unplugin-vue-components disabled */const rerenderTrace_vue_vue_type_style_index_0_scoped_c4e9e7b3_lang = '';
363
+ /* Injected with object hook! */
364
+
365
+ const rerenderTrace = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-c4e9e7b3"]]);
366
+
367
+ /* Injected with object hook! */
368
+
369
+ export { rerenderTrace as default };
@@ -1,10 +1,10 @@
1
- import { _ as __unplugin_components_0 } from './PanelGrids-bf67e36d.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-773a455a.js';
3
- import { _ as _sfc_main$1 } from './StateFields.vue_vue_type_script_setup_true_lang-f232f911.js';
4
- import { g, M } from './splitpanes.es-87d8571e.js';
5
- import './Icon.vue_vue_type_script_setup_true_lang-9344440e.js';
6
- import './index-cc695468.js';
7
- import './IconButton.vue_vue_type_script_setup_true_lang-f308a32e.js';
1
+ import { _ as __unplugin_components_0 } from './PanelGrids-79045561.js';
2
+ import { v as defineComponent, z as unref, c1 as router, o as openBlock, e as createElementBlock, u as createVNode, h as withCtx, x as createBaseVNode, F as Fragment, i as renderList, c2 as routeRecordMatcherState, c3 as activeRouteRecordMatcherState, c as createBlock, c0 as _sfc_main$2, _ as __unplugin_components_7, q as normalizeClass, c4 as activeRouteRecordIndex, c5 as toggleRouteRecordMatcher, a9 as createTextVNode, y as toDisplayString, l as normalizeStyle, g as createCommentVNode, c6 as __unplugin_components_1 } from './index-43ac0c1e.js';
3
+ import { _ as _sfc_main$1 } from './StateFields.vue_vue_type_script_setup_true_lang-87cd4432.js';
4
+ import { g, M } from './splitpanes.es-a1996dda.js';
5
+ import './Icon.vue_vue_type_script_setup_true_lang-7b574e17.js';
6
+ import './index-cdabf7ff.js';
7
+ import './IconButton.vue_vue_type_script_setup_true_lang-df1aed4a.js';
8
8
 
9
9
  const _hoisted_1 = {
10
10
  key: 0,
@@ -1,10 +1,9 @@
1
- import { _ as _sfc_main$a, a as _sfc_main$c } from './Switch.vue_vue_type_script_setup_true_lang-ff441d43.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-773a455a.js';
3
- import { _ as _sfc_main$4 } from './Icon.vue_vue_type_script_setup_true_lang-9344440e.js';
4
- import { a as getAugmentedNamespace, c as commonjsGlobal, g as getDefaultExportFromCjs } from './_commonjsHelpers-65004790.js';
5
- import { _ as _sfc_main$8 } from './IconButton.vue_vue_type_script_setup_true_lang-f308a32e.js';
6
- import { _ as _sfc_main$7 } from './TextInput.vue_vue_type_script_setup_true_lang-49fa3d66.js';
7
- import { _ as _sfc_main$9 } from './IconTitle.vue_vue_type_script_setup_true_lang-4cf300a8.js';
1
+ import { _ as _sfc_main$a, a as _sfc_main$c } from './Switch.vue_vue_type_script_setup_true_lang-e9fc0dc8.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 getAugmentedNamespace, bI as commonjsGlobal, bJ as getDefaultExportFromCjs, bK as getSortedTabs, bL as updateTabsPosition, bM as _export_sfc, bN as useVModel, bO as _sfc_main$5, bP as _sfc_main$6, bQ as useToggle, bR as shouldHideTabGroup, bS as DEFAULT_TAB_GROUP, bT as useGroupedTabs, bU as ungroupAllTabs, bV as resetAllTabs, bW as removeTabGroup, bX as checkGroupExist, bY as createGroup, bZ as useDevToolsSettings, b_ as useFrameState, b$ as _sfc_main$b, c0 as _sfc_main$d } from './index-43ac0c1e.js';
3
+ import { _ as _sfc_main$4 } from './Icon.vue_vue_type_script_setup_true_lang-7b574e17.js';
4
+ import { _ as _sfc_main$8 } from './IconButton.vue_vue_type_script_setup_true_lang-df1aed4a.js';
5
+ import { _ as _sfc_main$7 } from './TextInput.vue_vue_type_script_setup_true_lang-c719d9ea.js';
6
+ import { _ as _sfc_main$9 } from './IconTitle.vue_vue_type_script_setup_true_lang-340f9637.js';
8
7
 
9
8
  const compile = () => {
10
9
  };
@@ -1,4 +1,4 @@
1
- import { ar as h, o as openBlock, e as createElementBlock, f as renderSlot, l as normalizeStyle } from './index-773a455a.js';
1
+ import { ar as h, o as openBlock, e as createElementBlock, f as renderSlot, l as normalizeStyle } from './index-43ac0c1e.js';
2
2
 
3
3
  const M = {
4
4
  name: "splitpanes",
@@ -1,21 +1,11 @@
1
- import { _ as _sfc_main$2 } from './StateFields.vue_vue_type_script_setup_true_lang-f232f911.js';
2
- import { _ as __unplugin_components_0 } from './PanelGrids-bf67e36d.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-773a455a.js';
4
- import { c as commonjsGlobal, g as getDefaultExportFromCjs } from './_commonjsHelpers-65004790.js';
5
- import { g, M } from './splitpanes.es-87d8571e.js';
6
- import './Icon.vue_vue_type_script_setup_true_lang-9344440e.js';
7
- import './index-cc695468.js';
8
- import './IconButton.vue_vue_type_script_setup_true_lang-f308a32e.js';
9
-
10
- var dayjs_min = {exports: {}};/* Injected with object hook! */
11
-
12
- (function (module, exports) {
13
- !function(t,e){module.exports=e();}(commonjsGlobal,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",c="month",f="quarter",h="year",d="date",l="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return "["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},m=function(t,e,n){var r=String(t);return !r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return (e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return -t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,c),s=n-i<0,u=e.clone().add(r+(s?-1:1),c);return +(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return {M:c,y:h,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:f}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},g="en",D={};D[g]=M;var p=function(t){return t instanceof b},S=function t(e,n,r){var i;if(!e)return g;if("string"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split("-");if(!i&&u.length>1)return t(u[0])}else {var a=e.name;D[a]=e,i=a;}return !r&&i&&(g=i),i||!r&&g},w=function(t,e){if(p(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new b(n)},O=v;O.l=S,O.i=p,O.w=function(t,e){return w(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var b=function(){function M(t){this.$L=S(t.locale,null,!0),this.parse(t);}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(O.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.$x=t.x||{},this.init();},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds();},m.$utils=function(){return O},m.isValid=function(){return !(this.$d.toString()===l)},m.isSame=function(t,e){var n=w(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return w(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<w(t)},m.$g=function(t,e,n){return O.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!O.u(e)||e,f=O.p(t),l=function(t,e){var i=O.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return O.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v="set"+(this.$u?"UTC":"");switch(f){case h:return r?l(1,0):l(31,11);case c:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+"Hours",0);case u:return $(v+"Minutes",1);case s:return $(v+"Seconds",2);case i:return $(v+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=O.p(t),f="set"+(this.$u?"UTC":""),l=(n={},n[a]=f+"Date",n[d]=f+"Date",n[c]=f+"Month",n[h]=f+"FullYear",n[u]=f+"Hours",n[s]=f+"Minutes",n[i]=f+"Seconds",n[r]=f+"Milliseconds",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===c||o===h){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d;}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[O.p(t)]()},m.add=function(r,f){var d,l=this;r=Number(r);var $=O.p(f),y=function(t){var e=w(l);return O.w(e.date(e.date()+Math.round(t*r)),l)};if($===c)return this.set(c,this.$M+r);if($===h)return this.set(h,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return O.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=O.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,c=n.months,f=n.meridiem,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},d=function(t){return O.s(s%12||12,t,"0")},$=f||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(y,(function(t,r){return r||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return O.s(e.$y,4,"0");case"M":return a+1;case"MM":return O.s(a+1,2,"0");case"MMM":return h(n.monthsShort,a,c,3);case"MMMM":return h(c,a);case"D":return e.$D;case"DD":return O.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return h(n.weekdaysMin,e.$W,o,2);case"ddd":return h(n.weekdaysShort,e.$W,o,3);case"dddd":return o[e.$W];case"H":return String(s);case"HH":return O.s(s,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return $(s,u,!0);case"A":return $(s,u,!1);case"m":return String(u);case"mm":return O.s(u,2,"0");case"s":return String(e.$s);case"ss":return O.s(e.$s,2,"0");case"SSS":return O.s(e.$ms,3,"0");case"Z":return i}return null}(t)||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=this,M=O.p(d),m=w(r),v=(m.utcOffset()-this.utcOffset())*e,g=this-m,D=function(){return O.m(y,m)};switch(M){case h:$=D()/12;break;case c:$=D();break;case f:$=D()/3;break;case o:$=(g-v)/6048e5;break;case a:$=(g-v)/864e5;break;case u:$=g/n;break;case s:$=g/e;break;case i:$=g/t;break;default:$=g;}return l?$:O.a($)},m.daysInMonth=function(){return this.endOf(c).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=S(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return O.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),_=b.prototype;return w.prototype=_,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",c],["$y",h],["$D",d]].forEach((function(t){_[t[1]]=function(e){return this.$g(e,t[0],t[1])};})),w.extend=function(t,e){return t.$i||(t(e,b,w),t.$i=!0),w},w.locale=S,w.isDayjs=p,w.unix=function(t){return w(1e3*t)},w.en=D[g],w.Ls=D,w.p={},w}));
14
- } (dayjs_min));
15
-
16
- var dayjs_minExports = dayjs_min.exports;
17
- const dayjs = /*@__PURE__*/getDefaultExportFromCjs(dayjs_minExports);
18
- /* Injected with object hook! */
1
+ import { _ as _sfc_main$2 } from './StateFields.vue_vue_type_script_setup_true_lang-87cd4432.js';
2
+ import { _ as __unplugin_components_0 } from './PanelGrids-79045561.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-43ac0c1e.js';
4
+ import { d as dayjs } from './dayjs.min-52f29994.js';
5
+ import { g, M } from './splitpanes.es-a1996dda.js';
6
+ import './Icon.vue_vue_type_script_setup_true_lang-7b574e17.js';
7
+ import './index-cdabf7ff.js';
8
+ import './IconButton.vue_vue_type_script_setup_true_lang-df1aed4a.js';
19
9
 
20
10
  function getInternetExplorerVersion() {
21
11
  var ua = window.navigator.userAgent;
@@ -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-773a455a.js"></script>
9
- <link rel="stylesheet" href="./assets/index-d3dcbe9e.css">
8
+ <script type="module" crossorigin src="./assets/index-43ac0c1e.js"></script>
9
+ <link rel="stylesheet" href="./assets/index-b16c49d4.css">
10
10
  </head>
11
11
  <body>
12
12
  <div id="app"></div>
package/dist/vite.cjs CHANGED
@@ -13751,11 +13751,19 @@ function getVueDevtoolsPath() {
13751
13751
  const pluginPath = vite.normalizePath(path$3__default.dirname(url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (document.currentScript && document.currentScript.src || new URL('vite.cjs', document.baseURI).href)))));
13752
13752
  return pluginPath.replace(/\/dist$/, "//src");
13753
13753
  }
13754
- function VitePluginVueDevTools(options = { appendTo: "" }) {
13754
+ const defaultOptions = {
13755
+ appendTo: "",
13756
+ analyze: core$1.analyzeOptionsDefault
13757
+ };
13758
+ function mergeOptions(options) {
13759
+ return Object.assign({}, defaultOptions, options);
13760
+ }
13761
+ function VitePluginVueDevTools(options) {
13755
13762
  const vueDevtoolsPath = getVueDevtoolsPath();
13756
13763
  const inspect = Inspect__default({
13757
13764
  silent: true
13758
13765
  });
13766
+ const pluginOptions = mergeOptions(options ?? {});
13759
13767
  let config;
13760
13768
  function configureServer(server) {
13761
13769
  const base = server.config.base || "/";
@@ -13820,16 +13828,19 @@ function VitePluginVueDevTools(options = { appendTo: "" }) {
13820
13828
  return `export default ${JSON.stringify({ base: config.base })}`;
13821
13829
  },
13822
13830
  transform(code, id) {
13823
- const { appendTo } = options;
13824
- if (!appendTo)
13831
+ const { root, base } = config;
13832
+ const projectPath = `${root}${base}`;
13833
+ if (!id.startsWith(projectPath))
13825
13834
  return;
13835
+ const { analyze, appendTo } = pluginOptions;
13826
13836
  const [filename] = id.split("?", 2);
13827
- if (typeof appendTo === "string" && filename.endsWith(appendTo) || appendTo instanceof RegExp && appendTo.test(filename))
13828
- return { code: `${code}
13829
- import 'virtual:vue-devtools-path:app.js'` };
13837
+ if (appendTo && (typeof appendTo === "string" && filename.endsWith(appendTo) || appendTo instanceof RegExp && appendTo.test(filename)))
13838
+ code = `${code}
13839
+ import 'virtual:vue-devtools-path:app.js'`;
13840
+ return core$1.analyzeCode(code, id, analyze);
13830
13841
  },
13831
13842
  transformIndexHtml(html) {
13832
- if (options.appendTo)
13843
+ if (pluginOptions.appendTo)
13833
13844
  return;
13834
13845
  return {
13835
13846
  html,
package/dist/vite.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { PluginOption } from 'vite';
2
+ import { AnalyzeOptions } from '@vite-plugin-vue-devtools/core';
2
3
 
3
4
  interface VitePluginVueDevToolsOptions {
4
5
  /**
@@ -6,8 +7,17 @@ interface VitePluginVueDevToolsOptions {
6
7
  * useful for projects that do not use html file as an entry
7
8
  *
8
9
  * WARNING: only set this if you know exactly what it does.
10
+ * @default ''
9
11
  */
10
12
  appendTo?: string | RegExp;
13
+ /**
14
+ * Enable Vue DevTools to analyze the codebase by using Babel
15
+ * @default
16
+ * {
17
+ * rerenderTrace: true, // enable rerenderTrace feature
18
+ * }
19
+ */
20
+ analyze?: Partial<AnalyzeOptions>;
11
21
  }
12
22
  declare function VitePluginVueDevTools(options?: VitePluginVueDevToolsOptions): PluginOption;
13
23
 
package/dist/vite.mjs CHANGED
@@ -4,7 +4,7 @@ import { normalizePath } from 'vite';
4
4
  import sirv from 'sirv';
5
5
  import Inspect from 'vite-plugin-inspect';
6
6
  import VueInspector from 'vite-plugin-vue-inspector';
7
- import { PLUGIN_NAME, createRPCServer } from '@vite-plugin-vue-devtools/core';
7
+ import { PLUGIN_NAME, analyzeCode, analyzeOptionsDefault, createRPCServer } from '@vite-plugin-vue-devtools/core';
8
8
  import fs$9 from 'node:fs/promises';
9
9
  import require$$0 from 'os';
10
10
  import require$$0$1 from 'path';
@@ -13725,11 +13725,19 @@ function getVueDevtoolsPath() {
13725
13725
  const pluginPath = normalizePath(path$3$1.dirname(fileURLToPath(import.meta.url)));
13726
13726
  return pluginPath.replace(/\/dist$/, "//src");
13727
13727
  }
13728
- function VitePluginVueDevTools(options = { appendTo: "" }) {
13728
+ const defaultOptions = {
13729
+ appendTo: "",
13730
+ analyze: analyzeOptionsDefault
13731
+ };
13732
+ function mergeOptions(options) {
13733
+ return Object.assign({}, defaultOptions, options);
13734
+ }
13735
+ function VitePluginVueDevTools(options) {
13729
13736
  const vueDevtoolsPath = getVueDevtoolsPath();
13730
13737
  const inspect = Inspect({
13731
13738
  silent: true
13732
13739
  });
13740
+ const pluginOptions = mergeOptions(options ?? {});
13733
13741
  let config;
13734
13742
  function configureServer(server) {
13735
13743
  const base = server.config.base || "/";
@@ -13794,16 +13802,19 @@ function VitePluginVueDevTools(options = { appendTo: "" }) {
13794
13802
  return `export default ${JSON.stringify({ base: config.base })}`;
13795
13803
  },
13796
13804
  transform(code, id) {
13797
- const { appendTo } = options;
13798
- if (!appendTo)
13805
+ const { root, base } = config;
13806
+ const projectPath = `${root}${base}`;
13807
+ if (!id.startsWith(projectPath))
13799
13808
  return;
13809
+ const { analyze, appendTo } = pluginOptions;
13800
13810
  const [filename] = id.split("?", 2);
13801
- if (typeof appendTo === "string" && filename.endsWith(appendTo) || appendTo instanceof RegExp && appendTo.test(filename))
13802
- return { code: `${code}
13803
- import 'virtual:vue-devtools-path:app.js'` };
13811
+ if (appendTo && (typeof appendTo === "string" && filename.endsWith(appendTo) || appendTo instanceof RegExp && appendTo.test(filename)))
13812
+ code = `${code}
13813
+ import 'virtual:vue-devtools-path:app.js'`;
13814
+ return analyzeCode(code, id, analyze);
13804
13815
  },
13805
13816
  transformIndexHtml(html) {
13806
- if (options.appendTo)
13817
+ if (pluginOptions.appendTo)
13807
13818
  return;
13808
13819
  return {
13809
13820
  html,
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-alpha.2",
4
+ "version": "1.0.0-beta.1",
5
5
  "description": "A vite plugin for Vue DevTools",
6
6
  "author": "webfansplz",
7
7
  "license": "MIT",
@@ -53,7 +53,7 @@
53
53
  "sirv": "^2.0.3",
54
54
  "vite-plugin-inspect": "^0.7.33",
55
55
  "vite-plugin-vue-inspector": "^3.4.2",
56
- "@vite-plugin-vue-devtools/core": "1.0.0-alpha.2"
56
+ "@vite-plugin-vue-devtools/core": "1.0.0-beta.1"
57
57
  },
58
58
  "devDependencies": {
59
59
  "@types/node": "^20.4.2",