@vue/devtools-kit 8.2.1 → 9.0.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1431 @@
1
+ import { CreatePageScriptChannelOptions, PageScriptChannel } from "devframe/in-page-channel";
2
+ //#region src/runtime/budget.d.ts
3
+ interface RuntimeBudget {
4
+ components: {
5
+ autoTrack: boolean;
6
+ maxInitialDepth: number;
7
+ maxExpandedDepth: number;
8
+ updateDebounceMs: number;
9
+ };
10
+ state: {
11
+ maxDepth: number;
12
+ maxEntries: number;
13
+ maxStringLength: number;
14
+ maxHandles: number;
15
+ lazyChildren: boolean;
16
+ };
17
+ timeline: {
18
+ enabled: boolean;
19
+ maxEventsPerSecond: number;
20
+ maxBufferedEvents: number;
21
+ };
22
+ transport: {
23
+ maxMessageBytes: number;
24
+ backpressure: 'drop-oldest' | 'drop-newest' | 'pause-collection';
25
+ };
26
+ }
27
+ declare const defaultRuntimeBudget: RuntimeBudget;
28
+ type RuntimeBudgetInput = Partial<{ [K in keyof RuntimeBudget]: Partial<RuntimeBudget[K]>; }>;
29
+ declare function resolveRuntimeBudget(input?: RuntimeBudgetInput): RuntimeBudget;
30
+ //#endregion
31
+ //#region src/codec/handles.d.ts
32
+ type ValueHandle = string;
33
+ interface ValueHandleEntry {
34
+ handle: ValueHandle;
35
+ value: object;
36
+ }
37
+ interface ValueHandleRegistryOptions {
38
+ maxHandles?: number;
39
+ }
40
+ declare class ValueHandleRegistry {
41
+ private seed;
42
+ private objectToHandle;
43
+ private handleToObject;
44
+ private handleToScope;
45
+ private scopeToHandles;
46
+ private maxHandles;
47
+ constructor(options?: ValueHandleRegistryOptions);
48
+ get size(): number;
49
+ setMaxHandles(maxHandles: number): void;
50
+ getOrCreate(value: object, scope?: string): ValueHandle;
51
+ get(handle: ValueHandle): object | undefined;
52
+ getScope(handle: ValueHandle): string | undefined;
53
+ delete(handle: ValueHandle): void;
54
+ releaseScope(scope: string): number;
55
+ clear(): void;
56
+ private evictOverflow;
57
+ }
58
+ //#endregion
59
+ //#region src/codec/encode.d.ts
60
+ interface ValueEntry {
61
+ key: string;
62
+ value: EncodedValue;
63
+ }
64
+ type EncodedValue = {
65
+ kind: 'null' | 'undefined';
66
+ } | {
67
+ kind: 'boolean';
68
+ value: boolean;
69
+ } | {
70
+ kind: 'number';
71
+ value: number | 'NaN' | 'Infinity' | '-Infinity';
72
+ } | {
73
+ kind: 'string';
74
+ value: string;
75
+ truncated?: boolean;
76
+ length?: number;
77
+ } | {
78
+ kind: 'bigint';
79
+ value: string;
80
+ } | {
81
+ kind: 'symbol';
82
+ description: string;
83
+ } | {
84
+ kind: 'function';
85
+ name?: string;
86
+ sourcePreview?: string;
87
+ } | {
88
+ kind: 'array';
89
+ length: number;
90
+ preview: ValueEntry[];
91
+ handle?: ValueHandle;
92
+ } | {
93
+ kind: 'object';
94
+ name: string;
95
+ entries: number;
96
+ preview: ValueEntry[];
97
+ handle?: ValueHandle;
98
+ } | {
99
+ kind: 'map' | 'set';
100
+ size: number;
101
+ preview: ValueEntry[];
102
+ handle?: ValueHandle;
103
+ } | {
104
+ kind: 'component';
105
+ id?: ComponentId;
106
+ name: string;
107
+ } | {
108
+ kind: 'dom';
109
+ tag: string;
110
+ id?: string;
111
+ className?: string;
112
+ } | {
113
+ kind: 'custom';
114
+ type?: string;
115
+ display?: string;
116
+ tooltip?: string;
117
+ value: EncodedValue;
118
+ handle?: ValueHandle;
119
+ file?: string;
120
+ abstract?: boolean;
121
+ readOnly?: boolean;
122
+ actions?: {
123
+ icon?: string;
124
+ tooltip?: string;
125
+ }[];
126
+ fields?: Record<string, unknown>;
127
+ } | {
128
+ kind: 'date';
129
+ value: string;
130
+ } | {
131
+ kind: 'regexp';
132
+ value: string;
133
+ } | {
134
+ kind: 'error';
135
+ name: string;
136
+ message: string;
137
+ stack?: string;
138
+ } | {
139
+ kind: 'circular';
140
+ handle: ValueHandle;
141
+ };
142
+ interface ValueCodecOptions {
143
+ maxDepth?: number;
144
+ maxEntries?: number;
145
+ maxStringLength?: number;
146
+ handles?: ValueHandleRegistry;
147
+ /** Handle scope used for lifecycle release (e.g. `component:<id>`). */
148
+ handleScope?: string;
149
+ }
150
+ declare function encodeValue(value: unknown, options?: ValueCodecOptions): EncodedValue;
151
+ declare function formatPreviewKey(value: unknown): string;
152
+ //#endregion
153
+ //#region src/plugin/api.d.ts
154
+ interface PluginDescriptor {
155
+ id: PluginId;
156
+ label?: string;
157
+ logo?: string;
158
+ app?: object;
159
+ packageName?: string;
160
+ homepage?: string;
161
+ componentStateTypes?: string[];
162
+ disableAppScope?: boolean;
163
+ disablePluginScope?: boolean;
164
+ /**
165
+ * Run plugin setup before a DevTools UI client connects so early timeline
166
+ * events and inspector registrations can be buffered.
167
+ */
168
+ enableEarlyProxy?: boolean;
169
+ settings?: Record<string, PluginSettingsItem>;
170
+ }
171
+ interface PluginSettingOption {
172
+ value: string | number;
173
+ label: string;
174
+ }
175
+ interface PluginSettingsItem {
176
+ label?: string;
177
+ description?: string;
178
+ type?: 'boolean' | 'choice' | 'text' | 'number';
179
+ defaultValue?: unknown;
180
+ options?: PluginSettingOption[];
181
+ component?: 'select' | 'button-group';
182
+ [key: string]: unknown;
183
+ }
184
+ type PluginSetupFunction = (api: DevToolsPluginAPI) => void | Promise<void>;
185
+ interface CustomInspectorOptions {
186
+ id: InspectorId;
187
+ label: string;
188
+ icon?: string;
189
+ treeFilterPlaceholder?: string;
190
+ stateFilterPlaceholder?: string;
191
+ noSelectionText?: string;
192
+ actions?: {
193
+ icon: string;
194
+ tooltip?: string;
195
+ action: () => void | Promise<void>;
196
+ }[];
197
+ nodeActions?: {
198
+ icon: string;
199
+ tooltip?: string;
200
+ action: (nodeId: string) => void | Promise<void>;
201
+ }[];
202
+ }
203
+ interface TimelineLayerOptions {
204
+ id: string;
205
+ label: string;
206
+ color: number;
207
+ }
208
+ interface TimelineEventOptions {
209
+ layerId: string;
210
+ event: {
211
+ time: number;
212
+ title: string;
213
+ subtitle?: string;
214
+ data?: unknown;
215
+ logType?: 'default' | 'warning' | 'error';
216
+ meta?: Record<string, unknown>;
217
+ groupId?: number;
218
+ };
219
+ all?: boolean;
220
+ }
221
+ interface MutableInspectorTreePayload {
222
+ app?: object;
223
+ inspectorId: InspectorId;
224
+ filter?: string;
225
+ rootNodes: unknown[];
226
+ }
227
+ interface MutableInspectorStatePayload {
228
+ app?: object;
229
+ inspectorId: InspectorId;
230
+ nodeId: string;
231
+ state: unknown;
232
+ }
233
+ interface MutableEditStatePayload {
234
+ app?: object;
235
+ inspectorId: InspectorId;
236
+ nodeId: string;
237
+ componentInstance?: object;
238
+ path: string[];
239
+ type: string;
240
+ state: {
241
+ value?: unknown;
242
+ newKey?: string | null;
243
+ remove?: boolean;
244
+ type?: string;
245
+ };
246
+ set?: (object: object, path?: string | string[], value?: unknown, cb?: (object: Record<PropertyKey, unknown>, field: string, value: unknown) => void) => void;
247
+ }
248
+ interface VisitComponentTreePayload {
249
+ app?: object;
250
+ componentInstance: object;
251
+ treeNode: unknown;
252
+ filter: string;
253
+ }
254
+ interface InspectComponentPayload {
255
+ app?: object;
256
+ componentInstance: object;
257
+ instanceData: unknown;
258
+ }
259
+ interface InspectTimelineEventPayload {
260
+ app?: object;
261
+ appId?: string;
262
+ pluginId?: PluginId;
263
+ layerId: string;
264
+ event: unknown;
265
+ all?: boolean;
266
+ data: unknown;
267
+ }
268
+ interface SetPluginSettingsPayload {
269
+ app?: object;
270
+ pluginId: PluginId;
271
+ key: string;
272
+ newValue: unknown;
273
+ oldValue: unknown;
274
+ /** @deprecated Use `newValue`. Retained for pre-v9 adapter consumers. */
275
+ value?: unknown;
276
+ settings: Record<string, unknown>;
277
+ }
278
+ interface DevToolsPluginAPIHooks {
279
+ visitComponentTree: (payload: VisitComponentTreePayload) => MaybePromise<void>;
280
+ inspectComponent: (payload: InspectComponentPayload) => MaybePromise<void>;
281
+ editComponentState: (payload: MutableEditStatePayload) => MaybePromise<void>;
282
+ getInspectorTree: (payload: MutableInspectorTreePayload) => MaybePromise<void>;
283
+ getInspectorState: (payload: MutableInspectorStatePayload) => MaybePromise<void>;
284
+ editInspectorState: (payload: MutableEditStatePayload) => MaybePromise<void>;
285
+ inspectTimelineEvent: (payload: InspectTimelineEventPayload) => MaybePromise<void>;
286
+ timelineCleared: (payload: Record<string, never>) => MaybePromise<void>;
287
+ setPluginSettings: (payload: SetPluginSettingsPayload) => MaybePromise<void>;
288
+ }
289
+ /**
290
+ * Versioned capabilities of the current plugin adapter. Bump a capability's
291
+ * version when its payload contract changes; add a new key when the adapter
292
+ * learns a new API surface. Plugins can read this via `api.capabilities` to
293
+ * feature-detect instead of probing individual methods.
294
+ */
295
+ declare const PLUGIN_API_CAPABILITIES: Readonly<Record<string, number>>;
296
+ interface DevToolsPluginAPI {
297
+ readonly capabilities: Readonly<Record<string, number>>;
298
+ on: { [K in keyof DevToolsPluginAPIHooks]: (handler: DevToolsPluginAPIHooks[K]) => void; };
299
+ addInspector(options: CustomInspectorOptions): void;
300
+ sendInspectorTree(inspectorId: InspectorId): void;
301
+ sendInspectorState(inspectorId: InspectorId): void;
302
+ selectInspectorNode(inspectorId: InspectorId, nodeId: string): void;
303
+ notifyComponentUpdate(instance?: object): void;
304
+ visitComponentTree(payload: VisitComponentTreePayload): Promise<void>;
305
+ addTimelineLayer(options: TimelineLayerOptions): void;
306
+ addTimelineEvent(options: TimelineEventOptions): void;
307
+ getComponentInstances(app: object): Promise<object[]>;
308
+ getComponentBounds(instance: object): Promise<unknown>;
309
+ getComponentName(instance: object): Promise<string | undefined>;
310
+ getSettings(pluginId?: string): Record<string, unknown>;
311
+ highlightElement(instance: object): Promise<void>;
312
+ now(): number;
313
+ unhighlightElement(): Promise<void>;
314
+ }
315
+ interface PluginApiAdapter {
316
+ descriptor: PluginDescriptor;
317
+ api: DevToolsPluginAPI;
318
+ getSettings(pluginId?: string): Record<string, unknown>;
319
+ syncSettings(): void;
320
+ updateSetting(key: string, value: unknown): Promise<void>;
321
+ clearHooks(): void;
322
+ callHook<K extends keyof DevToolsPluginAPIHooks>(key: K, payload: Parameters<DevToolsPluginAPIHooks[K]>[0]): Promise<void>;
323
+ }
324
+ declare function createPluginApiAdapter(descriptor: PluginDescriptor, runtime: DevtoolsRuntime, resolvePluginSettings?: (pluginId: string) => Record<string, unknown> | undefined): PluginApiAdapter;
325
+ declare function reportPluginError(pluginId: PluginId, context: string, error: unknown): void;
326
+ //#endregion
327
+ //#region src/protocol/messages.d.ts
328
+ interface AppSnapshot {
329
+ id: AppId;
330
+ name: string;
331
+ version?: string;
332
+ componentCount: number;
333
+ }
334
+ interface ComponentTreeNodeTag {
335
+ label: string;
336
+ textColor?: number;
337
+ backgroundColor?: number;
338
+ tooltip?: string;
339
+ }
340
+ interface AppsSnapshotMessage {
341
+ apps: AppSnapshot[];
342
+ }
343
+ interface DevtoolsCapabilitiesMessage {
344
+ openInEditor: boolean;
345
+ pagedComponentTree?: boolean;
346
+ }
347
+ interface ComponentTreePageMessage {
348
+ nodes: ComponentTreeNodeSnapshot[];
349
+ cursor?: string;
350
+ }
351
+ interface ComponentTreeNodeSnapshot {
352
+ id: ComponentId;
353
+ appId: AppId;
354
+ parentId?: ComponentId;
355
+ name: string;
356
+ file?: string;
357
+ renderKey?: string | number;
358
+ inactive?: boolean;
359
+ isFragment?: boolean;
360
+ tags?: ComponentTreeNodeTag[];
361
+ domOrder?: number[];
362
+ consoleId?: number;
363
+ autoOpen?: boolean;
364
+ lastMountMs?: number;
365
+ lastUpdateMs?: number;
366
+ updatedAt: number;
367
+ childCount?: number;
368
+ }
369
+ interface ComponentTreeSnapshotMessage {
370
+ appId?: AppId;
371
+ version?: number;
372
+ nodes: ComponentTreeNodeSnapshot[];
373
+ }
374
+ interface ComponentStateSnapshotMessage {
375
+ componentId: ComponentId;
376
+ version: number;
377
+ sections: ComponentStateSection[];
378
+ reactivityGraph?: ReactivityGraphSnapshot;
379
+ }
380
+ interface ComponentInspectionResultMessage {
381
+ appId: AppId;
382
+ componentId: ComponentId;
383
+ nodes?: ComponentTreeNodeSnapshot[];
384
+ }
385
+ interface ComponentStateSection {
386
+ id: string;
387
+ label: string;
388
+ entries: StateEntry[];
389
+ partial?: boolean;
390
+ }
391
+ interface StateEntry {
392
+ key: string;
393
+ path: string[];
394
+ value: EncodedValue;
395
+ editable: boolean;
396
+ meta?: Record<string, unknown>;
397
+ }
398
+ type ReactivityGraphNodeType = 'ref' | 'computed' | 'reactive' | 'watch' | 'render' | 'effect' | 'unknown';
399
+ interface ReactivityGraphNode {
400
+ id: string;
401
+ type: ReactivityGraphNodeType;
402
+ label: string;
403
+ data: Record<string, unknown>;
404
+ }
405
+ interface ReactivityRelationship {
406
+ id: string;
407
+ from: string;
408
+ to: string;
409
+ }
410
+ interface ReactivityGraphSnapshot {
411
+ nodes: ReactivityGraphNode[];
412
+ relationships: ReactivityRelationship[];
413
+ }
414
+ interface ExpandedValueMessage {
415
+ handle: string;
416
+ path: string[];
417
+ value: EncodedValue;
418
+ }
419
+ interface InspectorsListMessage {
420
+ inspectors: {
421
+ id: InspectorId;
422
+ label: string;
423
+ pluginId?: string;
424
+ icon?: string;
425
+ treeFilterPlaceholder?: string;
426
+ stateFilterPlaceholder?: string;
427
+ noSelectionText?: string;
428
+ actions?: {
429
+ icon: string;
430
+ tooltip?: string;
431
+ }[];
432
+ nodeActions?: {
433
+ icon: string;
434
+ tooltip?: string;
435
+ }[];
436
+ }[];
437
+ }
438
+ interface InspectorTreeSnapshotMessage {
439
+ inspectorId: InspectorId;
440
+ rootNodes: CustomInspectorTreeNode[];
441
+ }
442
+ interface CustomInspectorTreeNode {
443
+ id: string;
444
+ label: string;
445
+ children?: CustomInspectorTreeNode[];
446
+ tags?: ComponentTreeNodeTag[];
447
+ name?: string;
448
+ file?: string;
449
+ }
450
+ interface PluginSnapshot {
451
+ id: string;
452
+ label?: string;
453
+ logo?: string;
454
+ packageName?: string;
455
+ homepage?: string;
456
+ settings: Record<string, PluginSettingsItem>;
457
+ settingValues: Record<string, unknown>;
458
+ }
459
+ interface PluginsSnapshotMessage {
460
+ plugins: PluginSnapshot[];
461
+ }
462
+ interface RouterRouteRecordSnapshot {
463
+ path: string;
464
+ name?: string;
465
+ children?: RouterRouteRecordSnapshot[];
466
+ meta?: Record<string, unknown>;
467
+ }
468
+ interface RouterRouteSnapshot {
469
+ fullPath?: string;
470
+ hash?: string;
471
+ href?: string;
472
+ path?: string;
473
+ name?: string;
474
+ params?: Record<string, unknown>;
475
+ query?: Record<string, unknown>;
476
+ matched?: RouterRouteRecordSnapshot[];
477
+ }
478
+ interface RouterSnapshotMessage {
479
+ appId?: AppId;
480
+ currentRoute?: RouterRouteSnapshot;
481
+ routes: RouterRouteRecordSnapshot[];
482
+ }
483
+ //#endregion
484
+ //#region src/protocol/patches.d.ts
485
+ type ComponentTreePatch = {
486
+ op: 'insert';
487
+ parentId?: ComponentId;
488
+ index?: number;
489
+ node: ComponentTreeNodeSnapshot;
490
+ } | {
491
+ op: 'remove';
492
+ id: ComponentId;
493
+ } | {
494
+ op: 'update';
495
+ id: ComponentId;
496
+ changes: Partial<ComponentTreeNodeSnapshot>;
497
+ } | {
498
+ op: 'reorder';
499
+ parentId: ComponentId;
500
+ children: ComponentId[];
501
+ };
502
+ //#endregion
503
+ //#region src/runtime/types.d.ts
504
+ type AppId = string;
505
+ type ComponentId = string;
506
+ type InspectorId = string;
507
+ type PluginId = string;
508
+ type RuntimeEventType = RuntimeEvent['type'];
509
+ type RuntimeDomainEventType = RuntimeDomainEvent['type'];
510
+ type MaybePromise<T> = T | Promise<T>;
511
+ type AppRef = object;
512
+ type InstanceRef = object;
513
+ interface VueTypeMap {
514
+ [key: string]: string | symbol;
515
+ }
516
+ interface RuntimeEventBase {
517
+ time: number;
518
+ }
519
+ type RuntimeEvent = (RuntimeEventBase & {
520
+ type: 'app:init';
521
+ app: AppRef;
522
+ version: string;
523
+ vueTypes: VueTypeMap;
524
+ }) | (RuntimeEventBase & {
525
+ type: 'app:unmount';
526
+ app: AppRef;
527
+ }) | (RuntimeEventBase & {
528
+ type: 'component:add';
529
+ appId: AppId;
530
+ app?: AppRef;
531
+ instance: InstanceRef;
532
+ parent?: InstanceRef;
533
+ }) | (RuntimeEventBase & {
534
+ type: 'component:update';
535
+ appId: AppId;
536
+ app?: AppRef;
537
+ instance: InstanceRef;
538
+ parent?: InstanceRef;
539
+ }) | (RuntimeEventBase & {
540
+ type: 'component:remove';
541
+ appId: AppId;
542
+ app?: AppRef;
543
+ instanceId?: ComponentId;
544
+ instance?: InstanceRef;
545
+ parentId?: ComponentId;
546
+ parent?: InstanceRef;
547
+ }) | (RuntimeEventBase & {
548
+ type: 'component:emit';
549
+ appId: AppId;
550
+ app?: AppRef;
551
+ instance: InstanceRef;
552
+ event: string;
553
+ args: unknown[];
554
+ }) | (RuntimeEventBase & {
555
+ type: 'perf:start' | 'perf:end';
556
+ appId: AppId;
557
+ app?: AppRef;
558
+ instance: InstanceRef;
559
+ phase: string;
560
+ timestamp: number;
561
+ }) | (RuntimeEventBase & {
562
+ type: 'plugin:setup';
563
+ descriptor: unknown;
564
+ setup: unknown;
565
+ });
566
+ type RuntimeDomainEvent = RuntimeEvent | {
567
+ type: 'apps:changed';
568
+ time: number;
569
+ appId?: AppId;
570
+ } | {
571
+ type: 'components:changed';
572
+ time: number;
573
+ appId: AppId;
574
+ componentId?: ComponentId;
575
+ reason: 'add' | 'update' | 'remove';
576
+ } | {
577
+ type: 'components:treePatched';
578
+ time: number;
579
+ appId: AppId;
580
+ version: number;
581
+ patches: ComponentTreePatch[];
582
+ } | {
583
+ type: 'components:stateInvalidated';
584
+ time: number;
585
+ appId: AppId;
586
+ componentId: ComponentId;
587
+ version: number;
588
+ reason: 'add' | 'update' | 'remove' | 'edit';
589
+ } | {
590
+ type: 'inspectors:changed';
591
+ time: number;
592
+ appId?: AppId;
593
+ inspectorId: InspectorId;
594
+ pluginId?: PluginId;
595
+ reason: 'add' | 'update' | 'remove';
596
+ } | {
597
+ type: 'inspectors:treeInvalidated';
598
+ time: number;
599
+ appId?: AppId;
600
+ inspectorId: InspectorId;
601
+ pluginId?: PluginId;
602
+ reason: 'update';
603
+ } | {
604
+ type: 'inspectors:stateInvalidated';
605
+ time: number;
606
+ appId?: AppId;
607
+ inspectorId: InspectorId;
608
+ nodeId?: string;
609
+ pluginId?: PluginId;
610
+ reason: 'select' | 'edit' | 'update' | 'action';
611
+ } | {
612
+ type: 'timeline:layerAdded';
613
+ time: number;
614
+ appId?: AppId;
615
+ pluginId?: PluginId;
616
+ layerId: string;
617
+ label?: string;
618
+ color?: number;
619
+ } | {
620
+ type: 'timeline:eventAdded';
621
+ time: number;
622
+ appId?: AppId;
623
+ pluginId?: PluginId;
624
+ layerId: string;
625
+ title: string;
626
+ subtitle?: string;
627
+ data?: EncodedValue;
628
+ meta?: EncodedValue;
629
+ groupId?: number;
630
+ logType?: 'default' | 'warning' | 'error';
631
+ all?: boolean;
632
+ } | {
633
+ type: 'timeline:eventsLimited';
634
+ time: number;
635
+ layerId: string;
636
+ dropped: number;
637
+ coalesced: number;
638
+ };
639
+ /** Unvalidated wire request; use RuntimeQueryRequest for built-in callers. */
640
+ interface RuntimeQuery {
641
+ type: string;
642
+ appId?: AppId;
643
+ payload?: unknown;
644
+ }
645
+ interface RuntimeCommand<Payload = unknown> {
646
+ type: string;
647
+ appId?: AppId;
648
+ payload?: Payload;
649
+ }
650
+ interface RuntimeCommandResult {
651
+ status: 0 | 1;
652
+ error?: unknown;
653
+ }
654
+ type RuntimeEventHandler<TEvent extends RuntimeDomainEvent = RuntimeDomainEvent> = (event: TEvent) => void;
655
+ //#endregion
656
+ //#region src/runtime/registry.d.ts
657
+ interface ComponentRecord {
658
+ id: ComponentId;
659
+ uid?: number | string;
660
+ appId: AppId;
661
+ instance: InstanceRef;
662
+ parentId?: ComponentId;
663
+ name: string;
664
+ file?: string;
665
+ renderKey?: string | number;
666
+ inactive?: boolean;
667
+ isFragment?: boolean;
668
+ hidden?: boolean;
669
+ tags?: ComponentTreeNodeTag[];
670
+ domOrder?: number[];
671
+ consoleId?: number;
672
+ autoOpen?: boolean;
673
+ lastMountMs?: number;
674
+ lastUpdateMs?: number;
675
+ updatedAt: number;
676
+ }
677
+ interface RefreshComponentTreeOptions {
678
+ maxDepth?: number;
679
+ rootComponentId?: ComponentId;
680
+ time?: number;
681
+ }
682
+ interface AppRecord {
683
+ id: AppId;
684
+ name: string;
685
+ version?: string;
686
+ app: AppRef;
687
+ vueTypes?: VueTypeMap;
688
+ rootInstance?: InstanceRef;
689
+ components: Map<ComponentId, ComponentRecord>;
690
+ createdAt: number;
691
+ updatedAt: number;
692
+ }
693
+ type ComponentSnapshot = ComponentTreeNodeSnapshot;
694
+ interface ComponentRecordOverrides {
695
+ inactive?: boolean;
696
+ tags?: ComponentTreeNodeTag[];
697
+ domOrder?: number[];
698
+ consoleId?: number;
699
+ autoOpen?: boolean;
700
+ }
701
+ interface WalkedComponentChild {
702
+ instance: InstanceRef;
703
+ tags?: ComponentTreeNodeTag[];
704
+ inactive?: boolean;
705
+ }
706
+ declare class ComponentDomOrderCache {
707
+ private parents;
708
+ private observer?;
709
+ constructor(observe?: boolean);
710
+ private invalidate;
711
+ preparePage(): void;
712
+ dispose(): void;
713
+ indexOf(parent: Element, node: Node): number;
714
+ }
715
+ declare class RuntimeRegistry {
716
+ private appIdSeed;
717
+ private appByRef;
718
+ private apps;
719
+ private componentIds;
720
+ private retiredApps;
721
+ private eventDomOrder?;
722
+ private getEventDomOrder;
723
+ apply(event: RuntimeEvent): AppRecord | ComponentRecord | undefined;
724
+ addApp(app: AppRef, version: string, vueTypes: VueTypeMap, time: number): AppRecord;
725
+ removeApp(app: AppRef): AppRecord | undefined;
726
+ isAppRetired(app: AppRef): boolean;
727
+ ensureComponent(appId: AppId, instance: InstanceRef, parent: InstanceRef | undefined, time: number, forcedUid?: string, overrides?: ComponentRecordOverrides, domOrderCache?: ComponentDomOrderCache): ComponentRecord | undefined;
728
+ refreshComponentTree(appId: AppId, options?: RefreshComponentTreeOptions): ComponentRecord[];
729
+ removeComponent(appId: AppId, componentId?: ComponentId, instance?: InstanceRef): ComponentRecord | undefined;
730
+ getApp(appId: AppId): AppRecord | undefined;
731
+ getAppByRef(app: AppRef): AppRecord | undefined;
732
+ listApps(): AppRecord[];
733
+ resetComponentTracking(): void;
734
+ getComponentId(instance: InstanceRef): ComponentId | undefined;
735
+ getComponent(componentId: ComponentId, appId?: AppId): ComponentRecord | undefined;
736
+ getComponentDepth(record: ComponentRecord): number;
737
+ getComponentChildCount(record: ComponentRecord): number;
738
+ getComponentChildren(record: ComponentRecord): WalkedComponentChild[];
739
+ refreshChild(parent: ComponentRecord, child: WalkedComponentChild, cache: ComponentDomOrderCache): ComponentRecord | undefined;
740
+ toAppSnapshot(record: AppRecord): AppSnapshot;
741
+ toComponentSnapshot(record: ComponentRecord): ComponentSnapshot;
742
+ }
743
+ //#endregion
744
+ //#region src/runtime/inspectors.d.ts
745
+ interface RuntimeInspectorAction {
746
+ icon: string;
747
+ tooltip?: string;
748
+ }
749
+ interface RuntimeInspectorRecord {
750
+ pluginId: PluginId;
751
+ app?: AppRef;
752
+ options: CustomInspectorOptions;
753
+ treeFilter: string;
754
+ selectedNodeId: string;
755
+ }
756
+ interface RuntimeInspectorInfo {
757
+ id: InspectorId;
758
+ label: string;
759
+ icon?: string;
760
+ pluginId: PluginId;
761
+ treeFilterPlaceholder: string;
762
+ stateFilterPlaceholder: string;
763
+ noSelectionText?: string;
764
+ actions: RuntimeInspectorAction[];
765
+ nodeActions: RuntimeInspectorAction[];
766
+ }
767
+ declare class RuntimeInspectorStore {
768
+ private records;
769
+ add(options: CustomInspectorOptions, pluginId: PluginId, app?: AppRef): RuntimeInspectorRecord;
770
+ list(app?: AppRef): RuntimeInspectorInfo[];
771
+ get(id: InspectorId, app?: AppRef): RuntimeInspectorRecord | undefined;
772
+ removeByApp(app: AppRef): RuntimeInspectorRecord[];
773
+ getInfo(id: InspectorId, app?: AppRef): RuntimeInspectorInfo | undefined;
774
+ setSelectedNode(id: InspectorId, nodeId: string, app?: AppRef): void;
775
+ callAction(id: InspectorId, actionIndex: number, app?: AppRef): Promise<boolean>;
776
+ callNodeAction(id: InspectorId, actionIndex: number, nodeId: string, app?: AppRef): Promise<boolean>;
777
+ clear(): void;
778
+ private toInfo;
779
+ }
780
+ //#endregion
781
+ //#region src/runtime/performance.d.ts
782
+ interface RuntimePerformanceSnapshot {
783
+ receivedEvents: number;
784
+ emittedEvents: number;
785
+ droppedEvents: number;
786
+ coalescedEvents: number;
787
+ bufferedEvents: number;
788
+ bufferedBytes: number;
789
+ collectionActive: boolean;
790
+ attachedClients: number;
791
+ }
792
+ interface RuntimePerformanceMonitor {
793
+ snapshot(): RuntimePerformanceSnapshot;
794
+ recordReceived(count?: number): void;
795
+ recordEmitted(count?: number): void;
796
+ recordDropped(count?: number): void;
797
+ recordCoalesced(count?: number): void;
798
+ setBuffer(events: number, bytes: number): void;
799
+ setCollectionState(active: boolean, attachedClients: number): void;
800
+ }
801
+ declare function createRuntimePerformanceMonitor(collectionActive: boolean): RuntimePerformanceMonitor;
802
+ //#endregion
803
+ //#region src/protocol/requests.d.ts
804
+ type ComponentTarget = {
805
+ componentId: string;
806
+ } | {
807
+ instance: object;
808
+ };
809
+ type InspectorTarget = {
810
+ inspectorId: string;
811
+ app?: object;
812
+ pluginId?: string;
813
+ };
814
+ interface StateEdit {
815
+ sectionId?: string;
816
+ path: string[];
817
+ value?: unknown;
818
+ remove?: boolean;
819
+ newKey?: string;
820
+ }
821
+ /** Built-in request contracts. Extend these interfaces to type additional registered methods. */
822
+ interface RuntimeQueryMap {
823
+ 'apps:snapshot': {
824
+ payload: undefined;
825
+ result: AppsSnapshotMessage;
826
+ };
827
+ 'devtools:capabilities': {
828
+ payload: undefined;
829
+ result: DevtoolsCapabilitiesMessage;
830
+ };
831
+ 'runtime:health': {
832
+ payload: undefined;
833
+ result: {
834
+ status: 'ready';
835
+ performance: RuntimePerformanceSnapshot;
836
+ };
837
+ };
838
+ 'plugins:snapshot': {
839
+ payload: undefined;
840
+ result: PluginsSnapshotMessage;
841
+ };
842
+ 'components:treeSnapshot': {
843
+ payload: {
844
+ filter?: string;
845
+ } | undefined;
846
+ result: ComponentTreeSnapshotMessage;
847
+ };
848
+ 'components:treeChildren': {
849
+ payload: {
850
+ componentId: string;
851
+ cursor?: string;
852
+ };
853
+ result: ComponentTreePageMessage;
854
+ };
855
+ 'components:stateSnapshot': {
856
+ payload: {
857
+ componentId: string;
858
+ maxEntries?: number;
859
+ };
860
+ result: ComponentStateSnapshotMessage | undefined;
861
+ };
862
+ 'components:inspect': {
863
+ payload: undefined;
864
+ result: ComponentInspectionResultMessage | undefined;
865
+ };
866
+ 'components:getBounds': {
867
+ payload: ComponentTarget;
868
+ result: ComponentBounds | undefined;
869
+ };
870
+ 'components:getName': {
871
+ payload: ComponentTarget;
872
+ result: string | undefined;
873
+ };
874
+ 'components:getRenderCode': {
875
+ payload: ComponentTarget;
876
+ result: string | undefined;
877
+ };
878
+ 'inspectors:list': {
879
+ payload: undefined;
880
+ result: InspectorsListMessage;
881
+ };
882
+ 'inspectors:info': {
883
+ payload: {
884
+ inspectorId: string;
885
+ };
886
+ result: RuntimeInspectorInfo | undefined;
887
+ };
888
+ 'inspectors:treeSnapshot': {
889
+ payload: {
890
+ inspectorId: string;
891
+ filter?: string;
892
+ };
893
+ result: InspectorTreeSnapshotMessage;
894
+ };
895
+ 'inspectors:stateSnapshot': {
896
+ payload: {
897
+ inspectorId: string;
898
+ nodeId: string;
899
+ };
900
+ result: ComponentStateSnapshotMessage | undefined;
901
+ };
902
+ 'router:snapshot': {
903
+ payload: undefined;
904
+ result: RouterSnapshotMessage;
905
+ };
906
+ 'router:matchedRoutes': {
907
+ payload: {
908
+ path: string;
909
+ };
910
+ result: {
911
+ appId?: string;
912
+ path: string;
913
+ routes: RouterRouteRecordSnapshot[];
914
+ };
915
+ };
916
+ 'values:expand': {
917
+ payload: {
918
+ handle: string;
919
+ path?: string[];
920
+ maxEntries?: number;
921
+ };
922
+ result: ExpandedValueMessage | undefined;
923
+ };
924
+ 'values:storeAsGlobal': {
925
+ payload: {
926
+ handle: string;
927
+ } | {
928
+ componentId: string;
929
+ sectionId: string;
930
+ path: string[];
931
+ };
932
+ result: {
933
+ varName: string;
934
+ } | undefined;
935
+ };
936
+ }
937
+ interface RuntimeCommandMap {
938
+ 'components:expandTreeNode': {
939
+ componentId: string;
940
+ };
941
+ 'components:cancelTreeChildren': {
942
+ cursor: string;
943
+ };
944
+ 'components:cancelInspect': undefined;
945
+ 'components:highlight': ComponentTarget;
946
+ 'components:unhighlight': undefined;
947
+ 'components:setHighlightUpdates': {
948
+ enabled: boolean;
949
+ };
950
+ 'components:scrollTo': ComponentTarget;
951
+ 'components:inspectDom': ComponentTarget;
952
+ 'components:editState': StateEdit & {
953
+ componentId: string;
954
+ stateType?: string;
955
+ };
956
+ 'components:addState': {
957
+ componentId: string;
958
+ sectionId?: string;
959
+ path: string[];
960
+ value?: unknown;
961
+ };
962
+ 'components:invalidate': {
963
+ componentId: string;
964
+ };
965
+ 'values:customAction': {
966
+ handle: string;
967
+ actionIndex: number;
968
+ };
969
+ 'values:recompute': {
970
+ componentId: string;
971
+ sectionId: string;
972
+ path: string[];
973
+ };
974
+ 'inspectors:add': {
975
+ options: CustomInspectorOptions;
976
+ pluginId: string;
977
+ app?: object;
978
+ };
979
+ 'inspectors:invalidateTree': InspectorTarget;
980
+ 'inspectors:invalidateState': InspectorTarget;
981
+ 'inspectors:selectNode': InspectorTarget & {
982
+ nodeId: string;
983
+ };
984
+ 'inspectors:editState': StateEdit & {
985
+ inspectorId: string;
986
+ nodeId: string;
987
+ };
988
+ 'inspectors:callAction': {
989
+ inspectorId: string;
990
+ actionIndex: number;
991
+ };
992
+ 'inspectors:callNodeAction': {
993
+ inspectorId: string;
994
+ nodeId: string;
995
+ actionIndex: number;
996
+ };
997
+ 'plugins:updateSetting': {
998
+ pluginId: string;
999
+ key: string;
1000
+ value: unknown;
1001
+ };
1002
+ 'router:navigate': {
1003
+ path: string;
1004
+ };
1005
+ 'timeline:setRecording': {
1006
+ recording?: boolean;
1007
+ disabledLayerIds?: string[];
1008
+ };
1009
+ 'timeline:clear': undefined;
1010
+ 'timeline:inspectEvent': {
1011
+ pluginId: string;
1012
+ layerId?: string;
1013
+ event: object;
1014
+ };
1015
+ 'timeline:addLayer': {
1016
+ options: TimelineLayerOptions;
1017
+ pluginId?: string;
1018
+ app?: object;
1019
+ };
1020
+ 'timeline:addEvent': {
1021
+ options: TimelineEventOptions;
1022
+ pluginId?: string;
1023
+ app?: object;
1024
+ };
1025
+ }
1026
+ type RequestPayload<P> = undefined extends P ? {
1027
+ payload?: P;
1028
+ } : {
1029
+ payload: P;
1030
+ };
1031
+ type RuntimeQueryRequest<K extends keyof RuntimeQueryMap = keyof RuntimeQueryMap> = { [T in K]: {
1032
+ type: T;
1033
+ appId?: AppId;
1034
+ } & RequestPayload<RuntimeQueryMap[T]['payload']>; }[K];
1035
+ type RuntimeCommandRequest<K extends keyof RuntimeCommandMap = keyof RuntimeCommandMap> = { [T in K]: {
1036
+ type: T;
1037
+ appId?: AppId;
1038
+ } & RequestPayload<RuntimeCommandMap[T]>; }[K];
1039
+ interface RuntimeRequests {
1040
+ query<K extends keyof RuntimeQueryMap>(request: RuntimeQueryRequest<K>): Promise<RuntimeQueryMap[K]['result']>;
1041
+ command(request: RuntimeCommandRequest): Promise<RuntimeCommandResult>;
1042
+ /** Explicit escape hatches for dynamic extensions and unvalidated transport messages. */
1043
+ queryCustom<T = unknown>(request: RuntimeQuery): Promise<T>;
1044
+ commandCustom(request: RuntimeCommand): Promise<RuntimeCommandResult>;
1045
+ }
1046
+ //#endregion
1047
+ //#region src/runtime/components.d.ts
1048
+ interface ComponentTreeSnapshot {
1049
+ appId?: AppId;
1050
+ version: number;
1051
+ nodes: ComponentSnapshot[];
1052
+ }
1053
+ interface ComponentTreePatchBatch {
1054
+ appId: AppId;
1055
+ version: number;
1056
+ patches: ComponentTreePatch[];
1057
+ }
1058
+ declare class ComponentTreeStore {
1059
+ private readonly registry;
1060
+ private readonly budget;
1061
+ includePerfMetrics: boolean;
1062
+ private appVersions;
1063
+ private nodesByApp;
1064
+ private childrenByApp;
1065
+ private visibleNodesByApp;
1066
+ private expandedNodesByApp;
1067
+ private expansionSeed;
1068
+ private expansions;
1069
+ private pendingChildren;
1070
+ private pendingParents;
1071
+ constructor(registry: RuntimeRegistry, budget: RuntimeBudget['components']);
1072
+ syncApp(app: AppRecord): ComponentTreePatchBatch | undefined;
1073
+ apply(event: RuntimeEvent, record?: ComponentRecord): ComponentTreePatchBatch | undefined;
1074
+ snapshot(appId?: AppId): ComponentTreeSnapshot;
1075
+ expand(appId: AppId, componentId: ComponentId): ComponentTreePatchBatch | undefined;
1076
+ readChildrenPage(appId: AppId, componentId: ComponentId, cursor: string | undefined, maxMessageBytes: number): ComponentTreePageMessage;
1077
+ cancelChildrenPage(appId: AppId, cursor: string): void;
1078
+ private deleteExpansion;
1079
+ resetTrackingCache(): void;
1080
+ revealPath(appId: AppId, componentId: ComponentId): ComponentSnapshot[];
1081
+ getVersion(appId: AppId): number;
1082
+ isVisible(appId: AppId, componentId: ComponentId): boolean;
1083
+ touch(record: ComponentRecord): ComponentTreePatchBatch | undefined;
1084
+ removeApp(appId: AppId): void;
1085
+ private upsert;
1086
+ private remove;
1087
+ private commit;
1088
+ private readOrderedNodes;
1089
+ private toSnapshot;
1090
+ private addChild;
1091
+ private removeChild;
1092
+ private createChildCountPatch;
1093
+ private removePendingChild;
1094
+ private clearPendingChildren;
1095
+ private getNodes;
1096
+ private getChildren;
1097
+ private getVisibleNodes;
1098
+ private getExpandedNodes;
1099
+ private isPatchVisible;
1100
+ private pruneToVisible;
1101
+ }
1102
+ //#endregion
1103
+ //#region src/runtime/events.d.ts
1104
+ interface RuntimeEventLog {
1105
+ dispatch(event: RuntimeDomainEvent): void;
1106
+ subscribe(type: '*', handler: RuntimeEventHandler): () => void;
1107
+ subscribe<Type extends RuntimeDomainEventType>(type: Type, handler: RuntimeEventHandler<Extract<RuntimeDomainEvent, {
1108
+ type: Type;
1109
+ }>>): () => void;
1110
+ clear(): void;
1111
+ }
1112
+ declare function createRuntimeEventLog(): RuntimeEventLog;
1113
+ //#endregion
1114
+ //#region src/runtime/scheduler.d.ts
1115
+ interface RuntimeScheduler {
1116
+ schedule(key: string, task: () => MaybePromise<void>, delayMs?: number): boolean;
1117
+ flush(): Promise<void>;
1118
+ clear(): void;
1119
+ }
1120
+ declare function createRuntimeScheduler(): RuntimeScheduler;
1121
+ //#endregion
1122
+ //#region src/runtime/state/index.d.ts
1123
+ interface LegacyComponentStateEntry {
1124
+ type?: string;
1125
+ key?: string | number | symbol;
1126
+ value?: unknown;
1127
+ editable?: boolean;
1128
+ meta?: Record<string, unknown>;
1129
+ objectType?: string;
1130
+ raw?: string;
1131
+ }
1132
+ declare class ComponentStateCollector {
1133
+ private readonly registry;
1134
+ private readonly budget;
1135
+ private handles;
1136
+ private handleScopes;
1137
+ private versions;
1138
+ private reactivityGraphIds;
1139
+ private reactivityGraphIdSeed;
1140
+ constructor(registry: RuntimeRegistry, budget: RuntimeBudget);
1141
+ get handleCount(): number;
1142
+ /**
1143
+ * Starts a fresh handle scope for a state snapshot: stale handles from
1144
+ * earlier snapshots of the same component/inspector node are released, and
1145
+ * scopes beyond the retention window are recycled so switching components
1146
+ * cannot grow the registry without bound.
1147
+ */
1148
+ beginStateScope(scope: string): string;
1149
+ invalidate(componentId: ComponentId): number;
1150
+ hasSnapshot(componentId: ComponentId): boolean;
1151
+ snapshot(componentId: ComponentId, maxEntries?: number): ComponentStateSnapshotMessage | undefined;
1152
+ expand(handle: string, path?: string[], maxEntries?: number): ExpandedValueMessage | undefined;
1153
+ getHandleValue(handle: string): object | undefined;
1154
+ resolveEntryValue(componentId: ComponentId, sectionId: string, path: string[]): {
1155
+ found: boolean;
1156
+ value?: unknown;
1157
+ };
1158
+ /** `triggerRef` the live computed for this state path. */
1159
+ recompute(componentId: ComponentId, sectionId: string, path: string[]): boolean;
1160
+ edit(componentId: ComponentId, sectionId: string, path: string[], value: unknown, newKey?: string): boolean;
1161
+ delete(componentId: ComponentId, sectionId: string, path: string[]): boolean;
1162
+ add(componentId: ComponentId, sectionId: string, path: string[], value: unknown): boolean;
1163
+ appendLegacyEntries(snapshot: ComponentStateSnapshotMessage, entries: LegacyComponentStateEntry[]): void;
1164
+ executeCustomAction(handle: string, actionIndex: number): Promise<boolean>;
1165
+ clear(): void;
1166
+ private encodeStateValue;
1167
+ private collectSection;
1168
+ private collectReactivityGraph;
1169
+ private getReactivityGraphNodeId;
1170
+ }
1171
+ //#endregion
1172
+ //#region src/runtime/runtime.d.ts
1173
+ type RuntimeQueryHandler<T = unknown> = (query: RuntimeQuery, runtime: DevtoolsRuntime) => MaybePromise<T>;
1174
+ type RuntimeCommandHandler<Payload = unknown> = (command: RuntimeCommand<Payload>, runtime: DevtoolsRuntime) => MaybePromise<RuntimeCommandResult | void>;
1175
+ interface DevtoolsRuntime extends RuntimeRequests {
1176
+ readonly budget: RuntimeBudget;
1177
+ readonly components: ComponentTreeStore;
1178
+ readonly componentState: ComponentStateCollector;
1179
+ readonly events: RuntimeEventLog;
1180
+ readonly inspectors: RuntimeInspectorStore;
1181
+ readonly performance: RuntimePerformanceMonitor;
1182
+ readonly registry: RuntimeRegistry;
1183
+ readonly scheduler: RuntimeScheduler;
1184
+ isCollectionActive(): boolean;
1185
+ setCollectionActive(active: boolean, attachedClients?: number): void;
1186
+ dispatch(event: RuntimeEvent): void;
1187
+ registerQuery<T>(type: string, handler: RuntimeQueryHandler<T>): () => void;
1188
+ registerCommand<Payload = unknown>(type: string, handler: RuntimeCommandHandler<Payload>): () => void;
1189
+ setPluginHookRunner(runner: ((key: string, payload: unknown, pluginId?: string) => Promise<void>) | undefined): void;
1190
+ callPluginHook(key: string, payload: unknown, pluginId?: string): Promise<void>;
1191
+ subscribe(type: '*', handler: RuntimeEventHandler): () => void;
1192
+ subscribe<Type extends RuntimeDomainEventType>(type: Type, handler: RuntimeEventHandler<Extract<RuntimeDomainEvent, {
1193
+ type: Type;
1194
+ }>>): () => void;
1195
+ dispose(): void;
1196
+ }
1197
+ interface CreateDevtoolsRuntimeOptions {
1198
+ budget?: RuntimeBudgetInput;
1199
+ collectionInitiallyActive?: boolean;
1200
+ componentInspectorDockController?: ComponentInspectorDockController;
1201
+ }
1202
+ declare function createDevtoolsRuntime(options?: CreateDevtoolsRuntimeOptions): DevtoolsRuntime;
1203
+ //#endregion
1204
+ //#region src/runtime/component-inspector.d.ts
1205
+ interface ComponentBounds {
1206
+ left: number;
1207
+ top: number;
1208
+ width: number;
1209
+ height: number;
1210
+ }
1211
+ type ComponentInspectorDockRestore = () => Promise<void> | void;
1212
+ interface ComponentInspectorDockController {
1213
+ closeForComponentInspection(): Promise<ComponentInspectorDockRestore | undefined> | ComponentInspectorDockRestore | undefined;
1214
+ }
1215
+ //#endregion
1216
+ //#region src/rpc/constants.d.ts
1217
+ declare const DEVTOOLS_RPC_QUERY = "devtools:query";
1218
+ declare const DEVTOOLS_RPC_COMMAND = "devtools:command";
1219
+ declare const DEVTOOLS_RPC_EVENT = "devtools:event";
1220
+ declare const DEVTOOLS_IFRAME_RPC_SOURCE = "vue-devtools";
1221
+ declare const DEVTOOLS_IFRAME_RPC_CONNECT = "devtools:iframe-rpc-connect";
1222
+ declare const DEFAULT_DEVTOOLS_RPC_CHANNEL_ID = "vue-devtools";
1223
+ //#endregion
1224
+ //#region src/rpc/types.d.ts
1225
+ type DevtoolsRpcChannelKind = 'iframe' | 'extension';
1226
+ interface DevtoolsRpcEvent {
1227
+ type: RuntimeDomainEvent['type'];
1228
+ time: number;
1229
+ appId?: AppId;
1230
+ componentId?: ComponentId;
1231
+ reason?: string;
1232
+ inspectorId?: string;
1233
+ nodeId?: string;
1234
+ pluginId?: string;
1235
+ layerId?: string;
1236
+ label?: string;
1237
+ color?: number;
1238
+ title?: string;
1239
+ subtitle?: string;
1240
+ data?: EncodedValue;
1241
+ meta?: EncodedValue;
1242
+ groupId?: number;
1243
+ logType?: 'default' | 'warning' | 'error';
1244
+ all?: boolean;
1245
+ dropped?: number;
1246
+ coalesced?: number;
1247
+ version?: number;
1248
+ patches?: ComponentTreePatch[];
1249
+ }
1250
+ type DevtoolsRpcEventHandler = (event: DevtoolsRpcEvent) => void;
1251
+ type DevtoolsRpcServerFunctions = {
1252
+ [DEVTOOLS_RPC_QUERY]: (query: RuntimeQuery) => Promise<unknown>;
1253
+ [DEVTOOLS_RPC_COMMAND]: (command: RuntimeCommand) => Promise<RuntimeCommandResult>;
1254
+ };
1255
+ type DevtoolsRpcClientFunctions = {
1256
+ [DEVTOOLS_RPC_EVENT]: (event: DevtoolsRpcEvent) => void;
1257
+ };
1258
+ interface DevtoolsInPageProtocol {
1259
+ functions: {
1260
+ pageScript: DevtoolsRpcServerFunctions;
1261
+ };
1262
+ events: {
1263
+ panel: DevtoolsRpcClientFunctions;
1264
+ };
1265
+ }
1266
+ declare function toDevtoolsRpcEvent(event: RuntimeDomainEvent): DevtoolsRpcEvent | undefined;
1267
+ //#endregion
1268
+ //#region src/rpc/channel.d.ts
1269
+ interface DevtoolsRpcChannel {
1270
+ post(data: unknown, ...extras: unknown[]): unknown;
1271
+ on(handler: (data: unknown, ...extras: unknown[]) => void): unknown;
1272
+ off?(handler: (data: unknown, ...extras: unknown[]) => void): unknown;
1273
+ serialize?(data: unknown): unknown;
1274
+ deserialize?(data: unknown): unknown;
1275
+ meta?: unknown;
1276
+ }
1277
+ interface DevtoolsRpcChannelHandle {
1278
+ readonly kind?: DevtoolsRpcChannelKind;
1279
+ dispose(): void;
1280
+ }
1281
+ declare function createMessagePortDevtoolsRpcChannel(port: MessagePort): DevtoolsRpcChannel;
1282
+ //#endregion
1283
+ //#region src/rpc/client.d.ts
1284
+ interface CreateDevtoolsRpcClientOptions {
1285
+ channel: DevtoolsRpcChannel;
1286
+ disposeChannel?: () => void;
1287
+ }
1288
+ interface DevtoolsRpcClient extends RuntimeRequests {
1289
+ onEvent(handler: DevtoolsRpcEventHandler): () => void;
1290
+ onConnectionChanged?(handler: (status: 'connecting' | 'connected' | 'closed') => void): () => void;
1291
+ dispose(): void;
1292
+ }
1293
+ declare function createDevtoolsRpcClient(options: CreateDevtoolsRpcClientOptions): DevtoolsRpcClient;
1294
+ //#endregion
1295
+ //#region src/rpc/channels/extension.d.ts
1296
+ declare const DEVTOOLS_EXTENSION_PORT_SOURCE = "vue-devtools";
1297
+ declare const DEVTOOLS_EXTENSION_PORT_VERSION = 1;
1298
+ type DevtoolsExtensionPortRole = 'page' | 'panel';
1299
+ interface DevtoolsExtensionPortDescriptor {
1300
+ source: typeof DEVTOOLS_EXTENSION_PORT_SOURCE;
1301
+ version: typeof DEVTOOLS_EXTENSION_PORT_VERSION;
1302
+ role: DevtoolsExtensionPortRole;
1303
+ tabId?: number;
1304
+ }
1305
+ interface ConnectDevtoolsExtensionClientOptions {
1306
+ chrome?: ChromeExtensionApi;
1307
+ tabId?: number;
1308
+ name?: string;
1309
+ }
1310
+ interface ChromeExtensionEvent<TListener> {
1311
+ addListener(listener: TListener): void;
1312
+ removeListener(listener: TListener): void;
1313
+ }
1314
+ interface ChromeRuntimePort {
1315
+ name: string;
1316
+ sender?: {
1317
+ tab?: {
1318
+ id?: number;
1319
+ };
1320
+ frameId?: number;
1321
+ documentId?: string;
1322
+ url?: string;
1323
+ };
1324
+ onDisconnect: ChromeExtensionEvent<(port: ChromeRuntimePort) => void>;
1325
+ onMessage: ChromeExtensionEvent<(message: unknown, port: ChromeRuntimePort) => void>;
1326
+ disconnect(): void;
1327
+ postMessage(message: unknown): void;
1328
+ }
1329
+ interface ChromeExtensionApi {
1330
+ devtools?: {
1331
+ inspectedWindow?: {
1332
+ tabId?: number;
1333
+ };
1334
+ };
1335
+ runtime?: {
1336
+ connect(connectInfo?: {
1337
+ name?: string;
1338
+ }): ChromeRuntimePort;
1339
+ lastError?: {
1340
+ message?: string;
1341
+ };
1342
+ };
1343
+ }
1344
+ declare function createDevtoolsExtensionPortName(role: DevtoolsExtensionPortRole, tabId?: number): string;
1345
+ declare function parseDevtoolsExtensionPortName(name: string): DevtoolsExtensionPortDescriptor | undefined;
1346
+ declare const DEVTOOLS_EXTENSION_FRAME_CONTROL_SOURCE = "vue-devtools:frame-control";
1347
+ interface DevtoolsExtensionFrameDescriptor {
1348
+ frameId: number;
1349
+ documentId?: string;
1350
+ url?: string;
1351
+ main: boolean;
1352
+ }
1353
+ type DevtoolsExtensionFrameActivationReason = 'initial' | 'select' | 'navigation';
1354
+ interface DevtoolsExtensionFramesChangedMessage {
1355
+ source: typeof DEVTOOLS_EXTENSION_FRAME_CONTROL_SOURCE;
1356
+ type: 'frames:changed';
1357
+ frames: DevtoolsExtensionFrameDescriptor[];
1358
+ activeFrameId?: number;
1359
+ }
1360
+ interface DevtoolsExtensionFrameActivatedMessage {
1361
+ source: typeof DEVTOOLS_EXTENSION_FRAME_CONTROL_SOURCE;
1362
+ type: 'frames:activated';
1363
+ frame: DevtoolsExtensionFrameDescriptor;
1364
+ reason: DevtoolsExtensionFrameActivationReason;
1365
+ }
1366
+ interface DevtoolsExtensionFrameSelectMessage {
1367
+ source: typeof DEVTOOLS_EXTENSION_FRAME_CONTROL_SOURCE;
1368
+ type: 'frames:select';
1369
+ frameId: number;
1370
+ }
1371
+ type DevtoolsExtensionFrameControlMessage = DevtoolsExtensionFramesChangedMessage | DevtoolsExtensionFrameActivatedMessage | DevtoolsExtensionFrameSelectMessage;
1372
+ declare function isDevtoolsExtensionFrameControlMessage(value: unknown): value is DevtoolsExtensionFrameControlMessage;
1373
+ interface DevtoolsExtensionFrameController {
1374
+ getFrames(): DevtoolsExtensionFrameDescriptor[];
1375
+ getActiveFrameId(): number | undefined;
1376
+ selectFrame(frameId: number): void;
1377
+ onFramesChanged(handler: (frames: DevtoolsExtensionFrameDescriptor[], activeFrameId?: number) => void): () => void;
1378
+ onFrameActivated(handler: (frame: DevtoolsExtensionFrameDescriptor, reason: DevtoolsExtensionFrameActivationReason) => void): () => void;
1379
+ }
1380
+ interface DevtoolsExtensionRpcClient extends DevtoolsRpcClient {
1381
+ frames: DevtoolsExtensionFrameController;
1382
+ }
1383
+ declare function createChromeRuntimePortDevtoolsRpcChannel(port: ChromeRuntimePort): DevtoolsRpcChannel;
1384
+ declare function connectDevtoolsExtensionClient(options?: ConnectDevtoolsExtensionClientOptions): DevtoolsExtensionRpcClient;
1385
+ declare function createExtensionDevtoolsClientHost(options?: ConnectDevtoolsExtensionClientOptions): DevtoolsClientHost;
1386
+ declare function isExtensionDevtoolsClientHostAvailable(options?: Pick<ConnectDevtoolsExtensionClientOptions, 'chrome' | 'tabId'>): boolean;
1387
+ //#endregion
1388
+ //#region src/rpc/connect.d.ts
1389
+ interface DevtoolsClientHost {
1390
+ readonly kind: DevtoolsRpcChannelKind;
1391
+ available(): boolean;
1392
+ connect(): DevtoolsRpcClient;
1393
+ }
1394
+ interface ConnectDevtoolsClientOptions {
1395
+ hosts?: DevtoolsClientHost[];
1396
+ extension?: ConnectDevtoolsExtensionClientOptions;
1397
+ iframe?: ConnectDevtoolsIframeClientOptions;
1398
+ }
1399
+ declare function connectDevtoolsClient(options?: ConnectDevtoolsClientOptions): DevtoolsRpcClient;
1400
+ declare function getDefaultDevtoolsClientHosts(options?: ConnectDevtoolsClientOptions): DevtoolsClientHost[];
1401
+ //#endregion
1402
+ //#region src/rpc/server.d.ts
1403
+ interface DevtoolsRpcServer {
1404
+ attachInPage(options: Pick<CreatePageScriptChannelOptions<DevtoolsInPageProtocol>, 'name' | 'window' | 'allowedOrigins'>): {
1405
+ channel: PageScriptChannel<DevtoolsInPageProtocol>;
1406
+ dispose(): void;
1407
+ };
1408
+ attach(channel: DevtoolsRpcChannel): DevtoolsRpcChannelHandle;
1409
+ dispose(): void;
1410
+ }
1411
+ declare function createDevtoolsRpcServer(runtime: DevtoolsRuntime): DevtoolsRpcServer;
1412
+ //#endregion
1413
+ //#region src/rpc/channels/iframe.d.ts
1414
+ interface StartIframeDevtoolsRpcHostOptions {
1415
+ window?: Window;
1416
+ channelId?: string;
1417
+ allowedOrigins?: string[];
1418
+ }
1419
+ interface ConnectDevtoolsIframeClientOptions {
1420
+ window?: Window;
1421
+ targetWindow?: Window;
1422
+ targetOrigin?: string;
1423
+ channelId?: string;
1424
+ }
1425
+ declare function startIframeDevtoolsRpcHost(server: DevtoolsRpcServer, options?: StartIframeDevtoolsRpcHostOptions): () => void;
1426
+ declare function connectDevtoolsIframeClient(options?: ConnectDevtoolsIframeClientOptions): DevtoolsRpcClient;
1427
+ declare function createIframeDevtoolsClientHost(options?: ConnectDevtoolsIframeClientOptions): DevtoolsClientHost;
1428
+ declare function isIframeDevtoolsClientHostAvailable(options?: Pick<ConnectDevtoolsIframeClientOptions, 'window' | 'targetWindow'>): boolean;
1429
+ //#endregion
1430
+ export { DEVTOOLS_RPC_COMMAND as $, ValueHandleRegistryOptions as $n, VueTypeMap as $t, connectDevtoolsExtensionClient as A, MutableEditStatePayload as An, AppRecord as At, DevtoolsRpcChannel as B, TimelineEventOptions as Bn, InspectorId as Bt, DevtoolsExtensionFrameController as C, RouterSnapshotMessage as Cn, RuntimePerformanceMonitor as Ct, DevtoolsExtensionPortDescriptor as D, DevToolsPluginAPIHooks as Dn, RuntimeInspectorInfo as Dt, DevtoolsExtensionFramesChangedMessage as E, DevToolsPluginAPI as En, RuntimeInspectorAction as Et, isExtensionDevtoolsClientHostAvailable as F, PluginDescriptor as Fn, RuntimeRegistry as Ft, DevtoolsRpcClientFunctions as G, EncodedValue as Gn, RuntimeCommandResult as Gt, createMessagePortDevtoolsRpcChannel as H, VisitComponentTreePayload as Hn, MaybePromise as Ht, parseDevtoolsExtensionPortName as I, PluginSettingOption as In, WalkedComponentChild as It, DevtoolsRpcServerFunctions as J, encodeValue as Jn, RuntimeEvent as Jt, DevtoolsRpcEvent as K, ValueCodecOptions as Kn, RuntimeDomainEvent as Kt, CreateDevtoolsRpcClientOptions as L, PluginSettingsItem as Ln, AppId as Lt, createDevtoolsExtensionPortName as M, MutableInspectorTreePayload as Mn, ComponentRecord as Mt, createExtensionDevtoolsClientHost as N, PLUGIN_API_CAPABILITIES as Nn, ComponentSnapshot as Nt, DevtoolsExtensionPortRole as O, InspectComponentPayload as On, RuntimeInspectorRecord as Ot, isDevtoolsExtensionFrameControlMessage as P, PluginApiAdapter as Pn, RefreshComponentTreeOptions as Pt, DEVTOOLS_IFRAME_RPC_SOURCE as Q, ValueHandleRegistry as Qn, RuntimeQuery as Qt, DevtoolsRpcClient as R, PluginSetupFunction as Rn, AppRef as Rt, DevtoolsExtensionFrameControlMessage as S, RouterRouteSnapshot as Sn, RuntimeRequests as St, DevtoolsExtensionFrameSelectMessage as T, CustomInspectorOptions as Tn, createRuntimePerformanceMonitor as Tt, DevtoolsInPageProtocol as U, createPluginApiAdapter as Un, PluginId as Ut, DevtoolsRpcChannelHandle as V, TimelineLayerOptions as Vn, InstanceRef as Vt, DevtoolsRpcChannelKind as W, reportPluginError as Wn, RuntimeCommand as Wt, DEFAULT_DEVTOOLS_RPC_CHANNEL_ID as X, ValueHandle as Xn, RuntimeEventHandler as Xt, toDevtoolsRpcEvent as Y, formatPreviewKey as Yn, RuntimeEventBase as Yt, DEVTOOLS_IFRAME_RPC_CONNECT as Z, ValueHandleEntry as Zn, RuntimeEventType as Zt, DEVTOOLS_EXTENSION_FRAME_CONTROL_SOURCE as _, ReactivityGraphNode as _n, ComponentTreeStore as _t, isIframeDevtoolsClientHostAvailable as a, ComponentStateSnapshotMessage as an, DevtoolsRuntime as at, DevtoolsExtensionFrameActivatedMessage as b, ReactivityRelationship as bn, RuntimeQueryMap as bt, createDevtoolsRpcServer as c, ComponentTreePageMessage as cn, createDevtoolsRuntime as ct, connectDevtoolsClient as d, DevtoolsCapabilitiesMessage as dn, RuntimeScheduler as dt, ComponentTreePatch as en, RuntimeBudget as er, DEVTOOLS_RPC_EVENT as et, getDefaultDevtoolsClientHosts as f, ExpandedValueMessage as fn, createRuntimeScheduler as ft, ConnectDevtoolsExtensionClientOptions as g, PluginsSnapshotMessage as gn, ComponentTreeSnapshot as gt, ChromeRuntimePort as h, PluginSnapshot as hn, ComponentTreePatchBatch as ht, createIframeDevtoolsClientHost as i, ComponentStateSection as in, CreateDevtoolsRuntimeOptions as it, createChromeRuntimePortDevtoolsRpcChannel as j, MutableInspectorStatePayload as jn, ComponentDomOrderCache as jt, DevtoolsExtensionRpcClient as k, InspectTimelineEventPayload as kn, RuntimeInspectorStore as kt, ConnectDevtoolsClientOptions as l, ComponentTreeSnapshotMessage as ln, ComponentStateCollector as lt, ChromeExtensionEvent as m, InspectorsListMessage as mn, createRuntimeEventLog as mt, StartIframeDevtoolsRpcHostOptions as n, AppsSnapshotMessage as nn, defaultRuntimeBudget as nr, ComponentInspectorDockController as nt, startIframeDevtoolsRpcHost as o, ComponentTreeNodeSnapshot as on, RuntimeCommandHandler as ot, ChromeExtensionApi as p, InspectorTreeSnapshotMessage as pn, RuntimeEventLog as pt, DevtoolsRpcEventHandler as q, ValueEntry as qn, RuntimeDomainEventType as qt, connectDevtoolsIframeClient as r, ComponentInspectionResultMessage as rn, resolveRuntimeBudget as rr, ComponentInspectorDockRestore as rt, DevtoolsRpcServer as s, ComponentTreeNodeTag as sn, RuntimeQueryHandler as st, ConnectDevtoolsIframeClientOptions as t, AppSnapshot as tn, RuntimeBudgetInput as tr, DEVTOOLS_RPC_QUERY as tt, DevtoolsClientHost as u, CustomInspectorTreeNode as un, LegacyComponentStateEntry as ut, DEVTOOLS_EXTENSION_PORT_SOURCE as v, ReactivityGraphNodeType as vn, RuntimeCommandMap as vt, DevtoolsExtensionFrameDescriptor as w, StateEntry as wn, RuntimePerformanceSnapshot as wt, DevtoolsExtensionFrameActivationReason as x, RouterRouteRecordSnapshot as xn, RuntimeQueryRequest as xt, DEVTOOLS_EXTENSION_PORT_VERSION as y, ReactivityGraphSnapshot as yn, RuntimeCommandRequest as yt, createDevtoolsRpcClient as z, SetPluginSettingsPayload as zn, ComponentId as zt };
1431
+ //# sourceMappingURL=iframe-CbsDYoCA.d.cts.map