@vue/devtools-kit 7.4.4 → 7.4.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,39 +1,143 @@
1
- import { App as App$1, ComponentInternalInstance, ComponentOptions, SuspenseBoundary, VNode } from 'vue';
1
+ import { ComponentInternalInstance, ComponentOptions, SuspenseBoundary, App as App$1, VNode } from 'vue';
2
2
  import * as hookable from 'hookable';
3
3
  import { Hookable, HookKeys } from 'hookable';
4
4
  import { Router, RouteLocationNormalizedLoaded, RouteRecordNormalized } from 'vue-router';
5
5
  export { Router } from 'vue-router';
6
6
  import { BirpcOptions, ChannelOptions, BirpcGroup, BirpcReturn } from 'birpc';
7
7
 
8
- interface ComponentInspector {
9
- enabled: boolean;
10
- position: {
11
- x: number;
12
- y: number;
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>;
13
24
  };
14
- linkParams: {
15
- file: string;
16
- line: number;
17
- column: number;
25
+ __v_cache: Cache;
26
+ __VUE_DEVTOOLS_NEXT_UID__: string;
27
+ _isBeingDestroyed: boolean;
28
+ _instance: VueAppInstance;
29
+ _container: {
30
+ _vnode: {
31
+ component: VueAppInstance;
32
+ };
18
33
  };
19
- enable: () => void;
20
- disable: () => void;
21
- toggleEnabled: () => void;
22
- openInEditor: (baseUrl: string, file: string, line: number, column: number) => void;
23
- onUpdated: () => void;
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
+ rootInstance: VueAppInstance;
60
+ routerId?: string;
24
61
  }
25
- declare function toggleComponentInspectorEnabled(enabled: boolean): void;
26
- declare function getComponentInspector(): Promise<ComponentInspector>;
27
62
 
28
- interface OpenInEditorOptions {
29
- baseUrl?: string;
63
+ interface CustomCommandAction {
64
+ type: 'url';
65
+ /**
66
+ * Url of the action, if set, execute the action will open the url
67
+ */
68
+ src: string;
69
+ }
70
+ interface CustomCommand {
71
+ /**
72
+ * The id of the command, should be unique
73
+ */
74
+ id: string;
75
+ title: string;
76
+ description?: string;
77
+ /**
78
+ * Order of the command, bigger number will be shown first
79
+ * @default 0
80
+ */
81
+ order?: number;
82
+ /**
83
+ * Icon of the tab, support any Iconify icons, or a url to an image
84
+ */
85
+ icon?: string;
86
+ /**
87
+ * - action of the command
88
+ * - __NOTE__: This will be ignored if `children` is set
89
+ */
90
+ action?: CustomCommandAction;
91
+ /**
92
+ * - children of action, if set, execute the action will show the children
93
+ */
94
+ children?: Omit<CustomCommand, 'children'>[];
95
+ }
96
+
97
+ interface CustomInspectorOptions {
98
+ id: string;
99
+ label: string;
100
+ icon?: string;
101
+ treeFilterPlaceholder?: string;
102
+ stateFilterPlaceholder?: string;
103
+ noSelectionText?: string;
104
+ actions?: {
105
+ icon: string;
106
+ tooltip?: string;
107
+ action: () => void | Promise<void>;
108
+ }[];
109
+ nodeActions?: {
110
+ icon: string;
111
+ tooltip?: string;
112
+ action: (nodeId: string) => void | Promise<void>;
113
+ }[];
114
+ }
115
+ interface InspectorNodeTag {
116
+ label: string;
117
+ textColor: number;
118
+ backgroundColor: number;
119
+ tooltip?: string;
120
+ }
121
+ type EditStatePayload = {
122
+ value: any;
123
+ newKey?: string | null;
124
+ remove?: undefined | false;
125
+ } | {
126
+ value?: undefined;
127
+ newKey?: undefined;
128
+ remove: true;
129
+ };
130
+ interface CustomInspectorNode {
131
+ id: string;
132
+ label: string;
133
+ children?: CustomInspectorNode[];
134
+ tags?: InspectorNodeTag[];
135
+ name?: string;
30
136
  file?: string;
31
- line?: number;
32
- column?: number;
33
- host?: string;
34
137
  }
35
- declare function setOpenInEditorBaseUrl(url: string): void;
36
- declare function openInEditor(options?: OpenInEditorOptions): void;
138
+ interface CustomInspectorState {
139
+ [key: string]: (StateBase | Omit<ComponentState, 'type'>)[];
140
+ }
37
141
 
38
142
  type ComponentInstance = any;
39
143
  interface ComponentTreeNode {
@@ -115,51 +219,6 @@ interface ComponentBounds {
115
219
  height: number;
116
220
  }
117
221
 
118
- interface CustomInspectorOptions {
119
- id: string;
120
- label: string;
121
- icon?: string;
122
- treeFilterPlaceholder?: string;
123
- stateFilterPlaceholder?: string;
124
- noSelectionText?: string;
125
- actions?: {
126
- icon: string;
127
- tooltip?: string;
128
- action: () => void | Promise<void>;
129
- }[];
130
- nodeActions?: {
131
- icon: string;
132
- tooltip?: string;
133
- action: (nodeId: string) => void | Promise<void>;
134
- }[];
135
- }
136
- interface InspectorNodeTag {
137
- label: string;
138
- textColor: number;
139
- backgroundColor: number;
140
- tooltip?: string;
141
- }
142
- type EditStatePayload = {
143
- value: any;
144
- newKey?: string | null;
145
- remove?: undefined | false;
146
- } | {
147
- value?: undefined;
148
- newKey?: undefined;
149
- remove: true;
150
- };
151
- interface CustomInspectorNode {
152
- id: string;
153
- label: string;
154
- children?: CustomInspectorNode[];
155
- tags?: InspectorNodeTag[];
156
- name?: string;
157
- file?: string;
158
- }
159
- interface CustomInspectorState {
160
- [key: string]: (StateBase | Omit<ComponentState, 'type'>)[];
161
- }
162
-
163
222
  interface DevToolsAppRecords extends AppRecord {
164
223
  }
165
224
  interface DevToolsState {
@@ -396,6 +455,36 @@ interface DevToolsContextHooks extends DevToolsV6PluginAPIHooks {
396
455
  }
397
456
  declare function createDevToolsCtxHooks(): hookable.Hookable<DevToolsContextHooks & DevToolsMessagingHooks, hookable.HookKeys<DevToolsContextHooks & DevToolsMessagingHooks>>;
398
457
 
458
+ interface ComponentInspector {
459
+ enabled: boolean;
460
+ position: {
461
+ x: number;
462
+ y: number;
463
+ };
464
+ linkParams: {
465
+ file: string;
466
+ line: number;
467
+ column: number;
468
+ };
469
+ enable: () => void;
470
+ disable: () => void;
471
+ toggleEnabled: () => void;
472
+ openInEditor: (baseUrl: string, file: string, line: number, column: number) => void;
473
+ onUpdated: () => void;
474
+ }
475
+ declare function toggleComponentInspectorEnabled(enabled: boolean): void;
476
+ declare function getComponentInspector(): Promise<ComponentInspector>;
477
+
478
+ interface OpenInEditorOptions {
479
+ baseUrl?: string;
480
+ file?: string;
481
+ line?: number;
482
+ column?: number;
483
+ host?: string;
484
+ }
485
+ declare function setOpenInEditorBaseUrl(url: string): void;
486
+ declare function openInEditor(options?: OpenInEditorOptions): void;
487
+
399
488
  declare function createDevToolsApi(hooks: Hookable<DevToolsContextHooks & DevToolsMessagingHooks, HookKeys<DevToolsContextHooks & DevToolsMessagingHooks>>): {
400
489
  getInspectorTree(payload: Pick<DevToolsV6PluginAPIHookPayloads[DevToolsV6PluginAPIHookKeys.GET_INSPECTOR_TREE], "inspectorId" | "filter">): Promise<never[]>;
401
490
  getInspectorState(payload: Pick<DevToolsV6PluginAPIHookPayloads[DevToolsV6PluginAPIHookKeys.GET_INSPECTOR_STATE], "inspectorId" | "nodeId">): Promise<CustomInspectorState>;
@@ -434,9 +523,10 @@ declare function createDevToolsApi(hooks: Hookable<DevToolsContextHooks & DevToo
434
523
  };
435
524
  type DevToolsApiType = ReturnType<typeof createDevToolsApi>;
436
525
 
437
- type DevToolsKitPluginBuffer = [PluginDescriptor, PluginSetupFunction];
438
- declare const devtoolsPluginBuffer: DevToolsKitPluginBuffer[];
439
- declare function addDevToolsPluginToBuffer(pluginDescriptor: PluginDescriptor, setupFn: PluginSetupFunction): void;
526
+ declare function getDevToolsEnv(): {
527
+ vitePluginDetected: boolean;
528
+ };
529
+ declare function setDevToolsEnv(env: Partial<any>): void;
440
530
 
441
531
  interface DevToolsKitInspector {
442
532
  options: CustomInspectorOptions;
@@ -455,6 +545,7 @@ declare function getActiveInspectors(): {
455
545
  icon: string;
456
546
  packageName: string | undefined;
457
547
  homepage: string | undefined;
548
+ pluginId: string;
458
549
  }[];
459
550
  declare function getInspectorInfo(id: string): {
460
551
  id: string;
@@ -480,10 +571,9 @@ declare function getInspectorNodeActions(id: string): {
480
571
  action: (nodeId: string) => void | Promise<void>;
481
572
  }[] | undefined;
482
573
 
483
- declare function getDevToolsEnv(): {
484
- vitePluginDetected: boolean;
485
- };
486
- declare function setDevToolsEnv(env: Partial<any>): void;
574
+ type DevToolsKitPluginBuffer = [PluginDescriptor, PluginSetupFunction];
575
+ declare const devtoolsPluginBuffer: DevToolsKitPluginBuffer[];
576
+ declare function addDevToolsPluginToBuffer(pluginDescriptor: PluginDescriptor, setupFn: PluginSetupFunction): void;
487
577
 
488
578
  declare const ROUTER_KEY = "__VUE_DEVTOOLS_ROUTER__";
489
579
  declare const ROUTER_INFO_KEY = "__VUE_DEVTOOLS_ROUTER_INFO__";
@@ -580,98 +670,6 @@ interface DevToolsPlugin {
580
670
  setupFn: PluginSetupFunction;
581
671
  }
582
672
 
583
- type App = any;
584
- type VueAppInstance = ComponentInternalInstance & {
585
- type: {
586
- _componentTag: string | undefined;
587
- components: Record<string, ComponentInternalInstance['type']>;
588
- __VUE_DEVTOOLS_COMPONENT_GUSSED_NAME__: string;
589
- __isKeepAlive: boolean;
590
- devtools: {
591
- hide: boolean;
592
- };
593
- mixins: ComponentOptions[];
594
- extends: ComponentOptions;
595
- vuex: {
596
- getters: Record<string, unknown>;
597
- };
598
- computed: Record<string, unknown>;
599
- };
600
- __v_cache: Cache;
601
- __VUE_DEVTOOLS_NEXT_UID__: string;
602
- _isBeingDestroyed: boolean;
603
- _instance: VueAppInstance;
604
- _container: {
605
- _vnode: {
606
- component: VueAppInstance;
607
- };
608
- };
609
- isUnmounted: boolean;
610
- parent: VueAppInstance;
611
- appContext: {
612
- app: VueAppInstance & App & {
613
- __VUE_DEVTOOLS_NEXT_APP_RECORD_ID__: string;
614
- __VUE_DEVTOOLS_NEXT_APP_RECORD__: AppRecord;
615
- };
616
- };
617
- __VUE_DEVTOOLS_NEXT_APP_RECORD__: AppRecord;
618
- suspense: SuspenseBoundary & {
619
- suspenseKey: string;
620
- };
621
- renderContext: Record<string, unknown>;
622
- devtoolsRawSetupState: Record<string, unknown>;
623
- setupState: Record<string, unknown>;
624
- provides: Record<string | symbol, unknown>;
625
- ctx: Record<string, unknown>;
626
- } & App;
627
- interface AppRecord {
628
- id: string;
629
- name: string;
630
- app?: App;
631
- version?: string;
632
- types?: Record<string, string | symbol>;
633
- instanceMap: Map<string, VueAppInstance>;
634
- rootInstance: VueAppInstance;
635
- routerId?: string;
636
- }
637
-
638
- interface TimelineEvent<TData = any, TMeta = any> {
639
- time: number;
640
- data: TData;
641
- logType?: 'default' | 'warning' | 'error';
642
- meta?: TMeta;
643
- groupId?: number | string;
644
- title?: string;
645
- subtitle?: string;
646
- }
647
- interface ScreenshotOverlayEvent {
648
- layerId: string;
649
- renderMeta: any;
650
- }
651
- interface ScreenshotOverlayRenderContext<TData = any, TMeta = any> {
652
- screenshot: ScreenshotData;
653
- events: (TimelineEvent<TData, TMeta> & ScreenshotOverlayEvent)[];
654
- index: number;
655
- }
656
- type ScreenshotOverlayRenderResult = HTMLElement | string | false;
657
- interface ScreenshotData {
658
- time: number;
659
- }
660
- interface TimelineLayerOptions<TData = any, TMeta = any> {
661
- id: string;
662
- label: string;
663
- color: number;
664
- skipScreenshots?: boolean;
665
- groupsOnly?: boolean;
666
- ignoreNoDurationGroups?: boolean;
667
- screenshotOverlayRender?: (event: TimelineEvent<TData, TMeta> & ScreenshotOverlayEvent, ctx: ScreenshotOverlayRenderContext) => ScreenshotOverlayRenderResult | Promise<ScreenshotOverlayRenderResult>;
668
- }
669
- interface TimelineEventOptions {
670
- layerId: string;
671
- event: TimelineEvent;
672
- all?: boolean;
673
- }
674
-
675
673
  type HookAppInstance = App$1 & VueAppInstance;
676
674
  declare enum DevToolsHooks {
677
675
  APP_INIT = "app:init",
@@ -726,6 +724,11 @@ interface VueHooks {
726
724
  setupDevToolsPlugin: (pluginDescriptor: PluginDescriptor, setupFn: PluginSetupFunction) => void;
727
725
  }
728
726
 
727
+ interface RouterInfo {
728
+ currentRoute: RouteLocationNormalizedLoaded | null | Record<string, any>;
729
+ routes: RouteRecordNormalized[];
730
+ }
731
+
729
732
  type TabCategory = 'pinned' | 'app' | 'modules' | 'advanced';
730
733
  type ModuleView = ModuleIframeView | ModuleVNodeView;
731
734
  interface ModuleIframeView {
@@ -778,48 +781,48 @@ interface CustomTab {
778
781
  category?: TabCategory;
779
782
  }
780
783
 
781
- interface CustomCommandAction {
782
- type: 'url';
783
- /**
784
- * Url of the action, if set, execute the action will open the url
785
- */
786
- src: string;
784
+ interface TimelineEvent<TData = any, TMeta = any> {
785
+ time: number;
786
+ data: TData;
787
+ logType?: 'default' | 'warning' | 'error';
788
+ meta?: TMeta;
789
+ groupId?: number | string;
790
+ title?: string;
791
+ subtitle?: string;
787
792
  }
788
- interface CustomCommand {
789
- /**
790
- * The id of the command, should be unique
791
- */
793
+ interface ScreenshotOverlayEvent {
794
+ layerId: string;
795
+ renderMeta: any;
796
+ }
797
+ interface ScreenshotOverlayRenderContext<TData = any, TMeta = any> {
798
+ screenshot: ScreenshotData;
799
+ events: (TimelineEvent<TData, TMeta> & ScreenshotOverlayEvent)[];
800
+ index: number;
801
+ }
802
+ type ScreenshotOverlayRenderResult = HTMLElement | string | false;
803
+ interface ScreenshotData {
804
+ time: number;
805
+ }
806
+ interface TimelineLayerOptions<TData = any, TMeta = any> {
792
807
  id: string;
793
- title: string;
794
- description?: string;
795
- /**
796
- * Order of the command, bigger number will be shown first
797
- * @default 0
798
- */
799
- order?: number;
800
- /**
801
- * Icon of the tab, support any Iconify icons, or a url to an image
802
- */
803
- icon?: string;
804
- /**
805
- * - action of the command
806
- * - __NOTE__: This will be ignored if `children` is set
807
- */
808
- action?: CustomCommandAction;
809
- /**
810
- * - children of action, if set, execute the action will show the children
811
- */
812
- children?: Omit<CustomCommand, 'children'>[];
808
+ label: string;
809
+ color: number;
810
+ skipScreenshots?: boolean;
811
+ groupsOnly?: boolean;
812
+ ignoreNoDurationGroups?: boolean;
813
+ screenshotOverlayRender?: (event: TimelineEvent<TData, TMeta> & ScreenshotOverlayEvent, ctx: ScreenshotOverlayRenderContext) => ScreenshotOverlayRenderResult | Promise<ScreenshotOverlayRenderResult>;
813
814
  }
814
-
815
- interface RouterInfo {
816
- currentRoute: RouteLocationNormalizedLoaded | null | Record<string, any>;
817
- routes: RouteRecordNormalized[];
815
+ interface TimelineEventOptions {
816
+ layerId: string;
817
+ event: TimelineEvent;
818
+ all?: boolean;
818
819
  }
819
820
 
820
821
  declare function initDevTools(): void;
821
822
  declare function onDevToolsClientConnected(fn: () => void): Promise<void>;
822
823
 
824
+ declare function toggleHighPerfMode(state?: boolean): void;
825
+
823
826
  declare function createComponentsDevToolsPlugin(app: App): [PluginDescriptor, PluginSetupFunction];
824
827
 
825
828
  declare function setupDevToolsPlugin(pluginDescriptor: PluginDescriptor, setupFn: PluginSetupFunction): void;
@@ -827,85 +830,10 @@ declare function callDevToolsPluginSetupFn(plugin: [PluginDescriptor, PluginSetu
827
830
  declare function removeRegisteredPluginApp(app: App): void;
828
831
  declare function registerDevToolsPlugin(app: App): void;
829
832
 
830
- declare function toggleHighPerfMode(state?: boolean): void;
831
-
832
- declare function setIframeServerContext(context: HTMLIFrameElement): void;
833
-
834
- interface EventEmitter$2 {
835
- on: (name: string, handler: (data: any) => void) => void;
836
- send: (name: string, ...args: any[]) => void;
837
- }
838
- interface ViteClientContext extends EventEmitter$2 {
839
- }
840
- interface ViteDevServer {
841
- hot?: EventEmitter$2;
842
- ws?: EventEmitter$2;
843
- }
844
- declare function setViteClientContext(context: ViteClientContext): void;
845
- declare function setViteServerContext(context: ViteDevServer): void;
846
-
847
- interface EventEmitter$1 {
848
- on: (name: string, handler: (data: any) => void) => void;
849
- send: (name: string, ...args: any[]) => void;
850
- emit: (name: string, ...args: any[]) => void;
851
- }
852
- interface ElectronClientContext extends EventEmitter$1 {
853
- }
854
- interface ElectronProxyContext extends EventEmitter$1 {
855
- }
856
- interface ElectronServerContext extends EventEmitter$1 {
857
- }
858
- declare function setElectronClientContext(context: ElectronClientContext): void;
859
- declare function setElectronProxyContext(context: ElectronProxyContext): void;
860
- declare function setElectronServerContext(context: ElectronServerContext): void;
861
-
862
- interface EventEmitter {
863
- onMessage: {
864
- addListener: (listener: (name: string, ...args: any[]) => void) => void;
865
- };
866
- postMessage: (name: string, ...args: any[]) => void;
867
- }
868
- interface ExtensionClientContext extends EventEmitter {
869
- }
870
- declare function getExtensionClientContext(): ExtensionClientContext;
871
- declare function setExtensionClientContext(context: ExtensionClientContext): void;
872
-
873
- type Presets = 'iframe' | 'electron' | 'vite' | 'broadcast' | 'extension';
874
-
875
- interface CreateRpcClientOptions<RemoteFunctions> {
876
- options?: BirpcOptions<RemoteFunctions>;
877
- preset?: Presets;
878
- channel?: ChannelOptions;
879
- }
880
- interface CreateRpcServerOptions<RemoteFunctions> {
881
- options?: BirpcOptions<RemoteFunctions>;
882
- preset?: Presets;
883
- channel?: ChannelOptions;
884
- }
885
- declare function setRpcServerToGlobal<R, L>(rpc: BirpcGroup<R, L>): void;
886
- declare function getRpcClient<R, L extends object = Record<string, never>>(): BirpcReturn<R, L>;
887
- declare function getRpcServer<R, L extends object = Record<string, never>>(): BirpcGroup<R, L>;
888
- declare function setViteRpcClientToGlobal<R, L>(rpc: BirpcReturn<R, L>): void;
889
- declare function setViteRpcServerToGlobal<R, L>(rpc: BirpcGroup<R, L>): void;
890
- declare function getViteRpcClient<R, L extends object = Record<string, never>>(): BirpcReturn<R, L>;
891
- declare function getViteRpcServer<R, L extends object = Record<string, never>>(): BirpcGroup<R, L>;
892
- declare function createRpcClient<RemoteFunctions = Record<string, never>, LocalFunctions extends object = Record<string, never>>(functions: LocalFunctions, options?: CreateRpcClientOptions<RemoteFunctions>): BirpcReturn<RemoteFunctions, LocalFunctions> | undefined;
893
- declare function createRpcServer<RemoteFunctions = Record<string, never>, LocalFunctions extends object = Record<string, never>>(functions: LocalFunctions, options?: CreateRpcServerOptions<RemoteFunctions>): void;
894
- declare function createRpcProxy<RemoteFunctions = Record<string, never>, LocalFunctions extends object = Record<string, never>>(options?: CreateRpcClientOptions<RemoteFunctions>): BirpcReturn<RemoteFunctions, LocalFunctions>;
895
-
896
- interface InspectorTreeApiPayload {
897
- app?: VueAppInstance;
898
- inspectorId?: string;
899
- filter?: string;
900
- instanceId?: string;
901
- rootNodes?: ComponentTreeNode[];
902
- }
903
- interface InspectorTree {
904
- id: string;
905
- label: string;
906
- tags?: InspectorNodeTag[];
907
- children?: InspectorTree[];
908
- }
833
+ declare const UNDEFINED = "__vue_devtool_undefined__";
834
+ declare const INFINITY = "__vue_devtool_infinity__";
835
+ declare const NEGATIVE_INFINITY = "__vue_devtool_negative_infinity__";
836
+ declare const NAN = "__vue_devtool_nan__";
909
837
 
910
838
  interface ComponentBoundingRect {
911
839
  left: number;
@@ -922,6 +850,26 @@ interface ComponentBoundingRectApiPayload {
922
850
  rect?: ComponentBoundingRect;
923
851
  }
924
852
 
853
+ type customTypeEnums = 'function' | 'bigint' | 'map' | 'set' | 'store' | 'router' | 'component' | 'component-definition' | 'HTMLElement' | 'component-definition' | 'date';
854
+
855
+ type Recordable = Record<PropertyKey, any>;
856
+
857
+ type PropPath = string | string[];
858
+ interface InspectorStateEditorPayload {
859
+ app?: AppRecord['app'];
860
+ inspectorId: string;
861
+ nodeId: string;
862
+ type: string;
863
+ path: PropPath;
864
+ state: {
865
+ value: unknown;
866
+ newKey: string;
867
+ remove?: boolean;
868
+ type: string;
869
+ };
870
+ set?: (obj: Recordable, path: PropPath, value: unknown, cb?: (object: Recordable, field: string, value: unknown) => void) => unknown;
871
+ }
872
+
925
873
  interface InspectorCustomState {
926
874
  _custom?: {
927
875
  type?: string;
@@ -974,25 +922,35 @@ interface AddInspectorApiPayload {
974
922
  }[];
975
923
  }
976
924
 
977
- type Recordable = Record<PropertyKey, any>;
925
+ interface InspectorTreeApiPayload {
926
+ app?: VueAppInstance;
927
+ inspectorId?: string;
928
+ filter?: string;
929
+ instanceId?: string;
930
+ rootNodes?: ComponentTreeNode[];
931
+ }
932
+ interface InspectorTree {
933
+ id: string;
934
+ label: string;
935
+ tags?: InspectorNodeTag[];
936
+ children?: InspectorTree[];
937
+ }
978
938
 
979
- type PropPath = string | string[];
980
- interface InspectorStateEditorPayload {
981
- app?: AppRecord['app'];
982
- inspectorId: string;
983
- nodeId: string;
984
- type: string;
985
- path: PropPath;
986
- state: {
987
- value: unknown;
988
- newKey: string;
989
- remove?: boolean;
990
- type: string;
939
+ declare function getInspectorStateValueType(value: any, raw?: boolean): string;
940
+ declare function formatInspectorStateValue(value: any, quotes?: boolean, options?: {
941
+ customClass?: Partial<Record<'string', string>>;
942
+ }): any;
943
+ declare function getRaw(value: InspectorState['value']): {
944
+ value: object | string | number | boolean | null;
945
+ inherit: Record<string, any> | {
946
+ abstract: true;
991
947
  };
992
- set?: (obj: Recordable, path: PropPath, value: unknown, cb?: (object: Recordable, field: string, value: unknown) => void) => unknown;
993
- }
948
+ customType?: customTypeEnums;
949
+ };
950
+ declare function toEdit(value: unknown, customType?: customTypeEnums): string;
951
+ declare function toSubmit(value: string, customType?: customTypeEnums): any;
994
952
 
995
- type customTypeEnums = 'function' | 'bigint' | 'map' | 'set' | 'store' | 'router' | 'component' | 'component-definition' | 'HTMLElement' | 'component-definition' | 'date';
953
+ declare function isPlainObject(obj: unknown): obj is object;
996
954
 
997
955
  interface ComponentHighLighterOptions {
998
956
  bounds: ComponentBoundingRect;
@@ -1011,31 +969,74 @@ declare function cancelInspectComponentHighLighter(): void;
1011
969
  declare function inspectComponentHighLighter(): Promise<string>;
1012
970
  declare function scrollToComponent(options: ScrollToComponentOptions): void;
1013
971
 
1014
- declare function getInspectorStateValueType(value: any, raw?: boolean): string;
1015
- declare function formatInspectorStateValue(value: any, quotes?: boolean, options?: {
1016
- customClass?: Partial<Record<'string', string>>;
1017
- }): any;
1018
- declare function getRaw(value: InspectorState['value']): {
1019
- value: object | string | number | boolean | null;
1020
- inherit: Record<string, any> | {
1021
- abstract: true;
972
+ declare function updateDevToolsClientDetected(params: Record<string, boolean>): void;
973
+
974
+ interface EventEmitter$2 {
975
+ on: (name: string, handler: (data: any) => void) => void;
976
+ send: (name: string, ...args: any[]) => void;
977
+ emit: (name: string, ...args: any[]) => void;
978
+ }
979
+ interface ElectronClientContext extends EventEmitter$2 {
980
+ }
981
+ interface ElectronProxyContext extends EventEmitter$2 {
982
+ }
983
+ interface ElectronServerContext extends EventEmitter$2 {
984
+ }
985
+ declare function setElectronClientContext(context: ElectronClientContext): void;
986
+ declare function setElectronProxyContext(context: ElectronProxyContext): void;
987
+ declare function setElectronServerContext(context: ElectronServerContext): void;
988
+
989
+ interface EventEmitter$1 {
990
+ onMessage: {
991
+ addListener: (listener: (name: string, ...args: any[]) => void) => void;
1022
992
  };
1023
- customType?: customTypeEnums;
1024
- };
1025
- declare function toEdit(value: unknown, customType?: customTypeEnums): string;
1026
- declare function toSubmit(value: string, customType?: customTypeEnums): any;
993
+ postMessage: (name: string, ...args: any[]) => void;
994
+ }
995
+ interface ExtensionClientContext extends EventEmitter$1 {
996
+ }
997
+ declare function getExtensionClientContext(): ExtensionClientContext;
998
+ declare function setExtensionClientContext(context: ExtensionClientContext): void;
1027
999
 
1028
- declare function stringify<T extends object = Record<string, unknown>>(data: T): string | string[];
1029
- declare function parse(data: string, revive?: boolean): any;
1000
+ declare function setIframeServerContext(context: HTMLIFrameElement): void;
1030
1001
 
1031
- declare const UNDEFINED = "__vue_devtool_undefined__";
1032
- declare const INFINITY = "__vue_devtool_infinity__";
1033
- declare const NEGATIVE_INFINITY = "__vue_devtool_negative_infinity__";
1034
- declare const NAN = "__vue_devtool_nan__";
1002
+ interface EventEmitter {
1003
+ on: (name: string, handler: (data: any) => void) => void;
1004
+ send: (name: string, ...args: any[]) => void;
1005
+ }
1006
+ interface ViteClientContext extends EventEmitter {
1007
+ }
1008
+ interface ViteDevServer {
1009
+ hot?: EventEmitter;
1010
+ ws?: EventEmitter;
1011
+ }
1012
+ declare function setViteClientContext(context: ViteClientContext): void;
1013
+ declare function setViteServerContext(context: ViteDevServer): void;
1035
1014
 
1036
- declare function isPlainObject(obj: unknown): obj is object;
1015
+ type Presets = 'iframe' | 'electron' | 'vite' | 'broadcast' | 'extension';
1037
1016
 
1038
- declare function updateDevToolsClientDetected(params: Record<string, boolean>): void;
1017
+ interface CreateRpcClientOptions<RemoteFunctions> {
1018
+ options?: BirpcOptions<RemoteFunctions>;
1019
+ preset?: Presets;
1020
+ channel?: ChannelOptions;
1021
+ }
1022
+ interface CreateRpcServerOptions<RemoteFunctions> {
1023
+ options?: BirpcOptions<RemoteFunctions>;
1024
+ preset?: Presets;
1025
+ channel?: ChannelOptions;
1026
+ }
1027
+ declare function setRpcServerToGlobal<R, L>(rpc: BirpcGroup<R, L>): void;
1028
+ declare function getRpcClient<R, L extends object = Record<string, never>>(): BirpcReturn<R, L>;
1029
+ declare function getRpcServer<R, L extends object = Record<string, never>>(): BirpcGroup<R, L>;
1030
+ declare function setViteRpcClientToGlobal<R, L>(rpc: BirpcReturn<R, L>): void;
1031
+ declare function setViteRpcServerToGlobal<R, L>(rpc: BirpcGroup<R, L>): void;
1032
+ declare function getViteRpcClient<R, L extends object = Record<string, never>>(): BirpcReturn<R, L>;
1033
+ declare function getViteRpcServer<R, L extends object = Record<string, never>>(): BirpcGroup<R, L>;
1034
+ declare function createRpcClient<RemoteFunctions = Record<string, never>, LocalFunctions extends object = Record<string, never>>(functions: LocalFunctions, options?: CreateRpcClientOptions<RemoteFunctions>): BirpcReturn<RemoteFunctions, LocalFunctions> | undefined;
1035
+ declare function createRpcServer<RemoteFunctions = Record<string, never>, LocalFunctions extends object = Record<string, never>>(functions: LocalFunctions, options?: CreateRpcServerOptions<RemoteFunctions>): void;
1036
+ declare function createRpcProxy<RemoteFunctions = Record<string, never>, LocalFunctions extends object = Record<string, never>>(options?: CreateRpcClientOptions<RemoteFunctions>): BirpcReturn<RemoteFunctions, LocalFunctions>;
1037
+
1038
+ declare function stringify<T extends object = Record<string, unknown>>(data: T): string | string[];
1039
+ declare function parse(data: string, revive?: boolean): any;
1039
1040
 
1040
1041
  declare const devtools: {
1041
1042
  hook: VueHooks;