/* global React */ /* eslint-disable */ const { useState: useStateWA, useEffect: useEffectWA, useRef: useRefWA } = React; const gm = window.getMsg; /* ── Tour steps ── */ const WA_STEPS = [ /* 0 — welcome */ { id: 'welcome', progress: 5, msgs: [ { from: 'aimy', kind: 'recall' }, { from: 'aimy', text: gm( '¡Bienvenido al módulo Workspace! 🎉 Aquí vas a aprender a crear proyectos web completos usando solo lenguaje natural.', 'Bienvenue dans le module Workspace ! 🎉 Ici tu vas apprendre à créer des projets web complets en utilisant uniquement le langage naturel.', 'Welcome to the Workspace module! 🎉 Here you\'ll learn to create complete web projects using only natural language.' ) }, { from: 'aimy', text: gm('¿Empezamos? 🚀', 'On commence ? 🚀', 'Shall we start? 🚀') }, ], quickReplies: [ gm('¡Vamos! 🚀', 'Allons-y ! 🚀', 'Let\'s go! 🚀'), gm('¿Qué es el Workspace?', 'C\'est quoi le Workspace ?', 'What is the Workspace?'), ], }, /* 1 — what is vibecoding */ { id: 'what-is', progress: 14, msgs: [ { from: 'aimy', text: gm( '"El Workspace es tu entorno de vibecoding — creas código simplemente describiendo lo que quieres."', '"Le Workspace est ton environnement de vibecoding — tu crées du code simplement en décrivant ce que tu veux."', '"The Workspace is your vibecoding environment — you create code simply by describing what you want."' ), kind: 'quote' }, { from: 'aimy', text: gm( 'No necesitas saber programar. Dile a la IA qué quieres y ella genera el código HTML, CSS y JavaScript por ti.', 'Pas besoin de savoir coder. Dis à l\'IA ce que tu veux et elle génère le code HTML, CSS et JavaScript pour toi.', 'No need to know how to code. Tell the AI what you want and it generates HTML, CSS, and JavaScript code for you.' ) }, { from: 'aimy', kind: 'wsstats' }, ], }, /* 2 — library */ { id: 'library', progress: 25, spotlight: '[data-tour="ws-library-btn"]', spotlightLabel: gm('Plantillas listas para usar', 'Modèles prêts à l\'emploi', 'Ready-to-use templates'), msgs: [ { from: 'aimy', text: gm( '¿Ves el botón From Library? Ahí hay 6 plantillas listas: Landing Page, Portfolio, Dashboard, E-commerce, Blog y Formulario de contacto.', 'Tu vois le bouton From Library ? Il y a 6 modèles prêts : Landing Page, Portfolio, Dashboard, E-commerce, Blog et Formulaire de contact.', 'See the From Library button? There are 6 ready templates: Landing Page, Portfolio, Dashboard, E-commerce, Blog, and Contact Form.' ) }, { from: 'aimy', text: gm( 'Cada plantilla ya viene con HTML completo — ¡solo la seleccionas, le pones nombre y listo!', 'Chaque modèle inclut déjà du HTML complet — tu le sélectionnes, tu lui donnes un nom et c\'est parti !', 'Each template already comes with full HTML — just select it, give it a name, and you\'re ready!' ) }, ], quickReplies: [ gm('Entendido 👍', 'Compris 👍', 'Got it 👍'), gm('¿Cómo creo un workspace?', 'Comment créer un workspace ?', 'How do I create a workspace?'), ], }, /* 3 — create workspace */ { id: 'create', progress: 35, spotlight: '[data-tour="ws-new-btn"]', spotlightLabel: gm('Crea tu primer workspace', 'Crée ton premier workspace', 'Create your first workspace'), msgs: [ { from: 'aimy', text: gm( 'Ahora crea tu primer workspace. Haz clic en + Nuevo Workspace (o en "From Library" para empezar con una plantilla).', 'Maintenant crée ton premier workspace. Clique sur + New Workspace (ou sur "From Library" pour commencer avec un modèle).', 'Now create your first workspace. Click + New Workspace (or "From Library" to start with a template).' ) }, { from: 'aimy', text: gm( 'Ponle un nombre y una descripción opcional. ¡Te espero!', 'Donne-lui un nom et une description optionnelle. Je t\'attends !', 'Give it a name and an optional description. I\'ll wait for you!' ) }, ], gate: (ctx) => ctx.wsCreated, gateHint: gm( 'Crea un workspace para continuar', 'Crée un workspace pour continuer', 'Create a workspace to continue' ), }, /* 4 — inside editor: chat panel */ { id: 'chat-intro', progress: 46, spotlight: '[data-tour="ws-chat-panel"]', spotlightLabel: gm('El motor de vibecoding', 'Le moteur de vibecoding', 'The vibecoding engine'), msgs: [ { from: 'aimy', text: gm( '🎉 ¡Workspace creado! Ahora estás en el editor. A la izquierda tienes el AI Chat — es donde le describes a la IA lo que quieres crear.', '🎉 Workspace créé ! Tu es maintenant dans l\'éditeur. À gauche tu as l\'AI Chat — c\'est là que tu décris à l\'IA ce que tu veux créer.', '🎉 Workspace created! You\'re now in the editor. On the left is the AI Chat — that\'s where you describe to the AI what you want to create.' ) }, { from: 'aimy', text: gm( 'Puedes pedirle cosas como: "crea una landing page", "añade un header azul", "ponle animaciones"…', 'Tu peux lui demander des choses comme : "crée une landing page", "ajoute un header bleu", "ajoute des animations"…', 'You can ask things like: "create a landing page", "add a blue header", "add animations"…' ) }, ], quickReplies: [ gm('¡Voy a probar!', 'Je vais essayer !', 'I\'ll try it!'), ], }, /* 5 — use the chat (gate) */ { id: 'use-chat', progress: 56, spotlight: '[data-tour="ws-chat-panel"]', spotlightLabel: gm('¡Escribe tu primer prompt!', 'Écris ton premier prompt !', 'Write your first prompt!'), msgs: [ { from: 'aimy', text: gm( 'Pruébalo ahora. Escribe algo en el chat como "crea una landing page" y presiona Enter o el botón de enviar.', 'Essaie maintenant. Écris quelque chose dans le chat comme "crée une landing page" et appuie sur Entrée ou le bouton d\'envoi.', 'Try it now. Write something in the chat like "create a landing page" and press Enter or the send button.' ) }, { from: 'aimy', text: gm( 'La IA generará el código y lo verás aparecer en el Explorer. 👀', 'L\'IA va générer le code et tu le verras apparaître dans l\'Explorer. 👀', 'The AI will generate the code and you\'ll see it appear in the Explorer. 👀' ) }, ], gate: (ctx) => ctx.chatUsed, gateHint: gm( 'Envía un mensaje al chat para continuar', 'Envoie un message dans le chat pour continuer', 'Send a message in the chat to continue' ), }, /* 6 — code view + explorer */ { id: 'code-view', progress: 65, spotlight: '[data-tour="ws-explorer"]', spotlightLabel: gm('Tus archivos generados', 'Tes fichiers générés', 'Your generated files'), msgs: [ { from: 'aimy', text: gm( '¡La IA generó código! A la derecha tienes el panel Code / Preview.', 'L\'IA a généré du code ! À droite tu as le panneau Code / Preview.', 'The AI generated code! On the right you have the Code / Preview panel.' ) }, { from: 'aimy', text: gm( 'En la pestaña Code: el Explorer muestra todos tus archivos. Haz clic en uno para ver su código completo con resaltado de sintaxis.', 'Dans l\'onglet Code : l\'Explorer affiche tous tes fichiers. Clique sur un pour voir son code complet avec coloration syntaxique.', 'In the Code tab: the Explorer shows all your files. Click one to see its full code with syntax highlighting.' ) }, { from: 'aimy', kind: 'wscode-tip' }, ], quickReplies: [ gm('¿Y el Preview?', 'Et le Preview ?', 'What about Preview?'), ], }, /* 7 — preview */ { id: 'preview', progress: 74, spotlight: '[data-tour="ws-preview-tab"]', spotlightLabel: gm('Vista previa en vivo', 'Aperçu en direct', 'Live preview'), msgs: [ { from: 'aimy', text: gm( 'La pestaña Preview renderiza tu HTML en tiempo real, como si estuvieras abriendo la página en un navegador.', 'L\'onglet Preview affiche ton HTML en temps réel, comme si tu ouvrais la page dans un navigateur.', 'The Preview tab renders your HTML in real time, just like opening the page in a browser.' ) }, { from: 'aimy', text: gm( 'Haz clic en Preview para ver cómo queda visualmente tu página. ¡Te vas a sorprender!', 'Clique sur Preview pour voir le rendu visuel de ta page. Tu vas être surpris !', 'Click Preview to see the visual result of your page. You\'ll be surprised!' ) }, ], gate: (ctx) => ctx.hasFiles, gateHint: gm( 'Genera al menos un archivo con el chat', 'Génère au moins un fichier avec le chat', 'Generate at least one file with the chat' ), }, /* 8 — download */ { id: 'download', progress: 82, msgs: [ { from: 'aimy', text: gm( 'Una vez satisfecho con tu proyecto, puedes hacer clic en Descargar (arriba a la derecha) para obtener los archivos listos para subir a cualquier servidor.', 'Une fois satisfait de ton projet, tu peux cliquer sur Télécharger (en haut à droite) pour obtenir les fichiers prêts à être hébergés.', 'Once happy with your project, click Download (top right) to get files ready to upload to any server.' ) }, { from: 'aimy', text: gm( '¡El ciclo completo: idea → prompt → código → preview → descarga. Eso es el vibecoding. ✨', 'Le cycle complet : idée → prompt → code → preview → téléchargement. C\'est le vibecoding. ✨', 'The full cycle: idea → prompt → code → preview → download. That\'s vibecoding. ✨' ) }, ], quickReplies: [ gm('¡Increíble! 🤩', 'Incroyable ! 🤩', 'Incredible! 🤩'), gm('¿Hay quiz?', 'Il y a un quiz ?', 'Is there a quiz?'), ], }, /* 9 — quiz */ { id: 'quiz', progress: 90, msgs: [ { from: 'aimy', text: gm( '¡Perfecto! Antes de tu insignia, un pequeño quiz. 🧠', 'Parfait ! Avant ton insigne, un petit quiz. 🧠', 'Perfect! Before your badge, a quick quiz. 🧠' ) }, { from: 'aimy', kind: 'quiz' }, ], gate: (ctx) => ctx.quizDone, gateHint: gm('Responde las 3 preguntas', 'Réponds aux 3 questions', 'Answer all 3 questions'), }, /* 10 — badge */ { id: 'done', progress: 100, msgs: [ { from: 'aimy', kind: 'badge' }, { from: 'aimy', text: gm( '¡Ya sabes crear proyectos web completos con IA! El vibecoding te convierte en un creador sin barreras. El mundo es tu lienzo. 🌍', 'Tu sais maintenant créer des projets web complets avec l\'IA ! Le vibecoding fait de toi un créateur sans barrières. Le monde est ta toile. 🌍', 'You now know how to create complete web projects with AI! Vibecoding makes you a barrier-free creator. The world is your canvas. 🌍' ) }, ], }, ]; /* ── Stats widget ── */ function WsStats() { return (
{correct}/3 {gm('correctas. Necesitas las 3 para continuar.','correctes. Il te faut les 3 pour continuer.','correct. You need all 3 to continue.')}
{q.q}