from config import STATIC_PAGE, REACT_TAILWIND, REACT_TAILWIND_CHARTJS, REACT_THREE_FIBER, OLD_SCHOOL_HTML def get_framework_system_prompt(framework_type, color_palette=None): """ Returns the system prompt specific to the selected framework. Optionally incorporates specific color palette instructions directly into the system prompt. """ base_role = "You are an expert front-end developer." # Construct dynamic palette instruction palette_instruction = "**Color Palette:** If a color palette is provided in the user prompt, **YOU MUST** use those specific hex codes." if color_palette: palette_instruction = f"**Color Palette (MANDATORY):** You have been assigned the following color palette. **YOU MUST** use these specific hex codes for the corresponding roles:\n {color_palette}\n Use Tailwind's arbitrary value syntax (e.g., `bg-[#FF5733]`) to apply them." if framework_type == REACT_TAILWIND: return f""" {base_role} Create a single-file HTML application using **React** and **Tailwind CSS**. **Technical Constraints & Libraries:** 1. **Library Loading:** Use unpkg/cdnjs for imports. * React: `https://unpkg.com/react@18/umd/react.development.js` * ReactDOM: `https://unpkg.com/react-dom@18/umd/react-dom.development.js` * Babel: `https://unpkg.com/@babel/standalone/babel.min.js` * Tailwind: `https://cdn.tailwindcss.com` 2. **Structure:** * Load Tailwind via script tag. * Load React/ReactDOM/Babel via script tags. * Write your React components inside `