@@ -43,13 +43,18 @@ export const ACTION_UNHANDLED_ERROR = 'unhandled-error'
43
43
export const ACTION_UNHANDLED_REJECTION = 'unhandled-rejection'
44
44
export const ACTION_DEBUG_INFO = 'debug-info'
45
45
export const ACTION_DEV_INDICATOR = 'dev-indicator'
46
+
46
47
export const ACTION_ERROR_OVERLAY_OPEN = 'error-overlay-open'
47
48
export const ACTION_ERROR_OVERLAY_CLOSE = 'error-overlay-close'
48
49
export const ACTION_ERROR_OVERLAY_TOGGLE = 'error-overlay-toggle'
50
+
49
51
export const ACTION_BUILDING_INDICATOR_SHOW = 'building-indicator-show'
50
52
export const ACTION_BUILDING_INDICATOR_HIDE = 'building-indicator-hide'
51
53
export const ACTION_RENDERING_INDICATOR_SHOW = 'rendering-indicator-show'
52
54
export const ACTION_RENDERING_INDICATOR_HIDE = 'rendering-indicator-hide'
55
+
56
+ export const ACTION_DEVTOOLS_PANEL_OPEN = 'dev-tools-panel-open'
57
+ export const ACTION_DEVTOOLS_PANEL_CLOSE = 'dev-tools-panel-close'
53
58
export const ACTION_DEVTOOLS_PANEL_TOGGLE = 'dev-tools-panel-toggle'
54
59
55
60
export const STORAGE_KEY_THEME = '__nextjs-dev-tools-theme'
@@ -123,6 +128,12 @@ export interface RenderingIndicatorHideAction {
123
128
type : typeof ACTION_RENDERING_INDICATOR_HIDE
124
129
}
125
130
131
+ export interface DevToolsPanelOpenAction {
132
+ type : typeof ACTION_DEVTOOLS_PANEL_OPEN
133
+ }
134
+ export interface DevToolsPanelCloseAction {
135
+ type : typeof ACTION_DEVTOOLS_PANEL_CLOSE
136
+ }
126
137
export interface DevToolsPanelToggleAction {
127
138
type : typeof ACTION_DEVTOOLS_PANEL_TOGGLE
128
139
}
@@ -145,6 +156,8 @@ export type DispatcherEvent =
145
156
| BuildingIndicatorHideAction
146
157
| RenderingIndicatorShowAction
147
158
| RenderingIndicatorHideAction
159
+ | DevToolsPanelOpenAction
160
+ | DevToolsPanelCloseAction
148
161
| DevToolsPanelToggleAction
149
162
150
163
const REACT_ERROR_STACK_BOTTOM_FRAME_REGEX =
@@ -347,6 +360,12 @@ export function useErrorOverlayReducer(
347
360
case ACTION_RENDERING_INDICATOR_HIDE : {
348
361
return { ...state , renderingIndicator : false }
349
362
}
363
+ case ACTION_DEVTOOLS_PANEL_OPEN : {
364
+ return { ...state , isDevToolsPanelOpen : true }
365
+ }
366
+ case ACTION_DEVTOOLS_PANEL_CLOSE : {
367
+ return { ...state , isDevToolsPanelOpen : false }
368
+ }
350
369
case ACTION_DEVTOOLS_PANEL_TOGGLE : {
351
370
return { ...state , isDevToolsPanelOpen : ! state . isDevToolsPanelOpen }
352
371
}
0 commit comments