diff --git a/astro.config.mjs b/astro.config.mjs index 3822a44..514f62d 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -4,6 +4,7 @@ import { defineConfig } from "astro/config"; import ecTwoSlash from "expressive-code-twoslash"; import topics from "starlight-sidebar-topics"; +import svelte from "@astrojs/svelte"; const site = "https://bomb.sh/docs/"; @@ -93,5 +94,8 @@ export default defineConfig({ ]), ], }), + svelte({ + extensions: ['.svelte'] + }) ], }); diff --git a/package.json b/package.json index f0502d8..f9dd076 100644 --- a/package.json +++ b/package.json @@ -11,13 +11,17 @@ }, "dependencies": { "@astrojs/starlight": "^0.32.2", + "@astrojs/svelte": "^7.0.9", "@clack/core": "^0.4.1", "@clack/prompts": "^0.10.0", "@types/node": "^22.13.11", + "asciinema-player": "^3.9.0", "astro": "^5.1.5", "expressive-code-twoslash": "^0.4.0", "sharp": "^0.33.5", - "starlight-sidebar-topics": "^0.6.0" + "starlight-sidebar-topics": "^0.6.0", + "svelte": "^5.25.8", + "typescript": "^5.8.3" }, "pnpm": { "onlyBuiltDependencies": [ diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b61c78f..60ec721 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -10,7 +10,10 @@ importers: dependencies: '@astrojs/starlight': specifier: ^0.32.2 - version: 0.32.4(astro@5.5.4(@types/node@22.13.11)(rollup@4.36.0)(typescript@5.8.2)) + version: 0.32.4(astro@5.5.4(@types/node@22.13.11)(rollup@4.36.0)(typescript@5.8.3)) + '@astrojs/svelte': + specifier: ^7.0.9 + version: 7.0.9(@types/node@22.13.11)(astro@5.5.4(@types/node@22.13.11)(rollup@4.36.0)(typescript@5.8.3))(svelte@5.25.10)(typescript@5.8.3) '@clack/core': specifier: ^0.4.1 version: 0.4.1 @@ -20,21 +23,34 @@ importers: '@types/node': specifier: ^22.13.11 version: 22.13.11 + asciinema-player: + specifier: ^3.9.0 + version: 3.9.0 astro: specifier: ^5.1.5 - version: 5.5.4(@types/node@22.13.11)(rollup@4.36.0)(typescript@5.8.2) + version: 5.5.4(@types/node@22.13.11)(rollup@4.36.0)(typescript@5.8.3) expressive-code-twoslash: specifier: ^0.4.0 - version: 0.4.0(@expressive-code/core@0.40.2)(expressive-code@0.40.2)(typescript@5.8.2) + version: 0.4.0(@expressive-code/core@0.40.2)(expressive-code@0.40.2)(typescript@5.8.3) sharp: specifier: ^0.33.5 version: 0.33.5 starlight-sidebar-topics: specifier: ^0.6.0 - version: 0.6.0(@astrojs/starlight@0.32.4(astro@5.5.4(@types/node@22.13.11)(rollup@4.36.0)(typescript@5.8.2))) + version: 0.6.0(@astrojs/starlight@0.32.4(astro@5.5.4(@types/node@22.13.11)(rollup@4.36.0)(typescript@5.8.3))) + svelte: + specifier: ^5.25.8 + version: 5.25.10 + typescript: + specifier: ^5.8.3 + version: 5.8.3 packages: + '@ampproject/remapping@2.3.0': + resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==} + engines: {node: '>=6.0.0'} + '@astrojs/compiler@2.11.0': resolution: {integrity: sha512-zZOO7i+JhojO8qmlyR/URui6LyfHJY6m+L9nwyX5GiKD78YoRaZ5tzz6X0fkl+5bD3uwlDHayf6Oe8Fu36RKNg==} @@ -62,6 +78,14 @@ packages: peerDependencies: astro: ^5.1.5 + '@astrojs/svelte@7.0.9': + resolution: {integrity: sha512-EpJfDh7eelYEj/zSwgSHdqJCx6YjiZmpVDEiNjxhnrBwM6Ll7hjllTrNQyfnv7KgJwaVo2SOSz6d1MwV52/T/w==} + engines: {node: ^18.17.1 || ^20.3.0 || >=22.0.0} + peerDependencies: + astro: ^5.0.0 + svelte: ^5.1.16 + typescript: ^5.3.3 + '@astrojs/telemetry@3.2.0': resolution: {integrity: sha512-wxhSKRfKugLwLlr4OFfcqovk+LIFtKwLyGPqMsv+9/ibqqnW3Gv7tBhtKEb0gAyUAC4G9BTVQeQahqnQAhd6IQ==} engines: {node: ^18.17.1 || ^20.3.0 || >=22.0.0} @@ -367,9 +391,24 @@ packages: cpu: [x64] os: [win32] + '@jridgewell/gen-mapping@0.3.8': + resolution: {integrity: sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==} + engines: {node: '>=6.0.0'} + + '@jridgewell/resolve-uri@3.1.2': + resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} + engines: {node: '>=6.0.0'} + + '@jridgewell/set-array@1.2.1': + resolution: {integrity: sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==} + engines: {node: '>=6.0.0'} + '@jridgewell/sourcemap-codec@1.5.0': resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} + '@jridgewell/trace-mapping@0.3.25': + resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} + '@mdx-js/mdx@3.1.0': resolution: {integrity: sha512-/QxEhPAvGwbQmy1Px8F899L5Uc2KZ6JtXwlCgJmjSTBedwOZkByYcBG4GceIGPXRDsmfxhHazuS+hlOShRLeDw==} @@ -547,6 +586,26 @@ packages: '@shikijs/vscode-textmate@10.0.2': resolution: {integrity: sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg==} + '@sveltejs/acorn-typescript@1.0.5': + resolution: {integrity: sha512-IwQk4yfwLdibDlrXVE04jTZYlLnwsTT2PIOQQGNLWfjavGifnk1JD1LcZjZaBTRcxZu2FfPfNLOE04DSu9lqtQ==} + peerDependencies: + acorn: ^8.9.0 + + '@sveltejs/vite-plugin-svelte-inspector@4.0.1': + resolution: {integrity: sha512-J/Nmb2Q2y7mck2hyCX4ckVHcR5tu2J+MtBEQqpDrrgELZ2uvraQcK/ioCV61AqkdXFgriksOKIceDcQmqnGhVw==} + engines: {node: ^18.0.0 || ^20.0.0 || >=22} + peerDependencies: + '@sveltejs/vite-plugin-svelte': ^5.0.0 + svelte: ^5.0.0 + vite: ^6.0.0 + + '@sveltejs/vite-plugin-svelte@5.0.3': + resolution: {integrity: sha512-MCFS6CrQDu1yGwspm4qtli0e63vaPCehf6V7pIMP15AsWgMKrqDGCPFF/0kn4SP0ii4aySu4Pa62+fIRGFMjgw==} + engines: {node: ^18.0.0 || ^20.0.0 || >=22} + peerDependencies: + svelte: ^5.0.0 + vite: ^6.0.0 + '@types/acorn@4.0.6': resolution: {integrity: sha512-veQTnWP+1D/xbxVrPC3zHnCZRjSrKfhbMUlEA43iMZLu7EsnTtkJklIuwrCPbOi8YkvDQAiW05VQQFvvz9oieQ==} @@ -642,6 +701,9 @@ packages: array-iterate@2.0.1: resolution: {integrity: sha512-I1jXZMjAgCMmxT4qxXfPXa6SthSoE8h6gkSI9BGGNv8mP8G/v0blc+qFnZu6K42vTOiuME596QaLO0TP3Lk0xg==} + asciinema-player@3.9.0: + resolution: {integrity: sha512-SXVFImVzeNr8ZUdNIHABGuzlbnGWTKy245AquAjODsAnv+Lp6vxjYGN0LfA8ns30tnx/ag/bMrTbLq13TpHE6w==} + astring@1.9.0: resolution: {integrity: sha512-LElXdjswlqjWrPpJFg1Fx4wpkOCxj1TDHlSV4PlaRxHGWko024xICaa97ZkMfs6DRKlCguiAI+rbXv5GWwXIkg==} hasBin: true @@ -759,6 +821,9 @@ packages: engines: {node: '>=4'} hasBin: true + csstype@3.1.3: + resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==} + debug@4.4.0: resolution: {integrity: sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==} engines: {node: '>=6.0'} @@ -771,6 +836,13 @@ packages: decode-named-character-reference@1.1.0: resolution: {integrity: sha512-Wy+JTSbFThEOXQIR2L6mxJvEs+veIzpmqD7ynWxMXGpnk3smkHQOp6forLdHsKpAMW9iJpaBBIxz285t1n1C3w==} + dedent-js@1.0.1: + resolution: {integrity: sha512-OUepMozQULMLUmhxS95Vudo0jb0UchLimi3+pQ2plj61Fcy8axbP9hbiD4Sz6DPqn6XG3kfmziVfQ1rSys5AJQ==} + + deepmerge@4.3.1: + resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==} + engines: {node: '>=0.10.0'} + defu@6.1.4: resolution: {integrity: sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==} @@ -841,6 +913,12 @@ packages: resolution: {integrity: sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==} engines: {node: '>=12'} + esm-env@1.2.2: + resolution: {integrity: sha512-Epxrv+Nr/CaL4ZcFGPJIYLWFom+YeV1DqMLHJoEd9SYRxNbaFruBwfEX/kkHUJf55j2+TUbmDcmuilbP1TmXHA==} + + esrap@1.4.6: + resolution: {integrity: sha512-F/D2mADJ9SHY3IwksD4DAXjTt7qt7GWUf3/8RhCNWmC/67tyb55dpimHmy7EplakFaflV0R/PC+fdSPqrRHAQw==} + estree-util-attach-comments@3.0.0: resolution: {integrity: sha512-cKUwm/HUcTDsYh/9FgnuFqpfquUbwIqwKM26BVCGDPVgvaCl/nDCCjUfiLlx6lsEZ3Z4RFxNbOQ60pkaEwFxGw==} @@ -1025,6 +1103,9 @@ packages: resolution: {integrity: sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==} engines: {node: '>=12'} + is-reference@3.0.3: + resolution: {integrity: sha512-ixkJoqQvAP88E6wLydLGGqCJsrFUnqoH6HnaczB8XmDH1oaWU+xxdptvikTgaEhtZ53Ky6YXiBuUI2WXLMCwjw==} + is-wsl@3.1.0: resolution: {integrity: sha512-UcVfVfaK4Sc4m7X3dUSoHoozQGBEFeDC+zVo06t98xe8CzHSZZBekNXH+tu0NalHolcJ/QAGqS46Hef7QXBIMw==} engines: {node: '>=16'} @@ -1045,9 +1126,15 @@ packages: resolution: {integrity: sha512-dhG34DXATL5hSxJbIexCft8FChFXtmskoZYnoPWjXQuebWYCNkVeV3KkGegCK9CP1oswI/vQibS2GY7Em/sJJA==} engines: {node: '>= 8'} + locate-character@3.0.0: + resolution: {integrity: sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA==} + longest-streak@3.1.0: resolution: {integrity: sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g==} + lower-case@2.0.2: + resolution: {integrity: sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==} + lru-cache@10.4.3: resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==} @@ -1245,6 +1332,9 @@ packages: nlcst-to-string@4.0.0: resolution: {integrity: sha512-YKLBCcUYKAg0FNlOBT6aI91qFmSiFKiluk655WzPF+DDMA02qIyy8uiRqI8QXtcFpEvll12LpL5MXqEmAZ+dcA==} + no-case@3.0.4: + resolution: {integrity: sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==} + node-fetch-native@1.6.6: resolution: {integrity: sha512-8Mc2HhqPdlIfedsuZoc3yioPuzp6b+L5jRCRY1QzuWZh2EGJVQrGppC6V6cF0bLdbW0+O2YpqCA25aF/1lvipQ==} @@ -1298,6 +1388,9 @@ packages: parse5@7.2.1: resolution: {integrity: sha512-BuBYQYlv1ckiPdQi/ohiivi9Sagc9JG+Ozs0r7b/0iK3sKmrb0b9FdWdBbOdx6hBCM/F9Ir82ofnBhtZOjCRPQ==} + pascal-case@3.1.2: + resolution: {integrity: sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==} + picocolors@1.1.1: resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} @@ -1442,6 +1535,16 @@ packages: engines: {node: '>=10'} hasBin: true + seroval-plugins@1.2.1: + resolution: {integrity: sha512-H5vs53+39+x4Udwp4J5rNZfgFuA+Lt+uU+09w1gYBVWomtAl98B+E9w7yC05Xc81/HgLvJdlyqJbU0fJCKCmdw==} + engines: {node: '>=10'} + peerDependencies: + seroval: ^1.0 + + seroval@1.2.1: + resolution: {integrity: sha512-yBxFFs3zmkvKNmR0pFSU//rIsYjuX418TnlDmc2weaq5XFDqDIV/NOMPBoLrbxjLH42p4UzRuXHryXh9dYcKcw==} + engines: {node: '>=10'} + sharp@0.33.5: resolution: {integrity: sha512-haPVm1EkS9pgvHrQ/F3Xy+hgcuMV0Wm9vfIBSiwZ05k+xgb0PkBQpGsAA/oWdDobNaZTH5ppvHtzCFbnSEwHVw==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} @@ -1467,6 +1570,9 @@ packages: resolution: {integrity: sha512-tEYNll18pPKHroYSmLLrksq233j021G0giwW7P3D24jC54pQ5W5BXMsQ/Mvw1OJCmEYDgY+lrzT+3nNUtoNfXQ==} engines: {node: '>= 18'} + solid-js@1.9.5: + resolution: {integrity: sha512-ogI3DaFcyn6UhYhrgcyRAMbu/buBJitYQASZz5WzfQVPP10RD2AbCoRZ517psnezrasyCbWzIxZ6kVqet768xw==} + source-map-js@1.2.1: resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} engines: {node: '>=0.10.0'} @@ -1512,6 +1618,16 @@ packages: style-to-object@1.0.8: resolution: {integrity: sha512-xT47I/Eo0rwJmaXC4oilDGDWLohVhR6o/xAQcPQN8q6QBuZVL8qMYL85kLmST5cPjAorwvqIA4qXTRQoYHaL6g==} + svelte2tsx@0.7.35: + resolution: {integrity: sha512-z2lnOnrfb5nrlRfFQI8Qdz03xQqMHUfPj0j8l/fQuydrH89cCeN+v9jgDwK9GyMtdTRUkE7Neu9Gh+vfXJAfuQ==} + peerDependencies: + svelte: ^3.55 || ^4.0.0-next.0 || ^4.0 || ^5.0.0-next.0 + typescript: ^4.9.4 || ^5.0.0 + + svelte@5.25.10: + resolution: {integrity: sha512-tOUlvm3goAhmELYKWYX3SchYeqlVlIcUfKA4qIgd6Urm7qDw3KiZP/wJtoRv3ZeRUHPorM9f6+lOlbFxUN8QoA==} + engines: {node: '>=18'} + tinyexec@0.3.2: resolution: {integrity: sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==} @@ -1550,8 +1666,8 @@ packages: resolution: {integrity: sha512-S/5/0kFftkq27FPNye0XM1e2NsnoD/3FS+pBmbjmmtLT6I+i344KoOf7pvXreaFsDamWeaJX55nczA1m5PsBDg==} engines: {node: '>=16'} - typescript@5.8.2: - resolution: {integrity: sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ==} + typescript@5.8.3: + resolution: {integrity: sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==} engines: {node: '>=14.17'} hasBin: true @@ -1711,6 +1827,46 @@ packages: yaml: optional: true + vite@6.2.5: + resolution: {integrity: sha512-j023J/hCAa4pRIUH6J9HemwYfjB5llR2Ps0CWeikOtdR8+pAURAk0DoJC5/mm9kd+UgdnIy7d6HE4EAvlYhPhA==} + engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} + hasBin: true + peerDependencies: + '@types/node': ^18.0.0 || ^20.0.0 || >=22.0.0 + jiti: '>=1.21.0' + less: '*' + lightningcss: ^1.21.0 + sass: '*' + sass-embedded: '*' + stylus: '*' + sugarss: '*' + terser: ^5.16.0 + tsx: ^4.8.1 + yaml: ^2.4.2 + peerDependenciesMeta: + '@types/node': + optional: true + jiti: + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + sass-embedded: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + tsx: + optional: true + yaml: + optional: true + vitefu@1.0.6: resolution: {integrity: sha512-+Rex1GlappUyNN6UfwbVZne/9cYC4+R2XDk9xkNXBKMw6HQagdX9PgZ8V2v1WUSK1wfBLp7qbI1+XSNIlB1xmA==} peerDependencies: @@ -1753,6 +1909,9 @@ packages: resolution: {integrity: sha512-GQHQqAopRhwU8Kt1DDM8NjibDXHC8eoh1erhGAJPEyveY9qqVeXvVikNKrDz69sHowPMorbPUrH/mx8c50eiBQ==} engines: {node: '>=18'} + zimmerframe@1.1.2: + resolution: {integrity: sha512-rAbqEGa8ovJy4pyBxZM70hg4pE6gDgaQ0Sl9M3enG3I0d6H4XSAM3GeNGLKnsBpuijUow064sf7ww1nutC5/3w==} + zod-to-json-schema@3.24.5: resolution: {integrity: sha512-/AuWwMP+YqiPbsJx5D6TfgRTc4kTLjsh5SOcd4bLsfUg2RcEXrFMJl1DGgdHy2aCfsIA/cr/1JM0xcB2GZji8g==} peerDependencies: @@ -1772,6 +1931,11 @@ packages: snapshots: + '@ampproject/remapping@2.3.0': + dependencies: + '@jridgewell/gen-mapping': 0.3.8 + '@jridgewell/trace-mapping': 0.3.25 + '@astrojs/compiler@2.11.0': {} '@astrojs/internal-helpers@0.6.1': {} @@ -1802,12 +1966,12 @@ snapshots: transitivePeerDependencies: - supports-color - '@astrojs/mdx@4.2.1(astro@5.5.4(@types/node@22.13.11)(rollup@4.36.0)(typescript@5.8.2))': + '@astrojs/mdx@4.2.1(astro@5.5.4(@types/node@22.13.11)(rollup@4.36.0)(typescript@5.8.3))': dependencies: '@astrojs/markdown-remark': 6.3.1 '@mdx-js/mdx': 3.1.0(acorn@8.14.1) acorn: 8.14.1 - astro: 5.5.4(@types/node@22.13.11)(rollup@4.36.0)(typescript@5.8.2) + astro: 5.5.4(@types/node@22.13.11)(rollup@4.36.0)(typescript@5.8.3) es-module-lexer: 1.6.0 estree-util-visit: 2.0.0 hast-util-to-html: 9.0.5 @@ -1831,16 +1995,16 @@ snapshots: stream-replace-string: 2.0.0 zod: 3.24.2 - '@astrojs/starlight@0.32.4(astro@5.5.4(@types/node@22.13.11)(rollup@4.36.0)(typescript@5.8.2))': + '@astrojs/starlight@0.32.4(astro@5.5.4(@types/node@22.13.11)(rollup@4.36.0)(typescript@5.8.3))': dependencies: - '@astrojs/mdx': 4.2.1(astro@5.5.4(@types/node@22.13.11)(rollup@4.36.0)(typescript@5.8.2)) + '@astrojs/mdx': 4.2.1(astro@5.5.4(@types/node@22.13.11)(rollup@4.36.0)(typescript@5.8.3)) '@astrojs/sitemap': 3.3.0 '@pagefind/default-ui': 1.3.0 '@types/hast': 3.0.4 '@types/js-yaml': 4.0.9 '@types/mdast': 4.0.4 - astro: 5.5.4(@types/node@22.13.11)(rollup@4.36.0)(typescript@5.8.2) - astro-expressive-code: 0.40.2(astro@5.5.4(@types/node@22.13.11)(rollup@4.36.0)(typescript@5.8.2)) + astro: 5.5.4(@types/node@22.13.11)(rollup@4.36.0)(typescript@5.8.3) + astro-expressive-code: 0.40.2(astro@5.5.4(@types/node@22.13.11)(rollup@4.36.0)(typescript@5.8.3)) bcp-47: 2.1.0 hast-util-from-html: 2.0.3 hast-util-select: 6.0.4 @@ -1862,6 +2026,28 @@ snapshots: transitivePeerDependencies: - supports-color + '@astrojs/svelte@7.0.9(@types/node@22.13.11)(astro@5.5.4(@types/node@22.13.11)(rollup@4.36.0)(typescript@5.8.3))(svelte@5.25.10)(typescript@5.8.3)': + dependencies: + '@sveltejs/vite-plugin-svelte': 5.0.3(svelte@5.25.10)(vite@6.2.5(@types/node@22.13.11)) + astro: 5.5.4(@types/node@22.13.11)(rollup@4.36.0)(typescript@5.8.3) + svelte: 5.25.10 + svelte2tsx: 0.7.35(svelte@5.25.10)(typescript@5.8.3) + typescript: 5.8.3 + vite: 6.2.5(@types/node@22.13.11) + transitivePeerDependencies: + - '@types/node' + - jiti + - less + - lightningcss + - sass + - sass-embedded + - stylus + - sugarss + - supports-color + - terser + - tsx + - yaml + '@astrojs/telemetry@3.2.0': dependencies: ci-info: 4.2.0 @@ -2084,8 +2270,23 @@ snapshots: '@img/sharp-win32-x64@0.33.5': optional: true + '@jridgewell/gen-mapping@0.3.8': + dependencies: + '@jridgewell/set-array': 1.2.1 + '@jridgewell/sourcemap-codec': 1.5.0 + '@jridgewell/trace-mapping': 0.3.25 + + '@jridgewell/resolve-uri@3.1.2': {} + + '@jridgewell/set-array@1.2.1': {} + '@jridgewell/sourcemap-codec@1.5.0': {} + '@jridgewell/trace-mapping@0.3.25': + dependencies: + '@jridgewell/resolve-uri': 3.1.2 + '@jridgewell/sourcemap-codec': 1.5.0 + '@mdx-js/mdx@3.1.0(acorn@8.14.1)': dependencies: '@types/estree': 1.0.6 @@ -2266,6 +2467,32 @@ snapshots: '@shikijs/vscode-textmate@10.0.2': {} + '@sveltejs/acorn-typescript@1.0.5(acorn@8.14.1)': + dependencies: + acorn: 8.14.1 + + '@sveltejs/vite-plugin-svelte-inspector@4.0.1(@sveltejs/vite-plugin-svelte@5.0.3(svelte@5.25.10)(vite@6.2.2(@types/node@22.13.11)))(svelte@5.25.10)(vite@6.2.5(@types/node@22.13.11))': + dependencies: + '@sveltejs/vite-plugin-svelte': 5.0.3(svelte@5.25.10)(vite@6.2.5(@types/node@22.13.11)) + debug: 4.4.0 + svelte: 5.25.10 + vite: 6.2.5(@types/node@22.13.11) + transitivePeerDependencies: + - supports-color + + '@sveltejs/vite-plugin-svelte@5.0.3(svelte@5.25.10)(vite@6.2.5(@types/node@22.13.11))': + dependencies: + '@sveltejs/vite-plugin-svelte-inspector': 4.0.1(@sveltejs/vite-plugin-svelte@5.0.3(svelte@5.25.10)(vite@6.2.2(@types/node@22.13.11)))(svelte@5.25.10)(vite@6.2.5(@types/node@22.13.11)) + debug: 4.4.0 + deepmerge: 4.3.1 + kleur: 4.1.5 + magic-string: 0.30.17 + svelte: 5.25.10 + vite: 6.2.5(@types/node@22.13.11) + vitefu: 1.0.6(vite@6.2.5(@types/node@22.13.11)) + transitivePeerDependencies: + - supports-color + '@types/acorn@4.0.6': dependencies: '@types/estree': 1.0.6 @@ -2312,10 +2539,10 @@ snapshots: '@types/unist@3.0.3': {} - '@typescript/vfs@1.6.1(typescript@5.8.2)': + '@typescript/vfs@1.6.1(typescript@5.8.3)': dependencies: debug: 4.4.0 - typescript: 5.8.2 + typescript: 5.8.3 transitivePeerDependencies: - supports-color @@ -2350,14 +2577,19 @@ snapshots: array-iterate@2.0.1: {} + asciinema-player@3.9.0: + dependencies: + '@babel/runtime': 7.26.10 + solid-js: 1.9.5 + astring@1.9.0: {} - astro-expressive-code@0.40.2(astro@5.5.4(@types/node@22.13.11)(rollup@4.36.0)(typescript@5.8.2)): + astro-expressive-code@0.40.2(astro@5.5.4(@types/node@22.13.11)(rollup@4.36.0)(typescript@5.8.3)): dependencies: - astro: 5.5.4(@types/node@22.13.11)(rollup@4.36.0)(typescript@5.8.2) + astro: 5.5.4(@types/node@22.13.11)(rollup@4.36.0)(typescript@5.8.3) rehype-expressive-code: 0.40.2 - astro@5.5.4(@types/node@22.13.11)(rollup@4.36.0)(typescript@5.8.2): + astro@5.5.4(@types/node@22.13.11)(rollup@4.36.0)(typescript@5.8.3): dependencies: '@astrojs/compiler': 2.11.0 '@astrojs/internal-helpers': 0.6.1 @@ -2403,7 +2635,7 @@ snapshots: shiki: 3.2.1 tinyexec: 0.3.2 tinyglobby: 0.2.12 - tsconfck: 3.1.5(typescript@5.8.2) + tsconfck: 3.1.5(typescript@5.8.3) ultrahtml: 1.5.3 unist-util-visit: 5.0.0 unstorage: 1.15.0 @@ -2415,7 +2647,7 @@ snapshots: yocto-spinner: 0.2.1 zod: 3.24.2 zod-to-json-schema: 3.24.5(zod@3.24.2) - zod-to-ts: 1.2.0(typescript@5.8.2)(zod@3.24.2) + zod-to-ts: 1.2.0(typescript@5.8.3)(zod@3.24.2) optionalDependencies: sharp: 0.33.5 transitivePeerDependencies: @@ -2537,6 +2769,8 @@ snapshots: cssesc@3.0.0: {} + csstype@3.1.3: {} + debug@4.4.0: dependencies: ms: 2.1.3 @@ -2545,6 +2779,10 @@ snapshots: dependencies: character-entities: 2.0.2 + dedent-js@1.0.1: {} + + deepmerge@4.3.1: {} + defu@6.1.4: {} dequal@2.0.3: {} @@ -2625,6 +2863,12 @@ snapshots: escape-string-regexp@5.0.0: {} + esm-env@1.2.2: {} + + esrap@1.4.6: + dependencies: + '@jridgewell/sourcemap-codec': 1.5.0 + estree-util-attach-comments@3.0.0: dependencies: '@types/estree': 1.0.6 @@ -2662,15 +2906,15 @@ snapshots: eventemitter3@5.0.1: {} - expressive-code-twoslash@0.4.0(@expressive-code/core@0.40.2)(expressive-code@0.40.2)(typescript@5.8.2): + expressive-code-twoslash@0.4.0(@expressive-code/core@0.40.2)(expressive-code@0.40.2)(typescript@5.8.3): dependencies: '@expressive-code/core': 0.40.2 expressive-code: 0.40.2 mdast-util-from-markdown: 2.0.2 mdast-util-gfm: 3.1.0 mdast-util-to-hast: 13.2.0 - twoslash: 0.2.12(typescript@5.8.2) - typescript: 5.8.2 + twoslash: 0.2.12(typescript@5.8.3) + typescript: 5.8.3 transitivePeerDependencies: - supports-color @@ -2938,6 +3182,10 @@ snapshots: is-plain-obj@4.1.0: {} + is-reference@3.0.3: + dependencies: + '@types/estree': 1.0.6 + is-wsl@3.1.0: dependencies: is-inside-container: 1.0.0 @@ -2952,8 +3200,14 @@ snapshots: klona@2.0.6: {} + locate-character@3.0.0: {} + longest-streak@3.1.0: {} + lower-case@2.0.2: + dependencies: + tslib: 2.8.1 + lru-cache@10.4.3: {} magic-string@0.30.17: @@ -3441,6 +3695,11 @@ snapshots: dependencies: '@types/nlcst': 2.0.3 + no-case@3.0.4: + dependencies: + lower-case: 2.0.2 + tslib: 2.8.1 + node-fetch-native@1.6.6: {} node-mock-http@1.0.0: {} @@ -3516,6 +3775,11 @@ snapshots: dependencies: entities: 4.5.0 + pascal-case@3.1.2: + dependencies: + no-case: 3.0.4 + tslib: 2.8.1 + picocolors@1.1.1: {} picomatch@2.3.1: {} @@ -3757,6 +4021,12 @@ snapshots: semver@7.7.1: {} + seroval-plugins@1.2.1(seroval@1.2.1): + dependencies: + seroval: 1.2.1 + + seroval@1.2.1: {} + sharp@0.33.5: dependencies: color: 4.2.3 @@ -3820,15 +4090,21 @@ snapshots: smol-toml@1.3.1: {} + solid-js@1.9.5: + dependencies: + csstype: 3.1.3 + seroval: 1.2.1 + seroval-plugins: 1.2.1(seroval@1.2.1) + source-map-js@1.2.1: {} source-map@0.7.4: {} space-separated-tokens@2.0.2: {} - starlight-sidebar-topics@0.6.0(@astrojs/starlight@0.32.4(astro@5.5.4(@types/node@22.13.11)(rollup@4.36.0)(typescript@5.8.2))): + starlight-sidebar-topics@0.6.0(@astrojs/starlight@0.32.4(astro@5.5.4(@types/node@22.13.11)(rollup@4.36.0)(typescript@5.8.3))): dependencies: - '@astrojs/starlight': 0.32.4(astro@5.5.4(@types/node@22.13.11)(rollup@4.36.0)(typescript@5.8.2)) + '@astrojs/starlight': 0.32.4(astro@5.5.4(@types/node@22.13.11)(rollup@4.36.0)(typescript@5.8.3)) picomatch: 4.0.2 stream-replace-string@2.0.0: {} @@ -3866,6 +4142,30 @@ snapshots: dependencies: inline-style-parser: 0.2.4 + svelte2tsx@0.7.35(svelte@5.25.10)(typescript@5.8.3): + dependencies: + dedent-js: 1.0.1 + pascal-case: 3.1.2 + svelte: 5.25.10 + typescript: 5.8.3 + + svelte@5.25.10: + dependencies: + '@ampproject/remapping': 2.3.0 + '@jridgewell/sourcemap-codec': 1.5.0 + '@sveltejs/acorn-typescript': 1.0.5(acorn@8.14.1) + '@types/estree': 1.0.6 + acorn: 8.14.1 + aria-query: 5.3.2 + axobject-query: 4.1.0 + clsx: 2.1.1 + esm-env: 1.2.2 + esrap: 1.4.6 + is-reference: 3.0.3 + locate-character: 3.0.0 + magic-string: 0.30.17 + zimmerframe: 1.1.2 + tinyexec@0.3.2: {} tinyglobby@0.2.12: @@ -3877,26 +4177,25 @@ snapshots: trough@2.2.0: {} - tsconfck@3.1.5(typescript@5.8.2): + tsconfck@3.1.5(typescript@5.8.3): optionalDependencies: - typescript: 5.8.2 + typescript: 5.8.3 - tslib@2.8.1: - optional: true + tslib@2.8.1: {} twoslash-protocol@0.2.12: {} - twoslash@0.2.12(typescript@5.8.2): + twoslash@0.2.12(typescript@5.8.3): dependencies: - '@typescript/vfs': 1.6.1(typescript@5.8.2) + '@typescript/vfs': 1.6.1(typescript@5.8.3) twoslash-protocol: 0.2.12 - typescript: 5.8.2 + typescript: 5.8.3 transitivePeerDependencies: - supports-color type-fest@4.37.0: {} - typescript@5.8.2: {} + typescript@5.8.3: {} ufo@1.5.4: {} @@ -3999,10 +4298,23 @@ snapshots: '@types/node': 22.13.11 fsevents: 2.3.3 + vite@6.2.5(@types/node@22.13.11): + dependencies: + esbuild: 0.25.1 + postcss: 8.5.3 + rollup: 4.36.0 + optionalDependencies: + '@types/node': 22.13.11 + fsevents: 2.3.3 + vitefu@1.0.6(vite@6.2.2(@types/node@22.13.11)): optionalDependencies: vite: 6.2.2(@types/node@22.13.11) + vitefu@1.0.6(vite@6.2.5(@types/node@22.13.11)): + optionalDependencies: + vite: 6.2.5(@types/node@22.13.11) + web-namespaces@2.0.1: {} which-pm-runs@1.1.0: {} @@ -4029,13 +4341,15 @@ snapshots: yoctocolors@2.1.1: {} + zimmerframe@1.1.2: {} + zod-to-json-schema@3.24.5(zod@3.24.2): dependencies: zod: 3.24.2 - zod-to-ts@1.2.0(typescript@5.8.2)(zod@3.24.2): + zod-to-ts@1.2.0(typescript@5.8.3)(zod@3.24.2): dependencies: - typescript: 5.8.2 + typescript: 5.8.3 zod: 3.24.2 zod@3.24.2: {} diff --git a/src/assets/cast/clack/password.cast b/src/assets/cast/clack/password.cast new file mode 100644 index 0000000..fc3ee4f --- /dev/null +++ b/src/assets/cast/clack/password.cast @@ -0,0 +1,27 @@ +{"version": 2, "width": 80, "height": 24, "timestamp": 1744131244, "env": {"SHELL": "/bin/bash", "TERM": "xterm-256color"}} +[0.0, "o", "\r\n\u001b[?25h"] +[0.0, "o", "\u001b[?25l\u001b[90m│\u001b[39m\r\n\u001b[36m◆\u001b[39m What is your password?\r\n\u001b[36m│\u001b[39m \u001b[7m\u001b[8m_\u001b[28m\u001b[27m\r\n\u001b[36m└\u001b[39m\r\n"] +[1.0, "o", "\u001b[999D\u001b[4A\u001b[2B\u001b[2K\u001b[G"] +[1.0, "o", "\u001b[36m│\u001b[39m *\u001b[7m\u001b[8m_\u001b[28m\u001b[27m\u001b[2B"] +[1.1, "o", "\u001b[999D\u001b[4A\u001b[2B\u001b[2K\u001b[G\u001b[36m│\u001b[39m **\u001b[7m\u001b[8m_\u001b[28m\u001b[27m\u001b[2B"] +[1.2, "o", "\u001b[999D\u001b[4A\u001b[2B\u001b[2K\u001b[G"] +[1.2, "o", "\u001b[36m│\u001b[39m ***\u001b[7m\u001b[8m_\u001b[28m\u001b[27m\u001b[2B"] +[1.3, "o", "\u001b[999D\u001b[4A\u001b[2B\u001b[2K\u001b[G"] +[1.3, "o", "\u001b[36m│\u001b[39m ****\u001b[7m\u001b[8m_\u001b[28m\u001b[27m\u001b[2B"] +[1.8, "m", "Validation error (1)"] +[1.8, "o", "\u001b[999D\u001b[4A\u001b[1B"] +[1.8, "o", "\u001b[J\u001b[33m▲\u001b[39m What is your password?\r\n\u001b[33m│\u001b[39m ****\r\n\u001b[33m└\u001b[39m \u001b[33mYour password must be at least 8 characters\u001b[39m\r\n"] +[2.5, "o", "\u001b[999D\u001b[4A\u001b[1B\u001b[J\u001b[36m◆\u001b[39m What is your password?\r\n\u001b[36m│\u001b[39m *****\u001b[7m\u001b[8m_\u001b[28m\u001b[27m\r\n\u001b[36m└\u001b[39m\r\n"] +[2.6, "o", "\u001b[999D\u001b[4A\u001b[2B\u001b[2K\u001b[G\u001b[36m│\u001b[39m ******\u001b[7m\u001b[8m_\u001b[28m\u001b[27m\u001b[2B"] +[2.8, "o", "\u001b[999D\u001b[4A\u001b[2B\u001b[2K\u001b[G\u001b[36m│\u001b[39m *******\u001b[7m\u001b[8m_\u001b[28m\u001b[27m\u001b[2B"] +[3.0, "o", "\u001b[999D\u001b[4A\u001b[2B\u001b[2K\u001b[G\u001b[36m│\u001b[39m ********\u001b[7m\u001b[8m_\u001b[28m\u001b[27m"] +[3.5, "m", "Validation error (2)"] +[3.5, "o", "\u001b[2B"] +[3.5, "o", "\u001b[999D\u001b[4A\u001b[1B\u001b[J\u001b[33m▲\u001b[39m What is your password?\r\n\u001b[33m│\u001b[39m ********\r\n\u001b[33m└\u001b[39m \u001b[33mYour password must be least contain 1 number\u001b[39m\r\n"] +[4.5, "o", "\u001b[999D\u001b[4A\u001b[1B\u001b[J\u001b[36m◆\u001b[39m What is your password?\r\n\u001b[36m│\u001b[39m *********\u001b[7m\u001b[8m_\u001b[28m\u001b[27m\r\n\u001b[36m└\u001b[39m\r\n"] +[5.5, "m", "Validation error (3)"] +[5.5, "o", "\u001b[999D\u001b[4A\u001b[1B\u001b[J"] +[5.5, "o", "\u001b[33m▲\u001b[39m What is your password?\r\n\u001b[33m│\u001b[39m *********\r\n\u001b[33m└\u001b[39m \u001b[33mYour password must be least contain 1 special characters (*?!@&)\u001b[39m\r\n"] +[6.5, "o", "\u001b[999D\u001b[4A\u001b[1B\u001b[J\u001b[36m◆\u001b[39m What is your password?\r\n\u001b[36m│\u001b[39m **********\u001b[7m\u001b[8m_\u001b[28m\u001b[27m\r\n\u001b[36m└\u001b[39m\r\n"] +[7.5, "o", "\u001b[999D\u001b[4A\u001b[1B"] +[7.5, "o", "\u001b[J\u001b[32m◇\u001b[39m What is your password?\r\n\u001b[90m│\u001b[39m \u001b[2m**********\u001b[22m\r\n"] diff --git a/src/assets/cast/clack/text.cast b/src/assets/cast/clack/text.cast new file mode 100644 index 0000000..f5214f3 --- /dev/null +++ b/src/assets/cast/clack/text.cast @@ -0,0 +1,16 @@ +{"version": 2, "width": 80, "height": 24, "timestamp": 1744209000, "env": {"SHELL": "/bin/bash", "TERM": "xterm-256color"}} +[0.0, "o", "\u001b[?25l"] +[0.0, "m", "Display prompt"] +[0.0, "o", "\u001b[90m│\u001b[39m\r\n\u001b[36m◆\u001b[39m What is your name?\r\n\u001b[36m│\u001b[39m \u001b[7mJ\u001b[27m\u001b[2mohn Doe\u001b[22m\r\n\u001b[36m└\u001b[39m\r\n"] +[1.0, "o", "\u001b[999D\u001b[4A"] +[1.0, "o", "\u001b[2B\u001b[2K\u001b[G\u001b[36m│\u001b[39m J█\u001b[2B"] +[2.0, "o", "\u001b[999D\u001b[4A\u001b[1B"] +[2.0, "m", "Validation failed"] +[2.0, "o", "\u001b[J\u001b[33m▲\u001b[39m What is your name?\r\n\u001b[33m│\u001b[39m J█\r\n\u001b[33m└\u001b[39m \u001b[33mName must be at least 2 characters\u001b[39m\r\n"] +[3.0, "o", "\u001b[999D\u001b[4A\u001b[1B"] +[3.0, "o", "\u001b[J\u001b[36m◆\u001b[39m What is your name?\r\n"] +[3.0, "o", "\u001b[36m│\u001b[39m \u001b[7mJ\u001b[27m\u001b[2mohn Doe\u001b[22m\r\n\u001b[36m└\u001b[39m\r\n"] +[3.5, "m", "Tab to use suggestion"] +[3.5, "o", "\u001b[999D\u001b[4A\u001b[2B\u001b[2K\u001b[G"] +[3.5, "o", "\u001b[36m│\u001b[39m John Doe█\u001b[2B"] +[4.0, "o", "\u001b[999D\u001b[4A\u001b[1B\u001b[J\u001b[32m◇\u001b[39m What is your name?\r\n\u001b[90m│\u001b[39m \u001b[2mJohn Doe\u001b[22m"] diff --git a/src/components/asciinema.svelte b/src/components/asciinema.svelte new file mode 100644 index 0000000..69b7973 --- /dev/null +++ b/src/components/asciinema.svelte @@ -0,0 +1,19 @@ + + +
diff --git a/src/content/docs/clack/packages/prompts.mdx b/src/content/docs/clack/packages/prompts.mdx index acd4722..dd09325 100644 --- a/src/content/docs/clack/packages/prompts.mdx +++ b/src/content/docs/clack/packages/prompts.mdx @@ -3,6 +3,10 @@ title: Prompts description: Learn about the prompts package and its capabilities --- +import Asciinema from "~components/asciinema.svelte" +import castText from '~assets/cast/clack/text.cast?url' +import castPassword from '~assets/cast/clack/password.cast?url' + The `@clack/prompts` package provides a collection of pre-built, high-level prompts that make it easy to create interactive command-line interfaces. It builds on top of the core package to provide a more developer-friendly experience. ## Key Features @@ -29,10 +33,7 @@ const name = await text({ }); ``` -│
-◆ What is your name?
-│ John Doe
-└
+│
-◆ What is your password?
-│ *****_
-└
+