import type { MdxJsxFlowElement, MdxJsxTextElement } from 'mdast-util-mdx-jsx'; import type { ElementType } from 'react'; import type { LiteralUnion } from 'type-fest'; type UnionToIntersection = (U extends unknown ? (k: U) => void : never) extends (k: infer I) => void ? I : never; type NamespacedUnion>> = { [NS in keyof TShape]: { [K in keyof TShape[NS]]: `${NS & string}.${TShape[NS][K] & string}`; }; }[keyof TShape]; type Namespacified>> = UnionToIntersection>; /** * Creates namespaced component name strings from a shape definition. * * @example * const DEFAULT_SHAPE = { * CodePreview: { * Root: 'Root', * Render: 'Render', * Code: 'Code', * }, * } as const * * const components = namespacify(DEFAULT_SHAPE) * console.log(components.Root) // 'CodePreview.Root' * * // With overrides: * const components = namespacify(DEFAULT_SHAPE, { CodePreview: 'MyPreview' }) * console.log(components.Root) // 'MyPreview.Root' */ export declare function namespacify>>(shape: TShape, overrides?: { [K in keyof TShape]?: string; }): Namespacified; export declare function jsxFlowElement>(name: T, props?: Record | MdxJsxFlowElement['attributes'] | null, children?: MdxJsxFlowElement['children']): MdxJsxFlowElement; export declare function jsxTextElement(name: string, props?: Record | MdxJsxTextElement['attributes'] | null, children?: MdxJsxTextElement['children']): MdxJsxTextElement; export {};