From eb8c2190ea46faf22a1b7dfff581ab0801c22739 Mon Sep 17 00:00:00 2001 From: Luciano Mammino Date: Fri, 25 Aug 2023 18:39:20 +0100 Subject: [PATCH] chore: fix website search --- website/package-lock.json | 961 ++++++++---------- website/package.json | 11 +- website/src/theme/SearchBar/DocSearch.js | 293 ------ website/src/theme/SearchBar/algolia.css | 526 ---------- website/src/theme/SearchBar/index.js | 119 --- website/src/theme/SearchBar/lib/DocSearch.js | 302 ------ .../src/theme/SearchBar/lib/lunar-search.js | 165 --- website/src/theme/SearchBar/lib/templates.js | 114 --- website/src/theme/SearchBar/lib/utils.js | 269 ----- website/src/theme/SearchBar/lunar-search.js | 166 --- website/src/theme/SearchBar/styles.css | 33 - website/src/theme/SearchBar/templates.js | 112 -- website/src/theme/SearchBar/utils.js | 269 ----- 13 files changed, 405 insertions(+), 2935 deletions(-) delete mode 100644 website/src/theme/SearchBar/DocSearch.js delete mode 100644 website/src/theme/SearchBar/algolia.css delete mode 100644 website/src/theme/SearchBar/index.js delete mode 100644 website/src/theme/SearchBar/lib/DocSearch.js delete mode 100644 website/src/theme/SearchBar/lib/lunar-search.js delete mode 100644 website/src/theme/SearchBar/lib/templates.js delete mode 100644 website/src/theme/SearchBar/lib/utils.js delete mode 100644 website/src/theme/SearchBar/lunar-search.js delete mode 100644 website/src/theme/SearchBar/styles.css delete mode 100644 website/src/theme/SearchBar/templates.js delete mode 100644 website/src/theme/SearchBar/utils.js diff --git a/website/package-lock.json b/website/package-lock.json index a15d9568c..2e25c9aec 100644 --- a/website/package-lock.json +++ b/website/package-lock.json @@ -8,34 +8,47 @@ "name": "middy", "version": "0.0.0", "dependencies": { - "@docusaurus/core": "2.3.1", - "@docusaurus/preset-classic": "2.3.1", - "@docusaurus/remark-plugin-npm2yarn": "2.3.1", + "@docusaurus/core": "^2.4.1", + "@docusaurus/preset-classic": "^2.4.1", + "@docusaurus/remark-plugin-npm2yarn": "^2.4.1", "@mdx-js/react": "1.6.22", + "classnames": "^2.3.2", "clsx": "^1.1.1", - "docusaurus-lunr-search": "^2.3.2", + "docusaurus-lunr-search": "^2.4.1", "prism-react-renderer": "^1.3.1", "react": "^17.0.2", "react-dom": "^17.0.2" }, "devDependencies": { - "@docusaurus/types": "^2.0.0-beta.15" + "@docusaurus/types": "^2.4.1" } }, "node_modules/@algolia/autocomplete-core": { - "version": "1.7.4", - "resolved": "https://registry.npmjs.org/@algolia/autocomplete-core/-/autocomplete-core-1.7.4.tgz", - "integrity": "sha512-daoLpQ3ps/VTMRZDEBfU8ixXd+amZcNJ4QSP3IERGyzqnL5Ch8uSRFt/4G8pUvW9c3o6GA4vtVv4I4lmnkdXyg==", + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/@algolia/autocomplete-core/-/autocomplete-core-1.9.3.tgz", + "integrity": "sha512-009HdfugtGCdC4JdXUbVJClA0q0zh24yyePn+KUGk3rP7j8FEe/m5Yo/z65gn6nP/cM39PxpzqKrL7A6fP6PPw==", "dependencies": { - "@algolia/autocomplete-shared": "1.7.4" + "@algolia/autocomplete-plugin-algolia-insights": "1.9.3", + "@algolia/autocomplete-shared": "1.9.3" + } + }, + "node_modules/@algolia/autocomplete-plugin-algolia-insights": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/@algolia/autocomplete-plugin-algolia-insights/-/autocomplete-plugin-algolia-insights-1.9.3.tgz", + "integrity": "sha512-a/yTUkcO/Vyy+JffmAnTWbr4/90cLzw+CC3bRbhnULr/EM0fGNvM13oQQ14f2moLMcVDyAx/leczLlAOovhSZg==", + "dependencies": { + "@algolia/autocomplete-shared": "1.9.3" + }, + "peerDependencies": { + "search-insights": ">= 1 < 3" } }, "node_modules/@algolia/autocomplete-preset-algolia": { - "version": "1.7.4", - "resolved": "https://registry.npmjs.org/@algolia/autocomplete-preset-algolia/-/autocomplete-preset-algolia-1.7.4.tgz", - "integrity": "sha512-s37hrvLEIfcmKY8VU9LsAXgm2yfmkdHT3DnA3SgHaY93yjZ2qL57wzb5QweVkYuEBZkT2PIREvRoLXC2sxTbpQ==", + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/@algolia/autocomplete-preset-algolia/-/autocomplete-preset-algolia-1.9.3.tgz", + "integrity": "sha512-d4qlt6YmrLMYy95n5TB52wtNDr6EgAIPH81dvvvW8UmuWRgxEtY0NJiPwl/h95JtG2vmRM804M0DSwMCNZlzRA==", "dependencies": { - "@algolia/autocomplete-shared": "1.7.4" + "@algolia/autocomplete-shared": "1.9.3" }, "peerDependencies": { "@algolia/client-search": ">= 4.9.1 < 6", @@ -43,79 +56,83 @@ } }, "node_modules/@algolia/autocomplete-shared": { - "version": "1.7.4", - "resolved": "https://registry.npmjs.org/@algolia/autocomplete-shared/-/autocomplete-shared-1.7.4.tgz", - "integrity": "sha512-2VGCk7I9tA9Ge73Km99+Qg87w0wzW4tgUruvWAn/gfey1ZXgmxZtyIRBebk35R1O8TbK77wujVtCnpsGpRy1kg==" + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/@algolia/autocomplete-shared/-/autocomplete-shared-1.9.3.tgz", + "integrity": "sha512-Wnm9E4Ye6Rl6sTTqjoymD+l8DjSTHsHboVRYrKgEt8Q7UHm9nYbqhN/i0fhUYA3OAEH7WA8x3jfpnmJm3rKvaQ==", + "peerDependencies": { + "@algolia/client-search": ">= 4.9.1 < 6", + "algoliasearch": ">= 4.9.1 < 6" + } }, "node_modules/@algolia/cache-browser-local-storage": { - "version": "4.16.0", - "resolved": "https://registry.npmjs.org/@algolia/cache-browser-local-storage/-/cache-browser-local-storage-4.16.0.tgz", - "integrity": "sha512-jVrk0YB3tjOhD5/lhBtYCVCeLjZmVpf2kdi4puApofytf/R0scjWz0GdozlW4HhU+Prxmt/c9ge4QFjtv5OAzQ==", + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/@algolia/cache-browser-local-storage/-/cache-browser-local-storage-4.19.1.tgz", + "integrity": "sha512-FYAZWcGsFTTaSAwj9Std8UML3Bu8dyWDncM7Ls8g+58UOe4XYdlgzXWbrIgjaguP63pCCbMoExKr61B+ztK3tw==", "dependencies": { - "@algolia/cache-common": "4.16.0" + "@algolia/cache-common": "4.19.1" } }, "node_modules/@algolia/cache-common": { - "version": "4.16.0", - "resolved": "https://registry.npmjs.org/@algolia/cache-common/-/cache-common-4.16.0.tgz", - "integrity": "sha512-4iHjkSYQYw46pITrNQgXXhvUmcekI8INz1m+SzmqLX8jexSSy4Ky4zfGhZzhhhLHXUP3+x/PK/c0qPjxEvRwKQ==" + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/@algolia/cache-common/-/cache-common-4.19.1.tgz", + "integrity": "sha512-XGghi3l0qA38HiqdoUY+wvGyBsGvKZ6U3vTiMBT4hArhP3fOGLXpIINgMiiGjTe4FVlTa5a/7Zf2bwlIHfRqqg==" }, "node_modules/@algolia/cache-in-memory": { - "version": "4.16.0", - "resolved": "https://registry.npmjs.org/@algolia/cache-in-memory/-/cache-in-memory-4.16.0.tgz", - "integrity": "sha512-p7RYykvA6Ip6QENxrh99nOD77otVh1sJRivcgcVpnjoZb5sIN3t33eUY1DpB9QSBizcrW+qk19rNkdnZ43a+PQ==", + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/@algolia/cache-in-memory/-/cache-in-memory-4.19.1.tgz", + "integrity": "sha512-+PDWL+XALGvIginigzu8oU6eWw+o76Z8zHbBovWYcrtWOEtinbl7a7UTt3x3lthv+wNuFr/YD1Gf+B+A9V8n5w==", "dependencies": { - "@algolia/cache-common": "4.16.0" + "@algolia/cache-common": "4.19.1" } }, "node_modules/@algolia/client-account": { - "version": "4.16.0", - "resolved": "https://registry.npmjs.org/@algolia/client-account/-/client-account-4.16.0.tgz", - "integrity": "sha512-eydcfpdIyuWoKgUSz5iZ/L0wE/Wl7958kACkvTHLDNXvK/b8Z1zypoJavh6/km1ZNQmFpeYS2jrmq0kUSFn02w==", + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/@algolia/client-account/-/client-account-4.19.1.tgz", + "integrity": "sha512-Oy0ritA2k7AMxQ2JwNpfaEcgXEDgeyKu0V7E7xt/ZJRdXfEpZcwp9TOg4TJHC7Ia62gIeT2Y/ynzsxccPw92GA==", "dependencies": { - "@algolia/client-common": "4.16.0", - "@algolia/client-search": "4.16.0", - "@algolia/transporter": "4.16.0" + "@algolia/client-common": "4.19.1", + "@algolia/client-search": "4.19.1", + "@algolia/transporter": "4.19.1" } }, "node_modules/@algolia/client-analytics": { - "version": "4.16.0", - "resolved": "https://registry.npmjs.org/@algolia/client-analytics/-/client-analytics-4.16.0.tgz", - "integrity": "sha512-cONWXH3BfilgdlCofUm492bJRWtpBLVW/hsUlfoFtiX1u05xoBP7qeiDwh9RR+4pSLHLodYkHAf5U4honQ55Qg==", + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/@algolia/client-analytics/-/client-analytics-4.19.1.tgz", + "integrity": "sha512-5QCq2zmgdZLIQhHqwl55ZvKVpLM3DNWjFI4T+bHr3rGu23ew2bLO4YtyxaZeChmDb85jUdPDouDlCumGfk6wOg==", "dependencies": { - "@algolia/client-common": "4.16.0", - "@algolia/client-search": "4.16.0", - "@algolia/requester-common": "4.16.0", - "@algolia/transporter": "4.16.0" + "@algolia/client-common": "4.19.1", + "@algolia/client-search": "4.19.1", + "@algolia/requester-common": "4.19.1", + "@algolia/transporter": "4.19.1" } }, "node_modules/@algolia/client-common": { - "version": "4.16.0", - "resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-4.16.0.tgz", - "integrity": "sha512-QVdR4019ukBH6f5lFr27W60trRxQF1SfS1qo0IP6gjsKhXhUVJuHxOCA6ArF87jrNkeuHEoRoDU+GlvaecNo8g==", + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-4.19.1.tgz", + "integrity": "sha512-3kAIVqTcPrjfS389KQvKzliC559x+BDRxtWamVJt8IVp7LGnjq+aVAXg4Xogkur1MUrScTZ59/AaUd5EdpyXgA==", "dependencies": { - "@algolia/requester-common": "4.16.0", - "@algolia/transporter": "4.16.0" + "@algolia/requester-common": "4.19.1", + "@algolia/transporter": "4.19.1" } }, "node_modules/@algolia/client-personalization": { - "version": "4.16.0", - "resolved": "https://registry.npmjs.org/@algolia/client-personalization/-/client-personalization-4.16.0.tgz", - "integrity": "sha512-irtLafssDGPuhYqIwxqOxiWlVYvrsBD+EMA1P9VJtkKi3vSNBxiWeQ0f0Tn53cUNdSRNEssfoEH84JL97SV2SQ==", + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/@algolia/client-personalization/-/client-personalization-4.19.1.tgz", + "integrity": "sha512-8CWz4/H5FA+krm9HMw2HUQenizC/DxUtsI5oYC0Jxxyce1vsr8cb1aEiSJArQT6IzMynrERif1RVWLac1m36xw==", "dependencies": { - "@algolia/client-common": "4.16.0", - "@algolia/requester-common": "4.16.0", - "@algolia/transporter": "4.16.0" + "@algolia/client-common": "4.19.1", + "@algolia/requester-common": "4.19.1", + "@algolia/transporter": "4.19.1" } }, "node_modules/@algolia/client-search": { - "version": "4.16.0", - "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-4.16.0.tgz", - "integrity": "sha512-xsfrAE1jO/JDh1wFrRz+alVyW+aA6qnkzmbWWWZWEgVF3EaFqzIf9r1l/aDtDdBtNTNhX9H3Lg31+BRtd5izQA==", + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-4.19.1.tgz", + "integrity": "sha512-mBecfMFS4N+yK/p0ZbK53vrZbL6OtWMk8YmnOv1i0LXx4pelY8TFhqKoTit3NPVPwoSNN0vdSN9dTu1xr1XOVw==", "dependencies": { - "@algolia/client-common": "4.16.0", - "@algolia/requester-common": "4.16.0", - "@algolia/transporter": "4.16.0" + "@algolia/client-common": "4.19.1", + "@algolia/requester-common": "4.19.1", + "@algolia/transporter": "4.19.1" } }, "node_modules/@algolia/events": { @@ -124,47 +141,47 @@ "integrity": "sha512-FQzvOCgoFXAbf5Y6mYozw2aj5KCJoA3m4heImceldzPSMbdyS4atVjJzXKMsfX3wnZTFYwkkt8/z8UesLHlSBQ==" }, "node_modules/@algolia/logger-common": { - "version": "4.16.0", - "resolved": "https://registry.npmjs.org/@algolia/logger-common/-/logger-common-4.16.0.tgz", - "integrity": "sha512-U9H8uCzSDuePJmbnjjTX21aPDRU6x74Tdq3dJmdYu2+pISx02UeBJm4kSgc9RW5jcR5j35G9gnjHY9Q3ngWbyQ==" + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/@algolia/logger-common/-/logger-common-4.19.1.tgz", + "integrity": "sha512-i6pLPZW/+/YXKis8gpmSiNk1lOmYCmRI6+x6d2Qk1OdfvX051nRVdalRbEcVTpSQX6FQAoyeaui0cUfLYW5Elw==" }, "node_modules/@algolia/logger-console": { - "version": "4.16.0", - "resolved": "https://registry.npmjs.org/@algolia/logger-console/-/logger-console-4.16.0.tgz", - "integrity": "sha512-+qymusiM+lPZKrkf0tDjCQA158eEJO2IU+Nr/sJ9TFyI/xkFPjNPzw/Qbc8Iy/xcOXGlc6eMgmyjtVQqAWq6UA==", + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/@algolia/logger-console/-/logger-console-4.19.1.tgz", + "integrity": "sha512-jj72k9GKb9W0c7TyC3cuZtTr0CngLBLmc8trzZlXdfvQiigpUdvTi1KoWIb2ZMcRBG7Tl8hSb81zEY3zI2RlXg==", "dependencies": { - "@algolia/logger-common": "4.16.0" + "@algolia/logger-common": "4.19.1" } }, "node_modules/@algolia/requester-browser-xhr": { - "version": "4.16.0", - "resolved": "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-4.16.0.tgz", - "integrity": "sha512-gK+kvs6LHl/PaOJfDuwjkopNbG1djzFLsVBklGBsSU6h6VjFkxIpo6Qq80IK14p9cplYZfhfaL12va6Q9p3KVQ==", + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-4.19.1.tgz", + "integrity": "sha512-09K/+t7lptsweRTueHnSnmPqIxbHMowejAkn9XIcJMLdseS3zl8ObnS5GWea86mu3vy4+8H+ZBKkUN82Zsq/zg==", "dependencies": { - "@algolia/requester-common": "4.16.0" + "@algolia/requester-common": "4.19.1" } }, "node_modules/@algolia/requester-common": { - "version": "4.16.0", - "resolved": "https://registry.npmjs.org/@algolia/requester-common/-/requester-common-4.16.0.tgz", - "integrity": "sha512-3Zmcs/iMubcm4zqZ3vZG6Zum8t+hMWxGMzo0/uY2BD8o9q5vMxIYI0c4ocdgQjkXcix189WtZNkgjSOBzSbkdw==" + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/@algolia/requester-common/-/requester-common-4.19.1.tgz", + "integrity": "sha512-BisRkcWVxrDzF1YPhAckmi2CFYK+jdMT60q10d7z3PX+w6fPPukxHRnZwooiTUrzFe50UBmLItGizWHP5bDzVQ==" }, "node_modules/@algolia/requester-node-http": { - "version": "4.16.0", - "resolved": "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-4.16.0.tgz", - "integrity": "sha512-L8JxM2VwZzh8LJ1Zb8TFS6G3icYsCKZsdWW+ahcEs1rGWmyk9SybsOe1MLnjonGBaqPWJkn9NjS7mRdjEmBtKA==", + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-4.19.1.tgz", + "integrity": "sha512-6DK52DHviBHTG2BK/Vv2GIlEw7i+vxm7ypZW0Z7vybGCNDeWzADx+/TmxjkES2h15+FZOqVf/Ja677gePsVItA==", "dependencies": { - "@algolia/requester-common": "4.16.0" + "@algolia/requester-common": "4.19.1" } }, "node_modules/@algolia/transporter": { - "version": "4.16.0", - "resolved": "https://registry.npmjs.org/@algolia/transporter/-/transporter-4.16.0.tgz", - "integrity": "sha512-H9BVB2EAjT65w7XGBNf5drpsW39x2aSZ942j4boSAAJPPlLmjtj5IpAP7UAtsV8g9Beslonh0bLa1XGmE/P0BA==", + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/@algolia/transporter/-/transporter-4.19.1.tgz", + "integrity": "sha512-nkpvPWbpuzxo1flEYqNIbGz7xhfhGOKGAZS7tzC+TELgEmi7z99qRyTfNSUlW7LZmB3ACdnqAo+9A9KFBENviQ==", "dependencies": { - "@algolia/cache-common": "4.16.0", - "@algolia/logger-common": "4.16.0", - "@algolia/requester-common": "4.16.0" + "@algolia/cache-common": "4.19.1", + "@algolia/logger-common": "4.19.1", + "@algolia/requester-common": "4.19.1" } }, "node_modules/@ampproject/remapping": { @@ -1978,24 +1995,25 @@ } }, "node_modules/@docsearch/css": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/@docsearch/css/-/css-3.3.3.tgz", - "integrity": "sha512-6SCwI7P8ao+se1TUsdZ7B4XzL+gqeQZnBc+2EONZlcVa0dVrk0NjETxozFKgMv0eEGH8QzP1fkN+A1rH61l4eg==" + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/@docsearch/css/-/css-3.5.2.tgz", + "integrity": "sha512-SPiDHaWKQZpwR2siD0KQUwlStvIAnEyK6tAE2h2Wuoq8ue9skzhlyVQ1ddzOxX6khULnAALDiR/isSF3bnuciA==" }, "node_modules/@docsearch/react": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/@docsearch/react/-/react-3.3.3.tgz", - "integrity": "sha512-pLa0cxnl+G0FuIDuYlW+EBK6Rw2jwLw9B1RHIeS4N4s2VhsfJ/wzeCi3CWcs5yVfxLd5ZK50t//TMA5e79YT7Q==", + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/@docsearch/react/-/react-3.5.2.tgz", + "integrity": "sha512-9Ahcrs5z2jq/DcAvYtvlqEBHImbm4YJI8M9y0x6Tqg598P40HTEkX7hsMcIuThI+hTFxRGZ9hll0Wygm2yEjng==", "dependencies": { - "@algolia/autocomplete-core": "1.7.4", - "@algolia/autocomplete-preset-algolia": "1.7.4", - "@docsearch/css": "3.3.3", - "algoliasearch": "^4.0.0" + "@algolia/autocomplete-core": "1.9.3", + "@algolia/autocomplete-preset-algolia": "1.9.3", + "@docsearch/css": "3.5.2", + "algoliasearch": "^4.19.1" }, "peerDependencies": { "@types/react": ">= 16.8.0 < 19.0.0", "react": ">= 16.8.0 < 19.0.0", - "react-dom": ">= 16.8.0 < 19.0.0" + "react-dom": ">= 16.8.0 < 19.0.0", + "search-insights": ">= 1 < 3" }, "peerDependenciesMeta": { "@types/react": { @@ -2006,13 +2024,16 @@ }, "react-dom": { "optional": true + }, + "search-insights": { + "optional": true } } }, "node_modules/@docusaurus/core": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@docusaurus/core/-/core-2.3.1.tgz", - "integrity": "sha512-0Jd4jtizqnRAr7svWaBbbrCCN8mzBNd2xFLoT/IM7bGfFie5y58oz97KzXliwiLY3zWjqMXjQcuP1a5VgCv2JA==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@docusaurus/core/-/core-2.4.1.tgz", + "integrity": "sha512-SNsY7PshK3Ri7vtsLXVeAJGS50nJN3RgF836zkyUfAD01Fq+sAk5EwWgLw+nnm5KVNGDu7PRR2kRGDsWvqpo0g==", "dependencies": { "@babel/core": "^7.18.6", "@babel/generator": "^7.18.7", @@ -2024,13 +2045,13 @@ "@babel/runtime": "^7.18.6", "@babel/runtime-corejs3": "^7.18.6", "@babel/traverse": "^7.18.8", - "@docusaurus/cssnano-preset": "2.3.1", - "@docusaurus/logger": "2.3.1", - "@docusaurus/mdx-loader": "2.3.1", + "@docusaurus/cssnano-preset": "2.4.1", + "@docusaurus/logger": "2.4.1", + "@docusaurus/mdx-loader": "2.4.1", "@docusaurus/react-loadable": "5.5.2", - "@docusaurus/utils": "2.3.1", - "@docusaurus/utils-common": "2.3.1", - "@docusaurus/utils-validation": "2.3.1", + "@docusaurus/utils": "2.4.1", + "@docusaurus/utils-common": "2.4.1", + "@docusaurus/utils-validation": "2.4.1", "@slorber/static-site-generator-webpack-plugin": "^4.0.7", "@svgr/webpack": "^6.2.1", "autoprefixer": "^10.4.7", @@ -2098,9 +2119,9 @@ } }, "node_modules/@docusaurus/cssnano-preset": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@docusaurus/cssnano-preset/-/cssnano-preset-2.3.1.tgz", - "integrity": "sha512-7mIhAROES6CY1GmCjR4CZkUfjTL6B3u6rKHK0ChQl2d1IevYXq/k/vFgvOrJfcKxiObpMnE9+X6R2Wt1KqxC6w==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@docusaurus/cssnano-preset/-/cssnano-preset-2.4.1.tgz", + "integrity": "sha512-ka+vqXwtcW1NbXxWsh6yA1Ckii1klY9E53cJ4O9J09nkMBgrNX3iEFED1fWdv8wf4mJjvGi5RLZ2p9hJNjsLyQ==", "dependencies": { "cssnano-preset-advanced": "^5.3.8", "postcss": "^8.4.14", @@ -2112,9 +2133,9 @@ } }, "node_modules/@docusaurus/logger": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@docusaurus/logger/-/logger-2.3.1.tgz", - "integrity": "sha512-2lAV/olKKVr9qJhfHFCaqBIl8FgYjbUFwgUnX76+cULwQYss+42ZQ3grHGFvI0ocN2X55WcYe64ellQXz7suqg==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@docusaurus/logger/-/logger-2.4.1.tgz", + "integrity": "sha512-5h5ysIIWYIDHyTVd8BjheZmQZmEgWDR54aQ1BX9pjFfpyzFo5puKXKYrYJXbjEHGyVhEzmB9UXwbxGfaZhOjcg==", "dependencies": { "chalk": "^4.1.2", "tslib": "^2.4.0" @@ -2124,14 +2145,14 @@ } }, "node_modules/@docusaurus/mdx-loader": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@docusaurus/mdx-loader/-/mdx-loader-2.3.1.tgz", - "integrity": "sha512-Gzga7OsxQRpt3392K9lv/bW4jGppdLFJh3luKRknCKSAaZrmVkOQv2gvCn8LAOSZ3uRg5No7AgYs/vpL8K94lA==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@docusaurus/mdx-loader/-/mdx-loader-2.4.1.tgz", + "integrity": "sha512-4KhUhEavteIAmbBj7LVFnrVYDiU51H5YWW1zY6SmBSte/YLhDutztLTBE0PQl1Grux1jzUJeaSvAzHpTn6JJDQ==", "dependencies": { "@babel/parser": "^7.18.8", "@babel/traverse": "^7.18.8", - "@docusaurus/logger": "2.3.1", - "@docusaurus/utils": "2.3.1", + "@docusaurus/logger": "2.4.1", + "@docusaurus/utils": "2.4.1", "@mdx-js/mdx": "^1.6.22", "escape-html": "^1.0.3", "file-loader": "^6.2.0", @@ -2155,12 +2176,12 @@ } }, "node_modules/@docusaurus/module-type-aliases": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@docusaurus/module-type-aliases/-/module-type-aliases-2.3.1.tgz", - "integrity": "sha512-6KkxfAVOJqIUynTRb/tphYCl+co3cP0PlHiMDbi+SzmYxMdgIrwYqH9yAnGSDoN6Jk2ZE/JY/Azs/8LPgKP48A==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@docusaurus/module-type-aliases/-/module-type-aliases-2.4.1.tgz", + "integrity": "sha512-gLBuIFM8Dp2XOCWffUDSjtxY7jQgKvYujt7Mx5s4FCTfoL5dN1EVbnrn+O2Wvh8b0a77D57qoIDY7ghgmatR1A==", "dependencies": { "@docusaurus/react-loadable": "5.5.2", - "@docusaurus/types": "2.3.1", + "@docusaurus/types": "2.4.1", "@types/history": "^4.7.11", "@types/react": "*", "@types/react-router-config": "*", @@ -2173,37 +2194,18 @@ "react-dom": "*" } }, - "node_modules/@docusaurus/module-type-aliases/node_modules/@docusaurus/types": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@docusaurus/types/-/types-2.3.1.tgz", - "integrity": "sha512-PREbIRhTaNNY042qmfSE372Jb7djZt+oVTZkoqHJ8eff8vOIc2zqqDqBVc5BhOfpZGPTrE078yy/torUEZy08A==", - "dependencies": { - "@types/history": "^4.7.11", - "@types/react": "*", - "commander": "^5.1.0", - "joi": "^17.6.0", - "react-helmet-async": "^1.3.0", - "utility-types": "^3.10.0", - "webpack": "^5.73.0", - "webpack-merge": "^5.8.0" - }, - "peerDependencies": { - "react": "^16.8.4 || ^17.0.0", - "react-dom": "^16.8.4 || ^17.0.0" - } - }, "node_modules/@docusaurus/plugin-content-blog": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@docusaurus/plugin-content-blog/-/plugin-content-blog-2.3.1.tgz", - "integrity": "sha512-f5LjqX+9WkiLyGiQ41x/KGSJ/9bOjSD8lsVhPvYeUYHCtYpuiDKfhZE07O4EqpHkBx4NQdtQDbp+aptgHSTuiw==", - "dependencies": { - "@docusaurus/core": "2.3.1", - "@docusaurus/logger": "2.3.1", - "@docusaurus/mdx-loader": "2.3.1", - "@docusaurus/types": "2.3.1", - "@docusaurus/utils": "2.3.1", - "@docusaurus/utils-common": "2.3.1", - "@docusaurus/utils-validation": "2.3.1", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-content-blog/-/plugin-content-blog-2.4.1.tgz", + "integrity": "sha512-E2i7Knz5YIbE1XELI6RlTnZnGgS52cUO4BlCiCUCvQHbR+s1xeIWz4C6BtaVnlug0Ccz7nFSksfwDpVlkujg5Q==", + "dependencies": { + "@docusaurus/core": "2.4.1", + "@docusaurus/logger": "2.4.1", + "@docusaurus/mdx-loader": "2.4.1", + "@docusaurus/types": "2.4.1", + "@docusaurus/utils": "2.4.1", + "@docusaurus/utils-common": "2.4.1", + "@docusaurus/utils-validation": "2.4.1", "cheerio": "^1.0.0-rc.12", "feed": "^4.2.2", "fs-extra": "^10.1.0", @@ -2222,37 +2224,18 @@ "react-dom": "^16.8.4 || ^17.0.0" } }, - "node_modules/@docusaurus/plugin-content-blog/node_modules/@docusaurus/types": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@docusaurus/types/-/types-2.3.1.tgz", - "integrity": "sha512-PREbIRhTaNNY042qmfSE372Jb7djZt+oVTZkoqHJ8eff8vOIc2zqqDqBVc5BhOfpZGPTrE078yy/torUEZy08A==", - "dependencies": { - "@types/history": "^4.7.11", - "@types/react": "*", - "commander": "^5.1.0", - "joi": "^17.6.0", - "react-helmet-async": "^1.3.0", - "utility-types": "^3.10.0", - "webpack": "^5.73.0", - "webpack-merge": "^5.8.0" - }, - "peerDependencies": { - "react": "^16.8.4 || ^17.0.0", - "react-dom": "^16.8.4 || ^17.0.0" - } - }, "node_modules/@docusaurus/plugin-content-docs": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@docusaurus/plugin-content-docs/-/plugin-content-docs-2.3.1.tgz", - "integrity": "sha512-DxztTOBEruv7qFxqUtbsqXeNcHqcVEIEe+NQoI1oi2DBmKBhW/o0MIal8lt+9gvmpx3oYtlwmLOOGepxZgJGkw==", - "dependencies": { - "@docusaurus/core": "2.3.1", - "@docusaurus/logger": "2.3.1", - "@docusaurus/mdx-loader": "2.3.1", - "@docusaurus/module-type-aliases": "2.3.1", - "@docusaurus/types": "2.3.1", - "@docusaurus/utils": "2.3.1", - "@docusaurus/utils-validation": "2.3.1", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-content-docs/-/plugin-content-docs-2.4.1.tgz", + "integrity": "sha512-Lo7lSIcpswa2Kv4HEeUcGYqaasMUQNpjTXpV0N8G6jXgZaQurqp7E8NGYeGbDXnb48czmHWbzDL4S3+BbK0VzA==", + "dependencies": { + "@docusaurus/core": "2.4.1", + "@docusaurus/logger": "2.4.1", + "@docusaurus/mdx-loader": "2.4.1", + "@docusaurus/module-type-aliases": "2.4.1", + "@docusaurus/types": "2.4.1", + "@docusaurus/utils": "2.4.1", + "@docusaurus/utils-validation": "2.4.1", "@types/react-router-config": "^5.0.6", "combine-promises": "^1.1.0", "fs-extra": "^10.1.0", @@ -2271,35 +2254,16 @@ "react-dom": "^16.8.4 || ^17.0.0" } }, - "node_modules/@docusaurus/plugin-content-docs/node_modules/@docusaurus/types": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@docusaurus/types/-/types-2.3.1.tgz", - "integrity": "sha512-PREbIRhTaNNY042qmfSE372Jb7djZt+oVTZkoqHJ8eff8vOIc2zqqDqBVc5BhOfpZGPTrE078yy/torUEZy08A==", - "dependencies": { - "@types/history": "^4.7.11", - "@types/react": "*", - "commander": "^5.1.0", - "joi": "^17.6.0", - "react-helmet-async": "^1.3.0", - "utility-types": "^3.10.0", - "webpack": "^5.73.0", - "webpack-merge": "^5.8.0" - }, - "peerDependencies": { - "react": "^16.8.4 || ^17.0.0", - "react-dom": "^16.8.4 || ^17.0.0" - } - }, "node_modules/@docusaurus/plugin-content-pages": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@docusaurus/plugin-content-pages/-/plugin-content-pages-2.3.1.tgz", - "integrity": "sha512-E80UL6hvKm5VVw8Ka8YaVDtO6kWWDVUK4fffGvkpQ/AJQDOg99LwOXKujPoICC22nUFTsZ2Hp70XvpezCsFQaA==", - "dependencies": { - "@docusaurus/core": "2.3.1", - "@docusaurus/mdx-loader": "2.3.1", - "@docusaurus/types": "2.3.1", - "@docusaurus/utils": "2.3.1", - "@docusaurus/utils-validation": "2.3.1", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-content-pages/-/plugin-content-pages-2.4.1.tgz", + "integrity": "sha512-/UjuH/76KLaUlL+o1OvyORynv6FURzjurSjvn2lbWTFc4tpYY2qLYTlKpTCBVPhlLUQsfyFnshEJDLmPneq2oA==", + "dependencies": { + "@docusaurus/core": "2.4.1", + "@docusaurus/mdx-loader": "2.4.1", + "@docusaurus/types": "2.4.1", + "@docusaurus/utils": "2.4.1", + "@docusaurus/utils-validation": "2.4.1", "fs-extra": "^10.1.0", "tslib": "^2.4.0", "webpack": "^5.73.0" @@ -2312,33 +2276,14 @@ "react-dom": "^16.8.4 || ^17.0.0" } }, - "node_modules/@docusaurus/plugin-content-pages/node_modules/@docusaurus/types": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@docusaurus/types/-/types-2.3.1.tgz", - "integrity": "sha512-PREbIRhTaNNY042qmfSE372Jb7djZt+oVTZkoqHJ8eff8vOIc2zqqDqBVc5BhOfpZGPTrE078yy/torUEZy08A==", - "dependencies": { - "@types/history": "^4.7.11", - "@types/react": "*", - "commander": "^5.1.0", - "joi": "^17.6.0", - "react-helmet-async": "^1.3.0", - "utility-types": "^3.10.0", - "webpack": "^5.73.0", - "webpack-merge": "^5.8.0" - }, - "peerDependencies": { - "react": "^16.8.4 || ^17.0.0", - "react-dom": "^16.8.4 || ^17.0.0" - } - }, "node_modules/@docusaurus/plugin-debug": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@docusaurus/plugin-debug/-/plugin-debug-2.3.1.tgz", - "integrity": "sha512-Ujpml1Ppg4geB/2hyu2diWnO49az9U2bxM9Shen7b6qVcyFisNJTkVG2ocvLC7wM1efTJcUhBO6zAku2vKJGMw==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-debug/-/plugin-debug-2.4.1.tgz", + "integrity": "sha512-7Yu9UPzRShlrH/G8btOpR0e6INFZr0EegWplMjOqelIwAcx3PKyR8mgPTxGTxcqiYj6hxSCRN0D8R7YrzImwNA==", "dependencies": { - "@docusaurus/core": "2.3.1", - "@docusaurus/types": "2.3.1", - "@docusaurus/utils": "2.3.1", + "@docusaurus/core": "2.4.1", + "@docusaurus/types": "2.4.1", + "@docusaurus/utils": "2.4.1", "fs-extra": "^10.1.0", "react-json-view": "^1.21.3", "tslib": "^2.4.0" @@ -2351,33 +2296,14 @@ "react-dom": "^16.8.4 || ^17.0.0" } }, - "node_modules/@docusaurus/plugin-debug/node_modules/@docusaurus/types": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@docusaurus/types/-/types-2.3.1.tgz", - "integrity": "sha512-PREbIRhTaNNY042qmfSE372Jb7djZt+oVTZkoqHJ8eff8vOIc2zqqDqBVc5BhOfpZGPTrE078yy/torUEZy08A==", - "dependencies": { - "@types/history": "^4.7.11", - "@types/react": "*", - "commander": "^5.1.0", - "joi": "^17.6.0", - "react-helmet-async": "^1.3.0", - "utility-types": "^3.10.0", - "webpack": "^5.73.0", - "webpack-merge": "^5.8.0" - }, - "peerDependencies": { - "react": "^16.8.4 || ^17.0.0", - "react-dom": "^16.8.4 || ^17.0.0" - } - }, "node_modules/@docusaurus/plugin-google-analytics": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@docusaurus/plugin-google-analytics/-/plugin-google-analytics-2.3.1.tgz", - "integrity": "sha512-OHip0GQxKOFU8n7gkt3TM4HOYTXPCFDjqKbMClDD3KaDnyTuMp/Zvd9HSr770lLEscgPWIvzhJByRAClqsUWiQ==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-google-analytics/-/plugin-google-analytics-2.4.1.tgz", + "integrity": "sha512-dyZJdJiCoL+rcfnm0RPkLt/o732HvLiEwmtoNzOoz9MSZz117UH2J6U2vUDtzUzwtFLIf32KkeyzisbwUCgcaQ==", "dependencies": { - "@docusaurus/core": "2.3.1", - "@docusaurus/types": "2.3.1", - "@docusaurus/utils-validation": "2.3.1", + "@docusaurus/core": "2.4.1", + "@docusaurus/types": "2.4.1", + "@docusaurus/utils-validation": "2.4.1", "tslib": "^2.4.0" }, "engines": { @@ -2388,33 +2314,14 @@ "react-dom": "^16.8.4 || ^17.0.0" } }, - "node_modules/@docusaurus/plugin-google-analytics/node_modules/@docusaurus/types": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@docusaurus/types/-/types-2.3.1.tgz", - "integrity": "sha512-PREbIRhTaNNY042qmfSE372Jb7djZt+oVTZkoqHJ8eff8vOIc2zqqDqBVc5BhOfpZGPTrE078yy/torUEZy08A==", - "dependencies": { - "@types/history": "^4.7.11", - "@types/react": "*", - "commander": "^5.1.0", - "joi": "^17.6.0", - "react-helmet-async": "^1.3.0", - "utility-types": "^3.10.0", - "webpack": "^5.73.0", - "webpack-merge": "^5.8.0" - }, - "peerDependencies": { - "react": "^16.8.4 || ^17.0.0", - "react-dom": "^16.8.4 || ^17.0.0" - } - }, "node_modules/@docusaurus/plugin-google-gtag": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@docusaurus/plugin-google-gtag/-/plugin-google-gtag-2.3.1.tgz", - "integrity": "sha512-uXtDhfu4+Hm+oqWUySr3DNI5cWC/rmP6XJyAk83Heor3dFjZqDwCbkX8yWPywkRiWev3Dk/rVF8lEn0vIGVocA==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-google-gtag/-/plugin-google-gtag-2.4.1.tgz", + "integrity": "sha512-mKIefK+2kGTQBYvloNEKtDmnRD7bxHLsBcxgnbt4oZwzi2nxCGjPX6+9SQO2KCN5HZbNrYmGo5GJfMgoRvy6uA==", "dependencies": { - "@docusaurus/core": "2.3.1", - "@docusaurus/types": "2.3.1", - "@docusaurus/utils-validation": "2.3.1", + "@docusaurus/core": "2.4.1", + "@docusaurus/types": "2.4.1", + "@docusaurus/utils-validation": "2.4.1", "tslib": "^2.4.0" }, "engines": { @@ -2425,33 +2332,14 @@ "react-dom": "^16.8.4 || ^17.0.0" } }, - "node_modules/@docusaurus/plugin-google-gtag/node_modules/@docusaurus/types": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@docusaurus/types/-/types-2.3.1.tgz", - "integrity": "sha512-PREbIRhTaNNY042qmfSE372Jb7djZt+oVTZkoqHJ8eff8vOIc2zqqDqBVc5BhOfpZGPTrE078yy/torUEZy08A==", - "dependencies": { - "@types/history": "^4.7.11", - "@types/react": "*", - "commander": "^5.1.0", - "joi": "^17.6.0", - "react-helmet-async": "^1.3.0", - "utility-types": "^3.10.0", - "webpack": "^5.73.0", - "webpack-merge": "^5.8.0" - }, - "peerDependencies": { - "react": "^16.8.4 || ^17.0.0", - "react-dom": "^16.8.4 || ^17.0.0" - } - }, "node_modules/@docusaurus/plugin-google-tag-manager": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@docusaurus/plugin-google-tag-manager/-/plugin-google-tag-manager-2.3.1.tgz", - "integrity": "sha512-Ww2BPEYSqg8q8tJdLYPFFM3FMDBCVhEM4UUqKzJaiRMx3NEoly3qqDRAoRDGdIhlC//Rf0iJV9cWAoq2m6k3sw==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-google-tag-manager/-/plugin-google-tag-manager-2.4.1.tgz", + "integrity": "sha512-Zg4Ii9CMOLfpeV2nG74lVTWNtisFaH9QNtEw48R5QE1KIwDBdTVaiSA18G1EujZjrzJJzXN79VhINSbOJO/r3g==", "dependencies": { - "@docusaurus/core": "2.3.1", - "@docusaurus/types": "2.3.1", - "@docusaurus/utils-validation": "2.3.1", + "@docusaurus/core": "2.4.1", + "@docusaurus/types": "2.4.1", + "@docusaurus/utils-validation": "2.4.1", "tslib": "^2.4.0" }, "engines": { @@ -2462,36 +2350,17 @@ "react-dom": "^16.8.4 || ^17.0.0" } }, - "node_modules/@docusaurus/plugin-google-tag-manager/node_modules/@docusaurus/types": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@docusaurus/types/-/types-2.3.1.tgz", - "integrity": "sha512-PREbIRhTaNNY042qmfSE372Jb7djZt+oVTZkoqHJ8eff8vOIc2zqqDqBVc5BhOfpZGPTrE078yy/torUEZy08A==", - "dependencies": { - "@types/history": "^4.7.11", - "@types/react": "*", - "commander": "^5.1.0", - "joi": "^17.6.0", - "react-helmet-async": "^1.3.0", - "utility-types": "^3.10.0", - "webpack": "^5.73.0", - "webpack-merge": "^5.8.0" - }, - "peerDependencies": { - "react": "^16.8.4 || ^17.0.0", - "react-dom": "^16.8.4 || ^17.0.0" - } - }, "node_modules/@docusaurus/plugin-sitemap": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@docusaurus/plugin-sitemap/-/plugin-sitemap-2.3.1.tgz", - "integrity": "sha512-8Yxile/v6QGYV9vgFiYL+8d2N4z4Er3pSHsrD08c5XI8bUXxTppMwjarDUTH/TRTfgAWotRbhJ6WZLyajLpozA==", - "dependencies": { - "@docusaurus/core": "2.3.1", - "@docusaurus/logger": "2.3.1", - "@docusaurus/types": "2.3.1", - "@docusaurus/utils": "2.3.1", - "@docusaurus/utils-common": "2.3.1", - "@docusaurus/utils-validation": "2.3.1", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-sitemap/-/plugin-sitemap-2.4.1.tgz", + "integrity": "sha512-lZx+ijt/+atQ3FVE8FOHV/+X3kuok688OydDXrqKRJyXBJZKgGjA2Qa8RjQ4f27V2woaXhtnyrdPop/+OjVMRg==", + "dependencies": { + "@docusaurus/core": "2.4.1", + "@docusaurus/logger": "2.4.1", + "@docusaurus/types": "2.4.1", + "@docusaurus/utils": "2.4.1", + "@docusaurus/utils-common": "2.4.1", + "@docusaurus/utils-validation": "2.4.1", "fs-extra": "^10.1.0", "sitemap": "^7.1.1", "tslib": "^2.4.0" @@ -2504,43 +2373,24 @@ "react-dom": "^16.8.4 || ^17.0.0" } }, - "node_modules/@docusaurus/plugin-sitemap/node_modules/@docusaurus/types": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@docusaurus/types/-/types-2.3.1.tgz", - "integrity": "sha512-PREbIRhTaNNY042qmfSE372Jb7djZt+oVTZkoqHJ8eff8vOIc2zqqDqBVc5BhOfpZGPTrE078yy/torUEZy08A==", - "dependencies": { - "@types/history": "^4.7.11", - "@types/react": "*", - "commander": "^5.1.0", - "joi": "^17.6.0", - "react-helmet-async": "^1.3.0", - "utility-types": "^3.10.0", - "webpack": "^5.73.0", - "webpack-merge": "^5.8.0" - }, - "peerDependencies": { - "react": "^16.8.4 || ^17.0.0", - "react-dom": "^16.8.4 || ^17.0.0" - } - }, "node_modules/@docusaurus/preset-classic": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@docusaurus/preset-classic/-/preset-classic-2.3.1.tgz", - "integrity": "sha512-OQ5W0AHyfdUk0IldwJ3BlnZ1EqoJuu2L2BMhqLbqwNWdkmzmSUvlFLH1Pe7CZSQgB2YUUC/DnmjbPKk/qQD0lQ==", - "dependencies": { - "@docusaurus/core": "2.3.1", - "@docusaurus/plugin-content-blog": "2.3.1", - "@docusaurus/plugin-content-docs": "2.3.1", - "@docusaurus/plugin-content-pages": "2.3.1", - "@docusaurus/plugin-debug": "2.3.1", - "@docusaurus/plugin-google-analytics": "2.3.1", - "@docusaurus/plugin-google-gtag": "2.3.1", - "@docusaurus/plugin-google-tag-manager": "2.3.1", - "@docusaurus/plugin-sitemap": "2.3.1", - "@docusaurus/theme-classic": "2.3.1", - "@docusaurus/theme-common": "2.3.1", - "@docusaurus/theme-search-algolia": "2.3.1", - "@docusaurus/types": "2.3.1" + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@docusaurus/preset-classic/-/preset-classic-2.4.1.tgz", + "integrity": "sha512-P4//+I4zDqQJ+UDgoFrjIFaQ1MeS9UD1cvxVQaI6O7iBmiHQm0MGROP1TbE7HlxlDPXFJjZUK3x3cAoK63smGQ==", + "dependencies": { + "@docusaurus/core": "2.4.1", + "@docusaurus/plugin-content-blog": "2.4.1", + "@docusaurus/plugin-content-docs": "2.4.1", + "@docusaurus/plugin-content-pages": "2.4.1", + "@docusaurus/plugin-debug": "2.4.1", + "@docusaurus/plugin-google-analytics": "2.4.1", + "@docusaurus/plugin-google-gtag": "2.4.1", + "@docusaurus/plugin-google-tag-manager": "2.4.1", + "@docusaurus/plugin-sitemap": "2.4.1", + "@docusaurus/theme-classic": "2.4.1", + "@docusaurus/theme-common": "2.4.1", + "@docusaurus/theme-search-algolia": "2.4.1", + "@docusaurus/types": "2.4.1" }, "engines": { "node": ">=16.14" @@ -2550,25 +2400,6 @@ "react-dom": "^16.8.4 || ^17.0.0" } }, - "node_modules/@docusaurus/preset-classic/node_modules/@docusaurus/types": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@docusaurus/types/-/types-2.3.1.tgz", - "integrity": "sha512-PREbIRhTaNNY042qmfSE372Jb7djZt+oVTZkoqHJ8eff8vOIc2zqqDqBVc5BhOfpZGPTrE078yy/torUEZy08A==", - "dependencies": { - "@types/history": "^4.7.11", - "@types/react": "*", - "commander": "^5.1.0", - "joi": "^17.6.0", - "react-helmet-async": "^1.3.0", - "utility-types": "^3.10.0", - "webpack": "^5.73.0", - "webpack-merge": "^5.8.0" - }, - "peerDependencies": { - "react": "^16.8.4 || ^17.0.0", - "react-dom": "^16.8.4 || ^17.0.0" - } - }, "node_modules/@docusaurus/react-loadable": { "version": "5.5.2", "resolved": "https://registry.npmjs.org/@docusaurus/react-loadable/-/react-loadable-5.5.2.tgz", @@ -2582,12 +2413,12 @@ } }, "node_modules/@docusaurus/remark-plugin-npm2yarn": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@docusaurus/remark-plugin-npm2yarn/-/remark-plugin-npm2yarn-2.3.1.tgz", - "integrity": "sha512-eN3P9/J8tzD5ERWiaG+nFcd5KpfSmb35mOxnI4vQEmAufovQZyZnf5KAmracPTUJfm3p9OH5EnbzfVFT9e48Pw==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@docusaurus/remark-plugin-npm2yarn/-/remark-plugin-npm2yarn-2.4.1.tgz", + "integrity": "sha512-RTX4hGCrwibqjDVf6edWVNwdvWHjx+YmfKwxqXxfhNnYjypTCXWTAyKeIfCUW2DNdtqAI2ZM0zFhB1maua2JbQ==", "dependencies": { - "npm-to-yarn": "^1.0.1", - "tslib": "^2.4.0", + "npm-to-yarn": "^2.0.0", + "tslib": "^2.4.1", "unist-util-visit": "^2.0.3" }, "engines": { @@ -2595,26 +2426,26 @@ } }, "node_modules/@docusaurus/theme-classic": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@docusaurus/theme-classic/-/theme-classic-2.3.1.tgz", - "integrity": "sha512-SelSIDvyttb7ZYHj8vEUhqykhAqfOPKk+uP0z85jH72IMC58e7O8DIlcAeBv+CWsLbNIl9/Hcg71X0jazuxJug==", - "dependencies": { - "@docusaurus/core": "2.3.1", - "@docusaurus/mdx-loader": "2.3.1", - "@docusaurus/module-type-aliases": "2.3.1", - "@docusaurus/plugin-content-blog": "2.3.1", - "@docusaurus/plugin-content-docs": "2.3.1", - "@docusaurus/plugin-content-pages": "2.3.1", - "@docusaurus/theme-common": "2.3.1", - "@docusaurus/theme-translations": "2.3.1", - "@docusaurus/types": "2.3.1", - "@docusaurus/utils": "2.3.1", - "@docusaurus/utils-common": "2.3.1", - "@docusaurus/utils-validation": "2.3.1", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@docusaurus/theme-classic/-/theme-classic-2.4.1.tgz", + "integrity": "sha512-Rz0wKUa+LTW1PLXmwnf8mn85EBzaGSt6qamqtmnh9Hflkc+EqiYMhtUJeLdV+wsgYq4aG0ANc+bpUDpsUhdnwg==", + "dependencies": { + "@docusaurus/core": "2.4.1", + "@docusaurus/mdx-loader": "2.4.1", + "@docusaurus/module-type-aliases": "2.4.1", + "@docusaurus/plugin-content-blog": "2.4.1", + "@docusaurus/plugin-content-docs": "2.4.1", + "@docusaurus/plugin-content-pages": "2.4.1", + "@docusaurus/theme-common": "2.4.1", + "@docusaurus/theme-translations": "2.4.1", + "@docusaurus/types": "2.4.1", + "@docusaurus/utils": "2.4.1", + "@docusaurus/utils-common": "2.4.1", + "@docusaurus/utils-validation": "2.4.1", "@mdx-js/react": "^1.6.22", "clsx": "^1.2.1", "copy-text-to-clipboard": "^3.0.1", - "infima": "0.2.0-alpha.42", + "infima": "0.2.0-alpha.43", "lodash": "^4.17.21", "nprogress": "^0.2.0", "postcss": "^8.4.14", @@ -2633,36 +2464,18 @@ "react-dom": "^16.8.4 || ^17.0.0" } }, - "node_modules/@docusaurus/theme-classic/node_modules/@docusaurus/types": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@docusaurus/types/-/types-2.3.1.tgz", - "integrity": "sha512-PREbIRhTaNNY042qmfSE372Jb7djZt+oVTZkoqHJ8eff8vOIc2zqqDqBVc5BhOfpZGPTrE078yy/torUEZy08A==", - "dependencies": { - "@types/history": "^4.7.11", - "@types/react": "*", - "commander": "^5.1.0", - "joi": "^17.6.0", - "react-helmet-async": "^1.3.0", - "utility-types": "^3.10.0", - "webpack": "^5.73.0", - "webpack-merge": "^5.8.0" - }, - "peerDependencies": { - "react": "^16.8.4 || ^17.0.0", - "react-dom": "^16.8.4 || ^17.0.0" - } - }, "node_modules/@docusaurus/theme-common": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@docusaurus/theme-common/-/theme-common-2.3.1.tgz", - "integrity": "sha512-RYmYl2OR2biO+yhmW1aS5FyEvnrItPINa+0U2dMxcHpah8reSCjQ9eJGRmAgkZFchV1+aIQzXOI1K7LCW38O0g==", - "dependencies": { - "@docusaurus/mdx-loader": "2.3.1", - "@docusaurus/module-type-aliases": "2.3.1", - "@docusaurus/plugin-content-blog": "2.3.1", - "@docusaurus/plugin-content-docs": "2.3.1", - "@docusaurus/plugin-content-pages": "2.3.1", - "@docusaurus/utils": "2.3.1", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@docusaurus/theme-common/-/theme-common-2.4.1.tgz", + "integrity": "sha512-G7Zau1W5rQTaFFB3x3soQoZpkgMbl/SYNG8PfMFIjKa3M3q8n0m/GRf5/H/e5BqOvt8c+ZWIXGCiz+kUCSHovA==", + "dependencies": { + "@docusaurus/mdx-loader": "2.4.1", + "@docusaurus/module-type-aliases": "2.4.1", + "@docusaurus/plugin-content-blog": "2.4.1", + "@docusaurus/plugin-content-docs": "2.4.1", + "@docusaurus/plugin-content-pages": "2.4.1", + "@docusaurus/utils": "2.4.1", + "@docusaurus/utils-common": "2.4.1", "@types/history": "^4.7.11", "@types/react": "*", "@types/react-router-config": "*", @@ -2682,18 +2495,18 @@ } }, "node_modules/@docusaurus/theme-search-algolia": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@docusaurus/theme-search-algolia/-/theme-search-algolia-2.3.1.tgz", - "integrity": "sha512-JdHaRqRuH1X++g5fEMLnq7OtULSGQdrs9AbhcWRQ428ZB8/HOiaN6mj3hzHvcD3DFgu7koIVtWPQnvnN7iwzHA==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@docusaurus/theme-search-algolia/-/theme-search-algolia-2.4.1.tgz", + "integrity": "sha512-6BcqW2lnLhZCXuMAvPRezFs1DpmEKzXFKlYjruuas+Xy3AQeFzDJKTJFIm49N77WFCTyxff8d3E4Q9pi/+5McQ==", "dependencies": { "@docsearch/react": "^3.1.1", - "@docusaurus/core": "2.3.1", - "@docusaurus/logger": "2.3.1", - "@docusaurus/plugin-content-docs": "2.3.1", - "@docusaurus/theme-common": "2.3.1", - "@docusaurus/theme-translations": "2.3.1", - "@docusaurus/utils": "2.3.1", - "@docusaurus/utils-validation": "2.3.1", + "@docusaurus/core": "2.4.1", + "@docusaurus/logger": "2.4.1", + "@docusaurus/plugin-content-docs": "2.4.1", + "@docusaurus/theme-common": "2.4.1", + "@docusaurus/theme-translations": "2.4.1", + "@docusaurus/utils": "2.4.1", + "@docusaurus/utils-validation": "2.4.1", "algoliasearch": "^4.13.1", "algoliasearch-helper": "^3.10.0", "clsx": "^1.2.1", @@ -2712,9 +2525,9 @@ } }, "node_modules/@docusaurus/theme-translations": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@docusaurus/theme-translations/-/theme-translations-2.3.1.tgz", - "integrity": "sha512-BsBZzAewJabVhoGG1Ij2u4pMS3MPW6gZ6sS4pc+Y7czevRpzxoFNJXRtQDVGe7mOpv/MmRmqg4owDK+lcOTCVQ==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@docusaurus/theme-translations/-/theme-translations-2.4.1.tgz", + "integrity": "sha512-T1RAGP+f86CA1kfE8ejZ3T3pUU3XcyvrGMfC/zxCtc2BsnoexuNI9Vk2CmuKCb+Tacvhxjv5unhxXce0+NKyvA==", "dependencies": { "fs-extra": "^10.1.0", "tslib": "^2.4.0" @@ -2724,10 +2537,9 @@ } }, "node_modules/@docusaurus/types": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/@docusaurus/types/-/types-2.4.0.tgz", - "integrity": "sha512-xaBXr+KIPDkIaef06c+i2HeTqVNixB7yFut5fBXPGI2f1rrmEV2vLMznNGsFwvZ5XmA3Quuefd4OGRkdo97Dhw==", - "devOptional": true, + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@docusaurus/types/-/types-2.4.1.tgz", + "integrity": "sha512-0R+cbhpMkhbRXX138UOc/2XZFF8hiZa6ooZAEEJFp5scytzCw4tC1gChMFXrpa3d2tYE6AX8IrOEpSonLmfQuQ==", "dependencies": { "@types/history": "^4.7.11", "@types/react": "*", @@ -2744,11 +2556,11 @@ } }, "node_modules/@docusaurus/utils": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@docusaurus/utils/-/utils-2.3.1.tgz", - "integrity": "sha512-9WcQROCV0MmrpOQDXDGhtGMd52DHpSFbKLfkyaYumzbTstrbA5pPOtiGtxK1nqUHkiIv8UwexS54p0Vod2I1lg==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@docusaurus/utils/-/utils-2.4.1.tgz", + "integrity": "sha512-1lvEZdAQhKNht9aPXPoh69eeKnV0/62ROhQeFKKxmzd0zkcuE/Oc5Gpnt00y/f5bIsmOsYMY7Pqfm/5rteT5GA==", "dependencies": { - "@docusaurus/logger": "2.3.1", + "@docusaurus/logger": "2.4.1", "@svgr/webpack": "^6.2.1", "escape-string-regexp": "^4.0.0", "file-loader": "^6.2.0", @@ -2778,9 +2590,9 @@ } }, "node_modules/@docusaurus/utils-common": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@docusaurus/utils-common/-/utils-common-2.3.1.tgz", - "integrity": "sha512-pVlRpXkdNcxmKNxAaB1ya2hfCEvVsLDp2joeM6K6uv55Oc5nVIqgyYSgSNKZyMdw66NnvMfsu0RBylcwZQKo9A==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@docusaurus/utils-common/-/utils-common-2.4.1.tgz", + "integrity": "sha512-bCVGdZU+z/qVcIiEQdyx0K13OC5mYwxhSuDUR95oFbKVuXYRrTVrwZIqQljuo1fyJvFTKHiL9L9skQOPokuFNQ==", "dependencies": { "tslib": "^2.4.0" }, @@ -2797,12 +2609,12 @@ } }, "node_modules/@docusaurus/utils-validation": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@docusaurus/utils-validation/-/utils-validation-2.3.1.tgz", - "integrity": "sha512-7n0208IG3k1HVTByMHlZoIDjjOFC8sbViHVXJx0r3Q+3Ezrx+VQ1RZ/zjNn6lT+QBCRCXlnlaoJ8ug4HIVgQ3w==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@docusaurus/utils-validation/-/utils-validation-2.4.1.tgz", + "integrity": "sha512-unII3hlJlDwZ3w8U+pMO3Lx3RhI4YEbY3YNsQj4yzrkZzlpqZOLuAiZK2JyULnD+TKbceKU0WyWkQXtYbLNDFA==", "dependencies": { - "@docusaurus/logger": "2.3.1", - "@docusaurus/utils": "2.3.1", + "@docusaurus/logger": "2.4.1", + "@docusaurus/utils": "2.4.1", "joi": "^17.6.0", "js-yaml": "^4.1.0", "tslib": "^2.4.0" @@ -3519,11 +3331,11 @@ "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==" }, "node_modules/@types/mdast": { - "version": "3.0.11", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.11.tgz", - "integrity": "sha512-Y/uImid8aAwrEA24/1tcRZwpxX3pIFTSilcNDKSPn+Y2iDywSEachzRuvgAYYLR3wpGXAsMbv5lvKLDZLeYPAw==", + "version": "3.0.12", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.12.tgz", + "integrity": "sha512-DT+iNIRNX884cx0/Q1ja7NyUPpZuv0KPyL5rGNxm1WC1OtHstl7n4Jb7nk+xacNShQMbczJjt8uFzznpp6kYBg==", "dependencies": { - "@types/unist": "*" + "@types/unist": "^2" } }, "node_modules/@types/mime": { @@ -3581,13 +3393,13 @@ } }, "node_modules/@types/react-router-config": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/@types/react-router-config/-/react-router-config-5.0.6.tgz", - "integrity": "sha512-db1mx37a1EJDf1XeX8jJN7R3PZABmJQXR8r28yUjVMFSjkmnQo6X6pOEEmNl+Tp2gYQOGPdYbFIipBtdElZ3Yg==", + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/@types/react-router-config/-/react-router-config-5.0.7.tgz", + "integrity": "sha512-pFFVXUIydHlcJP6wJm7sDii5mD/bCmmAY0wQzq+M+uX7bqS95AQqHZWP1iNMKrWVQSuHIzj5qi9BvrtLX2/T4w==", "dependencies": { "@types/history": "^4.7.11", "@types/react": "*", - "@types/react-router": "*" + "@types/react-router": "^5.1.0" } }, "node_modules/@types/react-router-dom": { @@ -3953,30 +3765,30 @@ } }, "node_modules/algoliasearch": { - "version": "4.16.0", - "resolved": "https://registry.npmjs.org/algoliasearch/-/algoliasearch-4.16.0.tgz", - "integrity": "sha512-HAjKJ6bBblaXqO4dYygF4qx251GuJ6zCZt+qbJ+kU7sOC+yc84pawEjVpJByh+cGP2APFCsao2Giz50cDlKNPA==", - "dependencies": { - "@algolia/cache-browser-local-storage": "4.16.0", - "@algolia/cache-common": "4.16.0", - "@algolia/cache-in-memory": "4.16.0", - "@algolia/client-account": "4.16.0", - "@algolia/client-analytics": "4.16.0", - "@algolia/client-common": "4.16.0", - "@algolia/client-personalization": "4.16.0", - "@algolia/client-search": "4.16.0", - "@algolia/logger-common": "4.16.0", - "@algolia/logger-console": "4.16.0", - "@algolia/requester-browser-xhr": "4.16.0", - "@algolia/requester-common": "4.16.0", - "@algolia/requester-node-http": "4.16.0", - "@algolia/transporter": "4.16.0" + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/algoliasearch/-/algoliasearch-4.19.1.tgz", + "integrity": "sha512-IJF5b93b2MgAzcE/tuzW0yOPnuUyRgGAtaPv5UUywXM8kzqfdwZTO4sPJBzoGz1eOy6H9uEchsJsBFTELZSu+g==", + "dependencies": { + "@algolia/cache-browser-local-storage": "4.19.1", + "@algolia/cache-common": "4.19.1", + "@algolia/cache-in-memory": "4.19.1", + "@algolia/client-account": "4.19.1", + "@algolia/client-analytics": "4.19.1", + "@algolia/client-common": "4.19.1", + "@algolia/client-personalization": "4.19.1", + "@algolia/client-search": "4.19.1", + "@algolia/logger-common": "4.19.1", + "@algolia/logger-console": "4.19.1", + "@algolia/requester-browser-xhr": "4.19.1", + "@algolia/requester-common": "4.19.1", + "@algolia/requester-node-http": "4.19.1", + "@algolia/transporter": "4.19.1" } }, "node_modules/algoliasearch-helper": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/algoliasearch-helper/-/algoliasearch-helper-3.12.0.tgz", - "integrity": "sha512-/j1U3PEwdan0n6P/QqSnSpNSLC5+cEMvyljd5CnmNmUjDlGrys+vFEOwjVEnqELIiAGMHEA/Nl3CiKVFBUYqyQ==", + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/algoliasearch-helper/-/algoliasearch-helper-3.14.0.tgz", + "integrity": "sha512-gXDXzsSS0YANn5dHr71CUXOo84cN4azhHKUbg71vAWnH+1JBiR4jf7to3t3JHXknXkbV0F7f055vUSBKrltHLQ==", "dependencies": { "@algolia/events": "^4.0.1" }, @@ -4105,9 +3917,9 @@ } }, "node_modules/autoprefixer": { - "version": "10.4.14", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.14.tgz", - "integrity": "sha512-FQzyfOsTlwVzjHxKEqRIAdJx9niO6VCBCoEwax/VLSoQF29ggECcPuBqUMZ+u8jCZOPSy8b8/8KnuFbp0SaFZQ==", + "version": "10.4.15", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.15.tgz", + "integrity": "sha512-KCuPB8ZCIqFdA4HwKXsvz7j6gvSDNhDP7WnUjBleRkKjPdvCmHFuQ77ocavI8FT6NdvlBnE2UFr2H4Mycn8Vew==", "funding": [ { "type": "opencollective", @@ -4116,11 +3928,15 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/autoprefixer" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ], "dependencies": { - "browserslist": "^4.21.5", - "caniuse-lite": "^1.0.30001464", + "browserslist": "^4.21.10", + "caniuse-lite": "^1.0.30001520", "fraction.js": "^4.2.0", "normalize-range": "^0.1.2", "picocolors": "^1.0.0", @@ -4403,9 +4219,9 @@ } }, "node_modules/browserslist": { - "version": "4.21.5", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.5.tgz", - "integrity": "sha512-tUkiguQGW7S3IhB7N+c2MV/HZPSCPAAiYBZXLsBhFB/PCy6ZKKsZrmBayHV9fdGV/ARIfJ14NkxKzRDjvp7L6w==", + "version": "4.21.10", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.10.tgz", + "integrity": "sha512-bipEBdZfVH5/pwrvqc+Ub0kUPVfGUhlKxbvfD+z1BDnPEO/X98ruXGA1WP5ASpAFKan7Qr6j736IacbZQuAlKQ==", "funding": [ { "type": "opencollective", @@ -4414,13 +4230,17 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ], "dependencies": { - "caniuse-lite": "^1.0.30001449", - "electron-to-chromium": "^1.4.284", - "node-releases": "^2.0.8", - "update-browserslist-db": "^1.0.10" + "caniuse-lite": "^1.0.30001517", + "electron-to-chromium": "^1.4.477", + "node-releases": "^2.0.13", + "update-browserslist-db": "^1.0.11" }, "bin": { "browserslist": "cli.js" @@ -4549,9 +4369,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001469", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001469.tgz", - "integrity": "sha512-Rcp7221ScNqQPP3W+lVOYDyjdR6dC+neEQCttoNr5bAyz54AboB4iwpnWgyi8P4YUsPybVzT4LgWiBbI3drL4g==", + "version": "1.0.30001523", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001523.tgz", + "integrity": "sha512-I5q5cisATTPZ1mc588Z//pj/Ox80ERYDfR71YnvY7raS/NOk8xXlZcB0sF7JdqaV//kOaa6aus7lRfpdnt1eBA==", "funding": [ { "type": "opencollective", @@ -4560,6 +4380,10 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ] }, @@ -4998,9 +4822,9 @@ "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" }, "node_modules/copy-text-to-clipboard": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/copy-text-to-clipboard/-/copy-text-to-clipboard-3.1.0.tgz", - "integrity": "sha512-PFM6BnjLnOON/lB3ta/Jg7Ywsv+l9kQGD4TWDCSlRBGmqnnTM5MrDkhAFgw+8HZt0wW6Q2BBE4cmy9sq+s9Qng==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/copy-text-to-clipboard/-/copy-text-to-clipboard-3.2.0.tgz", + "integrity": "sha512-RnJFp1XR/LOBDckxTib5Qjr/PMfkatD0MUCQgdpqS8MdKiNUzBjAQBEN6oUy+jW7LI93BBG3DtMB2KOOKpGs2Q==", "engines": { "node": ">=12" }, @@ -5173,11 +4997,11 @@ } }, "node_modules/cross-fetch": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz", - "integrity": "sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==", + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.8.tgz", + "integrity": "sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==", "dependencies": { - "node-fetch": "2.6.7" + "node-fetch": "^2.6.12" } }, "node_modules/cross-spawn": { @@ -5710,12 +5534,12 @@ } }, "node_modules/docusaurus-lunr-search": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/docusaurus-lunr-search/-/docusaurus-lunr-search-2.3.2.tgz", - "integrity": "sha512-Ngvm2kXwliWThqAThXI1912rOKHlFL7BjIc+OVNUfzkjpk5ar4TFEh+EUaaMOLw4V0BBko3CW0Ym7prqqm3jLQ==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/docusaurus-lunr-search/-/docusaurus-lunr-search-2.4.1.tgz", + "integrity": "sha512-UOgaAypgO0iLyA1Hk4EThG/ofLm9/JldznzN98ZKr7TMYVjMZbAEaIBKLAUDFdfOPr9D5EswXdLn39/aRkwHMA==", "dependencies": { "autocomplete.js": "^0.37.0", - "classnames": "^2.2.6", + "clsx": "^1.2.1", "gauge": "^3.0.0", "hast-util-select": "^4.0.0", "hast-util-to-text": "^2.0.0", @@ -5785,13 +5609,13 @@ } }, "node_modules/domutils": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.0.1.tgz", - "integrity": "sha512-z08c1l761iKhDFtfXO04C7kTdPBLi41zwOZl00WS8b5eiaebNpY00HKbztwBq+e3vyqWNwWF3mP9YLUeqIrF+Q==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.1.0.tgz", + "integrity": "sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==", "dependencies": { "dom-serializer": "^2.0.0", "domelementtype": "^2.3.0", - "domhandler": "^5.0.1" + "domhandler": "^5.0.3" }, "funding": { "url": "https://github.com/fb55/domutils?sponsor=1" @@ -5846,9 +5670,9 @@ "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" }, "node_modules/electron-to-chromium": { - "version": "1.4.340", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.340.tgz", - "integrity": "sha512-zx8hqumOqltKsv/MF50yvdAlPF9S/4PXbyfzJS6ZGhbddGkRegdwImmfSVqCkEziYzrIGZ/TlrzBND4FysfkDg==" + "version": "1.4.502", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.502.tgz", + "integrity": "sha512-xqeGw3Gr6o3uyHy/yKjdnDQHY2RQvXcGC2cfHjccK1IGkH6cX1WQBN8EeC/YpwPhGkBaikDTecJ8+ssxSVRQlw==" }, "node_modules/emoji-regex": { "version": "9.2.2", @@ -6252,9 +6076,9 @@ } }, "node_modules/fbjs": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/fbjs/-/fbjs-3.0.4.tgz", - "integrity": "sha512-ucV0tDODnGV3JCnnkmoszb5lf4bNpzjv80K41wd4k798Etq+UYD0y0TIfalLjZoKgjive6/adkRnszwapiDgBQ==", + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/fbjs/-/fbjs-3.0.5.tgz", + "integrity": "sha512-ztsSx77JBtkuMrEypfhgc3cI0+0h+svqeie7xHbh1k/IKdcydnvadp/mUaGgjAOXQmQSxsqgaRhS3q9fy+1kxg==", "dependencies": { "cross-fetch": "^3.1.5", "fbjs-css-vars": "^1.0.0", @@ -6262,7 +6086,7 @@ "object-assign": "^4.1.0", "promise": "^7.1.1", "setimmediate": "^1.0.5", - "ua-parser-js": "^0.7.30" + "ua-parser-js": "^1.0.35" } }, "node_modules/fbjs-css-vars": { @@ -6526,9 +6350,9 @@ } }, "node_modules/fraction.js": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.2.0.tgz", - "integrity": "sha512-MhLuK+2gUcnZe8ZHlaaINnQLl0xRIGRfcGk2yl8xoQAfHrSsL3rYu6FCmBdkdbhc9EPlwyGHewaRsvwRMJtAlA==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.2.1.tgz", + "integrity": "sha512-/KxoyCnPM0GwYI4NN0Iag38Tqt+od3/mLuguepLgCAKPn0ZhC544nssAW0tG2/00zXEYl9W+7hwAIpLHo6Oc7Q==", "engines": { "node": "*" }, @@ -7454,9 +7278,9 @@ } }, "node_modules/infima": { - "version": "0.2.0-alpha.42", - "resolved": "https://registry.npmjs.org/infima/-/infima-0.2.0-alpha.42.tgz", - "integrity": "sha512-ift8OXNbQQwtbIt6z16KnSWP7uJ/SysSMFI4F87MNRTicypfl4Pv3E2OGVv6N3nSZFJvA8imYulCBS64iyHYww==", + "version": "0.2.0-alpha.43", + "resolved": "https://registry.npmjs.org/infima/-/infima-0.2.0-alpha.43.tgz", + "integrity": "sha512-2uw57LvUqW0rK/SWYnd/2rRfxNA5DDNOh33jxF7fy46VWoNhGxiUQyVZHbBMjQ33mQem0cjdDVwgWVAmlRfgyQ==", "engines": { "node": ">=12" } @@ -8487,9 +8311,9 @@ } }, "node_modules/node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", "dependencies": { "whatwg-url": "^5.0.0" }, @@ -8514,9 +8338,9 @@ } }, "node_modules/node-releases": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.10.tgz", - "integrity": "sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w==" + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz", + "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==" }, "node_modules/nopt": { "version": "1.0.10", @@ -8576,9 +8400,9 @@ } }, "node_modules/npm-to-yarn": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/npm-to-yarn/-/npm-to-yarn-1.3.0.tgz", - "integrity": "sha512-07nTERZViiQvQJpVxhUyJgV5zLaMrAxW+nfSv/ELHe3Fv9bSSxRS1lTw9MplkuLtynQru3fvEm9r4a5+IE7j2A==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/npm-to-yarn/-/npm-to-yarn-2.0.0.tgz", + "integrity": "sha512-/IbjiJ7vqbxfxJxAZ+QI9CCRjnIbvGxn5KQcSY9xHh0lMKc/Sgqmm7yp7KPmd6TiTZX5/KiSBKlkGHo59ucZbg==", "engines": { "node": ">=6.0.0" }, @@ -9552,9 +9376,9 @@ } }, "node_modules/postcss-sort-media-queries": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/postcss-sort-media-queries/-/postcss-sort-media-queries-4.3.0.tgz", - "integrity": "sha512-jAl8gJM2DvuIJiI9sL1CuiHtKM4s5aEIomkU8G3LFvbP+p8i7Sz8VV63uieTgoewGqKbi+hxBTiOKJlB35upCg==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/postcss-sort-media-queries/-/postcss-sort-media-queries-4.4.1.tgz", + "integrity": "sha512-QDESFzDDGKgpiIh4GYXsSy6sek2yAwQx1JASl5AxBtU1Lq2JfKBljIPNdil989NcSKRQX1ToiaKphImtBuhXWw==", "dependencies": { "sort-css-media-queries": "2.1.0" }, @@ -10112,9 +9936,9 @@ } }, "node_modules/react-textarea-autosize": { - "version": "8.4.1", - "resolved": "https://registry.npmjs.org/react-textarea-autosize/-/react-textarea-autosize-8.4.1.tgz", - "integrity": "sha512-aD2C+qK6QypknC+lCMzteOdIjoMbNlgSFmJjCV+DrfTPwp59i/it9mMNf2HDzvRjQgKAyBDPyLJhcrzElf2U4Q==", + "version": "8.5.3", + "resolved": "https://registry.npmjs.org/react-textarea-autosize/-/react-textarea-autosize-8.5.3.tgz", + "integrity": "sha512-XT1024o2pqCuZSuBt9FwHlaDeNtVrtCXu0Rnz88t1jUGheCLa3PhjE1GH8Ctm2axEtvdCl5SUHYschyQ0L5QHQ==", "dependencies": { "@babel/runtime": "^7.20.13", "use-composed-ref": "^1.3.0", @@ -10810,6 +10634,15 @@ "url": "https://opencollective.com/webpack" } }, + "node_modules/search-insights": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/search-insights/-/search-insights-2.7.0.tgz", + "integrity": "sha512-GLbVaGgzYEKMvuJbHRhLi1qoBFnjXZGZ6l4LxOYPCp4lI2jDRB3jPU9/XNhMwv6kvnA9slTreq6pvK+b3o3aqg==", + "peer": true, + "engines": { + "node": ">=8.16.0" + } + }, "node_modules/section-matter": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/section-matter/-/section-matter-1.0.0.tgz", @@ -11819,9 +11652,9 @@ } }, "node_modules/ua-parser-js": { - "version": "0.7.34", - "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.34.tgz", - "integrity": "sha512-cJMeh/eOILyGu0ejgTKB95yKT3zOenSe9UGE3vj6WfiOwgGYnmATUsnDixMFvdU+rNMvWih83hrUP8VwhF9yXQ==", + "version": "1.0.35", + "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-1.0.35.tgz", + "integrity": "sha512-fKnGuqmTBnIE+/KXSzCn4db8RTigUzw1AN0DmdU6hJovUTbYJKyqj+8Mt1c4VfRDnOVJnENmfYkIPZ946UrSAA==", "funding": [ { "type": "opencollective", @@ -12041,9 +11874,9 @@ } }, "node_modules/update-browserslist-db": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz", - "integrity": "sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ==", + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz", + "integrity": "sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==", "funding": [ { "type": "opencollective", @@ -12052,6 +11885,10 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ], "dependencies": { @@ -12059,7 +11896,7 @@ "picocolors": "^1.0.0" }, "bin": { - "browserslist-lint": "cli.js" + "update-browserslist-db": "cli.js" }, "peerDependencies": { "browserslist": ">= 4.21.0" diff --git a/website/package.json b/website/package.json index ee579f912..7b21d6595 100644 --- a/website/package.json +++ b/website/package.json @@ -14,12 +14,13 @@ "write-heading-ids": "docusaurus write-heading-ids" }, "dependencies": { - "@docusaurus/core": "2.3.1", - "@docusaurus/preset-classic": "2.3.1", - "@docusaurus/remark-plugin-npm2yarn": "2.3.1", + "@docusaurus/core": "^2.4.1", + "@docusaurus/preset-classic": "^2.4.1", + "@docusaurus/remark-plugin-npm2yarn": "^2.4.1", "@mdx-js/react": "1.6.22", + "classnames": "^2.3.2", "clsx": "^1.1.1", - "docusaurus-lunr-search": "^2.3.2", + "docusaurus-lunr-search": "^2.4.1", "prism-react-renderer": "^1.3.1", "react": "^17.0.2", "react-dom": "^17.0.2" @@ -37,6 +38,6 @@ ] }, "devDependencies": { - "@docusaurus/types": "^2.0.0-beta.15" + "@docusaurus/types": "^2.4.1" } } diff --git a/website/src/theme/SearchBar/DocSearch.js b/website/src/theme/SearchBar/DocSearch.js deleted file mode 100644 index 804e70198..000000000 --- a/website/src/theme/SearchBar/DocSearch.js +++ /dev/null @@ -1,293 +0,0 @@ -import Hogan from 'hogan.js' -import LunrSearchAdapter from './lunar-search' -import autocomplete from 'autocomplete.js' -import templates from './templates' -import utils from './utils' -import $ from 'autocomplete.js/zepto' - -class DocSearch { - constructor ({ - searchDocs, - searchIndex, - inputSelector, - debug = false, - baseUrl = '/', - queryDataCallback = null, - autocompleteOptions = { - debug: false, - hint: false, - autoselect: true - }, - transformData = false, - queryHook = false, - handleSelected = false, - enhancedSearchInput = false, - layout = 'collumns' - }) { - this.input = DocSearch.getInputFromSelector(inputSelector) - this.queryDataCallback = queryDataCallback || null - const autocompleteOptionsDebug = - autocompleteOptions && autocompleteOptions.debug - ? autocompleteOptions.debug - : false - // eslint-disable-next-line no-param-reassign - autocompleteOptions.debug = debug || autocompleteOptionsDebug - this.autocompleteOptions = autocompleteOptions - this.autocompleteOptions.cssClasses = - this.autocompleteOptions.cssClasses || {} - this.autocompleteOptions.cssClasses.prefix = - this.autocompleteOptions.cssClasses.prefix || 'ds' - const inputAriaLabel = - this.input && - typeof this.input.attr === 'function' && - this.input.attr('aria-label') - this.autocompleteOptions.ariaLabel = - this.autocompleteOptions.ariaLabel || inputAriaLabel || 'search input' - - this.isSimpleLayout = layout === 'simple' - - this.client = new LunrSearchAdapter(searchDocs, searchIndex, baseUrl) - - if (enhancedSearchInput) { - this.input = DocSearch.injectSearchBox(this.input) - } - this.autocomplete = autocomplete(this.input, autocompleteOptions, [ - { - source: this.getAutocompleteSource(transformData, queryHook), - templates: { - suggestion: DocSearch.getSuggestionTemplate(this.isSimpleLayout), - footer: templates.footer, - empty: DocSearch.getEmptyTemplate() - } - } - ]) - - const customHandleSelected = handleSelected - this.handleSelected = customHandleSelected || this.handleSelected - - // We prevent default link clicking if a custom handleSelected is defined - if (customHandleSelected) { - $('.algolia-autocomplete').on('click', '.ds-suggestions a', (event) => { - event.preventDefault() - }) - } - - this.autocomplete.on( - 'autocomplete:selected', - this.handleSelected.bind(null, this.autocomplete.autocomplete) - ) - - this.autocomplete.on( - 'autocomplete:shown', - this.handleShown.bind(null, this.input) - ) - - if (enhancedSearchInput) { - DocSearch.bindSearchBoxEvent() - } - } - - static injectSearchBox (input) { - input.before(templates.searchBox) - const newInput = input.prev().prev().find('input') - input.remove() - return newInput - } - - static bindSearchBoxEvent () { - $('.searchbox [type="reset"]').on('click', function () { - $('input#docsearch').focus() - $(this).addClass('hide') - autocomplete.autocomplete.setVal('') - }) - - $('input#docsearch').on('keyup', () => { - const searchbox = document.querySelector('input#docsearch') - const reset = document.querySelector('.searchbox [type="reset"]') - reset.className = 'searchbox__reset' - if (searchbox.value.length === 0) { - reset.className += ' hide' - } - }) - } - - /** - * Returns the matching input from a CSS selector, null if none matches - * @function getInputFromSelector - * @param {string} selector CSS selector that matches the search - * input of the page - * @returns {void} - */ - static getInputFromSelector (selector) { - const input = $(selector).filter('input') - return input.length ? $(input[0]) : null - } - - /** - * Returns the `source` method to be passed to autocomplete.js. It will query - * the Algolia index and call the callbacks with the formatted hits. - * @function getAutocompleteSource - * @param {function} transformData An optional function to transform the hits - * @param {function} queryHook An optional function to transform the query - * @returns {function} Method to be passed as the `source` option of - * autocomplete - */ - getAutocompleteSource (transformData, queryHook) { - return (query, callback) => { - if (queryHook) { - // eslint-disable-next-line no-param-reassign - query = queryHook(query) || query - } - this.client.search(query).then((hits) => { - if ( - this.queryDataCallback && - typeof this.queryDataCallback === 'function' - ) { - this.queryDataCallback(hits) - } - if (transformData) { - hits = transformData(hits) || hits - } - callback(DocSearch.formatHits(hits)) - }) - } - } - - // Given a list of hits returned by the API, will reformat them to be used in - // a Hogan template - static formatHits (receivedHits) { - const clonedHits = utils.deepClone(receivedHits) - const hits = clonedHits.map((hit) => { - if (hit._highlightResult) { - // eslint-disable-next-line no-param-reassign - hit._highlightResult = utils.mergeKeyWithParent( - hit._highlightResult, - 'hierarchy' - ) - } - return utils.mergeKeyWithParent(hit, 'hierarchy') - }) - - // Group hits by category / subcategory - let groupedHits = utils.groupBy(hits, 'lvl0') - $.each(groupedHits, (level, collection) => { - const groupedHitsByLvl1 = utils.groupBy(collection, 'lvl1') - const flattenedHits = utils.flattenAndFlagFirst( - groupedHitsByLvl1, - 'isSubCategoryHeader' - ) - groupedHits[level] = flattenedHits - }) - groupedHits = utils.flattenAndFlagFirst(groupedHits, 'isCategoryHeader') - - // Translate hits into smaller objects to be send to the template - return groupedHits.map((hit) => { - const url = DocSearch.formatURL(hit) - const category = utils.getHighlightedValue(hit, 'lvl0') - const subcategory = utils.getHighlightedValue(hit, 'lvl1') || category - const displayTitle = utils - .compact([ - utils.getHighlightedValue(hit, 'lvl2') || subcategory, - utils.getHighlightedValue(hit, 'lvl3'), - utils.getHighlightedValue(hit, 'lvl4'), - utils.getHighlightedValue(hit, 'lvl5'), - utils.getHighlightedValue(hit, 'lvl6') - ]) - .join( - '' - ) - const text = utils.getSnippetedValue(hit, 'content') - const isTextOrSubcategoryNonEmpty = - (subcategory && subcategory !== '') || - (displayTitle && displayTitle !== '') - const isLvl1EmptyOrDuplicate = - !subcategory || subcategory === '' || subcategory === category - const isLvl2 = - displayTitle && displayTitle !== '' && displayTitle !== subcategory - const isLvl1 = - !isLvl2 && subcategory && subcategory !== '' && subcategory !== category - const isLvl0 = !isLvl1 && !isLvl2 - - return { - isLvl0, - isLvl1, - isLvl2, - isLvl1EmptyOrDuplicate, - isCategoryHeader: hit.isCategoryHeader, - isSubCategoryHeader: hit.isSubCategoryHeader, - isTextOrSubcategoryNonEmpty, - category, - subcategory, - title: displayTitle, - text, - url - } - }) - } - - static formatURL (hit) { - const { url, anchor } = hit - if (url) { - const containsAnchor = url.indexOf('#') !== -1 - if (containsAnchor) return url - else if (anchor) return `${hit.url}#${hit.anchor}` - return url - } else if (anchor) return `#${hit.anchor}` - /* eslint-disable */ - console.warn('no anchor nor url for : ', JSON.stringify(hit)) - /* eslint-enable */ - return null - } - - static getEmptyTemplate () { - return (args) => Hogan.compile(templates.empty).render(args) - } - - static getSuggestionTemplate (isSimpleLayout) { - const stringTemplate = isSimpleLayout - ? templates.suggestionSimple - : templates.suggestion - const template = Hogan.compile(stringTemplate) - return (suggestion) => template.render(suggestion) - } - - handleSelected (input, event, suggestion, datasetNumber, context = {}) { - // Do nothing if click on the suggestion, as it's already a , the - // browser will take care of it. This allow Ctrl-Clicking on results and not - // having the main window being redirected as well - if (context.selectionMethod === 'click') { - return - } - - input.setVal('') - window.location.assign(suggestion.url) - } - - handleShown (input) { - const middleOfInput = input.offset().left + input.width() / 2 - let middleOfWindow = $(document).width() / 2 - - if (isNaN(middleOfWindow)) { - middleOfWindow = 900 - } - - const alignClass = - middleOfInput - middleOfWindow >= 0 - ? 'algolia-autocomplete-right' - : 'algolia-autocomplete-left' - const otherAlignClass = - middleOfInput - middleOfWindow < 0 - ? 'algolia-autocomplete-right' - : 'algolia-autocomplete-left' - const autocompleteWrapper = $('.algolia-autocomplete') - if (!autocompleteWrapper.hasClass(alignClass)) { - autocompleteWrapper.addClass(alignClass) - } - - if (autocompleteWrapper.hasClass(otherAlignClass)) { - autocompleteWrapper.removeClass(otherAlignClass) - } - } -} - -export default DocSearch diff --git a/website/src/theme/SearchBar/algolia.css b/website/src/theme/SearchBar/algolia.css deleted file mode 100644 index c5590cfa4..000000000 --- a/website/src/theme/SearchBar/algolia.css +++ /dev/null @@ -1,526 +0,0 @@ -/* Bottom border of each suggestion */ -.algolia-docsearch-suggestion { - border-bottom-color: #3a3dd1; -} -/* Main category headers */ -.algolia-docsearch-suggestion--category-header { - background-color: #4b54de; -} -/* Highlighted search terms */ -.algolia-docsearch-suggestion--highlight { - color: #3a33d1; -} -/* Highligted search terms in the main category headers */ -.algolia-docsearch-suggestion--category-header - .algolia-docsearch-suggestion--highlight { - background-color: #4d47d5; -} -/* Currently selected suggestion */ -.aa-cursor .algolia-docsearch-suggestion--content { - color: #272296; -} -.aa-cursor .algolia-docsearch-suggestion { - background: #ebebfb; -} - -/* For bigger screens, when displaying results in two columns */ -@media (min-width: 768px) { - /* Bottom border of each suggestion */ - .algolia-docsearch-suggestion { - border-bottom-color: #7671df; - } - /* Left column, with secondary category header */ - .algolia-docsearch-suggestion--subcategory-column { - border-right-color: #7671df; - color: #4e4726; - } -} - -.searchbox { - display: inline-block; - position: relative; - width: 200px; - height: 32px !important; - white-space: nowrap; - box-sizing: border-box; - visibility: visible !important; -} - -.searchbox .algolia-autocomplete { - display: block; - width: 100%; - height: 100%; -} - -.searchbox__wrapper { - width: 100%; - height: 100%; - z-index: 999; - position: relative; -} - -.searchbox__input { - display: inline-block; - box-sizing: border-box; - -webkit-transition: box-shadow 0.4s ease, background 0.4s ease; - transition: box-shadow 0.4s ease, background 0.4s ease; - border: 0; - border-radius: 16px; - box-shadow: inset 0 0 0 1px #cccccc; - background: #ffffff !important; - padding: 0; - padding-right: 26px; - padding-left: 32px; - width: 100%; - height: 100%; - vertical-align: middle; - white-space: normal; - font-size: 12px; - -webkit-appearance: none; - -moz-appearance: none; - appearance: none; -} - -.searchbox__input::-webkit-search-decoration, -.searchbox__input::-webkit-search-cancel-button, -.searchbox__input::-webkit-search-results-button, -.searchbox__input::-webkit-search-results-decoration { - display: none; -} - -.searchbox__input:hover { - box-shadow: inset 0 0 0 1px #b3b3b3; -} - -.searchbox__input:focus, -.searchbox__input:active { - outline: 0; - box-shadow: inset 0 0 0 1px #aaaaaa; - background: #ffffff; -} - -.searchbox__input::-webkit-input-placeholder { - color: #aaaaaa; -} - -.searchbox__input::-moz-placeholder { - color: #aaaaaa; -} - -.searchbox__input:-ms-input-placeholder { - color: #aaaaaa; -} - -.searchbox__input::placeholder { - color: #aaaaaa; -} - -.searchbox__submit { - position: absolute; - top: 0; - margin: 0; - border: 0; - border-radius: 16px 0 0 16px; - background-color: rgba(69, 142, 225, 0); - padding: 0; - width: 32px; - height: 100%; - vertical-align: middle; - text-align: center; - font-size: inherit; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - right: inherit; - left: 0; -} - -.searchbox__submit::before { - display: inline-block; - margin-right: -4px; - height: 100%; - vertical-align: middle; - content: ''; -} - -.searchbox__submit:hover, -.searchbox__submit:active { - cursor: pointer; -} - -.searchbox__submit:focus { - outline: 0; -} - -.searchbox__submit svg { - width: 14px; - height: 14px; - vertical-align: middle; - fill: #6d7e96; -} - -.searchbox__reset { - display: block; - position: absolute; - top: 8px; - right: 8px; - margin: 0; - border: 0; - background: none; - cursor: pointer; - padding: 0; - font-size: inherit; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - fill: rgba(0, 0, 0, 0.5); -} - -.searchbox__reset.hide { - display: none; -} - -.searchbox__reset:focus { - outline: 0; -} - -.searchbox__reset svg { - display: block; - margin: 4px; - width: 8px; - height: 8px; -} - -.searchbox__input:valid ~ .searchbox__reset { - display: block; - -webkit-animation-name: sbx-reset-in; - animation-name: sbx-reset-in; - -webkit-animation-duration: 0.15s; - animation-duration: 0.15s; -} - -@-webkit-keyframes sbx-reset-in { - 0% { - -webkit-transform: translate3d(-20%, 0, 0); - transform: translate3d(-20%, 0, 0); - opacity: 0; - } - 100% { - -webkit-transform: none; - transform: none; - opacity: 1; - } -} - -@keyframes sbx-reset-in { - 0% { - -webkit-transform: translate3d(-20%, 0, 0); - transform: translate3d(-20%, 0, 0); - opacity: 0; - } - 100% { - -webkit-transform: none; - transform: none; - opacity: 1; - } -} - -.algolia-autocomplete .ds-dropdown-menu:before { - display: block; - position: absolute; - content: ''; - width: 14px; - height: 14px; - background: #373940; - z-index: 1000; - top: -7px; - border-top: 1px solid #373940; - border-right: 1px solid #373940; - -webkit-transform: rotate(-45deg); - transform: rotate(-45deg); - border-radius: 2px; -} - -.algolia-autocomplete .ds-dropdown-menu { - box-shadow: 0 1px 0 0 rgba(0, 0, 0, 0.2), 0 2px 3px 0 rgba(0, 0, 0, 0.1); -} - -@media (min-width: 601px) { - .algolia-autocomplete.algolia-autocomplete-right .ds-dropdown-menu { - right: 0 !important; - left: inherit !important; - } - - .algolia-autocomplete.algolia-autocomplete-right .ds-dropdown-menu:before { - right: 48px; - } - - .algolia-autocomplete .ds-dropdown-menu { - position: relative; - top: -6px; - border-radius: 4px; - margin: 6px 0 0; - padding: 0; - text-align: left; - height: auto; - position: relative; - background: transparent; - border: none; - z-index: 999; - max-width: 600px; - min-width: 500px; - } -} - -@media (max-width: 600px) { - .algolia-autocomplete .ds-dropdown-menu { - z-index: 100; - position: fixed !important; - top: 50px !important; - left: auto !important; - right: 1rem !important; - width: 600px; - max-width: calc(100% - 2rem); - max-height: calc(100% - 5rem); - display: block; - } - - .algolia-autocomplete .ds-dropdown-menu:before { - right: 6rem; - } -} - -.algolia-autocomplete .ds-dropdown-menu .ds-suggestions { - position: relative; - z-index: 1000; -} - -.algolia-autocomplete .ds-dropdown-menu .ds-suggestion { - cursor: pointer; -} - -.algolia-autocomplete .ds-dropdown-menu [class^='ds-dataset-'] { - position: relative; - border-radius: 4px; - overflow: auto; - padding: 0; - background: #ffffff; -} - -.algolia-autocomplete .ds-dropdown-menu * { - box-sizing: border-box; -} - -.algolia-autocomplete .algolia-docsearch-suggestion { - display: block; - position: relative; - padding: 0; - overflow: hidden; - text-decoration: none; -} - -.algolia-autocomplete .ds-cursor .algolia-docsearch-suggestion--wrapper { - background: #f1f1f1; - box-shadow: inset -2px 0 0 #61dafb; -} - -.algolia-autocomplete .algolia-docsearch-suggestion--highlight { - background: #ffe564; - padding: 0.1em 0.05em; -} - -.algolia-autocomplete - .algolia-docsearch-suggestion--category-header - .algolia-docsearch-suggestion--category-header-lvl0 - .algolia-docsearch-suggestion--highlight, -.algolia-autocomplete - .algolia-docsearch-suggestion--category-header - .algolia-docsearch-suggestion--category-header-lvl1 - .algolia-docsearch-suggestion--highlight { - color: inherit; - background: inherit; -} - -.algolia-autocomplete - .algolia-docsearch-suggestion--text - .algolia-docsearch-suggestion--highlight { - padding: 0 0 1px; - background: inherit; - box-shadow: inset 0 -2px 0 0 rgba(69, 142, 225, 0.8); - color: inherit; -} - -.algolia-autocomplete .algolia-docsearch-suggestion--content { - display: block; - float: right; - width: 70%; - position: relative; - padding: 5.33333px 0 5.33333px 10.66667px; - cursor: pointer; -} - -.algolia-autocomplete .algolia-docsearch-suggestion--content:before { - content: ''; - position: absolute; - display: block; - top: 0; - height: 100%; - width: 1px; - background: #ececec; - left: -1px; -} - -.algolia-autocomplete .algolia-docsearch-suggestion--category-header { - position: relative; - display: none; - font-size: 14px; - letter-spacing: 0.08em; - font-weight: 700; - background-color: #373940; - text-transform: uppercase; - color: #fff; - margin: 0; - padding: 5px 8px; -} - -.algolia-autocomplete .algolia-docsearch-suggestion--wrapper { - background-color: #fff; - width: 100%; - float: left; - padding: 8px 0 0 0; -} - -.algolia-autocomplete .algolia-docsearch-suggestion--subcategory-column { - float: left; - width: 30%; - display: none; - padding-left: 0; - text-align: right; - position: relative; - padding: 5.33333px 10.66667px; - color: #777; - font-size: 0.9em; - word-wrap: break-word; -} - -.algolia-autocomplete .algolia-docsearch-suggestion--subcategory-column:before { - content: ''; - position: absolute; - display: block; - top: 0; - height: 100%; - width: 1px; - background: #ececec; - right: 0; -} - -.algolia-autocomplete - .algolia-docsearch-suggestion.algolia-docsearch-suggestion__main - .algolia-docsearch-suggestion--category-header, -.algolia-autocomplete - .algolia-docsearch-suggestion.algolia-docsearch-suggestion__secondary { - display: block; -} - -.algolia-autocomplete - .algolia-docsearch-suggestion--subcategory-column - .algolia-docsearch-suggestion--highlight { - background-color: inherit; - color: inherit; -} - -.algolia-autocomplete .algolia-docsearch-suggestion--subcategory-inline { - display: none; -} - -.algolia-autocomplete .algolia-docsearch-suggestion--title { - margin-bottom: 4px; - color: #02060c; - font-size: 0.9em; - font-weight: bold; -} - -.algolia-autocomplete .algolia-docsearch-suggestion--text { - display: block; - line-height: 1.2em; - font-size: 0.85em; - color: #63676d; - padding-right: 2px; -} - -.algolia-autocomplete .algolia-docsearch-suggestion--no-results { - width: 100%; - padding: 8px 0; - text-align: center; - font-size: 1.2em; - background-color: #373940; - margin-top: -8px; -} - -.algolia-autocomplete - .algolia-docsearch-suggestion--no-results - .algolia-docsearch-suggestion--text { - color: #ffffff; - margin-top: 4px; -} - -.algolia-autocomplete .algolia-docsearch-suggestion--no-results::before { - display: none; -} - -.algolia-autocomplete .algolia-docsearch-suggestion code { - padding: 1px 5px; - font-size: 90%; - border: none; - color: #222222; - background-color: #ebebeb; - border-radius: 3px; - font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', - monospace; -} - -.algolia-autocomplete - .algolia-docsearch-suggestion - code - .algolia-docsearch-suggestion--highlight { - background: none; -} - -.algolia-autocomplete - .algolia-docsearch-suggestion.algolia-docsearch-suggestion__main - .algolia-docsearch-suggestion--category-header { - color: white; - display: block; -} - -.algolia-autocomplete - .algolia-docsearch-suggestion.algolia-docsearch-suggestion__secondary - .algolia-docsearch-suggestion--subcategory-column { - display: block; -} - -.algolia-autocomplete .algolia-docsearch-footer { - background-color: #fff; - width: 100%; - height: 30px; - z-index: 2000; - float: right; - font-size: 0; - line-height: 0; -} - -.algolia-autocomplete .algolia-docsearch-footer--logo { - background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 130 18'%3E%3Cdefs%3E%3ClinearGradient id='a' x1='-36.87%25' x2='129.43%25' y1='134.94%25' y2='-27.7%25'%3E%3Cstop stop-color='%252300AEFF' offset='0%25'/%3E%3Cstop stop-color='%25233369E7' offset='100%25'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cpath fill='url(%2523a)' d='M59.4.02h13.3a2.37 2.37 0 0 1 2.38 2.37V15.6a2.37 2.37 0 0 1-2.38 2.36H59.4a2.37 2.37 0 0 1-2.38-2.36V2.38A2.37 2.37 0 0 1 59.4.02z'/%3E%3Cpath fill='%2523FFF' d='M66.26 4.56c-2.82 0-5.1 2.27-5.1 5.08 0 2.8 2.28 5.07 5.1 5.07 2.8 0 5.1-2.26 5.1-5.07 0-2.8-2.28-5.07-5.1-5.07zm0 8.65c-2 0-3.6-1.6-3.6-3.56 0-1.97 1.6-3.58 3.6-3.58 1.98 0 3.6 1.6 3.6 3.58a3.58 3.58 0 0 1-3.6 3.57zm0-6.4v2.66c0 .07.08.13.15.1l2.4-1.24c.04-.02.06-.1.03-.14a2.96 2.96 0 0 0-2.46-1.5c-.06 0-.1.05-.1.1zm-3.33-1.96l-.3-.3a.78.78 0 0 0-1.12 0l-.36.36a.77.77 0 0 0 0 1.1l.3.3c.05.05.13.04.17 0 .2-.25.4-.5.6-.7.23-.23.46-.43.7-.6.07-.04.07-.1.03-.16zm5-.8V3.4a.78.78 0 0 0-.78-.78h-1.83a.78.78 0 0 0-.78.78v.63c0 .07.06.12.14.1a5.74 5.74 0 0 1 1.58-.22c.52 0 1.04.07 1.54.2a.1.1 0 0 0 .13-.1z'/%3E%3Cpath fill='%2523182359' d='M102.16 13.76c0 1.46-.37 2.52-1.12 3.2-.75.67-1.9 1-3.44 1-.56 0-1.74-.1-2.67-.3l.34-1.7c.78.17 1.82.2 2.36.2.86 0 1.48-.16 1.84-.5.37-.36.55-.88.55-1.57v-.35a6.37 6.37 0 0 1-.84.3 4.15 4.15 0 0 1-1.2.17 4.5 4.5 0 0 1-1.6-.28 3.38 3.38 0 0 1-1.26-.82 3.74 3.74 0 0 1-.8-1.35c-.2-.54-.3-1.5-.3-2.2 0-.67.1-1.5.3-2.06a3.92 3.92 0 0 1 .9-1.43 4.12 4.12 0 0 1 1.45-.92 5.3 5.3 0 0 1 1.94-.37c.7 0 1.35.1 1.97.2a15.86 15.86 0 0 1 1.6.33v8.46zm-5.95-4.2c0 .9.2 1.88.6 2.3.4.4.9.62 1.53.62.34 0 .66-.05.96-.15a2.75 2.75 0 0 0 .73-.33V6.7a8.53 8.53 0 0 0-1.42-.17c-.76-.02-1.36.3-1.77.8-.4.5-.62 1.4-.62 2.23zm16.13 0c0 .72-.1 1.26-.32 1.85a4.4 4.4 0 0 1-.9 1.53c-.38.42-.85.75-1.4.98-.54.24-1.4.37-1.8.37-.43 0-1.27-.13-1.8-.36a4.1 4.1 0 0 1-1.4-.97 4.5 4.5 0 0 1-.92-1.52 5.04 5.04 0 0 1-.33-1.84c0-.72.1-1.4.32-2 .22-.6.53-1.1.92-1.5.4-.43.86-.75 1.4-.98a4.55 4.55 0 0 1 1.78-.34 4.7 4.7 0 0 1 1.8.34c.54.23 1 .55 1.4.97.38.42.68.92.9 1.5.23.6.35 1.3.35 2zm-2.2 0c0-.92-.2-1.7-.6-2.22-.38-.54-.94-.8-1.64-.8-.72 0-1.27.26-1.67.8-.4.54-.58 1.3-.58 2.22 0 .93.2 1.56.6 2.1.38.54.94.8 1.64.8s1.25-.26 1.65-.8c.4-.55.6-1.17.6-2.1zm6.97 4.7c-3.5.02-3.5-2.8-3.5-3.27L113.57.92l2.15-.34v10c0 .25 0 1.87 1.37 1.88v1.8zm3.77 0h-2.15v-9.2l2.15-.33v9.54zM119.8 3.74c.7 0 1.3-.58 1.3-1.3 0-.7-.58-1.3-1.3-1.3-.73 0-1.3.6-1.3 1.3 0 .72.58 1.3 1.3 1.3zm6.43 1c.7 0 1.3.1 1.78.27.5.18.88.42 1.17.73.28.3.5.74.6 1.18.13.46.2.95.2 1.5v5.47a25.24 25.24 0 0 1-1.5.25c-.67.1-1.42.15-2.25.15a6.83 6.83 0 0 1-1.52-.16 3.2 3.2 0 0 1-1.18-.5 2.46 2.46 0 0 1-.76-.9c-.18-.37-.27-.9-.27-1.44 0-.52.1-.85.3-1.2.2-.37.48-.67.83-.9a3.6 3.6 0 0 1 1.23-.5 7.07 7.07 0 0 1 2.2-.1l.83.16v-.35c0-.25-.03-.48-.1-.7a1.5 1.5 0 0 0-.3-.58c-.15-.18-.34-.3-.58-.4a2.54 2.54 0 0 0-.92-.17c-.5 0-.94.06-1.35.13-.4.08-.75.16-1 .25l-.27-1.74c.27-.1.67-.18 1.2-.28a9.34 9.34 0 0 1 1.65-.14zm.18 7.74c.66 0 1.15-.04 1.5-.1V10.2a5.1 5.1 0 0 0-2-.1c-.23.03-.45.1-.64.2a1.17 1.17 0 0 0-.47.38c-.13.17-.18.26-.18.52 0 .5.17.8.5.98.32.2.74.3 1.3.3zM84.1 4.8c.72 0 1.3.08 1.8.26.48.17.87.42 1.15.73.3.3.5.72.6 1.17.14.45.2.94.2 1.47v5.48a25.24 25.24 0 0 1-1.5.26c-.67.1-1.42.14-2.25.14a6.83 6.83 0 0 1-1.52-.16 3.2 3.2 0 0 1-1.18-.5 2.46 2.46 0 0 1-.76-.9c-.18-.38-.27-.9-.27-1.44 0-.53.1-.86.3-1.22.2-.36.5-.65.84-.88a3.6 3.6 0 0 1 1.24-.5 7.07 7.07 0 0 1 2.2-.1c.26.03.54.08.84.15v-.35c0-.24-.03-.48-.1-.7a1.5 1.5 0 0 0-.3-.58c-.15-.17-.34-.3-.58-.4a2.54 2.54 0 0 0-.9-.15c-.5 0-.96.05-1.37.12-.4.07-.75.15-1 .24l-.26-1.75c.27-.08.67-.17 1.18-.26a8.9 8.9 0 0 1 1.66-.15zm.2 7.73c.65 0 1.14-.04 1.48-.1v-2.17a5.1 5.1 0 0 0-1.98-.1c-.24.03-.46.1-.65.18a1.17 1.17 0 0 0-.47.4c-.12.17-.17.26-.17.52 0 .5.18.8.5.98.32.2.75.3 1.3.3zm8.68 1.74c-3.5 0-3.5-2.82-3.5-3.28L89.45.92 91.6.6v10c0 .25 0 1.87 1.38 1.88v1.8z'/%3E%3Cpath fill='%25231D3657' d='M5.03 11.03c0 .7-.26 1.24-.76 1.64-.5.4-1.2.6-2.1.6-.88 0-1.6-.14-2.17-.42v-1.2c.36.16.74.3 1.14.38.4.1.78.15 1.13.15.5 0 .88-.1 1.12-.3a.94.94 0 0 0 .35-.77.98.98 0 0 0-.33-.74c-.22-.2-.68-.44-1.37-.72-.72-.3-1.22-.62-1.52-1C.23 8.27.1 7.82.1 7.3c0-.65.22-1.17.7-1.55.46-.37 1.08-.56 1.86-.56.76 0 1.5.16 2.25.48l-.4 1.05c-.7-.3-1.32-.44-1.87-.44-.4 0-.73.08-.94.26a.9.9 0 0 0-.33.72c0 .2.04.38.12.52.08.15.22.3.42.4.2.14.55.3 1.06.52.58.24 1 .47 1.27.67.27.2.47.44.6.7.12.26.18.57.18.92zM9 13.27c-.92 0-1.64-.27-2.16-.8-.52-.55-.78-1.3-.78-2.24 0-.97.24-1.73.72-2.3.5-.54 1.15-.82 2-.82.78 0 1.4.25 1.85.72.46.48.7 1.14.7 1.97v.67H7.35c0 .58.17 1.02.46 1.33.3.3.7.47 1.24.47.36 0 .68-.04.98-.1a5.1 5.1 0 0 0 .98-.33v1.02a3.87 3.87 0 0 1-.94.32 5.72 5.72 0 0 1-1.08.1zm-.22-5.2c-.4 0-.73.12-.97.38s-.37.62-.42 1.1h2.7c0-.48-.13-.85-.36-1.1-.23-.26-.54-.38-.94-.38zm7.7 5.1l-.26-.84h-.05c-.28.36-.57.6-.86.74-.28.13-.65.2-1.1.2-.6 0-1.05-.16-1.38-.48-.32-.32-.5-.77-.5-1.34 0-.62.24-1.08.7-1.4.45-.3 1.14-.47 2.07-.5l1.02-.03V9.2c0-.37-.1-.65-.27-.84-.17-.2-.45-.28-.82-.28-.3 0-.6.04-.88.13a6.68 6.68 0 0 0-.8.33l-.4-.9a4.4 4.4 0 0 1 1.05-.4 4.86 4.86 0 0 1 1.08-.12c.76 0 1.33.18 1.7.5.4.33.6.85.6 1.56v4h-.9zm-1.9-.87c.47 0 .83-.13 1.1-.38.3-.26.43-.62.43-1.08v-.52l-.76.03c-.6.03-1.02.13-1.3.3s-.4.45-.4.82c0 .26.08.47.24.6.16.16.4.23.7.23zm7.57-5.2c.25 0 .46.03.62.06l-.12 1.18a2.38 2.38 0 0 0-.56-.06c-.5 0-.92.16-1.24.5-.3.32-.47.75-.47 1.27v3.1h-1.27V7.23h1l.16 1.05h.05c.2-.36.45-.64.77-.85a1.83 1.83 0 0 1 1.02-.3zm4.12 6.17c-.9 0-1.58-.27-2.05-.8-.47-.52-.7-1.27-.7-2.25 0-1 .24-1.77.73-2.3.5-.54 1.2-.8 2.12-.8.63 0 1.2.1 1.7.34l-.4 1c-.52-.2-.96-.3-1.3-.3-1.04 0-1.55.68-1.55 2.05 0 .67.13 1.17.38 1.5.26.34.64.5 1.13.5a3.23 3.23 0 0 0 1.6-.4v1.1a2.53 2.53 0 0 1-.73.28 4.36 4.36 0 0 1-.93.08zm8.28-.1h-1.27V9.5c0-.45-.1-.8-.28-1.02-.18-.23-.47-.34-.88-.34-.53 0-.9.16-1.16.48-.25.3-.38.85-.38 1.6v2.94h-1.26V4.8h1.26v2.12c0 .34-.02.7-.06 1.1h.08a1.76 1.76 0 0 1 .72-.67c.3-.16.66-.24 1.07-.24 1.43 0 2.15.74 2.15 2.2v3.86zM42.2 7.1c.74 0 1.32.28 1.73.82.4.53.62 1.3.62 2.26 0 .97-.2 1.73-.63 2.27-.42.54-1 .82-1.75.82s-1.33-.27-1.75-.8h-.08l-.23.7h-.94V4.8h1.26v2l-.02.64-.03.56h.05c.4-.6 1-.9 1.78-.9zm-.33 1.04c-.5 0-.88.15-1.1.45-.22.3-.34.8-.35 1.5v.08c0 .72.12 1.24.35 1.57.23.32.6.48 1.12.48.44 0 .78-.17 1-.53.24-.35.36-.87.36-1.53 0-1.35-.47-2.03-1.4-2.03zm3.24-.92h1.4l1.2 3.37c.18.47.3.92.36 1.34h.04l.18-.72 1.37-4H51l-2.53 6.73c-.46 1.23-1.23 1.85-2.3 1.85-.3 0-.56-.03-.83-.1v-1c.2.05.4.08.65.08.6 0 1.03-.36 1.28-1.06l.22-.56-2.4-5.94z'/%3E%3C/g%3E%3C/svg%3E"); - background-repeat: no-repeat; - background-position: center; - background-size: 100%; - overflow: hidden; - text-indent: -9000px; - width: 110px; - height: 100%; - display: block; - margin-left: auto; - margin-right: 5px; -} diff --git a/website/src/theme/SearchBar/index.js b/website/src/theme/SearchBar/index.js deleted file mode 100644 index e76e07953..000000000 --- a/website/src/theme/SearchBar/index.js +++ /dev/null @@ -1,119 +0,0 @@ -import React, { useRef, useCallback, useState } from 'react' -import classnames from 'classnames' -import { useHistory } from '@docusaurus/router' -import useDocusaurusContext from '@docusaurus/useDocusaurusContext' -import { usePluginData } from '@docusaurus/useGlobalData' -import useIsBrowser from '@docusaurus/useIsBrowser' -const Search = (props) => { - const initialized = useRef(false) - const searchBarRef = useRef(null) - const [indexReady, setIndexReady] = useState(false) - const history = useHistory() - const { siteConfig = {} } = useDocusaurusContext() - const isBrowser = useIsBrowser() - const { baseUrl } = siteConfig - const initAlgolia = (searchDocs, searchIndex, DocSearch) => { - DocSearch({ - searchDocs, - searchIndex, - baseUrl, - inputSelector: '#search_input_react', - // Override algolia's default selection event, allowing us to do client-side - // navigation and avoiding a full page refresh. - handleSelected: (_input, _event, suggestion) => { - const url = suggestion.url || '/' - // Use an anchor tag to parse the absolute url into a relative url - // Alternatively, we can use new URL(suggestion.url) but its not supported in IE - const a = document.createElement('a') - a.href = url - // Algolia use closest parent element id #__docusaurus when a h1 page title does not have an id - // So, we can safely remove it. See https://github.com/facebook/docusaurus/issues/1828 for more details. - - history.push(url) - } - }) - } - - const pluginData = usePluginData('docusaurus-lunr-search') - const getSearchDoc = () => - process.env.NODE_ENV === 'production' - ? fetch(`${baseUrl}${pluginData.fileNames.searchDoc}`).then((content) => - content.json() - ) - : Promise.resolve([]) - - const getLunrIndex = () => - process.env.NODE_ENV === 'production' - ? fetch(`${baseUrl}${pluginData.fileNames.lunrIndex}`).then((content) => - content.json() - ) - : Promise.resolve([]) - - const loadAlgolia = () => { - if (!initialized.current) { - Promise.all([ - getSearchDoc(), - getLunrIndex(), - import('./DocSearch'), - import('./algolia.css') - ]).then(([searchDocs, searchIndex, { default: DocSearch }]) => { - if (searchDocs.length === 0) { - return - } - initAlgolia(searchDocs, searchIndex, DocSearch) - setIndexReady(true) - }) - initialized.current = true - } - } - - const toggleSearchIconClick = useCallback( - (e) => { - if (!searchBarRef.current.contains(e.target)) { - searchBarRef.current.focus() - } - - props.handleSearchBarToggle && - props.handleSearchBarToggle(!props.isSearchBarExpanded) - }, - [props.isSearchBarExpanded] - ) - - if (isBrowser) { - loadAlgolia() - } - - return ( -
- - -
- ) -} - -export default Search diff --git a/website/src/theme/SearchBar/lib/DocSearch.js b/website/src/theme/SearchBar/lib/DocSearch.js deleted file mode 100644 index 564323f62..000000000 --- a/website/src/theme/SearchBar/lib/DocSearch.js +++ /dev/null @@ -1,302 +0,0 @@ -import Hogan from 'hogan.js' -import LunrSearchAdapter from './lunar-search' -import autocomplete from 'autocomplete.js' -import templates from './templates' -import utils from './utils' -import $ from 'autocomplete.js/zepto' - -/** - * Adds an autocomplete dropdown to an input field - * @function DocSearch - * @param {Object} options.searchDocs Search Documents - * @param {Object} options.searchIndex Lune searchIndexes - * @param {string} options.inputSelector CSS selector that targets the input - * value. - * @param {Object} [options.autocompleteOptions] Options to pass to the underlying autocomplete instance - * @return {Object} - */ -class DocSearch { - constructor ({ - searchDocs, - searchIndex, - inputSelector, - debug = false, - queryDataCallback = null, - autocompleteOptions = { - debug: false, - hint: false, - autoselect: true - }, - transformData = false, - queryHook = false, - handleSelected = false, - enhancedSearchInput = false, - layout = 'collumns' - }) { - this.input = DocSearch.getInputFromSelector(inputSelector) - this.queryDataCallback = queryDataCallback || null - const autocompleteOptionsDebug = - autocompleteOptions && autocompleteOptions.debug - ? autocompleteOptions.debug - : false - // eslint-disable-next-line no-param-reassign - autocompleteOptions.debug = debug || autocompleteOptionsDebug - this.autocompleteOptions = autocompleteOptions - this.autocompleteOptions.cssClasses = - this.autocompleteOptions.cssClasses || {} - this.autocompleteOptions.cssClasses.prefix = - this.autocompleteOptions.cssClasses.prefix || 'ds' - const inputAriaLabel = - this.input && - typeof this.input.attr === 'function' && - this.input.attr('aria-label') - this.autocompleteOptions.ariaLabel = - this.autocompleteOptions.ariaLabel || inputAriaLabel || 'search input' - - this.isSimpleLayout = layout === 'simple' - - this.client = new LunrSearchAdapter(searchDocs, searchIndex) - - if (enhancedSearchInput) { - this.input = DocSearch.injectSearchBox(this.input) - } - this.autocomplete = autocomplete(this.input, autocompleteOptions, [ - { - source: this.getAutocompleteSource(transformData, queryHook), - templates: { - suggestion: DocSearch.getSuggestionTemplate(this.isSimpleLayout), - footer: templates.footer, - empty: DocSearch.getEmptyTemplate() - } - } - ]) - - const customHandleSelected = handleSelected - this.handleSelected = customHandleSelected || this.handleSelected - - // We prevent default link clicking if a custom handleSelected is defined - if (customHandleSelected) { - $('.algolia-autocomplete').on('click', '.ds-suggestions a', (event) => { - event.preventDefault() - }) - } - - this.autocomplete.on( - 'autocomplete:selected', - this.handleSelected.bind(null, this.autocomplete.autocomplete) - ) - - this.autocomplete.on( - 'autocomplete:shown', - this.handleShown.bind(null, this.input) - ) - - if (enhancedSearchInput) { - DocSearch.bindSearchBoxEvent() - } - } - - static injectSearchBox (input) { - input.before(templates.searchBox) - const newInput = input.prev().prev().find('input') - input.remove() - return newInput - } - - static bindSearchBoxEvent () { - $('.searchbox [type="reset"]').on('click', function () { - $('input#docsearch').focus() - $(this).addClass('hide') - autocomplete.autocomplete.setVal('') - }) - - $('input#docsearch').on('keyup', () => { - const searchbox = document.querySelector('input#docsearch') - const reset = document.querySelector('.searchbox [type="reset"]') - reset.className = 'searchbox__reset' - if (searchbox.value.length === 0) { - reset.className += ' hide' - } - }) - } - - /** - * Returns the matching input from a CSS selector, null if none matches - * @function getInputFromSelector - * @param {string} selector CSS selector that matches the search - * input of the page - * @returns {void} - */ - static getInputFromSelector (selector) { - const input = $(selector).filter('input') - return input.length ? $(input[0]) : null - } - - /** - * Returns the `source` method to be passed to autocomplete.js. It will query - * the Algolia index and call the callbacks with the formatted hits. - * @function getAutocompleteSource - * @param {function} transformData An optional function to transform the hits - * @param {function} queryHook An optional function to transform the query - * @returns {function} Method to be passed as the `source` option of - * autocomplete - */ - getAutocompleteSource (transformData, queryHook) { - return (query, callback) => { - if (queryHook) { - // eslint-disable-next-line no-param-reassign - query = queryHook(query) || query - } - this.client.search(query).then((hits) => { - if ( - this.queryDataCallback && - typeof this.queryDataCallback === 'function' - ) { - this.queryDataCallback(hits) - } - if (transformData) { - hits = transformData(hits) || hits - } - callback(DocSearch.formatHits(hits)) - }) - } - } - - // Given a list of hits returned by the API, will reformat them to be used in - // a Hogan template - static formatHits (receivedHits) { - const clonedHits = utils.deepClone(receivedHits) - const hits = clonedHits.map((hit) => { - if (hit._highlightResult) { - // eslint-disable-next-line no-param-reassign - hit._highlightResult = utils.mergeKeyWithParent( - hit._highlightResult, - 'hierarchy' - ) - } - return utils.mergeKeyWithParent(hit, 'hierarchy') - }) - - // Group hits by category / subcategory - let groupedHits = utils.groupBy(hits, 'lvl0') - $.each(groupedHits, (level, collection) => { - const groupedHitsByLvl1 = utils.groupBy(collection, 'lvl1') - const flattenedHits = utils.flattenAndFlagFirst( - groupedHitsByLvl1, - 'isSubCategoryHeader' - ) - groupedHits[level] = flattenedHits - }) - groupedHits = utils.flattenAndFlagFirst(groupedHits, 'isCategoryHeader') - - // Translate hits into smaller objects to be send to the template - return groupedHits.map((hit) => { - const url = DocSearch.formatURL(hit) - const category = utils.getHighlightedValue(hit, 'lvl0') - const subcategory = utils.getHighlightedValue(hit, 'lvl1') || category - const displayTitle = utils - .compact([ - utils.getHighlightedValue(hit, 'lvl2') || subcategory, - utils.getHighlightedValue(hit, 'lvl3'), - utils.getHighlightedValue(hit, 'lvl4'), - utils.getHighlightedValue(hit, 'lvl5'), - utils.getHighlightedValue(hit, 'lvl6') - ]) - .join( - '' - ) - const text = utils.getSnippetedValue(hit, 'content') - const isTextOrSubcategoryNonEmpty = - (subcategory && subcategory !== '') || - (displayTitle && displayTitle !== '') - const isLvl1EmptyOrDuplicate = - !subcategory || subcategory === '' || subcategory === category - const isLvl2 = - displayTitle && displayTitle !== '' && displayTitle !== subcategory - const isLvl1 = - !isLvl2 && subcategory && subcategory !== '' && subcategory !== category - const isLvl0 = !isLvl1 && !isLvl2 - - return { - isLvl0, - isLvl1, - isLvl2, - isLvl1EmptyOrDuplicate, - isCategoryHeader: hit.isCategoryHeader, - isSubCategoryHeader: hit.isSubCategoryHeader, - isTextOrSubcategoryNonEmpty, - category, - subcategory, - title: displayTitle, - text, - url - } - }) - } - - static formatURL (hit) { - const { url, anchor } = hit - if (url) { - const containsAnchor = url.indexOf('#') !== -1 - if (containsAnchor) return url - else if (anchor) return `${hit.url}#${hit.anchor}` - return url - } else if (anchor) return `#${hit.anchor}` - /* eslint-disable */ - console.warn('no anchor nor url for : ', JSON.stringify(hit)) - /* eslint-enable */ - return null - } - - static getEmptyTemplate () { - return (args) => Hogan.compile(templates.empty).render(args) - } - - static getSuggestionTemplate (isSimpleLayout) { - const stringTemplate = isSimpleLayout - ? templates.suggestionSimple - : templates.suggestion - const template = Hogan.compile(stringTemplate) - return (suggestion) => template.render(suggestion) - } - - handleSelected (input, event, suggestion, datasetNumber, context = {}) { - // Do nothing if click on the suggestion, as it's already a
, the - // browser will take care of it. This allow Ctrl-Clicking on results and not - // having the main window being redirected as well - if (context.selectionMethod === 'click') { - return - } - - input.setVal('') - window.location.assign(suggestion.url) - } - - handleShown (input) { - const middleOfInput = input.offset().left + input.width() / 2 - let middleOfWindow = $(document).width() / 2 - - if (isNaN(middleOfWindow)) { - middleOfWindow = 900 - } - - const alignClass = - middleOfInput - middleOfWindow >= 0 - ? 'algolia-autocomplete-right' - : 'algolia-autocomplete-left' - const otherAlignClass = - middleOfInput - middleOfWindow < 0 - ? 'algolia-autocomplete-right' - : 'algolia-autocomplete-left' - const autocompleteWrapper = $('.algolia-autocomplete') - if (!autocompleteWrapper.hasClass(alignClass)) { - autocompleteWrapper.addClass(alignClass) - } - - if (autocompleteWrapper.hasClass(otherAlignClass)) { - autocompleteWrapper.removeClass(otherAlignClass) - } - } -} - -export default DocSearch diff --git a/website/src/theme/SearchBar/lib/lunar-search.js b/website/src/theme/SearchBar/lib/lunar-search.js deleted file mode 100644 index d8a5e4398..000000000 --- a/website/src/theme/SearchBar/lib/lunar-search.js +++ /dev/null @@ -1,165 +0,0 @@ -import lunr from '@generated/lunr.client' -lunr.tokenizer.separator = /[\s\-/]+/ - -class LunrSearchAdapter { - constructor (searchDocs, searchIndex) { - this.searchDocs = searchDocs - this.lunrIndex = lunr.Index.load(searchIndex) - } - - getLunrResult (input) { - return this.lunrIndex.query(function (query) { - const tokens = lunr.tokenizer(input) - query.term(tokens, { - boost: 10 - }) - query.term(tokens, { - wildcard: lunr.Query.wildcard.TRAILING - }) - }) - } - - getHit (doc, formattedTitle, formattedContent) { - return { - hierarchy: { - lvl0: doc.pageTitle || doc.title, - lvl1: doc.type === 0 ? null : doc.title - }, - url: doc.url, - _snippetResult: formattedContent - ? { - content: { - value: formattedContent, - matchLevel: 'full' - } - } - : null, - _highlightResult: { - hierarchy: { - lvl0: { - value: doc.type === 0 ? formattedTitle || doc.title : doc.pageTitle - }, - lvl1: - doc.type === 0 - ? null - : { - value: formattedTitle || doc.title - } - } - } - } - } - - getTitleHit (doc, position, length) { - const start = position[0] - const end = position[0] + length - const formattedTitle = - doc.title.substring(0, start) + - '' + - doc.title.substring(start, end) + - '' + - doc.title.substring(end, doc.title.length) - return this.getHit(doc, formattedTitle) - } - - getKeywordHit (doc, position, length) { - const start = position[0] - const end = position[0] + length - const formattedTitle = - doc.title + - '
Keywords: ' + - doc.keywords.substring(0, start) + - '' + - doc.keywords.substring(start, end) + - '' + - doc.keywords.substring(end, doc.keywords.length) + - '' - return this.getHit(doc, formattedTitle) - } - - getContentHit (doc, position) { - const start = position[0] - const end = position[0] + position[1] - let previewStart = start - let previewEnd = end - let ellipsesBefore = true - let ellipsesAfter = true - for (let k = 0; k < 3; k++) { - const nextSpace = doc.content.lastIndexOf(' ', previewStart - 2) - const nextDot = doc.content.lastIndexOf('.', previewStart - 2) - if (nextDot > 0 && nextDot > nextSpace) { - previewStart = nextDot + 1 - ellipsesBefore = false - break - } - if (nextSpace < 0) { - previewStart = 0 - ellipsesBefore = false - break - } - previewStart = nextSpace + 1 - } - for (let k = 0; k < 10; k++) { - const nextSpace = doc.content.indexOf(' ', previewEnd + 1) - const nextDot = doc.content.indexOf('.', previewEnd + 1) - if (nextDot > 0 && nextDot < nextSpace) { - previewEnd = nextDot - ellipsesAfter = false - break - } - if (nextSpace < 0) { - previewEnd = doc.content.length - ellipsesAfter = false - break - } - previewEnd = nextSpace - } - let preview = doc.content.substring(previewStart, start) - if (ellipsesBefore) { - preview = '... ' + preview - } - preview += - '' + - doc.content.substring(start, end) + - '' - preview += doc.content.substring(end, previewEnd) - if (ellipsesAfter) { - preview += ' ...' - } - return this.getHit(doc, null, preview) - } - - search (input) { - return new Promise((resolve, reject) => { - const results = this.getLunrResult(input) - const hits = [] - results.length > 5 && (results.length = 5) - this.titleHitsRes = [] - this.contentHitsRes = [] - results.forEach((result) => { - const doc = this.searchDocs[result.ref] - const { metadata } = result.matchData - for (const i in metadata) { - if (metadata[i].title) { - if (!this.titleHitsRes.includes(result.ref)) { - const position = metadata[i].title.position[0] - hits.push(this.getTitleHit(doc, position, input.length)) - this.titleHitsRes.push(result.ref) - } - } else if (metadata[i].content) { - const position = metadata[i].content.position[0] - hits.push(this.getContentHit(doc, position)) - } else if (metadata[i].keywords) { - const position = metadata[i].keywords.position[0] - hits.push(this.getKeywordHit(doc, position, input.length)) - this.titleHitsRes.push(result.ref) - } - } - }) - hits.length > 5 && (hits.length = 5) - resolve(hits) - }) - } -} - -export default LunrSearchAdapter diff --git a/website/src/theme/SearchBar/lib/templates.js b/website/src/theme/SearchBar/lib/templates.js deleted file mode 100644 index 84acbe33f..000000000 --- a/website/src/theme/SearchBar/lib/templates.js +++ /dev/null @@ -1,114 +0,0 @@ -const prefix = 'algolia-docsearch' -const suggestionPrefix = `${prefix}-suggestion` -const footerPrefix = `${prefix}-footer` - -/* eslint-disable max-len */ - -const templates = { - suggestion: ` -
-
- {{{category}}} -
-
-
- {{{subcategory}}} -
- {{#isTextOrSubcategoryNonEmpty}} -
-
{{{subcategory}}}
-
{{{title}}}
- {{#text}}
{{{text}}}
{{/text}} -
- {{/isTextOrSubcategoryNonEmpty}} -
-
- `, - suggestionSimple: ` -
-
- {{^isLvl0}} - {{{category}}} - {{^isLvl1}} - {{^isLvl1EmptyOrDuplicate}} - - {{{subcategory}}} - - {{/isLvl1EmptyOrDuplicate}} - {{/isLvl1}} - {{/isLvl0}} -
- {{#isLvl2}} - {{{title}}} - {{/isLvl2}} - {{#isLvl1}} - {{{subcategory}}} - {{/isLvl1}} - {{#isLvl0}} - {{{category}}} - {{/isLvl0}} -
-
-
- {{#text}} -
-
{{{text}}}
-
- {{/text}} -
-
- `, - footer: ` -
-
- `, - empty: ` -
-
-
-
-
- No results found for query "{{query}}" -
-
-
-
-
- `, - searchBox: ` - - - - ` -} - -export default templates diff --git a/website/src/theme/SearchBar/lib/utils.js b/website/src/theme/SearchBar/lib/utils.js deleted file mode 100644 index bfc483977..000000000 --- a/website/src/theme/SearchBar/lib/utils.js +++ /dev/null @@ -1,269 +0,0 @@ -import $ from 'autocomplete.js/zepto' - -const utils = { - /* - * Move the content of an object key one level higher. - * eg. - * { - * name: 'My name', - * hierarchy: { - * lvl0: 'Foo', - * lvl1: 'Bar' - * } - * } - * Will be converted to - * { - * name: 'My name', - * lvl0: 'Foo', - * lvl1: 'Bar' - * } - * @param {Object} object Main object - * @param {String} property Main object key to move up - * @return {Object} - * @throws Error when key is not an attribute of Object or is not an object itself - */ - mergeKeyWithParent (object, property) { - if (object[property] === undefined) { - return object - } - if (typeof object[property] !== 'object') { - return object - } - const newObject = $.extend({}, object, object[property]) - delete newObject[property] - return newObject - }, - /* - * Group all objects of a collection by the value of the specified attribute - * If the attribute is a string, use the lowercase form. - * - * eg. - * groupBy([ - * {name: 'Tim', category: 'dev'}, - * {name: 'Vincent', category: 'dev'}, - * {name: 'Ben', category: 'sales'}, - * {name: 'Jeremy', category: 'sales'}, - * {name: 'AlexS', category: 'dev'}, - * {name: 'AlexK', category: 'sales'} - * ], 'category'); - * => - * { - * 'devs': [ - * {name: 'Tim', category: 'dev'}, - * {name: 'Vincent', category: 'dev'}, - * {name: 'AlexS', category: 'dev'} - * ], - * 'sales': [ - * {name: 'Ben', category: 'sales'}, - * {name: 'Jeremy', category: 'sales'}, - * {name: 'AlexK', category: 'sales'} - * ] - * } - * @param {array} collection Array of objects to group - * @param {String} property The attribute on which apply the grouping - * @return {array} - * @throws Error when one of the element does not have the specified property - */ - groupBy (collection, property) { - const newCollection = {} - $.each(collection, (index, item) => { - if (item[property] === undefined) { - throw new Error(`[groupBy]: Object has no key ${property}`) - } - let key = item[property] - if (typeof key === 'string') { - key = key.toLowerCase() - } - // fix #171 the given data type of docsearch hits might be conflict with the properties of the native Object, - // such as the constructor, so we need to do this check. - if (!Object.prototype.hasOwnProperty.call(newCollection, key)) { - newCollection[key] = [] - } - newCollection[key].push(item) - }) - return newCollection - }, - /* - * Return an array of all the values of the specified object - * eg. - * values({ - * foo: 42, - * bar: true, - * baz: 'yep' - * }) - * => - * [42, true, yep] - * @param {object} object Object to extract values from - * @return {array} - */ - values (object) { - return Object.keys(object).map((key) => object[key]) - }, - /* - * Flattens an array - * eg. - * flatten([1, 2, [3, 4], [5, 6]]) - * => - * [1, 2, 3, 4, 5, 6] - * @param {array} array Array to flatten - * @return {array} - */ - flatten (array) { - const results = [] - array.forEach((value) => { - if (!Array.isArray(value)) { - results.push(value) - return - } - value.forEach((subvalue) => { - results.push(subvalue) - }) - }) - return results - }, - /* - * Flatten all values of an object into an array, marking each first element of - * each group with a specific flag - * eg. - * flattenAndFlagFirst({ - * 'devs': [ - * {name: 'Tim', category: 'dev'}, - * {name: 'Vincent', category: 'dev'}, - * {name: 'AlexS', category: 'dev'} - * ], - * 'sales': [ - * {name: 'Ben', category: 'sales'}, - * {name: 'Jeremy', category: 'sales'}, - * {name: 'AlexK', category: 'sales'} - * ] - * , 'isTop'); - * => - * [ - * {name: 'Tim', category: 'dev', isTop: true}, - * {name: 'Vincent', category: 'dev', isTop: false}, - * {name: 'AlexS', category: 'dev', isTop: false}, - * {name: 'Ben', category: 'sales', isTop: true}, - * {name: 'Jeremy', category: 'sales', isTop: false}, - * {name: 'AlexK', category: 'sales', isTop: false} - * ] - * @param {object} object Object to flatten - * @param {string} flag Flag to set to true on first element of each group - * @return {array} - */ - flattenAndFlagFirst (object, flag) { - const values = this.values(object).map((collection) => - collection.map((item, index) => { - // eslint-disable-next-line no-param-reassign - item[flag] = index === 0 - return item - }) - ) - return this.flatten(values) - }, - /* - * Removes all empty strings, null, false and undefined elements array - * eg. - * compact([42, false, null, undefined, '', [], 'foo']); - * => - * [42, [], 'foo'] - * @param {array} array Array to compact - * @return {array} - */ - compact (array) { - const results = [] - array.forEach((value) => { - if (!value) { - return - } - results.push(value) - }) - return results - }, - /* - * Returns the highlighted value of the specified key in the specified object. - * If no highlighted value is available, will return the key value directly - * eg. - * getHighlightedValue({ - * _highlightResult: { - * text: { - * value: 'foo' - * } - * }, - * text: 'foo' - * }, 'text'); - * => - * 'foo' - * @param {object} object Hit object returned by the Algolia API - * @param {string} property Object key to look for - * @return {string} - **/ - getHighlightedValue (object, property) { - if ( - object._highlightResult && - object._highlightResult.hierarchy_camel && - object._highlightResult.hierarchy_camel[property] && - object._highlightResult.hierarchy_camel[property].matchLevel && - object._highlightResult.hierarchy_camel[property].matchLevel !== 'none' && - object._highlightResult.hierarchy_camel[property].value - ) { - return object._highlightResult.hierarchy_camel[property].value - } - if ( - object._highlightResult && - object._highlightResult[property] && - object._highlightResult[property].value - ) { - return object._highlightResult[property].value - } - return object[property] - }, - /* - * Returns the snippeted value of the specified key in the specified object. - * If no highlighted value is available, will return the key value directly. - * Will add starting and ending ellipsis (…) if we detect that a sentence is - * incomplete - * eg. - * getSnippetedValue({ - * _snippetResult: { - * text: { - * value: 'This is an unfinished sentence' - * } - * }, - * text: 'This is an unfinished sentence' - * }, 'text'); - * => - * 'This is an unfinished sentence…' - * @param {object} object Hit object returned by the Algolia API - * @param {string} property Object key to look for - * @return {string} - **/ - getSnippetedValue (object, property) { - if ( - !object._snippetResult || - !object._snippetResult[property] || - !object._snippetResult[property].value - ) { - return object[property] - } - let snippet = object._snippetResult[property].value - - if (snippet[0] !== snippet[0].toUpperCase()) { - snippet = `…${snippet}` - } - if (['.', '!', '?'].indexOf(snippet[snippet.length - 1]) === -1) { - snippet = `${snippet}…` - } - return snippet - }, - /* - * Deep clone an object. - * Note: This will not clone functions and dates - * @param {object} object Object to clone - * @return {object} - */ - deepClone (object) { - return JSON.parse(JSON.stringify(object)) - } -} - -export default utils diff --git a/website/src/theme/SearchBar/lunar-search.js b/website/src/theme/SearchBar/lunar-search.js deleted file mode 100644 index 5edee3ca0..000000000 --- a/website/src/theme/SearchBar/lunar-search.js +++ /dev/null @@ -1,166 +0,0 @@ -import lunr from '@generated/lunr.client' -lunr.tokenizer.separator = /[\s\-/]+/ - -class LunrSearchAdapter { - constructor (searchDocs, searchIndex, baseUrl = '/') { - this.searchDocs = searchDocs - this.lunrIndex = lunr.Index.load(searchIndex) - this.baseUrl = baseUrl - } - - getLunrResult (input) { - return this.lunrIndex.query(function (query) { - const tokens = lunr.tokenizer(input) - query.term(tokens, { - boost: 10 - }) - query.term(tokens, { - wildcard: lunr.Query.wildcard.TRAILING - }) - }) - } - - getHit (doc, formattedTitle, formattedContent) { - return { - hierarchy: { - lvl0: doc.pageTitle || doc.title, - lvl1: doc.type === 0 ? null : doc.title - }, - url: doc.url, - _snippetResult: formattedContent - ? { - content: { - value: formattedContent, - matchLevel: 'full' - } - } - : null, - _highlightResult: { - hierarchy: { - lvl0: { - value: doc.type === 0 ? formattedTitle || doc.title : doc.pageTitle - }, - lvl1: - doc.type === 0 - ? null - : { - value: formattedTitle || doc.title - } - } - } - } - } - - getTitleHit (doc, position, length) { - const start = position[0] - const end = position[0] + length - const formattedTitle = - doc.title.substring(0, start) + - '' + - doc.title.substring(start, end) + - '' + - doc.title.substring(end, doc.title.length) - return this.getHit(doc, formattedTitle) - } - - getKeywordHit (doc, position, length) { - const start = position[0] - const end = position[0] + length - const formattedTitle = - doc.title + - '
Keywords: ' + - doc.keywords.substring(0, start) + - '' + - doc.keywords.substring(start, end) + - '' + - doc.keywords.substring(end, doc.keywords.length) + - '' - return this.getHit(doc, formattedTitle) - } - - getContentHit (doc, position) { - const start = position[0] - const end = position[0] + position[1] - let previewStart = start - let previewEnd = end - let ellipsesBefore = true - let ellipsesAfter = true - for (let k = 0; k < 3; k++) { - const nextSpace = doc.content.lastIndexOf(' ', previewStart - 2) - const nextDot = doc.content.lastIndexOf('.', previewStart - 2) - if (nextDot > 0 && nextDot > nextSpace) { - previewStart = nextDot + 1 - ellipsesBefore = false - break - } - if (nextSpace < 0) { - previewStart = 0 - ellipsesBefore = false - break - } - previewStart = nextSpace + 1 - } - for (let k = 0; k < 10; k++) { - const nextSpace = doc.content.indexOf(' ', previewEnd + 1) - const nextDot = doc.content.indexOf('.', previewEnd + 1) - if (nextDot > 0 && nextDot < nextSpace) { - previewEnd = nextDot - ellipsesAfter = false - break - } - if (nextSpace < 0) { - previewEnd = doc.content.length - ellipsesAfter = false - break - } - previewEnd = nextSpace - } - let preview = doc.content.substring(previewStart, start) - if (ellipsesBefore) { - preview = '... ' + preview - } - preview += - '' + - doc.content.substring(start, end) + - '' - preview += doc.content.substring(end, previewEnd) - if (ellipsesAfter) { - preview += ' ...' - } - return this.getHit(doc, null, preview) - } - - search (input) { - return new Promise((resolve, reject) => { - const results = this.getLunrResult(input) - const hits = [] - results.length > 5 && (results.length = 5) - this.titleHitsRes = [] - this.contentHitsRes = [] - results.forEach((result) => { - const doc = this.searchDocs[result.ref] - const { metadata } = result.matchData - for (const i in metadata) { - if (metadata[i].title) { - if (!this.titleHitsRes.includes(result.ref)) { - const position = metadata[i].title.position[0] - hits.push(this.getTitleHit(doc, position, input.length)) - this.titleHitsRes.push(result.ref) - } - } else if (metadata[i].content) { - const position = metadata[i].content.position[0] - hits.push(this.getContentHit(doc, position)) - } else if (metadata[i].keywords) { - const position = metadata[i].keywords.position[0] - hits.push(this.getKeywordHit(doc, position, input.length)) - this.titleHitsRes.push(result.ref) - } - } - }) - hits.length > 5 && (hits.length = 5) - resolve(hits) - }) - } -} - -export default LunrSearchAdapter diff --git a/website/src/theme/SearchBar/styles.css b/website/src/theme/SearchBar/styles.css deleted file mode 100644 index 8dc3b0a12..000000000 --- a/website/src/theme/SearchBar/styles.css +++ /dev/null @@ -1,33 +0,0 @@ -.search-icon { - background-image: var(--ifm-navbar-search-input-icon); - height: auto; - width: 24px; - cursor: pointer; - padding: 8px; - line-height: 32px; - background-repeat: no-repeat; - background-position: center; - display: none; -} - -.search-icon-hidden { - visibility: hidden; -} - -@media (max-width: 360px) { - .search-bar { - width: 0 !important; - background: none !important; - padding: 0 !important; - transition: none !important; - } - - .search-bar-expanded { - width: 9rem !important; - } - - .search-icon { - display: inline; - vertical-align: sub; - } -} diff --git a/website/src/theme/SearchBar/templates.js b/website/src/theme/SearchBar/templates.js deleted file mode 100644 index e18d3fc65..000000000 --- a/website/src/theme/SearchBar/templates.js +++ /dev/null @@ -1,112 +0,0 @@ -const prefix = 'algolia-docsearch' -const suggestionPrefix = `${prefix}-suggestion` -const footerPrefix = `${prefix}-footer` - -const templates = { - suggestion: ` - -
- {{{category}}} -
-
-
- {{{subcategory}}} -
- {{#isTextOrSubcategoryNonEmpty}} -
-
{{{subcategory}}}
-
{{{title}}}
- {{#text}}
{{{text}}}
{{/text}} -
- {{/isTextOrSubcategoryNonEmpty}} -
-
- `, - suggestionSimple: ` -
-
- {{^isLvl0}} - {{{category}}} - {{^isLvl1}} - {{^isLvl1EmptyOrDuplicate}} - - {{{subcategory}}} - - {{/isLvl1EmptyOrDuplicate}} - {{/isLvl1}} - {{/isLvl0}} -
- {{#isLvl2}} - {{{title}}} - {{/isLvl2}} - {{#isLvl1}} - {{{subcategory}}} - {{/isLvl1}} - {{#isLvl0}} - {{{category}}} - {{/isLvl0}} -
-
-
- {{#text}} -
-
{{{text}}}
-
- {{/text}} -
-
- `, - footer: ` -
-
- `, - empty: ` -
-
-
-
-
- No results found for query "{{query}}" -
-
-
-
-
- `, - searchBox: ` - - - - ` -} - -export default templates diff --git a/website/src/theme/SearchBar/utils.js b/website/src/theme/SearchBar/utils.js deleted file mode 100644 index bfc483977..000000000 --- a/website/src/theme/SearchBar/utils.js +++ /dev/null @@ -1,269 +0,0 @@ -import $ from 'autocomplete.js/zepto' - -const utils = { - /* - * Move the content of an object key one level higher. - * eg. - * { - * name: 'My name', - * hierarchy: { - * lvl0: 'Foo', - * lvl1: 'Bar' - * } - * } - * Will be converted to - * { - * name: 'My name', - * lvl0: 'Foo', - * lvl1: 'Bar' - * } - * @param {Object} object Main object - * @param {String} property Main object key to move up - * @return {Object} - * @throws Error when key is not an attribute of Object or is not an object itself - */ - mergeKeyWithParent (object, property) { - if (object[property] === undefined) { - return object - } - if (typeof object[property] !== 'object') { - return object - } - const newObject = $.extend({}, object, object[property]) - delete newObject[property] - return newObject - }, - /* - * Group all objects of a collection by the value of the specified attribute - * If the attribute is a string, use the lowercase form. - * - * eg. - * groupBy([ - * {name: 'Tim', category: 'dev'}, - * {name: 'Vincent', category: 'dev'}, - * {name: 'Ben', category: 'sales'}, - * {name: 'Jeremy', category: 'sales'}, - * {name: 'AlexS', category: 'dev'}, - * {name: 'AlexK', category: 'sales'} - * ], 'category'); - * => - * { - * 'devs': [ - * {name: 'Tim', category: 'dev'}, - * {name: 'Vincent', category: 'dev'}, - * {name: 'AlexS', category: 'dev'} - * ], - * 'sales': [ - * {name: 'Ben', category: 'sales'}, - * {name: 'Jeremy', category: 'sales'}, - * {name: 'AlexK', category: 'sales'} - * ] - * } - * @param {array} collection Array of objects to group - * @param {String} property The attribute on which apply the grouping - * @return {array} - * @throws Error when one of the element does not have the specified property - */ - groupBy (collection, property) { - const newCollection = {} - $.each(collection, (index, item) => { - if (item[property] === undefined) { - throw new Error(`[groupBy]: Object has no key ${property}`) - } - let key = item[property] - if (typeof key === 'string') { - key = key.toLowerCase() - } - // fix #171 the given data type of docsearch hits might be conflict with the properties of the native Object, - // such as the constructor, so we need to do this check. - if (!Object.prototype.hasOwnProperty.call(newCollection, key)) { - newCollection[key] = [] - } - newCollection[key].push(item) - }) - return newCollection - }, - /* - * Return an array of all the values of the specified object - * eg. - * values({ - * foo: 42, - * bar: true, - * baz: 'yep' - * }) - * => - * [42, true, yep] - * @param {object} object Object to extract values from - * @return {array} - */ - values (object) { - return Object.keys(object).map((key) => object[key]) - }, - /* - * Flattens an array - * eg. - * flatten([1, 2, [3, 4], [5, 6]]) - * => - * [1, 2, 3, 4, 5, 6] - * @param {array} array Array to flatten - * @return {array} - */ - flatten (array) { - const results = [] - array.forEach((value) => { - if (!Array.isArray(value)) { - results.push(value) - return - } - value.forEach((subvalue) => { - results.push(subvalue) - }) - }) - return results - }, - /* - * Flatten all values of an object into an array, marking each first element of - * each group with a specific flag - * eg. - * flattenAndFlagFirst({ - * 'devs': [ - * {name: 'Tim', category: 'dev'}, - * {name: 'Vincent', category: 'dev'}, - * {name: 'AlexS', category: 'dev'} - * ], - * 'sales': [ - * {name: 'Ben', category: 'sales'}, - * {name: 'Jeremy', category: 'sales'}, - * {name: 'AlexK', category: 'sales'} - * ] - * , 'isTop'); - * => - * [ - * {name: 'Tim', category: 'dev', isTop: true}, - * {name: 'Vincent', category: 'dev', isTop: false}, - * {name: 'AlexS', category: 'dev', isTop: false}, - * {name: 'Ben', category: 'sales', isTop: true}, - * {name: 'Jeremy', category: 'sales', isTop: false}, - * {name: 'AlexK', category: 'sales', isTop: false} - * ] - * @param {object} object Object to flatten - * @param {string} flag Flag to set to true on first element of each group - * @return {array} - */ - flattenAndFlagFirst (object, flag) { - const values = this.values(object).map((collection) => - collection.map((item, index) => { - // eslint-disable-next-line no-param-reassign - item[flag] = index === 0 - return item - }) - ) - return this.flatten(values) - }, - /* - * Removes all empty strings, null, false and undefined elements array - * eg. - * compact([42, false, null, undefined, '', [], 'foo']); - * => - * [42, [], 'foo'] - * @param {array} array Array to compact - * @return {array} - */ - compact (array) { - const results = [] - array.forEach((value) => { - if (!value) { - return - } - results.push(value) - }) - return results - }, - /* - * Returns the highlighted value of the specified key in the specified object. - * If no highlighted value is available, will return the key value directly - * eg. - * getHighlightedValue({ - * _highlightResult: { - * text: { - * value: 'foo' - * } - * }, - * text: 'foo' - * }, 'text'); - * => - * 'foo' - * @param {object} object Hit object returned by the Algolia API - * @param {string} property Object key to look for - * @return {string} - **/ - getHighlightedValue (object, property) { - if ( - object._highlightResult && - object._highlightResult.hierarchy_camel && - object._highlightResult.hierarchy_camel[property] && - object._highlightResult.hierarchy_camel[property].matchLevel && - object._highlightResult.hierarchy_camel[property].matchLevel !== 'none' && - object._highlightResult.hierarchy_camel[property].value - ) { - return object._highlightResult.hierarchy_camel[property].value - } - if ( - object._highlightResult && - object._highlightResult[property] && - object._highlightResult[property].value - ) { - return object._highlightResult[property].value - } - return object[property] - }, - /* - * Returns the snippeted value of the specified key in the specified object. - * If no highlighted value is available, will return the key value directly. - * Will add starting and ending ellipsis (…) if we detect that a sentence is - * incomplete - * eg. - * getSnippetedValue({ - * _snippetResult: { - * text: { - * value: 'This is an unfinished sentence' - * } - * }, - * text: 'This is an unfinished sentence' - * }, 'text'); - * => - * 'This is an unfinished sentence…' - * @param {object} object Hit object returned by the Algolia API - * @param {string} property Object key to look for - * @return {string} - **/ - getSnippetedValue (object, property) { - if ( - !object._snippetResult || - !object._snippetResult[property] || - !object._snippetResult[property].value - ) { - return object[property] - } - let snippet = object._snippetResult[property].value - - if (snippet[0] !== snippet[0].toUpperCase()) { - snippet = `…${snippet}` - } - if (['.', '!', '?'].indexOf(snippet[snippet.length - 1]) === -1) { - snippet = `${snippet}…` - } - return snippet - }, - /* - * Deep clone an object. - * Note: This will not clone functions and dates - * @param {object} object Object to clone - * @return {object} - */ - deepClone (object) { - return JSON.parse(JSON.stringify(object)) - } -} - -export default utils