UNPKG

@markslides/renderer

Version:
53 lines (45 loc) 1.73 kB
import { Marp } from '@marp-team/marp-core'; declare const slideConfigConst: { themes: readonly string[]; classes: readonly [{ readonly label: "light"; readonly value: "normal"; }, { readonly label: "dark"; readonly value: "invert"; }]; sizes: readonly ["4:3", "16:9"]; }; type SlideTheme = (typeof slideConfigConst.themes)[number]; type SlideClass = (typeof slideConfigConst.classes)[number]['value']; type SlideSize = (typeof slideConfigConst.sizes)[number]; interface SlideConfigState { header: string; footer: string; title: string; paginate: boolean; theme: SlideTheme; class: SlideClass; size: SlideSize; } declare const appMarp: { createInstance: (slideConfigState?: SlideConfigState, containerClassName?: string) => Marp; getDefaultInstance: (slideConfigState?: SlideConfigState) => Marp; }; declare function useDefaultMarpRender(slideConfig: string | SlideConfigState, content: string): { html: string | null; css: string | null; comments: string[][] | null; refresh: () => void; }; declare function useIndependentMarpRender(containerClassName: string, slideConfig: string | SlideConfigState, content: string): { html: string | null; css: string | null; comments: string[][] | null; refresh: () => void; }; declare const slideConfigUtil: { generateMarpConfigFromSlideConfigState: (configState: SlideConfigState) => string; generateSlideConfigStateFromMarpConfig: (marpConfig: string) => SlideConfigState; }; export { type SlideClass, type SlideConfigState, type SlideSize, type SlideTheme, appMarp, slideConfigConst, slideConfigUtil, useDefaultMarpRender, useIndependentMarpRender };