@vue/devtools-api 6.0.0-beta.11 → 6.0.0-beta.15

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.
@@ -11,6 +11,7 @@ export interface DevtoolsPluginApi {
11
11
  addInspector(options: CustomInspectorOptions): any;
12
12
  sendInspectorTree(inspectorId: string): any;
13
13
  sendInspectorState(inspectorId: string): any;
14
+ selectInspectorNode(inspectorId: string, nodeId: string): any;
14
15
  getComponentBounds(instance: ComponentInstance): Promise<ComponentBounds>;
15
16
  getComponentName(instance: ComponentInstance): Promise<string>;
16
17
  getComponentInstances(app: App): Promise<ComponentInstance[]>;
@@ -66,6 +67,11 @@ export interface CustomInspectorOptions {
66
67
  treeFilterPlaceholder?: string;
67
68
  stateFilterPlaceholder?: string;
68
69
  noSelectionText?: string;
70
+ actions?: {
71
+ icon: string;
72
+ tooltip?: string;
73
+ action: () => void | Promise<void>;
74
+ }[];
69
75
  }
70
76
  export interface CustomInspectorNode {
71
77
  id: string;
@@ -44,23 +44,32 @@ export interface ComponentPropState extends ComponentStateBase {
44
44
  }
45
45
  export declare type ComponentBuiltinCustomStateTypes = 'function' | 'map' | 'set' | 'reference' | 'component' | 'component-definition' | 'router' | 'store';
46
46
  export interface ComponentCustomState extends ComponentStateBase {
47
- value: {
48
- _custom: {
49
- type: ComponentBuiltinCustomStateTypes | string;
50
- display?: string;
51
- tooltip?: string;
52
- value?: any;
47
+ value: CustomState;
48
+ }
49
+ export declare type CustomState = {
50
+ _custom: {
51
+ type: ComponentBuiltinCustomStateTypes | string;
52
+ display?: string;
53
+ tooltip?: string;
54
+ value?: any;
55
+ abstract?: boolean;
56
+ file?: string;
57
+ uid?: number;
58
+ readOnly?: boolean;
59
+ /** Configure immediate child fields */
60
+ fields?: {
53
61
  abstract?: boolean;
54
- file?: string;
55
- uid?: number;
56
- readOnly?: boolean;
57
- /** Configure immediate child fields */
58
- fields?: {
59
- abstract?: boolean;
60
- };
61
62
  };
63
+ id?: any;
64
+ actions?: {
65
+ icon: string;
66
+ tooltip?: string;
67
+ action: () => void | Promise<void>;
68
+ }[];
69
+ /** internal */
70
+ _reviveId?: number;
62
71
  };
63
- }
72
+ };
64
73
  export declare type ComponentState = ComponentStateBase | ComponentPropState | ComponentCustomState;
65
74
  export interface ComponentDevtoolsOptions {
66
75
  hide?: boolean;
@@ -17,7 +17,9 @@ export declare const enum Hooks {
17
17
  GET_COMPONENT_ROOT_ELEMENTS = "getComponentRootElements",
18
18
  EDIT_COMPONENT_STATE = "editComponentState",
19
19
  GET_COMPONENT_DEVTOOLS_OPTIONS = "getAppDevtoolsOptions",
20
+ GET_COMPONENT_RENDER_CODE = "getComponentRenderCode",
20
21
  INSPECT_TIMELINE_EVENT = "inspectTimelineEvent",
22
+ TIMELINE_CLEARED = "timelineCleared",
21
23
  GET_INSPECTOR_TREE = "getInspectorTree",
22
24
  GET_INSPECTOR_STATE = "getInspectorState",
23
25
  EDIT_INSPECTOR_STATE = "editInspectorState"
@@ -98,6 +100,10 @@ export declare type HookPayloads = {
98
100
  componentInstance: ComponentInstance;
99
101
  options: ComponentDevtoolsOptions;
100
102
  };
103
+ [Hooks.GET_COMPONENT_RENDER_CODE]: {
104
+ componentInstance: ComponentInstance;
105
+ code: string;
106
+ };
101
107
  [Hooks.INSPECT_TIMELINE_EVENT]: {
102
108
  app: App;
103
109
  layerId: string;
@@ -105,6 +111,7 @@ export declare type HookPayloads = {
105
111
  all?: boolean;
106
112
  data: any;
107
113
  };
114
+ [Hooks.TIMELINE_CLEARED]: Record<string, never>;
108
115
  [Hooks.GET_INSPECTOR_TREE]: {
109
116
  app: App;
110
117
  inspectorId: string;
@@ -122,6 +129,7 @@ export declare type HookPayloads = {
122
129
  inspectorId: string;
123
130
  nodeId: string;
124
131
  path: string[];
132
+ type: string;
125
133
  state: EditStatePayload;
126
134
  set: (object: any, path: string | (string[]), value: any, cb?: (object: any, field: string, value: any) => void) => void;
127
135
  };
@@ -152,7 +160,9 @@ export interface Hookable<TContext> {
152
160
  getComponentRootElements(handler: HookHandler<HookPayloads[Hooks.GET_COMPONENT_ROOT_ELEMENTS], TContext>): any;
153
161
  editComponentState(handler: HookHandler<HookPayloads[Hooks.EDIT_COMPONENT_STATE], TContext>): any;
154
162
  getComponentDevtoolsOptions(handler: HookHandler<HookPayloads[Hooks.GET_COMPONENT_DEVTOOLS_OPTIONS], TContext>): any;
163
+ getComponentRenderCode(handler: HookHandler<HookPayloads[Hooks.GET_COMPONENT_RENDER_CODE], TContext>): any;
155
164
  inspectTimelineEvent(handler: HookHandler<HookPayloads[Hooks.INSPECT_TIMELINE_EVENT], TContext>): any;
165
+ timelineCleared(handler: HookHandler<HookPayloads[Hooks.TIMELINE_CLEARED], TContext>): any;
156
166
  getInspectorTree(handler: HookHandler<HookPayloads[Hooks.GET_INSPECTOR_TREE], TContext>): any;
157
167
  getInspectorState(handler: HookHandler<HookPayloads[Hooks.GET_INSPECTOR_STATE], TContext>): any;
158
168
  editInspectorState(handler: HookHandler<HookPayloads[Hooks.EDIT_INSPECTOR_STATE], TContext>): any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue/devtools-api",
3
- "version": "6.0.0-beta.11",
3
+ "version": "6.0.0-beta.15",
4
4
  "description": "Interact with the Vue devtools from the page",
5
5
  "main": "lib/cjs/index.js",
6
6
  "browser": "lib/esm/index.js",