import { type ReactNode } from "react"; import { type InitCustomBlockOptions } from "../index.js"; import "./NotionCustomBlock.css"; /** * Props accepted by {@link NotionCustomBlock}. */ export type NotionCustomBlockProps = InitCustomBlockOptions & { children: ReactNode; /** * Rendered while the SDK ↔ host handshake is in progress. Defaults to * `null` (nothing). */ fallback?: ReactNode; /** * Rendered when the handshake fails. Either a node, or a function that * receives the `Error`. When omitted, a friendly default error card is * rendered with developer details — replace it for production templates. */ errorFallback?: ReactNode | ((error: Error) => ReactNode); /** * Whether the provider should automatically post resize messages so the * host iframe matches the content height of `#root`. Defaults to `true`. * Pass `false` when you want to use the default block size and are ok * with scrollbars within the Notion client. * * @default true */ autoResize?: boolean; }; /** * Top-level wrapper that runs the SDK ↔ host handshake and gates `children` * until it resolves. Passes `timeoutMs` straight through to * {@link initCustomBlock}. * * Templates that prefer not to write a `Root` gating component (or top-level * `await`) can mount their app entirely inside this provider: * * ```tsx * ReactDOM.createRoot(root).render( * * * , * ) * ``` * * Inside `children`, every SDK hook is guaranteed to return a populated * value. Outside the provider (or during the loading window), they throw. */ export declare function NotionCustomBlock({ children, timeoutMs, fallback, errorFallback, autoResize, }: NotionCustomBlockProps): import("react/jsx-runtime").JSX.Element; //# sourceMappingURL=NotionCustomBlock.d.ts.map