@vue/devtools-api 8.0.7 → 8.1.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/dist/index.cjs +37 -37
- package/dist/index.d.cts +2 -728
- package/dist/index.d.ts +2 -728
- package/dist/index.js +1 -2
- package/dist/vue-devtools-api.esm-browser.js +148 -223
- package/dist/vue-devtools-api.global.js +256 -332
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -1,728 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { RouteLocationNormalizedLoaded, RouteRecordNormalized } from "vue-router";
|
|
4
|
-
|
|
5
|
-
//#region ../devtools-kit/src/types/app.d.ts
|
|
6
|
-
type App$1 = any;
|
|
7
|
-
type VueAppInstance = ComponentInternalInstance & {
|
|
8
|
-
type: {
|
|
9
|
-
_componentTag: string | undefined;
|
|
10
|
-
components: Record<string, ComponentInternalInstance['type']>;
|
|
11
|
-
__VUE_DEVTOOLS_COMPONENT_GUSSED_NAME__: string;
|
|
12
|
-
__isKeepAlive: boolean;
|
|
13
|
-
devtools: {
|
|
14
|
-
hide: boolean;
|
|
15
|
-
};
|
|
16
|
-
mixins: ComponentOptions[];
|
|
17
|
-
extends: ComponentOptions;
|
|
18
|
-
vuex: {
|
|
19
|
-
getters: Record<string, unknown>;
|
|
20
|
-
};
|
|
21
|
-
computed: Record<string, unknown>;
|
|
22
|
-
};
|
|
23
|
-
__v_cache: Cache;
|
|
24
|
-
__VUE_DEVTOOLS_NEXT_UID__: string;
|
|
25
|
-
_isBeingDestroyed: boolean;
|
|
26
|
-
_instance: VueAppInstance;
|
|
27
|
-
_container: {
|
|
28
|
-
_vnode: {
|
|
29
|
-
component: VueAppInstance;
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
isUnmounted: boolean;
|
|
33
|
-
parent: VueAppInstance;
|
|
34
|
-
appContext: {
|
|
35
|
-
app: VueAppInstance & App$1 & {
|
|
36
|
-
__VUE_DEVTOOLS_NEXT_APP_RECORD_ID__: string;
|
|
37
|
-
__VUE_DEVTOOLS_NEXT_APP_RECORD__: AppRecord;
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
__VUE_DEVTOOLS_NEXT_APP_RECORD__: AppRecord;
|
|
41
|
-
suspense: SuspenseBoundary & {
|
|
42
|
-
suspenseKey: string;
|
|
43
|
-
};
|
|
44
|
-
renderContext: Record<string, unknown>;
|
|
45
|
-
devtoolsRawSetupState: Record<string, unknown>;
|
|
46
|
-
setupState: Record<string, unknown>;
|
|
47
|
-
provides: Record<string | symbol, unknown>;
|
|
48
|
-
ctx: Record<string, unknown>;
|
|
49
|
-
} & App$1;
|
|
50
|
-
interface AppRecord {
|
|
51
|
-
id: string;
|
|
52
|
-
name: string;
|
|
53
|
-
app?: App$1;
|
|
54
|
-
version?: string;
|
|
55
|
-
types?: Record<string, string | symbol>;
|
|
56
|
-
instanceMap: Map<string, VueAppInstance>;
|
|
57
|
-
perfGroupIds: Map<string, {
|
|
58
|
-
groupId: number;
|
|
59
|
-
time: number;
|
|
60
|
-
}>;
|
|
61
|
-
rootInstance: VueAppInstance;
|
|
62
|
-
routerId?: string;
|
|
63
|
-
iframe?: string;
|
|
64
|
-
}
|
|
65
|
-
//#endregion
|
|
66
|
-
//#region ../devtools-kit/src/types/command.d.ts
|
|
67
|
-
interface CustomCommandAction {
|
|
68
|
-
type: 'url';
|
|
69
|
-
/**
|
|
70
|
-
* Url of the action, if set, execute the action will open the url
|
|
71
|
-
*/
|
|
72
|
-
src: string;
|
|
73
|
-
}
|
|
74
|
-
interface CustomCommand {
|
|
75
|
-
/**
|
|
76
|
-
* The id of the command, should be unique
|
|
77
|
-
*/
|
|
78
|
-
id: string;
|
|
79
|
-
title: string;
|
|
80
|
-
description?: string;
|
|
81
|
-
/**
|
|
82
|
-
* Order of the command, bigger number will be shown first
|
|
83
|
-
* @default 0
|
|
84
|
-
*/
|
|
85
|
-
order?: number;
|
|
86
|
-
/**
|
|
87
|
-
* Icon of the tab, support any Iconify icons, or a url to an image
|
|
88
|
-
*/
|
|
89
|
-
icon?: string;
|
|
90
|
-
/**
|
|
91
|
-
* - action of the command
|
|
92
|
-
* - __NOTE__: This will be ignored if `children` is set
|
|
93
|
-
*/
|
|
94
|
-
action?: CustomCommandAction;
|
|
95
|
-
/**
|
|
96
|
-
* - children of action, if set, execute the action will show the children
|
|
97
|
-
*/
|
|
98
|
-
children?: Omit<CustomCommand, 'children'>[];
|
|
99
|
-
}
|
|
100
|
-
//#endregion
|
|
101
|
-
//#region ../devtools-kit/src/types/inspector.d.ts
|
|
102
|
-
interface CustomInspectorOptions {
|
|
103
|
-
id: string;
|
|
104
|
-
label: string;
|
|
105
|
-
icon?: string;
|
|
106
|
-
treeFilterPlaceholder?: string;
|
|
107
|
-
stateFilterPlaceholder?: string;
|
|
108
|
-
noSelectionText?: string;
|
|
109
|
-
actions?: {
|
|
110
|
-
icon: string;
|
|
111
|
-
tooltip?: string;
|
|
112
|
-
action: () => void | Promise<void>;
|
|
113
|
-
}[];
|
|
114
|
-
nodeActions?: {
|
|
115
|
-
icon: string;
|
|
116
|
-
tooltip?: string;
|
|
117
|
-
action: (nodeId: string) => void | Promise<void>;
|
|
118
|
-
}[];
|
|
119
|
-
}
|
|
120
|
-
interface InspectorNodeTag {
|
|
121
|
-
label: string;
|
|
122
|
-
textColor: number;
|
|
123
|
-
backgroundColor: number;
|
|
124
|
-
tooltip?: string;
|
|
125
|
-
}
|
|
126
|
-
type EditStatePayload = {
|
|
127
|
-
value: any;
|
|
128
|
-
newKey?: string | null;
|
|
129
|
-
remove?: undefined | false;
|
|
130
|
-
} | {
|
|
131
|
-
value?: undefined;
|
|
132
|
-
newKey?: undefined;
|
|
133
|
-
remove: true;
|
|
134
|
-
};
|
|
135
|
-
interface CustomInspectorNode {
|
|
136
|
-
id: string;
|
|
137
|
-
label: string;
|
|
138
|
-
children?: CustomInspectorNode[];
|
|
139
|
-
tags?: InspectorNodeTag[];
|
|
140
|
-
name?: string;
|
|
141
|
-
file?: string;
|
|
142
|
-
}
|
|
143
|
-
interface CustomInspectorState {
|
|
144
|
-
[key: string]: (StateBase | Omit<ComponentState, 'type'>)[];
|
|
145
|
-
}
|
|
146
|
-
//#endregion
|
|
147
|
-
//#region ../devtools-kit/src/types/component.d.ts
|
|
148
|
-
type ComponentInstance = any;
|
|
149
|
-
interface ComponentTreeNode {
|
|
150
|
-
uid: string | number;
|
|
151
|
-
id: string;
|
|
152
|
-
name: string;
|
|
153
|
-
renderKey: string | number;
|
|
154
|
-
inactive: boolean;
|
|
155
|
-
isFragment: boolean;
|
|
156
|
-
hasChildren: boolean;
|
|
157
|
-
children: ComponentTreeNode[];
|
|
158
|
-
domOrder?: number[];
|
|
159
|
-
consoleId?: string;
|
|
160
|
-
isRouterView?: boolean;
|
|
161
|
-
macthedRouteSegment?: string;
|
|
162
|
-
tags: InspectorNodeTag[];
|
|
163
|
-
autoOpen: boolean;
|
|
164
|
-
meta?: any;
|
|
165
|
-
}
|
|
166
|
-
type ComponentBuiltinCustomStateTypes = 'function' | 'map' | 'set' | 'reference' | 'component' | 'component-definition' | 'router' | 'store';
|
|
167
|
-
interface ComponentCustomState extends ComponentStateBase {
|
|
168
|
-
value: CustomState;
|
|
169
|
-
}
|
|
170
|
-
interface StateBase {
|
|
171
|
-
key: string;
|
|
172
|
-
value: any;
|
|
173
|
-
editable?: boolean;
|
|
174
|
-
objectType?: 'ref' | 'reactive' | 'computed' | 'other';
|
|
175
|
-
raw?: string;
|
|
176
|
-
}
|
|
177
|
-
interface ComponentStateBase extends StateBase {
|
|
178
|
-
type: string;
|
|
179
|
-
}
|
|
180
|
-
interface ComponentPropState extends ComponentStateBase {
|
|
181
|
-
meta?: {
|
|
182
|
-
type: string;
|
|
183
|
-
required: boolean;
|
|
184
|
-
/** Vue 1 only */
|
|
185
|
-
mode?: 'default' | 'sync' | 'once';
|
|
186
|
-
};
|
|
187
|
-
}
|
|
188
|
-
interface CustomState {
|
|
189
|
-
_custom: {
|
|
190
|
-
type: ComponentBuiltinCustomStateTypes | string;
|
|
191
|
-
objectType?: string;
|
|
192
|
-
display?: string;
|
|
193
|
-
tooltip?: string;
|
|
194
|
-
value?: any;
|
|
195
|
-
abstract?: boolean;
|
|
196
|
-
file?: string;
|
|
197
|
-
uid?: number;
|
|
198
|
-
readOnly?: boolean;
|
|
199
|
-
/** Configure immediate child fields */
|
|
200
|
-
fields?: {
|
|
201
|
-
abstract?: boolean;
|
|
202
|
-
};
|
|
203
|
-
id?: any;
|
|
204
|
-
actions?: {
|
|
205
|
-
icon: string;
|
|
206
|
-
tooltip?: string;
|
|
207
|
-
action: () => void | Promise<void>;
|
|
208
|
-
}[];
|
|
209
|
-
/** internal */
|
|
210
|
-
_reviveId?: number;
|
|
211
|
-
};
|
|
212
|
-
}
|
|
213
|
-
type ComponentState = ComponentStateBase | ComponentPropState | ComponentCustomState;
|
|
214
|
-
interface InspectedComponentData {
|
|
215
|
-
id: string;
|
|
216
|
-
name: string;
|
|
217
|
-
file: string;
|
|
218
|
-
state: ComponentState[];
|
|
219
|
-
functional?: boolean;
|
|
220
|
-
}
|
|
221
|
-
interface ComponentBounds {
|
|
222
|
-
left: number;
|
|
223
|
-
top: number;
|
|
224
|
-
width: number;
|
|
225
|
-
height: number;
|
|
226
|
-
}
|
|
227
|
-
//#endregion
|
|
228
|
-
//#region ../devtools-kit/src/ctx/state.d.ts
|
|
229
|
-
interface DevToolsAppRecords extends AppRecord {}
|
|
230
|
-
interface DevToolsState {
|
|
231
|
-
connected: boolean;
|
|
232
|
-
clientConnected: boolean;
|
|
233
|
-
vitePluginDetected: boolean;
|
|
234
|
-
appRecords: DevToolsAppRecords[];
|
|
235
|
-
activeAppRecordId: string;
|
|
236
|
-
tabs: CustomTab[];
|
|
237
|
-
commands: CustomCommand[];
|
|
238
|
-
highPerfModeEnabled: boolean;
|
|
239
|
-
devtoolsClientDetected: {
|
|
240
|
-
[key: string]: boolean;
|
|
241
|
-
};
|
|
242
|
-
perfUniqueGroupId: number;
|
|
243
|
-
timelineLayersState: Record<string, boolean>;
|
|
244
|
-
}
|
|
245
|
-
declare function onDevToolsConnected(fn: () => void): Promise<void>;
|
|
246
|
-
declare function addCustomTab(tab: CustomTab): void;
|
|
247
|
-
declare function addCustomCommand(action: CustomCommand): void;
|
|
248
|
-
declare function removeCustomCommand(actionId: string): void;
|
|
249
|
-
//#endregion
|
|
250
|
-
//#region ../devtools-kit/src/ctx/hook.d.ts
|
|
251
|
-
declare enum DevToolsV6PluginAPIHookKeys {
|
|
252
|
-
VISIT_COMPONENT_TREE = "visitComponentTree",
|
|
253
|
-
INSPECT_COMPONENT = "inspectComponent",
|
|
254
|
-
EDIT_COMPONENT_STATE = "editComponentState",
|
|
255
|
-
GET_INSPECTOR_TREE = "getInspectorTree",
|
|
256
|
-
GET_INSPECTOR_STATE = "getInspectorState",
|
|
257
|
-
EDIT_INSPECTOR_STATE = "editInspectorState",
|
|
258
|
-
INSPECT_TIMELINE_EVENT = "inspectTimelineEvent",
|
|
259
|
-
TIMELINE_CLEARED = "timelineCleared",
|
|
260
|
-
SET_PLUGIN_SETTINGS = "setPluginSettings",
|
|
261
|
-
}
|
|
262
|
-
interface DevToolsV6PluginAPIHookPayloads {
|
|
263
|
-
[DevToolsV6PluginAPIHookKeys.VISIT_COMPONENT_TREE]: {
|
|
264
|
-
app: App$1;
|
|
265
|
-
componentInstance: ComponentInstance;
|
|
266
|
-
treeNode: ComponentTreeNode;
|
|
267
|
-
filter: string;
|
|
268
|
-
};
|
|
269
|
-
[DevToolsV6PluginAPIHookKeys.INSPECT_COMPONENT]: {
|
|
270
|
-
app: App$1;
|
|
271
|
-
componentInstance: ComponentInstance;
|
|
272
|
-
instanceData: InspectedComponentData;
|
|
273
|
-
};
|
|
274
|
-
[DevToolsV6PluginAPIHookKeys.EDIT_COMPONENT_STATE]: {
|
|
275
|
-
app: App$1;
|
|
276
|
-
inspectorId: string;
|
|
277
|
-
nodeId: string;
|
|
278
|
-
path: string[];
|
|
279
|
-
type: string;
|
|
280
|
-
state: EditStatePayload;
|
|
281
|
-
set: (object: any, path?: string | (string[]), value?: any, cb?: (object: any, field: string, value: any) => void) => void;
|
|
282
|
-
};
|
|
283
|
-
[DevToolsV6PluginAPIHookKeys.GET_INSPECTOR_TREE]: {
|
|
284
|
-
app: App$1;
|
|
285
|
-
inspectorId: string;
|
|
286
|
-
filter: string;
|
|
287
|
-
rootNodes: CustomInspectorNode[];
|
|
288
|
-
};
|
|
289
|
-
[DevToolsV6PluginAPIHookKeys.GET_INSPECTOR_STATE]: {
|
|
290
|
-
app: App$1;
|
|
291
|
-
inspectorId: string;
|
|
292
|
-
nodeId: string;
|
|
293
|
-
state: CustomInspectorState;
|
|
294
|
-
};
|
|
295
|
-
[DevToolsV6PluginAPIHookKeys.EDIT_INSPECTOR_STATE]: {
|
|
296
|
-
app: App$1;
|
|
297
|
-
inspectorId: string;
|
|
298
|
-
nodeId: string;
|
|
299
|
-
path: string[];
|
|
300
|
-
type: string;
|
|
301
|
-
state: EditStatePayload;
|
|
302
|
-
set: (object: any, path?: string | (string[]), value?: any, cb?: (object: any, field: string, value: any) => void) => void;
|
|
303
|
-
};
|
|
304
|
-
[DevToolsV6PluginAPIHookKeys.INSPECT_TIMELINE_EVENT]: {
|
|
305
|
-
app: App$1;
|
|
306
|
-
layerId: string;
|
|
307
|
-
event: TimelineEvent;
|
|
308
|
-
all?: boolean;
|
|
309
|
-
data: any;
|
|
310
|
-
};
|
|
311
|
-
[DevToolsV6PluginAPIHookKeys.TIMELINE_CLEARED]: Record<string, never>;
|
|
312
|
-
[DevToolsV6PluginAPIHookKeys.SET_PLUGIN_SETTINGS]: {
|
|
313
|
-
app: App$1;
|
|
314
|
-
pluginId: string;
|
|
315
|
-
key: string;
|
|
316
|
-
newValue: any;
|
|
317
|
-
oldValue: any;
|
|
318
|
-
settings: any;
|
|
319
|
-
};
|
|
320
|
-
}
|
|
321
|
-
interface DevToolsV6PluginAPIHooks {
|
|
322
|
-
[DevToolsV6PluginAPIHookKeys.VISIT_COMPONENT_TREE]: (payload: DevToolsV6PluginAPIHookPayloads[DevToolsV6PluginAPIHookKeys.VISIT_COMPONENT_TREE]) => void;
|
|
323
|
-
[DevToolsV6PluginAPIHookKeys.INSPECT_COMPONENT]: (payload: DevToolsV6PluginAPIHookPayloads[DevToolsV6PluginAPIHookKeys.INSPECT_COMPONENT]) => void;
|
|
324
|
-
[DevToolsV6PluginAPIHookKeys.EDIT_COMPONENT_STATE]: (payload: DevToolsV6PluginAPIHookPayloads[DevToolsV6PluginAPIHookKeys.EDIT_COMPONENT_STATE]) => void;
|
|
325
|
-
[DevToolsV6PluginAPIHookKeys.GET_INSPECTOR_TREE]: (payload: DevToolsV6PluginAPIHookPayloads[DevToolsV6PluginAPIHookKeys.GET_INSPECTOR_TREE]) => void;
|
|
326
|
-
[DevToolsV6PluginAPIHookKeys.GET_INSPECTOR_STATE]: (payload: DevToolsV6PluginAPIHookPayloads[DevToolsV6PluginAPIHookKeys.GET_INSPECTOR_STATE]) => void;
|
|
327
|
-
[DevToolsV6PluginAPIHookKeys.EDIT_INSPECTOR_STATE]: (payload: DevToolsV6PluginAPIHookPayloads[DevToolsV6PluginAPIHookKeys.EDIT_INSPECTOR_STATE]) => void;
|
|
328
|
-
[DevToolsV6PluginAPIHookKeys.INSPECT_TIMELINE_EVENT]: (payload: DevToolsV6PluginAPIHookPayloads[DevToolsV6PluginAPIHookKeys.INSPECT_TIMELINE_EVENT]) => void;
|
|
329
|
-
[DevToolsV6PluginAPIHookKeys.TIMELINE_CLEARED]: (payload: DevToolsV6PluginAPIHookPayloads[DevToolsV6PluginAPIHookKeys.TIMELINE_CLEARED]) => void;
|
|
330
|
-
[DevToolsV6PluginAPIHookKeys.SET_PLUGIN_SETTINGS]: (payload: DevToolsV6PluginAPIHookPayloads[DevToolsV6PluginAPIHookKeys.SET_PLUGIN_SETTINGS]) => void;
|
|
331
|
-
}
|
|
332
|
-
declare enum DevToolsContextHookKeys {
|
|
333
|
-
ADD_INSPECTOR = "addInspector",
|
|
334
|
-
SEND_INSPECTOR_TREE = "sendInspectorTree",
|
|
335
|
-
SEND_INSPECTOR_STATE = "sendInspectorState",
|
|
336
|
-
CUSTOM_INSPECTOR_SELECT_NODE = "customInspectorSelectNode",
|
|
337
|
-
TIMELINE_LAYER_ADDED = "timelineLayerAdded",
|
|
338
|
-
TIMELINE_EVENT_ADDED = "timelineEventAdded",
|
|
339
|
-
GET_COMPONENT_INSTANCES = "getComponentInstances",
|
|
340
|
-
GET_COMPONENT_BOUNDS = "getComponentBounds",
|
|
341
|
-
GET_COMPONENT_NAME = "getComponentName",
|
|
342
|
-
COMPONENT_HIGHLIGHT = "componentHighlight",
|
|
343
|
-
COMPONENT_UNHIGHLIGHT = "componentUnhighlight",
|
|
344
|
-
}
|
|
345
|
-
interface DevToolsContextHookPayloads {
|
|
346
|
-
[DevToolsContextHookKeys.ADD_INSPECTOR]: {
|
|
347
|
-
inspector: CustomInspectorOptions;
|
|
348
|
-
plugin: DevToolsPlugin;
|
|
349
|
-
};
|
|
350
|
-
[DevToolsContextHookKeys.SEND_INSPECTOR_TREE]: {
|
|
351
|
-
inspectorId: string;
|
|
352
|
-
plugin: DevToolsPlugin;
|
|
353
|
-
};
|
|
354
|
-
[DevToolsContextHookKeys.SEND_INSPECTOR_STATE]: {
|
|
355
|
-
inspectorId: string;
|
|
356
|
-
plugin: DevToolsPlugin;
|
|
357
|
-
};
|
|
358
|
-
[DevToolsContextHookKeys.CUSTOM_INSPECTOR_SELECT_NODE]: {
|
|
359
|
-
inspectorId: string;
|
|
360
|
-
nodeId: string;
|
|
361
|
-
plugin: DevToolsPlugin;
|
|
362
|
-
};
|
|
363
|
-
[DevToolsContextHookKeys.TIMELINE_LAYER_ADDED]: {
|
|
364
|
-
options: TimelineLayerOptions;
|
|
365
|
-
plugin: DevToolsPlugin;
|
|
366
|
-
};
|
|
367
|
-
[DevToolsContextHookKeys.TIMELINE_EVENT_ADDED]: {
|
|
368
|
-
options: TimelineEventOptions;
|
|
369
|
-
plugin: DevToolsPlugin;
|
|
370
|
-
};
|
|
371
|
-
[DevToolsContextHookKeys.GET_COMPONENT_INSTANCES]: {
|
|
372
|
-
app: App$1;
|
|
373
|
-
};
|
|
374
|
-
[DevToolsContextHookKeys.GET_COMPONENT_BOUNDS]: {
|
|
375
|
-
instance: ComponentInstance;
|
|
376
|
-
};
|
|
377
|
-
[DevToolsContextHookKeys.GET_COMPONENT_NAME]: {
|
|
378
|
-
instance: ComponentInstance;
|
|
379
|
-
};
|
|
380
|
-
[DevToolsContextHookKeys.COMPONENT_HIGHLIGHT]: {
|
|
381
|
-
uid: string;
|
|
382
|
-
};
|
|
383
|
-
[DevToolsContextHookKeys.COMPONENT_UNHIGHLIGHT]: Record<string, never>;
|
|
384
|
-
}
|
|
385
|
-
declare enum DevToolsMessagingHookKeys {
|
|
386
|
-
SEND_INSPECTOR_TREE_TO_CLIENT = "sendInspectorTreeToClient",
|
|
387
|
-
SEND_INSPECTOR_STATE_TO_CLIENT = "sendInspectorStateToClient",
|
|
388
|
-
SEND_TIMELINE_EVENT_TO_CLIENT = "sendTimelineEventToClient",
|
|
389
|
-
SEND_INSPECTOR_TO_CLIENT = "sendInspectorToClient",
|
|
390
|
-
SEND_ACTIVE_APP_UNMOUNTED_TO_CLIENT = "sendActiveAppUpdatedToClient",
|
|
391
|
-
DEVTOOLS_STATE_UPDATED = "devtoolsStateUpdated",
|
|
392
|
-
DEVTOOLS_CONNECTED_UPDATED = "devtoolsConnectedUpdated",
|
|
393
|
-
ROUTER_INFO_UPDATED = "routerInfoUpdated",
|
|
394
|
-
}
|
|
395
|
-
interface DevToolsMessagingHookPayloads {
|
|
396
|
-
[DevToolsMessagingHookKeys.SEND_INSPECTOR_TREE_TO_CLIENT]: {
|
|
397
|
-
inspectorId: string;
|
|
398
|
-
rootNodes: CustomInspectorNode[];
|
|
399
|
-
};
|
|
400
|
-
[DevToolsMessagingHookKeys.SEND_INSPECTOR_STATE_TO_CLIENT]: {
|
|
401
|
-
inspectorId: string;
|
|
402
|
-
nodeId: string;
|
|
403
|
-
state: CustomInspectorState;
|
|
404
|
-
};
|
|
405
|
-
[DevToolsMessagingHookKeys.SEND_TIMELINE_EVENT_TO_CLIENT]: TimelineEventOptions;
|
|
406
|
-
[DevToolsMessagingHookKeys.SEND_INSPECTOR_TO_CLIENT]: {
|
|
407
|
-
id: string;
|
|
408
|
-
label: string;
|
|
409
|
-
logo: string;
|
|
410
|
-
icon: string;
|
|
411
|
-
packageName: string | undefined;
|
|
412
|
-
homepage: string | undefined;
|
|
413
|
-
}[];
|
|
414
|
-
[DevToolsMessagingHookKeys.DEVTOOLS_STATE_UPDATED]: {
|
|
415
|
-
state: DevToolsState;
|
|
416
|
-
};
|
|
417
|
-
[DevToolsMessagingHookKeys.DEVTOOLS_CONNECTED_UPDATED]: {
|
|
418
|
-
state: DevToolsState;
|
|
419
|
-
oldState: DevToolsState;
|
|
420
|
-
};
|
|
421
|
-
[DevToolsMessagingHookKeys.ROUTER_INFO_UPDATED]: {
|
|
422
|
-
state: RouterInfo;
|
|
423
|
-
};
|
|
424
|
-
}
|
|
425
|
-
interface DevToolsMessagingHooks {
|
|
426
|
-
[DevToolsMessagingHookKeys.SEND_INSPECTOR_TREE_TO_CLIENT]: (payload: DevToolsMessagingHookPayloads[DevToolsMessagingHookKeys.SEND_INSPECTOR_TREE_TO_CLIENT]) => void;
|
|
427
|
-
[DevToolsMessagingHookKeys.SEND_INSPECTOR_STATE_TO_CLIENT]: (payload: DevToolsMessagingHookPayloads[DevToolsMessagingHookKeys.SEND_INSPECTOR_STATE_TO_CLIENT]) => void;
|
|
428
|
-
[DevToolsMessagingHookKeys.SEND_TIMELINE_EVENT_TO_CLIENT]: (payload: DevToolsMessagingHookPayloads[DevToolsMessagingHookKeys.SEND_TIMELINE_EVENT_TO_CLIENT]) => void;
|
|
429
|
-
[DevToolsMessagingHookKeys.SEND_ACTIVE_APP_UNMOUNTED_TO_CLIENT]: () => void;
|
|
430
|
-
[DevToolsMessagingHookKeys.SEND_INSPECTOR_TO_CLIENT]: (payload: DevToolsMessagingHookPayloads[DevToolsMessagingHookKeys.SEND_INSPECTOR_TO_CLIENT]) => void;
|
|
431
|
-
[DevToolsMessagingHookKeys.DEVTOOLS_STATE_UPDATED]: (payload: DevToolsMessagingHookPayloads[DevToolsMessagingHookKeys.DEVTOOLS_STATE_UPDATED]) => void;
|
|
432
|
-
[DevToolsMessagingHookKeys.DEVTOOLS_CONNECTED_UPDATED]: (payload: DevToolsMessagingHookPayloads[DevToolsMessagingHookKeys.DEVTOOLS_CONNECTED_UPDATED]) => void;
|
|
433
|
-
[DevToolsMessagingHookKeys.ROUTER_INFO_UPDATED]: (payload: DevToolsMessagingHookPayloads[DevToolsMessagingHookKeys.ROUTER_INFO_UPDATED]) => void;
|
|
434
|
-
}
|
|
435
|
-
interface DevToolsContextHooks extends DevToolsV6PluginAPIHooks {
|
|
436
|
-
[DevToolsContextHookKeys.ADD_INSPECTOR]: (payload: DevToolsContextHookPayloads[DevToolsContextHookKeys.ADD_INSPECTOR]) => void;
|
|
437
|
-
[DevToolsContextHookKeys.SEND_INSPECTOR_TREE]: (payload: DevToolsContextHookPayloads[DevToolsContextHookKeys.SEND_INSPECTOR_TREE]) => void;
|
|
438
|
-
[DevToolsContextHookKeys.SEND_INSPECTOR_STATE]: (payload: DevToolsContextHookPayloads[DevToolsContextHookKeys.SEND_INSPECTOR_STATE]) => void;
|
|
439
|
-
[DevToolsContextHookKeys.CUSTOM_INSPECTOR_SELECT_NODE]: (payload: DevToolsContextHookPayloads[DevToolsContextHookKeys.CUSTOM_INSPECTOR_SELECT_NODE]) => void;
|
|
440
|
-
[DevToolsContextHookKeys.TIMELINE_LAYER_ADDED]: (payload: DevToolsContextHookPayloads[DevToolsContextHookKeys.TIMELINE_LAYER_ADDED]) => void;
|
|
441
|
-
[DevToolsContextHookKeys.TIMELINE_EVENT_ADDED]: (payload: DevToolsContextHookPayloads[DevToolsContextHookKeys.TIMELINE_EVENT_ADDED]) => void;
|
|
442
|
-
[DevToolsContextHookKeys.GET_COMPONENT_INSTANCES]: (payload: DevToolsContextHookPayloads[DevToolsContextHookKeys.GET_COMPONENT_INSTANCES]) => void;
|
|
443
|
-
[DevToolsContextHookKeys.GET_COMPONENT_BOUNDS]: (payload: DevToolsContextHookPayloads[DevToolsContextHookKeys.GET_COMPONENT_BOUNDS]) => void;
|
|
444
|
-
[DevToolsContextHookKeys.GET_COMPONENT_NAME]: (payload: DevToolsContextHookPayloads[DevToolsContextHookKeys.GET_COMPONENT_NAME]) => void;
|
|
445
|
-
[DevToolsContextHookKeys.COMPONENT_HIGHLIGHT]: (payload: DevToolsContextHookPayloads[DevToolsContextHookKeys.COMPONENT_HIGHLIGHT]) => void;
|
|
446
|
-
[DevToolsContextHookKeys.COMPONENT_UNHIGHLIGHT]: () => void;
|
|
447
|
-
}
|
|
448
|
-
//#endregion
|
|
449
|
-
//#region ../devtools-kit/src/core/component-inspector/index.d.ts
|
|
450
|
-
interface ComponentInspector {
|
|
451
|
-
enabled: boolean;
|
|
452
|
-
position: {
|
|
453
|
-
x: number;
|
|
454
|
-
y: number;
|
|
455
|
-
};
|
|
456
|
-
linkParams: {
|
|
457
|
-
file: string;
|
|
458
|
-
line: number;
|
|
459
|
-
column: number;
|
|
460
|
-
};
|
|
461
|
-
enable: () => void;
|
|
462
|
-
disable: () => void;
|
|
463
|
-
toggleEnabled: () => void;
|
|
464
|
-
openInEditor: (baseUrl: string, file: string, line: number, column: number) => void;
|
|
465
|
-
onUpdated: () => void;
|
|
466
|
-
}
|
|
467
|
-
declare function getComponentInspector(): Promise<ComponentInspector>;
|
|
468
|
-
//#endregion
|
|
469
|
-
//#region ../devtools-kit/src/core/open-in-editor/index.d.ts
|
|
470
|
-
interface OpenInEditorOptions {
|
|
471
|
-
baseUrl?: string;
|
|
472
|
-
file?: string;
|
|
473
|
-
line?: number;
|
|
474
|
-
column?: number;
|
|
475
|
-
host?: string;
|
|
476
|
-
}
|
|
477
|
-
declare function openInEditor(options?: OpenInEditorOptions): void;
|
|
478
|
-
//#endregion
|
|
479
|
-
//#region ../devtools-kit/src/ctx/api.d.ts
|
|
480
|
-
declare function createDevToolsApi(hooks: Hookable<DevToolsContextHooks & DevToolsMessagingHooks, HookKeys<DevToolsContextHooks & DevToolsMessagingHooks>>): {
|
|
481
|
-
getInspectorTree(payload: Pick<DevToolsV6PluginAPIHookPayloads[DevToolsV6PluginAPIHookKeys.GET_INSPECTOR_TREE], "inspectorId" | "filter">): Promise<never[]>;
|
|
482
|
-
getInspectorState(payload: Pick<DevToolsV6PluginAPIHookPayloads[DevToolsV6PluginAPIHookKeys.GET_INSPECTOR_STATE], "inspectorId" | "nodeId">): Promise<CustomInspectorState>;
|
|
483
|
-
editInspectorState(payload: DevToolsV6PluginAPIHookPayloads[DevToolsV6PluginAPIHookKeys.EDIT_INSPECTOR_STATE]): void;
|
|
484
|
-
sendInspectorState(inspectorId: string): void;
|
|
485
|
-
inspectComponentInspector(): Promise<string>;
|
|
486
|
-
cancelInspectComponentInspector(): void;
|
|
487
|
-
getComponentRenderCode(id: string): any;
|
|
488
|
-
scrollToComponent(id: string): void;
|
|
489
|
-
openInEditor: typeof openInEditor;
|
|
490
|
-
getVueInspector: typeof getComponentInspector;
|
|
491
|
-
toggleApp(id: string, options?: {
|
|
492
|
-
inspectingComponent?: boolean;
|
|
493
|
-
}): void;
|
|
494
|
-
inspectDOM(instanceId: string): void;
|
|
495
|
-
updatePluginSettings(pluginId: string, key: string, value: string): void;
|
|
496
|
-
getPluginSettings(pluginId: string): {
|
|
497
|
-
options: Record<string, {
|
|
498
|
-
label: string;
|
|
499
|
-
description?: string;
|
|
500
|
-
} & ({
|
|
501
|
-
type: "boolean";
|
|
502
|
-
defaultValue: boolean;
|
|
503
|
-
} | {
|
|
504
|
-
type: "choice";
|
|
505
|
-
defaultValue: string | number;
|
|
506
|
-
options: {
|
|
507
|
-
value: string | number;
|
|
508
|
-
label: string;
|
|
509
|
-
}[];
|
|
510
|
-
component?: "select" | "button-group";
|
|
511
|
-
} | {
|
|
512
|
-
type: "text";
|
|
513
|
-
defaultValue: string;
|
|
514
|
-
})> | null;
|
|
515
|
-
values: any;
|
|
516
|
-
};
|
|
517
|
-
};
|
|
518
|
-
type DevToolsApiType = ReturnType<typeof createDevToolsApi>;
|
|
519
|
-
//#endregion
|
|
520
|
-
//#region ../devtools-kit/src/ctx/index.d.ts
|
|
521
|
-
interface DevtoolsContext {
|
|
522
|
-
hooks: Hookable<DevToolsContextHooks & DevToolsMessagingHooks, HookKeys<DevToolsContextHooks & DevToolsMessagingHooks>>;
|
|
523
|
-
state: DevToolsState & {
|
|
524
|
-
activeAppRecordId: string;
|
|
525
|
-
activeAppRecord: DevToolsAppRecords;
|
|
526
|
-
appRecords: DevToolsAppRecords[];
|
|
527
|
-
};
|
|
528
|
-
api: DevToolsApiType;
|
|
529
|
-
}
|
|
530
|
-
//#endregion
|
|
531
|
-
//#region ../devtools-kit/src/api/v6/index.d.ts
|
|
532
|
-
declare class DevToolsV6PluginAPI {
|
|
533
|
-
private plugin;
|
|
534
|
-
private hooks;
|
|
535
|
-
constructor({
|
|
536
|
-
plugin,
|
|
537
|
-
ctx
|
|
538
|
-
}: {
|
|
539
|
-
plugin: DevToolsPlugin;
|
|
540
|
-
ctx: DevtoolsContext;
|
|
541
|
-
});
|
|
542
|
-
get on(): {
|
|
543
|
-
visitComponentTree: (handler: DevToolsV6PluginAPIHooks[DevToolsV6PluginAPIHookKeys.VISIT_COMPONENT_TREE]) => void;
|
|
544
|
-
inspectComponent: (handler: DevToolsV6PluginAPIHooks[DevToolsV6PluginAPIHookKeys.INSPECT_COMPONENT]) => void;
|
|
545
|
-
editComponentState: (handler: DevToolsV6PluginAPIHooks[DevToolsV6PluginAPIHookKeys.EDIT_COMPONENT_STATE]) => void;
|
|
546
|
-
getInspectorTree: (handler: DevToolsV6PluginAPIHooks[DevToolsV6PluginAPIHookKeys.GET_INSPECTOR_TREE]) => void;
|
|
547
|
-
getInspectorState: (handler: DevToolsV6PluginAPIHooks[DevToolsV6PluginAPIHookKeys.GET_INSPECTOR_STATE]) => void;
|
|
548
|
-
editInspectorState: (handler: DevToolsV6PluginAPIHooks[DevToolsV6PluginAPIHookKeys.EDIT_INSPECTOR_STATE]) => void;
|
|
549
|
-
inspectTimelineEvent: (handler: DevToolsV6PluginAPIHooks[DevToolsV6PluginAPIHookKeys.INSPECT_TIMELINE_EVENT]) => void;
|
|
550
|
-
timelineCleared: (handler: DevToolsV6PluginAPIHooks[DevToolsV6PluginAPIHookKeys.TIMELINE_CLEARED]) => void;
|
|
551
|
-
setPluginSettings: (handler: DevToolsV6PluginAPIHooks[DevToolsV6PluginAPIHookKeys.SET_PLUGIN_SETTINGS]) => void;
|
|
552
|
-
};
|
|
553
|
-
notifyComponentUpdate(instance?: ComponentInstance): void;
|
|
554
|
-
addInspector(options: CustomInspectorOptions): void;
|
|
555
|
-
sendInspectorTree(inspectorId: string): void;
|
|
556
|
-
sendInspectorState(inspectorId: string): void;
|
|
557
|
-
selectInspectorNode(inspectorId: string, nodeId: string): void;
|
|
558
|
-
visitComponentTree(payload: DevToolsV6PluginAPIHookPayloads[DevToolsV6PluginAPIHookKeys.VISIT_COMPONENT_TREE]): Promise<any>;
|
|
559
|
-
now(): number;
|
|
560
|
-
addTimelineLayer(options: TimelineLayerOptions): void;
|
|
561
|
-
addTimelineEvent(options: TimelineEventOptions): void;
|
|
562
|
-
getSettings(pluginId?: string): any;
|
|
563
|
-
getComponentInstances(app: App$1): Promise<ComponentInstance[]>;
|
|
564
|
-
getComponentBounds(instance: ComponentInstance): Promise<ComponentBounds>;
|
|
565
|
-
getComponentName(instance: ComponentInstance): Promise<string>;
|
|
566
|
-
highlightElement(instance: ComponentInstance): Promise<any>;
|
|
567
|
-
unhighlightElement(): Promise<any>;
|
|
568
|
-
}
|
|
569
|
-
//#endregion
|
|
570
|
-
//#region ../devtools-kit/src/api/index.d.ts
|
|
571
|
-
declare const DevToolsPluginAPI: typeof DevToolsV6PluginAPI;
|
|
572
|
-
//#endregion
|
|
573
|
-
//#region ../devtools-kit/src/types/plugin.d.ts
|
|
574
|
-
type PluginSettingsItem = {
|
|
575
|
-
label: string;
|
|
576
|
-
description?: string;
|
|
577
|
-
} & ({
|
|
578
|
-
type: 'boolean';
|
|
579
|
-
defaultValue: boolean;
|
|
580
|
-
} | {
|
|
581
|
-
type: 'choice';
|
|
582
|
-
defaultValue: string | number;
|
|
583
|
-
options: {
|
|
584
|
-
value: string | number;
|
|
585
|
-
label: string;
|
|
586
|
-
}[];
|
|
587
|
-
component?: 'select' | 'button-group';
|
|
588
|
-
} | {
|
|
589
|
-
type: 'text';
|
|
590
|
-
defaultValue: string;
|
|
591
|
-
});
|
|
592
|
-
type PluginSetupFunction = (api: InstanceType<typeof DevToolsPluginAPI>) => void;
|
|
593
|
-
interface PluginDescriptor {
|
|
594
|
-
id: string;
|
|
595
|
-
label: string;
|
|
596
|
-
app: App<any>;
|
|
597
|
-
packageName?: string;
|
|
598
|
-
homepage?: string;
|
|
599
|
-
componentStateTypes?: string[];
|
|
600
|
-
logo?: string;
|
|
601
|
-
disableAppScope?: boolean;
|
|
602
|
-
disablePluginScope?: boolean;
|
|
603
|
-
/**
|
|
604
|
-
* Run the plugin setup and expose the api even if the devtools is not opened yet.
|
|
605
|
-
* Useful to record timeline events early.
|
|
606
|
-
*/
|
|
607
|
-
enableEarlyProxy?: boolean;
|
|
608
|
-
settings?: Record<string, PluginSettingsItem>;
|
|
609
|
-
}
|
|
610
|
-
interface DevToolsPlugin {
|
|
611
|
-
descriptor: PluginDescriptor;
|
|
612
|
-
setupFn: PluginSetupFunction;
|
|
613
|
-
}
|
|
614
|
-
//#endregion
|
|
615
|
-
//#region ../devtools-kit/src/types/router.d.ts
|
|
616
|
-
interface RouterInfo {
|
|
617
|
-
currentRoute: RouteLocationNormalizedLoaded | null | Record<string, any>;
|
|
618
|
-
routes: RouteRecordNormalized[];
|
|
619
|
-
}
|
|
620
|
-
//#endregion
|
|
621
|
-
//#region ../devtools-kit/src/types/tab.d.ts
|
|
622
|
-
type TabCategory = 'pinned' | 'app' | 'modules' | 'advanced';
|
|
623
|
-
type ModuleView = ModuleIframeView | ModuleVNodeView | ModuleSFCView;
|
|
624
|
-
interface ModuleIframeView {
|
|
625
|
-
/**
|
|
626
|
-
* Iframe view
|
|
627
|
-
*/
|
|
628
|
-
type: 'iframe';
|
|
629
|
-
/**
|
|
630
|
-
* Url of the iframe
|
|
631
|
-
*/
|
|
632
|
-
src: string;
|
|
633
|
-
/**
|
|
634
|
-
* Persist the iframe instance even if the tab is not active
|
|
635
|
-
*
|
|
636
|
-
* @default true
|
|
637
|
-
*/
|
|
638
|
-
persistent?: boolean;
|
|
639
|
-
}
|
|
640
|
-
interface ModuleVNodeView {
|
|
641
|
-
/**
|
|
642
|
-
* Vue's VNode view
|
|
643
|
-
*/
|
|
644
|
-
type: 'vnode';
|
|
645
|
-
/**
|
|
646
|
-
* Send vnode to the client, they must be static and serializable
|
|
647
|
-
*/
|
|
648
|
-
vnode: VNode;
|
|
649
|
-
}
|
|
650
|
-
interface ModuleSFCView {
|
|
651
|
-
/**
|
|
652
|
-
* SFC view
|
|
653
|
-
*/
|
|
654
|
-
type: 'sfc';
|
|
655
|
-
/**
|
|
656
|
-
* SFC component
|
|
657
|
-
*/
|
|
658
|
-
sfc: string;
|
|
659
|
-
}
|
|
660
|
-
interface CustomTab {
|
|
661
|
-
/**
|
|
662
|
-
* The name of the tab, must be unique
|
|
663
|
-
*/
|
|
664
|
-
name: string;
|
|
665
|
-
/**
|
|
666
|
-
* Icon of the tab, support any Iconify icons, or a url to an image
|
|
667
|
-
*/
|
|
668
|
-
icon?: string;
|
|
669
|
-
/**
|
|
670
|
-
* Title of the tab
|
|
671
|
-
*/
|
|
672
|
-
title: string;
|
|
673
|
-
/**
|
|
674
|
-
* Main view of the tab
|
|
675
|
-
*/
|
|
676
|
-
view: ModuleView;
|
|
677
|
-
/**
|
|
678
|
-
* Category of the tab
|
|
679
|
-
* @default 'app'
|
|
680
|
-
*/
|
|
681
|
-
category?: TabCategory;
|
|
682
|
-
}
|
|
683
|
-
//#endregion
|
|
684
|
-
//#region ../devtools-kit/src/types/timeline.d.ts
|
|
685
|
-
interface TimelineEvent<TData = any, TMeta = any> {
|
|
686
|
-
time: number;
|
|
687
|
-
data: TData;
|
|
688
|
-
logType?: 'default' | 'warning' | 'error';
|
|
689
|
-
meta?: TMeta;
|
|
690
|
-
groupId?: number | string;
|
|
691
|
-
title?: string;
|
|
692
|
-
subtitle?: string;
|
|
693
|
-
}
|
|
694
|
-
interface ScreenshotOverlayEvent {
|
|
695
|
-
layerId: string;
|
|
696
|
-
renderMeta: any;
|
|
697
|
-
}
|
|
698
|
-
interface ScreenshotOverlayRenderContext<TData = any, TMeta = any> {
|
|
699
|
-
screenshot: ScreenshotData;
|
|
700
|
-
events: (TimelineEvent<TData, TMeta> & ScreenshotOverlayEvent)[];
|
|
701
|
-
index: number;
|
|
702
|
-
}
|
|
703
|
-
type ScreenshotOverlayRenderResult = HTMLElement | string | false;
|
|
704
|
-
interface ScreenshotData {
|
|
705
|
-
time: number;
|
|
706
|
-
}
|
|
707
|
-
interface TimelineLayerOptions<TData = any, TMeta = any> {
|
|
708
|
-
id: string;
|
|
709
|
-
label: string;
|
|
710
|
-
color: number;
|
|
711
|
-
skipScreenshots?: boolean;
|
|
712
|
-
groupsOnly?: boolean;
|
|
713
|
-
ignoreNoDurationGroups?: boolean;
|
|
714
|
-
screenshotOverlayRender?: (event: TimelineEvent<TData, TMeta> & ScreenshotOverlayEvent, ctx: ScreenshotOverlayRenderContext) => ScreenshotOverlayRenderResult | Promise<ScreenshotOverlayRenderResult>;
|
|
715
|
-
}
|
|
716
|
-
interface TimelineEventOptions {
|
|
717
|
-
layerId: string;
|
|
718
|
-
event: TimelineEvent;
|
|
719
|
-
all?: boolean;
|
|
720
|
-
}
|
|
721
|
-
//#endregion
|
|
722
|
-
//#region ../devtools-kit/src/core/index.d.ts
|
|
723
|
-
declare function onDevToolsClientConnected(fn: () => void): Promise<void>;
|
|
724
|
-
//#endregion
|
|
725
|
-
//#region ../devtools-kit/src/core/plugin/index.d.ts
|
|
726
|
-
declare function setupDevToolsPlugin(pluginDescriptor: PluginDescriptor, setupFn: PluginSetupFunction): void;
|
|
727
|
-
//#endregion
|
|
728
|
-
export { type CustomCommand, type CustomTab, addCustomCommand, addCustomTab, onDevToolsClientConnected, onDevToolsConnected, removeCustomCommand, setupDevToolsPlugin, setupDevToolsPlugin as setupDevtoolsPlugin };
|
|
1
|
+
import { CustomCommand, CustomTab, addCustomCommand, addCustomTab, onDevToolsClientConnected, onDevToolsConnected, removeCustomCommand, setupDevToolsPlugin, setupDevToolsPlugin as setupDevtoolsPlugin } from "@vue/devtools-kit";
|
|
2
|
+
export { type CustomCommand, type CustomTab, addCustomCommand, addCustomTab, onDevToolsClientConnected, onDevToolsConnected, removeCustomCommand, setupDevToolsPlugin, setupDevtoolsPlugin };
|