mirror of
https://github.com/mdx-js/mdx.git
synced 2024-11-20 12:07:34 +03:00
Add search to site
Closes GH-1776.
This commit is contained in:
parent
ecfe93b6a2
commit
3f8344b3a2
@ -43,6 +43,30 @@
|
||||
--hl: var(--blue-5);
|
||||
--fg: var(--black);
|
||||
--bg: var(--white);
|
||||
|
||||
/* We manually add a blur on `::before` of the container, so no background needed. */
|
||||
--docsearch-container-background: transparent !important;
|
||||
--docsearch-footer-background: var(--white) !important;
|
||||
--docsearch-footer-shadow: 0 -1px 0 0 var(--gray-2) !important;
|
||||
--docsearch-highlight-color: var(--hl) !important;
|
||||
--docsearch-hit-color: var(--gray-7) !important;
|
||||
--docsearch-hit-shadow: inset 0 0 0 1px var(--gray-2) !important;
|
||||
/* This is actually used in a `background` field so does not have to be a gradient. */
|
||||
--docsearch-key-gradient: var(--gray-0) !important;
|
||||
--docsearch-key-pressed-shadow: none !important;
|
||||
--docsearch-key-shadow: inset 0 -1px 0 var(--gray-4) !important;
|
||||
--docsearch-modal-background: var(--white) !important;
|
||||
/* Card shadow: <https://github.com/unifiedjs/unifiedjs.github.io/blob/4de0391/asset/index.css#L399> */
|
||||
--docsearch-modal-shadow: 0 0 0 0.2em rgb(3 102 214 / 0%),
|
||||
0 13px 27px -5px rgb(50 50 93 / 25%), 0 8px 16px -8px rgb(0 0 0 / 30%),
|
||||
0 -6px 16px -6px rgb(0 0 0 / 2.5%) !important;
|
||||
/* Use the regular color: */
|
||||
--docsearch-muted-color: var(--black) !important;
|
||||
--docsearch-primary-color: var(--hl) !important;
|
||||
--docsearch-searchbox-background: var(--white) !important;
|
||||
--docsearch-searchbox-focus-background: var(--gray-0) !important;
|
||||
--docsearch-searchbox-shadow: inset 0 0 0 2px var(--hl) !important;
|
||||
--docsearch-text-color: var(--black) !important;
|
||||
}
|
||||
|
||||
* {
|
||||
@ -526,7 +550,8 @@ button.success {
|
||||
padding-top: calc(2 * (1em + 1ex));
|
||||
}
|
||||
|
||||
.navigation::before {
|
||||
.navigation::before,
|
||||
.DocSearch-Container::before {
|
||||
content: '';
|
||||
inset: 0;
|
||||
position: absolute;
|
||||
@ -538,6 +563,10 @@ button.success {
|
||||
);
|
||||
}
|
||||
|
||||
.DocSearch li {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#banner {
|
||||
padding: calc(0.25 * (1em + 1ex));
|
||||
background-color: var(--mdx-yellow);
|
||||
@ -564,7 +593,8 @@ button.success {
|
||||
|
||||
/* Note that the `backdrop-filter` itself is applied in light mode. */
|
||||
@supports (backdrop-filter: blur(1ex)) {
|
||||
.navigation::before {
|
||||
.navigation::before,
|
||||
.DocSearch-Container::before {
|
||||
backdrop-filter: saturate(200%) blur(1ex);
|
||||
background-image: radial-gradient(
|
||||
ellipse at 50% 0%,
|
||||
@ -574,8 +604,10 @@ button.success {
|
||||
}
|
||||
}
|
||||
|
||||
.DocSearch-Modal,
|
||||
.navigation-primary,
|
||||
.navigation-secondary,
|
||||
.navigation-search,
|
||||
.navigation-tertiary {
|
||||
z-index: 3;
|
||||
}
|
||||
@ -597,6 +629,7 @@ button.success {
|
||||
|
||||
.navigation-primary,
|
||||
.navigation-secondary,
|
||||
.navigation-search,
|
||||
.navigation-tertiary {
|
||||
margin: 0;
|
||||
padding: calc(0.5 * (1em + 1ex));
|
||||
@ -604,6 +637,14 @@ button.success {
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
.navigation-search {
|
||||
padding: calc(0.25em + 0.25ex);
|
||||
}
|
||||
|
||||
.DocSearch-Button {
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
.navigation-primary h1,
|
||||
.navigation-secondary li,
|
||||
.navigation-tertiary li {
|
||||
@ -1009,6 +1050,8 @@ details[open] {
|
||||
--hl: var(--mdx-yellow);
|
||||
--fg: var(--white);
|
||||
--bg: var(--black);
|
||||
|
||||
--docsearch-key-gradient: #eaeef2 !important;
|
||||
}
|
||||
|
||||
.navigation-secondary a {
|
||||
@ -1201,6 +1244,10 @@ details[open] {
|
||||
font-size: 1.125em;
|
||||
}
|
||||
|
||||
.navigation-search {
|
||||
padding: calc(0.3em + 0.3ex);
|
||||
}
|
||||
|
||||
#markdown-for-thecomponent-era {
|
||||
font-size: 3rem;
|
||||
line-height: calc(1em + (1 / 3 * 1ex));
|
||||
|
@ -1,10 +1,12 @@
|
||||
/* eslint-disable unicorn/prefer-query-selector */
|
||||
/// <reference lib="dom" />
|
||||
|
||||
import docsearch_ from '@docsearch/js'
|
||||
import {computePosition, shift} from '@floating-ui/dom'
|
||||
import copyToClipboard from 'copy-to-clipboard'
|
||||
import {ok as assert} from 'devlop'
|
||||
|
||||
// Squircles.
|
||||
if ('paintWorklet' in CSS) {
|
||||
// @ts-expect-error: TS doesn’t understand Houdini.
|
||||
CSS.paintWorklet.addModule(
|
||||
@ -12,6 +14,7 @@ if ('paintWorklet' in CSS) {
|
||||
)
|
||||
}
|
||||
|
||||
// Copy buttons.
|
||||
const copies = Array.from(document.querySelectorAll('button.copy-button'))
|
||||
const copyTemplate = document.createElement('template')
|
||||
const copiedTemplate = document.createElement('template')
|
||||
@ -142,3 +145,16 @@ function popoverShow(popoverTarget) {
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
// Docsearch.
|
||||
// Note: types are wrong.
|
||||
const docsearch = /** @type {import('@docsearch/js')['default']} */ (
|
||||
/** @type {unknown} */ (docsearch_)
|
||||
)
|
||||
|
||||
docsearch({
|
||||
appId: 'B0O9AAZ9L2',
|
||||
apiKey: '71f38eae605e3e6d500368617e32c19f',
|
||||
container: '#docsearch',
|
||||
indexName: 'mdxjs'
|
||||
})
|
||||
|
@ -58,6 +58,9 @@ export function NavigationSite(properties) {
|
||||
</h1>
|
||||
</a>
|
||||
</div>
|
||||
<div className="navigation-search">
|
||||
<div id="docsearch" />
|
||||
</div>
|
||||
<NavigationGroup
|
||||
className="navigation-secondary"
|
||||
items={navigationTree.children}
|
||||
|
467
package-lock.json
generated
467
package-lock.json
generated
@ -19,6 +19,8 @@
|
||||
],
|
||||
"devDependencies": {
|
||||
"@babel/types": "^7.0.0",
|
||||
"@docsearch/css": "^3.0.0",
|
||||
"@docsearch/js": "^3.0.0",
|
||||
"@floating-ui/dom": "^1.0.0",
|
||||
"@next/mdx": "^14.0.0",
|
||||
"@node-loader/core": "^2.0.0",
|
||||
@ -153,6 +155,345 @@
|
||||
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/@algolia/autocomplete-core": {
|
||||
"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==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@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==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@algolia/autocomplete-shared": "1.9.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"search-insights": ">= 1 < 3"
|
||||
}
|
||||
},
|
||||
"node_modules/@algolia/autocomplete-preset-algolia": {
|
||||
"version": "1.9.3",
|
||||
"resolved": "https://registry.npmjs.org/@algolia/autocomplete-preset-algolia/-/autocomplete-preset-algolia-1.9.3.tgz",
|
||||
"integrity": "sha512-d4qlt6YmrLMYy95n5TB52wtNDr6EgAIPH81dvvvW8UmuWRgxEtY0NJiPwl/h95JtG2vmRM804M0DSwMCNZlzRA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@algolia/autocomplete-shared": "1.9.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@algolia/client-search": ">= 4.9.1 < 6",
|
||||
"algoliasearch": ">= 4.9.1 < 6"
|
||||
}
|
||||
},
|
||||
"node_modules/@algolia/autocomplete-shared": {
|
||||
"version": "1.9.3",
|
||||
"resolved": "https://registry.npmjs.org/@algolia/autocomplete-shared/-/autocomplete-shared-1.9.3.tgz",
|
||||
"integrity": "sha512-Wnm9E4Ye6Rl6sTTqjoymD+l8DjSTHsHboVRYrKgEt8Q7UHm9nYbqhN/i0fhUYA3OAEH7WA8x3jfpnmJm3rKvaQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peerDependencies": {
|
||||
"@algolia/client-search": ">= 4.9.1 < 6",
|
||||
"algoliasearch": ">= 4.9.1 < 6"
|
||||
}
|
||||
},
|
||||
"node_modules/@algolia/cache-browser-local-storage": {
|
||||
"version": "4.24.0",
|
||||
"resolved": "https://registry.npmjs.org/@algolia/cache-browser-local-storage/-/cache-browser-local-storage-4.24.0.tgz",
|
||||
"integrity": "sha512-t63W9BnoXVrGy9iYHBgObNXqYXM3tYXCjDSHeNwnsc324r4o5UiVKUiAB4THQ5z9U5hTj6qUvwg/Ez43ZD85ww==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@algolia/cache-common": "4.24.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@algolia/cache-common": {
|
||||
"version": "4.24.0",
|
||||
"resolved": "https://registry.npmjs.org/@algolia/cache-common/-/cache-common-4.24.0.tgz",
|
||||
"integrity": "sha512-emi+v+DmVLpMGhp0V9q9h5CdkURsNmFC+cOS6uK9ndeJm9J4TiqSvPYVu+THUP8P/S08rxf5x2P+p3CfID0Y4g==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@algolia/cache-in-memory": {
|
||||
"version": "4.24.0",
|
||||
"resolved": "https://registry.npmjs.org/@algolia/cache-in-memory/-/cache-in-memory-4.24.0.tgz",
|
||||
"integrity": "sha512-gDrt2so19jW26jY3/MkFg5mEypFIPbPoXsQGQWAi6TrCPsNOSEYepBMPlucqWigsmEy/prp5ug2jy/N3PVG/8w==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@algolia/cache-common": "4.24.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@algolia/client-account": {
|
||||
"version": "4.24.0",
|
||||
"resolved": "https://registry.npmjs.org/@algolia/client-account/-/client-account-4.24.0.tgz",
|
||||
"integrity": "sha512-adcvyJ3KjPZFDybxlqnf+5KgxJtBjwTPTeyG2aOyoJvx0Y8dUQAEOEVOJ/GBxX0WWNbmaSrhDURMhc+QeevDsA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@algolia/client-common": "4.24.0",
|
||||
"@algolia/client-search": "4.24.0",
|
||||
"@algolia/transporter": "4.24.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@algolia/client-account/node_modules/@algolia/client-common": {
|
||||
"version": "4.24.0",
|
||||
"resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-4.24.0.tgz",
|
||||
"integrity": "sha512-bc2ROsNL6w6rqpl5jj/UywlIYC21TwSSoFHKl01lYirGMW+9Eek6r02Tocg4gZ8HAw3iBvu6XQiM3BEbmEMoiA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@algolia/requester-common": "4.24.0",
|
||||
"@algolia/transporter": "4.24.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@algolia/client-account/node_modules/@algolia/client-search": {
|
||||
"version": "4.24.0",
|
||||
"resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-4.24.0.tgz",
|
||||
"integrity": "sha512-uRW6EpNapmLAD0mW47OXqTP8eiIx5F6qN9/x/7HHO6owL3N1IXqydGwW5nhDFBrV+ldouro2W1VX3XlcUXEFCA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@algolia/client-common": "4.24.0",
|
||||
"@algolia/requester-common": "4.24.0",
|
||||
"@algolia/transporter": "4.24.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@algolia/client-analytics": {
|
||||
"version": "4.24.0",
|
||||
"resolved": "https://registry.npmjs.org/@algolia/client-analytics/-/client-analytics-4.24.0.tgz",
|
||||
"integrity": "sha512-y8jOZt1OjwWU4N2qr8G4AxXAzaa8DBvyHTWlHzX/7Me1LX8OayfgHexqrsL4vSBcoMmVw2XnVW9MhL+Y2ZDJXg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@algolia/client-common": "4.24.0",
|
||||
"@algolia/client-search": "4.24.0",
|
||||
"@algolia/requester-common": "4.24.0",
|
||||
"@algolia/transporter": "4.24.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@algolia/client-analytics/node_modules/@algolia/client-common": {
|
||||
"version": "4.24.0",
|
||||
"resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-4.24.0.tgz",
|
||||
"integrity": "sha512-bc2ROsNL6w6rqpl5jj/UywlIYC21TwSSoFHKl01lYirGMW+9Eek6r02Tocg4gZ8HAw3iBvu6XQiM3BEbmEMoiA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@algolia/requester-common": "4.24.0",
|
||||
"@algolia/transporter": "4.24.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@algolia/client-analytics/node_modules/@algolia/client-search": {
|
||||
"version": "4.24.0",
|
||||
"resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-4.24.0.tgz",
|
||||
"integrity": "sha512-uRW6EpNapmLAD0mW47OXqTP8eiIx5F6qN9/x/7HHO6owL3N1IXqydGwW5nhDFBrV+ldouro2W1VX3XlcUXEFCA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@algolia/client-common": "4.24.0",
|
||||
"@algolia/requester-common": "4.24.0",
|
||||
"@algolia/transporter": "4.24.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@algolia/client-common": {
|
||||
"version": "5.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-5.4.1.tgz",
|
||||
"integrity": "sha512-IffPD+CETiR8YJMVC1lcjnhETLpJ2L0ORZCbbRvwo/S11D1j/keR7AqKVMn4TseRJCfjmBFOcFrC+m4sXjyQWA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">= 14.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@algolia/client-personalization": {
|
||||
"version": "4.24.0",
|
||||
"resolved": "https://registry.npmjs.org/@algolia/client-personalization/-/client-personalization-4.24.0.tgz",
|
||||
"integrity": "sha512-l5FRFm/yngztweU0HdUzz1rC4yoWCFo3IF+dVIVTfEPg906eZg5BOd1k0K6rZx5JzyyoP4LdmOikfkfGsKVE9w==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@algolia/client-common": "4.24.0",
|
||||
"@algolia/requester-common": "4.24.0",
|
||||
"@algolia/transporter": "4.24.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@algolia/client-personalization/node_modules/@algolia/client-common": {
|
||||
"version": "4.24.0",
|
||||
"resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-4.24.0.tgz",
|
||||
"integrity": "sha512-bc2ROsNL6w6rqpl5jj/UywlIYC21TwSSoFHKl01lYirGMW+9Eek6r02Tocg4gZ8HAw3iBvu6XQiM3BEbmEMoiA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@algolia/requester-common": "4.24.0",
|
||||
"@algolia/transporter": "4.24.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@algolia/client-search": {
|
||||
"version": "5.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-5.4.1.tgz",
|
||||
"integrity": "sha512-nCgWY2p0tZgBqJKmA5E6B3VW+7uqxi1Orf88zNWOihJBRFeOV932pzG4vGrX9l0+p0o/vJabYxuomO35rEt5dw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@algolia/client-common": "5.4.1",
|
||||
"@algolia/requester-browser-xhr": "5.4.1",
|
||||
"@algolia/requester-fetch": "5.4.1",
|
||||
"@algolia/requester-node-http": "5.4.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 14.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@algolia/logger-common": {
|
||||
"version": "4.24.0",
|
||||
"resolved": "https://registry.npmjs.org/@algolia/logger-common/-/logger-common-4.24.0.tgz",
|
||||
"integrity": "sha512-LLUNjkahj9KtKYrQhFKCzMx0BY3RnNP4FEtO+sBybCjJ73E8jNdaKJ/Dd8A/VA4imVHP5tADZ8pn5B8Ga/wTMA==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@algolia/logger-console": {
|
||||
"version": "4.24.0",
|
||||
"resolved": "https://registry.npmjs.org/@algolia/logger-console/-/logger-console-4.24.0.tgz",
|
||||
"integrity": "sha512-X4C8IoHgHfiUROfoRCV+lzSy+LHMgkoEEU1BbKcsfnV0i0S20zyy0NLww9dwVHUWNfPPxdMU+/wKmLGYf96yTg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@algolia/logger-common": "4.24.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@algolia/recommend": {
|
||||
"version": "4.24.0",
|
||||
"resolved": "https://registry.npmjs.org/@algolia/recommend/-/recommend-4.24.0.tgz",
|
||||
"integrity": "sha512-P9kcgerfVBpfYHDfVZDvvdJv0lEoCvzNlOy2nykyt5bK8TyieYyiD0lguIJdRZZYGre03WIAFf14pgE+V+IBlw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@algolia/cache-browser-local-storage": "4.24.0",
|
||||
"@algolia/cache-common": "4.24.0",
|
||||
"@algolia/cache-in-memory": "4.24.0",
|
||||
"@algolia/client-common": "4.24.0",
|
||||
"@algolia/client-search": "4.24.0",
|
||||
"@algolia/logger-common": "4.24.0",
|
||||
"@algolia/logger-console": "4.24.0",
|
||||
"@algolia/requester-browser-xhr": "4.24.0",
|
||||
"@algolia/requester-common": "4.24.0",
|
||||
"@algolia/requester-node-http": "4.24.0",
|
||||
"@algolia/transporter": "4.24.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@algolia/recommend/node_modules/@algolia/client-common": {
|
||||
"version": "4.24.0",
|
||||
"resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-4.24.0.tgz",
|
||||
"integrity": "sha512-bc2ROsNL6w6rqpl5jj/UywlIYC21TwSSoFHKl01lYirGMW+9Eek6r02Tocg4gZ8HAw3iBvu6XQiM3BEbmEMoiA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@algolia/requester-common": "4.24.0",
|
||||
"@algolia/transporter": "4.24.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@algolia/recommend/node_modules/@algolia/client-search": {
|
||||
"version": "4.24.0",
|
||||
"resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-4.24.0.tgz",
|
||||
"integrity": "sha512-uRW6EpNapmLAD0mW47OXqTP8eiIx5F6qN9/x/7HHO6owL3N1IXqydGwW5nhDFBrV+ldouro2W1VX3XlcUXEFCA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@algolia/client-common": "4.24.0",
|
||||
"@algolia/requester-common": "4.24.0",
|
||||
"@algolia/transporter": "4.24.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@algolia/recommend/node_modules/@algolia/requester-browser-xhr": {
|
||||
"version": "4.24.0",
|
||||
"resolved": "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-4.24.0.tgz",
|
||||
"integrity": "sha512-Z2NxZMb6+nVXSjF13YpjYTdvV3032YTBSGm2vnYvYPA6mMxzM3v5rsCiSspndn9rzIW4Qp1lPHBvuoKJV6jnAA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@algolia/requester-common": "4.24.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@algolia/recommend/node_modules/@algolia/requester-node-http": {
|
||||
"version": "4.24.0",
|
||||
"resolved": "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-4.24.0.tgz",
|
||||
"integrity": "sha512-JF18yTjNOVYvU/L3UosRcvbPMGT9B+/GQWNWnenIImglzNVGpyzChkXLnrSf6uxwVNO6ESGu6oN8MqcGQcjQJw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@algolia/requester-common": "4.24.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@algolia/requester-browser-xhr": {
|
||||
"version": "5.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-5.4.1.tgz",
|
||||
"integrity": "sha512-J6+YfU+maR0nIbsYRHoq0UpneilX97hrZzPuuvSoBojQmPo8PeCXKGeT/F0D8uFI6G4CMTKEPGmQYrC9IpCbcQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@algolia/client-common": "5.4.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 14.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@algolia/requester-common": {
|
||||
"version": "4.24.0",
|
||||
"resolved": "https://registry.npmjs.org/@algolia/requester-common/-/requester-common-4.24.0.tgz",
|
||||
"integrity": "sha512-k3CXJ2OVnvgE3HMwcojpvY6d9kgKMPRxs/kVohrwF5WMr2fnqojnycZkxPoEg+bXm8fi5BBfFmOqgYztRtHsQA==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@algolia/requester-fetch": {
|
||||
"version": "5.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@algolia/requester-fetch/-/requester-fetch-5.4.1.tgz",
|
||||
"integrity": "sha512-AO/C1pqqpIS8p2IsfM5x92S+UBKkcIen5dHfMEh1rnV0ArWDreeqrtxMD2A+6AjQVwYeZNy56w7o7PVIm6mc8g==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@algolia/client-common": "5.4.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 14.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@algolia/requester-node-http": {
|
||||
"version": "5.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-5.4.1.tgz",
|
||||
"integrity": "sha512-2Y3vffc91egwFxz0SjXFEH4q8nvlNJHcz+0//NaWItRU68AvD+3aI/j66STPjkLQOC0Ku6ckA9ChhbOVfrv+Uw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@algolia/client-common": "5.4.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 14.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@algolia/transporter": {
|
||||
"version": "4.24.0",
|
||||
"resolved": "https://registry.npmjs.org/@algolia/transporter/-/transporter-4.24.0.tgz",
|
||||
"integrity": "sha512-86nI7w6NzWxd1Zp9q3413dRshDqAzSbsQjhcDhPIatEFiZrL1/TjnHL8S7jVKFePlIMzDsZWXAXwXzcok9c5oA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@algolia/cache-common": "4.24.0",
|
||||
"@algolia/logger-common": "4.24.0",
|
||||
"@algolia/requester-common": "4.24.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@ampproject/remapping": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz",
|
||||
@ -485,6 +826,57 @@
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@docsearch/css": {
|
||||
"version": "3.6.1",
|
||||
"resolved": "https://registry.npmjs.org/@docsearch/css/-/css-3.6.1.tgz",
|
||||
"integrity": "sha512-VtVb5DS+0hRIprU2CO6ZQjK2Zg4QU5HrDM1+ix6rT0umsYvFvatMAnf97NHZlVWDaaLlx7GRfR/7FikANiM2Fg==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@docsearch/js": {
|
||||
"version": "3.6.1",
|
||||
"resolved": "https://registry.npmjs.org/@docsearch/js/-/js-3.6.1.tgz",
|
||||
"integrity": "sha512-erI3RRZurDr1xES5hvYJ3Imp7jtrXj6f1xYIzDzxiS7nNBufYWPbJwrmMqWC5g9y165PmxEmN9pklGCdLi0Iqg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@docsearch/react": "3.6.1",
|
||||
"preact": "^10.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@docsearch/react": {
|
||||
"version": "3.6.1",
|
||||
"resolved": "https://registry.npmjs.org/@docsearch/react/-/react-3.6.1.tgz",
|
||||
"integrity": "sha512-qXZkEPvybVhSXj0K7U3bXc233tk5e8PfhoZ6MhPOiik/qUQxYC+Dn9DnoS7CxHQQhHfCvTiN0eY9M12oRghEXw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@algolia/autocomplete-core": "1.9.3",
|
||||
"@algolia/autocomplete-preset-algolia": "1.9.3",
|
||||
"@docsearch/css": "3.6.1",
|
||||
"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",
|
||||
"search-insights": ">= 1 < 3"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@types/react": {
|
||||
"optional": true
|
||||
},
|
||||
"react": {
|
||||
"optional": true
|
||||
},
|
||||
"react-dom": {
|
||||
"optional": true
|
||||
},
|
||||
"search-insights": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/aix-ppc64": {
|
||||
"version": "0.23.1",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.23.1.tgz",
|
||||
@ -2983,6 +3375,73 @@
|
||||
"ajv": "^6.9.1"
|
||||
}
|
||||
},
|
||||
"node_modules/algoliasearch": {
|
||||
"version": "4.24.0",
|
||||
"resolved": "https://registry.npmjs.org/algoliasearch/-/algoliasearch-4.24.0.tgz",
|
||||
"integrity": "sha512-bf0QV/9jVejssFBmz2HQLxUadxk574t4iwjCKp5E7NBzwKkrDEhKPISIIjAU/p6K5qDx3qoeh4+26zWN1jmw3g==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@algolia/cache-browser-local-storage": "4.24.0",
|
||||
"@algolia/cache-common": "4.24.0",
|
||||
"@algolia/cache-in-memory": "4.24.0",
|
||||
"@algolia/client-account": "4.24.0",
|
||||
"@algolia/client-analytics": "4.24.0",
|
||||
"@algolia/client-common": "4.24.0",
|
||||
"@algolia/client-personalization": "4.24.0",
|
||||
"@algolia/client-search": "4.24.0",
|
||||
"@algolia/logger-common": "4.24.0",
|
||||
"@algolia/logger-console": "4.24.0",
|
||||
"@algolia/recommend": "4.24.0",
|
||||
"@algolia/requester-browser-xhr": "4.24.0",
|
||||
"@algolia/requester-common": "4.24.0",
|
||||
"@algolia/requester-node-http": "4.24.0",
|
||||
"@algolia/transporter": "4.24.0"
|
||||
}
|
||||
},
|
||||
"node_modules/algoliasearch/node_modules/@algolia/client-common": {
|
||||
"version": "4.24.0",
|
||||
"resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-4.24.0.tgz",
|
||||
"integrity": "sha512-bc2ROsNL6w6rqpl5jj/UywlIYC21TwSSoFHKl01lYirGMW+9Eek6r02Tocg4gZ8HAw3iBvu6XQiM3BEbmEMoiA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@algolia/requester-common": "4.24.0",
|
||||
"@algolia/transporter": "4.24.0"
|
||||
}
|
||||
},
|
||||
"node_modules/algoliasearch/node_modules/@algolia/client-search": {
|
||||
"version": "4.24.0",
|
||||
"resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-4.24.0.tgz",
|
||||
"integrity": "sha512-uRW6EpNapmLAD0mW47OXqTP8eiIx5F6qN9/x/7HHO6owL3N1IXqydGwW5nhDFBrV+ldouro2W1VX3XlcUXEFCA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@algolia/client-common": "4.24.0",
|
||||
"@algolia/requester-common": "4.24.0",
|
||||
"@algolia/transporter": "4.24.0"
|
||||
}
|
||||
},
|
||||
"node_modules/algoliasearch/node_modules/@algolia/requester-browser-xhr": {
|
||||
"version": "4.24.0",
|
||||
"resolved": "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-4.24.0.tgz",
|
||||
"integrity": "sha512-Z2NxZMb6+nVXSjF13YpjYTdvV3032YTBSGm2vnYvYPA6mMxzM3v5rsCiSspndn9rzIW4Qp1lPHBvuoKJV6jnAA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@algolia/requester-common": "4.24.0"
|
||||
}
|
||||
},
|
||||
"node_modules/algoliasearch/node_modules/@algolia/requester-node-http": {
|
||||
"version": "4.24.0",
|
||||
"resolved": "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-4.24.0.tgz",
|
||||
"integrity": "sha512-JF18yTjNOVYvU/L3UosRcvbPMGT9B+/GQWNWnenIImglzNVGpyzChkXLnrSf6uxwVNO6ESGu6oN8MqcGQcjQJw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@algolia/requester-common": "4.24.0"
|
||||
}
|
||||
},
|
||||
"node_modules/ansi-escapes": {
|
||||
"version": "7.0.0",
|
||||
"resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-7.0.0.tgz",
|
||||
@ -16658,6 +17117,14 @@
|
||||
"url": "https://opencollective.com/webpack"
|
||||
}
|
||||
},
|
||||
"node_modules/search-insights": {
|
||||
"version": "2.17.2",
|
||||
"resolved": "https://registry.npmjs.org/search-insights/-/search-insights-2.17.2.tgz",
|
||||
"integrity": "sha512-zFNpOpUO+tY2D85KrxJ+aqwnIfdEGi06UH2+xEb+Bp9Mwznmauqc9djbnBibJO5mpfUPPa8st6Sx65+vbeO45g==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/semver": {
|
||||
"version": "6.3.1",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
|
||||
|
@ -24,6 +24,8 @@
|
||||
"#": "note: `lz-string` is included because `@typescript/vfs` (through `twoslash`) types use it w/o marking it as a dep",
|
||||
"devDependencies": {
|
||||
"@babel/types": "^7.0.0",
|
||||
"@docsearch/css": "^3.0.0",
|
||||
"@docsearch/js": "^3.0.0",
|
||||
"@floating-ui/dom": "^1.0.0",
|
||||
"@next/mdx": "^14.0.0",
|
||||
"@node-loader/core": "^2.0.0",
|
||||
|
@ -194,7 +194,7 @@ await pAll(
|
||||
const file = await unified()
|
||||
.use(rehypeParse, {fragment: true})
|
||||
.use(rehypeDocument, {
|
||||
css: ['/index.css'],
|
||||
css: ['/index.css', 'https://esm.sh/@docsearch/css@3/dist/style.css'],
|
||||
// Idea: only include editor on playground? Use more editors.
|
||||
js: ['/index.js', '/editor.js'],
|
||||
language: 'en',
|
||||
|
Loading…
Reference in New Issue
Block a user