CoolFace
Apppublic

AK-21/Graphite-Industrial-Intelligence

sourceHugging Faceupdated 3mo agoView on Hugging Face
0likes
1import type {Program} from 'estree-jsx'2import type {Data as HastData, Literal as HastLiteral} from 'hast'3import type {Data as MdastData, Literal as MdastLiteral} from 'mdast'4 5export {6  mdxExpressionFromMarkdown,7  mdxExpressionToMarkdown8} from './lib/index.js'9 10/**11 * MDX expression node, occurring in flow (block).12 */13export interface MdxFlowExpression extends MdastLiteral {14  /**15   * Node type.16   */17  type: 'mdxFlowExpression'18 19  /**20   * Data associated with the mdast MDX expression (flow).21   */22  data?: MdxFlowExpressionData | undefined23}24 25/**26 * Info associated with mdast MDX expression (flow) nodes by the ecosystem.27 */28export interface MdxFlowExpressionData extends MdastData {29  /**30   * Program node from estree.31   */32  estree?: Program | null | undefined33}34 35/**36 * MDX expression node, occurring in text (phrasing).37 */38export interface MdxTextExpression extends MdastLiteral {39  /**40   * Node type.41   */42  type: 'mdxTextExpression'43 44  /**45   * Data associated with the mdast MDX expression (text).46   */47  data?: MdxTextExpressionData | undefined48}49 50/**51 * Info associated with mdast MDX expression (text) nodes by the ecosystem.52 */53export interface MdxTextExpressionData extends MdastData {54  /**55   * Program node from estree.56   */57  estree?: Program | null | undefined58}59 60/**61 * MDX expression node, occurring in flow (block), for hast.62 */63export interface MdxFlowExpressionHast extends HastLiteral {64  /**65   * Node type.66   */67  type: 'mdxFlowExpression'68 69  /**70   * Data associated with the hast MDX expression (flow).71   */72  data?: MdxFlowExpressionHastData | undefined73}74 75/**76 * Info associated with hast MDX expression (flow) nodes by the ecosystem.77 */78export interface MdxFlowExpressionHastData extends HastData {79  /**80   * Program node from estree.81   */82  estree?: Program | null | undefined83}84 85/**86 * MDX expression node, occurring in text (phrasing), for hast.87 */88export interface MdxTextExpressionHast extends HastLiteral {89  /**90   * Node type.91   */92  type: 'mdxTextExpression'93 94  /**95   * Data associated with the hast MDX expression (text).96   */97  data?: MdxTextExpressionHastData | undefined98}99 100/**101 * Info associated with hast MDX expression (text) nodes by the ecosystem.102 */103export interface MdxTextExpressionHastData extends HastData {104  /**105   * Program node from estree.106   */107  estree?: Program | null | undefined108}109 110// Add nodes to mdast content.111declare module 'mdast' {112  interface RootContentMap {113    /**114     * MDX expression node, occurring in text (phrasing).115     */116    mdxTextExpression: MdxTextExpression117    /**118     * MDX expression node, occurring in flow (block).119     */120    mdxFlowExpression: MdxFlowExpression121  }122 123  interface PhrasingContentMap {124    /**125     * MDX expression node, occurring in text (phrasing).126     */127    mdxTextExpression: MdxTextExpression128  }129 130  interface BlockContentMap {131    /**132     * MDX expression node, occurring in flow (block).133     */134    mdxFlowExpression: MdxFlowExpression135  }136}137 138// Add nodes to hast content.139declare module 'hast' {140  interface RootContentMap {141    /**142     * MDX expression node, occurring in flow (block).143     */144    mdxFlowExpression: MdxFlowExpressionHast145    /**146     * MDX expression node, occurring in text (phrasing).147     */148    mdxTextExpression: MdxTextExpressionHast149  }150 151  interface ElementContentMap {152    /**153     * MDX expression node, occurring in flow (block).154     */155    mdxFlowExpression: MdxFlowExpressionHast156    /**157     * MDX expression node, occurring in text (phrasing).158     */159    mdxTextExpression: MdxTextExpressionHast160  }161}162