import { RefObject } from 'react'; import { Env } from './types.js'; import * as React from "react"; /** * React context exposing the per-Boundary Env ref. The ref itself is * stable across renders — readers grab `.current` at call time. * * @internal */ export declare const Context: React.Context>; /** * Hook that returns a read-only handle to the per-Boundary {@link Env}. * Reads use plain dot notation (`env.session`) and always reflect the * latest value, even after `await` boundaries — the handle is a * `Proxy` that delegates property access to the live ref. * * Writes are not exposed here. Mutate the Env inside an action handler * via `context.actions.produce(({ model, env }) => { env.x = ... })` * — the same Immer-style recipe used for the model. Mutations do * **not** trigger a re-render; drive view state through the model. * * Prefer `app.useEnv()` from an {@link App} instance — the App * factory infers the Env's shape from `app.env` and types every * read/write against it. The bare `useEnv()` exists for non-App * call sites and returns the loose {@link Env} record type. */ export declare function useEnv(): Env; /** * Internal accessor for the per-Boundary Env ref — used by the * Resource layer to pass a fresh snapshot to each fetcher invocation * and by the action layer to write through `context.actions.produce`. * Not exported from the library. * * @internal */ export declare function useEnvRef(): RefObject;