@vue/devtools-kit 7.4.4 → 7.4.5

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,4 +1,4 @@
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';
@@ -35,6 +35,140 @@ interface OpenInEditorOptions {
35
35
  declare function setOpenInEditorBaseUrl(url: string): void;
36
36
  declare function openInEditor(options?: OpenInEditorOptions): void;
37
37
 
38
+ type App = any;
39
+ type VueAppInstance = ComponentInternalInstance & {
40
+ type: {
41
+ _componentTag: string | undefined;
42
+ components: Record<string, ComponentInternalInstance['type']>;
43
+ __VUE_DEVTOOLS_COMPONENT_GUSSED_NAME__: string;
44
+ __isKeepAlive: boolean;
45
+ devtools: {
46
+ hide: boolean;
47
+ };
48
+ mixins: ComponentOptions[];
49
+ extends: ComponentOptions;
50
+ vuex: {
51
+ getters: Record<string, unknown>;
52
+ };
53
+ computed: Record<string, unknown>;
54
+ };
55
+ __v_cache: Cache;
56
+ __VUE_DEVTOOLS_NEXT_UID__: string;
57
+ _isBeingDestroyed: boolean;
58
+ _instance: VueAppInstance;
59
+ _container: {
60
+ _vnode: {
61
+ component: VueAppInstance;
62
+ };
63
+ };
64
+ isUnmounted: boolean;
65
+ parent: VueAppInstance;
66
+ appContext: {
67
+ app: VueAppInstance & App & {
68
+ __VUE_DEVTOOLS_NEXT_APP_RECORD_ID__: string;
69
+ __VUE_DEVTOOLS_NEXT_APP_RECORD__: AppRecord;
70
+ };
71
+ };
72
+ __VUE_DEVTOOLS_NEXT_APP_RECORD__: AppRecord;
73
+ suspense: SuspenseBoundary & {
74
+ suspenseKey: string;
75
+ };
76
+ renderContext: Record<string, unknown>;
77
+ devtoolsRawSetupState: Record<string, unknown>;
78
+ setupState: Record<string, unknown>;
79
+ provides: Record<string | symbol, unknown>;
80
+ ctx: Record<string, unknown>;
81
+ } & App;
82
+ interface AppRecord {
83
+ id: string;
84
+ name: string;
85
+ app?: App;
86
+ version?: string;
87
+ types?: Record<string, string | symbol>;
88
+ instanceMap: Map<string, VueAppInstance>;
89
+ rootInstance: VueAppInstance;
90
+ routerId?: string;
91
+ }
92
+
93
+ interface CustomCommandAction {
94
+ type: 'url';
95
+ /**
96
+ * Url of the action, if set, execute the action will open the url
97
+ */
98
+ src: string;
99
+ }
100
+ interface CustomCommand {
101
+ /**
102
+ * The id of the command, should be unique
103
+ */
104
+ id: string;
105
+ title: string;
106
+ description?: string;
107
+ /**
108
+ * Order of the command, bigger number will be shown first
109
+ * @default 0
110
+ */
111
+ order?: number;
112
+ /**
113
+ * Icon of the tab, support any Iconify icons, or a url to an image
114
+ */
115
+ icon?: string;
116
+ /**
117
+ * - action of the command
118
+ * - __NOTE__: This will be ignored if `children` is set
119
+ */
120
+ action?: CustomCommandAction;
121
+ /**
122
+ * - children of action, if set, execute the action will show the children
123
+ */
124
+ children?: Omit<CustomCommand, 'children'>[];
125
+ }
126
+
127
+ interface CustomInspectorOptions {
128
+ id: string;
129
+ label: string;
130
+ icon?: string;
131
+ treeFilterPlaceholder?: string;
132
+ stateFilterPlaceholder?: string;
133
+ noSelectionText?: string;
134
+ actions?: {
135
+ icon: string;
136
+ tooltip?: string;
137
+ action: () => void | Promise<void>;
138
+ }[];
139
+ nodeActions?: {
140
+ icon: string;
141
+ tooltip?: string;
142
+ action: (nodeId: string) => void | Promise<void>;
143
+ }[];
144
+ }
145
+ interface InspectorNodeTag {
146
+ label: string;
147
+ textColor: number;
148
+ backgroundColor: number;
149
+ tooltip?: string;
150
+ }
151
+ type EditStatePayload = {
152
+ value: any;
153
+ newKey?: string | null;
154
+ remove?: undefined | false;
155
+ } | {
156
+ value?: undefined;
157
+ newKey?: undefined;
158
+ remove: true;
159
+ };
160
+ interface CustomInspectorNode {
161
+ id: string;
162
+ label: string;
163
+ children?: CustomInspectorNode[];
164
+ tags?: InspectorNodeTag[];
165
+ name?: string;
166
+ file?: string;
167
+ }
168
+ interface CustomInspectorState {
169
+ [key: string]: (StateBase | Omit<ComponentState, 'type'>)[];
170
+ }
171
+
38
172
  type ComponentInstance = any;
39
173
  interface ComponentTreeNode {
40
174
  uid: string | number;
@@ -115,51 +249,6 @@ interface ComponentBounds {
115
249
  height: number;
116
250
  }
117
251
 
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
252
  interface DevToolsAppRecords extends AppRecord {
164
253
  }
165
254
  interface DevToolsState {
@@ -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;
@@ -480,10 +570,9 @@ declare function getInspectorNodeActions(id: string): {
480
570
  action: (nodeId: string) => void | Promise<void>;
481
571
  }[] | undefined;
482
572
 
483
- declare function getDevToolsEnv(): {
484
- vitePluginDetected: boolean;
485
- };
486
- declare function setDevToolsEnv(env: Partial<any>): void;
573
+ type DevToolsKitPluginBuffer = [PluginDescriptor, PluginSetupFunction];
574
+ declare const devtoolsPluginBuffer: DevToolsKitPluginBuffer[];
575
+ declare function addDevToolsPluginToBuffer(pluginDescriptor: PluginDescriptor, setupFn: PluginSetupFunction): void;
487
576
 
488
577
  declare const ROUTER_KEY = "__VUE_DEVTOOLS_ROUTER__";
489
578
  declare const ROUTER_INFO_KEY = "__VUE_DEVTOOLS_ROUTER_INFO__";
@@ -580,98 +669,6 @@ interface DevToolsPlugin {
580
669
  setupFn: PluginSetupFunction;
581
670
  }
582
671
 
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
672
  type HookAppInstance = App$1 & VueAppInstance;
676
673
  declare enum DevToolsHooks {
677
674
  APP_INIT = "app:init",
@@ -726,6 +723,11 @@ interface VueHooks {
726
723
  setupDevToolsPlugin: (pluginDescriptor: PluginDescriptor, setupFn: PluginSetupFunction) => void;
727
724
  }
728
725
 
726
+ interface RouterInfo {
727
+ currentRoute: RouteLocationNormalizedLoaded | null | Record<string, any>;
728
+ routes: RouteRecordNormalized[];
729
+ }
730
+
729
731
  type TabCategory = 'pinned' | 'app' | 'modules' | 'advanced';
730
732
  type ModuleView = ModuleIframeView | ModuleVNodeView;
731
733
  interface ModuleIframeView {
@@ -778,48 +780,48 @@ interface CustomTab {
778
780
  category?: TabCategory;
779
781
  }
780
782
 
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;
783
+ interface TimelineEvent<TData = any, TMeta = any> {
784
+ time: number;
785
+ data: TData;
786
+ logType?: 'default' | 'warning' | 'error';
787
+ meta?: TMeta;
788
+ groupId?: number | string;
789
+ title?: string;
790
+ subtitle?: string;
787
791
  }
788
- interface CustomCommand {
789
- /**
790
- * The id of the command, should be unique
791
- */
792
+ interface ScreenshotOverlayEvent {
793
+ layerId: string;
794
+ renderMeta: any;
795
+ }
796
+ interface ScreenshotOverlayRenderContext<TData = any, TMeta = any> {
797
+ screenshot: ScreenshotData;
798
+ events: (TimelineEvent<TData, TMeta> & ScreenshotOverlayEvent)[];
799
+ index: number;
800
+ }
801
+ type ScreenshotOverlayRenderResult = HTMLElement | string | false;
802
+ interface ScreenshotData {
803
+ time: number;
804
+ }
805
+ interface TimelineLayerOptions<TData = any, TMeta = any> {
792
806
  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'>[];
807
+ label: string;
808
+ color: number;
809
+ skipScreenshots?: boolean;
810
+ groupsOnly?: boolean;
811
+ ignoreNoDurationGroups?: boolean;
812
+ screenshotOverlayRender?: (event: TimelineEvent<TData, TMeta> & ScreenshotOverlayEvent, ctx: ScreenshotOverlayRenderContext) => ScreenshotOverlayRenderResult | Promise<ScreenshotOverlayRenderResult>;
813
813
  }
814
-
815
- interface RouterInfo {
816
- currentRoute: RouteLocationNormalizedLoaded | null | Record<string, any>;
817
- routes: RouteRecordNormalized[];
814
+ interface TimelineEventOptions {
815
+ layerId: string;
816
+ event: TimelineEvent;
817
+ all?: boolean;
818
818
  }
819
819
 
820
820
  declare function initDevTools(): void;
821
821
  declare function onDevToolsClientConnected(fn: () => void): Promise<void>;
822
822
 
823
+ declare function toggleHighPerfMode(state?: boolean): void;
824
+
823
825
  declare function createComponentsDevToolsPlugin(app: App): [PluginDescriptor, PluginSetupFunction];
824
826
 
825
827
  declare function setupDevToolsPlugin(pluginDescriptor: PluginDescriptor, setupFn: PluginSetupFunction): void;
@@ -827,85 +829,10 @@ declare function callDevToolsPluginSetupFn(plugin: [PluginDescriptor, PluginSetu
827
829
  declare function removeRegisteredPluginApp(app: App): void;
828
830
  declare function registerDevToolsPlugin(app: App): void;
829
831
 
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
- }
832
+ declare const UNDEFINED = "__vue_devtool_undefined__";
833
+ declare const INFINITY = "__vue_devtool_infinity__";
834
+ declare const NEGATIVE_INFINITY = "__vue_devtool_negative_infinity__";
835
+ declare const NAN = "__vue_devtool_nan__";
909
836
 
910
837
  interface ComponentBoundingRect {
911
838
  left: number;
@@ -922,6 +849,26 @@ interface ComponentBoundingRectApiPayload {
922
849
  rect?: ComponentBoundingRect;
923
850
  }
924
851
 
852
+ type customTypeEnums = 'function' | 'bigint' | 'map' | 'set' | 'store' | 'router' | 'component' | 'component-definition' | 'HTMLElement' | 'component-definition' | 'date';
853
+
854
+ type Recordable = Record<PropertyKey, any>;
855
+
856
+ type PropPath = string | string[];
857
+ interface InspectorStateEditorPayload {
858
+ app?: AppRecord['app'];
859
+ inspectorId: string;
860
+ nodeId: string;
861
+ type: string;
862
+ path: PropPath;
863
+ state: {
864
+ value: unknown;
865
+ newKey: string;
866
+ remove?: boolean;
867
+ type: string;
868
+ };
869
+ set?: (obj: Recordable, path: PropPath, value: unknown, cb?: (object: Recordable, field: string, value: unknown) => void) => unknown;
870
+ }
871
+
925
872
  interface InspectorCustomState {
926
873
  _custom?: {
927
874
  type?: string;
@@ -974,25 +921,35 @@ interface AddInspectorApiPayload {
974
921
  }[];
975
922
  }
976
923
 
977
- type Recordable = Record<PropertyKey, any>;
924
+ interface InspectorTreeApiPayload {
925
+ app?: VueAppInstance;
926
+ inspectorId?: string;
927
+ filter?: string;
928
+ instanceId?: string;
929
+ rootNodes?: ComponentTreeNode[];
930
+ }
931
+ interface InspectorTree {
932
+ id: string;
933
+ label: string;
934
+ tags?: InspectorNodeTag[];
935
+ children?: InspectorTree[];
936
+ }
978
937
 
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;
938
+ declare function getInspectorStateValueType(value: any, raw?: boolean): string;
939
+ declare function formatInspectorStateValue(value: any, quotes?: boolean, options?: {
940
+ customClass?: Partial<Record<'string', string>>;
941
+ }): any;
942
+ declare function getRaw(value: InspectorState['value']): {
943
+ value: object | string | number | boolean | null;
944
+ inherit: Record<string, any> | {
945
+ abstract: true;
991
946
  };
992
- set?: (obj: Recordable, path: PropPath, value: unknown, cb?: (object: Recordable, field: string, value: unknown) => void) => unknown;
993
- }
947
+ customType?: customTypeEnums;
948
+ };
949
+ declare function toEdit(value: unknown, customType?: customTypeEnums): string;
950
+ declare function toSubmit(value: string, customType?: customTypeEnums): any;
994
951
 
995
- type customTypeEnums = 'function' | 'bigint' | 'map' | 'set' | 'store' | 'router' | 'component' | 'component-definition' | 'HTMLElement' | 'component-definition' | 'date';
952
+ declare function isPlainObject(obj: unknown): obj is object;
996
953
 
997
954
  interface ComponentHighLighterOptions {
998
955
  bounds: ComponentBoundingRect;
@@ -1011,31 +968,74 @@ declare function cancelInspectComponentHighLighter(): void;
1011
968
  declare function inspectComponentHighLighter(): Promise<string>;
1012
969
  declare function scrollToComponent(options: ScrollToComponentOptions): void;
1013
970
 
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;
971
+ declare function updateDevToolsClientDetected(params: Record<string, boolean>): void;
972
+
973
+ interface EventEmitter$2 {
974
+ on: (name: string, handler: (data: any) => void) => void;
975
+ send: (name: string, ...args: any[]) => void;
976
+ emit: (name: string, ...args: any[]) => void;
977
+ }
978
+ interface ElectronClientContext extends EventEmitter$2 {
979
+ }
980
+ interface ElectronProxyContext extends EventEmitter$2 {
981
+ }
982
+ interface ElectronServerContext extends EventEmitter$2 {
983
+ }
984
+ declare function setElectronClientContext(context: ElectronClientContext): void;
985
+ declare function setElectronProxyContext(context: ElectronProxyContext): void;
986
+ declare function setElectronServerContext(context: ElectronServerContext): void;
987
+
988
+ interface EventEmitter$1 {
989
+ onMessage: {
990
+ addListener: (listener: (name: string, ...args: any[]) => void) => void;
1022
991
  };
1023
- customType?: customTypeEnums;
1024
- };
1025
- declare function toEdit(value: unknown, customType?: customTypeEnums): string;
1026
- declare function toSubmit(value: string, customType?: customTypeEnums): any;
992
+ postMessage: (name: string, ...args: any[]) => void;
993
+ }
994
+ interface ExtensionClientContext extends EventEmitter$1 {
995
+ }
996
+ declare function getExtensionClientContext(): ExtensionClientContext;
997
+ declare function setExtensionClientContext(context: ExtensionClientContext): void;
1027
998
 
1028
- declare function stringify<T extends object = Record<string, unknown>>(data: T): string | string[];
1029
- declare function parse(data: string, revive?: boolean): any;
999
+ declare function setIframeServerContext(context: HTMLIFrameElement): void;
1030
1000
 
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__";
1001
+ interface EventEmitter {
1002
+ on: (name: string, handler: (data: any) => void) => void;
1003
+ send: (name: string, ...args: any[]) => void;
1004
+ }
1005
+ interface ViteClientContext extends EventEmitter {
1006
+ }
1007
+ interface ViteDevServer {
1008
+ hot?: EventEmitter;
1009
+ ws?: EventEmitter;
1010
+ }
1011
+ declare function setViteClientContext(context: ViteClientContext): void;
1012
+ declare function setViteServerContext(context: ViteDevServer): void;
1035
1013
 
1036
- declare function isPlainObject(obj: unknown): obj is object;
1014
+ type Presets = 'iframe' | 'electron' | 'vite' | 'broadcast' | 'extension';
1037
1015
 
1038
- declare function updateDevToolsClientDetected(params: Record<string, boolean>): void;
1016
+ interface CreateRpcClientOptions<RemoteFunctions> {
1017
+ options?: BirpcOptions<RemoteFunctions>;
1018
+ preset?: Presets;
1019
+ channel?: ChannelOptions;
1020
+ }
1021
+ interface CreateRpcServerOptions<RemoteFunctions> {
1022
+ options?: BirpcOptions<RemoteFunctions>;
1023
+ preset?: Presets;
1024
+ channel?: ChannelOptions;
1025
+ }
1026
+ declare function setRpcServerToGlobal<R, L>(rpc: BirpcGroup<R, L>): void;
1027
+ declare function getRpcClient<R, L extends object = Record<string, never>>(): BirpcReturn<R, L>;
1028
+ declare function getRpcServer<R, L extends object = Record<string, never>>(): BirpcGroup<R, L>;
1029
+ declare function setViteRpcClientToGlobal<R, L>(rpc: BirpcReturn<R, L>): void;
1030
+ declare function setViteRpcServerToGlobal<R, L>(rpc: BirpcGroup<R, L>): void;
1031
+ declare function getViteRpcClient<R, L extends object = Record<string, never>>(): BirpcReturn<R, L>;
1032
+ declare function getViteRpcServer<R, L extends object = Record<string, never>>(): BirpcGroup<R, L>;
1033
+ declare function createRpcClient<RemoteFunctions = Record<string, never>, LocalFunctions extends object = Record<string, never>>(functions: LocalFunctions, options?: CreateRpcClientOptions<RemoteFunctions>): BirpcReturn<RemoteFunctions, LocalFunctions> | undefined;
1034
+ declare function createRpcServer<RemoteFunctions = Record<string, never>, LocalFunctions extends object = Record<string, never>>(functions: LocalFunctions, options?: CreateRpcServerOptions<RemoteFunctions>): void;
1035
+ declare function createRpcProxy<RemoteFunctions = Record<string, never>, LocalFunctions extends object = Record<string, never>>(options?: CreateRpcClientOptions<RemoteFunctions>): BirpcReturn<RemoteFunctions, LocalFunctions>;
1036
+
1037
+ declare function stringify<T extends object = Record<string, unknown>>(data: T): string | string[];
1038
+ declare function parse(data: string, revive?: boolean): any;
1039
1039
 
1040
1040
  declare const devtools: {
1041
1041
  hook: VueHooks;