vite-plugin-vue-devtools 1.0.0-alpha.2 → 1.0.0-beta.0
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 +29 -11
- package/README.zh-CN.md +185 -0
- package/dist/client/assets/{Icon.vue_vue_type_script_setup_true_lang-9344440e.js → Icon.vue_vue_type_script_setup_true_lang-38720372.js} +1 -1
- package/dist/client/assets/{IconButton.vue_vue_type_script_setup_true_lang-f308a32e.js → IconButton.vue_vue_type_script_setup_true_lang-3d53773c.js} +2 -2
- package/dist/client/assets/{IconTitle.vue_vue_type_script_setup_true_lang-4cf300a8.js → IconTitle.vue_vue_type_script_setup_true_lang-968221a7.js} +1 -1
- package/dist/client/assets/{IframeView.vue_vue_type_script_setup_true_lang-a998c802.js → IframeView.vue_vue_type_script_setup_true_lang-1f94d0bf.js} +1 -1
- package/dist/client/assets/{PanelGrids-bf67e36d.js → PanelGrids-e26dc60c.js} +1 -1
- package/dist/client/assets/{SectionBlock-30cd0db7.js → SectionBlock-667aa26c.js} +3 -3
- package/dist/client/assets/{StateFields.vue_vue_type_script_setup_true_lang-f232f911.js → StateFields.vue_vue_type_script_setup_true_lang-0dc54647.js} +4 -4
- package/dist/client/assets/{Switch.vue_vue_type_script_setup_true_lang-ff441d43.js → Switch.vue_vue_type_script_setup_true_lang-cfc899d5.js} +2 -2
- package/dist/client/assets/{TextInput.vue_vue_type_script_setup_true_lang-49fa3d66.js → TextInput.vue_vue_type_script_setup_true_lang-70f3e7d2.js} +2 -2
- package/dist/client/assets/{__eyedropper-04974bae.js → __eyedropper-f3285f90.js} +3 -3
- package/dist/client/assets/{assets-103b7b87.js → assets-64b2ffca.js} +16 -20
- package/dist/client/assets/{component-docs-c0980d29.js → component-docs-1355cb40.js} +4 -4
- package/dist/client/assets/{components-4ea0f479.js → components-cecf8f86.js} +8 -400
- package/dist/client/assets/data-0c1c61ff.js +396 -0
- package/dist/client/assets/dayjs.min-93c9346c.js +13 -0
- package/dist/client/assets/{documentations-81489cc3.js → documentations-6b999162.js} +2 -2
- package/dist/client/assets/{graph-3ab96556.js → graph-0b56328e.js} +81 -46
- package/dist/client/assets/index-5bcfd23e.js +70738 -0
- package/dist/client/assets/{index-cc695468.js → index-7ef2f30b.js} +1 -1
- package/dist/client/assets/{index-d3dcbe9e.css → index-b16c49d4.css} +2 -1
- package/dist/client/assets/{inspect-a4a1ccce.js → inspect-ad782456.js} +2 -2
- package/dist/client/assets/{npm-d82cc33a.js → npm-9609cf07.js} +5 -6
- package/dist/client/assets/{overview-62088e28.js → overview-609f4827.js} +4 -4
- package/dist/client/assets/{pages-b69a68f5.js → pages-2b0994fe.js} +5 -5
- package/dist/client/assets/{pinia-f806031f.js → pinia-924058d4.js} +6 -6
- package/dist/client/assets/rerender-trace-6c5229c1.css +14 -0
- package/dist/client/assets/rerender-trace-7eea1e61.js +369 -0
- package/dist/client/assets/{routes-06a1de65.js → routes-fbe5ad5a.js} +7 -7
- package/dist/client/assets/{settings-a01dd288.js → settings-b014e3df.js} +6 -7
- package/dist/client/assets/{splitpanes.es-87d8571e.js → splitpanes.es-5dbf052f.js} +1 -1
- package/dist/client/assets/{timeline-4af72c7c.js → timeline-486f65de.js} +8 -18
- package/dist/client/index.html +2 -2
- package/dist/vite.cjs +18 -7
- package/dist/vite.d.ts +10 -0
- package/dist/vite.mjs +19 -8
- package/package.json +2 -2
- package/src/views/composables.ts +2 -3
- package/dist/client/assets/_commonjsHelpers-65004790.js +0 -37
- package/dist/client/assets/index-773a455a.js +0 -18422
|
@@ -0,0 +1,396 @@
|
|
|
1
|
+
import { F as Fragment } from './index-5bcfd23e.js';
|
|
2
|
+
|
|
3
|
+
function isBeingDestroyed(instance) {
|
|
4
|
+
return instance._isBeingDestroyed || instance.isUnmounted;
|
|
5
|
+
}
|
|
6
|
+
function isFragment(instance) {
|
|
7
|
+
return Fragment === instance.subTree?.type;
|
|
8
|
+
}
|
|
9
|
+
function getInstanceName(instance) {
|
|
10
|
+
const name = getComponentTypeName(instance.type || {});
|
|
11
|
+
if (name)
|
|
12
|
+
return name;
|
|
13
|
+
if (instance.root === instance)
|
|
14
|
+
return "Root";
|
|
15
|
+
for (const key in instance.parent?.type?.components) {
|
|
16
|
+
if (instance.parent.type.components[key] === instance.type)
|
|
17
|
+
return saveComponentName(instance, key);
|
|
18
|
+
}
|
|
19
|
+
for (const key in instance.appContext?.components) {
|
|
20
|
+
if (instance.appContext.components[key] === instance.type)
|
|
21
|
+
return saveComponentName(instance, key);
|
|
22
|
+
}
|
|
23
|
+
const fileName = getComponentFileName(instance.type || {});
|
|
24
|
+
if (fileName)
|
|
25
|
+
return fileName;
|
|
26
|
+
return "Anonymous Component";
|
|
27
|
+
}
|
|
28
|
+
function saveComponentName(instance, key) {
|
|
29
|
+
return key;
|
|
30
|
+
}
|
|
31
|
+
function getComponentTypeName(options) {
|
|
32
|
+
return options.name || options._componentTag || options.__vdevtools_guessedName || options.__name;
|
|
33
|
+
}
|
|
34
|
+
function getComponentFileName(options) {
|
|
35
|
+
const file = options.__file;
|
|
36
|
+
if (file) {
|
|
37
|
+
const filename = options.__file?.match(/\/?([^/]+?)(\.[^/.]+)?$/)?.[1];
|
|
38
|
+
return filename ?? file;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
function getUniqueComponentId(instance) {
|
|
42
|
+
const appId = "vue-devtools";
|
|
43
|
+
const instanceId = instance === instance.root ? "root" : instance.uid;
|
|
44
|
+
return `${appId}:${instanceId}`;
|
|
45
|
+
}
|
|
46
|
+
function getRenderKey(value) {
|
|
47
|
+
if (value == null)
|
|
48
|
+
return null;
|
|
49
|
+
const type = typeof value;
|
|
50
|
+
if (type === "number")
|
|
51
|
+
return value;
|
|
52
|
+
else if (type === "string")
|
|
53
|
+
return `'${value}'`;
|
|
54
|
+
else if (Array.isArray(value))
|
|
55
|
+
return "Array";
|
|
56
|
+
else
|
|
57
|
+
return "Object";
|
|
58
|
+
}
|
|
59
|
+
function cached(fn) {
|
|
60
|
+
const cache = /* @__PURE__ */ Object.create(null);
|
|
61
|
+
return function cachedFn(str) {
|
|
62
|
+
const hit = cache[str];
|
|
63
|
+
return hit || (cache[str] = fn(str));
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
function toUpper(_, c) {
|
|
67
|
+
return c ? c.toUpperCase() : "";
|
|
68
|
+
}
|
|
69
|
+
const camelizeRE = /-(\w)/g;
|
|
70
|
+
const camelize = cached((str) => {
|
|
71
|
+
return str && str.replace(camelizeRE, toUpper);
|
|
72
|
+
});
|
|
73
|
+
const kebabizeRE = /([a-z0-9])([A-Z])/g;
|
|
74
|
+
const kebabize = cached((str) => {
|
|
75
|
+
return str && str.replace(kebabizeRE, (_, lowerCaseCharacter, upperCaseLetter) => {
|
|
76
|
+
return `${lowerCaseCharacter}-${upperCaseLetter}`;
|
|
77
|
+
}).toLowerCase();
|
|
78
|
+
});
|
|
79
|
+
function returnError(cb) {
|
|
80
|
+
try {
|
|
81
|
+
return cb();
|
|
82
|
+
} catch (e) {
|
|
83
|
+
return e;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
const classifyRE = /(?:^|[-_/])(\w)/g;
|
|
87
|
+
const classify = cached((str) => {
|
|
88
|
+
return str && `${str}`.replace(classifyRE, toUpper);
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
/* Injected with object hook! */
|
|
92
|
+
|
|
93
|
+
const vueBuiltins = [
|
|
94
|
+
"nextTick",
|
|
95
|
+
"defineComponent",
|
|
96
|
+
"defineAsyncComponent",
|
|
97
|
+
"defineCustomElement",
|
|
98
|
+
"ref",
|
|
99
|
+
"computed",
|
|
100
|
+
"reactive",
|
|
101
|
+
"readonly",
|
|
102
|
+
"watchEffect",
|
|
103
|
+
"watchPostEffect",
|
|
104
|
+
"watchSyncEffect",
|
|
105
|
+
"watch",
|
|
106
|
+
"isRef",
|
|
107
|
+
"unref",
|
|
108
|
+
"toRef",
|
|
109
|
+
"toRefs",
|
|
110
|
+
"isProxy",
|
|
111
|
+
"isReactive",
|
|
112
|
+
"isReadonly",
|
|
113
|
+
"shallowRef",
|
|
114
|
+
"triggerRef",
|
|
115
|
+
"customRef",
|
|
116
|
+
"shallowReactive",
|
|
117
|
+
"shallowReadonly",
|
|
118
|
+
"toRaw",
|
|
119
|
+
"markRaw",
|
|
120
|
+
"effectScope",
|
|
121
|
+
"getCurrentScope",
|
|
122
|
+
"onScopeDispose",
|
|
123
|
+
"onMounted",
|
|
124
|
+
"onUpdated",
|
|
125
|
+
"onUnmounted",
|
|
126
|
+
"onBeforeMount",
|
|
127
|
+
"onBeforeUpdate",
|
|
128
|
+
"onBeforeUnmount",
|
|
129
|
+
"onErrorCaptured",
|
|
130
|
+
"onRenderTracked",
|
|
131
|
+
"onRenderTriggered",
|
|
132
|
+
"onActivated",
|
|
133
|
+
"onDeactivated",
|
|
134
|
+
"onServerPrefetch",
|
|
135
|
+
"provide",
|
|
136
|
+
"inject",
|
|
137
|
+
"h",
|
|
138
|
+
"mergeProps",
|
|
139
|
+
"cloneVNode",
|
|
140
|
+
"isVNode",
|
|
141
|
+
"resolveComponent",
|
|
142
|
+
"resolveDirective",
|
|
143
|
+
"withDirectives",
|
|
144
|
+
"withModifiers"
|
|
145
|
+
];
|
|
146
|
+
function getInstanceDetails(instance) {
|
|
147
|
+
return {
|
|
148
|
+
id: getUniqueComponentId(instance),
|
|
149
|
+
name: getInstanceName(instance),
|
|
150
|
+
file: instance?.type?.__file,
|
|
151
|
+
state: getInstanceState(instance)
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
function getInstanceState(instance) {
|
|
155
|
+
const mergedType = resolveMergedOptions(instance);
|
|
156
|
+
return processProps(instance).concat(
|
|
157
|
+
processState(instance),
|
|
158
|
+
processSetupState(instance),
|
|
159
|
+
processComputed(instance, mergedType),
|
|
160
|
+
processAttrs(instance),
|
|
161
|
+
processProvide(instance),
|
|
162
|
+
processInject(instance, mergedType),
|
|
163
|
+
processRefs(instance),
|
|
164
|
+
processEventListeners(instance)
|
|
165
|
+
);
|
|
166
|
+
}
|
|
167
|
+
function processProps(instance) {
|
|
168
|
+
const propsData = [];
|
|
169
|
+
const propDefinitions = instance.type.props;
|
|
170
|
+
for (let key in instance.props) {
|
|
171
|
+
const propDefinition = propDefinitions ? propDefinitions[key] : null;
|
|
172
|
+
key = camelize(key);
|
|
173
|
+
propsData.push({
|
|
174
|
+
type: "props",
|
|
175
|
+
key,
|
|
176
|
+
value: returnError(() => instance.props[key]),
|
|
177
|
+
meta: propDefinition ? {
|
|
178
|
+
type: propDefinition.type ? getPropType(propDefinition.type) : "any",
|
|
179
|
+
required: !!propDefinition.required,
|
|
180
|
+
...propDefinition.default != null ? { default: propDefinition.default.toString() } : {}
|
|
181
|
+
} : {
|
|
182
|
+
type: "invalid"
|
|
183
|
+
},
|
|
184
|
+
editable: false
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
return propsData;
|
|
188
|
+
}
|
|
189
|
+
const fnTypeRE = /^(?:function|class) (\w+)/;
|
|
190
|
+
function getPropType(type) {
|
|
191
|
+
if (Array.isArray(type))
|
|
192
|
+
return type.map((t) => getPropType(t)).join(" or ");
|
|
193
|
+
if (type == null)
|
|
194
|
+
return "null";
|
|
195
|
+
const match = type.toString().match(fnTypeRE);
|
|
196
|
+
return typeof type === "function" ? match && match[1] || "any" : "any";
|
|
197
|
+
}
|
|
198
|
+
function processState(instance) {
|
|
199
|
+
const type = instance.type;
|
|
200
|
+
const props = type.props;
|
|
201
|
+
const getters = type.vuex && type.vuex.getters;
|
|
202
|
+
const computedDefs = type.computed;
|
|
203
|
+
const data = {
|
|
204
|
+
...instance.data,
|
|
205
|
+
...instance.renderContext
|
|
206
|
+
};
|
|
207
|
+
return Object.keys(data).filter((key) => !(props && key in props) && !(getters && key in getters) && !(computedDefs && key in computedDefs)).map((key) => ({
|
|
208
|
+
key,
|
|
209
|
+
type: "data",
|
|
210
|
+
value: returnError(() => data[key]),
|
|
211
|
+
editable: true
|
|
212
|
+
}));
|
|
213
|
+
}
|
|
214
|
+
function processSetupState(instance) {
|
|
215
|
+
const raw = instance.devtoolsRawSetupState || {};
|
|
216
|
+
return Object.keys(instance.setupState).filter((key) => !vueBuiltins.includes(key) && key.split(/(?=[A-Z])/)[0] !== "use").map((key) => {
|
|
217
|
+
const value = returnError(() => toRaw(instance.setupState[key]));
|
|
218
|
+
const rawData = raw[key];
|
|
219
|
+
let result;
|
|
220
|
+
let isOther = typeof value === "function" || typeof value?.render === "function" || typeof value?.__asyncLoader === "function";
|
|
221
|
+
if (rawData) {
|
|
222
|
+
const info = getSetupStateInfo(rawData);
|
|
223
|
+
const objectType = info.computed ? "Computed" : info.ref ? "Ref" : info.reactive ? "Reactive" : null;
|
|
224
|
+
const isState = info.ref || info.computed || info.reactive;
|
|
225
|
+
const raw2 = rawData.effect?.raw?.toString() || rawData.effect?.fn?.toString();
|
|
226
|
+
if (objectType)
|
|
227
|
+
isOther = false;
|
|
228
|
+
result = {
|
|
229
|
+
...objectType ? { objectType } : {},
|
|
230
|
+
...raw2 ? { raw: raw2 } : {},
|
|
231
|
+
editable: isState && !info.readonly
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
const type = isOther ? "setup (other)" : "setup";
|
|
235
|
+
return {
|
|
236
|
+
key,
|
|
237
|
+
value,
|
|
238
|
+
type,
|
|
239
|
+
...result
|
|
240
|
+
};
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
function isRef(raw) {
|
|
244
|
+
return !!raw.__v_isRef;
|
|
245
|
+
}
|
|
246
|
+
function isComputed(raw) {
|
|
247
|
+
return isRef(raw) && !!raw.effect;
|
|
248
|
+
}
|
|
249
|
+
function isReactive(raw) {
|
|
250
|
+
return !!raw.__v_isReactive;
|
|
251
|
+
}
|
|
252
|
+
function isReadOnly(raw) {
|
|
253
|
+
return !!raw.__v_isReadonly;
|
|
254
|
+
}
|
|
255
|
+
function toRaw(value) {
|
|
256
|
+
if (value?.__v_raw)
|
|
257
|
+
return value.__v_raw;
|
|
258
|
+
return value;
|
|
259
|
+
}
|
|
260
|
+
function getSetupStateInfo(raw) {
|
|
261
|
+
return {
|
|
262
|
+
ref: isRef(raw),
|
|
263
|
+
computed: isComputed(raw),
|
|
264
|
+
reactive: isReactive(raw),
|
|
265
|
+
readonly: isReadOnly(raw)
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
function processComputed(instance, mergedType) {
|
|
269
|
+
const type = mergedType;
|
|
270
|
+
const computed = [];
|
|
271
|
+
const defs = type.computed || {};
|
|
272
|
+
for (const key in defs) {
|
|
273
|
+
const def = defs[key];
|
|
274
|
+
const type2 = typeof def === "function" && def.vuex ? "vuex bindings" : "computed";
|
|
275
|
+
computed.push({
|
|
276
|
+
type: type2,
|
|
277
|
+
key,
|
|
278
|
+
value: returnError(() => instance.proxy[key]),
|
|
279
|
+
editable: typeof def.set === "function"
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
return computed;
|
|
283
|
+
}
|
|
284
|
+
function processAttrs(instance) {
|
|
285
|
+
return Object.keys(instance.attrs).map((key) => ({
|
|
286
|
+
type: "attrs",
|
|
287
|
+
key,
|
|
288
|
+
value: returnError(() => instance.attrs[key])
|
|
289
|
+
}));
|
|
290
|
+
}
|
|
291
|
+
function processProvide(instance) {
|
|
292
|
+
return Reflect.ownKeys(instance.provides).map((key) => ({
|
|
293
|
+
type: "provided",
|
|
294
|
+
key: key.toString(),
|
|
295
|
+
value: returnError(() => instance.provides[key])
|
|
296
|
+
}));
|
|
297
|
+
}
|
|
298
|
+
function processInject(instance, mergedType) {
|
|
299
|
+
if (!mergedType?.inject)
|
|
300
|
+
return [];
|
|
301
|
+
let keys = [];
|
|
302
|
+
let defaultValue;
|
|
303
|
+
if (Array.isArray(mergedType.inject)) {
|
|
304
|
+
keys = mergedType.inject.map((key) => ({
|
|
305
|
+
key,
|
|
306
|
+
originalKey: key
|
|
307
|
+
}));
|
|
308
|
+
} else {
|
|
309
|
+
keys = Reflect.ownKeys(mergedType.inject).map((key) => {
|
|
310
|
+
const value = mergedType.inject[key];
|
|
311
|
+
let originalKey;
|
|
312
|
+
if (typeof value === "string" || typeof value === "symbol") {
|
|
313
|
+
originalKey = value;
|
|
314
|
+
} else {
|
|
315
|
+
originalKey = value.from;
|
|
316
|
+
defaultValue = value.default;
|
|
317
|
+
}
|
|
318
|
+
return {
|
|
319
|
+
key,
|
|
320
|
+
originalKey
|
|
321
|
+
};
|
|
322
|
+
});
|
|
323
|
+
}
|
|
324
|
+
return keys.map(({ key, originalKey }) => ({
|
|
325
|
+
type: "injected",
|
|
326
|
+
key: originalKey && key !== originalKey ? `${originalKey.toString()} ➞ ${key.toString()}` : key.toString(),
|
|
327
|
+
// eslint-disable-next-line no-prototype-builtins
|
|
328
|
+
value: returnError(() => instance.ctx.hasOwnProperty(key) ? instance.ctx[key] : instance.provides.hasOwnProperty(originalKey) ? instance.provides[originalKey] : defaultValue)
|
|
329
|
+
}));
|
|
330
|
+
}
|
|
331
|
+
function processRefs(instance) {
|
|
332
|
+
return Object.keys(instance.refs).map((key) => ({
|
|
333
|
+
type: "refs",
|
|
334
|
+
key,
|
|
335
|
+
value: returnError(() => instance.refs[key])
|
|
336
|
+
}));
|
|
337
|
+
}
|
|
338
|
+
function processEventListeners(instance) {
|
|
339
|
+
const emitsDefinition = instance.type.emits;
|
|
340
|
+
const declaredEmits = Array.isArray(emitsDefinition) ? emitsDefinition : Object.keys(emitsDefinition ?? {});
|
|
341
|
+
const keys = Object.keys(instance.vnode.props ?? {});
|
|
342
|
+
const result = [];
|
|
343
|
+
for (const key of keys) {
|
|
344
|
+
const [prefix, ...eventNameParts] = key.split(/(?=[A-Z])/);
|
|
345
|
+
if (prefix === "on") {
|
|
346
|
+
const eventName = eventNameParts.join("-").toLowerCase();
|
|
347
|
+
const isDeclared = declaredEmits.includes(eventName);
|
|
348
|
+
result.push({
|
|
349
|
+
type: "event listeners",
|
|
350
|
+
key: eventName,
|
|
351
|
+
value: {
|
|
352
|
+
_custom: {
|
|
353
|
+
display: isDeclared ? "✅ Declared" : "⚠️ Not declared",
|
|
354
|
+
tooltip: !isDeclared ? `The event <code>${eventName}</code> is not declared in the <code>emits</code> option. It will leak into the component's attributes (<code>$attrs</code>).` : null
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
});
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
return result;
|
|
361
|
+
}
|
|
362
|
+
function resolveMergedOptions(instance) {
|
|
363
|
+
const raw = instance.type;
|
|
364
|
+
const { mixins, extends: extendsOptions } = raw;
|
|
365
|
+
const globalMixins = instance.appContext.mixins;
|
|
366
|
+
if (!globalMixins.length && !mixins && !extendsOptions)
|
|
367
|
+
return raw;
|
|
368
|
+
const options = {};
|
|
369
|
+
globalMixins.forEach((m) => mergeOptions(options, m));
|
|
370
|
+
mergeOptions(options, raw);
|
|
371
|
+
return options;
|
|
372
|
+
}
|
|
373
|
+
function mergeOptions(to, from, instance) {
|
|
374
|
+
if (typeof from === "function")
|
|
375
|
+
from = from.options;
|
|
376
|
+
if (!from)
|
|
377
|
+
return to;
|
|
378
|
+
const { mixins, extends: extendsOptions } = from;
|
|
379
|
+
extendsOptions && mergeOptions(to, extendsOptions);
|
|
380
|
+
mixins && mixins.forEach(
|
|
381
|
+
(m) => mergeOptions(to, m)
|
|
382
|
+
);
|
|
383
|
+
for (const key of ["computed", "inject"]) {
|
|
384
|
+
if (Object.prototype.hasOwnProperty.call(from, key)) {
|
|
385
|
+
if (!to[key])
|
|
386
|
+
to[key] = from[key];
|
|
387
|
+
else
|
|
388
|
+
Object.assign(to[key], from[key]);
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
return to;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
/* Injected with object hook! */
|
|
395
|
+
|
|
396
|
+
export { getInstanceName as a, isBeingDestroyed as b, classify as c, getUniqueComponentId as d, getRenderKey as e, getInstanceState as f, getSetupStateInfo as g, getInstanceDetails as h, isFragment as i, kebabize as k, toRaw as t };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { bI as commonjsGlobal, bJ as getDefaultExportFromCjs } from './index-5bcfd23e.js';
|
|
2
|
+
|
|
3
|
+
var dayjs_min = {exports: {}};/* Injected with object hook! */
|
|
4
|
+
|
|
5
|
+
(function (module, exports) {
|
|
6
|
+
!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}));
|
|
7
|
+
} (dayjs_min));
|
|
8
|
+
|
|
9
|
+
var dayjs_minExports = dayjs_min.exports;
|
|
10
|
+
const dayjs = /*@__PURE__*/getDefaultExportFromCjs(dayjs_minExports);
|
|
11
|
+
/* Injected with object hook! */
|
|
12
|
+
|
|
13
|
+
export { dayjs as d };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { v as defineComponent, r as resolveComponent, o as openBlock, c as createBlock, h as withCtx, x as createBaseVNode, a9 as createTextVNode, y as toDisplayString, g as createCommentVNode, e as createElementBlock, bG as withModifiers, f as renderSlot, _ as __unplugin_components_7, a$ as ref,
|
|
2
|
-
import { _ as _sfc_main$2 } from './IframeView.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import { v as defineComponent, r as resolveComponent, o as openBlock, c as createBlock, h as withCtx, x as createBaseVNode, a9 as createTextVNode, y as toDisplayString, g as createCommentVNode, e as createElementBlock, bG as withModifiers, f as renderSlot, _ as __unplugin_components_7, a$ as ref, cf as rpc, z as unref, u as createVNode, T as Teleport, F as Fragment, i as renderList } from './index-5bcfd23e.js';
|
|
2
|
+
import { _ as _sfc_main$2 } from './IframeView.vue_vue_type_script_setup_true_lang-1f94d0bf.js';
|
|
3
3
|
|
|
4
4
|
const _hoisted_1$1 = {
|
|
5
5
|
flex: "~ col gap2",
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { a$ as ref,
|
|
2
|
-
import { a as _sfc_main$4, _ as _sfc_main$5 } from './Switch.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import { a$ as ref, cn as useLocalStorage, a1 as computed, aN as onDeactivated, aL as onBeforeUnmount, v as defineComponent, o as openBlock, c as createBlock, h as withCtx, x as createBaseVNode, e as createElementBlock, i as renderList, F as Fragment, z as unref, aC as isRef, bP as _sfc_main$3, y as toDisplayString, g as createCommentVNode, j as resolveDynamicComponent, u as createVNode, aF as isVNode, bJ as getDefaultExportFromCjs$2, cf as rpc, co as useStorage, cp as watchDebounced, d as withDirectives, bu as vModelText, bq as vModelCheckbox, f as renderSlot, cq as useDark, b8 as shallowRef, cr as useMagicKeys, aP as onMounted, by as watch, q as normalizeClass, c8 as useDevToolsClient, c9 as rootPath } from './index-5bcfd23e.js';
|
|
2
|
+
import { a as _sfc_main$4, _ as _sfc_main$5 } from './Switch.vue_vue_type_script_setup_true_lang-cfc899d5.js';
|
|
3
3
|
import { F as Fuse } from './fuse.esm-c317b696.js';
|
|
4
|
-
import
|
|
5
|
-
import './Icon.vue_vue_type_script_setup_true_lang-9344440e.js';
|
|
4
|
+
import './Icon.vue_vue_type_script_setup_true_lang-38720372.js';
|
|
6
5
|
|
|
7
6
|
const showGraphSetting = ref(false);
|
|
8
7
|
const graphSettingsInStorage = useLocalStorage("__vue-devtools-graph-settings__", {
|
|
@@ -2239,55 +2238,84 @@ function uniqById(data) {
|
|
|
2239
2238
|
}
|
|
2240
2239
|
return uniqueArray;
|
|
2241
2240
|
}
|
|
2242
|
-
function fuzzySearchDeps(data,
|
|
2241
|
+
function fuzzySearchDeps(data, text) {
|
|
2243
2242
|
const fuzzySearcher = new Fuse(data, {
|
|
2244
2243
|
ignoreLocation: true,
|
|
2245
2244
|
keys: ["id"],
|
|
2246
2245
|
shouldSort: true,
|
|
2247
2246
|
threshold: 0.1
|
|
2248
2247
|
});
|
|
2249
|
-
const
|
|
2250
|
-
if (!
|
|
2248
|
+
const ids = fuzzySearcher.search(text).map((i) => i.item.id);
|
|
2249
|
+
if (!ids.length) {
|
|
2251
2250
|
return {
|
|
2252
|
-
|
|
2253
|
-
|
|
2251
|
+
matchedKeys: [],
|
|
2252
|
+
data: []
|
|
2254
2253
|
};
|
|
2255
2254
|
}
|
|
2256
2255
|
return {
|
|
2257
|
-
|
|
2258
|
-
|
|
2256
|
+
matchedKeys: ids,
|
|
2257
|
+
data: uniqById(ids.flatMap((id) => getDepsByExactId(data, id)))
|
|
2259
2258
|
};
|
|
2260
2259
|
}
|
|
2261
|
-
function filterByUserDefinedGlob(data) {
|
|
2262
|
-
if (!
|
|
2260
|
+
function filterByUserDefinedGlob(data, pattern) {
|
|
2261
|
+
if (!pattern.trim().length)
|
|
2263
2262
|
return data;
|
|
2264
|
-
const
|
|
2265
|
-
const globInstances = new Map(
|
|
2266
|
-
return data.filter((item) =>
|
|
2267
|
-
(
|
|
2263
|
+
const globPatterns = pattern.trim().split(", ");
|
|
2264
|
+
const globInstances = new Map(globPatterns.map((pattern2) => [pattern2, new Minimatch(pattern2, { matchBase: true, dot: true, partial: true })]));
|
|
2265
|
+
return data.filter((item) => globPatterns.every(
|
|
2266
|
+
(pattern2) => globInstances.get(pattern2).match(item.id)
|
|
2268
2267
|
));
|
|
2269
2268
|
}
|
|
2270
2269
|
const { graphSettings } = useGraphSettings();
|
|
2271
|
-
const
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
data
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2270
|
+
const getDebounceTime = (len) => len > 85 ? 350 : 150;
|
|
2271
|
+
const searchResults = ref([]);
|
|
2272
|
+
const matchedKeys = ref([]);
|
|
2273
|
+
const filterer = {
|
|
2274
|
+
excludeNodeModules: (data) => {
|
|
2275
|
+
return includeNodeModules.value ? data : data.filter((item) => !item.id.includes("/node_modules/"));
|
|
2276
|
+
},
|
|
2277
|
+
excludeVirtual: (data) => {
|
|
2278
|
+
return includeVirtual.value ? data : data.filter((item) => !item.virtual);
|
|
2279
|
+
},
|
|
2280
|
+
userCustomGlobPattern: (data, pattern) => {
|
|
2281
|
+
if (!graphSettings.value.enableUserDefinedGlob || !pattern.trim().length)
|
|
2282
|
+
return data;
|
|
2283
|
+
return filterByUserDefinedGlob(data, pattern);
|
|
2284
|
+
},
|
|
2285
|
+
searchText: (data, text) => {
|
|
2286
|
+
if (!text.trim().length) {
|
|
2287
|
+
matchedKeys.value = [];
|
|
2288
|
+
return data;
|
|
2289
|
+
}
|
|
2290
|
+
const { data: searchData, matchedKeys: searchMatchedKeys } = fuzzySearchDeps(data, searchText.value.trim());
|
|
2291
|
+
matchedKeys.value = searchMatchedKeys;
|
|
2292
|
+
return searchData;
|
|
2284
2293
|
}
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2294
|
+
};
|
|
2295
|
+
const allDataCanBeSearched = computed(() => {
|
|
2296
|
+
return filterer.excludeVirtual(
|
|
2297
|
+
filterer.excludeNodeModules(list.value)
|
|
2298
|
+
);
|
|
2290
2299
|
});
|
|
2300
|
+
watchDebounced([searchText, userCustomGlobPattern, allDataCanBeSearched], ([, , list2]) => {
|
|
2301
|
+
filterData(false, list2);
|
|
2302
|
+
}, { debounce: computed(() => getDebounceTime(searchResults.value.length)) });
|
|
2303
|
+
async function filterData(isInit = false, givenData) {
|
|
2304
|
+
let data = givenData ?? [];
|
|
2305
|
+
if (isInit)
|
|
2306
|
+
data = list.value = await rpc.componentGraph();
|
|
2307
|
+
data = filterer.searchText(
|
|
2308
|
+
filterer.userCustomGlobPattern(
|
|
2309
|
+
filterer.excludeVirtual(
|
|
2310
|
+
filterer.excludeNodeModules(data)
|
|
2311
|
+
),
|
|
2312
|
+
userCustomGlobPattern.value
|
|
2313
|
+
),
|
|
2314
|
+
searchText.value
|
|
2315
|
+
);
|
|
2316
|
+
searchResults.value = data;
|
|
2317
|
+
}
|
|
2318
|
+
await filterData(true);
|
|
2291
2319
|
|
|
2292
2320
|
/* Injected with object hook! */
|
|
2293
2321
|
|
|
@@ -54455,8 +54483,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
54455
54483
|
return fullPath.replace(rootPath2, "");
|
|
54456
54484
|
}
|
|
54457
54485
|
}
|
|
54486
|
+
const isMatched = (id) => matchedKeys.value.includes(id);
|
|
54487
|
+
function getFontStyle(id) {
|
|
54488
|
+
return {
|
|
54489
|
+
color: isMatched(id) ? "#F19B4A" : isDark.value ? "white" : "black",
|
|
54490
|
+
multi: "html"
|
|
54491
|
+
};
|
|
54492
|
+
}
|
|
54458
54493
|
const data = computed(() => {
|
|
54459
|
-
const
|
|
54494
|
+
const data2 = searchResults.value;
|
|
54460
54495
|
if (!data2)
|
|
54461
54496
|
return { node: [], edges: [] };
|
|
54462
54497
|
const nodes = data2.map((mod) => {
|
|
@@ -54467,17 +54502,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
54467
54502
|
modulesMap.value.set(id, { filePath: path });
|
|
54468
54503
|
else
|
|
54469
54504
|
modulesMap.value.get(id).filePath = path;
|
|
54470
|
-
const isInMain = !!main.find((i) => i.id === id);
|
|
54471
54505
|
return {
|
|
54472
54506
|
id,
|
|
54473
|
-
label:
|
|
54507
|
+
label: isMatched(id) ? `<b>${pathSegments.at(-1)}</b>` : pathSegments.at(-1),
|
|
54474
54508
|
title: getHoverPath(settings.graphSettings.value.hoverPathLevel, path, rootPath),
|
|
54475
54509
|
group: path.match(/\.(\w+)$/)?.[1] || "unknown",
|
|
54476
54510
|
size: 15 + Math.min(mod.deps.length / 2, 8),
|
|
54477
|
-
font:
|
|
54478
|
-
color: isInMain ? "#F19B4A" : isDark.value ? "white" : "black",
|
|
54479
|
-
multi: "html"
|
|
54480
|
-
},
|
|
54511
|
+
font: getFontStyle(id),
|
|
54481
54512
|
shape: mod.id.includes("/node_modules/") ? "hexagon" : mod.virtual ? "diamond" : "dot"
|
|
54482
54513
|
};
|
|
54483
54514
|
});
|
|
@@ -54548,7 +54579,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
54548
54579
|
const resetNodeStyle = () => {
|
|
54549
54580
|
if (!settings.graphSettings.value.highlightSelection)
|
|
54550
54581
|
return;
|
|
54551
|
-
network.body.data.nodes.update(network.body.data.nodes.getIds().map((id) => ({
|
|
54582
|
+
network.body.data.nodes.update(network.body.data.nodes.getIds().map((id) => ({
|
|
54583
|
+
id,
|
|
54584
|
+
size: 16,
|
|
54585
|
+
font: getFontStyle(id)
|
|
54586
|
+
})));
|
|
54552
54587
|
network.body.data.edges.update(network.body.data.edges.getIds().map((id) => {
|
|
54553
54588
|
const group = network.body.data.nodes.get(network.body.data.edges.get(id).from).group;
|
|
54554
54589
|
return {
|
|
@@ -54570,8 +54605,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
54570
54605
|
return;
|
|
54571
54606
|
const nonConnectedNodes = network.body.data.nodes.getIds().filter((id) => !network.getConnectedNodes(nodeId).includes(id) && nodeId !== id);
|
|
54572
54607
|
const nonConnectedEdges = network.body.data.edges.getIds().filter((id) => !network.getConnectedEdges(nodeId).includes(id));
|
|
54573
|
-
network.body.data.nodes.update(nonConnectedNodes.map((id) => ({ id, color: "
|
|
54574
|
-
network.body.data.edges.update(nonConnectedEdges.map((id) => ({ id, color: "
|
|
54608
|
+
network.body.data.nodes.update(nonConnectedNodes.map((id) => ({ id, color: "#cccccc10", font: { color: "#cccccc10" } })));
|
|
54609
|
+
network.body.data.edges.update(nonConnectedEdges.map((id) => ({ id, color: "#cccccc10" })));
|
|
54575
54610
|
network.body.data.nodes.update([{ id: nodeId, color: options.groups[network.body.data.nodes.get(nodeId).group]?.color, size: 26 }]);
|
|
54576
54611
|
lastSelectedNode.value = nodeId;
|
|
54577
54612
|
});
|
|
@@ -54603,7 +54638,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
54603
54638
|
ref_key: "container",
|
|
54604
54639
|
ref: container,
|
|
54605
54640
|
flex: "1",
|
|
54606
|
-
class: normalizeClass([unref(isHoveringNode)
|
|
54641
|
+
class: normalizeClass([unref(isHoveringNode) ? "cursor-pointer" : ""])
|
|
54607
54642
|
}, null, 2),
|
|
54608
54643
|
createVNode(_component_GraphSettings)
|
|
54609
54644
|
]);
|