#pragma once #include "imgui.h" // Design tokens — colores, spacing, radius, font-size. // Inspirados en el DESIGN_SYSTEM de @fn_library (Mantine v9 dark + indigo primary). // Reemplaza hardcode disperso de ImVec4(...) por constantes semánticas. namespace fn_tokens { namespace colors { // Primary (indigo-inspired, Mantine indigo.6) constexpr ImVec4 primary {0.25f, 0.37f, 0.85f, 1.0f}; constexpr ImVec4 primary_hover {0.30f, 0.42f, 0.90f, 1.0f}; // Semantic constexpr ImVec4 success {0.13f, 0.70f, 0.42f, 1.0f}; constexpr ImVec4 warning {0.95f, 0.60f, 0.20f, 1.0f}; constexpr ImVec4 error {0.87f, 0.26f, 0.30f, 1.0f}; constexpr ImVec4 info {0.22f, 0.55f, 0.95f, 1.0f}; // Background (dark by default — matches DESIGN_SYSTEM.md §2 & §8) constexpr ImVec4 bg {0.08f, 0.08f, 0.10f, 1.0f}; // window bg constexpr ImVec4 surface {0.12f, 0.12f, 0.15f, 1.0f}; // panels/cards constexpr ImVec4 surface_hover {0.16f, 0.16f, 0.20f, 1.0f}; // Text constexpr ImVec4 text {0.95f, 0.95f, 0.95f, 1.0f}; constexpr ImVec4 text_muted {0.60f, 0.60f, 0.65f, 1.0f}; constexpr ImVec4 text_dim {0.40f, 0.40f, 0.45f, 1.0f}; // Border constexpr ImVec4 border {0.20f, 0.20f, 0.25f, 1.0f}; } namespace spacing { constexpr float xs = 4.0f; constexpr float sm = 8.0f; constexpr float md = 12.0f; constexpr float lg = 16.0f; constexpr float xl = 24.0f; } namespace radius { constexpr float none = 0.0f; constexpr float sm = 3.0f; constexpr float md = 5.0f; constexpr float lg = 8.0f; constexpr float xl = 12.0f; } namespace font_size { constexpr float xs = 10.0f; constexpr float sm = 12.0f; constexpr float md = 14.0f; // default constexpr float lg = 18.0f; constexpr float xl = 24.0f; constexpr float xxl = 32.0f; } // Aplica los tokens al ImGuiStyle global. Llamar una vez al arrancar la app, // después de ImGui::CreateContext() y antes del primer frame. void apply_dark_theme(); } // namespace fn_tokens