feat(deploy): test to upgrade dependencies & migrate to bun

This commit is contained in:
khtsly 2026-02-11 23:20:26 +07:00
parent 9c8b16c400
commit e510256c87
1016 changed files with 213339 additions and 351515 deletions

View file

@ -16,28 +16,42 @@ jobs:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
node-version: 20
cache: npm
bun-version: latest
- name: Cache Bun packages
uses: actions/cache@v4
with:
path: ~/.bun/install/cache
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock', '**/bun.lockb', '**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-bun-
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Install dependencies
run: npm ci
run: bun ci
- name: Build
run: |
npm run docs:build
touch docs/.vitepress/dist
bun run docs:build
touch docs/.vitepress/dist/.nojekyll
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/.vitepress/dist
- name: Deploy
id: deployment
uses: actions/deploy-pages@v4
uses: actions/deploy-pages@v4

View file

@ -3,5 +3,5 @@
# To add a new tool, add an entry to this table.
[tools]
rojo = "rojo-rbx/rojo@7.4.1"
rojo = "rojo-rbx/rojo@7.6.1"
wally = "UpliftGames/wally@0.3.2"

359
bun.lock Normal file
View file

@ -0,0 +1,359 @@
{
"lockfileVersion": 1,
"configVersion": 0,
"workspaces": {
"": {
"devDependencies": {
"vitepress": "^1.6.3",
"vue": "^3.5.28",
},
},
},
"packages": {
"@algolia/abtesting": ["@algolia/abtesting@1.14.0", "", { "dependencies": { "@algolia/client-common": "5.48.0", "@algolia/requester-browser-xhr": "5.48.0", "@algolia/requester-fetch": "5.48.0", "@algolia/requester-node-http": "5.48.0" } }, "sha512-cZfj+1Z1dgrk3YPtNQNt0H9Rr67P8b4M79JjUKGS0d7/EbFbGxGgSu6zby5f22KXo3LT0LZa4O2c6VVbupJuDg=="],
"@algolia/autocomplete-core": ["@algolia/autocomplete-core@1.17.7", "", { "dependencies": { "@algolia/autocomplete-plugin-algolia-insights": "1.17.7", "@algolia/autocomplete-shared": "1.17.7" } }, "sha512-BjiPOW6ks90UKl7TwMv7oNQMnzU+t/wk9mgIDi6b1tXpUek7MW0lbNOUHpvam9pe3lVCf4xPFT+lK7s+e+fs7Q=="],
"@algolia/autocomplete-plugin-algolia-insights": ["@algolia/autocomplete-plugin-algolia-insights@1.17.7", "", { "dependencies": { "@algolia/autocomplete-shared": "1.17.7" }, "peerDependencies": { "search-insights": ">= 1 < 3" } }, "sha512-Jca5Ude6yUOuyzjnz57og7Et3aXjbwCSDf/8onLHSQgw1qW3ALl9mrMWaXb5FmPVkV3EtkD2F/+NkT6VHyPu9A=="],
"@algolia/autocomplete-preset-algolia": ["@algolia/autocomplete-preset-algolia@1.17.7", "", { "dependencies": { "@algolia/autocomplete-shared": "1.17.7" }, "peerDependencies": { "@algolia/client-search": ">= 4.9.1 < 6", "algoliasearch": ">= 4.9.1 < 6" } }, "sha512-ggOQ950+nwbWROq2MOCIL71RE0DdQZsceqrg32UqnhDz8FlO9rL8ONHNsI2R1MH0tkgVIDKI/D0sMiUchsFdWA=="],
"@algolia/autocomplete-shared": ["@algolia/autocomplete-shared@1.17.7", "", { "peerDependencies": { "@algolia/client-search": ">= 4.9.1 < 6", "algoliasearch": ">= 4.9.1 < 6" } }, "sha512-o/1Vurr42U/qskRSuhBH+VKxMvkkUVTLU6WZQr+L5lGZZLYWyhdzWjW0iGXY7EkwRTjBqvN2EsR81yCTGV/kmg=="],
"@algolia/client-abtesting": ["@algolia/client-abtesting@5.48.0", "", { "dependencies": { "@algolia/client-common": "5.48.0", "@algolia/requester-browser-xhr": "5.48.0", "@algolia/requester-fetch": "5.48.0", "@algolia/requester-node-http": "5.48.0" } }, "sha512-n17WSJ7vazmM6yDkWBAjY12J8ERkW9toOqNgQ1GEZu/Kc4dJDJod1iy+QP5T/UlR3WICgZDi/7a/VX5TY5LAPQ=="],
"@algolia/client-analytics": ["@algolia/client-analytics@5.48.0", "", { "dependencies": { "@algolia/client-common": "5.48.0", "@algolia/requester-browser-xhr": "5.48.0", "@algolia/requester-fetch": "5.48.0", "@algolia/requester-node-http": "5.48.0" } }, "sha512-v5bMZMEqW9U2l40/tTAaRyn4AKrYLio7KcRuHmLaJtxuJAhvZiE7Y62XIsF070juz4MN3eyvfQmI+y5+OVbZuA=="],
"@algolia/client-common": ["@algolia/client-common@5.48.0", "", {}, "sha512-7H3DgRyi7UByScc0wz7EMrhgNl7fKPDjKX9OcWixLwCj7yrRXDSIzwunykuYUUO7V7HD4s319e15FlJ9CQIIFQ=="],
"@algolia/client-insights": ["@algolia/client-insights@5.48.0", "", { "dependencies": { "@algolia/client-common": "5.48.0", "@algolia/requester-browser-xhr": "5.48.0", "@algolia/requester-fetch": "5.48.0", "@algolia/requester-node-http": "5.48.0" } }, "sha512-tXmkB6qrIGAXrtRYHQNpfW0ekru/qymV02bjT0w5QGaGw0W91yT+53WB6dTtRRsIrgS30Al6efBvyaEosjZ5uw=="],
"@algolia/client-personalization": ["@algolia/client-personalization@5.48.0", "", { "dependencies": { "@algolia/client-common": "5.48.0", "@algolia/requester-browser-xhr": "5.48.0", "@algolia/requester-fetch": "5.48.0", "@algolia/requester-node-http": "5.48.0" } }, "sha512-4tXEsrdtcBZbDF73u14Kb3otN+xUdTVGop1tBjict+Rc/FhsJQVIwJIcTrOJqmvhtBfc56Bu65FiVOnpAZCxcw=="],
"@algolia/client-query-suggestions": ["@algolia/client-query-suggestions@5.48.0", "", { "dependencies": { "@algolia/client-common": "5.48.0", "@algolia/requester-browser-xhr": "5.48.0", "@algolia/requester-fetch": "5.48.0", "@algolia/requester-node-http": "5.48.0" } }, "sha512-unzSUwWFpsDrO8935RhMAlyK0Ttua/5XveVIwzfjs5w+GVBsHgIkbOe8VbBJccMU/z1LCwvu1AY3kffuSLAR5Q=="],
"@algolia/client-search": ["@algolia/client-search@5.48.0", "", { "dependencies": { "@algolia/client-common": "5.48.0", "@algolia/requester-browser-xhr": "5.48.0", "@algolia/requester-fetch": "5.48.0", "@algolia/requester-node-http": "5.48.0" } }, "sha512-RB9bKgYTVUiOcEb5bOcZ169jiiVW811dCsJoLT19DcbbFmU4QaK0ghSTssij35QBQ3SCOitXOUrHcGgNVwS7sQ=="],
"@algolia/ingestion": ["@algolia/ingestion@1.48.0", "", { "dependencies": { "@algolia/client-common": "5.48.0", "@algolia/requester-browser-xhr": "5.48.0", "@algolia/requester-fetch": "5.48.0", "@algolia/requester-node-http": "5.48.0" } }, "sha512-rhoSoPu+TDzDpvpk3cY/pYgbeWXr23DxnAIH/AkN0dUC+GCnVIeNSQkLaJ+CL4NZ51cjLIjksrzb4KC5Xu+ktw=="],
"@algolia/monitoring": ["@algolia/monitoring@1.48.0", "", { "dependencies": { "@algolia/client-common": "5.48.0", "@algolia/requester-browser-xhr": "5.48.0", "@algolia/requester-fetch": "5.48.0", "@algolia/requester-node-http": "5.48.0" } }, "sha512-aSe6jKvWt+8VdjOaq2ERtsXp9+qMXNJ3mTyTc1VMhNfgPl7ArOhRMRSQ8QBnY8ZL4yV5Xpezb7lAg8pdGrrulg=="],
"@algolia/recommend": ["@algolia/recommend@5.48.0", "", { "dependencies": { "@algolia/client-common": "5.48.0", "@algolia/requester-browser-xhr": "5.48.0", "@algolia/requester-fetch": "5.48.0", "@algolia/requester-node-http": "5.48.0" } }, "sha512-p9tfI1bimAaZrdiVExL/dDyGUZ8gyiSHsktP1ZWGzt5hXpM3nhv4tSjyHtXjEKtA0UvsaHKwSfFE8aAAm1eIQA=="],
"@algolia/requester-browser-xhr": ["@algolia/requester-browser-xhr@5.48.0", "", { "dependencies": { "@algolia/client-common": "5.48.0" } }, "sha512-XshyfpsQB7BLnHseMinp3fVHOGlTv6uEHOzNK/3XrEF9mjxoZAcdVfY1OCXObfwRWX5qXZOq8FnrndFd44iVsQ=="],
"@algolia/requester-fetch": ["@algolia/requester-fetch@5.48.0", "", { "dependencies": { "@algolia/client-common": "5.48.0" } }, "sha512-Q4XNSVQU89bKNAPuvzSYqTH9AcbOOiIo6AeYMQTxgSJ2+uvT78CLPMG89RIIloYuAtSfE07s40OLV50++l1Bbw=="],
"@algolia/requester-node-http": ["@algolia/requester-node-http@5.48.0", "", { "dependencies": { "@algolia/client-common": "5.48.0" } }, "sha512-ZgxV2+5qt3NLeUYBTsi6PLyHcENQWC0iFppFZekHSEDA2wcLdTUjnaJzimTEULHIvJuLRCkUs4JABdhuJktEag=="],
"@babel/helper-string-parser": ["@babel/helper-string-parser@7.27.1", "", {}, "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA=="],
"@babel/helper-validator-identifier": ["@babel/helper-validator-identifier@7.28.5", "", {}, "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q=="],
"@babel/parser": ["@babel/parser@7.29.0", "", { "dependencies": { "@babel/types": "^7.29.0" }, "bin": "./bin/babel-parser.js" }, "sha512-IyDgFV5GeDUVX4YdF/3CPULtVGSXXMLh1xVIgdCgxApktqnQV0r7/8Nqthg+8YLGaAtdyIlo2qIdZrbCv4+7ww=="],
"@babel/types": ["@babel/types@7.29.0", "", { "dependencies": { "@babel/helper-string-parser": "^7.27.1", "@babel/helper-validator-identifier": "^7.28.5" } }, "sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A=="],
"@docsearch/css": ["@docsearch/css@3.8.2", "", {}, "sha512-y05ayQFyUmCXze79+56v/4HpycYF3uFqB78pLPrSV5ZKAlDuIAAJNhaRi8tTdRNXh05yxX/TyNnzD6LwSM89vQ=="],
"@docsearch/js": ["@docsearch/js@3.8.2", "", { "dependencies": { "@docsearch/react": "3.8.2", "preact": "^10.0.0" } }, "sha512-Q5wY66qHn0SwA7Taa0aDbHiJvaFJLOJyHmooQ7y8hlwwQLQ/5WwCcoX0g7ii04Qi2DJlHsd0XXzJ8Ypw9+9YmQ=="],
"@docsearch/react": ["@docsearch/react@3.8.2", "", { "dependencies": { "@algolia/autocomplete-core": "1.17.7", "@algolia/autocomplete-preset-algolia": "1.17.7", "@docsearch/css": "3.8.2", "algoliasearch": "^5.14.2" }, "peerDependencies": { "@types/react": ">= 16.8.0 < 19.0.0", "react": ">= 16.8.0 < 19.0.0", "react-dom": ">= 16.8.0 < 19.0.0", "search-insights": ">= 1 < 3" }, "optionalPeers": ["@types/react", "react", "react-dom", "search-insights"] }, "sha512-xCRrJQlTt8N9GU0DG4ptwHRkfnSnD/YpdeaXe02iKfqs97TkZJv60yE+1eq/tjPcVnTW8dP5qLP7itifFVV5eg=="],
"@esbuild/aix-ppc64": ["@esbuild/aix-ppc64@0.21.5", "", { "os": "aix", "cpu": "ppc64" }, "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ=="],
"@esbuild/android-arm": ["@esbuild/android-arm@0.21.5", "", { "os": "android", "cpu": "arm" }, "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg=="],
"@esbuild/android-arm64": ["@esbuild/android-arm64@0.21.5", "", { "os": "android", "cpu": "arm64" }, "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A=="],
"@esbuild/android-x64": ["@esbuild/android-x64@0.21.5", "", { "os": "android", "cpu": "x64" }, "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA=="],
"@esbuild/darwin-arm64": ["@esbuild/darwin-arm64@0.21.5", "", { "os": "darwin", "cpu": "arm64" }, "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ=="],
"@esbuild/darwin-x64": ["@esbuild/darwin-x64@0.21.5", "", { "os": "darwin", "cpu": "x64" }, "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw=="],
"@esbuild/freebsd-arm64": ["@esbuild/freebsd-arm64@0.21.5", "", { "os": "freebsd", "cpu": "arm64" }, "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g=="],
"@esbuild/freebsd-x64": ["@esbuild/freebsd-x64@0.21.5", "", { "os": "freebsd", "cpu": "x64" }, "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ=="],
"@esbuild/linux-arm": ["@esbuild/linux-arm@0.21.5", "", { "os": "linux", "cpu": "arm" }, "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA=="],
"@esbuild/linux-arm64": ["@esbuild/linux-arm64@0.21.5", "", { "os": "linux", "cpu": "arm64" }, "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q=="],
"@esbuild/linux-ia32": ["@esbuild/linux-ia32@0.21.5", "", { "os": "linux", "cpu": "ia32" }, "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg=="],
"@esbuild/linux-loong64": ["@esbuild/linux-loong64@0.21.5", "", { "os": "linux", "cpu": "none" }, "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg=="],
"@esbuild/linux-mips64el": ["@esbuild/linux-mips64el@0.21.5", "", { "os": "linux", "cpu": "none" }, "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg=="],
"@esbuild/linux-ppc64": ["@esbuild/linux-ppc64@0.21.5", "", { "os": "linux", "cpu": "ppc64" }, "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w=="],
"@esbuild/linux-riscv64": ["@esbuild/linux-riscv64@0.21.5", "", { "os": "linux", "cpu": "none" }, "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA=="],
"@esbuild/linux-s390x": ["@esbuild/linux-s390x@0.21.5", "", { "os": "linux", "cpu": "s390x" }, "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A=="],
"@esbuild/linux-x64": ["@esbuild/linux-x64@0.21.5", "", { "os": "linux", "cpu": "x64" }, "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ=="],
"@esbuild/netbsd-x64": ["@esbuild/netbsd-x64@0.21.5", "", { "os": "none", "cpu": "x64" }, "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg=="],
"@esbuild/openbsd-x64": ["@esbuild/openbsd-x64@0.21.5", "", { "os": "openbsd", "cpu": "x64" }, "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow=="],
"@esbuild/sunos-x64": ["@esbuild/sunos-x64@0.21.5", "", { "os": "sunos", "cpu": "x64" }, "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg=="],
"@esbuild/win32-arm64": ["@esbuild/win32-arm64@0.21.5", "", { "os": "win32", "cpu": "arm64" }, "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A=="],
"@esbuild/win32-ia32": ["@esbuild/win32-ia32@0.21.5", "", { "os": "win32", "cpu": "ia32" }, "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA=="],
"@esbuild/win32-x64": ["@esbuild/win32-x64@0.21.5", "", { "os": "win32", "cpu": "x64" }, "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw=="],
"@iconify-json/simple-icons": ["@iconify-json/simple-icons@1.2.70", "", { "dependencies": { "@iconify/types": "*" } }, "sha512-CYNRCgN6nBTjN4dNkrBCjHXNR2e4hQihdsZUs/afUNFOWLSYjfihca4EFN05rRvDk4Xoy2n8tym6IxBZmcn+Qg=="],
"@iconify/types": ["@iconify/types@2.0.0", "", {}, "sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg=="],
"@jridgewell/sourcemap-codec": ["@jridgewell/sourcemap-codec@1.5.5", "", {}, "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og=="],
"@rollup/rollup-android-arm-eabi": ["@rollup/rollup-android-arm-eabi@4.57.1", "", { "os": "android", "cpu": "arm" }, "sha512-A6ehUVSiSaaliTxai040ZpZ2zTevHYbvu/lDoeAteHI8QnaosIzm4qwtezfRg1jOYaUmnzLX1AOD6Z+UJjtifg=="],
"@rollup/rollup-android-arm64": ["@rollup/rollup-android-arm64@4.57.1", "", { "os": "android", "cpu": "arm64" }, "sha512-dQaAddCY9YgkFHZcFNS/606Exo8vcLHwArFZ7vxXq4rigo2bb494/xKMMwRRQW6ug7Js6yXmBZhSBRuBvCCQ3w=="],
"@rollup/rollup-darwin-arm64": ["@rollup/rollup-darwin-arm64@4.57.1", "", { "os": "darwin", "cpu": "arm64" }, "sha512-crNPrwJOrRxagUYeMn/DZwqN88SDmwaJ8Cvi/TN1HnWBU7GwknckyosC2gd0IqYRsHDEnXf328o9/HC6OkPgOg=="],
"@rollup/rollup-darwin-x64": ["@rollup/rollup-darwin-x64@4.57.1", "", { "os": "darwin", "cpu": "x64" }, "sha512-Ji8g8ChVbKrhFtig5QBV7iMaJrGtpHelkB3lsaKzadFBe58gmjfGXAOfI5FV0lYMH8wiqsxKQ1C9B0YTRXVy4w=="],
"@rollup/rollup-freebsd-arm64": ["@rollup/rollup-freebsd-arm64@4.57.1", "", { "os": "freebsd", "cpu": "arm64" }, "sha512-R+/WwhsjmwodAcz65guCGFRkMb4gKWTcIeLy60JJQbXrJ97BOXHxnkPFrP+YwFlaS0m+uWJTstrUA9o+UchFug=="],
"@rollup/rollup-freebsd-x64": ["@rollup/rollup-freebsd-x64@4.57.1", "", { "os": "freebsd", "cpu": "x64" }, "sha512-IEQTCHeiTOnAUC3IDQdzRAGj3jOAYNr9kBguI7MQAAZK3caezRrg0GxAb6Hchg4lxdZEI5Oq3iov/w/hnFWY9Q=="],
"@rollup/rollup-linux-arm-gnueabihf": ["@rollup/rollup-linux-arm-gnueabihf@4.57.1", "", { "os": "linux", "cpu": "arm" }, "sha512-F8sWbhZ7tyuEfsmOxwc2giKDQzN3+kuBLPwwZGyVkLlKGdV1nvnNwYD0fKQ8+XS6hp9nY7B+ZeK01EBUE7aHaw=="],
"@rollup/rollup-linux-arm-musleabihf": ["@rollup/rollup-linux-arm-musleabihf@4.57.1", "", { "os": "linux", "cpu": "arm" }, "sha512-rGfNUfn0GIeXtBP1wL5MnzSj98+PZe/AXaGBCRmT0ts80lU5CATYGxXukeTX39XBKsxzFpEeK+Mrp9faXOlmrw=="],
"@rollup/rollup-linux-arm64-gnu": ["@rollup/rollup-linux-arm64-gnu@4.57.1", "", { "os": "linux", "cpu": "arm64" }, "sha512-MMtej3YHWeg/0klK2Qodf3yrNzz6CGjo2UntLvk2RSPlhzgLvYEB3frRvbEF2wRKh1Z2fDIg9KRPe1fawv7C+g=="],
"@rollup/rollup-linux-arm64-musl": ["@rollup/rollup-linux-arm64-musl@4.57.1", "", { "os": "linux", "cpu": "arm64" }, "sha512-1a/qhaaOXhqXGpMFMET9VqwZakkljWHLmZOX48R0I/YLbhdxr1m4gtG1Hq7++VhVUmf+L3sTAf9op4JlhQ5u1Q=="],
"@rollup/rollup-linux-loong64-gnu": ["@rollup/rollup-linux-loong64-gnu@4.57.1", "", { "os": "linux", "cpu": "none" }, "sha512-QWO6RQTZ/cqYtJMtxhkRkidoNGXc7ERPbZN7dVW5SdURuLeVU7lwKMpo18XdcmpWYd0qsP1bwKPf7DNSUinhvA=="],
"@rollup/rollup-linux-loong64-musl": ["@rollup/rollup-linux-loong64-musl@4.57.1", "", { "os": "linux", "cpu": "none" }, "sha512-xpObYIf+8gprgWaPP32xiN5RVTi/s5FCR+XMXSKmhfoJjrpRAjCuuqQXyxUa/eJTdAE6eJ+KDKaoEqjZQxh3Gw=="],
"@rollup/rollup-linux-ppc64-gnu": ["@rollup/rollup-linux-ppc64-gnu@4.57.1", "", { "os": "linux", "cpu": "ppc64" }, "sha512-4BrCgrpZo4hvzMDKRqEaW1zeecScDCR+2nZ86ATLhAoJ5FQ+lbHVD3ttKe74/c7tNT9c6F2viwB3ufwp01Oh2w=="],
"@rollup/rollup-linux-ppc64-musl": ["@rollup/rollup-linux-ppc64-musl@4.57.1", "", { "os": "linux", "cpu": "ppc64" }, "sha512-NOlUuzesGauESAyEYFSe3QTUguL+lvrN1HtwEEsU2rOwdUDeTMJdO5dUYl/2hKf9jWydJrO9OL/XSSf65R5+Xw=="],
"@rollup/rollup-linux-riscv64-gnu": ["@rollup/rollup-linux-riscv64-gnu@4.57.1", "", { "os": "linux", "cpu": "none" }, "sha512-ptA88htVp0AwUUqhVghwDIKlvJMD/fmL/wrQj99PRHFRAG6Z5nbWoWG4o81Nt9FT+IuqUQi+L31ZKAFeJ5Is+A=="],
"@rollup/rollup-linux-riscv64-musl": ["@rollup/rollup-linux-riscv64-musl@4.57.1", "", { "os": "linux", "cpu": "none" }, "sha512-S51t7aMMTNdmAMPpBg7OOsTdn4tySRQvklmL3RpDRyknk87+Sp3xaumlatU+ppQ+5raY7sSTcC2beGgvhENfuw=="],
"@rollup/rollup-linux-s390x-gnu": ["@rollup/rollup-linux-s390x-gnu@4.57.1", "", { "os": "linux", "cpu": "s390x" }, "sha512-Bl00OFnVFkL82FHbEqy3k5CUCKH6OEJL54KCyx2oqsmZnFTR8IoNqBF+mjQVcRCT5sB6yOvK8A37LNm/kPJiZg=="],
"@rollup/rollup-linux-x64-gnu": ["@rollup/rollup-linux-x64-gnu@4.57.1", "", { "os": "linux", "cpu": "x64" }, "sha512-ABca4ceT4N+Tv/GtotnWAeXZUZuM/9AQyCyKYyKnpk4yoA7QIAuBt6Hkgpw8kActYlew2mvckXkvx0FfoInnLg=="],
"@rollup/rollup-linux-x64-musl": ["@rollup/rollup-linux-x64-musl@4.57.1", "", { "os": "linux", "cpu": "x64" }, "sha512-HFps0JeGtuOR2convgRRkHCekD7j+gdAuXM+/i6kGzQtFhlCtQkpwtNzkNj6QhCDp7DRJ7+qC/1Vg2jt5iSOFw=="],
"@rollup/rollup-openbsd-x64": ["@rollup/rollup-openbsd-x64@4.57.1", "", { "os": "openbsd", "cpu": "x64" }, "sha512-H+hXEv9gdVQuDTgnqD+SQffoWoc0Of59AStSzTEj/feWTBAnSfSD3+Dql1ZruJQxmykT/JVY0dE8Ka7z0DH1hw=="],
"@rollup/rollup-openharmony-arm64": ["@rollup/rollup-openharmony-arm64@4.57.1", "", { "os": "none", "cpu": "arm64" }, "sha512-4wYoDpNg6o/oPximyc/NG+mYUejZrCU2q+2w6YZqrAs2UcNUChIZXjtafAiiZSUc7On8v5NyNj34Kzj/Ltk6dQ=="],
"@rollup/rollup-win32-arm64-msvc": ["@rollup/rollup-win32-arm64-msvc@4.57.1", "", { "os": "win32", "cpu": "arm64" }, "sha512-O54mtsV/6LW3P8qdTcamQmuC990HDfR71lo44oZMZlXU4tzLrbvTii87Ni9opq60ds0YzuAlEr/GNwuNluZyMQ=="],
"@rollup/rollup-win32-ia32-msvc": ["@rollup/rollup-win32-ia32-msvc@4.57.1", "", { "os": "win32", "cpu": "ia32" }, "sha512-P3dLS+IerxCT/7D2q2FYcRdWRl22dNbrbBEtxdWhXrfIMPP9lQhb5h4Du04mdl5Woq05jVCDPCMF7Ub0NAjIew=="],
"@rollup/rollup-win32-x64-gnu": ["@rollup/rollup-win32-x64-gnu@4.57.1", "", { "os": "win32", "cpu": "x64" }, "sha512-VMBH2eOOaKGtIJYleXsi2B8CPVADrh+TyNxJ4mWPnKfLB/DBUmzW+5m1xUrcwWoMfSLagIRpjUFeW5CO5hyciQ=="],
"@rollup/rollup-win32-x64-msvc": ["@rollup/rollup-win32-x64-msvc@4.57.1", "", { "os": "win32", "cpu": "x64" }, "sha512-mxRFDdHIWRxg3UfIIAwCm6NzvxG0jDX/wBN6KsQFTvKFqqg9vTrWUE68qEjHt19A5wwx5X5aUi2zuZT7YR0jrA=="],
"@shikijs/core": ["@shikijs/core@2.5.0", "", { "dependencies": { "@shikijs/engine-javascript": "2.5.0", "@shikijs/engine-oniguruma": "2.5.0", "@shikijs/types": "2.5.0", "@shikijs/vscode-textmate": "^10.0.2", "@types/hast": "^3.0.4", "hast-util-to-html": "^9.0.4" } }, "sha512-uu/8RExTKtavlpH7XqnVYBrfBkUc20ngXiX9NSrBhOVZYv/7XQRKUyhtkeflY5QsxC0GbJThCerruZfsUaSldg=="],
"@shikijs/engine-javascript": ["@shikijs/engine-javascript@2.5.0", "", { "dependencies": { "@shikijs/types": "2.5.0", "@shikijs/vscode-textmate": "^10.0.2", "oniguruma-to-es": "^3.1.0" } }, "sha512-VjnOpnQf8WuCEZtNUdjjwGUbtAVKuZkVQ/5cHy/tojVVRIRtlWMYVjyWhxOmIq05AlSOv72z7hRNRGVBgQOl0w=="],
"@shikijs/engine-oniguruma": ["@shikijs/engine-oniguruma@2.5.0", "", { "dependencies": { "@shikijs/types": "2.5.0", "@shikijs/vscode-textmate": "^10.0.2" } }, "sha512-pGd1wRATzbo/uatrCIILlAdFVKdxImWJGQ5rFiB5VZi2ve5xj3Ax9jny8QvkaV93btQEwR/rSz5ERFpC5mKNIw=="],
"@shikijs/langs": ["@shikijs/langs@2.5.0", "", { "dependencies": { "@shikijs/types": "2.5.0" } }, "sha512-Qfrrt5OsNH5R+5tJ/3uYBBZv3SuGmnRPejV9IlIbFH3HTGLDlkqgHymAlzklVmKBjAaVmkPkyikAV/sQ1wSL+w=="],
"@shikijs/themes": ["@shikijs/themes@2.5.0", "", { "dependencies": { "@shikijs/types": "2.5.0" } }, "sha512-wGrk+R8tJnO0VMzmUExHR+QdSaPUl/NKs+a4cQQRWyoc3YFbUzuLEi/KWK1hj+8BfHRKm2jNhhJck1dfstJpiw=="],
"@shikijs/transformers": ["@shikijs/transformers@2.5.0", "", { "dependencies": { "@shikijs/core": "2.5.0", "@shikijs/types": "2.5.0" } }, "sha512-SI494W5X60CaUwgi8u4q4m4s3YAFSxln3tzNjOSYqq54wlVgz0/NbbXEb3mdLbqMBztcmS7bVTaEd2w0qMmfeg=="],
"@shikijs/types": ["@shikijs/types@2.5.0", "", { "dependencies": { "@shikijs/vscode-textmate": "^10.0.2", "@types/hast": "^3.0.4" } }, "sha512-ygl5yhxki9ZLNuNpPitBWvcy9fsSKKaRuO4BAlMyagszQidxcpLAr0qiW/q43DtSIDxO6hEbtYLiFZNXO/hdGw=="],
"@shikijs/vscode-textmate": ["@shikijs/vscode-textmate@10.0.2", "", {}, "sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg=="],
"@types/estree": ["@types/estree@1.0.8", "", {}, "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w=="],
"@types/hast": ["@types/hast@3.0.4", "", { "dependencies": { "@types/unist": "*" } }, "sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ=="],
"@types/linkify-it": ["@types/linkify-it@5.0.0", "", {}, "sha512-sVDA58zAw4eWAffKOaQH5/5j3XeayukzDk+ewSsnv3p4yJEZHCCzMDiZM8e0OUrRvmpGZ85jf4yDHkHsgBNr9Q=="],
"@types/markdown-it": ["@types/markdown-it@14.1.2", "", { "dependencies": { "@types/linkify-it": "^5", "@types/mdurl": "^2" } }, "sha512-promo4eFwuiW+TfGxhi+0x3czqTYJkG8qB17ZUJiVF10Xm7NLVRSLUsfRTU/6h1e24VvRnXCx+hG7li58lkzog=="],
"@types/mdast": ["@types/mdast@4.0.4", "", { "dependencies": { "@types/unist": "*" } }, "sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA=="],
"@types/mdurl": ["@types/mdurl@2.0.0", "", {}, "sha512-RGdgjQUZba5p6QEFAVx2OGb8rQDL/cPRG7GiedRzMcJ1tYnUANBncjbSB1NRGwbvjcPeikRABz2nshyPk1bhWg=="],
"@types/unist": ["@types/unist@3.0.3", "", {}, "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q=="],
"@types/web-bluetooth": ["@types/web-bluetooth@0.0.21", "", {}, "sha512-oIQLCGWtcFZy2JW77j9k8nHzAOpqMHLQejDA48XXMWH6tjCQHz5RCFz1bzsmROyL6PUm+LLnUiI4BCn221inxA=="],
"@ungap/structured-clone": ["@ungap/structured-clone@1.3.0", "", {}, "sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g=="],
"@vitejs/plugin-vue": ["@vitejs/plugin-vue@5.2.4", "", { "peerDependencies": { "vite": "^5.0.0 || ^6.0.0", "vue": "^3.2.25" } }, "sha512-7Yx/SXSOcQq5HiiV3orevHUFn+pmMB4cgbEkDYgnkUWb0WfeQ/wa2yFv6D5ICiCQOVpjA7vYDXrC7AGO8yjDHA=="],
"@vue/compiler-core": ["@vue/compiler-core@3.5.28", "", { "dependencies": { "@babel/parser": "^7.29.0", "@vue/shared": "3.5.28", "entities": "^7.0.1", "estree-walker": "^2.0.2", "source-map-js": "^1.2.1" } }, "sha512-kviccYxTgoE8n6OCw96BNdYlBg2GOWfBuOW4Vqwrt7mSKWKwFVvI8egdTltqRgITGPsTFYtKYfxIG8ptX2PJHQ=="],
"@vue/compiler-dom": ["@vue/compiler-dom@3.5.28", "", { "dependencies": { "@vue/compiler-core": "3.5.28", "@vue/shared": "3.5.28" } }, "sha512-/1ZepxAb159jKR1btkefDP+J2xuWL5V3WtleRmxaT+K2Aqiek/Ab/+Ebrw2pPj0sdHO8ViAyyJWfhXXOP/+LQA=="],
"@vue/compiler-sfc": ["@vue/compiler-sfc@3.5.28", "", { "dependencies": { "@babel/parser": "^7.29.0", "@vue/compiler-core": "3.5.28", "@vue/compiler-dom": "3.5.28", "@vue/compiler-ssr": "3.5.28", "@vue/shared": "3.5.28", "estree-walker": "^2.0.2", "magic-string": "^0.30.21", "postcss": "^8.5.6", "source-map-js": "^1.2.1" } }, "sha512-6TnKMiNkd6u6VeVDhZn/07KhEZuBSn43Wd2No5zaP5s3xm8IqFTHBj84HJah4UepSUJTro5SoqqlOY22FKY96g=="],
"@vue/compiler-ssr": ["@vue/compiler-ssr@3.5.28", "", { "dependencies": { "@vue/compiler-dom": "3.5.28", "@vue/shared": "3.5.28" } }, "sha512-JCq//9w1qmC6UGLWJX7RXzrGpKkroubey/ZFqTpvEIDJEKGgntuDMqkuWiZvzTzTA5h2qZvFBFHY7fAAa9475g=="],
"@vue/devtools-api": ["@vue/devtools-api@7.7.9", "", { "dependencies": { "@vue/devtools-kit": "^7.7.9" } }, "sha512-kIE8wvwlcZ6TJTbNeU2HQNtaxLx3a84aotTITUuL/4bzfPxzajGBOoqjMhwZJ8L9qFYDU/lAYMEEm11dnZOD6g=="],
"@vue/devtools-kit": ["@vue/devtools-kit@7.7.9", "", { "dependencies": { "@vue/devtools-shared": "^7.7.9", "birpc": "^2.3.0", "hookable": "^5.5.3", "mitt": "^3.0.1", "perfect-debounce": "^1.0.0", "speakingurl": "^14.0.1", "superjson": "^2.2.2" } }, "sha512-PyQ6odHSgiDVd4hnTP+aDk2X4gl2HmLDfiyEnn3/oV+ckFDuswRs4IbBT7vacMuGdwY/XemxBoh302ctbsptuA=="],
"@vue/devtools-shared": ["@vue/devtools-shared@7.7.9", "", { "dependencies": { "rfdc": "^1.4.1" } }, "sha512-iWAb0v2WYf0QWmxCGy0seZNDPdO3Sp5+u78ORnyeonS6MT4PC7VPrryX2BpMJrwlDeaZ6BD4vP4XKjK0SZqaeA=="],
"@vue/reactivity": ["@vue/reactivity@3.5.28", "", { "dependencies": { "@vue/shared": "3.5.28" } }, "sha512-gr5hEsxvn+RNyu9/9o1WtdYdwDjg5FgjUSBEkZWqgTKlo/fvwZ2+8W6AfKsc9YN2k/+iHYdS9vZYAhpi10kNaw=="],
"@vue/runtime-core": ["@vue/runtime-core@3.5.28", "", { "dependencies": { "@vue/reactivity": "3.5.28", "@vue/shared": "3.5.28" } }, "sha512-POVHTdbgnrBBIpnbYU4y7pOMNlPn2QVxVzkvEA2pEgvzbelQq4ZOUxbp2oiyo+BOtiYlm8Q44wShHJoBvDPAjQ=="],
"@vue/runtime-dom": ["@vue/runtime-dom@3.5.28", "", { "dependencies": { "@vue/reactivity": "3.5.28", "@vue/runtime-core": "3.5.28", "@vue/shared": "3.5.28", "csstype": "^3.2.3" } }, "sha512-4SXxSF8SXYMuhAIkT+eBRqOkWEfPu6nhccrzrkioA6l0boiq7sp18HCOov9qWJA5HML61kW8p/cB4MmBiG9dSA=="],
"@vue/server-renderer": ["@vue/server-renderer@3.5.28", "", { "dependencies": { "@vue/compiler-ssr": "3.5.28", "@vue/shared": "3.5.28" }, "peerDependencies": { "vue": "3.5.28" } }, "sha512-pf+5ECKGj8fX95bNincbzJ6yp6nyzuLDhYZCeFxUNp8EBrQpPpQaLX3nNCp49+UbgbPun3CeVE+5CXVV1Xydfg=="],
"@vue/shared": ["@vue/shared@3.5.28", "", {}, "sha512-cfWa1fCGBxrvaHRhvV3Is0MgmrbSCxYTXCSCau2I0a1Xw1N1pHAvkWCiXPRAqjvToILvguNyEwjevUqAuBQWvQ=="],
"@vueuse/core": ["@vueuse/core@12.8.2", "", { "dependencies": { "@types/web-bluetooth": "^0.0.21", "@vueuse/metadata": "12.8.2", "@vueuse/shared": "12.8.2", "vue": "^3.5.13" } }, "sha512-HbvCmZdzAu3VGi/pWYm5Ut+Kd9mn1ZHnn4L5G8kOQTPs/IwIAmJoBrmYk2ckLArgMXZj0AW3n5CAejLUO+PhdQ=="],
"@vueuse/integrations": ["@vueuse/integrations@12.8.2", "", { "dependencies": { "@vueuse/core": "12.8.2", "@vueuse/shared": "12.8.2", "vue": "^3.5.13" }, "peerDependencies": { "async-validator": "^4", "axios": "^1", "change-case": "^5", "drauu": "^0.4", "focus-trap": "^7", "fuse.js": "^7", "idb-keyval": "^6", "jwt-decode": "^4", "nprogress": "^0.2", "qrcode": "^1.5", "sortablejs": "^1", "universal-cookie": "^7" }, "optionalPeers": ["async-validator", "axios", "change-case", "drauu", "focus-trap", "fuse.js", "idb-keyval", "jwt-decode", "nprogress", "qrcode", "sortablejs", "universal-cookie"] }, "sha512-fbGYivgK5uBTRt7p5F3zy6VrETlV9RtZjBqd1/HxGdjdckBgBM4ugP8LHpjolqTj14TXTxSK1ZfgPbHYyGuH7g=="],
"@vueuse/metadata": ["@vueuse/metadata@12.8.2", "", {}, "sha512-rAyLGEuoBJ/Il5AmFHiziCPdQzRt88VxR+Y/A/QhJ1EWtWqPBBAxTAFaSkviwEuOEZNtW8pvkPgoCZQ+HxqW1A=="],
"@vueuse/shared": ["@vueuse/shared@12.8.2", "", { "dependencies": { "vue": "^3.5.13" } }, "sha512-dznP38YzxZoNloI0qpEfpkms8knDtaoQ6Y/sfS0L7Yki4zh40LFHEhur0odJC6xTHG5dxWVPiUWBXn+wCG2s5w=="],
"algoliasearch": ["algoliasearch@5.48.0", "", { "dependencies": { "@algolia/abtesting": "1.14.0", "@algolia/client-abtesting": "5.48.0", "@algolia/client-analytics": "5.48.0", "@algolia/client-common": "5.48.0", "@algolia/client-insights": "5.48.0", "@algolia/client-personalization": "5.48.0", "@algolia/client-query-suggestions": "5.48.0", "@algolia/client-search": "5.48.0", "@algolia/ingestion": "1.48.0", "@algolia/monitoring": "1.48.0", "@algolia/recommend": "5.48.0", "@algolia/requester-browser-xhr": "5.48.0", "@algolia/requester-fetch": "5.48.0", "@algolia/requester-node-http": "5.48.0" } }, "sha512-aD8EQC6KEman6/S79FtPdQmB7D4af/etcRL/KwiKFKgAE62iU8c5PeEQvpvIcBPurC3O/4Lj78nOl7ZcoazqSw=="],
"birpc": ["birpc@2.9.0", "", {}, "sha512-KrayHS5pBi69Xi9JmvoqrIgYGDkD6mcSe/i6YKi3w5kekCLzrX4+nawcXqrj2tIp50Kw/mT/s3p+GVK0A0sKxw=="],
"ccount": ["ccount@2.0.1", "", {}, "sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg=="],
"character-entities-html4": ["character-entities-html4@2.1.0", "", {}, "sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA=="],
"character-entities-legacy": ["character-entities-legacy@3.0.0", "", {}, "sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ=="],
"comma-separated-tokens": ["comma-separated-tokens@2.0.3", "", {}, "sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg=="],
"copy-anything": ["copy-anything@4.0.5", "", { "dependencies": { "is-what": "^5.2.0" } }, "sha512-7Vv6asjS4gMOuILabD3l739tsaxFQmC+a7pLZm02zyvs8p977bL3zEgq3yDk5rn9B0PbYgIv++jmHcuUab4RhA=="],
"csstype": ["csstype@3.2.3", "", {}, "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ=="],
"dequal": ["dequal@2.0.3", "", {}, "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA=="],
"devlop": ["devlop@1.1.0", "", { "dependencies": { "dequal": "^2.0.0" } }, "sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA=="],
"emoji-regex-xs": ["emoji-regex-xs@1.0.0", "", {}, "sha512-LRlerrMYoIDrT6jgpeZ2YYl/L8EulRTt5hQcYjy5AInh7HWXKimpqx68aknBFpGL2+/IcogTcaydJEgaTmOpDg=="],
"entities": ["entities@7.0.1", "", {}, "sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA=="],
"esbuild": ["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" }, "bin": { "esbuild": "bin/esbuild" } }, "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw=="],
"estree-walker": ["estree-walker@2.0.2", "", {}, "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w=="],
"focus-trap": ["focus-trap@7.8.0", "", { "dependencies": { "tabbable": "^6.4.0" } }, "sha512-/yNdlIkpWbM0ptxno3ONTuf+2g318kh2ez3KSeZN5dZ8YC6AAmgeWz+GasYYiBJPFaYcSAPeu4GfhUaChzIJXA=="],
"fsevents": ["fsevents@2.3.3", "", { "os": "darwin" }, "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw=="],
"hast-util-to-html": ["hast-util-to-html@9.0.5", "", { "dependencies": { "@types/hast": "^3.0.0", "@types/unist": "^3.0.0", "ccount": "^2.0.0", "comma-separated-tokens": "^2.0.0", "hast-util-whitespace": "^3.0.0", "html-void-elements": "^3.0.0", "mdast-util-to-hast": "^13.0.0", "property-information": "^7.0.0", "space-separated-tokens": "^2.0.0", "stringify-entities": "^4.0.0", "zwitch": "^2.0.4" } }, "sha512-OguPdidb+fbHQSU4Q4ZiLKnzWo8Wwsf5bZfbvu7//a9oTYoqD/fWpe96NuHkoS9h0ccGOTe0C4NGXdtS0iObOw=="],
"hast-util-whitespace": ["hast-util-whitespace@3.0.0", "", { "dependencies": { "@types/hast": "^3.0.0" } }, "sha512-88JUN06ipLwsnv+dVn+OIYOvAuvBMy/Qoi6O7mQHxdPXpjy+Cd6xRkWwux7DKO+4sYILtLBRIKgsdpS2gQc7qw=="],
"hookable": ["hookable@5.5.3", "", {}, "sha512-Yc+BQe8SvoXH1643Qez1zqLRmbA5rCL+sSmk6TVos0LWVfNIB7PGncdlId77WzLGSIB5KaWgTaNTs2lNVEI6VQ=="],
"html-void-elements": ["html-void-elements@3.0.0", "", {}, "sha512-bEqo66MRXsUGxWHV5IP0PUiAWwoEjba4VCzg0LjFJBpchPaTfyfCKTG6bc5F8ucKec3q5y6qOdGyYTSBEvhCrg=="],
"is-what": ["is-what@5.5.0", "", {}, "sha512-oG7cgbmg5kLYae2N5IVd3jm2s+vldjxJzK1pcu9LfpGuQ93MQSzo0okvRna+7y5ifrD+20FE8FvjusyGaz14fw=="],
"magic-string": ["magic-string@0.30.21", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.5" } }, "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ=="],
"mark.js": ["mark.js@8.11.1", "", {}, "sha512-1I+1qpDt4idfgLQG+BNWmrqku+7/2bi5nLf4YwF8y8zXvmfiTBY3PV3ZibfrjBueCByROpuBjLLFCajqkgYoLQ=="],
"mdast-util-to-hast": ["mdast-util-to-hast@13.2.1", "", { "dependencies": { "@types/hast": "^3.0.0", "@types/mdast": "^4.0.0", "@ungap/structured-clone": "^1.0.0", "devlop": "^1.0.0", "micromark-util-sanitize-uri": "^2.0.0", "trim-lines": "^3.0.0", "unist-util-position": "^5.0.0", "unist-util-visit": "^5.0.0", "vfile": "^6.0.0" } }, "sha512-cctsq2wp5vTsLIcaymblUriiTcZd0CwWtCbLvrOzYCDZoWyMNV8sZ7krj09FSnsiJi3WVsHLM4k6Dq/yaPyCXA=="],
"micromark-util-character": ["micromark-util-character@2.1.1", "", { "dependencies": { "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q=="],
"micromark-util-encode": ["micromark-util-encode@2.0.1", "", {}, "sha512-c3cVx2y4KqUnwopcO9b/SCdo2O67LwJJ/UyqGfbigahfegL9myoEFoDYZgkT7f36T0bLrM9hZTAaAyH+PCAXjw=="],
"micromark-util-sanitize-uri": ["micromark-util-sanitize-uri@2.0.1", "", { "dependencies": { "micromark-util-character": "^2.0.0", "micromark-util-encode": "^2.0.0", "micromark-util-symbol": "^2.0.0" } }, "sha512-9N9IomZ/YuGGZZmQec1MbgxtlgougxTodVwDzzEouPKo3qFWvymFHWcnDi2vzV1ff6kas9ucW+o3yzJK9YB1AQ=="],
"micromark-util-symbol": ["micromark-util-symbol@2.0.1", "", {}, "sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q=="],
"micromark-util-types": ["micromark-util-types@2.0.2", "", {}, "sha512-Yw0ECSpJoViF1qTU4DC6NwtC4aWGt1EkzaQB8KPPyCRR8z9TWeV0HbEFGTO+ZY1wB22zmxnJqhPyTpOVCpeHTA=="],
"minisearch": ["minisearch@7.2.0", "", {}, "sha512-dqT2XBYUOZOiC5t2HRnwADjhNS2cecp9u+TJRiJ1Qp/f5qjkeT5APcGPjHw+bz89Ms8Jp+cG4AlE+QZ/QnDglg=="],
"mitt": ["mitt@3.0.1", "", {}, "sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw=="],
"nanoid": ["nanoid@3.3.11", "", { "bin": { "nanoid": "bin/nanoid.cjs" } }, "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w=="],
"oniguruma-to-es": ["oniguruma-to-es@3.1.1", "", { "dependencies": { "emoji-regex-xs": "^1.0.0", "regex": "^6.0.1", "regex-recursion": "^6.0.2" } }, "sha512-bUH8SDvPkH3ho3dvwJwfonjlQ4R80vjyvrU8YpxuROddv55vAEJrTuCuCVUhhsHbtlD9tGGbaNApGQckXhS8iQ=="],
"perfect-debounce": ["perfect-debounce@1.0.0", "", {}, "sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA=="],
"picocolors": ["picocolors@1.1.1", "", {}, "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA=="],
"postcss": ["postcss@8.5.6", "", { "dependencies": { "nanoid": "^3.3.11", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" } }, "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg=="],
"preact": ["preact@10.19.3", "", {}, "sha512-nHHTeFVBTHRGxJXKkKu5hT8C/YWBkPso4/Gad6xuj5dbptt9iF9NZr9pHbPhBrnT2klheu7mHTxTZ/LjwJiEiQ=="],
"property-information": ["property-information@7.1.0", "", {}, "sha512-TwEZ+X+yCJmYfL7TPUOcvBZ4QfoT5YenQiJuX//0th53DE6w0xxLEtfK3iyryQFddXuvkIk51EEgrJQ0WJkOmQ=="],
"regex": ["regex@6.1.0", "", { "dependencies": { "regex-utilities": "^2.3.0" } }, "sha512-6VwtthbV4o/7+OaAF9I5L5V3llLEsoPyq9P1JVXkedTP33c7MfCG0/5NOPcSJn0TzXcG9YUrR0gQSWioew3LDg=="],
"regex-recursion": ["regex-recursion@6.0.2", "", { "dependencies": { "regex-utilities": "^2.3.0" } }, "sha512-0YCaSCq2VRIebiaUviZNs0cBz1kg5kVS2UKUfNIx8YVs1cN3AV7NTctO5FOKBA+UT2BPJIWZauYHPqJODG50cg=="],
"regex-utilities": ["regex-utilities@2.3.0", "", {}, "sha512-8VhliFJAWRaUiVvREIiW2NXXTmHs4vMNnSzuJVhscgmGav3g9VDxLrQndI3dZZVVdp0ZO/5v0xmX516/7M9cng=="],
"rfdc": ["rfdc@1.4.1", "", {}, "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA=="],
"rollup": ["rollup@4.57.1", "", { "dependencies": { "@types/estree": "1.0.8" }, "optionalDependencies": { "@rollup/rollup-android-arm-eabi": "4.57.1", "@rollup/rollup-android-arm64": "4.57.1", "@rollup/rollup-darwin-arm64": "4.57.1", "@rollup/rollup-darwin-x64": "4.57.1", "@rollup/rollup-freebsd-arm64": "4.57.1", "@rollup/rollup-freebsd-x64": "4.57.1", "@rollup/rollup-linux-arm-gnueabihf": "4.57.1", "@rollup/rollup-linux-arm-musleabihf": "4.57.1", "@rollup/rollup-linux-arm64-gnu": "4.57.1", "@rollup/rollup-linux-arm64-musl": "4.57.1", "@rollup/rollup-linux-loong64-gnu": "4.57.1", "@rollup/rollup-linux-loong64-musl": "4.57.1", "@rollup/rollup-linux-ppc64-gnu": "4.57.1", "@rollup/rollup-linux-ppc64-musl": "4.57.1", "@rollup/rollup-linux-riscv64-gnu": "4.57.1", "@rollup/rollup-linux-riscv64-musl": "4.57.1", "@rollup/rollup-linux-s390x-gnu": "4.57.1", "@rollup/rollup-linux-x64-gnu": "4.57.1", "@rollup/rollup-linux-x64-musl": "4.57.1", "@rollup/rollup-openbsd-x64": "4.57.1", "@rollup/rollup-openharmony-arm64": "4.57.1", "@rollup/rollup-win32-arm64-msvc": "4.57.1", "@rollup/rollup-win32-ia32-msvc": "4.57.1", "@rollup/rollup-win32-x64-gnu": "4.57.1", "@rollup/rollup-win32-x64-msvc": "4.57.1", "fsevents": "~2.3.2" }, "bin": { "rollup": "dist/bin/rollup" } }, "sha512-oQL6lgK3e2QZeQ7gcgIkS2YZPg5slw37hYufJ3edKlfQSGGm8ICoxswK15ntSzF/a8+h7ekRy7k7oWc3BQ7y8A=="],
"search-insights": ["search-insights@2.13.0", "", {}, "sha512-Orrsjf9trHHxFRuo9/rzm0KIWmgzE8RMlZMzuhZOJ01Rnz3D0YBAe+V6473t6/H6c7irs6Lt48brULAiRWb3Vw=="],
"shiki": ["shiki@2.5.0", "", { "dependencies": { "@shikijs/core": "2.5.0", "@shikijs/engine-javascript": "2.5.0", "@shikijs/engine-oniguruma": "2.5.0", "@shikijs/langs": "2.5.0", "@shikijs/themes": "2.5.0", "@shikijs/types": "2.5.0", "@shikijs/vscode-textmate": "^10.0.2", "@types/hast": "^3.0.4" } }, "sha512-mI//trrsaiCIPsja5CNfsyNOqgAZUb6VpJA+340toL42UpzQlXpwRV9nch69X6gaUxrr9kaOOa6e3y3uAkGFxQ=="],
"source-map-js": ["source-map-js@1.2.1", "", {}, "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA=="],
"space-separated-tokens": ["space-separated-tokens@2.0.2", "", {}, "sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q=="],
"speakingurl": ["speakingurl@14.0.1", "", {}, "sha512-1POYv7uv2gXoyGFpBCmpDVSNV74IfsWlDW216UPjbWufNf+bSU6GdbDsxdcxtfwb4xlI3yxzOTKClUosxARYrQ=="],
"stringify-entities": ["stringify-entities@4.0.4", "", { "dependencies": { "character-entities-html4": "^2.0.0", "character-entities-legacy": "^3.0.0" } }, "sha512-IwfBptatlO+QCJUo19AqvrPNqlVMpW9YEL2LIVY+Rpv2qsjCGxaDLNRgeGsQWJhfItebuJhsGSLjaBbNSQ+ieg=="],
"superjson": ["superjson@2.2.6", "", { "dependencies": { "copy-anything": "^4" } }, "sha512-H+ue8Zo4vJmV2nRjpx86P35lzwDT3nItnIsocgumgr0hHMQ+ZGq5vrERg9kJBo5AWGmxZDhzDo+WVIJqkB0cGA=="],
"tabbable": ["tabbable@6.4.0", "", {}, "sha512-05PUHKSNE8ou2dwIxTngl4EzcnsCDZGJ/iCLtDflR/SHB/ny14rXc+qU5P4mG9JkusiV7EivzY9Mhm55AzAvCg=="],
"trim-lines": ["trim-lines@3.0.1", "", {}, "sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg=="],
"unist-util-is": ["unist-util-is@6.0.1", "", { "dependencies": { "@types/unist": "^3.0.0" } }, "sha512-LsiILbtBETkDz8I9p1dQ0uyRUWuaQzd/cuEeS1hoRSyW5E5XGmTzlwY1OrNzzakGowI9Dr/I8HVaw4hTtnxy8g=="],
"unist-util-position": ["unist-util-position@5.0.0", "", { "dependencies": { "@types/unist": "^3.0.0" } }, "sha512-fucsC7HjXvkB5R3kTCO7kUjRdrS0BJt3M/FPxmHMBOm8JQi2BsHAHFsy27E0EolP8rp0NzXsJ+jNPyDWvOJZPA=="],
"unist-util-stringify-position": ["unist-util-stringify-position@4.0.0", "", { "dependencies": { "@types/unist": "^3.0.0" } }, "sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ=="],
"unist-util-visit": ["unist-util-visit@5.1.0", "", { "dependencies": { "@types/unist": "^3.0.0", "unist-util-is": "^6.0.0", "unist-util-visit-parents": "^6.0.0" } }, "sha512-m+vIdyeCOpdr/QeQCu2EzxX/ohgS8KbnPDgFni4dQsfSCtpz8UqDyY5GjRru8PDKuYn7Fq19j1CQ+nJSsGKOzg=="],
"unist-util-visit-parents": ["unist-util-visit-parents@6.0.2", "", { "dependencies": { "@types/unist": "^3.0.0", "unist-util-is": "^6.0.0" } }, "sha512-goh1s1TBrqSqukSc8wrjwWhL0hiJxgA8m4kFxGlQ+8FYQ3C/m11FcTs4YYem7V664AhHVvgoQLk890Ssdsr2IQ=="],
"vfile": ["vfile@6.0.3", "", { "dependencies": { "@types/unist": "^3.0.0", "vfile-message": "^4.0.0" } }, "sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q=="],
"vfile-message": ["vfile-message@4.0.3", "", { "dependencies": { "@types/unist": "^3.0.0", "unist-util-stringify-position": "^4.0.0" } }, "sha512-QTHzsGd1EhbZs4AsQ20JX1rC3cOlt/IWJruk893DfLRr57lcnOeMaWG4K0JrRta4mIJZKth2Au3mM3u03/JWKw=="],
"vite": ["vite@5.4.21", "", { "dependencies": { "esbuild": "^0.21.3", "postcss": "^8.4.43", "rollup": "^4.20.0" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "peerDependencies": { "@types/node": "^18.0.0 || >=20.0.0", "less": "*", "lightningcss": "^1.21.0", "sass": "*", "sass-embedded": "*", "stylus": "*", "sugarss": "*", "terser": "^5.4.0" }, "optionalPeers": ["@types/node", "less", "lightningcss", "sass", "sass-embedded", "stylus", "sugarss", "terser"], "bin": { "vite": "bin/vite.js" } }, "sha512-o5a9xKjbtuhY6Bi5S3+HvbRERmouabWbyUcpXXUA1u+GNUKoROi9byOJ8M0nHbHYHkYICiMlqxkg1KkYmm25Sw=="],
"vitepress": ["vitepress@1.6.4", "", { "dependencies": { "@docsearch/css": "3.8.2", "@docsearch/js": "3.8.2", "@iconify-json/simple-icons": "^1.2.21", "@shikijs/core": "^2.1.0", "@shikijs/transformers": "^2.1.0", "@shikijs/types": "^2.1.0", "@types/markdown-it": "^14.1.2", "@vitejs/plugin-vue": "^5.2.1", "@vue/devtools-api": "^7.7.0", "@vue/shared": "^3.5.13", "@vueuse/core": "^12.4.0", "@vueuse/integrations": "^12.4.0", "focus-trap": "^7.6.4", "mark.js": "8.11.1", "minisearch": "^7.1.1", "shiki": "^2.1.0", "vite": "^5.4.14", "vue": "^3.5.13" }, "peerDependencies": { "markdown-it-mathjax3": "^4", "postcss": "^8" }, "optionalPeers": ["markdown-it-mathjax3", "postcss"], "bin": { "vitepress": "bin/vitepress.js" } }, "sha512-+2ym1/+0VVrbhNyRoFFesVvBvHAVMZMK0rw60E3X/5349M1GuVdKeazuksqopEdvkKwKGs21Q729jX81/bkBJg=="],
"vue": ["vue@3.5.28", "", { "dependencies": { "@vue/compiler-dom": "3.5.28", "@vue/compiler-sfc": "3.5.28", "@vue/runtime-dom": "3.5.28", "@vue/server-renderer": "3.5.28", "@vue/shared": "3.5.28" }, "peerDependencies": { "typescript": "*" }, "optionalPeers": ["typescript"] }, "sha512-BRdrNfeoccSoIZeIhyPBfvWSLFP4q8J3u8Ju8Ug5vu3LdD+yTM13Sg4sKtljxozbnuMu1NB1X5HBHRYUzFocKg=="],
"zwitch": ["zwitch@2.0.4", "", {}, "sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A=="],
}
}

View file

@ -1,52 +1,52 @@
{
"hash": "64a640d4",
"configHash": "3539395e",
"lockfileHash": "16b933ee",
"browserHash": "761a6f81",
"hash": "f3a26489",
"configHash": "4a0428f0",
"lockfileHash": "fbe7d3cd",
"browserHash": "8e057cea",
"optimized": {
"vue": {
"src": "../../../../node_modules/vue/dist/vue.runtime.esm-bundler.js",
"file": "vue.js",
"fileHash": "2232d95d",
"fileHash": "a0185409",
"needsInterop": false
},
"vitepress > @vue/devtools-api": {
"src": "../../../../node_modules/@vue/devtools-api/lib/esm/index.js",
"src": "../../../../node_modules/@vue/devtools-api/dist/index.js",
"file": "vitepress___@vue_devtools-api.js",
"fileHash": "ea18bfc8",
"fileHash": "8ada93ae",
"needsInterop": false
},
"vitepress > @vueuse/core": {
"src": "../../../../node_modules/@vueuse/core/index.mjs",
"file": "vitepress___@vueuse_core.js",
"fileHash": "1889f635",
"fileHash": "2d8ce331",
"needsInterop": false
},
"vitepress > @vueuse/integrations/useFocusTrap": {
"src": "../../../../node_modules/@vueuse/integrations/useFocusTrap.mjs",
"file": "vitepress___@vueuse_integrations_useFocusTrap.js",
"fileHash": "84f193d7",
"fileHash": "1e108db2",
"needsInterop": false
},
"vitepress > mark.js/src/vanilla.js": {
"src": "../../../../node_modules/mark.js/src/vanilla.js",
"file": "vitepress___mark__js_src_vanilla__js.js",
"fileHash": "3dbcfe04",
"fileHash": "2ceafc1e",
"needsInterop": false
},
"vitepress > minisearch": {
"src": "../../../../node_modules/minisearch/dist/es/index.js",
"file": "vitepress___minisearch.js",
"fileHash": "5c47da60",
"fileHash": "e70ffd6d",
"needsInterop": false
}
},
"chunks": {
"chunk-WFT6MZEP": {
"file": "chunk-WFT6MZEP.js"
"chunk-A2ZJ3B6G": {
"file": "chunk-A2ZJ3B6G.js"
},
"chunk-3YS4HNIT": {
"file": "chunk-3YS4HNIT.js"
"chunk-SNNOYR6U": {
"file": "chunk-SNNOYR6U.js"
}
}
}

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

View file

@ -5,12 +5,15 @@ import {
assert,
breakpointsAntDesign,
breakpointsBootstrapV5,
breakpointsElement,
breakpointsMasterCss,
breakpointsPrimeFlex,
breakpointsQuasar,
breakpointsSematic,
breakpointsTailwind,
breakpointsVuetify,
breakpointsVuetifyV2,
breakpointsVuetifyV3,
bypassFilter,
camelize,
clamp,
@ -26,6 +29,7 @@ import {
createFilterWrapper,
createGlobalState,
createInjectionState,
createRef,
createReusableTemplate,
createSharedComposable,
createSingletonPromise,
@ -37,7 +41,6 @@ import {
defaultLocation,
defaultNavigator,
defaultWindow,
directiveHooks,
executeTransition,
extendRef,
formatDate,
@ -67,6 +70,7 @@ import {
objectOmit,
objectPick,
onClickOutside,
onElementRemoval,
onKeyDown,
onKeyPressed,
onKeyStroke,
@ -76,6 +80,8 @@ import {
pausableFilter,
promiseTimeout,
provideLocal,
provideSSRWidth,
pxValue,
rand,
reactify,
reactifyObject,
@ -96,6 +102,7 @@ import {
templateRef,
throttleFilter,
timestamp,
toArray,
toReactive,
toRef,
toRefs,
@ -135,6 +142,7 @@ import {
useCloned,
useColorMode,
useConfirmDialog,
useCountdown,
useCounter,
useCssVar,
useCurrentElement,
@ -209,10 +217,12 @@ import {
usePreferredDark,
usePreferredLanguages,
usePreferredReducedMotion,
usePreferredReducedTransparency,
usePrevious,
useRafFn,
useRefHistory,
useResizeObserver,
useSSRWidth,
useScreenOrientation,
useScreenSafeArea,
useScriptTag,
@ -271,8 +281,8 @@ import {
watchTriggerable,
watchWithFilter,
whenever
} from "./chunk-WFT6MZEP.js";
import "./chunk-3YS4HNIT.js";
} from "./chunk-A2ZJ3B6G.js";
import "./chunk-SNNOYR6U.js";
export {
DefaultMagicKeysAliasMap,
StorageSerializers,
@ -282,12 +292,15 @@ export {
refAutoReset as autoResetRef,
breakpointsAntDesign,
breakpointsBootstrapV5,
breakpointsElement,
breakpointsMasterCss,
breakpointsPrimeFlex,
breakpointsQuasar,
breakpointsSematic,
breakpointsTailwind,
breakpointsVuetify,
breakpointsVuetifyV2,
breakpointsVuetifyV3,
bypassFilter,
camelize,
clamp,
@ -305,6 +318,7 @@ export {
createGlobalState,
createInjectionState,
reactify as createReactiveFn,
createRef,
createReusableTemplate,
createSharedComposable,
createSingletonPromise,
@ -318,7 +332,6 @@ export {
defaultLocation,
defaultNavigator,
defaultWindow,
directiveHooks,
computedEager as eagerComputed,
executeTransition,
extendRef,
@ -350,6 +363,7 @@ export {
objectOmit,
objectPick,
onClickOutside,
onElementRemoval,
onKeyDown,
onKeyPressed,
onKeyStroke,
@ -360,6 +374,8 @@ export {
watchPausable as pausableWatch,
promiseTimeout,
provideLocal,
provideSSRWidth,
pxValue,
rand,
reactify,
reactifyObject,
@ -382,6 +398,7 @@ export {
refThrottled as throttledRef,
watchThrottled as throttledWatch,
timestamp,
toArray,
toReactive,
toRef,
toRefs,
@ -421,6 +438,7 @@ export {
useCloned,
useColorMode,
useConfirmDialog,
useCountdown,
useCounter,
useCssVar,
useCurrentElement,
@ -496,10 +514,12 @@ export {
usePreferredDark,
usePreferredLanguages,
usePreferredReducedMotion,
usePreferredReducedTransparency,
usePrevious,
useRafFn,
useRefHistory,
useResizeObserver,
useSSRWidth,
useScreenOrientation,
useScreenSafeArea,
useScriptTag,

View file

@ -1,14 +1,18 @@
import {
notNullish,
toArray,
tryOnScopeDispose,
unrefElement
} from "./chunk-WFT6MZEP.js";
} from "./chunk-A2ZJ3B6G.js";
import {
ref,
computed,
shallowRef,
toValue,
watch
} from "./chunk-3YS4HNIT.js";
} from "./chunk-SNNOYR6U.js";
// node_modules/tabbable/dist/index.esm.js
var candidateSelectors = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])", "a[href]:not([inert])", "button:not([inert])", "[tabindex]:not(slot):not([inert])", "audio[controls]:not([inert])", "video[controls]:not([inert])", '[contenteditable]:not([contenteditable="false"]):not([inert])', "details>summary:first-of-type:not([inert])", "details:not([inert])"];
var candidateSelectors = ["input:not([inert]):not([inert] *)", "select:not([inert]):not([inert] *)", "textarea:not([inert]):not([inert] *)", "a[href]:not([inert]):not([inert] *)", "button:not([inert]):not([inert] *)", "[tabindex]:not(slot):not([inert]):not([inert] *)", "audio[controls]:not([inert]):not([inert] *)", "video[controls]:not([inert]):not([inert] *)", '[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)', "details>summary:first-of-type:not([inert]):not([inert] *)", "details:not([inert]):not([inert] *)"];
var candidateSelector = candidateSelectors.join(",");
var NoElement = typeof Element === "undefined";
var matches = NoElement ? function() {
@ -19,14 +23,16 @@ var getRootNode = !NoElement && Element.prototype.getRootNode ? function(element
} : function(element) {
return element === null || element === void 0 ? void 0 : element.ownerDocument;
};
var isInert = function isInert2(node, lookUp) {
var _isInert = function isInert(node, lookUp) {
var _node$getAttribute;
if (lookUp === void 0) {
lookUp = true;
}
var inertAtt = node === null || node === void 0 ? void 0 : (_node$getAttribute = node.getAttribute) === null || _node$getAttribute === void 0 ? void 0 : _node$getAttribute.call(node, "inert");
var inert = inertAtt === "" || inertAtt === "true";
var result = inert || lookUp && node && isInert2(node.parentNode);
var result = inert || lookUp && node && // closest does not exist on shadow roots, so we fall back to a manual
// lookup upward, in case it is not defined.
(typeof node.closest === "function" ? node.closest("[inert]") : _isInert(node.parentNode));
return result;
};
var isContentEditable = function isContentEditable2(node) {
@ -35,7 +41,7 @@ var isContentEditable = function isContentEditable2(node) {
return attValue === "" || attValue === "true";
};
var getCandidates = function getCandidates2(el, includeContainer, filter) {
if (isInert(el)) {
if (_isInert(el)) {
return [];
}
var candidates = Array.prototype.slice.apply(el.querySelectorAll(candidateSelector));
@ -45,18 +51,18 @@ var getCandidates = function getCandidates2(el, includeContainer, filter) {
candidates = candidates.filter(filter);
return candidates;
};
var getCandidatesIteratively = function getCandidatesIteratively2(elements, includeContainer, options) {
var _getCandidatesIteratively = function getCandidatesIteratively(elements, includeContainer, options) {
var candidates = [];
var elementsToCheck = Array.from(elements);
while (elementsToCheck.length) {
var element = elementsToCheck.shift();
if (isInert(element, false)) {
if (_isInert(element, false)) {
continue;
}
if (element.tagName === "SLOT") {
var assigned = element.assignedElements();
var content = assigned.length ? assigned : element.children;
var nestedCandidates = getCandidatesIteratively2(content, true, options);
var nestedCandidates = _getCandidatesIteratively(content, true, options);
if (options.flatten) {
candidates.push.apply(candidates, nestedCandidates);
} else {
@ -72,9 +78,9 @@ var getCandidatesIteratively = function getCandidatesIteratively2(elements, incl
}
var shadowRoot = element.shadowRoot || // check for an undisclosed shadow
typeof options.getShadowRoot === "function" && options.getShadowRoot(element);
var validShadowRoot = !isInert(shadowRoot, false) && (!options.shadowRootFilter || options.shadowRootFilter(element));
var validShadowRoot = !_isInert(shadowRoot, false) && (!options.shadowRootFilter || options.shadowRootFilter(element));
if (shadowRoot && validShadowRoot) {
var _nestedCandidates = getCandidatesIteratively2(shadowRoot === true ? element.children : shadowRoot.children, true, options);
var _nestedCandidates = _getCandidatesIteratively(shadowRoot === true ? element.children : shadowRoot.children, true, options);
if (options.flatten) {
candidates.push.apply(candidates, _nestedCandidates);
} else {
@ -184,6 +190,24 @@ var isZeroArea = function isZeroArea2(node) {
};
var isHidden = function isHidden2(node, _ref) {
var displayCheck = _ref.displayCheck, getShadowRoot = _ref.getShadowRoot;
if (displayCheck === "full-native") {
if ("checkVisibility" in node) {
var visible = node.checkVisibility({
// Checking opacity might be desirable for some use cases, but natively,
// opacity zero elements _are_ focusable and tabbable.
checkOpacity: false,
opacityProperty: false,
contentVisibilityAuto: true,
visibilityProperty: true,
// This is an alias for `visibilityProperty`. Contemporary browsers
// support both. However, this alias has wider browser support (Chrome
// >= 105 and Firefox >= 106, vs. Chrome >= 121 and Firefox >= 122), so
// we include it anyway.
checkVisibilityCSS: true
});
return !visible;
}
}
if (getComputedStyle(node).visibility === "hidden") {
return true;
}
@ -192,7 +216,9 @@ var isHidden = function isHidden2(node, _ref) {
if (matches.call(nodeUnderDetails, "details:not([open]) *")) {
return true;
}
if (!displayCheck || displayCheck === "full" || displayCheck === "legacy-full") {
if (!displayCheck || displayCheck === "full" || // full-native can run this branch when it falls through in case
// Element#checkVisibility is unsupported
displayCheck === "full-native" || displayCheck === "legacy-full") {
if (typeof getShadowRoot === "function") {
var originalNode = node;
while (node) {
@ -240,10 +266,7 @@ var isDisabledFromFieldset = function isDisabledFromFieldset2(node) {
return false;
};
var isNodeMatchingSelectorFocusable = function isNodeMatchingSelectorFocusable2(options, node) {
if (node.disabled || // we must do an inert look up to filter out any elements inside an inert ancestor
// because we're limited in the type of selectors we can use in JSDom (see related
// note related to `candidateSelectors`)
isInert(node) || isHiddenInput(node) || isHidden(node, options) || // For a details element with a summary, the summary element gets the focus
if (node.disabled || isHiddenInput(node) || isHidden(node, options) || // For a details element with a summary, the summary element gets the focus
isDetailsWithSummary(node) || isDisabledFromFieldset(node)) {
return false;
}
@ -255,21 +278,21 @@ var isNodeMatchingSelectorTabbable = function isNodeMatchingSelectorTabbable2(op
}
return true;
};
var isValidShadowRootTabbable = function isValidShadowRootTabbable2(shadowHostNode) {
var isShadowRootTabbable = function isShadowRootTabbable2(shadowHostNode) {
var tabIndex = parseInt(shadowHostNode.getAttribute("tabindex"), 10);
if (isNaN(tabIndex) || tabIndex >= 0) {
return true;
}
return false;
};
var sortByOrder = function sortByOrder2(candidates) {
var _sortByOrder = function sortByOrder(candidates) {
var regularTabbables = [];
var orderedTabbables = [];
candidates.forEach(function(item, i) {
var isScope = !!item.scopeParent;
var element = isScope ? item.scopeParent : item;
var candidateTabindex = getSortOrderTabIndex(element, isScope);
var elements = isScope ? sortByOrder2(item.candidates) : element;
var elements = isScope ? _sortByOrder(item.candidates) : element;
if (candidateTabindex === 0) {
isScope ? regularTabbables.push.apply(regularTabbables, elements) : regularTabbables.push(element);
} else {
@ -291,22 +314,22 @@ var tabbable = function tabbable2(container, options) {
options = options || {};
var candidates;
if (options.getShadowRoot) {
candidates = getCandidatesIteratively([container], options.includeContainer, {
candidates = _getCandidatesIteratively([container], options.includeContainer, {
filter: isNodeMatchingSelectorTabbable.bind(null, options),
flatten: false,
getShadowRoot: options.getShadowRoot,
shadowRootFilter: isValidShadowRootTabbable
shadowRootFilter: isShadowRootTabbable
});
} else {
candidates = getCandidates(container, options.includeContainer, isNodeMatchingSelectorTabbable.bind(null, options));
}
return sortByOrder(candidates);
return _sortByOrder(candidates);
};
var focusable = function focusable2(container, options) {
options = options || {};
var candidates;
if (options.getShadowRoot) {
candidates = getCandidatesIteratively([container], options.includeContainer, {
candidates = _getCandidatesIteratively([container], options.includeContainer, {
filter: isNodeMatchingSelectorFocusable.bind(null, options),
flatten: true,
getShadowRoot: options.getShadowRoot
@ -326,7 +349,7 @@ var isTabbable = function isTabbable2(node, options) {
}
return isNodeMatchingSelectorTabbable(options, node);
};
var focusableCandidateSelector = candidateSelectors.concat("iframe").join(",");
var focusableCandidateSelector = candidateSelectors.concat("iframe:not([inert]):not([inert] *)").join(",");
var isFocusable = function isFocusable2(node, options) {
options = options || {};
if (!node) {
@ -339,6 +362,74 @@ var isFocusable = function isFocusable2(node, options) {
};
// node_modules/focus-trap/dist/focus-trap.esm.js
function _arrayLikeToArray(r, a) {
(null == a || a > r.length) && (a = r.length);
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
return n;
}
function _arrayWithoutHoles(r) {
if (Array.isArray(r)) return _arrayLikeToArray(r);
}
function _createForOfIteratorHelper(r, e) {
var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
if (!t) {
if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e) {
t && (r = t);
var n = 0, F = function() {
};
return {
s: F,
n: function() {
return n >= r.length ? {
done: true
} : {
done: false,
value: r[n++]
};
},
e: function(r2) {
throw r2;
},
f: F
};
}
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
var o, a = true, u = false;
return {
s: function() {
t = t.call(r);
},
n: function() {
var r2 = t.next();
return a = r2.done, r2;
},
e: function(r2) {
u = true, o = r2;
},
f: function() {
try {
a || null == t.return || t.return();
} finally {
if (u) throw o;
}
}
};
}
function _defineProperty(e, r, t) {
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
value: t,
enumerable: true,
configurable: true,
writable: true
}) : e[r] = t, e;
}
function _iterableToArray(r) {
if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
}
function _nonIterableSpread() {
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
function ownKeys(e, r) {
var t = Object.keys(e);
if (Object.getOwnPropertySymbols) {
@ -360,43 +451,43 @@ function _objectSpread2(e) {
}
return e;
}
function _defineProperty(obj, key, value) {
key = _toPropertyKey(key);
if (key in obj) {
Object.defineProperty(obj, key, {
value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
return obj;
function _toConsumableArray(r) {
return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
}
function _toPrimitive(input, hint) {
if (typeof input !== "object" || input === null)
return input;
var prim = input[Symbol.toPrimitive];
if (prim !== void 0) {
var res = prim.call(input, hint || "default");
if (typeof res !== "object")
return res;
function _toPrimitive(t, r) {
if ("object" != typeof t || !t) return t;
var e = t[Symbol.toPrimitive];
if (void 0 !== e) {
var i = e.call(t, r);
if ("object" != typeof i) return i;
throw new TypeError("@@toPrimitive must return a primitive value.");
}
return (hint === "string" ? String : Number)(input);
return ("string" === r ? String : Number)(t);
}
function _toPropertyKey(arg) {
var key = _toPrimitive(arg, "string");
return typeof key === "symbol" ? key : String(key);
function _toPropertyKey(t) {
var i = _toPrimitive(t, "string");
return "symbol" == typeof i ? i : i + "";
}
function _unsupportedIterableToArray(r, a) {
if (r) {
if ("string" == typeof r) return _arrayLikeToArray(r, a);
var t = {}.toString.call(r).slice(8, -1);
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
}
}
var activeFocusTraps = {
// Returns the trap from the top of the stack.
getActiveTrap: function getActiveTrap(trapStack) {
if ((trapStack === null || trapStack === void 0 ? void 0 : trapStack.length) > 0) {
return trapStack[trapStack.length - 1];
}
return null;
},
// Pauses the currently active trap, then adds a new trap to the stack.
activateTrap: function activateTrap(trapStack, trap) {
if (trapStack.length > 0) {
var activeTrap = trapStack[trapStack.length - 1];
if (activeTrap !== trap) {
activeTrap.pause();
}
var activeTrap = activeFocusTraps.getActiveTrap(trapStack);
if (trap !== activeTrap) {
activeFocusTraps.pauseTrap(trapStack);
}
var trapIndex = trapStack.indexOf(trap);
if (trapIndex === -1) {
@ -406,13 +497,24 @@ var activeFocusTraps = {
trapStack.push(trap);
}
},
// Removes the trap from the top of the stack, then unpauses the next trap down.
deactivateTrap: function deactivateTrap(trapStack, trap) {
var trapIndex = trapStack.indexOf(trap);
if (trapIndex !== -1) {
trapStack.splice(trapIndex, 1);
}
if (trapStack.length > 0) {
trapStack[trapStack.length - 1].unpause();
activeFocusTraps.unpauseTrap(trapStack);
},
// Pauses the trap at the top of the stack.
pauseTrap: function pauseTrap(trapStack) {
var activeTrap = activeFocusTraps.getActiveTrap(trapStack);
activeTrap === null || activeTrap === void 0 || activeTrap._setPausedState(true);
},
// Unpauses the trap at the top of the stack.
unpauseTrap: function unpauseTrap(trapStack) {
var activeTrap = activeFocusTraps.getActiveTrap(trapStack);
if (activeTrap && !activeTrap._isManuallyPaused()) {
activeTrap._setPausedState(false);
}
}
};
@ -434,17 +536,6 @@ var isKeyBackward = function isKeyBackward2(e) {
var delay = function delay2(fn) {
return setTimeout(fn, 0);
};
var findIndex = function findIndex2(arr, fn) {
var idx = -1;
arr.every(function(value, i) {
if (fn(value)) {
idx = i;
return false;
}
return true;
});
return idx;
};
var valueOrHandler = function valueOrHandler2(value) {
for (var _len = arguments.length, params = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
params[_key - 1] = arguments[_key];
@ -462,29 +553,31 @@ var createFocusTrap = function createFocusTrap2(elements, userOptions) {
returnFocusOnDeactivate: true,
escapeDeactivates: true,
delayInitialFocus: true,
isolateSubtrees: false,
isKeyForward,
isKeyBackward
}, userOptions);
var state = {
// containers given to createFocusTrap()
// @type {Array<HTMLElement>}
/** @type {Array<HTMLElement>} */
containers: [],
// list of objects identifying tabbable nodes in `containers` in the trap
// NOTE: it's possible that a group has no tabbable nodes if nodes get removed while the trap
// is active, but the trap should never get to a state where there isn't at least one group
// with at least one tabbable node in it (that would lead to an error condition that would
// result in an error being thrown)
// @type {Array<{
// container: HTMLElement,
// tabbableNodes: Array<HTMLElement>, // empty if none
// focusableNodes: Array<HTMLElement>, // empty if none
// posTabIndexesFound: boolean,
// firstTabbableNode: HTMLElement|undefined,
// lastTabbableNode: HTMLElement|undefined,
// firstDomTabbableNode: HTMLElement|undefined,
// lastDomTabbableNode: HTMLElement|undefined,
// nextTabbableNode: (node: HTMLElement, forward: boolean) => HTMLElement|undefined
// }>}
/** @type {Array<{
* container: HTMLElement,
* tabbableNodes: Array<HTMLElement>, // empty if none
* focusableNodes: Array<HTMLElement>, // empty if none
* posTabIndexesFound: boolean,
* firstTabbableNode: HTMLElement|undefined,
* lastTabbableNode: HTMLElement|undefined,
* firstDomTabbableNode: HTMLElement|undefined,
* lastDomTabbableNode: HTMLElement|undefined,
* nextTabbableNode: (node: HTMLElement, forward: boolean) => HTMLElement|undefined
* }>}
*/
containerGroups: [],
// same order/length as `containers` list
// references to objects in `containerGroups`, but only those that actually have
@ -492,10 +585,17 @@ var createFocusTrap = function createFocusTrap2(elements, userOptions) {
// NOTE: same order as `containers` and `containerGroups`, but __not necessarily__
// the same length
tabbableGroups: [],
// references to nodes that are siblings to the ancestors of this trap's containers.
/** @type {Set<HTMLElement>} */
adjacentElements: /* @__PURE__ */ new Set(),
// references to nodes that were inert or aria-hidden before the trap was activated.
/** @type {Set<HTMLElement>} */
alreadySilent: /* @__PURE__ */ new Set(),
nodeFocusedBeforeActivation: null,
mostRecentlyFocusedNode: null,
active: false,
paused: false,
manuallyPaused: false,
// timer ID for when delayInitialFocus is true and initial focus in this trap
// has been delayed during activation
delayInitialFocusTimer: void 0,
@ -520,12 +620,10 @@ var createFocusTrap = function createFocusTrap2(elements, userOptions) {
});
};
var getNodeForOption = function getNodeForOption2(optionName) {
var _ref2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, _ref2$hasFallback = _ref2.hasFallback, hasFallback = _ref2$hasFallback === void 0 ? false : _ref2$hasFallback, _ref2$params = _ref2.params, params = _ref2$params === void 0 ? [] : _ref2$params;
var optionValue = config[optionName];
if (typeof optionValue === "function") {
for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
params[_key2 - 1] = arguments[_key2];
}
optionValue = optionValue.apply(void 0, params);
optionValue = optionValue.apply(void 0, _toConsumableArray(params));
}
if (optionValue === true) {
optionValue = void 0;
@ -538,19 +636,27 @@ var createFocusTrap = function createFocusTrap2(elements, userOptions) {
}
var node = optionValue;
if (typeof optionValue === "string") {
node = doc.querySelector(optionValue);
try {
node = doc.querySelector(optionValue);
} catch (err) {
throw new Error("`".concat(optionName, '` appears to be an invalid selector; error="').concat(err.message, '"'));
}
if (!node) {
throw new Error("`".concat(optionName, "` as selector refers to no known node"));
if (!hasFallback) {
throw new Error("`".concat(optionName, "` as selector refers to no known node"));
}
}
}
return node;
};
var getInitialFocusNode = function getInitialFocusNode2() {
var node = getNodeForOption("initialFocus");
var node = getNodeForOption("initialFocus", {
hasFallback: true
});
if (node === false) {
return false;
}
if (node === void 0 || !isFocusable(node, config.tabbableOptions)) {
if (node === void 0 || node && !isFocusable(node, config.tabbableOptions)) {
if (findContainerIndex(doc.activeElement) >= 0) {
node = doc.activeElement;
} else {
@ -558,6 +664,8 @@ var createFocusTrap = function createFocusTrap2(elements, userOptions) {
var firstTabbableNode = firstTabbableGroup && firstTabbableGroup.firstTabbableNode;
node = firstTabbableNode || getNodeForOption("fallbackFocus");
}
} else if (node === null) {
node = getNodeForOption("fallbackFocus");
}
if (!node) {
throw new Error("Your focus-trap needs to have at least one focusable element");
@ -637,25 +745,25 @@ var createFocusTrap = function createFocusTrap2(elements, userOptions) {
throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.");
}
};
var getActiveElement = function getActiveElement2(el) {
var _getActiveElement = function getActiveElement(el) {
var activeElement = el.activeElement;
if (!activeElement) {
return;
}
if (activeElement.shadowRoot && activeElement.shadowRoot.activeElement !== null) {
return getActiveElement2(activeElement.shadowRoot);
return _getActiveElement(activeElement.shadowRoot);
}
return activeElement;
};
var tryFocus = function tryFocus2(node) {
var _tryFocus = function tryFocus(node) {
if (node === false) {
return;
}
if (node === getActiveElement(document)) {
if (node === _getActiveElement(document)) {
return;
}
if (!node || !node.focus) {
tryFocus2(getInitialFocusNode());
_tryFocus(getInitialFocusNode());
return;
}
node.focus({
@ -667,11 +775,13 @@ var createFocusTrap = function createFocusTrap2(elements, userOptions) {
}
};
var getReturnFocusNode = function getReturnFocusNode2(previousActiveElement) {
var node = getNodeForOption("setReturnFocus", previousActiveElement);
var node = getNodeForOption("setReturnFocus", {
params: [previousActiveElement]
});
return node ? node : node === false ? false : previousActiveElement;
};
var findNextNavNode = function findNextNavNode2(_ref2) {
var target = _ref2.target, event = _ref2.event, _ref2$isBackward = _ref2.isBackward, isBackward = _ref2$isBackward === void 0 ? false : _ref2$isBackward;
var findNextNavNode = function findNextNavNode2(_ref3) {
var target = _ref3.target, event = _ref3.event, _ref3$isBackward = _ref3.isBackward, isBackward = _ref3$isBackward === void 0 ? false : _ref3$isBackward;
target = target || getActualTarget(event);
updateTabbableNodes();
var destinationNode = null;
@ -685,8 +795,8 @@ var createFocusTrap = function createFocusTrap2(elements, userOptions) {
destinationNode = state.tabbableGroups[0].firstTabbableNode;
}
} else if (isBackward) {
var startOfGroupIndex = findIndex(state.tabbableGroups, function(_ref3) {
var firstTabbableNode = _ref3.firstTabbableNode;
var startOfGroupIndex = state.tabbableGroups.findIndex(function(_ref4) {
var firstTabbableNode = _ref4.firstTabbableNode;
return target === firstTabbableNode;
});
if (startOfGroupIndex < 0 && (containerGroup.container === target || isFocusable(target, config.tabbableOptions) && !isTabbable(target, config.tabbableOptions) && !containerGroup.nextTabbableNode(target, false))) {
@ -700,8 +810,8 @@ var createFocusTrap = function createFocusTrap2(elements, userOptions) {
destinationNode = containerGroup.nextTabbableNode(target, false);
}
} else {
var lastOfGroupIndex = findIndex(state.tabbableGroups, function(_ref4) {
var lastTabbableNode = _ref4.lastTabbableNode;
var lastOfGroupIndex = state.tabbableGroups.findIndex(function(_ref5) {
var lastTabbableNode = _ref5.lastTabbableNode;
return target === lastTabbableNode;
});
if (lastOfGroupIndex < 0 && (containerGroup.container === target || isFocusable(target, config.tabbableOptions) && !isTabbable(target, config.tabbableOptions) && !containerGroup.nextTabbableNode(target))) {
@ -796,9 +906,9 @@ var createFocusTrap = function createFocusTrap2(elements, userOptions) {
});
}
if (nextNode) {
tryFocus(nextNode);
_tryFocus(nextNode);
} else {
tryFocus(state.mostRecentlyFocusedNode || getInitialFocusNode());
_tryFocus(state.mostRecentlyFocusedNode || getInitialFocusNode());
}
}
state.recentNavEvent = void 0;
@ -814,17 +924,18 @@ var createFocusTrap = function createFocusTrap2(elements, userOptions) {
if (isTabEvent(event)) {
event.preventDefault();
}
tryFocus(destinationNode);
_tryFocus(destinationNode);
}
};
var checkKey = function checkKey2(event) {
var checkTabKey = function checkTabKey2(event) {
if (config.isKeyForward(event) || config.isKeyBackward(event)) {
checkKeyNav(event, config.isKeyBackward(event));
}
};
var checkEscapeKey = function checkEscapeKey2(event) {
if (isEscapeEvent(event) && valueOrHandler(config.escapeDeactivates, event) !== false) {
event.preventDefault();
trap.deactivate();
return;
}
if (config.isKeyForward(event) || config.isKeyBackward(event)) {
checkKeyNav(event, config.isKeyBackward(event));
}
};
var checkClick = function checkClick2(e) {
@ -847,8 +958,8 @@ var createFocusTrap = function createFocusTrap2(elements, userOptions) {
}
activeFocusTraps.activateTrap(trapStack, trap);
state.delayInitialFocusTimer = config.delayInitialFocus ? delay(function() {
tryFocus(getInitialFocusNode());
}) : tryFocus(getInitialFocusNode());
_tryFocus(getInitialFocusNode());
}) : _tryFocus(getInitialFocusNode());
doc.addEventListener("focusin", checkFocusIn, true);
doc.addEventListener("mousedown", checkPointerDown, {
capture: true,
@ -862,12 +973,63 @@ var createFocusTrap = function createFocusTrap2(elements, userOptions) {
capture: true,
passive: false
});
doc.addEventListener("keydown", checkKey, {
doc.addEventListener("keydown", checkTabKey, {
capture: true,
passive: false
});
doc.addEventListener("keydown", checkEscapeKey);
return trap;
};
var collectAdjacentElements = function collectAdjacentElements2(containers) {
if (state.active && !state.paused) {
trap._setSubtreeIsolation(false);
}
state.adjacentElements.clear();
state.alreadySilent.clear();
var containerAncestors = /* @__PURE__ */ new Set();
var adjacentElements = /* @__PURE__ */ new Set();
var _iterator = _createForOfIteratorHelper(containers), _step;
try {
for (_iterator.s(); !(_step = _iterator.n()).done; ) {
var container = _step.value;
containerAncestors.add(container);
var insideShadowRoot = typeof ShadowRoot !== "undefined" && container.getRootNode() instanceof ShadowRoot;
var current = container;
while (current) {
containerAncestors.add(current);
var parent = current.parentElement;
var siblings = [];
if (parent) {
siblings = parent.children;
} else if (!parent && insideShadowRoot) {
siblings = current.getRootNode().children;
parent = current.getRootNode().host;
insideShadowRoot = typeof ShadowRoot !== "undefined" && parent.getRootNode() instanceof ShadowRoot;
}
var _iterator2 = _createForOfIteratorHelper(siblings), _step2;
try {
for (_iterator2.s(); !(_step2 = _iterator2.n()).done; ) {
var child = _step2.value;
adjacentElements.add(child);
}
} catch (err) {
_iterator2.e(err);
} finally {
_iterator2.f();
}
current = parent;
}
}
} catch (err) {
_iterator.e(err);
} finally {
_iterator.f();
}
containerAncestors.forEach(function(el) {
adjacentElements["delete"](el);
});
state.adjacentElements = adjacentElements;
};
var removeListeners = function removeListeners2() {
if (!state.active) {
return;
@ -876,7 +1038,8 @@ var createFocusTrap = function createFocusTrap2(elements, userOptions) {
doc.removeEventListener("mousedown", checkPointerDown, true);
doc.removeEventListener("touchstart", checkPointerDown, true);
doc.removeEventListener("click", checkClick, true);
doc.removeEventListener("keydown", checkKey, true);
doc.removeEventListener("keydown", checkTabKey, true);
doc.removeEventListener("keydown", checkEscapeKey);
return trap;
};
var checkDomRemoval = function checkDomRemoval2(mutations) {
@ -887,7 +1050,7 @@ var createFocusTrap = function createFocusTrap2(elements, userOptions) {
});
});
if (isFocusedNodeRemoved) {
tryFocus(getInitialFocusNode());
_tryFocus(getInitialFocusNode());
}
};
var mutationObserver = typeof window !== "undefined" && "MutationObserver" in window ? new MutationObserver(checkDomRemoval) : void 0;
@ -919,26 +1082,44 @@ var createFocusTrap = function createFocusTrap2(elements, userOptions) {
var onActivate = getOption(activateOptions, "onActivate");
var onPostActivate = getOption(activateOptions, "onPostActivate");
var checkCanFocusTrap = getOption(activateOptions, "checkCanFocusTrap");
if (!checkCanFocusTrap) {
updateTabbableNodes();
var preexistingTrap = activeFocusTraps.getActiveTrap(trapStack);
var revertState = false;
if (preexistingTrap && !preexistingTrap.paused) {
var _preexistingTrap$_set;
(_preexistingTrap$_set = preexistingTrap._setSubtreeIsolation) === null || _preexistingTrap$_set === void 0 || _preexistingTrap$_set.call(preexistingTrap, false);
revertState = true;
}
state.active = true;
state.paused = false;
state.nodeFocusedBeforeActivation = doc.activeElement;
onActivate === null || onActivate === void 0 || onActivate();
var finishActivation = function finishActivation2() {
if (checkCanFocusTrap) {
try {
if (!checkCanFocusTrap) {
updateTabbableNodes();
}
addListeners();
updateObservedNodes();
onPostActivate === null || onPostActivate === void 0 || onPostActivate();
};
if (checkCanFocusTrap) {
checkCanFocusTrap(state.containers.concat()).then(finishActivation, finishActivation);
return this;
state.active = true;
state.paused = false;
state.nodeFocusedBeforeActivation = _getActiveElement(doc);
onActivate === null || onActivate === void 0 || onActivate();
var finishActivation = function finishActivation2() {
if (checkCanFocusTrap) {
updateTabbableNodes();
}
addListeners();
updateObservedNodes();
if (config.isolateSubtrees) {
trap._setSubtreeIsolation(true);
}
onPostActivate === null || onPostActivate === void 0 || onPostActivate();
};
if (checkCanFocusTrap) {
checkCanFocusTrap(state.containers.concat()).then(finishActivation, finishActivation);
return this;
}
finishActivation();
} catch (error) {
if (preexistingTrap === activeFocusTraps.getActiveTrap(trapStack) && revertState) {
var _preexistingTrap$_set2;
(_preexistingTrap$_set2 = preexistingTrap._setSubtreeIsolation) === null || _preexistingTrap$_set2 === void 0 || _preexistingTrap$_set2.call(preexistingTrap, true);
}
throw error;
}
finishActivation();
return this;
},
deactivate: function deactivate(deactivateOptions) {
@ -952,6 +1133,10 @@ var createFocusTrap = function createFocusTrap2(elements, userOptions) {
}, deactivateOptions);
clearTimeout(state.delayInitialFocusTimer);
state.delayInitialFocusTimer = void 0;
if (!state.paused) {
trap._setSubtreeIsolation(false);
}
state.alreadySilent.clear();
removeListeners();
state.active = false;
state.paused = false;
@ -965,7 +1150,7 @@ var createFocusTrap = function createFocusTrap2(elements, userOptions) {
var finishDeactivation = function finishDeactivation2() {
delay(function() {
if (returnFocus) {
tryFocus(getReturnFocusNode(state.nodeFocusedBeforeActivation));
_tryFocus(getReturnFocusNode(state.nodeFocusedBeforeActivation));
}
onPostDeactivate === null || onPostDeactivate === void 0 || onPostDeactivate();
});
@ -978,44 +1163,111 @@ var createFocusTrap = function createFocusTrap2(elements, userOptions) {
return this;
},
pause: function pause(pauseOptions) {
if (state.paused || !state.active) {
if (!state.active) {
return this;
}
var onPause = getOption(pauseOptions, "onPause");
var onPostPause = getOption(pauseOptions, "onPostPause");
state.paused = true;
onPause === null || onPause === void 0 || onPause();
removeListeners();
updateObservedNodes();
onPostPause === null || onPostPause === void 0 || onPostPause();
return this;
state.manuallyPaused = true;
return this._setPausedState(true, pauseOptions);
},
unpause: function unpause(unpauseOptions) {
if (!state.paused || !state.active) {
if (!state.active) {
return this;
}
var onUnpause = getOption(unpauseOptions, "onUnpause");
var onPostUnpause = getOption(unpauseOptions, "onPostUnpause");
state.paused = false;
onUnpause === null || onUnpause === void 0 || onUnpause();
updateTabbableNodes();
addListeners();
updateObservedNodes();
onPostUnpause === null || onPostUnpause === void 0 || onPostUnpause();
return this;
state.manuallyPaused = false;
if (trapStack[trapStack.length - 1] !== this) {
return this;
}
return this._setPausedState(false, unpauseOptions);
},
updateContainerElements: function updateContainerElements(containerElements) {
var elementsAsArray = [].concat(containerElements).filter(Boolean);
state.containers = elementsAsArray.map(function(element) {
return typeof element === "string" ? doc.querySelector(element) : element;
});
if (config.isolateSubtrees) {
collectAdjacentElements(state.containers);
}
if (state.active) {
updateTabbableNodes();
if (config.isolateSubtrees && !state.paused) {
trap._setSubtreeIsolation(true);
}
}
updateObservedNodes();
return this;
}
};
Object.defineProperties(trap, {
_isManuallyPaused: {
value: function value() {
return state.manuallyPaused;
}
},
_setPausedState: {
value: function value(paused, options) {
if (state.paused === paused) {
return this;
}
state.paused = paused;
if (paused) {
var onPause = getOption(options, "onPause");
var onPostPause = getOption(options, "onPostPause");
onPause === null || onPause === void 0 || onPause();
removeListeners();
updateObservedNodes();
trap._setSubtreeIsolation(false);
onPostPause === null || onPostPause === void 0 || onPostPause();
} else {
var onUnpause = getOption(options, "onUnpause");
var onPostUnpause = getOption(options, "onPostUnpause");
onUnpause === null || onUnpause === void 0 || onUnpause();
trap._setSubtreeIsolation(true);
updateTabbableNodes();
addListeners();
updateObservedNodes();
onPostUnpause === null || onPostUnpause === void 0 || onPostUnpause();
}
return this;
}
},
_setSubtreeIsolation: {
value: function value(isEnabled) {
if (config.isolateSubtrees) {
state.adjacentElements.forEach(function(el) {
var _el$getAttribute;
if (isEnabled) {
switch (config.isolateSubtrees) {
case "aria-hidden":
if (el.ariaHidden === "true" || ((_el$getAttribute = el.getAttribute("aria-hidden")) === null || _el$getAttribute === void 0 ? void 0 : _el$getAttribute.toLowerCase()) === "true") {
state.alreadySilent.add(el);
}
el.setAttribute("aria-hidden", "true");
break;
default:
if (el.inert || el.hasAttribute("inert")) {
state.alreadySilent.add(el);
}
el.setAttribute("inert", true);
break;
}
} else {
if (state.alreadySilent.has(el)) ;
else {
switch (config.isolateSubtrees) {
case "aria-hidden":
el.removeAttribute("aria-hidden");
break;
default:
el.removeAttribute("inert");
break;
}
}
}
});
}
}
}
});
trap.updateContainerElements(elements);
return trap;
};
@ -1024,8 +1276,8 @@ var createFocusTrap = function createFocusTrap2(elements, userOptions) {
function useFocusTrap(target, options = {}) {
let trap;
const { immediate, ...focusTrapOptions } = options;
const hasFocus = ref(false);
const isPaused = ref(false);
const hasFocus = shallowRef(false);
const isPaused = shallowRef(false);
const activate = (opts) => trap && trap.activate(opts);
const deactivate = (opts) => trap && trap.deactivate(opts);
const pause = () => {
@ -1040,12 +1292,19 @@ function useFocusTrap(target, options = {}) {
isPaused.value = false;
}
};
const targets = computed(() => {
const _targets = toValue(target);
return toArray(_targets).map((el) => {
const _el = toValue(el);
return typeof _el === "string" ? _el : unrefElement(_el);
}).filter(notNullish);
});
watch(
() => unrefElement(target),
(el) => {
if (!el)
targets,
(els) => {
if (!els.length)
return;
trap = createFocusTrap(el, {
trap = createFocusTrap(els, {
...focusTrapOptions,
onActivate() {
hasFocus.value = true;
@ -1080,13 +1339,13 @@ export {
tabbable/dist/index.esm.js:
(*!
* tabbable 6.2.0
* tabbable 6.4.0
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
*)
focus-trap/dist/focus-trap.esm.js:
(*!
* focus-trap 7.5.4
* focus-trap 7.8.0
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
*)
*/

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

View file

@ -56,12 +56,17 @@ import {
effectScope,
getCurrentInstance,
getCurrentScope,
getCurrentWatcher,
getTransitionRawChildren,
guardReactiveProps,
h,
handleError,
hasInjectionContext,
hydrate,
hydrateOnIdle,
hydrateOnInteraction,
hydrateOnMediaQuery,
hydrateOnVisible,
initCustomFormatter,
initDirectivesForSSR,
inject,
@ -78,6 +83,7 @@ import {
mergeModels,
mergeProps,
nextTick,
nodeOps,
normalizeClass,
normalizeProps,
normalizeStyle,
@ -94,7 +100,9 @@ import {
onServerPrefetch,
onUnmounted,
onUpdated,
onWatcherCleanup,
openBlock,
patchProp,
popScopeId,
provide,
proxyRefs,
@ -134,9 +142,13 @@ import {
useAttrs,
useCssModule,
useCssVars,
useHost,
useId,
useModel,
useSSRContext,
useShadowRoot,
useSlots,
useTemplateRef,
useTransitionState,
vModelCheckbox,
vModelDynamic,
@ -158,7 +170,7 @@ import {
withMemo,
withModifiers,
withScopeId
} from "./chunk-3YS4HNIT.js";
} from "./chunk-SNNOYR6U.js";
export {
BaseTransition,
BaseTransitionPropsValidators,
@ -217,12 +229,17 @@ export {
effectScope,
getCurrentInstance,
getCurrentScope,
getCurrentWatcher,
getTransitionRawChildren,
guardReactiveProps,
h,
handleError,
hasInjectionContext,
hydrate,
hydrateOnIdle,
hydrateOnInteraction,
hydrateOnMediaQuery,
hydrateOnVisible,
initCustomFormatter,
initDirectivesForSSR,
inject,
@ -239,6 +256,7 @@ export {
mergeModels,
mergeProps,
nextTick,
nodeOps,
normalizeClass,
normalizeProps,
normalizeStyle,
@ -255,7 +273,9 @@ export {
onServerPrefetch,
onUnmounted,
onUpdated,
onWatcherCleanup,
openBlock,
patchProp,
popScopeId,
provide,
proxyRefs,
@ -295,9 +315,13 @@ export {
useAttrs,
useCssModule,
useCssVars,
useHost,
useId,
useModel,
useSSRContext,
useShadowRoot,
useSlots,
useTemplateRef,
useTransitionState,
vModelCheckbox,
vModelDynamic,

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,21 +0,0 @@
import{_ as s,c as i,o as a,U as e}from"./chunks/framework.BouBWMxc.js";const g=JSON.parse('{"title":"Client","description":"","frontmatter":{},"headers":[],"relativePath":"api/1.0/client.md","filePath":"api/1.0/client.md"}'),t={name:"api/1.0/client.md"},l=e(`<h1 id="client" tabindex="-1">Client <a class="header-anchor" href="#client" aria-label="Permalink to &quot;Client&quot;"></a></h1><p>For Client-sided</p><h2 id="client-1" tabindex="-1"><code>.Client</code> <a class="header-anchor" href="#client-1" aria-label="Permalink to &quot;\`.Client\`&quot;"></a></h2><p>Create new Warp event.</p><div class="vp-code-group vp-adaptive-theme"><div class="tabs"><input type="radio" name="group-WMTa-" id="tab-8fuJBYo" checked="checked"><label for="tab-8fuJBYo">Variable</label><input type="radio" name="group-WMTa-" id="tab-l7wfSlv"><label for="tab-l7wfSlv">Example</label></div><div class="blocks"><div class="language-lua vp-adaptive-theme active"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Identifier</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: string</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">local</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Remote </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Warp.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">new</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Remote&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></div></div><h2 id="connect" tabindex="-1"><code>:Connect</code> <a class="header-anchor" href="#connect" aria-label="Permalink to &quot;\`:Connect\`&quot;"></a></h2><p>Connect event to receive incoming from server way.</p><div class="vp-code-group vp-adaptive-theme"><div class="tabs"><input type="radio" name="group-913OR" id="tab-Xvghcm2" checked="checked"><label for="tab-Xvghcm2">Variable</label><input type="radio" name="group-913OR" id="tab-Qq0qRYq"><label for="tab-Qq0qRYq">Example</label></div><div class="blocks"><div class="language-lua vp-adaptive-theme active"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> callback</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: (</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">...</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">any) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ()</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Remote</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Connect</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(...)</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> print</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">...</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">end</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></div></div><h2 id="once" tabindex="-1"><code>:Once</code> <a class="header-anchor" href="#once" aria-label="Permalink to &quot;\`:Once\`&quot;"></a></h2><p>This function likely <code>:Connect</code> but it disconnect the event once it fired.</p><div class="vp-code-group vp-adaptive-theme"><div class="tabs"><input type="radio" name="group-7bWhj" id="tab-qg9rt4C" checked="checked"><label for="tab-qg9rt4C">Variable</label><input type="radio" name="group-7bWhj" id="tab-wCFNoJJ"><label for="tab-wCFNoJJ">Example</label></div><div class="blocks"><div class="language-lua vp-adaptive-theme active"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> callback</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: (</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">...</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">any) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ()</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Remote</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Once</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(...)</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> print</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">...</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">end</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></div></div><h2 id="disconnect" tabindex="-1"><code>:Disconnect</code> <a class="header-anchor" href="#disconnect" aria-label="Permalink to &quot;\`:Disconnect\`&quot;"></a></h2><p>Disconnect the event connection.</p><div class="vp-code-group vp-adaptive-theme"><div class="tabs"><input type="radio" name="group-jhZf-" id="tab-jQIB7cH" checked="checked"><label for="tab-jQIB7cH">Variable</label><input type="radio" name="group-jhZf-" id="tab-f1J_ZR8"><label for="tab-f1J_ZR8">Example</label></div><div class="blocks"><div class="language-lua vp-adaptive-theme active"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> key</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: string</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">local</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> connection </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Remote</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Connect</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(player, ...) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">end</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) </span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">-- store the key</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Remote</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Disconnect</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(connection)</span></span></code></pre></div></div></div><h2 id="disconnectall" tabindex="-1"><code>:DisconnectAll</code> <a class="header-anchor" href="#disconnectall" aria-label="Permalink to &quot;\`:DisconnectAll\`&quot;"></a></h2><p>Disconnect All the event connection.</p><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Remote</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">DisconnectAll</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span></span></code></pre></div><h2 id="fire" tabindex="-1"><code>:Fire</code> <a class="header-anchor" href="#fire" aria-label="Permalink to &quot;\`:Fire\`&quot;"></a></h2><p>Fire the event to the spesific server with data.</p><div class="vp-code-group vp-adaptive-theme"><div class="tabs"><input type="radio" name="group-_QDeh" id="tab-7pHqPfD" checked="checked"><label for="tab-7pHqPfD">Variable</label><input type="radio" name="group-_QDeh" id="tab-iNQzgEZ"><label for="tab-iNQzgEZ">Example</label></div><div class="blocks"><div class="language-lua vp-adaptive-theme active"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> reliable</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: boolean,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: any</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Remote</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Fire</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Hello World!&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></div></div><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>This function have rate limiting it self and configured from server.</p></div><h2 id="invoke" tabindex="-1"><code>:Invoke</code> <a class="header-anchor" href="#invoke" aria-label="Permalink to &quot;\`:Invoke\`&quot;"></a></h2><p>Semiliar to <code>:InvokeServer</code>, its for Invoke to a server.</p><div class="vp-code-group vp-adaptive-theme"><div class="tabs"><input type="radio" name="group-OUXOZ" id="tab-3ch63Il" checked="checked"><label for="tab-3ch63Il">Variable</label><input type="radio" name="group-OUXOZ" id="tab-T2WBB5b"><label for="tab-T2WBB5b">Example</label></div><div class="blocks"><div class="language-lua vp-adaptive-theme active"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> timeout</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: number,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: any</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">...</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">any)</span></span></code></pre></div><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">local</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Request </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Remote</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Invoke</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">2</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Hello World!&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></div></div><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>This function is yielded, once it timeout it will return nil.</p></div><h2 id="wait" tabindex="-1"><code>:Wait</code> <a class="header-anchor" href="#wait" aria-label="Permalink to &quot;\`:Wait\`&quot;"></a></h2><p>Wait the event being triggered.</p><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Remote</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Wait</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span></span></code></pre></div><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>This function is yielded, Invoke might also ping this one and also causing error.</p></div><h2 id="destroy" tabindex="-1"><code>:Destroy</code> <a class="header-anchor" href="#destroy" aria-label="Permalink to &quot;\`:Destroy\`&quot;"></a></h2><p>Disconnect all connection of event and remove the event from Warp</p><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Remote</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Destroy</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span></span></code></pre></div>`,32),n=[l];function p(h,k,d,c,o,r){return a(),i("div",null,n)}const u=s(t,[["render",p]]);export{g as __pageData,u as default};

View file

@ -1 +0,0 @@
import{_ as s,c as i,o as a,U as e}from"./chunks/framework.BouBWMxc.js";const g=JSON.parse('{"title":"Client","description":"","frontmatter":{},"headers":[],"relativePath":"api/1.0/client.md","filePath":"api/1.0/client.md"}'),t={name:"api/1.0/client.md"},l=e("",32),n=[l];function p(h,k,d,c,o,r){return a(),i("div",null,n)}const u=s(t,[["render",p]]);export{g as __pageData,u as default};

View file

@ -1,10 +0,0 @@
import{_ as i,c as s,o as a,U as e}from"./chunks/framework.BouBWMxc.js";const g=JSON.parse('{"title":"Rate Limit","description":"","frontmatter":{},"headers":[],"relativePath":"api/1.0/ratelimit.md","filePath":"api/1.0/ratelimit.md"}'),t={name:"api/1.0/ratelimit.md"},n=e(`<h1 id="rate-limit" tabindex="-1">Rate Limit <a class="header-anchor" href="#rate-limit" aria-label="Permalink to &quot;Rate Limit&quot;"></a></h1><p>Ratelimit is one of most useful feature.</p><p>( Configured on Server and For Client )</p><h2 id="setup" tabindex="-1"><code>Setup</code> <a class="header-anchor" href="#setup" aria-label="Permalink to &quot;\`Setup\`&quot;"></a></h2><p>When creating a event on Server, you can add second argument as table <code>rateLimit</code> to limit the number of times the event can be called and the interval for reset the counter.</p><div class="vp-code-group vp-adaptive-theme"><div class="tabs"><input type="radio" name="group-8_4-Q" id="tab-2KM4Z7r" checked="checked"><label for="tab-2KM4Z7r">Server</label><input type="radio" name="group-8_4-Q" id="tab-rBfnYwa"><label for="tab-rBfnYwa">Client</label></div><div class="blocks"><div class="language-lua vp-adaptive-theme active"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">-- Server</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">-- Let&#39;s make the event have ratelimit with max 50 entrance for 2 seconds.</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">local</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Remote </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Warp.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Server</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Remote1&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, {</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> maxEntrance </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 50</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">-- maximum 50 fires.</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> interval </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 2</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">-- 2 seconds</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">})</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">-- Now the Event RateLimit is configured, and ready to use.</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">-- No need anything to adds on client side.</span></span></code></pre></div><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">-- Client</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">local</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Remote </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Warp.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Client</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Remote1&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">-- The Event will automatic it self for retreiving the rate limit configuration from the server.</span></span></code></pre></div></div></div>`,6),l=[n];function h(p,r,k,d,o,c){return a(),s("div",null,l)}const m=i(t,[["render",h]]);export{g as __pageData,m as default};

View file

@ -1 +0,0 @@
import{_ as i,c as s,o as a,U as e}from"./chunks/framework.BouBWMxc.js";const g=JSON.parse('{"title":"Rate Limit","description":"","frontmatter":{},"headers":[],"relativePath":"api/1.0/ratelimit.md","filePath":"api/1.0/ratelimit.md"}'),t={name:"api/1.0/ratelimit.md"},n=e("",6),l=[n];function h(p,r,k,d,o,c){return a(),s("div",null,l)}const m=i(t,[["render",h]]);export{g as __pageData,m as default};

View file

@ -1,32 +0,0 @@
import{_ as t,D as n,c as l,m as s,a as i,I as p,U as a,o as h}from"./chunks/framework.BouBWMxc.js";const B=JSON.parse('{"title":"Server","description":"","frontmatter":{},"headers":[],"relativePath":"api/1.0/server.md","filePath":"api/1.0/server.md"}'),k={name:"api/1.0/server.md"},d=a(`<h1 id="server" tabindex="-1">Server <a class="header-anchor" href="#server" aria-label="Permalink to &quot;Server&quot;"></a></h1><p>For Server-sided</p><h2 id="server-1" tabindex="-1"><code>.Server</code> <a class="header-anchor" href="#server-1" aria-label="Permalink to &quot;\`.Server\`&quot;"></a></h2><p>Create new Warp event.</p><div class="vp-code-group vp-adaptive-theme"><div class="tabs"><input type="radio" name="group-57xOi" id="tab-NGm3bwT" checked="checked"><label for="tab-NGm3bwT">Variable</label><input type="radio" name="group-57xOi" id="tab-xJTaSRi"><label for="tab-xJTaSRi">Example</label></div><div class="blocks"><div class="language-lua vp-adaptive-theme active"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Identifier</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: string,</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> rateLimit</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: {</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> maxEntrance</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: number,</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> interval</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: number,</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }?</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">local</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Remote </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Warp.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">new</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Remote&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></div></div><h2 id="connect" tabindex="-1"><code>:Connect</code> <a class="header-anchor" href="#connect" aria-label="Permalink to &quot;\`:Connect\`&quot;"></a></h2><p>Connect event to receive incoming from client way.</p><div class="vp-code-group vp-adaptive-theme"><div class="tabs"><input type="radio" name="group-8yT3f" id="tab-2m4jbXs" checked="checked"><label for="tab-2m4jbXs">Variable</label><input type="radio" name="group-8yT3f" id="tab-jjbAh0p"><label for="tab-jjbAh0p">Example</label></div><div class="blocks"><div class="language-lua vp-adaptive-theme active"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> player</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: Player,</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> callback</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: (</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">...</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">any) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ()</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">): string</span></span></code></pre></div><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Remote</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Connect</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(player, ...)</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> print</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(player, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">...</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">end</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></div></div><h2 id="once" tabindex="-1"><code>:Once</code> <a class="header-anchor" href="#once" aria-label="Permalink to &quot;\`:Once\`&quot;"></a></h2><p>This function likely <code>:Connect</code> but it disconnect the event once it fired.</p><div class="vp-code-group vp-adaptive-theme"><div class="tabs"><input type="radio" name="group-0FKPj" id="tab-zbCqE2v" checked="checked"><label for="tab-zbCqE2v">Variable</label><input type="radio" name="group-0FKPj" id="tab-HOwRQsL"><label for="tab-HOwRQsL">Example</label></div><div class="blocks"><div class="language-lua vp-adaptive-theme active"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> player</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: Player,</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> callback</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: (</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">...</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">any) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ()</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Remote</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Once</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(player, ...)</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> print</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(player, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">...</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">end</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></div></div><h2 id="disconnect" tabindex="-1"><code>:Disconnect</code> <a class="header-anchor" href="#disconnect" aria-label="Permalink to &quot;\`:Disconnect\`&quot;"></a></h2><p>Disconnect the event connection.</p><div class="vp-code-group vp-adaptive-theme"><div class="tabs"><input type="radio" name="group-Xa8q7" id="tab-TtFdp-Z" checked="checked"><label for="tab-TtFdp-Z">Variable</label><input type="radio" name="group-Xa8q7" id="tab-4XTxKsz"><label for="tab-4XTxKsz">Example</label></div><div class="blocks"><div class="language-lua vp-adaptive-theme active"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> key</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: string</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">local</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> connection </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Remote</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Connect</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(player, ...) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">end</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) </span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">-- store the key</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Remote</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Disconnect</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(connection)</span></span></code></pre></div></div></div><h2 id="disconnectall" tabindex="-1"><code>:DisconnectAll</code> <a class="header-anchor" href="#disconnectall" aria-label="Permalink to &quot;\`:DisconnectAll\`&quot;"></a></h2><p>Disconnect All the event connection.</p><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Remote</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">DisconnectAll</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span></span></code></pre></div><h2 id="fire" tabindex="-1"><code>:Fire</code> <a class="header-anchor" href="#fire" aria-label="Permalink to &quot;\`:Fire\`&quot;"></a></h2><p>Fire the event to a client.</p><div class="vp-code-group vp-adaptive-theme"><div class="tabs"><input type="radio" name="group-q2G3p" id="tab-QUgoIAc" checked="checked"><label for="tab-QUgoIAc">Variable</label><input type="radio" name="group-q2G3p" id="tab-SU77jnw"><label for="tab-SU77jnw">Example</label></div><div class="blocks"><div class="language-lua vp-adaptive-theme active"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> reliable</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: boolean,</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> player</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: Player,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: any</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Remote</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Fire</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, player, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Hello World!&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></div></div>`,20),r={id:"fires",tabindex:"-1"},o=s("code",null,":Fires",-1),c=s("a",{class:"header-anchor",href:"#fires","aria-label":'Permalink to "`:Fires` <Badge type="tip" text="Server Only" />"'},"",-1),E=a(`<p>Fire the event to all clients.</p><div class="vp-code-group vp-adaptive-theme"><div class="tabs"><input type="radio" name="group-54vBg" id="tab-uI0eydK" checked="checked"><label for="tab-uI0eydK">Variable</label><input type="radio" name="group-54vBg" id="tab-JmoxgRU"><label for="tab-JmoxgRU">Example</label></div><div class="blocks"><div class="language-lua vp-adaptive-theme active"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> reliable</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: boolean,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: any</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Remote</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Fires</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Hello World!&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></div></div><h2 id="invoke" tabindex="-1"><code>:Invoke</code> <a class="header-anchor" href="#invoke" aria-label="Permalink to &quot;\`:Invoke\`&quot;"></a></h2><p>Semiliar to <code>:InvokeClient</code>, its for Invoke to a client.</p><div class="vp-code-group vp-adaptive-theme"><div class="tabs"><input type="radio" name="group-EVFwh" id="tab-80WyNJk" checked="checked"><label for="tab-80WyNJk">Variable</label><input type="radio" name="group-EVFwh" id="tab-SafarTi"><label for="tab-SafarTi">Example</label></div><div class="blocks"><div class="language-lua vp-adaptive-theme active"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> timeout</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: number,</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> player</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: Player,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: any</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">...</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">any)</span></span></code></pre></div><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">local</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Request </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Remote</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Invoke</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">2</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, player, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Hello World!&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></div></div><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>This function is yielded, once it timeout it will return nil.</p></div><h2 id="wait" tabindex="-1"><code>:Wait</code> <a class="header-anchor" href="#wait" aria-label="Permalink to &quot;\`:Wait\`&quot;"></a></h2><p>Wait the event being triggered.</p><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Remote</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Wait</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span></span></code></pre></div><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>This function is yielded, Invoke might also ping this one and also causing error.</p></div><h2 id="destroy" tabindex="-1"><code>:Destroy</code> <a class="header-anchor" href="#destroy" aria-label="Permalink to &quot;\`:Destroy\`&quot;"></a></h2><p>Disconnect all connection of event and remove the event from Warp.</p><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Remote</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Destroy</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span></span></code></pre></div>`,13);function g(y,u,v,b,F,C){const e=n("Badge");return h(),l("div",null,[d,s("h2",r,[o,i(),p(e,{type:"tip",text:"Server Only"}),i(),c]),E])}const f=t(k,[["render",g]]);export{B as __pageData,f as default};

View file

@ -1 +0,0 @@
import{_ as t,D as n,c as l,m as s,a as i,I as p,U as a,o as h}from"./chunks/framework.BouBWMxc.js";const B=JSON.parse('{"title":"Server","description":"","frontmatter":{},"headers":[],"relativePath":"api/1.0/server.md","filePath":"api/1.0/server.md"}'),k={name:"api/1.0/server.md"},d=a("",20),r={id:"fires",tabindex:"-1"},o=s("code",null,":Fires",-1),c=s("a",{class:"header-anchor",href:"#fires","aria-label":'Permalink to "`:Fires` <Badge type="tip" text="Server Only" />"'},"",-1),E=a("",13);function g(y,u,v,b,F,C){const e=n("Badge");return h(),l("div",null,[d,s("h2",r,[o,i(),p(e,{type:"tip",text:"Server Only"}),i(),c]),E])}const f=t(k,[["render",g]]);export{B as __pageData,f as default};

View file

@ -1,3 +0,0 @@
import{_ as n,D as p,c as l,m as s,a as e,I as i,U as t,o as r}from"./chunks/framework.BouBWMxc.js";const B=JSON.parse('{"title":"Warp","description":"","frontmatter":{},"headers":[],"relativePath":"api/1.0/warp.md","filePath":"api/1.0/warp.md"}'),h={name:"api/1.0/warp.md"},o={id:"warp",tabindex:"-1"},d=s("a",{class:"header-anchor",href:"#warp","aria-label":'Permalink to "Warp <Badge type="tip" text="1.0" />"'},"",-1),c=s("p",null,"The public main of the Warp library.",-1),k={id:"server",tabindex:"-1"},_=s("code",null,".Server",-1),E=s("a",{class:"header-anchor",href:"#server","aria-label":'Permalink to "`.Server` <Badge type="tip" text="server side" />"'},"",-1),g=t(`<p>Create a new event for Server-Side</p><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">-- Server</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">local</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Event1 </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Warp.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Server</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Event1&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div>`,2),y={id:"client",tabindex:"-1"},v=s("code",null,".Client",-1),u=s("a",{class:"header-anchor",href:"#client","aria-label":'Permalink to "`.Client` <Badge type="tip" text="client side" />"'},"",-1),C=t(`<p>Create a new event for Client-Side.</p><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">-- Client</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">local</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Event1 </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Warp.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Client</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Event1&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div>`,2);function m(b,S,f,A,F,T){const a=p("Badge");return r(),l("div",null,[s("h1",o,[e("Warp "),i(a,{type:"tip",text:"1.0"}),e(),d]),c,s("h2",k,[_,e(),i(a,{type:"tip",text:"server side"}),e(),E]),g,s("h2",y,[v,e(),i(a,{type:"tip",text:"client side"}),e(),u]),C])}const D=n(h,[["render",m]]);export{B as __pageData,D as default};

View file

@ -1 +0,0 @@
import{_ as n,D as p,c as l,m as s,a as e,I as i,U as t,o as r}from"./chunks/framework.BouBWMxc.js";const B=JSON.parse('{"title":"Warp","description":"","frontmatter":{},"headers":[],"relativePath":"api/1.0/warp.md","filePath":"api/1.0/warp.md"}'),h={name:"api/1.0/warp.md"},o={id:"warp",tabindex:"-1"},d=s("a",{class:"header-anchor",href:"#warp","aria-label":'Permalink to "Warp <Badge type="tip" text="1.0" />"'},"",-1),c=s("p",null,"The public main of the Warp library.",-1),k={id:"server",tabindex:"-1"},_=s("code",null,".Server",-1),E=s("a",{class:"header-anchor",href:"#server","aria-label":'Permalink to "`.Server` <Badge type="tip" text="server side" />"'},"",-1),g=t("",2),y={id:"client",tabindex:"-1"},v=s("code",null,".Client",-1),u=s("a",{class:"header-anchor",href:"#client","aria-label":'Permalink to "`.Client` <Badge type="tip" text="client side" />"'},"",-1),C=t("",2);function m(b,S,f,A,F,T){const a=p("Badge");return r(),l("div",null,[s("h1",o,[e("Warp "),i(a,{type:"tip",text:"1.0"}),e(),d]),c,s("h2",k,[_,e(),i(a,{type:"tip",text:"server side"}),e(),E]),g,s("h2",y,[v,e(),i(a,{type:"tip",text:"client side"}),e(),u]),C])}const D=n(h,[["render",m]]);export{B as __pageData,D as default};

View file

@ -1,7 +0,0 @@
import{j as o,a1 as p,a2 as u,a3 as c,a4 as l,a5 as f,a6 as d,a7 as m,a8 as h,a9 as A,aa as g,ab as v,d as P,u as y,l as C,z as w,ac as _,ad as b,ae as E,af as R}from"./chunks/framework.BouBWMxc.js";import{t as D}from"./chunks/theme.makJcAKq.js";function i(e){if(e.extends){const a=i(e.extends);return{...a,...e,async enhanceApp(t){a.enhanceApp&&await a.enhanceApp(t),e.enhanceApp&&await e.enhanceApp(t)}}}return e}const s=i(D),j=P({name:"VitePressApp",setup(){const{site:e,lang:a,dir:t}=y();return C(()=>{w(()=>{document.documentElement.lang=a.value,document.documentElement.dir=t.value})}),e.value.router.prefetchLinks&&_(),b(),E(),s.setup&&s.setup(),()=>R(s.Layout)}});async function L(){const e=S(),a=O();a.provide(u,e);const t=c(e.route);return a.provide(l,t),a.component("Content",f),a.component("ClientOnly",d),Object.defineProperties(a.config.globalProperties,{$frontmatter:{get(){return t.frontmatter.value}},$params:{get(){return t.page.value.params}}}),s.enhanceApp&&await s.enhanceApp({app:a,router:e,siteData:m}),{app:a,router:e,data:t}}function O(){return h(j)}function S(){let e=o,a;return A(t=>{let n=g(t),r=null;return n&&(e&&(a=n),(e||a===n)&&(n=n.replace(/\.js$/,".lean.js")),r=v(()=>import(n),__vite__mapDeps([]))),o&&(e=!1),r},s.NotFound)}o&&L().then(({app:e,router:a,data:t})=>{a.go().then(()=>{p(a.route,t.site),e.mount("#app")})});export{L as createApp};
function __vite__mapDeps(indexes) {
if (!__vite__mapDeps.viteFileDeps) {
__vite__mapDeps.viteFileDeps = []
}
return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,59 +0,0 @@
import{_ as s,c as i,o as a,U as n}from"./chunks/framework.BouBWMxc.js";const F=JSON.parse('{"title":"Example","description":"","frontmatter":{},"headers":[],"relativePath":"guide/example.md","filePath":"guide/example.md"}'),h={name:"guide/example.md"},l=n(`<h1 id="example" tabindex="-1">Example <a class="header-anchor" href="#example" aria-label="Permalink to &quot;Example&quot;"></a></h1><p>Let&#39;s try and play something with Warp!</p><div class="vp-code-group vp-adaptive-theme"><div class="tabs"><input type="radio" name="group-t9858" id="tab-019zFZN" checked="checked"><label for="tab-019zFZN">Server</label><input type="radio" name="group-t9858" id="tab-QUEGMRD"><label for="tab-QUEGMRD">Client</label></div><div class="blocks"><div class="language-lua vp-adaptive-theme active"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">local</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Warp </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> require</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;path.to.module&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">-- Events</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">local</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Example </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Warp.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Server</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Example&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">local</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Ping </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Warp.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Server</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Ping&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">local</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Pong </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Warp.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Server</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Pong&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">local</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> PingAll </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Warp.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Server</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;PingAll&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Example</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Connect</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(player, arg1, arg2)</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> print</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(arg1, arg2)</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;Whooo!&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">end</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Ping</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Connect</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(player, ping)</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> if</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ping </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">then</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> print</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;PING!&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Pong</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Fire</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, player, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;pong!&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> PingAll</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Fires</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;ey!&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> end</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">end</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">local</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Players </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> game</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">GetService</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Players&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">local</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Warp </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> require</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;path.to.module&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">-- Events</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">local</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Example </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Warp.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Client</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Example&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">local</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Ping </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Warp.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Client</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Ping&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">local</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Pong </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Warp.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Client</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Pong&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">local</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> PingAll </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Warp.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Client</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;PingAll&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">-- Connect the events</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">local</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> connection1</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">connection1 </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Pong</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Connect</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(pong: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">boolean</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> if</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> pong </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">then</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> print</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;PONG!&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> end</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">end</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">PingAll</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Connect</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(isPing: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">boolean</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> if</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> isPing </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">then</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> print</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;I GET PINGED!&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> end</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">end</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">-- Try request a event from server!</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">print</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Example</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Invoke</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">5</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Hello!&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;this is from &gt; &quot;</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">..</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">Players.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">LocalPlayer</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Name</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">))</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">-- Do a ping &amp; pong to server!</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Ping</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Fire</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;ping!&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">task.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">wait</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">1</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) </span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">-- lets wait 1 seconds!</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">-- Disconnect All the events</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Pong</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">DisconnectAll</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">PingAll</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">DisconnectAll</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">-- or Just disconnect spesific connection</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Pong</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Disconnect</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(connection1)</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">-- Destroying/Deleting a Event?</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Pong</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Destroy</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">-- Yay Done!</span></span></code></pre></div></div></div>`,3),k=[l];function p(t,e,E,r,d,g){return a(),i("div",null,k)}const o=s(h,[["render",p]]);export{F as __pageData,o as default};

View file

@ -1 +0,0 @@
import{_ as s,c as i,o as a,U as n}from"./chunks/framework.BouBWMxc.js";const F=JSON.parse('{"title":"Example","description":"","frontmatter":{},"headers":[],"relativePath":"guide/example.md","filePath":"guide/example.md"}'),h={name:"guide/example.md"},l=n("",3),k=[l];function p(t,e,E,r,d,g){return a(),i("div",null,k)}const o=s(h,[["render",p]]);export{F as __pageData,o as default};

View file

@ -1 +0,0 @@
import{_ as s,c as i,o as a,U as t}from"./chunks/framework.BouBWMxc.js";const c=JSON.parse('{"title":"Getting Started","description":"","frontmatter":{},"headers":[],"relativePath":"guide/getting-started.md","filePath":"guide/getting-started.md"}'),e={name:"guide/getting-started.md"},n=t('<h1 id="getting-started" tabindex="-1">Getting Started <a class="header-anchor" href="#getting-started" aria-label="Permalink to &quot;Getting Started&quot;"></a></h1><h3 id="step-1" tabindex="-1"><code>Step 1:</code> <a class="header-anchor" href="#step-1" aria-label="Permalink to &quot;`Step 1:`&quot;"></a></h3><p>First, you have to require the Warp module.</p><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">local</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Warp </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> require</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;path.to.module&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span></code></pre></div><h3 id="step-2" tabindex="-1"><code>Step 2:</code> <a class="header-anchor" href="#step-2" aria-label="Permalink to &quot;`Step 2:`&quot;"></a></h3><p>Then, to create a new event you have to use <code>.Server</code> function</p><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">local</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Remote </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Warp.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Server</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;EventName&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span></code></pre></div><h3 id="step-3" tabindex="-1"><code>Step 3:</code> <a class="header-anchor" href="#step-3" aria-label="Permalink to &quot;`Step 3:`&quot;"></a></h3><p>Firing event everytime player join</p><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">local</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Players </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> game</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">GetService</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Players&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>\n<span class="line"></span>\n<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">Players.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">PlayerAdded</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Connect</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(player)</span></span>\n<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Remote</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Fire</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, player, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Welcome!&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>\n<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">end</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div>',10),h=[n];function l(p,k,r,d,o,E){return a(),i("div",null,h)}const y=s(e,[["render",l]]);export{c as __pageData,y as default};

View file

@ -1 +0,0 @@
import{_ as s,c as i,o as a,U as t}from"./chunks/framework.BouBWMxc.js";const c=JSON.parse('{"title":"Getting Started","description":"","frontmatter":{},"headers":[],"relativePath":"guide/getting-started.md","filePath":"guide/getting-started.md"}'),e={name:"guide/getting-started.md"},n=t("",10),h=[n];function l(p,k,r,d,o,E){return a(),i("div",null,h)}const y=s(e,[["render",l]]);export{c as __pageData,y as default};

View file

@ -1 +0,0 @@
import{_ as a,c as e,o as t,U as r}from"./chunks/framework.BouBWMxc.js";const m=JSON.parse('{"title":"Overview","description":"","frontmatter":{},"headers":[],"relativePath":"guide/index.md","filePath":"guide/index.md"}'),i={name:"guide/index.md"},o=r('<h1 id="overview" tabindex="-1">Overview <a class="header-anchor" href="#overview" aria-label="Permalink to &quot;Overview&quot;"></a></h1><p>Warp is a networking library for Roblox that comes with very fast performance and efficient with Type to any-scale games.</p><h2 id="why-warp" tabindex="-1">Why Warp <a class="header-anchor" href="#why-warp" aria-label="Permalink to &quot;Why Warp&quot;"></a></h2><h3 id="⚡-performance" tabindex="-1">⚡ Performance <a class="header-anchor" href="#⚡-performance" aria-label="Permalink to &quot;⚡ Performance&quot;"></a></h3><p>Warp is very-fast with much less bandwidth compared to native.</p><h3 id="🍃-lightweight" tabindex="-1">🍃 Lightweight <a class="header-anchor" href="#🍃-lightweight" aria-label="Permalink to &quot;🍃 Lightweight&quot;"></a></h3><p>Warp is a lightweight library for Roblox.</p><h3 id="📊-task" tabindex="-1">📊 Task <a class="header-anchor" href="#📊-task" aria-label="Permalink to &quot;📊 Task&quot;"></a></h3><p>Warp optimized efficient for large-scale task.</p><h3 id="🔎-typing" tabindex="-1">🔎 Typing <a class="header-anchor" href="#🔎-typing" aria-label="Permalink to &quot;🔎 Typing&quot;"></a></h3><p>Warp written with strictly-typed.</p>',11),n=[o];function h(s,l,c,d,p,f){return t(),e("div",null,n)}const g=a(i,[["render",h]]);export{m as __pageData,g as default};

View file

@ -1 +0,0 @@
import{_ as a,c as e,o as t,U as r}from"./chunks/framework.BouBWMxc.js";const m=JSON.parse('{"title":"Overview","description":"","frontmatter":{},"headers":[],"relativePath":"guide/index.md","filePath":"guide/index.md"}'),i={name:"guide/index.md"},o=r("",11),n=[o];function h(s,l,c,d,p,f){return t(),e("div",null,n)}const g=a(i,[["render",h]]);export{m as __pageData,g as default};

View file

@ -1 +0,0 @@
import{_ as a,c as t,o as l,U as i}from"./chunks/framework.BouBWMxc.js";const k=JSON.parse('{"title":"Installation","description":"","frontmatter":{},"headers":[],"relativePath":"guide/installation.md","filePath":"guide/installation.md"}'),e={name:"guide/installation.md"},o=i('<h1 id="installation" tabindex="-1">Installation <a class="header-anchor" href="#installation" aria-label="Permalink to &quot;Installation&quot;"></a></h1><h2 id="with-wally" tabindex="-1"><code>with Wally</code> <a class="header-anchor" href="#with-wally" aria-label="Permalink to &quot;`with Wally`&quot;"></a></h2><ol><li>Get Rojo and Wally ready.</li><li>Add Warp to your <code>wally.toml</code>.</li></ol><div class="vp-code-group vp-adaptive-theme"><div class="tabs"><input type="radio" name="group-YbSHN" id="tab-IZCWhd1" checked="checked"><label for="tab-IZCWhd1">wally.toml</label></div><div class="blocks"><div class="language-toml vp-adaptive-theme active"><button title="Copy Code" class="copy"></button><span class="lang">toml</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">dependencies</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]</span></span>\n<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">warp = </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;imezx/warp@1.0.0&quot;</span></span></code></pre></div><ol start="3"><li>Run <code>wally install</code> in command.</li><li>Link the module and Your Done!</li></ol><h2 id="without-wally" tabindex="-1"><code>without Wally</code> <a class="header-anchor" href="#without-wally" aria-label="Permalink to &quot;`without Wally`&quot;"></a></h2><ol><li>Get the <code>.rbxm</code> file from the <a href="https://github.com/imezx/Warp" target="_blank" rel="noreferrer">github</a></li><li>Import the <code>.rbxm</code> file into roblox studio manually and Done!</li></ol></div></div>',4),s=[o];function n(d,r,h,c,p,u){return l(),t("div",null,s)}const _=a(e,[["render",n]]);export{k as __pageData,_ as default};

View file

@ -1 +0,0 @@
import{_ as a,c as t,o as l,U as i}from"./chunks/framework.BouBWMxc.js";const k=JSON.parse('{"title":"Installation","description":"","frontmatter":{},"headers":[],"relativePath":"guide/installation.md","filePath":"guide/installation.md"}'),e={name:"guide/installation.md"},o=i("",4),s=[o];function n(d,r,h,c,p,u){return l(),t("div",null,s)}const _=a(e,[["render",n]]);export{k as __pageData,_ as default};

View file

@ -1 +0,0 @@
import{_ as e,c as t,o as i}from"./chunks/framework.BouBWMxc.js";const m=JSON.parse('{"title":"","description":"","frontmatter":{"layout":"home","hero":{"image":{"src":"/warp.png"},"name":"Warp","text":"A very-fast & powerful networking library for Roblox.","actions":[{"theme":"brand","text":"Get Started","link":"/guide/"},{"theme":"alt","text":"API Reference","link":"/api/1.0/warp"},{"theme":"alt","text":"View on Github","link":"https://github.com/imezx/Warp"}]},"features":[{"icon":"⚡","title":"Performance","details":"Warp is very-fast with much less bandwidth compared to native."},{"icon":"🍃","title":"Lightweight","details":"Warp is a lightweight library for Roblox."},{"icon":"📊","title":"Task","details":"Warp optimized efficient for large-scale task."},{"icon":"🔎","title":"Type","details":"Warp written with strictly-typed."}]},"headers":[],"relativePath":"index.md","filePath":"index.md"}'),a={name:"index.md"};function r(o,n,s,l,c,p){return i(),t("div")}const h=e(a,[["render",r]]);export{m as __pageData,h as default};

View file

@ -1 +0,0 @@
import{_ as e,c as t,o as i}from"./chunks/framework.BouBWMxc.js";const m=JSON.parse('{"title":"","description":"","frontmatter":{"layout":"home","hero":{"image":{"src":"/warp.png"},"name":"Warp","text":"A very-fast & powerful networking library for Roblox.","actions":[{"theme":"brand","text":"Get Started","link":"/guide/"},{"theme":"alt","text":"API Reference","link":"/api/1.0/warp"},{"theme":"alt","text":"View on Github","link":"https://github.com/imezx/Warp"}]},"features":[{"icon":"⚡","title":"Performance","details":"Warp is very-fast with much less bandwidth compared to native."},{"icon":"🍃","title":"Lightweight","details":"Warp is a lightweight library for Roblox."},{"icon":"📊","title":"Task","details":"Warp optimized efficient for large-scale task."},{"icon":"🔎","title":"Type","details":"Warp written with strictly-typed."}]},"headers":[],"relativePath":"index.md","filePath":"index.md"}'),a={name:"index.md"};function r(o,n,s,l,c,p){return i(),t("div")}const h=e(a,[["render",r]]);export{m as __pageData,h as default};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1 +1 @@
{"index.md":"Wvz5TWej","guide_getting-started.md":"MBXKETNI","guide_installation.md":"fMU35fgi","api_1.0_warp.md":"u63PLmMH","guide_index.md":"xfhCFaBM","api_1.0_server.md":"w4zn1XZZ","guide_example.md":"7eqi7edp","api_1.0_ratelimit.md":"gPb2PQ91","api_1.0_client.md":"FTim0Kz_"}
{"api_1.0_client.md":"DRlZL-Eb","api_1.0_ratelimit.md":"B4DFbcsX","api_1.0_server.md":"CjXNePVa","api_1.0_signal.md":"CSgtTcPk","api_1.0_warp.md":"Cc-7zjkV","api_1.1_buffer.md":"DIAM2o2w","api_1.1_client.md":"etzsFUJB","api_1.1_server.md":"yCvitiyi","api_1.1_warp.md":"D17D2VRV","guide_example.md":"35KFEfAU","guide_getting-started.md":"BJOTFozK","guide_index.md":"CZXHfmOy","guide_installation.md":"D6zv1RV7","index.md":"U4jwmyV2"}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

File diff suppressed because one or more lines are too long

16
node_modules/.bin/esbuild generated vendored
View file

@ -1,16 +0,0 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*)
if command -v cygpath > /dev/null 2>&1; then
basedir=`cygpath -w "$basedir"`
fi
;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../esbuild/bin/esbuild" "$@"
else
exec node "$basedir/../esbuild/bin/esbuild" "$@"
fi

1
node_modules/.bin/esbuild generated vendored Symbolic link
View file

@ -0,0 +1 @@
../@esbuild/linux-x64/bin/esbuild

16
node_modules/.bin/nanoid generated vendored
View file

@ -1,16 +0,0 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*)
if command -v cygpath > /dev/null 2>&1; then
basedir=`cygpath -w "$basedir"`
fi
;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../nanoid/bin/nanoid.cjs" "$@"
else
exec node "$basedir/../nanoid/bin/nanoid.cjs" "$@"
fi

1
node_modules/.bin/nanoid generated vendored Symbolic link
View file

@ -0,0 +1 @@
../nanoid/bin/nanoid.cjs

16
node_modules/.bin/parser generated vendored
View file

@ -1,16 +0,0 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*)
if command -v cygpath > /dev/null 2>&1; then
basedir=`cygpath -w "$basedir"`
fi
;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../@babel/parser/bin/babel-parser.js" "$@"
else
exec node "$basedir/../@babel/parser/bin/babel-parser.js" "$@"
fi

1
node_modules/.bin/parser generated vendored Symbolic link
View file

@ -0,0 +1 @@
../@babel/parser/bin/babel-parser.js

16
node_modules/.bin/rollup generated vendored
View file

@ -1,16 +0,0 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*)
if command -v cygpath > /dev/null 2>&1; then
basedir=`cygpath -w "$basedir"`
fi
;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../rollup/dist/bin/rollup" "$@"
else
exec node "$basedir/../rollup/dist/bin/rollup" "$@"
fi

1
node_modules/.bin/rollup generated vendored Symbolic link
View file

@ -0,0 +1 @@
../rollup/dist/bin/rollup

16
node_modules/.bin/vite generated vendored
View file

@ -1,16 +0,0 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*)
if command -v cygpath > /dev/null 2>&1; then
basedir=`cygpath -w "$basedir"`
fi
;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../vite/bin/vite.js" "$@"
else
exec node "$basedir/../vite/bin/vite.js" "$@"
fi

1
node_modules/.bin/vite generated vendored Symbolic link
View file

@ -0,0 +1 @@
../vite/bin/vite.js

16
node_modules/.bin/vitepress generated vendored
View file

@ -1,16 +0,0 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*)
if command -v cygpath > /dev/null 2>&1; then
basedir=`cygpath -w "$basedir"`
fi
;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../vitepress/bin/vitepress.js" "$@"
else
exec node "$basedir/../vitepress/bin/vitepress.js" "$@"
fi

1
node_modules/.bin/vitepress generated vendored Symbolic link
View file

@ -0,0 +1 @@
../vitepress/bin/vitepress.js

View file

@ -28,6 +28,7 @@ export function createAutocomplete(options) {
navigator: props.navigator
}, setters));
function onStoreStateChange(_ref) {
var _state$context, _state$context$algoli;
var prevState = _ref.prevState,
state = _ref.state;
props.onStateChange(_objectSpread({
@ -36,6 +37,13 @@ export function createAutocomplete(options) {
refresh: refresh,
navigator: props.navigator
}, setters));
if (!isAlgoliaInsightsPluginEnabled() && (_state$context = state.context) !== null && _state$context !== void 0 && (_state$context$algoli = _state$context.algoliaInsightsPlugin) !== null && _state$context$algoli !== void 0 && _state$context$algoli.__automaticInsights && props.insights !== false) {
var plugin = createAlgoliaInsightsPlugin({
__autocomplete_clickAnalytics: false
});
props.plugins.push(plugin);
subscribePlugins([plugin]);
}
}
function refresh() {
return onInput(_objectSpread({
@ -50,34 +58,40 @@ export function createAutocomplete(options) {
store: store
}, setters));
}
if (options.insights && !props.plugins.some(function (plugin) {
return plugin.name === 'aa.algoliaInsightsPlugin';
})) {
var insightsParams = typeof options.insights === 'boolean' ? {} : options.insights;
function subscribePlugins(plugins) {
plugins.forEach(function (plugin) {
var _plugin$subscribe;
return (_plugin$subscribe = plugin.subscribe) === null || _plugin$subscribe === void 0 ? void 0 : _plugin$subscribe.call(plugin, _objectSpread(_objectSpread({}, setters), {}, {
navigator: props.navigator,
refresh: refresh,
onSelect: function onSelect(fn) {
subscribers.push({
onSelect: fn
});
},
onActive: function onActive(fn) {
subscribers.push({
onActive: fn
});
},
onResolve: function onResolve(fn) {
subscribers.push({
onResolve: fn
});
}
}));
});
}
function isAlgoliaInsightsPluginEnabled() {
return props.plugins.some(function (plugin) {
return plugin.name === 'aa.algoliaInsightsPlugin';
});
}
if (props.insights && !isAlgoliaInsightsPluginEnabled()) {
var insightsParams = typeof props.insights === 'boolean' ? {} : props.insights;
props.plugins.push(createAlgoliaInsightsPlugin(insightsParams));
}
props.plugins.forEach(function (plugin) {
var _plugin$subscribe;
return (_plugin$subscribe = plugin.subscribe) === null || _plugin$subscribe === void 0 ? void 0 : _plugin$subscribe.call(plugin, _objectSpread(_objectSpread({}, setters), {}, {
navigator: props.navigator,
refresh: refresh,
onSelect: function onSelect(fn) {
subscribers.push({
onSelect: fn
});
},
onActive: function onActive(fn) {
subscribers.push({
onActive: fn
});
},
onResolve: function onResolve(fn) {
subscribers.push({
onResolve: fn
});
}
}));
});
subscribePlugins(props.plugins);
injectMetadata({
metadata: getMetadata({
plugins: props.plugins,

View file

@ -21,11 +21,13 @@ export function getDefaultProps(props, pluginSubscribers) {
return _objectSpread(_objectSpread({
debug: false,
openOnFocus: false,
enterKeyHint: undefined,
ignoreCompositionEvents: false,
placeholder: '',
autoFocus: false,
defaultActiveItemId: null,
stallThreshold: 300,
insights: false,
insights: undefined,
environment: environment,
shouldPanelOpen: function shouldPanelOpen(_ref) {
var state = _ref.state;

View file

@ -3,9 +3,8 @@ var _excluded = ["props", "refresh", "store"],
_excluded2 = ["inputElement", "formElement", "panelElement"],
_excluded3 = ["inputElement"],
_excluded4 = ["inputElement", "maxLength"],
_excluded5 = ["sourceIndex"],
_excluded6 = ["sourceIndex"],
_excluded7 = ["item", "source", "sourceIndex"];
_excluded5 = ["source"],
_excluded6 = ["item", "source"];
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
@ -16,7 +15,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
import { noop } from '@algolia/autocomplete-shared';
import { onInput } from './onInput';
import { onKeyDown as _onKeyDown } from './onKeyDown';
import { getActiveItem, isOrContainsNode, isSamsung } from './utils';
import { getActiveItem, getAutocompleteElementId, isOrContainsNode, isSamsung, getNativeEvent } from './utils';
export function getPropGetters(_ref) {
var props = _ref.props,
refresh = _ref.refresh,
@ -85,8 +84,11 @@ export function getPropGetters(_ref) {
role: 'combobox',
'aria-expanded': store.getState().isOpen,
'aria-haspopup': 'listbox',
'aria-owns': store.getState().isOpen ? "".concat(props.id, "-list") : undefined,
'aria-labelledby': "".concat(props.id, "-label")
'aria-controls': store.getState().isOpen ? store.getState().collections.map(function (_ref2) {
var source = _ref2.source;
return getAutocompleteElementId(props.id, 'list', source);
}).join(' ') : undefined,
'aria-labelledby': getAutocompleteElementId(props.id, 'label')
}, rest);
};
var getFormProps = function getFormProps(providedProps) {
@ -136,22 +138,25 @@ export function getPropGetters(_ref) {
}
store.dispatch('focus', null);
}
var _ref2 = providedProps || {},
inputElement = _ref2.inputElement,
_ref2$maxLength = _ref2.maxLength,
maxLength = _ref2$maxLength === void 0 ? 512 : _ref2$maxLength,
rest = _objectWithoutProperties(_ref2, _excluded4);
var _ref3 = providedProps || {},
inputElement = _ref3.inputElement,
_ref3$maxLength = _ref3.maxLength,
maxLength = _ref3$maxLength === void 0 ? 512 : _ref3$maxLength,
rest = _objectWithoutProperties(_ref3, _excluded4);
var activeItem = getActiveItem(store.getState());
var userAgent = ((_props$environment$na = props.environment.navigator) === null || _props$environment$na === void 0 ? void 0 : _props$environment$na.userAgent) || '';
var shouldFallbackKeyHint = isSamsung(userAgent);
var enterKeyHint = activeItem !== null && activeItem !== void 0 && activeItem.itemUrl && !shouldFallbackKeyHint ? 'go' : 'search';
var enterKeyHint = props.enterKeyHint || (activeItem !== null && activeItem !== void 0 && activeItem.itemUrl && !shouldFallbackKeyHint ? 'go' : 'search');
return _objectSpread({
'aria-autocomplete': 'both',
'aria-activedescendant': store.getState().isOpen && store.getState().activeItemId !== null ? "".concat(props.id, "-item-").concat(store.getState().activeItemId) : undefined,
'aria-controls': store.getState().isOpen ? "".concat(props.id, "-list") : undefined,
'aria-labelledby': "".concat(props.id, "-label"),
'aria-activedescendant': store.getState().isOpen && store.getState().activeItemId !== null ? getAutocompleteElementId(props.id, "item-".concat(store.getState().activeItemId), activeItem === null || activeItem === void 0 ? void 0 : activeItem.source) : undefined,
'aria-controls': store.getState().isOpen ? store.getState().collections.map(function (_ref4) {
var source = _ref4.source;
return getAutocompleteElementId(props.id, 'list', source);
}).join(' ') : undefined,
'aria-labelledby': getAutocompleteElementId(props.id, 'label'),
value: store.getState().completion || store.getState().query,
id: "".concat(props.id, "-input"),
id: getAutocompleteElementId(props.id, 'input'),
autoComplete: 'off',
autoCorrect: 'off',
autoCapitalize: 'off',
@ -162,6 +167,20 @@ export function getPropGetters(_ref) {
maxLength: maxLength,
type: 'search',
onChange: function onChange(event) {
var value = event.currentTarget.value;
if (props.ignoreCompositionEvents && getNativeEvent(event).isComposing) {
setters.setQuery(value);
return;
}
onInput(_objectSpread({
event: event,
props: props,
query: value.slice(0, maxLength),
refresh: refresh,
store: store
}, setters));
},
onCompositionEnd: function onCompositionEnd(event) {
onInput(_objectSpread({
event: event,
props: props,
@ -171,6 +190,9 @@ export function getPropGetters(_ref) {
}, setters));
},
onKeyDown: function onKeyDown(event) {
if (getNativeEvent(event).isComposing) {
return;
}
_onKeyDown(_objectSpread({
event: event,
props: props,
@ -197,26 +219,20 @@ export function getPropGetters(_ref) {
}
}, rest);
};
var getAutocompleteId = function getAutocompleteId(instanceId, sourceId) {
return typeof sourceId !== 'undefined' ? "".concat(instanceId, "-").concat(sourceId) : instanceId;
};
var getLabelProps = function getLabelProps(providedProps) {
var _ref3 = providedProps || {},
sourceIndex = _ref3.sourceIndex,
rest = _objectWithoutProperties(_ref3, _excluded5);
var getLabelProps = function getLabelProps(rest) {
return _objectSpread({
htmlFor: "".concat(getAutocompleteId(props.id, sourceIndex), "-input"),
id: "".concat(getAutocompleteId(props.id, sourceIndex), "-label")
htmlFor: getAutocompleteElementId(props.id, 'input'),
id: getAutocompleteElementId(props.id, 'label')
}, rest);
};
var getListProps = function getListProps(providedProps) {
var _ref4 = providedProps || {},
sourceIndex = _ref4.sourceIndex,
rest = _objectWithoutProperties(_ref4, _excluded6);
var _ref5 = providedProps || {},
source = _ref5.source,
rest = _objectWithoutProperties(_ref5, _excluded5);
return _objectSpread({
role: 'listbox',
'aria-labelledby': "".concat(getAutocompleteId(props.id, sourceIndex), "-label"),
id: "".concat(getAutocompleteId(props.id, sourceIndex), "-list")
'aria-labelledby': getAutocompleteElementId(props.id, 'label'),
id: getAutocompleteElementId(props.id, 'list', source)
}, rest);
};
var getPanelProps = function getPanelProps(rest) {
@ -235,10 +251,9 @@ export function getPropGetters(_ref) {
var getItemProps = function getItemProps(providedProps) {
var item = providedProps.item,
source = providedProps.source,
sourceIndex = providedProps.sourceIndex,
rest = _objectWithoutProperties(providedProps, _excluded7);
rest = _objectWithoutProperties(providedProps, _excluded6);
return _objectSpread({
id: "".concat(getAutocompleteId(props.id, sourceIndex), "-item-").concat(item.__autocomplete_id),
id: getAutocompleteElementId(props.id, "item-".concat(item.__autocomplete_id), source),
role: 'option',
'aria-selected': store.getState().activeItemId === item.__autocomplete_id,
onMouseMove: function onMouseMove(event) {

View file

@ -28,7 +28,8 @@ export function onInput(_ref) {
setIsOpen = setters.setIsOpen,
setQuery = setters.setQuery,
setActiveItemId = setters.setActiveItemId,
setStatus = setters.setStatus;
setStatus = setters.setStatus,
setContext = setters.setContext;
setQuery(query);
setActiveItemId(props.defaultActiveItemId);
if (!query && props.openOnFocus === false) {
@ -78,6 +79,20 @@ export function onInput(_ref) {
return preResolve(itemsOrDescription, source.sourceId, store.getState());
});
})).then(resolve).then(function (responses) {
var __automaticInsights = responses.some(function (_ref2) {
var items = _ref2.items;
return isSearchResponseWithAutomaticInsightsFlag(items);
});
// No need to pollute the context if `__automaticInsights=false`
if (__automaticInsights) {
var _store$getState$conte;
setContext({
algoliaInsightsPlugin: _objectSpread(_objectSpread({}, ((_store$getState$conte = store.getState().context) === null || _store$getState$conte === void 0 ? void 0 : _store$getState$conte.algoliaInsightsPlugin) || {}), {}, {
__automaticInsights: __automaticInsights
})
});
}
return postResolve(responses, sources, store);
}).then(function (collections) {
return reshape({
@ -122,4 +137,7 @@ export function onInput(_ref) {
}
});
return store.pendingRequests.add(request);
}
function isSearchResponseWithAutomaticInsightsFlag(items) {
return !Array.isArray(items) && Boolean(items === null || items === void 0 ? void 0 : items._automaticInsights);
}

View file

@ -8,7 +8,7 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
import { onInput } from './onInput';
import { getActiveItem } from './utils';
import { getActiveItem, getAutocompleteElementId } from './utils';
export function onKeyDown(_ref) {
var event = _ref.event,
props = _ref.props,
@ -18,7 +18,8 @@ export function onKeyDown(_ref) {
if (event.key === 'ArrowUp' || event.key === 'ArrowDown') {
// eslint-disable-next-line no-inner-declarations
var triggerScrollIntoView = function triggerScrollIntoView() {
var nodeItem = props.environment.document.getElementById("".concat(props.id, "-item-").concat(store.getState().activeItemId));
var highlightedItem = getActiveItem(store.getState());
var nodeItem = props.environment.document.getElementById(getAutocompleteElementId(props.id, "item-".concat(store.getState().activeItemId), highlightedItem === null || highlightedItem === void 0 ? void 0 : highlightedItem.source));
if (nodeItem) {
if (nodeItem.scrollIntoViewIfNeeded) {
nodeItem.scrollIntoViewIfNeeded(false);
@ -87,7 +88,7 @@ export function onKeyDown(_ref) {
} else if (event.key === 'Tab') {
store.dispatch('blur', null);
// Hitting the `Escape` key signals the end of a user interaction with the
// Hitting the `Tab` key signals the end of a user interaction with the
// autocomplete. At this point, we should ignore any requests that are still
// pending and could reopen the panel once they resolve, because that would
// result in an unsolicited UI behavior.

View file

@ -1,5 +1,6 @@
import type { ExecuteResponse, RequesterDescription, TransformResponse } from '@algolia/autocomplete-preset-algolia';
import { MultipleQueriesQuery, SearchForFacetValuesResponse, SearchResponse } from '@algolia/client-search';
import type { SearchResponse } from '@algolia/autocomplete-shared';
import { MultipleQueriesQuery, SearchForFacetValuesResponse } from '@algolia/client-search';
import { AutocompleteState, AutocompleteStore, BaseItem, InternalAutocompleteSource } from './types';
declare type RequestDescriptionPreResolved<TItem extends BaseItem> = Pick<RequesterDescription<TItem>, 'execute' | 'requesterId' | 'searchClient' | 'transformResponse'> & {
requests: Array<{

View file

@ -103,6 +103,7 @@ export var stateReducer = function stateReducer(state, action) {
// we lose track of the highlighted index. (Query-suggestions use-case)
action.props.openOnFocus === true ? action.props.defaultActiveItemId : null,
status: 'idle',
completion: null,
query: ''
});
}

View file

@ -2,17 +2,21 @@ export * from '@algolia/autocomplete-shared/dist/esm/core';
export * from './AutocompleteStore';
export * from './AutocompleteSubscribers';
import { CreateAlgoliaInsightsPluginParams, AutocompleteInsightsApi as _AutocompleteInsightsApi, AlgoliaInsightsHit as _AlgoliaInsightsHit } from '@algolia/autocomplete-plugin-algolia-insights';
import { AutocompleteOptions as _AutocompleteOptions, BaseItem } from '@algolia/autocomplete-shared/dist/esm/core';
import { AutocompleteOptions as _AutocompleteOptions, InternalAutocompleteOptions as _InternalAutocompleteOptions, BaseItem } from '@algolia/autocomplete-shared/dist/esm/core';
export declare type AutocompleteInsightsApi = _AutocompleteInsightsApi;
export declare type AlgoliaInsightsHit = _AlgoliaInsightsHit;
export interface AutocompleteOptions<TItem extends BaseItem> extends _AutocompleteOptions<TItem> {
declare type InsightsOption = {
/**
* Whether to enable the Insights plugin and load the Insights library if it has not been loaded yet.
*
* See [**autocomplete-plugin-algolia-insights**](https://www.algolia.com/doc/ui-libraries/autocomplete/api-reference/autocomplete-plugin-algolia-insights/) for more information.
*
* @default false
* @default undefined
* @link https://www.algolia.com/doc/ui-libraries/autocomplete/api-reference/autocomplete-js/autocomplete/#param-insights
*/
insights?: CreateAlgoliaInsightsPluginParams | boolean;
insights?: CreateAlgoliaInsightsPluginParams | boolean | undefined;
};
export interface AutocompleteOptions<TItem extends BaseItem> extends _AutocompleteOptions<TItem>, InsightsOption {
}
export interface InternalAutocompleteOptions<TItem extends BaseItem> extends _InternalAutocompleteOptions<TItem>, InsightsOption {
}

View file

@ -4,6 +4,8 @@ export * from './createConcurrentSafePromise';
export * from './getNextActiveItemId';
export * from './getNormalizedSources';
export * from './getActiveItem';
export * from './getAutocompleteElementId';
export * from './isOrContainsNode';
export * from './isSamsung';
export * from './mapToAlgoliaResponse';
export * from './getNativeEvent';

View file

@ -4,6 +4,8 @@ export * from './createConcurrentSafePromise';
export * from './getNextActiveItemId';
export * from './getNormalizedSources';
export * from './getActiveItem';
export * from './getAutocompleteElementId';
export * from './isOrContainsNode';
export * from './isSamsung';
export * from './mapToAlgoliaResponse';
export * from './mapToAlgoliaResponse';
export * from './getNativeEvent';

View file

@ -1,4 +1,5 @@
import type { SearchForFacetValuesResponse, SearchResponse } from '@algolia/client-search';
import type { SearchResponse } from '@algolia/autocomplete-shared';
import type { SearchForFacetValuesResponse } from '@algolia/client-search';
export declare function mapToAlgoliaResponse<THit>(rawResults: Array<SearchResponse<THit> | SearchForFacetValuesResponse>): {
results: (SearchResponse<THit> | SearchForFacetValuesResponse)[];
hits: import("@algolia/client-search").Hit<THit>[][];

View file

@ -1,4 +1,4 @@
/*! @algolia/autocomplete-core 1.9.3 | MIT License | © Algolia, Inc. and contributors | https://github.com/algolia/autocomplete */
/*! @algolia/autocomplete-core 1.17.7 | MIT License | © Algolia, Inc. and contributors | https://github.com/algolia/autocomplete */
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
@ -291,7 +291,7 @@
return undefined;
}
var version = '1.9.3';
var version = '1.17.7';
var userAgents = [{
segment: 'autocomplete-core',
@ -322,7 +322,8 @@
function createClickedEvent(_ref) {
var item = _ref.item,
items = _ref.items;
_ref$items = _ref.items,
items = _ref$items === void 0 ? [] : _ref$items;
return {
index: item.__autocomplete_indexName,
items: [item],
@ -563,6 +564,15 @@
apiKey: apiKey
});
},
/**
* Sets the authenticated user token to attach to events.
* Unsets the authenticated token by passing `undefined`.
*
* @link https://www.algolia.com/doc/api-reference/api-methods/set-authenticated-user-token/
*/
setAuthenticatedUserToken: function setAuthenticatedUserToken(authenticatedUserToken) {
searchInsights('setAuthenticatedUserToken', authenticatedUserToken);
},
/**
* Sets the user token to attach to events.
*/
@ -799,7 +809,7 @@
return (hint === "string" ? String : Number)(input);
}
var VIEW_EVENT_DELAY = 400;
var ALGOLIA_INSIGHTS_VERSION = '2.6.0';
var ALGOLIA_INSIGHTS_VERSION = '2.15.0';
var ALGOLIA_INSIGHTS_SRC = "https://cdn.jsdelivr.net/npm/search-insights@".concat(ALGOLIA_INSIGHTS_VERSION, "/dist/search-insights.min.js");
var sendViewedObjectIDs = debounce(function (_ref) {
var onItemsChange = _ref.onItemsChange,
@ -821,9 +831,11 @@
function createAlgoliaInsightsPlugin(options) {
var _getOptions = getOptions(options),
providedInsightsClient = _getOptions.insightsClient,
insightsInitParams = _getOptions.insightsInitParams,
onItemsChange = _getOptions.onItemsChange,
onSelectEvent = _getOptions.onSelect,
onActiveEvent = _getOptions.onActive;
onActiveEvent = _getOptions.onActive,
__autocomplete_clickAnalytics = _getOptions.__autocomplete_clickAnalytics;
var insightsClient = providedInsightsClient;
if (!providedInsightsClient) {
safelyRunOnBrowser(function (_ref2) {
@ -851,6 +863,17 @@
}
});
}
// We return an empty plugin if `insightsClient` is still undefined at
// this stage, which can happen in server environments.
if (!insightsClient) {
return {};
}
if (insightsInitParams) {
insightsClient('init', _objectSpread({
partial: true
}, insightsInitParams));
}
var insights = createSearchInsightsApi(insightsClient);
var previousItems = createRef([]);
var debouncedOnStateChange = debounce(function (_ref3) {
@ -883,19 +906,57 @@
var setContext = _ref4.setContext,
onSelect = _ref4.onSelect,
onActive = _ref4.onActive;
var isAuthenticatedToken = false;
function setInsightsContext(userToken) {
setContext({
algoliaInsightsPlugin: {
__algoliaSearchParameters: _objectSpread(_objectSpread({}, __autocomplete_clickAnalytics ? {
clickAnalytics: true
} : {}), userToken ? {
userToken: normalizeUserToken(userToken)
} : {}),
insights: insights
}
});
}
insightsClient('addAlgoliaAgent', 'insights-plugin');
setContext({
algoliaInsightsPlugin: {
__algoliaSearchParameters: {
clickAnalytics: true
},
insights: insights
setInsightsContext();
// Handles user token changes
insightsClient('onUserTokenChange', function (userToken) {
if (!isAuthenticatedToken) {
setInsightsContext(userToken);
}
});
insightsClient('getUserToken', null, function (_error, userToken) {
if (!isAuthenticatedToken) {
setInsightsContext(userToken);
}
});
// Handles authenticated user token changes
insightsClient('onAuthenticatedUserTokenChange', function (authenticatedUserToken) {
if (authenticatedUserToken) {
isAuthenticatedToken = true;
setInsightsContext(authenticatedUserToken);
} else {
isAuthenticatedToken = false;
insightsClient('getUserToken', null, function (_error, userToken) {
return setInsightsContext(userToken);
});
}
});
insightsClient('getAuthenticatedUserToken', null, function (_error, authenticatedUserToken) {
if (authenticatedUserToken) {
isAuthenticatedToken = true;
setInsightsContext(authenticatedUserToken);
}
});
onSelect(function (_ref5) {
var item = _ref5.item,
state = _ref5.state,
event = _ref5.event;
event = _ref5.event,
source = _ref5.source;
if (!isAlgoliaInsightsHit(item)) {
return;
}
@ -908,12 +969,13 @@
eventName: 'Item Selected'
}, createClickedEvent({
item: item,
items: previousItems.current
items: source.getItems().filter(isAlgoliaInsightsHit)
}))]
});
});
onActive(function (_ref6) {
var item = _ref6.item,
source = _ref6.source,
state = _ref6.state,
event = _ref6.event;
if (!isAlgoliaInsightsHit(item)) {
@ -928,7 +990,7 @@
eventName: 'Item Active'
}, createClickedEvent({
item: item,
items: previousItems.current
items: source.getItems().filter(isAlgoliaInsightsHit)
}))]
});
});
@ -942,27 +1004,36 @@
__autocomplete_pluginOptions: options
};
}
function getAlgoliaSources() {
var _context$algoliaInsig;
var algoliaSourceBase = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
var context = arguments.length > 1 ? arguments[1] : undefined;
return [].concat(_toConsumableArray(algoliaSourceBase), ['autocomplete-internal'], _toConsumableArray((_context$algoliaInsig = context.algoliaInsightsPlugin) !== null && _context$algoliaInsig !== void 0 && _context$algoliaInsig.__automaticInsights ? ['autocomplete-automatic'] : []));
}
function getOptions(options) {
return _objectSpread({
onItemsChange: function onItemsChange(_ref8) {
var insights = _ref8.insights,
insightsEvents = _ref8.insightsEvents;
insightsEvents = _ref8.insightsEvents,
state = _ref8.state;
insights.viewedObjectIDs.apply(insights, _toConsumableArray(insightsEvents.map(function (event) {
return _objectSpread(_objectSpread({}, event), {}, {
algoliaSource: [].concat(_toConsumableArray(event.algoliaSource || []), ['autocomplete-internal'])
algoliaSource: getAlgoliaSources(event.algoliaSource, state.context)
});
})));
},
onSelect: function onSelect(_ref9) {
var insights = _ref9.insights,
insightsEvents = _ref9.insightsEvents;
insightsEvents = _ref9.insightsEvents,
state = _ref9.state;
insights.clickedObjectIDsAfterSearch.apply(insights, _toConsumableArray(insightsEvents.map(function (event) {
return _objectSpread(_objectSpread({}, event), {}, {
algoliaSource: [].concat(_toConsumableArray(event.algoliaSource || []), ['autocomplete-internal'])
algoliaSource: getAlgoliaSources(event.algoliaSource, state.context)
});
})));
},
onActive: noop
onActive: noop,
__autocomplete_clickAnalytics: true
}, options);
}
function loadInsights(environment) {
@ -982,6 +1053,14 @@
}
}
/**
* While `search-insights` supports both string and number user tokens,
* the Search API only accepts strings. This function normalizes the user token.
*/
function normalizeUserToken(userToken) {
return typeof userToken === 'number' ? userToken.toString() : userToken;
}
function checkOptions(options) {
"development" !== 'production' ? warn(!options.debug, 'The `debug` option is meant for development debugging and should not be used in production.') : void 0;
}
@ -1244,6 +1323,17 @@
};
}
/**
* Returns a full element id for an autocomplete element.
*
* @param autocompleteInstanceId The id of the autocomplete instance
* @param elementId The specific element id
* @param source The source of the element, when it needs to be scoped
*/
function getAutocompleteElementId(autocompleteInstanceId, elementId, source) {
return [autocompleteInstanceId, source === null || source === void 0 ? void 0 : source.sourceId, elementId].filter(Boolean).join('-').replace(/\s/g, '');
}
function isOrContainsNode(parent, child) {
return parent === child || parent.contains(child);
}
@ -1277,6 +1367,10 @@
};
}
function getNativeEvent(event) {
return event.nativeEvent || event;
}
function createStore(reducer, props, onStoreStateChange) {
var state = props.initialState;
return {
@ -1350,11 +1444,13 @@
return _objectSpread2(_objectSpread2({
debug: false,
openOnFocus: false,
enterKeyHint: undefined,
ignoreCompositionEvents: false,
placeholder: '',
autoFocus: false,
defaultActiveItemId: null,
stallThreshold: 300,
insights: false,
insights: undefined,
environment: environment,
shouldPanelOpen: function shouldPanelOpen(_ref) {
var state = _ref.state;
@ -1615,7 +1711,8 @@
setIsOpen = setters.setIsOpen,
setQuery = setters.setQuery,
setActiveItemId = setters.setActiveItemId,
setStatus = setters.setStatus;
setStatus = setters.setStatus,
setContext = setters.setContext;
setQuery(query);
setActiveItemId(props.defaultActiveItemId);
if (!query && props.openOnFocus === false) {
@ -1665,6 +1762,20 @@
return preResolve(itemsOrDescription, source.sourceId, store.getState());
});
})).then(resolve).then(function (responses) {
var __automaticInsights = responses.some(function (_ref2) {
var items = _ref2.items;
return isSearchResponseWithAutomaticInsightsFlag(items);
});
// No need to pollute the context if `__automaticInsights=false`
if (__automaticInsights) {
var _store$getState$conte;
setContext({
algoliaInsightsPlugin: _objectSpread2(_objectSpread2({}, ((_store$getState$conte = store.getState().context) === null || _store$getState$conte === void 0 ? void 0 : _store$getState$conte.algoliaInsightsPlugin) || {}), {}, {
__automaticInsights: __automaticInsights
})
});
}
return postResolve(responses, sources, store);
}).then(function (collections) {
return reshape({
@ -1710,6 +1821,9 @@
});
return store.pendingRequests.add(request);
}
function isSearchResponseWithAutomaticInsightsFlag(items) {
return !Array.isArray(items) && Boolean(items === null || items === void 0 ? void 0 : items._automaticInsights);
}
var _excluded$1 = ["event", "props", "refresh", "store"];
function onKeyDown(_ref) {
@ -1721,7 +1835,8 @@
if (event.key === 'ArrowUp' || event.key === 'ArrowDown') {
// eslint-disable-next-line no-inner-declarations
var triggerScrollIntoView = function triggerScrollIntoView() {
var nodeItem = props.environment.document.getElementById("".concat(props.id, "-item-").concat(store.getState().activeItemId));
var highlightedItem = getActiveItem(store.getState());
var nodeItem = props.environment.document.getElementById(getAutocompleteElementId(props.id, "item-".concat(store.getState().activeItemId), highlightedItem === null || highlightedItem === void 0 ? void 0 : highlightedItem.source));
if (nodeItem) {
if (nodeItem.scrollIntoViewIfNeeded) {
nodeItem.scrollIntoViewIfNeeded(false);
@ -1790,7 +1905,7 @@
} else if (event.key === 'Tab') {
store.dispatch('blur', null);
// Hitting the `Escape` key signals the end of a user interaction with the
// Hitting the `Tab` key signals the end of a user interaction with the
// autocomplete. At this point, we should ignore any requests that are still
// pending and could reopen the panel once they resolve, because that would
// result in an unsolicited UI behavior.
@ -1899,9 +2014,8 @@
_excluded2 = ["inputElement", "formElement", "panelElement"],
_excluded3 = ["inputElement"],
_excluded4 = ["inputElement", "maxLength"],
_excluded5 = ["sourceIndex"],
_excluded6 = ["sourceIndex"],
_excluded7 = ["item", "source", "sourceIndex"];
_excluded5 = ["source"],
_excluded6 = ["item", "source"];
function getPropGetters(_ref) {
var props = _ref.props,
refresh = _ref.refresh,
@ -1970,8 +2084,11 @@
role: 'combobox',
'aria-expanded': store.getState().isOpen,
'aria-haspopup': 'listbox',
'aria-owns': store.getState().isOpen ? "".concat(props.id, "-list") : undefined,
'aria-labelledby': "".concat(props.id, "-label")
'aria-controls': store.getState().isOpen ? store.getState().collections.map(function (_ref2) {
var source = _ref2.source;
return getAutocompleteElementId(props.id, 'list', source);
}).join(' ') : undefined,
'aria-labelledby': getAutocompleteElementId(props.id, 'label')
}, rest);
};
var getFormProps = function getFormProps(providedProps) {
@ -2021,22 +2138,25 @@
}
store.dispatch('focus', null);
}
var _ref2 = providedProps || {};
_ref2.inputElement;
var _ref2$maxLength = _ref2.maxLength,
maxLength = _ref2$maxLength === void 0 ? 512 : _ref2$maxLength,
rest = _objectWithoutProperties$1(_ref2, _excluded4);
var _ref3 = providedProps || {};
_ref3.inputElement;
var _ref3$maxLength = _ref3.maxLength,
maxLength = _ref3$maxLength === void 0 ? 512 : _ref3$maxLength,
rest = _objectWithoutProperties$1(_ref3, _excluded4);
var activeItem = getActiveItem(store.getState());
var userAgent = ((_props$environment$na = props.environment.navigator) === null || _props$environment$na === void 0 ? void 0 : _props$environment$na.userAgent) || '';
var shouldFallbackKeyHint = isSamsung(userAgent);
var enterKeyHint = activeItem !== null && activeItem !== void 0 && activeItem.itemUrl && !shouldFallbackKeyHint ? 'go' : 'search';
var enterKeyHint = props.enterKeyHint || (activeItem !== null && activeItem !== void 0 && activeItem.itemUrl && !shouldFallbackKeyHint ? 'go' : 'search');
return _objectSpread2({
'aria-autocomplete': 'both',
'aria-activedescendant': store.getState().isOpen && store.getState().activeItemId !== null ? "".concat(props.id, "-item-").concat(store.getState().activeItemId) : undefined,
'aria-controls': store.getState().isOpen ? "".concat(props.id, "-list") : undefined,
'aria-labelledby': "".concat(props.id, "-label"),
'aria-activedescendant': store.getState().isOpen && store.getState().activeItemId !== null ? getAutocompleteElementId(props.id, "item-".concat(store.getState().activeItemId), activeItem === null || activeItem === void 0 ? void 0 : activeItem.source) : undefined,
'aria-controls': store.getState().isOpen ? store.getState().collections.map(function (_ref4) {
var source = _ref4.source;
return getAutocompleteElementId(props.id, 'list', source);
}).join(' ') : undefined,
'aria-labelledby': getAutocompleteElementId(props.id, 'label'),
value: store.getState().completion || store.getState().query,
id: "".concat(props.id, "-input"),
id: getAutocompleteElementId(props.id, 'input'),
autoComplete: 'off',
autoCorrect: 'off',
autoCapitalize: 'off',
@ -2047,6 +2167,20 @@
maxLength: maxLength,
type: 'search',
onChange: function onChange(event) {
var value = event.currentTarget.value;
if (props.ignoreCompositionEvents && getNativeEvent(event).isComposing) {
setters.setQuery(value);
return;
}
onInput(_objectSpread2({
event: event,
props: props,
query: value.slice(0, maxLength),
refresh: refresh,
store: store
}, setters));
},
onCompositionEnd: function onCompositionEnd(event) {
onInput(_objectSpread2({
event: event,
props: props,
@ -2056,6 +2190,9 @@
}, setters));
},
onKeyDown: function onKeyDown$1(event) {
if (getNativeEvent(event).isComposing) {
return;
}
onKeyDown(_objectSpread2({
event: event,
props: props,
@ -2082,26 +2219,20 @@
}
}, rest);
};
var getAutocompleteId = function getAutocompleteId(instanceId, sourceId) {
return typeof sourceId !== 'undefined' ? "".concat(instanceId, "-").concat(sourceId) : instanceId;
};
var getLabelProps = function getLabelProps(providedProps) {
var _ref3 = providedProps || {},
sourceIndex = _ref3.sourceIndex,
rest = _objectWithoutProperties$1(_ref3, _excluded5);
var getLabelProps = function getLabelProps(rest) {
return _objectSpread2({
htmlFor: "".concat(getAutocompleteId(props.id, sourceIndex), "-input"),
id: "".concat(getAutocompleteId(props.id, sourceIndex), "-label")
htmlFor: getAutocompleteElementId(props.id, 'input'),
id: getAutocompleteElementId(props.id, 'label')
}, rest);
};
var getListProps = function getListProps(providedProps) {
var _ref4 = providedProps || {},
sourceIndex = _ref4.sourceIndex,
rest = _objectWithoutProperties$1(_ref4, _excluded6);
var _ref5 = providedProps || {},
source = _ref5.source,
rest = _objectWithoutProperties$1(_ref5, _excluded5);
return _objectSpread2({
role: 'listbox',
'aria-labelledby': "".concat(getAutocompleteId(props.id, sourceIndex), "-label"),
id: "".concat(getAutocompleteId(props.id, sourceIndex), "-list")
'aria-labelledby': getAutocompleteElementId(props.id, 'label'),
id: getAutocompleteElementId(props.id, 'list', source)
}, rest);
};
var getPanelProps = function getPanelProps(rest) {
@ -2120,10 +2251,9 @@
var getItemProps = function getItemProps(providedProps) {
var item = providedProps.item,
source = providedProps.source,
sourceIndex = providedProps.sourceIndex,
rest = _objectWithoutProperties$1(providedProps, _excluded7);
rest = _objectWithoutProperties$1(providedProps, _excluded6);
return _objectSpread2({
id: "".concat(getAutocompleteId(props.id, sourceIndex), "-item-").concat(item.__autocomplete_id),
id: getAutocompleteElementId(props.id, "item-".concat(item.__autocomplete_id), source),
role: 'option',
'aria-selected': store.getState().activeItemId === item.__autocomplete_id,
onMouseMove: function onMouseMove(event) {
@ -2344,6 +2474,7 @@
// we lose track of the highlighted index. (Query-suggestions use-case)
action.props.openOnFocus === true ? action.props.defaultActiveItemId : null,
status: 'idle',
completion: null,
query: ''
});
}
@ -2399,6 +2530,7 @@
navigator: props.navigator
}, setters));
function onStoreStateChange(_ref) {
var _state$context, _state$context$algoli;
var prevState = _ref.prevState,
state = _ref.state;
props.onStateChange(_objectSpread2({
@ -2407,6 +2539,13 @@
refresh: refresh,
navigator: props.navigator
}, setters));
if (!isAlgoliaInsightsPluginEnabled() && (_state$context = state.context) !== null && _state$context !== void 0 && (_state$context$algoli = _state$context.algoliaInsightsPlugin) !== null && _state$context$algoli !== void 0 && _state$context$algoli.__automaticInsights && props.insights !== false) {
var plugin = createAlgoliaInsightsPlugin({
__autocomplete_clickAnalytics: false
});
props.plugins.push(plugin);
subscribePlugins([plugin]);
}
}
function refresh() {
return onInput(_objectSpread2({
@ -2421,34 +2560,40 @@
store: store
}, setters));
}
if (options.insights && !props.plugins.some(function (plugin) {
return plugin.name === 'aa.algoliaInsightsPlugin';
})) {
var insightsParams = typeof options.insights === 'boolean' ? {} : options.insights;
function subscribePlugins(plugins) {
plugins.forEach(function (plugin) {
var _plugin$subscribe;
return (_plugin$subscribe = plugin.subscribe) === null || _plugin$subscribe === void 0 ? void 0 : _plugin$subscribe.call(plugin, _objectSpread2(_objectSpread2({}, setters), {}, {
navigator: props.navigator,
refresh: refresh,
onSelect: function onSelect(fn) {
subscribers.push({
onSelect: fn
});
},
onActive: function onActive(fn) {
subscribers.push({
onActive: fn
});
},
onResolve: function onResolve(fn) {
subscribers.push({
onResolve: fn
});
}
}));
});
}
function isAlgoliaInsightsPluginEnabled() {
return props.plugins.some(function (plugin) {
return plugin.name === 'aa.algoliaInsightsPlugin';
});
}
if (props.insights && !isAlgoliaInsightsPluginEnabled()) {
var insightsParams = typeof props.insights === 'boolean' ? {} : props.insights;
props.plugins.push(createAlgoliaInsightsPlugin(insightsParams));
}
props.plugins.forEach(function (plugin) {
var _plugin$subscribe;
return (_plugin$subscribe = plugin.subscribe) === null || _plugin$subscribe === void 0 ? void 0 : _plugin$subscribe.call(plugin, _objectSpread2(_objectSpread2({}, setters), {}, {
navigator: props.navigator,
refresh: refresh,
onSelect: function onSelect(fn) {
subscribers.push({
onSelect: fn
});
},
onActive: function onActive(fn) {
subscribers.push({
onActive: fn
});
},
onResolve: function onResolve(fn) {
subscribers.push({
onResolve: fn
});
}
}));
});
subscribePlugins(props.plugins);
injectMetadata({
metadata: getMetadata({
plugins: props.plugins,

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,7 +1,7 @@
{
"name": "@algolia/autocomplete-core",
"description": "Core primitives for building autocomplete experiences.",
"version": "1.9.3",
"version": "1.17.7",
"license": "MIT",
"homepage": "https://github.com/algolia/autocomplete",
"repository": "algolia/autocomplete",
@ -31,11 +31,11 @@
"watch": "watch \"yarn on:change\" --ignoreDirectoryPattern \"/dist/\""
},
"dependencies": {
"@algolia/autocomplete-plugin-algolia-insights": "1.9.3",
"@algolia/autocomplete-shared": "1.9.3"
"@algolia/autocomplete-plugin-algolia-insights": "1.17.7",
"@algolia/autocomplete-shared": "1.17.7"
},
"devDependencies": {
"@algolia/autocomplete-preset-algolia": "1.9.3",
"@algolia/autocomplete-preset-algolia": "1.17.7",
"@algolia/client-search": "4.16.0",
"algoliasearch": "4.16.0"
}

View file

@ -1,5 +1,5 @@
import { AutocompletePlugin } from '@algolia/autocomplete-shared';
import { InsightsClient, OnActiveParams, OnItemsChangeParams, OnSelectParams } from './types';
import { InsightsClient, InsightsMethodMap, OnActiveParams, OnItemsChangeParams, OnSelectParams } from './types';
export declare type CreateAlgoliaInsightsPluginParams = {
/**
* The initialized Search Insights client.
@ -7,6 +7,12 @@ export declare type CreateAlgoliaInsightsPluginParams = {
* @link https://www.algolia.com/doc/ui-libraries/autocomplete/api-reference/autocomplete-plugin-algolia-insights/createAlgoliaInsightsPlugin/#param-insightsclient
*/
insightsClient?: InsightsClient;
/**
* Insights parameters to forward to the Insights clients init method.
*
* @link https://www.algolia.com/doc/ui-libraries/autocomplete/api-reference/autocomplete-plugin-algolia-insights/createAlgoliaInsightsPlugin/#param-insightsinitparams
*/
insightsInitParams?: Partial<InsightsMethodMap['init'][0]>;
/**
* Hook to send an Insights event when the items change.
*
@ -33,5 +39,9 @@ export declare type CreateAlgoliaInsightsPluginParams = {
* @link https://www.algolia.com/doc/ui-libraries/autocomplete/api-reference/autocomplete-plugin-algolia-insights/createAlgoliaInsightsPlugin/#param-onactive
*/
onActive?(params: OnActiveParams): void;
/**
* @internal
*/
__autocomplete_clickAnalytics?: boolean;
};
export declare function createAlgoliaInsightsPlugin(options: CreateAlgoliaInsightsPluginParams): AutocompletePlugin<any, undefined>;

View file

@ -16,7 +16,7 @@ import { createSearchInsightsApi } from './createSearchInsightsApi';
import { createViewedEvents } from './createViewedEvents';
import { isAlgoliaInsightsHit } from './isAlgoliaInsightsHit';
var VIEW_EVENT_DELAY = 400;
var ALGOLIA_INSIGHTS_VERSION = '2.6.0';
var ALGOLIA_INSIGHTS_VERSION = '2.15.0';
var ALGOLIA_INSIGHTS_SRC = "https://cdn.jsdelivr.net/npm/search-insights@".concat(ALGOLIA_INSIGHTS_VERSION, "/dist/search-insights.min.js");
var sendViewedObjectIDs = debounce(function (_ref) {
var onItemsChange = _ref.onItemsChange,
@ -38,9 +38,11 @@ var sendViewedObjectIDs = debounce(function (_ref) {
export function createAlgoliaInsightsPlugin(options) {
var _getOptions = getOptions(options),
providedInsightsClient = _getOptions.insightsClient,
insightsInitParams = _getOptions.insightsInitParams,
onItemsChange = _getOptions.onItemsChange,
onSelectEvent = _getOptions.onSelect,
onActiveEvent = _getOptions.onActive;
onActiveEvent = _getOptions.onActive,
__autocomplete_clickAnalytics = _getOptions.__autocomplete_clickAnalytics;
var insightsClient = providedInsightsClient;
if (!providedInsightsClient) {
safelyRunOnBrowser(function (_ref2) {
@ -68,6 +70,17 @@ export function createAlgoliaInsightsPlugin(options) {
}
});
}
// We return an empty plugin if `insightsClient` is still undefined at
// this stage, which can happen in server environments.
if (!insightsClient) {
return {};
}
if (insightsInitParams) {
insightsClient('init', _objectSpread({
partial: true
}, insightsInitParams));
}
var insights = createSearchInsightsApi(insightsClient);
var previousItems = createRef([]);
var debouncedOnStateChange = debounce(function (_ref3) {
@ -100,19 +113,57 @@ export function createAlgoliaInsightsPlugin(options) {
var setContext = _ref4.setContext,
onSelect = _ref4.onSelect,
onActive = _ref4.onActive;
var isAuthenticatedToken = false;
function setInsightsContext(userToken) {
setContext({
algoliaInsightsPlugin: {
__algoliaSearchParameters: _objectSpread(_objectSpread({}, __autocomplete_clickAnalytics ? {
clickAnalytics: true
} : {}), userToken ? {
userToken: normalizeUserToken(userToken)
} : {}),
insights: insights
}
});
}
insightsClient('addAlgoliaAgent', 'insights-plugin');
setContext({
algoliaInsightsPlugin: {
__algoliaSearchParameters: {
clickAnalytics: true
},
insights: insights
setInsightsContext();
// Handles user token changes
insightsClient('onUserTokenChange', function (userToken) {
if (!isAuthenticatedToken) {
setInsightsContext(userToken);
}
});
insightsClient('getUserToken', null, function (_error, userToken) {
if (!isAuthenticatedToken) {
setInsightsContext(userToken);
}
});
// Handles authenticated user token changes
insightsClient('onAuthenticatedUserTokenChange', function (authenticatedUserToken) {
if (authenticatedUserToken) {
isAuthenticatedToken = true;
setInsightsContext(authenticatedUserToken);
} else {
isAuthenticatedToken = false;
insightsClient('getUserToken', null, function (_error, userToken) {
return setInsightsContext(userToken);
});
}
});
insightsClient('getAuthenticatedUserToken', null, function (_error, authenticatedUserToken) {
if (authenticatedUserToken) {
isAuthenticatedToken = true;
setInsightsContext(authenticatedUserToken);
}
});
onSelect(function (_ref5) {
var item = _ref5.item,
state = _ref5.state,
event = _ref5.event;
event = _ref5.event,
source = _ref5.source;
if (!isAlgoliaInsightsHit(item)) {
return;
}
@ -125,12 +176,13 @@ export function createAlgoliaInsightsPlugin(options) {
eventName: 'Item Selected'
}, createClickedEvent({
item: item,
items: previousItems.current
items: source.getItems().filter(isAlgoliaInsightsHit)
}))]
});
});
onActive(function (_ref6) {
var item = _ref6.item,
source = _ref6.source,
state = _ref6.state,
event = _ref6.event;
if (!isAlgoliaInsightsHit(item)) {
@ -145,7 +197,7 @@ export function createAlgoliaInsightsPlugin(options) {
eventName: 'Item Active'
}, createClickedEvent({
item: item,
items: previousItems.current
items: source.getItems().filter(isAlgoliaInsightsHit)
}))]
});
});
@ -159,27 +211,36 @@ export function createAlgoliaInsightsPlugin(options) {
__autocomplete_pluginOptions: options
};
}
function getAlgoliaSources() {
var _context$algoliaInsig;
var algoliaSourceBase = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
var context = arguments.length > 1 ? arguments[1] : undefined;
return [].concat(_toConsumableArray(algoliaSourceBase), ['autocomplete-internal'], _toConsumableArray((_context$algoliaInsig = context.algoliaInsightsPlugin) !== null && _context$algoliaInsig !== void 0 && _context$algoliaInsig.__automaticInsights ? ['autocomplete-automatic'] : []));
}
function getOptions(options) {
return _objectSpread({
onItemsChange: function onItemsChange(_ref8) {
var insights = _ref8.insights,
insightsEvents = _ref8.insightsEvents;
insightsEvents = _ref8.insightsEvents,
state = _ref8.state;
insights.viewedObjectIDs.apply(insights, _toConsumableArray(insightsEvents.map(function (event) {
return _objectSpread(_objectSpread({}, event), {}, {
algoliaSource: [].concat(_toConsumableArray(event.algoliaSource || []), ['autocomplete-internal'])
algoliaSource: getAlgoliaSources(event.algoliaSource, state.context)
});
})));
},
onSelect: function onSelect(_ref9) {
var insights = _ref9.insights,
insightsEvents = _ref9.insightsEvents;
insightsEvents = _ref9.insightsEvents,
state = _ref9.state;
insights.clickedObjectIDsAfterSearch.apply(insights, _toConsumableArray(insightsEvents.map(function (event) {
return _objectSpread(_objectSpread({}, event), {}, {
algoliaSource: [].concat(_toConsumableArray(event.algoliaSource || []), ['autocomplete-internal'])
algoliaSource: getAlgoliaSources(event.algoliaSource, state.context)
});
})));
},
onActive: noop
onActive: noop,
__autocomplete_clickAnalytics: true
}, options);
}
function loadInsights(environment) {
@ -197,4 +258,12 @@ function loadInsights(environment) {
// eslint-disable-next-line no-console
console.error(errorMessage);
}
}
/**
* While `search-insights` supports both string and number user tokens,
* the Search API only accepts strings. This function normalizes the user token.
*/
function normalizeUserToken(userToken) {
return typeof userToken === 'number' ? userToken.toString() : userToken;
}

View file

@ -1,6 +1,7 @@
export function createClickedEvent(_ref) {
var item = _ref.item,
items = _ref.items;
_ref$items = _ref.items,
items = _ref$items === void 0 ? [] : _ref$items;
return {
index: item.__autocomplete_indexName,
items: [item],

View file

@ -1,9 +1,16 @@
import { ClickedFiltersParams, ClickedObjectIDsAfterSearchParams, ClickedObjectIDsParams, ConvertedFiltersParams, ConvertedObjectIDsAfterSearchParams, ConvertedObjectIDsParams, InsightsClient, InsightsParamsWithItems, ViewedFiltersParams, ViewedObjectIDsParams } from './types';
import { ClickedFiltersParams, ClickedObjectIDsAfterSearchParams, ClickedObjectIDsParams, ConvertedFiltersParams, ConvertedObjectIDsAfterSearchParams, ConvertedObjectIDsParams, InsightsClient, WithArbitraryParams, InsightsParamsWithItems, ViewedFiltersParams, ViewedObjectIDsParams } from './types';
export declare function createSearchInsightsApi(searchInsights: InsightsClient): {
/**
* Initializes Insights with Algolia credentials.
*/
init(appId: string, apiKey: string): void;
/**
* Sets the authenticated user token to attach to events.
* Unsets the authenticated token by passing `undefined`.
*
* @link https://www.algolia.com/doc/api-reference/api-methods/set-authenticated-user-token/
*/
setAuthenticatedUserToken(authenticatedUserToken: string | undefined): void;
/**
* Sets the user token to attach to events.
*/
@ -13,47 +20,47 @@ export declare function createSearchInsightsApi(searchInsights: InsightsClient):
*
* @link https://www.algolia.com/doc/api-reference/api-methods/clicked-object-ids-after-search/
*/
clickedObjectIDsAfterSearch(...params: Array<InsightsParamsWithItems<ClickedObjectIDsAfterSearchParams>>): void;
clickedObjectIDsAfterSearch(...params: Array<WithArbitraryParams<InsightsParamsWithItems<ClickedObjectIDsAfterSearchParams>>>): void;
/**
* Sends click events to capture clicked items.
*
* @link https://www.algolia.com/doc/api-reference/api-methods/clicked-object-ids/
*/
clickedObjectIDs(...params: Array<InsightsParamsWithItems<ClickedObjectIDsParams>>): void;
clickedObjectIDs(...params: Array<WithArbitraryParams<InsightsParamsWithItems<ClickedObjectIDsParams>>>): void;
/**
* Sends click events to capture the filters a user clicks on.
*
* @link https://www.algolia.com/doc/api-reference/api-methods/clicked-filters/
*/
clickedFilters(...params: ClickedFiltersParams[]): void;
clickedFilters(...params: Array<WithArbitraryParams<ClickedFiltersParams>>): void;
/**
* Sends conversion events to capture a query and its clicked items.
*
* @link https://www.algolia.com/doc/api-reference/api-methods/converted-object-ids-after-search/
*/
convertedObjectIDsAfterSearch(...params: Array<InsightsParamsWithItems<ConvertedObjectIDsAfterSearchParams>>): void;
convertedObjectIDsAfterSearch(...params: Array<WithArbitraryParams<InsightsParamsWithItems<ConvertedObjectIDsAfterSearchParams>>>): void;
/**
* Sends conversion events to capture clicked items.
*
* @link https://www.algolia.com/doc/api-reference/api-methods/converted-object-ids/
*/
convertedObjectIDs(...params: Array<InsightsParamsWithItems<ConvertedObjectIDsParams>>): void;
convertedObjectIDs(...params: Array<WithArbitraryParams<InsightsParamsWithItems<ConvertedObjectIDsParams>>>): void;
/**
* Sends conversion events to capture the filters a user uses when converting.
*
* @link https://www.algolia.com/doc/api-reference/api-methods/converted-filters/
*/
convertedFilters(...params: ConvertedFiltersParams[]): void;
convertedFilters(...params: Array<WithArbitraryParams<ConvertedFiltersParams>>): void;
/**
* Sends view events to capture clicked items.
*
* @link https://www.algolia.com/doc/api-reference/api-methods/viewed-object-ids/
*/
viewedObjectIDs(...params: Array<InsightsParamsWithItems<ViewedObjectIDsParams>>): void;
viewedObjectIDs(...params: Array<WithArbitraryParams<InsightsParamsWithItems<ViewedObjectIDsParams>>>): void;
/**
* Sends view events to capture the filters a user uses when viewing.
*
* @link https://www.algolia.com/doc/api-reference/api-methods/viewed-filters/
*/
viewedFilters(...params: ViewedFiltersParams[]): void;
viewedFilters(...params: Array<WithArbitraryParams<ViewedFiltersParams>>): void;
};

View file

@ -65,6 +65,15 @@ export function createSearchInsightsApi(searchInsights) {
apiKey: apiKey
});
},
/**
* Sets the authenticated user token to attach to events.
* Unsets the authenticated token by passing `undefined`.
*
* @link https://www.algolia.com/doc/api-reference/api-methods/set-authenticated-user-token/
*/
setAuthenticatedUserToken: function setAuthenticatedUserToken(authenticatedUserToken) {
searchInsights('setAuthenticatedUserToken', authenticatedUserToken);
},
/**
* Sets the user token to attach to events.
*/

View file

@ -1,6 +1,7 @@
import { createSearchInsightsApi } from '../createSearchInsightsApi';
import type { AlgoliaInsightsHit } from './AlgoliaInsightsHit';
export declare type AutocompleteInsightsApi = ReturnType<typeof createSearchInsightsApi>;
export declare type WithArbitraryParams<TParams extends Record<string, unknown>> = Record<string, unknown> & TParams;
export declare type InsightsParamsWithItems<TParams extends {
objectIDs: string[];
}> = Omit<TParams, 'objectIDs'> & {

View file

@ -1,5 +1,6 @@
import type { InsightsMethodMap, InsightsClient as _InsightsClient } from 'search-insights';
export type { Init as InsightsInit, AddAlgoliaAgent as InsightsAddAlgoliaAgent, SetUserToken as InsightsSetUserToken, GetUserToken as InsightsGetUserToken, OnUserTokenChange as InsightsOnUserTokenChange, } from 'search-insights';
import type { InsightsMethodMap as _InsightsMethodMap, InsightsClient as _InsightsClient } from 'search-insights';
export type { Init as InsightsInit, AddAlgoliaAgent as InsightsAddAlgoliaAgent, SetUserToken as InsightsSetUserToken, GetUserToken as InsightsGetUserToken, OnUserTokenChange as InsightsOnUserTokenChange, InsightsEvent, } from 'search-insights';
export declare type InsightsMethodMap = _InsightsMethodMap;
export declare type InsightsClientMethod = keyof InsightsMethodMap;
export declare type InsightsClientPayload = {
eventName: string;

View file

@ -1,4 +1,4 @@
/*! @algolia/autocomplete-plugin-algolia-insights 1.9.3 | MIT License | © Algolia, Inc. and contributors | https://github.com/algolia/autocomplete */
/*! @algolia/autocomplete-plugin-algolia-insights 1.17.7 | MIT License | © Algolia, Inc. and contributors | https://github.com/algolia/autocomplete */
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
@ -205,7 +205,8 @@
function createClickedEvent(_ref) {
var item = _ref.item,
items = _ref.items;
_ref$items = _ref.items,
items = _ref$items === void 0 ? [] : _ref$items;
return {
index: item.__autocomplete_indexName,
items: [item],
@ -287,6 +288,15 @@
apiKey: apiKey
});
},
/**
* Sets the authenticated user token to attach to events.
* Unsets the authenticated token by passing `undefined`.
*
* @link https://www.algolia.com/doc/api-reference/api-methods/set-authenticated-user-token/
*/
setAuthenticatedUserToken: function setAuthenticatedUserToken(authenticatedUserToken) {
searchInsights('setAuthenticatedUserToken', authenticatedUserToken);
},
/**
* Sets the user token to attach to events.
*/
@ -440,7 +450,7 @@
}
var VIEW_EVENT_DELAY = 400;
var ALGOLIA_INSIGHTS_VERSION = '2.6.0';
var ALGOLIA_INSIGHTS_VERSION = '2.15.0';
var ALGOLIA_INSIGHTS_SRC = "https://cdn.jsdelivr.net/npm/search-insights@".concat(ALGOLIA_INSIGHTS_VERSION, "/dist/search-insights.min.js");
var sendViewedObjectIDs = debounce(function (_ref) {
var onItemsChange = _ref.onItemsChange,
@ -462,9 +472,11 @@
function createAlgoliaInsightsPlugin(options) {
var _getOptions = getOptions(options),
providedInsightsClient = _getOptions.insightsClient,
insightsInitParams = _getOptions.insightsInitParams,
onItemsChange = _getOptions.onItemsChange,
onSelectEvent = _getOptions.onSelect,
onActiveEvent = _getOptions.onActive;
onActiveEvent = _getOptions.onActive,
__autocomplete_clickAnalytics = _getOptions.__autocomplete_clickAnalytics;
var insightsClient = providedInsightsClient;
if (!providedInsightsClient) {
safelyRunOnBrowser(function (_ref2) {
@ -492,6 +504,17 @@
}
});
}
// We return an empty plugin if `insightsClient` is still undefined at
// this stage, which can happen in server environments.
if (!insightsClient) {
return {};
}
if (insightsInitParams) {
insightsClient('init', _objectSpread2({
partial: true
}, insightsInitParams));
}
var insights = createSearchInsightsApi(insightsClient);
var previousItems = createRef([]);
var debouncedOnStateChange = debounce(function (_ref3) {
@ -524,19 +547,57 @@
var setContext = _ref4.setContext,
onSelect = _ref4.onSelect,
onActive = _ref4.onActive;
var isAuthenticatedToken = false;
function setInsightsContext(userToken) {
setContext({
algoliaInsightsPlugin: {
__algoliaSearchParameters: _objectSpread2(_objectSpread2({}, __autocomplete_clickAnalytics ? {
clickAnalytics: true
} : {}), userToken ? {
userToken: normalizeUserToken(userToken)
} : {}),
insights: insights
}
});
}
insightsClient('addAlgoliaAgent', 'insights-plugin');
setContext({
algoliaInsightsPlugin: {
__algoliaSearchParameters: {
clickAnalytics: true
},
insights: insights
setInsightsContext();
// Handles user token changes
insightsClient('onUserTokenChange', function (userToken) {
if (!isAuthenticatedToken) {
setInsightsContext(userToken);
}
});
insightsClient('getUserToken', null, function (_error, userToken) {
if (!isAuthenticatedToken) {
setInsightsContext(userToken);
}
});
// Handles authenticated user token changes
insightsClient('onAuthenticatedUserTokenChange', function (authenticatedUserToken) {
if (authenticatedUserToken) {
isAuthenticatedToken = true;
setInsightsContext(authenticatedUserToken);
} else {
isAuthenticatedToken = false;
insightsClient('getUserToken', null, function (_error, userToken) {
return setInsightsContext(userToken);
});
}
});
insightsClient('getAuthenticatedUserToken', null, function (_error, authenticatedUserToken) {
if (authenticatedUserToken) {
isAuthenticatedToken = true;
setInsightsContext(authenticatedUserToken);
}
});
onSelect(function (_ref5) {
var item = _ref5.item,
state = _ref5.state,
event = _ref5.event;
event = _ref5.event,
source = _ref5.source;
if (!isAlgoliaInsightsHit(item)) {
return;
}
@ -549,12 +610,13 @@
eventName: 'Item Selected'
}, createClickedEvent({
item: item,
items: previousItems.current
items: source.getItems().filter(isAlgoliaInsightsHit)
}))]
});
});
onActive(function (_ref6) {
var item = _ref6.item,
source = _ref6.source,
state = _ref6.state,
event = _ref6.event;
if (!isAlgoliaInsightsHit(item)) {
@ -569,7 +631,7 @@
eventName: 'Item Active'
}, createClickedEvent({
item: item,
items: previousItems.current
items: source.getItems().filter(isAlgoliaInsightsHit)
}))]
});
});
@ -583,27 +645,36 @@
__autocomplete_pluginOptions: options
};
}
function getAlgoliaSources() {
var _context$algoliaInsig;
var algoliaSourceBase = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
var context = arguments.length > 1 ? arguments[1] : undefined;
return [].concat(_toConsumableArray(algoliaSourceBase), ['autocomplete-internal'], _toConsumableArray((_context$algoliaInsig = context.algoliaInsightsPlugin) !== null && _context$algoliaInsig !== void 0 && _context$algoliaInsig.__automaticInsights ? ['autocomplete-automatic'] : []));
}
function getOptions(options) {
return _objectSpread2({
onItemsChange: function onItemsChange(_ref8) {
var insights = _ref8.insights,
insightsEvents = _ref8.insightsEvents;
insightsEvents = _ref8.insightsEvents,
state = _ref8.state;
insights.viewedObjectIDs.apply(insights, _toConsumableArray(insightsEvents.map(function (event) {
return _objectSpread2(_objectSpread2({}, event), {}, {
algoliaSource: [].concat(_toConsumableArray(event.algoliaSource || []), ['autocomplete-internal'])
algoliaSource: getAlgoliaSources(event.algoliaSource, state.context)
});
})));
},
onSelect: function onSelect(_ref9) {
var insights = _ref9.insights,
insightsEvents = _ref9.insightsEvents;
insightsEvents = _ref9.insightsEvents,
state = _ref9.state;
insights.clickedObjectIDsAfterSearch.apply(insights, _toConsumableArray(insightsEvents.map(function (event) {
return _objectSpread2(_objectSpread2({}, event), {}, {
algoliaSource: [].concat(_toConsumableArray(event.algoliaSource || []), ['autocomplete-internal'])
algoliaSource: getAlgoliaSources(event.algoliaSource, state.context)
});
})));
},
onActive: noop
onActive: noop,
__autocomplete_clickAnalytics: true
}, options);
}
function loadInsights(environment) {
@ -623,6 +694,14 @@
}
}
/**
* While `search-insights` supports both string and number user tokens,
* the Search API only accepts strings. This function normalizes the user token.
*/
function normalizeUserToken(userToken) {
return typeof userToken === 'number' ? userToken.toString() : userToken;
}
exports.createAlgoliaInsightsPlugin = createAlgoliaInsightsPlugin;
Object.defineProperty(exports, '__esModule', { value: true });

Some files were not shown because too many files have changed in this diff Show more