@vue/devtools-kit 8.2.1 → 9.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.
- package/README.md +1 -1
- package/dist/client.cjs +1 -0
- package/dist/client.d.cts +2 -0
- package/dist/client.d.mts +2 -0
- package/dist/client.mjs +1 -0
- package/dist/connect-1YI33s6z.cjs +1 -0
- package/dist/connect-Cz-DKii9.mjs +1 -0
- package/dist/iframe-CbsDYoCA.d.cts +1430 -0
- package/dist/iframe-CbsDYoCA.d.mts +1430 -0
- package/dist/index.cjs +3 -5750
- package/dist/index.d.cts +160 -1149
- package/dist/index.d.mts +181 -0
- package/dist/index.mjs +3 -0
- package/package.json +38 -27
- package/dist/index.d.ts +0 -1170
- package/dist/index.js +0 -5668
- package/global.d.ts +0 -20
- package/types.d.ts +0 -2
package/dist/index.d.cts
CHANGED
|
@@ -1,1170 +1,181 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
//#region src/types/app.d.ts
|
|
8
|
-
type App = any;
|
|
9
|
-
type VueAppInstance = ComponentInternalInstance & {
|
|
10
|
-
type: {
|
|
11
|
-
_componentTag: string | undefined;
|
|
12
|
-
components: Record<string, ComponentInternalInstance['type']>;
|
|
13
|
-
__VUE_DEVTOOLS_COMPONENT_GUSSED_NAME__: string;
|
|
14
|
-
__isKeepAlive: boolean;
|
|
15
|
-
devtools: {
|
|
16
|
-
hide: boolean;
|
|
17
|
-
};
|
|
18
|
-
mixins: ComponentOptions[];
|
|
19
|
-
extends: ComponentOptions;
|
|
20
|
-
vuex: {
|
|
21
|
-
getters: Record<string, unknown>;
|
|
22
|
-
};
|
|
23
|
-
computed: Record<string, unknown>;
|
|
24
|
-
};
|
|
25
|
-
__v_cache: Cache;
|
|
26
|
-
__VUE_DEVTOOLS_NEXT_UID__: string;
|
|
27
|
-
_isBeingDestroyed: boolean;
|
|
28
|
-
_instance: VueAppInstance;
|
|
29
|
-
_container: {
|
|
30
|
-
_vnode: {
|
|
31
|
-
component: VueAppInstance;
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
isUnmounted: boolean;
|
|
35
|
-
parent: VueAppInstance;
|
|
36
|
-
appContext: {
|
|
37
|
-
app: VueAppInstance & App & {
|
|
38
|
-
__VUE_DEVTOOLS_NEXT_APP_RECORD_ID__: string;
|
|
39
|
-
__VUE_DEVTOOLS_NEXT_APP_RECORD__: AppRecord;
|
|
40
|
-
};
|
|
41
|
-
};
|
|
42
|
-
__VUE_DEVTOOLS_NEXT_APP_RECORD__: AppRecord;
|
|
43
|
-
suspense: SuspenseBoundary & {
|
|
44
|
-
suspenseKey: string;
|
|
45
|
-
};
|
|
46
|
-
renderContext: Record<string, unknown>;
|
|
47
|
-
devtoolsRawSetupState: Record<string, unknown>;
|
|
48
|
-
setupState: Record<string, unknown>;
|
|
49
|
-
provides: Record<string | symbol, unknown>;
|
|
50
|
-
ctx: Record<string, unknown>;
|
|
51
|
-
} & App;
|
|
52
|
-
interface AppRecord {
|
|
53
|
-
id: string;
|
|
54
|
-
name: string;
|
|
55
|
-
app?: App;
|
|
56
|
-
version?: string;
|
|
57
|
-
types?: Record<string, string | symbol>;
|
|
58
|
-
instanceMap: Map<string, VueAppInstance>;
|
|
59
|
-
perfGroupIds: Map<string, {
|
|
60
|
-
groupId: number;
|
|
61
|
-
time: number;
|
|
62
|
-
}>;
|
|
63
|
-
rootInstance: VueAppInstance;
|
|
64
|
-
routerId?: string;
|
|
65
|
-
iframe?: string;
|
|
66
|
-
}
|
|
67
|
-
//#endregion
|
|
68
|
-
//#region src/types/command.d.ts
|
|
69
|
-
interface CustomCommandAction {
|
|
70
|
-
type: 'url';
|
|
71
|
-
/**
|
|
72
|
-
* Url of the action, if set, execute the action will open the url
|
|
73
|
-
*/
|
|
74
|
-
src: string;
|
|
75
|
-
}
|
|
76
|
-
interface CustomCommand {
|
|
77
|
-
/**
|
|
78
|
-
* The id of the command, should be unique
|
|
79
|
-
*/
|
|
80
|
-
id: string;
|
|
81
|
-
title: string;
|
|
82
|
-
description?: string;
|
|
83
|
-
/**
|
|
84
|
-
* Order of the command, bigger number will be shown first
|
|
85
|
-
* @default 0
|
|
86
|
-
*/
|
|
87
|
-
order?: number;
|
|
88
|
-
/**
|
|
89
|
-
* Icon of the tab, support any Iconify icons, or a url to an image
|
|
90
|
-
*/
|
|
91
|
-
icon?: string;
|
|
92
|
-
/**
|
|
93
|
-
* - action of the command
|
|
94
|
-
* - __NOTE__: This will be ignored if `children` is set
|
|
95
|
-
*/
|
|
96
|
-
action?: CustomCommandAction;
|
|
97
|
-
/**
|
|
98
|
-
* - children of action, if set, execute the action will show the children
|
|
99
|
-
*/
|
|
100
|
-
children?: Omit<CustomCommand, 'children'>[];
|
|
101
|
-
}
|
|
102
|
-
//#endregion
|
|
103
|
-
//#region src/types/inspector.d.ts
|
|
104
|
-
interface CustomInspectorOptions {
|
|
105
|
-
id: string;
|
|
106
|
-
label: string;
|
|
107
|
-
icon?: string;
|
|
108
|
-
treeFilterPlaceholder?: string;
|
|
109
|
-
stateFilterPlaceholder?: string;
|
|
110
|
-
noSelectionText?: string;
|
|
111
|
-
actions?: {
|
|
112
|
-
icon: string;
|
|
113
|
-
tooltip?: string;
|
|
114
|
-
action: () => void | Promise<void>;
|
|
115
|
-
}[];
|
|
116
|
-
nodeActions?: {
|
|
117
|
-
icon: string;
|
|
118
|
-
tooltip?: string;
|
|
119
|
-
action: (nodeId: string) => void | Promise<void>;
|
|
120
|
-
}[];
|
|
121
|
-
}
|
|
122
|
-
interface InspectorNodeTag {
|
|
123
|
-
label: string;
|
|
124
|
-
textColor: number;
|
|
125
|
-
backgroundColor: number;
|
|
126
|
-
tooltip?: string;
|
|
127
|
-
}
|
|
128
|
-
type EditStatePayload = {
|
|
129
|
-
value: any;
|
|
130
|
-
newKey?: string | null;
|
|
131
|
-
remove?: undefined | false;
|
|
132
|
-
} | {
|
|
133
|
-
value?: undefined;
|
|
134
|
-
newKey?: undefined;
|
|
135
|
-
remove: true;
|
|
136
|
-
};
|
|
137
|
-
interface CustomInspectorNode {
|
|
138
|
-
id: string;
|
|
139
|
-
label: string;
|
|
140
|
-
children?: CustomInspectorNode[];
|
|
141
|
-
tags?: InspectorNodeTag[];
|
|
142
|
-
name?: string;
|
|
143
|
-
file?: string;
|
|
144
|
-
}
|
|
145
|
-
interface CustomInspectorState {
|
|
146
|
-
[key: string]: (StateBase | Omit<ComponentState, 'type'>)[];
|
|
147
|
-
}
|
|
148
|
-
//#endregion
|
|
149
|
-
//#region src/types/component.d.ts
|
|
150
|
-
type ComponentInstance = any;
|
|
151
|
-
interface ComponentTreeNode {
|
|
152
|
-
uid: string | number;
|
|
153
|
-
id: string;
|
|
154
|
-
name: string;
|
|
155
|
-
renderKey: string | number;
|
|
156
|
-
inactive: boolean;
|
|
157
|
-
isFragment: boolean;
|
|
158
|
-
hasChildren: boolean;
|
|
159
|
-
children: ComponentTreeNode[];
|
|
160
|
-
domOrder?: number[];
|
|
161
|
-
consoleId?: string;
|
|
162
|
-
isRouterView?: boolean;
|
|
163
|
-
macthedRouteSegment?: string;
|
|
164
|
-
tags: InspectorNodeTag[];
|
|
165
|
-
autoOpen: boolean;
|
|
166
|
-
meta?: any;
|
|
167
|
-
file?: string;
|
|
168
|
-
}
|
|
169
|
-
type ComponentBuiltinCustomStateTypes = 'function' | 'map' | 'set' | 'reference' | 'component' | 'component-definition' | 'store';
|
|
170
|
-
interface ComponentCustomState extends ComponentStateBase {
|
|
171
|
-
value: CustomState;
|
|
172
|
-
}
|
|
173
|
-
interface StateBase {
|
|
174
|
-
key: string;
|
|
175
|
-
value: any;
|
|
176
|
-
editable?: boolean;
|
|
177
|
-
objectType?: 'ref' | 'reactive' | 'computed' | 'other';
|
|
178
|
-
raw?: string;
|
|
179
|
-
}
|
|
180
|
-
interface ComponentStateBase extends StateBase {
|
|
181
|
-
type: string;
|
|
182
|
-
}
|
|
183
|
-
interface ComponentPropState extends ComponentStateBase {
|
|
184
|
-
meta?: {
|
|
185
|
-
type: string;
|
|
186
|
-
required: boolean; /** Vue 1 only */
|
|
187
|
-
mode?: 'default' | 'sync' | 'once';
|
|
188
|
-
};
|
|
189
|
-
}
|
|
190
|
-
interface CustomState {
|
|
1
|
+
import { $ as DEVTOOLS_RPC_COMMAND, $n as ValueHandleRegistryOptions, $t as VueTypeMap, A as connectDevtoolsExtensionClient, An as MutableEditStatePayload, At as AppRecord, B as DevtoolsRpcChannel, Bn as TimelineEventOptions, Bt as InspectorId, C as DevtoolsExtensionFrameController, Cn as RouterSnapshotMessage, Ct as RuntimePerformanceMonitor, D as DevtoolsExtensionPortDescriptor, Dn as DevToolsPluginAPIHooks, Dt as RuntimeInspectorInfo, E as DevtoolsExtensionFramesChangedMessage, En as DevToolsPluginAPI, Et as RuntimeInspectorAction, F as isExtensionDevtoolsClientHostAvailable, Fn as PluginDescriptor, Ft as RuntimeRegistry, G as DevtoolsRpcClientFunctions, Gn as EncodedValue, Gt as RuntimeCommandResult, H as createMessagePortDevtoolsRpcChannel, Hn as VisitComponentTreePayload, Ht as MaybePromise, I as parseDevtoolsExtensionPortName, In as PluginSettingOption, It as WalkedComponentChild, J as DevtoolsRpcServerFunctions, Jn as encodeValue, Jt as RuntimeEvent, K as DevtoolsRpcEvent, Kn as ValueCodecOptions, Kt as RuntimeDomainEvent, L as CreateDevtoolsRpcClientOptions, Ln as PluginSettingsItem, Lt as AppId, M as createDevtoolsExtensionPortName, Mn as MutableInspectorTreePayload, Mt as ComponentRecord, N as createExtensionDevtoolsClientHost, Nn as PLUGIN_API_CAPABILITIES, Nt as ComponentSnapshot, O as DevtoolsExtensionPortRole, On as InspectComponentPayload, Ot as RuntimeInspectorRecord, P as isDevtoolsExtensionFrameControlMessage, Pn as PluginApiAdapter, Pt as RefreshComponentTreeOptions, Q as DEVTOOLS_IFRAME_RPC_SOURCE, Qn as ValueHandleRegistry, Qt as RuntimeQuery, R as DevtoolsRpcClient, Rn as PluginSetupFunction, Rt as AppRef, S as DevtoolsExtensionFrameControlMessage, Sn as RouterRouteSnapshot, St as RuntimeRequests, T as DevtoolsExtensionFrameSelectMessage, Tn as CustomInspectorOptions, Tt as createRuntimePerformanceMonitor, U as DevtoolsInPageProtocol, Un as createPluginApiAdapter, Ut as PluginId, V as DevtoolsRpcChannelHandle, Vn as TimelineLayerOptions, Vt as InstanceRef, W as DevtoolsRpcChannelKind, Wn as reportPluginError, Wt as RuntimeCommand, X as DEFAULT_DEVTOOLS_RPC_CHANNEL_ID, Xn as ValueHandle, Xt as RuntimeEventHandler, Y as toDevtoolsRpcEvent, Yn as formatPreviewKey, Yt as RuntimeEventBase, Z as DEVTOOLS_IFRAME_RPC_CONNECT, Zn as ValueHandleEntry, Zt as RuntimeEventType, _ as DEVTOOLS_EXTENSION_FRAME_CONTROL_SOURCE, _n as ReactivityGraphNode, _t as ComponentTreeStore, a as isIframeDevtoolsClientHostAvailable, an as ComponentStateSnapshotMessage, at as DevtoolsRuntime, b as DevtoolsExtensionFrameActivatedMessage, bn as ReactivityRelationship, bt as RuntimeQueryMap, c as createDevtoolsRpcServer, cn as ComponentTreePageMessage, ct as createDevtoolsRuntime, d as connectDevtoolsClient, dn as DevtoolsCapabilitiesMessage, dt as RuntimeScheduler, en as ComponentTreePatch, er as RuntimeBudget, et as DEVTOOLS_RPC_EVENT, f as getDefaultDevtoolsClientHosts, fn as ExpandedValueMessage, ft as createRuntimeScheduler, g as ConnectDevtoolsExtensionClientOptions, gn as PluginsSnapshotMessage, gt as ComponentTreeSnapshot, h as ChromeRuntimePort, hn as PluginSnapshot, ht as ComponentTreePatchBatch, i as createIframeDevtoolsClientHost, in as ComponentStateSection, it as CreateDevtoolsRuntimeOptions, j as createChromeRuntimePortDevtoolsRpcChannel, jn as MutableInspectorStatePayload, jt as ComponentDomOrderCache, k as DevtoolsExtensionRpcClient, kn as InspectTimelineEventPayload, kt as RuntimeInspectorStore, l as ConnectDevtoolsClientOptions, ln as ComponentTreeSnapshotMessage, lt as ComponentStateCollector, m as ChromeExtensionEvent, mn as InspectorsListMessage, mt as createRuntimeEventLog, n as StartIframeDevtoolsRpcHostOptions, nn as AppsSnapshotMessage, nr as defaultRuntimeBudget, nt as ComponentInspectorDockController, o as startIframeDevtoolsRpcHost, on as ComponentTreeNodeSnapshot, ot as RuntimeCommandHandler, p as ChromeExtensionApi, pn as InspectorTreeSnapshotMessage, pt as RuntimeEventLog, q as DevtoolsRpcEventHandler, qn as ValueEntry, qt as RuntimeDomainEventType, r as connectDevtoolsIframeClient, rn as ComponentInspectionResultMessage, rr as resolveRuntimeBudget, rt as ComponentInspectorDockRestore, s as DevtoolsRpcServer, sn as ComponentTreeNodeTag, st as RuntimeQueryHandler, t as ConnectDevtoolsIframeClientOptions, tn as AppSnapshot, tr as RuntimeBudgetInput, tt as DEVTOOLS_RPC_QUERY, u as DevtoolsClientHost, un as CustomInspectorTreeNode, ut as LegacyComponentStateEntry, v as DEVTOOLS_EXTENSION_PORT_SOURCE, vn as ReactivityGraphNodeType, vt as RuntimeCommandMap, w as DevtoolsExtensionFrameDescriptor, wn as StateEntry, wt as RuntimePerformanceSnapshot, x as DevtoolsExtensionFrameActivationReason, xn as RouterRouteRecordSnapshot, xt as RuntimeQueryRequest, y as DEVTOOLS_EXTENSION_PORT_VERSION, yn as ReactivityGraphSnapshot, yt as RuntimeCommandRequest, z as createDevtoolsRpcClient, zn as SetPluginSettingsPayload, zt as ComponentId } from "./iframe-CbsDYoCA.cjs";
|
|
2
|
+
//#region src/codec/computed-ref.d.ts
|
|
3
|
+
export declare const NOT_ACCESSED_COMPUTED_TYPE = "computed-not-accessed";
|
|
4
|
+
export declare const NOT_ACCESSED_COMPUTED_DISPLAY = "not accessed";
|
|
5
|
+
export declare const NOT_ACCESSED_COMPUTED_TOOLTIP = "This computed property has never been accessed.";
|
|
6
|
+
export declare function createNotAccessedComputedCustomValue(): {
|
|
191
7
|
_custom: {
|
|
192
|
-
type: ComponentBuiltinCustomStateTypes | string;
|
|
193
|
-
objectType?: string;
|
|
194
|
-
display?: string;
|
|
195
|
-
tooltip?: string;
|
|
196
|
-
value?: any;
|
|
197
|
-
abstract?: boolean;
|
|
198
|
-
file?: string;
|
|
199
|
-
uid?: number;
|
|
200
|
-
readOnly?: boolean; /** Configure immediate child fields */
|
|
201
|
-
fields?: {
|
|
202
|
-
abstract?: boolean;
|
|
203
|
-
};
|
|
204
|
-
id?: any;
|
|
205
|
-
actions?: {
|
|
206
|
-
icon: string;
|
|
207
|
-
tooltip?: string;
|
|
208
|
-
action: () => void | Promise<void>;
|
|
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 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 const callStateUpdatedHook: ((state: DevToolsState) => Promise<void>) & {
|
|
246
|
-
cancel: () => void;
|
|
247
|
-
flush: () => Promise<void> | undefined;
|
|
248
|
-
isPending: () => boolean;
|
|
249
|
-
};
|
|
250
|
-
declare const callConnectedUpdatedHook: ((state: DevToolsState, oldState: DevToolsState) => Promise<void>) & {
|
|
251
|
-
cancel: () => void;
|
|
252
|
-
flush: () => Promise<void> | undefined;
|
|
253
|
-
isPending: () => boolean;
|
|
254
|
-
};
|
|
255
|
-
declare const devtoolsAppRecords: DevToolsAppRecords[] & {
|
|
256
|
-
value: DevToolsAppRecords[];
|
|
257
|
-
};
|
|
258
|
-
declare const addDevToolsAppRecord: (app: AppRecord) => void;
|
|
259
|
-
declare const removeDevToolsAppRecord: (app: AppRecord["app"]) => void;
|
|
260
|
-
declare const activeAppRecord: AppRecord & {
|
|
261
|
-
value: AppRecord;
|
|
262
|
-
id: string;
|
|
263
|
-
};
|
|
264
|
-
declare function setActiveAppRecord(app: AppRecord): void;
|
|
265
|
-
declare function setActiveAppRecordId(id: string): void;
|
|
266
|
-
declare const devtoolsState: DevToolsState;
|
|
267
|
-
declare function resetDevToolsState(): void;
|
|
268
|
-
declare function updateDevToolsState(state: Partial<DevToolsState>): void;
|
|
269
|
-
declare function onDevToolsConnected(fn: () => void): Promise<void>;
|
|
270
|
-
declare function addCustomTab(tab: CustomTab): void;
|
|
271
|
-
declare function addCustomCommand(action: CustomCommand): void;
|
|
272
|
-
declare function removeCustomCommand(actionId: string): void;
|
|
273
|
-
declare function toggleClientConnected(state: boolean): void;
|
|
274
|
-
//#endregion
|
|
275
|
-
//#region src/ctx/hook.d.ts
|
|
276
|
-
declare enum DevToolsV6PluginAPIHookKeys {
|
|
277
|
-
VISIT_COMPONENT_TREE = "visitComponentTree",
|
|
278
|
-
INSPECT_COMPONENT = "inspectComponent",
|
|
279
|
-
EDIT_COMPONENT_STATE = "editComponentState",
|
|
280
|
-
GET_INSPECTOR_TREE = "getInspectorTree",
|
|
281
|
-
GET_INSPECTOR_STATE = "getInspectorState",
|
|
282
|
-
EDIT_INSPECTOR_STATE = "editInspectorState",
|
|
283
|
-
INSPECT_TIMELINE_EVENT = "inspectTimelineEvent",
|
|
284
|
-
TIMELINE_CLEARED = "timelineCleared",
|
|
285
|
-
SET_PLUGIN_SETTINGS = "setPluginSettings"
|
|
286
|
-
}
|
|
287
|
-
interface DevToolsV6PluginAPIHookPayloads {
|
|
288
|
-
[DevToolsV6PluginAPIHookKeys.VISIT_COMPONENT_TREE]: {
|
|
289
|
-
app: App;
|
|
290
|
-
componentInstance: ComponentInstance;
|
|
291
|
-
treeNode: ComponentTreeNode;
|
|
292
|
-
filter: string;
|
|
293
|
-
};
|
|
294
|
-
[DevToolsV6PluginAPIHookKeys.INSPECT_COMPONENT]: {
|
|
295
|
-
app: App;
|
|
296
|
-
componentInstance: ComponentInstance;
|
|
297
|
-
instanceData: InspectedComponentData;
|
|
298
|
-
};
|
|
299
|
-
[DevToolsV6PluginAPIHookKeys.EDIT_COMPONENT_STATE]: {
|
|
300
|
-
app: App;
|
|
301
|
-
inspectorId: string;
|
|
302
|
-
nodeId: string;
|
|
303
|
-
path: string[];
|
|
304
8
|
type: string;
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
inspectorId: string;
|
|
311
|
-
filter: string;
|
|
312
|
-
rootNodes: CustomInspectorNode[];
|
|
313
|
-
};
|
|
314
|
-
[DevToolsV6PluginAPIHookKeys.GET_INSPECTOR_STATE]: {
|
|
315
|
-
app: App;
|
|
316
|
-
inspectorId: string;
|
|
317
|
-
nodeId: string;
|
|
318
|
-
state: CustomInspectorState;
|
|
319
|
-
};
|
|
320
|
-
[DevToolsV6PluginAPIHookKeys.EDIT_INSPECTOR_STATE]: {
|
|
321
|
-
app: App;
|
|
322
|
-
inspectorId: string;
|
|
323
|
-
nodeId: string;
|
|
324
|
-
path: string[];
|
|
325
|
-
type: string;
|
|
326
|
-
state: EditStatePayload;
|
|
327
|
-
set: (object: any, path?: string | (string[]), value?: any, cb?: (object: any, field: string, value: any) => void) => void;
|
|
328
|
-
};
|
|
329
|
-
[DevToolsV6PluginAPIHookKeys.INSPECT_TIMELINE_EVENT]: {
|
|
330
|
-
app: App;
|
|
331
|
-
layerId: string;
|
|
332
|
-
event: TimelineEvent;
|
|
333
|
-
all?: boolean;
|
|
334
|
-
data: any;
|
|
335
|
-
};
|
|
336
|
-
[DevToolsV6PluginAPIHookKeys.TIMELINE_CLEARED]: Record<string, never>;
|
|
337
|
-
[DevToolsV6PluginAPIHookKeys.SET_PLUGIN_SETTINGS]: {
|
|
338
|
-
app: App;
|
|
339
|
-
pluginId: string;
|
|
340
|
-
key: string;
|
|
341
|
-
newValue: any;
|
|
342
|
-
oldValue: any;
|
|
343
|
-
settings: any;
|
|
344
|
-
};
|
|
345
|
-
}
|
|
346
|
-
interface DevToolsV6PluginAPIHooks {
|
|
347
|
-
[DevToolsV6PluginAPIHookKeys.VISIT_COMPONENT_TREE]: (payload: DevToolsV6PluginAPIHookPayloads[DevToolsV6PluginAPIHookKeys.VISIT_COMPONENT_TREE]) => void;
|
|
348
|
-
[DevToolsV6PluginAPIHookKeys.INSPECT_COMPONENT]: (payload: DevToolsV6PluginAPIHookPayloads[DevToolsV6PluginAPIHookKeys.INSPECT_COMPONENT]) => void;
|
|
349
|
-
[DevToolsV6PluginAPIHookKeys.EDIT_COMPONENT_STATE]: (payload: DevToolsV6PluginAPIHookPayloads[DevToolsV6PluginAPIHookKeys.EDIT_COMPONENT_STATE]) => void;
|
|
350
|
-
[DevToolsV6PluginAPIHookKeys.GET_INSPECTOR_TREE]: (payload: DevToolsV6PluginAPIHookPayloads[DevToolsV6PluginAPIHookKeys.GET_INSPECTOR_TREE]) => void;
|
|
351
|
-
[DevToolsV6PluginAPIHookKeys.GET_INSPECTOR_STATE]: (payload: DevToolsV6PluginAPIHookPayloads[DevToolsV6PluginAPIHookKeys.GET_INSPECTOR_STATE]) => void;
|
|
352
|
-
[DevToolsV6PluginAPIHookKeys.EDIT_INSPECTOR_STATE]: (payload: DevToolsV6PluginAPIHookPayloads[DevToolsV6PluginAPIHookKeys.EDIT_INSPECTOR_STATE]) => void;
|
|
353
|
-
[DevToolsV6PluginAPIHookKeys.INSPECT_TIMELINE_EVENT]: (payload: DevToolsV6PluginAPIHookPayloads[DevToolsV6PluginAPIHookKeys.INSPECT_TIMELINE_EVENT]) => void;
|
|
354
|
-
[DevToolsV6PluginAPIHookKeys.TIMELINE_CLEARED]: (payload: DevToolsV6PluginAPIHookPayloads[DevToolsV6PluginAPIHookKeys.TIMELINE_CLEARED]) => void;
|
|
355
|
-
[DevToolsV6PluginAPIHookKeys.SET_PLUGIN_SETTINGS]: (payload: DevToolsV6PluginAPIHookPayloads[DevToolsV6PluginAPIHookKeys.SET_PLUGIN_SETTINGS]) => void;
|
|
356
|
-
}
|
|
357
|
-
declare enum DevToolsContextHookKeys {
|
|
358
|
-
ADD_INSPECTOR = "addInspector",
|
|
359
|
-
SEND_INSPECTOR_TREE = "sendInspectorTree",
|
|
360
|
-
SEND_INSPECTOR_STATE = "sendInspectorState",
|
|
361
|
-
CUSTOM_INSPECTOR_SELECT_NODE = "customInspectorSelectNode",
|
|
362
|
-
TIMELINE_LAYER_ADDED = "timelineLayerAdded",
|
|
363
|
-
TIMELINE_EVENT_ADDED = "timelineEventAdded",
|
|
364
|
-
GET_COMPONENT_INSTANCES = "getComponentInstances",
|
|
365
|
-
GET_COMPONENT_BOUNDS = "getComponentBounds",
|
|
366
|
-
GET_COMPONENT_NAME = "getComponentName",
|
|
367
|
-
COMPONENT_HIGHLIGHT = "componentHighlight",
|
|
368
|
-
COMPONENT_UNHIGHLIGHT = "componentUnhighlight"
|
|
369
|
-
}
|
|
370
|
-
interface DevToolsContextHookPayloads {
|
|
371
|
-
[DevToolsContextHookKeys.ADD_INSPECTOR]: {
|
|
372
|
-
inspector: CustomInspectorOptions;
|
|
373
|
-
plugin: DevToolsPlugin;
|
|
374
|
-
};
|
|
375
|
-
[DevToolsContextHookKeys.SEND_INSPECTOR_TREE]: {
|
|
376
|
-
inspectorId: string;
|
|
377
|
-
plugin: DevToolsPlugin;
|
|
378
|
-
};
|
|
379
|
-
[DevToolsContextHookKeys.SEND_INSPECTOR_STATE]: {
|
|
380
|
-
inspectorId: string;
|
|
381
|
-
plugin: DevToolsPlugin;
|
|
382
|
-
};
|
|
383
|
-
[DevToolsContextHookKeys.CUSTOM_INSPECTOR_SELECT_NODE]: {
|
|
384
|
-
inspectorId: string;
|
|
385
|
-
nodeId: string;
|
|
386
|
-
plugin: DevToolsPlugin;
|
|
387
|
-
};
|
|
388
|
-
[DevToolsContextHookKeys.TIMELINE_LAYER_ADDED]: {
|
|
389
|
-
options: TimelineLayerOptions;
|
|
390
|
-
plugin: DevToolsPlugin;
|
|
391
|
-
};
|
|
392
|
-
[DevToolsContextHookKeys.TIMELINE_EVENT_ADDED]: {
|
|
393
|
-
options: TimelineEventOptions;
|
|
394
|
-
plugin: DevToolsPlugin;
|
|
395
|
-
};
|
|
396
|
-
[DevToolsContextHookKeys.GET_COMPONENT_INSTANCES]: {
|
|
397
|
-
app: App;
|
|
398
|
-
};
|
|
399
|
-
[DevToolsContextHookKeys.GET_COMPONENT_BOUNDS]: {
|
|
400
|
-
instance: ComponentInstance;
|
|
401
|
-
};
|
|
402
|
-
[DevToolsContextHookKeys.GET_COMPONENT_NAME]: {
|
|
403
|
-
instance: ComponentInstance;
|
|
404
|
-
};
|
|
405
|
-
[DevToolsContextHookKeys.COMPONENT_HIGHLIGHT]: {
|
|
406
|
-
uid: string;
|
|
407
|
-
};
|
|
408
|
-
[DevToolsContextHookKeys.COMPONENT_UNHIGHLIGHT]: Record<string, never>;
|
|
409
|
-
}
|
|
410
|
-
declare enum DevToolsMessagingHookKeys {
|
|
411
|
-
SEND_INSPECTOR_TREE_TO_CLIENT = "sendInspectorTreeToClient",
|
|
412
|
-
SEND_INSPECTOR_STATE_TO_CLIENT = "sendInspectorStateToClient",
|
|
413
|
-
SEND_TIMELINE_EVENT_TO_CLIENT = "sendTimelineEventToClient",
|
|
414
|
-
SEND_INSPECTOR_TO_CLIENT = "sendInspectorToClient",
|
|
415
|
-
SEND_ACTIVE_APP_UNMOUNTED_TO_CLIENT = "sendActiveAppUpdatedToClient",
|
|
416
|
-
DEVTOOLS_STATE_UPDATED = "devtoolsStateUpdated",
|
|
417
|
-
DEVTOOLS_CONNECTED_UPDATED = "devtoolsConnectedUpdated",
|
|
418
|
-
ROUTER_INFO_UPDATED = "routerInfoUpdated"
|
|
419
|
-
}
|
|
420
|
-
interface DevToolsMessagingHookPayloads {
|
|
421
|
-
[DevToolsMessagingHookKeys.SEND_INSPECTOR_TREE_TO_CLIENT]: {
|
|
422
|
-
inspectorId: string;
|
|
423
|
-
rootNodes: CustomInspectorNode[];
|
|
424
|
-
};
|
|
425
|
-
[DevToolsMessagingHookKeys.SEND_INSPECTOR_STATE_TO_CLIENT]: {
|
|
426
|
-
inspectorId: string;
|
|
427
|
-
nodeId: string;
|
|
428
|
-
state: CustomInspectorState;
|
|
429
|
-
};
|
|
430
|
-
[DevToolsMessagingHookKeys.SEND_TIMELINE_EVENT_TO_CLIENT]: TimelineEventOptions;
|
|
431
|
-
[DevToolsMessagingHookKeys.SEND_INSPECTOR_TO_CLIENT]: {
|
|
432
|
-
id: string;
|
|
433
|
-
label: string;
|
|
434
|
-
logo: string;
|
|
435
|
-
icon: string;
|
|
436
|
-
packageName: string | undefined;
|
|
437
|
-
homepage: string | undefined;
|
|
438
|
-
}[];
|
|
439
|
-
[DevToolsMessagingHookKeys.DEVTOOLS_STATE_UPDATED]: {
|
|
440
|
-
state: DevToolsState;
|
|
441
|
-
};
|
|
442
|
-
[DevToolsMessagingHookKeys.DEVTOOLS_CONNECTED_UPDATED]: {
|
|
443
|
-
state: DevToolsState;
|
|
444
|
-
oldState: DevToolsState;
|
|
445
|
-
};
|
|
446
|
-
[DevToolsMessagingHookKeys.ROUTER_INFO_UPDATED]: {
|
|
447
|
-
state: RouterInfo;
|
|
448
|
-
};
|
|
449
|
-
}
|
|
450
|
-
interface DevToolsMessagingHooks {
|
|
451
|
-
[DevToolsMessagingHookKeys.SEND_INSPECTOR_TREE_TO_CLIENT]: (payload: DevToolsMessagingHookPayloads[DevToolsMessagingHookKeys.SEND_INSPECTOR_TREE_TO_CLIENT]) => void;
|
|
452
|
-
[DevToolsMessagingHookKeys.SEND_INSPECTOR_STATE_TO_CLIENT]: (payload: DevToolsMessagingHookPayloads[DevToolsMessagingHookKeys.SEND_INSPECTOR_STATE_TO_CLIENT]) => void;
|
|
453
|
-
[DevToolsMessagingHookKeys.SEND_TIMELINE_EVENT_TO_CLIENT]: (payload: DevToolsMessagingHookPayloads[DevToolsMessagingHookKeys.SEND_TIMELINE_EVENT_TO_CLIENT]) => void;
|
|
454
|
-
[DevToolsMessagingHookKeys.SEND_ACTIVE_APP_UNMOUNTED_TO_CLIENT]: () => void;
|
|
455
|
-
[DevToolsMessagingHookKeys.SEND_INSPECTOR_TO_CLIENT]: (payload: DevToolsMessagingHookPayloads[DevToolsMessagingHookKeys.SEND_INSPECTOR_TO_CLIENT]) => void;
|
|
456
|
-
[DevToolsMessagingHookKeys.DEVTOOLS_STATE_UPDATED]: (payload: DevToolsMessagingHookPayloads[DevToolsMessagingHookKeys.DEVTOOLS_STATE_UPDATED]) => void;
|
|
457
|
-
[DevToolsMessagingHookKeys.DEVTOOLS_CONNECTED_UPDATED]: (payload: DevToolsMessagingHookPayloads[DevToolsMessagingHookKeys.DEVTOOLS_CONNECTED_UPDATED]) => void;
|
|
458
|
-
[DevToolsMessagingHookKeys.ROUTER_INFO_UPDATED]: (payload: DevToolsMessagingHookPayloads[DevToolsMessagingHookKeys.ROUTER_INFO_UPDATED]) => void;
|
|
459
|
-
}
|
|
460
|
-
interface DevToolsContextHooks extends DevToolsV6PluginAPIHooks {
|
|
461
|
-
[DevToolsContextHookKeys.ADD_INSPECTOR]: (payload: DevToolsContextHookPayloads[DevToolsContextHookKeys.ADD_INSPECTOR]) => void;
|
|
462
|
-
[DevToolsContextHookKeys.SEND_INSPECTOR_TREE]: (payload: DevToolsContextHookPayloads[DevToolsContextHookKeys.SEND_INSPECTOR_TREE]) => void;
|
|
463
|
-
[DevToolsContextHookKeys.SEND_INSPECTOR_STATE]: (payload: DevToolsContextHookPayloads[DevToolsContextHookKeys.SEND_INSPECTOR_STATE]) => void;
|
|
464
|
-
[DevToolsContextHookKeys.CUSTOM_INSPECTOR_SELECT_NODE]: (payload: DevToolsContextHookPayloads[DevToolsContextHookKeys.CUSTOM_INSPECTOR_SELECT_NODE]) => void;
|
|
465
|
-
[DevToolsContextHookKeys.TIMELINE_LAYER_ADDED]: (payload: DevToolsContextHookPayloads[DevToolsContextHookKeys.TIMELINE_LAYER_ADDED]) => void;
|
|
466
|
-
[DevToolsContextHookKeys.TIMELINE_EVENT_ADDED]: (payload: DevToolsContextHookPayloads[DevToolsContextHookKeys.TIMELINE_EVENT_ADDED]) => void;
|
|
467
|
-
[DevToolsContextHookKeys.GET_COMPONENT_INSTANCES]: (payload: DevToolsContextHookPayloads[DevToolsContextHookKeys.GET_COMPONENT_INSTANCES]) => void;
|
|
468
|
-
[DevToolsContextHookKeys.GET_COMPONENT_BOUNDS]: (payload: DevToolsContextHookPayloads[DevToolsContextHookKeys.GET_COMPONENT_BOUNDS]) => void;
|
|
469
|
-
[DevToolsContextHookKeys.GET_COMPONENT_NAME]: (payload: DevToolsContextHookPayloads[DevToolsContextHookKeys.GET_COMPONENT_NAME]) => void;
|
|
470
|
-
[DevToolsContextHookKeys.COMPONENT_HIGHLIGHT]: (payload: DevToolsContextHookPayloads[DevToolsContextHookKeys.COMPONENT_HIGHLIGHT]) => void;
|
|
471
|
-
[DevToolsContextHookKeys.COMPONENT_UNHIGHLIGHT]: () => void;
|
|
472
|
-
}
|
|
473
|
-
declare function createDevToolsCtxHooks(): hookable.Hookable<DevToolsContextHooks & DevToolsMessagingHooks, hookable.HookKeys<DevToolsContextHooks & DevToolsMessagingHooks>>;
|
|
474
|
-
//#endregion
|
|
475
|
-
//#region src/core/component-inspector/index.d.ts
|
|
476
|
-
interface ComponentInspector {
|
|
477
|
-
enabled: boolean;
|
|
478
|
-
position: {
|
|
479
|
-
x: number;
|
|
480
|
-
y: number;
|
|
481
|
-
};
|
|
482
|
-
linkParams: {
|
|
483
|
-
file: string;
|
|
484
|
-
line: number;
|
|
485
|
-
column: number;
|
|
486
|
-
};
|
|
487
|
-
enable: () => void;
|
|
488
|
-
disable: () => void;
|
|
489
|
-
toggleEnabled: () => void;
|
|
490
|
-
openInEditor: (baseUrl: string, file: string, line: number, column: number) => void;
|
|
491
|
-
onUpdated: () => void;
|
|
492
|
-
}
|
|
493
|
-
declare function toggleComponentInspectorEnabled(enabled: boolean): void;
|
|
494
|
-
declare function getComponentInspector(): Promise<ComponentInspector>;
|
|
495
|
-
//#endregion
|
|
496
|
-
//#region src/core/open-in-editor/index.d.ts
|
|
497
|
-
interface OpenInEditorOptions {
|
|
498
|
-
baseUrl?: string;
|
|
499
|
-
file?: string;
|
|
500
|
-
line?: number;
|
|
501
|
-
column?: number;
|
|
502
|
-
host?: string;
|
|
503
|
-
}
|
|
504
|
-
declare function setOpenInEditorBaseUrl(url: string): void;
|
|
505
|
-
declare function openInEditor(options?: OpenInEditorOptions): void;
|
|
506
|
-
//#endregion
|
|
507
|
-
//#region src/ctx/api.d.ts
|
|
508
|
-
declare function createDevToolsApi(hooks: Hookable<DevToolsContextHooks & DevToolsMessagingHooks, HookKeys<DevToolsContextHooks & DevToolsMessagingHooks>>): {
|
|
509
|
-
getInspectorTree(payload: Pick<DevToolsV6PluginAPIHookPayloads[DevToolsV6PluginAPIHookKeys.GET_INSPECTOR_TREE], "inspectorId" | "filter">): Promise<never[]>;
|
|
510
|
-
getInspectorState(payload: Pick<DevToolsV6PluginAPIHookPayloads[DevToolsV6PluginAPIHookKeys.GET_INSPECTOR_STATE], "inspectorId" | "nodeId">): Promise<CustomInspectorState>;
|
|
511
|
-
editInspectorState(payload: DevToolsV6PluginAPIHookPayloads[DevToolsV6PluginAPIHookKeys.EDIT_INSPECTOR_STATE]): void;
|
|
512
|
-
sendInspectorState(inspectorId: string): void;
|
|
513
|
-
inspectComponentInspector(): Promise<string>;
|
|
514
|
-
cancelInspectComponentInspector(): void;
|
|
515
|
-
getComponentRenderCode(id: string): any;
|
|
516
|
-
scrollToComponent(id: string): void;
|
|
517
|
-
openInEditor: typeof openInEditor;
|
|
518
|
-
getVueInspector: typeof getComponentInspector;
|
|
519
|
-
toggleApp(id: string, options?: {
|
|
520
|
-
inspectingComponent?: boolean;
|
|
521
|
-
}): void;
|
|
522
|
-
inspectDOM(instanceId: string): void;
|
|
523
|
-
updatePluginSettings(pluginId: string, key: string, value: string): void;
|
|
524
|
-
getPluginSettings(pluginId: string): {
|
|
525
|
-
options: Record<string, {
|
|
526
|
-
label: string;
|
|
527
|
-
description?: string;
|
|
528
|
-
} & ({
|
|
529
|
-
type: "boolean";
|
|
530
|
-
defaultValue: boolean;
|
|
531
|
-
} | {
|
|
532
|
-
type: "choice";
|
|
533
|
-
defaultValue: string | number;
|
|
534
|
-
options: {
|
|
535
|
-
value: string | number;
|
|
536
|
-
label: string;
|
|
537
|
-
}[];
|
|
538
|
-
component?: "select" | "button-group";
|
|
539
|
-
} | {
|
|
540
|
-
type: "text";
|
|
541
|
-
defaultValue: string;
|
|
542
|
-
})> | null;
|
|
543
|
-
values: any;
|
|
9
|
+
display: string;
|
|
10
|
+
tooltip: string;
|
|
11
|
+
abstract: true;
|
|
12
|
+
readOnly: true;
|
|
13
|
+
value: undefined;
|
|
544
14
|
};
|
|
545
15
|
};
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
declare
|
|
593
|
-
declare function
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
}[] | undefined;
|
|
598
|
-
declare function getInspectorNodeActions(id: string): {
|
|
599
|
-
icon: string;
|
|
600
|
-
tooltip?: string;
|
|
601
|
-
action: (nodeId: string) => void | Promise<void>;
|
|
602
|
-
}[] | undefined;
|
|
603
|
-
//#endregion
|
|
604
|
-
//#region src/ctx/plugin.d.ts
|
|
605
|
-
type DevToolsKitPluginBuffer = [PluginDescriptor, PluginSetupFunction];
|
|
606
|
-
declare const devtoolsPluginBuffer: DevToolsKitPluginBuffer[];
|
|
607
|
-
declare function addDevToolsPluginToBuffer(pluginDescriptor: PluginDescriptor, setupFn: PluginSetupFunction): void;
|
|
608
|
-
//#endregion
|
|
609
|
-
//#region src/ctx/router.d.ts
|
|
610
|
-
declare const ROUTER_KEY = "__VUE_DEVTOOLS_ROUTER__";
|
|
611
|
-
declare const ROUTER_INFO_KEY = "__VUE_DEVTOOLS_ROUTER_INFO__";
|
|
612
|
-
declare const devtoolsRouterInfo: RouterInfo;
|
|
613
|
-
declare const devtoolsRouter: {
|
|
614
|
-
value: Router;
|
|
615
|
-
};
|
|
616
|
-
//#endregion
|
|
617
|
-
//#region src/ctx/timeline.d.ts
|
|
618
|
-
declare function updateTimelineLayersState(state: Record<string, boolean>): void;
|
|
619
|
-
//#endregion
|
|
620
|
-
//#region src/ctx/index.d.ts
|
|
621
|
-
interface DevtoolsContext {
|
|
622
|
-
hooks: Hookable<DevToolsContextHooks & DevToolsMessagingHooks, HookKeys<DevToolsContextHooks & DevToolsMessagingHooks>>;
|
|
623
|
-
state: DevToolsState & {
|
|
624
|
-
activeAppRecordId: string;
|
|
625
|
-
activeAppRecord: DevToolsAppRecords;
|
|
626
|
-
appRecords: DevToolsAppRecords[];
|
|
627
|
-
};
|
|
628
|
-
api: DevToolsApiType;
|
|
629
|
-
}
|
|
630
|
-
declare const devtoolsContext: DevtoolsContext;
|
|
631
|
-
//#endregion
|
|
632
|
-
//#region src/api/v6/index.d.ts
|
|
633
|
-
declare class DevToolsV6PluginAPI {
|
|
634
|
-
private plugin;
|
|
635
|
-
private hooks;
|
|
636
|
-
constructor({
|
|
637
|
-
plugin,
|
|
638
|
-
ctx
|
|
639
|
-
}: {
|
|
640
|
-
plugin: DevToolsPlugin;
|
|
641
|
-
ctx: DevtoolsContext;
|
|
642
|
-
});
|
|
643
|
-
get on(): {
|
|
644
|
-
visitComponentTree: (handler: DevToolsV6PluginAPIHooks[DevToolsV6PluginAPIHookKeys.VISIT_COMPONENT_TREE]) => void;
|
|
645
|
-
inspectComponent: (handler: DevToolsV6PluginAPIHooks[DevToolsV6PluginAPIHookKeys.INSPECT_COMPONENT]) => void;
|
|
646
|
-
editComponentState: (handler: DevToolsV6PluginAPIHooks[DevToolsV6PluginAPIHookKeys.EDIT_COMPONENT_STATE]) => void;
|
|
647
|
-
getInspectorTree: (handler: DevToolsV6PluginAPIHooks[DevToolsV6PluginAPIHookKeys.GET_INSPECTOR_TREE]) => void;
|
|
648
|
-
getInspectorState: (handler: DevToolsV6PluginAPIHooks[DevToolsV6PluginAPIHookKeys.GET_INSPECTOR_STATE]) => void;
|
|
649
|
-
editInspectorState: (handler: DevToolsV6PluginAPIHooks[DevToolsV6PluginAPIHookKeys.EDIT_INSPECTOR_STATE]) => void;
|
|
650
|
-
inspectTimelineEvent: (handler: DevToolsV6PluginAPIHooks[DevToolsV6PluginAPIHookKeys.INSPECT_TIMELINE_EVENT]) => void;
|
|
651
|
-
timelineCleared: (handler: DevToolsV6PluginAPIHooks[DevToolsV6PluginAPIHookKeys.TIMELINE_CLEARED]) => void;
|
|
652
|
-
setPluginSettings: (handler: DevToolsV6PluginAPIHooks[DevToolsV6PluginAPIHookKeys.SET_PLUGIN_SETTINGS]) => void;
|
|
653
|
-
};
|
|
654
|
-
notifyComponentUpdate(instance?: ComponentInstance): void;
|
|
655
|
-
addInspector(options: CustomInspectorOptions): void;
|
|
656
|
-
sendInspectorTree(inspectorId: string): void;
|
|
657
|
-
sendInspectorState(inspectorId: string): void;
|
|
658
|
-
selectInspectorNode(inspectorId: string, nodeId: string): void;
|
|
659
|
-
visitComponentTree(payload: DevToolsV6PluginAPIHookPayloads[DevToolsV6PluginAPIHookKeys.VISIT_COMPONENT_TREE]): Promise<any>;
|
|
660
|
-
now(): number;
|
|
661
|
-
addTimelineLayer(options: TimelineLayerOptions): void;
|
|
662
|
-
addTimelineEvent(options: TimelineEventOptions): void;
|
|
663
|
-
getSettings(pluginId?: string): any;
|
|
664
|
-
getComponentInstances(app: App): Promise<ComponentInstance[]>;
|
|
665
|
-
getComponentBounds(instance: ComponentInstance): Promise<ComponentBounds>;
|
|
666
|
-
getComponentName(instance: ComponentInstance): Promise<string>;
|
|
667
|
-
highlightElement(instance: ComponentInstance): Promise<any>;
|
|
668
|
-
unhighlightElement(): Promise<any>;
|
|
669
|
-
}
|
|
670
|
-
//#endregion
|
|
671
|
-
//#region src/api/index.d.ts
|
|
672
|
-
declare const DevToolsPluginAPI: typeof DevToolsV6PluginAPI;
|
|
673
|
-
//#endregion
|
|
674
|
-
//#region src/types/plugin.d.ts
|
|
675
|
-
type PluginSettingsItem = {
|
|
676
|
-
label: string;
|
|
677
|
-
description?: string;
|
|
678
|
-
} & ({
|
|
679
|
-
type: 'boolean';
|
|
680
|
-
defaultValue: boolean;
|
|
681
|
-
} | {
|
|
682
|
-
type: 'choice';
|
|
683
|
-
defaultValue: string | number;
|
|
684
|
-
options: {
|
|
685
|
-
value: string | number;
|
|
686
|
-
label: string;
|
|
687
|
-
}[];
|
|
688
|
-
component?: 'select' | 'button-group';
|
|
689
|
-
} | {
|
|
690
|
-
type: 'text';
|
|
691
|
-
defaultValue: string;
|
|
692
|
-
});
|
|
693
|
-
type PluginSetupFunction = (api: InstanceType<typeof DevToolsPluginAPI>) => void;
|
|
694
|
-
interface PluginDescriptor {
|
|
695
|
-
id: string;
|
|
696
|
-
label: string;
|
|
697
|
-
app: App$1<any>;
|
|
698
|
-
packageName?: string;
|
|
699
|
-
homepage?: string;
|
|
700
|
-
componentStateTypes?: string[];
|
|
701
|
-
logo?: string;
|
|
702
|
-
disableAppScope?: boolean;
|
|
703
|
-
disablePluginScope?: boolean;
|
|
704
|
-
/**
|
|
705
|
-
* Run the plugin setup and expose the api even if the devtools is not opened yet.
|
|
706
|
-
* Useful to record timeline events early.
|
|
707
|
-
*/
|
|
708
|
-
enableEarlyProxy?: boolean;
|
|
709
|
-
settings?: Record<string, PluginSettingsItem>;
|
|
710
|
-
}
|
|
711
|
-
interface DevToolsPlugin {
|
|
712
|
-
descriptor: PluginDescriptor;
|
|
713
|
-
setupFn: PluginSetupFunction;
|
|
714
|
-
}
|
|
715
|
-
//#endregion
|
|
716
|
-
//#region src/types/hook.d.ts
|
|
717
|
-
type HookAppInstance = App$1 & VueAppInstance;
|
|
718
|
-
declare enum DevToolsHooks {
|
|
16
|
+
interface ComputedRefLike {
|
|
17
|
+
__v_isRef: true;
|
|
18
|
+
_value?: unknown;
|
|
19
|
+
flags?: unknown;
|
|
20
|
+
_dirty?: unknown;
|
|
21
|
+
deps?: unknown;
|
|
22
|
+
effect?: {
|
|
23
|
+
deps?: unknown;
|
|
24
|
+
};
|
|
25
|
+
fn?: unknown;
|
|
26
|
+
}
|
|
27
|
+
export declare function isComputedRef(value: unknown): value is ComputedRefLike;
|
|
28
|
+
export declare function isUnaccessedComputed(value: unknown): boolean;
|
|
29
|
+
export declare function readCachedComputedValue(value: ComputedRefLike): unknown;
|
|
30
|
+
//#endregion
|
|
31
|
+
//#region src/codec/edit.d.ts
|
|
32
|
+
/**
|
|
33
|
+
* Text shown in the state edit input for an encoded value. Paired with
|
|
34
|
+
* `parseEditText` so every editable typed value round-trips: the text this
|
|
35
|
+
* produces always parses back to a value that encodes to the same kind.
|
|
36
|
+
*/
|
|
37
|
+
export declare function formatEditText(value: EncodedValue): string;
|
|
38
|
+
/**
|
|
39
|
+
* Parses edit input text back into a runtime value, keyed by the kind of the
|
|
40
|
+
* value being edited so `"undefined"` (string) and `undefined` stay distinct.
|
|
41
|
+
* Throws with a user-facing message on invalid input.
|
|
42
|
+
*/
|
|
43
|
+
export declare function parseEditText(value: EncodedValue, text: string): unknown;
|
|
44
|
+
//#endregion
|
|
45
|
+
//#region src/plugin/registry.d.ts
|
|
46
|
+
export declare function setupDevToolsPlugin(descriptor: PluginDescriptor, setupFn: PluginSetupFunction): void;
|
|
47
|
+
export interface PluginController {
|
|
48
|
+
readonly adapters: ReadonlyMap<string, PluginApiAdapter>;
|
|
49
|
+
register(descriptor: PluginDescriptor, setupFn: PluginSetupFunction): Promise<PluginApiAdapter>;
|
|
50
|
+
callHook(key: string, payload: unknown): Promise<void>;
|
|
51
|
+
callHookFor(pluginId: string, key: string, payload: unknown): Promise<void>;
|
|
52
|
+
dispose(): void;
|
|
53
|
+
}
|
|
54
|
+
export declare function createPluginController(runtime: DevtoolsRuntime): PluginController;
|
|
55
|
+
//#endregion
|
|
56
|
+
//#region src/plugin/lifecycle.d.ts
|
|
57
|
+
type ConnectionCallback = () => void;
|
|
58
|
+
export declare function onDevToolsConnected(callback: ConnectionCallback): Promise<void>;
|
|
59
|
+
export declare function onDevToolsClientConnected(callback: ConnectionCallback): Promise<void>;
|
|
60
|
+
//#endregion
|
|
61
|
+
//#region src/protocol/features.d.ts
|
|
62
|
+
export declare const REACTIVITY_GRAPH_MIN_VUE_VERSION = "3.6.0";
|
|
63
|
+
export declare function supportsReactivityGraphVueVersion(version: string | undefined): boolean;
|
|
64
|
+
//#endregion
|
|
65
|
+
//#region src/hook/types.d.ts
|
|
66
|
+
export declare const enum DevtoolsHookEvent {
|
|
719
67
|
APP_INIT = "app:init",
|
|
720
68
|
APP_UNMOUNT = "app:unmount",
|
|
721
|
-
COMPONENT_UPDATED = "component:updated",
|
|
722
69
|
COMPONENT_ADDED = "component:added",
|
|
70
|
+
COMPONENT_UPDATED = "component:updated",
|
|
723
71
|
COMPONENT_REMOVED = "component:removed",
|
|
724
72
|
COMPONENT_EMIT = "component:emit",
|
|
725
73
|
PERFORMANCE_START = "perf:start",
|
|
726
74
|
PERFORMANCE_END = "perf:end",
|
|
727
|
-
ADD_ROUTE = "router:add-route",
|
|
728
|
-
REMOVE_ROUTE = "router:remove-route",
|
|
729
|
-
RENDER_TRACKED = "render:tracked",
|
|
730
|
-
RENDER_TRIGGERED = "render:triggered",
|
|
731
|
-
APP_CONNECTED = "app:connected",
|
|
732
75
|
SETUP_DEVTOOLS_PLUGIN = "devtools-plugin:setup"
|
|
733
76
|
}
|
|
734
|
-
interface
|
|
735
|
-
[DevToolsHooks.APP_INIT]: (app: VueAppInstance['appContext']['app'], version: string, types: Record<string, string | symbol>) => void | Promise<void>;
|
|
736
|
-
[DevToolsHooks.APP_CONNECTED]: () => void;
|
|
737
|
-
[DevToolsHooks.APP_UNMOUNT]: (app: VueAppInstance['appContext']['app']) => void | Promise<void>;
|
|
738
|
-
[DevToolsHooks.COMPONENT_ADDED]: (app: HookAppInstance, uid: number, parentUid: number, component: VueAppInstance) => void | Promise<void>;
|
|
739
|
-
[DevToolsHooks.COMPONENT_EMIT]: (app: HookAppInstance, instance: VueAppInstance, event: string, params: unknown) => void | Promise<void>;
|
|
740
|
-
[DevToolsHooks.COMPONENT_UPDATED]: DevToolsEvent['component:added'];
|
|
741
|
-
[DevToolsHooks.COMPONENT_REMOVED]: DevToolsEvent['component:added'];
|
|
742
|
-
[DevToolsHooks.SETUP_DEVTOOLS_PLUGIN]: (pluginDescriptor: PluginDescriptor, setupFn: PluginSetupFunction, options?: {
|
|
743
|
-
target?: string;
|
|
744
|
-
}) => void;
|
|
745
|
-
[DevToolsHooks.PERFORMANCE_START]: (app: App$1, uid: number, vm: HookAppInstance, type: string, time: number) => void;
|
|
746
|
-
[DevToolsHooks.PERFORMANCE_END]: (app: App$1, uid: number, vm: HookAppInstance, type: string, time: number) => void;
|
|
747
|
-
}
|
|
748
|
-
interface DevToolsHook {
|
|
77
|
+
export interface DevtoolsGlobalHook {
|
|
749
78
|
id: string;
|
|
750
|
-
enabled?: boolean;
|
|
751
79
|
devtoolsVersion: string;
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
}
|
|
761
|
-
interface
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
//#endregion
|
|
777
|
-
//#region src/types/router.d.ts
|
|
778
|
-
interface RouterInfo {
|
|
779
|
-
currentRoute: RouteLocationNormalizedLoaded | null | Record<string, any>;
|
|
780
|
-
routes: RouteRecordNormalized[];
|
|
781
|
-
}
|
|
782
|
-
//#endregion
|
|
783
|
-
//#region src/types/tab.d.ts
|
|
784
|
-
type TabCategory = 'pinned' | 'app' | 'modules' | 'advanced';
|
|
785
|
-
type ModuleView = ModuleIframeView | ModuleVNodeView | ModuleSFCView;
|
|
786
|
-
interface ModuleIframeView {
|
|
787
|
-
/**
|
|
788
|
-
* Iframe view
|
|
789
|
-
*/
|
|
790
|
-
type: 'iframe';
|
|
791
|
-
/**
|
|
792
|
-
* Url of the iframe
|
|
793
|
-
*/
|
|
794
|
-
src: string;
|
|
795
|
-
/**
|
|
796
|
-
* Persist the iframe instance even if the tab is not active
|
|
797
|
-
*
|
|
798
|
-
* @default true
|
|
799
|
-
*/
|
|
800
|
-
persistent?: boolean;
|
|
801
|
-
}
|
|
802
|
-
interface ModuleVNodeView {
|
|
803
|
-
/**
|
|
804
|
-
* Vue's VNode view
|
|
805
|
-
*/
|
|
806
|
-
type: 'vnode';
|
|
807
|
-
/**
|
|
808
|
-
* Send vnode to the client, they must be static and serializable
|
|
809
|
-
*/
|
|
810
|
-
vnode: VNode;
|
|
811
|
-
}
|
|
812
|
-
interface ModuleSFCView {
|
|
813
|
-
/**
|
|
814
|
-
* SFC view
|
|
815
|
-
*/
|
|
816
|
-
type: 'sfc';
|
|
817
|
-
/**
|
|
818
|
-
* SFC component
|
|
819
|
-
*/
|
|
820
|
-
sfc: string;
|
|
821
|
-
}
|
|
822
|
-
interface CustomTab {
|
|
823
|
-
/**
|
|
824
|
-
* The name of the tab, must be unique
|
|
825
|
-
*/
|
|
826
|
-
name: string;
|
|
827
|
-
/**
|
|
828
|
-
* Icon of the tab, support any Iconify icons, or a url to an image
|
|
829
|
-
*/
|
|
830
|
-
icon?: string;
|
|
831
|
-
/**
|
|
832
|
-
* Title of the tab
|
|
833
|
-
*/
|
|
834
|
-
title: string;
|
|
835
|
-
/**
|
|
836
|
-
* Main view of the tab
|
|
837
|
-
*/
|
|
838
|
-
view: ModuleView;
|
|
839
|
-
/**
|
|
840
|
-
* Category of the tab
|
|
841
|
-
* @default 'app'
|
|
842
|
-
*/
|
|
843
|
-
category?: TabCategory;
|
|
844
|
-
}
|
|
845
|
-
//#endregion
|
|
846
|
-
//#region src/types/timeline.d.ts
|
|
847
|
-
interface TimelineEvent<TData = any, TMeta = any> {
|
|
848
|
-
time: number;
|
|
849
|
-
data: TData;
|
|
850
|
-
logType?: 'default' | 'warning' | 'error';
|
|
851
|
-
meta?: TMeta;
|
|
852
|
-
groupId?: number | string;
|
|
853
|
-
title?: string;
|
|
854
|
-
subtitle?: string;
|
|
855
|
-
}
|
|
856
|
-
interface ScreenshotOverlayEvent {
|
|
857
|
-
layerId: string;
|
|
858
|
-
renderMeta: any;
|
|
859
|
-
}
|
|
860
|
-
interface ScreenshotOverlayRenderContext<TData = any, TMeta = any> {
|
|
861
|
-
screenshot: ScreenshotData;
|
|
862
|
-
events: (TimelineEvent<TData, TMeta> & ScreenshotOverlayEvent)[];
|
|
863
|
-
index: number;
|
|
864
|
-
}
|
|
865
|
-
type ScreenshotOverlayRenderResult = HTMLElement | string | false;
|
|
866
|
-
interface ScreenshotData {
|
|
867
|
-
time: number;
|
|
868
|
-
}
|
|
869
|
-
interface TimelineLayerOptions<TData = any, TMeta = any> {
|
|
870
|
-
id: string;
|
|
871
|
-
label: string;
|
|
872
|
-
color: number;
|
|
873
|
-
skipScreenshots?: boolean;
|
|
874
|
-
groupsOnly?: boolean;
|
|
875
|
-
ignoreNoDurationGroups?: boolean;
|
|
876
|
-
screenshotOverlayRender?: (event: TimelineEvent<TData, TMeta> & ScreenshotOverlayEvent, ctx: ScreenshotOverlayRenderContext) => ScreenshotOverlayRenderResult | Promise<ScreenshotOverlayRenderResult>;
|
|
877
|
-
}
|
|
878
|
-
interface TimelineEventOptions {
|
|
879
|
-
layerId: string;
|
|
880
|
-
event: TimelineEvent;
|
|
881
|
-
all?: boolean;
|
|
882
|
-
}
|
|
883
|
-
//#endregion
|
|
884
|
-
//#region src/core/index.d.ts
|
|
885
|
-
declare function initDevTools(): void;
|
|
886
|
-
declare function onDevToolsClientConnected(fn: () => void): Promise<void>;
|
|
887
|
-
//#endregion
|
|
888
|
-
//#region src/core/high-perf-mode/index.d.ts
|
|
889
|
-
declare function toggleHighPerfMode(state?: boolean): void;
|
|
890
|
-
//#endregion
|
|
891
|
-
//#region src/core/plugin/components.d.ts
|
|
892
|
-
declare function createComponentsDevToolsPlugin(app: App): [PluginDescriptor, PluginSetupFunction];
|
|
893
|
-
//#endregion
|
|
894
|
-
//#region src/core/plugin/index.d.ts
|
|
895
|
-
declare function setupDevToolsPlugin(pluginDescriptor: PluginDescriptor, setupFn: PluginSetupFunction): void;
|
|
896
|
-
declare function callDevToolsPluginSetupFn(plugin: [PluginDescriptor, PluginSetupFunction], app: App): void;
|
|
897
|
-
declare function removeRegisteredPluginApp(app: App): void;
|
|
898
|
-
declare function registerDevToolsPlugin(app: App, options?: {
|
|
899
|
-
inspectingComponent?: boolean;
|
|
900
|
-
}): void;
|
|
901
|
-
//#endregion
|
|
902
|
-
//#region src/core/component/types/bounding-rect.d.ts
|
|
903
|
-
interface ComponentBoundingRect {
|
|
904
|
-
left: number;
|
|
905
|
-
top: number;
|
|
906
|
-
right: number;
|
|
907
|
-
bottom: number;
|
|
908
|
-
width: number;
|
|
909
|
-
height: number;
|
|
910
|
-
}
|
|
911
|
-
interface ComponentBoundingRectApiPayload {
|
|
912
|
-
app?: VueAppInstance;
|
|
913
|
-
inspectorId?: string;
|
|
914
|
-
instanceId?: string;
|
|
915
|
-
rect?: ComponentBoundingRect;
|
|
916
|
-
}
|
|
917
|
-
//#endregion
|
|
918
|
-
//#region src/core/component/types/custom.d.ts
|
|
919
|
-
type customTypeEnums = 'function' | 'bigint' | 'map' | 'set' | 'store' | 'component' | 'component-definition' | 'HTMLElement' | 'component-definition' | 'date';
|
|
920
|
-
//#endregion
|
|
921
|
-
//#region src/core/component/state/editor.d.ts
|
|
922
|
-
type Recordable = Record<PropertyKey, any>;
|
|
923
|
-
//#endregion
|
|
924
|
-
//#region src/core/component/types/editor.d.ts
|
|
925
|
-
type PropPath = string | string[];
|
|
926
|
-
interface InspectorStateEditorPayload {
|
|
927
|
-
app?: AppRecord['app'];
|
|
928
|
-
inspectorId: string;
|
|
929
|
-
nodeId: string;
|
|
930
|
-
type: string;
|
|
931
|
-
path: PropPath;
|
|
932
|
-
state: {
|
|
933
|
-
value: unknown;
|
|
934
|
-
newKey: string;
|
|
935
|
-
remove?: boolean;
|
|
936
|
-
type: string;
|
|
937
|
-
};
|
|
938
|
-
set?: (obj: Recordable, path: PropPath, value: unknown, cb?: (object: Recordable, field: string, value: unknown) => void) => unknown;
|
|
939
|
-
}
|
|
940
|
-
//#endregion
|
|
941
|
-
//#region src/core/component/types/state.d.ts
|
|
942
|
-
interface InspectorCustomState {
|
|
943
|
-
_custom?: {
|
|
944
|
-
type?: string;
|
|
945
|
-
displayText?: string;
|
|
946
|
-
tooltipText?: string;
|
|
947
|
-
value?: string | InspectorCustomState;
|
|
948
|
-
stateTypeName?: string;
|
|
949
|
-
fields?: {
|
|
950
|
-
abstract?: boolean;
|
|
80
|
+
enabled: boolean;
|
|
81
|
+
apps: AppRef[];
|
|
82
|
+
events: Map<string, Set<Function>>;
|
|
83
|
+
cleanupBuffer(component: InstanceRef): boolean;
|
|
84
|
+
on<T extends Function>(event: string, handler: T): () => void;
|
|
85
|
+
once<T extends Function>(event: string, handler: T): void;
|
|
86
|
+
off<T extends Function>(event: string, handler: T): void;
|
|
87
|
+
emit(event: string, ...payload: unknown[]): void;
|
|
88
|
+
}
|
|
89
|
+
export interface DevtoolsHookableBridge {
|
|
90
|
+
hook<T extends Function>(event: string, handler: T): () => void;
|
|
91
|
+
callHook(event: string, ...payload: unknown[]): Promise<void>;
|
|
92
|
+
}
|
|
93
|
+
export interface DevtoolsHookTarget {
|
|
94
|
+
__VUE_DEVTOOLS_GLOBAL_HOOK__?: DevtoolsGlobalHook;
|
|
95
|
+
__VUE_DEVTOOLS_HOOK?: DevtoolsHookableBridge;
|
|
96
|
+
__VUE_DEVTOOLS_HOOK__?: DevtoolsHookableBridge;
|
|
97
|
+
__VUE_DEVTOOLS_HOOK_REPLAY__?: Array<(hook: DevtoolsGlobalHook) => void>;
|
|
98
|
+
}
|
|
99
|
+
export type HookApp = AppRef & {
|
|
100
|
+
_instance?: InstanceRef;
|
|
101
|
+
_container?: {
|
|
102
|
+
_vnode?: {
|
|
103
|
+
component?: InstanceRef;
|
|
951
104
|
};
|
|
952
105
|
};
|
|
953
|
-
}
|
|
954
|
-
interface InspectorState {
|
|
955
|
-
key: string;
|
|
956
|
-
value: string | number | boolean | null | Record<string, unknown> | InspectorCustomState | Array<unknown>;
|
|
957
|
-
type: string;
|
|
958
|
-
path?: string[];
|
|
959
|
-
stateType?: string;
|
|
960
|
-
stateTypeName?: string;
|
|
961
|
-
meta?: Record<string, boolean | string>;
|
|
962
|
-
raw?: string;
|
|
963
|
-
editable?: boolean;
|
|
964
|
-
children?: {
|
|
965
|
-
key: string;
|
|
966
|
-
value: string | number;
|
|
967
|
-
type: string;
|
|
968
|
-
}[];
|
|
969
|
-
}
|
|
970
|
-
interface InspectorStateApiPayload {
|
|
971
|
-
app: VueAppInstance;
|
|
972
|
-
inspectorId: string;
|
|
973
|
-
nodeId: string;
|
|
974
|
-
state: {
|
|
975
|
-
id: string;
|
|
976
|
-
name: string;
|
|
977
|
-
file: string | undefined;
|
|
978
|
-
state: InspectorState[];
|
|
979
|
-
instance: VueAppInstance | undefined;
|
|
980
|
-
};
|
|
981
|
-
}
|
|
982
|
-
interface AddInspectorApiPayload {
|
|
983
|
-
id: string;
|
|
984
|
-
label: string;
|
|
985
|
-
icon?: string;
|
|
986
|
-
treeFilterPlaceholder?: string;
|
|
987
|
-
actions?: {
|
|
988
|
-
icon: string;
|
|
989
|
-
tooltip: string;
|
|
990
|
-
action: (payload: unknown) => void;
|
|
991
|
-
}[];
|
|
992
|
-
}
|
|
993
|
-
//#endregion
|
|
994
|
-
//#region src/core/component/types/tree.d.ts
|
|
995
|
-
interface InspectorTreeApiPayload {
|
|
996
|
-
app?: VueAppInstance;
|
|
997
|
-
inspectorId?: string;
|
|
998
|
-
filter?: string;
|
|
999
|
-
instanceId?: string;
|
|
1000
|
-
rootNodes?: ComponentTreeNode[];
|
|
1001
|
-
}
|
|
1002
|
-
interface InspectorTree {
|
|
1003
|
-
id: string;
|
|
1004
|
-
label: string;
|
|
1005
|
-
tags?: InspectorNodeTag[];
|
|
1006
|
-
children?: InspectorTree[];
|
|
1007
|
-
}
|
|
1008
|
-
//#endregion
|
|
1009
|
-
//#region src/core/component-highlighter/types.d.ts
|
|
1010
|
-
interface ComponentHighLighterOptions {
|
|
1011
|
-
bounds: ComponentBoundingRect;
|
|
1012
|
-
name?: string;
|
|
1013
|
-
id?: string;
|
|
1014
|
-
visible?: boolean;
|
|
1015
|
-
}
|
|
1016
|
-
interface ScrollToComponentOptions {
|
|
1017
|
-
id?: string;
|
|
1018
|
-
}
|
|
1019
|
-
//#endregion
|
|
1020
|
-
//#region src/core/component-highlighter/index.d.ts
|
|
1021
|
-
declare function toggleComponentHighLighter(options: ComponentHighLighterOptions): void;
|
|
1022
|
-
declare function highlight(instance: VueAppInstance): void;
|
|
1023
|
-
declare function unhighlight(): void;
|
|
1024
|
-
declare function cancelInspectComponentHighLighter(): void;
|
|
1025
|
-
declare function inspectComponentHighLighter(): Promise<string>;
|
|
1026
|
-
declare function scrollToComponent(options: ScrollToComponentOptions): void;
|
|
1027
|
-
//#endregion
|
|
1028
|
-
//#region src/core/component/state/constants.d.ts
|
|
1029
|
-
declare const UNDEFINED = "__vue_devtool_undefined__";
|
|
1030
|
-
declare const INFINITY = "__vue_devtool_infinity__";
|
|
1031
|
-
declare const NEGATIVE_INFINITY = "__vue_devtool_negative_infinity__";
|
|
1032
|
-
declare const NAN = "__vue_devtool_nan__";
|
|
1033
|
-
//#endregion
|
|
1034
|
-
//#region src/core/component/state/format.d.ts
|
|
1035
|
-
declare function getInspectorStateValueType(value: any, raw?: boolean): string;
|
|
1036
|
-
declare function formatInspectorStateValue(value: any, quotes?: boolean, options?: {
|
|
1037
|
-
customClass?: Partial<Record<'string', string>>;
|
|
1038
|
-
}): any;
|
|
1039
|
-
declare function getRaw(value: InspectorState['value']): {
|
|
1040
|
-
value: object | string | number | boolean | null;
|
|
1041
|
-
inherit: Record<string, any> | {
|
|
1042
|
-
abstract: true;
|
|
1043
|
-
};
|
|
1044
|
-
customType?: customTypeEnums;
|
|
1045
106
|
};
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
//#
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
interface
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
}
|
|
1095
|
-
declare function setViteClientContext(context: ViteClientContext): void;
|
|
1096
|
-
declare function setViteServerContext(context: ViteDevServer): void;
|
|
1097
|
-
//#endregion
|
|
1098
|
-
//#region src/messaging/index.d.ts
|
|
1099
|
-
type Presets = 'iframe' | 'electron' | 'vite' | 'broadcast' | 'extension';
|
|
1100
|
-
interface CreateRpcClientOptions<RemoteFunctions> {
|
|
1101
|
-
options?: BirpcOptions<RemoteFunctions>;
|
|
1102
|
-
preset?: Presets;
|
|
1103
|
-
channel?: ChannelOptions;
|
|
107
|
+
export type HookComponentPayload = [app: HookApp, uid: number, parentUid: number, component: InstanceRef];
|
|
108
|
+
export type HookAppInitPayload = [app: HookApp, version: string, types: VueTypeMap];
|
|
109
|
+
export type HookAppUnmountPayload = [app: HookApp];
|
|
110
|
+
//#endregion
|
|
111
|
+
//#region src/hook/install.d.ts
|
|
112
|
+
export interface InstallDevtoolsHookOptions {
|
|
113
|
+
runtime: DevtoolsRuntime;
|
|
114
|
+
target?: DevtoolsHookTarget;
|
|
115
|
+
replay?: boolean;
|
|
116
|
+
}
|
|
117
|
+
export interface InstalledDevtoolsHook {
|
|
118
|
+
hook: DevtoolsGlobalHook;
|
|
119
|
+
dispose(): void;
|
|
120
|
+
}
|
|
121
|
+
export declare function createDevtoolsGlobalHook(): DevtoolsGlobalHook;
|
|
122
|
+
export declare function installDevtoolsHook(options: InstallDevtoolsHookOptions): InstalledDevtoolsHook;
|
|
123
|
+
//#endregion
|
|
124
|
+
//#region src/hook/normalize.d.ts
|
|
125
|
+
export declare function normalizeHookEvent(registry: RuntimeRegistry, event: DevtoolsHookEvent | string, payload: unknown[], time?: number): RuntimeEvent | undefined;
|
|
126
|
+
//#endregion
|
|
127
|
+
//#region src/rpc/channels/extension-page.d.ts
|
|
128
|
+
export interface StartExtensionPageRpcHostOptions {
|
|
129
|
+
window?: Window;
|
|
130
|
+
channelId?: string;
|
|
131
|
+
allowedOrigins?: string[] | ((origin: string, event: MessageEvent) => boolean);
|
|
132
|
+
}
|
|
133
|
+
export declare function startExtensionPageRpcHost(server: DevtoolsRpcServer, options?: StartExtensionPageRpcHostOptions): () => void;
|
|
134
|
+
//#endregion
|
|
135
|
+
//#region src/rpc/event-buffer.d.ts
|
|
136
|
+
export interface RuntimeEventBuffer {
|
|
137
|
+
enqueue(event: RuntimeDomainEvent): void;
|
|
138
|
+
flush(): Promise<void>;
|
|
139
|
+
clear(): void;
|
|
140
|
+
}
|
|
141
|
+
export interface CreateRuntimeEventBufferOptions {
|
|
142
|
+
budget: RuntimeBudget;
|
|
143
|
+
emit(event: DevtoolsRpcEvent): Promise<void>;
|
|
144
|
+
performance: RuntimePerformanceMonitor;
|
|
145
|
+
setBackpressurePaused(paused: boolean): void;
|
|
146
|
+
now?: () => number;
|
|
147
|
+
}
|
|
148
|
+
export declare function createRuntimeEventBuffer(options: CreateRuntimeEventBufferOptions): RuntimeEventBuffer;
|
|
149
|
+
export declare function measureRuntimeMessageBytes(value: unknown): number;
|
|
150
|
+
//#endregion
|
|
151
|
+
//#region src/kit.d.ts
|
|
152
|
+
export interface DevtoolsKitTarget {
|
|
153
|
+
name: string;
|
|
154
|
+
version?: string;
|
|
1104
155
|
}
|
|
1105
|
-
interface
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
156
|
+
export interface DevtoolsKitOptions {
|
|
157
|
+
target: DevtoolsKitTarget;
|
|
158
|
+
enabled?: boolean;
|
|
159
|
+
clientName?: string;
|
|
160
|
+
hook?: {
|
|
161
|
+
install?: boolean;
|
|
162
|
+
replay?: boolean;
|
|
163
|
+
target?: DevtoolsHookTarget;
|
|
164
|
+
};
|
|
165
|
+
budget?: RuntimeBudgetInput;
|
|
166
|
+
capabilities?: Partial<DevtoolsCapabilitiesMessage>;
|
|
167
|
+
componentInspectorDockController?: ComponentInspectorDockController;
|
|
168
|
+
}
|
|
169
|
+
export interface DevtoolsKit {
|
|
170
|
+
clientName: string;
|
|
171
|
+
target: DevtoolsKitTarget;
|
|
172
|
+
enabled: boolean;
|
|
173
|
+
runtime: DevtoolsRuntime;
|
|
174
|
+
rpc: DevtoolsRpcServer;
|
|
175
|
+
plugins: PluginController;
|
|
176
|
+
install(): void;
|
|
177
|
+
dispose(): void | Promise<void>;
|
|
1109
178
|
}
|
|
1110
|
-
declare function
|
|
1111
|
-
declare function getRpcClient<R, L extends object = Record<string, never>>(): BirpcReturn<R, L>;
|
|
1112
|
-
declare function getRpcServer<R, L extends object = Record<string, never>>(): BirpcGroup<R, L>;
|
|
1113
|
-
declare function setViteRpcClientToGlobal<R, L>(rpc: BirpcReturn<R, L>): void;
|
|
1114
|
-
declare function setViteRpcServerToGlobal<R, L>(rpc: BirpcGroup<R, L>): void;
|
|
1115
|
-
declare function getViteRpcClient<R, L extends object = Record<string, never>>(): BirpcReturn<R, L>;
|
|
1116
|
-
declare function getViteRpcServer<R, L extends object = Record<string, never>>(): BirpcGroup<R, L>;
|
|
1117
|
-
declare function createRpcClient<RemoteFunctions = Record<string, never>, LocalFunctions extends object = Record<string, never>>(functions: LocalFunctions, options?: CreateRpcClientOptions<RemoteFunctions>): BirpcReturn<RemoteFunctions, LocalFunctions> | undefined;
|
|
1118
|
-
declare function createRpcServer<RemoteFunctions = Record<string, never>, LocalFunctions extends object = Record<string, never>>(functions: LocalFunctions, options?: CreateRpcServerOptions<RemoteFunctions>): void;
|
|
1119
|
-
declare function createRpcProxy<RemoteFunctions = Record<string, never>, LocalFunctions extends object = Record<string, never>>(options?: CreateRpcClientOptions<RemoteFunctions>): BirpcReturn<RemoteFunctions, LocalFunctions>;
|
|
1120
|
-
//#endregion
|
|
1121
|
-
//#region src/shared/util.d.ts
|
|
1122
|
-
declare function stringify<T extends object = Record<string, unknown>>(data: T): string | string[];
|
|
1123
|
-
declare function parse(data: string, revive?: boolean): any;
|
|
1124
|
-
//#endregion
|
|
1125
|
-
//#region src/index.d.ts
|
|
1126
|
-
declare const devtools: {
|
|
1127
|
-
hook: VueHooks;
|
|
1128
|
-
init: () => void;
|
|
1129
|
-
readonly ctx: DevtoolsContext;
|
|
1130
|
-
readonly api: {
|
|
1131
|
-
getInspectorTree(payload: Pick<DevToolsV6PluginAPIHookPayloads[DevToolsV6PluginAPIHookKeys.GET_INSPECTOR_TREE], "inspectorId" | "filter">): Promise<never[]>;
|
|
1132
|
-
getInspectorState(payload: Pick<DevToolsV6PluginAPIHookPayloads[DevToolsV6PluginAPIHookKeys.GET_INSPECTOR_STATE], "inspectorId" | "nodeId">): Promise<CustomInspectorState>;
|
|
1133
|
-
editInspectorState(payload: DevToolsV6PluginAPIHookPayloads[DevToolsV6PluginAPIHookKeys.EDIT_INSPECTOR_STATE]): void;
|
|
1134
|
-
sendInspectorState(inspectorId: string): void;
|
|
1135
|
-
inspectComponentInspector(): Promise<string>;
|
|
1136
|
-
cancelInspectComponentInspector(): void;
|
|
1137
|
-
getComponentRenderCode(id: string): any;
|
|
1138
|
-
scrollToComponent(id: string): void;
|
|
1139
|
-
openInEditor: typeof openInEditor;
|
|
1140
|
-
getVueInspector: typeof getComponentInspector;
|
|
1141
|
-
toggleApp(id: string, options?: {
|
|
1142
|
-
inspectingComponent?: boolean;
|
|
1143
|
-
}): void;
|
|
1144
|
-
inspectDOM(instanceId: string): void;
|
|
1145
|
-
updatePluginSettings(pluginId: string, key: string, value: string): void;
|
|
1146
|
-
getPluginSettings(pluginId: string): {
|
|
1147
|
-
options: Record<string, {
|
|
1148
|
-
label: string;
|
|
1149
|
-
description?: string;
|
|
1150
|
-
} & ({
|
|
1151
|
-
type: "boolean";
|
|
1152
|
-
defaultValue: boolean;
|
|
1153
|
-
} | {
|
|
1154
|
-
type: "choice";
|
|
1155
|
-
defaultValue: string | number;
|
|
1156
|
-
options: {
|
|
1157
|
-
value: string | number;
|
|
1158
|
-
label: string;
|
|
1159
|
-
}[];
|
|
1160
|
-
component?: "select" | "button-group";
|
|
1161
|
-
} | {
|
|
1162
|
-
type: "text";
|
|
1163
|
-
defaultValue: string;
|
|
1164
|
-
})> | null;
|
|
1165
|
-
values: any;
|
|
1166
|
-
};
|
|
1167
|
-
};
|
|
1168
|
-
};
|
|
179
|
+
export declare function createDevtoolsKit(options: DevtoolsKitOptions): DevtoolsKit;
|
|
1169
180
|
//#endregion
|
|
1170
|
-
export {
|
|
181
|
+
export { AppId, AppRecord, AppRef, AppSnapshot, AppsSnapshotMessage, ChromeExtensionApi, ChromeExtensionEvent, ChromeRuntimePort, ComponentDomOrderCache, ComponentId, ComponentInspectionResultMessage, type ComponentInspectorDockController, type ComponentInspectorDockRestore, ComponentRecord, ComponentSnapshot, ComponentStateCollector, ComponentStateSection, ComponentStateSnapshotMessage, ComponentTreeNodeSnapshot, ComponentTreeNodeTag, ComponentTreePageMessage, ComponentTreePatch, ComponentTreePatchBatch, ComponentTreeSnapshot, ComponentTreeSnapshotMessage, ComponentTreeStore, ConnectDevtoolsClientOptions, ConnectDevtoolsExtensionClientOptions, ConnectDevtoolsIframeClientOptions, CreateDevtoolsRpcClientOptions, CreateDevtoolsRuntimeOptions, CustomInspectorOptions, CustomInspectorTreeNode, DEFAULT_DEVTOOLS_RPC_CHANNEL_ID, DEVTOOLS_EXTENSION_FRAME_CONTROL_SOURCE, DEVTOOLS_EXTENSION_PORT_SOURCE, DEVTOOLS_EXTENSION_PORT_VERSION, DEVTOOLS_IFRAME_RPC_CONNECT, DEVTOOLS_IFRAME_RPC_SOURCE, DEVTOOLS_RPC_COMMAND, DEVTOOLS_RPC_EVENT, DEVTOOLS_RPC_QUERY, DevToolsPluginAPI, DevToolsPluginAPIHooks, DevtoolsCapabilitiesMessage, DevtoolsClientHost, DevtoolsExtensionFrameActivatedMessage, DevtoolsExtensionFrameActivationReason, DevtoolsExtensionFrameControlMessage, DevtoolsExtensionFrameController, DevtoolsExtensionFrameDescriptor, DevtoolsExtensionFrameSelectMessage, DevtoolsExtensionFramesChangedMessage, DevtoolsExtensionPortDescriptor, DevtoolsExtensionPortRole, DevtoolsExtensionRpcClient, DevtoolsInPageProtocol, DevtoolsRpcChannel, DevtoolsRpcChannelHandle, DevtoolsRpcChannelKind, DevtoolsRpcClient, DevtoolsRpcClientFunctions, DevtoolsRpcEvent, DevtoolsRpcEventHandler, DevtoolsRpcServer, DevtoolsRpcServerFunctions, DevtoolsRuntime, EncodedValue, ExpandedValueMessage, InspectComponentPayload, InspectTimelineEventPayload, InspectorId, InspectorTreeSnapshotMessage, InspectorsListMessage, InstanceRef, LegacyComponentStateEntry, MaybePromise, MutableEditStatePayload, MutableInspectorStatePayload, MutableInspectorTreePayload, PLUGIN_API_CAPABILITIES, PluginApiAdapter, PluginDescriptor, PluginId, PluginSettingOption, PluginSettingsItem, PluginSetupFunction, PluginSnapshot, PluginsSnapshotMessage, ReactivityGraphNode, ReactivityGraphNodeType, ReactivityGraphSnapshot, ReactivityRelationship, RefreshComponentTreeOptions, RouterRouteRecordSnapshot, RouterRouteSnapshot, RouterSnapshotMessage, RuntimeBudget, RuntimeBudgetInput, RuntimeCommand, RuntimeCommandHandler, RuntimeCommandMap, RuntimeCommandRequest, RuntimeCommandResult, RuntimeDomainEvent, RuntimeDomainEventType, RuntimeEvent, RuntimeEventBase, RuntimeEventHandler, RuntimeEventLog, RuntimeEventType, RuntimeInspectorAction, RuntimeInspectorInfo, RuntimeInspectorRecord, RuntimeInspectorStore, RuntimePerformanceMonitor, RuntimePerformanceSnapshot, RuntimeQuery, RuntimeQueryHandler, RuntimeQueryMap, RuntimeQueryRequest, RuntimeRegistry, RuntimeRequests, RuntimeScheduler, SetPluginSettingsPayload, StartIframeDevtoolsRpcHostOptions, StateEntry, TimelineEventOptions, TimelineLayerOptions, ValueCodecOptions, ValueEntry, ValueHandle, ValueHandleEntry, ValueHandleRegistry, ValueHandleRegistryOptions, VisitComponentTreePayload, VueTypeMap, WalkedComponentChild, connectDevtoolsClient, connectDevtoolsExtensionClient, connectDevtoolsIframeClient, createChromeRuntimePortDevtoolsRpcChannel, createDevtoolsExtensionPortName, createDevtoolsRpcClient, createDevtoolsRpcServer, createDevtoolsRuntime, createExtensionDevtoolsClientHost, createIframeDevtoolsClientHost, createMessagePortDevtoolsRpcChannel, createPluginApiAdapter, createRuntimeEventLog, createRuntimePerformanceMonitor, createRuntimeScheduler, defaultRuntimeBudget, encodeValue, formatPreviewKey, getDefaultDevtoolsClientHosts, isDevtoolsExtensionFrameControlMessage, isExtensionDevtoolsClientHostAvailable, isIframeDevtoolsClientHostAvailable, parseDevtoolsExtensionPortName, reportPluginError, resolveRuntimeBudget, startIframeDevtoolsRpcHost, toDevtoolsRpcEvent };
|