@signcl/react-ipynb-renderer
Version:
A react component that displays an ipynb file.
109 lines • 3.56 kB
TypeScript
export declare const _default: import("@playwright/test").PlaywrightTestConfig<{}, {}>;
export default _default;
export declare const _default: import("@playwright/test").PlaywrightTestConfig<{}, {}>;
export default _default;
export declare const Context: React.Context<ContextType>;
export declare const defaultHtmlFilter: HtmlFilter;
export declare const remarkLatexEnvironment: () => Transformer;
export type OutputType = {
name?: string;
ename?: string;
evalue?: string;
traceback?: string[];
data?: {
'text/plain'?: string[];
'text/html'?: string[];
'text/latex'?: string[];
'image/png'?: string;
'image/jpeg'?: string;
'image/gif'?: string;
'image/svg+xml'?: string;
'application/javascript'?: string[];
};
output_type?: string;
png?: string;
jpeg?: string;
gif?: string;
svg?: string;
text?: string[];
execution_count?: number;
metadata?: {
scrolled?: boolean;
};
};
export type CellType = {
attachments?: {
[s: string]: {
[s: string]: string;
};
};
cell_type?: string;
execution_count?: number | null;
prompt_number?: number;
auto_number?: number;
source?: string[];
outputs?: OutputType[];
input?: string[];
};
export type SyntaxThemeType = 'atomDark' | 'cb' | 'coy' | 'darcula' | 'dark' | 'duotoneDark' | 'duotoneEarth' | 'duotoneForest' | 'duotoneLight' | 'duotoneSea' | 'duotoneSpace' | 'funky' | 'ghcolors' | 'hopscotch' | 'okaidia' | 'pojoaque' | 'prism' | 'solarizedlight' | 'tomorrow' | 'twilight' | 'vscDarkPlus' | 'xonokai';
export type LanguageType = 'python' | 'r' | 'julia' | 'haskell' | 'ruby';
export type HtmlFilter = (html: string) => string;
export type IpynbType = {
cells: CellType[];
worksheets?: {
cells: CellType[];
}[];
};
export type BaseProps = {
ipynb: IpynbType;
syntaxTheme?: SyntaxThemeType;
language?: LanguageType;
bgTransparent?: boolean;
htmlFilter?: HtmlFilter;
seqAsExecutionCount?: boolean;
onLoad?: () => void;
};
export type MarkdownProps = {
className: string;
text: string;
};
export type ContextType = {
syntaxTheme: SyntaxThemeType;
language: LanguageType;
bgTransparent: boolean;
Markdown: React.FC<MarkdownProps>;
htmlFilter: HtmlFilter;
markdownOptions: any;
seqAsExecutionCount: boolean;
};
export type Ipynb = IpynbType;
export type Props = BaseProps & {
markdownOptions?: MarkdownOptionsForMathjax;
};
export declare const IpynbRenderer: React.NamedExoticComponent<BaseProps & {
markdownOptions?: MarkdownOptionsForMathjax;
} & React.RefAttributes<HTMLDivElement>>;
export type Ipynb = IpynbType;
export type Props = BaseProps & {
markdownOptions?: MarkdownOptionsForKatex;
};
export declare const IpynbRenderer: React.NamedExoticComponent<BaseProps & {
markdownOptions?: MarkdownOptionsForKatex;
} & React.RefAttributes<HTMLDivElement>>;
type CellProps = {
cell: CellType;
seq: number;
};
export declare const Cell: React.FC<CellProps>;
export type MarkdownOptionsForKatex = {
remarkMath?: typeof defaultRemarkMath;
remarkMathOptions?: RemarkMathOptions;
katexOptions?: KatexOptions;
};
export declare const MarkdownForKatex: React.FC<MarkdownProps>;
export type MarkdownOptionsForMathjax = {
remarkMath?: typeof defaultRemarkMath;
remarkMathOptions?: RemarkMathOptions;
mathjaxOptions?: MathJaxOptions;
};
export declare const MarkdownForMathjax: React.FC<MarkdownProps>;