1- import { ComponentTreeNode , InspectedComponentData , ComponentInstance } from './component'
1+ import { ComponentTreeNode , InspectedComponentData , ComponentInstance , ComponentDevtoolsOptions } from './component'
22import { App } from './app'
33import { CustomInspectorNode , CustomInspectorState , TimelineEvent } from './api'
44
@@ -17,6 +17,7 @@ export const enum Hooks {
1717 GET_ELEMENT_COMPONENT = 'getElementComponent' ,
1818 GET_COMPONENT_ROOT_ELEMENTS = 'getComponentRootElements' ,
1919 EDIT_COMPONENT_STATE = 'editComponentState' ,
20+ GET_COMPONENT_DEVTOOLS_OPTIONS = 'getAppDevtoolsOptions' ,
2021 INSPECT_TIMELINE_EVENT = 'inspectTimelineEvent' ,
2122 GET_INSPECTOR_TREE = 'getInspectorTree' ,
2223 GET_INSPECTOR_STATE = 'getInspectorState' ,
@@ -91,6 +92,10 @@ export type HookPayloads = {
9192 path : string [ ]
9293 state : EditStatePayload
9394 }
95+ [ Hooks . GET_COMPONENT_DEVTOOLS_OPTIONS ] : {
96+ componentInstance : ComponentInstance
97+ options : ComponentDevtoolsOptions
98+ }
9499 [ Hooks . INSPECT_TIMELINE_EVENT ] : {
95100 app : App
96101 layerId : string
@@ -147,6 +152,7 @@ export interface Hookable<TContext> {
147152 getElementComponent ( handler : HookHandler < HookPayloads [ Hooks . GET_ELEMENT_COMPONENT ] , TContext > )
148153 getComponentRootElements ( handler : HookHandler < HookPayloads [ Hooks . GET_COMPONENT_ROOT_ELEMENTS ] , TContext > )
149154 editComponentState ( handler : HookHandler < HookPayloads [ Hooks . EDIT_COMPONENT_STATE ] , TContext > )
155+ getComponentDevtoolsOptions ( handler : HookHandler < HookPayloads [ Hooks . GET_COMPONENT_DEVTOOLS_OPTIONS ] , TContext > )
150156 inspectTimelineEvent ( handler : HookHandler < HookPayloads [ Hooks . INSPECT_TIMELINE_EVENT ] , TContext > )
151157 getInspectorTree ( handler : HookHandler < HookPayloads [ Hooks . GET_INSPECTOR_TREE ] , TContext > )
152158 getInspectorState ( handler : HookHandler < HookPayloads [ Hooks . GET_INSPECTOR_STATE ] , TContext > )
0 commit comments