import { i as $, n as SchemaShape, t as MergeExtends } from "./types-BzoNhHhq.js"; import { n as ArkEnvScriptProps, t as ArkEnvScript } from "./script-CAxxM5Zm.js"; import { EnvSchema, Infer, Infer as Infer$1, type } from "arkenv"; import { distill, type as type$1 } from "arktype"; //#region src/index.d.ts /** * Extract keys from a schema type that are visible on the client: * - Keys prefixed with `NEXT_PUBLIC_` * - `NODE_ENV` (implicitly shared by Next.js) * - Keys listed in `exposeToClient` */ type ClientVisibleKeys = { [K in keyof TSchema]: K extends `NEXT_PUBLIC_${string}` ? K : K extends "NODE_ENV" ? K : K extends TExpose ? K : never }[keyof TSchema]; /** * Create a validated, type-safe environment configuration for Next.js applications (Client-side / SSR entry point). */ declare function createEnv(schema: EnvSchema, options?: { /** * Custom environment variables to expose to the client bundle. * By default, variables prefixed with `NEXT_PUBLIC_` and `NODE_ENV` are exposed automatically. * Use this option to expose custom variables that do not have the `NEXT_PUBLIC_` prefix. */ exposeToClient?: readonly TExpose[]; /** @deprecated Use `exposeToClient` instead */ expose?: readonly TExpose[]; /** @deprecated Use `exposeToClient` instead */ shared?: readonly TExpose[]; extends?: [...TExtends]; runtimeEnv?: Record; }): Readonly>, Extract>, ClientVisibleKeys>> & MergeExtends>; /** * @deprecated Use the unified flat layout signature instead: `createEnv(schema, options)` */ declare function createEnv(options: { server?: EnvSchema; client?: EnvSchema & { [K in keyof TClient]: K extends `NEXT_PUBLIC_${string}` ? unknown : never }; shared?: EnvSchema; runtimeEnv: Record & Record; }): Readonly>; declare const arkenv: typeof createEnv; //#endregion export { ArkEnvScript, type ArkEnvScriptProps, type Infer, createEnv, arkenv as default, type }; //# sourceMappingURL=index.d.ts.map