From 4de78521c523b8062c8121694c10dfea8ab4c0f7 Mon Sep 17 00:00:00 2001 From: cirry <> Date: Thu, 31 Oct 2024 16:20:14 +0800 Subject: [PATCH] feat: upgrade, support github card --- astro.config.mjs | 3 +- package.json | 8 +- pnpm-lock.yaml | 574 ++++++++++++++----------- src/content/blog/new-features.md | 4 + src/remarkPlugin/remark-github-card.js | 145 +++++++ src/styles/index.css | 8 +- 6 files changed, 490 insertions(+), 252 deletions(-) create mode 100644 src/remarkPlugin/remark-github-card.js diff --git a/astro.config.mjs b/astro.config.mjs index 1a6e493..a15aa21 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -8,6 +8,7 @@ import {resetRemark} from "./src/remarkPlugin/reset-remark.js"; import remarkDirective from "remark-directive"; import {remarkAsides} from './src/remarkPlugin/remark-asides.js' import {remarkCollapse} from "./src/remarkPlugin/remark-collapse.js"; +import {remarkGithubCard} from './src/remarkPlugin/remark-github-card.js' import expressiveCode from "astro-expressive-code"; import {pluginLineNumbers} from '@expressive-code/plugin-line-numbers' @@ -40,7 +41,7 @@ export default defineConfig({ themeCssSelector: (theme) => `[data-theme="${theme.type}"]` }), mdx()], markdown: { - remarkPlugins: [remarkModifiedTime, resetRemark, remarkDirective, remarkAsides({}),remarkCollapse({})], + remarkPlugins: [remarkModifiedTime, resetRemark, remarkDirective, remarkAsides({}),remarkCollapse({}),remarkGithubCard()], rehypePlugins: [customRehypeLazyLoadImage], } }); diff --git a/package.json b/package.json index f9eb774..a8786d5 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "astro-blog", "type": "module", - "version": "0.0.4", + "version": "0.0.5", "scripts": { "dev": "astro dev", "start": "astro dev", @@ -10,7 +10,7 @@ "astro": "astro" }, "dependencies": { - "@astrojs/mdx": "^3.1.8", + "@astrojs/mdx": "^3.1.9", "@astrojs/rss": "^4.0.9", "@astrojs/sitemap": "^3.2.1", "@astrojs/solid-js": "^4.4.2", @@ -19,7 +19,7 @@ "@expressive-code/plugin-line-numbers": "^0.33.5", "@fancyapps/ui": "^5.0.35", "@waline/client": "^3.1.3", - "astro": "^4.16.5", + "astro": "^4.16.8", "astro-expressive-code": "^0.33.5", "child_process": "^1.0.2", "dayjs": "^1.11.10", @@ -28,7 +28,7 @@ "mdast-util-to-string": "^4.0.0", "reading-time": "^1.5.0", "remark-directive": "^3.0.0", - "remixicon": "^4.2.0", + "remixicon": "^4.5.0", "solid-js": "^1.8.15", "tailwindcss": "^3.4.1", "tocbot": "^4.25.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 867492c..c8eda1d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,8 +9,8 @@ importers: .: dependencies: '@astrojs/mdx': - specifier: ^3.1.8 - version: 3.1.8(astro@4.16.5(rollup@4.21.0)(sass@1.72.0)(typescript@5.4.2)) + specifier: ^3.1.9 + version: 3.1.9(astro@4.16.8(rollup@4.21.0)(sass@1.72.0)(typescript@5.4.2)) '@astrojs/rss': specifier: ^4.0.9 version: 4.0.9 @@ -19,10 +19,10 @@ importers: version: 3.2.1 '@astrojs/solid-js': specifier: ^4.4.2 - version: 4.4.2(solid-js@1.8.15)(vite@5.4.9(sass@1.72.0)) + version: 4.4.2(solid-js@1.8.15)(vite@5.4.10(sass@1.72.0)) '@astrojs/tailwind': specifier: ^5.1.2 - version: 5.1.2(astro@4.16.5(rollup@4.21.0)(sass@1.72.0)(typescript@5.4.2))(tailwindcss@3.4.1) + version: 5.1.2(astro@4.16.8(rollup@4.21.0)(sass@1.72.0)(typescript@5.4.2))(tailwindcss@3.4.1) '@expressive-code/plugin-collapsible-sections': specifier: ^0.33.5 version: 0.33.5 @@ -36,11 +36,11 @@ importers: specifier: ^3.1.3 version: 3.1.3(typescript@5.4.2) astro: - specifier: ^4.16.5 - version: 4.16.5(rollup@4.21.0)(sass@1.72.0)(typescript@5.4.2) + specifier: ^4.16.8 + version: 4.16.8(rollup@4.21.0)(sass@1.72.0)(typescript@5.4.2) astro-expressive-code: specifier: ^0.33.5 - version: 0.33.5(astro@4.16.5(rollup@4.21.0)(sass@1.72.0)(typescript@5.4.2)) + version: 0.33.5(astro@4.16.8(rollup@4.21.0)(sass@1.72.0)(typescript@5.4.2)) child_process: specifier: ^1.0.2 version: 1.0.2 @@ -63,8 +63,8 @@ importers: specifier: ^3.0.0 version: 3.0.0 remixicon: - specifier: ^4.2.0 - version: 4.2.0 + specifier: ^4.5.0 + version: 4.5.0 solid-js: specifier: ^1.8.15 version: 1.8.15 @@ -107,8 +107,8 @@ packages: '@astrojs/markdown-remark@5.3.0': resolution: {integrity: sha512-r0Ikqr0e6ozPb5bvhup1qdWnSPUvQu6tub4ZLYaKyG50BXZ0ej6FhGz3GpChKpH7kglRFPObJd/bDyf2VM9pkg==} - '@astrojs/mdx@3.1.8': - resolution: {integrity: sha512-4o/+pvgoLFG0eG96cFs4t3NzZAIAOYu57fKAprWHXJrnq/qdBV0av6BYDjoESxvxNILUYoj8sdZVWtlPWVDLog==} + '@astrojs/mdx@3.1.9': + resolution: {integrity: sha512-3jPD4Bff6lIA20RQoonnZkRtZ9T3i0HFm6fcDF7BMsKIZ+xBP2KXzQWiuGu62lrVCmU612N+SQVGl5e0fI+zWg==} engines: {node: ^18.17.1 || ^20.3.0 || >=21.0.0} peerDependencies: astro: ^4.8.0 @@ -147,44 +147,44 @@ packages: resolution: {integrity: sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==} engines: {node: '>=6.9.0'} - '@babel/code-frame@7.25.7': - resolution: {integrity: sha512-0xZJFNE5XMpENsgfHYTw8FbX4kv53mFLn2i3XPoq69LyhYSCBJtitaHx9QnsVTrsogI4Z3+HtEfZ2/GFPOtf5g==} + '@babel/code-frame@7.26.2': + resolution: {integrity: sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==} engines: {node: '>=6.9.0'} '@babel/compat-data@7.25.2': resolution: {integrity: sha512-bYcppcpKBvX4znYaPEeFau03bp89ShqNMLs+rmdptMw+heSZh9+z84d2YG+K7cYLbWwzdjtDoW/uqZmPjulClQ==} engines: {node: '>=6.9.0'} - '@babel/compat-data@7.25.8': - resolution: {integrity: sha512-ZsysZyXY4Tlx+Q53XdnOFmqwfB9QDTHYxaZYajWRoBLuLEAwI2UIbtxOjWh/cFaa9IKUlcB+DDuoskLuKu56JA==} + '@babel/compat-data@7.26.2': + resolution: {integrity: sha512-Z0WgzSEa+aUcdiJuCIqgujCshpMWgUpgOxXotrYPSA53hA3qopNaqcJpyr0hVb1FeWdnqFA35/fUtXgBK8srQg==} engines: {node: '>=6.9.0'} '@babel/core@7.25.2': resolution: {integrity: sha512-BBt3opiCOxUr9euZ5/ro/Xv8/V7yJ5bjYMqG/C1YAo8MIKAnumZalCN+msbci3Pigy4lIQfPUpfMM27HMGaYEA==} engines: {node: '>=6.9.0'} - '@babel/core@7.25.8': - resolution: {integrity: sha512-Oixnb+DzmRT30qu9d3tJSQkxuygWm32DFykT4bRoORPa9hZ/L4KhVB/XiRm6KG+roIEM7DBQlmg27kw2HZkdZg==} + '@babel/core@7.26.0': + resolution: {integrity: sha512-i1SLeK+DzNnQ3LL/CswPCa/E5u4lh1k6IAEphON8F+cXt0t9euTshDru0q7/IqMa1PMPz5RnHuHscF8/ZJsStg==} engines: {node: '>=6.9.0'} '@babel/generator@7.25.0': resolution: {integrity: sha512-3LEEcj3PVW8pW2R1SR1M89g/qrYk/m/mB/tLqn7dn4sbBUQyTqnlod+II2U4dqiGtUmkcnAmkMDralTFZttRiw==} engines: {node: '>=6.9.0'} - '@babel/generator@7.25.7': - resolution: {integrity: sha512-5Dqpl5fyV9pIAD62yK9P7fcA768uVPUyrQmqpqstHWgMma4feF1x/oFysBCVZLY5wJ2GkMUCdsNDnGZrPoR6rA==} + '@babel/generator@7.26.2': + resolution: {integrity: sha512-zevQbhbau95nkoxSq3f/DC/SC+EEOUZd3DYqfSkMhY2/wfSeaHV1Ew4vk8e+x8lja31IbyuUa2uQ3JONqKbysw==} engines: {node: '>=6.9.0'} - '@babel/helper-annotate-as-pure@7.25.7': - resolution: {integrity: sha512-4xwU8StnqnlIhhioZf1tqnVWeQ9pvH/ujS8hRfw/WOza+/a+1qv69BWNy+oY231maTCWgKWhfBU7kDpsds6zAA==} + '@babel/helper-annotate-as-pure@7.25.9': + resolution: {integrity: sha512-gv7320KBUFJz1RnylIg5WWYPRXKZ884AGkYpgpWW02TH66Dl+HaC1t1CKd0z3R4b6hdYEcmrNZHUmfCP+1u3/g==} engines: {node: '>=6.9.0'} '@babel/helper-compilation-targets@7.25.2': resolution: {integrity: sha512-U2U5LsSaZ7TAt3cfaymQ8WHh0pxvdHoEk6HVpaexxixjyEquMh0L0YNJNM6CTGKMXV1iksi0iZkGw4AcFkPaaw==} engines: {node: '>=6.9.0'} - '@babel/helper-compilation-targets@7.25.7': - resolution: {integrity: sha512-DniTEax0sv6isaw6qSQSfV4gVRNtw2rte8HHM45t9ZR0xILaufBRNkpMifCRiAPyvL4ACD6v0gfCwCmtOQaV4A==} + '@babel/helper-compilation-targets@7.25.9': + resolution: {integrity: sha512-j9Db8Suy6yV/VHa4qzrj9yZfZxhLWQdVnRlXxmKLYlhWUVB1sB2G5sxuWYXk/whHD9iW76PmNzxZ4UCnTQTVEQ==} engines: {node: '>=6.9.0'} '@babel/helper-module-imports@7.18.6': @@ -195,8 +195,8 @@ packages: resolution: {integrity: sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA==} engines: {node: '>=6.9.0'} - '@babel/helper-module-imports@7.25.7': - resolution: {integrity: sha512-o0xCgpNmRohmnoWKQ0Ij8IdddjyBFE4T2kagL/x6M3+4zUgc+4qTOUBoNe4XxDskt1HPKO007ZPiMgLDq2s7Kw==} + '@babel/helper-module-imports@7.25.9': + resolution: {integrity: sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw==} engines: {node: '>=6.9.0'} '@babel/helper-module-transforms@7.25.2': @@ -205,8 +205,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0 - '@babel/helper-module-transforms@7.25.7': - resolution: {integrity: sha512-k/6f8dKG3yDz/qCwSM+RKovjMix563SLxQFo0UhRNo239SP6n9u5/eLtKD6EAjwta2JHJ49CsD8pms2HdNiMMQ==} + '@babel/helper-module-transforms@7.26.0': + resolution: {integrity: sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 @@ -215,18 +215,14 @@ packages: resolution: {integrity: sha512-FFWx5142D8h2Mgr/iPVGH5G7w6jDn4jUSpZTyDnQO0Yn7Ks2Kuz6Pci8H6MPCoUJegd/UZQ3tAvfLCxQSnWWwg==} engines: {node: '>=6.9.0'} - '@babel/helper-plugin-utils@7.25.7': - resolution: {integrity: sha512-eaPZai0PiqCi09pPs3pAFfl/zYgGaE6IdXtYvmf0qlcDTd3WCtO7JWCcRd64e0EQrcYgiHibEZnOGsSY4QSgaw==} + '@babel/helper-plugin-utils@7.25.9': + resolution: {integrity: sha512-kSMlyUVdWe25rEsRGviIgOWnoT/nfABVWlqt9N19/dIPWViAOW2s9wznP5tURbs/IDuNk4gPy3YdYRgH3uxhBw==} engines: {node: '>=6.9.0'} '@babel/helper-simple-access@7.24.7': resolution: {integrity: sha512-zBAIvbCMh5Ts+b86r/CjU+4XGYIs+R1j951gxI3KmmxBMhCg4oQMsv6ZXQ64XOm/cvzfU1FmoCyt6+owc5QMYg==} engines: {node: '>=6.9.0'} - '@babel/helper-simple-access@7.25.7': - resolution: {integrity: sha512-FPGAkJmyoChQeM+ruBGIDyrT2tKfZJO8NcxdC+CWNJi7N8/rZpSxK7yvBJ5O/nF1gfu5KzN7VKG3YVSLFfRSxQ==} - engines: {node: '>=6.9.0'} - '@babel/helper-string-parser@7.24.8': resolution: {integrity: sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ==} engines: {node: '>=6.9.0'} @@ -235,6 +231,10 @@ packages: resolution: {integrity: sha512-CbkjYdsJNHFk8uqpEkpCvRs3YRp9tY6FmFY7wLMSYuGYkrdUi7r2lc4/wqsvlHoMznX3WJ9IP8giGPq68T/Y6g==} engines: {node: '>=6.9.0'} + '@babel/helper-string-parser@7.25.9': + resolution: {integrity: sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==} + engines: {node: '>=6.9.0'} + '@babel/helper-validator-identifier@7.24.7': resolution: {integrity: sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==} engines: {node: '>=6.9.0'} @@ -243,30 +243,30 @@ packages: resolution: {integrity: sha512-AM6TzwYqGChO45oiuPqwL2t20/HdMC1rTPAesnBCgPCSF1x3oN9MVUwQV2iyz4xqWrctwK5RNC8LV22kaQCNYg==} engines: {node: '>=6.9.0'} + '@babel/helper-validator-identifier@7.25.9': + resolution: {integrity: sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==} + engines: {node: '>=6.9.0'} + '@babel/helper-validator-option@7.24.8': resolution: {integrity: sha512-xb8t9tD1MHLungh/AIoWYN+gVHaB9kwlu8gffXGSt3FFEIT7RjS+xWbc2vUD1UTZdIpKj/ab3rdqJ7ufngyi2Q==} engines: {node: '>=6.9.0'} - '@babel/helper-validator-option@7.25.7': - resolution: {integrity: sha512-ytbPLsm+GjArDYXJ8Ydr1c/KJuutjF2besPNbIZnZ6MKUxi/uTA22t2ymmA4WFjZFpjiAMO0xuuJPqK2nvDVfQ==} + '@babel/helper-validator-option@7.25.9': + resolution: {integrity: sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw==} engines: {node: '>=6.9.0'} '@babel/helpers@7.25.0': resolution: {integrity: sha512-MjgLZ42aCm0oGjJj8CtSM3DB8NOOf8h2l7DCTePJs29u+v7yO/RBX9nShlKMgFnRks/Q4tBAe7Hxnov9VkGwLw==} engines: {node: '>=6.9.0'} - '@babel/helpers@7.25.7': - resolution: {integrity: sha512-Sv6pASx7Esm38KQpF/U/OXLwPPrdGHNKoeblRxgZRLXnAtnkEe4ptJPDtAZM7fBLadbc1Q07kQpSiGQ0Jg6tRA==} + '@babel/helpers@7.26.0': + resolution: {integrity: sha512-tbhNuIxNcVb21pInl3ZSjksLCvgdZy9KwJ8brv993QtIVKJBBkYXz4q4ZbAv31GdnC+R90np23L5FbEBlthAEw==} engines: {node: '>=6.9.0'} '@babel/highlight@7.24.7': resolution: {integrity: sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==} engines: {node: '>=6.9.0'} - '@babel/highlight@7.25.7': - resolution: {integrity: sha512-iYyACpW3iW8Fw+ZybQK+drQre+ns/tKpXbNESfrhNnPLIklLbXr7MYJ6gPEd0iETGLOK+SxMjVvKb/ffmk+FEw==} - engines: {node: '>=6.9.0'} - '@babel/parser@7.24.0': resolution: {integrity: sha512-QuP/FxEAzMSjXygs8v4N9dvdXzEHN4W1oF3PxuWAtPo08UdM17u89RDMgjLn/mlc56iM0HlLmVkO/wgR+rDgHg==} engines: {node: '>=6.0.0'} @@ -287,20 +287,25 @@ packages: engines: {node: '>=6.0.0'} hasBin: true + '@babel/parser@7.26.2': + resolution: {integrity: sha512-DWMCZH9WA4Maitz2q21SRKHo9QXZxkDsbNZoVD62gusNtNBBqDg9i7uOhASfTfIGNzW+O+r7+jAlM8dwphcJKQ==} + engines: {node: '>=6.0.0'} + hasBin: true + '@babel/plugin-syntax-jsx@7.24.7': resolution: {integrity: sha512-6ddciUPe/mpMnOKv/U+RSd2vvVy+Yw/JfBB0ZHYjEZt9NLHmCUylNYlsbqCCS1Bffjlb0fCwC9Vqz+sBz6PsiQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-syntax-jsx@7.25.7': - resolution: {integrity: sha512-ruZOnKO+ajVL/MVx+PwNBPOkrnXTXoWMtte1MBpegfCArhqOe3Bj52avVj1huLLxNKYKXYaSxZ2F+woK1ekXfw==} + '@babel/plugin-syntax-jsx@7.25.9': + resolution: {integrity: sha512-ld6oezHQMZsZfp6pWtbjaNDF2tiiCYYDqQszHt5VV437lewP9aSi2Of99CK0D0XB21k7FLgnLcmQKyKzynfeAA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-react-jsx@7.25.7': - resolution: {integrity: sha512-vILAg5nwGlR9EXE8JIOX4NHXd49lrYbN8hnjffDtoULwpL9hUx/N55nqh2qd0q6FyNDfjl9V79ecKGvFbcSA0Q==} + '@babel/plugin-transform-react-jsx@7.25.9': + resolution: {integrity: sha512-s5XwpQYCqGerXl+Pu6VDL3x0j2d82eiV77UJ8a2mDHAW7j9SWRqQ2y1fNo1Z74CdcYipl5Z41zvjj4Nfzq36rw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -309,16 +314,16 @@ packages: resolution: {integrity: sha512-aOOgh1/5XzKvg1jvVz7AVrx2piJ2XBi227DHmbY6y+bM9H2FlN+IfecYu4Xl0cNiiVejlsCri89LUsbj8vJD9Q==} engines: {node: '>=6.9.0'} - '@babel/template@7.25.7': - resolution: {integrity: sha512-wRwtAgI3bAS+JGU2upWNL9lSlDcRCqD05BZ1n3X2ONLH1WilFP6O1otQjeMK/1g0pvYcXC7b/qVUB1keofjtZA==} + '@babel/template@7.25.9': + resolution: {integrity: sha512-9DGttpmPvIxBb/2uwpVo3dqJ+O6RooAFOS+lB+xDqoE2PVCE8nfoHMdZLpfCQRLwvohzXISPZcgxt80xLfsuwg==} engines: {node: '>=6.9.0'} '@babel/traverse@7.25.3': resolution: {integrity: sha512-HefgyP1x754oGCsKmV5reSmtV7IXj/kpaE1XYY+D9G5PvKKoFfSbiS4M77MdjuwlZKDIKFCffq9rPU+H/s3ZdQ==} engines: {node: '>=6.9.0'} - '@babel/traverse@7.25.7': - resolution: {integrity: sha512-jatJPT1Zjqvh/1FyJs6qAHL+Dzb7sTb+xr7Q+gM1b+1oBsMsQQ4FkVKb6dFlJvLlVssqkRzV05Jzervt9yhnzg==} + '@babel/traverse@7.25.9': + resolution: {integrity: sha512-ZCuvfwOwlz/bawvAuvcj8rrithP2/N55Tzz342AkTvq4qaWbGfmCk/tKhNaV2cthijKrPAA8SRJV5WWe7IBMJw==} engines: {node: '>=6.9.0'} '@babel/types@7.25.2': @@ -333,6 +338,10 @@ packages: resolution: {integrity: sha512-JWtuCu8VQsMladxVz/P4HzHUGCAwpuqacmowgXFs5XjxIgKuNjnLokQzuVjlTvIzODaDmpjT3oxcC48vyk9EWg==} engines: {node: '>=6.9.0'} + '@babel/types@7.26.0': + resolution: {integrity: sha512-Z/yiTPj+lDVnF7lWeKCIJzaIkI0vYO87dMpZ4bg4TDrFe4XXLFWL1TbXU27gBP3QccxV9mZICCrnjnYlJjXHOA==} + engines: {node: '>=6.9.0'} + '@ctrl/tinycolor@3.6.1': resolution: {integrity: sha512-SITSV6aIXsuVNV3f3O0f2n/cgyEDWoSqtZMYiAmcsYHydcKrOz3gUxB/iXd/Qf08+IZX4KpgNbvUdMBmWz+kcA==} engines: {node: '>=10'} @@ -646,8 +655,8 @@ packages: '@jridgewell/trace-mapping@0.3.25': resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} - '@mdx-js/mdx@3.0.1': - resolution: {integrity: sha512-eIQ4QTrOWyL3LWEe/bu6Taqzq2HQvHcyTMaOrI95P2/LmJE7AsfPfgJGuFLPVqBUE1BC1rik3VIhU+s9u72arA==} + '@mdx-js/mdx@3.1.0': + resolution: {integrity: sha512-/QxEhPAvGwbQmy1Px8F899L5Uc2KZ6JtXwlCgJmjSTBedwOZkByYcBG4GceIGPXRDsmfxhHazuS+hlOShRLeDw==} '@nodelib/fs.scandir@2.1.5': resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} @@ -668,8 +677,8 @@ packages: resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} engines: {node: '>=14'} - '@rollup/pluginutils@5.1.2': - resolution: {integrity: sha512-/FIdS3PyZ39bjZlwqFnWqCOVnW7o963LtKMwQOD0NhQqw22gSr2YY1afu3FxRip4ZCZNsD5jq6Aaz6QV3D/Njw==} + '@rollup/pluginutils@5.1.3': + resolution: {integrity: sha512-Pnsb6f32CD2W3uCaLZIzDmeFyQ2b8UWMFI7xtwUezpcGBDVDW6y9XgAWIlARiGAo6eNF5FK5aQTr0LFyNyqq5A==} engines: {node: '>=14.0.0'} peerDependencies: rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 @@ -772,15 +781,27 @@ packages: '@shikijs/core@1.22.0': resolution: {integrity: sha512-S8sMe4q71TJAW+qG93s5VaiihujRK6rqDFqBnxqvga/3LvqHEnxqBIOPkt//IdXVtHkQWKu4nOQNk0uBGicU7Q==} + '@shikijs/core@1.22.2': + resolution: {integrity: sha512-bvIQcd8BEeR1yFvOYv6HDiyta2FFVePbzeowf5pPS1avczrPK+cjmaxxh0nx5QzbON7+Sv0sQfQVciO7bN72sg==} + '@shikijs/engine-javascript@1.22.0': resolution: {integrity: sha512-AeEtF4Gcck2dwBqCFUKYfsCq0s+eEbCEbkUuFou53NZ0sTGnJnJ/05KHQFZxpii5HMXbocV9URYVowOP2wH5kw==} + '@shikijs/engine-javascript@1.22.2': + resolution: {integrity: sha512-iOvql09ql6m+3d1vtvP8fLCVCK7BQD1pJFmHIECsujB0V32BJ0Ab6hxk1ewVSMFA58FI0pR2Had9BKZdyQrxTw==} + '@shikijs/engine-oniguruma@1.22.0': resolution: {integrity: sha512-5iBVjhu/DYs1HB0BKsRRFipRrD7rqjxlWTj4F2Pf+nQSPqc3kcyqFFeZXnBMzDf0HdqaFVvhDRAGiYNvyLP+Mw==} + '@shikijs/engine-oniguruma@1.22.2': + resolution: {integrity: sha512-GIZPAGzQOy56mGvWMoZRPggn0dTlBf1gutV5TdceLCZlFNqWmuc7u+CzD0Gd9vQUTgLbrt0KLzz6FNprqYAxlA==} + '@shikijs/types@1.22.0': resolution: {integrity: sha512-Fw/Nr7FGFhlQqHfxzZY8Cwtwk5E9nKDUgeLjZgt3UuhcM3yJR9xj3ZGNravZZok8XmEZMiYkSMTPlPkULB8nww==} + '@shikijs/types@1.22.2': + resolution: {integrity: sha512-NCWDa6LGZqTuzjsGfXOBWfjS/fDIbDdmVDug+7ykVe1IKT4c1gakrvlfFYp5NhAXH/lyqLM8wsAPo5wNy73Feg==} + '@shikijs/vscode-textmate@9.3.0': resolution: {integrity: sha512-jn7/7ky30idSkd/O5yDBfAnVt+JJpepofP/POZ1iMOxK59cOfqIgg/Dj0eFsjOTMw+4ycJN0uhZH/Eb0bs/EUA==} @@ -901,8 +922,8 @@ packages: peerDependencies: acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 - acorn@8.12.1: - resolution: {integrity: sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==} + acorn@8.14.0: + resolution: {integrity: sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==} engines: {node: '>=0.4.0'} hasBin: true @@ -961,8 +982,8 @@ packages: peerDependencies: astro: ^4.0.0-beta || ^3.3.0 - astro@4.16.5: - resolution: {integrity: sha512-v8mKWcEPN7hkfyVsMFWV0F8UgL4GUJKT172KTB7dePO3yJb64HBwCckC0QnA60QQh3jK6+2xwyWEc5QvCeqjtg==} + astro@4.16.8: + resolution: {integrity: sha512-BRWFP0UQ8gkOr90KQW7oooedtgCk/j91pyv1WQUmgZwMUZk/v0HJRiddAZgvGCECOnmZFc9ZqRZnBsAMUgApNQ==} engines: {node: ^18.17.1 || ^20.3.0 || >=21.0.0, npm: '>=9.6.5', pnpm: '>=7.1.0'} hasBin: true @@ -1238,6 +1259,12 @@ packages: es-module-lexer@1.5.4: resolution: {integrity: sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw==} + esast-util-from-estree@2.0.0: + resolution: {integrity: sha512-4CyanoAudUSBAn5K13H4JhsMH6L9ZP7XbLVe/dKybkxMO7eDyLsT8UHl9TRNrU2Gr9nz+FovfSIjuXWJ81uVwQ==} + + esast-util-from-js@2.0.1: + resolution: {integrity: sha512-8Ja+rNJ0Lt56Pcf3TAmpBZjmx8ZcK5Ts4cAzIOjsjevg9oSXJnl6SUQ2EevU8tv3h6ZLWmoKL5H4fgWvdvfETw==} + esbuild@0.21.5: resolution: {integrity: sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==} engines: {node: '>=12'} @@ -1269,6 +1296,9 @@ packages: estree-util-is-identifier-name@3.0.0: resolution: {integrity: sha512-hFtqIDZTIUZ9BXLb8y4pYGyk6+wekIivNVTcmvk8NoOh+VeRn5y6cEHzbURrWbfp1fIqdVipilzj+lfaadNZmg==} + estree-util-scope@1.0.0: + resolution: {integrity: sha512-2CAASclonf+JFWBNJPndcOpA8EMJwa0Q8LUFJEKqXLW6+qBvbFZuF5gItbQOs/umBUkjviCSDCbBwU2cXbmrhQ==} + estree-util-to-js@2.0.0: resolution: {integrity: sha512-WDF+xj5rRWmD5tj6bIqRi6CkLIXbbNQUcxQHzGysQzvHmdYG2G7p/Tf0J0gpxGgkeMZNTIjT/AoSvC9Xehcgdg==} @@ -1386,9 +1416,6 @@ packages: resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} engines: {node: '>= 0.4'} - hast-util-from-html@2.0.1: - resolution: {integrity: sha512-RXQBLMl9kjKVNkJTIO6bZyb2n+cUH8LFaSSzo82jiLT6Tfc+Pt7VQCS+/h3YwG4jaNE2TA2sdJisGWR+aJrp0g==} - hast-util-from-html@2.0.3: resolution: {integrity: sha512-CUSRHXyKjzHov8yKsQjGOElXy/3EKpyX56ELnkHH34vDVw1N1XSQ1ZcAvTyAPtGqLTuKP/uxM+aLkSPqF/EtMw==} @@ -1425,9 +1452,6 @@ packages: hast-util-to-html@8.0.4: resolution: {integrity: sha512-4tpQTUOr9BMjtYyNlt0P50mH7xj0Ks2xpo8M943Vykljf99HW6EzulIoJP1N3eKOSScEHzyzi9dm7/cn0RfGwA==} - hast-util-to-html@9.0.2: - resolution: {integrity: sha512-RP5wNpj5nm1Z8cloDv4Sl4RS8jH5HYa0v93YB6Wb4poEzgMo/dAAL0KcT4974dCjcNG5pkLqTImeFHHCwwfY3g==} - hast-util-to-html@9.0.3: resolution: {integrity: sha512-M17uBDzMJ9RPCqLMO92gNNUDuBSq10a25SDBI08iCCxmorf4Yy6sYHK57n9WAbRAAaU+DuR4W6GN9K4DFZesYg==} @@ -1552,9 +1576,6 @@ packages: resolution: {integrity: sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==} engines: {node: '>=12'} - is-reference@3.0.2: - resolution: {integrity: sha512-v3rht/LgVcsdZa3O2Nqs+NMowLOxeOm7Ay9+/ARQ2F+qEoANRcqrjAZKGN0v8ymUetZGgkp26LTnGT7H0Qo9Pg==} - is-unicode-supported@1.3.0: resolution: {integrity: sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==} engines: {node: '>=12'} @@ -1984,9 +2005,6 @@ packages: resolution: {integrity: sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==} engines: {node: '>=16 || 14 >=14.17'} - periscopic@3.1.0: - resolution: {integrity: sha512-vKiQ8RRtkl9P+r/+oefh25C3fhybptkHKCZSPlcXiJux2tJF55GnEj3BVn4A5gKfq9NWWXXrxkHBwVPUfH0opw==} - picocolors@1.0.0: resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} @@ -2000,6 +2018,10 @@ packages: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} engines: {node: '>=8.6'} + picomatch@4.0.2: + resolution: {integrity: sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==} + engines: {node: '>=12'} + pify@2.3.0: resolution: {integrity: sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==} engines: {node: '>=0.10.0'} @@ -2092,6 +2114,18 @@ packages: recaptcha-v3@1.10.0: resolution: {integrity: sha512-aGTxYSk3FFNKnXeKDbLpgRDRyIHRZNBF5HyaXXAN1Aj4TSyyZvmoAn9CylvpqLV3pYpIQavwc+2rzhNFn5SsLQ==} + recma-build-jsx@1.0.0: + resolution: {integrity: sha512-8GtdyqaBcDfva+GUKDr3nev3VpKAhup1+RvkMvUxURHpW7QyIvk9F5wz7Vzo06CEMSilw6uArgRqhpiUcWp8ew==} + + recma-jsx@1.0.0: + resolution: {integrity: sha512-5vwkv65qWwYxg+Atz95acp8DMu1JDSqdGkA2Of1j6rCreyFUE/gp15fC8MnGEuG1W68UKjM6x6+YTWIh7hZM/Q==} + + recma-parse@1.0.0: + resolution: {integrity: sha512-OYLsIGBB5Y5wjnSnQW6t3Xg7q3fQ7FWbw/vcXtORTnyaSFscOtABg+7Pnz6YZ6c27fG1/aN8CjfwoUEUIdwqWQ==} + + recma-stringify@1.0.0: + resolution: {integrity: sha512-cjwII1MdIIVloKvC9ErQ+OgAtwHBmcZ0Bg4ciz78FtbT8In39aAYbaA7zvxQ61xVMSPE8WxhLwLbhif4Js2C+g==} + regex@4.3.3: resolution: {integrity: sha512-r/AadFO7owAq1QJVeZ/nq9jNS1vyZt+6t1p/E59B56Rn2GCya+gr1KSyOzNL/er+r+B7phv5jG2xU2Nz1YkmJg==} @@ -2101,8 +2135,8 @@ packages: rehype-raw@7.0.0: resolution: {integrity: sha512-/aE8hCfKlQeA8LmyeyQvQF3eBiLRGNlfBJEvWH7ivp9sBqs7TNqBL5X3v157rM4IFETqDnIOO+z5M/biZbo9Ww==} - rehype-stringify@10.0.0: - resolution: {integrity: sha512-1TX1i048LooI9QoecrXy7nGFFbFSufxVRAfc6Y9YMRAi56l+oB0zP51mLSV312uRuvVLPV1opSlJmslozR1XHQ==} + rehype-recma@1.0.0: + resolution: {integrity: sha512-lqA4rGUf1JmacCNWWZx0Wv1dHqMwxzsDWYMTowuplHF3xH0N/MmrZ/G3BDZnzAkRmxDadujCjaKM2hqYdCBOGw==} rehype-stringify@10.0.1: resolution: {integrity: sha512-k9ecfXHmIPuFVI61B9DeLPN0qFHfawM6RsuX48hoqlaKSF61RskNjSm1lI8PhBEM0MRdLxVVm4WmTqJQccH9mA==} @@ -2125,9 +2159,6 @@ packages: remark-parse@11.0.0: resolution: {integrity: sha512-FCxlKLNGknS5ba/1lmpYijMUzX2esxW5xQqjWxw2eHFfS2MSdaHVINFmhjo+qN1WhZhNimq0dZATN9pH0IDrpA==} - remark-rehype@11.1.0: - resolution: {integrity: sha512-z3tJrAs2kIs1AqIIy6pzHmAHlF1hWQ+OdY4/hv+Wxe35EhyLKcajL33iUEn3ScxtFox9nUvRufR/Zre8Q08H/g==} - remark-rehype@11.1.1: resolution: {integrity: sha512-g/osARvjkBXb6Wo0XvAeXQohVta8i84ACbenPpoSsxTOQH/Ae0/RGP4WZgnMH5pMLpsj4FG7OHmcIcXxpza8eQ==} @@ -2138,8 +2169,8 @@ packages: remark-stringify@11.0.0: resolution: {integrity: sha512-1OSmLd3awB/t8qdoEOMazZkNsfVTeY4fTsgzcQFdXNq8ToTN4ZGwrMnlda4K6smTFKD+GRV6O48i6Z4iKgPPpw==} - remixicon@4.2.0: - resolution: {integrity: sha512-MF5wApNveRh3n0iMVM+lr2nSWrj/rBbSD2eWapuD9ReYRGs5naAUR1BqVBCHGqm286FIS6zwwmUf96QjHQ9l4w==} + remixicon@4.5.0: + resolution: {integrity: sha512-IP/wNQGG3JCigaeFF3DERSTqMIZBlNu1yu8clNGB7wFe7ZN/ueKMplFHL5uEbnGpCzqfY6MlxIYn2vRzub+5cQ==} resolve@1.22.8: resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==} @@ -2222,6 +2253,9 @@ packages: shiki@1.22.0: resolution: {integrity: sha512-/t5LlhNs+UOKQCYBtl5ZsH/Vclz73GIqT2yQsCBygr8L/ppTdmpL4w3kPLoZJbMKVWtoG77Ue1feOjZfDxvMkw==} + shiki@1.22.2: + resolution: {integrity: sha512-3IZau0NdGKXhH2bBlUk4w1IHNxPh6A5B2sUpyY+8utLu2j/h1QpFkAaUA1bAMxOWWGtTWcAh531vnS4NJKS/lA==} + signal-exit@4.1.0: resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} engines: {node: '>=14'} @@ -2339,8 +2373,8 @@ packages: thenify@3.3.1: resolution: {integrity: sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==} - tinyexec@0.3.0: - resolution: {integrity: sha512-tVGE0mVJPGb0chKhqmsoosjsS+qUnJVGJpZgsHYQcGoPlG3B51R3PouqTgEGH2Dc9jjFyOqOpix6ZHNMXp1FZg==} + tinyexec@0.3.1: + resolution: {integrity: sha512-WiCJLEECkO18gwqIp6+hJg0//p23HXp4S+gGtAKu3mI2F2/sXC4FvHvXvB0zJVVaTPhx1/tOwdbRsa1sOBIKqQ==} to-fast-properties@2.0.0: resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==} @@ -2481,8 +2515,8 @@ packages: '@testing-library/jest-dom': optional: true - vite@5.4.9: - resolution: {integrity: sha512-20OVpJHh0PAM0oSOELa5GaZNWeDjcAvQjGXy2Uyr+Tp+/D2/Hdz6NLgpJLsarPTA2QJ6v8mX2P1ZfbsSKvdMkg==} + vite@5.4.10: + resolution: {integrity: sha512-1hvaPshuPUtxeQ0hsVH3Mud0ZanOLwVTneA1EgbAM5LhaZEqyPWGRQ7BtaMvUrTDeEaC8pxtj6a6jku3x4z6SQ==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: @@ -2598,8 +2632,8 @@ packages: resolution: {integrity: sha512-b4JR1PFR10y1mKjhHY9LaGo6tmrgjit7hxVIeAmyMw3jegXR4dhYqLaQF5zMXZxY7tLpMyJeLjr1C4rLmkVe8g==} engines: {node: '>=12.20'} - zod-to-json-schema@3.23.3: - resolution: {integrity: sha512-TYWChTxKQbRJp5ST22o/Irt9KC5nj7CdBKYB/AosCRdj/wxEMvv4NNaj9XVUHDOIp53ZxArGhnw5HMZziPFjog==} + zod-to-json-schema@3.23.5: + resolution: {integrity: sha512-5wlSS0bXfF/BrL4jPAbz9da5hDlDptdEppYfe+x4eIJ7jioqKG9uUxOwPzqof09u/XeVdrgFu29lZi+8XNDJtA==} peerDependencies: zod: ^3.23.3 @@ -2651,12 +2685,12 @@ snapshots: transitivePeerDependencies: - supports-color - '@astrojs/mdx@3.1.8(astro@4.16.5(rollup@4.21.0)(sass@1.72.0)(typescript@5.4.2))': + '@astrojs/mdx@3.1.9(astro@4.16.8(rollup@4.21.0)(sass@1.72.0)(typescript@5.4.2))': dependencies: '@astrojs/markdown-remark': 5.3.0 - '@mdx-js/mdx': 3.0.1 - acorn: 8.12.1 - astro: 4.16.5(rollup@4.21.0)(sass@1.72.0)(typescript@5.4.2) + '@mdx-js/mdx': 3.1.0(acorn@8.14.0) + acorn: 8.14.0 + astro: 4.16.8(rollup@4.21.0)(sass@1.72.0)(typescript@5.4.2) es-module-lexer: 1.5.4 estree-util-visit: 2.0.0 gray-matter: 4.0.3 @@ -2686,18 +2720,18 @@ snapshots: stream-replace-string: 2.0.0 zod: 3.23.8 - '@astrojs/solid-js@4.4.2(solid-js@1.8.15)(vite@5.4.9(sass@1.72.0))': + '@astrojs/solid-js@4.4.2(solid-js@1.8.15)(vite@5.4.10(sass@1.72.0))': dependencies: solid-js: 1.8.15 - vite-plugin-solid: 2.10.2(solid-js@1.8.15)(vite@5.4.9(sass@1.72.0)) + vite-plugin-solid: 2.10.2(solid-js@1.8.15)(vite@5.4.10(sass@1.72.0)) transitivePeerDependencies: - '@testing-library/jest-dom' - supports-color - vite - '@astrojs/tailwind@5.1.2(astro@4.16.5(rollup@4.21.0)(sass@1.72.0)(typescript@5.4.2))(tailwindcss@3.4.1)': + '@astrojs/tailwind@5.1.2(astro@4.16.8(rollup@4.21.0)(sass@1.72.0)(typescript@5.4.2))(tailwindcss@3.4.1)': dependencies: - astro: 4.16.5(rollup@4.21.0)(sass@1.72.0)(typescript@5.4.2) + astro: 4.16.8(rollup@4.21.0)(sass@1.72.0)(typescript@5.4.2) autoprefixer: 10.4.20(postcss@8.4.47) postcss: 8.4.47 postcss-load-config: 4.0.2(postcss@8.4.47) @@ -2722,14 +2756,15 @@ snapshots: '@babel/highlight': 7.24.7 picocolors: 1.0.1 - '@babel/code-frame@7.25.7': + '@babel/code-frame@7.26.2': dependencies: - '@babel/highlight': 7.25.7 - picocolors: 1.0.1 + '@babel/helper-validator-identifier': 7.25.9 + js-tokens: 4.0.0 + picocolors: 1.1.1 '@babel/compat-data@7.25.2': {} - '@babel/compat-data@7.25.8': {} + '@babel/compat-data@7.26.2': {} '@babel/core@7.25.2': dependencies: @@ -2751,18 +2786,18 @@ snapshots: transitivePeerDependencies: - supports-color - '@babel/core@7.25.8': + '@babel/core@7.26.0': dependencies: '@ampproject/remapping': 2.3.0 - '@babel/code-frame': 7.25.7 - '@babel/generator': 7.25.7 - '@babel/helper-compilation-targets': 7.25.7 - '@babel/helper-module-transforms': 7.25.7(@babel/core@7.25.8) - '@babel/helpers': 7.25.7 - '@babel/parser': 7.25.8 - '@babel/template': 7.25.7 - '@babel/traverse': 7.25.7 - '@babel/types': 7.25.8 + '@babel/code-frame': 7.26.2 + '@babel/generator': 7.26.2 + '@babel/helper-compilation-targets': 7.25.9 + '@babel/helper-module-transforms': 7.26.0(@babel/core@7.26.0) + '@babel/helpers': 7.26.0 + '@babel/parser': 7.26.2 + '@babel/template': 7.25.9 + '@babel/traverse': 7.25.9 + '@babel/types': 7.26.0 convert-source-map: 2.0.0 debug: 4.3.7 gensync: 1.0.0-beta.2 @@ -2778,16 +2813,17 @@ snapshots: '@jridgewell/trace-mapping': 0.3.25 jsesc: 2.5.2 - '@babel/generator@7.25.7': + '@babel/generator@7.26.2': dependencies: - '@babel/types': 7.25.8 + '@babel/parser': 7.26.2 + '@babel/types': 7.26.0 '@jridgewell/gen-mapping': 0.3.5 '@jridgewell/trace-mapping': 0.3.25 jsesc: 3.0.2 - '@babel/helper-annotate-as-pure@7.25.7': + '@babel/helper-annotate-as-pure@7.25.9': dependencies: - '@babel/types': 7.25.8 + '@babel/types': 7.26.0 '@babel/helper-compilation-targets@7.25.2': dependencies: @@ -2797,10 +2833,10 @@ snapshots: lru-cache: 5.1.1 semver: 6.3.1 - '@babel/helper-compilation-targets@7.25.7': + '@babel/helper-compilation-targets@7.25.9': dependencies: - '@babel/compat-data': 7.25.8 - '@babel/helper-validator-option': 7.25.7 + '@babel/compat-data': 7.26.2 + '@babel/helper-validator-option': 7.25.9 browserslist: 4.24.0 lru-cache: 5.1.1 semver: 6.3.1 @@ -2816,10 +2852,10 @@ snapshots: transitivePeerDependencies: - supports-color - '@babel/helper-module-imports@7.25.7': + '@babel/helper-module-imports@7.25.9': dependencies: - '@babel/traverse': 7.25.7 - '@babel/types': 7.25.8 + '@babel/traverse': 7.25.9 + '@babel/types': 7.26.0 transitivePeerDependencies: - supports-color @@ -2833,19 +2869,18 @@ snapshots: transitivePeerDependencies: - supports-color - '@babel/helper-module-transforms@7.25.7(@babel/core@7.25.8)': + '@babel/helper-module-transforms@7.26.0(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-module-imports': 7.25.7 - '@babel/helper-simple-access': 7.25.7 - '@babel/helper-validator-identifier': 7.25.7 - '@babel/traverse': 7.25.7 + '@babel/core': 7.26.0 + '@babel/helper-module-imports': 7.25.9 + '@babel/helper-validator-identifier': 7.25.9 + '@babel/traverse': 7.25.9 transitivePeerDependencies: - supports-color '@babel/helper-plugin-utils@7.24.8': {} - '@babel/helper-plugin-utils@7.25.7': {} + '@babel/helper-plugin-utils@7.25.9': {} '@babel/helper-simple-access@7.24.7': dependencies: @@ -2854,34 +2889,31 @@ snapshots: transitivePeerDependencies: - supports-color - '@babel/helper-simple-access@7.25.7': - dependencies: - '@babel/traverse': 7.25.7 - '@babel/types': 7.25.8 - transitivePeerDependencies: - - supports-color - '@babel/helper-string-parser@7.24.8': {} '@babel/helper-string-parser@7.25.7': {} + '@babel/helper-string-parser@7.25.9': {} + '@babel/helper-validator-identifier@7.24.7': {} '@babel/helper-validator-identifier@7.25.7': {} + '@babel/helper-validator-identifier@7.25.9': {} + '@babel/helper-validator-option@7.24.8': {} - '@babel/helper-validator-option@7.25.7': {} + '@babel/helper-validator-option@7.25.9': {} '@babel/helpers@7.25.0': dependencies: '@babel/template': 7.25.0 '@babel/types': 7.25.6 - '@babel/helpers@7.25.7': + '@babel/helpers@7.26.0': dependencies: - '@babel/template': 7.25.7 - '@babel/types': 7.25.8 + '@babel/template': 7.25.9 + '@babel/types': 7.26.0 '@babel/highlight@7.24.7': dependencies: @@ -2890,13 +2922,6 @@ snapshots: js-tokens: 4.0.0 picocolors: 1.0.1 - '@babel/highlight@7.25.7': - dependencies: - '@babel/helper-validator-identifier': 7.25.7 - chalk: 2.4.2 - js-tokens: 4.0.0 - picocolors: 1.0.1 - '@babel/parser@7.24.0': dependencies: '@babel/types': 7.25.2 @@ -2911,26 +2936,30 @@ snapshots: '@babel/parser@7.25.8': dependencies: - '@babel/types': 7.25.8 + '@babel/types': 7.26.0 + + '@babel/parser@7.26.2': + dependencies: + '@babel/types': 7.26.0 '@babel/plugin-syntax-jsx@7.24.7(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-syntax-jsx@7.25.7(@babel/core@7.25.8)': + '@babel/plugin-syntax-jsx@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-react-jsx@7.25.7(@babel/core@7.25.8)': + '@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-annotate-as-pure': 7.25.7 - '@babel/helper-module-imports': 7.25.7 - '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-syntax-jsx': 7.25.7(@babel/core@7.25.8) - '@babel/types': 7.25.8 + '@babel/core': 7.26.0 + '@babel/helper-annotate-as-pure': 7.25.9 + '@babel/helper-module-imports': 7.25.9 + '@babel/helper-plugin-utils': 7.25.9 + '@babel/plugin-syntax-jsx': 7.25.9(@babel/core@7.26.0) + '@babel/types': 7.26.0 transitivePeerDependencies: - supports-color @@ -2940,11 +2969,11 @@ snapshots: '@babel/parser': 7.25.6 '@babel/types': 7.25.6 - '@babel/template@7.25.7': + '@babel/template@7.25.9': dependencies: - '@babel/code-frame': 7.25.7 - '@babel/parser': 7.25.8 - '@babel/types': 7.25.8 + '@babel/code-frame': 7.26.2 + '@babel/parser': 7.26.2 + '@babel/types': 7.26.0 '@babel/traverse@7.25.3': dependencies: @@ -2958,13 +2987,13 @@ snapshots: transitivePeerDependencies: - supports-color - '@babel/traverse@7.25.7': + '@babel/traverse@7.25.9': dependencies: - '@babel/code-frame': 7.25.7 - '@babel/generator': 7.25.7 - '@babel/parser': 7.25.8 - '@babel/template': 7.25.7 - '@babel/types': 7.25.8 + '@babel/code-frame': 7.26.2 + '@babel/generator': 7.26.2 + '@babel/parser': 7.26.2 + '@babel/template': 7.25.9 + '@babel/types': 7.26.0 debug: 4.3.7 globals: 11.12.0 transitivePeerDependencies: @@ -2988,6 +3017,11 @@ snapshots: '@babel/helper-validator-identifier': 7.25.7 to-fast-properties: 2.0.0 + '@babel/types@7.26.0': + dependencies: + '@babel/helper-string-parser': 7.25.9 + '@babel/helper-validator-identifier': 7.25.9 + '@ctrl/tinycolor@3.6.1': {} '@emnapi/runtime@1.2.0': @@ -3202,7 +3236,7 @@ snapshots: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.5.0 - '@mdx-js/mdx@3.0.1': + '@mdx-js/mdx@3.1.0(acorn@8.14.0)': dependencies: '@types/estree': 1.0.5 '@types/estree-jsx': 1.0.5 @@ -3210,17 +3244,18 @@ snapshots: '@types/mdx': 2.0.11 collapse-white-space: 2.1.0 devlop: 1.1.0 - estree-util-build-jsx: 3.0.1 estree-util-is-identifier-name: 3.0.0 - estree-util-to-js: 2.0.0 + estree-util-scope: 1.0.0 estree-walker: 3.0.3 - hast-util-to-estree: 3.1.0 hast-util-to-jsx-runtime: 2.3.0 markdown-extensions: 2.0.0 - periscopic: 3.1.0 + recma-build-jsx: 1.0.0 + recma-jsx: 1.0.0(acorn@8.14.0) + recma-stringify: 1.0.0 + rehype-recma: 1.0.0 remark-mdx: 3.0.1 remark-parse: 11.0.0 - remark-rehype: 11.1.0 + remark-rehype: 11.1.1 source-map: 0.7.4 unified: 11.0.5 unist-util-position-from-estree: 2.0.0 @@ -3228,6 +3263,7 @@ snapshots: unist-util-visit: 5.0.0 vfile: 6.0.3 transitivePeerDependencies: + - acorn - supports-color '@nodelib/fs.scandir@2.1.5': @@ -3247,11 +3283,11 @@ snapshots: '@pkgjs/parseargs@0.11.0': optional: true - '@rollup/pluginutils@5.1.2(rollup@4.21.0)': + '@rollup/pluginutils@5.1.3(rollup@4.21.0)': dependencies: '@types/estree': 1.0.5 estree-walker: 2.0.2 - picomatch: 2.3.1 + picomatch: 4.0.2 optionalDependencies: rollup: 4.21.0 @@ -3316,22 +3352,47 @@ snapshots: '@types/hast': 3.0.4 hast-util-to-html: 9.0.3 + '@shikijs/core@1.22.2': + dependencies: + '@shikijs/engine-javascript': 1.22.2 + '@shikijs/engine-oniguruma': 1.22.2 + '@shikijs/types': 1.22.2 + '@shikijs/vscode-textmate': 9.3.0 + '@types/hast': 3.0.4 + hast-util-to-html: 9.0.3 + '@shikijs/engine-javascript@1.22.0': dependencies: '@shikijs/types': 1.22.0 '@shikijs/vscode-textmate': 9.3.0 oniguruma-to-js: 0.4.3 + '@shikijs/engine-javascript@1.22.2': + dependencies: + '@shikijs/types': 1.22.2 + '@shikijs/vscode-textmate': 9.3.0 + oniguruma-to-js: 0.4.3 + '@shikijs/engine-oniguruma@1.22.0': dependencies: '@shikijs/types': 1.22.0 '@shikijs/vscode-textmate': 9.3.0 + '@shikijs/engine-oniguruma@1.22.2': + dependencies: + '@shikijs/types': 1.22.2 + '@shikijs/vscode-textmate': 9.3.0 + '@shikijs/types@1.22.0': dependencies: '@shikijs/vscode-textmate': 9.3.0 '@types/hast': 3.0.4 + '@shikijs/types@1.22.2': + dependencies: + '@shikijs/vscode-textmate': 9.3.0 + '@types/hast': 3.0.4 + '@shikijs/vscode-textmate@9.3.0': {} '@types/acorn@4.0.6': @@ -3494,11 +3555,11 @@ snapshots: - '@vue/composition-api' - typescript - acorn-jsx@5.3.2(acorn@8.12.1): + acorn-jsx@5.3.2(acorn@8.14.0): dependencies: - acorn: 8.12.1 + acorn: 8.14.0 - acorn@8.12.1: {} + acorn@8.14.0: {} ansi-align@3.0.1: dependencies: @@ -3539,26 +3600,26 @@ snapshots: astring@1.8.6: {} - astro-expressive-code@0.33.5(astro@4.16.5(rollup@4.21.0)(sass@1.72.0)(typescript@5.4.2)): + astro-expressive-code@0.33.5(astro@4.16.8(rollup@4.21.0)(sass@1.72.0)(typescript@5.4.2)): dependencies: - astro: 4.16.5(rollup@4.21.0)(sass@1.72.0)(typescript@5.4.2) + astro: 4.16.8(rollup@4.21.0)(sass@1.72.0)(typescript@5.4.2) hast-util-to-html: 8.0.4 remark-expressive-code: 0.33.5 - astro@4.16.5(rollup@4.21.0)(sass@1.72.0)(typescript@5.4.2): + astro@4.16.8(rollup@4.21.0)(sass@1.72.0)(typescript@5.4.2): dependencies: '@astrojs/compiler': 2.10.3 '@astrojs/internal-helpers': 0.4.1 '@astrojs/markdown-remark': 5.3.0 '@astrojs/telemetry': 3.1.0 - '@babel/core': 7.25.8 - '@babel/plugin-transform-react-jsx': 7.25.7(@babel/core@7.25.8) - '@babel/types': 7.25.8 + '@babel/core': 7.26.0 + '@babel/plugin-transform-react-jsx': 7.25.9(@babel/core@7.26.0) + '@babel/types': 7.26.0 '@oslojs/encoding': 1.1.0 - '@rollup/pluginutils': 5.1.2(rollup@4.21.0) + '@rollup/pluginutils': 5.1.3(rollup@4.21.0) '@types/babel__core': 7.20.5 '@types/cookie': 0.6.0 - acorn: 8.12.1 + acorn: 8.14.0 aria-query: 5.3.2 axobject-query: 4.1.0 boxen: 8.0.1 @@ -3596,18 +3657,18 @@ snapshots: prompts: 2.4.2 rehype: 13.0.2 semver: 7.6.3 - shiki: 1.22.0 - tinyexec: 0.3.0 + shiki: 1.22.2 + tinyexec: 0.3.1 tsconfck: 3.1.4(typescript@5.4.2) unist-util-visit: 5.0.0 vfile: 6.0.3 - vite: 5.4.9(sass@1.72.0) - vitefu: 1.0.3(vite@5.4.9(sass@1.72.0)) + vite: 5.4.10(sass@1.72.0) + vitefu: 1.0.3(vite@5.4.10(sass@1.72.0)) which-pm: 3.0.0 xxhash-wasm: 1.0.2 yargs-parser: 21.1.1 zod: 3.23.8 - zod-to-json-schema: 3.23.3(zod@3.23.8) + zod-to-json-schema: 3.23.5(zod@3.23.8) zod-to-ts: 1.2.0(typescript@5.4.2)(zod@3.23.8) optionalDependencies: sharp: 0.33.4 @@ -3856,6 +3917,20 @@ snapshots: es-module-lexer@1.5.4: {} + esast-util-from-estree@2.0.0: + dependencies: + '@types/estree-jsx': 1.0.5 + devlop: 1.1.0 + estree-util-visit: 2.0.0 + unist-util-position-from-estree: 2.0.0 + + esast-util-from-js@2.0.1: + dependencies: + '@types/estree-jsx': 1.0.5 + acorn: 8.14.0 + esast-util-from-estree: 2.0.0 + vfile-message: 4.0.2 + esbuild@0.21.5: optionalDependencies: '@esbuild/aix-ppc64': 0.21.5 @@ -3903,6 +3978,11 @@ snapshots: estree-util-is-identifier-name@3.0.0: {} + estree-util-scope@1.0.0: + dependencies: + '@types/estree': 1.0.5 + devlop: 1.1.0 + estree-util-to-js@2.0.0: dependencies: '@types/estree-jsx': 1.0.5 @@ -4024,15 +4104,6 @@ snapshots: dependencies: function-bind: 1.1.2 - hast-util-from-html@2.0.1: - dependencies: - '@types/hast': 3.0.4 - devlop: 1.1.0 - hast-util-from-parse5: 8.0.1 - parse5: 7.1.2 - vfile: 6.0.3 - vfile-message: 4.0.2 - hast-util-from-html@2.0.3: dependencies: '@types/hast': 3.0.4 @@ -4160,20 +4231,6 @@ snapshots: stringify-entities: 4.0.3 zwitch: 2.0.4 - hast-util-to-html@9.0.2: - dependencies: - '@types/hast': 3.0.4 - '@types/unist': 3.0.2 - ccount: 2.0.1 - comma-separated-tokens: 2.0.3 - hast-util-whitespace: 3.0.0 - html-void-elements: 3.0.0 - mdast-util-to-hast: 13.1.0 - property-information: 6.4.1 - space-separated-tokens: 2.0.2 - stringify-entities: 4.0.3 - zwitch: 2.0.4 - hast-util-to-html@9.0.3: dependencies: '@types/hast': 3.0.4 @@ -4332,10 +4389,6 @@ snapshots: is-plain-obj@4.1.0: {} - is-reference@3.0.2: - dependencies: - '@types/estree': 1.0.5 - is-unicode-supported@1.3.0: {} is-unicode-supported@2.0.0: {} @@ -4421,9 +4474,9 @@ snapshots: magicast@0.3.5: dependencies: - '@babel/parser': 7.25.6 - '@babel/types': 7.25.8 - source-map-js: 1.2.0 + '@babel/parser': 7.25.8 + '@babel/types': 7.26.0 + source-map-js: 1.2.1 markdown-extensions@2.0.0: {} @@ -4752,8 +4805,8 @@ snapshots: micromark-extension-mdxjs@3.0.0: dependencies: - acorn: 8.12.1 - acorn-jsx: 5.3.2(acorn@8.12.1) + acorn: 8.14.0 + acorn-jsx: 5.3.2(acorn@8.14.0) micromark-extension-mdx-expression: 3.0.0 micromark-extension-mdx-jsx: 3.0.0 micromark-extension-mdx-md: 2.0.0 @@ -5029,12 +5082,6 @@ snapshots: lru-cache: 10.2.0 minipass: 7.0.4 - periscopic@3.1.0: - dependencies: - '@types/estree': 1.0.5 - estree-walker: 3.0.3 - is-reference: 3.0.2 - picocolors@1.0.0: {} picocolors@1.0.1: {} @@ -5043,6 +5090,8 @@ snapshots: picomatch@2.3.1: {} + picomatch@4.0.2: {} + pify@2.3.0: {} pify@4.0.1: {} @@ -5132,12 +5181,42 @@ snapshots: recaptcha-v3@1.10.0: {} + recma-build-jsx@1.0.0: + dependencies: + '@types/estree': 1.0.5 + estree-util-build-jsx: 3.0.1 + vfile: 6.0.3 + + recma-jsx@1.0.0(acorn@8.14.0): + dependencies: + acorn-jsx: 5.3.2(acorn@8.14.0) + estree-util-to-js: 2.0.0 + recma-parse: 1.0.0 + recma-stringify: 1.0.0 + unified: 11.0.5 + transitivePeerDependencies: + - acorn + + recma-parse@1.0.0: + dependencies: + '@types/estree': 1.0.5 + esast-util-from-js: 2.0.1 + unified: 11.0.5 + vfile: 6.0.3 + + recma-stringify@1.0.0: + dependencies: + '@types/estree': 1.0.5 + estree-util-to-js: 2.0.0 + unified: 11.0.5 + vfile: 6.0.3 + regex@4.3.3: {} rehype-parse@9.0.0: dependencies: '@types/hast': 3.0.4 - hast-util-from-html: 2.0.1 + hast-util-from-html: 2.0.3 unified: 11.0.5 rehype-raw@7.0.0: @@ -5146,11 +5225,13 @@ snapshots: hast-util-raw: 9.0.2 vfile: 6.0.3 - rehype-stringify@10.0.0: + rehype-recma@1.0.0: dependencies: + '@types/estree': 1.0.5 '@types/hast': 3.0.4 - hast-util-to-html: 9.0.2 - unified: 11.0.5 + hast-util-to-estree: 3.1.0 + transitivePeerDependencies: + - supports-color rehype-stringify@10.0.1: dependencies: @@ -5162,7 +5243,7 @@ snapshots: dependencies: '@types/hast': 3.0.4 rehype-parse: 9.0.0 - rehype-stringify: 10.0.0 + rehype-stringify: 10.0.1 unified: 11.0.5 remark-directive@3.0.0: @@ -5207,14 +5288,6 @@ snapshots: transitivePeerDependencies: - supports-color - remark-rehype@11.1.0: - dependencies: - '@types/hast': 3.0.4 - '@types/mdast': 4.0.3 - mdast-util-to-hast: 13.1.0 - unified: 11.0.5 - vfile: 6.0.3 - remark-rehype@11.1.1: dependencies: '@types/hast': 3.0.4 @@ -5236,7 +5309,7 @@ snapshots: mdast-util-to-markdown: 2.1.0 unified: 11.0.5 - remixicon@4.2.0: {} + remixicon@4.5.0: {} resolve@1.22.8: dependencies: @@ -5372,6 +5445,15 @@ snapshots: '@shikijs/vscode-textmate': 9.3.0 '@types/hast': 3.0.4 + shiki@1.22.2: + dependencies: + '@shikijs/core': 1.22.2 + '@shikijs/engine-javascript': 1.22.2 + '@shikijs/engine-oniguruma': 1.22.2 + '@shikijs/types': 1.22.2 + '@shikijs/vscode-textmate': 9.3.0 + '@types/hast': 3.0.4 + signal-exit@4.1.0: {} simple-swizzle@0.2.2: @@ -5515,7 +5597,7 @@ snapshots: dependencies: any-promise: 1.3.0 - tinyexec@0.3.0: {} + tinyexec@0.3.1: {} to-fast-properties@2.0.0: {} @@ -5691,7 +5773,7 @@ snapshots: '@types/unist': 3.0.2 vfile-message: 4.0.2 - vite-plugin-solid@2.10.2(solid-js@1.8.15)(vite@5.4.9(sass@1.72.0)): + vite-plugin-solid@2.10.2(solid-js@1.8.15)(vite@5.4.10(sass@1.72.0)): dependencies: '@babel/core': 7.25.2 '@types/babel__core': 7.20.5 @@ -5699,12 +5781,12 @@ snapshots: merge-anything: 5.1.7 solid-js: 1.8.15 solid-refresh: 0.6.3(solid-js@1.8.15) - vite: 5.4.9(sass@1.72.0) - vitefu: 0.2.5(vite@5.4.9(sass@1.72.0)) + vite: 5.4.10(sass@1.72.0) + vitefu: 0.2.5(vite@5.4.10(sass@1.72.0)) transitivePeerDependencies: - supports-color - vite@5.4.9(sass@1.72.0): + vite@5.4.10(sass@1.72.0): dependencies: esbuild: 0.21.5 postcss: 8.4.47 @@ -5713,13 +5795,13 @@ snapshots: fsevents: 2.3.3 sass: 1.72.0 - vitefu@0.2.5(vite@5.4.9(sass@1.72.0)): + vitefu@0.2.5(vite@5.4.10(sass@1.72.0)): optionalDependencies: - vite: 5.4.9(sass@1.72.0) + vite: 5.4.10(sass@1.72.0) - vitefu@1.0.3(vite@5.4.9(sass@1.72.0)): + vitefu@1.0.3(vite@5.4.10(sass@1.72.0)): optionalDependencies: - vite: 5.4.9(sass@1.72.0) + vite: 5.4.10(sass@1.72.0) vue-demi@0.14.7(vue@3.4.21(typescript@5.4.2)): dependencies: @@ -5779,7 +5861,7 @@ snapshots: yocto-queue@1.1.1: {} - zod-to-json-schema@3.23.3(zod@3.23.8): + zod-to-json-schema@3.23.5(zod@3.23.8): dependencies: zod: 3.23.8 diff --git a/src/content/blog/new-features.md b/src/content/blog/new-features.md index 531de9c..866bd8d 100644 --- a/src/content/blog/new-features.md +++ b/src/content/blog/new-features.md @@ -6,6 +6,10 @@ mermaid: true mathjax: true --- +### Support Github Card + +::github{repo="cirry/astro-yi"} + ### Support collapse ```bash diff --git a/src/remarkPlugin/remark-github-card.js b/src/remarkPlugin/remark-github-card.js new file mode 100644 index 0000000..d052e1a --- /dev/null +++ b/src/remarkPlugin/remark-github-card.js @@ -0,0 +1,145 @@ +import {h as _h, s as _s} from "hastscript"; +import {visit} from "unist-util-visit"; + +/** Hacky function that generates an mdast HTML tree ready for conversion to HTML by rehype. */ +function h(el, attrs = {}, children = []) { + const {tagName, properties} = _h(el, attrs); + return { + type: "paragraph", + data: {hName: tagName, hProperties: properties}, + children, + }; +} + + +export function remarkGithubCard() { + const transformer = (tree) => { + visit(tree, (node, index, parent) => { + if (node.type !== "leafDirective") { + return; + } + if (!parent || index === undefined) { + return; + } + if (node.name !== "github") { + return; + } + /** + * { + * type: 'leafDirective', + * name: 'github', + * attributes: { repo: 'cirry/astro-yi' }, + * children: [], + * position: { + * start: { line: 6, column: 1, offset: 49 }, + * end: { line: 6, column: 32, offset: 80 } + * } + * } + */ + + const repo = node.attributes.repo ? node.attributes.repo : '' + if (!repo || !repo.includes('/')) { + return h( + 'div', + {class: 'hidden'}, + 'Invalid repository. ("repo" attributte must be in the format "owner/repo")', + ) + } + const author = repo.split('/')[0] + const repoName = repo.split('/')[1] + + const cardUuid = `GC${Math.random().toString(36).slice(-6)}` // Collisions are not important + + const nAvatar = h(`img#${cardUuid}-avatar`, {class: 'github-avatar mr-4',}) + + + const nTitle = h('div', {class: 'flex items-center justify-between h-8'}, [ + h('a', {class: 'flex items-center text-inherit text-xl', href: `https://github.com/${repo}`, target: '_blank',}, [ + nAvatar, + h('div', {class: ''}, [{type: "text", value: author}]), + h('div', {class: 'mx-1'}, [{type: "text", value: '/'}]), + h('div', {class: 'font-bold',}, [{type: "text", value: repoName}]), + ]), + ]) + + const nDescription = h( + `div#${cardUuid}-description`, + {class: 'my-2'}, [ + {type: "text", value: 'Waiting for api.github.com...',}, + ] + ) + + const nStars = h('div', {class: 'flex items-center'}, [ + h('i', {class: 'ri-star-line',}, []), + h(`div#${cardUuid}-stars`, {class: 'ml-1 mr-4'}, [{type: "text", value: "Waiting"}]) + ]) + const nForks = h('div', {class: 'flex items-center'}, [ + h('i', {class: 'ri-git-fork-line',}, []), + h(`div#${cardUuid}-forks`, {class: 'ml-1 mr-4'}, [{type: "text", value: "Waiting"}]) + ]) + + const nLicense = h('div', {class: 'flex items-center'}, [ + h('i', {class: 'ri-copyright-line',}, []), + h(`div#${cardUuid}-license`, {class: 'ml-1 mr-4'}, [{type: "text", value: "Waiting"}]) + ]) + const nScript = h( + `script#${cardUuid}-script`, + {type: 'text/javascript', defer: true}, + [ + { + type: "script", value: ` + fetch('https://api.github.com/repos/${repo}', { referrerPolicy: "no-referrer" }).then(response => response.json()).then(data => { + if (data.description) { + document.getElementById('${cardUuid}-description').innerText = data.description.replace(/:[a-zA-Z0-9_]+:/g, ''); + } else { + document.getElementById('${cardUuid}-description').innerText = "Description not set" + } + document.getElementById('${cardUuid}-forks').innerText = data.forks || 0; + document.getElementById('${cardUuid}-stars').innerText = data.watchers || 0; + const avatarEl = document.getElementById('${cardUuid}-avatar'); + avatarEl.setAttribute("src", data.owner.avatar_url) + if (data.license?.spdx_id) { + document.getElementById('${cardUuid}-license').innerText = data.license?.spdx_id + } else { + document.getElementById('${cardUuid}-license').innerText = "No License" + }; + document.getElementById('${cardUuid}-card').classList.remove("fetch-waiting"); + console.log("[GITHUB-CARD] Loaded card for ${repo} | ${cardUuid}.") + }).catch(err => { + const c = document.getElementById('${cardUuid}-card'); + c.classList.add("fetch-error"); + console.warn("[GITHUB-CARD] (Error) Loading card for ${repo} | ${cardUuid}.") + }) `, + }] + ) + + // remove(node, (child) => { + // if (child.data && "directiveLabel" in child.data && child.data.directiveLabel) { + // return true; + // } + // }); + // remove(node,child => { + // return true + // }); + + + parent.children[index] = h( + `div#${cardUuid}-card`, + { + class: 'shadow-lg w-auto flex flex-col bg-skin-card p-4', + href: `https://github.com/${repo}`, + target: '_blank', + repo, + }, + [ + nTitle, + nDescription, + h('div', {class: 'flex'}, [nStars, nForks, nLicense]), + nScript + ], + ) + }); + }; + + return () => transformer; +} diff --git a/src/styles/index.css b/src/styles/index.css index 1931712..94cf10b 100644 --- a/src/styles/index.css +++ b/src/styles/index.css @@ -1,5 +1,4 @@ @import url('./github-markdown.css'); - @import "remixicon/fonts/remixicon.css"; @import "tocbot/dist/tocbot.css"; @import "remark-aside.css"; @@ -249,6 +248,13 @@ menu { display: none !important; } +.github-avatar{ + border-radius: 50%; + width: 32px; + height: 32px; + object-fit: cover; + box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); +} .avatar { border-radius: 50%;