(props: DevtoolsOptions)
| 40 | export type DevtoolsOptions = Partial<DevtoolsOptionsWithDefaults> |
| 41 | |
| 42 | export function createDevtools(props: DevtoolsOptions) { |
| 43 | |
| 44 | const ctx = createAppCtx(props) |
| 45 | |
| 46 | return { |
| 47 | output: ctx.output, |
| 48 | input: ctx.input, |
| 49 | Devtools() { |
| 50 | return ( |
| 51 | <div class={ui.devtools_root_class + ' h-inherit'}> |
| 52 | <ui.Styles /> |
| 53 | <ui.ErrorOverlay |
| 54 | footer={ctx.options.errorOverlayFooter()} |
| 55 | catchWindowErrors={ctx.options.catchWindowErrors} |
| 56 | > |
| 57 | <AppCtx.Provider value={ctx}> |
| 58 | <App headerSubtitle={ctx.options.headerSubtitle()} /> |
| 59 | </AppCtx.Provider> |
| 60 | </ui.ErrorOverlay> |
| 61 | </div> |
| 62 | ) |
| 63 | }, |
| 64 | } |
| 65 | } |
| 66 | |
| 67 | /** |
| 68 | * Views when disposed can cache their state to be restored when opened again. |
no test coverage detected
searching dependent graphs…