UNPKG

@ipikuka/mdx

Version:

An opinionated wrapper of `next-mdx-remote-client`

20 lines (19 loc) 956 B
import React from "react"; import type { EvaluateProps, EvaluateResult, MDXRemoteProps } from "next-mdx-remote-client/rsc"; export type { MDXRemoteProps, MDXRemoteOptions, EvaluateProps, EvaluateOptions, EvaluateResult, MDXComponents, MDXContent, MDXProps, MDXModule, } from "next-mdx-remote-client/rsc"; import { type TocItem } from "@ipikuka/plugins"; export type { TocItem } from "@ipikuka/plugins"; /** * * Opinionated evaluate wrapper for "next-mdx-remote/rsc" * */ export declare function evaluate<TFrontmatter extends Record<string, unknown> = Record<string, unknown>, TScope extends Record<string, unknown> = Record<string, unknown>>({ source, options, components, }: EvaluateProps<TScope>): Promise<EvaluateResult<TFrontmatter, TScope & { toc?: TocItem[]; }>>; /** * * MDXRemote which uses opinionated wrapper evalute for "next-mdx-remote/rsc" * */ export declare function MDXRemote(props: MDXRemoteProps): Promise<React.JSX.Element>;