import type { NotionBlockId } from "../bridge/ids.js"; import type { CustomBlockManifest } from "../bridge/manifest.js"; import type { CustomBlockPage } from "../bridge/pages/page.js"; import type { NotionParent } from "../bridge/parent.js"; import type { NotionTheme } from "../bridge/theme.js"; import type { NotionUser } from "../bridge/users/user.js"; /** * Returns this custom block's ID. This is stable throughout the block's lifetime. * * Throws if called before `initCustomBlock` has resolved. * * @example * const blockId = useBlockId() */ export declare function useBlockId(): NotionBlockId; /** * Returns the block's parent in the document tree. Re-renders when the host sends * a parent location update (e.g. the block moves into a different container). * * Throws if called before `initCustomBlock` has resolved. * * @example * const parent = useParent() */ export declare function useParent(): NotionParent; /** * Returns the nearest enclosing page ancestor. Re-renders when the host sends * a page location update. * * Throws if called before `initCustomBlock` has resolved. * * @example * const page = usePage() */ export declare function usePage(): CustomBlockPage; /** * Returns the host's current theme. Re-renders on every `themeChanged` message from the host. * * Throws if called before `initCustomBlock` has resolved. * * @example * const theme = useTheme() */ export declare function useTheme(): NotionTheme; /** * Returns the viewing user's Notion profile. Re-renders whenever the host sends a * `currentUserChanged` message. * * Throws if called before `initCustomBlock` has resolved. `await` it before mounting. * * @example * const me = useCurrentUser() * console.log(me.id, me.name, me.person.email) */ export declare function useCurrentUser(): NotionUser; /** * Returns the author-declared manifest loaded from `custom_blocks.json` — the semantic * data-source keys plus their declared `name`, `description`, and property declarations. * `null` when the block ships no manifest. * * This is the configuration the block declared, not host-resolved bindings: use * `useDataSource(key)` for rows and resolved schema. Handy for enumerating the declared * data-source keys (e.g. picking a default key, or rendering a key switcher). */ export declare function useManifest(): CustomBlockManifest | null; //# sourceMappingURL=useRuntimeState.d.ts.map