import { ChildrenLike, CSSAttribute, VirtualDOM } from '@youwol/rx-vdom'; import { BehaviorSubject, Observable } from 'rxjs'; import { Output } from './state'; import { OutputMode } from './cell-views'; /** * Represents deported outputs view. * * They are typically included from a DOM definition with tag name `cell-output` in MarkDown content, * see {@link DeportedOutputsView.FromDom}. */ export declare class DeportedOutputsView implements VirtualDOM<'div'> { readonly tag = "div"; /** * Classes associated to the view. */ readonly class: string; readonly children: ChildrenLike; /** * The channel in which views are emitted when running the associated cell. */ readonly output$: Observable; readonly style: CSSAttribute; /** * The current display mode. */ readonly mode$: BehaviorSubject; /** * Defines the methods to retrieve constructor's arguments from the DOM element `cell-output` within * MarkDown content. * * * Be mindful of the conversion from `camelCase` to `kebab-case`. * */ static readonly FromDomAttributes: { cellId: (e: HTMLElement) => string; defaultContent: (e: HTMLElement) => string; fullScreen: (e: HTMLElement) => boolean; style: (e: HTMLElement) => CSSAttribute; class: (e: HTMLElement) => string; inlined: (e: HTMLElement) => boolean; }; /** * Initialize an instance of {@link DeportedOutputsView} from a DOM element `cell-output` in MarkDown content * (the parameter `output$` is automatically provided). * * * The static property {@link DeportedOutputsView.FromDomAttributes | FromDomAttributes} * defines the mapping between the DOM element and the constructor's attributes. * * * @param _p * @param _p.elem The DOM element. * @param _p.output$ The output views channel, automatically provided. */ static FromDom({ elem, output$, }: { elem: HTMLElement; output$: Observable; }): DeportedOutputsView; /** * Initialize a new instance. * * @param params * @param params.defaultContent The default content (as Markdown) displayed before an output is emitted from * `output$`. * @param params.output$ Observable over the outputs to display. * @param params.fullScreen Whether to add a menu to allow expanding the output. * @param params.style Style to apply to this element. It does not apply to the `defaultContent` view. * @param params.classList Classes added to this element. It does not apply to the `defaultContent` view. * @param params.inlined If `true`, adjust the display mode to fit as an inlined element within a text. * When inlined, the option `fullScreen` is not enabled. */ constructor(params: { defaultContent: string; output$: Observable; fullScreen?: boolean; style?: CSSAttribute; class?: string; inlined?: boolean; }); }