From e1dea39e5382ecdd328e3c5eec0ff6b09edd9f36 Mon Sep 17 00:00:00 2001 From: qwqcode Date: Thu, 25 Jul 2024 16:19:26 +0800 Subject: [PATCH] add minimal reproducible example --- pnpm-lock.yaml | 413 ++++++++++++++++++++++++++++++++---- test/lightbox/.gitignore | 24 +++ test/lightbox/index.html | 12 ++ test/lightbox/package.json | 24 +++ test/lightbox/src/main.ts | 73 +++++++ test/lightbox/tsconfig.json | 26 +++ 6 files changed, 527 insertions(+), 45 deletions(-) create mode 100644 test/lightbox/.gitignore create mode 100644 test/lightbox/index.html create mode 100644 test/lightbox/package.json create mode 100644 test/lightbox/src/main.ts create mode 100644 test/lightbox/tsconfig.json diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2213716f9..7003b1125 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -155,7 +155,7 @@ importers: version: 1.76.0 vitepress: specifier: 1.1.4 - version: 1.1.4(@algolia/client-search@4.23.2)(@types/node@20.14.2)(@types/react@18.3.1)(postcss@8.4.38)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.76.0)(search-insights@2.14.0)(terser@5.31.1)(typescript@5.4.5) + version: 1.1.4(@algolia/client-search@4.23.2)(@types/node@20.14.2)(@types/react@18.3.1)(postcss@8.4.39)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.76.0)(search-insights@2.14.0)(terser@5.31.1)(typescript@5.4.5) docs/landing: dependencies: @@ -200,6 +200,37 @@ importers: specifier: 1.12.0 version: 1.12.0 + test/lightbox: + dependencies: + '@artalk/plugin-lightbox': + specifier: workspace:^ + version: link:../../ui/plugin-lightbox + artalk: + specifier: workspace:^ + version: link:../../ui/artalk + fancybox: + specifier: ^3.0.1 + version: 3.0.1 + jquery: + specifier: ^3.7.1 + version: 3.7.1 + lightbox2: + specifier: ^2.11.4 + version: 2.11.4 + lightgallery: + specifier: ^2.7.2 + version: 2.7.2 + photoswipe: + specifier: ^5.4.4 + version: 5.4.4 + devDependencies: + typescript: + specifier: ^5.2.2 + version: 5.4.5 + vite: + specifier: ^5.3.4 + version: 5.3.4(@types/node@20.14.2)(sass@1.77.4)(terser@5.31.1) + test/ssg-test: dependencies: artalk: @@ -211,7 +242,7 @@ importers: devDependencies: vitepress: specifier: 1.0.2 - version: 1.0.2(@algolia/client-search@4.23.2)(@types/node@20.14.2)(@types/react@18.3.1)(postcss@8.4.38)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.77.4)(search-insights@2.14.0)(terser@5.31.1)(typescript@5.4.5) + version: 1.0.2(@algolia/client-search@4.23.2)(@types/node@20.14.2)(@types/react@18.3.1)(postcss@8.4.39)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.77.4)(search-insights@2.14.0)(terser@5.31.1)(typescript@5.4.5) test/vue-test: dependencies: @@ -337,10 +368,10 @@ importers: version: link:../plugin-kit vite-plugin-css-injected-by-js: specifier: ^3.5.1 - version: 3.5.1(vite@5.2.13(@types/node@20.14.2)(sass@1.77.4)(terser@5.31.1)) + version: 3.5.1(vite@5.3.4(@types/node@20.14.2)(sass@1.77.4)(terser@5.31.1)) vite-plugin-solid: specifier: ^2.10.2 - version: 2.10.2(solid-js@1.8.17)(vite@5.2.13(@types/node@20.14.2)(sass@1.77.4)(terser@5.31.1)) + version: 2.10.2(solid-js@1.8.17)(vite@5.3.4(@types/node@20.14.2)(sass@1.77.4)(terser@5.31.1)) ui/plugin-katex: dependencies: @@ -375,7 +406,7 @@ importers: version: 0.1.8(esbuild@0.19.12) tsup: specifier: ^8.0.2 - version: 8.0.2(@microsoft/api-extractor@7.46.2(@types/node@20.14.2))(@swc/core@1.4.17)(postcss@8.4.38)(typescript@5.4.5) + version: 8.0.2(@microsoft/api-extractor@7.46.2(@types/node@20.14.2))(@swc/core@1.4.17)(postcss@8.4.39)(typescript@5.4.5) ui/plugin-lightbox: dependencies: @@ -709,6 +740,12 @@ packages: cpu: [ppc64] os: [aix] + '@esbuild/aix-ppc64@0.21.5': + resolution: {integrity: sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [aix] + '@esbuild/android-arm64@0.19.12': resolution: {integrity: sha512-P0UVNGIienjZv3f5zq0DP3Nt2IE/3plFzuaS96vihvD0Hd6H/q4WXUGpCxD/E8YrSXfNyRPbpTq+T8ZQioSuPA==} engines: {node: '>=12'} @@ -721,6 +758,12 @@ packages: cpu: [arm64] os: [android] + '@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.19.12': resolution: {integrity: sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w==} engines: {node: '>=12'} @@ -733,6 +776,12 @@ packages: cpu: [arm] os: [android] + '@esbuild/android-arm@0.21.5': + resolution: {integrity: sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + '@esbuild/android-x64@0.19.12': resolution: {integrity: sha512-3k7ZoUW6Q6YqhdhIaq/WZ7HwBpnFBlW905Fa4s4qWJyiNOgT1dOqDiVAQFwBH7gBRZr17gLrlFCRzF6jFh7Kew==} engines: {node: '>=12'} @@ -745,6 +794,12 @@ packages: cpu: [x64] os: [android] + '@esbuild/android-x64@0.21.5': + resolution: {integrity: sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + '@esbuild/darwin-arm64@0.19.12': resolution: {integrity: sha512-B6IeSgZgtEzGC42jsI+YYu9Z3HKRxp8ZT3cqhvliEHovq8HSX2YX8lNocDn79gCKJXOSaEot9MVYky7AKjCs8g==} engines: {node: '>=12'} @@ -757,6 +812,12 @@ packages: cpu: [arm64] os: [darwin] + '@esbuild/darwin-arm64@0.21.5': + resolution: {integrity: sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + '@esbuild/darwin-x64@0.19.12': resolution: {integrity: sha512-hKoVkKzFiToTgn+41qGhsUJXFlIjxI/jSYeZf3ugemDYZldIXIxhvwN6erJGlX4t5h417iFuheZ7l+YVn05N3A==} engines: {node: '>=12'} @@ -769,6 +830,12 @@ packages: cpu: [x64] os: [darwin] + '@esbuild/darwin-x64@0.21.5': + resolution: {integrity: sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + '@esbuild/freebsd-arm64@0.19.12': resolution: {integrity: sha512-4aRvFIXmwAcDBw9AueDQ2YnGmz5L6obe5kmPT8Vd+/+x/JMVKCgdcRwH6APrbpNXsPz+K653Qg8HB/oXvXVukA==} engines: {node: '>=12'} @@ -781,6 +848,12 @@ packages: cpu: [arm64] os: [freebsd] + '@esbuild/freebsd-arm64@0.21.5': + resolution: {integrity: sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + '@esbuild/freebsd-x64@0.19.12': resolution: {integrity: sha512-EYoXZ4d8xtBoVN7CEwWY2IN4ho76xjYXqSXMNccFSx2lgqOG/1TBPW0yPx1bJZk94qu3tX0fycJeeQsKovA8gg==} engines: {node: '>=12'} @@ -793,6 +866,12 @@ packages: cpu: [x64] os: [freebsd] + '@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.19.12': resolution: {integrity: sha512-EoTjyYyLuVPfdPLsGVVVC8a0p1BFFvtpQDB/YLEhaXyf/5bczaGeN15QkR+O4S5LeJ92Tqotve7i1jn35qwvdA==} engines: {node: '>=12'} @@ -805,6 +884,12 @@ packages: cpu: [arm64] os: [linux] + '@esbuild/linux-arm64@0.21.5': + resolution: {integrity: sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + '@esbuild/linux-arm@0.19.12': resolution: {integrity: sha512-J5jPms//KhSNv+LO1S1TX1UWp1ucM6N6XuL6ITdKWElCu8wXP72l9MM0zDTzzeikVyqFE6U8YAV9/tFyj0ti+w==} engines: {node: '>=12'} @@ -817,6 +902,12 @@ packages: cpu: [arm] os: [linux] + '@esbuild/linux-arm@0.21.5': + resolution: {integrity: sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + '@esbuild/linux-ia32@0.19.12': resolution: {integrity: sha512-Thsa42rrP1+UIGaWz47uydHSBOgTUnwBwNq59khgIwktK6x60Hivfbux9iNR0eHCHzOLjLMLfUMLCypBkZXMHA==} engines: {node: '>=12'} @@ -829,6 +920,12 @@ packages: cpu: [ia32] os: [linux] + '@esbuild/linux-ia32@0.21.5': + resolution: {integrity: sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + '@esbuild/linux-loong64@0.19.12': resolution: {integrity: sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA==} engines: {node: '>=12'} @@ -841,6 +938,12 @@ packages: cpu: [loong64] os: [linux] + '@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.19.12': resolution: {integrity: sha512-fEnAuj5VGTanfJ07ff0gOA6IPsvrVHLVb6Lyd1g2/ed67oU1eFzL0r9WL7ZzscD+/N6i3dWumGE1Un4f7Amf+w==} engines: {node: '>=12'} @@ -853,6 +956,12 @@ packages: cpu: [mips64el] os: [linux] + '@esbuild/linux-mips64el@0.21.5': + resolution: {integrity: sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + '@esbuild/linux-ppc64@0.19.12': resolution: {integrity: sha512-nYJA2/QPimDQOh1rKWedNOe3Gfc8PabU7HT3iXWtNUbRzXS9+vgB0Fjaqr//XNbd82mCxHzik2qotuI89cfixg==} engines: {node: '>=12'} @@ -865,6 +974,12 @@ packages: cpu: [ppc64] os: [linux] + '@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.19.12': resolution: {integrity: sha512-2MueBrlPQCw5dVJJpQdUYgeqIzDQgw3QtiAHUC4RBz9FXPrskyyU3VI1hw7C0BSKB9OduwSJ79FTCqtGMWqJHg==} engines: {node: '>=12'} @@ -877,6 +992,12 @@ packages: cpu: [riscv64] os: [linux] + '@esbuild/linux-riscv64@0.21.5': + resolution: {integrity: sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + '@esbuild/linux-s390x@0.19.12': resolution: {integrity: sha512-+Pil1Nv3Umes4m3AZKqA2anfhJiVmNCYkPchwFJNEJN5QxmTs1uzyy4TvmDrCRNT2ApwSari7ZIgrPeUx4UZDg==} engines: {node: '>=12'} @@ -889,6 +1010,12 @@ packages: cpu: [s390x] os: [linux] + '@esbuild/linux-s390x@0.21.5': + resolution: {integrity: sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + '@esbuild/linux-x64@0.19.12': resolution: {integrity: sha512-B71g1QpxfwBvNrfyJdVDexenDIt1CiDN1TIXLbhOw0KhJzE78KIFGX6OJ9MrtC0oOqMWf+0xop4qEU8JrJTwCg==} engines: {node: '>=12'} @@ -901,6 +1028,12 @@ packages: cpu: [x64] os: [linux] + '@esbuild/linux-x64@0.21.5': + resolution: {integrity: sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + '@esbuild/netbsd-x64@0.19.12': resolution: {integrity: sha512-3ltjQ7n1owJgFbuC61Oj++XhtzmymoCihNFgT84UAmJnxJfm4sYCiSLTXZtE00VWYpPMYc+ZQmB6xbSdVh0JWA==} engines: {node: '>=12'} @@ -913,6 +1046,12 @@ packages: cpu: [x64] os: [netbsd] + '@esbuild/netbsd-x64@0.21.5': + resolution: {integrity: sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + '@esbuild/openbsd-x64@0.19.12': resolution: {integrity: sha512-RbrfTB9SWsr0kWmb9srfF+L933uMDdu9BIzdA7os2t0TXhCRjrQyCeOt6wVxr79CKD4c+p+YhCj31HBkYcXebw==} engines: {node: '>=12'} @@ -925,6 +1064,12 @@ packages: cpu: [x64] os: [openbsd] + '@esbuild/openbsd-x64@0.21.5': + resolution: {integrity: sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + '@esbuild/sunos-x64@0.19.12': resolution: {integrity: sha512-HKjJwRrW8uWtCQnQOz9qcU3mUZhTUQvi56Q8DPTLLB+DawoiQdjsYq+j+D3s9I8VFtDr+F9CjgXKKC4ss89IeA==} engines: {node: '>=12'} @@ -937,6 +1082,12 @@ packages: cpu: [x64] os: [sunos] + '@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.19.12': resolution: {integrity: sha512-URgtR1dJnmGvX864pn1B2YUYNzjmXkuJOIqG2HdU62MVS4EHpU2946OZoTMnRUHklGtJdJZ33QfzdjGACXhn1A==} engines: {node: '>=12'} @@ -949,6 +1100,12 @@ packages: cpu: [arm64] os: [win32] + '@esbuild/win32-arm64@0.21.5': + resolution: {integrity: sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + '@esbuild/win32-ia32@0.19.12': resolution: {integrity: sha512-+ZOE6pUkMOJfmxmBZElNOx72NKpIa/HFOMGzu8fqzQJ5kgf6aTGrcJaFsNiVMH4JKpMipyK+7k0n2UXN7a8YKQ==} engines: {node: '>=12'} @@ -961,6 +1118,12 @@ packages: cpu: [ia32] os: [win32] + '@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.19.12': resolution: {integrity: sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA==} engines: {node: '>=12'} @@ -973,6 +1136,12 @@ packages: cpu: [x64] os: [win32] + '@esbuild/win32-x64@0.21.5': + resolution: {integrity: sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + '@eslint-community/eslint-utils@4.4.0': resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -2371,6 +2540,11 @@ packages: engines: {node: '>=12'} hasBin: true + esbuild@0.21.5: + resolution: {integrity: sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==} + engines: {node: '>=12'} + hasBin: true + escalade@3.1.2: resolution: {integrity: sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==} engines: {node: '>=6'} @@ -3109,6 +3283,9 @@ packages: resolution: {integrity: sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==} engines: {node: '>=10'} + jquery@3.7.1: + resolution: {integrity: sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg==} + js-levenshtein@1.1.6: resolution: {integrity: sha512-X2BB11YZtrRqY4EnQcLX5Rh373zbK4alC1FW7D7MBhL2gtcC17cTnr6DmfHZeS0s2rTHjUTMMHfG7gO8SSdw+g==} engines: {node: '>=0.10.0'} @@ -3728,6 +3905,10 @@ packages: resolution: {integrity: sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==} engines: {node: ^10 || ^12 || >=14} + postcss@8.4.39: + resolution: {integrity: sha512-0vzE+lAiG7hZl1/9I8yzKLx3aR9Xbof3fBHKunvMfOCYAtMhrsnccJY2iTURb9EZd5+pLuiNV9/c/GZJOHsgIw==} + engines: {node: ^10 || ^12 || >=14} + preact@10.20.1: resolution: {integrity: sha512-JIFjgFg9B2qnOoGiYMVBtrcFxHqn+dNXbq76bVmcaHYJFYR4lW67AOcXgAYQQTDYXDOg/kTZrKPNCdRgJ2UJmw==} @@ -4608,6 +4789,34 @@ packages: terser: optional: true + vite@5.3.4: + resolution: {integrity: sha512-Cw+7zL3ZG9/NZBB8C+8QbQZmR54GwqIz+WMI4b3JgdYJvX+ny9AjJXqkGQlDXSXRP9rP0B4tbciRMOVEKulVOA==} + engines: {node: ^18.0.0 || >=20.0.0} + hasBin: true + peerDependencies: + '@types/node': ^18.0.0 || >=20.0.0 + less: '*' + lightningcss: ^1.21.0 + sass: '*' + stylus: '*' + sugarss: '*' + terser: ^5.4.0 + peerDependenciesMeta: + '@types/node': + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + vitefu@0.2.5: resolution: {integrity: sha512-SgHtMLoqaeeGnd2evZ849ZbACbnwQCIwRH57t18FxcXoZop0uQu0uzlIhJBlF/eWVzuce0sHeqPcDo+evVcg8Q==} peerDependencies: @@ -5309,138 +5518,207 @@ snapshots: '@esbuild/aix-ppc64@0.20.2': optional: true + '@esbuild/aix-ppc64@0.21.5': + optional: true + '@esbuild/android-arm64@0.19.12': optional: true '@esbuild/android-arm64@0.20.2': optional: true + '@esbuild/android-arm64@0.21.5': + optional: true + '@esbuild/android-arm@0.19.12': optional: true '@esbuild/android-arm@0.20.2': optional: true + '@esbuild/android-arm@0.21.5': + optional: true + '@esbuild/android-x64@0.19.12': optional: true '@esbuild/android-x64@0.20.2': optional: true + '@esbuild/android-x64@0.21.5': + optional: true + '@esbuild/darwin-arm64@0.19.12': optional: true '@esbuild/darwin-arm64@0.20.2': optional: true + '@esbuild/darwin-arm64@0.21.5': + optional: true + '@esbuild/darwin-x64@0.19.12': optional: true '@esbuild/darwin-x64@0.20.2': optional: true + '@esbuild/darwin-x64@0.21.5': + optional: true + '@esbuild/freebsd-arm64@0.19.12': optional: true '@esbuild/freebsd-arm64@0.20.2': optional: true + '@esbuild/freebsd-arm64@0.21.5': + optional: true + '@esbuild/freebsd-x64@0.19.12': optional: true '@esbuild/freebsd-x64@0.20.2': optional: true + '@esbuild/freebsd-x64@0.21.5': + optional: true + '@esbuild/linux-arm64@0.19.12': optional: true '@esbuild/linux-arm64@0.20.2': optional: true + '@esbuild/linux-arm64@0.21.5': + optional: true + '@esbuild/linux-arm@0.19.12': optional: true '@esbuild/linux-arm@0.20.2': optional: true + '@esbuild/linux-arm@0.21.5': + optional: true + '@esbuild/linux-ia32@0.19.12': optional: true '@esbuild/linux-ia32@0.20.2': optional: true + '@esbuild/linux-ia32@0.21.5': + optional: true + '@esbuild/linux-loong64@0.19.12': optional: true '@esbuild/linux-loong64@0.20.2': optional: true + '@esbuild/linux-loong64@0.21.5': + optional: true + '@esbuild/linux-mips64el@0.19.12': optional: true '@esbuild/linux-mips64el@0.20.2': optional: true + '@esbuild/linux-mips64el@0.21.5': + optional: true + '@esbuild/linux-ppc64@0.19.12': optional: true '@esbuild/linux-ppc64@0.20.2': optional: true + '@esbuild/linux-ppc64@0.21.5': + optional: true + '@esbuild/linux-riscv64@0.19.12': optional: true '@esbuild/linux-riscv64@0.20.2': optional: true + '@esbuild/linux-riscv64@0.21.5': + optional: true + '@esbuild/linux-s390x@0.19.12': optional: true '@esbuild/linux-s390x@0.20.2': optional: true + '@esbuild/linux-s390x@0.21.5': + optional: true + '@esbuild/linux-x64@0.19.12': optional: true '@esbuild/linux-x64@0.20.2': optional: true + '@esbuild/linux-x64@0.21.5': + optional: true + '@esbuild/netbsd-x64@0.19.12': optional: true '@esbuild/netbsd-x64@0.20.2': optional: true + '@esbuild/netbsd-x64@0.21.5': + optional: true + '@esbuild/openbsd-x64@0.19.12': optional: true '@esbuild/openbsd-x64@0.20.2': optional: true + '@esbuild/openbsd-x64@0.21.5': + optional: true + '@esbuild/sunos-x64@0.19.12': optional: true '@esbuild/sunos-x64@0.20.2': optional: true + '@esbuild/sunos-x64@0.21.5': + optional: true + '@esbuild/win32-arm64@0.19.12': optional: true '@esbuild/win32-arm64@0.20.2': optional: true + '@esbuild/win32-arm64@0.21.5': + optional: true + '@esbuild/win32-ia32@0.19.12': optional: true '@esbuild/win32-ia32@0.20.2': optional: true + '@esbuild/win32-ia32@0.21.5': + optional: true + '@esbuild/win32-x64@0.19.12': optional: true '@esbuild/win32-x64@0.20.2': optional: true + '@esbuild/win32-x64@0.21.5': + optional: true + '@eslint-community/eslint-utils@4.4.0(eslint@9.4.0)': dependencies: eslint: 9.4.0 @@ -6112,20 +6390,20 @@ snapshots: vite: 5.2.11(@types/node@20.14.2)(sass@1.77.4)(terser@5.31.1) vue: 3.4.26(typescript@5.4.5) - '@vitejs/plugin-vue@5.0.4(vite@5.2.13(@types/node@20.14.2)(sass@1.76.0)(terser@5.31.1))(vue@3.4.26(typescript@5.4.5))': + '@vitejs/plugin-vue@5.0.4(vite@5.2.8(@types/node@20.12.5)(sass@1.77.4)(terser@5.31.1))(vue@3.4.21(typescript@5.4.4))': dependencies: - vite: 5.2.13(@types/node@20.14.2)(sass@1.76.0)(terser@5.31.1) - vue: 3.4.26(typescript@5.4.5) + vite: 5.2.8(@types/node@20.12.5)(sass@1.77.4)(terser@5.31.1) + vue: 3.4.21(typescript@5.4.4) - '@vitejs/plugin-vue@5.0.4(vite@5.2.13(@types/node@20.14.2)(sass@1.77.4)(terser@5.31.1))(vue@3.4.21(typescript@5.4.5))': + '@vitejs/plugin-vue@5.0.4(vite@5.3.4(@types/node@20.14.2)(sass@1.76.0)(terser@5.31.1))(vue@3.4.26(typescript@5.4.5))': dependencies: - vite: 5.2.13(@types/node@20.14.2)(sass@1.77.4)(terser@5.31.1) - vue: 3.4.21(typescript@5.4.5) + vite: 5.3.4(@types/node@20.14.2)(sass@1.76.0)(terser@5.31.1) + vue: 3.4.26(typescript@5.4.5) - '@vitejs/plugin-vue@5.0.4(vite@5.2.8(@types/node@20.12.5)(sass@1.77.4)(terser@5.31.1))(vue@3.4.21(typescript@5.4.4))': + '@vitejs/plugin-vue@5.0.4(vite@5.3.4(@types/node@20.14.2)(sass@1.77.4)(terser@5.31.1))(vue@3.4.21(typescript@5.4.5))': dependencies: - vite: 5.2.8(@types/node@20.12.5)(sass@1.77.4)(terser@5.31.1) - vue: 3.4.21(typescript@5.4.4) + vite: 5.3.4(@types/node@20.14.2)(sass@1.77.4)(terser@5.31.1) + vue: 3.4.21(typescript@5.4.5) '@vitest/coverage-v8@1.6.0(vitest@1.6.0(@types/node@20.14.2)(jsdom@24.1.0)(sass@1.77.4)(terser@5.31.1))': dependencies: @@ -6832,7 +7110,7 @@ snapshots: chokidar@3.6.0: dependencies: anymatch: 3.1.3 - braces: 3.0.2 + braces: 3.0.3 glob-parent: 5.1.2 is-binary-path: 2.1.0 is-glob: 4.0.3 @@ -7210,6 +7488,32 @@ snapshots: '@esbuild/win32-ia32': 0.20.2 '@esbuild/win32-x64': 0.20.2 + esbuild@0.21.5: + optionalDependencies: + '@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.2: {} escape-string-regexp@1.0.5: {} @@ -8059,6 +8363,8 @@ snapshots: joycon@3.1.1: {} + jquery@3.7.1: {} + js-levenshtein@1.1.6: {} js-tokens@4.0.0: {} @@ -8618,12 +8924,12 @@ snapshots: possible-typed-array-names@1.0.0: {} - postcss-load-config@4.0.2(postcss@8.4.38): + postcss-load-config@4.0.2(postcss@8.4.39): dependencies: lilconfig: 3.1.1 yaml: 2.4.2 optionalDependencies: - postcss: 8.4.38 + postcss: 8.4.39 postcss-resolve-nested-selector@0.1.1: {} @@ -8655,6 +8961,12 @@ snapshots: picocolors: 1.0.1 source-map-js: 1.2.0 + postcss@8.4.39: + dependencies: + nanoid: 3.3.7 + picocolors: 1.0.1 + source-map-js: 1.2.0 + preact@10.20.1: {} prelude-ls@1.2.1: {} @@ -9325,7 +9637,7 @@ snapshots: tslib@2.6.3: {} - tsup@8.0.2(@microsoft/api-extractor@7.46.2(@types/node@20.14.2))(@swc/core@1.4.17)(postcss@8.4.38)(typescript@5.4.5): + tsup@8.0.2(@microsoft/api-extractor@7.46.2(@types/node@20.14.2))(@swc/core@1.4.17)(postcss@8.4.39)(typescript@5.4.5): dependencies: bundle-require: 4.1.0(esbuild@0.19.12) cac: 6.7.14 @@ -9335,7 +9647,7 @@ snapshots: execa: 5.1.1 globby: 11.1.0 joycon: 3.1.1 - postcss-load-config: 4.0.2(postcss@8.4.38) + postcss-load-config: 4.0.2(postcss@8.4.39) resolve-from: 5.0.0 rollup: 4.18.0 source-map: 0.8.0-beta.0 @@ -9344,7 +9656,7 @@ snapshots: optionalDependencies: '@microsoft/api-extractor': 7.46.2(@types/node@20.14.2) '@swc/core': 1.4.17 - postcss: 8.4.38 + postcss: 8.4.39 typescript: 5.4.5 transitivePeerDependencies: - supports-color @@ -9545,7 +9857,7 @@ snapshots: debug: 4.3.5 pathe: 1.1.2 picocolors: 1.0.1 - vite: 5.2.13(@types/node@20.14.2)(sass@1.77.4)(terser@5.31.1) + vite: 5.3.4(@types/node@20.14.2)(sass@1.77.4)(terser@5.31.1) transitivePeerDependencies: - '@types/node' - less @@ -9581,9 +9893,9 @@ snapshots: typescript: 5.4.5 vue-tsc: 2.0.16(typescript@5.4.5) - vite-plugin-css-injected-by-js@3.5.1(vite@5.2.13(@types/node@20.14.2)(sass@1.77.4)(terser@5.31.1)): + vite-plugin-css-injected-by-js@3.5.1(vite@5.3.4(@types/node@20.14.2)(sass@1.77.4)(terser@5.31.1)): dependencies: - vite: 5.2.13(@types/node@20.14.2)(sass@1.77.4)(terser@5.31.1) + vite: 5.3.4(@types/node@20.14.2)(sass@1.77.4)(terser@5.31.1) vite-plugin-dts@3.9.1(@types/node@20.14.2)(rollup@4.18.0)(typescript@5.4.5)(vite@5.2.13(@types/node@20.14.2)(sass@1.77.4)(terser@5.31.1)): dependencies: @@ -9602,7 +9914,7 @@ snapshots: - rollup - supports-color - vite-plugin-solid@2.10.2(solid-js@1.8.17)(vite@5.2.13(@types/node@20.14.2)(sass@1.77.4)(terser@5.31.1)): + vite-plugin-solid@2.10.2(solid-js@1.8.17)(vite@5.3.4(@types/node@20.14.2)(sass@1.77.4)(terser@5.31.1)): dependencies: '@babel/core': 7.24.5 '@types/babel__core': 7.20.5 @@ -9610,8 +9922,8 @@ snapshots: merge-anything: 5.1.7 solid-js: 1.8.17 solid-refresh: 0.6.3(solid-js@1.8.17) - vite: 5.2.13(@types/node@20.14.2)(sass@1.77.4)(terser@5.31.1) - vitefu: 0.2.5(vite@5.2.13(@types/node@20.14.2)(sass@1.77.4)(terser@5.31.1)) + vite: 5.3.4(@types/node@20.14.2)(sass@1.77.4)(terser@5.31.1) + vitefu: 0.2.5(vite@5.3.4(@types/node@20.14.2)(sass@1.77.4)(terser@5.31.1)) transitivePeerDependencies: - supports-color @@ -9648,7 +9960,7 @@ snapshots: sass: 1.77.4 terser: 5.31.1 - vite@5.2.13(@types/node@20.14.2)(sass@1.76.0)(terser@5.31.1): + vite@5.2.13(@types/node@20.14.2)(sass@1.77.4)(terser@5.31.1): dependencies: esbuild: 0.20.2 postcss: 8.4.38 @@ -9656,43 +9968,54 @@ snapshots: optionalDependencies: '@types/node': 20.14.2 fsevents: 2.3.3 - sass: 1.76.0 + sass: 1.77.4 terser: 5.31.1 - vite@5.2.13(@types/node@20.14.2)(sass@1.77.4)(terser@5.31.1): + vite@5.2.8(@types/node@20.12.5)(sass@1.77.4)(terser@5.31.1): dependencies: esbuild: 0.20.2 postcss: 8.4.38 rollup: 4.18.0 optionalDependencies: - '@types/node': 20.14.2 + '@types/node': 20.12.5 fsevents: 2.3.3 sass: 1.77.4 terser: 5.31.1 - vite@5.2.8(@types/node@20.12.5)(sass@1.77.4)(terser@5.31.1): + vite@5.3.4(@types/node@20.14.2)(sass@1.76.0)(terser@5.31.1): dependencies: - esbuild: 0.20.2 - postcss: 8.4.38 + esbuild: 0.21.5 + postcss: 8.4.39 rollup: 4.18.0 optionalDependencies: - '@types/node': 20.12.5 + '@types/node': 20.14.2 + fsevents: 2.3.3 + sass: 1.76.0 + terser: 5.31.1 + + vite@5.3.4(@types/node@20.14.2)(sass@1.77.4)(terser@5.31.1): + dependencies: + esbuild: 0.21.5 + postcss: 8.4.39 + rollup: 4.18.0 + optionalDependencies: + '@types/node': 20.14.2 fsevents: 2.3.3 sass: 1.77.4 terser: 5.31.1 - vitefu@0.2.5(vite@5.2.13(@types/node@20.14.2)(sass@1.77.4)(terser@5.31.1)): + vitefu@0.2.5(vite@5.3.4(@types/node@20.14.2)(sass@1.77.4)(terser@5.31.1)): optionalDependencies: - vite: 5.2.13(@types/node@20.14.2)(sass@1.77.4)(terser@5.31.1) + vite: 5.3.4(@types/node@20.14.2)(sass@1.77.4)(terser@5.31.1) - vitepress@1.0.2(@algolia/client-search@4.23.2)(@types/node@20.14.2)(@types/react@18.3.1)(postcss@8.4.38)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.77.4)(search-insights@2.14.0)(terser@5.31.1)(typescript@5.4.5): + vitepress@1.0.2(@algolia/client-search@4.23.2)(@types/node@20.14.2)(@types/react@18.3.1)(postcss@8.4.39)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.77.4)(search-insights@2.14.0)(terser@5.31.1)(typescript@5.4.5): dependencies: '@docsearch/css': 3.6.0 '@docsearch/js': 3.6.0(@algolia/client-search@4.23.2)(@types/react@18.3.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(search-insights@2.14.0) '@shikijs/core': 1.2.4 '@shikijs/transformers': 1.2.4 '@types/markdown-it': 13.0.7 - '@vitejs/plugin-vue': 5.0.4(vite@5.2.13(@types/node@20.14.2)(sass@1.77.4)(terser@5.31.1))(vue@3.4.21(typescript@5.4.5)) + '@vitejs/plugin-vue': 5.0.4(vite@5.3.4(@types/node@20.14.2)(sass@1.77.4)(terser@5.31.1))(vue@3.4.21(typescript@5.4.5)) '@vue/devtools-api': 7.0.25(vue@3.4.21(typescript@5.4.5)) '@vueuse/core': 10.9.0(vue@3.4.21(typescript@5.4.5)) '@vueuse/integrations': 10.9.0(focus-trap@7.5.4)(vue@3.4.21(typescript@5.4.5)) @@ -9700,10 +10023,10 @@ snapshots: mark.js: 8.11.1 minisearch: 6.3.0 shiki: 1.2.4 - vite: 5.2.13(@types/node@20.14.2)(sass@1.77.4)(terser@5.31.1) + vite: 5.3.4(@types/node@20.14.2)(sass@1.77.4)(terser@5.31.1) vue: 3.4.21(typescript@5.4.5) optionalDependencies: - postcss: 8.4.38 + postcss: 8.4.39 transitivePeerDependencies: - '@algolia/client-search' - '@types/node' @@ -9731,14 +10054,14 @@ snapshots: - typescript - universal-cookie - vitepress@1.1.4(@algolia/client-search@4.23.2)(@types/node@20.14.2)(@types/react@18.3.1)(postcss@8.4.38)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.76.0)(search-insights@2.14.0)(terser@5.31.1)(typescript@5.4.5): + vitepress@1.1.4(@algolia/client-search@4.23.2)(@types/node@20.14.2)(@types/react@18.3.1)(postcss@8.4.39)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.76.0)(search-insights@2.14.0)(terser@5.31.1)(typescript@5.4.5): dependencies: '@docsearch/css': 3.6.0 '@docsearch/js': 3.6.0(@algolia/client-search@4.23.2)(@types/react@18.3.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(search-insights@2.14.0) '@shikijs/core': 1.4.0 '@shikijs/transformers': 1.4.0 '@types/markdown-it': 14.1.1 - '@vitejs/plugin-vue': 5.0.4(vite@5.2.13(@types/node@20.14.2)(sass@1.76.0)(terser@5.31.1))(vue@3.4.26(typescript@5.4.5)) + '@vitejs/plugin-vue': 5.0.4(vite@5.3.4(@types/node@20.14.2)(sass@1.76.0)(terser@5.31.1))(vue@3.4.26(typescript@5.4.5)) '@vue/devtools-api': 7.1.3(vue@3.4.26(typescript@5.4.5)) '@vueuse/core': 10.9.0(vue@3.4.26(typescript@5.4.5)) '@vueuse/integrations': 10.9.0(focus-trap@7.5.4)(vue@3.4.26(typescript@5.4.5)) @@ -9746,10 +10069,10 @@ snapshots: mark.js: 8.11.1 minisearch: 6.3.0 shiki: 1.4.0 - vite: 5.2.13(@types/node@20.14.2)(sass@1.76.0)(terser@5.31.1) + vite: 5.3.4(@types/node@20.14.2)(sass@1.76.0)(terser@5.31.1) vue: 3.4.26(typescript@5.4.5) optionalDependencies: - postcss: 8.4.38 + postcss: 8.4.39 transitivePeerDependencies: - '@algolia/client-search' - '@types/node' @@ -9796,7 +10119,7 @@ snapshots: strip-literal: 2.1.0 tinybench: 2.8.0 tinypool: 0.8.4 - vite: 5.2.13(@types/node@20.14.2)(sass@1.77.4)(terser@5.31.1) + vite: 5.3.4(@types/node@20.14.2)(sass@1.77.4)(terser@5.31.1) vite-node: 1.6.0(@types/node@20.14.2)(sass@1.77.4)(terser@5.31.1) why-is-node-running: 2.2.2 optionalDependencies: diff --git a/test/lightbox/.gitignore b/test/lightbox/.gitignore new file mode 100644 index 000000000..a547bf36d --- /dev/null +++ b/test/lightbox/.gitignore @@ -0,0 +1,24 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/test/lightbox/index.html b/test/lightbox/index.html new file mode 100644 index 000000000..b3f9518a9 --- /dev/null +++ b/test/lightbox/index.html @@ -0,0 +1,12 @@ + + + + + + Vite + TS + + +
+ + + diff --git a/test/lightbox/package.json b/test/lightbox/package.json new file mode 100644 index 000000000..af0a18381 --- /dev/null +++ b/test/lightbox/package.json @@ -0,0 +1,24 @@ +{ + "name": "test-lightbox", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "tsc && vite build", + "preview": "vite preview" + }, + "devDependencies": { + "typescript": "^5.2.2", + "vite": "^5.3.4" + }, + "dependencies": { + "jquery": "^3.7.1", + "@artalk/plugin-lightbox": "workspace:^", + "artalk": "workspace:^", + "lightgallery": "^2.7.2", + "lightbox2": "^2.11.4", + "photoswipe": "^5.4.4", + "fancybox": "^3.0.1" + } +} diff --git a/test/lightbox/src/main.ts b/test/lightbox/src/main.ts new file mode 100644 index 000000000..6c43d7bd6 --- /dev/null +++ b/test/lightbox/src/main.ts @@ -0,0 +1,73 @@ +import Artalk from 'artalk' +import 'artalk/Artalk.css' +import { ArtalkLightboxPlugin } from '@artalk/plugin-lightbox' + +// @ts-ignore +import jQuery from 'jquery' + +// @ts-ignore +window.$ = jQuery + +const currentLib = new URLSearchParams(window.location.search).get('lib') +const libs = ['lightGallery', 'lightBox', 'fancyBox', 'photoSwipe'] + +document.querySelector('#app')!.innerHTML = ` +
+ ${libs + .map( + (lib) => ` + + `, + ) + .join('')} +
+
+` + +if (currentLib === 'lightGallery') { + import('lightgallery/css/lightgallery.css') + + Artalk.use(ArtalkLightboxPlugin, { + lightGallery: { + lib: () => import('lightgallery'), + }, + }) +} else if (currentLib === 'lightBox') { + import('lightbox2/dist/css/lightbox.min.css') + + Artalk.use(ArtalkLightboxPlugin, { + lightBox: { + // @ts-ignore + lib: () => import('lightbox2'), + }, + }) +} else if (currentLib === 'fancyBox') { + import('fancybox/dist/css/jquery.fancybox.css') + + Artalk.use(ArtalkLightboxPlugin, { + fancyBox: { + // @ts-ignore + lib: () => import('fancybox'), + }, + }) +} else if (currentLib === 'photoSwipe') { + import('photoswipe/style.css') + + Artalk.use(ArtalkLightboxPlugin, { + photoSwipe: { + lib: () => import('photoswipe/lightbox'), + pswpModule: () => import('photoswipe'), + }, + }) +} + +Artalk.init({ + el: '.artalk-container', + server: 'http://localhost:23366', + site: 'ArtalkDocs', + pageKey: 'https://artalk.js.org/guide/intro.html', +}) diff --git a/test/lightbox/tsconfig.json b/test/lightbox/tsconfig.json new file mode 100644 index 000000000..28de279c8 --- /dev/null +++ b/test/lightbox/tsconfig.json @@ -0,0 +1,26 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "module": "ESNext", + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "moduleDetection": "force", + "noEmit": true, + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true, + + "types": ["vite/client"], + }, + "include": ["src"] +}