import { NodeProps } from "@intlayer/core/interpreter"; import { ResolvedEditor } from "@intlayer/types/module_augmentation"; import { PropsWithChildren, ReactNode } from "react"; /** * Content node returned by `useIntlayer`. * * Without the editor it is typed as its value (`"Hello" & { value: "Hello" }`) * so it can go straight into string props (`aria-label={content.title}`). * With the editor, it is a React node wrapping the editable selector, so * string props must use `.value`. */ export type IntlayerNode = ResolvedEditor; type RenderIntlayerNodeProps = PropsWithChildren<{ value: T; children: ReactNode; additionalProps?: { [key: string]: any; }; }>; /** * Renders content as a React element that also behaves like its value * (`node.value`, `${node}`, `node.toUpperCase()`). * * The node is a copy of the element built on a shared prototype serving the * value's members, rather than a Proxy: React reads an element's fields many * times while reconciling, and a Proxy trap makes each read several times * slower. * * @param props - The value, the rendered children and extra node members. * @returns The renderable node. */ export declare const renderIntlayerNode: ({ children, value, additionalProps }: RenderIntlayerNodeProps) => IntlayerNode; export {}; //# sourceMappingURL=IntlayerNode.d.ts.map