/** * FieldPolicyProvider — the form-level entry point for policy-driven forms. * * Receives a resolved {@link ResolvedObjectFieldPolicy} **as props** (SSR * `initialData` or a client fetch by the app). Owns mode state (`basic`/ * `advanced`) and publishes the reactive context consumed by `PolicyField`, * `ModeSwitch`, `AdvancedFields`, and `FormHelp`. * * No `smrt-web` import in the core primitive — an optional `./web` adapter can * wire live invalidation for apps that want it; this component is policy-source * agnostic. * * SSR seeding: props seed `$state` via `untrack()` so the first render reflects * the request, with a client-only `$effect` resync — the same pattern as * ThemeProvider (`smrt-ui/src/themes/ThemeProvider.svelte:53-70`). */ import type { Snippet } from 'svelte'; import type { ResolvedObjectFieldPolicy } from '../../types.js'; import { type FieldPolicyMode } from '../context.svelte.js'; export interface Props { /** * Pre-resolved field policy for the object. Pass the output of * `resolveFieldPolicy()` (server-side) or the `resolveBatch` endpoint * response (client-side). */ policy: ResolvedObjectFieldPolicy; /** Initial display mode — 'basic' hides advanced-tier fields. */ mode?: FieldPolicyMode; /** Children rendered inside the provider. */ children?: Snippet; } declare const FieldPolicyProvider: import("svelte").Component; type FieldPolicyProvider = ReturnType; export default FieldPolicyProvider; //# sourceMappingURL=FieldPolicyProvider.svelte.d.ts.map