/* auto-generated by NAPI-RS */ /* eslint-disable */ /** * Apply MDAST commands and convert to HAST handle in one step. * The MDAST handle is consumed (emptied). */ export declare function applyCommandsAndConvertToHastHandle(handle: MdastHandle, commandBuf: Uint8Array, convertOptions?: JsConvertOptions | undefined | null): HastHandle /** * Apply a command buffer to a HAST handle's arena in-place. Returns how many * patches were dropped because their target lived inside a subtree this pass * removed or replaced (see the lenient note below); the JS pipeline warns when * non-zero. Mirrors `apply_commands_to_mdast_handle`. */ export declare function applyCommandsToHandle(handle: HastHandle, commandBuf: Uint8Array): number /** * Apply a command buffer to an MDAST handle in-place. Returns how many patches * were dropped because their target lived inside a subtree this pass removed or * replaced (see the lenient note below); the JS pipeline warns when non-zero. */ export declare function applyCommandsToMdastHandle(handle: MdastHandle, commandBuf: Uint8Array): number /** Compile a HAST handle's arena to MDX JavaScript. Does not consume the handle. */ export declare function compileHandle(handle: HastHandle, options?: JsMdxOptions | undefined | null): string /** Compile MDX source directly to JavaScript. */ export declare function compileMdx(source: string, options?: JsMdxOptions | undefined | null, features?: JsFeatures | undefined | null, convertOptions?: JsConvertOptions | undefined | null): string /** Convert an MDAST handle to a HAST handle. The MDAST handle is consumed (emptied). */ export declare function convertMdastToHastHandle(handle: MdastHandle, convertOptions?: JsConvertOptions | undefined | null): HastHandle /** * Parse markdown source and convert to HAST. Returns an opaque handle. * The arena stays in Rust memory, no buffer is copied to JS. */ export declare function createHastHandle(source: string, features?: JsFeatures | undefined | null, convertOptions?: JsConvertOptions | undefined | null): HastHandle /** Parse markdown source into an MDAST arena handle. */ export declare function createMdastHandle(source: string, features?: JsFeatures | undefined | null): MdastHandle /** Parse MDX source and convert to HAST. Returns an opaque handle. */ export declare function createMdxHastHandle(source: string, features?: JsFeatures | undefined | null, convertOptions?: JsConvertOptions | undefined | null): HastHandle /** Parse MDX source into an MDAST arena handle. */ export declare function createMdxMdastHandle(source: string, features?: JsFeatures | undefined | null): MdastHandle /** * Release a handle's arena memory. The handle becomes empty but remains * valid (subsequent calls are no-ops or return empty results). */ export declare function dropHandle(handle: AnyHandle): void /** * Get the source string from a handle. Kind-agnostic: source is the * original markdown/MDX input and is identical across MDAST and HAST. */ export declare function getHandleSource(handle: AnyHandle): string /** * Return the first YAML or TOML frontmatter block in the MDAST arena, if any. * Walks the root node's direct children and returns the first yaml/toml literal. */ export declare function getMdastFrontmatter(handle: MdastHandle): JsFrontmatter | null /** * Read the node_data JSON blob for a node. Returns null if none is set. * Works for both MDAST and HAST handles. */ export declare function getNodeData(handle: AnyHandle, nodeId: number): string | null /** * MDAST→HAST conversion options passed from JavaScript. * * Input-only: `object_to_js = false` because `FunctionRef` only crosses * JS → Rust. A `JsConvertOptions` never gets serialized back to JS. */ export interface JsConvertOptions { /** `