import { ClientRuntimeConfig, RuntimeConfig, RuntimeConfigInput } from "@yanuaraditia/config"; import React from "react"; //#region src/context.d.ts type AnyRuntimeConfig = RuntimeConfig | ClientRuntimeConfig; //#endregion //#region src/server-provider.d.ts interface SSRRuntimeConfigProviderProps { children: React.ReactNode; /** Optional nonce for Content-Security-Policy. */ nonce?: string; } /** * SSR-aware RuntimeConfigProvider for React Router v7 / Remix apps. * * Drop it into your root layout — no props, no `useRuntimeConfig`, no * `RuntimeConfigScript`. It handles everything automatically: * * - **Server render**: reads from `useRuntimeConfig()` (populated when you * `import '#runtime-config'` in `entry.server.tsx`) and injects * `window.__RUNTIME_CONFIG__` via an inline `