// Root App const { useState: useStateApp } = React; const DEFAULT_TWEAKS = /*EDITMODE-BEGIN*/{ "tileStyle": "warm", "showHalos": true, "accent": "#E31E24" }/*EDITMODE-END*/; function App() { const [selected, setSelected] = useStateApp(null); const [view, setView] = useStateApp("panorama"); const [tweaks, setTweak] = window.useTweaks ? window.useTweaks(DEFAULT_TWEAKS) : [DEFAULT_TWEAKS, () => {}]; // apply accent dynamically React.useEffect(() => { document.documentElement.style.setProperty("--red", tweaks.accent || "#E31E24"); }, [tweaks.accent]); // tile style — apply via class on body React.useEffect(() => { document.body.dataset.tile = tweaks.tileStyle || "warm"; }, [tweaks.tileStyle]); const [panelOpen, setPanelOpen] = useStateApp(false); React.useEffect(() => { if (selected !== null) setPanelOpen(true); }, [selected]); const data = window.FDB_DATA; return (
{/* Header */}
Fundación Don Bosco · Transformando Vidas
FECU Social · 2025
Presencia territorial
14
Proyectos
19
Comunas
2.043
Personas atendidas
2
Regiones
{/* Map */} {/* Legend rail */}
Áreas Programáticas {Object.entries(data.areas).map(([name, def]) => (
{name}
))}
Sede Central · Santiago
n Comuna con cobertura
→ Acercar el mapa revela proyectos individuales
{/* Panel */} {/* Footer */}
Datos al 31 dic 2025 · Fuente: FECU Social Fundación Don Bosco
Arrastrar para desplazar · Rueda para acercar · Click en comuna para detalle
{/* Tweaks Panel */} {window.TweaksPanel && ( setTweak("tileStyle", v)} options={[ { value: "warm", label: "Cálido" }, { value: "neutral", label: "Neutral" }, { value: "mono", label: "Mono" }, ]} /> setTweak("accent", v)} options={["#E30613", "#C2002A", "#A8181E", "#D9531E", "#1F4E8C"]} /> )} {/* Mobile: backdrop + close + FAB */}
{ setPanelOpen(false); setSelected(null); }} />
); } const root = ReactDOM.createRoot(document.getElementById("root")); root.render();