From 4e14e783ee28088338c5f0cfa90c6c40a34b1dc6 Mon Sep 17 00:00:00 2001 From: Phosphorus-M Date: Tue, 9 Sep 2025 21:13:56 -0300 Subject: [PATCH 1/4] feat: enhance content order in Rust tutorials and improve navigation in slug.vue --- assets/css/app.css | 6 ++++++ content/1.introduccion.md | 1 + content/2.porque-rust.md | 1 + content/3.versiones.md | 1 + content/4.instalar.md | 1 + content/5.editor.md | 1 + content/6.hola-mundo.md | 1 + content/7.variables.md | 1 + content/8.constants.md | 2 +- pages/[...slug].vue | 17 +++++++++++++++-- 10 files changed, 29 insertions(+), 3 deletions(-) diff --git a/assets/css/app.css b/assets/css/app.css index 28a22f5..51dc9d7 100644 --- a/assets/css/app.css +++ b/assets/css/app.css @@ -24,26 +24,32 @@ body { section>div>div>h1 { font-size: 1.5rem; margin: 0.5rem auto; + width: 100%; } section>div>div>h2 { font-size: 1.3rem; margin: 0.5rem auto; + width: 100%; } section>div>div>h3 { font-size: 1.2rem; margin: 0.5rem auto; + width: 100%; } section>div>div>h4 { font-size: 1.1rem; margin: 0.2rem auto; + width: 100%; } section>div>div>h5 { font-size: 1rem; margin: 0.2rem auto; + width: 100%; } section>div>div>h6 { font-size: 0.5rem; margin: 0.2rem auto; + width: 100%; } section>div>div{ diff --git a/content/1.introduccion.md b/content/1.introduccion.md index b612212..2a1fd67 100644 --- a/content/1.introduccion.md +++ b/content/1.introduccion.md @@ -2,6 +2,7 @@ nextPath: "porque-rust" previousPath: "" editor: false +order: 1 --- # Introducción a Rust: El Lenguaje del Futuro en Programación de Sistemas diff --git a/content/2.porque-rust.md b/content/2.porque-rust.md index 6438fd5..0aaebbc 100644 --- a/content/2.porque-rust.md +++ b/content/2.porque-rust.md @@ -2,6 +2,7 @@ nextPath: "versiones" previousPath: "introduccion" editor: false +order: 2 --- # ¿Por Qué Rust? diff --git a/content/3.versiones.md b/content/3.versiones.md index 53329d0..3aff8ba 100644 --- a/content/3.versiones.md +++ b/content/3.versiones.md @@ -2,6 +2,7 @@ nextPath: "instalar" previousPath: "porque-rust" editor: false +order: 3 --- # Stable, Beta, Nightly. ¿Que es esto? diff --git a/content/4.instalar.md b/content/4.instalar.md index 4d94329..80a2f1f 100644 --- a/content/4.instalar.md +++ b/content/4.instalar.md @@ -2,6 +2,7 @@ nextPath: "editor" previousPath: "versiones" editor: false +order: 4 --- # Instalación de Rust con Rustup: Una Guía Rápida diff --git a/content/5.editor.md b/content/5.editor.md index 110a98b..80f03dd 100644 --- a/content/5.editor.md +++ b/content/5.editor.md @@ -2,6 +2,7 @@ nextPath: "hola-mundo" previousPath: "instalar" editor: false +order: 5 --- # Configurando Tu Entorno de Desarrollo para Rust: Guía para los Editores de Texto Más Comunes diff --git a/content/6.hola-mundo.md b/content/6.hola-mundo.md index 2ec4e60..becccdf 100644 --- a/content/6.hola-mundo.md +++ b/content/6.hola-mundo.md @@ -2,6 +2,7 @@ nextPath: "variables" previousPath: "editor" expectedResponse: "Hello, world!\n" +order: 6 --- diff --git a/content/7.variables.md b/content/7.variables.md index d2098f4..77ae9f9 100644 --- a/content/7.variables.md +++ b/content/7.variables.md @@ -11,6 +11,7 @@ initialCode: | contador = 1 println!("nuevo contador = {contador}"); } +order: 7 --- diff --git a/content/8.constants.md b/content/8.constants.md index e8d9fd4..e41fc1b 100644 --- a/content/8.constants.md +++ b/content/8.constants.md @@ -14,7 +14,7 @@ initialCode: | println!("Un día tiene ??? segundos"); // Reemplaza ??? con el cálculo correcto } - +order: 8 --- # Constantes diff --git a/pages/[...slug].vue b/pages/[...slug].vue index 8812436..22d5ccb 100644 --- a/pages/[...slug].vue +++ b/pages/[...slug].vue @@ -3,10 +3,13 @@ import { ref, onMounted, computed } from 'vue'; import { CircleChevronRight, CircleChevronLeft, File, Terminal, Play, GripVertical } from "lucide-vue-next"; import { mdWidth, sectionMinWidth, sectionMaxWidth } from '~/consts/consts.ts'; import { getCodeResponse, type RustPlaygroundResponse } from '~/helpers/getCodeResponse'; +import type { ParsedContent } from '@nuxt/content'; const route = useRoute() const contentQuery = await queryContent(route.path).findOne(); +console.log(contentQuery); + const isCoding = ref(true); const isCompiling = ref(false); const sectionWidth = ref(50); @@ -19,8 +22,17 @@ const checkIfMobile = () => { isMobile.value = window.innerWidth <= mdWidth; }; -const couldClickInNextButton = (doc: any): boolean => { +const canBeSkipped = (doc: ParsedContent) => { + return Number(localStorage.getItem("step") ?? 0) > Number(doc.order); +}; + +const couldClickInNextButton = (doc: ParsedContent): boolean => { + if(canBeSkipped(doc)) { + return doc && doc.nextPath; + } + if(doc && doc.expectedResponse) { + localStorage.setItem("step", doc.order); return terminalResponse.value?.status === 200 && doc.expectedResponse === terminalResponse.value?.body?.result; } @@ -79,8 +91,9 @@ onMounted(() => { + Solucionado previamente From cbe0f5114d6c36fe9ade24b2f4462ecf34c736f0 Mon Sep 17 00:00:00 2001 From: Phosphorus-M Date: Wed, 17 Sep 2025 15:32:00 -0300 Subject: [PATCH 2/4] feat: add content about constants --- content/8.constants.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/8.constants.md b/content/8.constants.md index e41fc1b..1445b79 100644 --- a/content/8.constants.md +++ b/content/8.constants.md @@ -1,5 +1,5 @@ --- -nextPath: "" +nextPath: "shadowing" previousPath: "variables" expectedResponse: "Un día tiene 86400 segundos\n" initialCode: | From 03b9f3142682af2da081277a5ff0552d0336ebb8 Mon Sep 17 00:00:00 2001 From: Phosphorus-M Date: Wed, 17 Sep 2025 15:32:00 -0300 Subject: [PATCH 3/4] feat: add content about shadowing --- assets/css/app.css | 11 +++++--- content/9.shadowing.md | 57 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+), 3 deletions(-) create mode 100644 content/9.shadowing.md diff --git a/assets/css/app.css b/assets/css/app.css index 51dc9d7..1a8adee 100644 --- a/assets/css/app.css +++ b/assets/css/app.css @@ -100,11 +100,16 @@ ul > li::marker { /* Personalización de listas ordenadas */ ol > li::marker { - content: none; /* Usa el comportamiento predeterminado del navegador */ - color: var(--dark-yellow); /* Color de los números */ + color: var(--yellow); /* Color de los números */ font-weight: bold; /* Hace los números más prominentes */ } +ol { + list-style: initial; + list-style-type: decimal; + @apply list-decimal; +} + /* Estilos para listas anidadas */ ul ul, ol ol, @@ -115,7 +120,7 @@ ol ul { ul ul > li::marker { content: "◦ "; /* Cambia el marcador de listas desordenadas anidadas */ - color: var(--stroke-color); + color: var(--yellow); } ol ol > li::marker { diff --git a/content/9.shadowing.md b/content/9.shadowing.md new file mode 100644 index 0000000..3ec5ca2 --- /dev/null +++ b/content/9.shadowing.md @@ -0,0 +1,57 @@ +--- +nextPath: "bool-and-float" +previousPath: "constants" +expectedResponse: "El valor final es: 15\n" +initialCode: | + fn main() { + // Crea la variable valor con el string "10" + + // Asigna el parseo a un entero usando shadowing a la variable valor + + valor.parse::().expect("No es un número"); + + // Suma 5 al valor + + // Muestra el resultado + println!("El valor final es: {valor}"); + } +order: 9 +--- + +# Shadowing + +En Rust, cuando declaramos una variable con `let`, su nombre queda asociado a un valor en memoria. +El **shadowing** ocurre cuando volvemos a declarar una variable con el mismo nombre que otra anterior, usando nuevamente `let`. Esto *sombrea* (shadow) la variable anterior, es decir, la nueva declaración la reemplaza en el alcance actual. + +Lo importante es que, a diferencia de hacer la variable `mut`, el shadowing nos permite: + +* **Cambiar el valor** asociado a la variable. +* **Cambiar el tipo** de la variable. + +Ejemplo: + +```rust +fn main() { + let x = 5; // x es un número entero + let x = x + 1; // x ahora vale 6 + let x = "texto"; // x ahora es un string, diferente tipo + println!("{x}"); +} +``` + +En este caso, la variable `x` cambia tanto de valor como de tipo, algo que no sería posible con `mut`. Esto lo hace muy útil para transformar datos paso a paso sin necesidad de inventar nuevos nombres de variables. + +--- + +### 📝 Ejercicio + +Crea un programa que: + +1. Defina una variable llamada `valor` con el número `10`. +2. Use **shadowing** para: + * Parsear `valor` a un entero. + * Para esto usaremos el método `parse::()` que convierte un string a un entero de 32 bits. + * Como `parse` puede fallar, usaremos `expect("No es un número")` para manejar el caso de error. +3. Luego **suma** `5` al valor. +4. Imprime el resultado final. + From 5437066db38469e1b9f72f9404af24214b140bea Mon Sep 17 00:00:00 2001 From: Phosphorus-M Date: Thu, 18 Sep 2025 15:32:00 -0300 Subject: [PATCH 4/4] fix: update tailwindcss version and enhance document evaluation logic - Updated @nuxtjs/tailwindcss to version 6.14.0. - Added a new function to check if a document is solved based on local storage step. - Modified the canBeSkipped function to include the current step in the evaluation. - Enhanced the logic for the next button clickability to include tests and expected responses. - Updated UI to reflect the solved state of documents with appropriate messages. --- content/10.bool-and-float.md | 69 ++++ package-lock.json | 588 +++++++++++++++++++++++++++++------ package.json | 2 +- pages/[...slug].vue | 57 +++- 4 files changed, 611 insertions(+), 105 deletions(-) create mode 100644 content/10.bool-and-float.md diff --git a/content/10.bool-and-float.md b/content/10.bool-and-float.md new file mode 100644 index 0000000..bae28ba --- /dev/null +++ b/content/10.bool-and-float.md @@ -0,0 +1,69 @@ +--- +nextPath: "other" +previousPath: "shadowing" +initialCode: | + fn main() { + // Paso 1: Declara un booleano + let tienes_hambre ... + + // Paso 2: Declara un flotante para tu peso + let peso ... + + // Paso 4: Imprime el peso + println!("Tu peso es: {peso} kg"); + println!("¿Tienes hambre? {tienes_hambre}"); + } +tests: + - should be contain `.` + - should be contain `true` `false` +order: 10 +--- +# Tipos de datos + +En Rust existen muchos tipos de datos, a lo largo de las lecciones anteriores hemos visto superficialmente +algunos, no obstante no hemos profundizado mucho en ellos, pero en esta lección nos centraremos en dos de los más comunes: los booleanos y los números de punto flotante. + + +## 🔹 Booleanos (`bool`) + +Un booleano solo puede tener dos valores: `true` (verdadero) o `false` (falso). +Se usan principalmente en expresiones lógicas y estructuras de control, como `if`, `while` y `match`. + +Ejemplo: + +```rust +let es_rust_divertido: bool = true; +let tiene_gluten: bool = false; + +if es_rust_divertido { + println!("¡Rust es genial!"); +} +``` + +## 🔹 Flotantes (`f32` y `f64`) + +Los números de punto flotante representan valores con decimales. +Rust tiene dos tipos: + +* `f32`: precisión simple (32 bits). +* `f64`: precisión doble (64 bits, valor por defecto). + +Ejemplo: + +```rust +let pi: f64 = 3.14159; +let temperatura: f32 = 36.6; + +println!("El valor de pi es {pi}"); +println!("La temperatura es {temperatura}"); +``` + +Los flotantes permiten operaciones matemáticas, como suma, resta, multiplicación y división. + +--- + +## ✍️ Ejercicio + +1. Declara una variable booleana que indique si **tienes hambre**. +2. Declara una variable flotante que guarde tu **peso**. +4. Imprime el peso en pantalla y la variable que nos permite saber si tienes hambre. diff --git a/package-lock.json b/package-lock.json index d0f6752..c1ece03 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,7 @@ "@lezer/rust": "^1.0.2", "@nuxt/content": "^2.13.4", "@nuxtjs/color-mode": "^3.5.2", - "@nuxtjs/tailwindcss": "^6.12.2", + "@nuxtjs/tailwindcss": "^6.14.0", "@vueuse/core": "^11.3.0", "codemirror": "^6.0.1", "lucide-vue-next": "^0.460.0", @@ -1071,6 +1071,16 @@ "node": ">=6.0.0" } }, + "node_modules/@jridgewell/remapping": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz", + "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==", + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, "node_modules/@jridgewell/resolve-uri": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", @@ -1097,9 +1107,10 @@ } }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", - "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==" + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", + "license": "MIT" }, "node_modules/@jridgewell/trace-mapping": { "version": "0.3.25", @@ -1298,6 +1309,7 @@ "version": "2.13.4", "resolved": "https://registry.npmjs.org/@nuxt/content/-/content-2.13.4.tgz", "integrity": "sha512-NBaHL/SNYUK7+RLgOngSFmKqEPYc0dYdnwVFsxIdrOZUoUbD8ERJJDaoRwwtyYCMOgUeFA/zxAkuADytp+DKiQ==", + "license": "MIT", "dependencies": { "@nuxt/kit": "^3.13.2", "@nuxtjs/mdc": "^0.9.2", @@ -1607,23 +1619,300 @@ } }, "node_modules/@nuxtjs/tailwindcss": { - "version": "6.12.2", - "resolved": "https://registry.npmjs.org/@nuxtjs/tailwindcss/-/tailwindcss-6.12.2.tgz", - "integrity": "sha512-qPJiFH67CkTj/2kBGBzqXihOD1rQXMsbVS4vdQvfBxOBLPfGhU1yw7AATdhPl2BBjO2krjJLuZj39t7dnDYOwg==", + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/@nuxtjs/tailwindcss/-/tailwindcss-6.14.0.tgz", + "integrity": "sha512-30RyDK++LrUVRgc2A85MktGWIZoRQgeQKjE4CjjD64OXNozyl+4ScHnnYgqVToMM6Ch2ZG2W4wV2J0EN6F0zkQ==", + "license": "MIT", "dependencies": { - "@nuxt/kit": "^3.13.2", + "@nuxt/kit": "^3.16.0", "autoprefixer": "^10.4.20", - "consola": "^3.2.3", + "c12": "^3.0.2", + "consola": "^3.4.0", "defu": "^6.1.4", - "h3": "^1.13.0", + "h3": "^1.15.1", "klona": "^2.0.6", - "pathe": "^1.1.2", - "postcss": "^8.4.47", - "postcss-nesting": "^13.0.0", + "ohash": "^2.0.11", + "pathe": "^2.0.3", + "pkg-types": "^2.1.0", + "postcss": "^8.5.3", + "postcss-nesting": "^13.0.1", "tailwind-config-viewer": "^2.0.4", - "tailwindcss": "~3.4.13", + "tailwindcss": "~3.4.17", "ufo": "^1.5.4", - "unctx": "^2.3.1" + "unctx": "^2.4.1" + } + }, + "node_modules/@nuxtjs/tailwindcss/node_modules/@nuxt/kit": { + "version": "3.19.2", + "resolved": "https://registry.npmjs.org/@nuxt/kit/-/kit-3.19.2.tgz", + "integrity": "sha512-+QiqO0WcIxsKLUqXdVn3m4rzTRm2fO9MZgd330utCAaagGmHsgiMJp67kE14boJEPutnikfz3qOmrzBnDIHUUg==", + "license": "MIT", + "dependencies": { + "c12": "^3.2.0", + "consola": "^3.4.2", + "defu": "^6.1.4", + "destr": "^2.0.5", + "errx": "^0.1.0", + "exsolve": "^1.0.7", + "ignore": "^7.0.5", + "jiti": "^2.5.1", + "klona": "^2.0.6", + "knitwork": "^1.2.0", + "mlly": "^1.8.0", + "ohash": "^2.0.11", + "pathe": "^2.0.3", + "pkg-types": "^2.3.0", + "rc9": "^2.1.2", + "scule": "^1.3.0", + "semver": "^7.7.2", + "std-env": "^3.9.0", + "tinyglobby": "^0.2.15", + "ufo": "^1.6.1", + "unctx": "^2.4.1", + "unimport": "^5.2.0", + "untyped": "^2.0.0" + }, + "engines": { + "node": ">=18.12.0" + } + }, + "node_modules/@nuxtjs/tailwindcss/node_modules/acorn": { + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", + "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/@nuxtjs/tailwindcss/node_modules/c12": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/c12/-/c12-3.3.0.tgz", + "integrity": "sha512-K9ZkuyeJQeqLEyqldbYLG3wjqwpw4BVaAqvmxq3GYKK0b1A/yYQdIcJxkzAOWcNVWhJpRXAPfZFueekiY/L8Dw==", + "license": "MIT", + "dependencies": { + "chokidar": "^4.0.3", + "confbox": "^0.2.2", + "defu": "^6.1.4", + "dotenv": "^17.2.2", + "exsolve": "^1.0.7", + "giget": "^2.0.0", + "jiti": "^2.5.1", + "ohash": "^2.0.11", + "pathe": "^2.0.3", + "perfect-debounce": "^2.0.0", + "pkg-types": "^2.3.0", + "rc9": "^2.1.2" + }, + "peerDependencies": { + "magicast": "^0.3.5" + }, + "peerDependenciesMeta": { + "magicast": { + "optional": true + } + } + }, + "node_modules/@nuxtjs/tailwindcss/node_modules/confbox": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/confbox/-/confbox-0.2.2.tgz", + "integrity": "sha512-1NB+BKqhtNipMsov4xI/NnhCKp9XG9NamYp5PVm9klAT0fsrNPjaFICsCFhNhwZJKNh7zB/3q8qXz0E9oaMNtQ==", + "license": "MIT" + }, + "node_modules/@nuxtjs/tailwindcss/node_modules/dotenv": { + "version": "17.2.2", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.2.2.tgz", + "integrity": "sha512-Sf2LSQP+bOlhKWWyhFsn0UsfdK/kCWRv1iuA2gXAwt3dyNabr6QSj00I2V10pidqz69soatm9ZwZvpQMTIOd5Q==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, + "node_modules/@nuxtjs/tailwindcss/node_modules/giget": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/giget/-/giget-2.0.0.tgz", + "integrity": "sha512-L5bGsVkxJbJgdnwyuheIunkGatUF/zssUoxxjACCseZYAVbaqdh9Tsmmlkl8vYan09H7sbvKt4pS8GqKLBrEzA==", + "license": "MIT", + "dependencies": { + "citty": "^0.1.6", + "consola": "^3.4.0", + "defu": "^6.1.4", + "node-fetch-native": "^1.6.6", + "nypm": "^0.6.0", + "pathe": "^2.0.3" + }, + "bin": { + "giget": "dist/cli.mjs" + } + }, + "node_modules/@nuxtjs/tailwindcss/node_modules/ignore": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", + "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/@nuxtjs/tailwindcss/node_modules/js-tokens": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-9.0.1.tgz", + "integrity": "sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ==", + "license": "MIT" + }, + "node_modules/@nuxtjs/tailwindcss/node_modules/local-pkg": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-1.1.2.tgz", + "integrity": "sha512-arhlxbFRmoQHl33a0Zkle/YWlmNwoyt6QNZEIJcqNbdrsix5Lvc4HyyI3EnwxTYlZYc32EbYrQ8SzEZ7dqgg9A==", + "license": "MIT", + "dependencies": { + "mlly": "^1.7.4", + "pkg-types": "^2.3.0", + "quansync": "^0.2.11" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/@nuxtjs/tailwindcss/node_modules/nypm": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/nypm/-/nypm-0.6.2.tgz", + "integrity": "sha512-7eM+hpOtrKrBDCh7Ypu2lJ9Z7PNZBdi/8AT3AX8xoCj43BBVHD0hPSTEvMtkMpfs8FCqBGhxB+uToIQimA111g==", + "license": "MIT", + "dependencies": { + "citty": "^0.1.6", + "consola": "^3.4.2", + "pathe": "^2.0.3", + "pkg-types": "^2.3.0", + "tinyexec": "^1.0.1" + }, + "bin": { + "nypm": "dist/cli.mjs" + }, + "engines": { + "node": "^14.16.0 || >=16.10.0" + } + }, + "node_modules/@nuxtjs/tailwindcss/node_modules/ohash": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/ohash/-/ohash-2.0.11.tgz", + "integrity": "sha512-RdR9FQrFwNBNXAr4GixM8YaRZRJ5PUWbKYbE5eOsrwAjJW0q2REGcf79oYPsLyskQCZG1PLN+S/K1V00joZAoQ==", + "license": "MIT" + }, + "node_modules/@nuxtjs/tailwindcss/node_modules/pathe": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", + "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", + "license": "MIT" + }, + "node_modules/@nuxtjs/tailwindcss/node_modules/perfect-debounce": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/perfect-debounce/-/perfect-debounce-2.0.0.tgz", + "integrity": "sha512-fkEH/OBiKrqqI/yIgjR92lMfs2K8105zt/VT6+7eTjNwisrsh47CeIED9z58zI7DfKdH3uHAn25ziRZn3kgAow==", + "license": "MIT" + }, + "node_modules/@nuxtjs/tailwindcss/node_modules/pkg-types": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-2.3.0.tgz", + "integrity": "sha512-SIqCzDRg0s9npO5XQ3tNZioRY1uK06lA41ynBC1YmFTmnY6FjUjVt6s4LoADmwoig1qqD0oK8h1p/8mlMx8Oig==", + "license": "MIT", + "dependencies": { + "confbox": "^0.2.2", + "exsolve": "^1.0.7", + "pathe": "^2.0.3" + } + }, + "node_modules/@nuxtjs/tailwindcss/node_modules/strip-literal": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-3.0.0.tgz", + "integrity": "sha512-TcccoMhJOM3OebGhSBEmp3UZ2SfDMZUEBdRA/9ynfLi8yYajyWX3JiXArcJt4Umh4vISpspkQIY8ZZoCqjbviA==", + "license": "MIT", + "dependencies": { + "js-tokens": "^9.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/@nuxtjs/tailwindcss/node_modules/tinyglobby": { + "version": "0.2.15", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz", + "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==", + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.3" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/@nuxtjs/tailwindcss/node_modules/unimport": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/unimport/-/unimport-5.3.0.tgz", + "integrity": "sha512-cty7t1DESgm0OPfCy9oyn5u9B5t0tMW6tH6bXTjAGIO3SkJsbg/DXYHjrPrUKqultqbAAoltAfYsuu/FEDocjg==", + "license": "MIT", + "dependencies": { + "acorn": "^8.15.0", + "escape-string-regexp": "^5.0.0", + "estree-walker": "^3.0.3", + "local-pkg": "^1.1.2", + "magic-string": "^0.30.19", + "mlly": "^1.8.0", + "pathe": "^2.0.3", + "picomatch": "^4.0.3", + "pkg-types": "^2.3.0", + "scule": "^1.3.0", + "strip-literal": "^3.0.0", + "tinyglobby": "^0.2.15", + "unplugin": "^2.3.10", + "unplugin-utils": "^0.3.0" + }, + "engines": { + "node": ">=18.12.0" + } + }, + "node_modules/@nuxtjs/tailwindcss/node_modules/unplugin": { + "version": "2.3.10", + "resolved": "https://registry.npmjs.org/unplugin/-/unplugin-2.3.10.tgz", + "integrity": "sha512-6NCPkv1ClwH+/BGE9QeoTIl09nuiAt0gS28nn1PvYXsGKRwM2TCbFA2QiilmehPDTXIe684k4rZI1yl3A1PCUw==", + "license": "MIT", + "dependencies": { + "@jridgewell/remapping": "^2.3.5", + "acorn": "^8.15.0", + "picomatch": "^4.0.3", + "webpack-virtual-modules": "^0.6.2" + }, + "engines": { + "node": ">=18.12.0" + } + }, + "node_modules/@nuxtjs/tailwindcss/node_modules/untyped": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/untyped/-/untyped-2.0.0.tgz", + "integrity": "sha512-nwNCjxJTjNuLCgFr42fEak5OcLuB3ecca+9ksPFNvtfYSLpjf+iJqSIaSnIile6ZPbKYxI5k2AfXqeopGudK/g==", + "license": "MIT", + "dependencies": { + "citty": "^0.1.6", + "defu": "^6.1.4", + "jiti": "^2.4.2", + "knitwork": "^1.2.0", + "scule": "^1.3.0" + }, + "bin": { + "untyped": "dist/cli.mjs" } }, "node_modules/@parcel/watcher": { @@ -3851,9 +4140,10 @@ } }, "node_modules/chokidar": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.1.tgz", - "integrity": "sha512-n8enUVCED/KVRQlab1hr3MVpcVMvxtZjmEa956u+4YijlmQED223XMSYj2tLuKvr4jcCTzNNMpQDUer72MMmzA==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "license": "MIT", "dependencies": { "readdirp": "^4.0.1" }, @@ -4262,9 +4552,10 @@ } }, "node_modules/crossws": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/crossws/-/crossws-0.3.1.tgz", - "integrity": "sha512-HsZgeVYaG+b5zA+9PbIPGq4+J/CJynJuearykPsXx4V/eMhyQ5EDVg3Ak2FBZtVXCiOLu/U7IiwDHTr9MA+IKw==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/crossws/-/crossws-0.3.5.tgz", + "integrity": "sha512-ojKiDvcmByhwa8YYqbQI/hg7MEU0NC03+pSdEq4ZUnZR9xXpwk7E43SMNGkn+JxJGPFtNvQ48+vV2p+P1ml5PA==", + "license": "MIT", "dependencies": { "uncrypto": "^0.1.3" } @@ -4588,9 +4879,10 @@ } }, "node_modules/destr": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/destr/-/destr-2.0.3.tgz", - "integrity": "sha512-2N3BOUU4gYMpTP24s5rF5iP7BDr7uNTCs4ozw3kf/eKfvWSIu93GEBi5m427YoyJoeOzQ5smuu4nNAPGb8idSQ==" + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/destr/-/destr-2.0.5.tgz", + "integrity": "sha512-ugFTXCtDZunbzasqBxrK93Ik/DRYsO6S/fedkWEMKqt04xZ4csmnmwGDBAb07QWNaGMAmnTIemsYZCksjATwsA==", + "license": "MIT" }, "node_modules/destroy": { "version": "1.2.0", @@ -4994,9 +5286,9 @@ } }, "node_modules/exsolve": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/exsolve/-/exsolve-1.0.5.tgz", - "integrity": "sha512-pz5dvkYYKQ1AHVrgOzBKWeP4u4FRb3a6DNK2ucr0OoNwYIU4QWsJ+NM36LLzORT+z845MzKHHhpXiUF5nvQoJg==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/exsolve/-/exsolve-1.0.7.tgz", + "integrity": "sha512-VO5fQUzZtI6C+vx4w/4BWJpg3s/5l+6pRQEHzFRM8WFi4XffSP1Z+4qi7GbjWbvRQEbdIco5mIMq+zX4rPuLrw==", "license": "MIT" }, "node_modules/extend": { @@ -5057,9 +5349,13 @@ } }, "node_modules/fdir": { - "version": "6.4.2", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.2.tgz", - "integrity": "sha512-KnhMXsKSPZlAhp7+IjUkRZKPb4fUyccpDrdFXbi4QL1qkmFh9kVY09Yox+n4MaOb3lHZ1Tv829C3oaaXoMYPDQ==", + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, "peerDependencies": { "picomatch": "^3 || ^4" }, @@ -5429,20 +5725,20 @@ } }, "node_modules/h3": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/h3/-/h3-1.13.0.tgz", - "integrity": "sha512-vFEAu/yf8UMUcB4s43OaDaigcqpQd14yanmOsn+NcRX3/guSKncyE2rOYhq8RIchgJrPSs/QiIddnTTR1ddiAg==", + "version": "1.15.4", + "resolved": "https://registry.npmjs.org/h3/-/h3-1.15.4.tgz", + "integrity": "sha512-z5cFQWDffyOe4vQ9xIqNfCZdV4p//vy6fBnr8Q1AWnVZ0teurKMG66rLj++TKwKPUP3u7iMUvrvKaEUiQw2QWQ==", + "license": "MIT", "dependencies": { "cookie-es": "^1.2.2", - "crossws": ">=0.2.0 <0.4.0", + "crossws": "^0.3.5", "defu": "^6.1.4", - "destr": "^2.0.3", + "destr": "^2.0.5", "iron-webcrypto": "^1.2.1", - "ohash": "^1.1.4", + "node-mock-http": "^1.0.2", "radix3": "^1.1.2", - "ufo": "^1.5.4", - "uncrypto": "^0.1.3", - "unenv": "^1.10.0" + "ufo": "^1.6.1", + "uncrypto": "^0.1.3" } }, "node_modules/has-flag": { @@ -6206,9 +6502,10 @@ } }, "node_modules/jiti": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.4.0.tgz", - "integrity": "sha512-H5UpaUI+aHOqZXlYOaFP/8AzKsg+guWu+Pr3Y8i7+Y3zr1aXAvCvTAQ1RxSc6oVD8R8c7brgNtTVP91E7upH/g==", + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.5.1.tgz", + "integrity": "sha512-twQoecYPiVA5K/h6SxtORw/Bs3ar+mLUtoPSc7iMXzQzK8d7eJ/R09wmTwAjiamETn1cXYPGfNnu7DMoHgu12w==", + "license": "MIT", "bin": { "jiti": "lib/jiti-cli.mjs" } @@ -6345,9 +6642,10 @@ } }, "node_modules/knitwork": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/knitwork/-/knitwork-1.1.0.tgz", - "integrity": "sha512-oHnmiBUVHz1V+URE77PNot2lv3QiYU2zQf1JjOVkMt3YDKGbu8NAFr+c4mcNOhdsGrB/VpVbRwPwhiXrPhxQbw==" + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/knitwork/-/knitwork-1.2.0.tgz", + "integrity": "sha512-xYSH7AvuQ6nXkq42x0v5S8/Iry+cfulBz/DJQzhIyESdLD7425jXsPy4vn5cCXU+HhRN2kVw51Vd1K6/By4BQg==", + "license": "MIT" }, "node_modules/koa": { "version": "2.15.3", @@ -6564,9 +6862,10 @@ } }, "node_modules/lilconfig": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.2.tgz", - "integrity": "sha512-eop+wDAvpItUys0FWkHIKeC9ybYrTGbU41U5K7+bttZZeohvnY7M9dZ5kB21GNWiFT2q1OoPTvncPCgSOVO5ow==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz", + "integrity": "sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==", + "license": "MIT", "engines": { "node": ">=14" }, @@ -6710,11 +7009,12 @@ } }, "node_modules/magic-string": { - "version": "0.30.13", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.13.tgz", - "integrity": "sha512-8rYBO+MsWkgjDSOvLomYnzhdwEG51olQ4zL5KXnNJWV5MNmrb4rTZdrtkhxjnD/QyZUqR/Z/XDsUs/4ej2nx0g==", + "version": "0.30.19", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.19.tgz", + "integrity": "sha512-2N21sPY9Ws53PZvsEpVtNuSW+ScYbQdp4b9qUaL+9QkHUrGFKo56Lg9Emg5s9V/qrtNBmiR01sYhUOwu3H+VOw==", + "license": "MIT", "dependencies": { - "@jridgewell/sourcemap-codec": "^1.5.0" + "@jridgewell/sourcemap-codec": "^1.5.5" } }, "node_modules/magic-string-ast": { @@ -7685,15 +7985,27 @@ } }, "node_modules/mlly": { - "version": "1.7.4", - "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.7.4.tgz", - "integrity": "sha512-qmdSIPC4bDJXgZTCR7XosJiNKySV7O215tsPtDN9iEO/7q/76b/ijtgRu/+epFXSJhijtTCCGp3DWS549P3xKw==", + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.8.0.tgz", + "integrity": "sha512-l8D9ODSRWLe2KHJSifWGwBqpTZXIXTeo8mlKjY+E2HAakaTeNpqAyBZ8GSqLzHgw4XmHmC8whvpjJNMbFZN7/g==", "license": "MIT", "dependencies": { - "acorn": "^8.14.0", - "pathe": "^2.0.1", - "pkg-types": "^1.3.0", - "ufo": "^1.5.4" + "acorn": "^8.15.0", + "pathe": "^2.0.3", + "pkg-types": "^1.3.1", + "ufo": "^1.6.1" + } + }, + "node_modules/mlly/node_modules/acorn": { + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", + "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" } }, "node_modules/mlly/node_modules/pathe": { @@ -8169,9 +8481,10 @@ } }, "node_modules/node-fetch-native": { - "version": "1.6.4", - "resolved": "https://registry.npmjs.org/node-fetch-native/-/node-fetch-native-1.6.4.tgz", - "integrity": "sha512-IhOigYzAKHd244OC0JIMIUrjzctirCmPkaIfhDeGcEETWof5zKYUW7e7MYvChGWh/4CJeXEgsRyGzuF334rOOQ==" + "version": "1.6.7", + "resolved": "https://registry.npmjs.org/node-fetch-native/-/node-fetch-native-1.6.7.tgz", + "integrity": "sha512-g9yhqoedzIUm0nTnTqAQvueMPVOuIY16bqgAJJC8XOOubYFNwz6IER9qs0Gq2Xd0+CecCKFjtdDTMA4u4xG06Q==", + "license": "MIT" }, "node_modules/node-forge": { "version": "1.3.1", @@ -8191,6 +8504,12 @@ "node-gyp-build-test": "build-test.js" } }, + "node_modules/node-mock-http": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/node-mock-http/-/node-mock-http-1.0.3.tgz", + "integrity": "sha512-jN8dK25fsfnMrVsEhluUTPkBFY+6ybu7jSB1n+ri/vOGjJxU8J9CZhpSGkHXSkFjtUhbmoncG/YG9ta5Ludqog==", + "license": "MIT" + }, "node_modules/node-releases": { "version": "2.0.18", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", @@ -8816,9 +9135,10 @@ "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==" }, "node_modules/picomatch": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", - "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "license": "MIT", "engines": { "node": ">=12" }, @@ -8908,9 +9228,9 @@ } }, "node_modules/postcss": { - "version": "8.4.49", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.49.tgz", - "integrity": "sha512-OCVPnIObs4N29kxTjzLfUryOkvZEq+pf8jTF0lg8E7uETuWHA+v7j3c/xJmiqpX450191LlmZfUKkXxkTry7nA==", + "version": "8.5.6", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz", + "integrity": "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==", "funding": [ { "type": "opencollective", @@ -8925,8 +9245,9 @@ "url": "https://github.com/sponsors/ai" } ], + "license": "MIT", "dependencies": { - "nanoid": "^3.3.7", + "nanoid": "^3.3.11", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" }, @@ -9508,15 +9829,16 @@ "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==" }, "node_modules/postcss/node_modules/nanoid": { - "version": "3.3.7", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", - "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "version": "3.3.11", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", + "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", "funding": [ { "type": "github", "url": "https://github.com/sponsors/ai" } ], + "license": "MIT", "bin": { "nanoid": "bin/nanoid.cjs" }, @@ -9574,6 +9896,22 @@ "resolved": "https://registry.npmjs.org/protocols/-/protocols-2.0.1.tgz", "integrity": "sha512-/XJ368cyBJ7fzLMwLKv1e4vLxOju2MNAIokcr7meSaNcVbWz/CPcW22cP04mwxOErdA5mwjA8Q6w/cdAQxVn7Q==" }, + "node_modules/quansync": { + "version": "0.2.11", + "resolved": "https://registry.npmjs.org/quansync/-/quansync-0.2.11.tgz", + "integrity": "sha512-AifT7QEbW9Nri4tAwR5M/uzpBuqfZf+zwaEM/QkzEjj7NBuFD2rBuy0K3dE+8wltbezDV7JMA0WfnCPYRSYbXA==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/antfu" + }, + { + "type": "individual", + "url": "https://github.com/sponsors/sxzz" + } + ], + "license": "MIT" + }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -10210,9 +10548,10 @@ } }, "node_modules/semver": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", - "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "license": "ISC", "bin": { "semver": "bin/semver.js" }, @@ -10523,9 +10862,10 @@ } }, "node_modules/std-env": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.8.0.tgz", - "integrity": "sha512-Bc3YwwCB+OzldMxOXJIIvC6cPRWr/LxOp48CdQTOkPyk/t4JWWJbrilwBd7RJzKV8QW7tJkcgAmeuLLJugl5/w==" + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.9.0.tgz", + "integrity": "sha512-UGvjygr6F6tpH7o2qyqR6QYpwraIjKSdtzyBdyytFOHmPZY917kwdwLG0RbOjWOnKmnm3PeHjaoLLMie7kPLQw==", + "license": "MIT" }, "node_modules/streamx": { "version": "2.20.2", @@ -10909,9 +11249,10 @@ } }, "node_modules/tailwindcss": { - "version": "3.4.15", - "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.15.tgz", - "integrity": "sha512-r4MeXnfBmSOuKUWmXe6h2CcyfzJCEk4F0pptO5jlnYSIViUkVmsawj80N5h2lO3gwcmSb4n3PuN+e+GC1Guylw==", + "version": "3.4.17", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.17.tgz", + "integrity": "sha512-w33E2aCvSDP0tW9RZuNXadXlkHXqFzSkQew/aIa2i/Sj8fThxwovwlXHSPXTbAHwEIhBFXAedUhP2tueAKP8Og==", + "license": "MIT", "dependencies": { "@alloc/quick-lru": "^5.2.0", "arg": "^5.0.2", @@ -10922,7 +11263,7 @@ "glob-parent": "^6.0.2", "is-glob": "^4.0.3", "jiti": "^1.21.6", - "lilconfig": "^2.1.0", + "lilconfig": "^3.1.3", "micromatch": "^4.0.8", "normalize-path": "^3.0.0", "object-hash": "^3.0.0", @@ -10997,14 +11338,6 @@ "jiti": "bin/jiti.js" } }, - "node_modules/tailwindcss/node_modules/lilconfig": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.1.0.tgz", - "integrity": "sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==", - "engines": { - "node": ">=10" - } - }, "node_modules/tailwindcss/node_modules/picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", @@ -11117,6 +11450,12 @@ "resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.3.3.tgz", "integrity": "sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==" }, + "node_modules/tinyexec": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.0.1.tgz", + "integrity": "sha512-5uC6DDlmeqiOwCPmK9jMSdOuZTh8bU39Ys6yidB+UTt5hfZUPGAypSgFRiEp+jbi9qH40BLDvy85jIU88wKSqw==", + "license": "MIT" + }, "node_modules/tinyglobby": { "version": "0.2.10", "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.10.tgz", @@ -11237,9 +11576,10 @@ } }, "node_modules/ufo": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.5.4.tgz", - "integrity": "sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ==" + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.6.1.tgz", + "integrity": "sha512-9a4/uxlTWJ4+a5i0ooc1rU7C7YOw3wT+UGqdeNNHWnOF9qcMBgLRS+4IYUqbczewFx4mLEig6gawh7X6mFlEkA==", + "license": "MIT" }, "node_modules/ultrahtml": { "version": "1.5.3", @@ -11252,14 +11592,42 @@ "integrity": "sha512-Ql87qFHB3s/De2ClA9e0gsnS6zXG27SkTiSJwjCc9MebbfapQfuPzumMIUMi38ezPZVNFcHI9sUIepeQfw8J8Q==" }, "node_modules/unctx": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/unctx/-/unctx-2.3.1.tgz", - "integrity": "sha512-PhKke8ZYauiqh3FEMVNm7ljvzQiph0Mt3GBRve03IJm7ukfaON2OBK795tLwhbyfzknuRRkW0+Ze+CQUmzOZ+A==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/unctx/-/unctx-2.4.1.tgz", + "integrity": "sha512-AbaYw0Nm4mK4qjhns67C+kgxR2YWiwlDBPzxrN8h8C6VtAdCgditAY5Dezu3IJy4XVqAnbrXt9oQJvsn3fyozg==", + "license": "MIT", "dependencies": { - "acorn": "^8.8.2", + "acorn": "^8.14.0", "estree-walker": "^3.0.3", - "magic-string": "^0.30.0", - "unplugin": "^1.3.1" + "magic-string": "^0.30.17", + "unplugin": "^2.1.0" + } + }, + "node_modules/unctx/node_modules/acorn": { + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", + "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/unctx/node_modules/unplugin": { + "version": "2.3.10", + "resolved": "https://registry.npmjs.org/unplugin/-/unplugin-2.3.10.tgz", + "integrity": "sha512-6NCPkv1ClwH+/BGE9QeoTIl09nuiAt0gS28nn1PvYXsGKRwM2TCbFA2QiilmehPDTXIe684k4rZI1yl3A1PCUw==", + "license": "MIT", + "dependencies": { + "@jridgewell/remapping": "^2.3.5", + "acorn": "^8.15.0", + "picomatch": "^4.0.3", + "webpack-virtual-modules": "^0.6.2" + }, + "engines": { + "node": ">=18.12.0" } }, "node_modules/undici-types": { @@ -11456,6 +11824,28 @@ "node": ">=14.0.0" } }, + "node_modules/unplugin-utils": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/unplugin-utils/-/unplugin-utils-0.3.0.tgz", + "integrity": "sha512-JLoggz+PvLVMJo+jZt97hdIIIZ2yTzGgft9e9q8iMrC4ewufl62ekeW7mixBghonn2gVb/ICjyvlmOCUBnJLQg==", + "license": "MIT", + "dependencies": { + "pathe": "^2.0.3", + "picomatch": "^4.0.3" + }, + "engines": { + "node": ">=20.19.0" + }, + "funding": { + "url": "https://github.com/sponsors/sxzz" + } + }, + "node_modules/unplugin-utils/node_modules/pathe": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", + "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", + "license": "MIT" + }, "node_modules/unplugin-vue-router": { "version": "0.10.8", "resolved": "https://registry.npmjs.org/unplugin-vue-router/-/unplugin-vue-router-0.10.8.tgz", diff --git a/package.json b/package.json index 9fa47ac..207bef7 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "@lezer/rust": "^1.0.2", "@nuxt/content": "^2.13.4", "@nuxtjs/color-mode": "^3.5.2", - "@nuxtjs/tailwindcss": "^6.12.2", + "@nuxtjs/tailwindcss": "^6.14.0", "@vueuse/core": "^11.3.0", "codemirror": "^6.0.1", "lucide-vue-next": "^0.460.0", diff --git a/pages/[...slug].vue b/pages/[...slug].vue index 22d5ccb..44f608b 100644 --- a/pages/[...slug].vue +++ b/pages/[...slug].vue @@ -22,8 +22,14 @@ const checkIfMobile = () => { isMobile.value = window.innerWidth <= mdWidth; }; +const isSolvedNow = (doc: ParsedContent) => { + if(!doc) return false; + const step = Number(localStorage.getItem("step") ?? 0); + return step == Number(doc.order); +}; + const canBeSkipped = (doc: ParsedContent) => { - return Number(localStorage.getItem("step") ?? 0) > Number(doc.order); + return Number(localStorage.getItem("step") ?? 0) >= Number(doc.order); }; const couldClickInNextButton = (doc: ParsedContent): boolean => { @@ -31,9 +37,49 @@ const couldClickInNextButton = (doc: ParsedContent): boolean => { return doc && doc.nextPath; } - if(doc && doc.expectedResponse) { - localStorage.setItem("step", doc.order); - return terminalResponse.value?.status === 200 && doc.expectedResponse === terminalResponse.value?.body?.result; + if(doc && (doc.expectedResponse || doc.tests) ) { + const compiled_successfully = terminalResponse.value?.status === 200 ; + + if (compiled_successfully && doc.expectedResponse) { + const expectedResponse = doc.expectedResponse === terminalResponse.value?.body?.result + + if (expectedResponse) { + localStorage.setItem("step", doc.order); + } else { + return false; + } + } + console.log("tests", doc.tests); + + if (compiled_successfully && doc.tests) { + const tests = doc.tests; + let evaluation = true; + + tests.forEach((test:string) => { + if (test.startsWith("should be contain ")) { + const content = test.replace("should be contain ", "").trim(); + const expresionsToTest = content.split("`").filter((exp) => exp !== " " && exp !== ""); + if(expresionsToTest.length === 0) return; + let aux = false; + + expresionsToTest.forEach((exp) => { + if (terminalResponse.value?.body?.result.includes(exp)) { + aux = true; + } + }) + + evaluation = evaluation && aux; + } + }); + console.log("evaluation", evaluation); + if (evaluation) { + localStorage.setItem("step", doc.order); + } else { + return false; + } + } + + return compiled_successfully; } return doc && doc.nextPath @@ -93,7 +139,8 @@ onMounted(() => { 'pointer-events-none text-gray-400': !couldClickInNextButton(doc), }" class="flex items-center gap-2 justify-center" > - Solucionado previamente + Solucionado previamente + Solucionado