import { P as ParserConfig, T as Transformer, D as Delta, b as TNode } from './ast-types-U4BC1m-E.js'; export { i as isEmbedNode, h as isTextNode } from './ast-types-U4BC1m-E.js'; import { B as BlockMergerConfig } from './block-merger-D5SME1EO.js'; /** * Options for {@link parseQuillDelta}. */ interface ParseQuillDeltaOptions { /** * Additional block attribute handlers merged on top of the defaults. * Use this to support custom block-level formats. */ extraBlockAttributes?: ParserConfig['blockAttributes']; /** * Embed types that are block-level (rendered as standalone blocks * instead of being placed inside a paragraph). * @default ['video'] */ blockEmbeds?: string[]; /** * Configuration for the {@link blockMerger} transformer that merges * consecutive same-style blocks (paragraphs, blockquotes, headers, * code blocks) into single blocks with `
` separators. * * Pass `false` to disable the block merger entirely. * * @default { multiLineParagraph: true, multiLineBlockquote: true, multiLineHeader: true, multiLineCodeblock: true } */ blockMerger?: BlockMergerConfig | false; /** * Additional transformers appended after the standard ones * (listGrouper, tableGrouper, codeBlockGrouper, blockMerger). */ extraTransformers?: Transformer[]; /** * Replace the standard transformer pipeline entirely. * When provided, `extraTransformers` is ignored. */ transformers?: Transformer[]; } /** * One-call convenience function: parses a Quill Delta into a fully * transformed AST ready for rendering. * * Bundles `DEFAULT_BLOCK_ATTRIBUTES`, `listGrouper`, `tableGrouper`, * `codeBlockGrouper`, and `blockMerger` so the 80% use case is a single * function call. * * @example * ```ts * import { parseQuillDelta } from 'quill-delta-renderer'; * import { SemanticHtmlRenderer } from 'quill-delta-renderer/html'; * * const ast = parseQuillDelta(delta); * const html = new SemanticHtmlRenderer().render(ast); * ``` * * @example * ```ts * // With custom block attributes and extra transformers * const ast = parseQuillDelta(delta, { * extraBlockAttributes: { * 'my-widget': (value) => ({ blockType: 'widget', blockAttrs: { widgetId: value } }), * }, * extraTransformers: [myCustomGrouper], * }); * ``` */ declare function parseQuillDelta(delta: Delta, options?: ParseQuillDeltaOptions): TNode; export { Delta, type ParseQuillDeltaOptions, TNode, Transformer, parseQuillDelta };