react-slide-craft
Version:
Library for creating slides in React.
304 lines (229 loc) • 12.6 kB
TypeScript
import { default as default_2 } from 'react';
import { JSX } from 'react';
import { JSX as JSX_2 } from 'react/jsx-runtime';
export declare type Align = "start" | "center" | "end" | "between" | "around";
export declare const AutoList: (props: AutoListProps) => JSX_2.Element;
export declare type AutoListProps = {
items: string[];
textColor?: string;
defaultFontSize?: string;
lineHeight?: number;
listMarker: ListMarkerKind_2;
listItemHighlight?: HighlightTextProps | undefined;
};
export declare type BaseSlideFrameProps = {
textColor?: string | undefined;
backgroundColor?: string | undefined;
backgroundImage?: string | undefined;
padding?: string | undefined;
cornerRadius?: number | undefined;
backgroundClassName?: string | undefined;
backgroundStyle?: default_2.CSSProperties | undefined;
};
export declare type BaseTextProps = TextProps & HighlightTextProps & {
text: string;
};
export declare const BodyText: (props: BodyTextProps) => JSX_2.Element;
export declare type BodyTextProps = BaseTextProps;
export declare const BoldBodyText: (props: BodyTextProps) => JSX_2.Element;
export declare type BorderOptions = {
color?: string;
width?: number;
style?: default_2.CSSProperties["borderStyle"] | undefined;
};
export declare const CaptionText: (props: CaptionTextProps) => JSX_2.Element;
export declare type CaptionTextProps = BaseTextProps;
export declare const Codeblock: (props: CodeblockProps) => JSX_2.Element;
declare const codeblockLanguages: readonly ["oneC", "1c", "abnf", "accesslog", "actionscript", "ada", "angelscript", "apache", "applescript", "arcade", "arduino", "armasm", "asciidoc", "aspectj", "autohotkey", "autoit", "avrasm", "awk", "axapta", "bash", "basic", "bnf", "brainfuck", "cLike", "c-like", "c", "cal", "capnproto", "ceylon", "clean", "clojureRepl", "clojure-repl", "clojure", "cmake", "coffeescript", "coq", "cos", "cpp", "crmsh", "crystal", "csharp", "csp", "css", "d", "dart", "delphi", "diff", "django", "dns", "dockerfile", "dos", "dsconfig", "dts", "dust", "ebnf", "elixir", "elm", "erb", "erlangRepl", "erlang-repl", "erlang", "excel", "fix", "flix", "fortran", "fsharp", "gams", "gauss", "gcode", "gherkin", "glsl", "gml", "go", "golo", "gradle", "groovy", "haml", "handlebars", "haskell", "haxe", "hsp", "htmlbars", "http", "hy", "inform7", "ini", "irpf90", "isbl", "java", "javascript", "jbossCli", "jboss-cli", "json", "juliaRepl", "julia-repl", "julia", "kotlin", "lasso", "latex", "ldif", "leaf", "less", "lisp", "livecodeserver", "livescript", "llvm", "lsl", "lua", "makefile", "markdown", "mathematica", "matlab", "maxima", "mel", "mercury", "mipsasm", "mizar", "mojolicious", "monkey", "moonscript", "n1ql", "nginx", "nim", "nix", "node-repl", "nsis", "objectivec", "ocaml", "openscad", "oxygene", "parser3", "perl", "pf", "pgsql", "php", "plaintext", "pony", "powershell", "processing", "profile", "prolog", "properties", "protobuf", "puppet", "purebasic", "python", "python-repl", "q", "qml", "r", "reasonml", "rib", "roboconf", "routeros", "rsl", "ruby", "ruleslanguage", "rust", "sas", "scala", "scheme", "scilab", "scss", "shell", "smali", "smalltalk", "sml", "sqf", "sql", "stan", "stata", "step21", "stylus", "subunit", "swift", "taggerscript", "tap", "tcl", "thrift", "tp", "twig", "typescript", "vala", "vbnet", "vbscript", "vbscript-html", "verilog", "vhdl", "vim", "x86asm", "xl", "xml", "xquery", "yaml", "zephir"];
declare type CodeblockLanguagesType = typeof codeblockLanguages[number];
export declare type CodeblockProps = {
children: string;
language?: CodeblockLanguagesType | undefined;
theme?: CodeblockThemeType | undefined;
windowControlStyle?: WindowControlStyleType | undefined;
width?: string;
height?: string;
fontSize?: string;
cornerRadius?: string;
dropShadow?: boolean;
};
declare const codeblockThemes: readonly ["a11yDark", "a11yLight", "agate", "anOldHope", "androidstudio", "arduinoLight", "arta", "ascetic", "atelierCaveDark", "atelierCaveLight", "atelierDuneDark", "atelierDuneLight", "atelierEstuaryDark", "atelierEstuaryLight", "atelierForestDark", "atelierForestLight", "atelierHeathDark", "atelierHeathLight", "atelierLakesideDark", "atelierLakesideLight", "atelierPlateauDark", "atelierPlateauLight", "atelierSavannaDark", "atelierSavannaLight", "atelierSeasideDark", "atelierSeasideLight", "atelierSulphurpoolDark", "atelierSulphurpoolLight", "atomOneDarkReasonable", "atomOneDark", "atomOneLight", "brownPaper", "codepenEmbed", "colorBrewer", "darcula", "dark", "defaultStyle", "docco", "dracula", "far", "foundation", "githubGist", "github", "gml", "googlecode", "gradientDark", "gradientLight", "grayscale", "gruvboxDark", "gruvboxLight", "hopscotch", "hybrid", "idea", "irBlack", "isblEditorDark", "isblEditorLight", "kimbieDark", "kimbieLight", "lightfair", "lioshi", "magula", "monoBlue", "monokaiSublime", "monokai", "nightOwl", "nnfxDark", "nnfx", "nord", "obsidian", "ocean", "paraisoDark", "paraisoLight", "pojoaque", "purebasic", "qtcreatorDark", "qtcreatorLight", "railscasts", "rainbow", "routeros", "schoolBook", "shadesOfPurple", "solarizedDark", "solarizedLight", "srcery", "stackoverflowDark", "stackoverflowLight", "sunburst", "tomorrowNightBlue", "tomorrowNightBright", "tomorrowNightEighties", "tomorrowNight", "tomorrow", "vs", "vs2015", "xcode", "xt256", "zenburn"];
declare type CodeblockThemeType = typeof codeblockThemes[number];
export declare const Column: (props: ContainerBaseProps) => JSX_2.Element;
export declare const CommonCircleButton: (props: CommonCircleButtonProps) => JSX_2.Element;
export declare type CommonCircleButtonProps = {
backgroundColor?: string | null;
icon?: JSX.Element | null;
isDisabled?: boolean;
onClick: () => void;
};
export declare const Container: (props: ContainerProps) => JSX_2.Element;
export declare type ContainerBaseProps = {
align?: Align;
crossAlign?: Align;
gap?: string;
padding?: string;
textColor?: string;
backgroundColor?: string;
width?: string;
height?: string;
minWidth?: string;
minHeight?: string;
cornerRadius?: number;
border?: BorderOptions | undefined;
containerStyle?: default_2.CSSProperties | undefined;
children?: default_2.ReactNode;
};
export declare type ContainerProps = ContainerBaseProps & {
direction?: "row" | "column";
};
export declare const CoverSlideTemplate: (props: CoverSlideTemplateProps) => JSX_2.Element;
export declare type CoverSlideTemplateProps = {
title: string;
subTitle?: string;
color?: string | undefined;
subTitleColor?: string | undefined;
align?: SlideAlign | undefined;
slideStyle?: SlideBaseCoreProps;
};
export declare const CustomText: (props: CustomTextProps) => JSX_2.Element;
export declare type CustomTextProps = BaseTextProps & {
size?: string | undefined;
};
export declare const FloatContainer: (props: FloatContainerProps) => JSX_2.Element;
export declare type FloatContainerProps = ContainerBaseProps & {
top?: string;
bottom?: string;
right?: string;
left?: string;
zIndex?: number;
children: default_2.ReactNode;
};
export declare const genSlideObject: (component: () => JSX.Element, options?: SlideObjectOptions) => SlideObject;
export declare const HeadlineText: (props: HeadlineTextProps) => JSX_2.Element;
export declare type HeadlineTextProps = BaseTextProps;
export declare type HighlightTextProps = {
highlightColor?: string | undefined;
highlightFontSize?: string | undefined;
highlightFontWeight?: string | undefined;
highlightClassName?: string | undefined;
highlightStyle?: default_2.CSSProperties | undefined;
};
declare const Image_2: (props: ImageProps) => JSX_2.Element;
export { Image_2 as Image }
export declare type ImageProps = {
src: string;
alt: string;
width?: string;
height?: string;
};
export declare const List: (props: ListProps) => JSX_2.Element;
declare type ListItem = JSX.Element | string;
export declare type ListMarkerKind = "dot" | "number" | "none";
declare type ListMarkerKind_2 = "dot" | "number" | "none";
export declare type ListProps = {
items: ListItem[];
width?: string;
height?: string;
gap?: string;
textStyle?: ListTextStyle;
highlightTextStyle?: HighlightTextProps;
align?: Align | undefined;
crossAlign?: Align | undefined;
marker?: ListMarkerKind;
markerColor?: string;
};
declare type ListTextStyle = TextProps & {
size?: string;
};
export declare const ParseText: (props: ParseTextProps) => JSX_2.Element;
export declare type ParseTextProps = {
text: string;
spanClassName?: string | undefined;
spanStyle?: default_2.CSSProperties | undefined;
};
export declare const QuoteText: (props: QuoteTextProps) => JSX_2.Element;
export declare type QuoteTextProps = BaseTextProps & {
size?: string | undefined;
};
export declare const Row: (props: ContainerBaseProps) => JSX_2.Element;
export declare const SectionTitleText: (props: SectionTitleTextProps) => JSX_2.Element;
export declare type SectionTitleTextProps = BaseTextProps;
export declare type SlidCoreProps = {
slides: Slide[];
defaultSlide?: () => JSX.Element;
baseSlideStyle?: SlideBaseCoreProps | undefined;
backgroundColor?: string;
isShowSlideButtonAlways?: boolean;
isShowSlideButtonIndex?: boolean;
};
export declare type Slide = (() => JSX.Element) | SlideObject;
export declare type SlideAlign = "left" | "center" | "right";
export declare const SlideBase: (props: SlideBaseProps) => JSX_2.Element;
export declare type SlideBaseCoreProps = {
textColor?: string | undefined;
fontFamily?: string | undefined;
backgroundColor?: string | undefined;
backgroundImage?: string | undefined;
padding?: string | undefined;
cornerRadius?: number | undefined;
backgroundClassName?: string | undefined;
backgroundStyle?: default_2.CSSProperties | undefined;
};
export declare type SlideBaseProps = SlideBaseCoreProps & {
children: default_2.ReactNode;
};
export declare const SlideButton: (props: SlideButtonProps) => JSX_2.Element;
export declare type SlideButtonProps = {
currentNumber: number;
totalCount: number;
isShowIndex?: boolean;
handleBack: () => void;
handleNext: () => void;
};
export declare const SlideCore: (props: SlidCoreProps) => JSX_2.Element;
export declare const SlideFrame: (props: SlideFrameProps) => JSX_2.Element;
export declare type SlideFrameProps = BaseSlideFrameProps & {
children: default_2.ReactNode;
};
export declare type SlideObject = {
render: () => JSX.Element;
options?: SlideObjectOptions;
};
export declare type SlideObjectOptions = {
isBaseStyle?: boolean;
};
export declare const Spacer: (props: SpacerProps) => JSX_2.Element;
export declare type SpacerProps = {
width?: string;
height?: string;
};
export declare const SubTitleText: (props: SubTitleTextProps) => JSX_2.Element;
export declare type SubTitleTextProps = BaseTextProps;
export declare type TextProps = {
color?: string | undefined;
weight?: string | undefined;
align?: default_2.CSSProperties["textAlign"] | undefined;
fontFamily?: string | undefined;
className?: string | undefined;
style?: default_2.CSSProperties | undefined;
};
export declare const TitleAndBodySlideTemplate: (props: TitleAndBodySlideTemplateProps) => JSX_2.Element;
declare type TitleAndBodySlideTemplateProps = {
title: string;
titleColor?: string | undefined;
slideStyle?: SlideBaseCoreProps;
children?: default_2.ReactNode;
};
export declare const TitleText: (props: TitleTextProps) => JSX_2.Element;
export declare type TitleTextProps = BaseTextProps;
export declare const TitleWithBgAndBodySlideTemplate: (props: TitleWithBgAndBodySlideTemplateProps) => JSX_2.Element;
export declare type TitleWithBgAndBodySlideTemplateProps = {
title: string;
titleColor?: string | undefined;
titleBgColor?: string | undefined;
slideStyle?: SlideBaseCoreProps | undefined;
children?: default_2.ReactNode;
};
declare type WindowControlStyleType = "default" | "transparency" | "none";
export { }