diff --git a/package-lock.json b/package-lock.json index f5084f4..bea78ba 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,16 +10,16 @@ "license": "MIT", "devDependencies": { "@astrojs/solid-js": "^0.4.1", - "@typescript-eslint/eslint-plugin": "^5.30.7", - "@typescript-eslint/parser": "^5.30.7", + "@typescript-eslint/eslint-plugin": "^5.31.0", + "@typescript-eslint/parser": "^5.31.0", "astro": "^1.0.0-beta.73", "astro-icon": "^0.7.3", "eslint": "^8.20.0", "eslint-plugin-solid": "^0.7.1", "prettier": "^2.7.1", - "prettier-plugin-astro": "^0.1.1", - "sass": "^1.53.0", - "solid-js": "^1.4.7" + "prettier-plugin-astro": "^0.2.0", + "sass": "^1.54.0", + "solid-js": "^1.4.8" } }, "node_modules/@ampproject/remapping": { @@ -885,14 +885,14 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.30.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.30.7.tgz", - "integrity": "sha512-l4L6Do+tfeM2OK0GJsU7TUcM/1oN/N25xHm3Jb4z3OiDU4Lj8dIuxX9LpVMS9riSXQs42D1ieX7b85/r16H9Fw==", + "version": "5.31.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.31.0.tgz", + "integrity": "sha512-VKW4JPHzG5yhYQrQ1AzXgVgX8ZAJEvCz0QI6mLRX4tf7rnFfh5D8SKm0Pq6w5PyNfAWJk6sv313+nEt3ohWMBQ==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.30.7", - "@typescript-eslint/type-utils": "5.30.7", - "@typescript-eslint/utils": "5.30.7", + "@typescript-eslint/scope-manager": "5.31.0", + "@typescript-eslint/type-utils": "5.31.0", + "@typescript-eslint/utils": "5.31.0", "debug": "^4.3.4", "functional-red-black-tree": "^1.0.1", "ignore": "^5.2.0", @@ -918,14 +918,14 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "5.30.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.30.7.tgz", - "integrity": "sha512-Rg5xwznHWWSy7v2o0cdho6n+xLhK2gntImp0rJroVVFkcYFYQ8C8UJTSuTw/3CnExBmPjycjmUJkxVmjXsld6A==", + "version": "5.31.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.31.0.tgz", + "integrity": "sha512-UStjQiZ9OFTFReTrN+iGrC6O/ko9LVDhreEK5S3edmXgR396JGq7CoX2TWIptqt/ESzU2iRKXAHfSF2WJFcWHw==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.30.7", - "@typescript-eslint/types": "5.30.7", - "@typescript-eslint/typescript-estree": "5.30.7", + "@typescript-eslint/scope-manager": "5.31.0", + "@typescript-eslint/types": "5.31.0", + "@typescript-eslint/typescript-estree": "5.31.0", "debug": "^4.3.4" }, "engines": { @@ -945,13 +945,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "5.30.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.30.7.tgz", - "integrity": "sha512-7BM1bwvdF1UUvt+b9smhqdc/eniOnCKxQT/kj3oXtj3LqnTWCAM0qHRHfyzCzhEfWX0zrW7KqXXeE4DlchZBKw==", + "version": "5.31.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.31.0.tgz", + "integrity": "sha512-8jfEzBYDBG88rcXFxajdVavGxb5/XKXyvWgvD8Qix3EEJLCFIdVloJw+r9ww0wbyNLOTYyBsR+4ALNGdlalLLg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.30.7", - "@typescript-eslint/visitor-keys": "5.30.7" + "@typescript-eslint/types": "5.31.0", + "@typescript-eslint/visitor-keys": "5.31.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -962,12 +962,12 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "5.30.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.30.7.tgz", - "integrity": "sha512-nD5qAE2aJX/YLyKMvOU5jvJyku4QN5XBVsoTynFrjQZaDgDV6i7QHFiYCx10wvn7hFvfuqIRNBtsgaLe0DbWhw==", + "version": "5.31.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.31.0.tgz", + "integrity": "sha512-7ZYqFbvEvYXFn9ax02GsPcEOmuWNg+14HIf4q+oUuLnMbpJ6eHAivCg7tZMVwzrIuzX3QCeAOqKoyMZCv5xe+w==", "dev": true, "dependencies": { - "@typescript-eslint/utils": "5.30.7", + "@typescript-eslint/utils": "5.31.0", "debug": "^4.3.4", "tsutils": "^3.21.0" }, @@ -988,9 +988,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "5.30.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.30.7.tgz", - "integrity": "sha512-ocVkETUs82+U+HowkovV6uxf1AnVRKCmDRNUBUUo46/5SQv1owC/EBFkiu4MOHeZqhKz2ktZ3kvJJ1uFqQ8QPg==", + "version": "5.31.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.31.0.tgz", + "integrity": "sha512-/f/rMaEseux+I4wmR6mfpM2wvtNZb1p9hAV77hWfuKc3pmaANp5dLAZSiE3/8oXTYTt3uV9KW5yZKJsMievp6g==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1001,13 +1001,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.30.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.30.7.tgz", - "integrity": "sha512-tNslqXI1ZdmXXrHER83TJ8OTYl4epUzJC0aj2i4DMDT4iU+UqLT3EJeGQvJ17BMbm31x5scSwo3hPM0nqQ1AEA==", + "version": "5.31.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.31.0.tgz", + "integrity": "sha512-3S625TMcARX71wBc2qubHaoUwMEn+l9TCsaIzYI/ET31Xm2c9YQ+zhGgpydjorwQO9pLfR/6peTzS/0G3J/hDw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.30.7", - "@typescript-eslint/visitor-keys": "5.30.7", + "@typescript-eslint/types": "5.31.0", + "@typescript-eslint/visitor-keys": "5.31.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -1028,15 +1028,15 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "5.30.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.30.7.tgz", - "integrity": "sha512-Z3pHdbFw+ftZiGUnm1GZhkJgVqsDL5CYW2yj+TB2mfXDFOMqtbzQi2dNJIyPqPbx9mv2kUxS1gU+r2gKlKi1rQ==", + "version": "5.31.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.31.0.tgz", + "integrity": "sha512-kcVPdQS6VIpVTQ7QnGNKMFtdJdvnStkqS5LeALr4rcwx11G6OWb2HB17NMPnlRHvaZP38hL9iK8DdE9Fne7NYg==", "dev": true, "dependencies": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.30.7", - "@typescript-eslint/types": "5.30.7", - "@typescript-eslint/typescript-estree": "5.30.7", + "@typescript-eslint/scope-manager": "5.31.0", + "@typescript-eslint/types": "5.31.0", + "@typescript-eslint/typescript-estree": "5.31.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" }, @@ -1074,12 +1074,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.30.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.30.7.tgz", - "integrity": "sha512-KrRXf8nnjvcpxDFOKej4xkD7657+PClJs5cJVSG7NNoCNnjEdc46juNAQt7AyuWctuCgs6mVRc1xGctEqrjxWw==", + "version": "5.31.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.31.0.tgz", + "integrity": "sha512-ZK0jVxSjS4gnPirpVjXHz7mgdOsZUHzNYSfTw2yPa3agfbt9YfqaBiBZFSSxeBWnpWkzCxTfUpnzA3Vily/CSg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.30.7", + "@typescript-eslint/types": "5.31.0", "eslint-visitor-keys": "^3.3.0" }, "engines": { @@ -6190,31 +6190,21 @@ } }, "node_modules/prettier-plugin-astro": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/prettier-plugin-astro/-/prettier-plugin-astro-0.1.1.tgz", - "integrity": "sha512-587zFbgQoZm13jjGukkW0xMDKLwuMw6RlSuvsjdjRr43JWUFTJVxwFnw44pLYLVRwGQLOCDBwBKiZEJ10ghBlQ==", + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/prettier-plugin-astro/-/prettier-plugin-astro-0.2.0.tgz", + "integrity": "sha512-T+pWXK6AWcIE+KMSI6RFCshDLvAofiMuSk4w7tO3UtG4Fgpm1eyqmddTStIGmURjx+KgqIrRogV1QEzwet+teg==", "dev": true, "dependencies": { - "@astrojs/compiler": "^0.15.2", - "prettier": "^2.6.2", + "@astrojs/compiler": "^0.19.0", + "prettier": "^2.7.1", "sass-formatter": "^0.7.2", "synckit": "^0.7.0" }, "engines": { - "node": "^14.13.1 || >=16.0.0", + "node": "^14.15.0 || >=16.0.0", "npm": ">=6.14.0" } }, - "node_modules/prettier-plugin-astro/node_modules/@astrojs/compiler": { - "version": "0.15.2", - "resolved": "https://registry.npmjs.org/@astrojs/compiler/-/compiler-0.15.2.tgz", - "integrity": "sha512-YsxIyx026zPWbxv3wYrudr1jh8u6oSnhP6MW+9OAgiFuICHjSX4Rw+qm8wJj1D5IkJ3HsDtE+kFMMYIozZ5bvQ==", - "dev": true, - "dependencies": { - "tsm": "^2.2.1", - "uvu": "^0.5.3" - } - }, "node_modules/prismjs": { "version": "1.28.0", "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.28.0.tgz", @@ -6710,9 +6700,9 @@ "dev": true }, "node_modules/sass": { - "version": "1.53.0", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.53.0.tgz", - "integrity": "sha512-zb/oMirbKhUgRQ0/GFz8TSAwRq2IlR29vOUJZOx0l8sV+CkHUfHa4u5nqrG+1VceZp7Jfj59SVW9ogdhTvJDcQ==", + "version": "1.54.0", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.54.0.tgz", + "integrity": "sha512-C4zp79GCXZfK0yoHZg+GxF818/aclhp9F48XBu/+bm9vXEVAYov9iU3FBVRMq3Hx3OA4jfKL+p2K9180mEh0xQ==", "dev": true, "dependencies": { "chokidar": ">=3.0.0 <4.0.0", @@ -6854,9 +6844,9 @@ } }, "node_modules/solid-js": { - "version": "1.4.7", - "resolved": "https://registry.npmjs.org/solid-js/-/solid-js-1.4.7.tgz", - "integrity": "sha512-u3hoe5w3xseAc/8zLwYaQVGanWXknMMQkzryNz7lOPy2ygW6DhCtfMseun4kLflRNRzrUUpTV3W5p7j2SGcHCQ==", + "version": "1.4.8", + "resolved": "https://registry.npmjs.org/solid-js/-/solid-js-1.4.8.tgz", + "integrity": "sha512-XErZdnnYYXF7OwGSUAPcua2y5/ELB/c53zFCpWiEGqxTNoH1iQghzI8EsHJXk06sNn+Z/TGhb8bPDNNGSgimag==", "dev": true }, "node_modules/source-map": { @@ -8681,14 +8671,14 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "5.30.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.30.7.tgz", - "integrity": "sha512-l4L6Do+tfeM2OK0GJsU7TUcM/1oN/N25xHm3Jb4z3OiDU4Lj8dIuxX9LpVMS9riSXQs42D1ieX7b85/r16H9Fw==", + "version": "5.31.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.31.0.tgz", + "integrity": "sha512-VKW4JPHzG5yhYQrQ1AzXgVgX8ZAJEvCz0QI6mLRX4tf7rnFfh5D8SKm0Pq6w5PyNfAWJk6sv313+nEt3ohWMBQ==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.30.7", - "@typescript-eslint/type-utils": "5.30.7", - "@typescript-eslint/utils": "5.30.7", + "@typescript-eslint/scope-manager": "5.31.0", + "@typescript-eslint/type-utils": "5.31.0", + "@typescript-eslint/utils": "5.31.0", "debug": "^4.3.4", "functional-red-black-tree": "^1.0.1", "ignore": "^5.2.0", @@ -8698,52 +8688,52 @@ } }, "@typescript-eslint/parser": { - "version": "5.30.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.30.7.tgz", - "integrity": "sha512-Rg5xwznHWWSy7v2o0cdho6n+xLhK2gntImp0rJroVVFkcYFYQ8C8UJTSuTw/3CnExBmPjycjmUJkxVmjXsld6A==", + "version": "5.31.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.31.0.tgz", + "integrity": "sha512-UStjQiZ9OFTFReTrN+iGrC6O/ko9LVDhreEK5S3edmXgR396JGq7CoX2TWIptqt/ESzU2iRKXAHfSF2WJFcWHw==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.30.7", - "@typescript-eslint/types": "5.30.7", - "@typescript-eslint/typescript-estree": "5.30.7", + "@typescript-eslint/scope-manager": "5.31.0", + "@typescript-eslint/types": "5.31.0", + "@typescript-eslint/typescript-estree": "5.31.0", "debug": "^4.3.4" } }, "@typescript-eslint/scope-manager": { - "version": "5.30.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.30.7.tgz", - "integrity": "sha512-7BM1bwvdF1UUvt+b9smhqdc/eniOnCKxQT/kj3oXtj3LqnTWCAM0qHRHfyzCzhEfWX0zrW7KqXXeE4DlchZBKw==", + "version": "5.31.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.31.0.tgz", + "integrity": "sha512-8jfEzBYDBG88rcXFxajdVavGxb5/XKXyvWgvD8Qix3EEJLCFIdVloJw+r9ww0wbyNLOTYyBsR+4ALNGdlalLLg==", "dev": true, "requires": { - "@typescript-eslint/types": "5.30.7", - "@typescript-eslint/visitor-keys": "5.30.7" + "@typescript-eslint/types": "5.31.0", + "@typescript-eslint/visitor-keys": "5.31.0" } }, "@typescript-eslint/type-utils": { - "version": "5.30.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.30.7.tgz", - "integrity": "sha512-nD5qAE2aJX/YLyKMvOU5jvJyku4QN5XBVsoTynFrjQZaDgDV6i7QHFiYCx10wvn7hFvfuqIRNBtsgaLe0DbWhw==", + "version": "5.31.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.31.0.tgz", + "integrity": "sha512-7ZYqFbvEvYXFn9ax02GsPcEOmuWNg+14HIf4q+oUuLnMbpJ6eHAivCg7tZMVwzrIuzX3QCeAOqKoyMZCv5xe+w==", "dev": true, "requires": { - "@typescript-eslint/utils": "5.30.7", + "@typescript-eslint/utils": "5.31.0", "debug": "^4.3.4", "tsutils": "^3.21.0" } }, "@typescript-eslint/types": { - "version": "5.30.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.30.7.tgz", - "integrity": "sha512-ocVkETUs82+U+HowkovV6uxf1AnVRKCmDRNUBUUo46/5SQv1owC/EBFkiu4MOHeZqhKz2ktZ3kvJJ1uFqQ8QPg==", + "version": "5.31.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.31.0.tgz", + "integrity": "sha512-/f/rMaEseux+I4wmR6mfpM2wvtNZb1p9hAV77hWfuKc3pmaANp5dLAZSiE3/8oXTYTt3uV9KW5yZKJsMievp6g==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "5.30.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.30.7.tgz", - "integrity": "sha512-tNslqXI1ZdmXXrHER83TJ8OTYl4epUzJC0aj2i4DMDT4iU+UqLT3EJeGQvJ17BMbm31x5scSwo3hPM0nqQ1AEA==", + "version": "5.31.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.31.0.tgz", + "integrity": "sha512-3S625TMcARX71wBc2qubHaoUwMEn+l9TCsaIzYI/ET31Xm2c9YQ+zhGgpydjorwQO9pLfR/6peTzS/0G3J/hDw==", "dev": true, "requires": { - "@typescript-eslint/types": "5.30.7", - "@typescript-eslint/visitor-keys": "5.30.7", + "@typescript-eslint/types": "5.31.0", + "@typescript-eslint/visitor-keys": "5.31.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -8752,15 +8742,15 @@ } }, "@typescript-eslint/utils": { - "version": "5.30.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.30.7.tgz", - "integrity": "sha512-Z3pHdbFw+ftZiGUnm1GZhkJgVqsDL5CYW2yj+TB2mfXDFOMqtbzQi2dNJIyPqPbx9mv2kUxS1gU+r2gKlKi1rQ==", + "version": "5.31.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.31.0.tgz", + "integrity": "sha512-kcVPdQS6VIpVTQ7QnGNKMFtdJdvnStkqS5LeALr4rcwx11G6OWb2HB17NMPnlRHvaZP38hL9iK8DdE9Fne7NYg==", "dev": true, "requires": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.30.7", - "@typescript-eslint/types": "5.30.7", - "@typescript-eslint/typescript-estree": "5.30.7", + "@typescript-eslint/scope-manager": "5.31.0", + "@typescript-eslint/types": "5.31.0", + "@typescript-eslint/typescript-estree": "5.31.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" }, @@ -8784,12 +8774,12 @@ } }, "@typescript-eslint/visitor-keys": { - "version": "5.30.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.30.7.tgz", - "integrity": "sha512-KrRXf8nnjvcpxDFOKej4xkD7657+PClJs5cJVSG7NNoCNnjEdc46juNAQt7AyuWctuCgs6mVRc1xGctEqrjxWw==", + "version": "5.31.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.31.0.tgz", + "integrity": "sha512-ZK0jVxSjS4gnPirpVjXHz7mgdOsZUHzNYSfTw2yPa3agfbt9YfqaBiBZFSSxeBWnpWkzCxTfUpnzA3Vily/CSg==", "dev": true, "requires": { - "@typescript-eslint/types": "5.30.7", + "@typescript-eslint/types": "5.31.0", "eslint-visitor-keys": "^3.3.0" } }, @@ -12258,27 +12248,15 @@ "dev": true }, "prettier-plugin-astro": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/prettier-plugin-astro/-/prettier-plugin-astro-0.1.1.tgz", - "integrity": "sha512-587zFbgQoZm13jjGukkW0xMDKLwuMw6RlSuvsjdjRr43JWUFTJVxwFnw44pLYLVRwGQLOCDBwBKiZEJ10ghBlQ==", + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/prettier-plugin-astro/-/prettier-plugin-astro-0.2.0.tgz", + "integrity": "sha512-T+pWXK6AWcIE+KMSI6RFCshDLvAofiMuSk4w7tO3UtG4Fgpm1eyqmddTStIGmURjx+KgqIrRogV1QEzwet+teg==", "dev": true, "requires": { - "@astrojs/compiler": "^0.15.2", - "prettier": "^2.6.2", + "@astrojs/compiler": "^0.19.0", + "prettier": "^2.7.1", "sass-formatter": "^0.7.2", "synckit": "^0.7.0" - }, - "dependencies": { - "@astrojs/compiler": { - "version": "0.15.2", - "resolved": "https://registry.npmjs.org/@astrojs/compiler/-/compiler-0.15.2.tgz", - "integrity": "sha512-YsxIyx026zPWbxv3wYrudr1jh8u6oSnhP6MW+9OAgiFuICHjSX4Rw+qm8wJj1D5IkJ3HsDtE+kFMMYIozZ5bvQ==", - "dev": true, - "requires": { - "tsm": "^2.2.1", - "uvu": "^0.5.3" - } - } } }, "prismjs": { @@ -12625,9 +12603,9 @@ "dev": true }, "sass": { - "version": "1.53.0", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.53.0.tgz", - "integrity": "sha512-zb/oMirbKhUgRQ0/GFz8TSAwRq2IlR29vOUJZOx0l8sV+CkHUfHa4u5nqrG+1VceZp7Jfj59SVW9ogdhTvJDcQ==", + "version": "1.54.0", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.54.0.tgz", + "integrity": "sha512-C4zp79GCXZfK0yoHZg+GxF818/aclhp9F48XBu/+bm9vXEVAYov9iU3FBVRMq3Hx3OA4jfKL+p2K9180mEh0xQ==", "dev": true, "requires": { "chokidar": ">=3.0.0 <4.0.0", @@ -12738,9 +12716,9 @@ "dev": true }, "solid-js": { - "version": "1.4.7", - "resolved": "https://registry.npmjs.org/solid-js/-/solid-js-1.4.7.tgz", - "integrity": "sha512-u3hoe5w3xseAc/8zLwYaQVGanWXknMMQkzryNz7lOPy2ygW6DhCtfMseun4kLflRNRzrUUpTV3W5p7j2SGcHCQ==", + "version": "1.4.8", + "resolved": "https://registry.npmjs.org/solid-js/-/solid-js-1.4.8.tgz", + "integrity": "sha512-XErZdnnYYXF7OwGSUAPcua2y5/ELB/c53zFCpWiEGqxTNoH1iQghzI8EsHJXk06sNn+Z/TGhb8bPDNNGSgimag==", "dev": true }, "source-map": { diff --git a/package.json b/package.json index fcaa6d9..a5afb26 100644 --- a/package.json +++ b/package.json @@ -19,15 +19,15 @@ }, "devDependencies": { "@astrojs/solid-js": "^0.4.1", - "@typescript-eslint/eslint-plugin": "^5.30.7", - "@typescript-eslint/parser": "^5.30.7", + "@typescript-eslint/eslint-plugin": "^5.31.0", + "@typescript-eslint/parser": "^5.31.0", "astro": "^1.0.0-beta.73", "astro-icon": "^0.7.3", "eslint": "^8.20.0", "eslint-plugin-solid": "^0.7.1", "prettier": "^2.7.1", - "prettier-plugin-astro": "^0.1.1", - "sass": "^1.53.0", - "solid-js": "^1.4.7" + "prettier-plugin-astro": "^0.2.0", + "sass": "^1.54.0", + "solid-js": "^1.4.8" } } diff --git a/src/components/ArticlesList/ArticlesList.tsx b/src/components/ArticlesList/ArticlesList.tsx index ad8a32c..befb9c7 100644 --- a/src/components/ArticlesList/ArticlesList.tsx +++ b/src/components/ArticlesList/ArticlesList.tsx @@ -39,7 +39,7 @@ const ArticlesList: Component = (props) => { * Find articles by title */ if (search()) { - filtered = findArticlesBySearch(search(), filtered); + filtered = findArticlesBySearch(search().trim(), filtered); setArticles(filtered); } diff --git a/src/components/SearchInput/SearchInput.tsx b/src/components/SearchInput/SearchInput.tsx index 0e075ee..5430cd6 100644 --- a/src/components/SearchInput/SearchInput.tsx +++ b/src/components/SearchInput/SearchInput.tsx @@ -25,14 +25,14 @@ const SearchInput: Component = (props) => { * Update state and set url param */ const onSearch: JSX.EventHandler = (e) => { - const value = e.currentTarget.value.trim(); + const value = e.currentTarget.value; - if (value.length === 0) { + if (value.trim().length === 0) { resetSearch(); return; } - const url = utils.setParamToUrl('search', value); + const url = utils.setParamToUrl('search', value.trim()); history.replaceState(null, '', `${location.pathname}?${url}`); setSearch(value); @@ -48,6 +48,7 @@ const SearchInput: Component = (props) => { resetSearch(); return; } + console.log(param); setSearch(param); }); diff --git a/src/layouts/article.astro b/src/layouts/article.astro index e8f4abc..09df866 100644 --- a/src/layouts/article.astro +++ b/src/layouts/article.astro @@ -1,36 +1,36 @@ --- - import type { Props as BaseHeadProps } from '@root/components/BaseHead.astro'; +import type { Props as BaseHeadProps } from '@root/components/BaseHead.astro'; - import BaseHead from '@components/BaseHead.astro'; - import BaseLayout from '@components/BaseLayout'; - import ArticleContent from '@components/ArticleContent'; - import ArticlePost from '@components/ArticlePost'; - import '@styles/global.scss'; +import BaseHead from '@components/BaseHead.astro'; +import BaseLayout from '@components/BaseLayout'; +import ArticleContent from '@components/ArticleContent'; +import ArticlePost from '@components/ArticlePost'; +import '@styles/global.scss'; - export interface Props extends BaseHeadProps { - lang?: string | undefined; - content: ArticleType; - } +export interface Props extends BaseHeadProps { + lang?: string | undefined; + content: ArticleType; +} - const { lang = 'ru', content } = Astro.props as Props; +const { lang = 'ru', content } = Astro.props as Props; --- + + + + + - -
- - - - - -
-
- - \ No newline at end of file + +
+ + + + + +
+
+ diff --git a/src/pages/[article].astro b/src/pages/[article].astro index 4828f16..aa7a4a7 100644 --- a/src/pages/[article].astro +++ b/src/pages/[article].astro @@ -10,6 +10,7 @@ export function getStaticPaths() { ('../../content/articles/**/*.md'); -const tags = new Set(articles.map((article) => article.frontmatter.tags).flat()); + const articles = await Astro.glob('../../content/articles/**/*.md'); + const tags = new Set(articles.map((article) => article.frontmatter.tags).flat()); --- - +
- +
-
+
\ No newline at end of file diff --git a/src/types/main.d.ts b/src/types/main.d.ts index cefc251..376b102 100644 --- a/src/types/main.d.ts +++ b/src/types/main.d.ts @@ -12,6 +12,7 @@ declare global { type ArticleType = { title: string; + description: string; author: string; tags: Array; published_at: string; diff --git a/src/utils/articles.ts b/src/utils/articles.ts index 845d8b6..efd9d49 100644 --- a/src/utils/articles.ts +++ b/src/utils/articles.ts @@ -3,6 +3,7 @@ import { MarkdownInstance } from 'astro'; export const transformArticles = (articles: MarkdownInstance[]): ArticleType[] => articles.map((article) => ({ title: article.frontmatter.title, + description: article.frontmatter.description, author: article.frontmatter.author, tags: article.frontmatter.tags, published_at: article.frontmatter.published_at, @@ -31,9 +32,14 @@ export const formatToArticleBlocks = (articles: ArticleType[]): ArticleBlockType export const findArticlesBySearch = (search: string, articles: ArticleBlockType): ArticleBlockType => { const matched: Array = []; + search = search.toLocaleLowerCase(); + for (const year in articles) { for (const article of articles[year]) { - const match = article.title.toLocaleLowerCase().includes(search.toLocaleLowerCase()); + const title = article.title.toLocaleLowerCase(); + const description = article.description.toLocaleLowerCase(); + const match = title.includes(search) || description.includes(search); + if (match) matched.push(article); } }