{ nombre }
diff --git a/src/lib/components/ConfiguradorView.svelte b/src/lib/components/ConfiguradorView.svelte
index 5871d0c..bbd3962 100644
--- a/src/lib/components/ConfiguradorView.svelte
+++ b/src/lib/components/ConfiguradorView.svelte
@@ -2,68 +2,154 @@
import BarraLateral from "../components/BarraLateral.svelte";
import BotonAcabado from "./BotonAcabado.svelte";
import BotonEstancia from "./BotonEstancia.svelte";
+
+
+ import { selections, appState, getAvailableGroups, imageSrc, selectedAdds } from '../stores/sel.svelte.js';
+ import { proyecto } from '../../data/data_proyecto';
+ import {onMount} from "svelte";
+ import {empresaData} from "../../data/data_empresa.js";
+
+
+ const DEFAULT_IMAGE = "https://placehold.co/80x40/cccccc/333333?text=N/A";
+
+ function handleKeydown(event : KeyboardEvent) : void {
+ if (modalInfo && event.key === 'Escape') {
+ closeModal();
+ }
+ }
+
+ onMount(() => {
+ document.addEventListener('keydown', handleKeydown);
+ });
+
+ // Use $state for modal state in Svelte 5
+ let modalInfo = $state<{ texto : string, imagen: string} | null>()
+
+ // Function to open modal with image
+ function openModal(imagen: string, texto: string) {
+ modalInfo = { imagen,texto }
+ }
+
+ // Function to close modal
+ function closeModal() {
+ modalInfo = null
+ }
+
+ const handleModalClick = (e : MouseEvent) => {
+ e.stopPropagation();
+ };
+
+
+
-
-
Visualizador del Configurador.
+
[appState.estanciaSeleccionada]})
+
+
Estancias
-
Seleccione la estancia ha configurar
+
Seleccione la estancia a configurar
+
+
+ {#each Object.keys(proyecto.estancias) as estanciaKey}
+ (appState.estanciaSeleccionada = estanciaKey)}
+ nombre={proyecto.estancias[estanciaKey].nombre}
+ />
+ {/each}
-
-
-
-
-
-
-
-
-
-
-
-
-
Acabados
+
Opciones para {proyecto.estancias[appState.estanciaSeleccionada].nombre}
Seleccione los acabados y materiales
-
-
-
-
Revestimientos
+ {#each getAvailableGroups(appState.estanciaSeleccionada) as grupo}
+
{grupo.nombre}
-
-
+ {#each grupo.opciones as opcion }
+ { selections[appState.estanciaSeleccionada][grupo.nombre] = opcion.value; }}
+ />
+ {/each}
-
-
-
Mobiliario
-
-
-
+ {/each}
+
+ {#if proyecto.estancias[appState.estanciaSeleccionada].adds}
+ {@const adds = proyecto.estancias[appState.estanciaSeleccionada].adds }
+ {#if adds && typeof adds === 'object' && !Array.isArray(adds) }
+
+
Otras Opciones
+
+ {#each Object.entries(adds) as [addKey, add]}
+
+
+
+
+ {/each}
+
-
+ {/if}
+ {/if}
+
+
+
+
+
@@ -84,11 +170,47 @@
-
+
+
+
+
+
-
\ No newline at end of file
+
+{/if}
+
diff --git a/src/lib/components/ProyectoView.svelte b/src/lib/components/ProyectoView.svelte
index aabb66e..1ff9003 100644
--- a/src/lib/components/ProyectoView.svelte
+++ b/src/lib/components/ProyectoView.svelte
@@ -3,10 +3,11 @@
import {proyecto} from "../../data/data_proyecto";
// Asume que la URL de la imagen de fondo viene como prop o se define aquí
- let { projectBg } = $props<{ projectBg: string }>();
+ let { projectBg } = $props<{ projectBg?: string }>();
+
diff --git a/src/lib/components/test/Selector.svelte b/src/lib/components/test/Selector.svelte
index a9ed462..ad13f4a 100644
--- a/src/lib/components/test/Selector.svelte
+++ b/src/lib/components/test/Selector.svelte
@@ -126,7 +126,7 @@
onclick={() => openModal(add.imagen)}
>

diff --git a/src/lib/components/test/StoreTestTW.svelte b/src/lib/components/test/StoreTestTW.svelte
index 88e2bda..4c9c93d 100644
--- a/src/lib/components/test/StoreTestTW.svelte
+++ b/src/lib/components/test/StoreTestTW.svelte
@@ -112,7 +112,7 @@

openModal(add.imagen)}
diff --git a/tailwind.config.js b/tailwind.config.js
index 1d059ca..398b135 100644
--- a/tailwind.config.js
+++ b/tailwind.config.js
@@ -1,8 +1,5 @@
module.exports = {
- content: [
- './index.html',
- './src/**/*.{svelte,js,ts}', // RUTA CRUCIAL
- ],
+ content: ['./src/**/*.{svelte,js,ts}'],
theme: {
extend: {
colors: {
@@ -12,8 +9,9 @@ module.exports = {
600: '#2563eb',
700: '#1d4ed8'
}
- }
+ },
+ width: {'image-fit': 'calc(100% - 2ren)' },
},
},
- plugins: [],
+
}
\ No newline at end of file
diff --git a/vite.config.ts b/vite.config.ts
index cfd6d97..46739fa 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -9,7 +9,7 @@ export default defineConfig({
base: './',
plugins: [svelte(),tailwindcss()/*,viteSingleFile()*/],
css: {
- transformer: 'lightningcss' // Opcional, pero recomendado en v4 para mejor rendimiento
+ /* transformer: 'lightningcss' // Opcional, pero recomendado en v4 para mejor rendimiento */
},
build: {
cssCodeSplit: false,