From acb810ccbf96c9b766eed14c26222c3149b7430e Mon Sep 17 00:00:00 2001 From: Emmanuel Keller Date: Fri, 20 Oct 2023 09:26:00 +0100 Subject: [PATCH] Implements search based on SurrealDB (#24) Co-authored-by: Micha de Vries --- docusaurus.config.js | 2 +- package.json | 9 +- pnpm-lock.yaml | 403 ++++++++++++++------------ src/theme/SearchBar/index.tsx | 91 ++++++ src/theme/SearchBar/search.ts | 105 +++++++ src/theme/SearchBar/styles.module.css | 105 +++++++ 6 files changed, 527 insertions(+), 188 deletions(-) create mode 100644 src/theme/SearchBar/index.tsx create mode 100644 src/theme/SearchBar/search.ts create mode 100644 src/theme/SearchBar/styles.module.css diff --git a/docusaurus.config.js b/docusaurus.config.js index 32bdcc2b4..baaa74e82 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -12,7 +12,7 @@ const config = { // GitHub pages deployment config. // If you aren't using GitHub pages, you don't need these. organizationName: 'SurrealDB', // Usually your GitHub org/user name. - projectName: 'SurrealDB docs', // Usually your repo name. + projectName: 'docs.surrealdb.com', // Usually your repo name. // TODO We need to fix these issues, just not doing it now :) onBrokenLinks: 'warn', onBrokenMarkdownLinks: 'warn', diff --git a/package.json b/package.json index b32d7260f..41ec6f451 100644 --- a/package.json +++ b/package.json @@ -16,13 +16,14 @@ }, "dependencies": { "@babel/plugin-transform-react-jsx": "^7.22.15", - "@docusaurus/core": "2.4.1", - "@docusaurus/plugin-content-docs": "^2.4.1", - "@docusaurus/preset-classic": "2.4.1", - "@docusaurus/theme-common": "^2.4.1", + "@docusaurus/core": "^2.4.3", + "@docusaurus/plugin-content-docs": "^2.4.3", + "@docusaurus/preset-classic": "^2.4.3", + "@docusaurus/theme-common": "^2.4.3", "@mdx-js/react": "^1.6.22", "clsx": "^1.2.1", "docusaurus-plugin-sass": "^0.2.5", + "lodash": "^4.17.21", "prism-react-renderer": "^1.3.5", "react": "^17.0.2", "react-dom": "^17.0.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7e7c967b5..e67214327 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,17 +9,17 @@ dependencies: specifier: ^7.22.15 version: 7.22.15(@babel/core@7.22.11) '@docusaurus/core': - specifier: 2.4.1 - version: 2.4.1(@docusaurus/types@2.4.1)(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4) + specifier: ^2.4.3 + version: 2.4.3(@docusaurus/types@2.4.3)(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4) '@docusaurus/plugin-content-docs': - specifier: ^2.4.1 - version: 2.4.1(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4) + specifier: ^2.4.3 + version: 2.4.3(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4) '@docusaurus/preset-classic': - specifier: 2.4.1 - version: 2.4.1(@algolia/client-search@4.19.1)(@types/react@18.2.21)(react-dom@17.0.2)(react@17.0.2)(search-insights@2.7.0)(typescript@4.7.4) + specifier: ^2.4.3 + version: 2.4.3(@algolia/client-search@4.19.1)(@types/react@18.2.21)(react-dom@17.0.2)(react@17.0.2)(search-insights@2.7.0)(typescript@4.7.4) '@docusaurus/theme-common': - specifier: ^2.4.1 - version: 2.4.1(@docusaurus/types@2.4.1)(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4) + specifier: ^2.4.3 + version: 2.4.3(@docusaurus/types@2.4.3)(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4) '@mdx-js/react': specifier: ^1.6.22 version: 1.6.22(react@17.0.2) @@ -28,7 +28,10 @@ dependencies: version: 1.2.1 docusaurus-plugin-sass: specifier: ^0.2.5 - version: 0.2.5(@docusaurus/core@2.4.1)(sass@1.68.0)(webpack@5.88.2) + version: 0.2.5(@docusaurus/core@2.4.3)(sass@1.68.0)(webpack@5.88.2) + lodash: + specifier: ^4.17.21 + version: 4.17.21 prism-react-renderer: specifier: ^1.3.5 version: 1.3.5(react@17.0.2) @@ -257,7 +260,7 @@ packages: '@babel/parser': 7.22.13 '@babel/template': 7.22.5 '@babel/traverse': 7.22.11 - '@babel/types': 7.22.11 + '@babel/types': 7.23.0 convert-source-map: 1.9.0 debug: 4.3.4 gensync: 1.0.0-beta.2 @@ -283,7 +286,7 @@ packages: '@babel/parser': 7.22.13 '@babel/template': 7.22.5 '@babel/traverse': 7.22.11 - '@babel/types': 7.22.11 + '@babel/types': 7.23.0 convert-source-map: 1.9.0 debug: 4.3.4 gensync: 1.0.0-beta.2 @@ -297,7 +300,7 @@ packages: resolution: {integrity: sha512-79KIf7YiWjjdZ81JnLujDRApWtl7BxTqWD88+FFdQEIOG8LJ0etDOM7CXuIgGJa55sGOwZVwuEsaLEm0PJ5/+A==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.11 + '@babel/types': 7.23.0 '@jridgewell/gen-mapping': 0.3.3 '@jridgewell/trace-mapping': 0.3.19 jsesc: 2.5.2 @@ -314,7 +317,7 @@ packages: resolution: {integrity: sha512-Av0qubwDQxC56DoUReVDeLfMEjYYSN1nZrTUrWkXd7hpU73ymRANkbuDm3yni9npkn+RXy9nNbEJZEzXr7xrfQ==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.11 + '@babel/types': 7.23.0 dev: false /@babel/helper-compilation-targets@7.22.10: @@ -383,21 +386,21 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/template': 7.22.5 - '@babel/types': 7.22.11 + '@babel/types': 7.23.0 dev: false /@babel/helper-hoist-variables@7.22.5: resolution: {integrity: sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.11 + '@babel/types': 7.23.0 dev: false /@babel/helper-member-expression-to-functions@7.22.5: resolution: {integrity: sha512-aBiH1NKMG0H2cGZqspNvsaBe6wNGjbJjuLy29aU+eDZjSbbN53BaxlpB02xm9v34pLTZ1nIQPFYn2qMZoa5BQQ==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.11 + '@babel/types': 7.23.0 dev: false /@babel/helper-module-imports@7.22.15: @@ -411,7 +414,7 @@ packages: resolution: {integrity: sha512-8Dl6+HD/cKifutF5qGd/8ZJi84QeAKh+CEe1sBzz8UayBBGg1dAIJrdHOcOM5b2MpzWL2yuotJTtGjETq0qjXg==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.11 + '@babel/types': 7.23.0 dev: false /@babel/helper-module-transforms@7.22.9(@babel/core@7.12.9): @@ -422,10 +425,10 @@ packages: dependencies: '@babel/core': 7.12.9 '@babel/helper-environment-visitor': 7.22.5 - '@babel/helper-module-imports': 7.22.5 + '@babel/helper-module-imports': 7.22.15 '@babel/helper-simple-access': 7.22.5 '@babel/helper-split-export-declaration': 7.22.6 - '@babel/helper-validator-identifier': 7.22.5 + '@babel/helper-validator-identifier': 7.22.20 dev: false /@babel/helper-module-transforms@7.22.9(@babel/core@7.22.11): @@ -436,17 +439,17 @@ packages: dependencies: '@babel/core': 7.22.11 '@babel/helper-environment-visitor': 7.22.5 - '@babel/helper-module-imports': 7.22.5 + '@babel/helper-module-imports': 7.22.15 '@babel/helper-simple-access': 7.22.5 '@babel/helper-split-export-declaration': 7.22.6 - '@babel/helper-validator-identifier': 7.22.5 + '@babel/helper-validator-identifier': 7.22.20 dev: false /@babel/helper-optimise-call-expression@7.22.5: resolution: {integrity: sha512-HBwaojN0xFRx4yIvpwGqxiV2tUfl7401jlok564NgB9EHS1y6QT17FmKWm4ztqjeVdXLuC4fSvHc5ePpQjoTbw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.11 + '@babel/types': 7.23.0 dev: false /@babel/helper-plugin-utils@7.10.4: @@ -486,21 +489,21 @@ packages: resolution: {integrity: sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.11 + '@babel/types': 7.23.0 dev: false /@babel/helper-skip-transparent-expression-wrappers@7.22.5: resolution: {integrity: sha512-tK14r66JZKiC43p8Ki33yLBVJKlQDFoA8GYN67lWCDCqoL6EMMSuM9b+Iff2jHaM/RRFYl7K+iiru7hbRqNx8Q==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.11 + '@babel/types': 7.23.0 dev: false /@babel/helper-split-export-declaration@7.22.6: resolution: {integrity: sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.11 + '@babel/types': 7.23.0 dev: false /@babel/helper-string-parser@7.22.5: @@ -513,11 +516,6 @@ packages: engines: {node: '>=6.9.0'} dev: false - /@babel/helper-validator-identifier@7.22.5: - resolution: {integrity: sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==} - engines: {node: '>=6.9.0'} - dev: false - /@babel/helper-validator-option@7.22.5: resolution: {integrity: sha512-R3oB6xlIVKUnxNUxbmgq7pKjxpru24zlimpE8WK47fACIlM0II/Hm1RS8IaOI7NgCr6LNS+jl5l75m20npAziw==} engines: {node: '>=6.9.0'} @@ -529,7 +527,7 @@ packages: dependencies: '@babel/helper-function-name': 7.22.5 '@babel/template': 7.22.5 - '@babel/types': 7.22.11 + '@babel/types': 7.23.0 dev: false /@babel/helpers@7.22.11: @@ -538,7 +536,7 @@ packages: dependencies: '@babel/template': 7.22.5 '@babel/traverse': 7.22.11 - '@babel/types': 7.22.11 + '@babel/types': 7.23.0 transitivePeerDependencies: - supports-color dev: false @@ -547,7 +545,7 @@ packages: resolution: {integrity: sha512-C/BaXcnnvBCmHTpz/VGZ8jgtE2aYlW4hxDhseJAWZb7gqGM/qtCK6iZUb0TyKFf7BOUsBH7Q7fkRsDRhg1XklQ==} engines: {node: '>=6.9.0'} dependencies: - '@babel/helper-validator-identifier': 7.22.5 + '@babel/helper-validator-identifier': 7.22.20 chalk: 2.4.2 js-tokens: 4.0.0 dev: false @@ -557,7 +555,7 @@ packages: engines: {node: '>=6.0.0'} hasBin: true dependencies: - '@babel/types': 7.22.11 + '@babel/types': 7.23.0 dev: false /@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.22.5(@babel/core@7.22.11): @@ -877,7 +875,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.22.11 - '@babel/helper-module-imports': 7.22.5 + '@babel/helper-module-imports': 7.22.15 '@babel/helper-plugin-utils': 7.22.5 '@babel/helper-remap-async-to-generator': 7.22.9(@babel/core@7.22.11) dev: false @@ -1115,7 +1113,7 @@ packages: '@babel/helper-hoist-variables': 7.22.5 '@babel/helper-module-transforms': 7.22.9(@babel/core@7.22.11) '@babel/helper-plugin-utils': 7.22.5 - '@babel/helper-validator-identifier': 7.22.5 + '@babel/helper-validator-identifier': 7.22.20 dev: false /@babel/plugin-transform-modules-umd@7.22.5(@babel/core@7.22.11): @@ -1357,7 +1355,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.22.11 - '@babel/helper-module-imports': 7.22.5 + '@babel/helper-module-imports': 7.22.15 '@babel/helper-plugin-utils': 7.22.5 babel-plugin-polyfill-corejs2: 0.4.5(@babel/core@7.22.11) babel-plugin-polyfill-corejs3: 0.8.3(@babel/core@7.22.11) @@ -1555,7 +1553,7 @@ packages: '@babel/plugin-transform-unicode-regex': 7.22.5(@babel/core@7.22.11) '@babel/plugin-transform-unicode-sets-regex': 7.22.5(@babel/core@7.22.11) '@babel/preset-modules': 0.1.6-no-external-plugins(@babel/core@7.22.11) - '@babel/types': 7.22.11 + '@babel/types': 7.23.0 babel-plugin-polyfill-corejs2: 0.4.5(@babel/core@7.22.11) babel-plugin-polyfill-corejs3: 0.8.3(@babel/core@7.22.11) babel-plugin-polyfill-regenerator: 0.5.2(@babel/core@7.22.11) @@ -1572,7 +1570,7 @@ packages: dependencies: '@babel/core': 7.22.11 '@babel/helper-plugin-utils': 7.22.5 - '@babel/types': 7.22.11 + '@babel/types': 7.23.0 esutils: 2.0.3 dev: false @@ -1629,7 +1627,7 @@ packages: dependencies: '@babel/code-frame': 7.22.13 '@babel/parser': 7.22.13 - '@babel/types': 7.22.11 + '@babel/types': 7.23.0 dev: false /@babel/traverse@7.22.11: @@ -1643,22 +1641,13 @@ packages: '@babel/helper-hoist-variables': 7.22.5 '@babel/helper-split-export-declaration': 7.22.6 '@babel/parser': 7.22.13 - '@babel/types': 7.22.11 + '@babel/types': 7.23.0 debug: 4.3.4 globals: 11.12.0 transitivePeerDependencies: - supports-color dev: false - /@babel/types@7.22.11: - resolution: {integrity: sha512-siazHiGuZRz9aB9NpHy9GOs9xiQPKnMzgdr493iI1M67vRXpnEq8ZOOKzezC5q7zwuQ6sDhdSp4SD9ixKSqKZg==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/helper-string-parser': 7.22.5 - '@babel/helper-validator-identifier': 7.22.5 - to-fast-properties: 2.0.0 - dev: false - /@babel/types@7.23.0: resolution: {integrity: sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==} engines: {node: '>=6.9.0'} @@ -1713,8 +1702,8 @@ packages: - '@algolia/client-search' dev: false - /@docusaurus/core@2.4.1(@docusaurus/types@2.4.1)(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4): - resolution: {integrity: sha512-SNsY7PshK3Ri7vtsLXVeAJGS50nJN3RgF836zkyUfAD01Fq+sAk5EwWgLw+nnm5KVNGDu7PRR2kRGDsWvqpo0g==} + /@docusaurus/core@2.4.3(@docusaurus/types@2.4.3)(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4): + resolution: {integrity: sha512-dWH5P7cgeNSIg9ufReX6gaCl/TmrGKD38Orbwuz05WPhAQtFXHd5B8Qym1TiXfvUNvwoYKkAJOJuGe8ou0Z7PA==} engines: {node: '>=16.14'} hasBin: true peerDependencies: @@ -1731,13 +1720,13 @@ packages: '@babel/runtime': 7.22.11 '@babel/runtime-corejs3': 7.22.11 '@babel/traverse': 7.22.11 - '@docusaurus/cssnano-preset': 2.4.1 - '@docusaurus/logger': 2.4.1 - '@docusaurus/mdx-loader': 2.4.1(@docusaurus/types@2.4.1)(react-dom@17.0.2)(react@17.0.2) + '@docusaurus/cssnano-preset': 2.4.3 + '@docusaurus/logger': 2.4.3 + '@docusaurus/mdx-loader': 2.4.3(@docusaurus/types@2.4.3)(react-dom@17.0.2)(react@17.0.2) '@docusaurus/react-loadable': 5.5.2(react@17.0.2) - '@docusaurus/utils': 2.4.1(@docusaurus/types@2.4.1) - '@docusaurus/utils-common': 2.4.1(@docusaurus/types@2.4.1) - '@docusaurus/utils-validation': 2.4.1(@docusaurus/types@2.4.1) + '@docusaurus/utils': 2.4.3(@docusaurus/types@2.4.3) + '@docusaurus/utils-common': 2.4.3(@docusaurus/types@2.4.3) + '@docusaurus/utils-validation': 2.4.3(@docusaurus/types@2.4.3) '@slorber/static-site-generator-webpack-plugin': 4.0.7 '@svgr/webpack': 6.5.1 autoprefixer: 10.4.15(postcss@8.4.29) @@ -1813,8 +1802,8 @@ packages: - webpack-cli dev: false - /@docusaurus/cssnano-preset@2.4.1: - resolution: {integrity: sha512-ka+vqXwtcW1NbXxWsh6yA1Ckii1klY9E53cJ4O9J09nkMBgrNX3iEFED1fWdv8wf4mJjvGi5RLZ2p9hJNjsLyQ==} + /@docusaurus/cssnano-preset@2.4.3: + resolution: {integrity: sha512-ZvGSRCi7z9wLnZrXNPG6DmVPHdKGd8dIn9pYbEOFiYihfv4uDR3UtxogmKf+rT8ZlKFf5Lqne8E8nt08zNM8CA==} engines: {node: '>=16.14'} dependencies: cssnano-preset-advanced: 5.3.10(postcss@8.4.29) @@ -1823,16 +1812,16 @@ packages: tslib: 2.6.2 dev: false - /@docusaurus/logger@2.4.1: - resolution: {integrity: sha512-5h5ysIIWYIDHyTVd8BjheZmQZmEgWDR54aQ1BX9pjFfpyzFo5puKXKYrYJXbjEHGyVhEzmB9UXwbxGfaZhOjcg==} + /@docusaurus/logger@2.4.3: + resolution: {integrity: sha512-Zxws7r3yLufk9xM1zq9ged0YHs65mlRmtsobnFkdZTxWXdTYlWWLWdKyNKAsVC+D7zg+pv2fGbyabdOnyZOM3w==} engines: {node: '>=16.14'} dependencies: chalk: 4.1.2 tslib: 2.6.2 dev: false - /@docusaurus/mdx-loader@2.4.1(@docusaurus/types@2.4.1)(react-dom@17.0.2)(react@17.0.2): - resolution: {integrity: sha512-4KhUhEavteIAmbBj7LVFnrVYDiU51H5YWW1zY6SmBSte/YLhDutztLTBE0PQl1Grux1jzUJeaSvAzHpTn6JJDQ==} + /@docusaurus/mdx-loader@2.4.3(@docusaurus/types@2.4.3)(react-dom@17.0.2)(react@17.0.2): + resolution: {integrity: sha512-b1+fDnWtl3GiqkL0BRjYtc94FZrcDDBV1j8446+4tptB9BAOlePwG2p/pK6vGvfL53lkOsszXMghr2g67M0vCw==} engines: {node: '>=16.14'} peerDependencies: react: ^16.8.4 || ^17.0.0 @@ -1840,8 +1829,8 @@ packages: dependencies: '@babel/parser': 7.22.13 '@babel/traverse': 7.22.11 - '@docusaurus/logger': 2.4.1 - '@docusaurus/utils': 2.4.1(@docusaurus/types@2.4.1) + '@docusaurus/logger': 2.4.3 + '@docusaurus/utils': 2.4.3(@docusaurus/types@2.4.3) '@mdx-js/mdx': 1.6.22 escape-html: 1.0.3 file-loader: 6.2.0(webpack@5.88.2) @@ -1887,21 +1876,45 @@ packages: - esbuild - uglify-js - webpack-cli + dev: true + + /@docusaurus/module-type-aliases@2.4.3(react-dom@17.0.2)(react@17.0.2): + resolution: {integrity: sha512-cwkBkt1UCiduuvEAo7XZY01dJfRn7UR/75mBgOdb1hKknhrabJZ8YH+7savd/y9kLExPyrhe0QwdS9GuzsRRIA==} + peerDependencies: + react: '*' + react-dom: '*' + dependencies: + '@docusaurus/react-loadable': 5.5.2(react@17.0.2) + '@docusaurus/types': 2.4.3(react-dom@17.0.2)(react@17.0.2) + '@types/history': 4.7.11 + '@types/react': 18.2.21 + '@types/react-router-config': 5.0.7 + '@types/react-router-dom': 5.3.3 + react: 17.0.2 + react-dom: 17.0.2(react@17.0.2) + react-helmet-async: 1.3.0(react-dom@17.0.2)(react@17.0.2) + react-loadable: /@docusaurus/react-loadable@5.5.2(react@17.0.2) + transitivePeerDependencies: + - '@swc/core' + - esbuild + - uglify-js + - webpack-cli + dev: false - /@docusaurus/plugin-content-blog@2.4.1(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4): - resolution: {integrity: sha512-E2i7Knz5YIbE1XELI6RlTnZnGgS52cUO4BlCiCUCvQHbR+s1xeIWz4C6BtaVnlug0Ccz7nFSksfwDpVlkujg5Q==} + /@docusaurus/plugin-content-blog@2.4.3(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4): + resolution: {integrity: sha512-PVhypqaA0t98zVDpOeTqWUTvRqCEjJubtfFUQ7zJNYdbYTbS/E/ytq6zbLVsN/dImvemtO/5JQgjLxsh8XLo8Q==} engines: {node: '>=16.14'} peerDependencies: react: ^16.8.4 || ^17.0.0 react-dom: ^16.8.4 || ^17.0.0 dependencies: - '@docusaurus/core': 2.4.1(@docusaurus/types@2.4.1)(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4) - '@docusaurus/logger': 2.4.1 - '@docusaurus/mdx-loader': 2.4.1(@docusaurus/types@2.4.1)(react-dom@17.0.2)(react@17.0.2) - '@docusaurus/types': 2.4.1(react-dom@17.0.2)(react@17.0.2) - '@docusaurus/utils': 2.4.1(@docusaurus/types@2.4.1) - '@docusaurus/utils-common': 2.4.1(@docusaurus/types@2.4.1) - '@docusaurus/utils-validation': 2.4.1(@docusaurus/types@2.4.1) + '@docusaurus/core': 2.4.3(@docusaurus/types@2.4.3)(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4) + '@docusaurus/logger': 2.4.3 + '@docusaurus/mdx-loader': 2.4.3(@docusaurus/types@2.4.3)(react-dom@17.0.2)(react@17.0.2) + '@docusaurus/types': 2.4.3(react-dom@17.0.2)(react@17.0.2) + '@docusaurus/utils': 2.4.3(@docusaurus/types@2.4.3) + '@docusaurus/utils-common': 2.4.3(@docusaurus/types@2.4.3) + '@docusaurus/utils-validation': 2.4.3(@docusaurus/types@2.4.3) cheerio: 1.0.0-rc.12 feed: 4.2.2 fs-extra: 10.1.0 @@ -1931,20 +1944,20 @@ packages: - webpack-cli dev: false - /@docusaurus/plugin-content-docs@2.4.1(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4): - resolution: {integrity: sha512-Lo7lSIcpswa2Kv4HEeUcGYqaasMUQNpjTXpV0N8G6jXgZaQurqp7E8NGYeGbDXnb48czmHWbzDL4S3+BbK0VzA==} + /@docusaurus/plugin-content-docs@2.4.3(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4): + resolution: {integrity: sha512-N7Po2LSH6UejQhzTCsvuX5NOzlC+HiXOVvofnEPj0WhMu1etpLEXE6a4aTxrtg95lQ5kf0xUIdjX9sh3d3G76A==} engines: {node: '>=16.14'} peerDependencies: react: ^16.8.4 || ^17.0.0 react-dom: ^16.8.4 || ^17.0.0 dependencies: - '@docusaurus/core': 2.4.1(@docusaurus/types@2.4.1)(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4) - '@docusaurus/logger': 2.4.1 - '@docusaurus/mdx-loader': 2.4.1(@docusaurus/types@2.4.1)(react-dom@17.0.2)(react@17.0.2) - '@docusaurus/module-type-aliases': 2.4.1(react-dom@17.0.2)(react@17.0.2) - '@docusaurus/types': 2.4.1(react-dom@17.0.2)(react@17.0.2) - '@docusaurus/utils': 2.4.1(@docusaurus/types@2.4.1) - '@docusaurus/utils-validation': 2.4.1(@docusaurus/types@2.4.1) + '@docusaurus/core': 2.4.3(@docusaurus/types@2.4.3)(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4) + '@docusaurus/logger': 2.4.3 + '@docusaurus/mdx-loader': 2.4.3(@docusaurus/types@2.4.3)(react-dom@17.0.2)(react@17.0.2) + '@docusaurus/module-type-aliases': 2.4.3(react-dom@17.0.2)(react@17.0.2) + '@docusaurus/types': 2.4.3(react-dom@17.0.2)(react@17.0.2) + '@docusaurus/utils': 2.4.3(@docusaurus/types@2.4.3) + '@docusaurus/utils-validation': 2.4.3(@docusaurus/types@2.4.3) '@types/react-router-config': 5.0.7 combine-promises: 1.2.0 fs-extra: 10.1.0 @@ -1974,18 +1987,18 @@ packages: - webpack-cli dev: false - /@docusaurus/plugin-content-pages@2.4.1(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4): - resolution: {integrity: sha512-/UjuH/76KLaUlL+o1OvyORynv6FURzjurSjvn2lbWTFc4tpYY2qLYTlKpTCBVPhlLUQsfyFnshEJDLmPneq2oA==} + /@docusaurus/plugin-content-pages@2.4.3(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4): + resolution: {integrity: sha512-txtDVz7y3zGk67q0HjG0gRttVPodkHqE0bpJ+7dOaTH40CQFLSh7+aBeGnPOTl+oCPG+hxkim4SndqPqXjQ8Bg==} engines: {node: '>=16.14'} peerDependencies: react: ^16.8.4 || ^17.0.0 react-dom: ^16.8.4 || ^17.0.0 dependencies: - '@docusaurus/core': 2.4.1(@docusaurus/types@2.4.1)(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4) - '@docusaurus/mdx-loader': 2.4.1(@docusaurus/types@2.4.1)(react-dom@17.0.2)(react@17.0.2) - '@docusaurus/types': 2.4.1(react-dom@17.0.2)(react@17.0.2) - '@docusaurus/utils': 2.4.1(@docusaurus/types@2.4.1) - '@docusaurus/utils-validation': 2.4.1(@docusaurus/types@2.4.1) + '@docusaurus/core': 2.4.3(@docusaurus/types@2.4.3)(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4) + '@docusaurus/mdx-loader': 2.4.3(@docusaurus/types@2.4.3)(react-dom@17.0.2)(react@17.0.2) + '@docusaurus/types': 2.4.3(react-dom@17.0.2)(react@17.0.2) + '@docusaurus/utils': 2.4.3(@docusaurus/types@2.4.3) + '@docusaurus/utils-validation': 2.4.3(@docusaurus/types@2.4.3) fs-extra: 10.1.0 react: 17.0.2 react-dom: 17.0.2(react@17.0.2) @@ -2009,16 +2022,16 @@ packages: - webpack-cli dev: false - /@docusaurus/plugin-debug@2.4.1(@types/react@18.2.21)(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4): - resolution: {integrity: sha512-7Yu9UPzRShlrH/G8btOpR0e6INFZr0EegWplMjOqelIwAcx3PKyR8mgPTxGTxcqiYj6hxSCRN0D8R7YrzImwNA==} + /@docusaurus/plugin-debug@2.4.3(@types/react@18.2.21)(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4): + resolution: {integrity: sha512-LkUbuq3zCmINlFb+gAd4ZvYr+bPAzMC0hwND4F7V9bZ852dCX8YoWyovVUBKq4er1XsOwSQaHmNGtObtn8Av8Q==} engines: {node: '>=16.14'} peerDependencies: react: ^16.8.4 || ^17.0.0 react-dom: ^16.8.4 || ^17.0.0 dependencies: - '@docusaurus/core': 2.4.1(@docusaurus/types@2.4.1)(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4) - '@docusaurus/types': 2.4.1(react-dom@17.0.2)(react@17.0.2) - '@docusaurus/utils': 2.4.1(@docusaurus/types@2.4.1) + '@docusaurus/core': 2.4.3(@docusaurus/types@2.4.3)(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4) + '@docusaurus/types': 2.4.3(react-dom@17.0.2)(react@17.0.2) + '@docusaurus/utils': 2.4.3(@docusaurus/types@2.4.3) fs-extra: 10.1.0 react: 17.0.2 react-dom: 17.0.2(react@17.0.2) @@ -2044,16 +2057,16 @@ packages: - webpack-cli dev: false - /@docusaurus/plugin-google-analytics@2.4.1(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4): - resolution: {integrity: sha512-dyZJdJiCoL+rcfnm0RPkLt/o732HvLiEwmtoNzOoz9MSZz117UH2J6U2vUDtzUzwtFLIf32KkeyzisbwUCgcaQ==} + /@docusaurus/plugin-google-analytics@2.4.3(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4): + resolution: {integrity: sha512-KzBV3k8lDkWOhg/oYGxlK5o9bOwX7KpPc/FTWoB+SfKhlHfhq7qcQdMi1elAaVEIop8tgK6gD1E58Q+XC6otSQ==} engines: {node: '>=16.14'} peerDependencies: react: ^16.8.4 || ^17.0.0 react-dom: ^16.8.4 || ^17.0.0 dependencies: - '@docusaurus/core': 2.4.1(@docusaurus/types@2.4.1)(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4) - '@docusaurus/types': 2.4.1(react-dom@17.0.2)(react@17.0.2) - '@docusaurus/utils-validation': 2.4.1(@docusaurus/types@2.4.1) + '@docusaurus/core': 2.4.3(@docusaurus/types@2.4.3)(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4) + '@docusaurus/types': 2.4.3(react-dom@17.0.2)(react@17.0.2) + '@docusaurus/utils-validation': 2.4.3(@docusaurus/types@2.4.3) react: 17.0.2 react-dom: 17.0.2(react@17.0.2) tslib: 2.6.2 @@ -2075,16 +2088,16 @@ packages: - webpack-cli dev: false - /@docusaurus/plugin-google-gtag@2.4.1(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4): - resolution: {integrity: sha512-mKIefK+2kGTQBYvloNEKtDmnRD7bxHLsBcxgnbt4oZwzi2nxCGjPX6+9SQO2KCN5HZbNrYmGo5GJfMgoRvy6uA==} + /@docusaurus/plugin-google-gtag@2.4.3(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4): + resolution: {integrity: sha512-5FMg0rT7sDy4i9AGsvJC71MQrqQZwgLNdDetLEGDHLfSHLvJhQbTCUGbGXknUgWXQJckcV/AILYeJy+HhxeIFA==} engines: {node: '>=16.14'} peerDependencies: react: ^16.8.4 || ^17.0.0 react-dom: ^16.8.4 || ^17.0.0 dependencies: - '@docusaurus/core': 2.4.1(@docusaurus/types@2.4.1)(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4) - '@docusaurus/types': 2.4.1(react-dom@17.0.2)(react@17.0.2) - '@docusaurus/utils-validation': 2.4.1(@docusaurus/types@2.4.1) + '@docusaurus/core': 2.4.3(@docusaurus/types@2.4.3)(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4) + '@docusaurus/types': 2.4.3(react-dom@17.0.2)(react@17.0.2) + '@docusaurus/utils-validation': 2.4.3(@docusaurus/types@2.4.3) react: 17.0.2 react-dom: 17.0.2(react@17.0.2) tslib: 2.6.2 @@ -2106,16 +2119,16 @@ packages: - webpack-cli dev: false - /@docusaurus/plugin-google-tag-manager@2.4.1(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4): - resolution: {integrity: sha512-Zg4Ii9CMOLfpeV2nG74lVTWNtisFaH9QNtEw48R5QE1KIwDBdTVaiSA18G1EujZjrzJJzXN79VhINSbOJO/r3g==} + /@docusaurus/plugin-google-tag-manager@2.4.3(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4): + resolution: {integrity: sha512-1jTzp71yDGuQiX9Bi0pVp3alArV0LSnHXempvQTxwCGAEzUWWaBg4d8pocAlTpbP9aULQQqhgzrs8hgTRPOM0A==} engines: {node: '>=16.14'} peerDependencies: react: ^16.8.4 || ^17.0.0 react-dom: ^16.8.4 || ^17.0.0 dependencies: - '@docusaurus/core': 2.4.1(@docusaurus/types@2.4.1)(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4) - '@docusaurus/types': 2.4.1(react-dom@17.0.2)(react@17.0.2) - '@docusaurus/utils-validation': 2.4.1(@docusaurus/types@2.4.1) + '@docusaurus/core': 2.4.3(@docusaurus/types@2.4.3)(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4) + '@docusaurus/types': 2.4.3(react-dom@17.0.2)(react@17.0.2) + '@docusaurus/utils-validation': 2.4.3(@docusaurus/types@2.4.3) react: 17.0.2 react-dom: 17.0.2(react@17.0.2) tslib: 2.6.2 @@ -2137,19 +2150,19 @@ packages: - webpack-cli dev: false - /@docusaurus/plugin-sitemap@2.4.1(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4): - resolution: {integrity: sha512-lZx+ijt/+atQ3FVE8FOHV/+X3kuok688OydDXrqKRJyXBJZKgGjA2Qa8RjQ4f27V2woaXhtnyrdPop/+OjVMRg==} + /@docusaurus/plugin-sitemap@2.4.3(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4): + resolution: {integrity: sha512-LRQYrK1oH1rNfr4YvWBmRzTL0LN9UAPxBbghgeFRBm5yloF6P+zv1tm2pe2hQTX/QP5bSKdnajCvfnScgKXMZQ==} engines: {node: '>=16.14'} peerDependencies: react: ^16.8.4 || ^17.0.0 react-dom: ^16.8.4 || ^17.0.0 dependencies: - '@docusaurus/core': 2.4.1(@docusaurus/types@2.4.1)(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4) - '@docusaurus/logger': 2.4.1 - '@docusaurus/types': 2.4.1(react-dom@17.0.2)(react@17.0.2) - '@docusaurus/utils': 2.4.1(@docusaurus/types@2.4.1) - '@docusaurus/utils-common': 2.4.1(@docusaurus/types@2.4.1) - '@docusaurus/utils-validation': 2.4.1(@docusaurus/types@2.4.1) + '@docusaurus/core': 2.4.3(@docusaurus/types@2.4.3)(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4) + '@docusaurus/logger': 2.4.3 + '@docusaurus/types': 2.4.3(react-dom@17.0.2)(react@17.0.2) + '@docusaurus/utils': 2.4.3(@docusaurus/types@2.4.3) + '@docusaurus/utils-common': 2.4.3(@docusaurus/types@2.4.3) + '@docusaurus/utils-validation': 2.4.3(@docusaurus/types@2.4.3) fs-extra: 10.1.0 react: 17.0.2 react-dom: 17.0.2(react@17.0.2) @@ -2173,26 +2186,26 @@ packages: - webpack-cli dev: false - /@docusaurus/preset-classic@2.4.1(@algolia/client-search@4.19.1)(@types/react@18.2.21)(react-dom@17.0.2)(react@17.0.2)(search-insights@2.7.0)(typescript@4.7.4): - resolution: {integrity: sha512-P4//+I4zDqQJ+UDgoFrjIFaQ1MeS9UD1cvxVQaI6O7iBmiHQm0MGROP1TbE7HlxlDPXFJjZUK3x3cAoK63smGQ==} + /@docusaurus/preset-classic@2.4.3(@algolia/client-search@4.19.1)(@types/react@18.2.21)(react-dom@17.0.2)(react@17.0.2)(search-insights@2.7.0)(typescript@4.7.4): + resolution: {integrity: sha512-tRyMliepY11Ym6hB1rAFSNGwQDpmszvWYJvlK1E+md4SW8i6ylNHtpZjaYFff9Mdk3i/Pg8ItQq9P0daOJAvQw==} engines: {node: '>=16.14'} peerDependencies: react: ^16.8.4 || ^17.0.0 react-dom: ^16.8.4 || ^17.0.0 dependencies: - '@docusaurus/core': 2.4.1(@docusaurus/types@2.4.1)(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4) - '@docusaurus/plugin-content-blog': 2.4.1(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4) - '@docusaurus/plugin-content-docs': 2.4.1(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4) - '@docusaurus/plugin-content-pages': 2.4.1(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4) - '@docusaurus/plugin-debug': 2.4.1(@types/react@18.2.21)(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4) - '@docusaurus/plugin-google-analytics': 2.4.1(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4) - '@docusaurus/plugin-google-gtag': 2.4.1(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4) - '@docusaurus/plugin-google-tag-manager': 2.4.1(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4) - '@docusaurus/plugin-sitemap': 2.4.1(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4) - '@docusaurus/theme-classic': 2.4.1(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4) - '@docusaurus/theme-common': 2.4.1(@docusaurus/types@2.4.1)(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4) - '@docusaurus/theme-search-algolia': 2.4.1(@algolia/client-search@4.19.1)(@docusaurus/types@2.4.1)(@types/react@18.2.21)(react-dom@17.0.2)(react@17.0.2)(search-insights@2.7.0)(typescript@4.7.4) - '@docusaurus/types': 2.4.1(react-dom@17.0.2)(react@17.0.2) + '@docusaurus/core': 2.4.3(@docusaurus/types@2.4.3)(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4) + '@docusaurus/plugin-content-blog': 2.4.3(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4) + '@docusaurus/plugin-content-docs': 2.4.3(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4) + '@docusaurus/plugin-content-pages': 2.4.3(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4) + '@docusaurus/plugin-debug': 2.4.3(@types/react@18.2.21)(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4) + '@docusaurus/plugin-google-analytics': 2.4.3(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4) + '@docusaurus/plugin-google-gtag': 2.4.3(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4) + '@docusaurus/plugin-google-tag-manager': 2.4.3(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4) + '@docusaurus/plugin-sitemap': 2.4.3(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4) + '@docusaurus/theme-classic': 2.4.3(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4) + '@docusaurus/theme-common': 2.4.3(@docusaurus/types@2.4.3)(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4) + '@docusaurus/theme-search-algolia': 2.4.3(@algolia/client-search@4.19.1)(@docusaurus/types@2.4.3)(@types/react@18.2.21)(react-dom@17.0.2)(react@17.0.2)(search-insights@2.7.0)(typescript@4.7.4) + '@docusaurus/types': 2.4.3(react-dom@17.0.2)(react@17.0.2) react: 17.0.2 react-dom: 17.0.2(react@17.0.2) transitivePeerDependencies: @@ -2226,25 +2239,25 @@ packages: prop-types: 15.8.1 react: 17.0.2 - /@docusaurus/theme-classic@2.4.1(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4): - resolution: {integrity: sha512-Rz0wKUa+LTW1PLXmwnf8mn85EBzaGSt6qamqtmnh9Hflkc+EqiYMhtUJeLdV+wsgYq4aG0ANc+bpUDpsUhdnwg==} + /@docusaurus/theme-classic@2.4.3(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4): + resolution: {integrity: sha512-QKRAJPSGPfDY2yCiPMIVyr+MqwZCIV2lxNzqbyUW0YkrlmdzzP3WuQJPMGLCjWgQp/5c9kpWMvMxjhpZx1R32Q==} engines: {node: '>=16.14'} peerDependencies: react: ^16.8.4 || ^17.0.0 react-dom: ^16.8.4 || ^17.0.0 dependencies: - '@docusaurus/core': 2.4.1(@docusaurus/types@2.4.1)(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4) - '@docusaurus/mdx-loader': 2.4.1(@docusaurus/types@2.4.1)(react-dom@17.0.2)(react@17.0.2) - '@docusaurus/module-type-aliases': 2.4.1(react-dom@17.0.2)(react@17.0.2) - '@docusaurus/plugin-content-blog': 2.4.1(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4) - '@docusaurus/plugin-content-docs': 2.4.1(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4) - '@docusaurus/plugin-content-pages': 2.4.1(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4) - '@docusaurus/theme-common': 2.4.1(@docusaurus/types@2.4.1)(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4) - '@docusaurus/theme-translations': 2.4.1 - '@docusaurus/types': 2.4.1(react-dom@17.0.2)(react@17.0.2) - '@docusaurus/utils': 2.4.1(@docusaurus/types@2.4.1) - '@docusaurus/utils-common': 2.4.1(@docusaurus/types@2.4.1) - '@docusaurus/utils-validation': 2.4.1(@docusaurus/types@2.4.1) + '@docusaurus/core': 2.4.3(@docusaurus/types@2.4.3)(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4) + '@docusaurus/mdx-loader': 2.4.3(@docusaurus/types@2.4.3)(react-dom@17.0.2)(react@17.0.2) + '@docusaurus/module-type-aliases': 2.4.3(react-dom@17.0.2)(react@17.0.2) + '@docusaurus/plugin-content-blog': 2.4.3(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4) + '@docusaurus/plugin-content-docs': 2.4.3(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4) + '@docusaurus/plugin-content-pages': 2.4.3(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4) + '@docusaurus/theme-common': 2.4.3(@docusaurus/types@2.4.3)(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4) + '@docusaurus/theme-translations': 2.4.3 + '@docusaurus/types': 2.4.3(react-dom@17.0.2)(react@17.0.2) + '@docusaurus/utils': 2.4.3(@docusaurus/types@2.4.3) + '@docusaurus/utils-common': 2.4.3(@docusaurus/types@2.4.3) + '@docusaurus/utils-validation': 2.4.3(@docusaurus/types@2.4.3) '@mdx-js/react': 1.6.22(react@17.0.2) clsx: 1.2.1 copy-text-to-clipboard: 3.2.0 @@ -2278,20 +2291,20 @@ packages: - webpack-cli dev: false - /@docusaurus/theme-common@2.4.1(@docusaurus/types@2.4.1)(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4): - resolution: {integrity: sha512-G7Zau1W5rQTaFFB3x3soQoZpkgMbl/SYNG8PfMFIjKa3M3q8n0m/GRf5/H/e5BqOvt8c+ZWIXGCiz+kUCSHovA==} + /@docusaurus/theme-common@2.4.3(@docusaurus/types@2.4.3)(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4): + resolution: {integrity: sha512-7KaDJBXKBVGXw5WOVt84FtN8czGWhM0lbyWEZXGp8AFfL6sZQfRTluFp4QriR97qwzSyOfQb+nzcDZZU4tezUw==} engines: {node: '>=16.14'} peerDependencies: react: ^16.8.4 || ^17.0.0 react-dom: ^16.8.4 || ^17.0.0 dependencies: - '@docusaurus/mdx-loader': 2.4.1(@docusaurus/types@2.4.1)(react-dom@17.0.2)(react@17.0.2) - '@docusaurus/module-type-aliases': 2.4.1(react-dom@17.0.2)(react@17.0.2) - '@docusaurus/plugin-content-blog': 2.4.1(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4) - '@docusaurus/plugin-content-docs': 2.4.1(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4) - '@docusaurus/plugin-content-pages': 2.4.1(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4) - '@docusaurus/utils': 2.4.1(@docusaurus/types@2.4.1) - '@docusaurus/utils-common': 2.4.1(@docusaurus/types@2.4.1) + '@docusaurus/mdx-loader': 2.4.3(@docusaurus/types@2.4.3)(react-dom@17.0.2)(react@17.0.2) + '@docusaurus/module-type-aliases': 2.4.3(react-dom@17.0.2)(react@17.0.2) + '@docusaurus/plugin-content-blog': 2.4.3(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4) + '@docusaurus/plugin-content-docs': 2.4.3(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4) + '@docusaurus/plugin-content-pages': 2.4.3(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4) + '@docusaurus/utils': 2.4.3(@docusaurus/types@2.4.3) + '@docusaurus/utils-common': 2.4.3(@docusaurus/types@2.4.3) '@types/history': 4.7.11 '@types/react': 18.2.21 '@types/react-router-config': 5.0.7 @@ -2322,21 +2335,21 @@ packages: - webpack-cli dev: false - /@docusaurus/theme-search-algolia@2.4.1(@algolia/client-search@4.19.1)(@docusaurus/types@2.4.1)(@types/react@18.2.21)(react-dom@17.0.2)(react@17.0.2)(search-insights@2.7.0)(typescript@4.7.4): - resolution: {integrity: sha512-6BcqW2lnLhZCXuMAvPRezFs1DpmEKzXFKlYjruuas+Xy3AQeFzDJKTJFIm49N77WFCTyxff8d3E4Q9pi/+5McQ==} + /@docusaurus/theme-search-algolia@2.4.3(@algolia/client-search@4.19.1)(@docusaurus/types@2.4.3)(@types/react@18.2.21)(react-dom@17.0.2)(react@17.0.2)(search-insights@2.7.0)(typescript@4.7.4): + resolution: {integrity: sha512-jziq4f6YVUB5hZOB85ELATwnxBz/RmSLD3ksGQOLDPKVzat4pmI8tddNWtriPpxR04BNT+ZfpPUMFkNFetSW1Q==} engines: {node: '>=16.14'} peerDependencies: react: ^16.8.4 || ^17.0.0 react-dom: ^16.8.4 || ^17.0.0 dependencies: '@docsearch/react': 3.5.2(@algolia/client-search@4.19.1)(@types/react@18.2.21)(react-dom@17.0.2)(react@17.0.2)(search-insights@2.7.0) - '@docusaurus/core': 2.4.1(@docusaurus/types@2.4.1)(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4) - '@docusaurus/logger': 2.4.1 - '@docusaurus/plugin-content-docs': 2.4.1(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4) - '@docusaurus/theme-common': 2.4.1(@docusaurus/types@2.4.1)(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4) - '@docusaurus/theme-translations': 2.4.1 - '@docusaurus/utils': 2.4.1(@docusaurus/types@2.4.1) - '@docusaurus/utils-validation': 2.4.1(@docusaurus/types@2.4.1) + '@docusaurus/core': 2.4.3(@docusaurus/types@2.4.3)(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4) + '@docusaurus/logger': 2.4.3 + '@docusaurus/plugin-content-docs': 2.4.3(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4) + '@docusaurus/theme-common': 2.4.3(@docusaurus/types@2.4.3)(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4) + '@docusaurus/theme-translations': 2.4.3 + '@docusaurus/utils': 2.4.3(@docusaurus/types@2.4.3) + '@docusaurus/utils-validation': 2.4.3(@docusaurus/types@2.4.3) algoliasearch: 4.19.1 algoliasearch-helper: 3.14.0(algoliasearch@4.19.1) clsx: 1.2.1 @@ -2369,8 +2382,8 @@ packages: - webpack-cli dev: false - /@docusaurus/theme-translations@2.4.1: - resolution: {integrity: sha512-T1RAGP+f86CA1kfE8ejZ3T3pUU3XcyvrGMfC/zxCtc2BsnoexuNI9Vk2CmuKCb+Tacvhxjv5unhxXce0+NKyvA==} + /@docusaurus/theme-translations@2.4.3: + resolution: {integrity: sha512-H4D+lbZbjbKNS/Zw1Lel64PioUAIT3cLYYJLUf3KkuO/oc9e0QCVhIYVtUI2SfBCF2NNdlyhBDQEEMygsCedIg==} engines: {node: '>=16.14'} dependencies: fs-extra: 10.1.0 @@ -2398,9 +2411,33 @@ packages: - esbuild - uglify-js - webpack-cli + dev: true + + /@docusaurus/types@2.4.3(react-dom@17.0.2)(react@17.0.2): + resolution: {integrity: sha512-W6zNLGQqfrp/EoPD0bhb9n7OobP+RHpmvVzpA+Z/IuU3Q63njJM24hmT0GYboovWcDtFmnIJC9wcyx4RVPQscw==} + peerDependencies: + react: ^16.8.4 || ^17.0.0 + react-dom: ^16.8.4 || ^17.0.0 + dependencies: + '@types/history': 4.7.11 + '@types/react': 18.2.21 + commander: 5.1.0 + joi: 17.10.0 + react: 17.0.2 + react-dom: 17.0.2(react@17.0.2) + react-helmet-async: 1.3.0(react-dom@17.0.2)(react@17.0.2) + utility-types: 3.10.0 + webpack: 5.88.2 + webpack-merge: 5.9.0 + transitivePeerDependencies: + - '@swc/core' + - esbuild + - uglify-js + - webpack-cli + dev: false - /@docusaurus/utils-common@2.4.1(@docusaurus/types@2.4.1): - resolution: {integrity: sha512-bCVGdZU+z/qVcIiEQdyx0K13OC5mYwxhSuDUR95oFbKVuXYRrTVrwZIqQljuo1fyJvFTKHiL9L9skQOPokuFNQ==} + /@docusaurus/utils-common@2.4.3(@docusaurus/types@2.4.3): + resolution: {integrity: sha512-/jascp4GbLQCPVmcGkPzEQjNaAk3ADVfMtudk49Ggb+131B1WDD6HqlSmDf8MxGdy7Dja2gc+StHf01kiWoTDQ==} engines: {node: '>=16.14'} peerDependencies: '@docusaurus/types': '*' @@ -2408,16 +2445,16 @@ packages: '@docusaurus/types': optional: true dependencies: - '@docusaurus/types': 2.4.1(react-dom@17.0.2)(react@17.0.2) + '@docusaurus/types': 2.4.3(react-dom@17.0.2)(react@17.0.2) tslib: 2.6.2 dev: false - /@docusaurus/utils-validation@2.4.1(@docusaurus/types@2.4.1): - resolution: {integrity: sha512-unII3hlJlDwZ3w8U+pMO3Lx3RhI4YEbY3YNsQj4yzrkZzlpqZOLuAiZK2JyULnD+TKbceKU0WyWkQXtYbLNDFA==} + /@docusaurus/utils-validation@2.4.3(@docusaurus/types@2.4.3): + resolution: {integrity: sha512-G2+Vt3WR5E/9drAobP+hhZQMaswRwDlp6qOMi7o7ZypB+VO7N//DZWhZEwhcRGepMDJGQEwtPv7UxtYwPL9PBw==} engines: {node: '>=16.14'} dependencies: - '@docusaurus/logger': 2.4.1 - '@docusaurus/utils': 2.4.1(@docusaurus/types@2.4.1) + '@docusaurus/logger': 2.4.3 + '@docusaurus/utils': 2.4.3(@docusaurus/types@2.4.3) joi: 17.10.0 js-yaml: 4.1.0 tslib: 2.6.2 @@ -2430,8 +2467,8 @@ packages: - webpack-cli dev: false - /@docusaurus/utils@2.4.1(@docusaurus/types@2.4.1): - resolution: {integrity: sha512-1lvEZdAQhKNht9aPXPoh69eeKnV0/62ROhQeFKKxmzd0zkcuE/Oc5Gpnt00y/f5bIsmOsYMY7Pqfm/5rteT5GA==} + /@docusaurus/utils@2.4.3(@docusaurus/types@2.4.3): + resolution: {integrity: sha512-fKcXsjrD86Smxv8Pt0TBFqYieZZCPh4cbf9oszUq/AMhZn3ujwpKaVYZACPX8mmjtYx0JOgNx52CREBfiGQB4A==} engines: {node: '>=16.14'} peerDependencies: '@docusaurus/types': '*' @@ -2439,8 +2476,8 @@ packages: '@docusaurus/types': optional: true dependencies: - '@docusaurus/logger': 2.4.1 - '@docusaurus/types': 2.4.1(react-dom@17.0.2)(react@17.0.2) + '@docusaurus/logger': 2.4.3 + '@docusaurus/types': 2.4.3(react-dom@17.0.2)(react@17.0.2) '@svgr/webpack': 6.5.1 escape-string-regexp: 4.0.0 file-loader: 6.2.0(webpack@5.88.2) @@ -2744,7 +2781,7 @@ packages: resolution: {integrity: sha512-1hnUxxjd83EAxbL4a0JDJoD3Dao3hmjvyvyEV8PzWmLK3B9m9NPlW7GKjFyoWE8nM7HnXzPcmmSyOW8yOddSXw==} engines: {node: '>=10'} dependencies: - '@babel/types': 7.22.11 + '@babel/types': 7.23.0 entities: 4.5.0 dev: false @@ -3000,7 +3037,7 @@ packages: /@types/sax@1.2.4: resolution: {integrity: sha512-pSAff4IAxJjfAXUG6tFkO7dsSbTmf8CtUpfhhZ5VhkRpC4628tJhh3+V6H1E+/Gs9piSzYKT5yzHO5M4GG9jkw==} dependencies: - '@types/node': 17.0.45 + '@types/node': 20.5.7 dev: false /@types/scheduler@0.16.3: @@ -4344,13 +4381,13 @@ packages: '@leichtgewicht/ip-codec': 2.0.4 dev: false - /docusaurus-plugin-sass@0.2.5(@docusaurus/core@2.4.1)(sass@1.68.0)(webpack@5.88.2): + /docusaurus-plugin-sass@0.2.5(@docusaurus/core@2.4.3)(sass@1.68.0)(webpack@5.88.2): resolution: {integrity: sha512-Z+D0fLFUKcFpM+bqSUmqKIU+vO+YF1xoEQh5hoFreg2eMf722+siwXDD+sqtwU8E4MvVpuvsQfaHwODNlxJAEg==} peerDependencies: '@docusaurus/core': ^2.0.0-beta || ^3.0.0-alpha sass: ^1.30.0 dependencies: - '@docusaurus/core': 2.4.1(@docusaurus/types@2.4.1)(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4) + '@docusaurus/core': 2.4.3(@docusaurus/types@2.4.3)(react-dom@17.0.2)(react@17.0.2)(typescript@4.7.4) sass: 1.68.0 sass-loader: 10.4.1(sass@1.68.0)(webpack@5.88.2) transitivePeerDependencies: diff --git a/src/theme/SearchBar/index.tsx b/src/theme/SearchBar/index.tsx new file mode 100644 index 000000000..002350d16 --- /dev/null +++ b/src/theme/SearchBar/index.tsx @@ -0,0 +1,91 @@ +import React, { useCallback, useEffect, useRef, useState } from 'react'; +import styles from './styles.module.css'; +import { Doc, search } from './search'; + + +function SearchBar(): JSX.Element | null { + const dialogRef = useRef(); + const [keywords, setKeywords] = useState(''); + const [results, setResults] = useState([]); + + function debounce void>(func: F, delay: number): (...args: Parameters) => void { + let inDebounce: NodeJS.Timeout | undefined; + + return function(...args: Parameters) { + const context = this; + if (inDebounce) { + clearTimeout(inDebounce); + } + inDebounce = setTimeout(() => func.apply(context, args), delay); + }; + } + + const debouncedSearch = useCallback(debounce(async (value: string) => { + if (!value) { + setResults([]); + } else if (value !== keywords) { + try { + setResults(await search(value)); + } catch (err) { + console.error(err); + } + } + }, 150), [keywords]); + + const handleChange = (value: string) => { + setKeywords(value); + debouncedSearch(value); + }; + + useEffect(() => { + const handler = (e) => { + if (dialogRef.current && !dialogRef.current.contains(e.target)) { + dialogRef.current.close(); + } + }; + + document.addEventListener("mousedown", handler); + return () => document.removeEventListener("mousedown", handler); + }, [dialogRef]); + + return ( + <> + dialogRef.current.showModal()}> + + + + Search + + +
+ handleChange(e.target.value)} type="text" placeholder="Search.." value={keywords} /> +
+ {(results && results.length > 0) ? ( + + ) : ( +
+

{keywords == '' ? 'Enter a search term' : 'No results'}

+
+ )} +
+ + ); +} + +export default React.memo(SearchBar); \ No newline at end of file diff --git a/src/theme/SearchBar/search.ts b/src/theme/SearchBar/search.ts new file mode 100644 index 000000000..74c51f51f --- /dev/null +++ b/src/theme/SearchBar/search.ts @@ -0,0 +1,105 @@ +interface Offset { + e: number; + s: number; +} + +interface Chunks { + bold: boolean; + value: string; +} + +export interface Doc { + url: string; + title: string; + content: string[]; + offsets: Record; + chunks?: Chunks[]; +} + +export async function search(keywords: string): Promise { + const sql = templatedQuery(keywords); + const docs = await query(sql); + const processed = docs + .filter((match) => match.offsets) + .map(processResult); + return processed; +} + +const templatedQuery = (keywords: string) => { + const escaped = JSON.stringify(keywords); + return /* surrealql */ ` + SELECT + meta::id(id) as url, + title, + content, + search::offsets(6) AS offsets, + search::score(0) * 7 + search::score(1) * 6 + search::score(2) * 5 + search::score(3) * 4 + + search::score(4) * 3 + search::score(5) * 2 + search::score(6) AS score + FROM page + WHERE title @0@ ${escaped} + OR path @1@ ${escaped} + OR h1 @2@ ${escaped} + OR h2 @3@ ${escaped} + OR h3 @4@ ${escaped} + OR h4 @5@ ${escaped} + OR content @6@ ${escaped} + ORDER BY score DESC LIMIT 10; + `; +}; + +async function query(sql: string) { + const raw = await fetch('https://blog-db.surrealdb.com/sql', { + method: 'POST', + headers: { + Accept: 'application/json', + NS: 'doc', + DB: 'search', + }, + body: sql, + }); + const json = await raw.json(); + const result: Doc[] = json[0].result ?? [] + return result; +} + +function processResult(doc: Doc) { + // Will: + // - group offsets per line (see groupOffsets() function) + // - Sort descending based on the length of the offsets + // - pick the biggest offset + let maxOffsetSize = -1; + let linenumber = null; + let offsets = null; + + for (const [line, off] of Object.entries(doc.offsets)) { + const currentOffsetSize = findBiggestOffsets(off); + if (currentOffsetSize > maxOffsetSize) { + maxOffsetSize = currentOffsetSize; + linenumber = line; + offsets = off; + } + } + + // - Grab the actual content of the line. + // - Split up in chunks of what to highlight and what not. + const line = doc.content[Number(linenumber)]; + const chunks = offsets + .flatMap(({ s, e }, i, arr) => { + const next = arr[i + 1]; + return [ + i == 0 && { bold: false, value: line.slice(0, s) }, + { bold: true, value: line.slice(s, e) }, + { bold: false, value: line.slice(e, next?.s) }, + ]; + }) + .filter((a) => a); + + return { + ...doc, + chunks, + }; +} + +function findBiggestOffsets(offsets) { + return offsets.reduce((sum, { s, e }) => sum + (e - s), 0); +} diff --git a/src/theme/SearchBar/styles.module.css b/src/theme/SearchBar/styles.module.css new file mode 100644 index 000000000..9fd122c81 --- /dev/null +++ b/src/theme/SearchBar/styles.module.css @@ -0,0 +1,105 @@ +.link { + display: flex; + align-items: center; + gap: 3px; + cursor: pointer; +} + +.linkicon { + margin-bottom: 4px; +} + +.modal { + width: 90%; + height: 90%; + max-width: 1000px; + max-height: 800px; + border-radius: 10px; + border: none; + flex-direction: column; + padding: 0px; + overflow: hidden; + opacity: 0; + display: flex; + pointer-events: none; + top: 10vh; + transition: top .2s ease .075s, opacity .2s ease; +} + +.modal[open] { + opacity: 1; + pointer-events: all; + top: 0px; + transition: top .2s ease, opacity .3s ease; +} + +.modal::backdrop { + pointer-events: none; + opacity: 0.5; + background-color: #000; + display: block; +} + +.input { + font-size: 1.25em; + width: 100%; + padding: 25px 35px; + font-size: 1.5em; + font-weight: 600; + border: none; + border-top-left-radius: 10px; + border-top-right-radius: 10px; + outline-color: #ff009e; +} + +.results { + overflow-y: auto; +} + +.result { + padding: 1em 1em; + display: block; + transition: background .1s ease; +} + +.result:hover { + background: rgba(255, 255, 255, 0.075) +} + +.result:hover .title { + color: #ff009e; +} + +.title { + font-size: 1.5em; + text-transform: capitalize; + margin-bottom: 0; + color: white; + margin-bottom: 0.1em; + transition: color .1s ease; +} + +.url { + font-size: 0.75em; + margin-bottom: 0; + margin-bottom: 0.75em; +} + +.match { + font-size: 0.9em; + overflow: hidden; + margin-bottom: 0px; + display: -webkit-box; + line-clamp: 2; + -webkit-line-clamp: 2; /* number of lines to show */ + -webkit-box-orient: vertical; +} + +.empty { + width: 100%; + flex-grow: 1; + display: flex; + align-items: center; + justify-content: center; + font-size: 1.2rem; +} \ No newline at end of file