/** * Copyright (c) 2018-2020 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author David Sehnal * @author Alexander Rose */ import * as React from 'react'; import { Observable } from 'rxjs'; import { PluginUIContext } from './context.js'; import { ColorAccent } from './controls/common.js'; export declare const PluginReactContext: React.Context; export declare abstract class PluginUIComponent

extends React.Component

{ static contextType: React.Context; readonly plugin: PluginUIContext; private subs; protected subscribe(obs: Observable, action: (v: T) => void): void; componentWillUnmount(): void; protected init?(): void; constructor(props: P, context?: any); } export declare abstract class PurePluginUIComponent

extends React.PureComponent { static contextType: React.Context; readonly plugin: PluginUIContext; private subs; protected subscribe(obs: Observable, action: (v: T) => void): void; componentWillUnmount(): void; protected init?(): void; constructor(props: P, context?: any); } export type _Props = C extends React.Component ? P : never; export type _State = C extends React.Component ? S : never; export type CollapsableProps = { initiallyCollapsed?: boolean; header?: string; }; export type CollapsableState = { isCollapsed: boolean; header: string; description?: string; isHidden?: boolean; brand?: { svg?: React.FC; accent: ColorAccent; }; }; export declare abstract class CollapsableControls

extends PluginUIComponent

{ toggleCollapsed(): void; componentDidUpdate(prevProps: P & CollapsableProps): void; protected abstract defaultState(): (S & CollapsableState); protected abstract renderControls(): JSX.Element | null; render(): import("react/jsx-runtime").JSX.Element | null; constructor(props: P & CollapsableProps, context?: any); }