"use client"; import { defineRegistry, DataProvider, VisibilityProvider, ActionProvider } from "@json-render/react"; import { catalog } from "./catalog"; import { ReactNode } from "react"; export const { registry } = defineRegistry(catalog, { components: { RecipeHeader: ({ props }) => (

{props.title}

👨‍🍳 Chef: {props.chef} 🇫🇷 Origin: {props.origin} ⏱️ Prep: {props.prepTime} 🍽️ Serves: {props.servings}
), ChefInfo: ({ props }) => (
{props.imageUrl && ( {props.name} )}

{props.name}

{props.bio}

📖 View Original Recipe
), IngredientList: ({ props }) => (

🥚 {props.title}

), InstructionSteps: ({ props }) => (

📝 Instructions

    {props.steps.map((step: any) => (
  1. {step.number}

    {step.instruction}

  2. ))}
), TipCard: ({ props }) => (
💡

“{props.tip}”

— {props.author}

), RecipeCard: ({ props, children }) => (
{props.imageUrl && ( {props.title} )}

{props.title}

{props.description}

{children}
), }, }); // Provider wrapper for all required contexts - wraps entire app once export function Provider({ children }: { children: ReactNode }) { return ( {children} ); }