From 658f7f8b5a76873469209664cf76739d3bf586c4 Mon Sep 17 00:00:00 2001 From: Sahin Vardar Date: Sun, 27 Oct 2024 13:30:16 +0100 Subject: [PATCH] WIP --- .eslintrc.cjs | 1 + package.json | 3 +- pnpm-lock.yaml | 916 ++++++++++++++++++----------------- src/print-html.ts | 162 ++++--- src/tests/print-html.test.ts | 158 +++--- 5 files changed, 650 insertions(+), 590 deletions(-) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 53278cd..6fed13f 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -27,6 +27,7 @@ module.exports = { ecmaVersion: 2021 }, rules: { + '@typescript-eslint/no-namespace': 'off', '@typescript-eslint/no-explicit-any': 'off', '@typescript-eslint/no-non-null-assertion': 'off', 'turbo/no-undeclared-env-vars': 'off', diff --git a/package.json b/package.json index ff2fcfb..d2872bf 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,7 @@ "svelte": "5.x" }, "devDependencies": { + "@types/estree": "^1.0.6", "@types/lodash": "^4.14.195", "@types/node": "^20.2.5", "@typescript-eslint/eslint-plugin": "^6.11.0", @@ -49,7 +50,7 @@ "semantic-release": "^22.0.8", "svelte": "^5.1.3", "typescript": "^5.0.4", - "vitest": "^0.31.1" + "vitest": "^2.1.3" }, "keywords": [], "lint-staged": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 25a7926..1648fe2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -15,6 +15,9 @@ importers: specifier: ^3.0.3 version: 3.0.3 devDependencies: + '@types/estree': + specifier: ^1.0.6 + version: 1.0.6 '@types/lodash': specifier: ^4.14.195 version: 4.14.195 @@ -67,8 +70,8 @@ importers: specifier: ^5.0.4 version: 5.0.4 vitest: - specifier: ^0.31.1 - version: 0.31.1 + specifier: ^2.1.3 + version: 2.1.3(@types/node@20.2.5) packages: @@ -108,134 +111,140 @@ packages: resolution: {integrity: sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==} engines: {node: '>=0.1.90'} - '@esbuild/android-arm64@0.17.19': - resolution: {integrity: sha512-KBMWvEZooR7+kzY0BtbTQn0OAYY7CsiydT63pVEaPtVYF0hXbUaOyZog37DKxK7NF3XacBJOpYT4adIJh+avxA==} + '@esbuild/aix-ppc64@0.21.5': + resolution: {integrity: sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [aix] + + '@esbuild/android-arm64@0.21.5': + resolution: {integrity: sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==} engines: {node: '>=12'} cpu: [arm64] os: [android] - '@esbuild/android-arm@0.17.19': - resolution: {integrity: sha512-rIKddzqhmav7MSmoFCmDIb6e2W57geRsM94gV2l38fzhXMwq7hZoClug9USI2pFRGL06f4IOPHHpFNOkWieR8A==} + '@esbuild/android-arm@0.21.5': + resolution: {integrity: sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==} engines: {node: '>=12'} cpu: [arm] os: [android] - '@esbuild/android-x64@0.17.19': - resolution: {integrity: sha512-uUTTc4xGNDT7YSArp/zbtmbhO0uEEK9/ETW29Wk1thYUJBz3IVnvgEiEwEa9IeLyvnpKrWK64Utw2bgUmDveww==} + '@esbuild/android-x64@0.21.5': + resolution: {integrity: sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==} engines: {node: '>=12'} cpu: [x64] os: [android] - '@esbuild/darwin-arm64@0.17.19': - resolution: {integrity: sha512-80wEoCfF/hFKM6WE1FyBHc9SfUblloAWx6FJkFWTWiCoht9Mc0ARGEM47e67W9rI09YoUxJL68WHfDRYEAvOhg==} + '@esbuild/darwin-arm64@0.21.5': + resolution: {integrity: sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==} engines: {node: '>=12'} cpu: [arm64] os: [darwin] - '@esbuild/darwin-x64@0.17.19': - resolution: {integrity: sha512-IJM4JJsLhRYr9xdtLytPLSH9k/oxR3boaUIYiHkAawtwNOXKE8KoU8tMvryogdcT8AU+Bflmh81Xn6Q0vTZbQw==} + '@esbuild/darwin-x64@0.21.5': + resolution: {integrity: sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==} engines: {node: '>=12'} cpu: [x64] os: [darwin] - '@esbuild/freebsd-arm64@0.17.19': - resolution: {integrity: sha512-pBwbc7DufluUeGdjSU5Si+P3SoMF5DQ/F/UmTSb8HXO80ZEAJmrykPyzo1IfNbAoaqw48YRpv8shwd1NoI0jcQ==} + '@esbuild/freebsd-arm64@0.21.5': + resolution: {integrity: sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==} engines: {node: '>=12'} cpu: [arm64] os: [freebsd] - '@esbuild/freebsd-x64@0.17.19': - resolution: {integrity: sha512-4lu+n8Wk0XlajEhbEffdy2xy53dpR06SlzvhGByyg36qJw6Kpfk7cp45DR/62aPH9mtJRmIyrXAS5UWBrJT6TQ==} + '@esbuild/freebsd-x64@0.21.5': + resolution: {integrity: sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==} engines: {node: '>=12'} cpu: [x64] os: [freebsd] - '@esbuild/linux-arm64@0.17.19': - resolution: {integrity: sha512-ct1Tg3WGwd3P+oZYqic+YZF4snNl2bsnMKRkb3ozHmnM0dGWuxcPTTntAF6bOP0Sp4x0PjSF+4uHQ1xvxfRKqg==} + '@esbuild/linux-arm64@0.21.5': + resolution: {integrity: sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==} engines: {node: '>=12'} cpu: [arm64] os: [linux] - '@esbuild/linux-arm@0.17.19': - resolution: {integrity: sha512-cdmT3KxjlOQ/gZ2cjfrQOtmhG4HJs6hhvm3mWSRDPtZ/lP5oe8FWceS10JaSJC13GBd4eH/haHnqf7hhGNLerA==} + '@esbuild/linux-arm@0.21.5': + resolution: {integrity: sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==} engines: {node: '>=12'} cpu: [arm] os: [linux] - '@esbuild/linux-ia32@0.17.19': - resolution: {integrity: sha512-w4IRhSy1VbsNxHRQpeGCHEmibqdTUx61Vc38APcsRbuVgK0OPEnQ0YD39Brymn96mOx48Y2laBQGqgZ0j9w6SQ==} + '@esbuild/linux-ia32@0.21.5': + resolution: {integrity: sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==} engines: {node: '>=12'} cpu: [ia32] os: [linux] - '@esbuild/linux-loong64@0.17.19': - resolution: {integrity: sha512-2iAngUbBPMq439a+z//gE+9WBldoMp1s5GWsUSgqHLzLJ9WoZLZhpwWuym0u0u/4XmZ3gpHmzV84PonE+9IIdQ==} + '@esbuild/linux-loong64@0.21.5': + resolution: {integrity: sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==} engines: {node: '>=12'} cpu: [loong64] os: [linux] - '@esbuild/linux-mips64el@0.17.19': - resolution: {integrity: sha512-LKJltc4LVdMKHsrFe4MGNPp0hqDFA1Wpt3jE1gEyM3nKUvOiO//9PheZZHfYRfYl6AwdTH4aTcXSqBerX0ml4A==} + '@esbuild/linux-mips64el@0.21.5': + resolution: {integrity: sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==} engines: {node: '>=12'} cpu: [mips64el] os: [linux] - '@esbuild/linux-ppc64@0.17.19': - resolution: {integrity: sha512-/c/DGybs95WXNS8y3Ti/ytqETiW7EU44MEKuCAcpPto3YjQbyK3IQVKfF6nbghD7EcLUGl0NbiL5Rt5DMhn5tg==} + '@esbuild/linux-ppc64@0.21.5': + resolution: {integrity: sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==} engines: {node: '>=12'} cpu: [ppc64] os: [linux] - '@esbuild/linux-riscv64@0.17.19': - resolution: {integrity: sha512-FC3nUAWhvFoutlhAkgHf8f5HwFWUL6bYdvLc/TTuxKlvLi3+pPzdZiFKSWz/PF30TB1K19SuCxDTI5KcqASJqA==} + '@esbuild/linux-riscv64@0.21.5': + resolution: {integrity: sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==} engines: {node: '>=12'} cpu: [riscv64] os: [linux] - '@esbuild/linux-s390x@0.17.19': - resolution: {integrity: sha512-IbFsFbxMWLuKEbH+7sTkKzL6NJmG2vRyy6K7JJo55w+8xDk7RElYn6xvXtDW8HCfoKBFK69f3pgBJSUSQPr+4Q==} + '@esbuild/linux-s390x@0.21.5': + resolution: {integrity: sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==} engines: {node: '>=12'} cpu: [s390x] os: [linux] - '@esbuild/linux-x64@0.17.19': - resolution: {integrity: sha512-68ngA9lg2H6zkZcyp22tsVt38mlhWde8l3eJLWkyLrp4HwMUr3c1s/M2t7+kHIhvMjglIBrFpncX1SzMckomGw==} + '@esbuild/linux-x64@0.21.5': + resolution: {integrity: sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==} engines: {node: '>=12'} cpu: [x64] os: [linux] - '@esbuild/netbsd-x64@0.17.19': - resolution: {integrity: sha512-CwFq42rXCR8TYIjIfpXCbRX0rp1jo6cPIUPSaWwzbVI4aOfX96OXY8M6KNmtPcg7QjYeDmN+DD0Wp3LaBOLf4Q==} + '@esbuild/netbsd-x64@0.21.5': + resolution: {integrity: sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==} engines: {node: '>=12'} cpu: [x64] os: [netbsd] - '@esbuild/openbsd-x64@0.17.19': - resolution: {integrity: sha512-cnq5brJYrSZ2CF6c35eCmviIN3k3RczmHz8eYaVlNasVqsNY+JKohZU5MKmaOI+KkllCdzOKKdPs762VCPC20g==} + '@esbuild/openbsd-x64@0.21.5': + resolution: {integrity: sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==} engines: {node: '>=12'} cpu: [x64] os: [openbsd] - '@esbuild/sunos-x64@0.17.19': - resolution: {integrity: sha512-vCRT7yP3zX+bKWFeP/zdS6SqdWB8OIpaRq/mbXQxTGHnIxspRtigpkUcDMlSCOejlHowLqII7K2JKevwyRP2rg==} + '@esbuild/sunos-x64@0.21.5': + resolution: {integrity: sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==} engines: {node: '>=12'} cpu: [x64] os: [sunos] - '@esbuild/win32-arm64@0.17.19': - resolution: {integrity: sha512-yYx+8jwowUstVdorcMdNlzklLYhPxjniHWFKgRqH7IFlUEa0Umu3KuYplf1HUZZ422e3NU9F4LGb+4O0Kdcaag==} + '@esbuild/win32-arm64@0.21.5': + resolution: {integrity: sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==} engines: {node: '>=12'} cpu: [arm64] os: [win32] - '@esbuild/win32-ia32@0.17.19': - resolution: {integrity: sha512-eggDKanJszUtCdlVs0RB+h35wNlb5v4TWEkq4vZcmVt5u/HiDZrTXe2bWFQUez3RgNHwx/x4sk5++4NSSicKkw==} + '@esbuild/win32-ia32@0.21.5': + resolution: {integrity: sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==} engines: {node: '>=12'} cpu: [ia32] os: [win32] - '@esbuild/win32-x64@0.17.19': - resolution: {integrity: sha512-lAhycmKnVOuRYNtRtatQR1LPQf2oYCkRGkSFnseDAKPl8lu5SOsK/e1sXe5a0Pc5kHIHe6P2I/ilntNv2xf3cA==} + '@esbuild/win32-x64@0.21.5': + resolution: {integrity: sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==} engines: {node: '>=12'} cpu: [x64] os: [win32] @@ -281,9 +290,6 @@ packages: resolution: {integrity: sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==} engines: {node: '>=6.0.0'} - '@jridgewell/sourcemap-codec@1.4.15': - resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} - '@jridgewell/sourcemap-codec@1.5.0': resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} @@ -362,6 +368,91 @@ packages: resolution: {integrity: sha512-UA91GwWPhFExt3IizW6bOeY/pQ0BkuNwKjk9iQW9KqxluGCrg4VenZ0/L+2Y0+ZOtme72EVvg6v0zo3AMQRCeA==} engines: {node: '>=12'} + '@rollup/rollup-android-arm-eabi@4.24.1': + resolution: {integrity: sha512-j2llrtCTwNu68yp1wybgkTUW8CrR8AZvGZzIO/qwNAetVP3FHidylyz1s0dU2zXG9uqqpoUIhWKmMypGMcdM2Q==} + cpu: [arm] + os: [android] + + '@rollup/rollup-android-arm64@4.24.1': + resolution: {integrity: sha512-y65R3hM9sJVAXV3qh/dJ5o2OCVzwy6d994qmi+rGw1i1onYY5AoV9dREDYoizaZvc9esEqOs07CyFgPzz4DBqg==} + cpu: [arm64] + os: [android] + + '@rollup/rollup-darwin-arm64@4.24.1': + resolution: {integrity: sha512-K9iOc75U9HpDffjop9qVPwNoBEPXS0Q6RrVSvh13gs38ynurJ2+HuS7NJbsx+fwiDA+eJYfBi7sablI8G2/3oA==} + cpu: [arm64] + os: [darwin] + + '@rollup/rollup-darwin-x64@4.24.1': + resolution: {integrity: sha512-Ufz0fX79W9937euBI4qEdh2xLb0Lzo4GiZ7xxDpueEZxWdPbow6gnTRokSzSgtqRFs1vFgcgm7Ci/KnOo15MIg==} + cpu: [x64] + os: [darwin] + + '@rollup/rollup-freebsd-x64@4.24.1': + resolution: {integrity: sha512-IfG1khuwe10V2EBfFIrcd7P6X0stdhHQM71NyaG5TPgy6dXr2nzAa5TMNFA35tr41gihUPqp/w8StayYG7jXYw==} + cpu: [x64] + os: [freebsd] + + '@rollup/rollup-linux-arm-gnueabihf@4.24.1': + resolution: {integrity: sha512-W+drJRBL1+N1/zaq+8y/CtQ3VP5wxMXwCy7obFl9r5jJ5EFNEYAqchuPfYTleYOoA46bwXAprCL+OVK3BTrWWw==} + cpu: [arm] + os: [linux] + + '@rollup/rollup-linux-arm-musleabihf@4.24.1': + resolution: {integrity: sha512-mKngr0zxo4FMSDqiq4F4G/1IPqjpNO7MyjAM6+YxDIADO4ZSI4m05bZYD4po12Jid6+n9YJRWdIcvi4JztMVcw==} + cpu: [arm] + os: [linux] + + '@rollup/rollup-linux-arm64-gnu@4.24.1': + resolution: {integrity: sha512-Rh12WITgvLydYFR9XAjmCRArU71nMfi5lDVLhpRV8dR2sCGtZESVkfD66mi3owp4q1scwysT35nNMPleRTQOow==} + cpu: [arm64] + os: [linux] + + '@rollup/rollup-linux-arm64-musl@4.24.1': + resolution: {integrity: sha512-zOLu7V1iBpJMIrrmZjpmAZ9txFlnGgqQMnjNmRrqmV1vQaou9SIT3qI3JE1kt+DQE8zCdB3n2/mAjIU90AfjEg==} + cpu: [arm64] + os: [linux] + + '@rollup/rollup-linux-powerpc64le-gnu@4.24.1': + resolution: {integrity: sha512-h9ipTGhMzTBAJL/bg1HsElhGPWLGeCKE8JkxgvrJ5O/S1MXH9RxMUTl++tzlpzxdOBCAGqygZIMBj3wIDf/kJw==} + cpu: [ppc64] + os: [linux] + + '@rollup/rollup-linux-riscv64-gnu@4.24.1': + resolution: {integrity: sha512-PNKCMA1xRBARR7/j6KXMSB1z0/eGenC/t2wdQl5et3jnrHA+igIaLVNUEPfnVjmZIZJign7u/dobvV2VkPxMiw==} + cpu: [riscv64] + os: [linux] + + '@rollup/rollup-linux-s390x-gnu@4.24.1': + resolution: {integrity: sha512-mkl3uWq/ix18gAfzBUIecSwioPyJkbR6QXVaNuOGM7Qbs7f1EfDLP4XtLSJx4GL6mO8GrKhB3cmhUc3zjUrQSg==} + cpu: [s390x] + os: [linux] + + '@rollup/rollup-linux-x64-gnu@4.24.1': + resolution: {integrity: sha512-j0RPQWteEXAAxRQI+IcX3i7WQb7hFe7CW94H3l0edBVyJMIPOlr/hqc5CGG1FBDW9gNr0ZC2IzwSta1iSNJIoA==} + cpu: [x64] + os: [linux] + + '@rollup/rollup-linux-x64-musl@4.24.1': + resolution: {integrity: sha512-UrwXowd3gyT+/ijoeSzMyHHGUaV3WhiJL77eTZE8/Pq+9K6auacIJ264biAUhHJ3FjAHsXNhzEmxGnj4tpDz2g==} + cpu: [x64] + os: [linux] + + '@rollup/rollup-win32-arm64-msvc@4.24.1': + resolution: {integrity: sha512-wexHPBkBa2/tPhbGcxLqOM2AFZ7BQsZ0pk3dVxRL5Ec0SsXnkpcMucZ4j4woyoD5DbRdFP6Roptd9TRsGVTvUA==} + cpu: [arm64] + os: [win32] + + '@rollup/rollup-win32-ia32-msvc@4.24.1': + resolution: {integrity: sha512-IW2axCCdiC+kgj5/50Mt5v8qG0LYaDichBGKXM4Oo2NaWStAs0oQp1dqVzCV1XOXNvNNDRFw0EaT+JMs6BX+WQ==} + cpu: [ia32] + os: [win32] + + '@rollup/rollup-win32-x64-msvc@4.24.1': + resolution: {integrity: sha512-b9IK2buRXwm7owl4Hd8fselCQ7/gr2WaErv0e/IPgRQuJfFS+O0cFJA4t13+FKAZeQh97iEyBG06g613IJLirQ==} + cpu: [x64] + os: [win32] + '@semantic-release/commit-analyzer@11.1.0': resolution: {integrity: sha512-cXNTbv3nXR2hlzHjAMgbuiQVtvWHTlwwISt60B+4NZv01y/QRY7p2HcJm8Eh2StzcTJoNnflvKjHH/cjFS7d5g==} engines: {node: ^18.17 || >=20.6.1} @@ -398,14 +489,8 @@ packages: resolution: {integrity: sha512-rUV5WyJrJLoloD4NDN1V1+LDMDWOa4OTsT4yYJwQNpTU6FWxkxHpL7eu4w+DmiH8x/EAM1otkPE1+LaspIbplw==} engines: {node: '>=18'} - '@types/chai-subset@1.3.3': - resolution: {integrity: sha512-frBecisrNGz+F4T6bcc+NLeolfiojh5FxW2klu669+8BARtyQv2C/GkNW6FUodVe4BroGMP/wER/YDGc7rEllw==} - - '@types/chai@4.3.5': - resolution: {integrity: sha512-mEo1sAde+UCE6b2hxn332f1g1E8WfYRu6p5SvTKr2ZKC1f7gFJXk4h5PyGP9Dt6gCaG8y8XhwnXWC6Iy2cmBng==} - - '@types/estree@1.0.5': - resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} + '@types/estree@1.0.6': + resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==} '@types/json-schema@7.0.15': resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} @@ -489,20 +574,35 @@ packages: '@ungap/structured-clone@1.2.0': resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} - '@vitest/expect@0.31.1': - resolution: {integrity: sha512-BV1LyNvhnX+eNYzJxlHIGPWZpwJFZaCcOIzp2CNG0P+bbetenTupk6EO0LANm4QFt0TTit+yqx7Rxd1qxi/SQA==} + '@vitest/expect@2.1.3': + resolution: {integrity: sha512-SNBoPubeCJhZ48agjXruCI57DvxcsivVDdWz+SSsmjTT4QN/DfHk3zB/xKsJqMs26bLZ/pNRLnCf0j679i0uWQ==} + + '@vitest/mocker@2.1.3': + resolution: {integrity: sha512-eSpdY/eJDuOvuTA3ASzCjdithHa+GIF1L4PqtEELl6Qa3XafdMLBpBlZCIUCX2J+Q6sNmjmxtosAG62fK4BlqQ==} + peerDependencies: + '@vitest/spy': 2.1.3 + msw: ^2.3.5 + vite: ^5.0.0 + peerDependenciesMeta: + msw: + optional: true + vite: + optional: true + + '@vitest/pretty-format@2.1.3': + resolution: {integrity: sha512-XH1XdtoLZCpqV59KRbPrIhFCOO0hErxrQCMcvnQete3Vibb9UeIOX02uFPfVn3Z9ZXsq78etlfyhnkmIZSzIwQ==} - '@vitest/runner@0.31.1': - resolution: {integrity: sha512-imWuc82ngOtxdCUpXwtEzZIuc1KMr+VlQ3Ondph45VhWoQWit5yvG/fFcldbnCi8DUuFi+NmNx5ehMUw/cGLUw==} + '@vitest/runner@2.1.3': + resolution: {integrity: sha512-JGzpWqmFJ4fq5ZKHtVO3Xuy1iF2rHGV4d/pdzgkYHm1+gOzNZtqjvyiaDGJytRyMU54qkxpNzCx+PErzJ1/JqQ==} - '@vitest/snapshot@0.31.1': - resolution: {integrity: sha512-L3w5uU9bMe6asrNzJ8WZzN+jUTX4KSgCinEJPXyny0o90fG4FPQMV0OWsq7vrCWfQlAilMjDnOF9nP8lidsJ+g==} + '@vitest/snapshot@2.1.3': + resolution: {integrity: sha512-qWC2mWc7VAXmjAkEKxrScWHWFyCQx/cmiZtuGqMi+WwqQJ2iURsVY4ZfAK6dVo6K2smKRU6l3BPwqEBvhnpQGg==} - '@vitest/spy@0.31.1': - resolution: {integrity: sha512-1cTpt2m9mdo3hRLDyCG2hDQvRrePTDgEJBFQQNz1ydHHZy03EiA6EpFxY+7ODaY7vMRCie+WlFZBZ0/dQWyssQ==} + '@vitest/spy@2.1.3': + resolution: {integrity: sha512-Nb2UzbcUswzeSP7JksMDaqsI43Sj5+Kry6ry6jQJT4b5gAK+NS9NED6mDb8FlMRCX8m5guaHCDZmqYMMWRy5nQ==} - '@vitest/utils@0.31.1': - resolution: {integrity: sha512-yFyRD5ilwojsZfo3E0BnH72pSVSuLg2356cN1tCEe/0RtDzxTPYwOomIC+eQbot7m6DRy4tPZw+09mB7NkbMmA==} + '@vitest/utils@2.1.3': + resolution: {integrity: sha512-xpiVfDSg1RrYT0tX6czgerkpcKFmFOF/gCr30+Mve5V2kewCy4Prn1/NDMSRwaSmT7PRaOF83wu+bEtsY1wrvA==} JSONStream@1.3.5: resolution: {integrity: sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==} @@ -518,10 +618,6 @@ packages: peerDependencies: acorn: '>=8.9.0' - acorn-walk@8.2.0: - resolution: {integrity: sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==} - engines: {node: '>=0.4.0'} - acorn@8.11.2: resolution: {integrity: sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==} engines: {node: '>=0.4.0'} @@ -532,11 +628,6 @@ packages: engines: {node: '>=0.4.0'} hasBin: true - acorn@8.8.2: - resolution: {integrity: sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==} - engines: {node: '>=0.4.0'} - hasBin: true - agent-base@7.1.0: resolution: {integrity: sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg==} engines: {node: '>= 14'} @@ -576,10 +667,6 @@ packages: resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} engines: {node: '>=8'} - ansi-styles@5.2.0: - resolution: {integrity: sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==} - engines: {node: '>=10'} - ansi-styles@6.2.1: resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==} engines: {node: '>=12'} @@ -604,8 +691,9 @@ packages: resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} engines: {node: '>=8'} - assertion-error@1.1.0: - resolution: {integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==} + assertion-error@2.0.1: + resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} + engines: {node: '>=12'} astring@1.8.5: resolution: {integrity: sha512-TuBbdn7jWVzf8dmFGTaRpW8qgANtWLi1qJLnkfGO5uVf6jf9f/F4B1H35tnOI+qVYZo3p3i8WZlbZOuPAE0wEA==} @@ -625,9 +713,6 @@ packages: before-after-hook@2.2.3: resolution: {integrity: sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==} - blueimp-md5@2.19.0: - resolution: {integrity: sha512-DRQrD6gJyy8FbiE4s+bDoXS9hiW3Vbx5uCdwvcCf3zLHL+Iv7LtGHLpr+GZV8rHG8tK766FGYBwRbu8pELTt+w==} - bottleneck@2.19.5: resolution: {integrity: sha512-VHiNCbI1lKdl44tGrhNfU3lup0Tj/ZBMJB5/2ZbNXRCPuRCO7ed2mgcK4r17y+KB2EfuYuRaVlwNbAeaWGSpbw==} @@ -650,9 +735,9 @@ packages: resolution: {integrity: sha512-JSr5eOgoEymtYHBjNWyjrMqet9Am2miJhlfKNdqLp6zoeAh0KN5dRAcxlecj5mAJrmQomgiOBj35xHLrFjqBpw==} hasBin: true - chai@4.3.7: - resolution: {integrity: sha512-HLnAzZ2iupm25PlN0xFreAlBA5zaBSv3og0DdeGA4Ar6h6rJ3A0rolRUKJhSF2V10GZKDgWF/VmAEsNWjCRB+A==} - engines: {node: '>=4'} + chai@5.1.2: + resolution: {integrity: sha512-aGtmf24DW6MLHHG5gCx4zaI3uBq3KRtxeVs0DjFH6Z0rDNbsvTxFASFvdj79pxjxZ8/5u3PIiN3IwEIQkiiuPw==} + engines: {node: '>=12'} chalk@2.4.2: resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} @@ -670,8 +755,9 @@ packages: resolution: {integrity: sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==} engines: {node: '>=10'} - check-error@1.0.2: - resolution: {integrity: sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==} + check-error@2.1.1: + resolution: {integrity: sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==} + engines: {node: '>= 16'} clean-stack@4.2.0: resolution: {integrity: sha512-LYv6XPxoyODi36Dp976riBtSY27VmFo+MKqEU9QCCWyTrdEPDog+RWA7xQWHi6Vbp61j5c4cdzzX1NidnwtUWg==} @@ -731,10 +817,6 @@ packages: concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} - concordance@5.0.4: - resolution: {integrity: sha512-OAcsnTEYu1ARJqWVGwf4zh4JDfHZEaSNlNccFmt8YjB2l/n19/PF2viLINHc57vO4FKIAFl2FWASIGZZWZ2Kxw==} - engines: {node: '>=10.18.0 <11 || >=12.14.0 <13 || >=14'} - config-chain@1.1.13: resolution: {integrity: sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==} @@ -780,10 +862,6 @@ packages: resolution: {integrity: sha512-x8dy3RnvYdlUcPOjkEHqozhiwzKNSq7GcPuXFbnyMOCHxX8V3OgIg/pYuabl2sbUPfIJaeAQB7PMOK8DFIdoRA==} engines: {node: '>=12'} - date-time@3.1.0: - resolution: {integrity: sha512-uqCUKXE5q1PNBXjPqvwhwJf9SwMoAHBgWJ6DcrnS5o+W2JOiIILl0JEdVD8SGujrNS02GGxgwAg2PN2zONgtjg==} - engines: {node: '>=6'} - debug@4.3.4: resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} engines: {node: '>=6.0'} @@ -793,8 +871,17 @@ packages: supports-color: optional: true - deep-eql@4.1.3: - resolution: {integrity: sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==} + debug@4.3.7: + resolution: {integrity: sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + + deep-eql@5.0.2: + resolution: {integrity: sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==} engines: {node: '>=6'} deep-extend@0.6.0: @@ -841,8 +928,8 @@ packages: error-ex@1.3.2: resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} - esbuild@0.17.19: - resolution: {integrity: sha512-XQ0jAPFkK/u3LcVRcvVHQcTIqD6E2H1fvZMA5dQPSOWb3suUbWbfbRf94pjc0bNzRYLfIrDRQXr7X+LHIm5oHw==} + esbuild@0.21.5: + resolution: {integrity: sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==} engines: {node: '>=12'} hasBin: true @@ -939,9 +1026,6 @@ packages: fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} - fast-diff@1.3.0: - resolution: {integrity: sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==} - fast-glob@3.3.2: resolution: {integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==} engines: {node: '>=8.6.0'} @@ -1008,8 +1092,8 @@ packages: fs.realpath@1.0.0: resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} - fsevents@2.3.2: - resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} + fsevents@2.3.3: + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} os: [darwin] @@ -1020,9 +1104,6 @@ packages: resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} engines: {node: 6.* || 8.* || >= 10.*} - get-func-name@2.0.0: - resolution: {integrity: sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==} - get-stream@6.0.1: resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} engines: {node: '>=10'} @@ -1215,10 +1296,6 @@ packages: resolution: {integrity: sha512-qjdpeo2yKlYTH7nFdK0vbZWuTCesk4o63v5iVOlhMQPfuIZQfW/HI35SjfhA+4qpg36rnFSvUK5b1m+ckIblQQ==} engines: {node: '>= 0.6.0'} - js-string-escape@1.0.1: - resolution: {integrity: sha512-Smw4xcfIQ5LVjAOuJCvN/zIodzA/BBSsluuoSykP+lUvScIi4U6RJLfwHet5cxFnCswUjISV8oAXaqaJDY3chg==} - engines: {node: '>= 0.8'} - js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} @@ -1244,9 +1321,6 @@ packages: json-stringify-safe@5.0.1: resolution: {integrity: sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==} - jsonc-parser@3.2.0: - resolution: {integrity: sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==} - jsonfile@6.1.0: resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} @@ -1281,10 +1355,6 @@ packages: resolution: {integrity: sha512-Kx8hMakjX03tiGTLAIdJ+lL0htKnXjEZN6hk/tozf/WOuYGdZBJrZ+rCJRbVCugsjB3jMLn9746NsQIf5VjBMw==} engines: {node: '>=4'} - local-pkg@0.4.3: - resolution: {integrity: sha512-SFppqq5p42fe2qcZQqqEOiVRXl+WCP1MdT6k7BDEW1j++sp5fIY+/fdRQitvKgB5BrBcmrs5m/L0v2FrU5MY1g==} - engines: {node: '>=14'} - locate-character@3.0.0: resolution: {integrity: sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA==} @@ -1324,8 +1394,8 @@ packages: resolution: {integrity: sha512-5UtUDQ/6edw4ofyljDNcOVJQ4c7OjDro4h3y8e1GQL5iYElYclVHJ3zeWchylvMaKnDbDilC8irOVyexnA/Slw==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - loupe@2.3.6: - resolution: {integrity: sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA==} + loupe@3.1.2: + resolution: {integrity: sha512-23I4pFZHmAemUnz8WZXbYRSKYj801VDaNv9ETuMh7IrMc7VuVVSo+Z9iLE3ni30+U48iDWfi30d3twAXBYmnCg==} lru-cache@10.1.0: resolution: {integrity: sha512-/1clY/ui8CzjKFyjdvwPWJUYKiFVXG2I2cY0ssG7h4+hwk+XOIX7ZSG9Q7TW8TW3Kp3BUSqgFWBLgL4PJ+Blag==} @@ -1335,10 +1405,6 @@ packages: resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} engines: {node: '>=10'} - magic-string@0.30.0: - resolution: {integrity: sha512-LA+31JYDJLs82r2ScLrlz1GjSgu66ZV518eyWT+S8VhyQn/JL0u9MeBOvQMGYiPk1DBiSN9DDMOcXvigJZaViQ==} - engines: {node: '>=12'} - magic-string@0.30.12: resolution: {integrity: sha512-Ea8I3sQMVXr8JhN4z+H/d8zwo+tYDgHE9+5G4Wnrwhs0gaK9fXTKx0Tw5Xwsd/bCPTTZNRAdpyzvoeORe9LYpw==} @@ -1353,10 +1419,6 @@ packages: engines: {node: '>= 16'} hasBin: true - md5-hex@3.0.1: - resolution: {integrity: sha512-BUiRtTtV39LIJwinWBjqVsU9xhdnz7/i889V859IBFpuqGAj6LuOvHv5XLbgZ2R7ptJoJaEcxkv88/h25T7Ciw==} - engines: {node: '>=8'} - meow@12.1.1: resolution: {integrity: sha512-BhXM0Au22RwUneMPwSCnyhTOizdWoIEPU9sp0Aqa1PnDMR5Wv2FGXYDjuzJEIX+Eo2Rb8xuYe5jrnm5QowQFkw==} engines: {node: '>=16.10'} @@ -1391,14 +1453,14 @@ packages: minimist@1.2.8: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} - mlly@1.3.0: - resolution: {integrity: sha512-HT5mcgIQKkOrZecOjOX3DJorTikWXwsBfpcr/MGBkhfWcjiqvnaL/9ppxvIUXfjT6xt4DVIAsN9fMUz1ev4bIw==} - ms@2.1.2: resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} - nanoid@3.3.6: - resolution: {integrity: sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==} + ms@2.1.3: + resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + + nanoid@3.3.7: + resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true @@ -1539,10 +1601,6 @@ packages: resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} engines: {node: '>=10'} - p-limit@4.0.0: - resolution: {integrity: sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - p-locate@2.0.0: resolution: {integrity: sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg==} engines: {node: '>=4'} @@ -1611,14 +1669,15 @@ packages: resolution: {integrity: sha512-5HviZNaZcfqP95rwpv+1HDgUamezbqdSYTyzjTvwtJSnIH+3vnbmWsItli8OFEndS984VT55M3jduxZbX351gg==} engines: {node: '>=12'} - pathe@1.1.0: - resolution: {integrity: sha512-ODbEPR0KKHqECXW1GoxdDb+AZvULmXjVPy4rt+pGo2+TnjJTIPJQSVS6N63n8T2Ip+syHhbn52OewKicV0373w==} + pathe@1.1.2: + resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==} - pathval@1.1.1: - resolution: {integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==} + pathval@2.0.0: + resolution: {integrity: sha512-vE7JKRyES09KiunauX7nd2Q9/L7lhok4smP9RZTDeD4MVs72Dp2qNFVz39Nz5a0FVEW0BJR6C0DYrq6unoziZA==} + engines: {node: '>= 14.16'} - picocolors@1.0.0: - resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} + picocolors@1.1.1: + resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} picomatch@2.3.1: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} @@ -1637,11 +1696,8 @@ packages: resolution: {integrity: sha512-C+VUP+8jis7EsQZIhDYmS5qlNtjv2yP4SNtjXK9AP1ZcTRlnSfuumaTnRfYZnYgUUYVIKqL0fRvmUGDV2fmp6g==} engines: {node: '>=4'} - pkg-types@1.0.3: - resolution: {integrity: sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A==} - - postcss@8.4.23: - resolution: {integrity: sha512-bQ3qMcpF6A/YjR55xtoTr0jGOlnPOKAIMdOWiv0EIT6HVPEaJiJB4NLljSbiHoC2RX7DN5Uvjtpbg1NPdwv1oA==} + postcss@8.4.47: + resolution: {integrity: sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==} engines: {node: ^10 || ^12 || >=14} prelude-ls@1.2.1: @@ -1670,10 +1726,6 @@ packages: engines: {node: '>=14'} hasBin: true - pretty-format@27.5.1: - resolution: {integrity: sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==} - engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} - process-nextick-args@2.0.1: resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==} @@ -1691,9 +1743,6 @@ packages: resolution: {integrity: sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==} hasBin: true - react-is@17.0.2: - resolution: {integrity: sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==} - read-pkg-up@11.0.0: resolution: {integrity: sha512-LOVbvF1Q0SZdjClSefZ0Nz5z8u+tIE7mV5NibzmE9VYmDe9CaBbAVtz1veOSZbofrdsilxuDAYnFenukZVp8/Q==} engines: {node: '>=18'} @@ -1740,9 +1789,9 @@ packages: resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} hasBin: true - rollup@3.23.0: - resolution: {integrity: sha512-h31UlwEi7FHihLe1zbk+3Q7z1k/84rb9BSwmBSr/XjOCEaBJ2YyedQDuM0t/kfOS0IxM+vk1/zI9XxYj9V+NJQ==} - engines: {node: '>=14.18.0', npm: '>=8.0.0'} + rollup@4.24.1: + resolution: {integrity: sha512-2lhtdsnyxlfBAZVh9tfriEc1nV9HxjQGnqEpd7z7cWXuLbI4jHWDhAvw6JGs0AVcnYqv0gL7Mjuj/utxW2wPBw==} + engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true run-parallel@1.2.0: @@ -1818,8 +1867,8 @@ packages: sort-order@1.0.1: resolution: {integrity: sha512-BiExT7C1IVF4DNd5dttR/dEq3wunGOHpy4phvqFUQA1pY6j2ye8WWEAV8LhRbfdF0EWDX12FfyPPf9P71eT+cA==} - source-map-js@1.0.2: - resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} + source-map-js@1.2.1: + resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} engines: {node: '>=0.10.0'} source-map@0.6.1: @@ -1851,8 +1900,8 @@ packages: stackback@0.0.2: resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} - std-env@3.3.3: - resolution: {integrity: sha512-Rz6yejtVyWnVjC1RFvNmYL10kgjC49EOghxWn0RFqlCHGFpQx+Xe7yW3I4ceK1SGrWIGMjD5Kbue8W/udkbMJg==} + std-env@3.7.0: + resolution: {integrity: sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg==} stream-combiner2@1.1.1: resolution: {integrity: sha512-3PnJbYgS56AeWgtKF5jtJRT6uFJe56Z0Hc5Ngg/6sI6rIt8iiMBTa9cvdyFfpMQjaVHr8dusbNeFGIIonxOvKw==} @@ -1896,9 +1945,6 @@ packages: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} engines: {node: '>=8'} - strip-literal@1.0.1: - resolution: {integrity: sha512-QZTsipNpa2Ppr6v1AmJHESqJ3Uz247MUS0OjrnnZjFAvEoWqxuyFuXn2xLgMtRnijJShAa1HL0gtJyUs7u7n3Q==} - supports-color@5.5.0: resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} engines: {node: '>=4'} @@ -1936,19 +1982,22 @@ packages: through@2.3.8: resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} - time-zone@1.0.0: - resolution: {integrity: sha512-TIsDdtKo6+XrPtiTm1ssmMngN1sAhyKnTO2kunQWqNPWIVvCm15Wmw4SWInwTVgJ5u/Tr04+8Ei9TNcw4x4ONA==} - engines: {node: '>=4'} + tinybench@2.9.0: + resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} - tinybench@2.5.0: - resolution: {integrity: sha512-kRwSG8Zx4tjF9ZiyH4bhaebu+EDz1BOx9hOigYHlUW4xxI/wKIUQUqo018UlU4ar6ATPBsaMrdbKZ+tmPdohFA==} + tinyexec@0.3.1: + resolution: {integrity: sha512-WiCJLEECkO18gwqIp6+hJg0//p23HXp4S+gGtAKu3mI2F2/sXC4FvHvXvB0zJVVaTPhx1/tOwdbRsa1sOBIKqQ==} - tinypool@0.5.0: - resolution: {integrity: sha512-paHQtnrlS1QZYKF/GnLoOM/DN9fqaGOFbCbxzAhwniySnzl9Ebk8w73/dd34DAhe/obUbPAOldTyYXQZxnPBPQ==} + tinypool@1.0.1: + resolution: {integrity: sha512-URZYihUbRPcGv95En+sz6MfghfIc2OJ1sv/RmhWZLouPY0/8Vo80viwPvg3dlaS9fuq7fQMEfgRRK7BBZThBEA==} + engines: {node: ^18.0.0 || >=20.0.0} + + tinyrainbow@1.2.0: + resolution: {integrity: sha512-weEDEq7Z5eTHPDh4xjX789+fHfF+P8boiFB+0vbWzpbnbsEr/GRaohi/uMKxg8RZMXnl1ItAi/IUHWMsjDV7kQ==} engines: {node: '>=14.0.0'} - tinyspy@2.1.0: - resolution: {integrity: sha512-7eORpyqImoOvkQJCSkL0d0mB4NHHIFAy4b1u8PHdDa7SjGS2njzl6/lyGoZLm+eyYEtlUmFGE0rFj66SWxZgQQ==} + tinyspy@3.0.2: + resolution: {integrity: sha512-n1cw8k1k0x4pgA2+9XrOkFydTerNcJ1zWCO5Nn9scWHTD+5tp8dghT2x1uduQePZTZgd3Tupf+x9BxJjeJi77Q==} engines: {node: '>=14.0.0'} to-regex-range@5.0.1: @@ -1968,10 +2017,6 @@ packages: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} - type-detect@4.0.8: - resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==} - engines: {node: '>=4'} - type-fest@0.20.2: resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} engines: {node: '>=10'} @@ -1997,9 +2042,6 @@ packages: engines: {node: '>=12.20'} hasBin: true - ufo@1.1.2: - resolution: {integrity: sha512-TrY6DsjTQQgyS3E3dBaOXf0TpPD8u9FVrVYmKVegJuFw51n/YB9XPt+U6ydzFG5ZIN7+DIjPbNmXoBj9esYhgQ==} - uglify-js@3.17.4: resolution: {integrity: sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==} engines: {node: '>=0.8.0'} @@ -2037,19 +2079,21 @@ packages: validate-npm-package-license@3.0.4: resolution: {integrity: sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==} - vite-node@0.31.1: - resolution: {integrity: sha512-BajE/IsNQ6JyizPzu9zRgHrBwczkAs0erQf/JRpgTIESpKvNj9/Gd0vxX905klLkb0I0SJVCKbdrl5c6FnqYKA==} - engines: {node: '>=v14.18.0'} + vite-node@2.1.3: + resolution: {integrity: sha512-I1JadzO+xYX887S39Do+paRePCKoiDrWRRjp9kkG5he0t7RXNvPAJPCQSJqbGN4uCrFFeS3Kj3sLqY8NMYBEdA==} + engines: {node: ^18.0.0 || >=20.0.0} hasBin: true - vite@4.3.9: - resolution: {integrity: sha512-qsTNZjO9NoJNW7KnOrgYwczm0WctJ8m/yqYAMAK9Lxt4SoySUfS5S8ia9K7JHpa3KEeMfyF8LoJ3c5NeBJy6pg==} - engines: {node: ^14.18.0 || >=16.0.0} + vite@5.4.10: + resolution: {integrity: sha512-1hvaPshuPUtxeQ0hsVH3Mud0ZanOLwVTneA1EgbAM5LhaZEqyPWGRQ7BtaMvUrTDeEaC8pxtj6a6jku3x4z6SQ==} + engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: - '@types/node': '>= 14' + '@types/node': ^18.0.0 || >=20.0.0 less: '*' + lightningcss: ^1.21.0 sass: '*' + sass-embedded: '*' stylus: '*' sugarss: '*' terser: ^5.4.0 @@ -2058,8 +2102,12 @@ packages: optional: true less: optional: true + lightningcss: + optional: true sass: optional: true + sass-embedded: + optional: true stylus: optional: true sugarss: @@ -2067,22 +2115,22 @@ packages: terser: optional: true - vitest@0.31.1: - resolution: {integrity: sha512-/dOoOgzoFk/5pTvg1E65WVaobknWREN15+HF+0ucudo3dDG/vCZoXTQrjIfEaWvQXmqScwkRodrTbM/ScMpRcQ==} - engines: {node: '>=v14.18.0'} + vitest@2.1.3: + resolution: {integrity: sha512-Zrxbg/WiIvUP2uEzelDNTXmEMJXuzJ1kCpbDvaKByFA9MNeO95V+7r/3ti0qzJzrxdyuUw5VduN7k+D3VmVOSA==} + engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: '@edge-runtime/vm': '*' - '@vitest/browser': '*' - '@vitest/ui': '*' + '@types/node': ^18.0.0 || >=20.0.0 + '@vitest/browser': 2.1.3 + '@vitest/ui': 2.1.3 happy-dom: '*' jsdom: '*' - playwright: '*' - safaridriver: '*' - webdriverio: '*' peerDependenciesMeta: '@edge-runtime/vm': optional: true + '@types/node': + optional: true '@vitest/browser': optional: true '@vitest/ui': @@ -2091,24 +2139,14 @@ packages: optional: true jsdom: optional: true - playwright: - optional: true - safaridriver: - optional: true - webdriverio: - optional: true - - well-known-symbols@2.0.0: - resolution: {integrity: sha512-ZMjC3ho+KXo0BfJb7JgtQ5IBuvnShdlACNkKkdsqBmYw3bPAaJfPeYUo6tLUaT5tG/Gkh7xkpBhKRQ9e7pyg9Q==} - engines: {node: '>=6'} which@2.0.2: resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} engines: {node: '>= 8'} hasBin: true - why-is-node-running@2.2.2: - resolution: {integrity: sha512-6tSwToZxTOcotxHeA+qGCq1mVzKR3CwcJGmVcY+QE8SHy6TnpFnh8PAvPNHYr7EcuVeG0QSMxtYCuO1ta/G/oA==} + why-is-node-running@2.3.0: + resolution: {integrity: sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==} engines: {node: '>=8'} hasBin: true @@ -2157,10 +2195,6 @@ packages: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} - yocto-queue@1.0.0: - resolution: {integrity: sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==} - engines: {node: '>=12.20'} - zimmerframe@1.1.2: resolution: {integrity: sha512-rAbqEGa8ovJy4pyBxZM70hg4pE6gDgaQ0Sl9M3enG3I0d6H4XSAM3GeNGLKnsBpuijUow064sf7ww1nutC5/3w==} @@ -2201,70 +2235,73 @@ snapshots: '@colors/colors@1.5.0': optional: true - '@esbuild/android-arm64@0.17.19': + '@esbuild/aix-ppc64@0.21.5': + optional: true + + '@esbuild/android-arm64@0.21.5': optional: true - '@esbuild/android-arm@0.17.19': + '@esbuild/android-arm@0.21.5': optional: true - '@esbuild/android-x64@0.17.19': + '@esbuild/android-x64@0.21.5': optional: true - '@esbuild/darwin-arm64@0.17.19': + '@esbuild/darwin-arm64@0.21.5': optional: true - '@esbuild/darwin-x64@0.17.19': + '@esbuild/darwin-x64@0.21.5': optional: true - '@esbuild/freebsd-arm64@0.17.19': + '@esbuild/freebsd-arm64@0.21.5': optional: true - '@esbuild/freebsd-x64@0.17.19': + '@esbuild/freebsd-x64@0.21.5': optional: true - '@esbuild/linux-arm64@0.17.19': + '@esbuild/linux-arm64@0.21.5': optional: true - '@esbuild/linux-arm@0.17.19': + '@esbuild/linux-arm@0.21.5': optional: true - '@esbuild/linux-ia32@0.17.19': + '@esbuild/linux-ia32@0.21.5': optional: true - '@esbuild/linux-loong64@0.17.19': + '@esbuild/linux-loong64@0.21.5': optional: true - '@esbuild/linux-mips64el@0.17.19': + '@esbuild/linux-mips64el@0.21.5': optional: true - '@esbuild/linux-ppc64@0.17.19': + '@esbuild/linux-ppc64@0.21.5': optional: true - '@esbuild/linux-riscv64@0.17.19': + '@esbuild/linux-riscv64@0.21.5': optional: true - '@esbuild/linux-s390x@0.17.19': + '@esbuild/linux-s390x@0.21.5': optional: true - '@esbuild/linux-x64@0.17.19': + '@esbuild/linux-x64@0.21.5': optional: true - '@esbuild/netbsd-x64@0.17.19': + '@esbuild/netbsd-x64@0.21.5': optional: true - '@esbuild/openbsd-x64@0.17.19': + '@esbuild/openbsd-x64@0.21.5': optional: true - '@esbuild/sunos-x64@0.17.19': + '@esbuild/sunos-x64@0.21.5': optional: true - '@esbuild/win32-arm64@0.17.19': + '@esbuild/win32-arm64@0.21.5': optional: true - '@esbuild/win32-ia32@0.17.19': + '@esbuild/win32-ia32@0.21.5': optional: true - '@esbuild/win32-x64@0.17.19': + '@esbuild/win32-x64@0.21.5': optional: true '@eslint-community/eslint-utils@4.4.0(eslint@8.54.0)': @@ -2312,8 +2349,6 @@ snapshots: '@jridgewell/set-array@1.2.1': {} - '@jridgewell/sourcemap-codec@1.4.15': {} - '@jridgewell/sourcemap-codec@1.5.0': {} '@jridgewell/trace-mapping@0.3.25': @@ -2405,6 +2440,57 @@ snapshots: '@pnpm/network.ca-file': 1.0.2 config-chain: 1.1.13 + '@rollup/rollup-android-arm-eabi@4.24.1': + optional: true + + '@rollup/rollup-android-arm64@4.24.1': + optional: true + + '@rollup/rollup-darwin-arm64@4.24.1': + optional: true + + '@rollup/rollup-darwin-x64@4.24.1': + optional: true + + '@rollup/rollup-freebsd-x64@4.24.1': + optional: true + + '@rollup/rollup-linux-arm-gnueabihf@4.24.1': + optional: true + + '@rollup/rollup-linux-arm-musleabihf@4.24.1': + optional: true + + '@rollup/rollup-linux-arm64-gnu@4.24.1': + optional: true + + '@rollup/rollup-linux-arm64-musl@4.24.1': + optional: true + + '@rollup/rollup-linux-powerpc64le-gnu@4.24.1': + optional: true + + '@rollup/rollup-linux-riscv64-gnu@4.24.1': + optional: true + + '@rollup/rollup-linux-s390x-gnu@4.24.1': + optional: true + + '@rollup/rollup-linux-x64-gnu@4.24.1': + optional: true + + '@rollup/rollup-linux-x64-musl@4.24.1': + optional: true + + '@rollup/rollup-win32-arm64-msvc@4.24.1': + optional: true + + '@rollup/rollup-win32-ia32-msvc@4.24.1': + optional: true + + '@rollup/rollup-win32-x64-msvc@4.24.1': + optional: true + '@semantic-release/commit-analyzer@11.1.0(semantic-release@22.0.8(typescript@5.0.4))': dependencies: conventional-changelog-angular: 7.0.0 @@ -2479,13 +2565,7 @@ snapshots: '@sindresorhus/merge-streams@1.0.0': {} - '@types/chai-subset@1.3.3': - dependencies: - '@types/chai': 4.3.5 - - '@types/chai@4.3.5': {} - - '@types/estree@1.0.5': {} + '@types/estree@1.0.6': {} '@types/json-schema@7.0.15': {} @@ -2588,34 +2668,45 @@ snapshots: '@ungap/structured-clone@1.2.0': {} - '@vitest/expect@0.31.1': + '@vitest/expect@2.1.3': + dependencies: + '@vitest/spy': 2.1.3 + '@vitest/utils': 2.1.3 + chai: 5.1.2 + tinyrainbow: 1.2.0 + + '@vitest/mocker@2.1.3(@vitest/spy@2.1.3)(vite@5.4.10(@types/node@20.2.5))': dependencies: - '@vitest/spy': 0.31.1 - '@vitest/utils': 0.31.1 - chai: 4.3.7 + '@vitest/spy': 2.1.3 + estree-walker: 3.0.3 + magic-string: 0.30.12 + optionalDependencies: + vite: 5.4.10(@types/node@20.2.5) - '@vitest/runner@0.31.1': + '@vitest/pretty-format@2.1.3': dependencies: - '@vitest/utils': 0.31.1 - concordance: 5.0.4 - p-limit: 4.0.0 - pathe: 1.1.0 + tinyrainbow: 1.2.0 - '@vitest/snapshot@0.31.1': + '@vitest/runner@2.1.3': dependencies: - magic-string: 0.30.0 - pathe: 1.1.0 - pretty-format: 27.5.1 + '@vitest/utils': 2.1.3 + pathe: 1.1.2 - '@vitest/spy@0.31.1': + '@vitest/snapshot@2.1.3': dependencies: - tinyspy: 2.1.0 + '@vitest/pretty-format': 2.1.3 + magic-string: 0.30.12 + pathe: 1.1.2 - '@vitest/utils@0.31.1': + '@vitest/spy@2.1.3': dependencies: - concordance: 5.0.4 - loupe: 2.3.6 - pretty-format: 27.5.1 + tinyspy: 3.0.2 + + '@vitest/utils@2.1.3': + dependencies: + '@vitest/pretty-format': 2.1.3 + loupe: 3.1.2 + tinyrainbow: 1.2.0 JSONStream@1.3.5: dependencies: @@ -2630,14 +2721,10 @@ snapshots: dependencies: acorn: 8.13.0 - acorn-walk@8.2.0: {} - acorn@8.11.2: {} acorn@8.13.0: {} - acorn@8.8.2: {} - agent-base@7.1.0: dependencies: debug: 4.3.4 @@ -2681,8 +2768,6 @@ snapshots: dependencies: color-convert: 2.0.1 - ansi-styles@5.2.0: {} - ansi-styles@6.2.1: {} ansicolors@0.3.2: {} @@ -2697,7 +2782,7 @@ snapshots: array-union@2.1.0: {} - assertion-error@1.1.0: {} + assertion-error@2.0.1: {} astring@1.8.5: {} @@ -2709,8 +2794,6 @@ snapshots: before-after-hook@2.2.3: {} - blueimp-md5@2.19.0: {} - bottleneck@2.19.5: {} brace-expansion@1.1.11: @@ -2731,15 +2814,13 @@ snapshots: ansicolors: 0.3.2 redeyed: 2.1.1 - chai@4.3.7: + chai@5.1.2: dependencies: - assertion-error: 1.1.0 - check-error: 1.0.2 - deep-eql: 4.1.3 - get-func-name: 2.0.0 - loupe: 2.3.6 - pathval: 1.1.1 - type-detect: 4.0.8 + assertion-error: 2.0.1 + check-error: 2.1.1 + deep-eql: 5.0.2 + loupe: 3.1.2 + pathval: 2.0.0 chalk@2.4.2: dependencies: @@ -2756,7 +2837,7 @@ snapshots: char-regex@1.0.2: {} - check-error@1.0.2: {} + check-error@2.1.1: {} clean-stack@4.2.0: dependencies: @@ -2814,17 +2895,6 @@ snapshots: concat-map@0.0.1: {} - concordance@5.0.4: - dependencies: - date-time: 3.1.0 - esutils: 2.0.3 - fast-diff: 1.3.0 - js-string-escape: 1.0.1 - lodash: 4.17.21 - md5-hex: 3.0.1 - semver: 7.5.1 - well-known-symbols: 2.0.0 - config-chain@1.1.13: dependencies: ini: 1.3.8 @@ -2881,17 +2951,15 @@ snapshots: dependencies: type-fest: 1.4.0 - date-time@3.1.0: - dependencies: - time-zone: 1.0.0 - debug@4.3.4: dependencies: ms: 2.1.2 - deep-eql@4.1.3: + debug@4.3.7: dependencies: - type-detect: 4.0.8 + ms: 2.1.3 + + deep-eql@5.0.2: {} deep-extend@0.6.0: {} @@ -2932,30 +3000,31 @@ snapshots: dependencies: is-arrayish: 0.2.1 - esbuild@0.17.19: + esbuild@0.21.5: optionalDependencies: - '@esbuild/android-arm': 0.17.19 - '@esbuild/android-arm64': 0.17.19 - '@esbuild/android-x64': 0.17.19 - '@esbuild/darwin-arm64': 0.17.19 - '@esbuild/darwin-x64': 0.17.19 - '@esbuild/freebsd-arm64': 0.17.19 - '@esbuild/freebsd-x64': 0.17.19 - '@esbuild/linux-arm': 0.17.19 - '@esbuild/linux-arm64': 0.17.19 - '@esbuild/linux-ia32': 0.17.19 - '@esbuild/linux-loong64': 0.17.19 - '@esbuild/linux-mips64el': 0.17.19 - '@esbuild/linux-ppc64': 0.17.19 - '@esbuild/linux-riscv64': 0.17.19 - '@esbuild/linux-s390x': 0.17.19 - '@esbuild/linux-x64': 0.17.19 - '@esbuild/netbsd-x64': 0.17.19 - '@esbuild/openbsd-x64': 0.17.19 - '@esbuild/sunos-x64': 0.17.19 - '@esbuild/win32-arm64': 0.17.19 - '@esbuild/win32-ia32': 0.17.19 - '@esbuild/win32-x64': 0.17.19 + '@esbuild/aix-ppc64': 0.21.5 + '@esbuild/android-arm': 0.21.5 + '@esbuild/android-arm64': 0.21.5 + '@esbuild/android-x64': 0.21.5 + '@esbuild/darwin-arm64': 0.21.5 + '@esbuild/darwin-x64': 0.21.5 + '@esbuild/freebsd-arm64': 0.21.5 + '@esbuild/freebsd-x64': 0.21.5 + '@esbuild/linux-arm': 0.21.5 + '@esbuild/linux-arm64': 0.21.5 + '@esbuild/linux-ia32': 0.21.5 + '@esbuild/linux-loong64': 0.21.5 + '@esbuild/linux-mips64el': 0.21.5 + '@esbuild/linux-ppc64': 0.21.5 + '@esbuild/linux-riscv64': 0.21.5 + '@esbuild/linux-s390x': 0.21.5 + '@esbuild/linux-x64': 0.21.5 + '@esbuild/netbsd-x64': 0.21.5 + '@esbuild/openbsd-x64': 0.21.5 + '@esbuild/sunos-x64': 0.21.5 + '@esbuild/win32-arm64': 0.21.5 + '@esbuild/win32-ia32': 0.21.5 + '@esbuild/win32-x64': 0.21.5 escalade@3.1.1: {} @@ -3045,7 +3114,7 @@ snapshots: esrap@1.2.2: dependencies: '@jridgewell/sourcemap-codec': 1.5.0 - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 esrecurse@4.3.0: dependencies: @@ -3055,7 +3124,7 @@ snapshots: estree-walker@3.0.3: dependencies: - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 esutils@2.0.3: {} @@ -3075,8 +3144,6 @@ snapshots: fast-deep-equal@3.1.3: {} - fast-diff@1.3.0: {} - fast-glob@3.3.2: dependencies: '@nodelib/fs.stat': 2.0.5 @@ -3151,15 +3218,13 @@ snapshots: fs.realpath@1.0.0: {} - fsevents@2.3.2: + fsevents@2.3.3: optional: true function-bind@1.1.2: {} get-caller-file@2.0.5: {} - get-func-name@2.0.0: {} - get-stream@6.0.1: {} get-stream@7.0.1: {} @@ -3321,7 +3386,7 @@ snapshots: is-reference@3.0.2: dependencies: - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 is-stream@3.0.0: {} @@ -3345,8 +3410,6 @@ snapshots: java-properties@1.0.2: {} - js-string-escape@1.0.1: {} - js-tokens@4.0.0: {} js-yaml@4.1.0: @@ -3365,8 +3428,6 @@ snapshots: json-stringify-safe@5.0.1: {} - jsonc-parser@3.2.0: {} - jsonfile@6.1.0: dependencies: universalify: 2.0.0 @@ -3419,8 +3480,6 @@ snapshots: pify: 3.0.0 strip-bom: 3.0.0 - local-pkg@0.4.3: {} - locate-character@3.0.0: {} locate-path@2.0.0: @@ -3456,9 +3515,7 @@ snapshots: strip-ansi: 7.0.1 wrap-ansi: 8.1.0 - loupe@2.3.6: - dependencies: - get-func-name: 2.0.0 + loupe@3.1.2: {} lru-cache@10.1.0: {} @@ -3466,10 +3523,6 @@ snapshots: dependencies: yallist: 4.0.0 - magic-string@0.30.0: - dependencies: - '@jridgewell/sourcemap-codec': 1.4.15 - magic-string@0.30.12: dependencies: '@jridgewell/sourcemap-codec': 1.5.0 @@ -3486,10 +3539,6 @@ snapshots: marked@9.1.6: {} - md5-hex@3.0.1: - dependencies: - blueimp-md5: 2.19.0 - meow@12.1.1: {} merge-stream@2.0.0: {} @@ -3513,16 +3562,11 @@ snapshots: minimist@1.2.8: {} - mlly@1.3.0: - dependencies: - acorn: 8.8.2 - pathe: 1.1.0 - pkg-types: 1.0.3 - ufo: 1.1.2 - ms@2.1.2: {} - nanoid@3.3.6: {} + ms@2.1.3: {} + + nanoid@3.3.7: {} natural-compare@1.4.0: {} @@ -3589,10 +3633,6 @@ snapshots: dependencies: yocto-queue: 0.1.0 - p-limit@4.0.0: - dependencies: - yocto-queue: 1.0.0 - p-locate@2.0.0: dependencies: p-limit: 1.3.0 @@ -3649,11 +3689,11 @@ snapshots: path-type@5.0.0: {} - pathe@1.1.0: {} + pathe@1.1.2: {} - pathval@1.1.1: {} + pathval@2.0.0: {} - picocolors@1.0.0: {} + picocolors@1.1.1: {} picomatch@2.3.1: {} @@ -3666,17 +3706,11 @@ snapshots: find-up: 2.1.0 load-json-file: 4.0.0 - pkg-types@1.0.3: - dependencies: - jsonc-parser: 3.2.0 - mlly: 1.3.0 - pathe: 1.1.0 - - postcss@8.4.23: + postcss@8.4.47: dependencies: - nanoid: 3.3.6 - picocolors: 1.0.0 - source-map-js: 1.0.2 + nanoid: 3.3.7 + picocolors: 1.1.1 + source-map-js: 1.2.1 prelude-ls@1.2.1: {} @@ -3699,12 +3733,6 @@ snapshots: prettier@3.1.0: {} - pretty-format@27.5.1: - dependencies: - ansi-regex: 5.0.1 - ansi-styles: 5.2.0 - react-is: 17.0.2 - process-nextick-args@2.0.1: {} proto-list@1.2.4: {} @@ -3720,8 +3748,6 @@ snapshots: minimist: 1.2.8 strip-json-comments: 2.0.1 - react-is@17.0.2: {} - read-pkg-up@11.0.0: dependencies: find-up-simple: 1.0.0 @@ -3773,9 +3799,28 @@ snapshots: dependencies: glob: 7.2.3 - rollup@3.23.0: + rollup@4.24.1: + dependencies: + '@types/estree': 1.0.6 optionalDependencies: - fsevents: 2.3.2 + '@rollup/rollup-android-arm-eabi': 4.24.1 + '@rollup/rollup-android-arm64': 4.24.1 + '@rollup/rollup-darwin-arm64': 4.24.1 + '@rollup/rollup-darwin-x64': 4.24.1 + '@rollup/rollup-freebsd-x64': 4.24.1 + '@rollup/rollup-linux-arm-gnueabihf': 4.24.1 + '@rollup/rollup-linux-arm-musleabihf': 4.24.1 + '@rollup/rollup-linux-arm64-gnu': 4.24.1 + '@rollup/rollup-linux-arm64-musl': 4.24.1 + '@rollup/rollup-linux-powerpc64le-gnu': 4.24.1 + '@rollup/rollup-linux-riscv64-gnu': 4.24.1 + '@rollup/rollup-linux-s390x-gnu': 4.24.1 + '@rollup/rollup-linux-x64-gnu': 4.24.1 + '@rollup/rollup-linux-x64-musl': 4.24.1 + '@rollup/rollup-win32-arm64-msvc': 4.24.1 + '@rollup/rollup-win32-ia32-msvc': 4.24.1 + '@rollup/rollup-win32-x64-msvc': 4.24.1 + fsevents: 2.3.3 run-parallel@1.2.0: dependencies: @@ -3867,7 +3912,7 @@ snapshots: sort-order@1.0.1: {} - source-map-js@1.0.2: {} + source-map-js@1.2.1: {} source-map@0.6.1: {} @@ -3895,7 +3940,7 @@ snapshots: stackback@0.0.2: {} - std-env@3.3.3: {} + std-env@3.7.0: {} stream-combiner2@1.1.1: dependencies: @@ -3936,10 +3981,6 @@ snapshots: strip-json-comments@3.1.1: {} - strip-literal@1.0.1: - dependencies: - acorn: 8.8.2 - supports-color@5.5.0: dependencies: has-flag: 3.0.0 @@ -3957,7 +3998,7 @@ snapshots: dependencies: '@ampproject/remapping': 2.3.0 '@jridgewell/sourcemap-codec': 1.5.0 - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 acorn: 8.13.0 acorn-typescript: 1.4.13(acorn@8.13.0) aria-query: 5.3.2 @@ -3989,13 +4030,15 @@ snapshots: through@2.3.8: {} - time-zone@1.0.0: {} + tinybench@2.9.0: {} + + tinyexec@0.3.1: {} - tinybench@2.5.0: {} + tinypool@1.0.1: {} - tinypool@0.5.0: {} + tinyrainbow@1.2.0: {} - tinyspy@2.1.0: {} + tinyspy@3.0.2: {} to-regex-range@5.0.1: dependencies: @@ -4011,8 +4054,6 @@ snapshots: dependencies: prelude-ls: 1.2.1 - type-detect@4.0.8: {} - type-fest@0.20.2: {} type-fest@1.4.0: {} @@ -4025,8 +4066,6 @@ snapshots: typescript@5.0.4: {} - ufo@1.1.2: {} - uglify-js@3.17.4: optional: true @@ -4055,74 +4094,71 @@ snapshots: spdx-correct: 3.2.0 spdx-expression-parse: 3.0.1 - vite-node@0.31.1(@types/node@20.2.5): + vite-node@2.1.3(@types/node@20.2.5): dependencies: cac: 6.7.14 - debug: 4.3.4 - mlly: 1.3.0 - pathe: 1.1.0 - picocolors: 1.0.0 - vite: 4.3.9(@types/node@20.2.5) + debug: 4.3.7 + pathe: 1.1.2 + vite: 5.4.10(@types/node@20.2.5) transitivePeerDependencies: - '@types/node' - less + - lightningcss - sass + - sass-embedded - stylus - sugarss - supports-color - terser - vite@4.3.9(@types/node@20.2.5): + vite@5.4.10(@types/node@20.2.5): dependencies: - esbuild: 0.17.19 - postcss: 8.4.23 - rollup: 3.23.0 + esbuild: 0.21.5 + postcss: 8.4.47 + rollup: 4.24.1 optionalDependencies: '@types/node': 20.2.5 - fsevents: 2.3.2 - - vitest@0.31.1: - dependencies: - '@types/chai': 4.3.5 - '@types/chai-subset': 1.3.3 + fsevents: 2.3.3 + + vitest@2.1.3(@types/node@20.2.5): + dependencies: + '@vitest/expect': 2.1.3 + '@vitest/mocker': 2.1.3(@vitest/spy@2.1.3)(vite@5.4.10(@types/node@20.2.5)) + '@vitest/pretty-format': 2.1.3 + '@vitest/runner': 2.1.3 + '@vitest/snapshot': 2.1.3 + '@vitest/spy': 2.1.3 + '@vitest/utils': 2.1.3 + chai: 5.1.2 + debug: 4.3.7 + magic-string: 0.30.12 + pathe: 1.1.2 + std-env: 3.7.0 + tinybench: 2.9.0 + tinyexec: 0.3.1 + tinypool: 1.0.1 + tinyrainbow: 1.2.0 + vite: 5.4.10(@types/node@20.2.5) + vite-node: 2.1.3(@types/node@20.2.5) + why-is-node-running: 2.3.0 + optionalDependencies: '@types/node': 20.2.5 - '@vitest/expect': 0.31.1 - '@vitest/runner': 0.31.1 - '@vitest/snapshot': 0.31.1 - '@vitest/spy': 0.31.1 - '@vitest/utils': 0.31.1 - acorn: 8.8.2 - acorn-walk: 8.2.0 - cac: 6.7.14 - chai: 4.3.7 - concordance: 5.0.4 - debug: 4.3.4 - local-pkg: 0.4.3 - magic-string: 0.30.0 - pathe: 1.1.0 - picocolors: 1.0.0 - std-env: 3.3.3 - strip-literal: 1.0.1 - tinybench: 2.5.0 - tinypool: 0.5.0 - vite: 4.3.9(@types/node@20.2.5) - vite-node: 0.31.1(@types/node@20.2.5) - why-is-node-running: 2.2.2 transitivePeerDependencies: - less + - lightningcss + - msw - sass + - sass-embedded - stylus - sugarss - supports-color - terser - well-known-symbols@2.0.0: {} - which@2.0.2: dependencies: isexe: 2.0.0 - why-is-node-running@2.2.2: + why-is-node-running@2.3.0: dependencies: siginfo: 2.0.0 stackback: 0.0.2 @@ -4167,6 +4203,4 @@ snapshots: yocto-queue@0.1.0: {} - yocto-queue@1.0.0: {} - zimmerframe@1.1.2: {} diff --git a/src/print-html.ts b/src/print-html.ts index ca4a851..38413cb 100644 --- a/src/print-html.ts +++ b/src/print-html.ts @@ -5,15 +5,32 @@ import type { TemplateNode, AST, SvelteNode } from 'svelte/src/compiler/types/te import type { BaseElement, LegacyAttribute, + LegacyCatchBlock, LegacyComment, LegacyMustacheTag, + LegacyPendingBlock, + LegacyRawMustacheTag, LegacySpread, - LegacySvelteNode + LegacySvelteNode, + LegacyThenBlock } from 'svelte/src/compiler/types/legacy-nodes.js'; import { DefaultPrinterIdentOptions, PrinterIdentOptions } from './index.js'; +import { Expression } from 'estree'; export type Write = (text: string) => void; +declare module 'svelte/src/compiler/types/template.js' { + namespace AST { + interface IfBlock { + expression?: Expression; + } + + interface ConstTag { + expression?: Expression; + } + } +} + export interface PrinterContext { _this: any; write: Write; @@ -67,55 +84,17 @@ class ElementPrinter extends BaseHtmlNodePrinter { const attributes = elementNode.attributes ?.map(attribute => { - let attributeName = ''; - - switch (attribute.type) { - case 'EventHandler': - attributeName = 'on:'; - break; - case 'Binding': - attributeName = 'bind:'; - break; - case 'Class': - attributeName = 'class:'; - break; - case 'StyleDirective': - attributeName = 'style:'; - break; - case 'Action': - attributeName = 'use:'; - break; - case 'Transition': - if (attribute.intro === attribute.outro) { - attributeName = 'transition:'; - } else if (attribute.intro && !attribute.outro) { - attributeName = 'in:'; - } else if (!attribute.intro && attribute.outro) { - attributeName = 'out:'; - } - break; - - case 'Animation': - attributeName = 'animate:'; - break; - - case 'Let': - attributeName = 'let:'; - break; - } - if (attribute.type === 'Attribute') { if (attribute.value === true) { return attribute.name; } const [value] = attribute.value; - attributeName += attribute.name; if (value.type === 'AttributeShorthand') { return this.attributeValueToString(attribute, context); } - return `${attributeName}=${this.attributeValueToString(attribute, context)}`; + return `${attribute.name}=${this.attributeValueToString(attribute, context)}`; } if (attribute.type === 'Spread') { @@ -157,6 +136,47 @@ class ElementPrinter extends BaseHtmlNodePrinter { return `style:${attribute.name}={${generate(value.expression, context.indent)}}`; } } + + if (attribute.type === 'Action') { + if (attribute.expression) { + return `use:${attribute.name}={${generate(attribute.expression, context.indent)}}`; + } + return `use:${attribute.name}`; + } + + if (attribute.type === 'Transition') { + if (attribute.intro === attribute.outro) { + if (attribute.expression) { + return `transition:${attribute.name}={${generate(attribute.expression, context.indent)}}`; + } + return `transition:${attribute.name}`; + } + + if (attribute.intro) { + if (attribute.expression) { + return `in:${attribute.name}={${generate(attribute.expression, context.indent)}}`; + } + return `in:${attribute.name}`; + } + + if (attribute.outro) { + if (attribute.expression) { + return `out:${attribute.name}={${generate(attribute.expression, context.indent)}}`; + } + return `out:${attribute.name}`; + } + } + + if (attribute.type === 'Animation') { + if (attribute.expression) { + return `animate:${attribute.name}={${generate(attribute.expression, context.indent)}}`; + } + return `animate:${attribute.name}`; + } + + if (attribute.type === 'Let') { + return `let:${attribute.name}`; + } }) .join(' ') ?? ''; @@ -237,13 +257,13 @@ class CommentPrinter extends BaseHtmlNodePrinter { } class IfBlockPrinter extends BaseHtmlNodePrinter { - enter(node: TemplateNode, parent: TemplateNode, context: PrinterContext) { + enter(node: AST.IfBlock, __: SvelteNode, context: PrinterContext) { const { write } = context; if (!node.elseif) { - write(`{#if ${generate(node.expression, context.indent)}}`); + write(`{#if ${generate(node.test || node.expression, context.indent)}}`); } else { - write(` if ${generate(node.expression, context.indent)}}`); + write(` if ${generate(node.test || node.expression, context.indent)}}`); } write(context.indent.lineEnd); @@ -253,7 +273,7 @@ class IfBlockPrinter extends BaseHtmlNodePrinter { expression: undefined }); } - leave(node: TemplateNode, parent: TemplateNode, context: PrinterContext) { + leave(node: AST.IfBlock, __: SvelteNode, context: PrinterContext) { const { write } = context; if (!node.elseif) { write('{/if}'); @@ -264,7 +284,7 @@ class IfBlockPrinter extends BaseHtmlNodePrinter { } class ElseBlockPrinter extends BaseHtmlNodePrinter { - enter(node: TemplateNode, parent: TemplateNode, context: PrinterContext) { + enter(node: any, parent: TemplateNode, context: PrinterContext) { const { write } = context; const [child] = node.children ?? []; @@ -279,7 +299,7 @@ class ElseBlockPrinter extends BaseHtmlNodePrinter { } class EachBlockPrinter extends BaseHtmlNodePrinter { - enter(node: TemplateNode, parent: TemplateNode, context: PrinterContext) { + enter(node: AST.EachBlock, parent: TemplateNode, context: PrinterContext) { const { write } = context; write(`{#each ${generate(node.expression, context.indent)}`); @@ -312,9 +332,13 @@ class EachBlockPrinter extends BaseHtmlNodePrinter { } class AwaitBlockPrinter extends BaseHtmlNodePrinter { - enter(node: TemplateNode, parent: TemplateNode, context: PrinterContext) { + enter(node: AST.AwaitBlock, parent: TemplateNode, context: PrinterContext) { const { write } = context; - write(`{#await ${generate(node.expression, context.indent)}${node.pending.skip === false ? '}' : ''}`); + write( + `{#await ${generate(node.expression, context.indent)}${ + (node.pending as unknown as LegacyPendingBlock).skip === false ? '}' : '' + }` + ); context._this.replace({ ...node, expression: undefined @@ -332,9 +356,9 @@ class PendingBlockPrinter extends BaseHtmlNodePrinter { } class ThenBlockPrinter extends BaseHtmlNodePrinter { - enter(node: TemplateNode, parent: TemplateNode, context: PrinterContext) { + enter(node: LegacyThenBlock, parent: AST.AwaitBlock, context: PrinterContext) { const { write } = context; - if (parent.pending.skip === true) { + if ((parent.pending as unknown as LegacyPendingBlock).skip === true) { write(' then'); } else { write('{:then'); @@ -349,9 +373,9 @@ class ThenBlockPrinter extends BaseHtmlNodePrinter { } class CatchBlockPrinter extends BaseHtmlNodePrinter { - enter(node: TemplateNode, parent: TemplateNode, context: PrinterContext) { + enter(node: LegacyCatchBlock, parent: AST.AwaitBlock, context: PrinterContext) { const { write } = context; - if (parent.pending.skip === true) { + if ((parent.pending as unknown as LegacyPendingBlock).skip === true) { write(' catch'); } else { write('{:catch'); @@ -366,7 +390,7 @@ class CatchBlockPrinter extends BaseHtmlNodePrinter { } class KeyBlockPrinter extends BaseHtmlNodePrinter { - enter(node: TemplateNode, parent: TemplateNode, context: PrinterContext) { + enter(node: AST.KeyBlock, parent: TemplateNode, context: PrinterContext) { const { write } = context; write(`{#key ${generate(node.expression, context.indent)}}`); } @@ -377,7 +401,7 @@ class KeyBlockPrinter extends BaseHtmlNodePrinter { } class RawMustacheTagPrinter extends BaseHtmlNodePrinter { - enter(node: TemplateNode, parent: TemplateNode, context: PrinterContext) { + enter(node: LegacyRawMustacheTag, parent: TemplateNode, context: PrinterContext) { const { write } = context; write(`{@html ${generate(node.expression, context.indent)}}`); context._this.replace({ @@ -389,7 +413,7 @@ class RawMustacheTagPrinter extends BaseHtmlNodePrinter { } class DebugTagPrinter extends BaseHtmlNodePrinter { - enter(node: TemplateNode, parent: TemplateNode, context: PrinterContext) { + enter(node: AST.DebugTag, parent: TemplateNode, context: PrinterContext) { const { write } = context; write(`{@debug ${node.identifiers.map((id: any) => generate(id, context.indent)).join(', ')}}`); } @@ -397,9 +421,9 @@ class DebugTagPrinter extends BaseHtmlNodePrinter { } class ConstTagPrinter extends BaseHtmlNodePrinter { - enter(node: TemplateNode, parent: TemplateNode, context: PrinterContext) { + enter(node: AST.ConstTag, parent: TemplateNode, context: PrinterContext) { const { write } = context; - write(`{@const ${generate(node.expression, context.indent)}}`); + write(`{@const ${generate(node.expression!, context.indent)}}`); context._this.replace({ ...node, expression: undefined @@ -437,19 +461,19 @@ const PRINTERS: PrinterCollection = { StyleDirective: NoOp, Action: NoOp, Transition: NoOp, - Animation: NoOp + Animation: NoOp, // Comment: new CommentPrinter(), - // IfBlock: new IfBlockPrinter(), - // ElseBlock: new ElseBlockPrinter(), - // EachBlock: new EachBlockPrinter(), - // AwaitBlock: new AwaitBlockPrinter(), - // PendingBlock: new PendingBlockPrinter(), - // ThenBlock: new ThenBlockPrinter(), - // CatchBlock: new CatchBlockPrinter(), - // KeyBlock: new KeyBlockPrinter(), - // RawMustacheTag: new RawMustacheTagPrinter(), - // DebugTag: new DebugTagPrinter(), - // ConstTag: new ConstTagPrinter() + IfBlock: new IfBlockPrinter(), + ElseBlock: new ElseBlockPrinter(), + EachBlock: new EachBlockPrinter(), + AwaitBlock: new AwaitBlockPrinter(), + PendingBlock: new PendingBlockPrinter(), + ThenBlock: new ThenBlockPrinter(), + CatchBlock: new CatchBlockPrinter(), + KeyBlock: new KeyBlockPrinter(), + RawMustacheTag: new RawMustacheTagPrinter(), + DebugTag: new DebugTagPrinter(), + ConstTag: new ConstTagPrinter() }; /** diff --git a/src/tests/print-html.test.ts b/src/tests/print-html.test.ts index 216f292..daaa52a 100644 --- a/src/tests/print-html.test.ts +++ b/src/tests/print-html.test.ts @@ -61,99 +61,99 @@ describe('Element directives', () => { testHtmlPrinter('
'); }); - // test('use:action', () => { - // testHtmlPrinter('
'); - // testHtmlPrinter('
'); - // }); - - // test('transition:fn', () => { - // testHtmlPrinter('
'); - // testHtmlPrinter('
'); - // }); - - // test('in/out:fn', () => { - // testHtmlPrinter('
flies in, fades out
'); - // testHtmlPrinter('
flies in, fades out
'); - // }); - - // test('animate:fn', () => { - // testHtmlPrinter('
  • {item}
  • '); - // testHtmlPrinter('
    {item}
    '); - // }); - - // test('let:variable', () => { - // testHtmlPrinter(''); - // }); + test('use:action', () => { + testHtmlPrinter('
    '); + testHtmlPrinter('
    '); + }); + + test('transition:fn', () => { + testHtmlPrinter('
    '); + testHtmlPrinter('
    '); + }); + + test('in/out:fn', () => { + testHtmlPrinter('
    flies in, fades out
    '); + testHtmlPrinter('
    flies in, fades out
    '); + }); + + test('animate:fn', () => { + testHtmlPrinter('
  • {item}
  • '); + testHtmlPrinter('
    {item}
    '); + }); + + test('let:variable', () => { + testHtmlPrinter(''); + }); }); -// describe('Template', () => { -// test('{#if ...}', () => { -// testHtmlPrinter('{#if answer === 42}

    what was the question?

    {/if}'); -// }); +describe('Template', () => { + test('{#if ...}', () => { + testHtmlPrinter('{#if answer === 42}

    what was the question?

    {/if}'); + }); -// test('{#if expression}...{:else}...{/if}', () => { -// testHtmlPrinter("{#if answer === 42}

    what was the question?

    {:else}

    We don't know

    {/if}"); -// }); + test('{#if expression}...{:else}...{/if}', () => { + testHtmlPrinter("{#if answer === 42}

    what was the question?

    {:else}

    We don't know

    {/if}"); + }); -// test('{#if expression}...{:else if}...{/if}', () => { -// testHtmlPrinter( -// "{#if answer === 42}

    what was the question?

    {:else if answer === 43}

    We don't know

    {/if}" -// ); -// }); + test('{#if expression}...{:else if}...{/if}', () => { + testHtmlPrinter( + "{#if answer === 42}

    what was the question?

    {:else if answer === 43}

    We don't know

    {/if}" + ); + }); -// test('{#if expression}...{:else}...{/if}', () => { -// testHtmlPrinter("{#if answer === 42}

    what was the question?

    {:else}

    We don't know

    {/if}"); -// }); + test('{#if expression}...{:else}...{/if}', () => { + testHtmlPrinter("{#if answer === 42}

    what was the question?

    {:else}

    We don't know

    {/if}"); + }); -// test('{#if expression}...{:else if expression}...{/if}', () => { -// testHtmlPrinter('{#if a > 100}

    a

    {:else if a > 200}

    b

    {:else}

    c

    {/if}'); -// }); + test('{#if expression}...{:else if expression}...{/if}', () => { + testHtmlPrinter('{#if a > 100}

    a

    {:else if a > 200}

    b

    {:else}

    c

    {/if}'); + }); -// test('{#if}...{:else if expression}...{:else if expression}...{/if}', () => { -// testHtmlPrinter('{#if a > 100}

    a

    {:else if a > 200}

    b

    {:else if a > 300}

    c

    {/if}'); -// }); + test('{#if}...{:else if expression}...{:else if expression}...{/if}', () => { + testHtmlPrinter('{#if a > 100}

    a

    {:else if a > 200}

    b

    {:else if a > 300}

    c

    {/if}'); + }); -// test('{#if expression}...{:else if expression}...{:else if expression}...{:else}...{/if}', () => { -// testHtmlPrinter('{#if a > 100}

    a

    {:else if a > 200}

    b

    {:else if a > 300}

    c

    {:else}

    d

    {/if}'); -// }); + test('{#if expression}...{:else if expression}...{:else if expression}...{:else}...{/if}', () => { + testHtmlPrinter('{#if a > 100}

    a

    {:else if a > 200}

    b

    {:else if a > 300}

    c

    {:else}

    d

    {/if}'); + }); -// test('{#each}', () => { -// testHtmlPrinter('{#each items as item}
  • {item.name} x {item.qty}
  • {/each}'); -// testHtmlPrinter('{#each items as item (item.id)}
  • {item.name} x {item.qty}
  • {/each}'); -// testHtmlPrinter('{#each items as item, i (item.id)}
  • {i + 1}: {item.name} x {item.qty}
  • {/each}'); -// testHtmlPrinter('{#each items as {id, name, qty}, i (id)}
  • {i + 1}: {name} x {qty}
  • {/each}'); -// testHtmlPrinter('{#each objects as {id, ...rest}}
  • {id}
  • {/each}'); -// }); -// }); + test('{#each}', () => { + testHtmlPrinter('{#each items as item}
  • {item.name} x {item.qty}
  • {/each}'); + testHtmlPrinter('{#each items as item (item.id)}
  • {item.name} x {item.qty}
  • {/each}'); + testHtmlPrinter('{#each items as item, i (item.id)}
  • {i + 1}: {item.name} x {item.qty}
  • {/each}'); + testHtmlPrinter('{#each items as {id, name, qty}, i (id)}
  • {i + 1}: {name} x {qty}
  • {/each}'); + testHtmlPrinter('{#each objects as {id, ...rest}}
  • {id}
  • {/each}'); + }); -// test('{#await}', () => { -// testHtmlPrinter( -// '{#await promise}

    waiting for the promise to resolve...

    {:then value}

    The value is {value}

    {:catch error}

    Something went wrong: {error.message}

    {/await}' -// ); -// testHtmlPrinter( -// '{#await promise}

    waiting for the promise to resolve...

    {:then value}

    The value is {value}

    {/await}' -// ); - -// testHtmlPrinter('{#await promise then value}

    The value is {value}

    {/await}'); -// testHtmlPrinter('{#await promise catch error}

    The error is {error}

    {/await}'); -// testHtmlPrinter('{#await item.promise then value}

    {value}

    {/await}'); -// }); + test('{#await}', () => { + testHtmlPrinter( + '{#await promise}

    waiting for the promise to resolve...

    {:then value}

    The value is {value}

    {:catch error}

    Something went wrong: {error.message}

    {/await}' + ); + testHtmlPrinter( + '{#await promise}

    waiting for the promise to resolve...

    {:then value}

    The value is {value}

    {/await}' + ); + + testHtmlPrinter('{#await promise then value}

    The value is {value}

    {/await}'); + testHtmlPrinter('{#await promise catch error}

    The error is {error}

    {/await}'); + testHtmlPrinter('{#await item.promise then value}

    {value}

    {/await}'); + }); -// test('{#key ...}', () => { -// testHtmlPrinter('{#key value}
    {value}
    {/key}'); -// }); + test('{#key ...}', () => { + testHtmlPrinter('{#key value}
    {value}
    {/key}'); + }); -// test('{@html ...}', () => { -// testHtmlPrinter('{@html post.content}'); -// }); + test('{@html ...}', () => { + testHtmlPrinter('{@html post.content}'); + }); -// test('{@debug ...}', () => { -// testHtmlPrinter('{@debug var1, var2}'); -// }); + test('{@debug ...}', () => { + testHtmlPrinter('{@debug var1, var2}'); + }); -// test('{@const ...}', () => { -// testHtmlPrinter('{@const area = box.width * box.height}'); -// }); + test('{@const ...}', () => { + testHtmlPrinter('{@const area = box.width * box.height}'); + }); +}); // describe('Svelte Component', () => { // test('', () => {