mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-12 02:06:31 +03:00
Use recent DocSearch component and adjust styling
This commit is contained in:
parent
c9da1af0e0
commit
fc8c1f33bc
367
website/package-lock.json
generated
367
website/package-lock.json
generated
|
@ -9,6 +9,7 @@
|
|||
"version": "0.1.0",
|
||||
"dependencies": {
|
||||
"@codemirror/lang-python": "^6.1.0",
|
||||
"@docsearch/react": "^3.3.0",
|
||||
"@jupyterlab/services": "^3.2.1",
|
||||
"@lezer/highlight": "^1.1.3",
|
||||
"@mapbox/rehype-prism": "^0.8.0",
|
||||
|
@ -55,6 +56,146 @@
|
|||
"ws": "^8.11.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@algolia/autocomplete-core": {
|
||||
"version": "1.7.2",
|
||||
"resolved": "https://registry.npmjs.org/@algolia/autocomplete-core/-/autocomplete-core-1.7.2.tgz",
|
||||
"integrity": "sha512-eclwUDC6qfApNnEfu1uWcL/rudQsn59tjEoUYZYE2JSXZrHLRjBUGMxiCoknobU2Pva8ejb0eRxpIYDtVVqdsw==",
|
||||
"dependencies": {
|
||||
"@algolia/autocomplete-shared": "1.7.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@algolia/autocomplete-preset-algolia": {
|
||||
"version": "1.7.2",
|
||||
"resolved": "https://registry.npmjs.org/@algolia/autocomplete-preset-algolia/-/autocomplete-preset-algolia-1.7.2.tgz",
|
||||
"integrity": "sha512-+RYEG6B0QiGGfRb2G3MtPfyrl0dALF3cQNTWBzBX6p5o01vCCGTTinAm2UKG3tfc2CnOMAtnPLkzNZyJUpnVJw==",
|
||||
"dependencies": {
|
||||
"@algolia/autocomplete-shared": "1.7.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@algolia/client-search": ">= 4.9.1 < 6",
|
||||
"algoliasearch": ">= 4.9.1 < 6"
|
||||
}
|
||||
},
|
||||
"node_modules/@algolia/autocomplete-shared": {
|
||||
"version": "1.7.2",
|
||||
"resolved": "https://registry.npmjs.org/@algolia/autocomplete-shared/-/autocomplete-shared-1.7.2.tgz",
|
||||
"integrity": "sha512-QCckjiC7xXHIUaIL3ektBtjJ0w7tTA3iqKcAE/Hjn1lZ5omp7i3Y4e09rAr9ZybqirL7AbxCLLq0Ra5DDPKeug=="
|
||||
},
|
||||
"node_modules/@algolia/cache-browser-local-storage": {
|
||||
"version": "4.14.2",
|
||||
"resolved": "https://registry.npmjs.org/@algolia/cache-browser-local-storage/-/cache-browser-local-storage-4.14.2.tgz",
|
||||
"integrity": "sha512-FRweBkK/ywO+GKYfAWbrepewQsPTIEirhi1BdykX9mxvBPtGNKccYAxvGdDCumU1jL4r3cayio4psfzKMejBlA==",
|
||||
"dependencies": {
|
||||
"@algolia/cache-common": "4.14.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@algolia/cache-common": {
|
||||
"version": "4.14.2",
|
||||
"resolved": "https://registry.npmjs.org/@algolia/cache-common/-/cache-common-4.14.2.tgz",
|
||||
"integrity": "sha512-SbvAlG9VqNanCErr44q6lEKD2qoK4XtFNx9Qn8FK26ePCI8I9yU7pYB+eM/cZdS9SzQCRJBbHUumVr4bsQ4uxg=="
|
||||
},
|
||||
"node_modules/@algolia/cache-in-memory": {
|
||||
"version": "4.14.2",
|
||||
"resolved": "https://registry.npmjs.org/@algolia/cache-in-memory/-/cache-in-memory-4.14.2.tgz",
|
||||
"integrity": "sha512-HrOukWoop9XB/VFojPv1R5SVXowgI56T9pmezd/djh2JnVN/vXswhXV51RKy4nCpqxyHt/aGFSq2qkDvj6KiuQ==",
|
||||
"dependencies": {
|
||||
"@algolia/cache-common": "4.14.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@algolia/client-account": {
|
||||
"version": "4.14.2",
|
||||
"resolved": "https://registry.npmjs.org/@algolia/client-account/-/client-account-4.14.2.tgz",
|
||||
"integrity": "sha512-WHtriQqGyibbb/Rx71YY43T0cXqyelEU0lB2QMBRXvD2X0iyeGl4qMxocgEIcbHyK7uqE7hKgjT8aBrHqhgc1w==",
|
||||
"dependencies": {
|
||||
"@algolia/client-common": "4.14.2",
|
||||
"@algolia/client-search": "4.14.2",
|
||||
"@algolia/transporter": "4.14.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@algolia/client-analytics": {
|
||||
"version": "4.14.2",
|
||||
"resolved": "https://registry.npmjs.org/@algolia/client-analytics/-/client-analytics-4.14.2.tgz",
|
||||
"integrity": "sha512-yBvBv2mw+HX5a+aeR0dkvUbFZsiC4FKSnfqk9rrfX+QrlNOKEhCG0tJzjiOggRW4EcNqRmaTULIYvIzQVL2KYQ==",
|
||||
"dependencies": {
|
||||
"@algolia/client-common": "4.14.2",
|
||||
"@algolia/client-search": "4.14.2",
|
||||
"@algolia/requester-common": "4.14.2",
|
||||
"@algolia/transporter": "4.14.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@algolia/client-common": {
|
||||
"version": "4.14.2",
|
||||
"resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-4.14.2.tgz",
|
||||
"integrity": "sha512-43o4fslNLcktgtDMVaT5XwlzsDPzlqvqesRi4MjQz2x4/Sxm7zYg5LRYFol1BIhG6EwxKvSUq8HcC/KxJu3J0Q==",
|
||||
"dependencies": {
|
||||
"@algolia/requester-common": "4.14.2",
|
||||
"@algolia/transporter": "4.14.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@algolia/client-personalization": {
|
||||
"version": "4.14.2",
|
||||
"resolved": "https://registry.npmjs.org/@algolia/client-personalization/-/client-personalization-4.14.2.tgz",
|
||||
"integrity": "sha512-ACCoLi0cL8CBZ1W/2juehSltrw2iqsQBnfiu/Rbl9W2yE6o2ZUb97+sqN/jBqYNQBS+o0ekTMKNkQjHHAcEXNw==",
|
||||
"dependencies": {
|
||||
"@algolia/client-common": "4.14.2",
|
||||
"@algolia/requester-common": "4.14.2",
|
||||
"@algolia/transporter": "4.14.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@algolia/client-search": {
|
||||
"version": "4.14.2",
|
||||
"resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-4.14.2.tgz",
|
||||
"integrity": "sha512-L5zScdOmcZ6NGiVbLKTvP02UbxZ0njd5Vq9nJAmPFtjffUSOGEp11BmD2oMJ5QvARgx2XbX4KzTTNS5ECYIMWw==",
|
||||
"dependencies": {
|
||||
"@algolia/client-common": "4.14.2",
|
||||
"@algolia/requester-common": "4.14.2",
|
||||
"@algolia/transporter": "4.14.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@algolia/logger-common": {
|
||||
"version": "4.14.2",
|
||||
"resolved": "https://registry.npmjs.org/@algolia/logger-common/-/logger-common-4.14.2.tgz",
|
||||
"integrity": "sha512-/JGlYvdV++IcMHBnVFsqEisTiOeEr6cUJtpjz8zc0A9c31JrtLm318Njc72p14Pnkw3A/5lHHh+QxpJ6WFTmsA=="
|
||||
},
|
||||
"node_modules/@algolia/logger-console": {
|
||||
"version": "4.14.2",
|
||||
"resolved": "https://registry.npmjs.org/@algolia/logger-console/-/logger-console-4.14.2.tgz",
|
||||
"integrity": "sha512-8S2PlpdshbkwlLCSAB5f8c91xyc84VM9Ar9EdfE9UmX+NrKNYnWR1maXXVDQQoto07G1Ol/tYFnFVhUZq0xV/g==",
|
||||
"dependencies": {
|
||||
"@algolia/logger-common": "4.14.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@algolia/requester-browser-xhr": {
|
||||
"version": "4.14.2",
|
||||
"resolved": "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-4.14.2.tgz",
|
||||
"integrity": "sha512-CEh//xYz/WfxHFh7pcMjQNWgpl4wFB85lUMRyVwaDPibNzQRVcV33YS+63fShFWc2+42YEipFGH2iPzlpszmDw==",
|
||||
"dependencies": {
|
||||
"@algolia/requester-common": "4.14.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@algolia/requester-common": {
|
||||
"version": "4.14.2",
|
||||
"resolved": "https://registry.npmjs.org/@algolia/requester-common/-/requester-common-4.14.2.tgz",
|
||||
"integrity": "sha512-73YQsBOKa5fvVV3My7iZHu1sUqmjjfs9TteFWwPwDmnad7T0VTCopttcsM3OjLxZFtBnX61Xxl2T2gmG2O4ehg=="
|
||||
},
|
||||
"node_modules/@algolia/requester-node-http": {
|
||||
"version": "4.14.2",
|
||||
"resolved": "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-4.14.2.tgz",
|
||||
"integrity": "sha512-oDbb02kd1o5GTEld4pETlPZLY0e+gOSWjWMJHWTgDXbv9rm/o2cF7japO6Vj1ENnrqWvLBmW1OzV9g6FUFhFXg==",
|
||||
"dependencies": {
|
||||
"@algolia/requester-common": "4.14.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@algolia/transporter": {
|
||||
"version": "4.14.2",
|
||||
"resolved": "https://registry.npmjs.org/@algolia/transporter/-/transporter-4.14.2.tgz",
|
||||
"integrity": "sha512-t89dfQb2T9MFQHidjHcfhh6iGMNwvuKUvojAj+JsrHAGbuSy7yE4BylhLX6R0Q1xYRoC4Vvv+O5qIw/LdnQfsQ==",
|
||||
"dependencies": {
|
||||
"@algolia/cache-common": "4.14.2",
|
||||
"@algolia/logger-common": "4.14.2",
|
||||
"@algolia/requester-common": "4.14.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@ampproject/remapping": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz",
|
||||
|
@ -1784,6 +1925,38 @@
|
|||
"resolved": "https://registry.npmjs.org/@corex/deepmerge/-/deepmerge-4.0.29.tgz",
|
||||
"integrity": "sha512-q/yVUnqckA8Do+EvAfpy7RLdumnBy9ZsducMUtZTvpdbJC7azEf1hGtnYYxm0QfphYxjwggv6XtH64prvS1W+A=="
|
||||
},
|
||||
"node_modules/@docsearch/css": {
|
||||
"version": "3.3.0",
|
||||
"resolved": "https://registry.npmjs.org/@docsearch/css/-/css-3.3.0.tgz",
|
||||
"integrity": "sha512-rODCdDtGyudLj+Va8b6w6Y85KE85bXRsps/R4Yjwt5vueXKXZQKYw0aA9knxLBT6a/bI/GMrAcmCR75KYOM6hg=="
|
||||
},
|
||||
"node_modules/@docsearch/react": {
|
||||
"version": "3.3.0",
|
||||
"resolved": "https://registry.npmjs.org/@docsearch/react/-/react-3.3.0.tgz",
|
||||
"integrity": "sha512-fhS5adZkae2SSdMYEMVg6pxI5a/cE+tW16ki1V0/ur4Fdok3hBRkmN/H8VvlXnxzggkQIIRIVvYPn00JPjen3A==",
|
||||
"dependencies": {
|
||||
"@algolia/autocomplete-core": "1.7.2",
|
||||
"@algolia/autocomplete-preset-algolia": "1.7.2",
|
||||
"@docsearch/css": "3.3.0",
|
||||
"algoliasearch": "^4.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@types/react": ">= 16.8.0 < 19.0.0",
|
||||
"react": ">= 16.8.0 < 19.0.0",
|
||||
"react-dom": ">= 16.8.0 < 19.0.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@types/react": {
|
||||
"optional": true
|
||||
},
|
||||
"react": {
|
||||
"optional": true
|
||||
},
|
||||
"react-dom": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/@eslint/eslintrc": {
|
||||
"version": "1.3.3",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.3.tgz",
|
||||
|
@ -2915,6 +3088,27 @@
|
|||
"ajv": "^6.9.1"
|
||||
}
|
||||
},
|
||||
"node_modules/algoliasearch": {
|
||||
"version": "4.14.2",
|
||||
"resolved": "https://registry.npmjs.org/algoliasearch/-/algoliasearch-4.14.2.tgz",
|
||||
"integrity": "sha512-ngbEQonGEmf8dyEh5f+uOIihv4176dgbuOZspiuhmTTBRBuzWu3KCGHre6uHj5YyuC7pNvQGzB6ZNJyZi0z+Sg==",
|
||||
"dependencies": {
|
||||
"@algolia/cache-browser-local-storage": "4.14.2",
|
||||
"@algolia/cache-common": "4.14.2",
|
||||
"@algolia/cache-in-memory": "4.14.2",
|
||||
"@algolia/client-account": "4.14.2",
|
||||
"@algolia/client-analytics": "4.14.2",
|
||||
"@algolia/client-common": "4.14.2",
|
||||
"@algolia/client-personalization": "4.14.2",
|
||||
"@algolia/client-search": "4.14.2",
|
||||
"@algolia/logger-common": "4.14.2",
|
||||
"@algolia/logger-console": "4.14.2",
|
||||
"@algolia/requester-browser-xhr": "4.14.2",
|
||||
"@algolia/requester-common": "4.14.2",
|
||||
"@algolia/requester-node-http": "4.14.2",
|
||||
"@algolia/transporter": "4.14.2"
|
||||
}
|
||||
},
|
||||
"node_modules/ansi-align": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz",
|
||||
|
@ -12047,6 +12241,142 @@
|
|||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@algolia/autocomplete-core": {
|
||||
"version": "1.7.2",
|
||||
"resolved": "https://registry.npmjs.org/@algolia/autocomplete-core/-/autocomplete-core-1.7.2.tgz",
|
||||
"integrity": "sha512-eclwUDC6qfApNnEfu1uWcL/rudQsn59tjEoUYZYE2JSXZrHLRjBUGMxiCoknobU2Pva8ejb0eRxpIYDtVVqdsw==",
|
||||
"requires": {
|
||||
"@algolia/autocomplete-shared": "1.7.2"
|
||||
}
|
||||
},
|
||||
"@algolia/autocomplete-preset-algolia": {
|
||||
"version": "1.7.2",
|
||||
"resolved": "https://registry.npmjs.org/@algolia/autocomplete-preset-algolia/-/autocomplete-preset-algolia-1.7.2.tgz",
|
||||
"integrity": "sha512-+RYEG6B0QiGGfRb2G3MtPfyrl0dALF3cQNTWBzBX6p5o01vCCGTTinAm2UKG3tfc2CnOMAtnPLkzNZyJUpnVJw==",
|
||||
"requires": {
|
||||
"@algolia/autocomplete-shared": "1.7.2"
|
||||
}
|
||||
},
|
||||
"@algolia/autocomplete-shared": {
|
||||
"version": "1.7.2",
|
||||
"resolved": "https://registry.npmjs.org/@algolia/autocomplete-shared/-/autocomplete-shared-1.7.2.tgz",
|
||||
"integrity": "sha512-QCckjiC7xXHIUaIL3ektBtjJ0w7tTA3iqKcAE/Hjn1lZ5omp7i3Y4e09rAr9ZybqirL7AbxCLLq0Ra5DDPKeug=="
|
||||
},
|
||||
"@algolia/cache-browser-local-storage": {
|
||||
"version": "4.14.2",
|
||||
"resolved": "https://registry.npmjs.org/@algolia/cache-browser-local-storage/-/cache-browser-local-storage-4.14.2.tgz",
|
||||
"integrity": "sha512-FRweBkK/ywO+GKYfAWbrepewQsPTIEirhi1BdykX9mxvBPtGNKccYAxvGdDCumU1jL4r3cayio4psfzKMejBlA==",
|
||||
"requires": {
|
||||
"@algolia/cache-common": "4.14.2"
|
||||
}
|
||||
},
|
||||
"@algolia/cache-common": {
|
||||
"version": "4.14.2",
|
||||
"resolved": "https://registry.npmjs.org/@algolia/cache-common/-/cache-common-4.14.2.tgz",
|
||||
"integrity": "sha512-SbvAlG9VqNanCErr44q6lEKD2qoK4XtFNx9Qn8FK26ePCI8I9yU7pYB+eM/cZdS9SzQCRJBbHUumVr4bsQ4uxg=="
|
||||
},
|
||||
"@algolia/cache-in-memory": {
|
||||
"version": "4.14.2",
|
||||
"resolved": "https://registry.npmjs.org/@algolia/cache-in-memory/-/cache-in-memory-4.14.2.tgz",
|
||||
"integrity": "sha512-HrOukWoop9XB/VFojPv1R5SVXowgI56T9pmezd/djh2JnVN/vXswhXV51RKy4nCpqxyHt/aGFSq2qkDvj6KiuQ==",
|
||||
"requires": {
|
||||
"@algolia/cache-common": "4.14.2"
|
||||
}
|
||||
},
|
||||
"@algolia/client-account": {
|
||||
"version": "4.14.2",
|
||||
"resolved": "https://registry.npmjs.org/@algolia/client-account/-/client-account-4.14.2.tgz",
|
||||
"integrity": "sha512-WHtriQqGyibbb/Rx71YY43T0cXqyelEU0lB2QMBRXvD2X0iyeGl4qMxocgEIcbHyK7uqE7hKgjT8aBrHqhgc1w==",
|
||||
"requires": {
|
||||
"@algolia/client-common": "4.14.2",
|
||||
"@algolia/client-search": "4.14.2",
|
||||
"@algolia/transporter": "4.14.2"
|
||||
}
|
||||
},
|
||||
"@algolia/client-analytics": {
|
||||
"version": "4.14.2",
|
||||
"resolved": "https://registry.npmjs.org/@algolia/client-analytics/-/client-analytics-4.14.2.tgz",
|
||||
"integrity": "sha512-yBvBv2mw+HX5a+aeR0dkvUbFZsiC4FKSnfqk9rrfX+QrlNOKEhCG0tJzjiOggRW4EcNqRmaTULIYvIzQVL2KYQ==",
|
||||
"requires": {
|
||||
"@algolia/client-common": "4.14.2",
|
||||
"@algolia/client-search": "4.14.2",
|
||||
"@algolia/requester-common": "4.14.2",
|
||||
"@algolia/transporter": "4.14.2"
|
||||
}
|
||||
},
|
||||
"@algolia/client-common": {
|
||||
"version": "4.14.2",
|
||||
"resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-4.14.2.tgz",
|
||||
"integrity": "sha512-43o4fslNLcktgtDMVaT5XwlzsDPzlqvqesRi4MjQz2x4/Sxm7zYg5LRYFol1BIhG6EwxKvSUq8HcC/KxJu3J0Q==",
|
||||
"requires": {
|
||||
"@algolia/requester-common": "4.14.2",
|
||||
"@algolia/transporter": "4.14.2"
|
||||
}
|
||||
},
|
||||
"@algolia/client-personalization": {
|
||||
"version": "4.14.2",
|
||||
"resolved": "https://registry.npmjs.org/@algolia/client-personalization/-/client-personalization-4.14.2.tgz",
|
||||
"integrity": "sha512-ACCoLi0cL8CBZ1W/2juehSltrw2iqsQBnfiu/Rbl9W2yE6o2ZUb97+sqN/jBqYNQBS+o0ekTMKNkQjHHAcEXNw==",
|
||||
"requires": {
|
||||
"@algolia/client-common": "4.14.2",
|
||||
"@algolia/requester-common": "4.14.2",
|
||||
"@algolia/transporter": "4.14.2"
|
||||
}
|
||||
},
|
||||
"@algolia/client-search": {
|
||||
"version": "4.14.2",
|
||||
"resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-4.14.2.tgz",
|
||||
"integrity": "sha512-L5zScdOmcZ6NGiVbLKTvP02UbxZ0njd5Vq9nJAmPFtjffUSOGEp11BmD2oMJ5QvARgx2XbX4KzTTNS5ECYIMWw==",
|
||||
"requires": {
|
||||
"@algolia/client-common": "4.14.2",
|
||||
"@algolia/requester-common": "4.14.2",
|
||||
"@algolia/transporter": "4.14.2"
|
||||
}
|
||||
},
|
||||
"@algolia/logger-common": {
|
||||
"version": "4.14.2",
|
||||
"resolved": "https://registry.npmjs.org/@algolia/logger-common/-/logger-common-4.14.2.tgz",
|
||||
"integrity": "sha512-/JGlYvdV++IcMHBnVFsqEisTiOeEr6cUJtpjz8zc0A9c31JrtLm318Njc72p14Pnkw3A/5lHHh+QxpJ6WFTmsA=="
|
||||
},
|
||||
"@algolia/logger-console": {
|
||||
"version": "4.14.2",
|
||||
"resolved": "https://registry.npmjs.org/@algolia/logger-console/-/logger-console-4.14.2.tgz",
|
||||
"integrity": "sha512-8S2PlpdshbkwlLCSAB5f8c91xyc84VM9Ar9EdfE9UmX+NrKNYnWR1maXXVDQQoto07G1Ol/tYFnFVhUZq0xV/g==",
|
||||
"requires": {
|
||||
"@algolia/logger-common": "4.14.2"
|
||||
}
|
||||
},
|
||||
"@algolia/requester-browser-xhr": {
|
||||
"version": "4.14.2",
|
||||
"resolved": "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-4.14.2.tgz",
|
||||
"integrity": "sha512-CEh//xYz/WfxHFh7pcMjQNWgpl4wFB85lUMRyVwaDPibNzQRVcV33YS+63fShFWc2+42YEipFGH2iPzlpszmDw==",
|
||||
"requires": {
|
||||
"@algolia/requester-common": "4.14.2"
|
||||
}
|
||||
},
|
||||
"@algolia/requester-common": {
|
||||
"version": "4.14.2",
|
||||
"resolved": "https://registry.npmjs.org/@algolia/requester-common/-/requester-common-4.14.2.tgz",
|
||||
"integrity": "sha512-73YQsBOKa5fvVV3My7iZHu1sUqmjjfs9TteFWwPwDmnad7T0VTCopttcsM3OjLxZFtBnX61Xxl2T2gmG2O4ehg=="
|
||||
},
|
||||
"@algolia/requester-node-http": {
|
||||
"version": "4.14.2",
|
||||
"resolved": "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-4.14.2.tgz",
|
||||
"integrity": "sha512-oDbb02kd1o5GTEld4pETlPZLY0e+gOSWjWMJHWTgDXbv9rm/o2cF7japO6Vj1ENnrqWvLBmW1OzV9g6FUFhFXg==",
|
||||
"requires": {
|
||||
"@algolia/requester-common": "4.14.2"
|
||||
}
|
||||
},
|
||||
"@algolia/transporter": {
|
||||
"version": "4.14.2",
|
||||
"resolved": "https://registry.npmjs.org/@algolia/transporter/-/transporter-4.14.2.tgz",
|
||||
"integrity": "sha512-t89dfQb2T9MFQHidjHcfhh6iGMNwvuKUvojAj+JsrHAGbuSy7yE4BylhLX6R0Q1xYRoC4Vvv+O5qIw/LdnQfsQ==",
|
||||
"requires": {
|
||||
"@algolia/cache-common": "4.14.2",
|
||||
"@algolia/logger-common": "4.14.2",
|
||||
"@algolia/requester-common": "4.14.2"
|
||||
}
|
||||
},
|
||||
"@ampproject/remapping": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz",
|
||||
|
@ -13254,6 +13584,22 @@
|
|||
"resolved": "https://registry.npmjs.org/@corex/deepmerge/-/deepmerge-4.0.29.tgz",
|
||||
"integrity": "sha512-q/yVUnqckA8Do+EvAfpy7RLdumnBy9ZsducMUtZTvpdbJC7azEf1hGtnYYxm0QfphYxjwggv6XtH64prvS1W+A=="
|
||||
},
|
||||
"@docsearch/css": {
|
||||
"version": "3.3.0",
|
||||
"resolved": "https://registry.npmjs.org/@docsearch/css/-/css-3.3.0.tgz",
|
||||
"integrity": "sha512-rODCdDtGyudLj+Va8b6w6Y85KE85bXRsps/R4Yjwt5vueXKXZQKYw0aA9knxLBT6a/bI/GMrAcmCR75KYOM6hg=="
|
||||
},
|
||||
"@docsearch/react": {
|
||||
"version": "3.3.0",
|
||||
"resolved": "https://registry.npmjs.org/@docsearch/react/-/react-3.3.0.tgz",
|
||||
"integrity": "sha512-fhS5adZkae2SSdMYEMVg6pxI5a/cE+tW16ki1V0/ur4Fdok3hBRkmN/H8VvlXnxzggkQIIRIVvYPn00JPjen3A==",
|
||||
"requires": {
|
||||
"@algolia/autocomplete-core": "1.7.2",
|
||||
"@algolia/autocomplete-preset-algolia": "1.7.2",
|
||||
"@docsearch/css": "3.3.0",
|
||||
"algoliasearch": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"@eslint/eslintrc": {
|
||||
"version": "1.3.3",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.3.tgz",
|
||||
|
@ -14182,6 +14528,27 @@
|
|||
"integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==",
|
||||
"requires": {}
|
||||
},
|
||||
"algoliasearch": {
|
||||
"version": "4.14.2",
|
||||
"resolved": "https://registry.npmjs.org/algoliasearch/-/algoliasearch-4.14.2.tgz",
|
||||
"integrity": "sha512-ngbEQonGEmf8dyEh5f+uOIihv4176dgbuOZspiuhmTTBRBuzWu3KCGHre6uHj5YyuC7pNvQGzB6ZNJyZi0z+Sg==",
|
||||
"requires": {
|
||||
"@algolia/cache-browser-local-storage": "4.14.2",
|
||||
"@algolia/cache-common": "4.14.2",
|
||||
"@algolia/cache-in-memory": "4.14.2",
|
||||
"@algolia/client-account": "4.14.2",
|
||||
"@algolia/client-analytics": "4.14.2",
|
||||
"@algolia/client-common": "4.14.2",
|
||||
"@algolia/client-personalization": "4.14.2",
|
||||
"@algolia/client-search": "4.14.2",
|
||||
"@algolia/logger-common": "4.14.2",
|
||||
"@algolia/logger-console": "4.14.2",
|
||||
"@algolia/requester-browser-xhr": "4.14.2",
|
||||
"@algolia/requester-common": "4.14.2",
|
||||
"@algolia/requester-node-http": "4.14.2",
|
||||
"@algolia/transporter": "4.14.2"
|
||||
}
|
||||
},
|
||||
"ansi-align": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz",
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@codemirror/lang-python": "^6.1.0",
|
||||
"@docsearch/react": "^3.3.0",
|
||||
"@jupyterlab/services": "^3.2.1",
|
||||
"@lezer/highlight": "^1.1.3",
|
||||
"@mapbox/rehype-prism": "^0.8.0",
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
import '../src/styles/layout.sass'
|
||||
import '../src/styles/search.sass'
|
||||
|
||||
import type { AppProps } from 'next/app'
|
||||
import Head from 'next/head'
|
||||
import PlausibleProvider from 'next-plausible'
|
||||
|
|
|
@ -4,7 +4,7 @@ export default function Document() {
|
|||
return (
|
||||
<Html lang="en">
|
||||
<Head />
|
||||
<body>
|
||||
<body className="theme-blue">
|
||||
<Main />
|
||||
<NextScript />
|
||||
</body>
|
||||
|
|
|
@ -1,47 +1,18 @@
|
|||
import React, { useEffect, useState } from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import { window } from 'browser-monads'
|
||||
import { DocSearch } from '@docsearch/react'
|
||||
import '@docsearch/css'
|
||||
|
||||
import Icon from './icon'
|
||||
import classes from '../styles/search.module.sass'
|
||||
import siteMetadata from '../../meta/site.json'
|
||||
|
||||
export default function Search({ id = 'docsearch', placeholder = 'Search docs', settings = {} }) {
|
||||
const { apiKey, indexName, appId } = settings
|
||||
if (!apiKey && !indexName) return null
|
||||
const [initialized, setInitialized] = useState(false)
|
||||
useEffect(() => {
|
||||
if (!initialized) {
|
||||
setInitialized(true)
|
||||
window.docsearch({
|
||||
appId,
|
||||
apiKey,
|
||||
indexName,
|
||||
inputSelector: `#${id}`,
|
||||
debug: false,
|
||||
})
|
||||
}
|
||||
}, [initialized, apiKey, indexName, id])
|
||||
export default function Search({ placeholder = 'Search docs' }) {
|
||||
const { apiKey, indexName, appId } = siteMetadata.docSearch
|
||||
return (
|
||||
<form className={classes.root}>
|
||||
<label htmlFor={id} className={classes.icon}>
|
||||
<Icon name="search" width={20} />
|
||||
</label>
|
||||
<input
|
||||
id={id}
|
||||
className={classes.input}
|
||||
type="search"
|
||||
placeholder={placeholder}
|
||||
aria-label={placeholder}
|
||||
/>
|
||||
</form>
|
||||
<DocSearch appId={appId} indexName={indexName} apiKey={apiKey} placeholder={placeholder} />
|
||||
)
|
||||
}
|
||||
|
||||
Search.propTypes = {
|
||||
settings: PropTypes.shape({
|
||||
apiKey: PropTypes.string.isRequired,
|
||||
indexName: PropTypes.string.isRequired,
|
||||
}).isRequired,
|
||||
id: PropTypes.string,
|
||||
placeholder: PropTypes.string,
|
||||
}
|
||||
|
|
|
@ -1,43 +0,0 @@
|
|||
import React from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
|
||||
export default function HTML(props) {
|
||||
return (
|
||||
<html {...props.htmlAttributes}>
|
||||
<head>
|
||||
<meta charSet="utf-8" />
|
||||
<meta httpEquiv="x-ua-compatible" content="ie=edge" />
|
||||
<meta
|
||||
name="viewport"
|
||||
content="width=device-width, initial-scale=1, shrink-to-fit=no"
|
||||
/>
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css"
|
||||
/>
|
||||
{props.headComponents}
|
||||
</head>
|
||||
<body id="_top" {...props.bodyAttributes}>
|
||||
{props.preBodyComponents}
|
||||
<noscript key="noscript" id="gatsby-noscript">
|
||||
This app works best with JavaScript enabled.
|
||||
</noscript>
|
||||
<div key={`body`} id="___gatsby" dangerouslySetInnerHTML={{ __html: props.body }} />
|
||||
{props.postBodyComponents}
|
||||
</body>
|
||||
<script
|
||||
type="text/javascript"
|
||||
src="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js"
|
||||
/>
|
||||
</html>
|
||||
)
|
||||
}
|
||||
|
||||
HTML.propTypes = {
|
||||
htmlAttributes: PropTypes.object,
|
||||
headComponents: PropTypes.array,
|
||||
bodyAttributes: PropTypes.object,
|
||||
preBodyComponents: PropTypes.array,
|
||||
body: PropTypes.string,
|
||||
postBodyComponents: PropTypes.array,
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
@import base
|
||||
|
||||
.root
|
||||
font: var(--font-size-sm)/var(--line-height-md) var(--font-primary)
|
||||
border: 1px solid var(--color-subtle)
|
||||
border-radius: 2em
|
||||
max-width: 100%
|
||||
display: flex
|
||||
flex-flow: row nowrap
|
||||
|
||||
&:focus-within
|
||||
border-color: var(--color-theme)
|
||||
box-shadow: 0 0 0 1px var(--color-theme)
|
||||
|
||||
.input
|
||||
width: 100%
|
||||
max-width: 100%
|
||||
font: inherit
|
||||
padding: 0.5rem 1rem 0.5rem 0.5rem
|
||||
|
||||
.icon
|
||||
display: inline-block
|
||||
color: var(--color-subtle-dark)
|
||||
padding-left: 0.5rem
|
||||
position: relative
|
||||
top: 0.25rem
|
||||
left: 0.15rem
|
||||
cursor: pointer
|
27
website/src/styles/search.sass
Normal file
27
website/src/styles/search.sass
Normal file
|
@ -0,0 +1,27 @@
|
|||
@import base
|
||||
|
||||
.DocSearch-Modal
|
||||
--docsearch-primary-color: var(--color-theme)
|
||||
--docsearch-searchbox-background: var(--color-back)
|
||||
--docsearch-searchbox-shadow: inset 0 0 0 2px var(--docsearch-primary-color)
|
||||
--docsearch-highlight-color: var(--docsearch-primary-color)
|
||||
--docsearch-logo-color: var(--docsearch-primary-color)
|
||||
|
||||
box-shadow: inset 0 0 0 1px var(--color-subtle)
|
||||
|
||||
.DocSearch, .DocSearch-Modal, .DocSearch-Help, .DocSearch-Input, .DocSearch-Hit-title, .DocSearch-Hit-path
|
||||
font-family: var(--font-primary)
|
||||
font-size: var(--font-size-md) !important
|
||||
font-weight: 400
|
||||
|
||||
.DocSearch-Hits mark
|
||||
background: var(--docsearch-highlight-color) !important
|
||||
color: var(--color-back) !important
|
||||
|
||||
.DocSearch-Hit-source
|
||||
font-size: var(--font-size-lg) !important
|
||||
font-family: var(--font-secondary)
|
||||
text-transform: uppercase
|
||||
|
||||
.cls-1, .cls-2
|
||||
fill: var(--docsearch-primary-color) !important
|
|
@ -115,7 +115,7 @@ class Layout extends React.Component {
|
|||
title={siteMetadata.title}
|
||||
items={siteMetadata.navigation}
|
||||
section={section}
|
||||
search={<Search settings={siteMetadata.docSearch} />}
|
||||
search={<Search />}
|
||||
alert={nightly ? null : navAlert}
|
||||
>
|
||||
<Progress />
|
||||
|
|
Loading…
Reference in New Issue
Block a user